@gmgis/gm-sdk 1.12.4 → 1.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/gm.min.js +263 -145
  2. package/dist/index.js +262 -144
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,77 +1,75 @@
1
- var Hp=Object.defineProperty;var Np=(n,e,t)=>e in n?Hp(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ai=(n,e,t)=>(Np(n,typeof e!="symbol"?e+"":e,t),t);var Na={};function de(n,e){Na[n]=e}function me(n){return Na[n]}var Wa={};function $e(n,e){Wa[n]=e}function et(n){return Wa[n]}var Wp={},Be=Wp;import{Cesium as i,Supercluster as ni}from"@gmgis/gm-common";de("Cesium",i);de("Supercluster",ni);var Gp="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),li=class{static uuid(e="D"){let t=[];t[8]=t[13]=t[18]=t[23]="-",t[14]="4";let r;for(let s=0;s<36;s++)t[s]||(r=0|Math.random()*16,t[s]=Gp[s===19?r&3|8:r]);return e+"-"+t.join("")}static merge(e,...t){let r,s,o,a;for(s=0,o=t.length;s<o;s++){a=t[s];for(r in a)e[r]=a[r]}return e}static splitWords(e){return this.trim(e).split(/\s+/)}static setOptions(e,t){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let r in t)e.options[r]=t[r];return e.options}static formatNum(e,t){let r=Math.pow(10,t===void 0?6:t);return Math.round(e*r)/r}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static emptyImageUrl(){return function(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}()}static checkPosition(e){return e&&e.hasOwnProperty("_lng")&&e.hasOwnProperty("_lat")&&e.hasOwnProperty("_alt")}static debounce(e,t){let r=null;return function(){r&&clearTimeout(r),r=setTimeout(e,t)}}static throttle(e,t){let r=!0;return function(){if(!r)return!1;r=!1,setTimeout(()=>{e(),r=!0},t)}}static dataURLtoBlob(e){let t=e.split(","),r=t[0].match(/:(.*?);/)[1],s=atob(t[1]),o=s.length,a=new Uint8Array(o);for(;o--;)a[o]=s.charCodeAt(o);return new Blob([a],{type:r})}static isPromise(e){return Promise.resolve(e)==e}},v=li;var hi=class{static get(e){return typeof e=="string"?document.getElementById(e):e}static getStyle(e,t){let r=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!r||r==="auto")&&document.defaultView){let s=document.defaultView.getComputedStyle(e,null);r=s?s[t]:null}return r==="auto"?null:r}static create(e,t,r=null){let s=document.createElement(e);return s.className=t||"",r&&r.appendChild(s),s}static remove(e){let t=e.parentNode;t&&t.removeChild(e)}static empty(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,t){if(e.classList!==void 0)return e.classList.contains(t);let r=this.getClass(e);return r.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(r)}static addClass(e,t){if(e.classList!==void 0){let r=v.splitWords(t);for(let s=0,o=r.length;s<o;s++)e.classList.add(r[s])}else if(!this.hasClass(e,t)){let r=this.getClass(e);this.setClass(e,(r?r+" ":"")+t)}}static removeClass(e,t){e.classList!==void 0?e.classList.remove(t):this.setClass(e,v.trim((" "+this.getClass(e)+" ").replace(" "+t+" "," ")))}static setClass(e,t){e.className.baseVal===void 0?e.className=t:e.className.baseVal=t}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}static createSvg(e,t,r,s){let o=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");o.setAttribute("class","svg-path"),o.setAttribute("width",e),o.setAttribute("height",t),o.setAttribute("viewBox",`0 0 ${e} ${t}`);let a=document.createElementNS("http://www.w3.org/2000/svg","path");return a.setAttribute("d",r),o.appendChild(a),s&&s.appendChild(o),o}static parseDom(e,t,r){t=t!=null?t:!1;let s=document.createElement("div");return s.className=r||"",s.innerHTML=e,t?s:s.childNodes}static enterFullscreen(e){e&&(e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen())}static exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}static createVideo(e,t,r=null){let s=this.create("video",t,r),o=this.create("source","",s);o.setAttribute("src",e),o.setAttribute("type","video/map4");let a=this.create("source","",s);return a.setAttribute("src",e),a.setAttribute("type","video/quicktime"),s}},S=hi;var ci=Math.PI*2,tt=100,pi=1e-4,di=class{static distance(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}static wholeDistance(e){let t=0;for(let r=0;r<e.length-1;r++)t+=this.distance(e[r],e[r+1]);return t}static getBaseLength(e){return Math.pow(this.wholeDistance(e),.99)}static mid(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}static getCircleCenterOfThreePoints(e,t,r){let s=[(e[0]+t[0])/2,(e[1]+t[1])/2],o=[s[0]-e[1]+t[1],s[1]+e[0]-t[0]],a=[(e[0]+r[0])/2,(e[1]+r[1])/2],l=[a[0]-e[1]+r[1],a[1]+e[0]-r[0]];return this.getIntersectPoint(s,o,a,l)}static getIntersectPoint(e,t,r,s){let o,a,l,h;return e[1]===t[1]?(l=(s[0]-r[0])/(s[1]-r[1]),o=l*(e[1]-r[1])+r[0],a=e[1],[o,a]):r[1]===s[1]?(h=(t[0]-e[0])/(t[1]-e[1]),o=h*(r[1]-e[1])+e[0],a=r[1],[o,a]):(h=(t[0]-e[0])/(t[1]-e[1]),l=(s[0]-r[0])/(s[1]-r[1]),a=(h*e[1]-e[0]-l*r[1]+r[0])/(h-l),o=h*a-h*e[1]+e[0],[o,a])}static getAzimuth(e,t){let r,s=Math.asin(Math.abs(t[1]-e[1])/this.distance(e,t));return t[1]>=e[1]&&t[0]>=e[0]?r=s+Math.PI:t[1]>=e[1]&&t[0]<e[0]?r=ci-s:t[1]<e[1]&&t[0]<e[0]?r=s:t[1]<e[1]&&t[0]>=e[0]&&(r=Math.PI-s),r}static getAngleOfThreePoints(e,t,r){let s=this.getAzimuth(t,e)-this.getAzimuth(t,r);return s<0?s+ci:s}static isClockWise(e,t,r){return(r[1]-e[1])*(t[0]-e[0])>(t[1]-e[1])*(r[0]-e[0])}static getPointOnLine(e,t,r){let s=t[0]+e*(r[0]-t[0]),o=t[1]+e*(r[1]-t[1]);return[s,o]}static getCubicValue(e,t,r,s,o){e=Math.max(Math.min(e,1),0);let a=1-e,l=e*e,h=l*e,c=a*a,p=c*a,f=p*t[0]+3*c*e*r[0]+3*a*l*s[0]+h*o[0],T=p*t[1]+3*c*e*r[1]+3*a*l*s[1]+h*o[1];return[f,T]}static getThirdPoint(e,t,r,s,o){let a=this.getAzimuth(e,t),l=o?a+r:a-r,h=s*Math.cos(l),c=s*Math.sin(l);return[t[0]+h,t[1]+c]}static getArcPoints(e,t,r,s){let o,a,l=[],h=s-r;h=h<0?h+ci:h;for(let c=0;c<=tt;c++){let p=r+h*c/tt;o=e[0]+t*Math.cos(p),a=e[1]+t*Math.sin(p),l.push([o,a])}return l}static getBisectorNormals(e,t,r,s){let o=this.getNormal(t,r,s),a=Math.sqrt(o[0]*o[0]+o[1]*o[1]),l=o[0]/a,h=o[1]/a,c=this.distance(t,r),p=this.distance(r,s),f,T,y,m,E;return a>pi?this.isClockWise(t,r,s)?(f=e*c,T=r[0]-f*h,y=r[1]+f*l,E=[T,y],f=e*p,T=r[0]+f*h,y=r[1]-f*l,m=[T,y]):(f=e*c,T=r[0]+f*h,y=r[1]-f*l,E=[T,y],f=e*p,T=r[0]-f*h,y=r[1]+f*l,m=[T,y]):(T=r[0]+e*(t[0]-r[0]),y=r[1]+e*(t[1]-r[1]),E=[T,y],T=r[0]+e*(s[0]-r[0]),y=r[1]+e*(s[1]-r[1]),m=[T,y]),[E,m]}static getNormal(e,t,r){let s=e[0]-t[0],o=e[1]-t[1],a=Math.sqrt(s*s+o*o);s/=a,o/=a;let l=r[0]-t[0],h=r[1]-t[1],c=Math.sqrt(l*l+h*h);l/=c,h/=c;let p=s+l,f=o+h;return[p,f]}static getCurvePoints(e,t){let s=[this.getLeftMostControlPoint(e,t)],o,a,l,h;for(let f=0;f<t.length-2;f++)o=t[f],a=t[f+1],l=t[f+2],h=this.getBisectorNormals(e,o,a,l),s=s.concat(h);let c=this.getRightMostControlPoint(e,t);s.push(c);let p=[];for(let f=0;f<t.length-1;f++){o=t[f],a=t[f+1],p.push(o);for(let T=0;T<tt;T++){let y=this.getCubicValue(T/tt,o,s[f*2],s[f*2+1],a);p.push(y)}p.push(a)}return p}static getLeftMostControlPoint(e,t){let r=t[0],s=t[1],o=t[2],l=this.getBisectorNormals(0,r,s,o)[0],h=this.getNormal(r,s,o),c=Math.sqrt(h[0]*h[0]+h[1]*h[1]),p,f;if(c>pi){let T=this.mid(r,s),y=r[0]-T[0],m=r[1]-T[1],x=2/this.distance(r,s),b=-x*m,I=x*y,N=b*b-I*I,H=2*b*I,W=I*I-b*b,ee=l[0]-T[0],le=l[1]-T[1];p=T[0]+N*ee+H*le,f=T[1]+H*ee+W*le}else p=r[0]+e*(s[0]-r[0]),f=r[1]+e*(s[1]-r[1]);return[p,f]}static getRightMostControlPoint(e,t){let r=t.length,s=t[r-3],o=t[r-2],a=t[r-1],h=this.getBisectorNormals(0,s,o,a)[1],c=this.getNormal(s,o,a),p=Math.sqrt(c[0]*c[0]+c[1]*c[1]),f,T;if(p>pi){let y=this.mid(o,a),m=a[0]-y[0],E=a[1]-y[1],b=2/this.distance(o,a),I=-b*E,N=b*m,H=I*I-N*N,W=2*I*N,ee=N*N-I*I,le=h[0]-y[0],j=h[1]-y[1];f=y[0]+H*le+W*j,T=y[1]+W*le+ee*j}else f=a[0]+e*(o[0]-a[0]),T=a[1]+e*(o[1]-a[1]);return[f,T]}static getBezierPoints(e){if(e.length<=2)return e;let t=[],r=e.length-1;for(let s=0;s<=1;s+=.01){let o=0,a=0;for(let l=0;l<=r;l++){let h=this.getBinomialFactor(r,l),c=Math.pow(s,l),p=Math.pow(1-s,r-l);o+=h*c*p*e[l][0],a+=h*c*p*e[l][1]}t.push([o,a])}return t.push(e[r]),t}static getBinomialFactor(e,t){return this.getFactorial(e)/(this.getFactorial(t)*this.getFactorial(e-t))}static getFactorial(e){if(e<=1)return 1;if(e===2)return 2;if(e===3)return 6;if(e===4)return 24;if(e===5)return 120;let t=1;for(let r=1;r<=e;r++)t*=r;return t}static getQBSplinePoints(e){if(e.length<=2)return e;let t=2,r=[],s=e.length-t-1;r.push(e[0]);for(let o=0;o<=s;o++)for(let a=0;a<=1;a+=.05){let l=0,h=0;for(let c=0;c<=t;c++){let p=this.getQuadricBSplineFactor(c,a);l+=p*e[o+c][0],h+=p*e[o+c][1]}r.push([l,h])}return r.push(e[e.length-1]),r}static getQuadricBSplineFactor(e,t){return e===0?Math.pow(t-1,2)/2:e===1?(-2*Math.pow(t,2)+2*t+1)/2:e===2?Math.pow(t,2)/2:0}},w=di;var Up={INITIALIZED:"initialized",ADDED:"added",REMOVED:"removed",CLEARED:"cleared",INSTALLED:"installed",ENABLED:"enabled",DISABLED:"disabled",PLAY:"play",PAUSE:"pause",RESTORE:"restore"},d=Up;var Ve={ADD:"add",REMOVE:"remove"},L={LEFT_DOWN:i.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.ScreenSpaceEventType.LEFT_UP,CLICK:i.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:i.ScreenSpaceEventType.WHEEL,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout"},Ga={ADD_LAYER:"addLayer",REMOVE_LAYER:"removeLayer",ADD_EFFECT:"addEffect",REMOVE_EFFECT:"removeEffect",LEFT_DOWN:i.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.ScreenSpaceEventType.LEFT_UP,CLICK:i.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:i.ScreenSpaceEventType.WHEEL},A={CAMERA_MOVE_END:"cameraMoveEnd",CAMERA_CHANGED:"cameraChanged",PRE_UPDATE:"preUpdate",POST_UPDATE:"postUpdate",PRE_RENDER:"preRender",POST_RENDER:"postRender",MORPH_COMPLETE:"morphComplete",CLOCK_TICK:"clockTick",RENDER_ERROR:"renderError"},ve={...Ve,LEFT_DOWN:i.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.ScreenSpaceEventType.LEFT_UP,CLICK:i.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.ScreenSpaceEventType.MOUSE_MOVE,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",POSITION_UPDATE:"positionUpdate"},Ae={READY:"ready",TEX_READY:"texturesReady"},q={INITIAL_TILES_LOADED:"initialTilesLoaded",ALL_TILES_LOADED:"allTilesLoaded ",LOAD_PROGRESS:"loadProgress ",TILE_FAILED:"tileFailed ",TILE_LOAD:"tileLoad",TILE_UNLOAD:"tileUnload",TILE_VISIBLE:"tileVisible"},we=Ve,Te={...Ve,LEFT_DOWN:i.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.ScreenSpaceEventType.LEFT_UP,CLICK:i.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.ScreenSpaceEventType.LEFT_DOUBLE_CLICK},ie={...Ve,POST_RENDER:"postRender",ACTIVATE:"activate",DEACTIVATE:"deactivate",RESET_TIME_LINE:"restTimeLine"},re={...Ve,POST_RENDER:"postRender",RESET_TIME_LINE:"restTimeLine"},C={DRAW_START:"drawStart",DRAW_STOP:"drawStop",EDIT_START:"editStart",EDIT_STOP:"editEnd",DRAW_ANCHOR:"drawAnchor",CREATE_ANCHOR:"createAnchor",UPDATE_ANCHOR:"updateAnchor",ANCHOR_MOVING:"anchorMoving",EDIT_ANCHOR_STOP:"editAnchorStop",CLEAR_ANCHOR:"clearAnchor"};var mi=class{constructor(e){this._types=e,this._cache={}}_on(e,t,r){let s=this.getEvent(e),o;return s&&t&&(o=s.addEventListener(t,r||this)),o}_off(e,t,r){let s=this.getEvent(e),o=!1;return s&&t&&(o=s.removeEventListener(t,r||this)),o}_fire(e,t){let r=this.getEvent(e);r&&r.raiseEvent(t)}_registerEvent(){Object.keys(this._types).forEach(e=>{let t=this._types[e];this._cache[t]=new i.Event})}on(e,t,r){return this._on(e,t,r)}once(e,t,r){let s=this._on(e,o=>{t(o),s&&s()},r)}off(e,t,r){return this._off(e,t,r)}fire(e,t){this._fire(e,t)}getEvent(e){return this._cache[e]||void 0}},G=mi;var ui=class extends G{constructor(e,t={}){super(L),this._viewer=e,this._selected=void 0,this._enableEventPropagation=t.enableEventPropagation,this._enableMouseOver=t.enableMouseOver,this._registerEvent(),this._addDefaultEvent()}_registerEvent(){let e=new i.ScreenSpaceEventHandler(this._viewer.canvas);Object.keys(i.ScreenSpaceEventType).forEach(t=>{let r=i.ScreenSpaceEventType[t];this._cache[r]=new i.Event,e.setInputAction(s=>{this._cache[r].raiseEvent(s)},r)})}_addDefaultEvent(){this.on(this._types.LEFT_DOWN,this._leftDownHandler,this),this.on(this._types.LEFT_UP,this._leftUpHandler,this),this.on(this._types.CLICK,this._clickHandler,this),this.on(this._types.DB_CLICK,this._dbClickHandler,this),this.on(this._types.RIGHT_DOWN,this._rightDownHandler,this),this.on(this._types.RIGHT_UP,this._rightUpHandler,this),this.on(this._types.RIGHT_CLICK,this._rightClickHandler,this),this.on(this._types.MOUSE_MOVE,this._mouseMoveHandler,this),this.on(this._types.WHEEL,this._mouseWheelHandler,this)}_adjustPosition(e){let t=this._viewer.container.getBoundingClientRect(),r=t.width/this._viewer.container.offsetWidth,s=t.height/this._viewer.container.offsetHeight,o=window.devicePixelRatio,a=e.x/r/o,l=e.y/s/o;return new i.Cartesian2(a,l)}_getMouseInfo(e){let t=this._viewer.scene,r=t.pick(e),s,o,a,l;if(t.pickPositionSupported&&(s=t.pickPosition(e)),s){let h=i.Ellipsoid.WGS84.cartesianToCartographic(s);h&&(a={lng:i.Math.toDegrees(h.longitude),lat:i.Math.toDegrees(h.latitude),alt:h.height})}if(t.mode===i.SceneMode.SCENE3D&&!(this._viewer.terrainProvider instanceof i.EllipsoidTerrainProvider)){let h=t.camera.getPickRay(e);o=t.globe.pick(h,t)}else o=t.camera.pickEllipsoid(e,i.Ellipsoid.WGS84);if(o){let h=i.Ellipsoid.WGS84.cartesianToCartographic(o);h&&(l={lng:i.Math.toDegrees(h.longitude),lat:i.Math.toDegrees(h.latitude),alt:h.height})}return{target:r,windowPosition:e,position:s,wgs84Position:a,surfacePosition:o,wgs84SurfacePosition:l}}_getDrillInfos(e){let t=[],s=this._viewer.scene.drillPick(e);return s&&s.length&&s.forEach(o=>{t.push(this._getTargetInfo(o))}),t}_getOverlayId(e){let t;return(e==null?void 0:e.id)instanceof i.Entity?t=e.id.overlayId:e instanceof i.Cesium3DTileFeature?t=e.tileset.overlayId:((e==null?void 0:e.primitive)instanceof i.Cesium3DTileset||e!=null&&e.primitive)&&(t=e.primitive.overlayId),t}_getTargetInfo(e){let t,r,s;return(e==null?void 0:e.id)instanceof i.Entity?(r=this._viewer.getLayers().filter(o=>o.layerId===e.id.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.id.overlayId))):e instanceof i.Cesium3DTileFeature?(r=this._viewer.getLayers().filter(o=>o.layerId===e.tileset.layerId)[0],s=e,r!=null&&r.getOverlay&&(t=r.getOverlay(e.tileset.overlayId),s&&s.getPropertyNames&&s.getPropertyNames().forEach(a=>{t.attr[a]=s.getProperty(a)}))):(e==null?void 0:e.primitive)instanceof i.Cesium3DTileset?(r=this._viewer.getLayers().filter(o=>o.layerId===e.primitive.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.primitive.overlayId))):e!=null&&e.primitive&&(r=this._viewer.getLayers().filter(o=>o.layerId===e.primitive.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.primitive.overlayId))),{layer:r,overlay:t,feature:s,instanceId:e==null?void 0:e.instanceId}}_raiseEvent(e,t={}){var l;let r,s=this._getTargetInfo(t.target),o=s==null?void 0:s.overlay,a=s==null?void 0:s.layer;o!=null&&o.overlayEvent&&(r=o.overlayEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),(!r||r.numberOfListeners===0||this._eventPropagation)&&(a!=null&&a.layerEvent)&&(r=a.layerEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),(!r||r.numberOfListeners===0||this._enableEventPropagation)&&((l=this._viewer)!=null&&l.viewerEvent)&&(r=this._viewer.viewerEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),o!=null&&o.allowDrillPicking&&this._getDrillInfos(t.windowPosition).forEach(c=>{let p=c==null?void 0:c.overlay,f=c==null?void 0:c.layer;(p==null?void 0:p.overlayId)!==o.overlayId&&(p!=null&&p.overlayEvent)&&(r=p.overlayEvent.getEvent(e),(!r||r.numberOfListeners===0)&&(f!=null&&f.layerEvent)&&(r=f.layerEvent.getEvent(e)),r&&r.numberOfListeners>0&&r.raiseEvent({...c,...t}))})}_clickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.CLICK,this._getMouseInfo(e.position))}_dbClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.DB_CLICK,this._getMouseInfo(e.position))}_rightClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.RIGHT_CLICK,this._getMouseInfo(e.position))}_mouseMoveHandler(e){if(!(e!=null&&e.endPosition))return!1;let t=this._getMouseInfo(e.endPosition);this._viewer.canvas.style.cursor=t.target?"pointer":"default",this._raiseEvent(L.MOUSE_MOVE,t),this._enableMouseOver&&(!this._selected||this._getOverlayId(this._selected.target)!==this._getOverlayId(t.target))&&(this._raiseEvent(L.MOUSE_OUT,this._selected),this._raiseEvent(L.MOUSE_OVER,t),this._selected=t)}_leftDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.LEFT_DOWN,this._getMouseInfo(e.position))}_leftUpHandler(e){this._raiseEvent(L.LEFT_UP,this._getMouseInfo(e.position))}_rightDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.RIGHT_DOWN,this._getMouseInfo(e.position))}_rightUpHandler(e){this._raiseEvent(L.RIGHT_UP,this._getMouseInfo(e.position))}_mouseWheelHandler(e){this._raiseEvent(L.WHEEL,{movement:e})}},_i=ui;var fi=class extends G{constructor(){super(Ga),this._registerEvent()}},gi=fi;var yi=class extends G{constructor(e){super(A),this._camera=e.camera,this._scene=e.scene,this._clock=e.clock}on(e,t,r){let s;switch(e){case A.CAMERA_MOVE_END:s=this._camera.moveEnd.addEventListener(t,r||this);break;case A.CAMERA_CHANGED:s=this._camera.changed.addEventListener(t,r||this);break;case A.PRE_UPDATE:s=this._scene.preUpdate.addEventListener(t,r||this);break;case A.POST_UPDATE:s=this._scene.postUpdate.addEventListener(t,r||this);break;case A.PRE_RENDER:s=this._scene.preRender.addEventListener(t,r||this);break;case A.POST_RENDER:s=this._scene.postRender.addEventListener(t,r||this);break;case A.MORPH_COMPLETE:s=this._scene.morphComplete.addEventListener(t,r||this);break;case A.CLOCK_TICK:s=this._clock.onTick.addEventListener(t,r||this);break;case A.RENDER_ERROR:s=this._scene.renderError.addEventListener(t,r||this);break;default:break}return s}off(e,t,r){let s=!1;switch(e){case A.CAMERA_MOVE_END:s=this._camera.moveEnd.removeEventListener(t,r||this);break;case A.CAMERA_CHANGED:s=this._camera.changed.removeEventListener(t,r||this);break;case A.PRE_UPDATE:s=this._scene.preUpdate.removeEventListener(t,r||this);break;case A.POST_UPDATE:s=this._scene.postUpdate.removeEventListener(t,r||this);break;case A.PRE_RENDER:s=this._scene.preRender.removeEventListener(t,r||this);break;case A.POST_RENDER:s=this._scene.postRender.removeEventListener(t,r||this);break;case A.MORPH_COMPLETE:s=this._scene.morphComplete.removeEventListener(t,r||this);break;case A.CLOCK_TICK:s=this._clock.onTick.removeEventListener(t,r||this);break;case A.RENDER_ERROR:s=this._scene.renderError.removeEventListener(t,r||this);break;default:break}return s}},vi=yi;var wi=class extends G{constructor(){super(we),this._registerEvent()}},Ti=wi;var Ci=class extends G{constructor(){super(Te),this._registerEvent()}},xi=Ci;var Ei=class extends G{constructor(){super(ve),this._registerEvent()}},Pi=Ei;var bi=class extends G{constructor(e){super(q),this._tileset=e}on(e,t,r){return this._tileset.then(s=>{switch(e){case q.INITIAL_TILES_LOADED:s.initialTilesLoaded.addEventListener(t,r||this);break;case q.ALL_TILES_LOADED:s.allTilesLoaded.addEventListener(t,r||this);break;case q.LOAD_PROGRESS:s.loadProgress.addEventListener(t,r||this);break;case q.TILE_FAILED:s.tileFailed.addEventListener(t,r||this);break;case q.TILE_LOAD:s.tileLoad.addEventListener(t,r||this);break;case q.TILE_UNLOAD:s.tileUnload.addEventListener(t,r||this);break;case q.TILE_VISIBLE:s.tileVisible.addEventListener(t,r||this);break;default:break}}),null}off(e,t,r){return this._tileset.then(s=>{switch(e){case q.INITIAL_TILES_LOADED:s.initialTilesLoaded.removeEventListener(t,r||this);break;case q.ALL_TILES_LOADED:s.allTilesLoaded.removeEventListener(t,r||this);break;case q.LOAD_PROGRESS:s.loadProgress.removeEventListener(t,r||this);break;case q.TILE_FAILED:s.tileFailed.removeEventListener(t,r||this);break;case q.TILE_LOAD:s.tileLoad.removeEventListener(t,r||this);break;case q.TILE_UNLOAD:s.tileUnload.removeEventListener(t,r||this);break;case q.TILE_VISIBLE:s.tileVisible.removeEventListener(t,r||this);break;default:break}}),!0}},Si=bi;var Ii=class extends G{constructor(e){super(Ae),this._model=e}on(e,t,r){return this._model.then(s=>{switch(e){case Ae.READY:s.readyEvent.addEventListener(t,r||this);break;case Ae.TEX_READY:s.texturesReadyEvent.addEventListener(t,r||this);break;default:break}}),null}off(e,t,r){return this._model.then(s=>{switch(e){case Ae.READY:s.readyEvent.removeEventListener(t,r||this);break;case Ae.TEX_READY:s.texturesReadyEvent.removeEventListener(t,r||this);break;default:break}}),!0}},Mi=Ii;var Ai=class extends G{constructor(){super(ie),this._registerEvent()}},Di=Ai;var Li=class extends G{constructor(){super(re),this._registerEvent()}},Ri=Li;var Oi=class extends G{constructor(){super(C),this._registerEvent()}},je=Oi;var ki=class{constructor(e){this._id=v.uuid(),this._bid=e||v.uuid(),this._delegate=void 0,this._viewer=void 0,this._state=void 0,this._show=!0,this._isGround=!1,this._cache={},this._attr={},this._layerEvent=new xi,this._layerEvent.on(Te.ADD,this._onAdd,this),this._layerEvent.on(Te.REMOVE,this._onRemove,this)}get layerId(){return this._id}get id(){return this._bid}get delegate(){return this._delegate}set show(e){this._show=e,this._delegate&&(this._delegate.show=this._show)}get show(){return this._show}get layerEvent(){return this._layerEvent}set attr(e){this._attr=e}get attr(){return this._attr}get state(){return this._state}_addedHook(){}_removedHook(){}_onAdd(e){this._viewer=e,this._delegate&&(this._delegate instanceof i.PrimitiveCollection?this._isGround?this._viewer.scene.groundPrimitives.add(this._delegate):this._viewer.scene.primitives.add(this._delegate):this._delegate instanceof i.ImageryLayer?this._viewer.imageryLayers.add(this._delegate):this._viewer.dataSources.add(this._delegate),this._addedHook&&this._addedHook(),this._state=d.ADDED)}_onRemove(){this._delegate&&this._viewer&&(this._cache={},this._delegate instanceof i.PrimitiveCollection?(this._delegate.removeAll(),this._isGround?this._viewer.scene.groundPrimitives.remove(this._delegate):this._viewer.scene.primitives.remove(this._delegate)):this._delegate instanceof i.ImageryLayer?this._viewer.imageryLayers.remove(this._delegate,!1):this._delegate instanceof Promise?(this._delegate.then(e=>{e.entities.removeAll()}),this._viewer.dataSources.remove(this._delegate)):(this._delegate.entities&&this._delegate.entities.removeAll(),this._viewer.dataSources.remove(this._delegate)),this._removedHook&&this._removedHook(),this._state=d.REMOVED)}_addOverlay(e){this._cache.hasOwnProperty(e.overlayId)||(this._cache[e.overlayId]=e,this._delegate&&e.fire(ve.ADD,this),this._state===d.CLEARED&&(this._state=d.ADDED))}_removeOverlay(e){this._cache.hasOwnProperty(e.overlayId)&&(this._delegate&&e.fire(ve.REMOVE,this),delete this._cache[e.overlayId])}addOverlay(e){return this._addOverlay(e),this}addOverlays(e){return Array.isArray(e)&&e.forEach(t=>{this._addOverlay(t)}),this}removeOverlay(e){return this._removeOverlay(e),this}getOverlay(e){return this._cache[e]||void 0}getOverlayById(e){let t;return Object.keys(this._cache).forEach(r=>{this._cache[r].id===e&&(t=this._cache[r])}),t}getOverlaysByAttr(e,t){let r=[];return this.eachOverlay(s=>{s.attr[e]===t&&r.push(s)},this),r}eachOverlay(e,t){return Object.keys(this._cache).forEach(r=>{e&&e.call(t||this,this._cache[r])}),this}getOverlays(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}clear(){}remove(){this._viewer&&this._viewer.removeLayer(this)}addTo(e){return e!=null&&e.addLayer&&e.addLayer(this),this}setStyle(e){}on(e,t,r){return this._layerEvent.on(e,t,r||this),this}off(e,t,r){return this._layerEvent.off(e,t,r||this),this}fire(e,t){return this._layerEvent.fire(e,t),this}static registerType(e){e&&(Be[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getLayerType(e){return Be[e.toLocaleUpperCase()]||void 0}},P=ki;var Fi=class{constructor(e){this._id=e||v.uuid(),this._cache={},this._show=!0,this._viewer=void 0,this._layerGroupEvent=new Ti,this._layerGroupEvent.on(we.ADD,this._onAdd,this),this._layerGroupEvent.on(we.REMOVE,this._onRemove,this),this._state=d.INITIALIZED}get id(){return this._id}get type(){return P.getLayerType("layer_group")}set show(e){this._show=e,Object.keys(this._cache).forEach(t=>{this._cache[t].show=this._show})}get show(){return this._show}get layerGroupEvent(){return this._layerGroupEvent}get state(){return this._state}_onAdd(e){this._viewer=e,Object.keys(this._cache).forEach(t=>{this._viewer.addLayer(this._cache[t])}),this._state=d.ADDED}_onRemove(){Object.keys(this._cache).forEach(e=>{this._viewer&&this._viewer.removeLayer(this._cache[e])}),this._cache={},this._state=d.REMOVED}addLayer(e){return Object(this._cache).hasOwnProperty(e.id)||(this._cache[e.id]=e,this._viewer&&this._viewer.addLayer(e)),this}removeLayer(e){return Object(this._cache).hasOwnProperty(e.id)&&(this._viewer&&this._viewer.removeLayer(e),delete this._cache[e.id]),this}getLayer(e){return this._cache[e]||void 0}getLayers(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}addTo(e){return e&&e.addLayerGroup&&e.addLayerGroup(this),this}remove(){return this._viewer&&this._viewer.removeLayerGroup(this),this}};P.registerType("layer_group");var Ua=Fi;var Ba=new i.WebMercatorProjection,zi=class{static transformCartesianToWGS84(e){if(e){let t=i.Ellipsoid.WGS84.cartesianToCartographic(e);return new Y(i.Math.toDegrees((t==null?void 0:t.longitude)||0),i.Math.toDegrees((t==null?void 0:t.latitude)||0),t.height||0)}return new Y(0,0)}static transformCartographicToWGS84(e){return e?new Y(i.Math.toDegrees((e==null?void 0:e.longitude)||0),i.Math.toDegrees((e==null?void 0:e.latitude)||0),e.height||0):new Y(0,0)}static transformWGS84ToCartesian(e){return e?i.Cartesian3.fromDegrees(e.lng,e.lat,e.alt,i.Ellipsoid.WGS84):i.Cartesian3.ZERO}static transformWGS84ToCartographic(e){return e?i.Cartographic.fromDegrees(e.lng,e.lat,e.alt):i.Cartographic.ZERO}static transformCartesianArrayToWGS84Array(e){return e?e.map(t=>this.transformCartesianToWGS84(t)):[]}static transformWGS84ArrayToCartesianArray(e){return e?e.map(t=>this.transformWGS84ToCartesian(t)):[]}static transformWGS84ToMercator(e){let t=Ba.project(i.Cartographic.fromDegrees(e.lng,e.lat,e.alt));return new Y(t.x,t.y,t.z)}static transformMercatorToWGS84(e){let t=Ba.unproject(new i.Cartesian3(e.lng,e.lat,e.alt));return new Y(i.Math.toDegrees(t.longitude),i.Math.toDegrees(t.latitude),t.height)}static transformWindowToWGS84(e,t){let r=t.scene,s;if(r.mode===i.SceneMode.SCENE3D){let o=r.camera.getPickRay(e);s=r.globe.pick(o,r)}else s=r.camera.pickEllipsoid(e,i.Ellipsoid.WGS84);return this.transformCartesianToWGS84(s)}static transformWGS84ToWindow(e,t){let r=t.scene;return i.SceneTransforms.worldToWindowCoordinates(r,this.transformWGS84ToCartesian(e))}},u=zi;var it=52.35987755982988,K=3.141592653589793,Va=6378245,ja=.006693421622965943,Hi=class{static BD09ToGCJ02(e,t){let r=+e-.0065,s=+t-.006,o=Math.sqrt(r*r+s*s)-2e-5*Math.sin(s*it),a=Math.atan2(s,r)-3e-6*Math.cos(r*it),l=o*Math.cos(a),h=o*Math.sin(a);return[l,h]}static GCJ02ToBD09(e,t){t=+t,e=+e;let r=Math.sqrt(e*e+t*t)+2e-5*Math.sin(t*it),s=Math.atan2(t,e)+3e-6*Math.cos(e*it),o=r*Math.cos(s)+.0065,a=r*Math.sin(s)+.006;return[o,a]}static WGS84ToGCJ02(e,t){if(t=+t,e=+e,this.out_of_china(e,t))return[e,t];{let r=this.delta(e,t);return[e+r[0],t+r[1]]}}static GCJ02ToWGS84(e,t){if(t=+t,e=+e,this.out_of_china(e,t))return[e,t];{let r=[e,t],s=this.WGS84ToGCJ02(e,t),o=s[0]-e,a=s[1]-t;do s=this.WGS84ToGCJ02(r[0]-=o,r[1]-=a),o=s[0]-e,a=s[1]-t;while(Math.abs(o)>1e-7||Math.abs(a)>1e-7);return r}}static delta(e,t){let r=this.transformLng(e-105,t-35),s=this.transformLat(e-105,t-35),o=t/180*K,a=Math.sin(o);a=1-ja*a*a;let l=Math.sqrt(a);return r=r*180/(Va/l*Math.cos(o)*K),s=s*180/(Va*(1-ja)/(a*l)*K),[r,s]}static transformLng(e,t){t=+t,e=+e;let r=300+e+2*t+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return r+=(20*Math.sin(6*e*K)+20*Math.sin(2*e*K))*2/3,r+=(20*Math.sin(e*K)+40*Math.sin(e/3*K))*2/3,r+=(150*Math.sin(e/12*K)+300*Math.sin(e/30*K))*2/3,r}static transformLat(e,t){t=+t,e=+e;let r=-100+2*e+3*t+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return r+=(20*Math.sin(6*e*K)+20*Math.sin(2*e*K))*2/3,r+=(20*Math.sin(t*K)+40*Math.sin(t/3*K))*2/3,r+=(160*Math.sin(t/12*K)+320*Math.sin(t*K/30))*2/3,r}static out_of_china(e,t){return t=+t,e=+e,!(e>73.66&&e<135.05&&t>3.86&&t<53.55)}},ce=Hi;var Ni=class n{constructor(e,t,r,s,o,a){this._lng=+e||0,this._lat=+t||0,this._alt=+r||0,this._heading=+s||0,this._pitch=+o||0,this._roll=+a||0}set lng(e){this._lng=+e}get lng(){return this._lng}set lat(e){this._lat=+e}get lat(){return this._lat}set alt(e){this._alt=+e}get alt(){return this._alt}set heading(e){this._heading=+e}get heading(){return this._heading}set pitch(e){this._pitch=+e}get pitch(){return this._pitch}set roll(e){this._roll=+e}get roll(){return this._roll}serialize(){let e=new n(this._lng,this._lat,this._alt,this._heading,this._pitch,this._roll);return JSON.stringify(e)}distance(e){return!e||!(e instanceof n)?0:i.Cartesian3.distance(u.transformWGS84ToCartesian(this),u.transformWGS84ToCartesian(e))}clone(){let e=new n;return e.lng=this.lng||0,e.lat=this.lat||0,e.alt=this.alt||0,e.heading=this.heading||0,e.pitch=this.pitch||0,e.roll=this.roll||0,e}copy(){return this.clone()}toArray(){return[this.lng,this.lat,this.alt,this.heading,this.pitch,this.roll]}toString(){return`${this.lng},${this.lat},${this.alt},${this.heading},${this.pitch},${this.roll}`}toObject(){return{lng:this.lng,lat:this.lat,alt:this.alt,heading:this.heading,pitch:this.pitch,roll:this.roll}}static fromArray(e){let t=new n;return Array.isArray(e)&&(t.lng=e[0]||0,t.lat=e[1]||0,t.alt=e[2]||0,t.heading=e[3]||0,t.pitch=e[4]||0,t.roll=e[5]||0),t}static fromString(e){let t=new n;if(e&&typeof e=="string"){let r=e.split(",");t=this.fromArray(r)}return t}static fromObject(e){return new n(e.lng,e.lat,e.alt,e.heading,e.pitch,e.roll)}static deserialize(e){let t=new n,r=JSON.parse(e);return r&&(t.lng=r.lng||0,t.lat=r.lat||0,t.alt=r.alt||0,t.heading=r.heading||0,t.pitch=r.pitch||0,t.roll=r.roll||0),t}},Y=Ni;var Wi=class{static parsePosition(e){let t=new Y;return e&&(typeof e=="string"?t=Y.fromString(e):Array.isArray(e)?t=Y.fromArray(e):!(Object(e)instanceof Y)&&Object(e).hasOwnProperty("lng")&&Object(e).hasOwnProperty("lat")?t=Y.fromObject(e):Object(e)instanceof Y?t=e:Object(e)instanceof i.Cartesian3?t=u.transformCartesianToWGS84(e):Object(e)instanceof i.Cartographic&&(t=u.transformCartographicToWGS84(e))),t}static parsePositions(e){if(typeof e=="string"){if(e.indexOf("#")>=0)throw new Error("the positions invalid");e=e.split(";").filter(t=>!!t)}return e.map(t=>this.parsePosition(t))}static parsePointCoordToArray(e){return e=this.parsePosition(e),[e.lng,e.lat]}static parsePolylineCoordToArray(e){let t=[];return e=this.parsePositions(e),e.forEach(r=>{t.push([r.lng,r.lat])}),t}static parsePolygonCoordToArray(e,t=!1){let r=[];return e=this.parsePositions(e),e.forEach(s=>{r.push([s.lng,s.lat])}),t&&r.length>0&&r.push(r[0]),[r]}},_=Wi;var Bp={radius:60,maxZoom:25,style:"circle",image:"",gradientColors:{1e-4:i.Color.DEEPSKYBLUE,.001:i.Color.GREEN,.01:i.Color.ORANGE,.1:i.Color.RED},gradientImages:{},showCount:!0,fontSize:12,clusterSize:16,fontColor:i.Color.BLACK,getCountOffset:n=>({x:-3.542857*String(n).length+1.066667,y:String(n).length>3?5:4})},Gi=class extends P{constructor(e,t={}){super(e),this._delegate=new i.PrimitiveCollection,this._options={...Bp,...t},this._billboards=this._delegate.add(new i.BillboardCollection),this._labels=this._delegate.add(new i.LabelCollection),this._cluster=new ni({radius:this._options.radius,maxZoom:this._options.maxZoom}),this._allCount=0,this._changedRemoveCallback=void 0,this._lastChangedTime=null,this._state=d.INITIALIZED}get type(){return P.getLayerType("cluster")}_addOverlay(e){}_removeOverlay(e){}_getCircleImage(e,t){let r=this._options.clusterSize*(String(t).length+1),s=e.toCssColorString()+"-"+t;if(!this._cache[s]){let o=document.createElement("canvas");o.width=r,o.height=r;let a=o.getContext("2d");a.save(),a.scale(r/24,r/24),a.fillStyle=e.withAlpha(.2).toCssColorString(),a.beginPath(),a.arc(12,12,9,0,2*Math.PI),a.closePath(),a.fill(),a.beginPath(),a.arc(12,12,6,0,2*Math.PI),a.fillStyle=e.toCssColorString(),a.closePath(),a.fill(),a.restore(),this._cache[s]=o.toDataURL()}return this._cache[s]}_getClusteringImage(e,t){let r=this._options.clusterSize*(String(t).length+1),s=e.toCssColorString()+"-"+t,o=-Math.PI/12,a=Math.PI/2,l=Math.PI/6;if(!this._cache[s]){let h=document.createElement("canvas");h.width=r,h.height=r;let c=h.getContext("2d");c.save(),c.scale(r/24,r/24),c.beginPath(),c.arc(12,12,6,0,2*Math.PI),c.fillStyle=e.toCssColorString(),c.fill(),c.closePath(),c.lineWidth=2;for(let p=0;p<3;p++)c.beginPath(),c.arc(12,12,8,o,o+a,!1),c.strokeStyle=e.withAlpha(.4).toCssColorString(),c.stroke(),c.arc(12,12,11,o,o+a,!1),c.strokeStyle=e.withAlpha(.2).toCssColorString(),c.stroke(),c.closePath(),o=o+a+l;c.restore(),this._cache[s]=h.toDataURL()}return this._cache[s]}_getClusterImage(e){let t=e/this._allCount,r;if(this._options.style==="custom"){let s=Object.keys(this._options.gradientImages).sort((o,a)=>Number(o)-Number(a));for(let o=s.length-1;o>=0;o--)if(t>=Number(s[o])){r=this._options.gradientImages[s[o]];break}r||(r=this._options.gradientImages[s[0]])}else{let s=Object.keys(this._options.gradientColors).sort((a,l)=>Number(a)-Number(l)),o;for(let a=s.length-1;a>=0;a--)if(t>=Number(s[a])){o=this._options.gradientColors[s[a]];break}o||(o=this._options.gradientColors[s[0]]),r=this._options.style==="circle"?this._getCircleImage(o,e):this._getClusteringImage(o,e)}return r}_changeCluster(e){let t=i.getTimestamp();if(this._lastChangedTime&&t-this._lastChangedTime<=1e3)return;this._lastChangedTime=t,this._cache={},this._billboards.removeAll(),this._labels.removeAll();let r=this._viewer.camera.computeViewRectangle();r||(r=this._viewer.viewBounds),this._allCount&&this._cluster.getClusters([i.Math.toDegrees(r.west),i.Math.toDegrees(r.south),i.Math.toDegrees(r.east),i.Math.toDegrees(r.north)],this._viewer.zoom).forEach(o=>{let a=v.uuid();if(o.properties.cluster){let l=o.properties.point_count,h=this._billboards.add({position:i.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),image:this._getClusterImage(l)});if(h.layerId=this.layerId,h.overlayId=a,h.attr={count:l},this._cache[a]=h,this._options.showCount){let c=this._labels.add({position:i.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),text:String(l),font:`${this._options.fontSize} px sans-serif`,disableDepthTestDistance:Number.POSITIVE_INFINITY,fillColor:this._options.fontColor,scale:.8,pixelOffset:this._options.getCountOffset(l)});c.layerId=this.layerId,c.overlayId=a,c.attr={count:l},this._cache[a]=c}}else{let l=this._billboards.add({position:i.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),image:this._options.image,...o.properties.style});l.layerId=this.layerId,l.overlayId=a,l.attr=o.properties,this._cache[a]=l}})}_addedHook(){this._changedRemoveCallback=this._viewer.camera.changed.addEventListener(this._changeCluster,this)}_removedHook(){this._changedRemoveCallback&&this._changedRemoveCallback()}setPoints(e=[]){return e.length&&(this._allCount=e.length,this._cluster.load(e.map(t=>{let r=_.parsePosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[r.lng,r.lat]},properties:t.attr||{}}}))),this}clear(){return this._cache={},this._allCount=0,this._state=d.CLEARED,this}};P.registerType("cluster");var Ya=Gi;var Ui=class extends P{constructor(e,t="",r={}){super(e),this._delegate=i.CzmlDataSource.load(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("czml")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};P.registerType("czml");var Za=Ui;var Bi=class extends P{constructor(e){super(e),this._delegate=new i.CustomDataSource(e),this._state=d.INITIALIZED}get type(){return P.getLayerType("dynamic")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("dynamic");var qa=Bi;var Vi=class extends P{constructor(e){super(e),this._delegate=new i.CustomDataSource(e),this._state=d.INITIALIZED}get type(){return P.getLayerType("vector")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("vector");var pe=Vi;var Vp={name:"",count:10,maximumLevel:21,dataProperty:"",callback:()=>null},ji=class extends P{constructor(e,t,r={}){super(e),this._url=t,this._options={...Vp,...r},this._levelLayers={},this._tileWidth=256,this._tileHeight=256,this._maximumLevel=this._options.maximumLevel,this._tilingScheme=this._options.tilingScheme||new i.GeographicTilingScheme,this._rectangle=this._tilingScheme.rectangle,this._credit=void 0,this._token=void 0;for(let s=0;s<this.maximumLevel;s++)this._levelLayers[String(s)]=new pe(e+"-grid-"+s);this._viewer=void 0,this._imageryLayer=void 0,this._imagery=document.createElement("canvas"),this._imagery.width=this._tileWidth,this._imagery.height=this._tileHeight,this._state=d.INITIALIZED}get type(){return P.getLayerType("feature_grid")}get url(){return this._url}set show(e){this._show=e,Object.keys(this._levelLayers).forEach(t=>{this._levelLayers[t].show=e})}get show(){return this._show}get token(){return this._token}get tileWidth(){if(!this.ready)throw new i.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this.ready)throw new i.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this.ready)throw new i.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new i.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}get tilingScheme(){if(!this.ready)throw new i.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new i.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}get ready(){return!!this._url}get credit(){return this._credit}get hasAlphaChannel(){return!0}_onAdd(e){this._viewer=e,this._imageryLayer=this._viewer.imageryLayers.addImageryProvider(this),Object.keys(this._levelLayers).forEach(t=>{this._viewer.addLayer(this._levelLayers[t])}),this._state=d.ADDED}_onRemove(){this._imageryLayer&&this._viewer.imageryLayers.remove(this._imageryLayer),Object.keys(this._levelLayers).forEach(e=>{this._viewer.removeLayer(this._levelLayers[e])}),this._state=d.REMOVED}getTileCredits(e,t,r){}requestImage(e,t,r,s){let o=this._levelLayers[String(r)],a=this._tilingScheme.tileXYToRectangle(e,t,r);return this._viewer&&a&&o&&i.Rectangle.intersection(a,this._viewer.viewBounds)&&i.Resource.fetchJson({url:this._url,queryParameters:{minX:i.Math.toDegrees(a.west),minY:i.Math.toDegrees(a.south),maxX:i.Math.toDegrees(a.east),maxY:i.Math.toDegrees(a.north),count:this._options.count}}).then(l=>{let h=l;if(this._options.dataProperty&&(h=l[this._options.dataProperty]),h&&h.length){for(let c=r+3;c<this._maximumLevel;c++)this._levelLayers[String(c)]&&this._levelLayers[String(c)].clear();h.forEach(c=>{let p=this._options.callback(c);p&&o.addOverlay(p)})}}),this._imagery}clear(){Object.keys(this._levelLayers).forEach(e=>{this._levelLayers[e].clear()}),this._state=d.CLEARED}};P.registerType("feature_grid");var Xa=ji;var jp={},F=jp;var Yi=class{constructor(){this._id=v.uuid(),this._bid=v.uuid(),this._delegate=void 0,this._layer=void 0,this._state=void 0,this._show=!0,this._style={},this._attr={},this._allowDrillPicking=!1,this._contextMenu=[],this._overlayEvent=new Pi,this._overlayEvent.on(ve.ADD,this._onAdd,this),this._overlayEvent.on(ve.REMOVE,this._onRemove,this)}get overlayId(){return this._id}get type(){return""}set id(e){this._bid=e}get id(){return this._bid}set show(e){this._show=e,v.isPromise(this._delegate)?this._delegate.then(t=>{t.show=this._show}):this._delegate&&(this._delegate.show=this._show)}get show(){return this._show}set attr(e){this._attr=e}get attr(){return this._attr}set allowDrillPicking(e){this._allowDrillPicking=e}get allowDrillPicking(){return this._allowDrillPicking}get overlayEvent(){return this._overlayEvent}get delegate(){return this._delegate}get state(){return this._state}set contextMenu(e){this._contextMenu=e}get contextMenu(){return this._contextMenu}_getLayerCollection(e){let t;switch(e){case"point_primitive":t=this._layer.points;break;case"billboard_primitive":case"bounce_billboard_primitive":t=this._layer.billboards;break;case"label_primitive":case"bounce_label_primitive":t=this._layer.labels;break;case"polyline_primitive":t=this._layer.polylines;break;case"cloud_primitive":t=this._layer.clouds;break;default:break}return t}_mountedHook(){}_addedHook(){var e;if(!this._delegate)return!1;this._delegate instanceof Promise?this._delegate.then(t=>{var r;t.layerId=(r=this._layer)==null?void 0:r.layerId,t.overlayId=this._id}):(this._delegate.layerId=(e=this._layer)==null?void 0:e.layerId,this._delegate.overlayId=this._id)}_removedHook(){}_onAdd(e){var t,r,s,o;if(e){if(this._layer=e,this._mountedHook&&this._mountedHook(),(r=(t=this._layer)==null?void 0:t.delegate)!=null&&r.entities&&this._delegate)this._layer.delegate.entities.add(this._delegate);else if((o=(s=this._layer)==null?void 0:s.delegate)!=null&&o.add){let a=this._getLayerCollection(this.type);a?(this._delegate&&(this._delegate=a.add(this._delegate)),v.merge(this._delegate,this._style),this.update&&this.destroy&&this._layer.delegate.add(this)):v.isPromise(this._delegate)?this._delegate.then(l=>{this._layer.delegate.add(l)}):this.update&&this.destroy?this._layer.delegate.add(this):this._delegate&&this._layer.delegate.add(this._delegate)}this._addedHook&&this._addedHook(),this._state=d.ADDED}}_onRemove(){var e,t,r,s;if(this._layer){if((t=(e=this._layer)==null?void 0:e.delegate)!=null&&t.entities)this._layer.delegate.entities.remove(this._delegate);else if((s=(r=this._layer)==null?void 0:r.delegate)!=null&&s.remove){let o=this._getLayerCollection(this.type);o?(this._delegate&&o.remove(this._delegate),this.update&&this.destroy&&this._layer.delegate.remove(this)):v.isPromise(this._delegate)?this._delegate.then(a=>{this._layer.delegate.remove(a)}):this.update&&this.destroy?this._layer.delegate.remove(this):this._delegate&&this._layer.delegate.remove(this._delegate)}this._removedHook&&this._removedHook(),this._state=d.REMOVED}}setLabel(e,t){return this._delegate?(this._delegate instanceof i.Entity&&(this._delegate.label={...t,text:e}),this):this}setStyle(e){return this}remove(){return this._layer&&this._layer.removeOverlay(this),this}addTo(e){return e&&e.addOverlay&&e.addOverlay(this),this}on(e,t,r){return this._overlayEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this}fire(e,t){return this._overlayEvent.fire(e,t),this}static registerType(e){e&&(F[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getOverlayType(e){return F[e.toLocaleUpperCase()]||void 0}},g=Yi;var Zi=class extends g{constructor(e,t){super(),this._delegate=new i.Entity({billboard:{}}),this._position=_.parsePosition(e),this._icon=t,this._size=[32,32],this._state=d.INITIALIZED}get type(){return g.getOverlayType("custom_billboard")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("CustomBillboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setLabel(e,t){return this._delegate.label={...t,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}setVLine(e={}){if(this._position.alt>0&&!this._delegate.polyline){let t=this._position.copy();t.alt=e.height||0,this._delegate.polyline={...e,positions:u.transformWGS84ArrayToCartesianArray([t,this._position])}}return this}setBottomCircle(e,t={},r=0){let s=0,o=r;return this._delegate.ellipse={...t,semiMajorAxis:e,semiMinorAxis:e,stRotation:new i.CallbackProperty(()=>(s+=o,(s>=360||s<=-360)&&(s=0),s),!1)},this}};g.registerType("custom_billboard");var Ja=Zi;var qi=class extends g{constructor(e,t){super(),this._delegate=new i.Entity({label:{}}),this._position=_.parsePosition(e),this._text=t,this._state=d.INITIALIZED}get type(){return g.getOverlayType("custom_label")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.label.text=this._text}get text(){return this._text}_mountedHook(){this.position=this._position,this.text=this._text}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,v.merge(this._style,e),v.merge(this._delegate.label,e),this)}setVLine(e={}){if(this._position.alt>0&&!this._delegate.polyline){let t=this._position.copy();t.alt=e.height||0,this._delegate.polyline={...e,positions:u.transformWGS84ArrayToCartesianArray([t,this._position])}}return this}setBottomCircle(e,t={},r=0){let s=0,o=r;return this._delegate.ellipse={...t,semiMajorAxis:e,semiMinorAxis:e,stRotation:new i.CallbackProperty(()=>(s+=o,(s>=360||s<=-360)&&(s=0),s),!1)},this}};g.registerType("custom_label");var Ka=qi;var Xi=class extends g{constructor(){super(),this._startTime=void 0,this._lastTime=void 0,this._sampledPosition=new i.SampledPositionProperty,this._cache=[],this._maxCacheSize=10,this._state=d.INITIALIZED}set maxCacheSize(e){this._maxCacheSize=e}get maxCacheSize(){return this._maxCacheSize}get position(){return u.transformCartesianToWGS84(this._sampledPosition.getValue(i.JulianDate.now()))}_removePosition(){if(this._cache.length>this._maxCacheSize){let e=i.JulianDate.addSeconds(this._cache[0],-.2,new i.JulianDate),t=i.JulianDate.addSeconds(this._cache[this._cache.length-this._maxCacheSize],-.2,new i.JulianDate);this._sampledPosition.removeSamples(new i.TimeInterval({start:e,stop:t})),this._cache.splice(0,this._cache.length-this._maxCacheSize)}}addPosition(e,t){this._removePosition();let r=i.JulianDate.now(),s=i.JulianDate.addSeconds(r,t,new i.JulianDate);return this._sampledPosition.addSample(s,u.transformWGS84ToCartesian(_.parsePosition(e))),this._lastTime=s,this._cache.push(this._lastTime),this}bindDom(e){return this}},rt=Xi;var Ji=class extends rt{constructor(e,t){super(),this._position=_.parsePosition(e),this._icon=t,this._delegate=new i.Entity({billboard:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("dynamic_billboard")}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("DynamicBillboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this._sampledPosition.forwardExtrapolationType=i.ExtrapolationType.HOLD,this._startTime=i.JulianDate.now(),this._sampledPosition.addSample(this._startTime,u.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._cache.push(this._startTime),this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}};g.registerType("dynamic_billboard");var Qa=Ji;var Ki=class extends rt{constructor(e,t){super(),this._position=_.parsePosition(e),this._modelUrl=t,this._delegate=new i.Entity({model:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("dynamic_model")}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}get modelUrl(){return this._modelUrl}_mountedHook(){this._sampledPosition.forwardExtrapolationType=i.ExtrapolationType.HOLD,this._startTime=i.JulianDate.now(),this._sampledPosition.addSample(this._startTime,u.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._delegate.orientation=new i.VelocityOrientationProperty(this._sampledPosition),this._cache.push(this._startTime),this.modelUrl=this._modelUrl}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.uri,v.merge(this._style,e),v.merge(this._delegate.model,e),this)}};g.registerType("dynamic_model");var $a=Ki;function Yp(n,e,t){let r=i.Cartesian3.subtract(n,e,new i.Cartesian3),s=i.Cartesian3.subtract(t,e,new i.Cartesian3),o=i.Cartesian3.cross(r,s,r);return i.Cartesian3.magnitude(o)*.5}function ue(n){let e=0;if(!Array.isArray(n))return e;n[0]instanceof i.Cartesian3||(n=u.transformWGS84ArrayToCartesianArray(n));let t=i.CoplanarPolygonGeometry.createGeometry(i.CoplanarPolygonGeometry.fromPositions({positions:n,vertexFormat:i.VertexFormat.POSITION_ONLY}));if(!t)return e;let r=t.attributes.position.values,s=t.indices;for(let o=0;o<s.length;o+=3){let a=i.Cartesian3.unpack(r,s[o]*3,new i.Cartesian3),l=i.Cartesian3.unpack(r,s[o+1]*3,new i.Cartesian3),h=i.Cartesian3.unpack(r,s[o+2]*3,new i.Cartesian3);e+=Yp(a,l,h)}return e}function Qi(n=[],e=0){let t=180,r=90,s=-180,o=-90;if(n.forEach(a=>{t=Math.min(t,a.lng||a.x),r=Math.min(r,a.lat||a.y),s=Math.max(s,a.lng||a.x),o=Math.max(o,a.lat||a.y)}),e>0){let a=Math.abs(s-s),l=Math.abs(o-r);t-=a*e,r-=l*e,s+=a*e,o+=l*e}return{west:t,south:r,east:s,north:o}}function _e(n){if(n&&Array.isArray(n)){let e=0;n.forEach(({alt:s})=>e=Math.max(e,s));let t=i.BoundingSphere.fromPoints(u.transformWGS84ArrayToCartesianArray(n)),r=u.transformCartesianToWGS84(t.center);return r.alt=e,r}return new Y}function $i(n,e){e=e||{};let t=[];for(let r=0;r<n.length-1;r++){let s=Zp(n[r],n[r+1],e.count);s&&s.length>0&&(t=t.concat(s))}return t}function Zp(n,e,t){if(!n||!e)return null;let r=[];t=t||40;let s=function(I){return 1-2*I+I*I},o=I=>2*I-2*I*I,a=I=>I*I,l,h,c,p,f,T,y=0,m=parseFloat(n.lat),E=parseFloat(e.lat),x=parseFloat(n.lng),b=parseFloat(e.lng);b>x&&b-x>180&&x<0&&(x=360+x,b=360+b),T=0,E===m?(l=0,h=x-b):b===x?(l=Math.PI/2,h=m-E):(l=Math.atan((E-m)/(b-x)),h=(E-m)/Math.sin(l)),T===0&&(T=l+Math.PI/5),c=h/2,f=c*Math.cos(T)+x,p=c*Math.sin(T)+m;for(let I=0;I<t+1;I++){let N=x*s(y)+f*o(y)+b*a(y),H=m*s(y)+p*o(y)+E*a(y),W=n.lng,ee=e.lng;r.push([W<0&&ee>0?N-360:N,H]),y=y+1/t}return r}function Q(n){let e=0;if(n&&Array.isArray(n))for(let t=0;t<n.length-1;t++){let r=u.transformWGS84ToCartographic(n[t]),s=u.transformWGS84ToCartographic(n[t+1]),o=new i.EllipsoidGeodesic;o.setEndPoints(r,s);let a=o.surfaceDistance;a=Math.sqrt(Math.pow(a,2)+Math.pow(s.height-r.height,2)),e+=a}return e.toFixed(3)}function fe(n,e){let t=n,r=e;if(!t||!r)return 0;n instanceof i.Cartesian3||(t=_.parsePosition(n),t=u.transformWGS84ToCartesian(t)),e instanceof i.Cartesian3||(r=_.parsePosition(e),r=u.transformWGS84ToCartesian(r));let s=i.Transforms.eastNorthUpToFixedFrame(t),o=i.Cartesian3.subtract(r,t,new i.Cartesian3),a=i.Matrix4.multiplyByPointAsVector(i.Matrix4.inverse(s,new i.Matrix4),o,new i.Cartesian3),l=Math.atan2(a.y,a.x)-i.Math.PI_OVER_TWO;return l=i.Math.TWO_PI-i.Math.zeroToTwoPi(l),isNaN(l)?0:l}function Ye(n,e,t){return n=parseFloat(n)||0,n>=parseFloat(e)&&n<=parseFloat(t)}function k(n,e){return i.Cartesian3.midpoint(n,e,new i.Cartesian3)}function er(n,e){let t=_.parsePosition(n),r=_.parsePosition(e);t=u.transformWGS84ToCartographic(t),r=u.transformWGS84ToCartographic(r);let s=new i.EllipsoidGeodesic(t,r).interpolateUsingFraction(.5);return new Y(i.Math.toDegrees(s.longitude),i.Math.toDegrees(s.latitude),s.height)}function tr(n,e,t=0,r=50){let s=[];t=Math.max(+t,100),r=Math.max(+r,50);let o=Math.abs(n.lng-e.lng),a=Math.abs(n.lat-e.lat),l=Math.max(o,a),h=l/r;if(o>a){let c=(e.lat-n.lat)/r;n.lng-e.lng>0&&(h=-h);for(let p=0;p<r;p++){let f=t-Math.pow(-.5*l+Math.abs(h)*p,2)*4*t/Math.pow(l,2),T=n.lng+h*p,y=n.lat+c*p;s.push([T,y,f])}}else{let c=(e.lng-n.lng)/r;n.lat-e.lat>0&&(h=-h);for(let p=0;p<r;p++){let f=t-Math.pow(-.5*l+Math.abs(h)*p,2)*4*t/Math.pow(l,2),T=n.lng+c*p,y=n.lat+h*p;s.push([T,y,f])}}return s.push([e.lng,e.lat,e.alt||0]),s}var{Math:qp}=i,en={};v.merge(en,qp,{area:ue,bounds:Qi,center:_e,curve:$i,distance:Q,heading:fe,isBetween:Ye,midCartesian:k,midPosition:er,parabola:tr});var ir=class n extends g{constructor(e,t){super(),this._delegate=S.create("div","div-icon"),this._position=_.parsePosition(e),this._delegate.setAttribute("id",this._id),v.merge(this._delegate.style,{position:"absolute",top:"0",left:"0"}),this.content=t,this._state=d.INITIALIZED}get type(){return g.getOverlayType("div_icon")}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden"}get show(){return this._show}set position(e){this._position=_.parsePosition(e)}get position(){return this._position}set content(e){if(e&&typeof e=="string")this._delegate.innerHTML=e;else if(e&&e instanceof Element){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);this._delegate.appendChild(e)}}get content(){return this._delegate.childNodes||[]}_updateStyle(e,t,r){if(!this._show||!e)return;let s=e.x-this._delegate.offsetWidth/2,o=e.y-this._delegate.offsetHeight/2;this._style.position==="topleft"?(s=e.x-this._delegate.offsetWidth,o=e.y-this._delegate.offsetHeight):this._style.position==="topright"?(s=e.x,o=e.y-this._delegate.offsetHeight):this._style.position==="bottomleft"?(s=e.x-this._delegate.offsetWidth,o=e.y):this._style.position==="bottomright"&&(s=e.x,o=e.y);let a=`translate3d(${Math.round(s)}px,${Math.round(o)}px, 0)`,l="scale3d(1,1,1)",h=this._style.scaleByDistance;if(t&&h){let f=h.near||0,T=h.nearValue||1,y=h.far||Number.MAX_VALUE,m=h.farValue||0,E=t/y;if(t<f)l=`scale3d(${T},${T},1)`;else if(t>y)l=`scale3d(${m},${m},1)`;else{let x=m+E*(T-m);l=`scale3d(${x},${x},1)`}}let c=!0,p=this._style.distanceDisplayCondition;t&&p&&(c=Ye(t,p.near||0,p.far||Number.MAX_VALUE)),this._delegate.style.transform=`${a} ${l}`,this._delegate.style.visibility=c&&r?"visible":"hidden"}_onAdd(e){this._layer=e,this._layer.delegate.appendChild(this._delegate);let t={layer:e,overlay:this,position:u.transformWGS84ToCartesian(this._position)};this._delegate.addEventListener("click",()=>{this._overlayEvent.fire(L.CLICK,t)}),this._delegate.addEventListener("mouseover",()=>{this._overlayEvent.fire(L.MOUSE_OVER,t)}),this._delegate.addEventListener("mouseout",()=>{this._overlayEvent.fire(L.MOUSE_OUT,t)}),this._state=d.ADDED}_onRemove(){this._layer&&(this._layer.delegate.removeChild(this._delegate),this._state=d.REMOVED)}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this._style.className&&S.addClass(this._delegate,this._style.className),this)}static fromEntity(e,t){var a;let r,s=i.JulianDate.now(),o=u.transformCartesianToWGS84(e.position.getValue(s));return r=new n(o,t),e.billboard&&(r.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}),r}};g.registerType("div_icon");var tn=ir;var rr=class n extends g{constructor(e,t){super(),this._delegate=new i.Entity({model:{}}),this._position=_.parsePosition(e),this._modelUrl=t,this._rotateAmount=0,this._state=d.INITIALIZED}get type(){return g.getOverlayType("model")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._rotateAmount===0&&(this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll))))}get position(){return this._position}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}get modelUrl(){return this._modelUrl}set rotateAmount(e){this._rotateAmount=+e,this._delegate.orientation=new i.CallbackProperty(()=>(this._position.heading+=this._rotateAmount,(this._position.heading>=360||this._position.heading<=-360)&&(this._position.heading=0),i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))),!1)}get rotateAmount(){return this._rotateAmount}_mountedHook(){this.position=this._position,this.modelUrl=this._modelUrl}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.uri,v.merge(this._style,e),v.merge(this._delegate.model,e),this)}static fromEntity(e,t){let r=i.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r)),o=new n(s,t);return o.attr={...e.properties.getValue(r)},o}};g.registerType("model");var Oe=rr;var sr=class extends g{constructor(e,t={}){super(),this._delegate=i.I3SDataProvider.fromUrl(e,t),this._state=d.INITIALIZED}get type(){return g.getOverlayType("i3s")}ready(e){return this._delegate.then(e),this}setLabel(e,t){return console.warn("not support this function"),this}};g.registerType("i3s");var rn=sr;var or=class extends g{constructor(e,t={}){super(),this._delegate=i.Cesium3DTileset.fromUrl(e,t),this._tilesetEvent=new Si(this._delegate),this._tileVisibleCallback=void 0,this._properties=void 0,this._state=d.INITIALIZED}get type(){return g.getOverlayType("tileset")}set show(e){this._show=e,this._delegate.then(t=>{t.show=e})}_bindVisibleEvent(){this._tileVisibleCallback&&this._tileVisibleCallback(),this._tileVisibleCallback=this._delegate.then(e=>{e.tileVisible.addEventListener(this._updateTile,this)})}_updateTile(e){let t=e.content;for(let r=0;r<t.featuresLength;r++){let s=t.getFeature(r);this._properties&&this._properties.length&&this._properties.forEach(o=>{s.hasProperty(o.key)&&s.getProperty(o.key)===o.keyValue&&s.setProperty(o.propertyName,o.propertyValue)})}}ready(e){return this._delegate.then(e),this}setPosition(e){return e=_.parsePosition(e),this._delegate.then(t=>{let r=i.Transforms.eastNorthUpToFixedFrame(i.Cartesian3.fromDegrees(e.lng,e.lat,e.alt)),s=i.Matrix4.fromRotationTranslation(i.Matrix3.fromHeadingPitchRoll(new i.HeadingPitchRoll(i.Math.toRadians(e.heading),i.Math.toRadians(e.pitch),i.Math.toRadians(e.roll))));i.Matrix4.multiply(r,s,r),t.root.transform=r}),this}setHeadingPitchRoll(e,t,r){return this._delegate.then(s=>{let o=s.root.transform,a=i.Matrix4.fromRotationTranslation(i.Matrix3.fromHeadingPitchRoll(new i.HeadingPitchRoll(i.Math.toRadians(e||0),i.Math.toRadians(t||0),i.Math.toRadians(r||0))));i.Matrix4.multiply(o,a,o),s.root.transform=o}),this}setLabel(e,t){return console.warn("not support this function"),this}clampToGround(){return this._delegate.then(e=>{let t=i.Cartographic.fromCartesian(e.boundingSphere.center),r=i.Cartesian3.fromRadians(t.longitude,t.latitude,t.height),s=i.Cartesian3.fromRadians(t.longitude,t.latitude,0),o=i.Cartesian3.subtract(s,r,new i.Cartesian3);e.modelMatrix=i.Matrix4.fromTranslation(o)}),this}setHeight(e,t=!1){return this._delegate.then(r=>{let s=i.Cartographic.fromCartesian(r.boundingSphere.center),o=i.Cartesian3.fromRadians(s.longitude,s.latitude,s.height),a=i.Cartesian3.fromRadians(s.longitude,s.latitude,t?e:s.height+e),l=i.Cartesian3.subtract(a,o,new i.Cartesian3);r.modelMatrix=i.Matrix4.fromTranslation(l)}),this}setScale(e){return this._delegate.then(t=>{let r=t.root.transform;e>0&&e!==1&&i.Matrix4.multiplyByUniformScale(r,e,r),t.root.transform=r}),this}setProperties(e){return this._properties=e,this._bindVisibleEvent(),this}setSplitDirection(e){return this._delegate.then(t=>{t.splitDirection=e}),this}setCustomShader(e){return this._delegate.then(t=>{t.customShader=e}),this}setStyle(e){return e&&e instanceof i.Cesium3DTileStyle&&(this._style=e,this._delegate.then(t=>{t.style=e})),this}on(e,t,r){return this._overlayEvent.on(e,t,r||this),this._tilesetEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this._tilesetEvent.off(e,t,r||this),this}};g.registerType("tileset");var sn=or;var st=Math.PI/2,ar=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8,this._state=d.INITIALIZED}get type(){return g.getOverlayType("attack_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getArrowHeadPoints(e,t,r){let s=w.getBaseLength(e),o=s*this.headHeightFactor,a=e[e.length-1];s=w.distance(a,e[e.length-2]);let l=w.distance(t,r);o>l*this.headTailFactor&&(o=l*this.headTailFactor);let h=o*this.headWidthFactor,c=o*this.neckWidthFactor;o=o>s?s:o;let p=o*this.neckHeightFactor,f=w.getThirdPoint(e[e.length-2],a,0,o,!0),T=w.getThirdPoint(e[e.length-2],a,0,p,!0),y=w.getThirdPoint(a,f,st,h,!1),m=w.getThirdPoint(a,f,st,h,!0),E=w.getThirdPoint(a,T,st,c,!1),x=w.getThirdPoint(a,T,st,c,!0);return[E,y,a,m,x]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,p=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=w.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_getHierarchy(){let e=_.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1];w.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r)/w.getBaseLength(o),p=this._getArrowBodyPoints(o,l,h,c),f=p.length,T=[t].concat(p.slice(0,f/2));T.push(l);let y=[r].concat(p.slice(f/2,f));return y.push(h),T=w.getQBSplinePoints(T),y=w.getQBSplinePoints(y),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(T.concat(a,y.reverse()))))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("attack_arrow");var ke=ar;var X=Math.PI/2,nr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Entity({polygon:{}}),this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this._state=d.INITIALIZED}get type(){return g.getOverlayType("double_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getArrowPoints(e,t,r,s){let o=w.mid(e,t),a=w.distance(o,r),l=w.getThirdPoint(r,o,0,a*.3,!0),h=w.getThirdPoint(r,o,0,a*.5,!0);l=w.getThirdPoint(o,l,X,a/5,s),h=w.getThirdPoint(o,h,X,a/4,s);let c=[o,l,h,r],p=this._getArrowHeadPoints(c),f=p[0],T=p[4],y=w.distance(e,t)/w.getBaseLength(c)/2,m=this._getArrowBodyPoints(c,f,T,y),E=m.length,x=m.slice(0,E/2),b=m.slice(E/2,E);return x.push(f),b.push(T),x=x.reverse(),x.push(t),b=b.reverse(),b.push(e),x.reverse().concat(p,b)}_getArrowHeadPoints(e){let r=w.getBaseLength(e)*this.headHeightFactor,s=e[e.length-1],o=r*this.headWidthFactor,a=r*this.neckWidthFactor,l=r*this.neckHeightFactor,h=w.getThirdPoint(e[e.length-2],s,0,r,!0),c=w.getThirdPoint(e[e.length-2],s,0,l,!0),p=w.getThirdPoint(s,h,X,o,!1),f=w.getThirdPoint(s,h,X,o,!0),T=w.getThirdPoint(s,c,X,a,!1),y=w.getThirdPoint(s,c,X,a,!0);return[T,p,s,f,y]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,p=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=w.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_getTempPoint4(e,t,r){let s=w.mid(e,t),o=w.distance(s,r),a=w.getAngleOfThreePoints(e,s,r),l,h,c,p;return a<X?(h=o*Math.sin(a),c=o*Math.cos(a),p=w.getThirdPoint(e,s,X,h,!1),l=w.getThirdPoint(s,p,X,c,!0)):a>=X&&a<Math.PI?(h=o*Math.sin(Math.PI-a),c=o*Math.cos(Math.PI-a),p=w.getThirdPoint(e,s,X,h,!1),l=w.getThirdPoint(s,p,X,c,!1)):a>=Math.PI&&a<Math.PI*1.5?(h=o*Math.sin(a-Math.PI),c=o*Math.cos(a-Math.PI),p=w.getThirdPoint(e,s,X,h,!0),l=w.getThirdPoint(s,p,X,c,!0)):(h=o*Math.sin(Math.PI*2-a),c=o*Math.cos(Math.PI*2-a),p=w.getThirdPoint(e,s,X,h,!0),l=w.getThirdPoint(s,p,X,c,!1)),l}_getHierarchy(){let e=this._positions.length,t,r,s=_.parsePolygonCoordToArray(this._positions)[0],o=s[0],a=s[1],l=s[2];e===3?t=this._getTempPoint4(o,a,l):t=s[3],e===3||e===4?r=w.mid(o,a):r=s[4];let h,c;w.isClockWise(o,a,l)?(h=this._getArrowPoints(o,r,t,!1),c=this._getArrowPoints(r,a,l,!0)):(h=this._getArrowPoints(a,r,l,!1),c=this._getArrowPoints(r,o,t,!0));let p=h.length,f=(p-5)/2,T=h.slice(0,f),y=h.slice(f,f+5),m=h.slice(f+5,p),E=c.slice(0,f),x=c.slice(f,f+5),b=c.slice(f+5,p);E=w.getBezierPoints(E);let I=w.getBezierPoints(b.concat(T.slice(1)));return m=w.getBezierPoints(m),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(E.concat(x,I,y,m))))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("double_arrow");var ot=nr;var on=Math.PI/2,lr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Entity({polygon:{}}),this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13,this._state=d.INITIALIZED}get type(){return g.getOverlayType("fine_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=_.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1],s=w.getBaseLength(e),o=s*this.tailWidthFactor,a=s*this.neckWidthFactor,l=s*this.headWidthFactor,h=w.getThirdPoint(r,t,on,o,!0),c=w.getThirdPoint(r,t,on,o,!1),p=w.getThirdPoint(t,r,this.headAngle,l,!1),f=w.getThirdPoint(t,r,this.headAngle,l,!0),T=w.getThirdPoint(t,r,this.neckAngle,a,!1),y=w.getThirdPoint(t,r,this.neckAngle,a,!0);return new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions([h,T,p,r,f,y,c])))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("fine_arrow");var at=lr;var Xp=Math.PI/2,an=100,hr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Entity({polygon:{}}),this.t=.4,this._state=d.INITIALIZED}get type(){return g.getOverlayType("gathering_place")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=_.parsePolygonCoordToArray(this._positions)[0];if(this._positions.length===2){let a=w.mid(e[0],e[1]),l=w.distance(e[0],a)/.9,h=w.getThirdPoint(e[0],a,Xp,l,!0);e=[e[0],h,e[1]]}let t=w.mid(e[0],e[2]);e.push(t,e[0],e[1]);let r=[];for(let a=0;a<e.length-2;a++){let l=e[a],h=e[a+1],c=e[a+2],p=w.getBisectorNormals(this.t,l,h,c);r=r.concat(p)}let s=r.length;r=[r[s-1]].concat(r.slice(0,s-1));let o=[];for(let a=0;a<e.length-2;a++){let l=e[a],h=e[a+1];o.push(l);for(let c=0;c<=an;c++){let p=w.getCubicValue(c/an,l,r[a*2],r[a*2+1],h);o.push(p)}o.push(h)}return new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(o)))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("gathering_place");var nt=hr;var cr=class extends ke{constructor(e){super(e),this._delegate=new i.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,this.headTailFactor=.8,this.swallowTailFactor=1,this._state=d.INITIALIZED}get type(){return g.getOverlayType("tailed_attack_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=_.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1];w.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r),p=w.getBaseLength(o),f=p*this.tailWidthFactor*this.swallowTailFactor,T=w.getThirdPoint(o[1],o[0],0,f,!0),y=c/p,m=this._getArrowBodyPoints(o,l,h,y),E=m.length,x=[t].concat(m.slice(0,E/2));x.push(l);let b=[r].concat(m.slice(E/2,E));return b.push(h),x=w.getQBSplinePoints(x),b=w.getQBSplinePoints(b),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(x.concat(a,b.reverse(),[T,x[0]]))))}};g.registerType("tailed_attack_arrow");var lt=cr;var pr=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._icon=t,this._size=[32,32],this._delegate={position:void 0,image:void 0,width:0,height:0},this._state=d.INITIALIZED}get type(){return g.getOverlayType("billboard_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("Billboard Primitive: the size invalid");this._size=e,this._delegate.width=this._size[0]||32,this._delegate.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position&&delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("billboard_primitive");var ht=pr;var nn={maxOffsetY:10,offsetAmount:.1},dr=class extends ht{constructor(e,t){super(e,t),this._currentOffset=new i.Cartesian2(0,0),this._isUp=!0,this._state=d.INITIALIZED}get type(){return g.getOverlayType("bounce_billboard_primitive")}update(e){var s,o;if(!this._show)return;let t=((s=this._style)==null?void 0:s.maxOffsetY)||nn.maxOffsetY,r=((o=this._style)==null?void 0:o.offsetAmount)||nn.offsetAmount;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-t&&(this._isUp=!1),this._currentOffset.y+=r*(this._isUp?-1:1),this._delegate.pixelOffset=this._currentOffset}destroy(){return i.destroyObject(this)}};g.registerType("bounce_billboard_primitive");var ln=dr;var mr=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._text=t,this._delegate={position:void 0,text:void 0},this._state=d.INITIALIZED}get type(){return g.getOverlayType("label_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.text=this._text}get text(){return this._text}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position&&delete e.text,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("label_primitive");var ct=mr;var hn={maxOffsetY:10,offsetAmount:.1},ur=class extends ct{constructor(e,t){super(e,t),this._currentOffset=new i.Cartesian2(0,0),this._isUp=!0,this._state=d.INITIALIZED}get type(){return g.getOverlayType("bounce_label_primitive")}update(e){var s,o;if(!this._show)return;let t=((s=this._style)==null?void 0:s.maxOffsetY)||hn.maxOffsetY,r=((o=this._style)==null?void 0:o.offsetAmount)||hn.offsetAmount;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-t&&(this._isUp=!1),this._currentOffset.y+=r*(this._isUp?-1:1),this._delegate.pixelOffset=this._currentOffset}destroy(){return i.destroyObject(this)}};g.registerType("bounce_label_primitive");var cn=ur;var _r=class extends g{constructor(e){super(),this._position=_.parsePosition(e),this._delegate={position:void 0,scale:{x:12,y:8}},this._state=d.INITIALIZED}get type(){return g.getOverlayType("cloud_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("cloud_primitive");var pn=_r;var Jp={minRadius:10,minHeight:30,color:i.Color.RED,slices:128,speed:10},fr=class extends g{constructor(e,t,r){super(),this._center=_.parsePosition(e),this._delegate=void 0,this._height=r,this._radius=t,this._currentHeight=r||0,this._currentRadius=10,this._style={...Jp},this._state=d.INITIALIZED}get type(){return g.getOverlayType("diffuse_wall_primitive")}set center(e){this._center=_.parsePosition(e)}get center(){return this._center}set radius(e){this._radius=e}get radius(){return this._radius}set height(e){this._height=e}get height(){return this._height}_getPositions(){let e=[],t=i.Transforms.eastNorthUpToFixedFrame(u.transformWGS84ToCartesian(this._center));for(let r=0;r<this._style.slices;r++){let s=r/this._style.slices*i.Math.TWO_PI,o=Math.cos(s),a=Math.sin(s),l=new i.Cartesian3(o*this._currentRadius,a*this._currentRadius,0);e.push(i.Matrix4.multiplyByPoint(t,l,new i.Cartesian3))}return e.push(e[0]),e}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}update(e){var s;if(this._delegate=this._delegate&&this._delegate.destroy(),this._currentRadius+=this._radius/this._style.speed/20,this._currentHeight-=this._height/this._style.speed/20,(this._currentRadius>this._radius||this._currentHeight<this._style.minHeight)&&(this._currentRadius=this._style.minRadius,this._currentHeight=this._height),!this._style.slices||this._style.slices<3)return!1;let t=this._getPositions();if(!t||!t.length)return!1;let r=new i.WallGeometry({positions:t,minimumHeights:this._getHeights(t.length,0),maximumHeights:this._getHeights(t.length,this._currentHeight)});this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:r}),appearance:new i.MaterialAppearance({material:i.Material.fromType("WallDiffuse",{color:(s=this._style)==null?void 0:s.color}),flat:!0}),asynchronous:!1}),this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this)}destroy(){return i.destroyObject(this)}};g.registerType("diffuse_wall_primitive");var dn=fr;var gr=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._radius=t||{x:10,y:10,z:10},this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("elec_ellipsoid_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.geometryInstances.modelMatrix=i.Transforms.eastNorthUpToFixedFrame(u.transformWGS84ToCartesian(this._position))}get position(){return this._position}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry=new i.EllipsoidGeometry({radii:this._radius,maximumCone:i.Math.PI_OVER_TWO})}get radius(){return this._radius}_setAppearance(){var e,t;this._style&&(this._delegate.appearance=new i.MaterialAppearance({material:i.Material.fromType("EllipsoidElectric",{color:((e=this._style)==null?void 0:e.color)||i.Color.GREEN,speed:((t=this._style)==null?void 0:t.speed)||5})}))}_mountedHook(){this.radius=this._radius,this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setLabel(e,t){return this}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),this._setAppearance(),this)}};g.registerType("elec_ellipsoid_primitive");var mn=gr;var yr=class extends g{constructor(e,t=1){super(),this._positions=_.parsePositions(e),this._width=t,this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("flow_line_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.PolylineGeometry({positions:u.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}get positions(){return this._positions}_setAppearance(){var e,t,r,s;this._delegate.appearance=new i.PolylineMaterialAppearance({material:i.Material.fromType("PolylineFlow",{color:((e=this._style)==null?void 0:e.color)||new i.Color(1,0,0,.7),speed:((t=this._style)==null?void 0:t.speed)||1,percent:((r=this._style)==null?void 0:r.percent)||.03,gradient:((s=this._style)==null?void 0:s.gradient)||.1})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setLabel(e,t){return this}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("flow_line_primitive");var un=yr;var _n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLj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RnC5YAUDTftdV4/ivvwEoRVS9XXPWa1FIT5ird8jpSB+BDN3rO8AaGMnGy0I0QRYTvdk6NkOsucuhGCMAgI8Q0isaHbmAevNMhiD4P6iZhstANGiQE2PEGCRo2NcgAsQDwKnxWFdlT17/duWU1BJmuHz6A5bwbEsCScgh+qAHit3Jr1oooOPExdRBLbeJjSpuwuy30AAH+CDAAPH5ltESNYl4AAAAASUVORK5CYII=";var Kp={color:i.Color.ORANGE},vr=class extends g{constructor(e,t,r,s){super(),this._center=_.parsePosition(e),this._length=t||100,this._topRadius=r||1,this._bottomRadius=s||50,this._delegate=new i.PrimitiveCollection,this._style={...Kp},this._state=d.INITIALIZED}get type(){return g.getOverlayType("light-cylinder-primitive")}set center(e){this._center=_.parsePosition(e),this._updatePrimitives()}get center(){return this._center}set length(e){this._length=e,this._updatePrimitives()}get length(){return this._length}set topRadius(e){this._topRadius=e,this._updatePrimitives()}get topRadius(){return this._topRadius}set bottomRadius(e){this._bottomRadius=e,this._updatePrimitives()}get bottomRadius(){return this._bottomRadius}_computeEllipsePositions(e,t){let r=i.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(e),semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0),s=i.Cartesian3.unpackArray(r.outerPositions);return s.push(s[0]),s}_createCylinderInstance(e,t,r){let s=t.slice(),o=t.length,a=2*o,l=[],h=1/(o-1),c=[],p=[],f=(y,m=0)=>{let E=i.Cartographic.fromCartesian(y);return E.height+=m,i.Cartographic.toCartesian(E)};for(let y=0;y<o;y++){p.push(f(e[y],r)),l.push(y*h,0);let m=y+1,E=(y+1)%o,x=a-m;c.push(x-1,x,y),c.push(y,E,x-1)}for(let y in p)s.push(p[o-y-1]),l.push(1-y*h,1);let T=i.PolygonGeometry.createGeometry(new i.PolygonGeometry({polygonHierarchy:new i.PolygonHierarchy(s),perPositionHeight:!0}));return T.indices=c,T.attributes.st.values=l,new i.GeometryInstance({geometry:T})}_getCircleImage(){let e=document.createElement("canvas");e.width=512,e.height=512;let t=e.getContext("2d");return t.fillStyle="rgba(255,255,255,0)",t.strokeStyle="rgba(255, 255, 255,255)",t.setLineDash([50,50]),t.lineWidth=30,t.beginPath(),t.arc(256,256,150,0,Math.PI*2,!0),t.stroke(),t.restore(),e}_getParticlesImage(e){let t=document.createElement("canvas");t.width=64,t.height=256;let r=t.getContext("2d");return r.clearRect(0,0,64,256),r.drawImage(e,0,0),r.drawImage(e,33,0),t}_updatePrimitives(){this._delegate.removeAll();let e=this._center.alt===0,t=this._computeEllipsePositions(this._center,this._topRadius),r=this._computeEllipsePositions(this._center,this._bottomRadius*.7),s=this._computeEllipsePositions(this._center,this._bottomRadius),o={geometryInstances:new i.GeometryInstance({geometry:new i.PolygonGeometry({polygonHierarchy:new i.PolygonHierarchy(this._computeEllipsePositions(this._center,this._bottomRadius*2)),perPositionHeight:!e}),asynchronous:!1})},a=e?new i.GroundPrimitive(o):new i.Primitive(o);a.appearance=new i.EllipsoidSurfaceAppearance({material:i.Material.fromType(i.Material.CircleRingType,{color:this._style.color})});let l=e?new i.GroundPrimitive(o):new i.Primitive(o);l.appearance=new i.EllipsoidSurfaceAppearance({material:i.Material.fromType(i.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});let h=new i.Primitive({geometryInstances:this._createCylinderInstance(t,r,this._length),appearance:new i.EllipsoidSurfaceAppearance({material:i.Material.fromType(i.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});e?i.GroundPrimitive.initializeTerrainHeights().then(()=>{this._delegate.add(a),this._delegate.add(l),this._delegate.add(h)}):(this._delegate.add(a),this._delegate.add(l),this._delegate.add(h)),i.Resource.fetchImage({url:_n}).then(c=>{let p=new i.Primitive({geometryInstances:this._createCylinderInstance(t,s,this._length),appearance:new i.EllipsoidSurfaceAppearance({material:i.Material.fromType(i.Material.CylinderParticlesType,{color:this._style.color,image:this._getParticlesImage(c)})}),asynchronous:!1});this._delegate.add(p)})}_mountedHook(){this.center=this._center}update(e){this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this)}destroy(){return i.destroyObject(this)}};g.registerType("light-cylinder-primitive");var fn=vr;var wr=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._modelUrl=t,this._delegate=i.Model.fromGltfAsync({url:t}),this._modelEvent=new Mi(this._delegate),this._state=d.INITIALIZED}get type(){return g.getOverlayType("model_primitive")}set position(e){this._position=_.parsePosition(e);let t=u.transformWGS84ToCartesian(this._position);this._delegate.then(r=>{r.modelMatrix=i.Transforms.headingPitchRollToFixedFrame(t,new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))})}get position(){return this._position}set modelUrl(e){this._modelUrl=e,this._delegate=i.Model.fromGltfAsync({url:e,...this._style}),this.position=this._position}get modelUrl(){return this._modelUrl}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this._delegate.then(t=>{v.merge(t,e)}),this)}on(e,t,r){return this._overlayEvent.on(e,t,r||this),this._modelEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this._modelEvent.off(e,t,r||this),this}};g.registerType("model_primitive");var gn=wr;var yn={pixelSize:8,outlineColor:i.Color.BLUE,outlineWidth:2},Tr=class extends g{constructor(e){super(),this._position=_.parsePosition(e),this._delegate={position:void 0},this._state=d.INITIALIZED}get type(){return g.getOverlayType("point_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position,v.merge(this._delegate,yn,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate,yn,this._style),this)}};g.registerType("point_primitive");var vn=Tr;var Cr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate={positions:[]},this._state=d.INITIALIZED}get type(){return g.getOverlayType("polyline_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}get center(){return _e(this._positions)}get distance(){return Q(this._positions)}_mountedHook(){this.positions=this._positions}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("polyline_primitive");var wn=Cr;var xr=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._radius=t,this._delegate=new i.GroundPrimitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("scan_circle_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.geometryInstances.geometry=new i.EllipseGeometry({center:u.transformWGS84ToCartesian(this._position),semiMajorAxis:this._radius,semiMinorAxis:this._radius})}get position(){return this._position}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry.semiMajorAxis=this._radius,this._delegate.geometryInstances.geometry.semiMinorAxis=this._radius}get radius(){return this._radius}_setAppearance(){var e,t;this._style&&(this._delegate.appearance=new i.MaterialAppearance({material:i.Material.fromType("CircleScan",{color:((e=this._style)==null?void 0:e.color)||i.Color.WHITE,speed:((t=this._style)==null?void 0:t.speed)||10})}))}_mountedHook(){this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("scan_circle_primitive");var Tn=xr;var Er=class extends g{constructor(e,t=1){super(),this._positions=_.parsePositions(e),this._width=t,this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("trail_line_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.PolylineGeometry({positions:u.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}get positions(){return this._positions}_setAppearance(){var e,t;this._delegate.appearance=new i.PolylineMaterialAppearance({material:i.Material.fromType("PolylineTrail",{color:((e=this._style)==null?void 0:e.color)||new i.Color(1,0,0,.7),speed:((t=this._style)==null?void 0:t.speed)||5})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("trail_line_primitive");var Cn=Er;var Pr=class extends g{constructor(e,t){super(),this._positions=_.parsePositions(e),this._delegate=new i.GroundPrimitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._video=t,this._state=d.INITIALIZED}get type(){return g.getOverlayType("video_primitive")}set positions(e){var t,r,s,o;this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=i.PolygonGeometry.fromPositions({positions:u.transformWGS84ArrayToCartesianArray(this._positions),height:(t=this._style)==null?void 0:t.height,extrudedHeight:(r=this._style)==null?void 0:r.extrudedHeight,closeTop:(s=this._style)==null?void 0:s.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:i.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get positions(){return this._positions}set video(e){this._video=e,this._setAppearance()}get video(){return this._video}_setAppearance(){this._delegate.appearance=new i.EllipsoidSurfaceAppearance({material:i.Material.fromType("Image",{image:this._video})})}_mountedHook(){this.positions=this._positions,this.video=this._video}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}};g.registerType("video_primitive");var xn=Pr;var br=class extends g{constructor(e,t=[]){super(),this._positions=_.parsePositions(e),this._holes=t.map(r=>_.parsePositions(r)),this._delegate=new i.GroundPrimitive({geometryInstances:new i.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("water_primitive")}set positions(e){var t,r,s,o;this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.PolygonGeometry({polygonHierarchy:new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(a=>new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(a)))),height:(t=this._style)==null?void 0:t.height,extrudedHeight:(r=this._style)==null?void 0:r.extrudedHeight,closeTop:(s=this._style)==null?void 0:s.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:i.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get positions(){return this._positions}_setAppearance(){var e,t,r,s,o,a,l,h;this._style&&(this._delegate.appearance=new i.EllipsoidSurfaceAppearance({material:i.Material.fromType("Water",{baseWaterColor:((e=this._style)==null?void 0:e.baseWaterColor)||new i.Color(.2,.3,.6,1),blendColor:((t=this._style)==null?void 0:t.blendColor)||new i.Color(0,1,.699,1),specularMap:((r=this._style)==null?void 0:r.specularMap)||i.Material.DefaultImageId,normalMap:((s=this._style)==null?void 0:s.normalMap)||i.Material.DefaultImageId,frequency:((o=this._style)==null?void 0:o.frequency)||1e3,animationSpeed:((a=this._style)==null?void 0:a.animationSpeed)||.01,amplitude:((l=this._style)==null?void 0:l.amplitude)||10,specularIntensity:((h=this._style)==null?void 0:h.specularIntensity)||.5})}))}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("water_primitive");var En=br;var Sr=class extends g{constructor(e,t=[]){super(),this._positions=_.parsePositions(e),this._holes=t.map(r=>_.parsePositions(r)),this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("reflection_water_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.PolygonGeometry({polygonHierarchy:new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(t=>new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(t)))),perPositionHeight:!0})}get positions(){return this._positions}_setAppearance(){var e,t,r,s;this._style&&(this._delegate.appearance=new i.EllipsoidSurfaceAppearance({material:new i.Material({fabric:{type:"ReflectionWaterPlane",uniforms:{image:"",waterNormal:new i.Cartesian3,fadeFactor:1,normalMap:((e=this._style)==null?void 0:e.normalMap)||i.Material.DefaultImageId,fresnelParams:new i.Cartesian3(.8,1,5),specularMap:"czm_defaultImage",baseWaterColor:i.Color.fromCssColorString("rgba(45, 95, 146, 1.0)"),blendColor:new i.Color,frequency:2e3,animationSpeed:((t=this._style)==null?void 0:t.animationSpeed)||.01,amplitude:((r=this._style)==null?void 0:r.amplitude)||5,specularIntensity:((s=this._style)==null?void 0:s.specularIntensity)||.8},source:`
2
- uniform sampler2D image;
3
- uniform vec3 waterNormal;
4
- uniform vec3 fresnelParams; // x\u4E3A\u6700\u5C0F\u53CD\u5C04\u7CFB\u6570\uFF0Cy\u4E3A\u6700\u5927\u53CD\u5C04\u7CFB\u6570\uFF0Cz\u4E3A\u89C6\u7EBF\u56E0\u5B50
5
- uniform sampler2D specularMap;
6
- uniform sampler2D normalMap;
7
- uniform vec4 baseWaterColor;
8
- uniform vec4 blendColor;
9
- uniform float frequency;
10
- uniform float animationSpeed;
11
- uniform float amplitude;
12
- uniform float specularIntensity;
13
- uniform float fadeFactor;
14
- czm_material czm_getMaterial(czm_materialInput materialInput) {
15
- czm_material material = czm_getDefaultMaterial(materialInput);
16
- float time = czm_frameNumber * animationSpeed;
17
- // \u8870\u51CF\u662F\u4E0E\u788E\u7247\u7684\u8DDD\u79BB\u548C\u6CE2\u7684\u9891\u7387\u7684\u51FD\u6570
18
- float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);
19
- float specularMapValue = texture(specularMap, materialInput.st).r;
20
- // \u6CE8\u610F\uFF1A\u6B64\u65F6\u4E0D\u4F7F\u7528\u65B9\u5411\u8FD0\u52A8\uFF0C\u53EA\u9700\u5C06\u89D2\u5EA6\u8BBE\u7F6E\u4E3A0.0\uFF1B
21
- vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);
22
- vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));
23
- // \u5F53\u6211\u4EEC\u8FDC\u79BB\u6C34\u9762\u65F6\uFF0C\u6B63\u5E38\u7684\u6270\u52A8\u9010\u6E10\u6D88\u5931
24
- normalTangentSpace.xy /= fade;
25
- // \u6211\u4EEC\u63A5\u8FD1\u975E\u6C34\u533A\u57DF\uFF08\u4F4E\u955C\u9762\u8D34\u56FE\u503C\uFF09\u65F6\uFF0C\u5C1D\u8BD5\u6DE1\u51FA\u6B63\u5E38\u6270\u52A8
26
- normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);
27
- normalTangentSpace = normalize(normalTangentSpace);
28
- // \u83B7\u53D6\u65B0\u6CD5\u5411\u91CF\u4E0E\u5782\u76F4\u4E8E\u5207\u5E73\u9762\u7684\u5411\u91CF\u7684\u5BF9\u9F50\u6BD4\u7387
29
- float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);
30
- // \u968F\u7740\u9AD8\u5149\u8D34\u56FE\u503C\u7684\u51CF\u5C11\uFF0C\u6DE1\u5316\u6C34\u7684\u6548\u679C
31
- float alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;
32
- // \u57FA\u7840\u8272\u662F\u6C34\u548C\u975E\u6C34\u989C\u8272\u7684\u6DF7\u5408\uFF0C\u57FA\u4E8E\u955C\u9762\u8D34\u56FE\u7684\u503C\uFF0C\u53EF\u80FD\u9700\u8981\u4E00\u4E2A\u5747\u5300\u7684\u6DF7\u5408\u56E0\u5B50\u6765\u66F4\u597D\u5730\u63A7\u5236\u8FD9\u4E00\u70B9
33
- vec3 waterColor = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);
34
- // \u6F2B\u5C04\u9AD8\u5149\u662F\u57FA\u4E8E\u6CD5\u7EBF\u7684\u6270\u52A8\u7A0B\u5EA6
35
- waterColor += (0.1 * tsPerturbationRatio);
36
- // \u83B7\u53D6\u6C34\u9762\u53CD\u5C04\u7684\u989C\u8272
37
- vec2 uv = gl_FragCoord.xy / czm_viewport.zw; // \u83B7\u53D6\u5C4F\u5E55uv
38
- uv.s = (1.0 - uv.s); // \u955C\u50CF\u7FFB\u8F6C
39
- // \u6309\u7167\u6CD5\u7EBF\u65B9\u5411\u6765\u6270\u52A8\u53CD\u5C04\u8D34\u56FE\u7684\u7EB9\u7406\u5750\u6807
40
- uv += normalTangentSpace.xz / 100.0;
41
- vec3 reflectColor = texture(image, uv).rgb;
42
- // \u52A0\u5165\u83F2\u6D85\u5C14\u73B0\u8C61
43
- vec3 positionEC = -materialInput.positionToEyeEC;
44
- vec4 positionWC = czm_inverseView * vec4(positionEC, 1.0);
45
- vec3 cameraDir = normalize(positionWC.xyz - czm_viewerPositionWC);
46
- vec3 n = normalize(waterNormal);
47
- float fresnel = 1.0 - dot(-cameraDir, n);
48
- float min_rc = fresnelParams.x; // \u7269\u4F53\u6700\u5C0F\u53CD\u5C04\u7CFB\u6570
49
- float max_rc = fresnelParams.y; // \u7269\u4F53\u6700\u5927\u53CD\u5C04\u7CFB\u6570
50
- float f = fresnelParams.z; // \u89C6\u7EBF\u56E0\u5B50
51
- fresnel = min_rc + (max_rc - min_rc) * pow(fresnel, f);
52
- // \u83F2\u6D85\u5C14\u503C\u9AD8\uFF0C\u4EE3\u8868\u53CD\u5C04\u5F3A(\u66F4\u591A\u663E\u793A\u6C34\u7684\u53CD\u5C04)\uFF0C\u503C\u4F4E\u5219\u662F\u6298\u5C04\u5F3A(\u4E5F\u53EF\u4EE5\u7406\u89E3\u6210\u66F4\u591A\u663E\u793A\u6C34\u7684\u672C\u8272)
53
- material.diffuse = mix(waterColor, reflectColor, fresnel);
54
- material.alpha = mix(alpha, 1.0, fresnel);
55
- material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);
56
- material.specular = specularIntensity;
57
- material.shininess = 10.0;
58
- return material;
59
- }
60
- `}})}))}_calcCenterPoint(e,t=0){let s=e.map(l=>`${l.lng},${l.lat},${l.alt}`).join(",").split(",").map(l=>parseFloat(l));e=i.Cartesian3.fromDegreesArrayHeights(s);let o=new i.Cartesian3;e.forEach(l=>{i.Cartesian3.add(o,l,o)});let a=i.Cartesian3.multiplyByScalar(o,1/e.length,o);if(t){let l=i.Cartographic.fromCartesian(a),h=new i.Cartographic(l.longitude,l.latitude,t);a=i.Cartographic.toCartesian(h)}return a}_getMirrorCamera(e,t,r){let s=Cartesian3.subtract(r,e.position,new Cartesian3),o=-Cartesian3.dot(t,s),a=Cartesian3.multiplyByScalar(t,2*o,new Cartesian3),l=Cartesian3.subtract(e.position,a,new Cartesian3),h=Cartesian3.dot(t,e.directionWC),c=Cartesian3.multiplyByScalar(t,2*h,new Cartesian3),p=Cartesian3.subtract(e.directionWC,c,new Cartesian3);Cartesian3.normalize(p,p);let f=Cartesian3.dot(t,e.upWC),T=Cartesian3.multiplyByScalar(t,2*f,new Cartesian3),y=Cartesian3.subtract(e.upWC,T,new Cartesian3),m=i.Camera.clone(e);return m.position=l,m.up=y,m.direction=p,m.right=Cartesian3.cross(y,p,new Cartesian3),m}_renderToFbo(e,t,r){let s=t._frameState;t.globe.show=!1;let o=t.context,a=o.uniformState,l=t._defaultView.camera;t._defaultView.camera=r;let h=t._defaultView;t._view=h,t.updateFrameState(),s.passes.render=!0,s.passes.postProcess=t.postProcessStages.hasSelected;let c=new i.Cesium3DTilePassState({pass:i.Cesium3DTilePass.RENDER});s.tilesetPassState=c;let p=i.defaultValue(t.backgroundColor,i.Color.BLACK);s.backgroundColor=p,s.atmosphere=t.atmosphere,t.fog.update(s),a.update(s),t._computeCommandList.length=0,t._overlayCommandList.length=0;let f=h.viewport;f.x=0,f.y=0,f.width=o.drawingBufferWidth,f.height=o.drawingBufferHeight;let T=h.passState;T.framebuffer=e,T.blendingEnabled=void 0,T.scissorTest=void 0,T.viewport=i.BoundingRectangle.clone(f,T.viewport),t.updateEnvironment(),t.updateAndExecuteCommands(T,p),t.resolveFramebuffers(T),T.framebuffer=void 0,o.endFrame(),t.globe.show=!0,t._defaultView.camera=l}_clipAnyModel(e,t,r){let s=null,o=null;if(e instanceof Cesium3DTileset)o=e,s=Matrix4.multiply(o.modelMatrix,o.root.transform,new Matrix4),Matrix4.inverse(s,s);else if(e instanceof Model)o=e,s=Matrix4.inverse(o.modelMatrix,new Matrix4);else{if(!e.model)return;s=Transforms.eastNorthUpToFixedFrame(e.position.getValue(new i.JulianDate)),Matrix4.inverse(s,s),o=e.model}let a=new ClippingPlaneCollection,l=Plane.fromPointNormal(t,r),h=Plane.transform(l,s);return a.add(h),o.clippingPlanes=a,a}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("water_primitive");var Pn=Sr;var Ir=class n extends g{constructor(e,t){super(),this._delegate=new i.Entity({billboard:{}}),this._position=_.parsePosition(e),this._icon=t,this._size=[32,32],this._state=d.INITIALIZED}get type(){return g.getOverlayType("billboard")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("Billboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}static fromEntity(e){var o;let t,r=i.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r));return e.billboard&&(t=new n(s,e.billboard.image.getValue(r)),t.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(r)}),t}};g.registerType("billboard");var Ce=Ir;var Mr=class extends g{constructor(e,t,r,s){super(),this._position=_.parsePosition(e),this._length=t,this._width=r,this._height=s,this._delegate=new i.Entity({box:{dimensions:{x:+this._length,y:+this._width,z:+this._height}}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("box")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))}get position(){return this._position}set length(e){let t=this._delegate.box.dimensions.getValue();this._length=e||0,t.x=+this._length,this._delegate.box.dimensions.setValue(t)}get length(){return this._length}set width(e){let t=this._delegate.box.dimensions.getValue();this._width=e||0,t.y=+this._width,this._delegate.box.dimensions.setValue(t)}get width(){return this._width}set height(e){let t=this._delegate.box.dimensions.getValue();this._height=e||0,t.z=+this._height,this._delegate.box.dimensions.setValue(t)}get height(){return this._height}_mountedHook(){this.position=this._position}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.box,e),this)}};g.registerType("box");var bn=Mr;var Ar=class extends g{constructor(e,t){super(),this._delegate=new i.Entity({polygon:{}}),this._center=_.parsePosition(e),this._radius=+t||0,this._rotateAmount=0,this._stRotation=0,this._state=d.INITIALIZED}get type(){return g.getOverlayType("circle")}set center(e){this._center=_.parsePosition(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get center(){return this._center}set radius(e){this._radius=+e,this._delegate.polygon.hierarchy=this._computeHierarchy()}get radius(){return this._radius}set rotateAmount(e){this._rotateAmount=+e,this._delegate.polygon.stRotation=new i.CallbackProperty(()=>(this._stRotation+=this._rotateAmount,(this._stRotation>=360||this._stRotation<=-360)&&(this._stRotation=0),i.Math.toRadians(this._stRotation)),!1)}get rotateAmount(){return this._rotateAmount}_computeHierarchy(){let e=new i.PolygonHierarchy,t=i.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),r=i.Cartesian3.unpackArray(t.outerPositions);return r.push(r[0]),e.positions=r,e}_mountedHook(){this.center=this._center}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this._center),this._delegate.label={...t,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("circle");var pt=Ar;var Dr=class n extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Entity({corridor:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("corridor")}set positions(e){this._positions=_.parsePositions(e),this._delegate.corridor.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.corridor,e),this)}static fromEntity(e){var s;let t,r=i.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("corridor");var Sn=Dr;var Lr=class extends g{constructor(e,t,r,s){super(),this._position=_.parsePosition(e),this._length=+t||0,this._topRadius=+r||0,this._bottomRadius=+s||0,this._delegate=new i.Entity({cylinder:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("cylinder")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))}get position(){return this._position}set length(e){this._length=+e||0,this._delegate.cylinder.length=this._length}get length(){return this._length}set topRadius(e){this._topRadius=+e||0,this._delegate.cylinder.topRadius=this._topRadius}get topRadius(){return this._topRadius}set bottomRadius(e){this._bottomRadius=+e||0,this._delegate.cylinder.bottomRadius=this._bottomRadius}get bottomRadius(){return this._bottomRadius}_mountedHook(){this.position=this._position,this.length=this._length,this.topRadius=this._topRadius,this.bottomRadius=this._bottomRadius}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.topRadius&&delete e.bottomRadius,v.merge(this._style,e),v.merge(this._delegate.cylinder,e),this)}};g.registerType("cylinder");var In=Lr;var Rr=class extends g{constructor(e,t,r){super(),this._position=_.parsePosition(e),this._semiMajorAxis=+t||0,this._semiMinorAxis=+r||0,this._delegate=new i.Entity({ellipse:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("ellipse")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))}get position(){return this._position}set semiMajorAxis(e){this._semiMajorAxis=+e||0,this._delegate.ellipse.semiMajorAxis=this._semiMajorAxis}get semiMajorAxis(){return this._semiMajorAxis}set semiMinorAxis(e){this._semiMinorAxis=+e||0,this._delegate.ellipse.semiMinorAxis=this._semiMinorAxis}get semiMinorAxis(){return this._semiMinorAxis}_mountedHook(){this.position=this._position,this.semiMajorAxis=this._semiMajorAxis,this.semiMinorAxis=this._semiMinorAxis}setStyle(e){return Object.keys(e).length===0?this:(delete e.semiMajorAxis&&delete e.semiMinorAxis,v.merge(this._style,e),v.merge(this._delegate.ellipse,e),this)}};g.registerType("ellipse");var Mn=Rr;var Or=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._radius=t||{x:10,y:10,z:10},this._delegate=new i.Entity({ellipsoid:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("sphere")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))}get position(){return this._position}set radius(e){this._radius=e||{x:10,y:10,z:10},this._delegate.ellipsoid.radii=this._radius}get radius(){return this._radius}_mountedHook(){this.position=this._position,this.radius=this._radius}setStyle(e){return Object.keys(e).length===0?this:(delete e.radius,v.merge(this._style,e),v.merge(this._delegate.ellipsoid,e),this)}};g.registerType("ellipsoid");var An=Or;var kr=class n extends g{constructor(e,t){super(),this._delegate=new i.Entity({label:{}}),this._position=_.parsePosition(e),this._text=t,this._state=d.INITIALIZED}get type(){return g.getOverlayType("label")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.label.text=this._text}get text(){return this._text}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,v.merge(this._style,e),v.merge(this._delegate.label,e),this)}static fromEntity(e){var o;let t=i.JulianDate.now(),r=u.transformCartesianToWGS84(e.position.getValue(t)),s;return e.billboard&&(s=new n(r,e.name),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(t)}),s}};g.registerType("label");var dt=kr;var Fr=class extends g{constructor(e,t,r,s={}){if(super(),this._position=_.parsePosition(e),this._width=+t||100,this._height=+r||100,s.normal&&typeof s.normal=="string"){let o=String(s.normal).toLocaleUpperCase();s.normal=o==="X"?i.Cartesian3.UNIT_X:o==="Y"?i.Cartesian3.UNIT_Y:i.Cartesian3.UNIT_Z}else s.normal=i.Cartesian3.UNIT_Z;this._normal=s.normal,this._distance=s.distance||0,this._delegate=new i.Entity({plane:{dimensions:{x:this._width,y:this._height},plane:new i.Plane(this._normal,this._distance)}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("plane")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))}get position(){return this._position}set width(e){let t=this._delegate.plane.dimensions.getValue();this._width=+e||0,t.x=this._width}get width(){return this._width}set height(e){let t=this._delegate.plane.dimensions.getValue();this._height=+e||0,t.y=this._height}get height(){return this._height}set distance(e){let t=this._delegate.plane.dimensions.getValue();this._distance=e,t.distance=e}get distance(){return this._distance}_mountedHook(){this.position=this._position,this.distance=this._distance}setStyle(e){return Object.keys(e).length===0?this:(delete e.dimensions&&delete["plane"],v.merge(this._style,e),v.merge(this._delegate.plane,e),this)}};g.registerType("plane");var Dn=Fr;var Ln={pixelSize:8,outlineColor:i.Color.BLUE,outlineWidth:2},zr=class n extends g{constructor(e){super(),this._delegate=new i.Entity({point:{}}),this._position=_.parsePosition(e),this._state=d.INITIALIZED}get type(){return g.getOverlayType("point")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position,v.merge(this._delegate.point,Ln,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate.point,Ln,this._style),this)}static fromEntity(e){var o;let t,r=i.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r));return t=new n(s),t.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(r)},t}};g.registerType("point");var mt=zr;var Hr=class n extends g{constructor(e){super(),this._delegate=new i.Entity({polygon:{}}),this._positions=_.parsePositions(e),this._holes=[],this._state=d.INITIALIZED}get type(){return g.getOverlayType("polygon")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get positions(){return this._positions}set holes(e){e&&e.length&&(this._holes=e.map(t=>_.parsePositions(t)),this._delegate.polygon.hierarchy=this._computeHierarchy())}get holes(){return this._holes}get center(){return _e([...this._positions,this._positions[0]])}get area(){return ue(this._positions)}_computeHierarchy(){let e=new i.PolygonHierarchy;return e.positions=u.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map(t=>new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(t))),e}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...t},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}static fromEntity(e){var s;let t,r=i.JulianDate.now();if(e.polygon){let o=u.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(r).positions);t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("polygon");var xe=Hr;var Nr=class n extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Entity({polyline:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("polyline")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polyline.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}get center(){return _e(this._positions)}get distance(){return Q(this._positions)}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...t},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polyline,e),this)}static fromEntity(e){var s;let t,r=i.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("polyline");var Ee=Nr;var Wr=class n extends g{constructor(e,t){super(),this._positions=_.parsePositions(e),this._shape=t||[],this._delegate=new i.Entity({polylineVolume:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("polyline_volume")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polylineVolume.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}set shape(e){this._shape=e||[],this._delegate.polylineVolume.shape=this._shape}get shape(){return this._shape}_mountedHook(){this.positions=this._positions,this.shape=this._shape}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions&&delete e.shape,v.merge(this._style,e),v.merge(this._delegate.polylineVolume,e),this)}static fromEntity(e,t){var o;let r,s=i.JulianDate.now();if(e.polyline){let a=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));r=new n(a,t),r.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}}return r}};g.registerType("polyline_volume");var Rn=Wr;var Gr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Entity({rectangle:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("rect")}set positions(e){this._positions=_.parsePositions(e),this._delegate.rectangle.coordinates=i.Rectangle.fromCartesianArray(u.transformWGS84ArrayToCartesianArray(this._positions))}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){let r=this._delegate.rectangle.coordinates.getValue();return this._delegate.position=i.Cartographic.toCartesian(i.Rectangle.center(r,new i.Cartographic)),this._delegate.label={...t,text:e},this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.rectangle,e),this)}};g.registerType("rect");var ut=Gr;var Ur=class n extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Entity({wall:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("wall")}set positions(e){this._positions=_.parsePositions(e),this._delegate.wall.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.wall,e),this)}static fromEntity(e){var s;let t,r=i.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("wall");var On=Ur;var Br=class extends P{constructor(e,t,r={}){if(!t)throw new Error("GeoJsonLayer\uFF1Athe url invalid");super(e),this._delegate=i.GeoJsonDataSource.load(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("geojson")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}_createBillboard(e){if(e.position&&e.billboard)return Ce.fromEntity(e)}_createPolyline(e){if(e.polyline)return Ee.fromEntity(e)}_createPolygon(e){if(e.polygon)return xe.fromEntity(e)}_createModel(e,t){if(e)return Oe.fromEntity(e,t)}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}toVectorLayer(){let e=new pe(this.id);return this.eachOverlay(t=>{t.billboard?e.addOverlay(this._createBillboard(t)):t.polyline?e.addOverlay(this._createPolyline(t)):t.polygon&&e.addOverlay(this._createPolygon(t))},this),e}toModelLayer(e){let t=new pe(this.id);return this.eachOverlay(r=>{t.addOverlay(this._createModel(r,e))},this),t}};P.registerType("geojson");var _t=Br;var Vr=class extends P{constructor(e,t,r={}){if(!t)throw new Error("Shp2JsonLayer\uFF1Athe url invalid");if(!me("shpUtil"))throw new Error("miss the shpUtil lib");super(e);let o=this._init(t,r);this._delegate=i.GeoJsonDataSource.load(o,r),this._state=d.INITIALIZED}async _init(e,t){var s;return await shpUtil.toGeoJSON(e,void 0,(s=t.encoding)!=null?s:"gbk",t.crs)}get type(){return P.getLayerType("shp")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}_createBillboard(e){if(e.position&&e.billboard)return Ce.fromEntity(e)}_createPolyline(e){if(e.polyline)return Ee.fromEntity(e)}_createPolygon(e){if(e.polygon)return xe.fromEntity(e)}_createModel(e,t){if(e)return Oe.fromEntity(e,t)}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}toVectorLayer(){let e=new pe(this.id);return this.eachOverlay(t=>{t.billboard?e.addOverlay(this._createBillboard(t)):t.polyline?e.addOverlay(this._createPolyline(t)):t.polygon&&e.addOverlay(this._createPolygon(t))},this),e}toModelLayer(e){let t=new pe(this.id);return this.eachOverlay(r=>{t.addOverlay(this._createModel(r,e))},this),t}};P.registerType("shp");var kn=Vr;var jr=class extends P{constructor(e,t,r={}){if(!t)throw new Error("GpxLayer: the url is empty");super(e),this._delegate=i.KmlDataSource.load(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("gpx")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};P.registerType("gpx");var Fn=jr;var Qp={radialColor:i.Color.WHITE,radialWidth:2,showRadial:!0,LabelColor:i.Color.YELLOW,weftColor:i.Color.WHITE,weftWidth:2},Yr=class extends P{constructor(e,t){super(e),this._options={...Qp,...t},this._delegate=new i.CustomDataSource(e),this._state=d.INITIALIZED}get type(){return P.getLayerType("graticule")}_addedHook(){for(let e=0;e<36;e++)this._delegate.entities.add({polyline:{positions:i.Cartesian3.fromDegreesArray([e*10,89.5,e*10,-89.5]),material:this._options.radialColor,width:this._options.radialWidth},show:this._options.showRadial}),this._delegate.entities.add({position:i.Cartesian3.fromDegrees(e*10,0),label:{text:e*10+"\xB0",font:"12px",fillColor:this._options.LabelColor}});for(let e=0;e<18;e++){let t=[];for(let r=0;r<129;r++)t.push(-180+r*(360/128),(e<9?e:-e)*10);this._delegate.entities.add({polyline:{positions:i.Cartesian3.fromDegreesArray(t),material:this._options.weftColor,width:this._options.weftWidth}})}}};P.registerType("graticule");var zn=Yr;var Zr=class extends P{constructor(e){super(e),this._delegate=new i.PrimitiveCollection,this._isGround=!0,this._state=d.INITIALIZED}get type(){return P.getLayerType("ground_primitive")}clear(){return this._delegate&&this._delegate.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("ground_primitive");var Hn=Zr;var qr=class extends P{constructor(e){super(e),this._delegate=S.create("div","html-layer",void 0),this._delegate.setAttribute("id",this._id),this._renderRemoveCallback=void 0,this._state=d.INITIALIZED}get type(){return P.getLayerType("html")}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden",Object.keys(this._cache).forEach(t=>{this._cache[t].show=e})}get show(){return this._show}_onAdd(e){this._viewer=e,this._viewer.layerContainer.appendChild(this._delegate);let t=this._viewer.scene;this._renderRemoveCallback=t.postRender.addEventListener(()=>{let r=this._viewer.camera.positionWC,s=this._viewer.camera.direction,o=this._viewer.getOffset();this.eachOverlay(a=>{if(a&&a.position){let l=u.transformWGS84ToCartesian(a.position),h=t.globe.ellipsoid.geodeticSurfaceNormal(l,new i.Cartesian3),c=i.SceneTransforms.worldToWindowCoordinates(t,l);c&&(c.x+=o.x,c.y+=o.y),a._updateStyle(c,i.Cartesian3.distance(l,r),i.Cartesian3.dot(s,h)<=0)}},this)},this),this._state=d.ADDED}_onRemove(){this._renderRemoveCallback&&this._renderRemoveCallback(),this._viewer.layerContainer.removeChild(this._delegate),this._state=d.REMOVED}clear(){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);return this._cache={},this._state=d.CLEARED,this}};P.registerType("html");var Nn=qr;var Xr=class extends P{constructor(e){super(e),this._delegate=new i.PrimitiveCollection,this._state=d.INITIALIZED}get type(){return P.getLayerType("i3s")}clear(){return this._delegate.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("i3s");var Wn=Xr;var Jr=class extends P{constructor(e,t,r={}){if(!t)throw new Error("KmlLayer: the url is empty");super(e),this._delegate=i.KmlDataSource.load(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("kml")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};P.registerType("kml");var Gn=Jr;var Kr=class extends P{constructor(e,t=""){super(e),this._dataSource=i.GeoJsonDataSource.load(t),this._delegate=new i.CustomDataSource(e),this._initLabel(),this._state=d.INITIALIZED}get type(){return P.getLayerType("label")}_createLabel(e){if(e.position&&e.name)return dt.fromEntity(e)}_initLabel(){this._dataSource.then(e=>{e.entities.values.forEach(r=>{let s=this._createLabel(r);this.addOverlay(s)})})}};P.registerType("label");var Un=Kr;var Qr=class extends P{constructor(e){super(e),this._delegate=new i.PrimitiveCollection,this._points=this._delegate.add(new i.PointPrimitiveCollection),this._labels=this._delegate.add(new i.LabelCollection),this._billboards=this._delegate.add(new i.BillboardCollection),this._polylines=this._delegate.add(new i.PolylineCollection),this._clouds=this._delegate.add(new i.CloudCollection),this._state=d.INITIALIZED}get type(){return P.getLayerType("primitive")}get points(){return this._points}get labels(){return this._labels}get billboards(){return this._billboards}get polylines(){return this._polylines}get clouds(){return this._clouds}clear(){return this._delegate&&this._delegate.removeAll(),this._points=this._delegate.add(new i.PointPrimitiveCollection),this._labels=this._delegate.add(new i.LabelCollection),this._billboards=this._delegate.add(new i.BillboardCollection),this._polylines=this._delegate.add(new i.PolylineCollection),this._clouds=this._delegate.add(new i.CloudCollection),this._cache={},this._state=d.CLEARED,this}};P.registerType("primitive");var Bn=Qr;var $r=class extends P{constructor(e,t,r){super(e),this._delegate=i.ImageryLayer.fromProviderAsync(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("raster-tile")}};P.registerType("raster-tile");var Vn=$r;var es=class extends P{constructor(e){super(e),this._delegate=new i.PrimitiveCollection,this._state=d.INITIALIZED}get type(){return P.getLayerType("tileset")}clear(){return this._delegate.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("tileset");var jn=es;_t.registerType("topojson");var ts=class extends P{constructor(e,t){if(!me("echarts"))throw new Error("miss the echarts lib");super(e),this._option=t,this._delegate=void 0,this._chart=void 0}set show(e){this._show=e,this._delegate.style.visibility=e?"visible":"hidden"}get show(){return this._show}_createChartElement(){let e=this._viewer.scene.canvas,t=document.createElement("div");return t.setAttribute("id",this._id),t.setAttribute("data-layer-type","chart-layer"),t.style.cssText=`position:absolute; top:0; left:0; width: ${e.clientWidth}px; height: ${e.clientHeight}px;pointer-events:none;`,this._viewer.layerContainer.appendChild(t),t}_onAdd(e){let t=me("echarts");this._viewer=e,this._viewer.canvas.setAttribute("tabIndex","0"),this._delegate=this._createChartElement(),this._chart=t.init(this._delegate),Object(this._chart.getZr()).viewer=e,this._option&&this._chart.setOption({...this._option,GLMap:{},animation:!1}),this._state=d.ADDED}_onRemove(){this._delegate&&this._viewer&&(this._chart.dispose(),this._viewer.layerContainer.removeChild(this._delegate),this._state=d.REMOVED)}setOption(e={}){return this._option=e,this._chart&&this._chart.setOption({...e,GLMap:{},animation:!1}),this}clear(){return this._chart.clear(),this}resize(){return this._chart.resize(),this}},Yn=ts;var{Cartesian3:ft,Ellipsoid:$p,Math:Zn}=i;function qn(n){function e(t){this._api=t,this._viewer=Object(t.getZr()).viewer,this._mapOffset=[0,0],this.dimensions=["lng","lat"]}return e.prototype.getViewer=function(){return this._viewer},e.prototype.setMapOffset=function(t){return this._mapOffset=t,this},e.prototype.dataToPoint=function(t){let r=[],s=ft.fromDegrees(t[0],t[1]);if(!s)return r;let o=$p.WGS84.geodeticSurfaceNormal(s,new ft),a=this._viewer.camera.direction;if(ft.dot(o,a)>=0)return r;let l=this._viewer.scene.cartesianToCanvasCoordinates(s);return l?[l.x-this._mapOffset[0],l.y-this._mapOffset[1]]:r},e.prototype.pointToData=function(t){let r=this._viewer.scene.globe.ellipsoid,s=new ft(t[0]+this._mapOffset[0],t[1]+this._mapOffset[1],0),o=r.cartesianToCartographic(s);return[Zn.toDegrees(o.longitude),Zn.toDegrees(o.latitude)]},e.prototype.getViewRect=function(){let t=this._api;return new n.graphic.BoundingRect(0,0,t.getWidth(),t.getHeight())},e.prototype.getRoamTransform=function(){return n.matrix.create()},e.create=function(t,r){let s;t.eachComponent("GLMap",function(o){s=new e(r),s.setMapOffset(o.__mapOffset||[0,0]),o.coordinateSystem=s}),t.eachSeries(function(o){o.get("coordinateSystem")==="GLMap"&&(o.coordinateSystem=s)})},e.dimensions=["lng","lat"],e}function Xn(n){let{registerAction:e,registerCoordinateSystem:t,extendComponentModel:r,extendComponentView:s}=n;r({type:"GLMap",getViewer(){return Object(this.getZr()).viewer},defaultOption:{roam:!1}}),s({type:"GLMap",init:function(o,a){this.api=a,a.getZr().viewer.clock.onTick.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.getZr().dom.style.visibility!=="hidden"&&this.api.dispatchAction({type:"GLMapRoam"})},render:function(o,a,l){},dispose:function(){this.api.getZr().viewer.clock.onTick.removeEventListener(this.moveHandler,this)}}),t("GLMap",qn(n)),e({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(o,a){})}var ed={LEFT_MIDDLE:0,LEFT_RIGHT:1},Pe=ed;var is=class{constructor(e){this._viewer=e,this._options={}}_setViewerOption(){var e,t,r;return this._viewer.delegate.shadows=(t=(e=this._options)==null?void 0:e.shadows)!=null?t:!1,this._viewer.delegate.resolutionScale=((r=this._options)==null?void 0:r.resolutionScale)||1,this}_setCanvasOption(){return this._options.tabIndex&&this._viewer.scene.canvas.setAttribute("tabIndex",this._options.tabIndex),this}_setSceneOption(){var t,r,s,o;let e=this._viewer.scene;return e.skyAtmosphere.show=(t=this._options.showAtmosphere)!=null?t:!0,e.sun.show=(r=this._options.showSun)!=null?r:!0,e.moon.show=(s=this._options.showMoon)!=null?s:!0,e.postProcessStages.fxaa.enabled=(o=this._options.enableFxaa)!=null?o:!1,e.msaaSupported&&(e.msaaSamples=+this._options.msaaSamples||1),this}_setSkyBoxOption(){var t;if(!this._options.skyBox)return this;let e=this._options.skyBox;if(e instanceof i.SkyBox)this._viewer.scene.skyBox=e;else{let r=this._viewer.scene.skyBox;r.show=(t=e.show)!=null?t:!0,e.offsetAngle&&(r.offsetAngle=e.offsetAngle),e!=null&&e.sources&&(r.sources=e.sources)}return this}_setGlobeOption(){var r,s,o,a,l,h,c,p,f,T,y,m;if(!this._options.globe)return this;let e=this._viewer.scene.globe,t=this._options.globe;if(v.merge(e,{show:(r=t==null?void 0:t.show)!=null?r:!0,showGroundAtmosphere:(s=t==null?void 0:t.showGroundAtmosphere)!=null?s:!0,enableLighting:(o=t==null?void 0:t.enableLighting)!=null?o:!1,depthTestAgainstTerrain:(a=t==null?void 0:t.depthTestAgainstTerrain)!=null?a:!1,tileCacheSize:+(t==null?void 0:t.tileCacheSize)||100,preloadSiblings:(l=t==null?void 0:t.preloadSiblings)!=null?l:!1,showSkirts:(h=t==null?void 0:t.showSkirts)!=null?h:!0,baseColor:(t==null?void 0:t.baseColor)||new i.Color(0,0,.5,1),terrainExaggeration:(t==null?void 0:t.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(t==null?void 0:t.terrainExaggerationRelativeHeight)||0}),v.merge(e.translucency,{enabled:(p=(c=t==null?void 0:t.translucency)==null?void 0:c.enabled)!=null?p:!1,backFaceAlpha:+((f=t==null?void 0:t.translucency)==null?void 0:f.backFaceAlpha)||1,backFaceAlphaByDistance:(T=t==null?void 0:t.translucency)==null?void 0:T.backFaceAlphaByDistance,frontFaceAlpha:+((y=t==null?void 0:t.translucency)==null?void 0:y.frontFaceAlpha)||1,frontFaceAlphaByDistance:(m=t==null?void 0:t.translucency)==null?void 0:m.frontFaceAlphaByDistance}),t!=null&&t.filterColor){let E=this._viewer.scene.globe._surfaceShaderSet.baseFragmentShaderSource,x=E.sources.pop();E.sources.push(x.replace("out_FragColor = finalColor;",`out_FragColor = finalColor * vec4${t.filterColor.toString()};`))}return this}_setCameraController(){var r,s,o,a,l,h,c;if(!((r=this._options)!=null&&r.cameraController))return this;let e=this._viewer.scene.screenSpaceCameraController,t=this._options.cameraController;return v.merge(e,{enableInputs:(s=t==null?void 0:t.enableInputs)!=null?s:!0,enableRotate:(o=t==null?void 0:t.enableRotate)!=null?o:!0,enableTilt:(a=t==null?void 0:t.enableTilt)!=null?a:!0,enableTranslate:(l=t==null?void 0:t.enableTranslate)!=null?l:!0,enableZoom:(h=t==null?void 0:t.enableZoom)!=null?h:!0,enableCollisionDetection:(c=t==null?void 0:t.enableCollisionDetection)!=null?c:!0,minimumZoomDistance:+(t==null?void 0:t.minimumZoomDistance)||1,maximumZoomDistance:+(t==null?void 0:t.maximumZoomDistance)||40489014}),this}setOptions(e){return Object.keys(e).length===0?this:(this._options={...this._options,...e},this._setViewerOption()._setCanvasOption()._setSceneOption()._setSkyBoxOption()._setGlobeOption()._setCameraController(),this)}},rs=is;var ss=class{constructor(e){this._viewer=e,this._mouseMode=0}setPitchRange(e,t){let r=new i.ScreenSpaceEventHandler(this._viewer.scene.canvas);this._viewer.scene.mode===i.SceneMode.SCENE3D&&(r.setInputAction(s=>{r.setInputAction(o=>{let a=!0,l=o.endPosition.y<o.startPosition.y;l&&this._viewer.camera.pitch>i.Math.toRadians(t)||!l&&this._viewer.camera.pitch<i.Math.toRadians(e)?a=!1:a=!0,this._viewer.scene.screenSpaceCameraController.enableTilt=a},i.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===Pe.LEFT_MIDDLE?i.ScreenSpaceEventType.MIDDLE_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN),r.setInputAction(s=>{this._viewer.scene.screenSpaceCameraController.enableTilt=!0,r.removeInputAction(i.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===Pe.LEFT_MIDDLE?i.ScreenSpaceEventType.MIDDLE_UP:i.ScreenSpaceEventType.RIGHT_UP))}changeMouseMode(e){this._mouseMode=e||Pe.LEFT_MIDDLE,e===Pe.LEFT_MIDDLE?(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[i.CameraEventType.MIDDLE_DRAG,i.CameraEventType.PINCH,{eventType:i.CameraEventType.LEFT_DRAG,modifier:i.KeyboardEventModifier.CTRL},{eventType:i.CameraEventType.RIGHT_DRAG,modifier:i.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[i.CameraEventType.RIGHT_DRAG,i.CameraEventType.WHEEL,i.CameraEventType.PINCH]):e===Pe.LEFT_RIGHT&&(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[i.CameraEventType.RIGHT_DRAG,i.CameraEventType.PINCH,{eventType:i.CameraEventType.LEFT_DRAG,modifier:i.KeyboardEventModifier.CTRL},{eventType:i.CameraEventType.RIGHT_DRAG,modifier:i.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[i.CameraEventType.WHEEL,i.CameraEventType.PINCH])}},os=ss;var td={},as=td;var ns=class{constructor(){this._viewer=void 0,this._enable=!1,this._wrapper=void 0,this._ready=!1}set enable(e){this._enable!==e&&(this._enable=e,this._state=this._enable?d.ENABLED:d.DISABLED,this._enableHook&&this._enableHook())}get enable(){return this._enable}get state(){return this._state}_mountContent(){}_bindEvent(){}_unbindEvent(){}_enableHook(){!this._ready&&this._mountContent(),this._enable?(!this._wrapper.parentNode&&this._viewer.widgetContainer.appendChild(this._wrapper),this._bindEvent()):(this._unbindEvent(),this._wrapper.parentNode&&this._viewer.widgetContainer.removeChild(this._wrapper))}_updateWindowCoord(e){}_installHook(){}_getViewerOffset(){return this._viewer?this._viewer.getOffset():{x:0,y:0}}install(e){this._viewer=e,this._installHook&&this._installHook(),this._state=d.INSTALLED}setWrapper(e){return this}setContent(e){if(e&&typeof e=="string")this._wrapper.innerHTML=e;else if(e&&e instanceof Element){for(;this._wrapper.hasChildNodes();)this._wrapper.removeChild(this._wrapper.firstChild);this._wrapper.appendChild(e)}return this}hide(){this._wrapper&&(this._wrapper.style.cssText=`
1
+ var ig=Object.create;var ji=Object.defineProperty;var rg=Object.getOwnPropertyDescriptor;var sg=Object.getOwnPropertyNames;var og=Object.getPrototypeOf,ag=Object.prototype.hasOwnProperty;var ng=(a,e,t)=>e in a?ji(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var P=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports);var lg=(a,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of sg(e))!ag.call(a,s)&&s!==t&&ji(a,s,{get:()=>e[s],enumerable:!(r=rg(e,s))||r.enumerable});return a};var hg=(a,e,t)=>(t=a!=null?ig(og(a)):{},lg(e||!a||!a.__esModule?ji(t,"default",{value:a,enumerable:!0}):t,a));var qi=(a,e,t)=>(ng(a,typeof e!="symbol"?e+"":e,t),t);var Fl=P((cD,zl)=>{function Tg(){this.__data__=[],this.size=0}zl.exports=Tg});var ds=P((pD,Hl)=>{function xg(a,e){return a===e||a!==a&&e!==e}Hl.exports=xg});var ht=P((dD,Nl)=>{var Eg=ds();function Pg(a,e){for(var t=a.length;t--;)if(Eg(a[t][0],e))return t;return-1}Nl.exports=Pg});var Gl=P((mD,Wl)=>{var bg=ht(),Sg=Array.prototype,Ag=Sg.splice;function Mg(a){var e=this.__data__,t=bg(e,a);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():Ag.call(e,t,1),--this.size,!0}Wl.exports=Mg});var Bl=P((uD,Ul)=>{var Ig=ht();function Dg(a){var e=this.__data__,t=Ig(e,a);return t<0?void 0:e[t][1]}Ul.exports=Dg});var jl=P((_D,Vl)=>{var Lg=ht();function Rg(a){return Lg(this.__data__,a)>-1}Vl.exports=Rg});var Yl=P((fD,ql)=>{var Og=ht();function kg(a,e){var t=this.__data__,r=Og(t,a);return r<0?(++this.size,t.push([a,e])):t[r][1]=e,this}ql.exports=kg});var ct=P((gD,Zl)=>{var zg=Fl(),Fg=Gl(),Hg=Bl(),Ng=jl(),Wg=Yl();function Ue(a){var e=-1,t=a==null?0:a.length;for(this.clear();++e<t;){var r=a[e];this.set(r[0],r[1])}}Ue.prototype.clear=zg;Ue.prototype.delete=Fg;Ue.prototype.get=Hg;Ue.prototype.has=Ng;Ue.prototype.set=Wg;Zl.exports=Ue});var Jl=P((yD,Xl)=>{var Gg=ct();function Ug(){this.__data__=new Gg,this.size=0}Xl.exports=Ug});var Ql=P((vD,Kl)=>{function Bg(a){var e=this.__data__,t=e.delete(a);return this.size=e.size,t}Kl.exports=Bg});var eh=P((wD,$l)=>{function Vg(a){return this.__data__.get(a)}$l.exports=Vg});var ih=P((CD,th)=>{function jg(a){return this.__data__.has(a)}th.exports=jg});var ms=P((TD,rh)=>{var qg=typeof global=="object"&&global&&global.Object===Object&&global;rh.exports=qg});var me=P((xD,sh)=>{var Yg=ms(),Zg=typeof self=="object"&&self&&self.Object===Object&&self,Xg=Yg||Zg||Function("return this")();sh.exports=Xg});var Nt=P((ED,oh)=>{var Jg=me(),Kg=Jg.Symbol;oh.exports=Kg});var hh=P((PD,lh)=>{var ah=Nt(),nh=Object.prototype,Qg=nh.hasOwnProperty,$g=nh.toString,pt=ah?ah.toStringTag:void 0;function ey(a){var e=Qg.call(a,pt),t=a[pt];try{a[pt]=void 0;var r=!0}catch{}var s=$g.call(a);return r&&(e?a[pt]=t:delete a[pt]),s}lh.exports=ey});var ph=P((bD,ch)=>{var ty=Object.prototype,iy=ty.toString;function ry(a){return iy.call(a)}ch.exports=ry});var dt=P((SD,uh)=>{var dh=Nt(),sy=hh(),oy=ph(),ay="[object Null]",ny="[object Undefined]",mh=dh?dh.toStringTag:void 0;function ly(a){return a==null?a===void 0?ny:ay:mh&&mh in Object(a)?sy(a):oy(a)}uh.exports=ly});var Be=P((AD,_h)=>{function hy(a){var e=typeof a;return a!=null&&(e=="object"||e=="function")}_h.exports=hy});var us=P((MD,fh)=>{var cy=dt(),py=Be(),dy="[object AsyncFunction]",my="[object Function]",uy="[object GeneratorFunction]",_y="[object Proxy]";function fy(a){if(!py(a))return!1;var e=cy(a);return e==my||e==uy||e==dy||e==_y}fh.exports=fy});var yh=P((ID,gh)=>{var gy=me(),yy=gy["__core-js_shared__"];gh.exports=yy});var Ch=P((DD,wh)=>{var _s=yh(),vh=function(){var a=/[^.]+$/.exec(_s&&_s.keys&&_s.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}();function vy(a){return!!vh&&vh in a}wh.exports=vy});var fs=P((LD,Th)=>{var wy=Function.prototype,Cy=wy.toString;function Ty(a){if(a!=null){try{return Cy.call(a)}catch{}try{return a+""}catch{}}return""}Th.exports=Ty});var Eh=P((RD,xh)=>{var xy=us(),Ey=Ch(),Py=Be(),by=fs(),Sy=/[\\^$.*+?()[\]{}|]/g,Ay=/^\[object .+?Constructor\]$/,My=Function.prototype,Iy=Object.prototype,Dy=My.toString,Ly=Iy.hasOwnProperty,Ry=RegExp("^"+Dy.call(Ly).replace(Sy,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Oy(a){if(!Py(a)||Ey(a))return!1;var e=xy(a)?Ry:Ay;return e.test(by(a))}xh.exports=Oy});var bh=P((OD,Ph)=>{function ky(a,e){return a==null?void 0:a[e]}Ph.exports=ky});var be=P((kD,Sh)=>{var zy=Eh(),Fy=bh();function Hy(a,e){var t=Fy(a,e);return zy(t)?t:void 0}Sh.exports=Hy});var Wt=P((zD,Ah)=>{var Ny=be(),Wy=me(),Gy=Ny(Wy,"Map");Ah.exports=Gy});var mt=P((FD,Mh)=>{var Uy=be(),By=Uy(Object,"create");Mh.exports=By});var Lh=P((HD,Dh)=>{var Ih=mt();function Vy(){this.__data__=Ih?Ih(null):{},this.size=0}Dh.exports=Vy});var Oh=P((ND,Rh)=>{function jy(a){var e=this.has(a)&&delete this.__data__[a];return this.size-=e?1:0,e}Rh.exports=jy});var zh=P((WD,kh)=>{var qy=mt(),Yy="__lodash_hash_undefined__",Zy=Object.prototype,Xy=Zy.hasOwnProperty;function Jy(a){var e=this.__data__;if(qy){var t=e[a];return t===Yy?void 0:t}return Xy.call(e,a)?e[a]:void 0}kh.exports=Jy});var Hh=P((GD,Fh)=>{var Ky=mt(),Qy=Object.prototype,$y=Qy.hasOwnProperty;function e0(a){var e=this.__data__;return Ky?e[a]!==void 0:$y.call(e,a)}Fh.exports=e0});var Wh=P((UD,Nh)=>{var t0=mt(),i0="__lodash_hash_undefined__";function r0(a,e){var t=this.__data__;return this.size+=this.has(a)?0:1,t[a]=t0&&e===void 0?i0:e,this}Nh.exports=r0});var Uh=P((BD,Gh)=>{var s0=Lh(),o0=Oh(),a0=zh(),n0=Hh(),l0=Wh();function Ve(a){var e=-1,t=a==null?0:a.length;for(this.clear();++e<t;){var r=a[e];this.set(r[0],r[1])}}Ve.prototype.clear=s0;Ve.prototype.delete=o0;Ve.prototype.get=a0;Ve.prototype.has=n0;Ve.prototype.set=l0;Gh.exports=Ve});var jh=P((VD,Vh)=>{var Bh=Uh(),h0=ct(),c0=Wt();function p0(){this.size=0,this.__data__={hash:new Bh,map:new(c0||h0),string:new Bh}}Vh.exports=p0});var Yh=P((jD,qh)=>{function d0(a){var e=typeof a;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?a!=="__proto__":a===null}qh.exports=d0});var ut=P((qD,Zh)=>{var m0=Yh();function u0(a,e){var t=a.__data__;return m0(e)?t[typeof e=="string"?"string":"hash"]:t.map}Zh.exports=u0});var Jh=P((YD,Xh)=>{var _0=ut();function f0(a){var e=_0(this,a).delete(a);return this.size-=e?1:0,e}Xh.exports=f0});var Qh=P((ZD,Kh)=>{var g0=ut();function y0(a){return g0(this,a).get(a)}Kh.exports=y0});var ec=P((XD,$h)=>{var v0=ut();function w0(a){return v0(this,a).has(a)}$h.exports=w0});var ic=P((JD,tc)=>{var C0=ut();function T0(a,e){var t=C0(this,a),r=t.size;return t.set(a,e),this.size+=t.size==r?0:1,this}tc.exports=T0});var sc=P((KD,rc)=>{var x0=jh(),E0=Jh(),P0=Qh(),b0=ec(),S0=ic();function je(a){var e=-1,t=a==null?0:a.length;for(this.clear();++e<t;){var r=a[e];this.set(r[0],r[1])}}je.prototype.clear=x0;je.prototype.delete=E0;je.prototype.get=P0;je.prototype.has=b0;je.prototype.set=S0;rc.exports=je});var ac=P((QD,oc)=>{var A0=ct(),M0=Wt(),I0=sc(),D0=200;function L0(a,e){var t=this.__data__;if(t instanceof A0){var r=t.__data__;if(!M0||r.length<D0-1)return r.push([a,e]),this.size=++t.size,this;t=this.__data__=new I0(r)}return t.set(a,e),this.size=t.size,this}oc.exports=L0});var lc=P(($D,nc)=>{var R0=ct(),O0=Jl(),k0=Ql(),z0=eh(),F0=ih(),H0=ac();function qe(a){var e=this.__data__=new R0(a);this.size=e.size}qe.prototype.clear=O0;qe.prototype.delete=k0;qe.prototype.get=z0;qe.prototype.has=F0;qe.prototype.set=H0;nc.exports=qe});var cc=P((eL,hc)=>{function N0(a,e){for(var t=-1,r=a==null?0:a.length;++t<r&&e(a[t],t,a)!==!1;);return a}hc.exports=N0});var dc=P((tL,pc)=>{var W0=be(),G0=function(){try{var a=W0(Object,"defineProperty");return a({},"",{}),a}catch{}}();pc.exports=G0});var gs=P((iL,uc)=>{var mc=dc();function U0(a,e,t){e=="__proto__"&&mc?mc(a,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):a[e]=t}uc.exports=U0});var ys=P((rL,_c)=>{var B0=gs(),V0=ds(),j0=Object.prototype,q0=j0.hasOwnProperty;function Y0(a,e,t){var r=a[e];(!(q0.call(a,e)&&V0(r,t))||t===void 0&&!(e in a))&&B0(a,e,t)}_c.exports=Y0});var _t=P((sL,fc)=>{var Z0=ys(),X0=gs();function J0(a,e,t,r){var s=!t;t||(t={});for(var o=-1,n=e.length;++o<n;){var l=e[o],h=r?r(t[l],a[l],l,t,a):void 0;h===void 0&&(h=a[l]),s?X0(t,l,h):Z0(t,l,h)}return t}fc.exports=J0});var yc=P((oL,gc)=>{function K0(a,e){for(var t=-1,r=Array(a);++t<a;)r[t]=e(t);return r}gc.exports=K0});var Ye=P((aL,vc)=>{function Q0(a){return a!=null&&typeof a=="object"}vc.exports=Q0});var Cc=P((nL,wc)=>{var $0=dt(),ev=Ye(),tv="[object Arguments]";function iv(a){return ev(a)&&$0(a)==tv}wc.exports=iv});var Pc=P((lL,Ec)=>{var Tc=Cc(),rv=Ye(),xc=Object.prototype,sv=xc.hasOwnProperty,ov=xc.propertyIsEnumerable,av=Tc(function(){return arguments}())?Tc:function(a){return rv(a)&&sv.call(a,"callee")&&!ov.call(a,"callee")};Ec.exports=av});var Gt=P((hL,bc)=>{var nv=Array.isArray;bc.exports=nv});var Ac=P((cL,Sc)=>{function lv(){return!1}Sc.exports=lv});var vs=P((ft,Ze)=>{var hv=me(),cv=Ac(),Dc=typeof ft=="object"&&ft&&!ft.nodeType&&ft,Mc=Dc&&typeof Ze=="object"&&Ze&&!Ze.nodeType&&Ze,pv=Mc&&Mc.exports===Dc,Ic=pv?hv.Buffer:void 0,dv=Ic?Ic.isBuffer:void 0,mv=dv||cv;Ze.exports=mv});var Rc=P((pL,Lc)=>{var uv=9007199254740991,_v=/^(?:0|[1-9]\d*)$/;function fv(a,e){var t=typeof a;return e=e==null?uv:e,!!e&&(t=="number"||t!="symbol"&&_v.test(a))&&a>-1&&a%1==0&&a<e}Lc.exports=fv});var ws=P((dL,Oc)=>{var gv=9007199254740991;function yv(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=gv}Oc.exports=yv});var zc=P((mL,kc)=>{var vv=dt(),wv=ws(),Cv=Ye(),Tv="[object Arguments]",xv="[object Array]",Ev="[object Boolean]",Pv="[object Date]",bv="[object Error]",Sv="[object Function]",Av="[object Map]",Mv="[object Number]",Iv="[object Object]",Dv="[object RegExp]",Lv="[object Set]",Rv="[object String]",Ov="[object WeakMap]",kv="[object ArrayBuffer]",zv="[object DataView]",Fv="[object Float32Array]",Hv="[object Float64Array]",Nv="[object Int8Array]",Wv="[object Int16Array]",Gv="[object Int32Array]",Uv="[object Uint8Array]",Bv="[object Uint8ClampedArray]",Vv="[object Uint16Array]",jv="[object Uint32Array]",G={};G[Fv]=G[Hv]=G[Nv]=G[Wv]=G[Gv]=G[Uv]=G[Bv]=G[Vv]=G[jv]=!0;G[Tv]=G[xv]=G[kv]=G[Ev]=G[zv]=G[Pv]=G[bv]=G[Sv]=G[Av]=G[Mv]=G[Iv]=G[Dv]=G[Lv]=G[Rv]=G[Ov]=!1;function qv(a){return Cv(a)&&wv(a.length)&&!!G[vv(a)]}kc.exports=qv});var Ut=P((uL,Fc)=>{function Yv(a){return function(e){return a(e)}}Fc.exports=Yv});var Bt=P((gt,Xe)=>{var Zv=ms(),Hc=typeof gt=="object"&&gt&&!gt.nodeType&&gt,yt=Hc&&typeof Xe=="object"&&Xe&&!Xe.nodeType&&Xe,Xv=yt&&yt.exports===Hc,Cs=Xv&&Zv.process,Jv=function(){try{var a=yt&&yt.require&&yt.require("util").types;return a||Cs&&Cs.binding&&Cs.binding("util")}catch{}}();Xe.exports=Jv});var Uc=P((_L,Gc)=>{var Kv=zc(),Qv=Ut(),Nc=Bt(),Wc=Nc&&Nc.isTypedArray,$v=Wc?Qv(Wc):Kv;Gc.exports=$v});var Ts=P((fL,Bc)=>{var ew=yc(),tw=Pc(),iw=Gt(),rw=vs(),sw=Rc(),ow=Uc(),aw=Object.prototype,nw=aw.hasOwnProperty;function lw(a,e){var t=iw(a),r=!t&&tw(a),s=!t&&!r&&rw(a),o=!t&&!r&&!s&&ow(a),n=t||r||s||o,l=n?ew(a.length,String):[],h=l.length;for(var c in a)(e||nw.call(a,c))&&!(n&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||sw(c,h)))&&l.push(c);return l}Bc.exports=lw});var Vt=P((gL,Vc)=>{var hw=Object.prototype;function cw(a){var e=a&&a.constructor,t=typeof e=="function"&&e.prototype||hw;return a===t}Vc.exports=cw});var xs=P((yL,jc)=>{function pw(a,e){return function(t){return a(e(t))}}jc.exports=pw});var Yc=P((vL,qc)=>{var dw=xs(),mw=dw(Object.keys,Object);qc.exports=mw});var Xc=P((wL,Zc)=>{var uw=Vt(),_w=Yc(),fw=Object.prototype,gw=fw.hasOwnProperty;function yw(a){if(!uw(a))return _w(a);var e=[];for(var t in Object(a))gw.call(a,t)&&t!="constructor"&&e.push(t);return e}Zc.exports=yw});var Es=P((CL,Jc)=>{var vw=us(),ww=ws();function Cw(a){return a!=null&&ww(a.length)&&!vw(a)}Jc.exports=Cw});var jt=P((TL,Kc)=>{var Tw=Ts(),xw=Xc(),Ew=Es();function Pw(a){return Ew(a)?Tw(a):xw(a)}Kc.exports=Pw});var $c=P((xL,Qc)=>{var bw=_t(),Sw=jt();function Aw(a,e){return a&&bw(e,Sw(e),a)}Qc.exports=Aw});var tp=P((EL,ep)=>{function Mw(a){var e=[];if(a!=null)for(var t in Object(a))e.push(t);return e}ep.exports=Mw});var rp=P((PL,ip)=>{var Iw=Be(),Dw=Vt(),Lw=tp(),Rw=Object.prototype,Ow=Rw.hasOwnProperty;function kw(a){if(!Iw(a))return Lw(a);var e=Dw(a),t=[];for(var r in a)r=="constructor"&&(e||!Ow.call(a,r))||t.push(r);return t}ip.exports=kw});var qt=P((bL,sp)=>{var zw=Ts(),Fw=rp(),Hw=Es();function Nw(a){return Hw(a)?zw(a,!0):Fw(a)}sp.exports=Nw});var ap=P((SL,op)=>{var Ww=_t(),Gw=qt();function Uw(a,e){return a&&Ww(e,Gw(e),a)}op.exports=Uw});var pp=P((vt,Je)=>{var Bw=me(),cp=typeof vt=="object"&&vt&&!vt.nodeType&&vt,np=cp&&typeof Je=="object"&&Je&&!Je.nodeType&&Je,Vw=np&&np.exports===cp,lp=Vw?Bw.Buffer:void 0,hp=lp?lp.allocUnsafe:void 0;function jw(a,e){if(e)return a.slice();var t=a.length,r=hp?hp(t):new a.constructor(t);return a.copy(r),r}Je.exports=jw});var mp=P((AL,dp)=>{function qw(a,e){var t=-1,r=a.length;for(e||(e=Array(r));++t<r;)e[t]=a[t];return e}dp.exports=qw});var _p=P((ML,up)=>{function Yw(a,e){for(var t=-1,r=a==null?0:a.length,s=0,o=[];++t<r;){var n=a[t];e(n,t,a)&&(o[s++]=n)}return o}up.exports=Yw});var Ps=P((IL,fp)=>{function Zw(){return[]}fp.exports=Zw});var Yt=P((DL,yp)=>{var Xw=_p(),Jw=Ps(),Kw=Object.prototype,Qw=Kw.propertyIsEnumerable,gp=Object.getOwnPropertySymbols,$w=gp?function(a){return a==null?[]:(a=Object(a),Xw(gp(a),function(e){return Qw.call(a,e)}))}:Jw;yp.exports=$w});var wp=P((LL,vp)=>{var eC=_t(),tC=Yt();function iC(a,e){return eC(a,tC(a),e)}vp.exports=iC});var bs=P((RL,Cp)=>{function rC(a,e){for(var t=-1,r=e.length,s=a.length;++t<r;)a[s+t]=e[t];return a}Cp.exports=rC});var Ss=P((OL,Tp)=>{var sC=xs(),oC=sC(Object.getPrototypeOf,Object);Tp.exports=oC});var As=P((kL,xp)=>{var aC=bs(),nC=Ss(),lC=Yt(),hC=Ps(),cC=Object.getOwnPropertySymbols,pC=cC?function(a){for(var e=[];a;)aC(e,lC(a)),a=nC(a);return e}:hC;xp.exports=pC});var Pp=P((zL,Ep)=>{var dC=_t(),mC=As();function uC(a,e){return dC(a,mC(a),e)}Ep.exports=uC});var Ms=P((FL,bp)=>{var _C=bs(),fC=Gt();function gC(a,e,t){var r=e(a);return fC(a)?r:_C(r,t(a))}bp.exports=gC});var Ap=P((HL,Sp)=>{var yC=Ms(),vC=Yt(),wC=jt();function CC(a){return yC(a,wC,vC)}Sp.exports=CC});var Ip=P((NL,Mp)=>{var TC=Ms(),xC=As(),EC=qt();function PC(a){return TC(a,EC,xC)}Mp.exports=PC});var Lp=P((WL,Dp)=>{var bC=be(),SC=me(),AC=bC(SC,"DataView");Dp.exports=AC});var Op=P((GL,Rp)=>{var MC=be(),IC=me(),DC=MC(IC,"Promise");Rp.exports=DC});var zp=P((UL,kp)=>{var LC=be(),RC=me(),OC=LC(RC,"Set");kp.exports=OC});var Hp=P((BL,Fp)=>{var kC=be(),zC=me(),FC=kC(zC,"WeakMap");Fp.exports=FC});var Zt=P((VL,jp)=>{var Is=Lp(),Ds=Wt(),Ls=Op(),Rs=zp(),Os=Hp(),Vp=dt(),Ke=fs(),Np="[object Map]",HC="[object Object]",Wp="[object Promise]",Gp="[object Set]",Up="[object WeakMap]",Bp="[object DataView]",NC=Ke(Is),WC=Ke(Ds),GC=Ke(Ls),UC=Ke(Rs),BC=Ke(Os),ze=Vp;(Is&&ze(new Is(new ArrayBuffer(1)))!=Bp||Ds&&ze(new Ds)!=Np||Ls&&ze(Ls.resolve())!=Wp||Rs&&ze(new Rs)!=Gp||Os&&ze(new Os)!=Up)&&(ze=function(a){var e=Vp(a),t=e==HC?a.constructor:void 0,r=t?Ke(t):"";if(r)switch(r){case NC:return Bp;case WC:return Np;case GC:return Wp;case UC:return Gp;case BC:return Up}return e});jp.exports=ze});var Yp=P((jL,qp)=>{var VC=Object.prototype,jC=VC.hasOwnProperty;function qC(a){var e=a.length,t=new a.constructor(e);return e&&typeof a[0]=="string"&&jC.call(a,"index")&&(t.index=a.index,t.input=a.input),t}qp.exports=qC});var Xp=P((qL,Zp)=>{var YC=me(),ZC=YC.Uint8Array;Zp.exports=ZC});var Xt=P((YL,Kp)=>{var Jp=Xp();function XC(a){var e=new a.constructor(a.byteLength);return new Jp(e).set(new Jp(a)),e}Kp.exports=XC});var $p=P((ZL,Qp)=>{var JC=Xt();function KC(a,e){var t=e?JC(a.buffer):a.buffer;return new a.constructor(t,a.byteOffset,a.byteLength)}Qp.exports=KC});var td=P((XL,ed)=>{var QC=/\w*$/;function $C(a){var e=new a.constructor(a.source,QC.exec(a));return e.lastIndex=a.lastIndex,e}ed.exports=$C});var ad=P((JL,od)=>{var id=Nt(),rd=id?id.prototype:void 0,sd=rd?rd.valueOf:void 0;function eT(a){return sd?Object(sd.call(a)):{}}od.exports=eT});var ld=P((KL,nd)=>{var tT=Xt();function iT(a,e){var t=e?tT(a.buffer):a.buffer;return new a.constructor(t,a.byteOffset,a.length)}nd.exports=iT});var cd=P((QL,hd)=>{var rT=Xt(),sT=$p(),oT=td(),aT=ad(),nT=ld(),lT="[object Boolean]",hT="[object Date]",cT="[object Map]",pT="[object Number]",dT="[object RegExp]",mT="[object Set]",uT="[object String]",_T="[object Symbol]",fT="[object ArrayBuffer]",gT="[object DataView]",yT="[object Float32Array]",vT="[object Float64Array]",wT="[object Int8Array]",CT="[object Int16Array]",TT="[object Int32Array]",xT="[object Uint8Array]",ET="[object Uint8ClampedArray]",PT="[object Uint16Array]",bT="[object Uint32Array]";function ST(a,e,t){var r=a.constructor;switch(e){case fT:return rT(a);case lT:case hT:return new r(+a);case gT:return sT(a,t);case yT:case vT:case wT:case CT:case TT:case xT:case ET:case PT:case bT:return nT(a,t);case cT:return new r;case pT:case uT:return new r(a);case dT:return oT(a);case mT:return new r;case _T:return aT(a)}}hd.exports=ST});var md=P(($L,dd)=>{var AT=Be(),pd=Object.create,MT=function(){function a(){}return function(e){if(!AT(e))return{};if(pd)return pd(e);a.prototype=e;var t=new a;return a.prototype=void 0,t}}();dd.exports=MT});var _d=P((e3,ud)=>{var IT=md(),DT=Ss(),LT=Vt();function RT(a){return typeof a.constructor=="function"&&!LT(a)?IT(DT(a)):{}}ud.exports=RT});var gd=P((t3,fd)=>{var OT=Zt(),kT=Ye(),zT="[object Map]";function FT(a){return kT(a)&&OT(a)==zT}fd.exports=FT});var Cd=P((i3,wd)=>{var HT=gd(),NT=Ut(),yd=Bt(),vd=yd&&yd.isMap,WT=vd?NT(vd):HT;wd.exports=WT});var xd=P((r3,Td)=>{var GT=Zt(),UT=Ye(),BT="[object Set]";function VT(a){return UT(a)&&GT(a)==BT}Td.exports=VT});var Sd=P((s3,bd)=>{var jT=xd(),qT=Ut(),Ed=Bt(),Pd=Ed&&Ed.isSet,YT=Pd?qT(Pd):jT;bd.exports=YT});var Ld=P((o3,Dd)=>{var ZT=lc(),XT=cc(),JT=ys(),KT=$c(),QT=ap(),$T=pp(),ex=mp(),tx=wp(),ix=Pp(),rx=Ap(),sx=Ip(),ox=Zt(),ax=Yp(),nx=cd(),lx=_d(),hx=Gt(),cx=vs(),px=Cd(),dx=Be(),mx=Sd(),ux=jt(),_x=qt(),fx=1,gx=2,yx=4,Ad="[object Arguments]",vx="[object Array]",wx="[object Boolean]",Cx="[object Date]",Tx="[object Error]",Md="[object Function]",xx="[object GeneratorFunction]",Ex="[object Map]",Px="[object Number]",Id="[object Object]",bx="[object RegExp]",Sx="[object Set]",Ax="[object String]",Mx="[object Symbol]",Ix="[object WeakMap]",Dx="[object ArrayBuffer]",Lx="[object DataView]",Rx="[object Float32Array]",Ox="[object Float64Array]",kx="[object Int8Array]",zx="[object Int16Array]",Fx="[object Int32Array]",Hx="[object Uint8Array]",Nx="[object Uint8ClampedArray]",Wx="[object Uint16Array]",Gx="[object Uint32Array]",W={};W[Ad]=W[vx]=W[Dx]=W[Lx]=W[wx]=W[Cx]=W[Rx]=W[Ox]=W[kx]=W[zx]=W[Fx]=W[Ex]=W[Px]=W[Id]=W[bx]=W[Sx]=W[Ax]=W[Mx]=W[Hx]=W[Nx]=W[Wx]=W[Gx]=!0;W[Tx]=W[Md]=W[Ix]=!1;function Jt(a,e,t,r,s,o){var n,l=e&fx,h=e&gx,c=e&yx;if(t&&(n=s?t(a,r,s,o):t(a)),n!==void 0)return n;if(!dx(a))return a;var p=hx(a);if(p){if(n=ax(a),!l)return ex(a,n)}else{var _=ox(a),w=_==Md||_==xx;if(cx(a))return $T(a,l);if(_==Id||_==Ad||w&&!s){if(n=h||w?{}:lx(a),!l)return h?ix(a,QT(n,a)):tx(a,KT(n,a))}else{if(!W[_])return s?a:{};n=nx(a,_,l)}}o||(o=new ZT);var g=o.get(a);if(g)return g;o.set(a,n),mx(a)?a.forEach(function(T){n.add(Jt(T,e,t,T,a,o))}):px(a)&&a.forEach(function(T,b){n.set(b,Jt(T,e,t,b,a,o))});var d=c?h?sx:rx:h?_x:ux,E=p?void 0:d(a);return XT(E||a,function(T,b){E&&(b=T,T=a[b]),JT(n,b,Jt(T,e,t,b,a,o))}),n}Dd.exports=Jt});var Od=P((a3,Rd)=>{var Ux=Ld(),Bx=1,Vx=4;function jx(a){return Ux(a,Bx|Vx)}Rd.exports=jx});var Qn={};function ge(a,e){Qn[a]=e}function oe(a){return Qn[a]}var $n={};function St(a,e){$n[a]=e}function At(a){return $n[a]}var cg={},ot=cg;import{Cesium as i,Supercluster as Yi}from"@gmgis/gm-common";ge("Cesium",i);ge("Supercluster",Yi);var pg="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Zi=class{static uuid(e="D"){let t=[];t[8]=t[13]=t[18]=t[23]="-",t[14]="4";let r;for(let s=0;s<36;s++)t[s]||(r=0|Math.random()*16,t[s]=pg[s===19?r&3|8:r]);return e+"-"+t.join("")}static merge(e,...t){let r,s,o,n;for(s=0,o=t.length;s<o;s++){n=t[s];for(r in n)e[r]=n[r]}return e}static splitWords(e){return this.trim(e).split(/\s+/)}static setOptions(e,t){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let r in t)e.options[r]=t[r];return e.options}static formatNum(e,t){let r=Math.pow(10,t===void 0?6:t);return Math.round(e*r)/r}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static emptyImageUrl(){return function(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}()}static checkPosition(e){return e&&e.hasOwnProperty("_lng")&&e.hasOwnProperty("_lat")&&e.hasOwnProperty("_alt")}static debounce(e,t){let r=null;return function(){r&&clearTimeout(r),r=setTimeout(e,t)}}static throttle(e,t){let r=!0;return function(){if(!r)return!1;r=!1,setTimeout(()=>{e(),r=!0},t)}}static dataURLtoBlob(e){let t=e.split(","),r=t[0].match(/:(.*?);/)[1],s=atob(t[1]),o=s.length,n=new Uint8Array(o);for(;o--;)n[o]=s.charCodeAt(o);return new Blob([n],{type:r})}static isPromise(e){return Promise.resolve(e)==e}},v=Zi;var Xi=class{static get(e){return typeof e=="string"?document.getElementById(e):e}static getStyle(e,t){let r=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!r||r==="auto")&&document.defaultView){let s=document.defaultView.getComputedStyle(e,null);r=s?s[t]:null}return r==="auto"?null:r}static create(e,t,r=null){let s=document.createElement(e);return s.className=t||"",r&&r.appendChild(s),s}static remove(e){let t=e.parentNode;t&&t.removeChild(e)}static empty(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,t){if(e.classList!==void 0)return e.classList.contains(t);let r=this.getClass(e);return r.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(r)}static addClass(e,t){if(e.classList!==void 0){let r=v.splitWords(t);for(let s=0,o=r.length;s<o;s++)e.classList.add(r[s])}else if(!this.hasClass(e,t)){let r=this.getClass(e);this.setClass(e,(r?r+" ":"")+t)}}static removeClass(e,t){e.classList!==void 0?e.classList.remove(t):this.setClass(e,v.trim((" "+this.getClass(e)+" ").replace(" "+t+" "," ")))}static setClass(e,t){e.className.baseVal===void 0?e.className=t:e.className.baseVal=t}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}static createSvg(e,t,r,s){let o=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");o.setAttribute("class","svg-path"),o.setAttribute("width",e),o.setAttribute("height",t),o.setAttribute("viewBox",`0 0 ${e} ${t}`);let n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",r),o.appendChild(n),s&&s.appendChild(o),o}static parseDom(e,t,r){t=t!=null?t:!1;let s=document.createElement("div");return s.className=r||"",s.innerHTML=e,t?s:s.childNodes}static enterFullscreen(e){e&&(e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen())}static exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}static createVideo(e,t,r=null){let s=this.create("video",t,r),o=this.create("source","",s);o.setAttribute("src",e),o.setAttribute("type","video/map4");let n=this.create("source","",s);return n.setAttribute("src",e),n.setAttribute("type","video/quicktime"),s}},A=Xi;var Ji=Math.PI*2,Mt=100,Ki=1e-4,Qi=class{static distance(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}static wholeDistance(e){let t=0;for(let r=0;r<e.length-1;r++)t+=this.distance(e[r],e[r+1]);return t}static getBaseLength(e){return Math.pow(this.wholeDistance(e),.99)}static mid(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}static getCircleCenterOfThreePoints(e,t,r){let s=[(e[0]+t[0])/2,(e[1]+t[1])/2],o=[s[0]-e[1]+t[1],s[1]+e[0]-t[0]],n=[(e[0]+r[0])/2,(e[1]+r[1])/2],l=[n[0]-e[1]+r[1],n[1]+e[0]-r[0]];return this.getIntersectPoint(s,o,n,l)}static getIntersectPoint(e,t,r,s){let o,n,l,h;return e[1]===t[1]?(l=(s[0]-r[0])/(s[1]-r[1]),o=l*(e[1]-r[1])+r[0],n=e[1],[o,n]):r[1]===s[1]?(h=(t[0]-e[0])/(t[1]-e[1]),o=h*(r[1]-e[1])+e[0],n=r[1],[o,n]):(h=(t[0]-e[0])/(t[1]-e[1]),l=(s[0]-r[0])/(s[1]-r[1]),n=(h*e[1]-e[0]-l*r[1]+r[0])/(h-l),o=h*n-h*e[1]+e[0],[o,n])}static getAzimuth(e,t){let r,s=Math.asin(Math.abs(t[1]-e[1])/this.distance(e,t));return t[1]>=e[1]&&t[0]>=e[0]?r=s+Math.PI:t[1]>=e[1]&&t[0]<e[0]?r=Ji-s:t[1]<e[1]&&t[0]<e[0]?r=s:t[1]<e[1]&&t[0]>=e[0]&&(r=Math.PI-s),r}static getAngleOfThreePoints(e,t,r){let s=this.getAzimuth(t,e)-this.getAzimuth(t,r);return s<0?s+Ji:s}static isClockWise(e,t,r){return(r[1]-e[1])*(t[0]-e[0])>(t[1]-e[1])*(r[0]-e[0])}static getPointOnLine(e,t,r){let s=t[0]+e*(r[0]-t[0]),o=t[1]+e*(r[1]-t[1]);return[s,o]}static getCubicValue(e,t,r,s,o){e=Math.max(Math.min(e,1),0);let n=1-e,l=e*e,h=l*e,c=n*n,p=c*n,_=p*t[0]+3*c*e*r[0]+3*n*l*s[0]+h*o[0],w=p*t[1]+3*c*e*r[1]+3*n*l*s[1]+h*o[1];return[_,w]}static getThirdPoint(e,t,r,s,o){let n=this.getAzimuth(e,t),l=o?n+r:n-r,h=s*Math.cos(l),c=s*Math.sin(l);return[t[0]+h,t[1]+c]}static getArcPoints(e,t,r,s){let o,n,l=[],h=s-r;h=h<0?h+Ji:h;for(let c=0;c<=Mt;c++){let p=r+h*c/Mt;o=e[0]+t*Math.cos(p),n=e[1]+t*Math.sin(p),l.push([o,n])}return l}static getBisectorNormals(e,t,r,s){let o=this.getNormal(t,r,s),n=Math.sqrt(o[0]*o[0]+o[1]*o[1]),l=o[0]/n,h=o[1]/n,c=this.distance(t,r),p=this.distance(r,s),_,w,g,d,E;return n>Ki?this.isClockWise(t,r,s)?(_=e*c,w=r[0]-_*h,g=r[1]+_*l,E=[w,g],_=e*p,w=r[0]+_*h,g=r[1]-_*l,d=[w,g]):(_=e*c,w=r[0]+_*h,g=r[1]-_*l,E=[w,g],_=e*p,w=r[0]-_*h,g=r[1]+_*l,d=[w,g]):(w=r[0]+e*(t[0]-r[0]),g=r[1]+e*(t[1]-r[1]),E=[w,g],w=r[0]+e*(s[0]-r[0]),g=r[1]+e*(s[1]-r[1]),d=[w,g]),[E,d]}static getNormal(e,t,r){let s=e[0]-t[0],o=e[1]-t[1],n=Math.sqrt(s*s+o*o);s/=n,o/=n;let l=r[0]-t[0],h=r[1]-t[1],c=Math.sqrt(l*l+h*h);l/=c,h/=c;let p=s+l,_=o+h;return[p,_]}static getCurvePoints(e,t){let s=[this.getLeftMostControlPoint(e,t)],o,n,l,h;for(let _=0;_<t.length-2;_++)o=t[_],n=t[_+1],l=t[_+2],h=this.getBisectorNormals(e,o,n,l),s=s.concat(h);let c=this.getRightMostControlPoint(e,t);s.push(c);let p=[];for(let _=0;_<t.length-1;_++){o=t[_],n=t[_+1],p.push(o);for(let w=0;w<Mt;w++){let g=this.getCubicValue(w/Mt,o,s[_*2],s[_*2+1],n);p.push(g)}p.push(n)}return p}static getLeftMostControlPoint(e,t){let r=t[0],s=t[1],o=t[2],l=this.getBisectorNormals(0,r,s,o)[0],h=this.getNormal(r,s,o),c=Math.sqrt(h[0]*h[0]+h[1]*h[1]),p,_;if(c>Ki){let w=this.mid(r,s),g=r[0]-w[0],d=r[1]-w[1],T=2/this.distance(r,s),b=-T*d,M=T*g,N=b*b-M*M,F=2*b*M,B=M*M-b*b,re=l[0]-w[0],de=l[1]-w[1];p=w[0]+N*re+F*de,_=w[1]+F*re+B*de}else p=r[0]+e*(s[0]-r[0]),_=r[1]+e*(s[1]-r[1]);return[p,_]}static getRightMostControlPoint(e,t){let r=t.length,s=t[r-3],o=t[r-2],n=t[r-1],h=this.getBisectorNormals(0,s,o,n)[1],c=this.getNormal(s,o,n),p=Math.sqrt(c[0]*c[0]+c[1]*c[1]),_,w;if(p>Ki){let g=this.mid(o,n),d=n[0]-g[0],E=n[1]-g[1],b=2/this.distance(o,n),M=-b*E,N=b*d,F=M*M-N*N,B=2*M*N,re=N*N-M*M,de=h[0]-g[0],Z=h[1]-g[1];_=g[0]+F*de+B*Z,w=g[1]+B*de+re*Z}else _=n[0]+e*(o[0]-n[0]),w=n[1]+e*(o[1]-n[1]);return[_,w]}static getBezierPoints(e){if(e.length<=2)return e;let t=[],r=e.length-1;for(let s=0;s<=1;s+=.01){let o=0,n=0;for(let l=0;l<=r;l++){let h=this.getBinomialFactor(r,l),c=Math.pow(s,l),p=Math.pow(1-s,r-l);o+=h*c*p*e[l][0],n+=h*c*p*e[l][1]}t.push([o,n])}return t.push(e[r]),t}static getBinomialFactor(e,t){return this.getFactorial(e)/(this.getFactorial(t)*this.getFactorial(e-t))}static getFactorial(e){if(e<=1)return 1;if(e===2)return 2;if(e===3)return 6;if(e===4)return 24;if(e===5)return 120;let t=1;for(let r=1;r<=e;r++)t*=r;return t}static getQBSplinePoints(e){if(e.length<=2)return e;let t=2,r=[],s=e.length-t-1;r.push(e[0]);for(let o=0;o<=s;o++)for(let n=0;n<=1;n+=.05){let l=0,h=0;for(let c=0;c<=t;c++){let p=this.getQuadricBSplineFactor(c,n);l+=p*e[o+c][0],h+=p*e[o+c][1]}r.push([l,h])}return r.push(e[e.length-1]),r}static getQuadricBSplineFactor(e,t){return e===0?Math.pow(t-1,2)/2:e===1?(-2*Math.pow(t,2)+2*t+1)/2:e===2?Math.pow(t,2)/2:0}},C=Qi;var dg={INITIALIZED:"initialized",ADDED:"added",REMOVED:"removed",CLEARED:"cleared",INSTALLED:"installed",ENABLED:"enabled",DISABLED:"disabled",PLAY:"play",PAUSE:"pause",RESTORE:"restore"},m=dg;var at={ADD:"add",REMOVE:"remove"},R={LEFT_DOWN:i.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.ScreenSpaceEventType.LEFT_UP,CLICK:i.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:i.ScreenSpaceEventType.WHEEL,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout"},el={ADD_LAYER:"addLayer",REMOVE_LAYER:"removeLayer",ADD_EFFECT:"addEffect",REMOVE_EFFECT:"removeEffect",LEFT_DOWN:i.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.ScreenSpaceEventType.LEFT_UP,CLICK:i.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:i.ScreenSpaceEventType.WHEEL},D={CAMERA_MOVE_END:"cameraMoveEnd",CAMERA_CHANGED:"cameraChanged",PRE_UPDATE:"preUpdate",POST_UPDATE:"postUpdate",PRE_RENDER:"preRender",POST_RENDER:"postRender",MORPH_COMPLETE:"morphComplete",CLOCK_TICK:"clockTick",RENDER_ERROR:"renderError"},xe={...at,LEFT_DOWN:i.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.ScreenSpaceEventType.LEFT_UP,CLICK:i.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.ScreenSpaceEventType.MOUSE_MOVE,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",POSITION_UPDATE:"positionUpdate"},ke={READY:"ready",TEX_READY:"texturesReady"},K={INITIAL_TILES_LOADED:"initialTilesLoaded",ALL_TILES_LOADED:"allTilesLoaded ",LOAD_PROGRESS:"loadProgress ",TILE_FAILED:"tileFailed ",TILE_LOAD:"tileLoad",TILE_UNLOAD:"tileUnload",TILE_VISIBLE:"tileVisible"},Ee=at,Pe={...at,LEFT_DOWN:i.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.ScreenSpaceEventType.LEFT_UP,CLICK:i.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.ScreenSpaceEventType.LEFT_DOUBLE_CLICK},ae={...at,POST_RENDER:"postRender",ACTIVATE:"activate",DEACTIVATE:"deactivate",RESET_TIME_LINE:"restTimeLine"},ne={...at,POST_RENDER:"postRender",RESET_TIME_LINE:"restTimeLine"},x={DRAW_START:"drawStart",DRAW_STOP:"drawStop",EDIT_START:"editStart",EDIT_STOP:"editEnd",DRAW_ANCHOR:"drawAnchor",CREATE_ANCHOR:"createAnchor",UPDATE_ANCHOR:"updateAnchor",ANCHOR_MOVING:"anchorMoving",EDIT_ANCHOR_STOP:"editAnchorStop",CLEAR_ANCHOR:"clearAnchor"};var $i=class{constructor(e){this._types=e,this._cache={}}_on(e,t,r){let s=this.getEvent(e),o;return s&&t&&(o=s.addEventListener(t,r||this)),o}_off(e,t,r){let s=this.getEvent(e),o=!1;return s&&t&&(o=s.removeEventListener(t,r||this)),o}_fire(e,t){let r=this.getEvent(e);r&&r.raiseEvent(t)}_registerEvent(){Object.keys(this._types).forEach(e=>{let t=this._types[e];this._cache[t]=new i.Event})}on(e,t,r){return this._on(e,t,r)}once(e,t,r){let s=this._on(e,o=>{t(o),s&&s()},r)}off(e,t,r){return this._off(e,t,r)}fire(e,t){this._fire(e,t)}getEvent(e){return this._cache[e]||void 0}},V=$i;var er=class extends V{constructor(e,t={}){super(R),this._viewer=e,this._selected=void 0,this._enableEventPropagation=t.enableEventPropagation,this._enableMouseOver=t.enableMouseOver,this._registerEvent(),this._addDefaultEvent()}_registerEvent(){let e=new i.ScreenSpaceEventHandler(this._viewer.canvas);Object.keys(i.ScreenSpaceEventType).forEach(t=>{let r=i.ScreenSpaceEventType[t];this._cache[r]=new i.Event,e.setInputAction(s=>{this._cache[r].raiseEvent(s)},r)})}_addDefaultEvent(){this.on(this._types.LEFT_DOWN,this._leftDownHandler,this),this.on(this._types.LEFT_UP,this._leftUpHandler,this),this.on(this._types.CLICK,this._clickHandler,this),this.on(this._types.DB_CLICK,this._dbClickHandler,this),this.on(this._types.RIGHT_DOWN,this._rightDownHandler,this),this.on(this._types.RIGHT_UP,this._rightUpHandler,this),this.on(this._types.RIGHT_CLICK,this._rightClickHandler,this),this.on(this._types.MOUSE_MOVE,this._mouseMoveHandler,this),this.on(this._types.WHEEL,this._mouseWheelHandler,this)}_adjustPosition(e){let t=this._viewer.container.getBoundingClientRect(),r=t.width/this._viewer.container.offsetWidth,s=t.height/this._viewer.container.offsetHeight,o=window.devicePixelRatio,n=e.x/r/o,l=e.y/s/o;return new i.Cartesian2(n,l)}_getMouseInfo(e){let t=this._viewer.scene,r=t.pick(e),s,o,n,l;if(t.pickPositionSupported&&(s=t.pickPosition(e)),s){let h=i.Ellipsoid.WGS84.cartesianToCartographic(s);h&&(n={lng:i.Math.toDegrees(h.longitude),lat:i.Math.toDegrees(h.latitude),alt:h.height})}if(t.mode===i.SceneMode.SCENE3D&&!(this._viewer.terrainProvider instanceof i.EllipsoidTerrainProvider)){let h=t.camera.getPickRay(e);o=t.globe.pick(h,t)}else o=t.camera.pickEllipsoid(e,i.Ellipsoid.WGS84);if(o){let h=i.Ellipsoid.WGS84.cartesianToCartographic(o);h&&(l={lng:i.Math.toDegrees(h.longitude),lat:i.Math.toDegrees(h.latitude),alt:h.height})}return{target:r,windowPosition:e,position:s,wgs84Position:n,surfacePosition:o,wgs84SurfacePosition:l}}_getDrillInfos(e){let t=[],s=this._viewer.scene.drillPick(e);return s&&s.length&&s.forEach(o=>{t.push(this._getTargetInfo(o))}),t}_getOverlayId(e){let t;return(e==null?void 0:e.id)instanceof i.Entity?t=e.id.overlayId:e instanceof i.Cesium3DTileFeature?t=e.tileset.overlayId:((e==null?void 0:e.primitive)instanceof i.Cesium3DTileset||e!=null&&e.primitive)&&(t=e.primitive.overlayId),t}_getTargetInfo(e){let t,r,s;return(e==null?void 0:e.id)instanceof i.Entity?(r=this._viewer.getLayers().filter(o=>o.layerId===e.id.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.id.overlayId))):e instanceof i.Cesium3DTileFeature?(r=this._viewer.getLayers().filter(o=>o.layerId===e.tileset.layerId)[0],s=e,r!=null&&r.getOverlay&&(t=r.getOverlay(e.tileset.overlayId),s&&s.getPropertyNames&&s.getPropertyNames().forEach(n=>{t.attr[n]=s.getProperty(n)}))):(e==null?void 0:e.primitive)instanceof i.Cesium3DTileset?(r=this._viewer.getLayers().filter(o=>o.layerId===e.primitive.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.primitive.overlayId))):e!=null&&e.primitive&&(r=this._viewer.getLayers().filter(o=>o.layerId===e.primitive.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.primitive.overlayId))),{layer:r,overlay:t,feature:s,instanceId:e==null?void 0:e.instanceId}}_raiseEvent(e,t={}){var l;let r,s=this._getTargetInfo(t.target),o=s==null?void 0:s.overlay,n=s==null?void 0:s.layer;o!=null&&o.overlayEvent&&(r=o.overlayEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),(!r||r.numberOfListeners===0||this._eventPropagation)&&(n!=null&&n.layerEvent)&&(r=n.layerEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),(!r||r.numberOfListeners===0||this._enableEventPropagation)&&((l=this._viewer)!=null&&l.viewerEvent)&&(r=this._viewer.viewerEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),o!=null&&o.allowDrillPicking&&this._getDrillInfos(t.windowPosition).forEach(c=>{let p=c==null?void 0:c.overlay,_=c==null?void 0:c.layer;(p==null?void 0:p.overlayId)!==o.overlayId&&(p!=null&&p.overlayEvent)&&(r=p.overlayEvent.getEvent(e),(!r||r.numberOfListeners===0)&&(_!=null&&_.layerEvent)&&(r=_.layerEvent.getEvent(e)),r&&r.numberOfListeners>0&&r.raiseEvent({...c,...t}))})}_clickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.CLICK,this._getMouseInfo(e.position))}_dbClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.DB_CLICK,this._getMouseInfo(e.position))}_rightClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.RIGHT_CLICK,this._getMouseInfo(e.position))}_mouseMoveHandler(e){if(!(e!=null&&e.endPosition))return!1;let t=this._getMouseInfo(e.endPosition);this._viewer.canvas.style.cursor=t.target?"pointer":"default",this._raiseEvent(R.MOUSE_MOVE,t),this._enableMouseOver&&(!this._selected||this._getOverlayId(this._selected.target)!==this._getOverlayId(t.target))&&(this._raiseEvent(R.MOUSE_OUT,this._selected),this._raiseEvent(R.MOUSE_OVER,t),this._selected=t)}_leftDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.LEFT_DOWN,this._getMouseInfo(e.position))}_leftUpHandler(e){this._raiseEvent(R.LEFT_UP,this._getMouseInfo(e.position))}_rightDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.RIGHT_DOWN,this._getMouseInfo(e.position))}_rightUpHandler(e){this._raiseEvent(R.RIGHT_UP,this._getMouseInfo(e.position))}_mouseWheelHandler(e){this._raiseEvent(R.WHEEL,{movement:e})}},tr=er;var ir=class extends V{constructor(){super(el),this._registerEvent()}},rr=ir;var sr=class extends V{constructor(e){super(D),this._camera=e.camera,this._scene=e.scene,this._clock=e.clock}on(e,t,r){let s;switch(e){case D.CAMERA_MOVE_END:s=this._camera.moveEnd.addEventListener(t,r||this);break;case D.CAMERA_CHANGED:s=this._camera.changed.addEventListener(t,r||this);break;case D.PRE_UPDATE:s=this._scene.preUpdate.addEventListener(t,r||this);break;case D.POST_UPDATE:s=this._scene.postUpdate.addEventListener(t,r||this);break;case D.PRE_RENDER:s=this._scene.preRender.addEventListener(t,r||this);break;case D.POST_RENDER:s=this._scene.postRender.addEventListener(t,r||this);break;case D.MORPH_COMPLETE:s=this._scene.morphComplete.addEventListener(t,r||this);break;case D.CLOCK_TICK:s=this._clock.onTick.addEventListener(t,r||this);break;case D.RENDER_ERROR:s=this._scene.renderError.addEventListener(t,r||this);break;default:break}return s}off(e,t,r){let s=!1;switch(e){case D.CAMERA_MOVE_END:s=this._camera.moveEnd.removeEventListener(t,r||this);break;case D.CAMERA_CHANGED:s=this._camera.changed.removeEventListener(t,r||this);break;case D.PRE_UPDATE:s=this._scene.preUpdate.removeEventListener(t,r||this);break;case D.POST_UPDATE:s=this._scene.postUpdate.removeEventListener(t,r||this);break;case D.PRE_RENDER:s=this._scene.preRender.removeEventListener(t,r||this);break;case D.POST_RENDER:s=this._scene.postRender.removeEventListener(t,r||this);break;case D.MORPH_COMPLETE:s=this._scene.morphComplete.removeEventListener(t,r||this);break;case D.CLOCK_TICK:s=this._clock.onTick.removeEventListener(t,r||this);break;case D.RENDER_ERROR:s=this._scene.renderError.removeEventListener(t,r||this);break;default:break}return s}},or=sr;var ar=class extends V{constructor(){super(Ee),this._registerEvent()}},nr=ar;var lr=class extends V{constructor(){super(Pe),this._registerEvent()}},hr=lr;var cr=class extends V{constructor(){super(xe),this._registerEvent()}},pr=cr;var dr=class extends V{constructor(e){super(K),this._tileset=e}on(e,t,r){return this._tileset.then(s=>{switch(e){case K.INITIAL_TILES_LOADED:s.initialTilesLoaded.addEventListener(t,r||this);break;case K.ALL_TILES_LOADED:s.allTilesLoaded.addEventListener(t,r||this);break;case K.LOAD_PROGRESS:s.loadProgress.addEventListener(t,r||this);break;case K.TILE_FAILED:s.tileFailed.addEventListener(t,r||this);break;case K.TILE_LOAD:s.tileLoad.addEventListener(t,r||this);break;case K.TILE_UNLOAD:s.tileUnload.addEventListener(t,r||this);break;case K.TILE_VISIBLE:s.tileVisible.addEventListener(t,r||this);break;default:break}}),null}off(e,t,r){return this._tileset.then(s=>{switch(e){case K.INITIAL_TILES_LOADED:s.initialTilesLoaded.removeEventListener(t,r||this);break;case K.ALL_TILES_LOADED:s.allTilesLoaded.removeEventListener(t,r||this);break;case K.LOAD_PROGRESS:s.loadProgress.removeEventListener(t,r||this);break;case K.TILE_FAILED:s.tileFailed.removeEventListener(t,r||this);break;case K.TILE_LOAD:s.tileLoad.removeEventListener(t,r||this);break;case K.TILE_UNLOAD:s.tileUnload.removeEventListener(t,r||this);break;case K.TILE_VISIBLE:s.tileVisible.removeEventListener(t,r||this);break;default:break}}),!0}},mr=dr;var ur=class extends V{constructor(e){super(ke),this._model=e}on(e,t,r){return this._model.then(s=>{switch(e){case ke.READY:s.readyEvent.addEventListener(t,r||this);break;case ke.TEX_READY:s.texturesReadyEvent.addEventListener(t,r||this);break;default:break}}),null}off(e,t,r){return this._model.then(s=>{switch(e){case ke.READY:s.readyEvent.removeEventListener(t,r||this);break;case ke.TEX_READY:s.texturesReadyEvent.removeEventListener(t,r||this);break;default:break}}),!0}},_r=ur;var fr=class extends V{constructor(){super(ae),this._registerEvent()}},gr=fr;var yr=class extends V{constructor(){super(ne),this._registerEvent()}},vr=yr;var wr=class extends V{constructor(){super(x),this._registerEvent()}},nt=wr;var Cr=class{constructor(e){this._id=v.uuid(),this._bid=e||v.uuid(),this._delegate=void 0,this._viewer=void 0,this._state=void 0,this._show=!0,this._isGround=!1,this._cache={},this._attr={},this._layerEvent=new hr,this._layerEvent.on(Pe.ADD,this._onAdd,this),this._layerEvent.on(Pe.REMOVE,this._onRemove,this)}get layerId(){return this._id}get id(){return this._bid}get delegate(){return this._delegate}set show(e){this._show=e,this._delegate&&(this._delegate.show=this._show)}get show(){return this._show}get layerEvent(){return this._layerEvent}set attr(e){this._attr=e}get attr(){return this._attr}get state(){return this._state}_addedHook(){}_removedHook(){}_onAdd(e){this._viewer=e,this._delegate&&(this._delegate instanceof i.PrimitiveCollection?this._isGround?this._viewer.scene.groundPrimitives.add(this._delegate):this._viewer.scene.primitives.add(this._delegate):this._delegate instanceof i.ImageryLayer?this._viewer.imageryLayers.add(this._delegate):this._viewer.dataSources.add(this._delegate),this._addedHook&&this._addedHook(),this._state=m.ADDED)}_onRemove(){this._delegate&&this._viewer&&(this._cache={},this._delegate instanceof i.PrimitiveCollection?(this._delegate.removeAll(),this._isGround?this._viewer.scene.groundPrimitives.remove(this._delegate):this._viewer.scene.primitives.remove(this._delegate)):this._delegate instanceof i.ImageryLayer?this._viewer.imageryLayers.remove(this._delegate,!1):this._delegate instanceof Promise?(this._delegate.then(e=>{e.entities.removeAll()}),this._viewer.dataSources.remove(this._delegate)):(this._delegate.entities&&this._delegate.entities.removeAll(),this._viewer.dataSources.remove(this._delegate)),this._removedHook&&this._removedHook(),this._state=m.REMOVED)}_addOverlay(e){this._cache.hasOwnProperty(e.overlayId)||(this._cache[e.overlayId]=e,this._delegate&&e.fire(xe.ADD,this),this._state===m.CLEARED&&(this._state=m.ADDED))}_removeOverlay(e){this._cache.hasOwnProperty(e.overlayId)&&(this._delegate&&e.fire(xe.REMOVE,this),delete this._cache[e.overlayId])}addOverlay(e){return this._addOverlay(e),this}addOverlays(e){return Array.isArray(e)&&e.forEach(t=>{this._addOverlay(t)}),this}removeOverlay(e){return this._removeOverlay(e),this}getOverlay(e){return this._cache[e]||void 0}getOverlayById(e){let t;return Object.keys(this._cache).forEach(r=>{this._cache[r].id===e&&(t=this._cache[r])}),t}getOverlaysByAttr(e,t){let r=[];return this.eachOverlay(s=>{s.attr[e]===t&&r.push(s)},this),r}eachOverlay(e,t){return Object.keys(this._cache).forEach(r=>{e&&e.call(t||this,this._cache[r])}),this}getOverlays(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}clear(){}remove(){this._viewer&&this._viewer.removeLayer(this)}addTo(e){return e!=null&&e.addLayer&&e.addLayer(this),this}setStyle(e){}on(e,t,r){return this._layerEvent.on(e,t,r||this),this}off(e,t,r){return this._layerEvent.off(e,t,r||this),this}fire(e,t){return this._layerEvent.fire(e,t),this}static registerType(e){e&&(ot[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getLayerType(e){return ot[e.toLocaleUpperCase()]||void 0}},S=Cr;var Tr=class{constructor(e){this._id=e||v.uuid(),this._cache={},this._show=!0,this._viewer=void 0,this._layerGroupEvent=new nr,this._layerGroupEvent.on(Ee.ADD,this._onAdd,this),this._layerGroupEvent.on(Ee.REMOVE,this._onRemove,this),this._state=m.INITIALIZED}get id(){return this._id}get type(){return S.getLayerType("layer_group")}set show(e){this._show=e,Object.keys(this._cache).forEach(t=>{this._cache[t].show=this._show})}get show(){return this._show}get layerGroupEvent(){return this._layerGroupEvent}get state(){return this._state}_onAdd(e){this._viewer=e,Object.keys(this._cache).forEach(t=>{this._viewer.addLayer(this._cache[t])}),this._state=m.ADDED}_onRemove(){Object.keys(this._cache).forEach(e=>{this._viewer&&this._viewer.removeLayer(this._cache[e])}),this._cache={},this._state=m.REMOVED}addLayer(e){return Object(this._cache).hasOwnProperty(e.id)||(this._cache[e.id]=e,this._viewer&&this._viewer.addLayer(e)),this}removeLayer(e){return Object(this._cache).hasOwnProperty(e.id)&&(this._viewer&&this._viewer.removeLayer(e),delete this._cache[e.id]),this}getLayer(e){return this._cache[e]||void 0}getLayers(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}addTo(e){return e&&e.addLayerGroup&&e.addLayerGroup(this),this}remove(){return this._viewer&&this._viewer.removeLayerGroup(this),this}};S.registerType("layer_group");var tl=Tr;var il=new i.WebMercatorProjection,xr=class{static transformCartesianToWGS84(e){if(e){let t=i.Ellipsoid.WGS84.cartesianToCartographic(e);return new X(i.Math.toDegrees((t==null?void 0:t.longitude)||0),i.Math.toDegrees((t==null?void 0:t.latitude)||0),t.height||0)}return new X(0,0)}static transformCartographicToWGS84(e){return e?new X(i.Math.toDegrees((e==null?void 0:e.longitude)||0),i.Math.toDegrees((e==null?void 0:e.latitude)||0),e.height||0):new X(0,0)}static transformWGS84ToCartesian(e){return e?i.Cartesian3.fromDegrees(e.lng,e.lat,e.alt,i.Ellipsoid.WGS84):i.Cartesian3.ZERO}static transformWGS84ToCartographic(e){return e?i.Cartographic.fromDegrees(e.lng,e.lat,e.alt):i.Cartographic.ZERO}static transformCartesianArrayToWGS84Array(e){return e?e.map(t=>this.transformCartesianToWGS84(t)):[]}static transformWGS84ArrayToCartesianArray(e){return e?e.map(t=>this.transformWGS84ToCartesian(t)):[]}static transformWGS84ToMercator(e){let t=il.project(i.Cartographic.fromDegrees(e.lng,e.lat,e.alt));return new X(t.x,t.y,t.z)}static transformMercatorToWGS84(e){let t=il.unproject(new i.Cartesian3(e.lng,e.lat,e.alt));return new X(i.Math.toDegrees(t.longitude),i.Math.toDegrees(t.latitude),t.height)}static transformWindowToWGS84(e,t){let r=t.scene,s;if(r.mode===i.SceneMode.SCENE3D){let o=r.camera.getPickRay(e);s=r.globe.pick(o,r)}else s=r.camera.pickEllipsoid(e,i.Ellipsoid.WGS84);return this.transformCartesianToWGS84(s)}static transformWGS84ToWindow(e,t){let r=t.scene;return i.SceneTransforms.worldToWindowCoordinates(r,this.transformWGS84ToCartesian(e))}},u=xr;var It=52.35987755982988,ee=3.141592653589793,rl=6378245,sl=.006693421622965943,Er=class{static BD09ToGCJ02(e,t){let r=+e-.0065,s=+t-.006,o=Math.sqrt(r*r+s*s)-2e-5*Math.sin(s*It),n=Math.atan2(s,r)-3e-6*Math.cos(r*It),l=o*Math.cos(n),h=o*Math.sin(n);return[l,h]}static GCJ02ToBD09(e,t){t=+t,e=+e;let r=Math.sqrt(e*e+t*t)+2e-5*Math.sin(t*It),s=Math.atan2(t,e)+3e-6*Math.cos(e*It),o=r*Math.cos(s)+.0065,n=r*Math.sin(s)+.006;return[o,n]}static WGS84ToGCJ02(e,t){if(t=+t,e=+e,this.out_of_china(e,t))return[e,t];{let r=this.delta(e,t);return[e+r[0],t+r[1]]}}static GCJ02ToWGS84(e,t){if(t=+t,e=+e,this.out_of_china(e,t))return[e,t];{let r=[e,t],s=this.WGS84ToGCJ02(e,t),o=s[0]-e,n=s[1]-t;do s=this.WGS84ToGCJ02(r[0]-=o,r[1]-=n),o=s[0]-e,n=s[1]-t;while(Math.abs(o)>1e-7||Math.abs(n)>1e-7);return r}}static delta(e,t){let r=this.transformLng(e-105,t-35),s=this.transformLat(e-105,t-35),o=t/180*ee,n=Math.sin(o);n=1-sl*n*n;let l=Math.sqrt(n);return r=r*180/(rl/l*Math.cos(o)*ee),s=s*180/(rl*(1-sl)/(n*l)*ee),[r,s]}static transformLng(e,t){t=+t,e=+e;let r=300+e+2*t+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return r+=(20*Math.sin(6*e*ee)+20*Math.sin(2*e*ee))*2/3,r+=(20*Math.sin(e*ee)+40*Math.sin(e/3*ee))*2/3,r+=(150*Math.sin(e/12*ee)+300*Math.sin(e/30*ee))*2/3,r}static transformLat(e,t){t=+t,e=+e;let r=-100+2*e+3*t+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return r+=(20*Math.sin(6*e*ee)+20*Math.sin(2*e*ee))*2/3,r+=(20*Math.sin(t*ee)+40*Math.sin(t/3*ee))*2/3,r+=(160*Math.sin(t/12*ee)+320*Math.sin(t*ee/30))*2/3,r}static out_of_china(e,t){return t=+t,e=+e,!(e>73.66&&e<135.05&&t>3.86&&t<53.55)}},_e=Er;var Pr=class a{constructor(e,t,r,s,o,n){this._lng=+e||0,this._lat=+t||0,this._alt=+r||0,this._heading=+s||0,this._pitch=+o||0,this._roll=+n||0}set lng(e){this._lng=+e}get lng(){return this._lng}set lat(e){this._lat=+e}get lat(){return this._lat}set alt(e){this._alt=+e}get alt(){return this._alt}set heading(e){this._heading=+e}get heading(){return this._heading}set pitch(e){this._pitch=+e}get pitch(){return this._pitch}set roll(e){this._roll=+e}get roll(){return this._roll}serialize(){let e=new a(this._lng,this._lat,this._alt,this._heading,this._pitch,this._roll);return JSON.stringify(e)}distance(e){return!e||!(e instanceof a)?0:i.Cartesian3.distance(u.transformWGS84ToCartesian(this),u.transformWGS84ToCartesian(e))}clone(){let e=new a;return e.lng=this.lng||0,e.lat=this.lat||0,e.alt=this.alt||0,e.heading=this.heading||0,e.pitch=this.pitch||0,e.roll=this.roll||0,e}copy(){return this.clone()}toArray(){return[this.lng,this.lat,this.alt,this.heading,this.pitch,this.roll]}toString(){return`${this.lng},${this.lat},${this.alt},${this.heading},${this.pitch},${this.roll}`}toObject(){return{lng:this.lng,lat:this.lat,alt:this.alt,heading:this.heading,pitch:this.pitch,roll:this.roll}}static fromArray(e){let t=new a;return Array.isArray(e)&&(t.lng=e[0]||0,t.lat=e[1]||0,t.alt=e[2]||0,t.heading=e[3]||0,t.pitch=e[4]||0,t.roll=e[5]||0),t}static fromString(e){let t=new a;if(e&&typeof e=="string"){let r=e.split(",");t=this.fromArray(r)}return t}static fromObject(e){return new a(e.lng,e.lat,e.alt,e.heading,e.pitch,e.roll)}static deserialize(e){let t=new a,r=JSON.parse(e);return r&&(t.lng=r.lng||0,t.lat=r.lat||0,t.alt=r.alt||0,t.heading=r.heading||0,t.pitch=r.pitch||0,t.roll=r.roll||0),t}},X=Pr;var br=class{static parsePosition(e){let t=new X;return e&&(typeof e=="string"?t=X.fromString(e):Array.isArray(e)?t=X.fromArray(e):!(Object(e)instanceof X)&&Object(e).hasOwnProperty("lng")&&Object(e).hasOwnProperty("lat")?t=X.fromObject(e):Object(e)instanceof X?t=e:Object(e)instanceof i.Cartesian3?t=u.transformCartesianToWGS84(e):Object(e)instanceof i.Cartographic&&(t=u.transformCartographicToWGS84(e))),t}static parsePositions(e){if(typeof e=="string"){if(e.indexOf("#")>=0)throw new Error("the positions invalid");e=e.split(";").filter(t=>!!t)}return e.map(t=>this.parsePosition(t))}static parsePointCoordToArray(e){return e=this.parsePosition(e),[e.lng,e.lat]}static parsePolylineCoordToArray(e){let t=[];return e=this.parsePositions(e),e.forEach(r=>{t.push([r.lng,r.lat])}),t}static parsePolygonCoordToArray(e,t=!1){let r=[];return e=this.parsePositions(e),e.forEach(s=>{r.push([s.lng,s.lat])}),t&&r.length>0&&r.push(r[0]),[r]}},f=br;var mg={radius:60,maxZoom:25,style:"circle",image:"",gradientColors:{1e-4:i.Color.DEEPSKYBLUE,.001:i.Color.GREEN,.01:i.Color.ORANGE,.1:i.Color.RED},gradientImages:{},showCount:!0,fontSize:12,clusterSize:16,fontColor:i.Color.BLACK,getCountOffset:a=>({x:-3.542857*String(a).length+1.066667,y:String(a).length>3?5:4})},Sr=class extends S{constructor(e,t={}){super(e),this._delegate=new i.PrimitiveCollection,this._options={...mg,...t},this._billboards=this._delegate.add(new i.BillboardCollection),this._labels=this._delegate.add(new i.LabelCollection),this._cluster=new Yi({radius:this._options.radius,maxZoom:this._options.maxZoom}),this._allCount=0,this._changedRemoveCallback=void 0,this._lastChangedTime=null,this._state=m.INITIALIZED}get type(){return S.getLayerType("cluster")}_addOverlay(e){}_removeOverlay(e){}_getCircleImage(e,t){let r=this._options.clusterSize*(String(t).length+1),s=e.toCssColorString()+"-"+t;if(!this._cache[s]){let o=document.createElement("canvas");o.width=r,o.height=r;let n=o.getContext("2d");n.save(),n.scale(r/24,r/24),n.fillStyle=e.withAlpha(.2).toCssColorString(),n.beginPath(),n.arc(12,12,9,0,2*Math.PI),n.closePath(),n.fill(),n.beginPath(),n.arc(12,12,6,0,2*Math.PI),n.fillStyle=e.toCssColorString(),n.closePath(),n.fill(),n.restore(),this._cache[s]=o.toDataURL()}return this._cache[s]}_getClusteringImage(e,t){let r=this._options.clusterSize*(String(t).length+1),s=e.toCssColorString()+"-"+t,o=-Math.PI/12,n=Math.PI/2,l=Math.PI/6;if(!this._cache[s]){let h=document.createElement("canvas");h.width=r,h.height=r;let c=h.getContext("2d");c.save(),c.scale(r/24,r/24),c.beginPath(),c.arc(12,12,6,0,2*Math.PI),c.fillStyle=e.toCssColorString(),c.fill(),c.closePath(),c.lineWidth=2;for(let p=0;p<3;p++)c.beginPath(),c.arc(12,12,8,o,o+n,!1),c.strokeStyle=e.withAlpha(.4).toCssColorString(),c.stroke(),c.arc(12,12,11,o,o+n,!1),c.strokeStyle=e.withAlpha(.2).toCssColorString(),c.stroke(),c.closePath(),o=o+n+l;c.restore(),this._cache[s]=h.toDataURL()}return this._cache[s]}_getClusterImage(e){let t=e/this._allCount,r;if(this._options.style==="custom"){let s=Object.keys(this._options.gradientImages).sort((o,n)=>Number(o)-Number(n));for(let o=s.length-1;o>=0;o--)if(t>=Number(s[o])){r=this._options.gradientImages[s[o]];break}r||(r=this._options.gradientImages[s[0]])}else{let s=Object.keys(this._options.gradientColors).sort((n,l)=>Number(n)-Number(l)),o;for(let n=s.length-1;n>=0;n--)if(t>=Number(s[n])){o=this._options.gradientColors[s[n]];break}o||(o=this._options.gradientColors[s[0]]),r=this._options.style==="circle"?this._getCircleImage(o,e):this._getClusteringImage(o,e)}return r}_changeCluster(e){let t=i.getTimestamp();if(this._lastChangedTime&&t-this._lastChangedTime<=1e3)return;this._lastChangedTime=t,this._cache={},this._billboards.removeAll(),this._labels.removeAll();let r=this._viewer.camera.computeViewRectangle();r||(r=this._viewer.viewBounds),this._allCount&&this._cluster.getClusters([i.Math.toDegrees(r.west),i.Math.toDegrees(r.south),i.Math.toDegrees(r.east),i.Math.toDegrees(r.north)],this._viewer.zoom).forEach(o=>{let n=v.uuid();if(o.properties.cluster){let l=o.properties.point_count,h=this._billboards.add({position:i.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),image:this._getClusterImage(l)});if(h.layerId=this.layerId,h.overlayId=n,h.attr={count:l},this._cache[n]=h,this._options.showCount){let c=this._labels.add({position:i.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),text:String(l),font:`${this._options.fontSize} px sans-serif`,disableDepthTestDistance:Number.POSITIVE_INFINITY,fillColor:this._options.fontColor,scale:.8,pixelOffset:this._options.getCountOffset(l)});c.layerId=this.layerId,c.overlayId=n,c.attr={count:l},this._cache[n]=c}}else{let l=this._billboards.add({position:i.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),image:this._options.image,...o.properties.style});l.layerId=this.layerId,l.overlayId=n,l.attr=o.properties,this._cache[n]=l}})}_addedHook(){this._changedRemoveCallback=this._viewer.camera.changed.addEventListener(this._changeCluster,this)}_removedHook(){this._changedRemoveCallback&&this._changedRemoveCallback()}setPoints(e=[]){return e.length&&(this._allCount=e.length,this._cluster.load(e.map(t=>{let r=f.parsePosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[r.lng,r.lat]},properties:t.attr||{}}}))),this}clear(){return this._cache={},this._allCount=0,this._state=m.CLEARED,this}};S.registerType("cluster");var ol=Sr;var Ar=class extends S{constructor(e,t="",r={}){super(e),this._delegate=i.CzmlDataSource.load(t,r),this._state=m.INITIALIZED}get type(){return S.getLayerType("czml")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};S.registerType("czml");var al=Ar;var Mr=class extends S{constructor(e){super(e),this._delegate=new i.CustomDataSource(e),this._state=m.INITIALIZED}get type(){return S.getLayerType("dynamic")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=m.CLEARED,this}};S.registerType("dynamic");var nl=Mr;var Ir=class extends S{constructor(e){super(e),this._delegate=new i.CustomDataSource(e),this._state=m.INITIALIZED}get type(){return S.getLayerType("vector")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=m.CLEARED,this}};S.registerType("vector");var fe=Ir;var ug={name:"",count:10,maximumLevel:21,dataProperty:"",callback:()=>null},Dr=class extends S{constructor(e,t,r={}){super(e),this._url=t,this._options={...ug,...r},this._levelLayers={},this._tileWidth=256,this._tileHeight=256,this._maximumLevel=this._options.maximumLevel,this._tilingScheme=this._options.tilingScheme||new i.GeographicTilingScheme,this._rectangle=this._tilingScheme.rectangle,this._credit=void 0,this._token=void 0;for(let s=0;s<this.maximumLevel;s++)this._levelLayers[String(s)]=new fe(e+"-grid-"+s);this._viewer=void 0,this._imageryLayer=void 0,this._imagery=document.createElement("canvas"),this._imagery.width=this._tileWidth,this._imagery.height=this._tileHeight,this._state=m.INITIALIZED}get type(){return S.getLayerType("feature_grid")}get url(){return this._url}set show(e){this._show=e,Object.keys(this._levelLayers).forEach(t=>{this._levelLayers[t].show=e})}get show(){return this._show}get token(){return this._token}get tileWidth(){if(!this.ready)throw new i.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this.ready)throw new i.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this.ready)throw new i.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new i.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}get tilingScheme(){if(!this.ready)throw new i.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new i.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}get ready(){return!!this._url}get credit(){return this._credit}get hasAlphaChannel(){return!0}_onAdd(e){this._viewer=e,this._imageryLayer=this._viewer.imageryLayers.addImageryProvider(this),Object.keys(this._levelLayers).forEach(t=>{this._viewer.addLayer(this._levelLayers[t])}),this._state=m.ADDED}_onRemove(){this._imageryLayer&&this._viewer.imageryLayers.remove(this._imageryLayer),Object.keys(this._levelLayers).forEach(e=>{this._viewer.removeLayer(this._levelLayers[e])}),this._state=m.REMOVED}getTileCredits(e,t,r){}requestImage(e,t,r,s){let o=this._levelLayers[String(r)],n=this._tilingScheme.tileXYToRectangle(e,t,r);return this._viewer&&n&&o&&i.Rectangle.intersection(n,this._viewer.viewBounds)&&i.Resource.fetchJson({url:this._url,queryParameters:{minX:i.Math.toDegrees(n.west),minY:i.Math.toDegrees(n.south),maxX:i.Math.toDegrees(n.east),maxY:i.Math.toDegrees(n.north),count:this._options.count}}).then(l=>{let h=l;if(this._options.dataProperty&&(h=l[this._options.dataProperty]),h&&h.length){for(let c=r+3;c<this._maximumLevel;c++)this._levelLayers[String(c)]&&this._levelLayers[String(c)].clear();h.forEach(c=>{let p=this._options.callback(c);p&&o.addOverlay(p)})}}),this._imagery}clear(){Object.keys(this._levelLayers).forEach(e=>{this._levelLayers[e].clear()}),this._state=m.CLEARED}};S.registerType("feature_grid");var ll=Dr;var _g={},H=_g;var Lr=class{constructor(){this._id=v.uuid(),this._bid=v.uuid(),this._delegate=void 0,this._layer=void 0,this._state=void 0,this._show=!0,this._style={},this._attr={},this._allowDrillPicking=!1,this._contextMenu=[],this._overlayEvent=new pr,this._overlayEvent.on(xe.ADD,this._onAdd,this),this._overlayEvent.on(xe.REMOVE,this._onRemove,this)}get overlayId(){return this._id}get type(){return""}set id(e){this._bid=e}get id(){return this._bid}set show(e){this._show=e,v.isPromise(this._delegate)?this._delegate.then(t=>{t.show=this._show}):this._delegate&&(this._delegate.show=this._show)}get show(){return this._show}set attr(e){this._attr=e}get attr(){return this._attr}set allowDrillPicking(e){this._allowDrillPicking=e}get allowDrillPicking(){return this._allowDrillPicking}get overlayEvent(){return this._overlayEvent}get delegate(){return this._delegate}get state(){return this._state}set contextMenu(e){this._contextMenu=e}get contextMenu(){return this._contextMenu}_getLayerCollection(e){let t;switch(e){case"point_primitive":t=this._layer.points;break;case"billboard_primitive":case"bounce_billboard_primitive":t=this._layer.billboards;break;case"label_primitive":case"bounce_label_primitive":t=this._layer.labels;break;case"polyline_primitive":t=this._layer.polylines;break;case"cloud_primitive":t=this._layer.clouds;break;default:break}return t}_mountedHook(){}_addedHook(){var e;if(!this._delegate)return!1;this._delegate instanceof Promise?this._delegate.then(t=>{var r;t.layerId=(r=this._layer)==null?void 0:r.layerId,t.overlayId=this._id}):(this._delegate.layerId=(e=this._layer)==null?void 0:e.layerId,this._delegate.overlayId=this._id)}_removedHook(){}_onAdd(e){var t,r,s,o;if(e){if(this._layer=e,this._mountedHook&&this._mountedHook(),(r=(t=this._layer)==null?void 0:t.delegate)!=null&&r.entities&&this._delegate)this._layer.delegate.entities.add(this._delegate);else if((o=(s=this._layer)==null?void 0:s.delegate)!=null&&o.add){let n=this._getLayerCollection(this.type);n?(this._delegate&&(this._delegate=n.add(this._delegate)),v.merge(this._delegate,this._style),this.update&&this.destroy&&this._layer.delegate.add(this)):v.isPromise(this._delegate)?this._delegate.then(l=>{this._layer.delegate.add(l)}):this.update&&this.destroy?this._layer.delegate.add(this):this._delegate&&this._layer.delegate.add(this._delegate)}this._addedHook&&this._addedHook(),this._state=m.ADDED}}_onRemove(){var e,t,r,s;if(this._layer){if((t=(e=this._layer)==null?void 0:e.delegate)!=null&&t.entities)this._layer.delegate.entities.remove(this._delegate);else if((s=(r=this._layer)==null?void 0:r.delegate)!=null&&s.remove){let o=this._getLayerCollection(this.type);o?(this._delegate&&o.remove(this._delegate),this.update&&this.destroy&&this._layer.delegate.remove(this)):v.isPromise(this._delegate)?this._delegate.then(n=>{this._layer.delegate.remove(n)}):this.update&&this.destroy?this._layer.delegate.remove(this):this._delegate&&this._layer.delegate.remove(this._delegate)}this._removedHook&&this._removedHook(),this._state=m.REMOVED}}setLabel(e,t){return this._delegate?(this._delegate instanceof i.Entity&&(this._delegate.label={...t,text:e}),this):this}setStyle(e){return this}remove(){return this._layer&&this._layer.removeOverlay(this),this}addTo(e){return e&&e.addOverlay&&e.addOverlay(this),this}on(e,t,r){return this._overlayEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this}fire(e,t){return this._overlayEvent.fire(e,t),this}static registerType(e){e&&(H[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getOverlayType(e){return H[e.toLocaleUpperCase()]||void 0}},y=Lr;var Rr=class extends y{constructor(e,t){super(),this._delegate=new i.Entity({billboard:{}}),this._position=f.parsePosition(e),this._icon=t,this._size=[32,32],this._state=m.INITIALIZED}get type(){return y.getOverlayType("custom_billboard")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("CustomBillboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setLabel(e,t){return this._delegate.label={...t,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}setVLine(e={}){if(this._position.alt>0&&!this._delegate.polyline){let t=this._position.copy();t.alt=e.height||0,this._delegate.polyline={...e,positions:u.transformWGS84ArrayToCartesianArray([t,this._position])}}return this}setBottomCircle(e,t={},r=0){let s=0,o=r;return this._delegate.ellipse={...t,semiMajorAxis:e,semiMinorAxis:e,stRotation:new i.CallbackProperty(()=>(s+=o,(s>=360||s<=-360)&&(s=0),s),!1)},this}};y.registerType("custom_billboard");var hl=Rr;var Or=class extends y{constructor(e,t){super(),this._delegate=new i.Entity({label:{}}),this._position=f.parsePosition(e),this._text=t,this._state=m.INITIALIZED}get type(){return y.getOverlayType("custom_label")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.label.text=this._text}get text(){return this._text}_mountedHook(){this.position=this._position,this.text=this._text}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,v.merge(this._style,e),v.merge(this._delegate.label,e),this)}setVLine(e={}){if(this._position.alt>0&&!this._delegate.polyline){let t=this._position.copy();t.alt=e.height||0,this._delegate.polyline={...e,positions:u.transformWGS84ArrayToCartesianArray([t,this._position])}}return this}setBottomCircle(e,t={},r=0){let s=0,o=r;return this._delegate.ellipse={...t,semiMajorAxis:e,semiMinorAxis:e,stRotation:new i.CallbackProperty(()=>(s+=o,(s>=360||s<=-360)&&(s=0),s),!1)},this}};y.registerType("custom_label");var cl=Or;var kr=class extends y{constructor(){super(),this._startTime=void 0,this._lastTime=void 0,this._sampledPosition=new i.SampledPositionProperty,this._cache=[],this._maxCacheSize=10,this._state=m.INITIALIZED}set maxCacheSize(e){this._maxCacheSize=e}get maxCacheSize(){return this._maxCacheSize}get position(){return u.transformCartesianToWGS84(this._sampledPosition.getValue(i.JulianDate.now()))}_removePosition(){if(this._cache.length>this._maxCacheSize){let e=i.JulianDate.addSeconds(this._cache[0],-.2,new i.JulianDate),t=i.JulianDate.addSeconds(this._cache[this._cache.length-this._maxCacheSize],-.2,new i.JulianDate);this._sampledPosition.removeSamples(new i.TimeInterval({start:e,stop:t})),this._cache.splice(0,this._cache.length-this._maxCacheSize)}}addPosition(e,t){this._removePosition();let r=i.JulianDate.now(),s=i.JulianDate.addSeconds(r,t,new i.JulianDate);return this._sampledPosition.addSample(s,u.transformWGS84ToCartesian(f.parsePosition(e))),this._lastTime=s,this._cache.push(this._lastTime),this}bindDom(e){return this}},Dt=kr;var zr=class extends Dt{constructor(e,t){super(),this._position=f.parsePosition(e),this._icon=t,this._delegate=new i.Entity({billboard:{}}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("dynamic_billboard")}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("DynamicBillboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this._sampledPosition.forwardExtrapolationType=i.ExtrapolationType.HOLD,this._startTime=i.JulianDate.now(),this._sampledPosition.addSample(this._startTime,u.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._cache.push(this._startTime),this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}};y.registerType("dynamic_billboard");var pl=zr;var Fr=class extends Dt{constructor(e,t){super(),this._position=f.parsePosition(e),this._modelUrl=t,this._delegate=new i.Entity({model:{}}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("dynamic_model")}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}get modelUrl(){return this._modelUrl}_mountedHook(){this._sampledPosition.forwardExtrapolationType=i.ExtrapolationType.HOLD,this._startTime=i.JulianDate.now(),this._sampledPosition.addSample(this._startTime,u.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._delegate.orientation=new i.VelocityOrientationProperty(this._sampledPosition),this._cache.push(this._startTime),this.modelUrl=this._modelUrl}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.uri,v.merge(this._style,e),v.merge(this._delegate.model,e),this)}};y.registerType("dynamic_model");var dl=Fr;function fg(a,e,t){let r=i.Cartesian3.subtract(a,e,new i.Cartesian3),s=i.Cartesian3.subtract(t,e,new i.Cartesian3),o=i.Cartesian3.cross(r,s,r);return i.Cartesian3.magnitude(o)*.5}function ye(a){let e=0;if(!Array.isArray(a))return e;a[0]instanceof i.Cartesian3||(a=u.transformWGS84ArrayToCartesianArray(a));let t=i.CoplanarPolygonGeometry.createGeometry(i.CoplanarPolygonGeometry.fromPositions({positions:a,vertexFormat:i.VertexFormat.POSITION_ONLY}));if(!t)return e;let r=t.attributes.position.values,s=t.indices;for(let o=0;o<s.length;o+=3){let n=i.Cartesian3.unpack(r,s[o]*3,new i.Cartesian3),l=i.Cartesian3.unpack(r,s[o+1]*3,new i.Cartesian3),h=i.Cartesian3.unpack(r,s[o+2]*3,new i.Cartesian3);e+=fg(n,l,h)}return e}function Hr(a=[],e=0){let t=180,r=90,s=-180,o=-90;if(a.forEach(n=>{t=Math.min(t,n.lng||n.x),r=Math.min(r,n.lat||n.y),s=Math.max(s,n.lng||n.x),o=Math.max(o,n.lat||n.y)}),e>0){let n=Math.abs(s-s),l=Math.abs(o-r);t-=n*e,r-=l*e,s+=n*e,o+=l*e}return{west:t,south:r,east:s,north:o}}function ve(a){if(a&&Array.isArray(a)){let e=0;a.forEach(({alt:s})=>e=Math.max(e,s));let t=i.BoundingSphere.fromPoints(u.transformWGS84ArrayToCartesianArray(a)),r=u.transformCartesianToWGS84(t.center);return r.alt=e,r}return new X}function Nr(a,e){e=e||{};let t=[];for(let r=0;r<a.length-1;r++){let s=gg(a[r],a[r+1],e.count);s&&s.length>0&&(t=t.concat(s))}return t}function gg(a,e,t){if(!a||!e)return null;let r=[];t=t||40;let s=function(M){return 1-2*M+M*M},o=M=>2*M-2*M*M,n=M=>M*M,l,h,c,p,_,w,g=0,d=parseFloat(a.lat),E=parseFloat(e.lat),T=parseFloat(a.lng),b=parseFloat(e.lng);b>T&&b-T>180&&T<0&&(T=360+T,b=360+b),w=0,E===d?(l=0,h=T-b):b===T?(l=Math.PI/2,h=d-E):(l=Math.atan((E-d)/(b-T)),h=(E-d)/Math.sin(l)),w===0&&(w=l+Math.PI/5),c=h/2,_=c*Math.cos(w)+T,p=c*Math.sin(w)+d;for(let M=0;M<t+1;M++){let N=T*s(g)+_*o(g)+b*n(g),F=d*s(g)+p*o(g)+E*n(g),B=a.lng,re=e.lng;r.push([B<0&&re>0?N-360:N,F]),g=g+1/t}return r}function te(a){let e=0;if(a&&Array.isArray(a))for(let t=0;t<a.length-1;t++){let r=u.transformWGS84ToCartographic(a[t]),s=u.transformWGS84ToCartographic(a[t+1]),o=new i.EllipsoidGeodesic;o.setEndPoints(r,s);let n=o.surfaceDistance;n=Math.sqrt(Math.pow(n,2)+Math.pow(s.height-r.height,2)),e+=n}return e.toFixed(3)}function we(a,e){let t=a,r=e;if(!t||!r)return 0;a instanceof i.Cartesian3||(t=f.parsePosition(a),t=u.transformWGS84ToCartesian(t)),e instanceof i.Cartesian3||(r=f.parsePosition(e),r=u.transformWGS84ToCartesian(r));let s=i.Transforms.eastNorthUpToFixedFrame(t),o=i.Cartesian3.subtract(r,t,new i.Cartesian3),n=i.Matrix4.multiplyByPointAsVector(i.Matrix4.inverse(s,new i.Matrix4),o,new i.Cartesian3),l=Math.atan2(n.y,n.x)-i.Math.PI_OVER_TWO;return l=i.Math.TWO_PI-i.Math.zeroToTwoPi(l),isNaN(l)?0:l}function lt(a,e,t){return a=parseFloat(a)||0,a>=parseFloat(e)&&a<=parseFloat(t)}function z(a,e){return i.Cartesian3.midpoint(a,e,new i.Cartesian3)}function Wr(a,e){let t=f.parsePosition(a),r=f.parsePosition(e);t=u.transformWGS84ToCartographic(t),r=u.transformWGS84ToCartographic(r);let s=new i.EllipsoidGeodesic(t,r).interpolateUsingFraction(.5);return new X(i.Math.toDegrees(s.longitude),i.Math.toDegrees(s.latitude),s.height)}function Gr(a,e,t=0,r=50){let s=[];t=Math.max(+t,100),r=Math.max(+r,50);let o=Math.abs(a.lng-e.lng),n=Math.abs(a.lat-e.lat),l=Math.max(o,n),h=l/r;if(o>n){let c=(e.lat-a.lat)/r;a.lng-e.lng>0&&(h=-h);for(let p=0;p<r;p++){let _=t-Math.pow(-.5*l+Math.abs(h)*p,2)*4*t/Math.pow(l,2),w=a.lng+h*p,g=a.lat+c*p;s.push([w,g,_])}}else{let c=(e.lng-a.lng)/r;a.lat-e.lat>0&&(h=-h);for(let p=0;p<r;p++){let _=t-Math.pow(-.5*l+Math.abs(h)*p,2)*4*t/Math.pow(l,2),w=a.lng+c*p,g=a.lat+h*p;s.push([w,g,_])}}return s.push([e.lng,e.lat,e.alt||0]),s}var{Math:yg}=i,ml={};v.merge(ml,yg,{area:ye,bounds:Hr,center:ve,curve:Nr,distance:te,heading:we,isBetween:lt,midCartesian:z,midPosition:Wr,parabola:Gr});var Ur=class a extends y{constructor(e,t){super(),this._delegate=A.create("div","div-icon"),this._position=f.parsePosition(e),this._delegate.setAttribute("id",this._id),v.merge(this._delegate.style,{position:"absolute",top:"0",left:"0"}),this.content=t,this._state=m.INITIALIZED}get type(){return y.getOverlayType("div_icon")}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden"}get show(){return this._show}set position(e){this._position=f.parsePosition(e)}get position(){return this._position}set content(e){if(e&&typeof e=="string")this._delegate.innerHTML=e;else if(e&&e instanceof Element){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);this._delegate.appendChild(e)}}get content(){return this._delegate.childNodes||[]}_updateStyle(e,t,r){if(!this._show||!e)return;let s=e.x-this._delegate.offsetWidth/2,o=e.y-this._delegate.offsetHeight/2;this._style.position==="topleft"?(s=e.x-this._delegate.offsetWidth,o=e.y-this._delegate.offsetHeight):this._style.position==="topright"?(s=e.x,o=e.y-this._delegate.offsetHeight):this._style.position==="bottomleft"?(s=e.x-this._delegate.offsetWidth,o=e.y):this._style.position==="bottomright"&&(s=e.x,o=e.y);let n=`translate3d(${Math.round(s)}px,${Math.round(o)}px, 0)`,l="scale3d(1,1,1)",h=this._style.scaleByDistance;if(t&&h){let _=h.near||0,w=h.nearValue||1,g=h.far||Number.MAX_VALUE,d=h.farValue||0,E=t/g;if(t<_)l=`scale3d(${w},${w},1)`;else if(t>g)l=`scale3d(${d},${d},1)`;else{let T=d+E*(w-d);l=`scale3d(${T},${T},1)`}}let c=!0,p=this._style.distanceDisplayCondition;t&&p&&(c=lt(t,p.near||0,p.far||Number.MAX_VALUE)),this._delegate.style.transform=`${n} ${l}`,this._delegate.style.visibility=c&&r?"visible":"hidden"}_onAdd(e){this._layer=e,this._layer.delegate.appendChild(this._delegate);let t={layer:e,overlay:this,position:u.transformWGS84ToCartesian(this._position)};this._delegate.addEventListener("click",()=>{this._overlayEvent.fire(R.CLICK,t)}),this._delegate.addEventListener("mouseover",()=>{this._overlayEvent.fire(R.MOUSE_OVER,t)}),this._delegate.addEventListener("mouseout",()=>{this._overlayEvent.fire(R.MOUSE_OUT,t)}),this._state=m.ADDED}_onRemove(){this._layer&&(this._layer.delegate.removeChild(this._delegate),this._state=m.REMOVED)}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this._style.className&&A.addClass(this._delegate,this._style.className),this)}static fromEntity(e,t){var n;let r,s=i.JulianDate.now(),o=u.transformCartesianToWGS84(e.position.getValue(s));return r=new a(o,t),e.billboard&&(r.attr={...(n=e==null?void 0:e.properties)==null?void 0:n.getValue(s)}),r}};y.registerType("div_icon");var ul=Ur;var Br=class a extends y{constructor(e,t){super(),this._delegate=new i.Entity({model:{}}),this._position=f.parsePosition(e),this._modelUrl=t,this._rotateAmount=0,this._state=m.INITIALIZED}get type(){return y.getOverlayType("model")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._rotateAmount===0&&(this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll))))}get position(){return this._position}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}get modelUrl(){return this._modelUrl}set rotateAmount(e){this._rotateAmount=+e,this._delegate.orientation=new i.CallbackProperty(()=>(this._position.heading+=this._rotateAmount,(this._position.heading>=360||this._position.heading<=-360)&&(this._position.heading=0),i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))),!1)}get rotateAmount(){return this._rotateAmount}_mountedHook(){this.position=this._position,this.modelUrl=this._modelUrl}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.uri,v.merge(this._style,e),v.merge(this._delegate.model,e),this)}static fromEntity(e,t){let r=i.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r)),o=new a(s,t);return o.attr={...e.properties.getValue(r)},o}};y.registerType("model");var We=Br;var Vr=class extends y{constructor(e,t={}){super(),this._delegate=i.I3SDataProvider.fromUrl(e,t),this._state=m.INITIALIZED}get type(){return y.getOverlayType("i3s")}ready(e){return this._delegate.then(e),this}setLabel(e,t){return console.warn("not support this function"),this}};y.registerType("i3s");var _l=Vr;var jr=class extends y{constructor(e,t={}){super(),this._delegate=i.Cesium3DTileset.fromUrl(e,t),this._tilesetEvent=new mr(this._delegate),this._tileVisibleCallback=void 0,this._properties=void 0,this._state=m.INITIALIZED}get type(){return y.getOverlayType("tileset")}set show(e){this._show=e,this._delegate.then(t=>{t.show=e})}_bindVisibleEvent(){this._tileVisibleCallback&&this._tileVisibleCallback(),this._tileVisibleCallback=this._delegate.then(e=>{e.tileVisible.addEventListener(this._updateTile,this)})}_updateTile(e){let t=e.content;for(let r=0;r<t.featuresLength;r++){let s=t.getFeature(r);this._properties&&this._properties.length&&this._properties.forEach(o=>{s.hasProperty(o.key)&&s.getProperty(o.key)===o.keyValue&&s.setProperty(o.propertyName,o.propertyValue)})}}ready(e){return this._delegate.then(e),this}setPosition(e){return e=f.parsePosition(e),this._delegate.then(t=>{let r=i.Transforms.eastNorthUpToFixedFrame(i.Cartesian3.fromDegrees(e.lng,e.lat,e.alt)),s=i.Matrix4.fromRotationTranslation(i.Matrix3.fromHeadingPitchRoll(new i.HeadingPitchRoll(i.Math.toRadians(e.heading),i.Math.toRadians(e.pitch),i.Math.toRadians(e.roll))));i.Matrix4.multiply(r,s,r),t.root.transform=r}),this}setHeadingPitchRoll(e,t,r){return this._delegate.then(s=>{let o=s.root.transform,n=i.Matrix4.fromRotationTranslation(i.Matrix3.fromHeadingPitchRoll(new i.HeadingPitchRoll(i.Math.toRadians(e||0),i.Math.toRadians(t||0),i.Math.toRadians(r||0))));i.Matrix4.multiply(o,n,o),s.root.transform=o}),this}setLabel(e,t){return console.warn("not support this function"),this}clampToGround(){return this._delegate.then(e=>{let t=i.Cartographic.fromCartesian(e.boundingSphere.center),r=i.Cartesian3.fromRadians(t.longitude,t.latitude,t.height),s=i.Cartesian3.fromRadians(t.longitude,t.latitude,0),o=i.Cartesian3.subtract(s,r,new i.Cartesian3);e.modelMatrix=i.Matrix4.fromTranslation(o)}),this}setHeight(e,t=!1){return this._delegate.then(r=>{let s=i.Cartographic.fromCartesian(r.boundingSphere.center),o=i.Cartesian3.fromRadians(s.longitude,s.latitude,s.height),n=i.Cartesian3.fromRadians(s.longitude,s.latitude,t?e:s.height+e),l=i.Cartesian3.subtract(n,o,new i.Cartesian3);r.modelMatrix=i.Matrix4.fromTranslation(l)}),this}setScale(e){return this._delegate.then(t=>{let r=t.root.transform;e>0&&e!==1&&i.Matrix4.multiplyByUniformScale(r,e,r),t.root.transform=r}),this}setProperties(e){return this._properties=e,this._bindVisibleEvent(),this}setSplitDirection(e){return this._delegate.then(t=>{t.splitDirection=e}),this}setCustomShader(e){return this._delegate.then(t=>{t.customShader=e}),this}setClippingPolygons(e=null,t=!1){if(!e||e.length<3)return this._delegate.then(n=>{n.clippingPolygons&&(n.clippingPolygons.enabled=!1)}),this;let r=i.Cartesian3.fromDegreesArray(e),s=new i.ClippingPolygon({positions:r}),o=new i.ClippingPolygonCollection({polygons:[s],inverse:t});return this._delegate.then(n=>{n.clippingPolygons=o}),this}async setClippingPlanes(e=null,t=!1){if(!e||e.length<2)return this._delegate.then(F=>{F.clippingPlanes&&(F.clippingPlanes.enabled=!1)}),this;let r=i.Cartesian3.fromDegrees(e[1].lng,e[1].lat),s=i.Cartesian3.fromDegrees(e[0].lng,e[0].lat),o=new i.Cartesian3((r.x+s.x)/2,(r.y+s.y)/2,(r.z+s.z)/2),n=i.Cartesian3.subtract(s,r,new i.Cartesian3),l=i.Cartesian3.cross(o,n,new i.Cartesian3),h=i.Cartesian3.normalize(l,new i.Cartesian3),c=await Promise.resolve(this._delegate),p=c.boundingSphere.center,_=c.boundingSphere.radius,w=i.Transforms.eastNorthUpToFixedFrame(p),g,d=c.root.transform;d.equals(i.Matrix4.IDENTITY)?(d=w,g=i.Matrix4.inverse(w,new i.Matrix4)):g=i.Matrix4.inverse(d,new i.Matrix4);let E=new i.Cartesian3(p.x-r.x,p.y-r.y,p.z-r.z),T=i.Cartesian3.dot(E,h),b=i.Matrix4.multiplyByPointAsVector(g,h,new i.Cartesian3),M=new i.ClippingPlane(b,T),N=new i.ClippingPlaneCollection({planes:[M],unionClippingRegions:t});return c.clippingPlanes=N,{center:p,size:_,distance:T,clippingPlanes:c.clippingPlanes}}setStyle(e){return e&&e instanceof i.Cesium3DTileStyle&&(this._style=e,this._delegate.then(t=>{t.style=e})),this}on(e,t,r){return this._overlayEvent.on(e,t,r||this),this._tilesetEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this._tilesetEvent.off(e,t,r||this),this}};y.registerType("tileset");var fl=jr;var Lt=Math.PI/2,qr=class extends y{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8,this._state=m.INITIALIZED}get type(){return y.getOverlayType("attack_arrow")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getArrowHeadPoints(e,t,r){let s=C.getBaseLength(e),o=s*this.headHeightFactor,n=e[e.length-1];s=C.distance(n,e[e.length-2]);let l=C.distance(t,r);o>l*this.headTailFactor&&(o=l*this.headTailFactor);let h=o*this.headWidthFactor,c=o*this.neckWidthFactor;o=o>s?s:o;let p=o*this.neckHeightFactor,_=C.getThirdPoint(e[e.length-2],n,0,o,!0),w=C.getThirdPoint(e[e.length-2],n,0,p,!0),g=C.getThirdPoint(n,_,Lt,h,!1),d=C.getThirdPoint(n,_,Lt,h,!0),E=C.getThirdPoint(n,w,Lt,c,!1),T=C.getThirdPoint(n,w,Lt,c,!0);return[E,g,n,d,T]}_getArrowBodyPoints(e,t,r,s){let o=C.wholeDistance(e),l=C.getBaseLength(e)*s,h=C.distance(t,r),c=(l-h)/2,p=0,_=[],w=[];for(let g=1;g<e.length-1;g++){let d=C.getAngleOfThreePoints(e[g-1],e[g],e[g+1])/2;p+=C.distance(e[g-1],e[g]);let E=(l/2-p/o*c)/Math.sin(d),T=C.getThirdPoint(e[g-1],e[g],Math.PI-d,E,!0),b=C.getThirdPoint(e[g-1],e[g],d,E,!1);_.push(T),w.push(b)}return _.concat(w)}_getHierarchy(){let e=f.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1];C.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[C.mid(t,r)].concat(e.slice(2)),n=this._getArrowHeadPoints(o,t,r),l=n[0],h=n[4],c=C.distance(t,r)/C.getBaseLength(o),p=this._getArrowBodyPoints(o,l,h,c),_=p.length,w=[t].concat(p.slice(0,_/2));w.push(l);let g=[r].concat(p.slice(_/2,_));return g.push(h),w=C.getQBSplinePoints(w),g=C.getQBSplinePoints(g),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(w.concat(n,g.reverse()))))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};y.registerType("attack_arrow");var Ge=qr;var Q=Math.PI/2,Yr=class extends y{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Entity({polygon:{}}),this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this._state=m.INITIALIZED}get type(){return y.getOverlayType("double_arrow")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getArrowPoints(e,t,r,s){let o=C.mid(e,t),n=C.distance(o,r),l=C.getThirdPoint(r,o,0,n*.3,!0),h=C.getThirdPoint(r,o,0,n*.5,!0);l=C.getThirdPoint(o,l,Q,n/5,s),h=C.getThirdPoint(o,h,Q,n/4,s);let c=[o,l,h,r],p=this._getArrowHeadPoints(c),_=p[0],w=p[4],g=C.distance(e,t)/C.getBaseLength(c)/2,d=this._getArrowBodyPoints(c,_,w,g),E=d.length,T=d.slice(0,E/2),b=d.slice(E/2,E);return T.push(_),b.push(w),T=T.reverse(),T.push(t),b=b.reverse(),b.push(e),T.reverse().concat(p,b)}_getArrowHeadPoints(e){let r=C.getBaseLength(e)*this.headHeightFactor,s=e[e.length-1],o=r*this.headWidthFactor,n=r*this.neckWidthFactor,l=r*this.neckHeightFactor,h=C.getThirdPoint(e[e.length-2],s,0,r,!0),c=C.getThirdPoint(e[e.length-2],s,0,l,!0),p=C.getThirdPoint(s,h,Q,o,!1),_=C.getThirdPoint(s,h,Q,o,!0),w=C.getThirdPoint(s,c,Q,n,!1),g=C.getThirdPoint(s,c,Q,n,!0);return[w,p,s,_,g]}_getArrowBodyPoints(e,t,r,s){let o=C.wholeDistance(e),l=C.getBaseLength(e)*s,h=C.distance(t,r),c=(l-h)/2,p=0,_=[],w=[];for(let g=1;g<e.length-1;g++){let d=C.getAngleOfThreePoints(e[g-1],e[g],e[g+1])/2;p+=C.distance(e[g-1],e[g]);let E=(l/2-p/o*c)/Math.sin(d),T=C.getThirdPoint(e[g-1],e[g],Math.PI-d,E,!0),b=C.getThirdPoint(e[g-1],e[g],d,E,!1);_.push(T),w.push(b)}return _.concat(w)}_getTempPoint4(e,t,r){let s=C.mid(e,t),o=C.distance(s,r),n=C.getAngleOfThreePoints(e,s,r),l,h,c,p;return n<Q?(h=o*Math.sin(n),c=o*Math.cos(n),p=C.getThirdPoint(e,s,Q,h,!1),l=C.getThirdPoint(s,p,Q,c,!0)):n>=Q&&n<Math.PI?(h=o*Math.sin(Math.PI-n),c=o*Math.cos(Math.PI-n),p=C.getThirdPoint(e,s,Q,h,!1),l=C.getThirdPoint(s,p,Q,c,!1)):n>=Math.PI&&n<Math.PI*1.5?(h=o*Math.sin(n-Math.PI),c=o*Math.cos(n-Math.PI),p=C.getThirdPoint(e,s,Q,h,!0),l=C.getThirdPoint(s,p,Q,c,!0)):(h=o*Math.sin(Math.PI*2-n),c=o*Math.cos(Math.PI*2-n),p=C.getThirdPoint(e,s,Q,h,!0),l=C.getThirdPoint(s,p,Q,c,!1)),l}_getHierarchy(){let e=this._positions.length,t,r,s=f.parsePolygonCoordToArray(this._positions)[0],o=s[0],n=s[1],l=s[2];e===3?t=this._getTempPoint4(o,n,l):t=s[3],e===3||e===4?r=C.mid(o,n):r=s[4];let h,c;C.isClockWise(o,n,l)?(h=this._getArrowPoints(o,r,t,!1),c=this._getArrowPoints(r,n,l,!0)):(h=this._getArrowPoints(n,r,l,!1),c=this._getArrowPoints(r,o,t,!0));let p=h.length,_=(p-5)/2,w=h.slice(0,_),g=h.slice(_,_+5),d=h.slice(_+5,p),E=c.slice(0,_),T=c.slice(_,_+5),b=c.slice(_+5,p);E=C.getBezierPoints(E);let M=C.getBezierPoints(b.concat(w.slice(1)));return d=C.getBezierPoints(d),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(E.concat(T,M,g,d))))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};y.registerType("double_arrow");var Rt=Yr;var gl=Math.PI/2,Zr=class extends y{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Entity({polygon:{}}),this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13,this._state=m.INITIALIZED}get type(){return y.getOverlayType("fine_arrow")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=f.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1],s=C.getBaseLength(e),o=s*this.tailWidthFactor,n=s*this.neckWidthFactor,l=s*this.headWidthFactor,h=C.getThirdPoint(r,t,gl,o,!0),c=C.getThirdPoint(r,t,gl,o,!1),p=C.getThirdPoint(t,r,this.headAngle,l,!1),_=C.getThirdPoint(t,r,this.headAngle,l,!0),w=C.getThirdPoint(t,r,this.neckAngle,n,!1),g=C.getThirdPoint(t,r,this.neckAngle,n,!0);return new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions([h,w,p,r,_,g,c])))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};y.registerType("fine_arrow");var Ot=Zr;var vg=Math.PI/2,yl=100,Xr=class extends y{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Entity({polygon:{}}),this.t=.4,this._state=m.INITIALIZED}get type(){return y.getOverlayType("gathering_place")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=f.parsePolygonCoordToArray(this._positions)[0];if(this._positions.length===2){let n=C.mid(e[0],e[1]),l=C.distance(e[0],n)/.9,h=C.getThirdPoint(e[0],n,vg,l,!0);e=[e[0],h,e[1]]}let t=C.mid(e[0],e[2]);e.push(t,e[0],e[1]);let r=[];for(let n=0;n<e.length-2;n++){let l=e[n],h=e[n+1],c=e[n+2],p=C.getBisectorNormals(this.t,l,h,c);r=r.concat(p)}let s=r.length;r=[r[s-1]].concat(r.slice(0,s-1));let o=[];for(let n=0;n<e.length-2;n++){let l=e[n],h=e[n+1];o.push(l);for(let c=0;c<=yl;c++){let p=C.getCubicValue(c/yl,l,r[n*2],r[n*2+1],h);o.push(p)}o.push(h)}return new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(o)))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};y.registerType("gathering_place");var kt=Xr;var Jr=class extends Ge{constructor(e){super(e),this._delegate=new i.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,this.headTailFactor=.8,this.swallowTailFactor=1,this._state=m.INITIALIZED}get type(){return y.getOverlayType("tailed_attack_arrow")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=f.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1];C.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[C.mid(t,r)].concat(e.slice(2)),n=this._getArrowHeadPoints(o,t,r),l=n[0],h=n[4],c=C.distance(t,r),p=C.getBaseLength(o),_=p*this.tailWidthFactor*this.swallowTailFactor,w=C.getThirdPoint(o[1],o[0],0,_,!0),g=c/p,d=this._getArrowBodyPoints(o,l,h,g),E=d.length,T=[t].concat(d.slice(0,E/2));T.push(l);let b=[r].concat(d.slice(E/2,E));return b.push(h),T=C.getQBSplinePoints(T),b=C.getQBSplinePoints(b),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(T.concat(n,b.reverse(),[w,T[0]]))))}};y.registerType("tailed_attack_arrow");var zt=Jr;var Kr=class extends y{constructor(e,t){super(),this._position=f.parsePosition(e),this._icon=t,this._size=[32,32],this._delegate={position:void 0,image:void 0,width:0,height:0},this._state=m.INITIALIZED}get type(){return y.getOverlayType("billboard_primitive")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("Billboard Primitive: the size invalid");this._size=e,this._delegate.width=this._size[0]||32,this._delegate.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position&&delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate,e),this)}};y.registerType("billboard_primitive");var Ft=Kr;var vl={maxOffsetY:10,offsetAmount:.1},Qr=class extends Ft{constructor(e,t){super(e,t),this._currentOffset=new i.Cartesian2(0,0),this._isUp=!0,this._state=m.INITIALIZED}get type(){return y.getOverlayType("bounce_billboard_primitive")}update(e){var s,o;if(!this._show)return;let t=((s=this._style)==null?void 0:s.maxOffsetY)||vl.maxOffsetY,r=((o=this._style)==null?void 0:o.offsetAmount)||vl.offsetAmount;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-t&&(this._isUp=!1),this._currentOffset.y+=r*(this._isUp?-1:1),this._delegate.pixelOffset=this._currentOffset}destroy(){return i.destroyObject(this)}};y.registerType("bounce_billboard_primitive");var wl=Qr;var $r=class extends y{constructor(e,t){super(),this._position=f.parsePosition(e),this._text=t,this._delegate={position:void 0,text:void 0},this._state=m.INITIALIZED}get type(){return y.getOverlayType("label_primitive")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.text=this._text}get text(){return this._text}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position&&delete e.text,v.merge(this._style,e),v.merge(this._delegate,e),this)}};y.registerType("label_primitive");var Ht=$r;var Cl={maxOffsetY:10,offsetAmount:.1},es=class extends Ht{constructor(e,t){super(e,t),this._currentOffset=new i.Cartesian2(0,0),this._isUp=!0,this._state=m.INITIALIZED}get type(){return y.getOverlayType("bounce_label_primitive")}update(e){var s,o;if(!this._show)return;let t=((s=this._style)==null?void 0:s.maxOffsetY)||Cl.maxOffsetY,r=((o=this._style)==null?void 0:o.offsetAmount)||Cl.offsetAmount;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-t&&(this._isUp=!1),this._currentOffset.y+=r*(this._isUp?-1:1),this._delegate.pixelOffset=this._currentOffset}destroy(){return i.destroyObject(this)}};y.registerType("bounce_label_primitive");var Tl=es;var ts=class extends y{constructor(e){super(),this._position=f.parsePosition(e),this._delegate={position:void 0,scale:{x:12,y:8}},this._state=m.INITIALIZED}get type(){return y.getOverlayType("cloud_primitive")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate,e),this)}};y.registerType("cloud_primitive");var xl=ts;var wg={minRadius:10,minHeight:30,color:i.Color.RED,slices:128,speed:10},is=class extends y{constructor(e,t,r){super(),this._center=f.parsePosition(e),this._delegate=void 0,this._height=r,this._radius=t,this._currentHeight=r||0,this._currentRadius=10,this._style={...wg},this._state=m.INITIALIZED}get type(){return y.getOverlayType("diffuse_wall_primitive")}set center(e){this._center=f.parsePosition(e)}get center(){return this._center}set radius(e){this._radius=e}get radius(){return this._radius}set height(e){this._height=e}get height(){return this._height}_getPositions(){let e=[],t=i.Transforms.eastNorthUpToFixedFrame(u.transformWGS84ToCartesian(this._center));for(let r=0;r<this._style.slices;r++){let s=r/this._style.slices*i.Math.TWO_PI,o=Math.cos(s),n=Math.sin(s),l=new i.Cartesian3(o*this._currentRadius,n*this._currentRadius,0);e.push(i.Matrix4.multiplyByPoint(t,l,new i.Cartesian3))}return e.push(e[0]),e}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}update(e){var s;if(this._delegate=this._delegate&&this._delegate.destroy(),this._currentRadius+=this._radius/this._style.speed/20,this._currentHeight-=this._height/this._style.speed/20,(this._currentRadius>this._radius||this._currentHeight<this._style.minHeight)&&(this._currentRadius=this._style.minRadius,this._currentHeight=this._height),!this._style.slices||this._style.slices<3)return!1;let t=this._getPositions();if(!t||!t.length)return!1;let r=new i.WallGeometry({positions:t,minimumHeights:this._getHeights(t.length,0),maximumHeights:this._getHeights(t.length,this._currentHeight)});this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:r}),appearance:new i.MaterialAppearance({material:i.Material.fromType("WallDiffuse",{color:(s=this._style)==null?void 0:s.color}),flat:!0}),asynchronous:!1}),this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this)}destroy(){return i.destroyObject(this)}};y.registerType("diffuse_wall_primitive");var El=is;var rs=class extends y{constructor(e,t){super(),this._position=f.parsePosition(e),this._radius=t||{x:10,y:10,z:10},this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("elec_ellipsoid_primitive")}set position(e){this._position=f.parsePosition(e),this._delegate.geometryInstances.modelMatrix=i.Transforms.eastNorthUpToFixedFrame(u.transformWGS84ToCartesian(this._position))}get position(){return this._position}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry=new i.EllipsoidGeometry({radii:this._radius,maximumCone:i.Math.PI_OVER_TWO})}get radius(){return this._radius}_setAppearance(){var e,t;this._style&&(this._delegate.appearance=new i.MaterialAppearance({material:i.Material.fromType("EllipsoidElectric",{color:((e=this._style)==null?void 0:e.color)||i.Color.GREEN,speed:((t=this._style)==null?void 0:t.speed)||5})}))}_mountedHook(){this.radius=this._radius,this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setLabel(e,t){return this}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),this._setAppearance(),this)}};y.registerType("elec_ellipsoid_primitive");var Pl=rs;var ss=class extends y{constructor(e,t=1){super(),this._positions=f.parsePositions(e),this._width=t,this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("flow_line_primitive")}set positions(e){this._positions=f.parsePositions(e),this._delegate.geometryInstances.geometry=new i.PolylineGeometry({positions:u.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}get positions(){return this._positions}_setAppearance(){var e,t,r,s;this._delegate.appearance=new i.PolylineMaterialAppearance({material:i.Material.fromType("PolylineFlow",{color:((e=this._style)==null?void 0:e.color)||new i.Color(1,0,0,.7),speed:((t=this._style)==null?void 0:t.speed)||1,percent:((r=this._style)==null?void 0:r.percent)||.03,gradient:((s=this._style)==null?void 0:s.gradient)||.1})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setLabel(e,t){return this}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};y.registerType("flow_line_primitive");var bl=ss;var Sl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjExQTg0NDEyM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super(),this._center=f.parsePosition(e),this._length=t||100,this._topRadius=r||1,this._bottomRadius=s||50,this._delegate=new i.PrimitiveCollection,this._style={...Cg},this._state=m.INITIALIZED}get type(){return y.getOverlayType("light-cylinder-primitive")}set center(e){this._center=f.parsePosition(e),this._updatePrimitives()}get center(){return this._center}set length(e){this._length=e,this._updatePrimitives()}get length(){return this._length}set topRadius(e){this._topRadius=e,this._updatePrimitives()}get topRadius(){return this._topRadius}set bottomRadius(e){this._bottomRadius=e,this._updatePrimitives()}get bottomRadius(){return this._bottomRadius}_computeEllipsePositions(e,t){let r=i.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(e),semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0),s=i.Cartesian3.unpackArray(r.outerPositions);return s.push(s[0]),s}_createCylinderInstance(e,t,r){let s=t.slice(),o=t.length,n=2*o,l=[],h=1/(o-1),c=[],p=[],_=(g,d=0)=>{let E=i.Cartographic.fromCartesian(g);return E.height+=d,i.Cartographic.toCartesian(E)};for(let g=0;g<o;g++){p.push(_(e[g],r)),l.push(g*h,0);let d=g+1,E=(g+1)%o,T=n-d;c.push(T-1,T,g),c.push(g,E,T-1)}for(let g in p)s.push(p[o-g-1]),l.push(1-g*h,1);let w=i.PolygonGeometry.createGeometry(new i.PolygonGeometry({polygonHierarchy:new i.PolygonHierarchy(s),perPositionHeight:!0}));return w.indices=c,w.attributes.st.values=l,new i.GeometryInstance({geometry:w})}_getCircleImage(){let e=document.createElement("canvas");e.width=512,e.height=512;let t=e.getContext("2d");return t.fillStyle="rgba(255,255,255,0)",t.strokeStyle="rgba(255, 255, 255,255)",t.setLineDash([50,50]),t.lineWidth=30,t.beginPath(),t.arc(256,256,150,0,Math.PI*2,!0),t.stroke(),t.restore(),e}_getParticlesImage(e){let t=document.createElement("canvas");t.width=64,t.height=256;let r=t.getContext("2d");return r.clearRect(0,0,64,256),r.drawImage(e,0,0),r.drawImage(e,33,0),t}_updatePrimitives(){this._delegate.removeAll();let e=this._center.alt===0,t=this._computeEllipsePositions(this._center,this._topRadius),r=this._computeEllipsePositions(this._center,this._bottomRadius*.7),s=this._computeEllipsePositions(this._center,this._bottomRadius),o={geometryInstances:new i.GeometryInstance({geometry:new i.PolygonGeometry({polygonHierarchy:new i.PolygonHierarchy(this._computeEllipsePositions(this._center,this._bottomRadius*2)),perPositionHeight:!e}),asynchronous:!1})},n=e?new i.GroundPrimitive(o):new i.Primitive(o);n.appearance=new i.EllipsoidSurfaceAppearance({material:i.Material.fromType(i.Material.CircleRingType,{color:this._style.color})});let l=e?new i.GroundPrimitive(o):new i.Primitive(o);l.appearance=new i.EllipsoidSurfaceAppearance({material:i.Material.fromType(i.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});let h=new i.Primitive({geometryInstances:this._createCylinderInstance(t,r,this._length),appearance:new i.EllipsoidSurfaceAppearance({material:i.Material.fromType(i.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});e?i.GroundPrimitive.initializeTerrainHeights().then(()=>{this._delegate.add(n),this._delegate.add(l),this._delegate.add(h)}):(this._delegate.add(n),this._delegate.add(l),this._delegate.add(h)),i.Resource.fetchImage({url:Sl}).then(c=>{let p=new i.Primitive({geometryInstances:this._createCylinderInstance(t,s,this._length),appearance:new i.EllipsoidSurfaceAppearance({material:i.Material.fromType(i.Material.CylinderParticlesType,{color:this._style.color,image:this._getParticlesImage(c)})}),asynchronous:!1});this._delegate.add(p)})}_mountedHook(){this.center=this._center}update(e){this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this)}destroy(){return i.destroyObject(this)}};y.registerType("light-cylinder-primitive");var Al=os;var as=class extends y{constructor(e,t){super(),this._position=f.parsePosition(e),this._modelUrl=t,this._delegate=i.Model.fromGltfAsync({url:t}),this._modelEvent=new _r(this._delegate),this._state=m.INITIALIZED}get type(){return y.getOverlayType("model_primitive")}set position(e){this._position=f.parsePosition(e);let t=u.transformWGS84ToCartesian(this._position);this._delegate.then(r=>{r.modelMatrix=i.Transforms.headingPitchRollToFixedFrame(t,new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))})}get position(){return this._position}set modelUrl(e){this._modelUrl=e,this._delegate=i.Model.fromGltfAsync({url:e,...this._style}),this.position=this._position}get modelUrl(){return this._modelUrl}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this._delegate.then(t=>{v.merge(t,e)}),this)}on(e,t,r){return this._overlayEvent.on(e,t,r||this),this._modelEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this._modelEvent.off(e,t,r||this),this}};y.registerType("model_primitive");var Ml=as;var Il={pixelSize:8,outlineColor:i.Color.BLUE,outlineWidth:2},ns=class extends y{constructor(e){super(),this._position=f.parsePosition(e),this._delegate={position:void 0},this._state=m.INITIALIZED}get type(){return y.getOverlayType("point_primitive")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position,v.merge(this._delegate,Il,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate,Il,this._style),this)}};y.registerType("point_primitive");var Dl=ns;var ls=class extends y{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate={positions:[]},this._state=m.INITIALIZED}get type(){return y.getOverlayType("polyline_primitive")}set positions(e){this._positions=f.parsePositions(e),this._delegate.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}get center(){return ve(this._positions)}get distance(){return te(this._positions)}_mountedHook(){this.positions=this._positions}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate,e),this)}};y.registerType("polyline_primitive");var Ll=ls;var hs=class extends y{constructor(e,t){super(),this._position=f.parsePosition(e),this._radius=t,this._delegate=new i.GroundPrimitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("scan_circle_primitive")}set position(e){this._position=f.parsePosition(e),this._delegate.geometryInstances.geometry=new i.EllipseGeometry({center:u.transformWGS84ToCartesian(this._position),semiMajorAxis:this._radius,semiMinorAxis:this._radius})}get position(){return this._position}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry.semiMajorAxis=this._radius,this._delegate.geometryInstances.geometry.semiMinorAxis=this._radius}get radius(){return this._radius}_setAppearance(){var e,t;this._style&&(this._delegate.appearance=new i.MaterialAppearance({material:i.Material.fromType("CircleScan",{color:((e=this._style)==null?void 0:e.color)||i.Color.WHITE,speed:((t=this._style)==null?void 0:t.speed)||10})}))}_mountedHook(){this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};y.registerType("scan_circle_primitive");var Rl=hs;var cs=class extends y{constructor(e,t=1){super(),this._positions=f.parsePositions(e),this._width=t,this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("trail_line_primitive")}set positions(e){this._positions=f.parsePositions(e),this._delegate.geometryInstances.geometry=new i.PolylineGeometry({positions:u.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}get positions(){return this._positions}_setAppearance(){var e,t;this._delegate.appearance=new i.PolylineMaterialAppearance({material:i.Material.fromType("PolylineTrail",{color:((e=this._style)==null?void 0:e.color)||new i.Color(1,0,0,.7),speed:((t=this._style)==null?void 0:t.speed)||5})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};y.registerType("trail_line_primitive");var Ol=cs;var ps=class extends y{constructor(e,t){super(),this._positions=f.parsePositions(e),this._delegate=new i.GroundPrimitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._video=t,this._state=m.INITIALIZED}get type(){return y.getOverlayType("video_primitive")}set positions(e){var t,r,s,o;this._positions=f.parsePositions(e),this._delegate.geometryInstances.geometry=i.PolygonGeometry.fromPositions({positions:u.transformWGS84ArrayToCartesianArray(this._positions),height:(t=this._style)==null?void 0:t.height,extrudedHeight:(r=this._style)==null?void 0:r.extrudedHeight,closeTop:(s=this._style)==null?void 0:s.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:i.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get positions(){return this._positions}set video(e){this._video=e,this._setAppearance()}get video(){return this._video}_setAppearance(){this._delegate.appearance=new i.EllipsoidSurfaceAppearance({material:i.Material.fromType("Image",{image:this._video})})}_mountedHook(){this.positions=this._positions,this.video=this._video}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}};y.registerType("video_primitive");var kl=ps;var kd=hg(Od(),1),ks=class extends y{constructor(e,t,r){super(),this._viewer=e,this._horizontalViewAngle=t.horizontalViewAngle||60,this._verticalViewAngle=t.verticalViewAngle||40,this._viewPosition=t.viewPosition,this._viewPositionEnd=t.viewPositionEnd,this._viewDistance=null,this._lightCamera=null,this._viewHeading=null,this._viewPitch=null,this._orientation=null,this._outLinePrimitive=null,this._outline=!1,this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._video=r,this._init(),this._state=m.INITIALIZED}get type(){return y.getOverlayType("video_primitive")}set positions(e){this._createGeometry()}get positions(){return this._positions}set video(e){this._video=e,this._setAppearance()}get video(){return this._video}set outline(e){this._outline=e,this._outLinePrimitive.show=e}get outline(){return this._outline}_init(){this._viewDistance=i.Cartesian3.distance(this._viewPosition,this._viewPositionEnd),this._viewHeading=this._getHeading(this._viewPosition,this._viewPositionEnd),this._viewPitch=this._getPitch(this._viewPosition,this._viewPositionEnd),this._createLightCamera()}_createLightCamera(){this._lightCamera=new i.Camera(this._viewer.scene),this._lightCamera.position=this._viewPosition,this._lightCamera.frustum.near=this._viewDistance*1e-4,this._lightCamera.frustum.far=this._viewDistance;let e=i.Math.toRadians(this._horizontalViewAngle),t=i.Math.toRadians(this._verticalViewAngle),r=this._viewDistance*Math.tan(e/2)*2/(this._viewDistance*Math.tan(t/2)*2);this._lightCamera.frustum.aspectRatio=r,e>t?this._lightCamera.frustum.fov=e:this._lightCamera.frustum.fov=t,this._lightCamera.setView({destination:this._viewPosition,orientation:{heading:i.Math.toRadians(this._viewHeading||0),pitch:i.Math.toRadians(this._viewPitch||0),roll:0}})}_createGeometry(){let e=new i.Cartesian3,t=new i.Matrix3,r=new i.Quaternion,s=this._lightCamera.directionWC,o=this._lightCamera.upWC,n=this._lightCamera.rightWC;n=i.Cartesian3.negate(n,e);let l=t;i.Matrix3.setColumn(l,0,n,l),i.Matrix3.setColumn(l,1,o,l),i.Matrix3.setColumn(l,2,s,l),this._orientation=i.Quaternion.fromRotationMatrix(l,r);let h=(0,kd.default)(this._lightCamera.frustum);h.near=h.far-.01,this._delegate.geometryInstances.geometry=new i.FrustumGeometry({frustum:h,origin:this._viewPosition,orientation:this._orientation}),this._setOutlineGeometry()}_setAppearance(){this._delegate.appearance=new i.EllipsoidSurfaceAppearance({material:i.Material.fromType("Image",{image:this._video})})}_mountedHook(){this.positions=this._positions,this.video=this._video}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}_getHeading(e,t){let r=new i.Cartesian3,s=i.Transforms.eastNorthUpToFixedFrame(e);return i.Matrix4.inverse(s,s),i.Matrix4.multiplyByPoint(s,t,r),i.Cartesian3.normalize(r,r),i.Math.toDegrees(Math.atan2(r.x,r.y))}_getPitch(e,t){let r=new i.Cartesian3,s=i.Transforms.eastNorthUpToFixedFrame(e);return i.Matrix4.inverse(s,s),i.Matrix4.multiplyByPoint(s,t,r),i.Cartesian3.normalize(r,r),i.Math.toDegrees(Math.asin(r.z))}_setOutlineGeometry(e=""){let t=new i.GeometryInstance({geometry:new i.FrustumOutlineGeometry({frustum:this._lightCamera.frustum,origin:this._viewPosition,orientation:this._orientation}),attributes:{color:i.ColorGeometryInstanceAttribute.fromColor(e?i.Color.fromCssColorString(e):i.Color.BLUE)}});this._outLinePrimitive=new i.Primitive({geometryInstances:[t],appearance:new i.PerInstanceColorAppearance({flat:!0})}),this._outLinePrimitive.show=this._outline,this._viewer.scene.primitives.add(this._outLinePrimitive)}};y.registerType("video_projection_primitive");var zd=ks;var zs=class extends y{constructor(e,t=[]){super(),this._positions=f.parsePositions(e),this._holes=t.map(r=>f.parsePositions(r)),this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("water_primitive")}set positions(e){var t,r,s,o;this._positions=f.parsePositions(e),this._delegate.geometryInstances.geometry=new i.PolygonGeometry({polygonHierarchy:new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(n=>new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(n)))),height:(t=this._style)==null?void 0:t.height,extrudedHeight:(r=this._style)==null?void 0:r.extrudedHeight,closeTop:(s=this._style)==null?void 0:s.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:i.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get positions(){return this._positions}_setAppearance(){var e,t,r,s,o,n,l,h;this._style&&(this._delegate.appearance=new i.EllipsoidSurfaceAppearance({material:i.Material.fromType("Water",{baseWaterColor:((e=this._style)==null?void 0:e.baseWaterColor)||new i.Color(.2,.3,.6,1),blendColor:((t=this._style)==null?void 0:t.blendColor)||new i.Color(0,1,.699,1),specularMap:((r=this._style)==null?void 0:r.specularMap)||i.Material.DefaultImageId,normalMap:((s=this._style)==null?void 0:s.normalMap)||i.Material.DefaultImageId,frequency:((o=this._style)==null?void 0:o.frequency)||1e3,animationSpeed:((n=this._style)==null?void 0:n.animationSpeed)||.01,amplitude:((l=this._style)==null?void 0:l.amplitude)||10,specularIntensity:((h=this._style)==null?void 0:h.specularIntensity)||.5,fresnelPower:.1})}))}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};y.registerType("water_primitive");var Fd=zs;var Hd=`uniform sampler2D image;\r
2
+ uniform vec3 waterNormal;\r
3
+ uniform vec3 fresnelParams; // x\u4E3A\u6700\u5C0F\u53CD\u5C04\u7CFB\u6570\uFF0Cy\u4E3A\u6700\u5927\u53CD\u5C04\u7CFB\u6570\uFF0Cz\u4E3A\u89C6\u7EBF\u56E0\u5B50\r
4
+ uniform sampler2D specularMap;\r
5
+ uniform sampler2D normalMap;\r
6
+ uniform vec4 baseWaterColor;\r
7
+ uniform vec4 blendColor;\r
8
+ uniform float frequency;\r
9
+ uniform float animationSpeed;\r
10
+ uniform float amplitude;\r
11
+ uniform float specularIntensity;\r
12
+ uniform float fadeFactor;\r
13
+ czm_material czm_getMaterial(czm_materialInput materialInput) {\r
14
+ czm_material material = czm_getDefaultMaterial(materialInput);\r
15
+ float time = czm_frameNumber * animationSpeed;\r
16
+ // \u8870\u51CF\u662F\u4E0E\u788E\u7247\u7684\u8DDD\u79BB\u548C\u6CE2\u7684\u9891\u7387\u7684\u51FD\u6570\r
17
+ float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);\r
18
+ float specularMapValue = texture(specularMap, materialInput.st).r;\r
19
+ // \u6CE8\u610F\uFF1A\u6B64\u65F6\u4E0D\u4F7F\u7528\u65B9\u5411\u8FD0\u52A8\uFF0C\u53EA\u9700\u5C06\u89D2\u5EA6\u8BBE\u7F6E\u4E3A0.0\uFF1B\r
20
+ vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);\r
21
+ vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));\r
22
+ // \u5F53\u6211\u4EEC\u8FDC\u79BB\u6C34\u9762\u65F6\uFF0C\u6B63\u5E38\u7684\u6270\u52A8\u9010\u6E10\u6D88\u5931\r
23
+ normalTangentSpace.xy /= fade;\r
24
+ // \u6211\u4EEC\u63A5\u8FD1\u975E\u6C34\u533A\u57DF\uFF08\u4F4E\u955C\u9762\u8D34\u56FE\u503C\uFF09\u65F6\uFF0C\u5C1D\u8BD5\u6DE1\u51FA\u6B63\u5E38\u6270\u52A8\r
25
+ normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);\r
26
+ normalTangentSpace = normalize(normalTangentSpace);\r
27
+ // \u83B7\u53D6\u65B0\u6CD5\u5411\u91CF\u4E0E\u5782\u76F4\u4E8E\u5207\u5E73\u9762\u7684\u5411\u91CF\u7684\u5BF9\u9F50\u6BD4\u7387\r
28
+ float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);\r
29
+ // \u968F\u7740\u9AD8\u5149\u8D34\u56FE\u503C\u7684\u51CF\u5C11\uFF0C\u6DE1\u5316\u6C34\u7684\u6548\u679C\r
30
+ float alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;\r
31
+ // \u57FA\u7840\u8272\u662F\u6C34\u548C\u975E\u6C34\u989C\u8272\u7684\u6DF7\u5408\uFF0C\u57FA\u4E8E\u955C\u9762\u8D34\u56FE\u7684\u503C\uFF0C\u53EF\u80FD\u9700\u8981\u4E00\u4E2A\u5747\u5300\u7684\u6DF7\u5408\u56E0\u5B50\u6765\u66F4\u597D\u5730\u63A7\u5236\u8FD9\u4E00\u70B9\r
32
+ vec3 waterColor = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);\r
33
+ // \u6F2B\u5C04\u9AD8\u5149\u662F\u57FA\u4E8E\u6CD5\u7EBF\u7684\u6270\u52A8\u7A0B\u5EA6\r
34
+ waterColor += (0.1 * tsPerturbationRatio);\r
35
+ // \u83B7\u53D6\u6C34\u9762\u53CD\u5C04\u7684\u989C\u8272\r
36
+ vec2 uv = gl_FragCoord.xy / czm_viewport.zw; // \u83B7\u53D6\u5C4F\u5E55uv\r
37
+ uv.s = (1.0 - uv.s); // \u955C\u50CF\u7FFB\u8F6C\r
38
+ // \u6309\u7167\u6CD5\u7EBF\u65B9\u5411\u6765\u6270\u52A8\u53CD\u5C04\u8D34\u56FE\u7684\u7EB9\u7406\u5750\u6807\r
39
+ uv += normalTangentSpace.xz / 100.0;\r
40
+ vec3 reflectColor = texture(image, uv).rgb;\r
41
+ // \u52A0\u5165\u83F2\u6D85\u5C14\u73B0\u8C61\r
42
+ vec3 positionEC = -materialInput.positionToEyeEC;\r
43
+ vec4 positionWC = czm_inverseView * vec4(positionEC, 1.0);\r
44
+ vec3 cameraDir = normalize(positionWC.xyz - czm_viewerPositionWC);\r
45
+ vec3 n = normalize(waterNormal);\r
46
+ float fresnel = 1.0 - dot(-cameraDir, n);\r
47
+ float min_rc = fresnelParams.x; // \u7269\u4F53\u6700\u5C0F\u53CD\u5C04\u7CFB\u6570\r
48
+ float max_rc = fresnelParams.y; // \u7269\u4F53\u6700\u5927\u53CD\u5C04\u7CFB\u6570\r
49
+ float f = fresnelParams.z; // \u89C6\u7EBF\u56E0\u5B50\r
50
+ fresnel = min_rc + (max_rc - min_rc) * pow(fresnel, f);\r
51
+ // \u83F2\u6D85\u5C14\u503C\u9AD8\uFF0C\u4EE3\u8868\u53CD\u5C04\u5F3A(\u66F4\u591A\u663E\u793A\u6C34\u7684\u53CD\u5C04)\uFF0C\u503C\u4F4E\u5219\u662F\u6298\u5C04\u5F3A(\u4E5F\u53EF\u4EE5\u7406\u89E3\u6210\u66F4\u591A\u663E\u793A\u6C34\u7684\u672C\u8272)\r
52
+ material.diffuse = mix(waterColor, reflectColor, fresnel);\r
53
+ material.alpha = mix(alpha, 1.0, fresnel);\r
54
+ material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);\r
55
+ material.specular = specularIntensity;\r
56
+ material.shininess = 10.0;\r
57
+ return material;\r
58
+ }`;var Fs=class extends y{constructor(e,t=[]){super(),this._positions=f.parsePositions(e),this._holes=t.map(r=>f.parsePositions(r)),this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("reflection_reflection_water_primitive")}set positions(e){this._positions=f.parsePositions(e),this._delegate.geometryInstances.geometry=new i.PolygonGeometry({polygonHierarchy:new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(t=>new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(t)))),perPositionHeight:!0})}get positions(){return this._positions}_setAppearance(){var e,t,r,s,o,n;this._style&&(this._delegate.appearance=new i.EllipsoidSurfaceAppearance({material:new i.Material({fabric:{type:"ReflectionWaterPlane",uniforms:{image:"",waterNormal:new i.Cartesian3,fadeFactor:1,normalMap:((e=this._style)==null?void 0:e.normalMap)||i.Material.DefaultImageId,fresnelParams:new i.Cartesian3(.8,1,5),specularMap:"czm_defaultImage",blendColor:new i.Color,baseWaterColor:((t=this._style)==null?void 0:t.baseWaterColor)||new i.Color(.2,.3,.6,1),frequency:((r=this._style)==null?void 0:r.frequency)||2e3,animationSpeed:((s=this._style)==null?void 0:s.animationSpeed)||.01,amplitude:((o=this._style)==null?void 0:o.amplitude)||5,specularIntensity:((n=this._style)==null?void 0:n.specularIntensity)||.8},source:Hd}})}))}_calcCenterPoint(e,t=0){let s=e.map(l=>`${l.lng},${l.lat},${l.alt}`).join(",").split(",").map(l=>parseFloat(l));e=i.Cartesian3.fromDegreesArrayHeights(s);let o=new i.Cartesian3;e.forEach(l=>{i.Cartesian3.add(o,l,o)});let n=i.Cartesian3.multiplyByScalar(o,1/e.length,o);if(t){let l=i.Cartographic.fromCartesian(n),h=new i.Cartographic(l.longitude,l.latitude,t);n=i.Cartographic.toCartesian(h)}return n}_getMirrorCamera(e,t,r){let s=Cartesian3.subtract(r,e.position,new Cartesian3),o=-Cartesian3.dot(t,s),n=Cartesian3.multiplyByScalar(t,2*o,new Cartesian3),l=Cartesian3.subtract(e.position,n,new Cartesian3),h=Cartesian3.dot(t,e.directionWC),c=Cartesian3.multiplyByScalar(t,2*h,new Cartesian3),p=Cartesian3.subtract(e.directionWC,c,new Cartesian3);Cartesian3.normalize(p,p);let _=Cartesian3.dot(t,e.upWC),w=Cartesian3.multiplyByScalar(t,2*_,new Cartesian3),g=Cartesian3.subtract(e.upWC,w,new Cartesian3),d=i.Camera.clone(e);return d.position=l,d.up=g,d.direction=p,d.right=Cartesian3.cross(g,p,new Cartesian3),d}_renderToFbo(e,t,r){let s=t._frameState;t.globe.show=!1;let o=t.context,n=o.uniformState,l=t._defaultView.camera;t._defaultView.camera=r;let h=t._defaultView;t._view=h,t.updateFrameState(),s.passes.render=!0,s.passes.postProcess=t.postProcessStages.hasSelected;let c=new i.Cesium3DTilePassState({pass:i.Cesium3DTilePass.RENDER});s.tilesetPassState=c;let p=i.defaultValue(t.backgroundColor,i.Color.BLACK);s.backgroundColor=p,s.atmosphere=t.atmosphere,t.fog.update(s),n.update(s),t._computeCommandList.length=0,t._overlayCommandList.length=0;let _=h.viewport;_.x=0,_.y=0,_.width=o.drawingBufferWidth,_.height=o.drawingBufferHeight;let w=h.passState;w.framebuffer=e,w.blendingEnabled=void 0,w.scissorTest=void 0,w.viewport=i.BoundingRectangle.clone(_,w.viewport),t.updateEnvironment(),t.updateAndExecuteCommands(w,p),t.resolveFramebuffers(w),w.framebuffer=void 0,o.endFrame(),t.globe.show=!0,t._defaultView.camera=l}_clipAnyModel(e,t,r){let s=null,o=null;if(e instanceof Cesium3DTileset)o=e,s=Matrix4.multiply(o.modelMatrix,o.root.transform,new Matrix4),Matrix4.inverse(s,s);else if(e instanceof Model)o=e,s=Matrix4.inverse(o.modelMatrix,new Matrix4);else{if(!e.model)return;s=Transforms.eastNorthUpToFixedFrame(e.position.getValue(new i.JulianDate)),Matrix4.inverse(s,s),o=e.model}let n=new ClippingPlaneCollection,l=Plane.fromPointNormal(t,r),h=Plane.transform(l,s);return n.add(h),o.clippingPlanes=n,n}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};y.registerType("reflection_water_primitive");var Nd=Fs;var Hs=class a extends y{constructor(e,t){super(),this._delegate=new i.Entity({billboard:{}}),this._position=f.parsePosition(e),this._icon=t,this._size=[32,32],this._state=m.INITIALIZED}get type(){return y.getOverlayType("billboard")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}set size(e){if(!Array.isArray(e))throw new Error("Billboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}get size(){return this._size}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}static fromEntity(e){var o;let t,r=i.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r));return e.billboard&&(t=new a(s,e.billboard.image.getValue(r)),t.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(r)}),t}};y.registerType("billboard");var Se=Hs;var Ns=class extends y{constructor(e,t,r,s){super(),this._position=f.parsePosition(e),this._length=t,this._width=r,this._height=s,this._delegate=new i.Entity({box:{dimensions:{x:+this._length,y:+this._width,z:+this._height}}}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("box")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))}get position(){return this._position}set length(e){let t=this._delegate.box.dimensions.getValue();this._length=e||0,t.x=+this._length,this._delegate.box.dimensions.setValue(t)}get length(){return this._length}set width(e){let t=this._delegate.box.dimensions.getValue();this._width=e||0,t.y=+this._width,this._delegate.box.dimensions.setValue(t)}get width(){return this._width}set height(e){let t=this._delegate.box.dimensions.getValue();this._height=e||0,t.z=+this._height,this._delegate.box.dimensions.setValue(t)}get height(){return this._height}_mountedHook(){this.position=this._position}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.box,e),this)}};y.registerType("box");var Wd=Ns;var Ws=class extends y{constructor(e,t){super(),this._delegate=new i.Entity({polygon:{}}),this._center=f.parsePosition(e),this._radius=+t||0,this._rotateAmount=0,this._stRotation=0,this._state=m.INITIALIZED}get type(){return y.getOverlayType("circle")}set center(e){this._center=f.parsePosition(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get center(){return this._center}set radius(e){this._radius=+e,this._delegate.polygon.hierarchy=this._computeHierarchy()}get radius(){return this._radius}set rotateAmount(e){this._rotateAmount=+e,this._delegate.polygon.stRotation=new i.CallbackProperty(()=>(this._stRotation+=this._rotateAmount,(this._stRotation>=360||this._stRotation<=-360)&&(this._stRotation=0),i.Math.toRadians(this._stRotation)),!1)}get rotateAmount(){return this._rotateAmount}_computeHierarchy(){let e=new i.PolygonHierarchy,t=i.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),r=i.Cartesian3.unpackArray(t.outerPositions);return r.push(r[0]),e.positions=r,e}_mountedHook(){this.center=this._center}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this._center),this._delegate.label={...t,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};y.registerType("circle");var Kt=Ws;var Gs=class extends y{constructor(e,t,r){super(),this._viewer=e,this._delegate=new i.Entity({wall:{}}),this._center=f.parsePosition(t),this._radius=+r||0,this._heading=0,this._headingSpeed=1,this._rotateAmount=0,this._stRotation=0,this._state=m.INITIALIZED}get type(){return y.getOverlayType("volum_radar")}set center(e){this._center=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._center),this.positionArr=this._calcPoints(this._center._lng,this._center._lat,this._radius,0),this._createWallAndEllipsoid(),this._addPostRender()}get center(){return this._center}set radius(e){this._radius=+e}get radius(){return this._radius}set headingSpeed(e){this._headingSpeed=e}get headingSpeed(){return this._headingSpeed}set rotateAmount(e){}get rotateAmount(){return this._rotateAmount}_createWallAndEllipsoid(){this._delegate.wall={positions:new i.CallbackProperty(()=>i.Cartesian3.fromDegreesArrayHeights(this.positionArr),!1),material:this._style.material||i.Color.fromCssColorString("#00dcff82"),distanceDisplayCondition:this._style.distanceDisplayCondition||new i.DistanceDisplayCondition(0,105e5)},this._delegate.ellipsoid={radii:new i.Cartesian3(this._radius,this._radius,this._radius),maximumCone:i.Math.toRadians(90),material:this._style.material||i.Color.fromCssColorString("#00dcff82"),outline:this._style.outline||!0,outlineColor:this._style.material||i.Color.fromCssColorString("#00dcff82"),outlineWidth:this._style.outlineWidth||1,stackPartitions:this._style.stackPartitions||40,slicePartitions:this._style.slicePartitions||40,distanceDisplayCondition:this._style.distanceDisplayCondition||new i.DistanceDisplayCondition(0,105e5)}}_addPostRender(){this.tickListener=this._viewer.clock.onTick.addEventListener(()=>{this._heading+=this._headingSpeed,this.positionArr=this._calcPoints(this._center._lng,this._center._lat,this._radius,this._heading)})}_calcPoints(e,t,r,s){let o=i.Transforms.eastNorthUpToFixedFrame(i.Cartesian3.fromDegrees(e,t)),n=r*Math.cos(s*Math.PI/180),l=r*Math.sin(s*Math.PI/180),h=i.Cartesian3.fromElements(n,l,0),c=i.Matrix4.multiplyByPoint(o,h,new i.Cartesian3),p=i.Cartographic.fromCartesian(c),_=i.Math.toDegrees(p.longitude),w=i.Math.toDegrees(p.latitude);return this._computeCirclularFlight(e,t,_,w,0,90)}_computeCirclularFlight(e,t,r,s,o,n){let l=[];l.push(e),l.push(t),l.push(0);let h=i.Cartesian3.distance(i.Cartesian3.fromDegrees(e,t),i.Cartesian3.fromDegrees(r,s));for(let c=o;c<=o+n;c++){let p=h*Math.sin(c*Math.PI/180),_=Math.cos(c*Math.PI/180),w=(r-e)*_+e,g=(s-t)*_+t;l.push(w),l.push(g),l.push(p)}return l}_computeHierarchy(){let e=new i.PolygonHierarchy,t=i.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),r=i.Cartesian3.unpackArray(t.outerPositions);return r.push(r[0]),e.positions=r,e}_mountedHook(){this.center=this._center}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this._center),this._delegate.label={...t,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.wall,e),v.merge(this._delegate.ellipsoid,e),this)}};y.registerType("volum_radar");var Gd=Gs;var Us=class a extends y{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Entity({corridor:{}}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("corridor")}set positions(e){this._positions=f.parsePositions(e),this._delegate.corridor.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.corridor,e),this)}static fromEntity(e){var s;let t,r=i.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new a(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};y.registerType("corridor");var Ud=Us;var Bs=class extends y{constructor(e,t,r,s){super(),this._position=f.parsePosition(e),this._length=+t||0,this._topRadius=+r||0,this._bottomRadius=+s||0,this._delegate=new i.Entity({cylinder:{}}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("cylinder")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))}get position(){return this._position}set length(e){this._length=+e||0,this._delegate.cylinder.length=this._length}get length(){return this._length}set topRadius(e){this._topRadius=+e||0,this._delegate.cylinder.topRadius=this._topRadius}get topRadius(){return this._topRadius}set bottomRadius(e){this._bottomRadius=+e||0,this._delegate.cylinder.bottomRadius=this._bottomRadius}get bottomRadius(){return this._bottomRadius}_mountedHook(){this.position=this._position,this.length=this._length,this.topRadius=this._topRadius,this.bottomRadius=this._bottomRadius}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.topRadius&&delete e.bottomRadius,v.merge(this._style,e),v.merge(this._delegate.cylinder,e),this)}};y.registerType("cylinder");var Bd=Bs;var Vs=class extends y{constructor(e,t,r){super(),this._position=f.parsePosition(e),this._semiMajorAxis=+t||0,this._semiMinorAxis=+r||0,this._delegate=new i.Entity({ellipse:{}}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("ellipse")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))}get position(){return this._position}set semiMajorAxis(e){this._semiMajorAxis=+e||0,this._delegate.ellipse.semiMajorAxis=this._semiMajorAxis}get semiMajorAxis(){return this._semiMajorAxis}set semiMinorAxis(e){this._semiMinorAxis=+e||0,this._delegate.ellipse.semiMinorAxis=this._semiMinorAxis}get semiMinorAxis(){return this._semiMinorAxis}_mountedHook(){this.position=this._position,this.semiMajorAxis=this._semiMajorAxis,this.semiMinorAxis=this._semiMinorAxis}setStyle(e){return Object.keys(e).length===0?this:(delete e.semiMajorAxis&&delete e.semiMinorAxis,v.merge(this._style,e),v.merge(this._delegate.ellipse,e),this)}};y.registerType("ellipse");var Vd=Vs;var js=class extends y{constructor(e,t){super(),this._position=f.parsePosition(e),this._radius=t||{x:10,y:10,z:10},this._delegate=new i.Entity({ellipsoid:{}}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("sphere")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))}get position(){return this._position}set radius(e){this._radius=e||{x:10,y:10,z:10},this._delegate.ellipsoid.radii=this._radius}get radius(){return this._radius}_mountedHook(){this.position=this._position,this.radius=this._radius}setStyle(e){return Object.keys(e).length===0?this:(delete e.radius,v.merge(this._style,e),v.merge(this._delegate.ellipsoid,e),this)}};y.registerType("ellipsoid");var jd=js;var qs=class a extends y{constructor(e,t){super(),this._delegate=new i.Entity({label:{}}),this._position=f.parsePosition(e),this._text=t,this._state=m.INITIALIZED}get type(){return y.getOverlayType("label")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.label.text=this._text}get text(){return this._text}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,v.merge(this._style,e),v.merge(this._delegate.label,e),this)}static fromEntity(e){var o;let t=i.JulianDate.now(),r=u.transformCartesianToWGS84(e.position.getValue(t)),s;return e.billboard&&(s=new a(r,e.name),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(t)}),s}};y.registerType("label");var Qt=qs;var Ys=class extends y{constructor(e,t,r,s={}){if(super(),this._position=f.parsePosition(e),this._width=+t||100,this._height=+r||100,s.normal&&typeof s.normal=="string"){let o=String(s.normal).toLocaleUpperCase();s.normal=o==="X"?i.Cartesian3.UNIT_X:o==="Y"?i.Cartesian3.UNIT_Y:i.Cartesian3.UNIT_Z}else s.normal=i.Cartesian3.UNIT_Z;this._normal=s.normal,this._distance=s.distance||0,this._delegate=new i.Entity({plane:{dimensions:{x:this._width,y:this._height},plane:new i.Plane(this._normal,this._distance)}}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("plane")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))}get position(){return this._position}set width(e){let t=this._delegate.plane.dimensions.getValue();this._width=+e||0,t.x=this._width}get width(){return this._width}set height(e){let t=this._delegate.plane.dimensions.getValue();this._height=+e||0,t.y=this._height}get height(){return this._height}set distance(e){let t=this._delegate.plane.dimensions.getValue();this._distance=e,t.distance=e}get distance(){return this._distance}_mountedHook(){this.position=this._position,this.distance=this._distance}setStyle(e){return Object.keys(e).length===0?this:(delete e.dimensions&&delete["plane"],v.merge(this._style,e),v.merge(this._delegate.plane,e),this)}};y.registerType("plane");var qd=Ys;var Yd={pixelSize:8,outlineColor:i.Color.BLUE,outlineWidth:2},Zs=class a extends y{constructor(e){super(),this._delegate=new i.Entity({point:{}}),this._position=f.parsePosition(e),this._state=m.INITIALIZED}get type(){return y.getOverlayType("point")}set position(e){this._position=f.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position,v.merge(this._delegate.point,Yd,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate.point,Yd,this._style),this)}static fromEntity(e){var o;let t,r=i.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r));return t=new a(s),t.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(r)},t}};y.registerType("point");var $t=Zs;var Xs=class a extends y{constructor(e){super(),this._delegate=new i.Entity({polygon:{}}),this._positions=f.parsePositions(e),this._holes=[],this._state=m.INITIALIZED}get type(){return y.getOverlayType("polygon")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get positions(){return this._positions}set holes(e){e&&e.length&&(this._holes=e.map(t=>f.parsePositions(t)),this._delegate.polygon.hierarchy=this._computeHierarchy())}get holes(){return this._holes}get center(){return ve([...this._positions,this._positions[0]])}get area(){return ye(this._positions)}_computeHierarchy(){let e=new i.PolygonHierarchy;return e.positions=u.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map(t=>new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(t))),e}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...t},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}static fromEntity(e){var s;let t,r=i.JulianDate.now();if(e.polygon){let o=u.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(r).positions);t=new a(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};y.registerType("polygon");var Ae=Xs;var Js=class a extends y{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Entity({polyline:{}}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("polyline")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polyline.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}get center(){return ve(this._positions)}get distance(){return te(this._positions)}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...t},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polyline,e),this)}static fromEntity(e){var s;let t,r=i.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new a(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};y.registerType("polyline");var Me=Js;var Ks=class a extends y{constructor(e,t){super(),this._positions=f.parsePositions(e),this._shape=t||[],this._delegate=new i.Entity({polylineVolume:{}}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("polyline_volume")}set positions(e){this._positions=f.parsePositions(e),this._delegate.polylineVolume.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}set shape(e){this._shape=e||[],this._delegate.polylineVolume.shape=this._shape}get shape(){return this._shape}_mountedHook(){this.positions=this._positions,this.shape=this._shape}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions&&delete e.shape,v.merge(this._style,e),v.merge(this._delegate.polylineVolume,e),this)}static fromEntity(e,t){var o;let r,s=i.JulianDate.now();if(e.polyline){let n=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));r=new a(n,t),r.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}}return r}};y.registerType("polyline_volume");var Zd=Ks;var Qs=class extends y{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Entity({rectangle:{}}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("rect")}set positions(e){this._positions=f.parsePositions(e),this._delegate.rectangle.coordinates=i.Rectangle.fromCartesianArray(u.transformWGS84ArrayToCartesianArray(this._positions))}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){let r=this._delegate.rectangle.coordinates.getValue();return this._delegate.position=i.Cartographic.toCartesian(i.Rectangle.center(r,new i.Cartographic)),this._delegate.label={...t,text:e},this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.rectangle,e),this)}};y.registerType("rect");var ei=Qs;var $s=class a extends y{constructor(e){super(),this._positions=f.parsePositions(e),this._delegate=new i.Entity({wall:{}}),this._state=m.INITIALIZED}get type(){return y.getOverlayType("wall")}set positions(e){this._positions=f.parsePositions(e),this._delegate.wall.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.wall,e),this)}static fromEntity(e){var s;let t,r=i.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new a(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};y.registerType("wall");var Xd=$s;var eo=class extends S{constructor(e,t,r={}){if(!t)throw new Error("GeoJsonLayer\uFF1Athe url invalid");super(e),this._delegate=i.GeoJsonDataSource.load(t,r),this._state=m.INITIALIZED}get type(){return S.getLayerType("geojson")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}_createBillboard(e){if(e.position&&e.billboard)return Se.fromEntity(e)}_createPolyline(e){if(e.polyline)return Me.fromEntity(e)}_createPolygon(e){if(e.polygon)return Ae.fromEntity(e)}_createModel(e,t){if(e)return We.fromEntity(e,t)}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}toVectorLayer(){let e=new fe(this.id);return this.eachOverlay(t=>{t.billboard?e.addOverlay(this._createBillboard(t)):t.polyline?e.addOverlay(this._createPolyline(t)):t.polygon&&e.addOverlay(this._createPolygon(t))},this),e}toModelLayer(e){let t=new fe(this.id);return this.eachOverlay(r=>{t.addOverlay(this._createModel(r,e))},this),t}};S.registerType("geojson");var ti=eo;var to=class extends S{constructor(e,t,r={}){if(!t)throw new Error("Shp2JsonLayer\uFF1Athe url invalid");if(!oe("shpUtil"))throw new Error("miss the shpUtil lib");super(e);let o=this._init(t,r);this._delegate=i.GeoJsonDataSource.load(o,r),this._state=m.INITIALIZED}async _init(e,t){var s;return await shpUtil.toGeoJSON(e,void 0,(s=t.encoding)!=null?s:"gbk",t.crs)}get type(){return S.getLayerType("shp")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}_createBillboard(e){if(e.position&&e.billboard)return Se.fromEntity(e)}_createPolyline(e){if(e.polyline)return Me.fromEntity(e)}_createPolygon(e){if(e.polygon)return Ae.fromEntity(e)}_createModel(e,t){if(e)return We.fromEntity(e,t)}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}toVectorLayer(){let e=new fe(this.id);return this.eachOverlay(t=>{t.billboard?e.addOverlay(this._createBillboard(t)):t.polyline?e.addOverlay(this._createPolyline(t)):t.polygon&&e.addOverlay(this._createPolygon(t))},this),e}toModelLayer(e){let t=new fe(this.id);return this.eachOverlay(r=>{t.addOverlay(this._createModel(r,e))},this),t}};S.registerType("shp");var Jd=to;var io=class extends S{constructor(e,t,r={}){if(!t)throw new Error("GpxLayer: the url is empty");super(e),this._delegate=i.KmlDataSource.load(t,r),this._state=m.INITIALIZED}get type(){return S.getLayerType("gpx")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};S.registerType("gpx");var Kd=io;var Yx={radialColor:i.Color.WHITE,radialWidth:2,showRadial:!0,LabelColor:i.Color.YELLOW,weftColor:i.Color.WHITE,weftWidth:2},ro=class extends S{constructor(e,t){super(e),this._options={...Yx,...t},this._delegate=new i.CustomDataSource(e),this._state=m.INITIALIZED}get type(){return S.getLayerType("graticule")}_addedHook(){for(let e=0;e<36;e++)this._delegate.entities.add({polyline:{positions:i.Cartesian3.fromDegreesArray([e*10,89.5,e*10,-89.5]),material:this._options.radialColor,width:this._options.radialWidth},show:this._options.showRadial}),this._delegate.entities.add({position:i.Cartesian3.fromDegrees(e*10,0),label:{text:e*10+"\xB0",font:"12px",fillColor:this._options.LabelColor}});for(let e=0;e<18;e++){let t=[];for(let r=0;r<129;r++)t.push(-180+r*(360/128),(e<9?e:-e)*10);this._delegate.entities.add({polyline:{positions:i.Cartesian3.fromDegreesArray(t),material:this._options.weftColor,width:this._options.weftWidth}})}}};S.registerType("graticule");var Qd=ro;var so=class extends S{constructor(e){super(e),this._delegate=new i.PrimitiveCollection,this._isGround=!0,this._state=m.INITIALIZED}get type(){return S.getLayerType("ground_primitive")}clear(){return this._delegate&&this._delegate.removeAll(),this._cache={},this._state=m.CLEARED,this}};S.registerType("ground_primitive");var $d=so;var oo=class extends S{constructor(e){super(e),this._delegate=A.create("div","html-layer",void 0),this._delegate.setAttribute("id",this._id),this._renderRemoveCallback=void 0,this._state=m.INITIALIZED}get type(){return S.getLayerType("html")}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden",Object.keys(this._cache).forEach(t=>{this._cache[t].show=e})}get show(){return this._show}_onAdd(e){this._viewer=e,this._viewer.layerContainer.appendChild(this._delegate);let t=this._viewer.scene;this._renderRemoveCallback=t.postRender.addEventListener(()=>{let r=this._viewer.camera.positionWC,s=this._viewer.camera.direction,o=this._viewer.getOffset();this.eachOverlay(n=>{if(n&&n.position){let l=u.transformWGS84ToCartesian(n.position),h=t.globe.ellipsoid.geodeticSurfaceNormal(l,new i.Cartesian3),c=i.SceneTransforms.worldToWindowCoordinates(t,l);c&&(c.x+=o.x,c.y+=o.y),n._updateStyle(c,i.Cartesian3.distance(l,r),i.Cartesian3.dot(s,h)<=0)}},this)},this),this._state=m.ADDED}_onRemove(){this._renderRemoveCallback&&this._renderRemoveCallback(),this._viewer.layerContainer.removeChild(this._delegate),this._state=m.REMOVED}clear(){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);return this._cache={},this._state=m.CLEARED,this}};S.registerType("html");var em=oo;var ao=class extends S{constructor(e){super(e),this._delegate=new i.PrimitiveCollection,this._state=m.INITIALIZED}get type(){return S.getLayerType("i3s")}clear(){return this._delegate.removeAll(),this._cache={},this._state=m.CLEARED,this}};S.registerType("i3s");var tm=ao;var no=class extends S{constructor(e,t,r={}){if(!t)throw new Error("KmlLayer: the url is empty");super(e),this._delegate=i.KmlDataSource.load(t,r),this._state=m.INITIALIZED}get type(){return S.getLayerType("kml")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};S.registerType("kml");var im=no;var lo=class extends S{constructor(e,t=""){super(e),this._dataSource=i.GeoJsonDataSource.load(t),this._delegate=new i.CustomDataSource(e),this._initLabel(),this._state=m.INITIALIZED}get type(){return S.getLayerType("label")}_createLabel(e){if(e.position&&e.name)return Qt.fromEntity(e)}_initLabel(){this._dataSource.then(e=>{e.entities.values.forEach(r=>{let s=this._createLabel(r);this.addOverlay(s)})})}};S.registerType("label");var rm=lo;var ho=class extends S{constructor(e){super(e),this._delegate=new i.PrimitiveCollection,this._points=this._delegate.add(new i.PointPrimitiveCollection),this._labels=this._delegate.add(new i.LabelCollection),this._billboards=this._delegate.add(new i.BillboardCollection),this._polylines=this._delegate.add(new i.PolylineCollection),this._clouds=this._delegate.add(new i.CloudCollection),this._state=m.INITIALIZED}get type(){return S.getLayerType("primitive")}get points(){return this._points}get labels(){return this._labels}get billboards(){return this._billboards}get polylines(){return this._polylines}get clouds(){return this._clouds}clear(){return this._delegate&&this._delegate.removeAll(),this._points=this._delegate.add(new i.PointPrimitiveCollection),this._labels=this._delegate.add(new i.LabelCollection),this._billboards=this._delegate.add(new i.BillboardCollection),this._polylines=this._delegate.add(new i.PolylineCollection),this._clouds=this._delegate.add(new i.CloudCollection),this._cache={},this._state=m.CLEARED,this}};S.registerType("primitive");var sm=ho;var co=class extends S{constructor(e,t,r){super(e),this._delegate=i.ImageryLayer.fromProviderAsync(t,r),this._state=m.INITIALIZED}get type(){return S.getLayerType("raster-tile")}};S.registerType("raster-tile");var om=co;var po=class extends S{constructor(e){super(e),this._delegate=new i.PrimitiveCollection,this._state=m.INITIALIZED}get type(){return S.getLayerType("tileset")}clear(){return this._delegate.removeAll(),this._cache={},this._state=m.CLEARED,this}};S.registerType("tileset");var am=po;ti.registerType("topojson");var mo=class extends S{constructor(e,t){if(!oe("echarts"))throw new Error("miss the echarts lib");super(e),this._option=t,this._delegate=void 0,this._chart=void 0}set show(e){this._show=e,this._delegate.style.visibility=e?"visible":"hidden"}get show(){return this._show}_createChartElement(){let e=this._viewer.scene.canvas,t=document.createElement("div");return t.setAttribute("id",this._id),t.setAttribute("data-layer-type","chart-layer"),t.style.cssText=`position:absolute; top:0; left:0; width: ${e.clientWidth}px; height: ${e.clientHeight}px;pointer-events:none;`,this._viewer.layerContainer.appendChild(t),t}_onAdd(e){let t=oe("echarts");this._viewer=e,this._viewer.canvas.setAttribute("tabIndex","0"),this._delegate=this._createChartElement(),this._chart=t.init(this._delegate),Object(this._chart.getZr()).viewer=e,this._option&&this._chart.setOption({...this._option,GLMap:{},animation:!1}),this._state=m.ADDED}_onRemove(){this._delegate&&this._viewer&&(this._chart.dispose(),this._viewer.layerContainer.removeChild(this._delegate),this._state=m.REMOVED)}setOption(e={}){return this._option=e,this._chart&&this._chart.setOption({...e,GLMap:{},animation:!1}),this}clear(){return this._chart.clear(),this}resize(){return this._chart.resize(),this}},nm=mo;var{Cartesian3:ii,Ellipsoid:Zx,Math:lm}=i;function hm(a){function e(t){this._api=t,this._viewer=Object(t.getZr()).viewer,this._mapOffset=[0,0],this.dimensions=["lng","lat"]}return e.prototype.getViewer=function(){return this._viewer},e.prototype.setMapOffset=function(t){return this._mapOffset=t,this},e.prototype.dataToPoint=function(t){let r=[],s=ii.fromDegrees(t[0],t[1]);if(!s)return r;let o=Zx.WGS84.geodeticSurfaceNormal(s,new ii),n=this._viewer.camera.direction;if(ii.dot(o,n)>=0)return r;let l=this._viewer.scene.cartesianToCanvasCoordinates(s);return l?[l.x-this._mapOffset[0],l.y-this._mapOffset[1]]:r},e.prototype.pointToData=function(t){let r=this._viewer.scene.globe.ellipsoid,s=new ii(t[0]+this._mapOffset[0],t[1]+this._mapOffset[1],0),o=r.cartesianToCartographic(s);return[lm.toDegrees(o.longitude),lm.toDegrees(o.latitude)]},e.prototype.getViewRect=function(){let t=this._api;return new a.graphic.BoundingRect(0,0,t.getWidth(),t.getHeight())},e.prototype.getRoamTransform=function(){return a.matrix.create()},e.create=function(t,r){let s;t.eachComponent("GLMap",function(o){s=new e(r),s.setMapOffset(o.__mapOffset||[0,0]),o.coordinateSystem=s}),t.eachSeries(function(o){o.get("coordinateSystem")==="GLMap"&&(o.coordinateSystem=s)})},e.dimensions=["lng","lat"],e}function cm(a){let{registerAction:e,registerCoordinateSystem:t,extendComponentModel:r,extendComponentView:s}=a;r({type:"GLMap",getViewer(){return Object(this.getZr()).viewer},defaultOption:{roam:!1}}),s({type:"GLMap",init:function(o,n){this.api=n,n.getZr().viewer.clock.onTick.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.getZr().dom.style.visibility!=="hidden"&&this.api.dispatchAction({type:"GLMapRoam"})},render:function(o,n,l){},dispose:function(){this.api.getZr().viewer.clock.onTick.removeEventListener(this.moveHandler,this)}}),t("GLMap",hm(a)),e({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(o,n){})}var Xx={LEFT_MIDDLE:0,LEFT_RIGHT:1},Ie=Xx;var uo=class{constructor(e){this._viewer=e,this._options={}}_setViewerOption(){var e,t,r;return this._viewer.delegate.shadows=(t=(e=this._options)==null?void 0:e.shadows)!=null?t:!1,this._viewer.delegate.resolutionScale=((r=this._options)==null?void 0:r.resolutionScale)||1,this}_setCanvasOption(){return this._options.tabIndex&&this._viewer.scene.canvas.setAttribute("tabIndex",this._options.tabIndex),this}_setSceneOption(){var t,r,s,o;let e=this._viewer.scene;return e.skyAtmosphere.show=(t=this._options.showAtmosphere)!=null?t:!0,e.sun.show=(r=this._options.showSun)!=null?r:!0,e.moon.show=(s=this._options.showMoon)!=null?s:!0,e.postProcessStages.fxaa.enabled=(o=this._options.enableFxaa)!=null?o:!1,e.msaaSupported&&(e.msaaSamples=+this._options.msaaSamples||1),this}_setSkyBoxOption(){var t;if(!this._options.skyBox)return this;let e=this._options.skyBox;if(e instanceof i.SkyBox)this._viewer.scene.skyBox=e;else{let r=this._viewer.scene.skyBox;r.show=(t=e.show)!=null?t:!0,e.offsetAngle&&(r.offsetAngle=e.offsetAngle),e!=null&&e.sources&&(r.sources=e.sources)}return this}_setGlobeOption(){var r,s,o,n,l,h,c,p,_,w,g,d;if(!this._options.globe)return this;let e=this._viewer.scene.globe,t=this._options.globe;if(v.merge(e,{show:(r=t==null?void 0:t.show)!=null?r:!0,showGroundAtmosphere:(s=t==null?void 0:t.showGroundAtmosphere)!=null?s:!0,enableLighting:(o=t==null?void 0:t.enableLighting)!=null?o:!1,depthTestAgainstTerrain:(n=t==null?void 0:t.depthTestAgainstTerrain)!=null?n:!1,tileCacheSize:+(t==null?void 0:t.tileCacheSize)||100,preloadSiblings:(l=t==null?void 0:t.preloadSiblings)!=null?l:!1,showSkirts:(h=t==null?void 0:t.showSkirts)!=null?h:!0,baseColor:(t==null?void 0:t.baseColor)||new i.Color(0,0,.5,1),terrainExaggeration:(t==null?void 0:t.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(t==null?void 0:t.terrainExaggerationRelativeHeight)||0}),v.merge(e.translucency,{enabled:(p=(c=t==null?void 0:t.translucency)==null?void 0:c.enabled)!=null?p:!1,backFaceAlpha:+((_=t==null?void 0:t.translucency)==null?void 0:_.backFaceAlpha)||1,backFaceAlphaByDistance:(w=t==null?void 0:t.translucency)==null?void 0:w.backFaceAlphaByDistance,frontFaceAlpha:+((g=t==null?void 0:t.translucency)==null?void 0:g.frontFaceAlpha)||1,frontFaceAlphaByDistance:(d=t==null?void 0:t.translucency)==null?void 0:d.frontFaceAlphaByDistance}),t!=null&&t.filterColor){let E=this._viewer.scene.globe._surfaceShaderSet.baseFragmentShaderSource,T=E.sources.pop();E.sources.push(T.replace("out_FragColor = finalColor;",`out_FragColor = finalColor * vec4${t.filterColor.toString()};`))}return this}_setCameraController(){var r,s,o,n,l,h,c;if(!((r=this._options)!=null&&r.cameraController))return this;let e=this._viewer.scene.screenSpaceCameraController,t=this._options.cameraController;return v.merge(e,{enableInputs:(s=t==null?void 0:t.enableInputs)!=null?s:!0,enableRotate:(o=t==null?void 0:t.enableRotate)!=null?o:!0,enableTilt:(n=t==null?void 0:t.enableTilt)!=null?n:!0,enableTranslate:(l=t==null?void 0:t.enableTranslate)!=null?l:!0,enableZoom:(h=t==null?void 0:t.enableZoom)!=null?h:!0,enableCollisionDetection:(c=t==null?void 0:t.enableCollisionDetection)!=null?c:!0,minimumZoomDistance:+(t==null?void 0:t.minimumZoomDistance)||1,maximumZoomDistance:+(t==null?void 0:t.maximumZoomDistance)||40489014}),this}setOptions(e){return Object.keys(e).length===0?this:(this._options={...this._options,...e},this._setViewerOption()._setCanvasOption()._setSceneOption()._setSkyBoxOption()._setGlobeOption()._setCameraController(),this)}},_o=uo;var fo=class{constructor(e){this._viewer=e,this._mouseMode=0}setPitchRange(e,t){let r=new i.ScreenSpaceEventHandler(this._viewer.scene.canvas);this._viewer.scene.mode===i.SceneMode.SCENE3D&&(r.setInputAction(s=>{r.setInputAction(o=>{let n=!0,l=o.endPosition.y<o.startPosition.y;l&&this._viewer.camera.pitch>i.Math.toRadians(t)||!l&&this._viewer.camera.pitch<i.Math.toRadians(e)?n=!1:n=!0,this._viewer.scene.screenSpaceCameraController.enableTilt=n},i.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===Ie.LEFT_MIDDLE?i.ScreenSpaceEventType.MIDDLE_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN),r.setInputAction(s=>{this._viewer.scene.screenSpaceCameraController.enableTilt=!0,r.removeInputAction(i.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===Ie.LEFT_MIDDLE?i.ScreenSpaceEventType.MIDDLE_UP:i.ScreenSpaceEventType.RIGHT_UP))}changeMouseMode(e){this._mouseMode=e||Ie.LEFT_MIDDLE,e===Ie.LEFT_MIDDLE?(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[i.CameraEventType.MIDDLE_DRAG,i.CameraEventType.PINCH,{eventType:i.CameraEventType.LEFT_DRAG,modifier:i.KeyboardEventModifier.CTRL},{eventType:i.CameraEventType.RIGHT_DRAG,modifier:i.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[i.CameraEventType.RIGHT_DRAG,i.CameraEventType.WHEEL,i.CameraEventType.PINCH]):e===Ie.LEFT_RIGHT&&(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[i.CameraEventType.RIGHT_DRAG,i.CameraEventType.PINCH,{eventType:i.CameraEventType.LEFT_DRAG,modifier:i.KeyboardEventModifier.CTRL},{eventType:i.CameraEventType.RIGHT_DRAG,modifier:i.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[i.CameraEventType.WHEEL,i.CameraEventType.PINCH])}},go=fo;var Jx={},yo=Jx;var vo=class{constructor(){this._viewer=void 0,this._enable=!1,this._wrapper=void 0,this._ready=!1}set enable(e){this._enable!==e&&(this._enable=e,this._state=this._enable?m.ENABLED:m.DISABLED,this._enableHook&&this._enableHook())}get enable(){return this._enable}get state(){return this._state}_mountContent(){}_bindEvent(){}_unbindEvent(){}_enableHook(){!this._ready&&this._mountContent(),this._enable?(!this._wrapper.parentNode&&this._viewer.widgetContainer.appendChild(this._wrapper),this._bindEvent()):(this._unbindEvent(),this._wrapper.parentNode&&this._viewer.widgetContainer.removeChild(this._wrapper))}_updateWindowCoord(e){}_installHook(){}_getViewerOffset(){return this._viewer?this._viewer.getOffset():{x:0,y:0}}install(e){this._viewer=e,this._installHook&&this._installHook(),this._state=m.INSTALLED}setWrapper(e){return this}setContent(e){if(e&&typeof e=="string")this._wrapper.innerHTML=e;else if(e&&e instanceof Element){for(;this._wrapper.hasChildNodes();)this._wrapper.removeChild(this._wrapper.firstChild);this._wrapper.appendChild(e)}return this}hide(){this._wrapper&&(this._wrapper.style.cssText=`
61
59
  visibility:hidden;
62
- `)}static registerType(e){e&&(as[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getWidgetType(e){return as[e.toLocaleUpperCase()]||void 0}},M=ns;var ls=class extends M{constructor(){super(),this._wrapper=S.create("div","widget context-menu"),this._ulEl=void 0,this._handler=void 0,this._overlay=void 0,this._position=void 0,this._wgs84Position=void 0,this._surfacePosition=void 0,this._wgs84SurfacePosition=void 0,this._windowPosition=void 0,this._instanceId=void 0,this._config={},this._defaultMenu=[{label:"\u98DE\u5230\u9ED8\u8BA4\u4F4D\u7F6E",callback:()=>{this._viewer.camera.flyHome(1.5)},context:this},{label:"\u53D6\u6D88\u98DE\u884C",callback:()=>{this._viewer.camera.cancelFlight()},context:this}],this._overlayMenu=[],this._state=d.INITIALIZED}get type(){return M.getWidgetType("contextmenu")}set DEFAULT_MENU(e){this._defaultMenu=e}set config(e){this._config=e,e.customClass&&this._setCustomClass()}_installHook(){let e=this;Object.defineProperty(this._viewer,"contextMenu",{get(){return e}}),this._handler=new i.ScreenSpaceEventHandler(this._viewer.canvas)}_bindEvent(){this._handler.setInputAction(e=>{this._onRightClick(e)},i.ScreenSpaceEventType.RIGHT_CLICK),this._handler.setInputAction(e=>{this._onClick(e)},i.ScreenSpaceEventType.LEFT_CLICK)}_unbindEvent(){this._handler.removeInputAction(i.ScreenSpaceEventType.RIGHT_CLICK),this._handler.removeInputAction(i.ScreenSpaceEventType.LEFT_CLICK)}_mountContent(){this._ulEl=S.create("ul","menu-list",this._wrapper),this._ready=!0}_mountMenu(){for(;this._ulEl.hasChildNodes();)this._ulEl.removeChild(this._ulEl.firstChild);this._overlayMenu&&this._overlayMenu.length&&this._overlayMenu.forEach(e=>{this._addMenuItem(e.label,e.callback,e.context||this)}),this._defaultMenu&&this._defaultMenu.length&&this._defaultMenu.forEach(e=>{this._addMenuItem(e.label,e.callback,e.context||this)})}_onRightClick(e){var s;if(!this._enable)return;this._overlay=void 0;let t=this._viewer.scene;this._windowPosition=e.position;let r=t.pick(e.position);if(t.pickPositionSupported&&(this._position=t.pickPosition(e.position)),this._position){let o=i.Ellipsoid.WGS84.cartesianToCartographic(this._position);o&&(this._wgs84Position={lng:i.Math.toDegrees(o.longitude),lat:i.Math.toDegrees(o.latitude),alt:o.height})}if(t.mode===i.SceneMode.SCENE3D){let o=t.camera.getPickRay(e.position);this._surfacePosition=t.globe.pick(o,t)}else this._surfacePosition=t.camera.pickEllipsoid(e.position,i.Ellipsoid.WGS84);if(this._surfacePosition){let o=i.Ellipsoid.WGS84.cartesianToCartographic(this._surfacePosition);o&&(this._wgs84SurfacePosition={lng:i.Math.toDegrees(o.longitude),lat:i.Math.toDegrees(o.latitude),alt:o.height})}if(this._instanceId=r==null?void 0:r.instanceId,(r==null?void 0:r.id)instanceof i.Entity){let o=this._viewer.getLayers().filter(a=>a.layerId===r.id.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.id.overlayId))}else if(r instanceof i.Cesium3DTileFeature){let o=this._viewer.getLayers().filter(a=>a.layerId===r.tileset.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.tileset.overlayId))}else if((r==null?void 0:r.primitive)instanceof i.Cesium3DTileset){let o=this._viewer.getLayers().filter(a=>a.layerId===r.primitive.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.primitive.overlayId))}else if(r!=null&&r.primitive){let o=this._viewer.getLayers().filter(a=>a.layerId===r.primitive.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.primitive.overlayId))}this._overlayMenu=((s=this._overlay)==null?void 0:s.contextMenu)||[],this._mountMenu(),this._updateWindowCoord(e.position)}_onClick(e){this.hide()}_updateWindowCoord(e){let t=this._ulEl.hasChildNodes()?"visible":"hidden",{x:r,y:s}=e,o=this._getViewerOffset();r+=o.x,s+=o.y,this._wrapper.style.cssText=`
60
+ `)}static registerType(e){e&&(yo[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getWidgetType(e){return yo[e.toLocaleUpperCase()]||void 0}},I=vo;var wo=class extends I{constructor(){super(),this._wrapper=A.create("div","widget context-menu"),this._ulEl=void 0,this._handler=void 0,this._overlay=void 0,this._position=void 0,this._wgs84Position=void 0,this._surfacePosition=void 0,this._wgs84SurfacePosition=void 0,this._windowPosition=void 0,this._instanceId=void 0,this._config={},this._defaultMenu=[{label:"\u98DE\u5230\u9ED8\u8BA4\u4F4D\u7F6E",callback:()=>{this._viewer.camera.flyHome(1.5)},context:this},{label:"\u53D6\u6D88\u98DE\u884C",callback:()=>{this._viewer.camera.cancelFlight()},context:this}],this._overlayMenu=[],this._state=m.INITIALIZED}get type(){return I.getWidgetType("contextmenu")}set DEFAULT_MENU(e){this._defaultMenu=e}set config(e){this._config=e,e.customClass&&this._setCustomClass()}_installHook(){let e=this;Object.defineProperty(this._viewer,"contextMenu",{get(){return e}}),this._handler=new i.ScreenSpaceEventHandler(this._viewer.canvas)}_bindEvent(){this._handler.setInputAction(e=>{this._onRightClick(e)},i.ScreenSpaceEventType.RIGHT_CLICK),this._handler.setInputAction(e=>{this._onClick(e)},i.ScreenSpaceEventType.LEFT_CLICK)}_unbindEvent(){this._handler.removeInputAction(i.ScreenSpaceEventType.RIGHT_CLICK),this._handler.removeInputAction(i.ScreenSpaceEventType.LEFT_CLICK)}_mountContent(){this._ulEl=A.create("ul","menu-list",this._wrapper),this._ready=!0}_mountMenu(){for(;this._ulEl.hasChildNodes();)this._ulEl.removeChild(this._ulEl.firstChild);this._overlayMenu&&this._overlayMenu.length&&this._overlayMenu.forEach(e=>{this._addMenuItem(e.label,e.callback,e.context||this)}),this._defaultMenu&&this._defaultMenu.length&&this._defaultMenu.forEach(e=>{this._addMenuItem(e.label,e.callback,e.context||this)})}_onRightClick(e){var s;if(!this._enable)return;this._overlay=void 0;let t=this._viewer.scene;this._windowPosition=e.position;let r=t.pick(e.position);if(t.pickPositionSupported&&(this._position=t.pickPosition(e.position)),this._position){let o=i.Ellipsoid.WGS84.cartesianToCartographic(this._position);o&&(this._wgs84Position={lng:i.Math.toDegrees(o.longitude),lat:i.Math.toDegrees(o.latitude),alt:o.height})}if(t.mode===i.SceneMode.SCENE3D){let o=t.camera.getPickRay(e.position);this._surfacePosition=t.globe.pick(o,t)}else this._surfacePosition=t.camera.pickEllipsoid(e.position,i.Ellipsoid.WGS84);if(this._surfacePosition){let o=i.Ellipsoid.WGS84.cartesianToCartographic(this._surfacePosition);o&&(this._wgs84SurfacePosition={lng:i.Math.toDegrees(o.longitude),lat:i.Math.toDegrees(o.latitude),alt:o.height})}if(this._instanceId=r==null?void 0:r.instanceId,(r==null?void 0:r.id)instanceof i.Entity){let o=this._viewer.getLayers().filter(n=>n.layerId===r.id.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.id.overlayId))}else if(r instanceof i.Cesium3DTileFeature){let o=this._viewer.getLayers().filter(n=>n.layerId===r.tileset.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.tileset.overlayId))}else if((r==null?void 0:r.primitive)instanceof i.Cesium3DTileset){let o=this._viewer.getLayers().filter(n=>n.layerId===r.primitive.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.primitive.overlayId))}else if(r!=null&&r.primitive){let o=this._viewer.getLayers().filter(n=>n.layerId===r.primitive.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.primitive.overlayId))}this._overlayMenu=((s=this._overlay)==null?void 0:s.contextMenu)||[],this._mountMenu(),this._updateWindowCoord(e.position)}_onClick(e){this.hide()}_updateWindowCoord(e){let t=this._ulEl.hasChildNodes()?"visible":"hidden",{x:r,y:s}=e,o=this._getViewerOffset();r+=o.x,s+=o.y,this._wrapper.style.cssText=`
63
61
  visibility:${t};
64
62
  z-index:1;
65
63
  transform:translate3d(${Math.round(r)}px,${Math.round(s)}px, 0);
66
- `}_setCustomClass(){S.setClass(this._wrapper,`dc-context-menu ${this._config.customClass}`)}_addMenuItem(e,t,r){if(!e||!t)return this;let s=S.create("li","menu-item",null),o=S.create("a","",s);o.innerHTML=e,o.href="javascript:void(0)";let a=this;return t&&(o.onclick=()=>{t.call(r,{windowPosition:a._windowPosition,position:a._position,wgs84Position:a._wgs84Position,surfacePosition:a._surfacePosition,wgs84SurfacePosition:a._wgs84SurfacePosition,overlay:a._overlay,instanceId:a._instanceId}),a.hide()}),this._ulEl.appendChild(s),this}};M.registerType("contextmenu");var Jn=ls;var hs=class extends M{constructor(){super(),this._wrapper=S.create("div","widget location-bar"),this._mouseEl=void 0,this._cameraEl=void 0,this._fpsEl=void 0,this._msEl=void 0,this._lastMouseSampleTime=i.getTimestamp(),this._lastCameraSampleTime=i.getTimestamp(),this._lastFpsSampleTime=i.getTimestamp(),this._lastMsSampleTime=i.getTimestamp(),this._fpsFrameCount=0,this._msFrameCount=0,this._state=d.INITIALIZED}get type(){return M.getWidgetType("location_bar")}_installHook(){let e=this;Object.defineProperty(this._viewer,"locationBar",{get(){return e}})}_bindEvent(){this._viewer.on(L.MOUSE_MOVE,this._onMove,this),this._viewer.on(A.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.on(A.POST_UPDATE,this._onPostUpdate,this)}_unbindEvent(){this._viewer.off(L.MOUSE_MOVE,this._onMove,this),this._viewer.off(A.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.off(A.POST_UPDATE,this._onPostUpdate,this)}_mountContent(){this._mouseEl=S.create("div","mouse-bar",this._wrapper),this._cameraEl=S.create("div","camera-bar",this._wrapper),this._msEl=S.create("div","ms-bar",this._wrapper),this._fpsEl=S.create("div","fps-bar",this._wrapper),this._ready=!0}_onMove(e){let t=i.getTimestamp();if(t<this._lastMouseSampleTime+300)return;let r=e.wgs84SurfacePosition;this._mouseEl.innerHTML=`
64
+ `}_setCustomClass(){A.setClass(this._wrapper,`dc-context-menu ${this._config.customClass}`)}_addMenuItem(e,t,r){if(!e||!t)return this;let s=A.create("li","menu-item",null),o=A.create("a","",s);o.innerHTML=e,o.href="javascript:void(0)";let n=this;return t&&(o.onclick=()=>{t.call(r,{windowPosition:n._windowPosition,position:n._position,wgs84Position:n._wgs84Position,surfacePosition:n._surfacePosition,wgs84SurfacePosition:n._wgs84SurfacePosition,overlay:n._overlay,instanceId:n._instanceId}),n.hide()}),this._ulEl.appendChild(s),this}};I.registerType("contextmenu");var pm=wo;var Co=class extends I{constructor(){super(),this._wrapper=A.create("div","widget location-bar"),this._mouseEl=void 0,this._cameraEl=void 0,this._fpsEl=void 0,this._msEl=void 0,this._lastMouseSampleTime=i.getTimestamp(),this._lastCameraSampleTime=i.getTimestamp(),this._lastFpsSampleTime=i.getTimestamp(),this._lastMsSampleTime=i.getTimestamp(),this._fpsFrameCount=0,this._msFrameCount=0,this._state=m.INITIALIZED}get type(){return I.getWidgetType("location_bar")}_installHook(){let e=this;Object.defineProperty(this._viewer,"locationBar",{get(){return e}})}_bindEvent(){this._viewer.on(R.MOUSE_MOVE,this._onMove,this),this._viewer.on(D.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.on(D.POST_UPDATE,this._onPostUpdate,this)}_unbindEvent(){this._viewer.off(R.MOUSE_MOVE,this._onMove,this),this._viewer.off(D.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.off(D.POST_UPDATE,this._onPostUpdate,this)}_mountContent(){this._mouseEl=A.create("div","mouse-bar",this._wrapper),this._cameraEl=A.create("div","camera-bar",this._wrapper),this._msEl=A.create("div","ms-bar",this._wrapper),this._fpsEl=A.create("div","fps-bar",this._wrapper),this._ready=!0}_onMove(e){let t=i.getTimestamp();if(t<this._lastMouseSampleTime+300)return;let r=e.wgs84SurfacePosition;this._mouseEl.innerHTML=`
67
65
  <span>\u7ECF\u5EA6\uFF1A${(r==null?void 0:r.lng.toFixed(8))||Number.NaN}</span>
68
66
  <span>\u7EAC\u5EA6\uFF1A${(r==null?void 0:r.lat.toFixed(8))||Number.NaN}</span>
69
67
  <span>\u6D77\u62D4\uFF1A${(r==null?void 0:r.alt.toFixed(2))||Number.NaN} \u7C73</span>`,this._lastMouseSampleTime=t}_onCameraChanged(){let e=i.getTimestamp();if(e<this._lastCameraSampleTime+300)return;let t=this._viewer.cameraPosition;this._cameraEl.innerHTML=`
70
68
  <span>\u89C6\u89D2\uFF1A${(+t.pitch).toFixed(2)}</span>
71
69
  <span>\u89C6\u9AD8\uFF1A${(+t.alt).toFixed(2)} \u7C73</span>
72
- `,this._lastCameraSampleTime=e}_onPostUpdate(){let e=i.getTimestamp();this._msFrameCount++;let t=e-this._lastMsSampleTime;if(t>200){let s=(t/this._msFrameCount).toFixed(2);this._msEl.innerHTML=`<span>${s} MS</span>`,this._lastMsSampleTime=e,this._msFrameCount=0}this._fpsFrameCount++;let r=e-this._lastFpsSampleTime;if(r>1e3){let s=this._fpsFrameCount*1e3/r|0;this._fpsEl.innerHTML=`<span>${s} FPS</span>`,this._lastFpsSampleTime=e,this._fpsFrameCount=0}}};M.registerType("location_bar");var Kn=hs;var id=`
70
+ `,this._lastCameraSampleTime=e}_onPostUpdate(){let e=i.getTimestamp();this._msFrameCount++;let t=e-this._lastMsSampleTime;if(t>200){let s=(t/this._msFrameCount).toFixed(2);this._msEl.innerHTML=`<span>${s} MS</span>`,this._lastMsSampleTime=e,this._msFrameCount=0}this._fpsFrameCount++;let r=e-this._lastFpsSampleTime;if(r>1e3){let s=this._fpsFrameCount*1e3/r|0;this._fpsEl.innerHTML=`<span>${s} FPS</span>`,this._lastFpsSampleTime=e,this._fpsFrameCount=0}}};I.registerType("location_bar");var dm=Co;var Kx=`
73
71
  data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+2Yf2xVZxnHP89py9qliPe0BUTqBrunuDEBx8QfcxuwRYcxM3HO7Y8JZUNKTweKmWyaGDBZYtwSMmnvuXRKcEMzt0WmwdllE1nclkgsyUaIUM4ZNmKihfbcDjbCpPc85rT3QG1677ltb5UlPf+e932e7/f5vu/zPO8jfMA/+YDjZ4rA/1vBKQWmFBgWAXOnex0Bu4FPAf8Evu3b1vOFgnTZHKHa1LEVgZTtEoLv9NkLfpMjs03hfMa2VucjcdkQSKTdVkGq/ebk2ghswjmxSMh2+Lb10cufgOO9AHRk7OSTw8Gajqu+beUN9GWjgJnq2qZi3JqxrRURATPtbka5w7etL066AjXprmUaGDdhyCI0WAhyHeAjHFPoMgI9lDWyr/Y3X9udD4yZcg8j2qMiewVZhmpjoeiHdiakgJny6tXQLaJ8FZiTA/auCD2q9IBWozILYdZF0KoHBXb2tTT8fDQiNanjjSpyCxr83W9ZsC0uTY+bQE3Ke1BFtwD14dkVpMNQOk63JL1RgbV13RYYxkqEO0S5AfQPasiOzAZrXxzIkqfR8LwixlaBfYEYT2aar/ld0SC2HplmzqzchKHfQpkLfD0u15eUgOl4z4DeiwY/LCSxmXIf8FusXXnP+1DReg5YCGz2beuJooMwbOGYjpDpuPuBlSrcl2m2fjncYV3KS2bJ3heSSqRcW4QUBgv9DdZfCwEzHffPwKfjAjLhLJRw3DaBltEkr3G8jYp+H5gdZFnRv9F6NZH2bso0J98oJqoJxz0gsFyRppF1IG5/UQok0t69ovoMsNu3rfsvVcqumwXje8AqlFcC1Uf7H2z4U5zTkf9n/vTErIELAy+D1B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1g14VXbLa9u6PZIPsUgkGbhQxblDkNtArh9ZLN8JvA9U/XlE9fX/P6tnvjYYqehOHE44+27qzaOS5hXkUOL5FRIZaZeUVhDOonkWkH9gAVAJngekjHB5V0b2GUbGvr2newUJgctPnaCrxkm9bq8YKfjBM+TaZjnu3CMtVWQwsC1PppbVyLhfpEwodUPbsQFnl0bNNc+J7pJFzoZjxTByp2DowaGDrgfLaurmLVINz06undXevnXf+Yms95GEckzn+hgZPFzM+LESiOAJ5LAw9cIL1IPcAM3JHrgfhLdDDiswSdDHIoksm9C8Ce3RAnvI3WWfiIhz3f0IEIuOJ9rdnGEFwp6p+BeQaoA50JoRHjT6gV5VODXh+tCwUB3LSFJiI41LtLYkCpQIzHjtTBMYTtVLumVKglNEcj63/AIrz7E/FBbRAAAAAAElFTkSuQmCC
74
- `,Qn=id;var rd=`
72
+ `,mm=Kx;var Qx=`
75
73
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
76
74
  <svg width="162px" height="162px" viewBox="0 0 162 162" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
77
75
  <!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
@@ -92,7 +90,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
92
90
  </g>
93
91
  </g>
94
92
  </svg>
95
- `,$n=rd;var sd=`
93
+ `,um=Qx;var $x=`
96
94
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
97
95
  <svg width="17px" height="17px" viewBox="0 0 17 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
98
96
  <!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
@@ -110,7 +108,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
110
108
  </g>
111
109
  </g>
112
110
  </svg>
113
- `,el=sd;var od=`
111
+ `,_m=$x;var e1=`
114
112
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
115
113
  <svg width="53px" height="53px" viewBox="0 0 53 53" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
116
114
  <!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
@@ -124,45 +122,45 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
124
122
  </g>
125
123
  </g>
126
124
  </svg>
127
- `,tl=od;var ad=`
125
+ `,fm=e1;var t1=`
128
126
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
129
127
  <svg width="50px" height="6px" viewBox="0 0 50 6" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
130
128
  <!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
131
129
  <title>decrease</title>
132
130
  <path d="M46.6183575,0.657894737 L3.30112724,0.657894737 C1.44927539,0.657894737 0,1.66880618 0,2.96052632 C0,4.25224645 1.44927539,5.26315789 3.30112724,5.26315789 L46.6988728,5.26315789 C48.5507246,5.26315789 50,4.25224645 50,2.96052632 C49.9194847,1.66880618 48.4702093,0.657894737 46.6183575,0.657894737 L46.6183575,0.657894737 L46.6183575,0.657894737 Z" id="Shape"></path>
133
131
  </svg>
134
- `,il=ad;var nd=`
132
+ `,gm=t1;var i1=`
135
133
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
136
134
  <svg width="50px" height="50px" viewBox="0 0 50 50" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
137
135
  <!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
138
136
  <title>increase</title>
139
137
  <path d="M0,25 C0,25.3514939 0.131810207,25.659051 0.373462207,25.900703 C0.615114207,26.142355 0.922671379,26.2741652 1.27416517,26.2741652 L23.7258348,26.2741652 L23.7258348,48.7258348 C23.7258348,49.0773286 23.857645,49.3848858 24.099297,49.6265378 C24.3189807,49.8462214 24.6485061,50 25,50 C25.7029877,50 26.2741652,49.4288225 26.2741652,48.7258348 L26.2741652,26.2741652 L48.7258348,26.2741652 C49.4288225,26.2741652 50,25.7029877 50,25 C50,24.2970123 49.4288225,23.7258348 48.7258348,23.7258348 L26.2741652,23.7258348 L26.2741652,1.27416517 C26.2741652,0.571177517 25.7029877,0 25,0 C24.2970123,0 23.7258348,0.571177517 23.7258348,1.27416517 L23.7258348,23.7258348 L1.27416517,23.7258348 C0.571177517,23.7258348 0,24.2970123 0,25 L0,25 L0,25 L0,25 Z" id="Shape"></path>
140
138
  </svg>
141
- `,rl=nd;var ld=`
139
+ `,ym=i1;var r1=`
142
140
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
143
141
  <svg width="50px" height="50px" viewBox="0 0 50 50" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
144
142
  <!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
145
143
  <title>refresh</title>
146
144
  <path d="M48.2758621,0 C47.2844828,0 46.5086207,0.775193846 46.5086207,1.76571923 L46.5086207,12.2308355 C42.0689655,4.78036173 34.0086207,0 25,0 C11.2068965,0 0,11.1972438 0,25.0215332 C0,38.8458226 11.2068965,50 25,50 C38.7931035,50 50,38.8027562 50,25.0215332 C50,24.0310078 49.2241379,23.2558139 48.2327587,23.2558139 C47.2413793,23.2558139 46.4655172,24.0310078 46.4655172,25.0215332 C46.4655172,36.8647717 36.8103448,46.5116279 24.9568965,46.5116279 C13.1034483,46.5116279 3.49137933,36.8217054 3.49137933,24.9784668 C3.49137933,13.1352283 13.1465517,3.48837212 25,3.48837212 C33.4913793,3.48837212 41.0775862,8.44099913 44.5258621,16.0206718 L32.1551724,16.0206718 C31.1637931,16.0206718 30.3879311,16.7958657 30.3879311,17.7863911 C30.3879311,18.7769164 31.1637931,19.5521103 32.1551724,19.5521103 L48.2327587,19.5521103 C49.2241379,19.5521103 50,18.7769164 50,17.7863911 L50,1.72265288 C50,0.775193846 49.2241379,0 48.2758621,0 L48.2758621,0 L48.2758621,0 Z" id="Shape"></path>
147
145
  </svg>
148
- `,sl=ld;var hd=`
146
+ `,vm=r1;var s1=`
149
147
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
150
148
  <svg width="19px" height="28px" viewBox="0 0 19 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
151
149
  <path d="M0.6551724,2.3448276 L0.6551724,25.6551724 C0.6551724,26.6454761 1.4579722,27.4482759 2.4482759,27.4482759 C3.4385796,27.4482759 4.2413793,26.6454761 4.2413793,25.6551724 L4.2413793,2.3448276 C4.2413793,1.3545239 3.4385796,0.5517241 2.4482759,0.5517241 C1.4579722,0.5517241 0.6551724,1.3545239 0.6551724,2.3448276 L0.6551724,2.3448276 Z M7.6551724,2.3448276 L7.6551724,25.6551724 C7.6551724,26.6454761 8.4579722,27.4482759 9.4482759,27.4482759 C10.4385796,27.4482759 11.2413793,26.6454761 11.2413793,25.6551724 L11.2413793,2.3448276 C11.2413793,1.3545239 10.4385796,0.5517241 9.4482759,0.5517241 C8.4579722,0.5517241 7.6551724,1.3545239 7.6551724,2.3448276 L7.6551724,2.3448276 Z M14.6551724,2.3448276 L14.6551724,25.6551724 C14.6551724,26.6454761 15.4579722,27.4482759 16.4482759,27.4482759 C17.4385796,27.4482759 18.2413793,26.6454761 18.2413793,25.6551724 L18.2413793,2.3448276 C18.2413793,1.3545239 17.4385796,0.5517241 16.4482759,0.5517241 C15.4579722,0.5517241 14.6551724,1.3545239 14.6551724,2.3448276 L14.6551724,2.3448276 Z" id="splitter"></path>
152
150
  </svg>
153
- `,ol=hd;var cd={logo:Qn,compass_outer:$n,compass_inner:el,compass_rotation_marker:tl,decrease:il,increase:rl,refresh:sl,splitter:ol},$=cd;var cs=class extends M{constructor(){super(),this._wrapper=S.create("div","widget slider"),this._baseLayer=void 0,this._moveActive=!1,this._state=d.INITIALIZED}get type(){return M.getWidgetType("map_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"mapSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._baseLayer?this._viewer.scene.splitPosition=this._baseLayer.splitDirection>0?1:0:this._viewer.scene.splitPosition=0}_mountContent(){let e=S.parseDom($.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}addBaseLayer(e,t=1){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),this._baseLayer=this._viewer.imageryLayers.addImageryProvider(e),this._baseLayer.splitDirection=t||0,this._viewer.scene.splitPosition=this._wrapper.offsetLeft/this._wrapper.parentElement.offsetWidth),this)}};M.registerType("map_split");var al=cs;var ps=class extends M{constructor(){super(),this._wrapper=S.create("div","widget map-switch"),this._config=void 0,this._cache=[],this._state=d.INITIALIZED}get type(){return M.getWidgetType("map_switch")}_enableHook(){!this._wrapper.parentNode&&this._viewer&&this._viewer.widgetContainer.appendChild(this._wrapper)}_installHook(){let e=this;Object.defineProperty(this._viewer,"mapSwitch",{get(){return e}}),this.enable=!0,this._wrapper.onmouseover=()=>{let t=80,r=5;e._cache.length>0&&(t=e._cache.length*(t+r)-r),this._wrapper.style.width=`${t}px`},this._wrapper.onmouseout=()=>{e._wrapper.style.width="80px"}}_addItem(e){let t=S.create("div","map-item",this._wrapper),r=this._cache.length?this._cache.length-1:0;r===0&&S.addClass(t,"active"),t.setAttribute("data-index",String(r)),t.onclick=o=>{let a=document.getElementsByClassName("map-item active");a&&a.length&&(a[0].className="map-item"),this._viewer&&(o.target.className="map-item active",this._viewer.changeBaseLayer(+o.target.getAttribute("data-index")||0))},e.iconUrl&&(t.style.cssText=`
151
+ `,wm=s1;var o1={logo:mm,compass_outer:um,compass_inner:_m,compass_rotation_marker:fm,decrease:gm,increase:ym,refresh:vm,splitter:wm},ie=o1;var To=class extends I{constructor(){super(),this._wrapper=A.create("div","widget slider"),this._baseLayer=void 0,this._moveActive=!1,this._state=m.INITIALIZED}get type(){return I.getWidgetType("map_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"mapSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._baseLayer?this._viewer.scene.splitPosition=this._baseLayer.splitDirection>0?1:0:this._viewer.scene.splitPosition=0}_mountContent(){let e=A.parseDom(ie.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}addBaseLayer(e,t=1){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),this._baseLayer=this._viewer.imageryLayers.addImageryProvider(e),this._baseLayer.splitDirection=t||0,this._viewer.scene.splitPosition=this._wrapper.offsetLeft/this._wrapper.parentElement.offsetWidth),this)}};I.registerType("map_split");var Cm=To;var xo=class extends I{constructor(){super(),this._wrapper=A.create("div","widget map-switch"),this._config=void 0,this._cache=[],this._state=m.INITIALIZED}get type(){return I.getWidgetType("map_switch")}_enableHook(){!this._wrapper.parentNode&&this._viewer&&this._viewer.widgetContainer.appendChild(this._wrapper)}_installHook(){let e=this;Object.defineProperty(this._viewer,"mapSwitch",{get(){return e}}),this.enable=!0,this._wrapper.onmouseover=()=>{let t=80,r=5;e._cache.length>0&&(t=e._cache.length*(t+r)-r),this._wrapper.style.width=`${t}px`},this._wrapper.onmouseout=()=>{e._wrapper.style.width="80px"}}_addItem(e){let t=A.create("div","map-item",this._wrapper),r=this._cache.length?this._cache.length-1:0;r===0&&A.addClass(t,"active"),t.setAttribute("data-index",String(r)),t.onclick=o=>{let n=document.getElementsByClassName("map-item active");n&&n.length&&(n[0].className="map-item"),this._viewer&&(o.target.className="map-item active",this._viewer.changeBaseLayer(+o.target.getAttribute("data-index")||0))},e.iconUrl&&(t.style.cssText=`
154
152
  background:url(${e.iconUrl});
155
- `);let s=S.create("span","",t);s.innerHTML=e.name||"\u5730\u56FE"}addMap(e={}){this._enable&&(this._cache.push(e),this._addItem(e),this._cache.length>1&&(this._wrapper.style.visibility="visible"))}};M.registerType("map_switch");var nl=ps;var ds=class extends M{constructor(){super(),this._wrapper=S.create("div","widget popup"),this._config={customClass:""},this._position=void 0,this._state=d.INITIALIZED,this._offsetX=0,this._offsetY=0}get type(){return M.getWidgetType("popup")}set config(e){this._config=e,e.customClass&&this._setCustomClass()}_bindEvent(){if(this._viewer&&this._wrapper){let e=this,t=this._viewer.scene;t.postRender.addEventListener(()=>{if(e._position&&e._enable&&e._updateWindowCoord&&e._wrapper.style.visibility==="visible"){let r=i.SceneTransforms.worldToWindowCoordinates(t,e._position);r&&e._updateWindowCoord(r)}})}}_mountContent(){this._wrapper.style.visibility="hidden"}_installHook(){this.enable=!0,this._bindEvent();let e=this;Object.defineProperty(this._viewer,"popup",{get(){return e}})}_updateWindowCoord(e){let t=e.x-this._wrapper.offsetWidth/2,r=e.y-this._wrapper.offsetHeight;this._config.position==="topleft"?(t=e.x-this._wrapper.offsetWidth,r=e.y-this._wrapper.offsetHeight):this._config.position==="topright"?(t=e.x,r=e.y-this._wrapper.offsetHeight):this._config.position==="bottomleft"?(t=e.x-this._wrapper.offsetWidth,r=e.y):this._config.position==="bottomright"&&(t=e.x,r=e.y),t=t+this._offsetX,r=r+this._offsetY,this._wrapper.style.cssText=`
153
+ `);let s=A.create("span","",t);s.innerHTML=e.name||"\u5730\u56FE"}addMap(e={}){this._enable&&(this._cache.push(e),this._addItem(e),this._cache.length>1&&(this._wrapper.style.visibility="visible"))}};I.registerType("map_switch");var Tm=xo;var Eo=class extends I{constructor(){super(),this._wrapper=A.create("div","widget popup"),this._config={customClass:""},this._position=void 0,this._state=m.INITIALIZED,this._offsetX=0,this._offsetY=0}get type(){return I.getWidgetType("popup")}set config(e){this._config=e,e.customClass&&this._setCustomClass()}_bindEvent(){if(this._viewer&&this._wrapper){let e=this,t=this._viewer.scene;t.postRender.addEventListener(()=>{if(e._position&&e._enable&&e._updateWindowCoord&&e._wrapper.style.visibility==="visible"){let r=i.SceneTransforms.worldToWindowCoordinates(t,e._position);r&&e._updateWindowCoord(r)}})}}_mountContent(){this._wrapper.style.visibility="hidden"}_installHook(){this.enable=!0,this._bindEvent();let e=this;Object.defineProperty(this._viewer,"popup",{get(){return e}})}_updateWindowCoord(e){let t=e.x-this._wrapper.offsetWidth/2,r=e.y-this._wrapper.offsetHeight;this._config.position==="topleft"?(t=e.x-this._wrapper.offsetWidth,r=e.y-this._wrapper.offsetHeight):this._config.position==="topright"?(t=e.x,r=e.y-this._wrapper.offsetHeight):this._config.position==="bottomleft"?(t=e.x-this._wrapper.offsetWidth,r=e.y):this._config.position==="bottomright"&&(t=e.x,r=e.y),t=t+this._offsetX,r=r+this._offsetY,this._wrapper.style.cssText=`
156
154
  visibility:visible;
157
155
  z-index:1;
158
156
  transform:translate3d(${Math.round(t)}px,${Math.round(r)}px, 0);
159
- `}_setCustomClass(){S.setClass(this._wrapper,`widget popup ${this._config.customClass}`)}setWrapper(e){return e&&e instanceof Element&&(this._wrapper=e,S.addClass(this._wrapper,"widget popup")),this}setPosition(e,t={x:0,y:0}){return this._position=e,this._offsetX=t.x||0,this._offsetY=t.y||0,this._wrapper&&(this._wrapper.style.cssText=`
157
+ `}_setCustomClass(){A.setClass(this._wrapper,`widget popup ${this._config.customClass}`)}setWrapper(e){return e&&e instanceof Element&&(this._wrapper=e,A.addClass(this._wrapper,"widget popup")),this}setPosition(e,t={x:0,y:0}){return this._position=e,this._offsetX=t.x||0,this._offsetY=t.y||0,this._wrapper&&(this._wrapper.style.cssText=`
160
158
  visibility:visible;
161
- `),this}showAt(e,t,r={x:0,y:0}){return this.setPosition(e,r).setContent(t),this}};M.registerType("popup");var ll=ds;var ms=class extends M{constructor(){super(),this._wrapper=S.create("div","widget tool-tip"),this._ready=!0,this._state=d.INITIALIZED}get type(){return M.getWidgetType("tooltip")}_installHook(){let e=this;Object.defineProperty(this._viewer,"tooltip",{get(){return e}})}_updateWindowCoord(e){let t=e.x+10,r=e.y-this._wrapper.offsetHeight/2,s=this._getViewerOffset();t+=s.x,r+=s.y,this._wrapper.style.cssText=`
159
+ `),this}showAt(e,t,r={x:0,y:0}){return this.setPosition(e,r).setContent(t),this}};I.registerType("popup");var xm=Eo;var Po=class extends I{constructor(){super(),this._wrapper=A.create("div","widget tool-tip"),this._ready=!0,this._state=m.INITIALIZED}get type(){return I.getWidgetType("tooltip")}_installHook(){let e=this;Object.defineProperty(this._viewer,"tooltip",{get(){return e}})}_updateWindowCoord(e){let t=e.x+10,r=e.y-this._wrapper.offsetHeight/2,s=this._getViewerOffset();t+=s.x,r+=s.y,this._wrapper.style.cssText=`
162
160
  visibility:visible;
163
161
  z-index:1;
164
162
  transform:translate3d(${Math.round(t)}px,${Math.round(r)}px, 0);
165
- `}showAt(e,t){return this._enable?(e&&this._updateWindowCoord(e),this.setContent(t),this):this}};M.registerType("tooltip");var hl=ms;var{ImageryLayer:pd}=i,us=class{constructor(e){if(!e.globe)throw new Error("globe is required");this._globe=e.globe,this._imageryLayers=[],this._selectedImageryLayer=void 0,this._count=0}set selectedImageryLayer(e){if((!e||!e.layers)&&new Error("imagery format error"),!(this._selectedImageryLayer&&e.id===this._selectedImageryLayer.id)){if(this._selectedImageryLayer&&e.id!==this._selectedImageryLayer.id){for(let t=0;t<this._selectedImageryLayer.cache.length;t++)this._globe.imageryLayers.remove(this._selectedImageryLayer.cache[t]);e.cache=[]}for(let t=e.layers.length-1;t>=0;t--){let r=e.layers[t],s=pd.fromProviderAsync(r,e.options);r&&this._globe.imageryLayers.add(s,0),e.cache.push(s)}this._selectedImageryLayer=e}}get selectedImageryLayer(){return this._selectedImageryLayer}addImageryLayer(e,t={}){let r=[];return Array.isArray(e)?r=e.slice(0):r=[e],this._count++,this._imageryLayers.push({id:`${t.id}-${this._count}`,layers:r,cache:[]}),this}getImageryLayer(e){return this._imageryLayers.filter(r=>r.id.includes(e))}changeImageryLayer(e){if(e>this._imageryLayers.length-1)throw new Error("index error");return this.selectedImageryLayer=this._imageryLayers[e],this}},_s=us;var{BoxGeometry:cl,Cartesian3:dd,defined:ge,DeveloperError:pl,GeometryPipeline:md,Matrix3:dl,Matrix4:fs,Transforms:ud,VertexFormat:_d,BufferUsage:fd,CubeMap:gd,loadCubeMap:yd,RenderState:vd,VertexArray:wd,BlendingState:Td,SceneMode:ml,ShaderProgram:Cd,ShaderSource:xd,SkyBox:Ed}=i,Pd=`
163
+ `}showAt(e,t){return this._enable?(e&&this._updateWindowCoord(e),this.setContent(t),this):this}};I.registerType("tooltip");var Em=Po;var{ImageryLayer:a1}=i,bo=class{constructor(e){if(!e.globe)throw new Error("globe is required");this._globe=e.globe,this._imageryLayers=[],this._selectedImageryLayer=void 0,this._count=0}set selectedImageryLayer(e){if((!e||!e.layers)&&new Error("imagery format error"),!(this._selectedImageryLayer&&e.id===this._selectedImageryLayer.id)){if(this._selectedImageryLayer&&e.id!==this._selectedImageryLayer.id){for(let t=0;t<this._selectedImageryLayer.cache.length;t++)this._globe.imageryLayers.remove(this._selectedImageryLayer.cache[t]);e.cache=[]}for(let t=e.layers.length-1;t>=0;t--){let r=e.layers[t],s=a1.fromProviderAsync(r,e.options);r&&this._globe.imageryLayers.add(s,0),e.cache.push(s)}this._selectedImageryLayer=e}}get selectedImageryLayer(){return this._selectedImageryLayer}addImageryLayer(e,t={}){let r=[];return Array.isArray(e)?r=e.slice(0):r=[e],this._count++,this._imageryLayers.push({id:`${t.id}-${this._count}`,layers:r,cache:[]}),this}getImageryLayer(e){return this._imageryLayers.filter(r=>r.id.includes(e))}changeImageryLayer(e){if(e>this._imageryLayers.length-1)throw new Error("index error");return this.selectedImageryLayer=this._imageryLayers[e],this}},So=bo;var{BoxGeometry:Pm,Cartesian3:n1,defined:Ce,DeveloperError:bm,GeometryPipeline:l1,Matrix3:Sm,Matrix4:Ao,Transforms:h1,VertexFormat:c1,BufferUsage:p1,CubeMap:d1,loadCubeMap:m1,RenderState:u1,VertexArray:_1,BlendingState:f1,SceneMode:Am,ShaderProgram:g1,ShaderSource:y1,SkyBox:v1}=i,w1=`
166
164
  uniform samplerCube u_cubeMap;
167
165
  in vec3 v_texCoord;
168
166
  void main()
@@ -170,7 +168,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
170
168
  vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));
171
169
  out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);
172
170
  }
173
- `,bd=`
171
+ `,C1=`
174
172
  in vec3 position;
175
173
  out vec3 v_texCoord;
176
174
  uniform mat3 u_rotateMatrix;
@@ -180,23 +178,23 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
180
178
  gl_Position = czm_projection * vec4(p, 1.0);
181
179
  v_texCoord = position.xyz;
182
180
  }
183
- `,gs=class extends Ed{constructor(e={}){super(e),this.offsetAngle=(e==null?void 0:e.offsetAngle)||0}update(e,t){let r=this;if(!this.show||e.mode!==ml.SCENE3D&&e.mode!==ml.MORPHING||!e.passes.render)return;let s=e.context;if(this._sources!==this.sources){this._sources=this.sources;let a=this.sources;if(!ge(a.positiveX)||!ge(a.negativeX)||!ge(a.positiveY)||!ge(a.negativeY)||!ge(a.positiveZ)||!ge(a.negativeZ))throw new pl("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof a.positiveX!=typeof a.negativeX||typeof a.positiveX!=typeof a.positiveY||typeof a.positiveX!=typeof a.negativeY||typeof a.positiveX!=typeof a.positiveZ||typeof a.positiveX!=typeof a.negativeZ)throw new pl("this.sources properties must all be the same type.");typeof a.positiveX=="string"?yd(s,this._sources).then(function(l){r._cubeMap=r._cubeMap&&r._cubeMap.destroy(),r._cubeMap=l}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new gd({context:s,source:a}))}let o=this._command;if(o.modelMatrix=ud.eastNorthUpToFixedFrame(e.camera.positionWC),this.offsetAngle!==0&&fs.multiply(o.modelMatrix,fs.fromRotationTranslation(dl.fromRotationZ(this.offsetAngle/180*Math.PI)),o.modelMatrix),!ge(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return r._cubeMap},u_rotateMatrix:function(){return fs.getMatrix3(o.modelMatrix,new dl)}};let a=cl.createGeometry(cl.fromDimensions({dimensions:new dd(2,2,2),vertexFormat:_d.POSITION_ONLY})),l=this._attributeLocations=md.createAttributeLocations(a);o.vertexArray=wd.fromGeometry({context:s,geometry:a,attributeLocations:l,bufferUsage:fd._DRAW}),o.renderState=vd.fromCache({blending:Td.ALPHA_BLEND})}if(!ge(o.shaderProgram)||this._useHdr!==t){let a=new xd({defines:[t?"HDR":""],sources:[Pd]});o.shaderProgram=Cd.fromCache({context:s,vertexShaderSource:bd,fragmentShaderSource:a,attributeLocations:this._attributeLocations}),this._useHdr=t}if(ge(this._cubeMap))return o}},ul=gs;var{BoundingSphere:ys,BoundingSphereState:ze,Cartographic:Sd,CesiumWidget:Id,Cesium3DTileset:gl,Clock:Md,computeFlyToLocationForRectangle:Ad,DataSourceCollection:Dd,DataSourceDisplay:Ld,defaultValue:Fe,defined:z,destroyObject:Rd,DeveloperError:ws,Entity:vP,EntityView:Od,Event:_l,EventHelper:kd,getElement:Fd,HeadingPitchRange:zd,ImageryLayer:Hd,Matrix4:vs,Property:Nd,SceneMode:ye,ScreenSpaceEventType:fl,TimeDynamicPointCloud:yl,VoxelPrimitive:vl,Color:Wd}=i,be=new ys;function wl(n,e,t){if(z(t)){let r=t.clock;z(r)&&r.getValue(e)}}function O(n,e){if(!z(n))throw new ws("container is required.");n=Fd(n),e=Fe(e,Fe.EMPTY_OBJECT);let t=Fe(e.scene3DOnly,!1),r=new Md;z(e.shouldAnimate)&&(r.shouldAnimate=e.shouldAnimate);let s=new Id(n,{baseLayer:!1,clock:r,skyBox:e.skyBox,skyAtmosphere:e.skyAtmosphere,sceneMode:e.sceneMode,mapProjection:e.mapProjection,globe:e.globe,orderIndependentTranslucency:e.orderIndependentTranslucency,contextOptions:e.contextOptions,useDefaultRenderLoop:e.useDefaultRenderLoop,targetFrameRate:e.targetFrameRate,showRenderLoopErrors:e.showRenderLoopErrors,useBrowserRecommendedResolution:e.useBrowserRecommendedResolution,creditContainer:document.createElement("div"),creditViewport:document.createElement("div"),scene3DOnly:t,shadows:e.shadows,terrainShadows:e.terrainShadows,mapMode2D:e.mapMode2D,blurActiveElementOnCanvasFocus:e.blurActiveElementOnCanvasFocus,requestRenderMode:e.requestRenderMode,maximumRenderTimeChange:e.maximumRenderTimeChange,depthPlaneEllipsoidOffset:e.depthPlaneEllipsoidOffset,msaaSamples:e.msaaSamples});s.scene.backgroundColor=Wd.TRANSPARENT,s.canvas.parentNode.className="viewer-canvas";let o=e.dataSources,a=!1;z(o)||(o=new Dd,a=!0);let l=s.scene;l.screenSpaceCameraController.maximumZoomDistance=40489014;let h=new Ld({scene:l,dataSourceCollection:o}),c=new kd;c.add(r.onTick,O.prototype._onTick,this),c.add(l.morphStart,O.prototype._clearTrackedObject,this);let p=document.createElement("div");this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=Fe(e.automaticallyTrackDataSourceClocks,!0),this._clock=r,this._container=n,this._bottomContainer=document.createElement("div"),this._element=document.createElement("div"),this._cesiumWidget=s,this._dataSourceCollection=o,this._destroyDataSourceCollection=a,this._dataSourceDisplay=h,this._toolbar=p,this._eventHelper=c,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=!1,this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new _l,this._trackedEntityChanged=new _l,c.add(o.dataSourceAdded,O.prototype._onDataSourceAdded,this),c.add(o.dataSourceRemoved,O.prototype._onDataSourceRemoved,this),c.add(l.postUpdate,O.prototype.resize,this),c.add(l.postRender,O.prototype._postRender,this);let f=o.length;for(let T=0;T<f;T++)this._dataSourceAdded(o,o.get(T));this._dataSourceAdded(void 0,h.defaultDataSource),c.add(o.dataSourceAdded,O.prototype._dataSourceAdded,this),c.add(o.dataSourceRemoved,O.prototype._dataSourceRemoved,this)}Object.defineProperties(O.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(n){this.scene.shadowMap.enabled=n}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(n){this.scene.globe.shadows=n}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(n){this.scene.terrainProvider=n}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(n){this._cesiumWidget.targetFrameRate=n}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(n){this._cesiumWidget.useDefaultRenderLoop=n}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(n){this._cesiumWidget.resolutionScale=n}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(n){this._cesiumWidget.useBrowserRecommendedResolution=n}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(n){this._allowDataSourcesToSuspendAnimation=n}},trackedEntity:{get:function(){return this._trackedEntity},set:function(n){if(this._trackedEntity!==n){this._trackedEntity=n,Ts(this);let e=this.scene,t=e.mode;!z(n)||!z(n.position)?(this._needTrackedEntityUpdate=!1,(t===ye.COLUMBUS_VIEW||t===ye.SCENE2D)&&(e.screenSpaceCameraController.enableTranslate=!0),(t===ye.COLUMBUS_VIEW||t===ye.SCENE3D)&&(e.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(vs.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(n),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(n){this._selectedEntity!==n&&(this._selectedEntity=n,this._selectedEntityChanged.raiseEvent(n))}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(n){this._clockTrackedDataSource!==n&&(this._clockTrackedDataSource=n,wl(void 0,this.clock,n))}}});O.prototype.extend=function(n,e){if(!z(n))throw new ws("mixin is required.");n(this,e)};O.prototype.resize=function(){let n=this._cesiumWidget,e=this._container,t=e.clientWidth,r=e.clientHeight;n.resize(),!(t===this._lastWidth&&r===this._lastHeight)&&(this._lastWidth=t,this._lastHeight=r)};O.prototype.forceResize=function(){this._lastWidth=0,this.resize()};O.prototype.render=function(){this._cesiumWidget.render()};O.prototype.isDestroyed=function(){return!1};O.prototype.destroy=function(){if(this.isDestroyed())return;let n;z(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(fl.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(fl.LEFT_DOUBLE_CLICK));let e=this.dataSources,t=e.length;for(n=0;n<t;n++)this._dataSourceRemoved(e,e.get(n));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._eventHelper.removeAll(),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),Rd(this)};O.prototype._dataSourceAdded=function(n,e){e.entities.collectionChanged.addEventListener(O.prototype._onEntityCollectionChanged,this)};O.prototype._dataSourceRemoved=function(n,e){let t=e.entities;t.collectionChanged.removeEventListener(O.prototype._onEntityCollectionChanged,this),z(this.trackedEntity)&&t.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),z(this.selectedEntity)&&t.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};O.prototype._onTick=function(n){let e=n.currentTime,t=this._dataSourceDisplay.update(e);this._allowDataSourcesToSuspendAnimation&&(this._clock.canAnimate=t);let r=this._entityView;if(z(r)){let h=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(h,!1,be)===ze.DONE&&r.update(e,be)}let s,o=!1,a=this.selectedEntity;z(a)&&this._enableInfoOrSelection&&a.isShowing&&a.isAvailable(e)&&(this._dataSourceDisplay.getBoundingSphere(a,!0,be)!==ze.FAILED?s=be.center:z(a.position)&&(s=a.position.getValue(e,s)),o=z(s))};O.prototype._onEntityCollectionChanged=function(n,e,t){let r=t.length;for(let s=0;s<r;s++){let o=t[s];this.trackedEntity===o&&(this.trackedEntity=void 0),this.selectedEntity===o&&(this.selectedEntity=void 0)}};O.prototype._onInfoBoxCameraClicked=function(n){if(n.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let t=this.selectedEntity.position;z(t)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};O.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};O.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};O.prototype._onDataSourceChanged=function(n){this.clockTrackedDataSource===n&&wl(void 0,this.clock,n)};O.prototype._onDataSourceAdded=function(n,e){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=e);let t=e.entities.id,r=this._eventHelper.add(e.changedEvent,O.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[t]=r};O.prototype._onDataSourceRemoved=function(n,e){let t=this.clockTrackedDataSource===e,r=e.entities.id;if(this._dataSourceChangedListeners[r](),this._dataSourceChangedListeners[r]=void 0,t){let s=n.length;this._automaticallyTrackDataSourceClocks&&s>0?this.clockTrackedDataSource=n.get(s-1):this.clockTrackedDataSource=void 0}};O.prototype.zoomTo=function(n,e){return Tl(this,n,{offset:e},!1)};O.prototype.flyTo=function(n,e){return Tl(this,n,e,!0)};function Tl(n,e,t,r){if(!z(e))throw new ws("zoomTarget is required.");Ts(n);let s=new Promise(o=>{n._completeZoom=function(a){o(a)}});return n._zoomPromise=s,n._zoomIsFlight=r,n._zoomOptions=t,Promise.resolve(e).then(function(o){if(n._zoomPromise===s){if(o instanceof Hd){let a;z(o.imageryProvider)?a=Promise.resolve(o.getImageryRectangle()):a=new Promise(l=>{let h=o.readyEvent.addEventListener(()=>{h(),l(o.getImageryRectangle())})}),a.then(function(l){return Ad(l,n.scene)}).then(function(l){n._zoomPromise===s&&(n._zoomTarget=l)});return}if(o instanceof gl||o instanceof yl||o instanceof vl){n._zoomTarget=o;return}if(o.isLoading&&z(o.loadingEvent)){let a=o.loadingEvent.addEventListener(function(){a(),n._zoomPromise===s&&(n._zoomTarget=o.entities.values.slice(0))});return}if(Array.isArray(o)){n._zoomTarget=o.slice(0);return}o=Fe(o.values,o),z(o.entities)&&(o=o.entities.values),Array.isArray(o)?n._zoomTarget=o.slice(0):n._zoomTarget=[o]}}),n.scene.requestRender(),s}function Ze(n){n._zoomPromise=void 0,n._zoomTarget=void 0,n._zoomOptions=void 0}function Ts(n){let e=n._zoomPromise;z(e)&&(Ze(n),n._completeZoom(!1))}O.prototype._postRender=function(){Gd(this),Ud(this)};function Gd(n){let e=n._zoomTarget;if(!z(e)||n.scene.mode===ye.MORPHING)return;let t=n.scene,r=t.camera,s=Fe(n._zoomOptions,{}),o;function a(p){z(s.offset)||(s.offset=new zd(0,-.5,p.radius)),o={offset:s.offset,duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){n._completeZoom(!0)},cancel:function(){n._completeZoom(!1)}},n._zoomIsFlight?r.flyToBoundingSphere(e.boundingSphere,o):(r.viewBoundingSphere(p,s.offset),r.lookAtTransform(vs.IDENTITY),n._completeZoom(!0)),Ze(n)}if(e instanceof yl){if(z(e.boundingSphere)){a(e.boundingSphere);return}let p=e.frameChanged.addEventListener(function(f){a(f.boundingSphere),p()});return}if(e instanceof gl||e instanceof vl){a(e.boundingSphere);return}if(e instanceof Sd){o={destination:t.mapProjection.ellipsoid.cartographicToCartesian(e),duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){n._completeZoom(!0)},cancel:function(){n._completeZoom(!1)}},n._zoomIsFlight?r.flyTo(o):(r.setView(o),n._completeZoom(!0)),Ze(n);return}let l=e,h=[];for(let p=0,f=l.length;p<f;p++){let T=n._dataSourceDisplay.getBoundingSphere(l[p],!1,be);if(T===ze.PENDING)return;T!==ze.FAILED&&h.push(ys.clone(be))}if(h.length===0){Ts(n);return}n.trackedEntity=void 0;let c=ys.fromBoundingSpheres(h);n._zoomIsFlight?(Ze(n),r.flyToBoundingSphere(c,{duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){n._completeZoom(!0)},cancel:function(){n._completeZoom(!1)},offset:s.offset})):(r.viewBoundingSphere(c,s.offset),r.lookAtTransform(vs.IDENTITY),Ze(n),n._completeZoom(!0))}function Ud(n){if(!n._needTrackedEntityUpdate)return;let e=n._trackedEntity,t=n.clock.currentTime,r=Nd.getValueOrUndefined(e.position,t);if(!z(r))return;let s=n.scene,o=n._dataSourceDisplay.getBoundingSphere(e,!1,be);if(o===ze.PENDING)return;let a=s.mode;(a===ye.COLUMBUS_VIEW||a===ye.SCENE2D)&&(s.screenSpaceCameraController.enableTranslate=!1),(a===ye.COLUMBUS_VIEW||a===ye.SCENE3D)&&(s.screenSpaceCameraController.enableTilt=!1);let l=o!==ze.FAILED?be:void 0;n._entityView=new Od(e,s,s.mapProjection.ellipsoid),n._entityView.update(t,l),n._needTrackedEntityUpdate=!1}var qe=O;var Cs=class extends M{constructor(){super(),this._wrapper=S.create("div","widget hawkeye-map",null),this._wrapper.setAttribute("id",v.uuid()),this._map=void 0,this._state=d.INITIALIZED}get type(){return M.getWidgetType("hawkeye_map")}_mountContent(){let e=new qe(this._wrapper,{sceneMode:i.SceneMode.SCENE2D});e.imageryLayers.removeAll(),v.merge(e.scene.screenSpaceCameraController,{enableRotate:!1,enableTranslate:!1,enableZoom:!1,enableTilt:!1,enableLook:!1,maximumZoomDistance:40489014}),this._map=e,this._ready=!0}_bindEvent(){this._viewer.on(A.CAMERA_CHANGED,this._syncMap,this)}_unbindEvent(){this._viewer.off(A.CAMERA_CHANGED,this._syncMap,this)}_installHook(){let e=this;Object.defineProperty(this._viewer,"hawkeyeMap",{get(){return e}}),this._viewer.camera.percentageChanged=.01}_syncMap(){let e=new i.Cartesian2(Math.floor(this._viewer.canvas.clientWidth/2),Math.floor(this._viewer.canvas.clientHeight/2)),t=this._viewer.scene.camera.pickEllipsoid(e);if(!t)return!1;let r=i.Cartesian3.distance(t,this._viewer.scene.camera.positionWC);this._map.scene.camera.lookAt(t,new i.Cartesian3(0,0,r))}addBaseLayer(e){return!this._map||!this._enable?this:(e&&(this._map.imageryLayers.removeAll(),Array.isArray(e)||(e=[e]),e.forEach(t=>{this._map.imageryLayers.add(i.ImageryLayer.fromProviderAsync(t,{}))})),this)}};M.registerType("hawkeye_map");var Cl=Cs;var xs=class extends M{constructor(){super(),this._wrapper=S.create("div","widget compass"),this._compassRectangle=void 0,this._outRing=void 0,this._gyro=void 0,this._rotation_marker=void 0,this._orbitCursorAngle=0,this._orbitCursorOpacity=0,this._orbitLastTimestamp=0,this._orbitFrame=void 0,this._orbitIsLook=!1,this._rotateInitialCursorAngle=void 0,this._rotateFrame=void 0,this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0,this._state=d.INITIALIZED}get type(){return M.getWidgetType("compass")}_installHook(){let e=this;Object.defineProperty(this._viewer,"compass",{get(){return e}}),this._wrapper.onmousedown=t=>{this._handleMouseDown(t)},this._wrapper.ondblclick=t=>{this._handleDoubleClick(t)}}_bindEvent(){this._viewer.on(A.POST_RENDER,this._postRenderHandler,this)}_unbindEvent(){this._viewer.off(A.POST_RENDER,this._postRenderHandler,this)}_postRenderHandler(){let e=this._viewer.camera.heading;this._outRing&&(this._outRing.style.cssText=`
181
+ `,Mo=class extends v1{constructor(e={}){super(e),this.offsetAngle=(e==null?void 0:e.offsetAngle)||0}update(e,t){let r=this;if(!this.show||e.mode!==Am.SCENE3D&&e.mode!==Am.MORPHING||!e.passes.render)return;let s=e.context;if(this._sources!==this.sources){this._sources=this.sources;let n=this.sources;if(!Ce(n.positiveX)||!Ce(n.negativeX)||!Ce(n.positiveY)||!Ce(n.negativeY)||!Ce(n.positiveZ)||!Ce(n.negativeZ))throw new bm("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof n.positiveX!=typeof n.negativeX||typeof n.positiveX!=typeof n.positiveY||typeof n.positiveX!=typeof n.negativeY||typeof n.positiveX!=typeof n.positiveZ||typeof n.positiveX!=typeof n.negativeZ)throw new bm("this.sources properties must all be the same type.");typeof n.positiveX=="string"?m1(s,this._sources).then(function(l){r._cubeMap=r._cubeMap&&r._cubeMap.destroy(),r._cubeMap=l}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new d1({context:s,source:n}))}let o=this._command;if(o.modelMatrix=h1.eastNorthUpToFixedFrame(e.camera.positionWC),this.offsetAngle!==0&&Ao.multiply(o.modelMatrix,Ao.fromRotationTranslation(Sm.fromRotationZ(this.offsetAngle/180*Math.PI)),o.modelMatrix),!Ce(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return r._cubeMap},u_rotateMatrix:function(){return Ao.getMatrix3(o.modelMatrix,new Sm)}};let n=Pm.createGeometry(Pm.fromDimensions({dimensions:new n1(2,2,2),vertexFormat:c1.POSITION_ONLY})),l=this._attributeLocations=l1.createAttributeLocations(n);o.vertexArray=_1.fromGeometry({context:s,geometry:n,attributeLocations:l,bufferUsage:p1._DRAW}),o.renderState=u1.fromCache({blending:f1.ALPHA_BLEND})}if(!Ce(o.shaderProgram)||this._useHdr!==t){let n=new y1({defines:[t?"HDR":""],sources:[w1]});o.shaderProgram=g1.fromCache({context:s,vertexShaderSource:C1,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._useHdr=t}if(Ce(this._cubeMap))return o}},Mm=Mo;var{BoundingSphere:Io,BoundingSphereState:$e,Cartographic:T1,CesiumWidget:x1,Cesium3DTileset:Lm,Clock:E1,computeFlyToLocationForRectangle:P1,DataSourceCollection:b1,DataSourceDisplay:S1,defaultValue:Qe,defined:U,destroyObject:A1,DeveloperError:Lo,Entity:D8,EntityView:M1,Event:Im,EventHelper:I1,getElement:D1,HeadingPitchRange:L1,ImageryLayer:R1,Matrix4:Do,Property:O1,SceneMode:Te,ScreenSpaceEventType:Dm,TimeDynamicPointCloud:Rm,VoxelPrimitive:Om,Color:k1}=i,De=new Io;function km(a,e,t){if(U(t)){let r=t.clock;U(r)&&r.getValue(e)}}function k(a,e){if(!U(a))throw new Lo("container is required.");a=D1(a),e=Qe(e,Qe.EMPTY_OBJECT);let t=Qe(e.scene3DOnly,!1),r=new E1;U(e.shouldAnimate)&&(r.shouldAnimate=e.shouldAnimate);let s=new x1(a,{baseLayer:!1,clock:r,skyBox:e.skyBox,skyAtmosphere:e.skyAtmosphere,sceneMode:e.sceneMode,mapProjection:e.mapProjection,globe:e.globe,orderIndependentTranslucency:e.orderIndependentTranslucency,contextOptions:e.contextOptions,useDefaultRenderLoop:e.useDefaultRenderLoop,targetFrameRate:e.targetFrameRate,showRenderLoopErrors:e.showRenderLoopErrors,useBrowserRecommendedResolution:e.useBrowserRecommendedResolution,creditContainer:document.createElement("div"),creditViewport:document.createElement("div"),scene3DOnly:t,shadows:e.shadows,terrainShadows:e.terrainShadows,mapMode2D:e.mapMode2D,blurActiveElementOnCanvasFocus:e.blurActiveElementOnCanvasFocus,requestRenderMode:e.requestRenderMode,maximumRenderTimeChange:e.maximumRenderTimeChange,depthPlaneEllipsoidOffset:e.depthPlaneEllipsoidOffset,msaaSamples:e.msaaSamples});s.scene.backgroundColor=k1.TRANSPARENT,s.canvas.parentNode.className="viewer-canvas";let o=e.dataSources,n=!1;U(o)||(o=new b1,n=!0);let l=s.scene;l.screenSpaceCameraController.maximumZoomDistance=40489014;let h=new S1({scene:l,dataSourceCollection:o}),c=new I1;c.add(r.onTick,k.prototype._onTick,this),c.add(l.morphStart,k.prototype._clearTrackedObject,this);let p=document.createElement("div");this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=Qe(e.automaticallyTrackDataSourceClocks,!0),this._clock=r,this._container=a,this._bottomContainer=document.createElement("div"),this._element=document.createElement("div"),this._cesiumWidget=s,this._dataSourceCollection=o,this._destroyDataSourceCollection=n,this._dataSourceDisplay=h,this._toolbar=p,this._eventHelper=c,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=!1,this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new Im,this._trackedEntityChanged=new Im,c.add(o.dataSourceAdded,k.prototype._onDataSourceAdded,this),c.add(o.dataSourceRemoved,k.prototype._onDataSourceRemoved,this),c.add(l.postUpdate,k.prototype.resize,this),c.add(l.postRender,k.prototype._postRender,this);let _=o.length;for(let w=0;w<_;w++)this._dataSourceAdded(o,o.get(w));this._dataSourceAdded(void 0,h.defaultDataSource),c.add(o.dataSourceAdded,k.prototype._dataSourceAdded,this),c.add(o.dataSourceRemoved,k.prototype._dataSourceRemoved,this)}Object.defineProperties(k.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(a){this.scene.shadowMap.enabled=a}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(a){this.scene.globe.shadows=a}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(a){this.scene.terrainProvider=a}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(a){this._cesiumWidget.targetFrameRate=a}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(a){this._cesiumWidget.useDefaultRenderLoop=a}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(a){this._cesiumWidget.resolutionScale=a}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(a){this._cesiumWidget.useBrowserRecommendedResolution=a}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(a){this._allowDataSourcesToSuspendAnimation=a}},trackedEntity:{get:function(){return this._trackedEntity},set:function(a){if(this._trackedEntity!==a){this._trackedEntity=a,Ro(this);let e=this.scene,t=e.mode;!U(a)||!U(a.position)?(this._needTrackedEntityUpdate=!1,(t===Te.COLUMBUS_VIEW||t===Te.SCENE2D)&&(e.screenSpaceCameraController.enableTranslate=!0),(t===Te.COLUMBUS_VIEW||t===Te.SCENE3D)&&(e.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(Do.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(a),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(a){this._selectedEntity!==a&&(this._selectedEntity=a,this._selectedEntityChanged.raiseEvent(a))}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(a){this._clockTrackedDataSource!==a&&(this._clockTrackedDataSource=a,km(void 0,this.clock,a))}}});k.prototype.extend=function(a,e){if(!U(a))throw new Lo("mixin is required.");a(this,e)};k.prototype.resize=function(){let a=this._cesiumWidget,e=this._container,t=e.clientWidth,r=e.clientHeight;a.resize(),!(t===this._lastWidth&&r===this._lastHeight)&&(this._lastWidth=t,this._lastHeight=r)};k.prototype.forceResize=function(){this._lastWidth=0,this.resize()};k.prototype.render=function(){this._cesiumWidget.render()};k.prototype.isDestroyed=function(){return!1};k.prototype.destroy=function(){if(this.isDestroyed())return;let a;U(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(Dm.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Dm.LEFT_DOUBLE_CLICK));let e=this.dataSources,t=e.length;for(a=0;a<t;a++)this._dataSourceRemoved(e,e.get(a));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._eventHelper.removeAll(),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),A1(this)};k.prototype._dataSourceAdded=function(a,e){e.entities.collectionChanged.addEventListener(k.prototype._onEntityCollectionChanged,this)};k.prototype._dataSourceRemoved=function(a,e){let t=e.entities;t.collectionChanged.removeEventListener(k.prototype._onEntityCollectionChanged,this),U(this.trackedEntity)&&t.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),U(this.selectedEntity)&&t.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};k.prototype._onTick=function(a){let e=a.currentTime,t=this._dataSourceDisplay.update(e);this._allowDataSourcesToSuspendAnimation&&(this._clock.canAnimate=t);let r=this._entityView;if(U(r)){let h=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(h,!1,De)===$e.DONE&&r.update(e,De)}let s,o=!1,n=this.selectedEntity;U(n)&&this._enableInfoOrSelection&&n.isShowing&&n.isAvailable(e)&&(this._dataSourceDisplay.getBoundingSphere(n,!0,De)!==$e.FAILED?s=De.center:U(n.position)&&(s=n.position.getValue(e,s)),o=U(s))};k.prototype._onEntityCollectionChanged=function(a,e,t){let r=t.length;for(let s=0;s<r;s++){let o=t[s];this.trackedEntity===o&&(this.trackedEntity=void 0),this.selectedEntity===o&&(this.selectedEntity=void 0)}};k.prototype._onInfoBoxCameraClicked=function(a){if(a.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let t=this.selectedEntity.position;U(t)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};k.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};k.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};k.prototype._onDataSourceChanged=function(a){this.clockTrackedDataSource===a&&km(void 0,this.clock,a)};k.prototype._onDataSourceAdded=function(a,e){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=e);let t=e.entities.id,r=this._eventHelper.add(e.changedEvent,k.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[t]=r};k.prototype._onDataSourceRemoved=function(a,e){let t=this.clockTrackedDataSource===e,r=e.entities.id;if(this._dataSourceChangedListeners[r](),this._dataSourceChangedListeners[r]=void 0,t){let s=a.length;this._automaticallyTrackDataSourceClocks&&s>0?this.clockTrackedDataSource=a.get(s-1):this.clockTrackedDataSource=void 0}};k.prototype.zoomTo=function(a,e){return zm(this,a,{offset:e},!1)};k.prototype.flyTo=function(a,e){return zm(this,a,e,!0)};function zm(a,e,t,r){if(!U(e))throw new Lo("zoomTarget is required.");Ro(a);let s=new Promise(o=>{a._completeZoom=function(n){o(n)}});return a._zoomPromise=s,a._zoomIsFlight=r,a._zoomOptions=t,Promise.resolve(e).then(function(o){if(a._zoomPromise===s){if(o instanceof R1){let n;U(o.imageryProvider)?n=Promise.resolve(o.getImageryRectangle()):n=new Promise(l=>{let h=o.readyEvent.addEventListener(()=>{h(),l(o.getImageryRectangle())})}),n.then(function(l){return P1(l,a.scene)}).then(function(l){a._zoomPromise===s&&(a._zoomTarget=l)});return}if(o instanceof Lm||o instanceof Rm||o instanceof Om){a._zoomTarget=o;return}if(o.isLoading&&U(o.loadingEvent)){let n=o.loadingEvent.addEventListener(function(){n(),a._zoomPromise===s&&(a._zoomTarget=o.entities.values.slice(0))});return}if(Array.isArray(o)){a._zoomTarget=o.slice(0);return}o=Qe(o.values,o),U(o.entities)&&(o=o.entities.values),Array.isArray(o)?a._zoomTarget=o.slice(0):a._zoomTarget=[o]}}),a.scene.requestRender(),s}function wt(a){a._zoomPromise=void 0,a._zoomTarget=void 0,a._zoomOptions=void 0}function Ro(a){let e=a._zoomPromise;U(e)&&(wt(a),a._completeZoom(!1))}k.prototype._postRender=function(){z1(this),F1(this)};function z1(a){let e=a._zoomTarget;if(!U(e)||a.scene.mode===Te.MORPHING)return;let t=a.scene,r=t.camera,s=Qe(a._zoomOptions,{}),o;function n(p){U(s.offset)||(s.offset=new L1(0,-.5,p.radius)),o={offset:s.offset,duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){a._completeZoom(!0)},cancel:function(){a._completeZoom(!1)}},a._zoomIsFlight?r.flyToBoundingSphere(e.boundingSphere,o):(r.viewBoundingSphere(p,s.offset),r.lookAtTransform(Do.IDENTITY),a._completeZoom(!0)),wt(a)}if(e instanceof Rm){if(U(e.boundingSphere)){n(e.boundingSphere);return}let p=e.frameChanged.addEventListener(function(_){n(_.boundingSphere),p()});return}if(e instanceof Lm||e instanceof Om){n(e.boundingSphere);return}if(e instanceof T1){o={destination:t.mapProjection.ellipsoid.cartographicToCartesian(e),duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){a._completeZoom(!0)},cancel:function(){a._completeZoom(!1)}},a._zoomIsFlight?r.flyTo(o):(r.setView(o),a._completeZoom(!0)),wt(a);return}let l=e,h=[];for(let p=0,_=l.length;p<_;p++){let w=a._dataSourceDisplay.getBoundingSphere(l[p],!1,De);if(w===$e.PENDING)return;w!==$e.FAILED&&h.push(Io.clone(De))}if(h.length===0){Ro(a);return}a.trackedEntity=void 0;let c=Io.fromBoundingSpheres(h);a._zoomIsFlight?(wt(a),r.flyToBoundingSphere(c,{duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){a._completeZoom(!0)},cancel:function(){a._completeZoom(!1)},offset:s.offset})):(r.viewBoundingSphere(c,s.offset),r.lookAtTransform(Do.IDENTITY),wt(a),a._completeZoom(!0))}function F1(a){if(!a._needTrackedEntityUpdate)return;let e=a._trackedEntity,t=a.clock.currentTime,r=O1.getValueOrUndefined(e.position,t);if(!U(r))return;let s=a.scene,o=a._dataSourceDisplay.getBoundingSphere(e,!1,De);if(o===$e.PENDING)return;let n=s.mode;(n===Te.COLUMBUS_VIEW||n===Te.SCENE2D)&&(s.screenSpaceCameraController.enableTranslate=!1),(n===Te.COLUMBUS_VIEW||n===Te.SCENE3D)&&(s.screenSpaceCameraController.enableTilt=!1);let l=o!==$e.FAILED?De:void 0;a._entityView=new M1(e,s,s.mapProjection.ellipsoid),a._entityView.update(t,l),a._needTrackedEntityUpdate=!1}var Ct=k;var Oo=class extends I{constructor(){super(),this._wrapper=A.create("div","widget hawkeye-map",null),this._wrapper.setAttribute("id",v.uuid()),this._map=void 0,this._state=m.INITIALIZED}get type(){return I.getWidgetType("hawkeye_map")}_mountContent(){let e=new Ct(this._wrapper,{sceneMode:i.SceneMode.SCENE2D});e.imageryLayers.removeAll(),v.merge(e.scene.screenSpaceCameraController,{enableRotate:!1,enableTranslate:!1,enableZoom:!1,enableTilt:!1,enableLook:!1,maximumZoomDistance:40489014}),this._map=e,this._ready=!0}_bindEvent(){this._viewer.on(D.CAMERA_CHANGED,this._syncMap,this)}_unbindEvent(){this._viewer.off(D.CAMERA_CHANGED,this._syncMap,this)}_installHook(){let e=this;Object.defineProperty(this._viewer,"hawkeyeMap",{get(){return e}}),this._viewer.camera.percentageChanged=.01}_syncMap(){let e=new i.Cartesian2(Math.floor(this._viewer.canvas.clientWidth/2),Math.floor(this._viewer.canvas.clientHeight/2)),t=this._viewer.scene.camera.pickEllipsoid(e);if(!t)return!1;let r=i.Cartesian3.distance(t,this._viewer.scene.camera.positionWC);this._map.scene.camera.lookAt(t,new i.Cartesian3(0,0,r))}addBaseLayer(e){return!this._map||!this._enable?this:(e&&(this._map.imageryLayers.removeAll(),Array.isArray(e)||(e=[e]),e.forEach(t=>{this._map.imageryLayers.add(i.ImageryLayer.fromProviderAsync(t,{}))})),this)}};I.registerType("hawkeye_map");var Fm=Oo;var ko=class extends I{constructor(){super(),this._wrapper=A.create("div","widget compass"),this._compassRectangle=void 0,this._outRing=void 0,this._gyro=void 0,this._rotation_marker=void 0,this._orbitCursorAngle=0,this._orbitCursorOpacity=0,this._orbitLastTimestamp=0,this._orbitFrame=void 0,this._orbitIsLook=!1,this._rotateInitialCursorAngle=void 0,this._rotateFrame=void 0,this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0,this._state=m.INITIALIZED}get type(){return I.getWidgetType("compass")}_installHook(){let e=this;Object.defineProperty(this._viewer,"compass",{get(){return e}}),this._wrapper.onmousedown=t=>{this._handleMouseDown(t)},this._wrapper.ondblclick=t=>{this._handleDoubleClick(t)}}_bindEvent(){this._viewer.on(D.POST_RENDER,this._postRenderHandler,this)}_unbindEvent(){this._viewer.off(D.POST_RENDER,this._postRenderHandler,this)}_postRenderHandler(){let e=this._viewer.camera.heading;this._outRing&&(this._outRing.style.cssText=`
184
182
  transform : rotate(-${e}rad);
185
183
  -webkit-transform : rotate(-${e}rad);
186
- `)}_mountContent(){S.create("div","out-ring-bg",this._wrapper),this._outRing=S.parseDom($.compass_outer,!0,"out-ring"),this._wrapper.appendChild(this._outRing),this._gyro=S.parseDom($.compass_inner,!0,"gyro"),this._wrapper.appendChild(this._gyro),this._rotation_marker=S.parseDom($.compass_rotation_marker,!0,"rotation_marker"),this._wrapper.appendChild(this._rotation_marker),this._rotation_marker.style.visibility="hidden",this._ready=!0}_handleMouseDown(e){if(this._viewer.scene.mode===i.SceneMode.MORPHING)return!0;this._compassRectangle=e.currentTarget.getBoundingClientRect();let r=this._compassRectangle.width/2,s=this._getVector(e),o=i.Cartesian2.magnitude(s)/r;if(o<50/145)this._orbit(s);else if(o<1)this._rotate(s);else return!0}_handleDoubleClick(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.SceneMode.MORPHING||!r.enableInputs)return!0;if(e.mode===i.SceneMode.COLUMBUS_VIEW&&!r.enableTranslate||(e.mode===i.SceneMode.SCENE3D||e.mode===i.SceneMode.COLUMBUS_VIEW)&&(!r.enableLook||e.mode===i.SceneMode.SCENE3D&&!r.enableRotate))return;let s=this._getCameraFocus(!0);if(!s)return;let o=e.globe.ellipsoid.cartographicToCartesian(t.positionCartographic),a=e.globe.ellipsoid.geodeticSurfaceNormal(s),l=new i.BoundingSphere(s,0);t.flyToBoundingSphere(l,{offset:new i.HeadingPitchRange(0,i.Math.PI_OVER_TWO-i.Cartesian3.angleBetween(a,t.directionWC),i.Cartesian3.distance(o,s)),duration:1.5})}_getCameraFocus(e){let t=new i.Cartesian3,r=this._viewer.scene,s=r.camera;if(r.mode!==i.SceneMode.MORPHING){if(this._viewer.delegate.trackedEntity)t=this._viewer.delegate.trackedEntity.position.getValue(this._viewer.clock.currentTime);else{let o=new i.Ray;o.origin=s.positionWC,o.direction=s.directionWC,t=r.globe.pick(o,r)}if(t){if(r.mode===i.SceneMode.SCENE2D||r.mode===i.SceneMode.COLUMBUS_VIEW){t=s.worldToCameraCoordinatesPoint(t);let o=new i.Cartographic;e&&(t=r.globe.ellipsoid.cartographicToCartesian(r.mapProjection.unproject(t,o)))}else e||(t=s.worldToCameraCoordinatesPoint(t));return t}}}_orbit(e){let t=this._viewer.scene,r=t.screenSpaceCameraController,s=t.camera;if(!(t.mode===i.SceneMode.MORPHING||!r.enableInputs)){switch(t.mode){case i.SceneMode.COLUMBUS_VIEW:if(r.enableLook)break;if(!r.enableTranslate||!r.enableTilt)return;break;case i.SceneMode.SCENE3D:if(r.enableLook)break;if(!r.enableTilt||!r.enableRotate)return;break;case i.SceneMode.SCENE2D:if(!r.enableTranslate)return;break}if(this._mouseMoveHandle=o=>{this._orbitMouseMoveFunction(o)},this._mouseUpHandle=()=>{this._orbitMouseUpFunction()},document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._orbitLastTimestamp=i.getTimestamp(),this._viewer.delegate.trackedEntity)this._orbitFrame=void 0,this._orbitIsLook=!1;else{let o=this._getCameraFocus(!0);o?(this._orbitFrame=i.Transforms.eastNorthUpToFixedFrame(o,t.globe.ellipsoid),this._orbitIsLook=!1):(this._orbitFrame=i.Transforms.eastNorthUpToFixedFrame(s.positionWC,t.globe.ellipsoid),this._orbitIsLook=!0)}this._rotation_marker.style.visibility="visible",this._gyro.className+=" gyro-active",document.addEventListener("mousemove",this._mouseMoveHandle,!1),document.addEventListener("mouseup",this._mouseUpHandle,!1),this._viewer.clock.onTick.addEventListener(this._orbitTickFunction,this),this._updateAngleAndOpacity(e,this._compassRectangle.width)}}_orbitTickFunction(){let e=this._viewer.scene,t=this._viewer.camera,r=i.getTimestamp(),s=r-this._orbitLastTimestamp,o=(this._orbitCursorOpacity-.5)*2.5/1e3,a=s*o,l=this._orbitCursorAngle+i.Math.PI_OVER_TWO,h=Math.cos(l)*a,c=Math.sin(l)*a,p;this._orbitFrame&&(p=i.Matrix4.clone(t.transform),t.lookAtTransform(this._orbitFrame)),e.mode===i.SceneMode.SCENE2D?t.move(new i.Cartesian3(h,c,0),Math.max(e.canvas.clientWidth,e.canvas.clientHeight)/100*t.positionCartographic.height*a):this._orbitIsLook?(t.look(i.Cartesian3.UNIT_Z,-h),t.look(t.right,-c)):(t.rotateLeft(h),t.rotateUp(c)),this._orbitFrame&&p&&t.lookAtTransform(p),this._orbitLastTimestamp=r}_updateAngleAndOpacity(e,t){let r=Math.atan2(-e.y,e.x);this._orbitCursorAngle=i.Math.zeroToTwoPi(r-i.Math.PI_OVER_TWO);let s=i.Cartesian2.magnitude(e),o=t/2,a=Math.min(s/o,1);this._orbitCursorOpacity=.5*a*a+.5,this._rotation_marker.style.cssText=`
184
+ `)}_mountContent(){A.create("div","out-ring-bg",this._wrapper),this._outRing=A.parseDom(ie.compass_outer,!0,"out-ring"),this._wrapper.appendChild(this._outRing),this._gyro=A.parseDom(ie.compass_inner,!0,"gyro"),this._wrapper.appendChild(this._gyro),this._rotation_marker=A.parseDom(ie.compass_rotation_marker,!0,"rotation_marker"),this._wrapper.appendChild(this._rotation_marker),this._rotation_marker.style.visibility="hidden",this._ready=!0}_handleMouseDown(e){if(this._viewer.scene.mode===i.SceneMode.MORPHING)return!0;this._compassRectangle=e.currentTarget.getBoundingClientRect();let r=this._compassRectangle.width/2,s=this._getVector(e),o=i.Cartesian2.magnitude(s)/r;if(o<50/145)this._orbit(s);else if(o<1)this._rotate(s);else return!0}_handleDoubleClick(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.SceneMode.MORPHING||!r.enableInputs)return!0;if(e.mode===i.SceneMode.COLUMBUS_VIEW&&!r.enableTranslate||(e.mode===i.SceneMode.SCENE3D||e.mode===i.SceneMode.COLUMBUS_VIEW)&&(!r.enableLook||e.mode===i.SceneMode.SCENE3D&&!r.enableRotate))return;let s=this._getCameraFocus(!0);if(!s)return;let o=e.globe.ellipsoid.cartographicToCartesian(t.positionCartographic),n=e.globe.ellipsoid.geodeticSurfaceNormal(s),l=new i.BoundingSphere(s,0);t.flyToBoundingSphere(l,{offset:new i.HeadingPitchRange(0,i.Math.PI_OVER_TWO-i.Cartesian3.angleBetween(n,t.directionWC),i.Cartesian3.distance(o,s)),duration:1.5})}_getCameraFocus(e){let t=new i.Cartesian3,r=this._viewer.scene,s=r.camera;if(r.mode!==i.SceneMode.MORPHING){if(this._viewer.delegate.trackedEntity)t=this._viewer.delegate.trackedEntity.position.getValue(this._viewer.clock.currentTime);else{let o=new i.Ray;o.origin=s.positionWC,o.direction=s.directionWC,t=r.globe.pick(o,r)}if(t){if(r.mode===i.SceneMode.SCENE2D||r.mode===i.SceneMode.COLUMBUS_VIEW){t=s.worldToCameraCoordinatesPoint(t);let o=new i.Cartographic;e&&(t=r.globe.ellipsoid.cartographicToCartesian(r.mapProjection.unproject(t,o)))}else e||(t=s.worldToCameraCoordinatesPoint(t));return t}}}_orbit(e){let t=this._viewer.scene,r=t.screenSpaceCameraController,s=t.camera;if(!(t.mode===i.SceneMode.MORPHING||!r.enableInputs)){switch(t.mode){case i.SceneMode.COLUMBUS_VIEW:if(r.enableLook)break;if(!r.enableTranslate||!r.enableTilt)return;break;case i.SceneMode.SCENE3D:if(r.enableLook)break;if(!r.enableTilt||!r.enableRotate)return;break;case i.SceneMode.SCENE2D:if(!r.enableTranslate)return;break}if(this._mouseMoveHandle=o=>{this._orbitMouseMoveFunction(o)},this._mouseUpHandle=()=>{this._orbitMouseUpFunction()},document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._orbitLastTimestamp=i.getTimestamp(),this._viewer.delegate.trackedEntity)this._orbitFrame=void 0,this._orbitIsLook=!1;else{let o=this._getCameraFocus(!0);o?(this._orbitFrame=i.Transforms.eastNorthUpToFixedFrame(o,t.globe.ellipsoid),this._orbitIsLook=!1):(this._orbitFrame=i.Transforms.eastNorthUpToFixedFrame(s.positionWC,t.globe.ellipsoid),this._orbitIsLook=!0)}this._rotation_marker.style.visibility="visible",this._gyro.className+=" gyro-active",document.addEventListener("mousemove",this._mouseMoveHandle,!1),document.addEventListener("mouseup",this._mouseUpHandle,!1),this._viewer.clock.onTick.addEventListener(this._orbitTickFunction,this),this._updateAngleAndOpacity(e,this._compassRectangle.width)}}_orbitTickFunction(){let e=this._viewer.scene,t=this._viewer.camera,r=i.getTimestamp(),s=r-this._orbitLastTimestamp,o=(this._orbitCursorOpacity-.5)*2.5/1e3,n=s*o,l=this._orbitCursorAngle+i.Math.PI_OVER_TWO,h=Math.cos(l)*n,c=Math.sin(l)*n,p;this._orbitFrame&&(p=i.Matrix4.clone(t.transform),t.lookAtTransform(this._orbitFrame)),e.mode===i.SceneMode.SCENE2D?t.move(new i.Cartesian3(h,c,0),Math.max(e.canvas.clientWidth,e.canvas.clientHeight)/100*t.positionCartographic.height*n):this._orbitIsLook?(t.look(i.Cartesian3.UNIT_Z,-h),t.look(t.right,-c)):(t.rotateLeft(h),t.rotateUp(c)),this._orbitFrame&&p&&t.lookAtTransform(p),this._orbitLastTimestamp=r}_updateAngleAndOpacity(e,t){let r=Math.atan2(-e.y,e.x);this._orbitCursorAngle=i.Math.zeroToTwoPi(r-i.Math.PI_OVER_TWO);let s=i.Cartesian2.magnitude(e),o=t/2,n=Math.min(s/o,1);this._orbitCursorOpacity=.5*n*n+.5,this._rotation_marker.style.cssText=`
187
185
  transform: rotate(-${this._orbitCursorAngle}rad);
188
- opacity: ${this._orbitCursorOpacity}`}_orbitMouseMoveFunction(e){this._updateAngleAndOpacity(this._getVector(e),this._compassRectangle.width)}_orbitMouseUpFunction(){document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._viewer.clock.onTick.removeEventListener(this._orbitTickFunction,this),this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0,this._rotation_marker.style.visibility="hidden",this._gyro.className=this._gyro.className.replace(" gyro-active","")}_rotate(e){let t=this._viewer.scene,r=t.camera,s=t.screenSpaceCameraController;if(t.mode===i.SceneMode.MORPHING||t.mode===i.SceneMode.SCENE2D||!s.enableInputs||!s.enableLook&&(t.mode===i.SceneMode.COLUMBUS_VIEW||t.mode===i.SceneMode.SCENE3D&&!s.enableRotate))return;if(this._mouseMoveHandle=a=>{this._rotateMouseMoveFunction(a)},this._mouseUpHandle=()=>{this._rotateMouseUpFunction()},document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._rotateInitialCursorAngle=Math.atan2(-e.y,e.x),this._viewer.delegate.trackedEntity)this._rotateFrame=void 0;else{let a=this._getCameraFocus(!0);!a||t.mode===i.SceneMode.COLUMBUS_VIEW&&!s.enableLook&&!s.enableTranslate?this._rotateFrame=i.Transforms.eastNorthUpToFixedFrame(r.positionWC,t.globe.ellipsoid):this._rotateFrame=i.Transforms.eastNorthUpToFixedFrame(a,t.globe.ellipsoid)}let o;this._rotateFrame&&(o=i.Matrix4.clone(r.transform),r.lookAtTransform(this._rotateFrame)),this._rotateInitialCameraAngle=-r.heading,this._rotateFrame&&o&&r.lookAtTransform(o),document.addEventListener("mousemove",this._mouseMoveHandle,!1),document.addEventListener("mouseup",this._mouseUpHandle,!1)}_rotateMouseMoveFunction(e){let t=this._viewer.camera,r=this._getVector(e),o=Math.atan2(-r.y,r.x)-this._rotateInitialCursorAngle,a=i.Math.zeroToTwoPi(this._rotateInitialCameraAngle-o),l;this._rotateFrame&&(l=i.Matrix4.clone(t.transform),t.lookAtTransform(this._rotateFrame));let h=-t.heading;t.rotateRight(a-h),this._rotateFrame&&l&&t.lookAtTransform(l)}_rotateMouseUpFunction(){document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0}_getVector(e){let t=this._compassRectangle,r=new i.Cartesian2((t.right-t.left)/2,(t.bottom-t.top)/2),s=new i.Cartesian2(e.clientX-t.left,e.clientY-t.top),o=new i.Cartesian2;return i.Cartesian2.subtract(s,r,o),o}};M.registerType("compass");var xl=xs;var El=new i.EllipsoidGeodesic,De=[1,2,3,5],Es=[...De,...De.map(n=>n*10),...De.map(n=>n*100),...De.map(n=>n*1e3),...De.map(n=>n*1e4),...De.map(n=>n*1e5),...De.map(n=>n*1e6)],Ps=class extends M{constructor(){super(),this._wrapper=S.create("div","widget distance-legend"),this._labelEl=void 0,this._scaleBarEl=void 0,this._lastUpdate=i.getTimestamp(),this._state=d.INITIALIZED}get type(){return M.getWidgetType("distance_legend")}_installHook(){let e=this;Object.defineProperty(this._viewer,"distanceLegend",{get(){return e}})}_bindEvent(){this._viewer.on(A.POST_RENDER,this._updateContent,this)}_unbindEvent(){this._viewer.off(A.POST_RENDER,this._updateContent,this)}_updateContent(e,t){let r=i.getTimestamp();if(r<this._lastUpdate+250||!this._labelEl||!this._scaleBarEl)return;this._lastUpdate=r;let s=e.canvas.width,o=e.canvas.height,a=e.camera.getPickRay(new i.Cartesian2(s/2|0,o-1)),l=e.camera.getPickRay(new i.Cartesian2(1+s/2|0,o-1)),h=e.globe.pick(a,e),c=e.globe.pick(l,e);if(!h||!c)return;El.setEndPoints(e.globe.ellipsoid.cartesianToCartographic(h),e.globe.ellipsoid.cartesianToCartographic(c));let p=El.surfaceDistance,f=100,T=0;for(let y=Es.length-1;y>=0;--y)if(Es[y]/p<f){T=Es[y];break}if(T){this._wrapper.style.visibility="visible",this._labelEl.innerHTML=T>=1e3?`${T/1e3} km`:`${T} m`;let y=T/p|0;this._scaleBarEl.style.cssText=`width: ${y}px; left: ${(125-y)/2}px;`}}_mountContent(){this._labelEl=S.create("div","label",this._wrapper),this._scaleBarEl=S.create("div","scale-bar",this._wrapper),this._wrapper.style.visibility="hidden",this._ready=!0}};M.registerType("distance_legend");var Pl=Ps;var bs=class extends M{constructor(){super(),this._wrapper=S.create("div","widget zoom-controller"),this._zoomInEl=void 0,this._zoomOutEl=void 0,this._refreshEl=void 0,this._state=d.INITIALIZED}get type(){return M.getWidgetType("zoom_controller")}_getCameraFocus(e){let t=new i.Ray(e.camera.positionWC,e.camera.directionWC),r=i.IntersectionTests.rayEllipsoid(t,i.Ellipsoid.WGS84);return r?i.Ray.getPoint(t,r.start):i.IntersectionTests.grazingAltitudeLocation(t,i.Ellipsoid.WGS84)}_getCameraPosition(e,t,r){let s=new i.Cartesian3,o=i.Cartesian3.subtract(t,e.position,s),a=i.Cartesian3.multiplyByScalar(o,r,s);return i.Cartesian3.add(e.position,a,s)}_zoomIn(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.SceneMode.MORPHING||!r.enableInputs||e.mode===i.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===i.SceneMode.SCENE2D)t.zoomIn(t.positionCartographic.height*.5);else if(e.mode===i.SceneMode.SCENE3D){let s=this._getCameraFocus(e),o=this._getCameraPosition(t,s,1/2);t.flyTo({destination:o,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},duration:.5,convert:!1})}}_refresh(){this._viewer.camera.flyHome(1.5)}_zoomOut(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.SceneMode.MORPHING||!r.enableInputs||e.mode===i.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===i.SceneMode.SCENE2D)t.zoomOut(t.positionCartographic.height);else if(e.mode===i.SceneMode.SCENE3D){let s=this._getCameraFocus(e),o=this._getCameraPosition(t,s,-1);t.flyTo({destination:o,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},duration:.5,convert:!1})}}_installHook(){let e=this;Object.defineProperty(this._viewer,"zoomController",{get(){return e}})}_mountContent(){this._zoomInEl=S.parseDom($.increase,!0,"zoom-in"),this._refreshEl=S.parseDom($.refresh,!0,"refresh"),this._zoomOutEl=S.parseDom($.decrease,!0,"zoom-out"),this._wrapper.appendChild(this._zoomInEl),this._wrapper.appendChild(this._refreshEl),this._wrapper.appendChild(this._zoomOutEl);let e=this;this._zoomInEl.onclick=()=>{e._zoomIn()},this._refreshEl.onclick=()=>{e._refresh()},this._zoomOutEl.onclick=()=>{e._zoomOut()},this._ready=!0}};M.registerType("zoom_controller");var bl=bs;var Ss=class extends M{constructor(){super(),this._wrapper=S.create("div","widget loading-mask"),this._state=d.INITIALIZED}get type(){return M.getWidgetType("loading_mask")}_installHook(){let e=this;Object.defineProperty(this._viewer,"loadingMask",{get(){return e}})}_mountContent(){let e=S.parseDom(`
186
+ opacity: ${this._orbitCursorOpacity}`}_orbitMouseMoveFunction(e){this._updateAngleAndOpacity(this._getVector(e),this._compassRectangle.width)}_orbitMouseUpFunction(){document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._viewer.clock.onTick.removeEventListener(this._orbitTickFunction,this),this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0,this._rotation_marker.style.visibility="hidden",this._gyro.className=this._gyro.className.replace(" gyro-active","")}_rotate(e){let t=this._viewer.scene,r=t.camera,s=t.screenSpaceCameraController;if(t.mode===i.SceneMode.MORPHING||t.mode===i.SceneMode.SCENE2D||!s.enableInputs||!s.enableLook&&(t.mode===i.SceneMode.COLUMBUS_VIEW||t.mode===i.SceneMode.SCENE3D&&!s.enableRotate))return;if(this._mouseMoveHandle=n=>{this._rotateMouseMoveFunction(n)},this._mouseUpHandle=()=>{this._rotateMouseUpFunction()},document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._rotateInitialCursorAngle=Math.atan2(-e.y,e.x),this._viewer.delegate.trackedEntity)this._rotateFrame=void 0;else{let n=this._getCameraFocus(!0);!n||t.mode===i.SceneMode.COLUMBUS_VIEW&&!s.enableLook&&!s.enableTranslate?this._rotateFrame=i.Transforms.eastNorthUpToFixedFrame(r.positionWC,t.globe.ellipsoid):this._rotateFrame=i.Transforms.eastNorthUpToFixedFrame(n,t.globe.ellipsoid)}let o;this._rotateFrame&&(o=i.Matrix4.clone(r.transform),r.lookAtTransform(this._rotateFrame)),this._rotateInitialCameraAngle=-r.heading,this._rotateFrame&&o&&r.lookAtTransform(o),document.addEventListener("mousemove",this._mouseMoveHandle,!1),document.addEventListener("mouseup",this._mouseUpHandle,!1)}_rotateMouseMoveFunction(e){let t=this._viewer.camera,r=this._getVector(e),o=Math.atan2(-r.y,r.x)-this._rotateInitialCursorAngle,n=i.Math.zeroToTwoPi(this._rotateInitialCameraAngle-o),l;this._rotateFrame&&(l=i.Matrix4.clone(t.transform),t.lookAtTransform(this._rotateFrame));let h=-t.heading;t.rotateRight(n-h),this._rotateFrame&&l&&t.lookAtTransform(l)}_rotateMouseUpFunction(){document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0}_getVector(e){let t=this._compassRectangle,r=new i.Cartesian2((t.right-t.left)/2,(t.bottom-t.top)/2),s=new i.Cartesian2(e.clientX-t.left,e.clientY-t.top),o=new i.Cartesian2;return i.Cartesian2.subtract(s,r,o),o}};I.registerType("compass");var Hm=ko;var Nm=new i.EllipsoidGeodesic,Fe=[1,2,3,5],zo=[...Fe,...Fe.map(a=>a*10),...Fe.map(a=>a*100),...Fe.map(a=>a*1e3),...Fe.map(a=>a*1e4),...Fe.map(a=>a*1e5),...Fe.map(a=>a*1e6)],Fo=class extends I{constructor(){super(),this._wrapper=A.create("div","widget distance-legend"),this._labelEl=void 0,this._scaleBarEl=void 0,this._lastUpdate=i.getTimestamp(),this._state=m.INITIALIZED}get type(){return I.getWidgetType("distance_legend")}_installHook(){let e=this;Object.defineProperty(this._viewer,"distanceLegend",{get(){return e}})}_bindEvent(){this._viewer.on(D.POST_RENDER,this._updateContent,this)}_unbindEvent(){this._viewer.off(D.POST_RENDER,this._updateContent,this)}_updateContent(e,t){let r=i.getTimestamp();if(r<this._lastUpdate+250||!this._labelEl||!this._scaleBarEl)return;this._lastUpdate=r;let s=e.canvas.width,o=e.canvas.height,n=e.camera.getPickRay(new i.Cartesian2(s/2|0,o-1)),l=e.camera.getPickRay(new i.Cartesian2(1+s/2|0,o-1)),h=e.globe.pick(n,e),c=e.globe.pick(l,e);if(!h||!c)return;Nm.setEndPoints(e.globe.ellipsoid.cartesianToCartographic(h),e.globe.ellipsoid.cartesianToCartographic(c));let p=Nm.surfaceDistance,_=100,w=0;for(let g=zo.length-1;g>=0;--g)if(zo[g]/p<_){w=zo[g];break}if(w){this._wrapper.style.visibility="visible",this._labelEl.innerHTML=w>=1e3?`${w/1e3} km`:`${w} m`;let g=w/p|0;this._scaleBarEl.style.cssText=`width: ${g}px; left: ${(125-g)/2}px;`}}_mountContent(){this._labelEl=A.create("div","label",this._wrapper),this._scaleBarEl=A.create("div","scale-bar",this._wrapper),this._wrapper.style.visibility="hidden",this._ready=!0}};I.registerType("distance_legend");var Wm=Fo;var Ho=class extends I{constructor(){super(),this._wrapper=A.create("div","widget zoom-controller"),this._zoomInEl=void 0,this._zoomOutEl=void 0,this._refreshEl=void 0,this._state=m.INITIALIZED}get type(){return I.getWidgetType("zoom_controller")}_getCameraFocus(e){let t=new i.Ray(e.camera.positionWC,e.camera.directionWC),r=i.IntersectionTests.rayEllipsoid(t,i.Ellipsoid.WGS84);return r?i.Ray.getPoint(t,r.start):i.IntersectionTests.grazingAltitudeLocation(t,i.Ellipsoid.WGS84)}_getCameraPosition(e,t,r){let s=new i.Cartesian3,o=i.Cartesian3.subtract(t,e.position,s),n=i.Cartesian3.multiplyByScalar(o,r,s);return i.Cartesian3.add(e.position,n,s)}_zoomIn(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.SceneMode.MORPHING||!r.enableInputs||e.mode===i.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===i.SceneMode.SCENE2D)t.zoomIn(t.positionCartographic.height*.5);else if(e.mode===i.SceneMode.SCENE3D){let s=this._getCameraFocus(e),o=this._getCameraPosition(t,s,1/2);t.flyTo({destination:o,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},duration:.5,convert:!1})}}_refresh(){this._viewer.camera.flyHome(1.5)}_zoomOut(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.SceneMode.MORPHING||!r.enableInputs||e.mode===i.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===i.SceneMode.SCENE2D)t.zoomOut(t.positionCartographic.height);else if(e.mode===i.SceneMode.SCENE3D){let s=this._getCameraFocus(e),o=this._getCameraPosition(t,s,-1);t.flyTo({destination:o,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},duration:.5,convert:!1})}}_installHook(){let e=this;Object.defineProperty(this._viewer,"zoomController",{get(){return e}})}_mountContent(){this._zoomInEl=A.parseDom(ie.increase,!0,"zoom-in"),this._refreshEl=A.parseDom(ie.refresh,!0,"refresh"),this._zoomOutEl=A.parseDom(ie.decrease,!0,"zoom-out"),this._wrapper.appendChild(this._zoomInEl),this._wrapper.appendChild(this._refreshEl),this._wrapper.appendChild(this._zoomOutEl);let e=this;this._zoomInEl.onclick=()=>{e._zoomIn()},this._refreshEl.onclick=()=>{e._refresh()},this._zoomOutEl.onclick=()=>{e._zoomOut()},this._ready=!0}};I.registerType("zoom_controller");var Gm=Ho;var No=class extends I{constructor(){super(),this._wrapper=A.create("div","widget loading-mask"),this._state=m.INITIALIZED}get type(){return I.getWidgetType("loading_mask")}_installHook(){let e=this;Object.defineProperty(this._viewer,"loadingMask",{get(){return e}})}_mountContent(){let e=A.parseDom(`
189
187
  <span></span>
190
188
  <span></span>
191
189
  <span></span>
192
190
  <span></span>
193
191
  <span></span>
194
- `,!0,"loading");this._wrapper.appendChild(e),this._ready=!0}};M.registerType("loading_mask");var Sl=Ss;var Is=class extends M{constructor(){super(),this._wrapper=S.create("div","widget slider"),this._tileset=void 0,this._moveActive=!1,this._state=d.INITIALIZED}get type(){return M.getWidgetType("tileset_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"tilesetSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._tileset?this._viewer.scene.splitPosition=this._tileset.splitDirection>0?1:0:this._viewer.scene.splitPosition=0}_mountContent(){let e=S.parseDom($.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),this._tileset=this._viewer.scene.primitives.add(e.delegate||e),this._viewer.scene.splitPosition=this._wrapper.offsetLeft/this._wrapper.parentElement.offsetWidth),this)}};M.registerType("tileset_split");var Il=Is;var Ms=class extends M{constructor(){super(),this._wrapper=S.create("div","widget slider"),this._tileset=void 0,this._baseLayer=void 0,this._moveActive=!1,this._state=d.INITIALIZED}get type(){return M.getWidgetType("scene_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"sceneSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._viewer.scene.splitPosition=1}_mountContent(){let e=S.parseDom($.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),Promise.resolve(e.delegate||e).then(t=>{this._tileset=this._viewer.scene.primitives.add(t)})),this)}addBaseLayer(e){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),Promise.resolve(e).then(t=>{this._baseLayer=this._viewer.imageryLayers.addImageryProvider(t),this._baseLayer.splitDirection=1})),this)}};M.registerType("scene_split");var Ml=Ms;function As(){return{popup:new ll,contextMenu:new Jn,tooltip:new hl,mapSwitch:new nl,mapSplit:new al,locationBar:new Kn,hawkeyeMap:new Cl,compass:new xl,distanceLegend:new Pl,zoomController:new bl,loadingMask:new Sl,tilesetSplit:new Il,sceneSplit:new Ml}}var He="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACCklEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSs8Of+8x3/vv/88ffFu++/jl75/evEte//vnz//e/Dl3d/nrye8P//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2mxqSqLE2A6qO3uyAeLR6rdWYV/umAPC9RQjuyrspUYCeYVE1hdveioIVQ+YaJSST633mQURZ9KuiDZ0cGECI5sueakOnFjLGYCCqmNCzp2VoFflqr7PmBahasW+QTEwWfFtK8qjOWe35geJ0XxC5sWnf4Kp+rIxuHkFR7bKmH/+ZFiZDOnR0lnPmvASwIOe2F60l2MbnMPg69rd6e1fBJpKFa489ZQB5o2QKl5L53v/I4qz2WFHtqZb7DoG3iLC93DEYuXPImhdlKExwt6yoB59td/zfxzYuuHNV8OZ5SodlUUKI1rKqFd8DeLFrNYB/A6b1Qz9EzRMAAAAASUVORK5CYII=";var jd={icon_center:gt,icon_anchor:He,icon_size:[12,12],clampToModel:!1,maxAnchorSize:999},Ds=class{constructor(){this._viewer=void 0,this._anchorLayer=new i.CustomDataSource("draw-anchor-layer"),this._floatingAnchor=void 0,this._options={},this._plotEvent=new je,this._tooltipMess=void 0}set tooltipMess(e){this._tooltipMess=e}_getEventPosition(e){let{overlay:t,layer:r,position:s,surfacePosition:o}=e;return!this._options.clampToModel||!t&&!r?o:s}_onClick(e){let t=this._getEventPosition(e);if(!t)return!1;this._floatingAnchor||(this._floatingAnchor=this._onCreateAnchor({position:t})),this._plotEvent.fire(C.DRAW_ANCHOR,t)}_onMouseMove(e){this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess);let t=this._getEventPosition(e);if(!t)return!1;this._floatingAnchor&&this._floatingAnchor.position.setValue(t),this._plotEvent.fire(C.ANCHOR_MOVING,t)}_onRightClick(e){this._plotEvent.fire(C.DRAW_STOP,this._getEventPosition(e))}_onCreateAnchor({position:e,isCenter:t=!1}){var r;return this._anchorLayer.entities.add({position:e,billboard:{image:t?this._options.icon_center:this._options.icon_anchor,width:this._options.icon_size[0],height:this._options.icon_size[1],pixelOffset:this._options.pixelOffset||new i.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new i.Cartesian3(0,0,-100),disableDepthTestDistance:(r=this._options.disableDepthTestDistance)!=null?r:0,heightReference:this._viewer.scene.mode===i.SceneMode.SCENE3D&&!this._options.clampToModel?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE}})}_onClearAnchor(){this._anchorLayer.entities.removeAll()}_bindEvent(){this._viewer.on(L.CLICK,this._onClick,this),this._viewer.on(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(C.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(L.CLICK,this._onClick,this),this._viewer.off(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(C.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,t,r){return this._plotEvent.on(e,t,r||this),this}off(e,t,r){return this._plotEvent.off(e,t,r||this),this}fire(e,t={}){return this._plotEvent.fire(e,t),this}activate(e={}){return this._viewer.tooltip.enable=!0,this._options={...jd,...e},this._unbindEvent(),this._bindEvent(),this.fire(C.DRAW_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._floatingAnchor=void 0,this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"drawTool",{value:this,writable:!1})}},Al=Ds;var Dl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACDElEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSscO/l7x3ff/378fz9n++Hr//4fezmz+9ffvz7/eHr33eP3/6Z8P//fwF0fSguevv5X6UwL1PbwoNfGRrWfGJ48PoPiuUOWuwMDSH8DHryrB8FuZkcGBgYLsDk4AZ9/Pavg5mJscS24SXzhQe/8XmXocCLl6Etgv8XJxujOcwwmEEOX37830OMITCQYM/NMD1F8CcHK6MEAwPDByaQ+Ofv/9fUrvpItCEgsODgV4aTt3+xP3n3twHEBxlk8On7P/4J2z4TbQgMNKz5yCDCy5QBNujJu78Ja05+YyHZFAYGhgPXfjJ8+PoPFDYGTEyMDCYPXv8lxxwwuPnsDwcorTGxsTDyoEczOYDp4es/Fwzk2cg2gI2F8QeIZjJWYjtgoMBKliEC3EwMlmpsIK9dAMXaBn8TTgYFUdLDu8CTl+H2iz/nYenow8uPf+cvyBQiyRCQxcU+vH9VJViKGKDpiEGcn7lIW5b1MbGGgby0qVTk75vPf1eCUgFIDDnTCrz5/O/S1ce/ZROmv8PIsDAAyrhLcoT/MDIybJcSZPaDiaOXRwIvP/7tE+dnTtx45js4wV148Ass4aDFwRBkxvlXVZLlz4ev/4okBJinIWvEVbApvP38L/LT93/2vJxMoEzJ8OXHv6sKoiy7QdkMQzUDAwMAuq71NKWtMMgAAAAASUVORK5CYII=";var Zd={icon_center:gt,icon_anchor:He,icon_midAnchor:Dl,icon_size:[12,12],clampToModel:!0},Ls=class{constructor(){this._viewer=void 0,this._anchorLayer=new i.CustomDataSource("edit-anchor-layer"),this._options={},this._plotEvent=new je,this._tooltipMess=void 0,this._pickedAnchor=void 0,this._isMoving=!1,this._anchors=[]}set tooltipMess(e){this._tooltipMess=e}_onClick(e){if(this._isMoving){let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!t)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties&&(this._pickedAnchor.position.setValue(t),this._plotEvent.fire(C.EDIT_ANCHOR_STOP,{pickedAnchor:this._pickedAnchor,position:t})),this._isMoving=!1}else{if(!e.target||!e.target.id)return!1;this._pickedAnchor=e.target.id,this._isMoving=!0}}_onMouseMove(e){if(this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess),!this._isMoving&&this._anchors.length!==0)return!1;let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!t)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties?(this._pickedAnchor.position.setValue(t),this._plotEvent.fire(C.ANCHOR_MOVING,{pickedAnchor:this._pickedAnchor,position:t})):this._anchors.length===0&&this._plotEvent.fire(C.ANCHOR_MOVING,{position:t})}_onRightClick(e){let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;this._plotEvent.fire(C.EDIT_STOP,{pickedAnchor:this._pickedAnchor,position:t})}_onCreateAnchor({position:e,index:t,isCenter:r=!1,isMid:s=!1}){var l;let o=s?this._options.icon_midAnchor:r?this._options.icon_center:this._options.icon_anchor,a=this._anchorLayer.entities.add({position:e,billboard:{image:o,width:this._options.icon_size[0],height:this._options.icon_size[1],pixelOffset:this._options.pixelOffset||new i.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new i.Cartesian3(0,0,-100),disableDepthTestDistance:(l=this._options.disableDepthTestDistance)!=null?l:0,heightReference:this._viewer.scene.mode===i.SceneMode.SCENE3D&&!this._options.clampToModel?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE},properties:{isMid:s,index:t}});this._anchors.push(a)}_onUpdateAnchor({index:e,position:t}){this._anchors[e]&&this._anchors[e].position.setValue(t)}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchors=[]}_bindEvent(){this._viewer.on(L.CLICK,this._onClick,this),this._viewer.on(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(C.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.on(C.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(L.CLICK,this._onClick,this),this._viewer.off(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(C.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.off(C.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,t,r){return this._plotEvent.on(e,t,r||this),this}off(e,t,r){return this._plotEvent.off(e,t,r||this),this}fire(e,t){return this._plotEvent.fire(e,t),this}activate(e={}){return this._anchorLayer.entities.removeAll(),this._anchors=[],this._viewer.tooltip.enable=!0,this._options={...Zd,...e},this._unbindEvent(),this._bindEvent(),this.fire(C.EDIT_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._anchors=[],this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"editTool",{value:this,writable:!1})}},Ll=Ls;function Rs(){return{drawTool:new Al,editTool:new Ll}}var qd={creditContainer:void 0,shouldAnimate:!0},Os=class{constructor(e,t={}){if(!et("isInitialized"))throw new Error("please do the ready function");if(!e||typeof e=="string"&&!document.getElementById(e))throw new Error("Viewer: the container is empty");if(e instanceof HTMLElement)throw new Error("Viewer: not support the type container");if(typeof e=="string"){let o=et("baseUrl");o&&i.buildModuleUrl.setBaseUrl(o)}this._delegate=typeof e!="string"?e:new qe(e,{...qd,...t}),new _i(this,t),this._viewerEvent=new gi,this._sceneEvent=new vi(this),this._viewerOption=new rs(this),this._cameraOption=new os(this),this._widgetContainer=S.create("div","viewer-widgets",typeof e=="string"?document.getElementById(e):this._delegate.container),this._layerContainer=S.create("div","viewer-layers",typeof e=="string"?document.getElementById(e):this._delegate.container),this._baseLayerPicker=new _s({globe:this._delegate.scene.globe}),this._layerGroupCache={},this._layerCache={};let r=As();Object.keys(r).forEach(o=>{this._use(r[o])});let s=Rs();Object.keys(s).forEach(o=>{this._use(s[o])})}get delegate(){return this._delegate}get container(){return this._delegate.container}get widgetContainer(){return this._widgetContainer}get layerContainer(){return this._layerContainer}get scene(){return this._delegate.scene}get camera(){return this._delegate.camera}get canvas(){return this._delegate.scene.canvas}get dataSources(){return this._delegate.dataSources}get imageryLayers(){return this._delegate.imageryLayers}get terrainProvider(){return this._delegate.terrainProvider}get entities(){return this._delegate.entities}get postProcessStages(){return this._delegate.scene.postProcessStages}get clock(){return this._delegate.clock}get viewerEvent(){return this._viewerEvent}get cameraPosition(){var t,r,s,o,a,l,h;let e=u.transformCartographicToWGS84((t=this.camera)==null?void 0:t.positionCartographic);return e&&(e.heading=i.Math.toDegrees((s=(r=this.camera)==null?void 0:r.heading)!=null?s:0),e.pitch=i.Math.toDegrees((a=(o=this.camera)==null?void 0:o.pitch)!=null?a:0),e.roll=i.Math.toDegrees((h=(l=this.camera)==null?void 0:l.roll)!=null?h:0)),e}get resolution(){let e=this.scene.canvas.width,t=this.scene.canvas.height,r=u.transformWindowToWGS84(new i.Cartesian2(e/2|0,t-1),this),s=u.transformWindowToWGS84(new i.Cartesian2(1+e/2|0,t-1),this);return!r||!s?1:Math.abs(r.lng-s.lng)}get viewBounds(){let e=this.scene.canvas.width,t=this.scene.canvas.height,r=u.transformWindowToWGS84(new i.Cartesian2(0,t),this),s=u.transformWindowToWGS84(new i.Cartesian2(e,0),this);return!r||!s?i.Rectangle.MAX_VALUE:i.Rectangle.fromDegrees(r.lng,r.lat,s.lng,s.lat)}get zoom(){let e=this.camera.positionCartographic.height,t=40487.57,r=7096758e-11,s=91610.74,o=-40467.74;return Math.round(o+(t-o)/(1+Math.pow(e/s,r)))}_use(e){return e&&e.install&&e.install(this),this}_addLayerGroup(e){e!=null&&e.layerGroupEvent&&!Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(we.ADD,this),this._layerGroupCache[e.id]=e)}_removeLayerGroup(e){e!=null&&e.layerGroupEvent&&Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(we.REMOVE,this),delete this._layerGroupCache[e.id])}_addLayer(e){!this._layerCache[e.type]&&(this._layerCache[e.type]={}),Object(this._layerCache[e.type]).hasOwnProperty(e.id)||(e.fire(Te.ADD,this),this._layerCache[e.type][e.id]=e)}_removeLayer(e){Object(this._layerCache[e.type]).hasOwnProperty(e.id)&&(e.fire(Te.REMOVE,this),delete this._layerCache[e.type][e.id])}setOptions(e){return this._viewerOption.setOptions(e),this}setPitchRange(e=-90,t=-20){return this._cameraOption.setPitchRange(e,t),this}changeSceneMode(e,t=0){return e===2?this._delegate.scene.morphTo2D(t):e===3?this._delegate.scene.morphTo3D(t):e===2.5&&this._delegate.scene.morphToColumbusView(t),this}changeMouseMode(e){return this._cameraOption.changeMouseMode(e),this}setTerrain(e){return this._delegate.scene.setTerrain(new i.Terrain(e||Promise.resolve(new i.EllipsoidTerrainProvider))),this}addBaseLayer(e,t={}){return e?(this._baseLayerPicker.addImageryLayer(e,t),this._baseLayerPicker.selectedImageryLayer||this._baseLayerPicker.changeImageryLayer(0),this.mapSwitch&&this.mapSwitch.addMap(t),this):this}getBaseLayer(e){return this._baseLayerPicker.getImageryLayer(e)}changeBaseLayer(e){return this._baseLayerPicker.changeImageryLayer(e),this}getImageryLayerInfo(e){let t=this._delegate.camera.getPickRay(e);return this._delegate.imageryLayers.pickImageryLayerFeatures(t,this._delegate.scene)}addLayerGroup(e){return this._addLayerGroup(e),this}removeLayerGroup(e){return this._removeLayerGroup(e),this}getLayerGroup(e){return this._layerGroupCache[e]||void 0}addLayer(e){return this._addLayer(e),this}removeLayer(e){return this._removeLayer(e),this}hasLayer(e){return Object(this._layerCache[e.type]).hasOwnProperty(e.id)}getLayer(e){let t=this.getLayers().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}getLayers(){let e=[];return Object.keys(this._layerCache).forEach(t=>{let r=this._layerCache[t];Object.keys(r).forEach(s=>{e.push(r[s])})}),e}eachLayer(e,t){return Object.keys(this._layerCache).forEach(r=>{let s=this._layerCache[r];Object.keys(s).forEach(o=>{e.call(t,s[o])})}),this}flyTo(e,t){return this._delegate.flyTo((e==null?void 0:e.delegate)||e,{duration:t}),this}zoomTo(e){return this._delegate.zoomTo((e==null?void 0:e.delegate)||e),this}flyToPosition(e,t,r){return e=_.parsePosition(e),this.camera.flyTo({destination:u.transformWGS84ToCartesian(e),orientation:{heading:i.Math.toRadians(e.heading),pitch:i.Math.toRadians(e.pitch),roll:i.Math.toRadians(e.roll)},complete:t,duration:r}),this}zoomToPosition(e,t){return this.flyToPosition(e,t,0),this}flyToBounds(e,{heading:t=0,pitch:r=0,roll:s=0},o,a){return e?(Array.isArray(e)||(e=e.split(",")),this.camera.flyTo({destination:i.Rectangle.fromDegrees(e[0],e[1],e[2],e[3]),orientation:{heading:i.Math.toRadians(t),pitch:i.Math.toRadians(r),roll:i.Math.toRadians(s)},complete:o,duration:a}),this):this}zoomToBounds(e,{heading:t=0,pitch:r=0,roll:s=0},o){return this.flyToBounds(e,{heading:t,pitch:r,roll:s},o),this}on(e,t,r){return this._viewerEvent.on(e,t,r||this),this._sceneEvent.on(e,t,r||this),this}once(e,t,r){return this._viewerEvent.once(e,t,r||this),this}off(e,t,r){return this._viewerEvent.off(e,t,r||this),this._sceneEvent.off(e,t,r||this),this}destroy(){return Object.keys(this._layerCache).forEach(e=>{let t=this._layerCache[e];Object.keys(t).forEach(r=>{this._removeLayer(t[r])})}),this._delegate.destroy(),this._delegate=void 0,this._baseLayerPicker=void 0,this._layerCache={},this._widgetContainer.parentNode.removeChild(this._widgetContainer),this._widgetContainer=void 0,this._layerContainer.parentNode.removeChild(this._layerContainer),this._layerContainer=void 0,this}exportScene(e){this.scene.render();let r=this.canvas.toDataURL("image/png").replace("image/png","image/octet-stream"),s=document.createElement("a"),o=v.dataURLtoBlob(r),a=URL.createObjectURL(o);return s.download=`${e||"scene"}.png`,s.href=a,s.click(),this}getOffset(){var r;let e={x:0,y:0},t=(r=this._delegate)==null?void 0:r.container;if(t)if(t.getBoundingClientRect){let s=t.getBoundingClientRect();e.x=s.left,e.y=s.top}else e.x=t.offsetLeft,e.y=t.offsetTop;return e}},Xd=Os;var Jd={ARCGIS:"arcgis",BING:"bing",OSM:"osm",SINGLE_TILE:"single_tile",WMS:"wms",WMTS:"wmts",XYZ:"xyz",COORD:"coord",GRID:"grid",MAPBOX:"mapbox",MAPBOX_STYLE:"mapbox_style",TMS:"tms"},R=Jd;var ks=class extends i.WebMercatorTilingScheme{constructor(e){super(e);let t=new i.WebMercatorProjection;this._projection.project=function(r,s){return s=ce.WGS84ToGCJ02(i.Math.toDegrees(r.longitude),i.Math.toDegrees(r.latitude)),s=t.project(new i.Cartographic(i.Math.toRadians(s[0]),i.Math.toRadians(s[1]))),new i.Cartesian2(s.x,s.y)},this._projection.unproject=function(r,s){let o=t.unproject(r);return s=ce.GCJ02ToWGS84(i.Math.toDegrees(o.longitude),i.Math.toDegrees(o.latitude)),new i.Cartographic(i.Math.toRadians(s[0]),i.Math.toRadians(s[1]))}}},yt=ks;var Rl={img:"//webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",elec:"//webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",cva:"//webst{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"},Fs=class extends i.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",Rl[e.style]||Rl.elec].join(""),e.subdomains=e.subdomains||["01","02","03","04"],e.crs==="WGS84"&&(e.tilingScheme=new yt),super(e)}};R.AMAP="amap";var Ol=Fs;var Kd=637099681e-2,kl=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],vt=[75,60,45,30,15,0],Qd=[[1410526172116255e-23,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,173379812e-1],[-7435856389565537e-24,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,1026014486e-2],[-3030883460898826e-23,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,685681737e-2],[-1981981304930552e-23,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,448277706e-2],[309191371068437e-23,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,25551644e-1],[2890871144776878e-24,8983055095805407e-21,-3068298e-14,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],Fl=[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,6477955746671607e-7,-4082003173641316e-6,1077490566351142e-5,-1517187553151559e-5,1205306533862167e-5,-5124939663577472e-6,9133119359512032e-7,67.5],[.00337398766765,111320.7020202162,4481351045890365e-9,-2339375119931662e-8,7968221547186455e-8,-1159649932797253e-7,9723671115602145e-8,-4366194633752821e-8,8477230501135234e-9,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837749470245e-9,992013.7397791013,-122195221711287e-8,1340652697009075e-9,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758690035394e-9,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],zs=class{constructor(){this.isWgs84=!1}getDistanceByMC(e,t){if(!e||!t||(e=this.convertMC2LL(e),!e))return 0;let r=this.toRadians(e.lng),s=this.toRadians(e.lat);if(t=this.convertMC2LL(t),!t)return 0;let o=this.toRadians(t.lng),a=this.toRadians(t.lat);return this.getDistance(r,o,s,a)}getDistanceByLL(e,t){if(!e||!t)return 0;e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74),t.lng=this.getLoop(t.lng,-180,180),t.lat=this.getRange(t.lat,-74,74);let r=this.toRadians(e.lng),s=this.toRadians(e.lat),o=this.toRadians(t.lng),a=this.toRadians(t.lat);return this.getDistance(r,o,s,a)}convertMC2LL(e){if(!e)return{lng:0,lat:0};let t={};if(this.isWgs84){t.lng=e.lng/2003750834e-2*180;let o=e.lat/2003750834e-2*180;return t.lat=180/Math.PI*(2*Math.atan(Math.exp(o*Math.PI/180))-Math.PI/2),{lng:t.lng.toFixed(6),lat:t.lat.toFixed(6)}}let r={lng:Math.abs(e.lng),lat:Math.abs(e.lat)},s;for(let o=0;o<kl.length;o++)if(r.lat>=kl[o]){s=Qd[o];break}return t=this.convertor(e,s),{lng:t.lng.toFixed(6),lat:t.lat.toFixed(6)}}convertLL2MC(e){if(!e)return{lng:0,lat:0};if(e.lng>180||e.lng<-180||e.lat>90||e.lat<-90)return e;if(this.isWgs84){let o={},a=6378137;o.lng=e.lng*Math.PI/180*a;let l=e.lat*Math.PI/180;return o.lat=a/2*Math.log((1+Math.sin(l))/(1-Math.sin(l))),{lng:parseFloat(o.lng.toFixed(2)),lat:parseFloat(o.lat.toFixed(2))}}e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74);let t={lng:e.lng,lat:e.lat},r;for(let o=0;o<vt.length;o++)if(t.lat>=vt[o]){r=Fl[o];break}if(!r){for(let o=0;o<vt.length;o++)if(t.lat<=-vt[o]){r=Fl[o];break}}let s=this.convertor(e,r);return{lng:parseFloat(s.lng.toFixed(2)),lat:parseFloat(s.lat.toFixed(2))}}convertor(e,t){if(!e||!t)return{lng:0,lat:0};let r=t[0]+t[1]*Math.abs(e.lng),s=Math.abs(e.lat)/t[9],o=t[2]+t[3]*s+t[4]*s*s+t[5]*s*s*s+t[6]*s*s*s*s+t[7]*s*s*s*s*s+t[8]*s*s*s*s*s*s;return r*=e.lng<0?-1:1,o*=e.lat<0?-1:1,{lng:r,lat:o}}getDistance(e,t,r,s){return Kd*Math.acos(Math.sin(r)*Math.sin(s)+Math.cos(r)*Math.cos(s)*Math.cos(t-e))}toRadians(e){return Math.PI*e/180}toDegrees(e){return 180*e/Math.PI}getRange(e,t,r){return t!=null&&(e=Math.max(e,t)),r!=null&&(e=Math.min(e,r)),e}getLoop(e,t,r){for(;e>r;)e-=r-t;for(;e<t;)e+=r-t;return e}lngLatToMercator(e){return this.convertLL2MC(e)}lngLatToPoint(e){let t=this.convertLL2MC(e);return{x:t.lng,y:t.lat}}mercatorToLngLat(e){return this.convertMC2LL(e)}pointToLngLat(e){let t={lng:e.x,lat:e.y};return this.convertMC2LL(t)}pointToPixel(e,t,r,s){if(!e)return{x:0,y:0};e=this.lngLatToMercator(e);let o=this.getZoomUnits(t),a=Math.round((e.lng-r.lng)/o+s.width/2),l=Math.round((r.lat-e.lat)/o+s.height/2);return{x:a,y:l}}pixelToPoint(e,t,r,s){if(!e)return{lng:0,lat:0};let o=this.getZoomUnits(t),a=r.lng+o*(e.x-s.width/2),l=r.lat-o*(e.y-s.height/2),h={lng:a,lat:l};return this.mercatorToLngLat(h)}getZoomUnits(e){return Math.pow(2,18-e)}},zl=zs;var Hs=class extends i.WebMercatorTilingScheme{constructor(e){super(e);let t=new zl;this._projection.project=function(r,s){return s=s||{},s=ce.WGS84ToGCJ02(i.Math.toDegrees(r.longitude),i.Math.toDegrees(r.latitude)),s=ce.GCJ02ToBD09(s[0],s[1]),s[0]=Math.min(s[0],180),s[0]=Math.max(s[0],-180),s[1]=Math.min(s[1],74.000022),s[1]=Math.max(s[1],-71.988531),s=t.lngLatToPoint({lng:s[0],lat:s[1]}),new i.Cartesian2(s.x,s.y)},this._projection.unproject=function(r,s){return s=s||{},s=t.mercatorToLngLat({lng:r.x,lat:r.y}),s=ce.BD09ToGCJ02(s.lng,s.lat),s=ce.GCJ02ToWGS84(s[0],s[1]),new i.Cartographic(i.Math.toRadians(s[0]),i.Math.toRadians(s[1]))},this.resolutions=e.resolutions||[]}tileXYToNativeRectangle(e,t,r,s){let o=this.resolutions[r],a=e*o,l=(e+1)*o,h=((t=-t)+1)*o,c=t*o;return i.defined(s)?(s.west=a,s.south=c,s.east=l,s.north=h,s):new i.Rectangle(a,c,l,h)}positionToTileXY(e,t,r){let s=this._rectangle;if(!i.Rectangle.contains(s,e))return;let a=this._projection.project(e);if(!i.defined(a))return;let l=this.resolutions[t],h=Math.floor(a.x/l),c=-Math.floor(a.y/l);return i.defined(r)?(r.x=h,r.y=c,r):new i.Cartesian2(h,c)}},Hl=Hs;var Nl={img:"//shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",vec:"//online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020",custom:"//api{s}.map.bdimg.com/customimage/tile?&x={x}&y={y}&z={z}&scale=1&customid={style}",traffic:"//its.map.baidu.com:8002/traffic/TrafficTileService?time={time}&label={labelStyle}&v=016&level={z}&x={x}&y={y}&scaler=2"},Ns=class extends i.UrlTemplateImageryProvider{constructor(e={}){if(e.url=e.url||[e.protocol||"",Nl[e.style]||Nl.custom].join(""),e.crs==="WGS84"){let t=[];for(let r=0;r<19;r++)t[r]=256*Math.pow(2,18-r);e.tilingScheme=new Hl({resolutions:t,rectangleSouthwestInMeters:new i.Cartesian2(-2003772637e-2,-1247410417e-2),rectangleNortheastInMeters:new i.Cartesian2(2003772637e-2,1247410417e-2)})}else e.tilingScheme=new i.WebMercatorTilingScheme({rectangleSouthwestInMeters:new i.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new i.Cartesian2(33554054,33746824)});e.maximumLevel=18,super(e),this._rectangle=this._tilingScheme.rectangle,this._url=e.url,this._crs=e.crs||"BD09",this._style=e.style||"normal"}requestImage(e,t,r){let s=this._tilingScheme.getNumberOfXTilesAtLevel(r),o=this._tilingScheme.getNumberOfYTilesAtLevel(r),a=this._url.replace("{z}",r).replace("{s}",String(1)).replace("{style}",this._style);return this._crs==="WGS84"?a=a.replace("{x}",String(e)).replace("{y}",String(-t)):a=a.replace("{x}",String(e-s/2)).replace("{y}",String(o/2-t-1)),i.ImageryProvider.loadImage(this,a)}};R.BAIDU="baidu";var Wl=Ns;var $d="//tiles{s}.geovisearth.com/base/v1/{style}/{z}/{x}/{y}?format={format}&tmsIds=w&token={key}",Ws=class extends i.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",$d.replace(/\{style\}/g,e.style||"vec").replace(/\{format\}/g,e.format||"png").replace(/\{key\}/g,e.key||"")].join(""),e.subdomains=e.subdomains||["1","2","3"],super(e)}};R.GEO_VIS="geoVis";var Gl=Ws;var Ul={img:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s&x={x}&y={y}&z={z}",elec:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=m&x={x}&y={y}&z={z}",cva:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=h&x={x}&y={y}&z={z}",ter:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=t@131,r&x={x}&y={y}&z={z}",img_cva:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=y&x={x}&y={y}&z={z}"},Gs=class extends i.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",Ul[e.style]||Ul.elec].join(""),e.crs==="WGS84"&&(e.tilingScheme=new yt),super(e)}};R.GOOGLE="google";var Bl=Gs;var em="//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}",Us=class extends i.UrlTemplateImageryProvider{constructor(e={}){super({url:[e.protocol||"",em.replace(/\{style\}/g,e.style||"vec").replace(/\{key\}/g,e.key||"")].join(""),subdomains:["0","1","2","3","4","5","6","7"],maximumLevel:18})}};R.TDT="tdt";var Vl=Us;var jl={img:"//p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400",elec:"//rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid={style}&scene=0&version=347"},Bs=class extends i.UrlTemplateImageryProvider{constructor(e={}){let t=e.url||[e.protocol||"",jl[e.style]||jl.elec].join("");e.url=t.replace("{style}",e.style||1),e.subdomains=e.subdomains||["1","2","3"],e.style==="img"&&(e.customTags={sx:(r,s,o,a)=>s>>4,sy:(r,s,o,a)=>(1<<a)-o>>4}),super(e)}};R.TENCENT="tencent";var Yl=Bs;var Vs=class{static createAMapImageryLayer(e){return Promise.resolve(new Ol(e))}static createBaiduImageryLayer(e){return Promise.resolve(new Wl(e))}static createGeoVisImageryLayer(e){return Promise.resolve(new Gl(e))}static createGoogleImageryLayer(e){return Promise.resolve(new Bl(e))}static createTdtImageryLayer(e){return Promise.resolve(new Vl(e))}static createTencentImageryLayer(e){return Promise.resolve(new Yl(e))}static createArcGisImageryLayer(e){return i.ArcGisMapServerImageryProvider.fromUrl(e.url,e)}static createBingImageryLayer(e){return i.BingMapsImageryProvider.fromUrl(e.url,e)}static createOSMImageryLayer(e){return Promise.resolve(new i.OpenStreetMapImageryProvider(e))}static createSingleTileImageryLayer(e){return i.SingleTileImageryProvider.fromUrl(e.url,e)}static createWMSImageryLayer(e){return Promise.resolve(new i.WebMapServiceImageryProvider(e))}static createWMTSImageryLayer(e){return Promise.resolve(new i.WebMapTileServiceImageryProvider(e))}static createXYZImageryLayer(e){return Promise.resolve(new i.UrlTemplateImageryProvider(e))}static createCoordImageryLayer(e){return Promise.resolve(new i.TileCoordinatesImageryProvider(e))}static createGridImageryLayer(e){return Promise.resolve(new i.GridImageryProvider(e))}static createMapboxImageryLayer(e){return Promise.resolve(new i.MapboxImageryProvider(e))}static createMapboxStyleImageryLayer(e){return Promise.resolve(new i.MapboxStyleImageryProvider(e))}static createTMSImageryLayer(e){return i.TileMapServiceImageryProvider.fromUrl(e.url,e)}static createImageryLayer(e,t){let r;switch(e){case R.AMAP:r=this.createAMapImageryLayer(t);break;case R.BAIDU:r=this.createBaiduImageryLayer(t);break;case R.GEO_VIS:r=this.createGeoVisImageryLayer(t);break;case R.GOOGLE:r=this.createGoogleImageryLayer(t);break;case R.TDT:r=this.createTdtImageryLayer(t);break;case R.TENCENT:r=this.createTencentImageryLayer(t);break;case R.ARCGIS:r=this.createArcGisImageryLayer(t);break;case R.BING:r=this.createBingImageryLayer(t);break;case R.OSM:r=this.createOSMImageryLayer(t);break;case R.SINGLE_TILE:r=this.createSingleTileImageryLayer(t);break;case R.WMS:r=this.createWMSImageryLayer(t);break;case R.WMTS:r=this.createWMTSImageryLayer(t);break;case R.XYZ:r=this.createXYZImageryLayer(t);break;case R.COORD:r=this.createCoordImageryLayer(t);break;case R.GRID:r=this.createGridImageryLayer(t);break;case R.MAPBOX:r=this.createMapboxImageryLayer(t);break;case R.MAPBOX_STYLE:r=this.createMapboxStyleImageryLayer(t);break;case R.TMS:r=this.createTMSImageryLayer(t);break;default:break}return r}},Zl=Vs;var js=class extends i.GeographicTilingScheme{constructor(e={}){super(e),this._origin=e.origin||[-180,90],this._zoomOffset=e.zoomOffset||0,this._tileSize=e.tileSize||256,this._resolutions=e.resolutions||[]}get zoomOffset(){return this._zoomOffset}tileXYToRectangle(e,t,r,s){if(!this._resolutions||!this._resolutions[r+this._zoomOffset])return i.Rectangle.MAX_VALUE;let o=this._resolutions[r+this._zoomOffset]*this._tileSize,a=i.Math.toRadians(this._origin[0]+e*o),l=i.Math.toRadians(this._origin[1]-(t+1)*o),h=i.Math.toRadians(this._origin[0]+(e+1)*o),c=i.Math.toRadians(this._origin[1]-t*o);return s?(s.west=a,s.south=l,s.east=h,s.north=c,s):new i.Rectangle(a,l,h,c)}positionToTileXY(e,t,r){if(!this._resolutions||!this._resolutions[t+this._zoomOffset])return new i.Cartesian2;let s=this._resolutions[t+this._zoomOffset]*this._tileSize,o=i.Math.toDegrees(e.longitude),a=i.Math.toDegrees(e.latitude),l=Math.floor((o-this._origin[0])/s),h=Math.floor((this._origin[1]-a)/s);return r?(r.x=l,r.y=h,r):new i.Cartesian2(Math.max(0,l),Math.max(0,h))}},ql=js;var Ys=class extends i.WebMercatorTilingScheme{constructor(e={}){super(e),this._origin=e.origin||[-200375083427892e-7,200375083427892e-7],this._zoomOffset=e.zoomOffset||0,this._tileSize=e.tileSize||256,this._resolutions=e.resolutions||[]}get zoomOffset(){return this._zoomOffset}tileXYToNativeRectangle(e,t,r,s){if(!this._resolutions||!this._resolutions[r+this._zoomOffset])return i.Rectangle.MAX_VALUE;if(e<0||t<0)return i.Rectangle.MAX_VALUE;let o=this._resolutions[r+this._zoomOffset]*this._tileSize,a=this._origin[0]+e*o,l=this._origin[1]-(t+1)*o,h=this._origin[0]+(e+1)*o,c=this._origin[1]-t*o;return s?(s.west=a,s.south=l,s.east=h,s.north=c,s):new i.Rectangle(a,l,h,c)}positionToTileXY(e,t,r){let s=this._rectangle;if(!i.Rectangle.contains(s,e))return;if(!this._resolutions||!this._resolutions[t+this._zoomOffset])return new i.Cartesian2;let o=this._resolutions[t+this._zoomOffset]*this._tileSize,l=this._projection.project(e),h=Math.floor((l.x-this._origin[0])/o),c=Math.floor((this._origin[1]-l.y)/o);return r?(r.x=h,r.y=c,r):new i.Cartesian2(Math.max(0,h),Math.max(0,c))}},Xl=Ys;var tm={NONE:"none",XYZ:"xyz",ARCGIS:"arcgis",GOOGLE:"google",VR:"vr"},Se=tm;var Zs=class{static createEllipsoidTerrain(e){return Promise.resolve(new i.EllipsoidTerrainProvider(e))}static createUrlTerrain(e){return i.CesiumTerrainProvider.fromUrl(e.url,e)}static createGoogleTerrain(e){return i.GoogleEarthEnterpriseTerrainProvider.fromUrl(e.url,e)}static createArcgisTerrain(e){return i.ArcGISTiledElevationTerrainProvider.fromUrl(e.url,e)}static createVRTerrain(e){return i.VRTheWorldTerrainProvider.fromUrl(e.url,e)}static createTerrain(e,t){let r;switch(e){case Se.NONE:r=this.createEllipsoidTerrain(t);break;case Se.XYZ:r=this.createUrlTerrain(t);break;case Se.GOOGLE:r=this.createGoogleTerrain(t);break;case Se.ARCGIS:r=this.createArcgisTerrain(t);break;case Se.VR:r=this.createVRTerrain(t);break;default:break}return r}},Jl=Zs;var Ql=[].indexOf||function(n){for(let e=0,t=this.length;e<t;e++)if(e in this&&this[e]===n)return e;return-1},wt=`attribute vec4 position;
192
+ `,!0,"loading");this._wrapper.appendChild(e),this._ready=!0}};I.registerType("loading_mask");var Um=No;var Wo=class extends I{constructor(){super(),this._wrapper=A.create("div","widget slider"),this._tileset=void 0,this._moveActive=!1,this._state=m.INITIALIZED}get type(){return I.getWidgetType("tileset_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"tilesetSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._tileset?this._viewer.scene.splitPosition=this._tileset.splitDirection>0?1:0:this._viewer.scene.splitPosition=0}_mountContent(){let e=A.parseDom(ie.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),this._tileset=this._viewer.scene.primitives.add(e.delegate||e),this._viewer.scene.splitPosition=this._wrapper.offsetLeft/this._wrapper.parentElement.offsetWidth),this)}};I.registerType("tileset_split");var Bm=Wo;var Go=class extends I{constructor(){super(),this._wrapper=A.create("div","widget slider"),this._tileset=void 0,this._baseLayer=void 0,this._moveActive=!1,this._state=m.INITIALIZED}get type(){return I.getWidgetType("scene_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"sceneSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._viewer.scene.splitPosition=1}_mountContent(){let e=A.parseDom(ie.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),Promise.resolve(e.delegate||e).then(t=>{this._tileset=this._viewer.scene.primitives.add(t)})),this)}addBaseLayer(e){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),Promise.resolve(e).then(t=>{this._baseLayer=this._viewer.imageryLayers.addImageryProvider(t),this._baseLayer.splitDirection=1})),this)}};I.registerType("scene_split");var Vm=Go;function Uo(){return{popup:new xm,contextMenu:new pm,tooltip:new Em,mapSwitch:new Tm,mapSplit:new Cm,locationBar:new dm,hawkeyeMap:new Fm,compass:new Hm,distanceLegend:new Wm,zoomController:new Gm,loadingMask:new Um,tilesetSplit:new Bm,sceneSplit:new Vm}}var et="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACCklEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSs8Of+8x3/vv/88ffFu++/jl75/evEte//vnz//e/Dl3d/nrye8P//fwF0fSicv28/Vv7/////t8W7/79Wi///gt0DBb9zLfv/89Cl/3/fff7w//9/A2S9cK/9//i1g4GZqeSdcwnzn4v38HmXgSs3gIGnKfEXIyebOQMDwwWQGMwgh/9fvu8hxhAY4Ix1ZeCdnPOTkYNNgoGB4QMT2DWfv6/50riIaENA4Pvi3Qy/T99k//v0TQOIDzLI4P/nb/zfJm8g2hAY+Nq8hIFJmC8DbNDfp28Sfqw7zEKyKQwMDL8OXQKFLShsDJgYmRhN/j58SY45YPDn1hMOUFpjYmBj5aHEIBhg+vvw5QVWPWWyDWBkY/kBoplYjVQPsOgrkWeIADcDq7kmyGsXQLG2gd3XkoFZXpxkg7hzAhn+3nl6HpaOPvx79X4+35xikgwBWcxVEPSXWUW6iAGajhiYxASLWLTkHxNrGMhLAmsb/v57+2klAwPDAbAYUjEi8O/tp0t/rj2U/ZTSy4ArJtns9Bj4F5T9YWBk2M4kKewHNxytPBL49+p9H5OYYOLPzcfBCQ6WbUAGsAdY/2VWkfrz/+PXIiZxwWkorsRRsCn8e/cp8v+nb/aMvFygTMnw/8v3q8zy4rsZGBgWYKhmYGAAAN6EGE9igaT+AAAAAElFTkSuQmCC";var ri="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAAB+klEQVQ4jZ2UT2gTQRTGv5nd7G7TsNnW1QimWC+CghBEqJ7sSTx50oM3iwhejSJ486J4qdWLt6JXsQdPVdRDj0WQBqEehKJotLbEbrLNJvtnZlYmZEub1rLJB8Mw8+b9Zt7Me0PiOMY+KgGwuubv3ba3JKinjUfBj7dC+D6L1tt+82Pke5/agnsRZ+4GC38/iePY6vXbcSLBnXtUGXnYdObQWJ8BC6s7NjeGzyJfuAXNONGgSn4SQCWxbYEE33xECL3zZ+WyEvpf9gsXpn0dVuFuSKgxkcAS0GQsvA9pIIlyI1cweuRBQIh+GECddk4jvLn62nRqiFTTeYWgtaTzaPW+HEtQKeabebc2mxqSqLE2A6qO3uyAeLR6rdWYV/umAPC9RQjuyrspUYCeYVE1hdveioIVQ+YaJSST633mQURZ9KuiDZ0cGECI5sueakOnFjLGYCCqmNCzp2VoFflqr7PmBahasW+QTEwWfFtK8qjOWe35geJ0XxC5sWnf4Kp+rIxuHkFR7bKmH/+ZFiZDOnR0lnPmvASwIOe2F60l2MbnMPg69rd6e1fBJpKFa489ZQB5o2QKl5L53v/I4qz2WFHtqZb7DoG3iLC93DEYuXPImhdlKExwt6yoB59td/zfxzYuuHNV8OZ5SodlUUKI1rKqFd8DeLFrNYB/A6b1Qz9EzRMAAAAASUVORK5CYII=";var W1={icon_center:ri,icon_anchor:et,icon_size:[12,12],clampToModel:!1,maxAnchorSize:999},Bo=class{constructor(){this._viewer=void 0,this._anchorLayer=new i.CustomDataSource("draw-anchor-layer"),this._floatingAnchor=void 0,this._options={},this._plotEvent=new nt,this._tooltipMess=void 0}set tooltipMess(e){this._tooltipMess=e}_getEventPosition(e){let{overlay:t,layer:r,position:s,surfacePosition:o}=e;return!this._options.clampToModel||!t&&!r?o:s}_onClick(e){let t=this._getEventPosition(e);if(!t)return!1;this._floatingAnchor||(this._floatingAnchor=this._onCreateAnchor({position:t})),this._plotEvent.fire(x.DRAW_ANCHOR,t)}_onMouseMove(e){this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess);let t=this._getEventPosition(e);if(!t)return!1;this._floatingAnchor&&this._floatingAnchor.position.setValue(t),this._plotEvent.fire(x.ANCHOR_MOVING,t)}_onRightClick(e){this._plotEvent.fire(x.DRAW_STOP,this._getEventPosition(e))}_onCreateAnchor({position:e,isCenter:t=!1}){var r;return this._anchorLayer.entities.add({position:e,billboard:{image:t?this._options.icon_center:this._options.icon_anchor,width:this._options.icon_size[0],height:this._options.icon_size[1],pixelOffset:this._options.pixelOffset||new i.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new i.Cartesian3(0,0,-100),disableDepthTestDistance:(r=this._options.disableDepthTestDistance)!=null?r:0,heightReference:this._viewer.scene.mode===i.SceneMode.SCENE3D&&!this._options.clampToModel?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE}})}_onClearAnchor(){this._anchorLayer.entities.removeAll()}_bindEvent(){this._viewer.on(R.CLICK,this._onClick,this),this._viewer.on(R.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(R.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(x.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(x.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(R.CLICK,this._onClick,this),this._viewer.off(R.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(R.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(x.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(x.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,t,r){return this._plotEvent.on(e,t,r||this),this}off(e,t,r){return this._plotEvent.off(e,t,r||this),this}fire(e,t={}){return this._plotEvent.fire(e,t),this}activate(e={}){return this._viewer.tooltip.enable=!0,this._options={...W1,...e},this._unbindEvent(),this._bindEvent(),this.fire(x.DRAW_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._floatingAnchor=void 0,this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"drawTool",{value:this,writable:!1})}},jm=Bo;var qm="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACDElEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSscO/l7x3ff/378fz9n++Hr//4fezmz+9ffvz7/eHr33eP3/6Z8P//fwF0fSguevv5X6UwL1PbwoNfGRrWfGJ48PoPiuUOWuwMDSH8DHryrB8FuZkcGBgYLsDk4AZ9/Pavg5mJscS24SXzhQe/8XmXocCLl6Etgv8XJxujOcwwmEEOX37830OMITCQYM/NMD1F8CcHK6MEAwPDByaQ+Ofv/9fUrvpItCEgsODgV4aTt3+xP3n3twHEBxlk8On7P/4J2z4TbQgMNKz5yCDCy5QBNujJu78Ja05+YyHZFAYGhgPXfjJ8+PoPFDYGTEyMDCYPXv8lxxwwuPnsDwcorTGxsTDyoEczOYDp4es/Fwzk2cg2gI2F8QeIZjJWYjtgoMBKliEC3EwMlmpsIK9dAMXaBn8TTgYFUdLDu8CTl+H2iz/nYenow8uPf+cvyBQiyRCQxcU+vH9VJViKGKDpiEGcn7lIW5b1MbGGgby0qVTk75vPf1eCUgFIDDnTCrz5/O/S1ce/ZROmv8PIsDAAyrhLcoT/MDIybJcSZPaDiaOXRwIvP/7tE+dnTtx45js4wV148Ass4aDFwRBkxvlXVZLlz4ev/4okBJinIWvEVbApvP38L/LT93/2vJxMoEzJ8OXHv6sKoiy7QdkMQzUDAwMAuq71NKWtMMgAAAAASUVORK5CYII=";var U1={icon_center:ri,icon_anchor:et,icon_midAnchor:qm,icon_size:[12,12],clampToModel:!0},Vo=class{constructor(){this._viewer=void 0,this._anchorLayer=new i.CustomDataSource("edit-anchor-layer"),this._options={},this._plotEvent=new nt,this._tooltipMess=void 0,this._pickedAnchor=void 0,this._isMoving=!1,this._anchors=[]}set tooltipMess(e){this._tooltipMess=e}_onClick(e){if(this._isMoving){let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!t)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties&&(this._pickedAnchor.position.setValue(t),this._plotEvent.fire(x.EDIT_ANCHOR_STOP,{pickedAnchor:this._pickedAnchor,position:t})),this._isMoving=!1}else{if(!e.target||!e.target.id)return!1;this._pickedAnchor=e.target.id,this._isMoving=!0}}_onMouseMove(e){if(this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess),!this._isMoving&&this._anchors.length!==0)return!1;let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!t)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties?(this._pickedAnchor.position.setValue(t),this._plotEvent.fire(x.ANCHOR_MOVING,{pickedAnchor:this._pickedAnchor,position:t})):this._anchors.length===0&&this._plotEvent.fire(x.ANCHOR_MOVING,{position:t})}_onRightClick(e){let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;this._plotEvent.fire(x.EDIT_STOP,{pickedAnchor:this._pickedAnchor,position:t})}_onCreateAnchor({position:e,index:t,isCenter:r=!1,isMid:s=!1}){var l;let o=s?this._options.icon_midAnchor:r?this._options.icon_center:this._options.icon_anchor,n=this._anchorLayer.entities.add({position:e,billboard:{image:o,width:this._options.icon_size[0],height:this._options.icon_size[1],pixelOffset:this._options.pixelOffset||new i.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new i.Cartesian3(0,0,-100),disableDepthTestDistance:(l=this._options.disableDepthTestDistance)!=null?l:0,heightReference:this._viewer.scene.mode===i.SceneMode.SCENE3D&&!this._options.clampToModel?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE},properties:{isMid:s,index:t}});this._anchors.push(n)}_onUpdateAnchor({index:e,position:t}){this._anchors[e]&&this._anchors[e].position.setValue(t)}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchors=[]}_bindEvent(){this._viewer.on(R.CLICK,this._onClick,this),this._viewer.on(R.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(R.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(x.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(x.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.on(x.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(R.CLICK,this._onClick,this),this._viewer.off(R.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(R.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(x.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(x.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.off(x.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,t,r){return this._plotEvent.on(e,t,r||this),this}off(e,t,r){return this._plotEvent.off(e,t,r||this),this}fire(e,t){return this._plotEvent.fire(e,t),this}activate(e={}){return this._anchorLayer.entities.removeAll(),this._anchors=[],this._viewer.tooltip.enable=!0,this._options={...U1,...e},this._unbindEvent(),this._bindEvent(),this.fire(x.EDIT_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._anchors=[],this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"editTool",{value:this,writable:!1})}},Ym=Vo;function jo(){return{drawTool:new jm,editTool:new Ym}}var B1={creditContainer:void 0,shouldAnimate:!0},qo=class{constructor(e,t={}){if(!At("isInitialized"))throw new Error("please do the ready function");if(!e||typeof e=="string"&&!document.getElementById(e))throw new Error("Viewer: the container is empty");if(e instanceof HTMLElement)throw new Error("Viewer: not support the type container");if(typeof e=="string"){let o=At("baseUrl");o&&i.buildModuleUrl.setBaseUrl(o)}this._delegate=typeof e!="string"?e:new Ct(e,{...B1,...t}),new tr(this,t),this._viewerEvent=new rr,this._sceneEvent=new or(this),this._viewerOption=new _o(this),this._cameraOption=new go(this),this._widgetContainer=A.create("div","viewer-widgets",typeof e=="string"?document.getElementById(e):this._delegate.container),this._layerContainer=A.create("div","viewer-layers",typeof e=="string"?document.getElementById(e):this._delegate.container),this._baseLayerPicker=new So({globe:this._delegate.scene.globe}),this._layerGroupCache={},this._layerCache={};let r=Uo();Object.keys(r).forEach(o=>{this._use(r[o])});let s=jo();Object.keys(s).forEach(o=>{this._use(s[o])})}get delegate(){return this._delegate}get container(){return this._delegate.container}get widgetContainer(){return this._widgetContainer}get layerContainer(){return this._layerContainer}get scene(){return this._delegate.scene}get camera(){return this._delegate.camera}get canvas(){return this._delegate.scene.canvas}get dataSources(){return this._delegate.dataSources}get imageryLayers(){return this._delegate.imageryLayers}get terrainProvider(){return this._delegate.terrainProvider}get entities(){return this._delegate.entities}get postProcessStages(){return this._delegate.scene.postProcessStages}get clock(){return this._delegate.clock}get viewerEvent(){return this._viewerEvent}get cameraPosition(){var t,r,s,o,n,l,h;let e=u.transformCartographicToWGS84((t=this.camera)==null?void 0:t.positionCartographic);return e&&(e.heading=i.Math.toDegrees((s=(r=this.camera)==null?void 0:r.heading)!=null?s:0),e.pitch=i.Math.toDegrees((n=(o=this.camera)==null?void 0:o.pitch)!=null?n:0),e.roll=i.Math.toDegrees((h=(l=this.camera)==null?void 0:l.roll)!=null?h:0)),e}get resolution(){let e=this.scene.canvas.width,t=this.scene.canvas.height,r=u.transformWindowToWGS84(new i.Cartesian2(e/2|0,t-1),this),s=u.transformWindowToWGS84(new i.Cartesian2(1+e/2|0,t-1),this);return!r||!s?1:Math.abs(r.lng-s.lng)}get viewBounds(){let e=this.scene.canvas.width,t=this.scene.canvas.height,r=u.transformWindowToWGS84(new i.Cartesian2(0,t),this),s=u.transformWindowToWGS84(new i.Cartesian2(e,0),this);return!r||!s?i.Rectangle.MAX_VALUE:i.Rectangle.fromDegrees(r.lng,r.lat,s.lng,s.lat)}get zoom(){let e=this.camera.positionCartographic.height,t=40487.57,r=7096758e-11,s=91610.74,o=-40467.74;return Math.round(o+(t-o)/(1+Math.pow(e/s,r)))}_use(e){return e&&e.install&&e.install(this),this}_addLayerGroup(e){e!=null&&e.layerGroupEvent&&!Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(Ee.ADD,this),this._layerGroupCache[e.id]=e)}_removeLayerGroup(e){e!=null&&e.layerGroupEvent&&Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(Ee.REMOVE,this),delete this._layerGroupCache[e.id])}_addLayer(e){!this._layerCache[e.type]&&(this._layerCache[e.type]={}),Object(this._layerCache[e.type]).hasOwnProperty(e.id)||(e.fire(Pe.ADD,this),this._layerCache[e.type][e.id]=e)}_removeLayer(e){Object(this._layerCache[e.type]).hasOwnProperty(e.id)&&(e.fire(Pe.REMOVE,this),delete this._layerCache[e.type][e.id])}setOptions(e){return this._viewerOption.setOptions(e),this}setPitchRange(e=-90,t=-20){return this._cameraOption.setPitchRange(e,t),this}changeSceneMode(e,t=0){return e===2?this._delegate.scene.morphTo2D(t):e===3?this._delegate.scene.morphTo3D(t):e===2.5&&this._delegate.scene.morphToColumbusView(t),this}changeMouseMode(e){return this._cameraOption.changeMouseMode(e),this}setTerrain(e){return this._delegate.scene.setTerrain(new i.Terrain(e||Promise.resolve(new i.EllipsoidTerrainProvider))),this}addBaseLayer(e,t={}){return e?(this._baseLayerPicker.addImageryLayer(e,t),this._baseLayerPicker.selectedImageryLayer||this._baseLayerPicker.changeImageryLayer(0),this.mapSwitch&&this.mapSwitch.addMap(t),this):this}getBaseLayer(e){return this._baseLayerPicker.getImageryLayer(e)}changeBaseLayer(e){return this._baseLayerPicker.changeImageryLayer(e),this}getImageryLayerInfo(e){let t=this._delegate.camera.getPickRay(e);return this._delegate.imageryLayers.pickImageryLayerFeatures(t,this._delegate.scene)}addLayerGroup(e){return this._addLayerGroup(e),this}removeLayerGroup(e){return this._removeLayerGroup(e),this}getLayerGroup(e){return this._layerGroupCache[e]||void 0}addLayer(e){return this._addLayer(e),this}removeLayer(e){return this._removeLayer(e),this}hasLayer(e){return Object(this._layerCache[e.type]).hasOwnProperty(e.id)}getLayer(e){let t=this.getLayers().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}getLayers(){let e=[];return Object.keys(this._layerCache).forEach(t=>{let r=this._layerCache[t];Object.keys(r).forEach(s=>{e.push(r[s])})}),e}eachLayer(e,t){return Object.keys(this._layerCache).forEach(r=>{let s=this._layerCache[r];Object.keys(s).forEach(o=>{e.call(t,s[o])})}),this}flyTo(e,t){return this._delegate.flyTo((e==null?void 0:e.delegate)||e,{duration:t}),this}zoomTo(e){return this._delegate.zoomTo((e==null?void 0:e.delegate)||e),this}flyToPosition(e,t,r){return e=f.parsePosition(e),this.camera.flyTo({destination:u.transformWGS84ToCartesian(e),orientation:{heading:i.Math.toRadians(e.heading),pitch:i.Math.toRadians(e.pitch),roll:i.Math.toRadians(e.roll)},complete:t,duration:r}),this}zoomToPosition(e,t){return this.flyToPosition(e,t,0),this}flyToBounds(e,{heading:t=0,pitch:r=0,roll:s=0},o,n){return e?(Array.isArray(e)||(e=e.split(",")),this.camera.flyTo({destination:i.Rectangle.fromDegrees(e[0],e[1],e[2],e[3]),orientation:{heading:i.Math.toRadians(t),pitch:i.Math.toRadians(r),roll:i.Math.toRadians(s)},complete:o,duration:n}),this):this}zoomToBounds(e,{heading:t=0,pitch:r=0,roll:s=0},o){return this.flyToBounds(e,{heading:t,pitch:r,roll:s},o),this}on(e,t,r){return this._viewerEvent.on(e,t,r||this),this._sceneEvent.on(e,t,r||this),this}once(e,t,r){return this._viewerEvent.once(e,t,r||this),this}off(e,t,r){return this._viewerEvent.off(e,t,r||this),this._sceneEvent.off(e,t,r||this),this}destroy(){return Object.keys(this._layerCache).forEach(e=>{let t=this._layerCache[e];Object.keys(t).forEach(r=>{this._removeLayer(t[r])})}),this._delegate.destroy(),this._delegate=void 0,this._baseLayerPicker=void 0,this._layerCache={},this._widgetContainer.parentNode.removeChild(this._widgetContainer),this._widgetContainer=void 0,this._layerContainer.parentNode.removeChild(this._layerContainer),this._layerContainer=void 0,this}exportScene(e){this.scene.render();let r=this.canvas.toDataURL("image/png").replace("image/png","image/octet-stream"),s=document.createElement("a"),o=v.dataURLtoBlob(r),n=URL.createObjectURL(o);return s.download=`${e||"scene"}.png`,s.href=n,s.click(),this}getOffset(){var r;let e={x:0,y:0},t=(r=this._delegate)==null?void 0:r.container;if(t)if(t.getBoundingClientRect){let s=t.getBoundingClientRect();e.x=s.left,e.y=s.top}else e.x=t.offsetLeft,e.y=t.offsetTop;return e}},V1=qo;var j1={ARCGIS:"arcgis",BING:"bing",OSM:"osm",SINGLE_TILE:"single_tile",WMS:"wms",WMTS:"wmts",XYZ:"xyz",COORD:"coord",GRID:"grid",MAPBOX:"mapbox",MAPBOX_STYLE:"mapbox_style",TMS:"tms"},O=j1;var Yo=class extends i.WebMercatorTilingScheme{constructor(e){super(e);let t=new i.WebMercatorProjection;this._projection.project=function(r,s){return s=_e.WGS84ToGCJ02(i.Math.toDegrees(r.longitude),i.Math.toDegrees(r.latitude)),s=t.project(new i.Cartographic(i.Math.toRadians(s[0]),i.Math.toRadians(s[1]))),new i.Cartesian2(s.x,s.y)},this._projection.unproject=function(r,s){let o=t.unproject(r);return s=_e.GCJ02ToWGS84(i.Math.toDegrees(o.longitude),i.Math.toDegrees(o.latitude)),new i.Cartographic(i.Math.toRadians(s[0]),i.Math.toRadians(s[1]))}}},si=Yo;var Zm={img:"//webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",elec:"//webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",cva:"//webst{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"},Zo=class extends i.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",Zm[e.style]||Zm.elec].join(""),e.subdomains=e.subdomains||["01","02","03","04"],e.crs==="WGS84"&&(e.tilingScheme=new si),super(e)}};O.AMAP="amap";var Xm=Zo;var q1=637099681e-2,Jm=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],oi=[75,60,45,30,15,0],Y1=[[1410526172116255e-23,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,173379812e-1],[-7435856389565537e-24,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,1026014486e-2],[-3030883460898826e-23,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,685681737e-2],[-1981981304930552e-23,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,448277706e-2],[309191371068437e-23,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,25551644e-1],[2890871144776878e-24,8983055095805407e-21,-3068298e-14,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],Km=[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,6477955746671607e-7,-4082003173641316e-6,1077490566351142e-5,-1517187553151559e-5,1205306533862167e-5,-5124939663577472e-6,9133119359512032e-7,67.5],[.00337398766765,111320.7020202162,4481351045890365e-9,-2339375119931662e-8,7968221547186455e-8,-1159649932797253e-7,9723671115602145e-8,-4366194633752821e-8,8477230501135234e-9,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837749470245e-9,992013.7397791013,-122195221711287e-8,1340652697009075e-9,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758690035394e-9,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],Xo=class{constructor(){this.isWgs84=!1}getDistanceByMC(e,t){if(!e||!t||(e=this.convertMC2LL(e),!e))return 0;let r=this.toRadians(e.lng),s=this.toRadians(e.lat);if(t=this.convertMC2LL(t),!t)return 0;let o=this.toRadians(t.lng),n=this.toRadians(t.lat);return this.getDistance(r,o,s,n)}getDistanceByLL(e,t){if(!e||!t)return 0;e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74),t.lng=this.getLoop(t.lng,-180,180),t.lat=this.getRange(t.lat,-74,74);let r=this.toRadians(e.lng),s=this.toRadians(e.lat),o=this.toRadians(t.lng),n=this.toRadians(t.lat);return this.getDistance(r,o,s,n)}convertMC2LL(e){if(!e)return{lng:0,lat:0};let t={};if(this.isWgs84){t.lng=e.lng/2003750834e-2*180;let o=e.lat/2003750834e-2*180;return t.lat=180/Math.PI*(2*Math.atan(Math.exp(o*Math.PI/180))-Math.PI/2),{lng:t.lng.toFixed(6),lat:t.lat.toFixed(6)}}let r={lng:Math.abs(e.lng),lat:Math.abs(e.lat)},s;for(let o=0;o<Jm.length;o++)if(r.lat>=Jm[o]){s=Y1[o];break}return t=this.convertor(e,s),{lng:t.lng.toFixed(6),lat:t.lat.toFixed(6)}}convertLL2MC(e){if(!e)return{lng:0,lat:0};if(e.lng>180||e.lng<-180||e.lat>90||e.lat<-90)return e;if(this.isWgs84){let o={},n=6378137;o.lng=e.lng*Math.PI/180*n;let l=e.lat*Math.PI/180;return o.lat=n/2*Math.log((1+Math.sin(l))/(1-Math.sin(l))),{lng:parseFloat(o.lng.toFixed(2)),lat:parseFloat(o.lat.toFixed(2))}}e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74);let t={lng:e.lng,lat:e.lat},r;for(let o=0;o<oi.length;o++)if(t.lat>=oi[o]){r=Km[o];break}if(!r){for(let o=0;o<oi.length;o++)if(t.lat<=-oi[o]){r=Km[o];break}}let s=this.convertor(e,r);return{lng:parseFloat(s.lng.toFixed(2)),lat:parseFloat(s.lat.toFixed(2))}}convertor(e,t){if(!e||!t)return{lng:0,lat:0};let r=t[0]+t[1]*Math.abs(e.lng),s=Math.abs(e.lat)/t[9],o=t[2]+t[3]*s+t[4]*s*s+t[5]*s*s*s+t[6]*s*s*s*s+t[7]*s*s*s*s*s+t[8]*s*s*s*s*s*s;return r*=e.lng<0?-1:1,o*=e.lat<0?-1:1,{lng:r,lat:o}}getDistance(e,t,r,s){return q1*Math.acos(Math.sin(r)*Math.sin(s)+Math.cos(r)*Math.cos(s)*Math.cos(t-e))}toRadians(e){return Math.PI*e/180}toDegrees(e){return 180*e/Math.PI}getRange(e,t,r){return t!=null&&(e=Math.max(e,t)),r!=null&&(e=Math.min(e,r)),e}getLoop(e,t,r){for(;e>r;)e-=r-t;for(;e<t;)e+=r-t;return e}lngLatToMercator(e){return this.convertLL2MC(e)}lngLatToPoint(e){let t=this.convertLL2MC(e);return{x:t.lng,y:t.lat}}mercatorToLngLat(e){return this.convertMC2LL(e)}pointToLngLat(e){let t={lng:e.x,lat:e.y};return this.convertMC2LL(t)}pointToPixel(e,t,r,s){if(!e)return{x:0,y:0};e=this.lngLatToMercator(e);let o=this.getZoomUnits(t),n=Math.round((e.lng-r.lng)/o+s.width/2),l=Math.round((r.lat-e.lat)/o+s.height/2);return{x:n,y:l}}pixelToPoint(e,t,r,s){if(!e)return{lng:0,lat:0};let o=this.getZoomUnits(t),n=r.lng+o*(e.x-s.width/2),l=r.lat-o*(e.y-s.height/2),h={lng:n,lat:l};return this.mercatorToLngLat(h)}getZoomUnits(e){return Math.pow(2,18-e)}},Qm=Xo;var Jo=class extends i.WebMercatorTilingScheme{constructor(e){super(e);let t=new Qm;this._projection.project=function(r,s){return s=s||{},s=_e.WGS84ToGCJ02(i.Math.toDegrees(r.longitude),i.Math.toDegrees(r.latitude)),s=_e.GCJ02ToBD09(s[0],s[1]),s[0]=Math.min(s[0],180),s[0]=Math.max(s[0],-180),s[1]=Math.min(s[1],74.000022),s[1]=Math.max(s[1],-71.988531),s=t.lngLatToPoint({lng:s[0],lat:s[1]}),new i.Cartesian2(s.x,s.y)},this._projection.unproject=function(r,s){return s=s||{},s=t.mercatorToLngLat({lng:r.x,lat:r.y}),s=_e.BD09ToGCJ02(s.lng,s.lat),s=_e.GCJ02ToWGS84(s[0],s[1]),new i.Cartographic(i.Math.toRadians(s[0]),i.Math.toRadians(s[1]))},this.resolutions=e.resolutions||[]}tileXYToNativeRectangle(e,t,r,s){let o=this.resolutions[r],n=e*o,l=(e+1)*o,h=((t=-t)+1)*o,c=t*o;return i.defined(s)?(s.west=n,s.south=c,s.east=l,s.north=h,s):new i.Rectangle(n,c,l,h)}positionToTileXY(e,t,r){let s=this._rectangle;if(!i.Rectangle.contains(s,e))return;let n=this._projection.project(e);if(!i.defined(n))return;let l=this.resolutions[t],h=Math.floor(n.x/l),c=-Math.floor(n.y/l);return i.defined(r)?(r.x=h,r.y=c,r):new i.Cartesian2(h,c)}},$m=Jo;var eu={img:"//shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",vec:"//online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020",custom:"//api{s}.map.bdimg.com/customimage/tile?&x={x}&y={y}&z={z}&scale=1&customid={style}",traffic:"//its.map.baidu.com:8002/traffic/TrafficTileService?time={time}&label={labelStyle}&v=016&level={z}&x={x}&y={y}&scaler=2"},Ko=class extends i.UrlTemplateImageryProvider{constructor(e={}){if(e.url=e.url||[e.protocol||"",eu[e.style]||eu.custom].join(""),e.crs==="WGS84"){let t=[];for(let r=0;r<19;r++)t[r]=256*Math.pow(2,18-r);e.tilingScheme=new $m({resolutions:t,rectangleSouthwestInMeters:new i.Cartesian2(-2003772637e-2,-1247410417e-2),rectangleNortheastInMeters:new i.Cartesian2(2003772637e-2,1247410417e-2)})}else e.tilingScheme=new i.WebMercatorTilingScheme({rectangleSouthwestInMeters:new i.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new i.Cartesian2(33554054,33746824)});e.maximumLevel=18,super(e),this._rectangle=this._tilingScheme.rectangle,this._url=e.url,this._crs=e.crs||"BD09",this._style=e.style||"normal"}requestImage(e,t,r){let s=this._tilingScheme.getNumberOfXTilesAtLevel(r),o=this._tilingScheme.getNumberOfYTilesAtLevel(r),n=this._url.replace("{z}",r).replace("{s}",String(1)).replace("{style}",this._style);return this._crs==="WGS84"?n=n.replace("{x}",String(e)).replace("{y}",String(-t)):n=n.replace("{x}",String(e-s/2)).replace("{y}",String(o/2-t-1)),i.ImageryProvider.loadImage(this,n)}};O.BAIDU="baidu";var tu=Ko;var Z1="//tiles{s}.geovisearth.com/base/v1/{style}/{z}/{x}/{y}?format={format}&tmsIds=w&token={key}",Qo=class extends i.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",Z1.replace(/\{style\}/g,e.style||"vec").replace(/\{format\}/g,e.format||"png").replace(/\{key\}/g,e.key||"")].join(""),e.subdomains=e.subdomains||["1","2","3"],super(e)}};O.GEO_VIS="geoVis";var iu=Qo;var ru={img:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s&x={x}&y={y}&z={z}",elec:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=m&x={x}&y={y}&z={z}",cva:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=h&x={x}&y={y}&z={z}",ter:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=t@131,r&x={x}&y={y}&z={z}",img_cva:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=y&x={x}&y={y}&z={z}"},$o=class extends i.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",ru[e.style]||ru.elec].join(""),e.crs==="WGS84"&&(e.tilingScheme=new si),super(e)}};O.GOOGLE="google";var su=$o;var X1="//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}",ea=class extends i.UrlTemplateImageryProvider{constructor(e={}){super({url:[e.protocol||"",X1.replace(/\{style\}/g,e.style||"vec").replace(/\{key\}/g,e.key||"")].join(""),subdomains:["0","1","2","3","4","5","6","7"],maximumLevel:18})}};O.TDT="tdt";var ou=ea;var au={img:"//p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400",elec:"//rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid={style}&scene=0&version=347"},ta=class extends i.UrlTemplateImageryProvider{constructor(e={}){let t=e.url||[e.protocol||"",au[e.style]||au.elec].join("");e.url=t.replace("{style}",e.style||1),e.subdomains=e.subdomains||["1","2","3"],e.style==="img"&&(e.customTags={sx:(r,s,o,n)=>s>>4,sy:(r,s,o,n)=>(1<<n)-o>>4}),super(e)}};O.TENCENT="tencent";var nu=ta;var ia=class{static createAMapImageryLayer(e){return Promise.resolve(new Xm(e))}static createBaiduImageryLayer(e){return Promise.resolve(new tu(e))}static createGeoVisImageryLayer(e){return Promise.resolve(new iu(e))}static createGoogleImageryLayer(e){return Promise.resolve(new su(e))}static createTdtImageryLayer(e){return Promise.resolve(new ou(e))}static createTencentImageryLayer(e){return Promise.resolve(new nu(e))}static createArcGisImageryLayer(e){return i.ArcGisMapServerImageryProvider.fromUrl(e.url,e)}static createBingImageryLayer(e){return i.BingMapsImageryProvider.fromUrl(e.url,e)}static createOSMImageryLayer(e){return Promise.resolve(new i.OpenStreetMapImageryProvider(e))}static createSingleTileImageryLayer(e){return i.SingleTileImageryProvider.fromUrl(e.url,e)}static createWMSImageryLayer(e){return Promise.resolve(new i.WebMapServiceImageryProvider(e))}static createWMTSImageryLayer(e){return Promise.resolve(new i.WebMapTileServiceImageryProvider(e))}static createXYZImageryLayer(e){return Promise.resolve(new i.UrlTemplateImageryProvider(e))}static createCoordImageryLayer(e){return Promise.resolve(new i.TileCoordinatesImageryProvider(e))}static createGridImageryLayer(e){return Promise.resolve(new i.GridImageryProvider(e))}static createMapboxImageryLayer(e){return Promise.resolve(new i.MapboxImageryProvider(e))}static createMapboxStyleImageryLayer(e){return Promise.resolve(new i.MapboxStyleImageryProvider(e))}static createTMSImageryLayer(e){return i.TileMapServiceImageryProvider.fromUrl(e.url,e)}static createImageryLayer(e,t){let r;switch(e){case O.AMAP:r=this.createAMapImageryLayer(t);break;case O.BAIDU:r=this.createBaiduImageryLayer(t);break;case O.GEO_VIS:r=this.createGeoVisImageryLayer(t);break;case O.GOOGLE:r=this.createGoogleImageryLayer(t);break;case O.TDT:r=this.createTdtImageryLayer(t);break;case O.TENCENT:r=this.createTencentImageryLayer(t);break;case O.ARCGIS:r=this.createArcGisImageryLayer(t);break;case O.BING:r=this.createBingImageryLayer(t);break;case O.OSM:r=this.createOSMImageryLayer(t);break;case O.SINGLE_TILE:r=this.createSingleTileImageryLayer(t);break;case O.WMS:r=this.createWMSImageryLayer(t);break;case O.WMTS:r=this.createWMTSImageryLayer(t);break;case O.XYZ:r=this.createXYZImageryLayer(t);break;case O.COORD:r=this.createCoordImageryLayer(t);break;case O.GRID:r=this.createGridImageryLayer(t);break;case O.MAPBOX:r=this.createMapboxImageryLayer(t);break;case O.MAPBOX_STYLE:r=this.createMapboxStyleImageryLayer(t);break;case O.TMS:r=this.createTMSImageryLayer(t);break;default:break}return r}},lu=ia;var ra=class extends i.GeographicTilingScheme{constructor(e={}){super(e),this._origin=e.origin||[-180,90],this._zoomOffset=e.zoomOffset||0,this._tileSize=e.tileSize||256,this._resolutions=e.resolutions||[]}get zoomOffset(){return this._zoomOffset}tileXYToRectangle(e,t,r,s){if(!this._resolutions||!this._resolutions[r+this._zoomOffset])return i.Rectangle.MAX_VALUE;let o=this._resolutions[r+this._zoomOffset]*this._tileSize,n=i.Math.toRadians(this._origin[0]+e*o),l=i.Math.toRadians(this._origin[1]-(t+1)*o),h=i.Math.toRadians(this._origin[0]+(e+1)*o),c=i.Math.toRadians(this._origin[1]-t*o);return s?(s.west=n,s.south=l,s.east=h,s.north=c,s):new i.Rectangle(n,l,h,c)}positionToTileXY(e,t,r){if(!this._resolutions||!this._resolutions[t+this._zoomOffset])return new i.Cartesian2;let s=this._resolutions[t+this._zoomOffset]*this._tileSize,o=i.Math.toDegrees(e.longitude),n=i.Math.toDegrees(e.latitude),l=Math.floor((o-this._origin[0])/s),h=Math.floor((this._origin[1]-n)/s);return r?(r.x=l,r.y=h,r):new i.Cartesian2(Math.max(0,l),Math.max(0,h))}},hu=ra;var sa=class extends i.WebMercatorTilingScheme{constructor(e={}){super(e),this._origin=e.origin||[-200375083427892e-7,200375083427892e-7],this._zoomOffset=e.zoomOffset||0,this._tileSize=e.tileSize||256,this._resolutions=e.resolutions||[]}get zoomOffset(){return this._zoomOffset}tileXYToNativeRectangle(e,t,r,s){if(!this._resolutions||!this._resolutions[r+this._zoomOffset])return i.Rectangle.MAX_VALUE;if(e<0||t<0)return i.Rectangle.MAX_VALUE;let o=this._resolutions[r+this._zoomOffset]*this._tileSize,n=this._origin[0]+e*o,l=this._origin[1]-(t+1)*o,h=this._origin[0]+(e+1)*o,c=this._origin[1]-t*o;return s?(s.west=n,s.south=l,s.east=h,s.north=c,s):new i.Rectangle(n,l,h,c)}positionToTileXY(e,t,r){let s=this._rectangle;if(!i.Rectangle.contains(s,e))return;if(!this._resolutions||!this._resolutions[t+this._zoomOffset])return new i.Cartesian2;let o=this._resolutions[t+this._zoomOffset]*this._tileSize,l=this._projection.project(e),h=Math.floor((l.x-this._origin[0])/o),c=Math.floor((this._origin[1]-l.y)/o);return r?(r.x=h,r.y=c,r):new i.Cartesian2(Math.max(0,h),Math.max(0,c))}},cu=sa;var J1={NONE:"none",XYZ:"xyz",ARCGIS:"arcgis",GOOGLE:"google",VR:"vr"},Le=J1;var oa=class{static createEllipsoidTerrain(e){return Promise.resolve(new i.EllipsoidTerrainProvider(e))}static createUrlTerrain(e){return i.CesiumTerrainProvider.fromUrl(e.url,e)}static createGoogleTerrain(e){return i.GoogleEarthEnterpriseTerrainProvider.fromUrl(e.url,e)}static createArcgisTerrain(e){return i.ArcGISTiledElevationTerrainProvider.fromUrl(e.url,e)}static createVRTerrain(e){return i.VRTheWorldTerrainProvider.fromUrl(e.url,e)}static createTerrain(e,t){let r;switch(e){case Le.NONE:r=this.createEllipsoidTerrain(t);break;case Le.XYZ:r=this.createUrlTerrain(t);break;case Le.GOOGLE:r=this.createGoogleTerrain(t);break;case Le.ARCGIS:r=this.createArcgisTerrain(t);break;case Le.VR:r=this.createVRTerrain(t);break;default:break}return r}},pu=oa;var mu=[].indexOf||function(a){for(let e=0,t=this.length;e<t;e++)if(e in this&&this[e]===a)return e;return-1},ai=`attribute vec4 position;
195
193
  varying vec2 texcoord;
196
194
  void main(){
197
195
  texcoord = position.xy*0.5+0.5;
198
196
  gl_Position = position;
199
- }`,Tt=`#ifdef GL_FRAGMENT_PRECISION_HIGH
197
+ }`,ni=`#ifdef GL_FRAGMENT_PRECISION_HIGH
200
198
  precision highp int;
201
199
  precision highp float;
202
200
  #else
@@ -204,13 +202,13 @@ void main(){
204
202
  precision mediump float;
205
203
  #endif
206
204
  uniform sampler2D source;
207
- varying vec2 texcoord;`,im=function(){let n,e,t,r;if(window.WebGLRenderingContext!=null)return r=["WEBKIT","MOZ","MS","O"],t=/^WEBKIT_(.*)|MOZ_(.*)|MS_(.*)|O_(.*)/,n=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(s){let o,a,l,h,c;if(a=s.match(t),a!==null&&(s=a[1]),o=n.call(this,s),o===null){for(h=0,c=r.length;h<c;h++)if(l=r[h],o=n.call(this,l+"_"+s),o!==null)return o;return null}else return o},e=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let s,o,a,l,h,c;for(l=e.call(this),a=[],h=0,c=l.length;h<c;h++)s=l[h],o=s.match(t),o!==null&&(s=o[1]),Ql.call(a,s)<0&&a.push(s);return a}},rm=function(){let n,e,t,r,s,o,a,l,h,c,p,f,T,y;if(s=function(){let m,E,x;return m=document.createElement("canvas"),m.width=2,m.height=2,E=m.getContext("2d"),x=E.getImageData(0,0,2,2),x.data.set(new Uint8ClampedArray([0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255])),E.putImageData(x,0,0),m},s(),e=function(m,E){let x,b,I,N,H,W,ee,le,j,Le,Ue,Me,he,Re;if(W=m.createProgram(),he=m.createShader(m.VERTEX_SHADER),m.attachShader(W,he),m.shaderSource(he,`attribute vec2 position;
205
+ varying vec2 texcoord;`,K1=function(){let a,e,t,r;if(window.WebGLRenderingContext!=null)return r=["WEBKIT","MOZ","MS","O"],t=/^WEBKIT_(.*)|MOZ_(.*)|MS_(.*)|O_(.*)/,a=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(s){let o,n,l,h,c;if(n=s.match(t),n!==null&&(s=n[1]),o=a.call(this,s),o===null){for(h=0,c=r.length;h<c;h++)if(l=r[h],o=a.call(this,l+"_"+s),o!==null)return o;return null}else return o},e=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let s,o,n,l,h,c;for(l=e.call(this),n=[],h=0,c=l.length;h<c;h++)s=l[h],o=s.match(t),o!==null&&(s=o[1]),mu.call(n,s)<0&&n.push(s);return n}},Q1=function(){let a,e,t,r,s,o,n,l,h,c,p,_,w,g;if(s=function(){let d,E,T;return d=document.createElement("canvas"),d.width=2,d.height=2,E=d.getContext("2d"),T=E.getImageData(0,0,2,2),T.data.set(new Uint8ClampedArray([0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255])),E.putImageData(T,0,0),d},s(),e=function(d,E){let T,b,M,N,F,B,re,de,Z,He,st,Oe,ue,Ne;if(B=d.createProgram(),ue=d.createShader(d.VERTEX_SHADER),d.attachShader(B,ue),d.shaderSource(ue,`attribute vec2 position;
208
206
  void main(){
209
207
  gl_Position = vec4(position, 0.0, 1.0);
210
- }`),m.compileShader(he),!m.getShaderParameter(he,m.COMPILE_STATUS))throw m.getShaderInfoLog(he);if(I=m.createShader(m.FRAGMENT_SHADER),m.attachShader(W,I),m.shaderSource(I,`uniform sampler2D source;
208
+ }`),d.compileShader(ue),!d.getShaderParameter(ue,d.COMPILE_STATUS))throw d.getShaderInfoLog(ue);if(M=d.createShader(d.FRAGMENT_SHADER),d.attachShader(B,M),d.shaderSource(M,`uniform sampler2D source;
211
209
  void main(){
212
210
  gl_FragColor = texture2D(source, vec2(1.0, 1.0));
213
- }`),m.compileShader(I),!m.getShaderParameter(I,m.COMPILE_STATUS))throw m.getShaderInfoLog(I);if(m.linkProgram(W),!m.getProgramParameter(W,m.LINK_STATUS))throw m.getProgramInfoLog(W);return m.useProgram(W),b=function(){return m.deleteShader(I),m.deleteShader(he),m.deleteProgram(W),m.deleteBuffer(x),m.deleteTexture(j),m.deleteTexture(Me),m.deleteFramebuffer(N),m.bindBuffer(m.ARRAY_BUFFER,null),m.useProgram(null),m.bindTexture(m.TEXTURE_2D,null),m.bindFramebuffer(m.FRAMEBUFFER,null)},Me=m.createTexture(),m.bindTexture(m.TEXTURE_2D,Me),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,m.UNSIGNED_BYTE,null),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),N=m.createFramebuffer(),m.bindFramebuffer(m.FRAMEBUFFER,N),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,Me,0),Le=s(),j=m.createTexture(),m.bindTexture(m.TEXTURE_2D,j),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,E,Le),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),Re=new Float32Array([1,1,-1,1,-1,-1,1,1,-1,-1,1,-1]),x=m.createBuffer(),m.bindBuffer(m.ARRAY_BUFFER,x),m.bufferData(m.ARRAY_BUFFER,Re,m.STATIC_DRAW),H=m.getAttribLocation(W,"position"),Ue=m.getUniformLocation(W,"source"),m.enableVertexAttribArray(H),m.vertexAttribPointer(H,2,m.FLOAT,!1,0,0),m.uniform1i(Ue,0),m.drawArrays(m.TRIANGLES,0,6),ee=new Uint8Array(4*4),m.readPixels(0,0,2,2,m.RGBA,m.UNSIGNED_BYTE,ee),le=Math.abs(ee[0]-127)<10,b(),le},r=function(m,E){let x;return x=m.createTexture(),m.bindTexture(m.TEXTURE_2D,x),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,E,null),m.getError()===0?(m.deleteTexture(x),!0):(m.deleteTexture(x),!1)},n=function(m,E){let x,b,I;return I=m.createTexture(),m.bindTexture(m.TEXTURE_2D,I),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,E,null),b=m.createFramebuffer(),m.bindFramebuffer(m.FRAMEBUFFER,b),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,I,0),x=m.checkFramebufferStatus(m.FRAMEBUFFER),m.deleteTexture(I),m.deleteFramebuffer(b),m.bindTexture(m.TEXTURE_2D,null),m.bindFramebuffer(m.FRAMEBUFFER,null),x===m.FRAMEBUFFER_COMPLETE},h=[],c={},p=[],t=function(){let m,E,x,b,I,N,H;m=document.createElement("canvas"),x=null;try{x=m.getContext("experimental-webgl"),x===null&&(x=m.getContext("webgl"))}catch{}if(x!=null&&(N=x.getExtension("OES_texture_float"),N===null?r(x,x.FLOAT)?(H=!0,h.push("OES_texture_float"),c.OES_texture_float={shim:!0}):(H=!1,p.push("OES_texture_float")):r(x,x.FLOAT)?(H=!0,h.push("OES_texture_float")):(H=!1,p.push("OES_texture_float")),H&&(E=x.getExtension("WEBGL_color_buffer_float"),E===null?n(x,x.FLOAT)?(h.push("WEBGL_color_buffer_float"),c.WEBGL_color_buffer_float={shim:!0,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):p.push("WEBGL_color_buffer_float"):n(x,x.FLOAT)?h.push("WEBGL_color_buffer_float"):p.push("WEBGL_color_buffer_float"),E=x.getExtension("OES_texture_float_linear"),E===null?e(x,x.FLOAT)?(h.push("OES_texture_float_linear"),c.OES_texture_float_linear={shim:!0}):p.push("OES_texture_float_linear"):e(x,x.FLOAT)?h.push("OES_texture_float_linear"):p.push("OES_texture_float_linear")),b=x.getExtension("OES_texture_half_float"),b===null?r(x,36193)?(I=!0,h.push("OES_texture_half_float"),b=c.OES_texture_half_float={HALF_FLOAT_OES:36193,shim:!0}):(I=!1,p.push("OES_texture_half_float")):r(x,b.HALF_FLOAT_OES)?(I=!0,h.push("OES_texture_half_float")):(I=!1,p.push("OES_texture_half_float")),I))return E=x.getExtension("EXT_color_buffer_half_float"),E===null?n(x,b.HALF_FLOAT_OES)?(h.push("EXT_color_buffer_half_float"),c.EXT_color_buffer_half_float={shim:!0,RGBA16F_EXT:34842,RGB16F_EXT:34843,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):p.push("EXT_color_buffer_half_float"):n(x,b.HALF_FLOAT_OES)?h.push("EXT_color_buffer_half_float"):p.push("EXT_color_buffer_half_float"),E=x.getExtension("OES_texture_half_float_linear"),E===null?e(x,b.HALF_FLOAT_OES)?(h.push("OES_texture_half_float_linear"),c.OES_texture_half_float_linear={shim:!0}):p.push("OES_texture_half_float_linear"):e(x,b.HALF_FLOAT_OES)?h.push("OES_texture_half_float_linear"):p.push("OES_texture_half_float_linear")},window.WebGLRenderingContext!=null){for(t(),f={},T=0,y=p.length;T<y;T++)l=p[T],f[l]=!0;return o=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(m){let E;return E=c[m],E===void 0?f[m]?null:o.call(this,m):E},a=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let m,E,x,b,I,N,H;for(x=a.call(this),E=[],b=0,N=x.length;b<N;b++)m=x[b],f[m]===void 0&&E.push(m);for(I=0,H=h.length;I<H;I++)m=h[I],Ql.call(E,m)<0&&E.push(m);return E},WebGLRenderingContext.prototype.getFloatExtension=function(m){let E,x,b,I,N,H,W,ee,le,j,Le,Ue,Me,he,Re,Je,Ke,Qe,Oa,ka,Fa,za,ti,Ha,ii,ri;for(m.prefer==null&&(m.prefer=["half"]),m.require==null&&(m.require=[]),m.throws==null&&(m.throws=!0),he=this.getExtension("OES_texture_float"),H=this.getExtension("OES_texture_half_float"),Ue=this.getExtension("WEBGL_color_buffer_float"),I=this.getExtension("EXT_color_buffer_half_float"),Me=this.getExtension("OES_texture_float_linear"),N=this.getExtension("OES_texture_half_float_linear"),Le={texture:he!==null,filterable:Me!==null,renderable:Ue!==null,score:0,precision:"single",half:!1,single:!0,type:this.FLOAT},b={texture:H!==null,filterable:N!==null,renderable:I!==null,score:0,precision:"half",half:!0,single:!1,type:(Ha=H!=null?H.HALF_FLOAT_OES:void 0)!=null?Ha:null},x=[],Le.texture&&x.push(Le),b.texture&&x.push(b),j=[],Je=0,Oa=x.length;Je<Oa;Je++){for(E=x[Je],Re=!0,ii=m.require,Ke=0,ka=ii.length;Ke<ka;Ke++)l=ii[Ke],E[l]===!1&&(Re=!1);Re&&j.push(E)}for(Qe=0,Fa=j.length;Qe<Fa;Qe++)for(E=j[Qe],ri=m.prefer,W=ti=0,za=ri.length;ti<za;W=++ti)le=ri[W],ee=Math.pow(2,m.prefer.length-W-1),E[le]&&(E.score+=ee);if(j.sort(function(si,oi){if(si.score===oi.score)return 0;if(si.score<oi.score)return 1;if(si.score>oi.score)return-1}),j.length===0){if(m.throws)throw"No floating point texture support that is "+m.require.join(", ");return null}else return j=j[0],{filterable:j.filterable,renderable:j.renderable,type:j.type,precision:j.precision}}}};im();rm();var Xe=function(){function n(e,t){let r,s;this.gl=e,s=t.vertex,r=t.fragment,this.program=this.gl.createProgram(),this.vs=this.gl.createShader(this.gl.VERTEX_SHADER),this.fs=this.gl.createShader(this.gl.FRAGMENT_SHADER),this.gl.attachShader(this.program,this.vs),this.gl.attachShader(this.program,this.fs),this.compileShader(this.vs,s),this.compileShader(this.fs,r),this.link(),this.value_cache={},this.uniform_cache={},this.attribCache={}}return n.prototype.attribLocation=function(e){let t=this.attribCache[e];return t===void 0&&(t=this.attribCache[e]=this.gl.getAttribLocation(this.program,e)),t},n.prototype.compileShader=function(e,t){if(this.gl.shaderSource(e,t),this.gl.compileShader(e),!this.gl.getShaderParameter(e,this.gl.COMPILE_STATUS))throw"Shader Compile Error: "+this.gl.getShaderInfoLog(e)},n.prototype.link=function(){if(this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))throw"Shader Link Error: "+this.gl.getProgramInfoLog(this.program)},n.prototype.use=function(){return this.gl.useProgram(this.program),this},n.prototype.uniformLoc=function(e){let t=this.uniform_cache[e];return t===void 0&&(t=this.uniform_cache[e]=this.gl.getUniformLocation(this.program,e)),t},n.prototype.int=function(e,t){let r,s;return r=this.value_cache[e],r!==t&&(this.value_cache[e]=t,s=this.uniformLoc(e),s&&this.gl.uniform1i(s,t)),this},n.prototype.vec2=function(e,t,r){let s;return s=this.uniformLoc(e),s&&this.gl.uniform2f(s,t,r),this},n.prototype.float=function(e,t){let r,s;return r=this.value_cache[e],r!==t&&(this.value_cache[e]=t,s=this.uniformLoc(e),s&&this.gl.uniform1f(s,t)),this},n}(),sm=function(){function n(e){this.gl=e,this.buffer=this.gl.createFramebuffer()}return n.prototype.destroy=function(){return this.gl.deleteFRamebuffer(this.buffer)},n.prototype.bind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.buffer),this},n.prototype.unbind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this},n.prototype.check=function(){let e;switch(e=this.gl.checkFramebufferStatus(this.gl.FRAMEBUFFER),e){case this.gl.FRAMEBUFFER_UNSUPPORTED:throw"Framebuffer is unsupported";case this.gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Framebuffer incomplete attachment";case this.gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Framebuffer incomplete dimensions";case this.gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Framebuffer incomplete missing attachment"}return this},n.prototype.color=function(e){return this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,e.target,e.handle,0),this.check(),this},n.prototype.depth=function(e){return this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER,this.gl.DEPTH_ATTACHMENT,this.gl.RENDERBUFFER,e.id),this.check(),this},n.prototype.destroy=function(){return this.gl.deleteFramebuffer(this.buffer)},n}(),$l=function(){function n(e,t){let r,s;switch(this.gl=e,t==null&&(t={}),this.channels=this.gl[((r=t.channels)!=null?r:"rgba").toUpperCase()],typeof t.type=="number"?this.type=t.type:this.type=this.gl[((s=t.type)!=null?s:"unsigned_byte").toUpperCase()],this.channels){case this.gl.RGBA:this.chancount=4;break;case this.gl.RGB:this.chancount=3;break;case this.gl.LUMINANCE_ALPHA:this.chancount=2;break;default:this.chancount=1}this.target=this.gl.TEXTURE_2D,this.handle=this.gl.createTexture()}return n.prototype.destroy=function(){return this.gl.deleteTexture(this.handle)},n.prototype.bind=function(e){if(e==null&&(e=0),e>15)throw"Texture unit too large: "+e;return this.gl.activeTexture(this.gl.TEXTURE0+e),this.gl.bindTexture(this.target,this.handle),this},n.prototype.setSize=function(e,t){return this.width=e,this.height=t,this.gl.texImage2D(this.target,0,this.channels,this.width,this.height,0,this.channels,this.type,null),this},n.prototype.upload=function(e){return this.width=e.width,this.height=e.height,this.gl.texImage2D(this.target,0,this.channels,this.channels,this.type,e),this},n.prototype.linear=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this},n.prototype.nearest=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST),this},n.prototype.clampToEdge=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this},n.prototype.repeat=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.REPEAT),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.REPEAT),this},n}(),Kl=function(){function n(e,t,r){let s;this.gl=e,this.width=t,this.height=r,s=this.gl.getFloatExtension({require:["renderable"]}),this.texture=new $l(this.gl,{type:s.type}).bind(0).setSize(this.width,this.height).nearest().clampToEdge(),this.fbo=new sm(this.gl).bind().color(this.texture).unbind()}return n.prototype.use=function(){return this.fbo.bind()},n.prototype.bind=function(e){return this.texture.bind(e)},n.prototype.end=function(){return this.fbo.unbind()},n.prototype.resize=function(e,t){return this.width=e,this.height=t,this.texture.bind(0).setSize(this.width,this.height)},n}(),om=function(){function n(e,t,r,s){let o,a,l;for(this.heatmap=e,this.gl=t,this.width=r,this.height=s,this.shader=new Xe(this.gl,{vertex:`attribute vec4 position, intensity;
211
+ }`),d.compileShader(M),!d.getShaderParameter(M,d.COMPILE_STATUS))throw d.getShaderInfoLog(M);if(d.linkProgram(B),!d.getProgramParameter(B,d.LINK_STATUS))throw d.getProgramInfoLog(B);return d.useProgram(B),b=function(){return d.deleteShader(M),d.deleteShader(ue),d.deleteProgram(B),d.deleteBuffer(T),d.deleteTexture(Z),d.deleteTexture(Oe),d.deleteFramebuffer(N),d.bindBuffer(d.ARRAY_BUFFER,null),d.useProgram(null),d.bindTexture(d.TEXTURE_2D,null),d.bindFramebuffer(d.FRAMEBUFFER,null)},Oe=d.createTexture(),d.bindTexture(d.TEXTURE_2D,Oe),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,2,2,0,d.RGBA,d.UNSIGNED_BYTE,null),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),N=d.createFramebuffer(),d.bindFramebuffer(d.FRAMEBUFFER,N),d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,Oe,0),He=s(),Z=d.createTexture(),d.bindTexture(d.TEXTURE_2D,Z),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,E,He),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),Ne=new Float32Array([1,1,-1,1,-1,-1,1,1,-1,-1,1,-1]),T=d.createBuffer(),d.bindBuffer(d.ARRAY_BUFFER,T),d.bufferData(d.ARRAY_BUFFER,Ne,d.STATIC_DRAW),F=d.getAttribLocation(B,"position"),st=d.getUniformLocation(B,"source"),d.enableVertexAttribArray(F),d.vertexAttribPointer(F,2,d.FLOAT,!1,0,0),d.uniform1i(st,0),d.drawArrays(d.TRIANGLES,0,6),re=new Uint8Array(4*4),d.readPixels(0,0,2,2,d.RGBA,d.UNSIGNED_BYTE,re),de=Math.abs(re[0]-127)<10,b(),de},r=function(d,E){let T;return T=d.createTexture(),d.bindTexture(d.TEXTURE_2D,T),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,2,2,0,d.RGBA,E,null),d.getError()===0?(d.deleteTexture(T),!0):(d.deleteTexture(T),!1)},a=function(d,E){let T,b,M;return M=d.createTexture(),d.bindTexture(d.TEXTURE_2D,M),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,2,2,0,d.RGBA,E,null),b=d.createFramebuffer(),d.bindFramebuffer(d.FRAMEBUFFER,b),d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,M,0),T=d.checkFramebufferStatus(d.FRAMEBUFFER),d.deleteTexture(M),d.deleteFramebuffer(b),d.bindTexture(d.TEXTURE_2D,null),d.bindFramebuffer(d.FRAMEBUFFER,null),T===d.FRAMEBUFFER_COMPLETE},h=[],c={},p=[],t=function(){let d,E,T,b,M,N,F;d=document.createElement("canvas"),T=null;try{T=d.getContext("experimental-webgl"),T===null&&(T=d.getContext("webgl"))}catch{}if(T!=null&&(N=T.getExtension("OES_texture_float"),N===null?r(T,T.FLOAT)?(F=!0,h.push("OES_texture_float"),c.OES_texture_float={shim:!0}):(F=!1,p.push("OES_texture_float")):r(T,T.FLOAT)?(F=!0,h.push("OES_texture_float")):(F=!1,p.push("OES_texture_float")),F&&(E=T.getExtension("WEBGL_color_buffer_float"),E===null?a(T,T.FLOAT)?(h.push("WEBGL_color_buffer_float"),c.WEBGL_color_buffer_float={shim:!0,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):p.push("WEBGL_color_buffer_float"):a(T,T.FLOAT)?h.push("WEBGL_color_buffer_float"):p.push("WEBGL_color_buffer_float"),E=T.getExtension("OES_texture_float_linear"),E===null?e(T,T.FLOAT)?(h.push("OES_texture_float_linear"),c.OES_texture_float_linear={shim:!0}):p.push("OES_texture_float_linear"):e(T,T.FLOAT)?h.push("OES_texture_float_linear"):p.push("OES_texture_float_linear")),b=T.getExtension("OES_texture_half_float"),b===null?r(T,36193)?(M=!0,h.push("OES_texture_half_float"),b=c.OES_texture_half_float={HALF_FLOAT_OES:36193,shim:!0}):(M=!1,p.push("OES_texture_half_float")):r(T,b.HALF_FLOAT_OES)?(M=!0,h.push("OES_texture_half_float")):(M=!1,p.push("OES_texture_half_float")),M))return E=T.getExtension("EXT_color_buffer_half_float"),E===null?a(T,b.HALF_FLOAT_OES)?(h.push("EXT_color_buffer_half_float"),c.EXT_color_buffer_half_float={shim:!0,RGBA16F_EXT:34842,RGB16F_EXT:34843,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):p.push("EXT_color_buffer_half_float"):a(T,b.HALF_FLOAT_OES)?h.push("EXT_color_buffer_half_float"):p.push("EXT_color_buffer_half_float"),E=T.getExtension("OES_texture_half_float_linear"),E===null?e(T,b.HALF_FLOAT_OES)?(h.push("OES_texture_half_float_linear"),c.OES_texture_half_float_linear={shim:!0}):p.push("OES_texture_half_float_linear"):e(T,b.HALF_FLOAT_OES)?h.push("OES_texture_half_float_linear"):p.push("OES_texture_half_float_linear")},window.WebGLRenderingContext!=null){for(t(),_={},w=0,g=p.length;w<g;w++)l=p[w],_[l]=!0;return o=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(d){let E;return E=c[d],E===void 0?_[d]?null:o.call(this,d):E},n=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let d,E,T,b,M,N,F;for(T=n.call(this),E=[],b=0,N=T.length;b<N;b++)d=T[b],_[d]===void 0&&E.push(d);for(M=0,F=h.length;M<F;M++)d=h[M],mu.call(E,d)<0&&E.push(d);return E},WebGLRenderingContext.prototype.getFloatExtension=function(d){let E,T,b,M,N,F,B,re,de,Z,He,st,Oe,ue,Ne,Et,Pt,bt,Yn,Zn,Xn,Jn,Wi,Kn,Gi,Ui;for(d.prefer==null&&(d.prefer=["half"]),d.require==null&&(d.require=[]),d.throws==null&&(d.throws=!0),ue=this.getExtension("OES_texture_float"),F=this.getExtension("OES_texture_half_float"),st=this.getExtension("WEBGL_color_buffer_float"),M=this.getExtension("EXT_color_buffer_half_float"),Oe=this.getExtension("OES_texture_float_linear"),N=this.getExtension("OES_texture_half_float_linear"),He={texture:ue!==null,filterable:Oe!==null,renderable:st!==null,score:0,precision:"single",half:!1,single:!0,type:this.FLOAT},b={texture:F!==null,filterable:N!==null,renderable:M!==null,score:0,precision:"half",half:!0,single:!1,type:(Kn=F!=null?F.HALF_FLOAT_OES:void 0)!=null?Kn:null},T=[],He.texture&&T.push(He),b.texture&&T.push(b),Z=[],Et=0,Yn=T.length;Et<Yn;Et++){for(E=T[Et],Ne=!0,Gi=d.require,Pt=0,Zn=Gi.length;Pt<Zn;Pt++)l=Gi[Pt],E[l]===!1&&(Ne=!1);Ne&&Z.push(E)}for(bt=0,Xn=Z.length;bt<Xn;bt++)for(E=Z[bt],Ui=d.prefer,B=Wi=0,Jn=Ui.length;Wi<Jn;B=++Wi)de=Ui[B],re=Math.pow(2,d.prefer.length-B-1),E[de]&&(E.score+=re);if(Z.sort(function(Bi,Vi){if(Bi.score===Vi.score)return 0;if(Bi.score<Vi.score)return 1;if(Bi.score>Vi.score)return-1}),Z.length===0){if(d.throws)throw"No floating point texture support that is "+d.require.join(", ");return null}else return Z=Z[0],{filterable:Z.filterable,renderable:Z.renderable,type:Z.type,precision:Z.precision}}}};K1();Q1();var Tt=function(){function a(e,t){let r,s;this.gl=e,s=t.vertex,r=t.fragment,this.program=this.gl.createProgram(),this.vs=this.gl.createShader(this.gl.VERTEX_SHADER),this.fs=this.gl.createShader(this.gl.FRAGMENT_SHADER),this.gl.attachShader(this.program,this.vs),this.gl.attachShader(this.program,this.fs),this.compileShader(this.vs,s),this.compileShader(this.fs,r),this.link(),this.value_cache={},this.uniform_cache={},this.attribCache={}}return a.prototype.attribLocation=function(e){let t=this.attribCache[e];return t===void 0&&(t=this.attribCache[e]=this.gl.getAttribLocation(this.program,e)),t},a.prototype.compileShader=function(e,t){if(this.gl.shaderSource(e,t),this.gl.compileShader(e),!this.gl.getShaderParameter(e,this.gl.COMPILE_STATUS))throw"Shader Compile Error: "+this.gl.getShaderInfoLog(e)},a.prototype.link=function(){if(this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))throw"Shader Link Error: "+this.gl.getProgramInfoLog(this.program)},a.prototype.use=function(){return this.gl.useProgram(this.program),this},a.prototype.uniformLoc=function(e){let t=this.uniform_cache[e];return t===void 0&&(t=this.uniform_cache[e]=this.gl.getUniformLocation(this.program,e)),t},a.prototype.int=function(e,t){let r,s;return r=this.value_cache[e],r!==t&&(this.value_cache[e]=t,s=this.uniformLoc(e),s&&this.gl.uniform1i(s,t)),this},a.prototype.vec2=function(e,t,r){let s;return s=this.uniformLoc(e),s&&this.gl.uniform2f(s,t,r),this},a.prototype.float=function(e,t){let r,s;return r=this.value_cache[e],r!==t&&(this.value_cache[e]=t,s=this.uniformLoc(e),s&&this.gl.uniform1f(s,t)),this},a}(),$1=function(){function a(e){this.gl=e,this.buffer=this.gl.createFramebuffer()}return a.prototype.destroy=function(){return this.gl.deleteFRamebuffer(this.buffer)},a.prototype.bind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.buffer),this},a.prototype.unbind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this},a.prototype.check=function(){let e;switch(e=this.gl.checkFramebufferStatus(this.gl.FRAMEBUFFER),e){case this.gl.FRAMEBUFFER_UNSUPPORTED:throw"Framebuffer is unsupported";case this.gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Framebuffer incomplete attachment";case this.gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Framebuffer incomplete dimensions";case this.gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Framebuffer incomplete missing attachment"}return this},a.prototype.color=function(e){return this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,e.target,e.handle,0),this.check(),this},a.prototype.depth=function(e){return this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER,this.gl.DEPTH_ATTACHMENT,this.gl.RENDERBUFFER,e.id),this.check(),this},a.prototype.destroy=function(){return this.gl.deleteFramebuffer(this.buffer)},a}(),uu=function(){function a(e,t){let r,s;switch(this.gl=e,t==null&&(t={}),this.channels=this.gl[((r=t.channels)!=null?r:"rgba").toUpperCase()],typeof t.type=="number"?this.type=t.type:this.type=this.gl[((s=t.type)!=null?s:"unsigned_byte").toUpperCase()],this.channels){case this.gl.RGBA:this.chancount=4;break;case this.gl.RGB:this.chancount=3;break;case this.gl.LUMINANCE_ALPHA:this.chancount=2;break;default:this.chancount=1}this.target=this.gl.TEXTURE_2D,this.handle=this.gl.createTexture()}return a.prototype.destroy=function(){return this.gl.deleteTexture(this.handle)},a.prototype.bind=function(e){if(e==null&&(e=0),e>15)throw"Texture unit too large: "+e;return this.gl.activeTexture(this.gl.TEXTURE0+e),this.gl.bindTexture(this.target,this.handle),this},a.prototype.setSize=function(e,t){return this.width=e,this.height=t,this.gl.texImage2D(this.target,0,this.channels,this.width,this.height,0,this.channels,this.type,null),this},a.prototype.upload=function(e){return this.width=e.width,this.height=e.height,this.gl.texImage2D(this.target,0,this.channels,this.channels,this.type,e),this},a.prototype.linear=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this},a.prototype.nearest=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST),this},a.prototype.clampToEdge=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this},a.prototype.repeat=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.REPEAT),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.REPEAT),this},a}(),du=function(){function a(e,t,r){let s;this.gl=e,this.width=t,this.height=r,s=this.gl.getFloatExtension({require:["renderable"]}),this.texture=new uu(this.gl,{type:s.type}).bind(0).setSize(this.width,this.height).nearest().clampToEdge(),this.fbo=new $1(this.gl).bind().color(this.texture).unbind()}return a.prototype.use=function(){return this.fbo.bind()},a.prototype.bind=function(e){return this.texture.bind(e)},a.prototype.end=function(){return this.fbo.unbind()},a.prototype.resize=function(e,t){return this.width=e,this.height=t,this.texture.bind(0).setSize(this.width,this.height)},a}(),eE=function(){function a(e,t,r,s){let o,n,l;for(this.heatmap=e,this.gl=t,this.width=r,this.height=s,this.shader=new Tt(this.gl,{vertex:`attribute vec4 position, intensity;
214
212
  varying vec2 off, dim;
215
213
  varying float vIntensity;
216
214
  uniform vec2 viewport;
@@ -234,13 +232,13 @@ void main(){
234
232
  float falloff = (1.0 - smoothstep(0.0, 1.0, length(off/dim)));
235
233
  float intensity = falloff*vIntensity;
236
234
  gl_FragColor = vec4(intensity);
237
- }`}),this.clampShader=new Xe(this.gl,{vertex:wt,fragment:Tt+`uniform float low, high;
235
+ }`}),this.clampShader=new Tt(this.gl,{vertex:ai,fragment:ni+`uniform float low, high;
238
236
  void main(){
239
237
  gl_FragColor = vec4(clamp(texture2D(source, texcoord).rgb, low, high), 1.0);
240
- }`}),this.multiplyShader=new Xe(this.gl,{vertex:wt,fragment:Tt+`uniform float value;
238
+ }`}),this.multiplyShader=new Tt(this.gl,{vertex:ai,fragment:ni+`uniform float value;
241
239
  void main(){
242
240
  gl_FragColor = vec4(texture2D(source, texcoord).rgb*value, 1.0);
243
- }`}),this.blurShader=new Xe(this.gl,{vertex:wt,fragment:Tt+`uniform vec2 viewport;
241
+ }`}),this.blurShader=new Tt(this.gl,{vertex:ai,fragment:ni+`uniform vec2 viewport;
244
242
  void main(){
245
243
  vec4 result = vec4(0.0);
246
244
  for(int x=-1; x<=1; x++){
@@ -252,10 +250,10 @@ void main(){
252
250
  }
253
251
  }
254
252
  gl_FragColor = vec4(result.rgb/result.w, 1.0);
255
- }`}),this.nodeBack=new Kl(this.gl,this.width,this.height),this.nodeFront=new Kl(this.gl,this.width,this.height),this.vertexBuffer=this.gl.createBuffer(),this.vertexSize=8,this.maxPointCount=1024*10,this.vertexBufferData=new Float32Array(this.maxPointCount*this.vertexSize*6),this.vertexBufferViews=[],o=a=0,l=this.maxPointCount;0<=l?a<l:a>l;o=0<=l?++a:--a)this.vertexBufferViews.push(new Float32Array(this.vertexBufferData.buffer,0,o*this.vertexSize*6));this.bufferIndex=0,this.pointCount=0}return n.prototype.resize=function(e,t){return this.width=e,this.height=t,this.nodeBack.resize(this.width,this.height),this.nodeFront.resize(this.width,this.height)},n.prototype.update=function(){var e,t;if(this.pointCount>0)return this.gl.enable(this.gl.BLEND),this.nodeFront.use(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.vertexBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.vertexBufferViews[this.pointCount],this.gl.STREAM_DRAW),t=this.shader.attribLocation("position"),e=this.shader.attribLocation("intensity"),this.gl.enableVertexAttribArray(1),this.gl.vertexAttribPointer(t,4,this.gl.FLOAT,!1,8*4,0),this.gl.vertexAttribPointer(e,4,this.gl.FLOAT,!1,8*4,4*4),this.shader.use().vec2("viewport",this.width,this.height),this.gl.drawArrays(this.gl.TRIANGLES,0,this.pointCount*6),this.gl.disableVertexAttribArray(1),this.pointCount=0,this.bufferIndex=0,this.nodeFront.end(),this.gl.disable(this.gl.BLEND)},n.prototype.clear=function(){return this.nodeFront.use(),this.gl.clearColor(0,0,0,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.nodeFront.end()},n.prototype.clamp=function(e,t){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.clampShader.use().int("source",0).float("low",e).float("high",t),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},n.prototype.multiply=function(e){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.multiplyShader.use().int("source",0).float("value",e),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},n.prototype.blur=function(){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.blurShader.use().int("source",0).vec2("viewport",this.width,this.height),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},n.prototype.swap=function(){let e=this.nodeFront;return this.nodeFront=this.nodeBack,this.nodeBack=e},n.prototype.addVertex=function(e,t,r,s,o){return this.vertexBufferData[this.bufferIndex++]=e,this.vertexBufferData[this.bufferIndex++]=t,this.vertexBufferData[this.bufferIndex++]=r,this.vertexBufferData[this.bufferIndex++]=s,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o},n.prototype.addPoint=function(e,t,r,s){let o;return r==null&&(r=50),s==null&&(s=.2),this.pointCount>=this.maxPointCount-1&&this.update(),t=this.height-t,o=r/2,this.addVertex(e,t,-o,-o,s),this.addVertex(e,t,+o,-o,s),this.addVertex(e,t,-o,+o,s),this.addVertex(e,t,-o,+o,s),this.addVertex(e,t,+o,-o,s),this.addVertex(e,t,+o,+o,s),this.pointCount+=1},n}(),am=function(){function n(e){let t,r,s,o,a,l,h,c,p,f,T,y,m;y=e!=null?e:{},this.canvas=y.canvas,this.width=y.width,this.height=y.height,c=y.intensityToAlpha,l=y.gradientTexture,r=y.alphaRange,this.canvas||(this.canvas=document.createElement("canvas"));try{if(this.gl=this.canvas.getContext("experimental-webgl",{depth:!1,antialias:!1}),this.gl===null&&(this.gl=this.canvas.getContext("webgl",{depth:!1,antialias:!1}),this.gl===null))throw"WebGL not supported"}catch(E){throw o=E,"WebGL not supported"}window.WebGLDebugUtils!=null&&(this.gl=window.WebGLDebugUtils.makeDebugContext(this.gl,function(E,x,b){throw window.WebGLDebugUtils.glEnumToString(E)+" was caused by call to: "+x})),this.gl.enableVertexAttribArray(0),this.gl.blendFunc(this.gl.ONE,this.gl.ONE),l?(T=this.gradientTexture=new $l(this.gl,{channels:"rgba"}).bind(0).setSize(2,2).nearest().clampToEdge(),typeof l=="string"?(h=new Image,h.onload=function(){return T.bind().upload(h)},h.src=l):l.width>0&&l.height>0?T.upload(l):l.onload=function(){return T.upload(l)},a=`uniform sampler2D gradientTexture;
253
+ }`}),this.nodeBack=new du(this.gl,this.width,this.height),this.nodeFront=new du(this.gl,this.width,this.height),this.vertexBuffer=this.gl.createBuffer(),this.vertexSize=8,this.maxPointCount=1024*10,this.vertexBufferData=new Float32Array(this.maxPointCount*this.vertexSize*6),this.vertexBufferViews=[],o=n=0,l=this.maxPointCount;0<=l?n<l:n>l;o=0<=l?++n:--n)this.vertexBufferViews.push(new Float32Array(this.vertexBufferData.buffer,0,o*this.vertexSize*6));this.bufferIndex=0,this.pointCount=0}return a.prototype.resize=function(e,t){return this.width=e,this.height=t,this.nodeBack.resize(this.width,this.height),this.nodeFront.resize(this.width,this.height)},a.prototype.update=function(){var e,t;if(this.pointCount>0)return this.gl.enable(this.gl.BLEND),this.nodeFront.use(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.vertexBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.vertexBufferViews[this.pointCount],this.gl.STREAM_DRAW),t=this.shader.attribLocation("position"),e=this.shader.attribLocation("intensity"),this.gl.enableVertexAttribArray(1),this.gl.vertexAttribPointer(t,4,this.gl.FLOAT,!1,8*4,0),this.gl.vertexAttribPointer(e,4,this.gl.FLOAT,!1,8*4,4*4),this.shader.use().vec2("viewport",this.width,this.height),this.gl.drawArrays(this.gl.TRIANGLES,0,this.pointCount*6),this.gl.disableVertexAttribArray(1),this.pointCount=0,this.bufferIndex=0,this.nodeFront.end(),this.gl.disable(this.gl.BLEND)},a.prototype.clear=function(){return this.nodeFront.use(),this.gl.clearColor(0,0,0,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.nodeFront.end()},a.prototype.clamp=function(e,t){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.clampShader.use().int("source",0).float("low",e).float("high",t),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},a.prototype.multiply=function(e){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.multiplyShader.use().int("source",0).float("value",e),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},a.prototype.blur=function(){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.blurShader.use().int("source",0).vec2("viewport",this.width,this.height),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},a.prototype.swap=function(){let e=this.nodeFront;return this.nodeFront=this.nodeBack,this.nodeBack=e},a.prototype.addVertex=function(e,t,r,s,o){return this.vertexBufferData[this.bufferIndex++]=e,this.vertexBufferData[this.bufferIndex++]=t,this.vertexBufferData[this.bufferIndex++]=r,this.vertexBufferData[this.bufferIndex++]=s,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o},a.prototype.addPoint=function(e,t,r,s){let o;return r==null&&(r=50),s==null&&(s=.2),this.pointCount>=this.maxPointCount-1&&this.update(),t=this.height-t,o=r/2,this.addVertex(e,t,-o,-o,s),this.addVertex(e,t,+o,-o,s),this.addVertex(e,t,-o,+o,s),this.addVertex(e,t,-o,+o,s),this.addVertex(e,t,+o,-o,s),this.addVertex(e,t,+o,+o,s),this.pointCount+=1},a}(),tE=function(){function a(e){let t,r,s,o,n,l,h,c,p,_,w,g,d;g=e!=null?e:{},this.canvas=g.canvas,this.width=g.width,this.height=g.height,c=g.intensityToAlpha,l=g.gradientTexture,r=g.alphaRange,this.canvas||(this.canvas=document.createElement("canvas"));try{if(this.gl=this.canvas.getContext("experimental-webgl",{depth:!1,antialias:!1}),this.gl===null&&(this.gl=this.canvas.getContext("webgl",{depth:!1,antialias:!1}),this.gl===null))throw"WebGL not supported"}catch(E){throw o=E,"WebGL not supported"}window.WebGLDebugUtils!=null&&(this.gl=window.WebGLDebugUtils.makeDebugContext(this.gl,function(E,T,b){throw window.WebGLDebugUtils.glEnumToString(E)+" was caused by call to: "+T})),this.gl.enableVertexAttribArray(0),this.gl.blendFunc(this.gl.ONE,this.gl.ONE),l?(w=this.gradientTexture=new uu(this.gl,{channels:"rgba"}).bind(0).setSize(2,2).nearest().clampToEdge(),typeof l=="string"?(h=new Image,h.onload=function(){return w.bind().upload(h)},h.src=l):l.width>0&&l.height>0?w.upload(l):l.onload=function(){return w.upload(l)},n=`uniform sampler2D gradientTexture;
256
254
  vec3 getColor(float intensity){
257
255
  return texture2D(gradientTexture, vec2(intensity, 0.0)).rgb;
258
- }`):(T=null,a=`vec3 getColor(float intensity){
256
+ }`):(w=null,n=`vec3 getColor(float intensity){
259
257
  vec3 blue = vec3(0.0, 0.0, 1.0);
260
258
  vec3 cyan = vec3(0.0, 1.0, 1.0);
261
259
  vec3 green = vec3(0.0, 1.0, 0.0);
@@ -270,12 +268,12 @@ vec3 getColor(float intensity){
270
268
  smoothstep(0.75, 1.0, intensity)*red
271
269
  );
272
270
  return color;
273
- }`),c==null&&(c=!0),c?(m=r!=null?r:[0,1],s=m[0],t=m[1],p=`vec4 alphaFun(vec3 color, float intensity){
271
+ }`),c==null&&(c=!0),c?(d=r!=null?r:[0,1],s=d[0],t=d[1],p=`vec4 alphaFun(vec3 color, float intensity){
274
272
  float alpha = smoothstep(`+s.toFixed(8)+", "+t.toFixed(8)+`, intensity);
275
273
  return vec4(color*alpha, alpha);
276
274
  }`):p=`vec4 alphaFun(vec3 color, float intensity){
277
275
  return vec4(color, 1.0);
278
- }`,this.shader=new Xe(this.gl,{vertex:wt,fragment:Tt+(`float linstep(float low, float high, float value){
276
+ }`,this.shader=new Tt(this.gl,{vertex:ai,fragment:ni+(`float linstep(float low, float high, float value){
279
277
  return clamp((value-low)/(high-low), 0.0, 1.0);
280
278
  }
281
279
 
@@ -286,18 +284,18 @@ float fade(float low, float high, float value){
286
284
  return smoothstep(0.0, 1.0, x);
287
285
  }
288
286
 
289
- `+a+`
287
+ `+n+`
290
288
  `+p+`
291
289
 
292
290
  void main(){
293
291
  float intensity = smoothstep(0.0, 1.0, texture2D(source, texcoord).r);
294
292
  vec3 color = getColor(intensity);
295
293
  gl_FragColor = alphaFun(color, intensity);
296
- }`)}),this.width==null&&(this.width=this.canvas.offsetWidth||2),this.height==null&&(this.height=this.canvas.offsetHeight||2),this.canvas.width=this.width,this.canvas.height=this.height,this.gl.viewport(0,0,this.width,this.height),this.quad=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),f=new Float32Array([-1,-1,0,1,1,-1,0,1,-1,1,0,1,-1,1,0,1,1,-1,0,1,1,1,0,1]),this.gl.bufferData(this.gl.ARRAY_BUFFER,f,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,null),this.heights=new om(this,this.gl,this.width,this.height)}return n.prototype.adjustSize=function(){let e,t;if(t=this.canvas.offsetWidth||2,e=this.canvas.offsetHeight||2,this.width!==t||this.height!==e)return this.gl.viewport(0,0,t,e),this.canvas.width=t,this.canvas.height=e,this.width=t,this.height=e,this.heights.resize(this.width,this.height)},n.prototype.display=function(){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.heights.nodeFront.bind(0),this.gradientTexture&&this.gradientTexture.bind(1),this.shader.use().int("source",0).int("gradientTexture",1),this.gl.drawArrays(this.gl.TRIANGLES,0,6)},n.prototype.update=function(){return this.heights.update()},n.prototype.clear=function(){return this.heights.clear()},n.prototype.clamp=function(e,t){return e==null&&(e=0),t==null&&(t=1),this.heights.clamp(e,t)},n.prototype.multiply=function(e){return e==null&&(e=.95),this.heights.multiply(e)},n.prototype.blur=function(){return this.heights.blur()},n.prototype.addPoint=function(e,t,r,s){return this.heights.addPoint(e,t,r,s)},n.prototype.addPoints=function(e){let t,r,s,o;for(o=[],r=0,s=e.length;r<s;r++)t=e[r],o.push(this.addPoint(t.x,t.y,t.size,t.intensity));return o},n}();function qs(n){return new am(n)}var Xs=new i.WebMercatorProjection,nm={radius:30,height:0,gradient:void 0,useGround:!1,classificationType:2},Js=class extends P{constructor(e,t={}){super(e),this._options={...nm,...t},this._delegate=new i.PrimitiveCollection,this._isGround=this._options.useGround,this._canvas=document.createElement("canvas"),this._canvas.setAttribute("id",e),this._heat=void 0,this._scale=1,this._points=[],this._bounds=new i.Rectangle,this._boundsInMeter=void 0,this._primitive=this._delegate.add(this._isGround?new i.GroundPrimitive({geometryInstances:new i.GeometryInstance({geometry:{}}),classificationType:this._options.classificationType}):new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}})})),this._state=d.INITIALIZED}get type(){return P.getLayerType("heat-map")}_addedHook(){this._canvas.style.cssText=`
294
+ }`)}),this.width==null&&(this.width=this.canvas.offsetWidth||2),this.height==null&&(this.height=this.canvas.offsetHeight||2),this.canvas.width=this.width,this.canvas.height=this.height,this.gl.viewport(0,0,this.width,this.height),this.quad=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),_=new Float32Array([-1,-1,0,1,1,-1,0,1,-1,1,0,1,-1,1,0,1,1,-1,0,1,1,1,0,1]),this.gl.bufferData(this.gl.ARRAY_BUFFER,_,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,null),this.heights=new eE(this,this.gl,this.width,this.height)}return a.prototype.adjustSize=function(){let e,t;if(t=this.canvas.offsetWidth||2,e=this.canvas.offsetHeight||2,this.width!==t||this.height!==e)return this.gl.viewport(0,0,t,e),this.canvas.width=t,this.canvas.height=e,this.width=t,this.height=e,this.heights.resize(this.width,this.height)},a.prototype.display=function(){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.heights.nodeFront.bind(0),this.gradientTexture&&this.gradientTexture.bind(1),this.shader.use().int("source",0).int("gradientTexture",1),this.gl.drawArrays(this.gl.TRIANGLES,0,6)},a.prototype.update=function(){return this.heights.update()},a.prototype.clear=function(){return this.heights.clear()},a.prototype.clamp=function(e,t){return e==null&&(e=0),t==null&&(t=1),this.heights.clamp(e,t)},a.prototype.multiply=function(e){return e==null&&(e=.95),this.heights.multiply(e)},a.prototype.blur=function(){return this.heights.blur()},a.prototype.addPoint=function(e,t,r,s){return this.heights.addPoint(e,t,r,s)},a.prototype.addPoints=function(e){let t,r,s,o;for(o=[],r=0,s=e.length;r<s;r++)t=e[r],o.push(this.addPoint(t.x,t.y,t.size,t.intensity));return o},a}();function aa(a){return new tE(a)}var na=new i.WebMercatorProjection,iE={radius:30,height:0,gradient:void 0,useGround:!1,classificationType:2},la=class extends S{constructor(e,t={}){super(e),this._options={...iE,...t},this._delegate=new i.PrimitiveCollection,this._isGround=this._options.useGround,this._canvas=document.createElement("canvas"),this._canvas.setAttribute("id",e),this._heat=void 0,this._scale=1,this._points=[],this._bounds=new i.Rectangle,this._boundsInMeter=void 0,this._primitive=this._delegate.add(this._isGround?new i.GroundPrimitive({geometryInstances:new i.GeometryInstance({geometry:{}}),classificationType:this._options.classificationType}):new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}})})),this._state=m.INITIALIZED}get type(){return S.getLayerType("heat-map")}_addedHook(){this._canvas.style.cssText=`
297
295
  visibility:hidden;
298
296
  width:${this._viewer.canvas.width}px;
299
297
  height:${this._viewer.canvas.height}px;
300
- `,this._viewer.layerContainer.appendChild(this._canvas),this._points&&this._points.length&&(this._heat=qs({canvas:this._canvas,gradientTexture:this._createGradientTexture()}),this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update())}_createGradientTexture(){if(!this._options.gradient)return;let e=document.createElement("canvas");e.width=200,e.height=10;let t=e.getContext("2d"),r=t.createLinearGradient(0,0,200,0);for(let s in this._options.gradient)r.addColorStop(+s,this._options.gradient[s]);return t.fillStyle=r,t.fillRect(0,0,200,10),e}_parsePoints(e){return e.map(t=>{let r=Xs.project(i.Cartographic.fromDegrees(t.lng,t.lat));return{x:(r.x-this._boundsInMeter.west)/this._scale,y:(r.y-this._boundsInMeter.south)/this._scale,size:this._options.radius,intensity:t.value||Math.random()}})}_computeBounds(){i.Rectangle.fromCartographicArray(this._points.map(e=>i.Cartographic.fromDegrees(e.lng,e.lat)),this._bounds)}_computeBoundsInMeter(){let e=Xs.project(i.Rectangle.southwest(this._bounds)),t=Xs.project(i.Rectangle.northeast(this._bounds));this._boundsInMeter=new i.Rectangle(e.x,e.y,t.x,t.y)}_update(){if(!this._points||!this._points.length)return!1;this._heat.adjustSize(),this._heat.update(),this._heat.display(),this._primitive&&this._primitive.geometryInstances&&(this._primitive.geometryInstances.geometry=new i.RectangleGeometry({rectangle:this._bounds,height:this._options.height})),this._primitive.appearance=new i.MaterialAppearance({material:new i.Material({fabric:{type:"Heat-Image",uniforms:{image:this._canvas},source:`
298
+ `,this._viewer.layerContainer.appendChild(this._canvas),this._points&&this._points.length&&(this._heat=aa({canvas:this._canvas,gradientTexture:this._createGradientTexture()}),this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update())}_createGradientTexture(){if(!this._options.gradient)return;let e=document.createElement("canvas");e.width=200,e.height=10;let t=e.getContext("2d"),r=t.createLinearGradient(0,0,200,0);for(let s in this._options.gradient)r.addColorStop(+s,this._options.gradient[s]);return t.fillStyle=r,t.fillRect(0,0,200,10),e}_parsePoints(e){return e.map(t=>{let r=na.project(i.Cartographic.fromDegrees(t.lng,t.lat));return{x:(r.x-this._boundsInMeter.west)/this._scale,y:(r.y-this._boundsInMeter.south)/this._scale,size:this._options.radius,intensity:t.value||Math.random()}})}_computeBounds(){i.Rectangle.fromCartographicArray(this._points.map(e=>i.Cartographic.fromDegrees(e.lng,e.lat)),this._bounds)}_computeBoundsInMeter(){let e=na.project(i.Rectangle.southwest(this._bounds)),t=na.project(i.Rectangle.northeast(this._bounds));this._boundsInMeter=new i.Rectangle(e.x,e.y,t.x,t.y)}_update(){if(!this._points||!this._points.length)return!1;this._heat.adjustSize(),this._heat.update(),this._heat.display(),this._primitive&&this._primitive.geometryInstances&&(this._primitive.geometryInstances.geometry=new i.RectangleGeometry({rectangle:this._bounds,height:this._options.height})),this._primitive.appearance=new i.MaterialAppearance({material:new i.Material({fabric:{type:"Heat-Image",uniforms:{image:this._canvas},source:`
301
299
  uniform sampler2D image;
302
300
  czm_material czm_getMaterial(czm_materialInput materialInput){
303
301
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -310,7 +308,7 @@ void main(){
310
308
  material.alpha = colorImage.a;
311
309
  return material;
312
310
  }
313
- `},translucent:function(e){return!0}}),flat:!0})}setPoints(e){return this._points=e,this._computeBounds(),this._computeBoundsInMeter(),this._viewer&&(this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat=qs({canvas:this._canvas,gradientTexture:this._createGradientTexture()})),this._heat&&(this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update()),this}clear(){return this._heat.clear(),this._points=[],this._state=d.CLEARED,this}};P.registerType("heat-map");var lm=Js;var Ks=class{constructor(e,t){this.u=e,this.v=t,this.m=this.magnitude()}magnitude(){return Math.sqrt(this.u*this.u+this.v*this.v)}directionTo(){let t=Math.atan2(this.u,this.v)*(180/Math.PI);return t<0&&(t+=360),t}directionFrom(){return(this.directionTo()+180)%360}},Qs=Ks;var $s=class{constructor(e){this.grid=[],this.xmin=e.xmin,this.xmax=e.xmax,this.ymin=e.ymin,this.ymax=e.ymax,this.cols=e.cols,this.rows=e.rows,this.us=e.us,this.vs=e.vs,this.deltaX=e.deltaX,this.deltaY=e.deltaY,this.deltaY<0&&this.ymin<this.ymax?console.warn("[wind-core]: The data is flipY"):(this.ymin=Math.min(e.ymax,e.ymin),this.ymax=Math.max(e.ymax,e.ymin)),this.isFields=!0;let t=Math.ceil((this.xmax-this.xmin)/e.deltaX),r=Math.ceil((this.ymax-this.ymin)/e.deltaY);(t!==this.cols||r!==this.rows)&&console.warn("[wind-core]: The data grid not equal"),this.isContinuous=Math.floor(this.cols*e.deltaX)>=360,this.wrappedX="wrappedX"in e?e.wrappedX:this.xmax>180,this.grid=this.buildGrid(),this.range=this.calculateRange()}buildGrid(){let e=[],t=0,r=this,s=r.rows,o=r.cols,a=r.us,l=r.vs;for(let h=0;h<s;h++){let c=[];for(let p=0;p<o;p++,t++){let f=a[t],T=l[t],y=this.isValid(f)&&this.isValid(T);c[p]=y?new Qs(f,T):null}this.isContinuous&&c.push(c[0]),e[h]=c}return e}release(){this.grid=[]}extent(){return[this.xmin,this.ymin,this.xmax,this.ymax]}bilinearInterpolateVector(e,t,r,s,o,a){let l=1-e,h=1-t,c=l*h,p=e*h,f=l*t,T=e*t,y=r.u*c+s.u*p+o.u*f+a.u*T,m=r.v*c+s.v*p+o.v*f+a.v*T;return new Qs(y,m)}calculateRange(){if(!this.grid||!this.grid[0])return;let e=this.grid.length,t=this.grid[0].length,r,s;for(let o=0;o<e;o++)for(let a=0;a<t;a++){let l=this.grid[o][a];if(l!==null){let h=l.m||l.magnitude();r===void 0?r=h:s===void 0?(s=h,r=Math.min(r,s),s=Math.max(r,s)):(r=Math.min(h,r),s=Math.max(h,s))}}return[r,s]}isValid(e){return e!=null}getWrappedLongitudes(){let e=this.xmin,t=this.xmax;return this.wrappedX&&(this.isContinuous?(e=-180,t=180):(t=this.xmax-360,e=this.xmin-360)),[e,t]}contains(e,t){let r=this.getWrappedLongitudes(),s=r[0],o=r[1],a=e>=s&&e<=o,l;return this.deltaY>=0?l=t>=this.ymin&&t<=this.ymax:l=t>=this.ymax&&t<=this.ymin,a&&l}floorMod(e,t){return e-t*Math.floor(e/t)}getDecimalIndexes(e,t){let r=this.floorMod(e-this.xmin,360)/this.deltaX,s=(this.ymax-t)/this.deltaY;return[r,s]}valueAt(e,t){if(!this.contains(e,t))return null;let r=this.getDecimalIndexes(e,t),s=Math.floor(r[0]),o=Math.floor(r[1]),a=this.clampColumnIndex(s),l=this.clampRowIndex(o);return this.valueAtIndexes(a,l)}interpolatedValueAt(e,t){if(!this.contains(e,t))return null;let r=this.getDecimalIndexes(e,t),s=r[0],o=r[1];return this.interpolatePoint(s,o)}hasValueAt(e,t){return this.valueAt(e,t)!==null}interpolatePoint(e,t){let r=this.getFourSurroundingIndexes(e,t),s=r[0],o=r[1],a=r[2],l=r[3],h=this.getFourSurroundingValues(s,o,a,l);if(h){let c=h[0],p=h[1],f=h[2],T=h[3];return this.bilinearInterpolateVector(e-s,t-a,c,p,f,T)}return null}clampColumnIndex(e){let t=e;e<0&&(t=0);let r=this.cols-1;return e>r&&(t=r),t}clampRowIndex(e){let t=e;e<0&&(t=0);let r=this.rows-1;return e>r&&(t=r),t}getFourSurroundingIndexes(e,t){let r=Math.floor(e),s=r+1;this.isContinuous&&s>=this.cols&&(s=0),s=this.clampColumnIndex(s);let o=this.clampRowIndex(Math.floor(t)),a=this.clampRowIndex(o+1);return[r,s,o,a]}getFourSurroundingValues(e,t,r,s){let o;if(o=this.grid[r]){let a=o[e],l=o[t];if(this.isValid(a)&&this.isValid(l)&&(o=this.grid[s])){let h=o[e],c=o[t];if(this.isValid(h)&&this.isValid(c))return[a,l,h,c]}}return null}valueAtIndexes(e,t){return this.grid[t][e]}lonLatAtIndexes(e,t){let r=this.longitudeAtX(e),s=this.latitudeAtY(t);return[r,s]}longitudeAtX(e){let t=this.deltaX/2,r=this.xmin+t+e*this.deltaX;return this.wrappedX&&(r=r>180?r-360:r),r}latitudeAtY(e){let t=this.deltaY/2;return this.ymax-t-e*this.deltaY}randomize(e,t,r,s){e===void 0&&(e={});let o=Math.random()*(t||this.cols)|0,a=Math.random()*(r||this.rows)|0,l=s([o,a]);return l!==null?(e.x=l[0],e.y=l[1]):(e.x=this.longitudeAtX(o),e.y=this.latitudeAtY(a)),e}checkFields(){return this.isFields}},eh=$s;var eo=class{constructor(e){this.options={},this.particles=[],this.ctx=e,this.animationLoop=void 0,this.animate=this.animate.bind(this)}_indexFor(e,t,r,s){return Math.max(0,Math.min(s.length-1,Math.round((e-t)/(r-t)*(s.length-1))))}_moveParticles(){if(!this.particles||!this.particles.length)return;let e=this.ctx.canvas.width,t=this.ctx.canvas.height,r=this.particles,s=this.options.maxAge,o=typeof this.options.velocityScale=="function"?this.options.velocityScale():this.options.velocityScale;for(let a=0;a<r.length;a++){let l=r[a];l.age>s&&(l.age=0,this.field.randomize(l,e,t,this.unProject));let h=l.x,c=l.y,p=this.field.interpolatedValueAt(h,c);if(p===null)l.age=s;else{let f=h+p.u*o,T=c+p.v*o;this.field.hasValueAt(f,T)?(l.xt=f,l.yt=T,l.m=p.m):(l.x=f,l.y=T,l.age=s)}l.age++}}_drawParticles(){if(!this.particles||!this.particles.length)return;let e=this.particles,t=this.ctx.globalCompositeOperation;this.ctx.globalCompositeOperation="destination-in",this.ctx.fillRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.globalCompositeOperation=t,this.ctx.globalAlpha=this.options.globalAlpha,this.ctx.fillStyle="rgba(0, 0, 0, "+this.options.globalAlpha+")",this.ctx.lineWidth=this.options.lineWidth?this.options.lineWidth:1,this.ctx.strokeStyle=this.options.colorScale?this.options.colorScale:"#fff";let r=0,s=e.length;if(this.field&&s>0){let o,a;if(this.options.minVelocity&&this.options.maxVelocity)o=this.options.minVelocity,a=this.options.maxVelocity;else{let l=this.field.range;o=l[0],a=l[1]}for(;r<s;r++)this[this.options.useCoordsDraw?"_drawCoordsParticle":"_drawPixelParticle"](e[r],o,a)}}_drawPixelParticle(e,t,r){let s=[e.x,e.y],o=[e.xt,e.yt],a=e.xt-e.x,l=e.yt-e.y;a*a+l*l>20*20||o&&s&&o[0]&&o[1]&&s[0]&&s[1]&&e.age<=this.options.maxAge&&this._drawStroke(s,o,e,t,r)}_drawCoordsParticle(e,t,r){let s=[e.x,e.y],o=[e.xt,e.yt];if(o&&s&&o[0]&&o[1]&&s[0]&&s[1]&&this.intersectsCoordinate(o)&&e.age<=this.options.maxAge){let a=this.project(s),l=this.project(o);this._drawStroke(a,l,e,t,r)}}_drawStroke(e,t,r,s,o){if(e&&t){if(this.ctx.beginPath(),this.ctx.moveTo(e[0],e[1]),this.ctx.lineTo(t[0],t[1]),typeof this.options.colorScale=="function")this.ctx.strokeStyle=this.options.colorScale(r.m);else if(Array.isArray(this.options.colorScale)){let a=this._indexFor(r.m,s,o,this.options.colorScale);this.ctx.strokeStyle=this.options.colorScale[a]}typeof this.options.lineWidth=="function"&&(this.ctx.lineWidth=this.options.lineWidth(r.m)),r.x=r.xt,r.y=r.yt,this.ctx.stroke()}}_prepareParticlePaths(){let e=this.ctx.canvas.width,t=this.ctx.canvas.height,r=typeof this.options.paths=="function"?this.options.paths(this):this.options.paths,s=[];if(!this.field)return[];for(let o=0;o<r;o++)s.push(this.field.randomize({age:Math.floor(Math.random()*this.options.maxAge)},e,t,this.unProject));return s}project(){throw new Error("project must be override")}unProject(){throw new Error("unProject must be override")}intersectsCoordinate(e){throw new Error("must be override")}prerender(){this.field&&(this.particles=this._prepareParticlePaths(),!this.starting&&!this.forceStop&&(this.starting=!0,this._then=Date.now(),this.animate()))}render(){return this._moveParticles(),this._drawParticles(),this}clearCanvas(){this.stop(),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.forceStop=!1}start(){this.starting=!0,this.forceStop=!1,this._then=Date.now(),this.animate()}stop(){cancelAnimationFrame(this.animationLoop),this.starting=!1,this.forceStop=!0}animate(){this.animationLoop&&cancelAnimationFrame(this.animationLoop),this.animationLoop=requestAnimationFrame(this.animate);let e=Date.now(),t=e-this._then;t>this.options.frameRate&&(this._then=e-t%this.options.frameRate,this.render())}setData(e){return this.field=e,this}setOptions(e){var t,r,s,o;return this.options=e,!((t=this.options)!=null&&t.maxAge)&&((r=this.options)!=null&&r.particleAge)&&(this.options.maxAge=Number(this.options.particleAge)),!((s=this.options)!=null&&s.paths)&&((o=this.options)!=null&&o.particleMultiplier)&&(this.options.paths=Math.round(this.options.width*this.options.height*Number(this.options.particleMultiplier))),this}},th=eo;var hm={globalAlpha:.9,lineWidth:1,colorScale:"#fff",velocityScale:1/25,maxAge:90,paths:800,frameRate:20,useCoordsDraw:!0,gpet:!0},to=class extends P{constructor(e,t={}){super(e),this._options={...hm,...t},this._data=void 0,this._canvas=document.createElement("canvas"),this._state=d.INITIALIZED}get type(){return P.getLayerType("wind")}set show(e){this._show=e,this._canvas.style.visibility=e?"visible":"hidden"}get show(){return this._show}_formatData(e){let t,r;if(e.forEach(function(o){switch(o.header.parameterCategory+","+o.header.parameterNumber){case"1,2":case"2,2":t=o;break;case"1,3":case"2,3":r=o;break}}),!r||!t)return;let s=t.header;return new eh({xmin:s.lo1,ymin:s.la1,xmax:s.lo2,ymax:s.la2,deltaX:s.dx,deltaY:s.dy,cols:s.nx,rows:s.ny,us:t.data,vs:r.data})}_mountCanvas(){if(!this._viewer||!this._canvas)return;this._canvas.style.cssText="position:absolute; left:0; top:0;user-select:none;pointer-events: none;",this._canvas.className="dc-wind-layer";let{width:e,height:t}=this._viewer.canvas;this._canvas.width=e,this._canvas.height=t,this._canvas.style.width=e+"px",this._canvas.style.height=t+"px",this._viewer.layerContainer.appendChild(this._canvas)}_addedHook(){let e=this._viewer.scene,t=this._viewer.camera,r=i.Ellipsoid.WGS84;this._delegate.intersectsCoordinate=s=>{if(e.mode===i.SceneMode.SCENE3D){let o=new i.EllipsoidalOccluder(r,t.position),a=i.Cartesian3.fromDegrees(s[0],s[1]);return o.isPointVisible(a)}else if(e.mode===i.SceneMode.SCENE2D)return!(s[0]===-180||s[0]===180);return!0},this._delegate.project=s=>{let o=i.Cartesian3.fromDegrees(s[0],s[1]),a=i.SceneTransforms.worldToWindowCoordinates(e,o);return[a.x,a.y]},this._delegate.unProject=s=>{let o=new i.Cartesian2(s[0],s[1]),a;if(e.mode===i.SceneMode.SCENE3D?a=e.globe.pick(t.getPickRay(o),e):a=e.camera.pickEllipsoid(o,r),!a)return null;let l=r.cartesianToCartographic(a),h=i.Math.toDegrees(l.latitude);return[i.Math.toDegrees(l.longitude),h]}}_onAdd(e){this._viewer=e,this._mountCanvas();let t=this._canvas.getContext("2d");this._delegate||(this._delegate=new th(t),this._delegate.setOptions(this._options),this._addedHook()),this._data&&(this._delegate.setData(this._data),this._delegate.prerender(),this._delegate.render())}_onRemove(){this._delegate&&this._delegate.stop(),this._canvas&&this._viewer.layerContainer.removeChild(this._canvas),delete this._canvas}setData(e,t){return e&&e.checkFields&&e.checkFields()?this._data=e:Array.isArray(e)&&(this._data=this._formatData(e)),this._delegate&&(this._delegate.setData(this._data),t&&(this._options={...this._options,...t},this._delegate.setOptions(this._options)),this._delegate.prerender(),this._delegate.render()),this}setOptions(e){return this._options={...this._options,...e},this._delegate&&(this._delegate.setOptions(this._options),this._delegate.prerender(),this._delegate.render()),this}};P.registerType("wind");var cm=to;var ih=`/**
311
+ `},translucent:function(e){return!0}}),flat:!0})}setPoints(e){return this._points=e,this._computeBounds(),this._computeBoundsInMeter(),this._viewer&&(this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat=aa({canvas:this._canvas,gradientTexture:this._createGradientTexture()})),this._heat&&(this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update()),this}clear(){return this._heat.clear(),this._points=[],this._state=m.CLEARED,this}};S.registerType("heat-map");var rE=la;var ha=class{constructor(e,t){this.u=e,this.v=t,this.m=this.magnitude()}magnitude(){return Math.sqrt(this.u*this.u+this.v*this.v)}directionTo(){let t=Math.atan2(this.u,this.v)*(180/Math.PI);return t<0&&(t+=360),t}directionFrom(){return(this.directionTo()+180)%360}},ca=ha;var pa=class{constructor(e){this.grid=[],this.xmin=e.xmin,this.xmax=e.xmax,this.ymin=e.ymin,this.ymax=e.ymax,this.cols=e.cols,this.rows=e.rows,this.us=e.us,this.vs=e.vs,this.deltaX=e.deltaX,this.deltaY=e.deltaY,this.deltaY<0&&this.ymin<this.ymax?console.warn("[wind-core]: The data is flipY"):(this.ymin=Math.min(e.ymax,e.ymin),this.ymax=Math.max(e.ymax,e.ymin)),this.isFields=!0;let t=Math.ceil((this.xmax-this.xmin)/e.deltaX),r=Math.ceil((this.ymax-this.ymin)/e.deltaY);(t!==this.cols||r!==this.rows)&&console.warn("[wind-core]: The data grid not equal"),this.isContinuous=Math.floor(this.cols*e.deltaX)>=360,this.wrappedX="wrappedX"in e?e.wrappedX:this.xmax>180,this.grid=this.buildGrid(),this.range=this.calculateRange()}buildGrid(){let e=[],t=0,r=this,s=r.rows,o=r.cols,n=r.us,l=r.vs;for(let h=0;h<s;h++){let c=[];for(let p=0;p<o;p++,t++){let _=n[t],w=l[t],g=this.isValid(_)&&this.isValid(w);c[p]=g?new ca(_,w):null}this.isContinuous&&c.push(c[0]),e[h]=c}return e}release(){this.grid=[]}extent(){return[this.xmin,this.ymin,this.xmax,this.ymax]}bilinearInterpolateVector(e,t,r,s,o,n){let l=1-e,h=1-t,c=l*h,p=e*h,_=l*t,w=e*t,g=r.u*c+s.u*p+o.u*_+n.u*w,d=r.v*c+s.v*p+o.v*_+n.v*w;return new ca(g,d)}calculateRange(){if(!this.grid||!this.grid[0])return;let e=this.grid.length,t=this.grid[0].length,r,s;for(let o=0;o<e;o++)for(let n=0;n<t;n++){let l=this.grid[o][n];if(l!==null){let h=l.m||l.magnitude();r===void 0?r=h:s===void 0?(s=h,r=Math.min(r,s),s=Math.max(r,s)):(r=Math.min(h,r),s=Math.max(h,s))}}return[r,s]}isValid(e){return e!=null}getWrappedLongitudes(){let e=this.xmin,t=this.xmax;return this.wrappedX&&(this.isContinuous?(e=-180,t=180):(t=this.xmax-360,e=this.xmin-360)),[e,t]}contains(e,t){let r=this.getWrappedLongitudes(),s=r[0],o=r[1],n=e>=s&&e<=o,l;return this.deltaY>=0?l=t>=this.ymin&&t<=this.ymax:l=t>=this.ymax&&t<=this.ymin,n&&l}floorMod(e,t){return e-t*Math.floor(e/t)}getDecimalIndexes(e,t){let r=this.floorMod(e-this.xmin,360)/this.deltaX,s=(this.ymax-t)/this.deltaY;return[r,s]}valueAt(e,t){if(!this.contains(e,t))return null;let r=this.getDecimalIndexes(e,t),s=Math.floor(r[0]),o=Math.floor(r[1]),n=this.clampColumnIndex(s),l=this.clampRowIndex(o);return this.valueAtIndexes(n,l)}interpolatedValueAt(e,t){if(!this.contains(e,t))return null;let r=this.getDecimalIndexes(e,t),s=r[0],o=r[1];return this.interpolatePoint(s,o)}hasValueAt(e,t){return this.valueAt(e,t)!==null}interpolatePoint(e,t){let r=this.getFourSurroundingIndexes(e,t),s=r[0],o=r[1],n=r[2],l=r[3],h=this.getFourSurroundingValues(s,o,n,l);if(h){let c=h[0],p=h[1],_=h[2],w=h[3];return this.bilinearInterpolateVector(e-s,t-n,c,p,_,w)}return null}clampColumnIndex(e){let t=e;e<0&&(t=0);let r=this.cols-1;return e>r&&(t=r),t}clampRowIndex(e){let t=e;e<0&&(t=0);let r=this.rows-1;return e>r&&(t=r),t}getFourSurroundingIndexes(e,t){let r=Math.floor(e),s=r+1;this.isContinuous&&s>=this.cols&&(s=0),s=this.clampColumnIndex(s);let o=this.clampRowIndex(Math.floor(t)),n=this.clampRowIndex(o+1);return[r,s,o,n]}getFourSurroundingValues(e,t,r,s){let o;if(o=this.grid[r]){let n=o[e],l=o[t];if(this.isValid(n)&&this.isValid(l)&&(o=this.grid[s])){let h=o[e],c=o[t];if(this.isValid(h)&&this.isValid(c))return[n,l,h,c]}}return null}valueAtIndexes(e,t){return this.grid[t][e]}lonLatAtIndexes(e,t){let r=this.longitudeAtX(e),s=this.latitudeAtY(t);return[r,s]}longitudeAtX(e){let t=this.deltaX/2,r=this.xmin+t+e*this.deltaX;return this.wrappedX&&(r=r>180?r-360:r),r}latitudeAtY(e){let t=this.deltaY/2;return this.ymax-t-e*this.deltaY}randomize(e,t,r,s){e===void 0&&(e={});let o=Math.random()*(t||this.cols)|0,n=Math.random()*(r||this.rows)|0,l=s([o,n]);return l!==null?(e.x=l[0],e.y=l[1]):(e.x=this.longitudeAtX(o),e.y=this.latitudeAtY(n)),e}checkFields(){return this.isFields}},_u=pa;var da=class{constructor(e){this.options={},this.particles=[],this.ctx=e,this.animationLoop=void 0,this.animate=this.animate.bind(this)}_indexFor(e,t,r,s){return Math.max(0,Math.min(s.length-1,Math.round((e-t)/(r-t)*(s.length-1))))}_moveParticles(){if(!this.particles||!this.particles.length)return;let e=this.ctx.canvas.width,t=this.ctx.canvas.height,r=this.particles,s=this.options.maxAge,o=typeof this.options.velocityScale=="function"?this.options.velocityScale():this.options.velocityScale;for(let n=0;n<r.length;n++){let l=r[n];l.age>s&&(l.age=0,this.field.randomize(l,e,t,this.unProject));let h=l.x,c=l.y,p=this.field.interpolatedValueAt(h,c);if(p===null)l.age=s;else{let _=h+p.u*o,w=c+p.v*o;this.field.hasValueAt(_,w)?(l.xt=_,l.yt=w,l.m=p.m):(l.x=_,l.y=w,l.age=s)}l.age++}}_drawParticles(){if(!this.particles||!this.particles.length)return;let e=this.particles,t=this.ctx.globalCompositeOperation;this.ctx.globalCompositeOperation="destination-in",this.ctx.fillRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.globalCompositeOperation=t,this.ctx.globalAlpha=this.options.globalAlpha,this.ctx.fillStyle="rgba(0, 0, 0, "+this.options.globalAlpha+")",this.ctx.lineWidth=this.options.lineWidth?this.options.lineWidth:1,this.ctx.strokeStyle=this.options.colorScale?this.options.colorScale:"#fff";let r=0,s=e.length;if(this.field&&s>0){let o,n;if(this.options.minVelocity&&this.options.maxVelocity)o=this.options.minVelocity,n=this.options.maxVelocity;else{let l=this.field.range;o=l[0],n=l[1]}for(;r<s;r++)this[this.options.useCoordsDraw?"_drawCoordsParticle":"_drawPixelParticle"](e[r],o,n)}}_drawPixelParticle(e,t,r){let s=[e.x,e.y],o=[e.xt,e.yt],n=e.xt-e.x,l=e.yt-e.y;n*n+l*l>20*20||o&&s&&o[0]&&o[1]&&s[0]&&s[1]&&e.age<=this.options.maxAge&&this._drawStroke(s,o,e,t,r)}_drawCoordsParticle(e,t,r){let s=[e.x,e.y],o=[e.xt,e.yt];if(o&&s&&o[0]&&o[1]&&s[0]&&s[1]&&this.intersectsCoordinate(o)&&e.age<=this.options.maxAge){let n=this.project(s),l=this.project(o);this._drawStroke(n,l,e,t,r)}}_drawStroke(e,t,r,s,o){if(e&&t){if(this.ctx.beginPath(),this.ctx.moveTo(e[0],e[1]),this.ctx.lineTo(t[0],t[1]),typeof this.options.colorScale=="function")this.ctx.strokeStyle=this.options.colorScale(r.m);else if(Array.isArray(this.options.colorScale)){let n=this._indexFor(r.m,s,o,this.options.colorScale);this.ctx.strokeStyle=this.options.colorScale[n]}typeof this.options.lineWidth=="function"&&(this.ctx.lineWidth=this.options.lineWidth(r.m)),r.x=r.xt,r.y=r.yt,this.ctx.stroke()}}_prepareParticlePaths(){let e=this.ctx.canvas.width,t=this.ctx.canvas.height,r=typeof this.options.paths=="function"?this.options.paths(this):this.options.paths,s=[];if(!this.field)return[];for(let o=0;o<r;o++)s.push(this.field.randomize({age:Math.floor(Math.random()*this.options.maxAge)},e,t,this.unProject));return s}project(){throw new Error("project must be override")}unProject(){throw new Error("unProject must be override")}intersectsCoordinate(e){throw new Error("must be override")}prerender(){this.field&&(this.particles=this._prepareParticlePaths(),!this.starting&&!this.forceStop&&(this.starting=!0,this._then=Date.now(),this.animate()))}render(){return this._moveParticles(),this._drawParticles(),this}clearCanvas(){this.stop(),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.forceStop=!1}start(){this.starting=!0,this.forceStop=!1,this._then=Date.now(),this.animate()}stop(){cancelAnimationFrame(this.animationLoop),this.starting=!1,this.forceStop=!0}animate(){this.animationLoop&&cancelAnimationFrame(this.animationLoop),this.animationLoop=requestAnimationFrame(this.animate);let e=Date.now(),t=e-this._then;t>this.options.frameRate&&(this._then=e-t%this.options.frameRate,this.render())}setData(e){return this.field=e,this}setOptions(e){var t,r,s,o;return this.options=e,!((t=this.options)!=null&&t.maxAge)&&((r=this.options)!=null&&r.particleAge)&&(this.options.maxAge=Number(this.options.particleAge)),!((s=this.options)!=null&&s.paths)&&((o=this.options)!=null&&o.particleMultiplier)&&(this.options.paths=Math.round(this.options.width*this.options.height*Number(this.options.particleMultiplier))),this}},fu=da;var sE={globalAlpha:.9,lineWidth:1,colorScale:"#fff",velocityScale:1/25,maxAge:90,paths:800,frameRate:20,useCoordsDraw:!0,gpet:!0},ma=class extends S{constructor(e,t={}){super(e),this._options={...sE,...t},this._data=void 0,this._canvas=document.createElement("canvas"),this._state=m.INITIALIZED}get type(){return S.getLayerType("wind")}set show(e){this._show=e,this._canvas.style.visibility=e?"visible":"hidden"}get show(){return this._show}_formatData(e){let t,r;if(e.forEach(function(o){switch(o.header.parameterCategory+","+o.header.parameterNumber){case"1,2":case"2,2":t=o;break;case"1,3":case"2,3":r=o;break}}),!r||!t)return;let s=t.header;return new _u({xmin:s.lo1,ymin:s.la1,xmax:s.lo2,ymax:s.la2,deltaX:s.dx,deltaY:s.dy,cols:s.nx,rows:s.ny,us:t.data,vs:r.data})}_mountCanvas(){if(!this._viewer||!this._canvas)return;this._canvas.style.cssText="position:absolute; left:0; top:0;user-select:none;pointer-events: none;",this._canvas.className="dc-wind-layer";let{width:e,height:t}=this._viewer.canvas;this._canvas.width=e,this._canvas.height=t,this._canvas.style.width=e+"px",this._canvas.style.height=t+"px",this._viewer.layerContainer.appendChild(this._canvas)}_addedHook(){let e=this._viewer.scene,t=this._viewer.camera,r=i.Ellipsoid.WGS84;this._delegate.intersectsCoordinate=s=>{if(e.mode===i.SceneMode.SCENE3D){let o=new i.EllipsoidalOccluder(r,t.position),n=i.Cartesian3.fromDegrees(s[0],s[1]);return o.isPointVisible(n)}else if(e.mode===i.SceneMode.SCENE2D)return!(s[0]===-180||s[0]===180);return!0},this._delegate.project=s=>{let o=i.Cartesian3.fromDegrees(s[0],s[1]),n=i.SceneTransforms.worldToWindowCoordinates(e,o);return[n.x,n.y]},this._delegate.unProject=s=>{let o=new i.Cartesian2(s[0],s[1]),n;if(e.mode===i.SceneMode.SCENE3D?n=e.globe.pick(t.getPickRay(o),e):n=e.camera.pickEllipsoid(o,r),!n)return null;let l=r.cartesianToCartographic(n),h=i.Math.toDegrees(l.latitude);return[i.Math.toDegrees(l.longitude),h]}}_onAdd(e){this._viewer=e,this._mountCanvas();let t=this._canvas.getContext("2d");this._delegate||(this._delegate=new fu(t),this._delegate.setOptions(this._options),this._addedHook()),this._data&&(this._delegate.setData(this._data),this._delegate.prerender(),this._delegate.render())}_onRemove(){this._delegate&&this._delegate.stop(),this._canvas&&this._viewer.layerContainer.removeChild(this._canvas),delete this._canvas}setData(e,t){return e&&e.checkFields&&e.checkFields()?this._data=e:Array.isArray(e)&&(this._data=this._formatData(e)),this._delegate&&(this._delegate.setData(this._data),t&&(this._options={...this._options,...t},this._delegate.setOptions(this._options)),this._delegate.prerender(),this._delegate.render()),this}setOptions(e){return this._options={...this._options,...e},this._delegate&&(this._delegate.setOptions(this._options),this._delegate.prerender(),this._delegate.render()),this}};S.registerType("wind");var oE=ma;var gu=`/**
314
312
  * @license
315
313
  * Cellular noise ("Worley noise") in 2D in GLSL.
316
314
  * Copyright (c) Stefan Gustavson 2011-04-19. All rights reserved.
@@ -387,7 +385,7 @@ vec2 czm_cellular(vec2 P)
387
385
  d1.y = min(d1.y, d2.x); // F2 is in d1.y, we're done.
388
386
  return sqrt(d1.xy);
389
387
  }
390
- `;var rh=`/**
388
+ `;var yu=`/**
391
389
  * @license
392
390
  * Description : Array and textureless GLSL 2D/3D/4D simplex
393
391
  * noise functions.
@@ -669,7 +667,7 @@ float czm_snoise(vec4 v)
669
667
  return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))
670
668
  + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;
671
669
  }
672
- `;var sh=`uniform vec4 asphaltColor;
670
+ `;var vu=`uniform vec4 asphaltColor;
673
671
  uniform float bumpSize;
674
672
  uniform float roughness;
675
673
 
@@ -693,7 +691,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
693
691
 
694
692
  return material;
695
693
  }
696
- `;var oh=`uniform vec4 lightColor;
694
+ `;var wu=`uniform vec4 lightColor;
697
695
  uniform vec4 darkColor;
698
696
  uniform float frequency;
699
697
 
@@ -710,7 +708,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
710
708
 
711
709
  return material;
712
710
  }
713
- `;var ah=`uniform vec4 brickColor;
711
+ `;var Cu=`uniform vec4 brickColor;
714
712
  uniform vec4 mortarColor;
715
713
  uniform vec2 brickSize;
716
714
  uniform vec2 brickPct;
@@ -751,7 +749,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
751
749
 
752
750
  return material;
753
751
  }
754
- `;var nh=`uniform vec4 cementColor;
752
+ `;var Tu=`uniform vec4 cementColor;
755
753
  uniform float grainScale;
756
754
  uniform float roughness;
757
755
 
@@ -769,7 +767,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
769
767
 
770
768
  return material;
771
769
  }
772
- `;var lh=`uniform vec4 color;
770
+ `;var xu=`uniform vec4 color;
773
771
  uniform float time;
774
772
 
775
773
  czm_material czm_getMaterial(czm_materialInput materialInput){
@@ -790,7 +788,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
790
788
 
791
789
  return material;
792
790
  }
793
- `;var hh=`uniform vec4 lightColor;
791
+ `;var Eu=`uniform vec4 lightColor;
794
792
  uniform vec4 darkColor;
795
793
  uniform float frequency;
796
794
 
@@ -807,7 +805,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
807
805
 
808
806
  return material;
809
807
  }
810
- `;var ch=`czm_material czm_getMaterial(czm_materialInput materialInput){
808
+ `;var Pu=`czm_material czm_getMaterial(czm_materialInput materialInput){
811
809
  czm_material material = czm_getDefaultMaterial(materialInput);
812
810
 
813
811
  vec3 normalWC = normalize(czm_inverseViewRotation * material.normal);
@@ -818,7 +816,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
818
816
 
819
817
  return material;
820
818
  }
821
- `;var ph=`uniform vec4 grassColor;
819
+ `;var bu=`uniform vec4 grassColor;
822
820
  uniform vec4 dirtColor;
823
821
  uniform float patchiness;
824
822
 
@@ -845,7 +843,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
845
843
 
846
844
  return material;
847
845
  }
848
- `;var dh=`uniform samplerCube cubeMap;
846
+ `;var Su=`uniform samplerCube cubeMap;
849
847
 
850
848
  czm_material czm_getMaterial(czm_materialInput materialInput){
851
849
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -857,7 +855,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
857
855
 
858
856
  return material;
859
857
  }
860
- `;var mh=`uniform samplerCube cubeMap;
858
+ `;var Au=`uniform samplerCube cubeMap;
861
859
  uniform float indexOfRefractionRatio;
862
860
 
863
861
  czm_material czm_getMaterial(czm_materialInput materialInput){
@@ -870,7 +868,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
870
868
 
871
869
  return material;
872
870
  }
873
- `;var uh=`uniform vec4 lightColor;
871
+ `;var Mu=`uniform vec4 lightColor;
874
872
  uniform vec4 darkColor;
875
873
  uniform float frequency;
876
874
 
@@ -886,7 +884,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
886
884
 
887
885
  return material;
888
886
  }
889
- `;var _h=`uniform vec4 lightWoodColor;
887
+ `;var Iu=`uniform vec4 lightWoodColor;
890
888
  uniform vec4 darkWoodColor;
891
889
  uniform float ringFrequency;
892
890
  uniform vec2 noiseScale;
@@ -921,7 +919,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
921
919
 
922
920
  return material;
923
921
  }
924
- `;i.ShaderSource._czmBuiltinsAndUniforms.czm_cellular=ih;i.ShaderSource._czmBuiltinsAndUniforms.czm_snoise=rh;i.Material.AsphaltType="Asphalt";i.Material._materialCache.addMaterial(i.Material.AsphaltType,{fabric:{type:i.Material.AsphaltType,uniforms:{asphaltColor:new i.Color(.15,.15,.15,1),bumpSize:.02,roughness:.2},source:sh},translucent:function(n){return n.uniforms.asphaltColor.alpha<1}});i.Material.BlobType="Blob";i.Material._materialCache.addMaterial(i.Material.BlobType,{fabric:{type:i.Material.BlobType,uniforms:{lightColor:new i.Color(1,1,1,.5),darkColor:new i.Color(0,0,1,.5),frequency:10},source:oh},translucent:function(n){var e=n.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Material.BrickType="Brick";i.Material._materialCache.addMaterial(i.Material.BrickType,{fabric:{type:i.Material.BrickType,uniforms:{brickColor:new i.Color(.6,.3,.1,1),mortarColor:new i.Color(.8,.8,.7,1),brickSize:new i.Cartesian2(.3,.15),brickPct:new i.Cartesian2(.9,.85),brickRoughness:.2,mortarRoughness:.1},source:ah},translucent:function(n){var e=n.uniforms;return e.brickColor.alpha<1||e.mortarColor.alpha<1}});i.Material.CementType="Cement";i.Material._materialCache.addMaterial(i.Material.CementType,{fabric:{type:i.Material.CementType,uniforms:{cementColor:new i.Color(.95,.95,.85,1),grainScale:.01,roughness:.3},source:nh},translucent:function(n){return n.uniforms.cementColor.alpha<1}});i.Material.ErosionType="Erosion";i.Material._materialCache.addMaterial(i.Material.ErosionType,{fabric:{type:i.Material.ErosionType,uniforms:{color:new i.Color(1,0,0,.5),time:1},source:lh},translucent:function(n){return n.uniforms.color.alpha<1}});i.Material.FacetType="Facet";i.Material._materialCache.addMaterial(i.Material.FacetType,{fabric:{type:i.Material.FacetType,uniforms:{lightColor:new i.Color(.25,.25,.25,.75),darkColor:new i.Color(.75,.75,.75,.75),frequency:10},source:hh},translucent:function(n){var e=n.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Material.FresnelType="Fresnel";i.Material._materialCache.addMaterial(i.Material.FresnelType,{fabric:{type:i.Material.FresnelType,materials:{reflection:{type:i.Material.ReflectionType},refraction:{type:i.Material.RefractionType}},source:ch},translucent:!1});i.Material.GrassType="Grass";i.Material._materialCache.addMaterial(i.Material.GrassType,{fabric:{type:i.Material.GrassType,uniforms:{grassColor:new i.Color(.25,.4,.1,1),dirtColor:new i.Color(.1,.1,.1,1),patchiness:1.5},source:ph},translucent:function(n){var e=n.uniforms;return e.grassColor.alpha<1||e.dirtColor.alpha<1}});i.Material.ReflectionType="Reflection";i.Material._materialCache.addMaterial(i.Material.ReflectionType,{fabric:{type:i.Material.ReflectionType,uniforms:{cubeMap:i.Material.DefaultCubeMapId,channels:"rgb"},source:dh},translucent:!1});i.Material.RefractionType="Refraction";i.Material._materialCache.addMaterial(i.Material.RefractionType,{fabric:{type:i.Material.RefractionType,uniforms:{cubeMap:i.Material.DefaultCubeMapId,channels:"rgb",indexOfRefractionRatio:.9},source:mh},translucent:!1});i.Material.TyeDyeType="TieDye";i.Material._materialCache.addMaterial(i.Material.TyeDyeType,{fabric:{type:i.Material.TyeDyeType,uniforms:{lightColor:new i.Color(1,1,0,.75),darkColor:new i.Color(1,0,0,.75),frequency:5},source:uh},translucent:function(n){var e=n.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Material.WoodType="Wood";i.Material._materialCache.addMaterial(i.Material.WoodType,{fabric:{type:i.Material.WoodType,uniforms:{lightWoodColor:new i.Color(.6,.3,.1,1),darkWoodColor:new i.Color(.4,.2,.07,1),ringFrequency:3,noiseScale:new i.Cartesian2(.7,.5),grainFrequency:27},source:_h},translucent:function(n){let e=n.uniforms;return e.lightWoodColor.alpha<1||e.darkWoodColor.alpha<1}});var fh=`uniform vec4 color;
922
+ `;i.ShaderSource._czmBuiltinsAndUniforms.czm_cellular=gu;i.ShaderSource._czmBuiltinsAndUniforms.czm_snoise=yu;i.Material.AsphaltType="Asphalt";i.Material._materialCache.addMaterial(i.Material.AsphaltType,{fabric:{type:i.Material.AsphaltType,uniforms:{asphaltColor:new i.Color(.15,.15,.15,1),bumpSize:.02,roughness:.2},source:vu},translucent:function(a){return a.uniforms.asphaltColor.alpha<1}});i.Material.BlobType="Blob";i.Material._materialCache.addMaterial(i.Material.BlobType,{fabric:{type:i.Material.BlobType,uniforms:{lightColor:new i.Color(1,1,1,.5),darkColor:new i.Color(0,0,1,.5),frequency:10},source:wu},translucent:function(a){var e=a.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Material.BrickType="Brick";i.Material._materialCache.addMaterial(i.Material.BrickType,{fabric:{type:i.Material.BrickType,uniforms:{brickColor:new i.Color(.6,.3,.1,1),mortarColor:new i.Color(.8,.8,.7,1),brickSize:new i.Cartesian2(.3,.15),brickPct:new i.Cartesian2(.9,.85),brickRoughness:.2,mortarRoughness:.1},source:Cu},translucent:function(a){var e=a.uniforms;return e.brickColor.alpha<1||e.mortarColor.alpha<1}});i.Material.CementType="Cement";i.Material._materialCache.addMaterial(i.Material.CementType,{fabric:{type:i.Material.CementType,uniforms:{cementColor:new i.Color(.95,.95,.85,1),grainScale:.01,roughness:.3},source:Tu},translucent:function(a){return a.uniforms.cementColor.alpha<1}});i.Material.ErosionType="Erosion";i.Material._materialCache.addMaterial(i.Material.ErosionType,{fabric:{type:i.Material.ErosionType,uniforms:{color:new i.Color(1,0,0,.5),time:1},source:xu},translucent:function(a){return a.uniforms.color.alpha<1}});i.Material.FacetType="Facet";i.Material._materialCache.addMaterial(i.Material.FacetType,{fabric:{type:i.Material.FacetType,uniforms:{lightColor:new i.Color(.25,.25,.25,.75),darkColor:new i.Color(.75,.75,.75,.75),frequency:10},source:Eu},translucent:function(a){var e=a.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Material.FresnelType="Fresnel";i.Material._materialCache.addMaterial(i.Material.FresnelType,{fabric:{type:i.Material.FresnelType,materials:{reflection:{type:i.Material.ReflectionType},refraction:{type:i.Material.RefractionType}},source:Pu},translucent:!1});i.Material.GrassType="Grass";i.Material._materialCache.addMaterial(i.Material.GrassType,{fabric:{type:i.Material.GrassType,uniforms:{grassColor:new i.Color(.25,.4,.1,1),dirtColor:new i.Color(.1,.1,.1,1),patchiness:1.5},source:bu},translucent:function(a){var e=a.uniforms;return e.grassColor.alpha<1||e.dirtColor.alpha<1}});i.Material.ReflectionType="Reflection";i.Material._materialCache.addMaterial(i.Material.ReflectionType,{fabric:{type:i.Material.ReflectionType,uniforms:{cubeMap:i.Material.DefaultCubeMapId,channels:"rgb"},source:Su},translucent:!1});i.Material.RefractionType="Refraction";i.Material._materialCache.addMaterial(i.Material.RefractionType,{fabric:{type:i.Material.RefractionType,uniforms:{cubeMap:i.Material.DefaultCubeMapId,channels:"rgb",indexOfRefractionRatio:.9},source:Au},translucent:!1});i.Material.TyeDyeType="TieDye";i.Material._materialCache.addMaterial(i.Material.TyeDyeType,{fabric:{type:i.Material.TyeDyeType,uniforms:{lightColor:new i.Color(1,1,0,.75),darkColor:new i.Color(1,0,0,.75),frequency:5},source:Mu},translucent:function(a){var e=a.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Material.WoodType="Wood";i.Material._materialCache.addMaterial(i.Material.WoodType,{fabric:{type:i.Material.WoodType,uniforms:{lightWoodColor:new i.Color(.6,.3,.1,1),darkWoodColor:new i.Color(.4,.2,.07,1),ringFrequency:3,noiseScale:new i.Cartesian2(.7,.5),grainFrequency:27},source:Iu},translucent:function(a){let e=a.uniforms;return e.lightWoodColor.alpha<1||e.darkWoodColor.alpha<1}});var Du=`uniform vec4 color;
925
923
  uniform float speed;
926
924
  czm_material czm_getMaterial(czm_materialInput materialInput){
927
925
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -938,7 +936,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
938
936
  material.diffuse = color.rgb * a * 3.0;
939
937
  return material;
940
938
  }
941
- `;var gh=`uniform vec4 color;
939
+ `;var Lu=`uniform vec4 color;
942
940
  uniform float speed;
943
941
 
944
942
  vec3 circlePing(float r, float innerTail, float frontierBorder, float timeResetSeconds, float radarPingSpeed, float fadeDistance){
@@ -962,7 +960,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
962
960
  material.diffuse = flagColor.rgb;
963
961
  return material;
964
962
  }
965
- `;var yh=`uniform vec4 color;
963
+ `;var Ru=`uniform vec4 color;
966
964
  uniform float speed;
967
965
 
968
966
  czm_material czm_getMaterial(czm_materialInput materialInput){
@@ -978,7 +976,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
978
976
  }
979
977
  return material;
980
978
  }
981
- `;var vh=`uniform vec4 color;
979
+ `;var Ou=`uniform vec4 color;
982
980
  uniform float speed;
983
981
  czm_material czm_getMaterial(czm_materialInput materialInput){
984
982
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -994,7 +992,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
994
992
  material.diffuse = color.rgb * d;
995
993
  return material;
996
994
  }
997
- `;var wh=`uniform vec4 color;
995
+ `;var ku=`uniform vec4 color;
998
996
  czm_material czm_getMaterial(czm_materialInput materialInput){
999
997
  czm_material material = czm_getDefaultMaterial(materialInput);
1000
998
  vec2 st = materialInput.st;
@@ -1011,7 +1009,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1011
1009
  material.alpha = pow(alpha, 4.0);
1012
1010
  return material;
1013
1011
  }
1014
- `;var Th=`uniform vec4 color;
1012
+ `;var zu=`uniform vec4 color;
1015
1013
  uniform sampler2D image;
1016
1014
  czm_material czm_getMaterial(czm_materialInput materialInput){
1017
1015
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -1029,7 +1027,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1029
1027
  material.alpha = colorImage.a * pow(length, 0.5);
1030
1028
  return material;
1031
1029
  }
1032
- `;var Ch=`uniform vec4 color;
1030
+ `;var Fu=`uniform vec4 color;
1033
1031
  uniform float speed;
1034
1032
 
1035
1033
  float circle(vec2 uv, float r, float blur) {
@@ -1055,7 +1053,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
1055
1053
  material.alpha *= color.a;
1056
1054
  return material;
1057
1055
  }
1058
- `;var xh=`uniform vec4 color;
1056
+ `;var Hu=`uniform vec4 color;
1059
1057
  uniform float speed;
1060
1058
 
1061
1059
  #define PI 3.14159265359
@@ -1079,7 +1077,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1079
1077
  material.diffuse = color.rgb * a * b * 3.0;
1080
1078
  return material;
1081
1079
  }
1082
- `;var Eh=`uniform vec4 color;
1080
+ `;var Nu=`uniform vec4 color;
1083
1081
  uniform float speed;
1084
1082
 
1085
1083
  czm_material czm_getMaterial(czm_materialInput materialInput){
@@ -1097,7 +1095,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1097
1095
  material.diffuse = fragColor * (inten1 + inten2);
1098
1096
  return material;
1099
1097
  }
1100
- `;var Ph=`uniform vec4 color;
1098
+ `;var Wu=`uniform vec4 color;
1101
1099
  uniform float speed;
1102
1100
  uniform float count;
1103
1101
  uniform float gradient;
@@ -1145,7 +1143,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
1145
1143
  return material;
1146
1144
  }
1147
1145
 
1148
- `;i.Material.CircleBlurType="CircleBlur";i.Material._materialCache.addMaterial(i.Material.CircleBlurType,{fabric:{type:i.Material.CircleBlurType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:fh},translucent:function(n){return!0}});i.Material.CircleDiffuseType="CircleDiffuse";i.Material._materialCache.addMaterial(i.Material.CircleDiffuseType,{fabric:{type:i.Material.CircleDiffuseType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:gh},translucent:function(n){return!0}});i.Material.CircleFadeType="CircleFade";i.Material._materialCache.addMaterial(i.Material.CircleFadeType,{fabric:{type:i.Material.CircleFadeType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:yh},translucent:function(n){return!0}});i.Material.CirclePulseType="CirclePulse";i.Material._materialCache.addMaterial(i.Material.CirclePulseType,{fabric:{type:i.Material.CirclePulseType,uniforms:{color:new i.Color(1,0,0,.7),speed:12},source:vh},translucent:function(n){return!0}});i.Material.CircleRingType="CircleRing";i.Material._materialCache.addMaterial(i.Material.CircleRingType,{fabric:{type:i.Material.CircleRingType,uniforms:{color:new i.Color(1,0,0,.7)},source:wh},translucent:function(n){return!0}});i.Material.CircleRotateType="CircleRotate";i.Material._materialCache.addMaterial(i.Material.CircleRotateType,{fabric:{type:i.Material.CircleRotateType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId},source:Th},translucent:function(n){return!0}});i.Material.CircleScanType="CircleScan";i.Material._materialCache.addMaterial(i.Material.CircleScanType,{fabric:{type:i.Material.CircleScanType,uniforms:{color:new i.Color(1,0,0,.7),speed:1},source:Ch},translucent:function(n){return!0}});i.Material.CircleSpiralType="CircleSpiral";i.Material._materialCache.addMaterial(i.Material.CircleSpiralType,{fabric:{type:i.Material.CircleSpiralType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:xh},translucent:function(n){return!0}});i.Material.CircleVaryType="CircleVary";i.Material._materialCache.addMaterial(i.Material.CircleVaryType,{fabric:{type:i.Material.CircleVaryType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Eh},translucent:function(n){return!0}});i.Material.CircleWaveType="CircleWave";i.Material._materialCache.addMaterial(i.Material.CircleWaveType,{fabric:{type:i.Material.CircleWaveType,uniforms:{color:new i.Color(1,0,0,.7),speed:3,count:1,gradient:.1},source:Ph},translucent:function(n){return!0}});var bh=`uniform vec4 color;
1146
+ `;i.Material.CircleBlurType="CircleBlur";i.Material._materialCache.addMaterial(i.Material.CircleBlurType,{fabric:{type:i.Material.CircleBlurType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Du},translucent:function(a){return!0}});i.Material.CircleDiffuseType="CircleDiffuse";i.Material._materialCache.addMaterial(i.Material.CircleDiffuseType,{fabric:{type:i.Material.CircleDiffuseType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Lu},translucent:function(a){return!0}});i.Material.CircleFadeType="CircleFade";i.Material._materialCache.addMaterial(i.Material.CircleFadeType,{fabric:{type:i.Material.CircleFadeType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Ru},translucent:function(a){return!0}});i.Material.CirclePulseType="CirclePulse";i.Material._materialCache.addMaterial(i.Material.CirclePulseType,{fabric:{type:i.Material.CirclePulseType,uniforms:{color:new i.Color(1,0,0,.7),speed:12},source:Ou},translucent:function(a){return!0}});i.Material.CircleRingType="CircleRing";i.Material._materialCache.addMaterial(i.Material.CircleRingType,{fabric:{type:i.Material.CircleRingType,uniforms:{color:new i.Color(1,0,0,.7)},source:ku},translucent:function(a){return!0}});i.Material.CircleRotateType="CircleRotate";i.Material._materialCache.addMaterial(i.Material.CircleRotateType,{fabric:{type:i.Material.CircleRotateType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId},source:zu},translucent:function(a){return!0}});i.Material.CircleScanType="CircleScan";i.Material._materialCache.addMaterial(i.Material.CircleScanType,{fabric:{type:i.Material.CircleScanType,uniforms:{color:new i.Color(1,0,0,.7),speed:1},source:Fu},translucent:function(a){return!0}});i.Material.CircleSpiralType="CircleSpiral";i.Material._materialCache.addMaterial(i.Material.CircleSpiralType,{fabric:{type:i.Material.CircleSpiralType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Hu},translucent:function(a){return!0}});i.Material.CircleVaryType="CircleVary";i.Material._materialCache.addMaterial(i.Material.CircleVaryType,{fabric:{type:i.Material.CircleVaryType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Nu},translucent:function(a){return!0}});i.Material.CircleWaveType="CircleWave";i.Material._materialCache.addMaterial(i.Material.CircleWaveType,{fabric:{type:i.Material.CircleWaveType,uniforms:{color:new i.Color(1,0,0,.7),speed:3,count:1,gradient:.1},source:Wu},translucent:function(a){return!0}});var Gu=`uniform vec4 color;
1149
1147
  czm_material czm_getMaterial(czm_materialInput materialInput){
1150
1148
  czm_material material = czm_getDefaultMaterial(materialInput);
1151
1149
  vec2 st = materialInput.st;
@@ -1156,7 +1154,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1156
1154
  material.alpha = temp.a;
1157
1155
  return material;
1158
1156
  }
1159
- `;var Sh=`uniform vec4 color;
1157
+ `;var Uu=`uniform vec4 color;
1160
1158
  uniform sampler2D image;
1161
1159
  czm_material czm_getMaterial(czm_materialInput materialInput){
1162
1160
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -1172,7 +1170,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1172
1170
  material.alpha = alpha * pow(1. - st.t,color.a);
1173
1171
  return material;
1174
1172
  }
1175
- `;i.Material.CylinderFadeType="CylinderFade";i.Material._materialCache.addMaterial(i.Material.CylinderFadeType,{fabric:{type:i.Material.CylinderFadeType,uniforms:{color:new i.Color(1,0,0,.7)},source:bh},translucent:function(n){return!0}});i.Material.CylinderParticlesType="CylinderParticles";i.Material._materialCache.addMaterial(i.Material.CylinderParticlesType,{fabric:{type:i.Material.CylinderParticlesType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId},source:Sh},translucent:function(n){return!0}});var Ih=`uniform vec4 color;
1173
+ `;i.Material.CylinderFadeType="CylinderFade";i.Material._materialCache.addMaterial(i.Material.CylinderFadeType,{fabric:{type:i.Material.CylinderFadeType,uniforms:{color:new i.Color(1,0,0,.7)},source:Gu},translucent:function(a){return!0}});i.Material.CylinderParticlesType="CylinderParticles";i.Material._materialCache.addMaterial(i.Material.CylinderParticlesType,{fabric:{type:i.Material.CylinderParticlesType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId},source:Uu},translucent:function(a){return!0}});var Bu=`uniform vec4 color;
1176
1174
  uniform float speed;
1177
1175
 
1178
1176
  #define pi 3.1415926535
@@ -1250,7 +1248,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
1250
1248
  material.alpha = temp.a * 2.0;
1251
1249
  return material;
1252
1250
  }
1253
- `;var Mh=`uniform vec4 color;
1251
+ `;var Vu=`uniform vec4 color;
1254
1252
  uniform float speed;
1255
1253
  czm_material czm_getMaterial(czm_materialInput materialInput){
1256
1254
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -1262,7 +1260,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1262
1260
  material.diffuse = color.rgb;
1263
1261
  return material;
1264
1262
  }
1265
- `;i.Material.EllipsoidElectricType="EllipsoidElectric";i.Material._materialCache.addMaterial(i.Material.EllipsoidElectricType,{fabric:{type:i.Material.EllipsoidElectricType,uniforms:{color:new i.Color(1,0,0,.7),speed:1},source:Ih},translucent:function(n){return!0}});i.Material.EllipsoidTrailType="EllipsoidTrail";i.Material._materialCache.addMaterial(i.Material.EllipsoidTrailType,{fabric:{type:i.Material.EllipsoidTrailType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Mh},translucent:function(n){return!0}});var Ah=`uniform vec4 color;
1263
+ `;i.Material.EllipsoidElectricType="EllipsoidElectric";i.Material._materialCache.addMaterial(i.Material.EllipsoidElectricType,{fabric:{type:i.Material.EllipsoidElectricType,uniforms:{color:new i.Color(1,0,0,.7),speed:1},source:Bu},translucent:function(a){return!0}});i.Material.EllipsoidTrailType="EllipsoidTrail";i.Material._materialCache.addMaterial(i.Material.EllipsoidTrailType,{fabric:{type:i.Material.EllipsoidTrailType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Vu},translucent:function(a){return!0}});var ju=`uniform vec4 color;
1266
1264
  uniform float speed;
1267
1265
  czm_material czm_getMaterial(czm_materialInput materialInput){
1268
1266
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -1273,7 +1271,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1273
1271
  material.alpha = color.a * scalar ;
1274
1272
  return material;
1275
1273
  }
1276
- `;var Dh=`uniform vec4 color;
1274
+ `;var qu=`uniform vec4 color;
1277
1275
  uniform float speed;
1278
1276
  uniform float percent;
1279
1277
  uniform float gradient;
@@ -1289,7 +1287,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1289
1287
  material.alpha = alpha;
1290
1288
  return material;
1291
1289
  }
1292
- `;var Lh=`uniform sampler2D image;
1290
+ `;var Yu=`uniform sampler2D image;
1293
1291
  uniform float speed;
1294
1292
  uniform vec4 color;
1295
1293
  uniform vec2 repeat;
@@ -1311,7 +1309,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1311
1309
  }
1312
1310
  return material;
1313
1311
  }
1314
- `;var Rh=`uniform sampler2D image;
1312
+ `;var Zu=`uniform sampler2D image;
1315
1313
  uniform vec4 color;
1316
1314
  czm_material czm_getMaterial(czm_materialInput materialInput){
1317
1315
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -1322,7 +1320,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1322
1320
  material.diffuse = max(fragColor.rgb + colorImage.rgb , fragColor.rgb);
1323
1321
  return material;
1324
1322
  }
1325
- `;var Oh=`uniform sampler2D image;
1323
+ `;var Xu=`uniform sampler2D image;
1326
1324
  uniform vec4 color;
1327
1325
  uniform float speed;
1328
1326
  czm_material czm_getMaterial(czm_materialInput materialInput){
@@ -1343,7 +1341,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1343
1341
  }
1344
1342
  return material;
1345
1343
  }
1346
- `;var kh=`uniform vec4 color;
1344
+ `;var Ju=`uniform vec4 color;
1347
1345
  uniform float speed;
1348
1346
 
1349
1347
  czm_material czm_getMaterial(czm_materialInput materialInput){
@@ -1354,7 +1352,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1354
1352
  material.alpha = color.a * fract(st.s-time);
1355
1353
  return material;
1356
1354
  }
1357
- `;i.Material.PolylineFlickerType="PolylineFlicker";i.Material._materialCache.addMaterial(i.Material.PolylineFlickerType,{fabric:{type:i.Material.PolylineFlickerType,uniforms:{color:new i.Color(1,0,0,.7),speed:1},source:Ah},translucent:function(n){return!0}});i.Material.PolylineFlowType="PolylineFlow";i.Material._materialCache.addMaterial(i.Material.PolylineFlowType,{fabric:{type:i.Material.PolylineFlowType,uniforms:{color:new i.Color(1,0,0,.7),speed:1,percent:.03,gradient:.1},source:Dh},translucent:function(n){return!0}});i.Material.PolylineImageTrailType="PolylineImageTrail";i.Material._materialCache.addMaterial(i.Material.PolylineImageTrailType,{fabric:{type:i.Material.PolylineImageTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,speed:1,repeat:new i.Cartesian2(1,1)},source:Lh},translucent:function(n){return!0}});i.Material.PolylineLightingType="PolylineLighting";i.Material._materialCache.addMaterial(i.Material.PolylineLightingType,{fabric:{type:i.Material.PolylineLightingType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId},source:Rh},translucent:function(n){return!0}});i.Material.PolylineLightingTrailType="PolylineLightingTrail";i.Material._materialCache.addMaterial(i.Material.PolylineLightingTrailType,{fabric:{type:i.Material.PolylineLightingTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,speed:3},source:Oh},translucent:function(n){return!0}});i.Material.PolylineTrailType="PolylineTrail";i.Material._materialCache.addMaterial(i.Material.PolylineTrailType,{fabric:{type:i.Material.PolylineTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,speed:1,repeat:new i.Cartesian2(1,1)},source:kh},translucent:function(n){return!0}});var Fh=`uniform vec4 color;
1355
+ `;i.Material.PolylineFlickerType="PolylineFlicker";i.Material._materialCache.addMaterial(i.Material.PolylineFlickerType,{fabric:{type:i.Material.PolylineFlickerType,uniforms:{color:new i.Color(1,0,0,.7),speed:1},source:ju},translucent:function(a){return!0}});i.Material.PolylineFlowType="PolylineFlow";i.Material._materialCache.addMaterial(i.Material.PolylineFlowType,{fabric:{type:i.Material.PolylineFlowType,uniforms:{color:new i.Color(1,0,0,.7),speed:1,percent:.03,gradient:.1},source:qu},translucent:function(a){return!0}});i.Material.PolylineImageTrailType="PolylineImageTrail";i.Material._materialCache.addMaterial(i.Material.PolylineImageTrailType,{fabric:{type:i.Material.PolylineImageTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,speed:1,repeat:new i.Cartesian2(1,1)},source:Yu},translucent:function(a){return!0}});i.Material.PolylineLightingType="PolylineLighting";i.Material._materialCache.addMaterial(i.Material.PolylineLightingType,{fabric:{type:i.Material.PolylineLightingType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId},source:Zu},translucent:function(a){return!0}});i.Material.PolylineLightingTrailType="PolylineLightingTrail";i.Material._materialCache.addMaterial(i.Material.PolylineLightingTrailType,{fabric:{type:i.Material.PolylineLightingTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,speed:3},source:Xu},translucent:function(a){return!0}});i.Material.PolylineTrailType="PolylineTrail";i.Material._materialCache.addMaterial(i.Material.PolylineTrailType,{fabric:{type:i.Material.PolylineTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,speed:1,repeat:new i.Cartesian2(1,1)},source:Ju},translucent:function(a){return!0}});var Ku=`uniform vec4 color;
1358
1356
  uniform float speed;
1359
1357
 
1360
1358
  czm_material czm_getMaterial(czm_materialInput materialInput){
@@ -1378,7 +1376,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1378
1376
  material.diffuse = col * 3.0 ;
1379
1377
  return material;
1380
1378
  }
1381
- `;var zh=`uniform vec4 color;
1379
+ `;var Qu=`uniform vec4 color;
1382
1380
  uniform float speed;
1383
1381
 
1384
1382
  #define PI 3.14159265359
@@ -1410,7 +1408,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1410
1408
  material.diffuse = (0.5 + pow(angle, 2.0) * falloff ) * color.rgb ;
1411
1409
  return material;
1412
1410
  }
1413
- `;var Hh=`uniform vec4 color;
1411
+ `;var $u=`uniform vec4 color;
1414
1412
  uniform float speed;
1415
1413
 
1416
1414
  #define PI 3.14159265359
@@ -1437,7 +1435,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1437
1435
  material.diffuse = flagColor * 3.0;
1438
1436
  return material;
1439
1437
  }
1440
- `;i.Material.RadarLineType="RadarLine";i.Material._materialCache.addMaterial(i.Material.RadarLineType,{fabric:{type:i.Material.RadarLineType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Fh},translucent:function(n){return!0}});i.Material.RadarSweepType="RadarSweep";i.Material._materialCache.addMaterial(i.Material.RadarSweepType,{fabric:{type:i.Material.RadarSweepType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:zh},translucent:function(n){return!0}});i.Material.RadarWaveType="RadarWave";i.Material._materialCache.addMaterial(i.Material.RadarWaveType,{fabric:{type:i.Material.RadarWaveType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Hh},translucent:function(n){return!0}});var Nh=`uniform vec4 color;
1438
+ `;i.Material.RadarLineType="RadarLine";i.Material._materialCache.addMaterial(i.Material.RadarLineType,{fabric:{type:i.Material.RadarLineType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Ku},translucent:function(a){return!0}});i.Material.RadarSweepType="RadarSweep";i.Material._materialCache.addMaterial(i.Material.RadarSweepType,{fabric:{type:i.Material.RadarSweepType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Qu},translucent:function(a){return!0}});i.Material.RadarWaveType="RadarWave";i.Material._materialCache.addMaterial(i.Material.RadarWaveType,{fabric:{type:i.Material.RadarWaveType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:$u},translucent:function(a){return!0}});var e_=`uniform vec4 color;
1441
1439
  czm_material czm_getMaterial(czm_materialInput materialInput){
1442
1440
  czm_material material = czm_getDefaultMaterial(materialInput);
1443
1441
  vec2 st = materialInput.st;
@@ -1445,7 +1443,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1445
1443
  material.alpha = color.a * (1.0-fract(st.t)) * 0.8;
1446
1444
  return material;
1447
1445
  }
1448
- `;var Wh=`uniform sampler2D image;
1446
+ `;var t_=`uniform sampler2D image;
1449
1447
  uniform vec4 color;
1450
1448
  uniform float speed;
1451
1449
  uniform vec2 repeat;
@@ -1458,7 +1456,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1458
1456
  material.diffuse = colorImage.rgb * color.rgb * 3.0 ;
1459
1457
  return material;
1460
1458
  }
1461
- `;var Gh=`uniform sampler2D image;
1459
+ `;var i_=`uniform sampler2D image;
1462
1460
  uniform float speed;
1463
1461
  uniform vec4 color;
1464
1462
  uniform vec2 repeat;
@@ -1474,7 +1472,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1474
1472
  material.emission = max(color.rgb * material.alpha * 1.5, color.rgb);
1475
1473
  return material;
1476
1474
  }
1477
- `;var Uh=` uniform sampler2D image;
1475
+ `;var r_=` uniform sampler2D image;
1478
1476
  uniform float speed;
1479
1477
  uniform vec4 color;
1480
1478
 
@@ -1492,7 +1490,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
1492
1490
  }
1493
1491
  return material;
1494
1492
  }
1495
- `;i.Material.WallDiffuseType="WallDiffuse";i.Material._materialCache.addMaterial(i.Material.WallDiffuseType,{fabric:{type:i.Material.WallDiffuseType,uniforms:{color:new i.Color(1,0,0,.7)},source:Nh},translucent:function(n){return!0}});i.Material.WallImageTrailType="WallImageTrail";i.Material._materialCache.addMaterial(i.Material.WallImageTrailType,{fabric:{type:i.Material.WallImageTrailType,uniforms:{image:i.Material.DefaultImageId,color:new i.Color(1,0,0,.7),speed:3,repeat:new i.Cartesian2(1,1)},source:Wh},translucent:function(n){return!0}});i.Material.WallLineTrailType="WallLineTrail";i.Material._materialCache.addMaterial(i.Material.WallLineTrailType,{fabric:{type:i.Material.WallLineTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,repeat:new i.Cartesian2(1,1),speed:3},source:Gh},translucent:function(n){return!0}});i.Material.WallTrailType="WallTrail";i.Material._materialCache.addMaterial(i.Material.WallTrailType,{fabric:{type:i.Material.WallTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,speed:1},source:Uh},translucent:function(n){return!0}});var io=class{constructor(e={}){this._definitionChanged=new i.Event,this._color=void 0,this._colorSubscription=void 0,this._speed=void 0,this._speedSubscription=void 0,this.color=e.color||i.Color.fromBytes(0,255,255,255),this.speed=e.speed||1}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return null}getValue(e,t){return t=i.defaultValue(t,{}),t}equals(e){return this===e}},D=io;var Ct=class n extends D{constructor(e={}){super(e)}getType(e){return i.Material.CircleBlurType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ct.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Bh=Ct;var xt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Material.CircleDiffuseType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(xt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Vh=xt;var Et=class n extends D{constructor(e={}){super(e)}getType(e){return i.Material.CircleFadeType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Et.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var jh=Et;var Pt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Material.CirclePulseType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Pt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Yh=Pt;var bt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Material.CircleScanType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(bt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Zh=bt;var St=class n extends D{constructor(e={}){super(e)}getType(e){return i.Material.CircleSpiralType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(St.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var qh=St;var It=class n extends D{constructor(e={}){super(e)}getType(e){return i.Material.CircleVaryType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(It.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Xh=It;var Mt=class n extends D{constructor(e={}){super(e),this.count=Math.max(e.count||3,1),this.gradient=i.Math.clamp(e.gradient||.1,0,1)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return i.Material.CircleWaveType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t.count=i.Property.getValueOrUndefined(this._count,e),t.gradient=i.Property.getValueOrUndefined(this._gradient,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Mt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Jh=Mt;var At=class n extends D{constructor(e={}){super(e)}getType(e){return i.Material.EllipsoidElectricType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(At.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Kh=At;var Dt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Material.EllipsoidTrailType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Dt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Qh=Dt;var Lt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Material.PolylineFlickerType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Lt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var $h=Lt;var Rt=class n extends D{constructor(e={}){super(e),this._percent=void 0,this._percentSubscription=void 0,this._gradient=void 0,this._gradientSubscription=void 0,this.percent=e.percent||.03,this.gradient=e.gradient||.1}getType(e){return i.Material.PolylineFlowType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t.percent=i.Property.getValueOrUndefined(this._percent,e),t.gradient=i.Property.getValueOrUndefined(this._gradient,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)&&i.Property.equals(this._percent,e._percent)&&i.Property.equals(this._gradient,e._gradient)}};Object.defineProperties(Rt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),percent:i.createPropertyDescriptor("percent"),gradient:i.createPropertyDescriptor("gradient")});var ec=Rt;var Ot=class n extends D{constructor(e={}){var t,r;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=e.image,this.repeat=new i.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Material.PolylineImageTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.repeat=i.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._image,e._image)&&i.Property.equals(this._repeat,e._repeat)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ot.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),image:i.createPropertyDescriptor("image"),repeat:i.createPropertyDescriptor("repeat")});var tc=Ot;var kt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAACYCAYAAACS0lH9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAJ0GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgMTE2LjE2NDY1NSwgMjAyMS8wMS8yNi0xNTo0MToyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnR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o5AgAAAr5EiAAFFIAAKCQOwAAUEgBAIBCk+TVdQgAYNckeXMdAgDYNUneXocAAHZNkvfXIQCAXZPkv+sQAMCuSfLvdQgAYNckeXcdAgDY5RIgABSaJK+vQwAAu/wWAAAUmiRP1yEAgF2T5HEdAgDYNUl+XocAAHZNkm/XIQCAXZPky3UIAGDXJPl8HQIA2DVJPl6HAAB2TZIP1yEAgF2T5NN1CABgl0uAAFBokny9DgEA7Jok369DAAC7JsmP6xAAwC4FAAAK+S0AACikAABAoUny6zoEALDLHQAAKKQAAEAhRwAAUGiS/L4OAQDsUgAAoJAjAAAopAAAQKFJ8v91CABgly8BAkChSfK4DgEA7PIWAAAUsgAAQCFvAQBAIQsAABRSAACgkEuAAFDo+ToAALDPlwABoJACAACFFAAAKOQtAAAoZAEAgEIWAAAopAAAQCEFAAAKuQMAAIUsAABQyKeAAaCQBQAACrkDAACFHAEAQCELAAAUsgAAQCELAAAUsgAAQCELAAAUsgAAQCEFAAAKOQIAgEIWAAAo5LcAAKCQAgAAhRwBAEAhCwAAFLIAAEAhCwAAFLIAAEAhBQAACvkSIAAUsgAAQCEFAAAKKQAAUMhrgABQyAIAAIUUAAAo5AgAAApZAACgkAIAAIUUAAAo5A4AABT6A6gaPQ6/wRIfAAAAAElFTkSuQmCC";var Ft=class n extends D{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=kt}getType(e){return i.Material.PolylineLightingType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._image,e._image)}};Object.defineProperties(Ft.prototype,{color:i.createPropertyDescriptor("color"),image:i.createPropertyDescriptor("image")});var ic=Ft;var zt=class n extends D{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=kt}getType(e){return i.Material.PolylineLightingTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(zt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),image:i.createPropertyDescriptor("image")});var rc=zt;var Ht=class n extends D{constructor(e={}){super(e)}getType(e){return i.Material.PolylineTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=this._speed,t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ht.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var sc=Ht;var Nt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Material.RadarLineType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Nt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var oc=Nt;var Wt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Material.RadarSweepType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Wt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var ac=Wt;var Gt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Material.RadarWaveType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Gt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var nc=Gt;var Ut=class n extends D{constructor(e={}){var t,r;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=e.image,this.repeat=new i.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Material.WallImageTrailType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.repeat=i.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._image,e._image)&&i.Property.equals(this._repeat,e._repeat)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ut.prototype,{image:i.createPropertyDescriptor("image"),color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),repeat:i.createPropertyDescriptor("repeat")});var lc=Ut;var hc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAABACAYAAABWdc94AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGx2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgMTE2LjE2NDY1NSwgMjAyMS8wMS8yNi0xNTo0MToyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZj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ABHBBYgILkBkzYx9RoDAmpnn9BEAN/BSAIgILkBEcAEiggsQEVyAiOACRAQXICK4ABHBBYgILkBEcAEiggsQEVyAiOACRAQXIGKAHCBigBwg4qUAEBFcgIjgAkQEFyAiuAARwQWICC5ARHABIoILEBFcgIjgAkQEFyAiuAARwQWI2MMFiNjDBYh4KQBEBBcgIrgAEcEFiAguQERwASKCCxARXICI4AJEBBcgIrgAEcEFiAguQERwASIfRmAGiWTgoMYAAAAASUVORK5CYII=";var Bt=class n extends D{constructor(e={}){var t,r;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=hc,this.repeat=new i.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Material.WallLineTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.repeat=i.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)&&i.Property.equals(this._repeat,e._repeat)}};Object.defineProperties(Bt.prototype,{color:i.createPropertyDescriptor("color"),image:i.createPropertyDescriptor("image"),repeat:i.createPropertyDescriptor("repeat"),speed:i.createPropertyDescriptor("speed")});var cc=Bt;var pc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAOhlWElmTU0AKgAAAAgABgESAAMAAAABAAEAAAEaAAUAAAABAAAAVgEbAAUAAAABAAAAXgExAAIAAAAkAAAAZgEyAAIAAAAUAAAAiodpAAQAAAABAAAAngAAAAAAAABIAAAAAQAAAEgAAAABQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKE1hY2ludG9zaCkAMjAxODoxMDoyNiAxNTozMDozNAAABJAEAAIAAAAUAAAA1KABAAMAAAABAAEAAK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ngLjgvAVRrK0T4xslIj8yqbcLXbCaBrfY2K2NjlsQUO4kbMr6HPrp7H8bVn8VbeA//DSDvnb4M+SqsQx5/ClAvhTV6fG7yj61La27049IQdbnxqVeGGisFqhuDTAoenAV0V2xMG6LNWBNPP0nfXO5w/UPnDnALuGo+b2TfU3wnlzvpI3pkWBmuHPTJKhuDadU2XhBjDy6KNVdEa9FeY8fFGQ9d8tTGIY15/jDCyB0QoIVLBoTkgtdg7gM1n/oTF/DdySCQBaY4eMYDi+wJ6oRrNMWKU0HyxugOiFqTeu3KA43Nm92QdovX93YT9KmIwr+OanD7I6b+cHQJ5OlbNLhvQWJb86+gA8Z1F22SqqMbriyd+gBGmYKJm90jP/wizzj3gcNmve/5HYDgDsgHkJkoxdsIx6Mz2P8kfIAn2a9iBUDaw0+fi2FF2KppXpz0sdgxbgzCjjvxt01/dXCLj957oO/A2QEYvf7tpFsgLCgG/w9NjGZycTU0MdXlJD/H5hbjUQg+G2PssYuLXvvowwdfn8AH23cBbfrnH43yc5ixj0Fv1TpIiJ+SXZbvOBu/xRBX2WzzhDHBFmKolcu6dtdw9WB8srVP3IlXngN28cvgLl6uf4Gl/F2AidwB6pzMuWC7EUm89gOTiU+cjicN1i+vW80tp3ITbJw0RR/IE+J6KkyzMlZuLsUMHrZ8yo9YMeBrjMQezPoW4CWgYYpJ5a7aSfp1cvitOyfo27JTbIRFdHAaBhObskmLG0zYyOoO04IY1zy13TcKnR3Q5lMA2MuHfxp75VN4LgOi4ZNtf74MOUnIwCWDV/5e7uSlkbfCcRMuH2yrvBRlLgcO9xXqjIP/9lUeTLjFI3z8F+ualIvlptDJAAAAAElFTkSuQmCC";var Vt=class n extends D{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=pc}getType(e){return i.Material.WallTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Vt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),image:i.createPropertyDescriptor("image")});var dc=Vt;var jt=class n{constructor(e){e=e||{},this._definitionChanged=new i.Event,this._baseWaterColor=void 0,this._baseWaterColorSubscription=void 0,this.baseWaterColor=e.baseWaterColor||new i.Color(.2,.3,.6,1),this._blendColor=void 0,this._blendColorSubscription=void 0,this.blendColor=e.blendColor||new i.Color(0,1,.699,1),this._specularMap=void 0,this._specularMapSubscription=void 0,this.specularMap=e.specularMap||i.Material.DefaultImageId,this._normalMap=void 0,this._normalMapSubscription=void 0,this.normalMap=e.normalMap||i.Material.DefaultImageId,this.frequency=i.defaultValue(e.frequency,1e3),this.animationSpeed=i.defaultValue(e.animationSpeed,.01),this.amplitude=i.defaultValue(e.amplitude,10),this.specularIntensity=i.defaultValue(e.specularIntensity,.5)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return i.Material.WaterType}getValue(e,t){return t||(t={}),t.baseWaterColor=i.Property.getValueOrUndefined(this._baseWaterColor,e),t.blendColor=i.Property.getValueOrUndefined(this._blendColor,e),t.specularMap=i.Property.getValueOrUndefined(this._specularMap,e),t.normalMap=i.Property.getValueOrUndefined(this._normalMap,e),t.frequency=this.frequency,t.animationSpeed=this.animationSpeed,t.amplitude=this.amplitude,t.specularIntensity=this.specularIntensity,t}equals(e){return this===e||e instanceof n&&i.Property.equals(this._baseWaterColor,e._baseWaterColor)}};Object.defineProperties(jt.prototype,{baseWaterColor:i.createPropertyDescriptor("baseWaterColor"),blendColor:i.createPropertyDescriptor("blendColor"),specularMap:i.createPropertyDescriptor("specularMap"),normalMap:i.createPropertyDescriptor("normalMap")});var mc=jt;var ro=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_stoppedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._delegate&&this._layer.entities.remove(this._delegate),this._stoppedHook()}_bindEvent(){this.drawTool.on(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(C.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(C.DRAW_STOP,this._onDrawStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(t),this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.drawTool.fire(C.DRAW_STOP),this}},U=ro;var tu={pixelSize:10,outlineColor:i.Color.BLUE,outlineWidth:5},so=class extends U{constructor(e){super(),this._position=i.Cartesian3.ZERO,this._style={...tu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({position:new i.CallbackProperty(()=>this._position,!1),point:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new mt(u.transformCartesianToWGS84(this._position)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(C.DRAW_STOP,e)}_onAnchorMoving(e){this._position=e}},uc=so;var iu={width:3,material:i.Color.YELLOW.withAlpha(.6)},oo=class extends U{constructor(e){super(),this._style={...iu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Entity({polyline:{...this._style,positions:new i.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Ee(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},_c=oo;var ru={material:i.Color.YELLOW.withAlpha(.6),fill:!0},ao=class extends U{constructor(e){super(),this._style={...ru,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>2?new i.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new xe(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e})}},fc=ao;var su={material:i.Color.YELLOW.withAlpha(.6),fill:!0},no=class extends U{constructor(e){super(),this._maxAnchorSize=2,this._radius=0,this._style={...su,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>{if(this._positions.length>1){if(this._radius=i.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let e=i.EllipseGeometryLibrary.computeEllipsePositions({center:this._positions[0],semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),t=i.Cartesian3.unpackArray(e.outerPositions);return t.push(t[0]),new i.PolygonHierarchy(t)}else return null},!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new pt(u.transformCartesianToWGS84(this._positions[0]),this._radius).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e,isCenter:t===1}),t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},gc=no;var ou={material:i.Color.YELLOW.withAlpha(.6)},lo=class extends U{constructor(e){super(),this._maxAnchorSize=2,this._style={...ou,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({rectangle:{...this._style,coordinates:new i.CallbackProperty(e=>this._positions.length>1?i.Rectangle.fromCartesianArray(this._positions):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new ut(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},yc=lo;var ho=class extends U{constructor(e){super(),this._position=i.Cartesian3.ZERO,this._style={image:He,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({position:new i.CallbackProperty(()=>this._position,!1),billboard:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new Ce(u.transformCartesianToWGS84(this._position),this._style.image).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(C.DRAW_STOP)}_onAnchorMoving(e){this._position=e}},vc=ho;var Yt=Math.PI/2,co=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_getArrowHeadPoints(e,t,r){let s=w.getBaseLength(e),o=s*this.headHeightFactor,a=e[e.length-1];s=w.distance(a,e[e.length-2]);let l=w.distance(t,r);o>l*this.headTailFactor&&(o=l*this.headTailFactor);let h=o*this.headWidthFactor,c=o*this.neckWidthFactor;o=o>s?s:o;let p=o*this.neckHeightFactor,f=w.getThirdPoint(e[e.length-2],a,0,o,!0),T=w.getThirdPoint(e[e.length-2],a,0,p,!0),y=w.getThirdPoint(a,f,Yt,h,!1),m=w.getThirdPoint(a,f,Yt,h,!0),E=w.getThirdPoint(a,T,Yt,c,!1),x=w.getThirdPoint(a,T,Yt,c,!0);return[E,y,a,m,x]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,p=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=w.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_createHierarchy(){let e=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1];w.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r)/w.getBaseLength(o),p=this._getArrowBodyPoints(o,l,h,c),f=p.length,T=[t].concat(p.slice(0,f/2));T.push(l);let y=[r].concat(p.slice(f/2,f));return y.push(h),T=w.getQBSplinePoints(T),y=w.getQBSplinePoints(y),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(T.concat(a,y.reverse()))))}},Ne=co;var au={material:i.Color.YELLOW.withAlpha(.6),fill:!0},po=class extends U{constructor(e){super(),this._maxAnchorSize=3,this._style={...au,...e},this._graphics=new Ne}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new ke(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},wc=po;var J=Math.PI/2,mo=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_getArrowPoints(e,t,r,s){let o=w.mid(e,t),a=w.distance(o,r),l=w.getThirdPoint(r,o,0,a*.3,!0),h=w.getThirdPoint(r,o,0,a*.5,!0);l=w.getThirdPoint(o,l,J,a/5,s),h=w.getThirdPoint(o,h,J,a/4,s);let c=[o,l,h,r],p=this._getArrowHeadPoints(c),f=p[0],T=p[4],y=w.distance(e,t)/w.getBaseLength(c)/2,m=this._getArrowBodyPoints(c,f,T,y),E=m.length,x=m.slice(0,E/2),b=m.slice(E/2,E);return x.push(f),b.push(T),x=x.reverse(),x.push(t),b=b.reverse(),b.push(e),x.reverse().concat(p,b)}_getArrowHeadPoints(e){let r=w.getBaseLength(e)*this.headHeightFactor,s=e[e.length-1],o=r*this.headWidthFactor,a=r*this.neckWidthFactor,l=r*this.neckHeightFactor,h=w.getThirdPoint(e[e.length-2],s,0,r,!0),c=w.getThirdPoint(e[e.length-2],s,0,l,!0),p=w.getThirdPoint(s,h,J,o,!1),f=w.getThirdPoint(s,h,J,o,!0),T=w.getThirdPoint(s,c,J,a,!1),y=w.getThirdPoint(s,c,J,a,!0);return[T,p,s,f,y]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,p=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=w.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_getTempPoint4(e,t,r){let s=w.mid(e,t),o=w.distance(s,r),a=w.getAngleOfThreePoints(e,s,r),l,h,c,p;return a<J?(h=o*Math.sin(a),c=o*Math.cos(a),p=w.getThirdPoint(e,s,J,h,!1),l=w.getThirdPoint(s,p,J,c,!0)):a>=J&&a<Math.PI?(h=o*Math.sin(Math.PI-a),c=o*Math.cos(Math.PI-a),p=w.getThirdPoint(e,s,J,h,!1),l=w.getThirdPoint(s,p,J,c,!1)):a>=Math.PI&&a<Math.PI*1.5?(h=o*Math.sin(a-Math.PI),c=o*Math.cos(a-Math.PI),p=w.getThirdPoint(e,s,J,h,!0),l=w.getThirdPoint(s,p,J,c,!0)):(h=o*Math.sin(Math.PI*2-a),c=o*Math.cos(Math.PI*2-a),p=w.getThirdPoint(e,s,J,h,!0),l=w.getThirdPoint(s,p,J,c,!1)),l}_createHierarchy(){let e=this._positions.length,t,r,s=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],o=s[0],a=s[1],l=s[2];e===3?t=this._getTempPoint4(o,a,l):t=s[3],e===3||e===4?r=w.mid(o,a):r=s[4];let h,c;w.isClockWise(o,a,l)?(h=this._getArrowPoints(o,r,t,!1),c=this._getArrowPoints(r,a,l,!0)):(h=this._getArrowPoints(a,r,l,!1),c=this._getArrowPoints(r,o,t,!0));let p=h.length,f=(p-5)/2,T=h.slice(0,f),y=h.slice(f,f+5),m=h.slice(f+5,p),E=c.slice(0,f),x=c.slice(f,f+5),b=c.slice(f+5,p);E=w.getBezierPoints(E);let I=w.getBezierPoints(b.concat(T.slice(1)));return m=w.getBezierPoints(m),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(E.concat(x,I,y,m))))}},Zt=mo;var nu={material:i.Color.YELLOW.withAlpha(.6),fill:!0},uo=class extends U{constructor(e){super(),this._maxAnchorSize=4,this._style={...nu,...e},this._graphics=new Zt}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new ot(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Tc=uo;var Cc=Math.PI/2,_o=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1],s=w.getBaseLength(e),o=s*this.tailWidthFactor,a=s*this.neckWidthFactor,l=s*this.headWidthFactor,h=w.getThirdPoint(r,t,Cc,o,!0),c=w.getThirdPoint(r,t,Cc,o,!1),p=w.getThirdPoint(t,r,this.headAngle,l,!1),f=w.getThirdPoint(t,r,this.headAngle,l,!0),T=w.getThirdPoint(t,r,this.neckAngle,a,!1),y=w.getThirdPoint(t,r,this.neckAngle,a,!0);return new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions([h,T,p,r,f,y,c])))}},qt=_o;var lu={material:i.Color.YELLOW.withAlpha(.6),fill:!0},fo=class extends U{constructor(e){super(),this._maxAnchorSize=2,this._style={...lu,...e},this._graphics=new qt}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new at(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},xc=fo;var hu=Math.PI/2,Ec=100,go=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.t=.4}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0];if(this._positions.length===2){let a=w.mid(e[0],e[1]),l=w.distance(e[0],a)/.9,h=w.getThirdPoint(e[0],a,hu,l,!0);e=[e[0],h,e[1]]}let t=w.mid(e[0],e[2]);e.push(t,e[0],e[1]);let r=[];for(let a=0;a<e.length-2;a++){let l=e[a],h=e[a+1],c=e[a+2],p=w.getBisectorNormals(this.t,l,h,c);r=r.concat(p)}let s=r.length;r=[r[s-1]].concat(r.slice(0,s-1));let o=[];for(let a=0;a<e.length-2;a++){let l=e[a],h=e[a+1];o.push(l);for(let c=0;c<=Ec;c++){let p=w.getCubicValue(c/Ec,l,r[a*2],r[a*2+1],h);o.push(p)}o.push(h)}return new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(o)))}},Xt=go;var cu={material:i.Color.YELLOW.withAlpha(.6),fill:!0},yo=class extends U{constructor(e){super(),this._maxAnchorSize=3,this._style={...cu,...e},this._graphics=new Xt}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new nt(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Pc=yo;var vo=class extends Ne{constructor(e){super(e),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,this.headTailFactor=.8,this.swallowTailFactor=1}_createHierarchy(){let e=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1];w.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r),p=w.getBaseLength(o),f=p*this.tailWidthFactor*this.swallowTailFactor,T=w.getThirdPoint(o[1],o[0],0,f,!0),y=c/p,m=this._getArrowBodyPoints(o,l,h,y),E=m.length,x=[t].concat(m.slice(0,E/2));x.push(l);let b=[r].concat(m.slice(E/2,E));return b.push(h),x=w.getQBSplinePoints(x),b=w.getQBSplinePoints(b),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(x.concat(a,b.reverse(),[T,x[0]]))))}},Jt=vo;var pu={material:i.Color.YELLOW.withAlpha(.6),fill:!0},wo=class extends U{constructor(e){super(),this._maxAnchorSize=3,this._style={...pu,...e},this._graphics=new Jt}_mountEntity(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new lt(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},bc=wo;var To=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._overlay.show=!1,this._delegate=new i.Entity,this._delegate.merge(e.delegate),this._options={},this._positions=[]}get editTool(){return this._viewer.editTool}_mountedHook(){}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[].concat(u.transformWGS84ArrayToCartesianArray(this._overlay.positions)),this._positions.forEach((e,t)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:e,index:t})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now());this._positions[r.index]=t}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now());this._positions[r.index]=t}_onEditStop({pickedAnchor:e,position:t}){this._unbindEvent(),this._viewer.editTool.deactivate(),this._layer.entities.remove(this._delegate),this._stoppedHook()}_bindEvent(){return this.editTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(C.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(C.EDIT_STOP,this._onEditStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._viewer.editTool.activate(t),this._mountedHook(),this._mountAnchor(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.editTool.fire(C.EDIT_STOP,{pickedAnchor:null,position:null}),this}},B=To;var Co=class extends B{constructor(e){super(e),this._position=void 0}_mountedHook(){this.editTool.tooltipMess="\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._position=this._delegate.position.getValue(i.JulianDate.now()),this._delegate.position=new i.CallbackProperty(()=>this._position,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.position=u.transformCartesianToWGS84(this._position),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_onAnchorMoving({pickedAnchor:e,position:t}){this._position=t}},Sc=Co;var xo=class extends B{constructor(e){super(e)}_mountedHook(){this._delegate.polyline.positions=new i.CallbackProperty(()=>this._positions.length>1?this._positions:null,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions.filter((e,t)=>t%2===0)),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[];let e=this._overlay.delegate.polyline.positions.getValue(i.JulianDate.now());for(let t=0;t<e.length-1;t++){let r=k(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.push(e[e.length-1]),this._positions.forEach((t,r)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(r.isMid){let o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1]);this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((l,h)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:l,index:h,isMid:h%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(this._positions[s]=t,!r.isMid&&this._options.maxAnchorSize>2){let o=-1,a=-1,l=-1,h=-1,c=this._positions.length;if(s===0?(l=s+2,h=s+1):r.index===c-1?(o=s-2,a=s-1):(o=s-2,a=s-1,l=s+2,h=s+1),o>0){let p=k(this._positions[o],this._positions[s]);this._positions[a]=p,this.editTool.fire(C.UPDATE_ANCHOR,{index:a,position:p})}if(l>0){let p=k(this._positions[l],this._positions[s]);this._positions[h]=p,this.editTool.fire(C.UPDATE_ANCHOR,{index:h,position:p})}}}},Ic=xo;var Eo=class extends B{constructor(e){super(e)}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(e=>this._positions.length>2?new i.PolygonHierarchy(this._positions.map(t=>t.clone())):null,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions.filter((e,t)=>t%2===0)),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[];let e=this._overlay.delegate.polygon.hierarchy.getValue(i.JulianDate.now()).positions;e.push(e[0]);for(let t=0;t<e.length-1;t++){let r=k(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.forEach((t,r)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(r.isMid){let o,a,l=this._positions.length;s===l-1?(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[0])):(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1])),this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;this._positions[s]=t;let o=this._positions.length;if(!r.isMid){let a=-1,l=-1,h=-1,c=-1;s===0?(a=o-2,l=o-1,h=s+2,c=s+1):s===o-2?(a=s-2,l=s-1,h=0,c=o-1):(a=s-2,l=s-1,h=s+2,c=s+1);let p=k(this._positions[a],this._positions[s]),f=k(this._positions[h],this._positions[s]);this._positions[l]=p,this._positions[c]=f,this.editTool.fire(C.UPDATE_ANCHOR,{index:l,position:p}),this.editTool.fire(C.UPDATE_ANCHOR,{index:c,position:f})}}},Mc=Eo;var Po=class extends B{constructor(e){super(e),this._center=void 0,this._radius=0}_mountedHook(){this._radius=this._overlay.radius,this._center=u.transformWGS84ToCartesian(this._overlay.center),this._positions=[].concat([this._center,this._computeCirclePoints(this._center,this._radius)[0]]),this._delegate.polygon.hierarchy=new i.CallbackProperty(e=>{if(this._positions.length>1){if(this._radius=i.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let t=this._computeCirclePoints(this._positions[0],this._radius);return t.push(t[0]),new i.PolygonHierarchy(t)}else return null},!1),this._layer.entities.add(this._delegate)}_computeCirclePoints(e,t){let r=[],s=i.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0);return s&&s.outerPositions&&(r=i.Cartesian3.unpackArray(s.outerPositions)),r}_stoppedHook(){this._overlay.center=u.transformCartesianToWGS84(this._positions[0]),this._overlay.radius=this._radius,this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions.forEach((e,t)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:e,index:t,isCenter:t%2===0})})}},Ac=Po;var bo=class extends B{constructor(e){super(e),this._overlay=e}_mountedHook(){this._delegate.rectangle.coordinates=new i.CallbackProperty(e=>this._positions.length>1?i.Rectangle.fromCartesianArray(this._positions):null,!1),this._layer.entities.add(this._delegate)}},Dc=bo;var So=class extends B{constructor(e){super(e),this._position=void 0}_mountedHook(){this.editTool.tooltipMess="\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._position=this._delegate.position.getValue(i.JulianDate.now()),this._delegate.position=new i.CallbackProperty(()=>this._position,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.position=u.transformCartesianToWGS84(this._position),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_onAnchorMoving({pickedAnchor:e,position:t}){this._position=t}},Lc=So;var Io=class extends B{constructor(e){super(e),this._graphics=new Ne}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},Rc=Io;var Mo=class extends B{constructor(e){super(e),this._graphics=new Zt}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},Oc=Mo;var Ao=class extends B{constructor(e){super(e),this._graphics=new qt}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},kc=Ao;var Do=class extends B{constructor(e){super(e),this._graphics=new Xt}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},Fc=Do;var Lo=class extends B{constructor(e){super(e),this._graphics=new Jt}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},zc=Lo;var Ro=class{constructor(e,t={}){this._viewer=e,this._options=t,this._layer=new i.CustomDataSource("plot-layer"),this._viewer.dataSources.add(this._layer),this._currentWorker=void 0,this._state=void 0}get viewer(){return this._viewer}get layer(){return this._layer}get state(){return this._state}_createDrawWorker(e,t){let r;switch(e){case F.POINT:r=new uc(t);break;case F.POLYLINE:r=new _c(t);break;case F.POLYGON:r=new fc(t);break;case F.CIRCLE:r=new gc(t);break;case F.RECT:r=new yc(t);break;case F.BILLBOARD:r=new vc(t);break;case F.ATTACK_ARROW:r=new wc(t);break;case F.DOUBLE_ARROW:r=new Tc(t);break;case F.FINE_ARROW:r=new xc(t);break;case F.TAILED_ATTACK_ARROW:r=new bc(t);break;case F.GATHERING_PLACE:r=new Pc(t);break;default:break}return r}_createEditWorker(e){let t;switch(e.type){case F.POINT:t=new Sc(e);break;case F.POLYLINE:t=new Ic(e);break;case F.POLYGON:t=new Mc(e);break;case F.CIRCLE:t=new Ac(e);break;case F.RECT:t=new Dc(e);break;case F.BILLBOARD:t=new Lc(e);break;case F.ATTACK_ARROW:t=new Rc(e);break;case F.DOUBLE_ARROW:t=new Oc(e);break;case F.FINE_ARROW:t=new kc(e);break;case F.TAILED_ATTACK_ARROW:t=new zc(e);break;case F.GATHERING_PLACE:t=new Fc(e);break;default:break}return t}draw(e,t,r={},s=!1){var a;this._state="draw",this._currentWorker&&this._currentWorker.stop();let o=(r==null?void 0:r.maxAnchorSize)||999;return r&&delete r.maxAnchorSize,this._currentWorker=(a=this._createDrawWorker(e,r))==null?void 0:a.start(this,{...this._options,maxAnchorSize:o,onDrawStop:t,clampToModel:s!=null?s:this._options.clampToModel}),this}edit(e,t,r=!1){var s;return this._state="edit",this._currentWorker&&this._currentWorker.stop(),this._currentWorker=(s=this._createEditWorker(e))==null?void 0:s.start(this,{...this._options,onEditStop:t,clampToModel:r!=null?r:this._options.clampToModel}),this}stop(){this._currentWorker&&this._currentWorker.stop(),this._currentWorker=null}destroy(){return this._viewer.dataSources.remove(this._layer),this._viewer=void 0,this}},du=Ro;var Oo=class{constructor(e){this._viewer=e,this._options={}}_bindEvent(){}_unbindEvent(){}start(){if(this._viewer.clock.shouldAnimate=!0,this._unbindEvent(),this._options.duration){let e=setTimeout(()=>{this._unbindEvent(),this._options.callback&&this._options.callback.call(this._options.context||this),clearTimeout(e)},Number(this._options.duration)*1e3)}return this._bindEvent(),this}stop(){return this._unbindEvent(),this}},te=Oo;var mu={},V=mu;var ko=class extends te{constructor(e,t={}){super(e),this._options=t,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return V.AROUND_VIEW}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,t){this._heading+=i.Math.toRadians(this._aroundAmount),(this._heading>=Math.PI*2||this._heading<=-Math.PI*2)&&(this._heading=0),this._viewer.camera.setView({orientation:{heading:this._heading,pitch:this._options.pitch?i.Math.toRadians(this._options.pitch):this._viewer.camera.pitch,roll:this._options.roll?i.Math.toRadians(this._options.roll):this._viewer.camera.roll}})}};V.AROUND_VIEW="around_view";var Hc=ko;var Fo=class extends te{constructor(e,t,r={}){super(e),this._position=_.parsePosition(t),this._options=r,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return V.AROUND_POINT}set position(e){this._position=_.parsePosition(e)}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,t){this._heading+=i.Math.toRadians(this._aroundAmount),(this._heading>=Math.PI*2||this._heading<=-Math.PI*2)&&(this._heading=0),this._viewer.camera.lookAt(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRange(this._heading,i.Math.toRadians(this._options.pitch||0),this._options.range||1e3))}};V.AROUND_POINT="around_point";var Nc=Fo;var Wc=`in vec2 v_textureCoordinates;
1493
+ `;i.Material.WallDiffuseType="WallDiffuse";i.Material._materialCache.addMaterial(i.Material.WallDiffuseType,{fabric:{type:i.Material.WallDiffuseType,uniforms:{color:new i.Color(1,0,0,.7)},source:e_},translucent:function(a){return!0}});i.Material.WallImageTrailType="WallImageTrail";i.Material._materialCache.addMaterial(i.Material.WallImageTrailType,{fabric:{type:i.Material.WallImageTrailType,uniforms:{image:i.Material.DefaultImageId,color:new i.Color(1,0,0,.7),speed:3,repeat:new i.Cartesian2(1,1)},source:t_},translucent:function(a){return!0}});i.Material.WallLineTrailType="WallLineTrail";i.Material._materialCache.addMaterial(i.Material.WallLineTrailType,{fabric:{type:i.Material.WallLineTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,repeat:new i.Cartesian2(1,1),speed:3},source:i_},translucent:function(a){return!0}});i.Material.WallTrailType="WallTrail";i.Material._materialCache.addMaterial(i.Material.WallTrailType,{fabric:{type:i.Material.WallTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,speed:1},source:r_},translucent:function(a){return!0}});var ua=class{constructor(e={}){this._definitionChanged=new i.Event,this._color=void 0,this._colorSubscription=void 0,this._speed=void 0,this._speedSubscription=void 0,this.color=e.color||i.Color.fromBytes(0,255,255,255),this.speed=e.speed||1}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return null}getValue(e,t){return t=i.defaultValue(t,{}),t}equals(e){return this===e}},L=ua;var li=class a extends L{constructor(e={}){super(e)}getType(e){return i.Material.CircleBlurType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(li.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var s_=li;var hi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Material.CircleDiffuseType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(hi.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var o_=hi;var ci=class a extends L{constructor(e={}){super(e)}getType(e){return i.Material.CircleFadeType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(ci.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var a_=ci;var pi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Material.CirclePulseType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(pi.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var n_=pi;var di=class a extends L{constructor(e={}){super(e)}getType(e){return i.Material.CircleScanType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(di.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var l_=di;var mi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Material.CircleSpiralType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(mi.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var h_=mi;var ui=class a extends L{constructor(e={}){super(e)}getType(e){return i.Material.CircleVaryType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(ui.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var c_=ui;var _i=class a extends L{constructor(e={}){super(e),this.count=Math.max(e.count||3,1),this.gradient=i.Math.clamp(e.gradient||.1,0,1)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return i.Material.CircleWaveType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t.count=i.Property.getValueOrUndefined(this._count,e),t.gradient=i.Property.getValueOrUndefined(this._gradient,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(_i.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var p_=_i;var fi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Material.EllipsoidElectricType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(fi.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var d_=fi;var gi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Material.EllipsoidTrailType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(gi.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var m_=gi;var yi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Material.PolylineFlickerType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(yi.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var u_=yi;var vi=class a extends L{constructor(e={}){super(e),this._percent=void 0,this._percentSubscription=void 0,this._gradient=void 0,this._gradientSubscription=void 0,this.percent=e.percent||.03,this.gradient=e.gradient||.1}getType(e){return i.Material.PolylineFlowType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t.percent=i.Property.getValueOrUndefined(this._percent,e),t.gradient=i.Property.getValueOrUndefined(this._gradient,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)&&i.Property.equals(this._percent,e._percent)&&i.Property.equals(this._gradient,e._gradient)}};Object.defineProperties(vi.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),percent:i.createPropertyDescriptor("percent"),gradient:i.createPropertyDescriptor("gradient")});var __=vi;var wi=class a extends L{constructor(e={}){var t,r;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=e.image,this.repeat=new i.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Material.PolylineImageTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.repeat=i.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._image,e._image)&&i.Property.equals(this._repeat,e._repeat)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(wi.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),image:i.createPropertyDescriptor("image"),repeat:i.createPropertyDescriptor("repeat")});var f_=wi;var Ci="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAACYCAYAAACS0lH9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAJ0GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgMTE2LjE2NDY1NSwgMjAyMS8wMS8yNi0xNTo0MToyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIy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GCXBQAACikAAFDIEQAAFLIAAEAhBQAACikAAFBoogQAQB0PfwAopAAAQCGvAQJAIQsAABSyAABAIQsAABSyAABAIQUAAAo5AgCAQr4ECACFPPwBoJACAACFHAEAQCEPfwAoZAEAgEIe/gBQyAIAAIU8/AGgkAUAAAr5LQAAKOS/fwAoZAEAgELuAABAIQsAABRSAACgkAIAAIXcAQCAQhYAAChkAQCAQgoAABRSAACgkIc/ABSaJC+uQwAAu7wFAACFFAAAKDR//wCAIhYAACjkEiAAFLIAAEChSfLyOgQAsMuXAAGgkLcAAKCQAgAAhbwFAACFFAAAKOQIAAAKTZJ/rkMAALsUAAAo5AgAAAr5EiAAFFIAAKCQOwAAUEgBAIBCk+TVdQgAYNckeXMdAgDYNUneXocAAHZNkvfXIQCAXZPkv+sQAMCuSfLvdQgAYNckeXcdAgDY5RIgABSaJK+vQwAAu/wWAAAUmiRP1yEAgF2T5HEdAgDYNUl+XocAAHZNkm/XIQCAXZPky3UIAGDXJPl8HQIA2DVJPl6HAAB2TZIP1yEAgF2T5NN1CABgl0uAAFBokny9DgEA7Jok369DAAC7JsmP6xAAwC4FAAAK+S0AACikAABAoUny6zoEALDLHQAAKKQAAEAhRwAAUGiS/L4OAQDsUgAAoJAjAAAopAAAQKFJ8v91CABgly8BAkChSfK4DgEA7PIWAAAUsgAAQCFvAQBAIQsAABRSAACgkEuAAFDo+ToAALDPlwABoJACAACFFAAAKOQtAAAoZAEAgEIWAAAopAAAQCEFAAAKuQMAAIUsAABQyKeAAaCQBQAACrkDAACFHAEAQCELAAAUsgAAQCELAAAUsgAAQCELAAAUsgAAQCEFAAAKOQIAgEIWAAAo5LcAAKCQAgAAhRwBAEAhCwAAFLIAAEAhCwAAFLIAAEAhBQAACvkSIAAUsgAAQCEFAAAKKQAAUMhrgABQyAIAAIUUAAAo5AgAAApZAACgkAIAAIUUAAAo5A4AABT6A6gaPQ6/wRIfAAAAAElFTkSuQmCC";var Ti=class a extends L{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Ci}getType(e){return i.Material.PolylineLightingType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._image,e._image)}};Object.defineProperties(Ti.prototype,{color:i.createPropertyDescriptor("color"),image:i.createPropertyDescriptor("image")});var g_=Ti;var xi=class a extends L{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Ci}getType(e){return i.Material.PolylineLightingTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(xi.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),image:i.createPropertyDescriptor("image")});var y_=xi;var Ei=class a extends L{constructor(e={}){super(e)}getType(e){return i.Material.PolylineTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=this._speed,t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ei.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var v_=Ei;var Pi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Material.RadarLineType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Pi.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var w_=Pi;var bi=class a extends L{constructor(e={}){super(e)}getType(e){return i.Material.RadarSweepType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(bi.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var C_=bi;var Si=class a extends L{constructor(e={}){super(e)}getType(e){return i.Material.RadarWaveType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Si.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var T_=Si;var Ai=class a extends L{constructor(e={}){var t,r;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=e.image,this.repeat=new i.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Material.WallImageTrailType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.repeat=i.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._image,e._image)&&i.Property.equals(this._repeat,e._repeat)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ai.prototype,{image:i.createPropertyDescriptor("image"),color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),repeat:i.createPropertyDescriptor("repeat")});var x_=Ai;var E_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAABACAYAAABWdc94AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGx2lUWHRYT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MCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIxLjIgKE1hY2ludG9zaCkiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+eAiLkwAAAQZJREFUeJzt3LERwDAMxDAl5/1XdqYIXRiYQBULFf/svQeA/72nDwC4heACRAQXICK4ABHBBYgILkBEcAEiggsQEVyAiOACRAQXICK4ABHBBYgILkBkzYx9RoDAmpnn9BEAN/BSAIgILkBEcAEiggsQEVyAiOACRAQXICK4ABHBBYgILkBEcAEiggsQEVyAiOACRAQXIGKAHCBigBwg4qUAEBFcgIjgAkQEFyAiuAARwQWICC5ARHABIoILEBFcgIjgAkQEFyAiuAARwQWI2MMFiNjDBYh4KQBEBBcgIrgAEcEFiAguQERwASKCCxARXICI4AJEBBcgIrgAEcEFiAguQERwASIfRmAGiWTgoMYAAAAASUVORK5CYII=";var Mi=class a extends L{constructor(e={}){var t,r;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=E_,this.repeat=new i.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Material.WallLineTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.repeat=i.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)&&i.Property.equals(this._repeat,e._repeat)}};Object.defineProperties(Mi.prototype,{color:i.createPropertyDescriptor("color"),image:i.createPropertyDescriptor("image"),repeat:i.createPropertyDescriptor("repeat"),speed:i.createPropertyDescriptor("speed")});var P_=Mi;var b_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAOhlWElmTU0AKgAAAAgABgESAAMAAAABAAEAAAEaAAUAAAABAAAAVgEbAAUAAAABAAAAXgExAAIAAAAkAAAAZgEyAAIAAAAUAAAAiodpAAQAAAABAAAAngAAAAAAAABIAAAAAQAAAEgAAAABQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKE1hY2ludG9zaCkAMjAxODoxMDoyNiAxNTozMDozNAAABJAEAAIAAAAUAAAA1KABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAAAyMDE4OjEwOjI2IDE1OjI0OjI1ALUCxicAAAAJcEhZcwAACxMAAAsTAQCanBgAAAdgaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA1LjQuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgICAgICAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kY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itOyfo27JTbIRFdHAaBhObskmLG0zYyOoO04IY1zy13TcKnR3Q5lMA2MuHfxp75VN4LgOi4ZNtf74MOUnIwCWDV/5e7uSlkbfCcRMuH2yrvBRlLgcO9xXqjIP/9lUeTLjFI3z8F+ualIvlptDJAAAAAElFTkSuQmCC";var Ii=class a extends L{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=b_}getType(e){return i.Material.WallTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ii.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),image:i.createPropertyDescriptor("image")});var S_=Ii;var Di=class a{constructor(e){e=e||{},this._definitionChanged=new i.Event,this._baseWaterColor=void 0,this._baseWaterColorSubscription=void 0,this.baseWaterColor=e.baseWaterColor||new i.Color(.2,.3,.6,1),this._blendColor=void 0,this._blendColorSubscription=void 0,this.blendColor=e.blendColor||new i.Color(0,1,.699,1),this._specularMap=void 0,this._specularMapSubscription=void 0,this.specularMap=e.specularMap||i.Material.DefaultImageId,this._normalMap=void 0,this._normalMapSubscription=void 0,this.normalMap=e.normalMap||i.Material.DefaultImageId,this.frequency=i.defaultValue(e.frequency,1e3),this.animationSpeed=i.defaultValue(e.animationSpeed,.01),this.amplitude=i.defaultValue(e.amplitude,10),this.specularIntensity=i.defaultValue(e.specularIntensity,.5)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return i.Material.WaterType}getValue(e,t){return t||(t={}),t.baseWaterColor=i.Property.getValueOrUndefined(this._baseWaterColor,e),t.blendColor=i.Property.getValueOrUndefined(this._blendColor,e),t.specularMap=i.Property.getValueOrUndefined(this._specularMap,e),t.normalMap=i.Property.getValueOrUndefined(this._normalMap,e),t.frequency=this.frequency,t.animationSpeed=this.animationSpeed,t.amplitude=this.amplitude,t.specularIntensity=this.specularIntensity,t}equals(e){return this===e||e instanceof a&&i.Property.equals(this._baseWaterColor,e._baseWaterColor)}};Object.defineProperties(Di.prototype,{baseWaterColor:i.createPropertyDescriptor("baseWaterColor"),blendColor:i.createPropertyDescriptor("blendColor"),specularMap:i.createPropertyDescriptor("specularMap"),normalMap:i.createPropertyDescriptor("normalMap")});var A_=Di;var _a=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_stoppedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._delegate&&this._layer.entities.remove(this._delegate),this._stoppedHook()}_bindEvent(){this.drawTool.on(x.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(x.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(x.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(x.DRAW_STOP,this._onDrawStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(t),this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.drawTool.fire(x.DRAW_STOP),this}},j=_a;var JE={pixelSize:10,outlineColor:i.Color.BLUE,outlineWidth:5},fa=class extends j{constructor(e){super(),this._position=i.Cartesian3.ZERO,this._style={...JE,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({position:new i.CallbackProperty(()=>this._position,!1),point:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new $t(u.transformCartesianToWGS84(this._position)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(x.DRAW_STOP,e)}_onAnchorMoving(e){this._position=e}},M_=fa;var KE={width:3,material:i.Color.YELLOW.withAlpha(.6)},ga=class extends j{constructor(e){super(),this._style={...KE,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Entity({polyline:{...this._style,positions:new i.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Me(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},I_=ga;var QE={material:i.Color.YELLOW.withAlpha(.6),fill:!0},ya=class extends j{constructor(e){super(),this._style={...QE,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>2?new i.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Ae(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e})}},D_=ya;var $E={material:i.Color.YELLOW.withAlpha(.6),fill:!0},va=class extends j{constructor(e){super(),this._maxAnchorSize=2,this._radius=0,this._style={...$E,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>{if(this._positions.length>1){if(this._radius=i.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let e=i.EllipseGeometryLibrary.computeEllipsePositions({center:this._positions[0],semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),t=i.Cartesian3.unpackArray(e.outerPositions);return t.push(t[0]),new i.PolygonHierarchy(t)}else return null},!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Kt(u.transformCartesianToWGS84(this._positions[0]),this._radius).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e,isCenter:t===1}),t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},L_=va;var eP={material:i.Color.YELLOW.withAlpha(.6)},wa=class extends j{constructor(e){super(),this._maxAnchorSize=2,this._style={...eP,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({rectangle:{...this._style,coordinates:new i.CallbackProperty(e=>this._positions.length>1?i.Rectangle.fromCartesianArray(this._positions):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new ei(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},R_=wa;var Ca=class extends j{constructor(e){super(),this._position=i.Cartesian3.ZERO,this._style={image:et,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({position:new i.CallbackProperty(()=>this._position,!1),billboard:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new Se(u.transformCartesianToWGS84(this._position),this._style.image).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(x.DRAW_STOP)}_onAnchorMoving(e){this._position=e}},O_=Ca;var Li=Math.PI/2,Ta=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_getArrowHeadPoints(e,t,r){let s=C.getBaseLength(e),o=s*this.headHeightFactor,n=e[e.length-1];s=C.distance(n,e[e.length-2]);let l=C.distance(t,r);o>l*this.headTailFactor&&(o=l*this.headTailFactor);let h=o*this.headWidthFactor,c=o*this.neckWidthFactor;o=o>s?s:o;let p=o*this.neckHeightFactor,_=C.getThirdPoint(e[e.length-2],n,0,o,!0),w=C.getThirdPoint(e[e.length-2],n,0,p,!0),g=C.getThirdPoint(n,_,Li,h,!1),d=C.getThirdPoint(n,_,Li,h,!0),E=C.getThirdPoint(n,w,Li,c,!1),T=C.getThirdPoint(n,w,Li,c,!0);return[E,g,n,d,T]}_getArrowBodyPoints(e,t,r,s){let o=C.wholeDistance(e),l=C.getBaseLength(e)*s,h=C.distance(t,r),c=(l-h)/2,p=0,_=[],w=[];for(let g=1;g<e.length-1;g++){let d=C.getAngleOfThreePoints(e[g-1],e[g],e[g+1])/2;p+=C.distance(e[g-1],e[g]);let E=(l/2-p/o*c)/Math.sin(d),T=C.getThirdPoint(e[g-1],e[g],Math.PI-d,E,!0),b=C.getThirdPoint(e[g-1],e[g],d,E,!1);_.push(T),w.push(b)}return _.concat(w)}_createHierarchy(){let e=f.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1];C.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[C.mid(t,r)].concat(e.slice(2)),n=this._getArrowHeadPoints(o,t,r),l=n[0],h=n[4],c=C.distance(t,r)/C.getBaseLength(o),p=this._getArrowBodyPoints(o,l,h,c),_=p.length,w=[t].concat(p.slice(0,_/2));w.push(l);let g=[r].concat(p.slice(_/2,_));return g.push(h),w=C.getQBSplinePoints(w),g=C.getQBSplinePoints(g),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(w.concat(n,g.reverse()))))}},tt=Ta;var tP={material:i.Color.YELLOW.withAlpha(.6),fill:!0},xa=class extends j{constructor(e){super(),this._maxAnchorSize=3,this._style={...tP,...e},this._graphics=new tt}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Ge(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},k_=xa;var $=Math.PI/2,Ea=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_getArrowPoints(e,t,r,s){let o=C.mid(e,t),n=C.distance(o,r),l=C.getThirdPoint(r,o,0,n*.3,!0),h=C.getThirdPoint(r,o,0,n*.5,!0);l=C.getThirdPoint(o,l,$,n/5,s),h=C.getThirdPoint(o,h,$,n/4,s);let c=[o,l,h,r],p=this._getArrowHeadPoints(c),_=p[0],w=p[4],g=C.distance(e,t)/C.getBaseLength(c)/2,d=this._getArrowBodyPoints(c,_,w,g),E=d.length,T=d.slice(0,E/2),b=d.slice(E/2,E);return T.push(_),b.push(w),T=T.reverse(),T.push(t),b=b.reverse(),b.push(e),T.reverse().concat(p,b)}_getArrowHeadPoints(e){let r=C.getBaseLength(e)*this.headHeightFactor,s=e[e.length-1],o=r*this.headWidthFactor,n=r*this.neckWidthFactor,l=r*this.neckHeightFactor,h=C.getThirdPoint(e[e.length-2],s,0,r,!0),c=C.getThirdPoint(e[e.length-2],s,0,l,!0),p=C.getThirdPoint(s,h,$,o,!1),_=C.getThirdPoint(s,h,$,o,!0),w=C.getThirdPoint(s,c,$,n,!1),g=C.getThirdPoint(s,c,$,n,!0);return[w,p,s,_,g]}_getArrowBodyPoints(e,t,r,s){let o=C.wholeDistance(e),l=C.getBaseLength(e)*s,h=C.distance(t,r),c=(l-h)/2,p=0,_=[],w=[];for(let g=1;g<e.length-1;g++){let d=C.getAngleOfThreePoints(e[g-1],e[g],e[g+1])/2;p+=C.distance(e[g-1],e[g]);let E=(l/2-p/o*c)/Math.sin(d),T=C.getThirdPoint(e[g-1],e[g],Math.PI-d,E,!0),b=C.getThirdPoint(e[g-1],e[g],d,E,!1);_.push(T),w.push(b)}return _.concat(w)}_getTempPoint4(e,t,r){let s=C.mid(e,t),o=C.distance(s,r),n=C.getAngleOfThreePoints(e,s,r),l,h,c,p;return n<$?(h=o*Math.sin(n),c=o*Math.cos(n),p=C.getThirdPoint(e,s,$,h,!1),l=C.getThirdPoint(s,p,$,c,!0)):n>=$&&n<Math.PI?(h=o*Math.sin(Math.PI-n),c=o*Math.cos(Math.PI-n),p=C.getThirdPoint(e,s,$,h,!1),l=C.getThirdPoint(s,p,$,c,!1)):n>=Math.PI&&n<Math.PI*1.5?(h=o*Math.sin(n-Math.PI),c=o*Math.cos(n-Math.PI),p=C.getThirdPoint(e,s,$,h,!0),l=C.getThirdPoint(s,p,$,c,!0)):(h=o*Math.sin(Math.PI*2-n),c=o*Math.cos(Math.PI*2-n),p=C.getThirdPoint(e,s,$,h,!0),l=C.getThirdPoint(s,p,$,c,!1)),l}_createHierarchy(){let e=this._positions.length,t,r,s=f.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],o=s[0],n=s[1],l=s[2];e===3?t=this._getTempPoint4(o,n,l):t=s[3],e===3||e===4?r=C.mid(o,n):r=s[4];let h,c;C.isClockWise(o,n,l)?(h=this._getArrowPoints(o,r,t,!1),c=this._getArrowPoints(r,n,l,!0)):(h=this._getArrowPoints(n,r,l,!1),c=this._getArrowPoints(r,o,t,!0));let p=h.length,_=(p-5)/2,w=h.slice(0,_),g=h.slice(_,_+5),d=h.slice(_+5,p),E=c.slice(0,_),T=c.slice(_,_+5),b=c.slice(_+5,p);E=C.getBezierPoints(E);let M=C.getBezierPoints(b.concat(w.slice(1)));return d=C.getBezierPoints(d),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(E.concat(T,M,g,d))))}},Ri=Ea;var iP={material:i.Color.YELLOW.withAlpha(.6),fill:!0},Pa=class extends j{constructor(e){super(),this._maxAnchorSize=4,this._style={...iP,...e},this._graphics=new Ri}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Rt(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},z_=Pa;var F_=Math.PI/2,ba=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=f.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1],s=C.getBaseLength(e),o=s*this.tailWidthFactor,n=s*this.neckWidthFactor,l=s*this.headWidthFactor,h=C.getThirdPoint(r,t,F_,o,!0),c=C.getThirdPoint(r,t,F_,o,!1),p=C.getThirdPoint(t,r,this.headAngle,l,!1),_=C.getThirdPoint(t,r,this.headAngle,l,!0),w=C.getThirdPoint(t,r,this.neckAngle,n,!1),g=C.getThirdPoint(t,r,this.neckAngle,n,!0);return new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions([h,w,p,r,_,g,c])))}},Oi=ba;var rP={material:i.Color.YELLOW.withAlpha(.6),fill:!0},Sa=class extends j{constructor(e){super(),this._maxAnchorSize=2,this._style={...rP,...e},this._graphics=new Oi}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Ot(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},H_=Sa;var sP=Math.PI/2,N_=100,Aa=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.t=.4}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=f.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0];if(this._positions.length===2){let n=C.mid(e[0],e[1]),l=C.distance(e[0],n)/.9,h=C.getThirdPoint(e[0],n,sP,l,!0);e=[e[0],h,e[1]]}let t=C.mid(e[0],e[2]);e.push(t,e[0],e[1]);let r=[];for(let n=0;n<e.length-2;n++){let l=e[n],h=e[n+1],c=e[n+2],p=C.getBisectorNormals(this.t,l,h,c);r=r.concat(p)}let s=r.length;r=[r[s-1]].concat(r.slice(0,s-1));let o=[];for(let n=0;n<e.length-2;n++){let l=e[n],h=e[n+1];o.push(l);for(let c=0;c<=N_;c++){let p=C.getCubicValue(c/N_,l,r[n*2],r[n*2+1],h);o.push(p)}o.push(h)}return new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(o)))}},ki=Aa;var oP={material:i.Color.YELLOW.withAlpha(.6),fill:!0},Ma=class extends j{constructor(e){super(),this._maxAnchorSize=3,this._style={...oP,...e},this._graphics=new ki}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new kt(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},W_=Ma;var Ia=class extends tt{constructor(e){super(e),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,this.headTailFactor=.8,this.swallowTailFactor=1}_createHierarchy(){let e=f.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1];C.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let o=[C.mid(t,r)].concat(e.slice(2)),n=this._getArrowHeadPoints(o,t,r),l=n[0],h=n[4],c=C.distance(t,r),p=C.getBaseLength(o),_=p*this.tailWidthFactor*this.swallowTailFactor,w=C.getThirdPoint(o[1],o[0],0,_,!0),g=c/p,d=this._getArrowBodyPoints(o,l,h,g),E=d.length,T=[t].concat(d.slice(0,E/2));T.push(l);let b=[r].concat(d.slice(E/2,E));return b.push(h),T=C.getQBSplinePoints(T),b=C.getQBSplinePoints(b),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(f.parsePositions(T.concat(n,b.reverse(),[w,T[0]]))))}},zi=Ia;var aP={material:i.Color.YELLOW.withAlpha(.6),fill:!0},Da=class extends j{constructor(e){super(),this._maxAnchorSize=3,this._style={...aP,...e},this._graphics=new zi}_mountEntity(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new zt(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP))}},G_=Da;var La=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._overlay.show=!1,this._delegate=new i.Entity,this._delegate.merge(e.delegate),this._options={},this._positions=[]}get editTool(){return this._viewer.editTool}_mountedHook(){}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[].concat(u.transformWGS84ArrayToCartesianArray(this._overlay.positions)),this._positions.forEach((e,t)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:e,index:t})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now());this._positions[r.index]=t}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now());this._positions[r.index]=t}_onEditStop({pickedAnchor:e,position:t}){this._unbindEvent(),this._viewer.editTool.deactivate(),this._layer.entities.remove(this._delegate),this._stoppedHook()}_bindEvent(){return this.editTool.on(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(x.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(x.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(x.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(x.EDIT_STOP,this._onEditStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._viewer.editTool.activate(t),this._mountedHook(),this._mountAnchor(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.editTool.fire(x.EDIT_STOP,{pickedAnchor:null,position:null}),this}},q=La;var Ra=class extends q{constructor(e){super(e),this._position=void 0}_mountedHook(){this.editTool.tooltipMess="\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._position=this._delegate.position.getValue(i.JulianDate.now()),this._delegate.position=new i.CallbackProperty(()=>this._position,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.position=u.transformCartesianToWGS84(this._position),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_onAnchorMoving({pickedAnchor:e,position:t}){this._position=t}},U_=Ra;var Oa=class extends q{constructor(e){super(e)}_mountedHook(){this._delegate.polyline.positions=new i.CallbackProperty(()=>this._positions.length>1?this._positions:null,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions.filter((e,t)=>t%2===0)),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[];let e=this._overlay.delegate.polyline.positions.getValue(i.JulianDate.now());for(let t=0;t<e.length-1;t++){let r=z(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.push(e[e.length-1]),this._positions.forEach((t,r)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(r.isMid){let o=z(this._positions[s],this._positions[s-1]),n=z(this._positions[s],this._positions[s+1]);this._positions.splice(s,1,o,t,n),this.editTool.fire(x.CLEAR_ANCHOR),this._positions.forEach((l,h)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:l,index:h,isMid:h%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(this._positions[s]=t,!r.isMid&&this._options.maxAnchorSize>2){let o=-1,n=-1,l=-1,h=-1,c=this._positions.length;if(s===0?(l=s+2,h=s+1):r.index===c-1?(o=s-2,n=s-1):(o=s-2,n=s-1,l=s+2,h=s+1),o>0){let p=z(this._positions[o],this._positions[s]);this._positions[n]=p,this.editTool.fire(x.UPDATE_ANCHOR,{index:n,position:p})}if(l>0){let p=z(this._positions[l],this._positions[s]);this._positions[h]=p,this.editTool.fire(x.UPDATE_ANCHOR,{index:h,position:p})}}}},B_=Oa;var ka=class extends q{constructor(e){super(e)}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(e=>this._positions.length>2?new i.PolygonHierarchy(this._positions.map(t=>t.clone())):null,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions.filter((e,t)=>t%2===0)),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[];let e=this._overlay.delegate.polygon.hierarchy.getValue(i.JulianDate.now()).positions;e.push(e[0]);for(let t=0;t<e.length-1;t++){let r=z(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.forEach((t,r)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(r.isMid){let o,n,l=this._positions.length;s===l-1?(o=z(this._positions[s],this._positions[s-1]),n=z(this._positions[s],this._positions[0])):(o=z(this._positions[s],this._positions[s-1]),n=z(this._positions[s],this._positions[s+1])),this._positions.splice(s,1,o,t,n),this.editTool.fire(x.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;this._positions[s]=t;let o=this._positions.length;if(!r.isMid){let n=-1,l=-1,h=-1,c=-1;s===0?(n=o-2,l=o-1,h=s+2,c=s+1):s===o-2?(n=s-2,l=s-1,h=0,c=o-1):(n=s-2,l=s-1,h=s+2,c=s+1);let p=z(this._positions[n],this._positions[s]),_=z(this._positions[h],this._positions[s]);this._positions[l]=p,this._positions[c]=_,this.editTool.fire(x.UPDATE_ANCHOR,{index:l,position:p}),this.editTool.fire(x.UPDATE_ANCHOR,{index:c,position:_})}}},V_=ka;var za=class extends q{constructor(e){super(e),this._center=void 0,this._radius=0}_mountedHook(){this._radius=this._overlay.radius,this._center=u.transformWGS84ToCartesian(this._overlay.center),this._positions=[].concat([this._center,this._computeCirclePoints(this._center,this._radius)[0]]),this._delegate.polygon.hierarchy=new i.CallbackProperty(e=>{if(this._positions.length>1){if(this._radius=i.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let t=this._computeCirclePoints(this._positions[0],this._radius);return t.push(t[0]),new i.PolygonHierarchy(t)}else return null},!1),this._layer.entities.add(this._delegate)}_computeCirclePoints(e,t){let r=[],s=i.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0);return s&&s.outerPositions&&(r=i.Cartesian3.unpackArray(s.outerPositions)),r}_stoppedHook(){this._overlay.center=u.transformCartesianToWGS84(this._positions[0]),this._overlay.radius=this._radius,this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions.forEach((e,t)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:e,index:t,isCenter:t%2===0})})}},j_=za;var Fa=class extends q{constructor(e){super(e),this._overlay=e}_mountedHook(){this._delegate.rectangle.coordinates=new i.CallbackProperty(e=>this._positions.length>1?i.Rectangle.fromCartesianArray(this._positions):null,!1),this._layer.entities.add(this._delegate)}},q_=Fa;var Ha=class extends q{constructor(e){super(e),this._position=void 0}_mountedHook(){this.editTool.tooltipMess="\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._position=this._delegate.position.getValue(i.JulianDate.now()),this._delegate.position=new i.CallbackProperty(()=>this._position,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.position=u.transformCartesianToWGS84(this._position),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_onAnchorMoving({pickedAnchor:e,position:t}){this._position=t}},Y_=Ha;var Na=class extends q{constructor(e){super(e),this._graphics=new tt}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},Z_=Na;var Wa=class extends q{constructor(e){super(e),this._graphics=new Ri}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},X_=Wa;var Ga=class extends q{constructor(e){super(e),this._graphics=new Oi}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},J_=Ga;var Ua=class extends q{constructor(e){super(e),this._graphics=new ki}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},K_=Ua;var Ba=class extends q{constructor(e){super(e),this._graphics=new zi}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},Q_=Ba;var Va=class{constructor(e,t={}){this._viewer=e,this._options=t,this._layer=new i.CustomDataSource("plot-layer"),this._viewer.dataSources.add(this._layer),this._currentWorker=void 0,this._state=void 0}get viewer(){return this._viewer}get layer(){return this._layer}get state(){return this._state}_createDrawWorker(e,t){let r;switch(e){case H.POINT:r=new M_(t);break;case H.POLYLINE:r=new I_(t);break;case H.POLYGON:r=new D_(t);break;case H.CIRCLE:r=new L_(t);break;case H.RECT:r=new R_(t);break;case H.BILLBOARD:r=new O_(t);break;case H.ATTACK_ARROW:r=new k_(t);break;case H.DOUBLE_ARROW:r=new z_(t);break;case H.FINE_ARROW:r=new H_(t);break;case H.TAILED_ATTACK_ARROW:r=new G_(t);break;case H.GATHERING_PLACE:r=new W_(t);break;default:break}return r}_createEditWorker(e){let t;switch(e.type){case H.POINT:t=new U_(e);break;case H.POLYLINE:t=new B_(e);break;case H.POLYGON:t=new V_(e);break;case H.CIRCLE:t=new j_(e);break;case H.RECT:t=new q_(e);break;case H.BILLBOARD:t=new Y_(e);break;case H.ATTACK_ARROW:t=new Z_(e);break;case H.DOUBLE_ARROW:t=new X_(e);break;case H.FINE_ARROW:t=new J_(e);break;case H.TAILED_ATTACK_ARROW:t=new Q_(e);break;case H.GATHERING_PLACE:t=new K_(e);break;default:break}return t}draw(e,t,r={},s=!1){var n;this._state="draw",this._currentWorker&&this._currentWorker.stop();let o=(r==null?void 0:r.maxAnchorSize)||999;return r&&delete r.maxAnchorSize,this._currentWorker=(n=this._createDrawWorker(e,r))==null?void 0:n.start(this,{...this._options,maxAnchorSize:o,onDrawStop:t,clampToModel:s!=null?s:this._options.clampToModel}),this}edit(e,t,r=!1){var s;return this._state="edit",this._currentWorker&&this._currentWorker.stop(),this._currentWorker=(s=this._createEditWorker(e))==null?void 0:s.start(this,{...this._options,onEditStop:t,clampToModel:r!=null?r:this._options.clampToModel}),this}stop(){this._currentWorker&&this._currentWorker.stop(),this._currentWorker=null}destroy(){return this._viewer.dataSources.remove(this._layer),this._viewer=void 0,this}},nP=Va;var ja=class{constructor(e){this._viewer=e,this._options={}}_bindEvent(){}_unbindEvent(){}start(){if(this._viewer.clock.shouldAnimate=!0,this._unbindEvent(),this._options.duration){let e=setTimeout(()=>{this._unbindEvent(),this._options.callback&&this._options.callback.call(this._options.context||this),clearTimeout(e)},Number(this._options.duration)*1e3)}return this._bindEvent(),this}stop(){return this._unbindEvent(),this}},se=ja;var lP={},Y=lP;var qa=class extends se{constructor(e,t={}){super(e),this._options=t,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return Y.AROUND_VIEW}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,t){this._heading+=i.Math.toRadians(this._aroundAmount),(this._heading>=Math.PI*2||this._heading<=-Math.PI*2)&&(this._heading=0),this._viewer.camera.setView({orientation:{heading:this._heading,pitch:this._options.pitch?i.Math.toRadians(this._options.pitch):this._viewer.camera.pitch,roll:this._options.roll?i.Math.toRadians(this._options.roll):this._viewer.camera.roll}})}};Y.AROUND_VIEW="around_view";var $_=qa;var Ya=class extends se{constructor(e,t,r={}){super(e),this._position=f.parsePosition(t),this._options=r,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return Y.AROUND_POINT}set position(e){this._position=f.parsePosition(e)}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,t){this._heading+=i.Math.toRadians(this._aroundAmount),(this._heading>=Math.PI*2||this._heading<=-Math.PI*2)&&(this._heading=0),this._viewer.camera.lookAt(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRange(this._heading,i.Math.toRadians(this._options.pitch||0),this._options.range||1e3))}};Y.AROUND_POINT="around_point";var ef=Ya;var tf=`in vec2 v_textureCoordinates;
1496
1494
  uniform sampler2D colorTexture;
1497
1495
  uniform sampler2D depthTexture;
1498
1496
  uniform vec3 centerWC;
@@ -1538,7 +1536,7 @@ void main() {
1538
1536
  out_FragColor = mix(out_FragColor, color, f);
1539
1537
  }
1540
1538
  }
1541
- `;var zo=class extends te{constructor(e,t,r,s={}){super(e),this._delegate=void 0,this._position=_.parsePosition(t),this._radius=r||100,this._color=s.color||i.Color.RED,this._speed=s.speed||2}get type(){return V.CIRCLE_SCAN}_mountContent(){let e=u.transformWGS84ToCartesian(this._position),t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new i.Cartesian3),r=this;this._delegate=new i.PostProcessStage({name:v.uuid(),fragmentShader:Wc,uniforms:{centerWC:function(){return e},normalWC:function(){return t},radius:function(){return r._radius},speed:function(){return r._speed},color:function(){return r._color}}})}start(){return!this._delegate&&this._mountContent(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate),this}stop(){return this._delegate&&this._viewer.scene.postProcessStages.remove(this._delegate),this._delegate=void 0,this}};V.CIRCLE_SCAN="circle_scan";var Gc=zo;var Ho=class extends te{constructor(e,t={}){super(e),this._options=t,this._positions=[],this._durations=[3],this._currentIndex=0,this._timer=void 0}get type(){return V.FLYING}set positions(e){this._positions=_.parsePositions(e)}get positions(){return this._positions}set durations(e){this._durations=e}get durations(){return this._durations}_cameraFly(){let e=this,t=this._viewer.camera,r=this._positions[this._currentIndex],s=()=>{let o=e._positions[e._currentIndex+1];o?(e._currentIndex++,e._currentIndex<=e._positions.length-1&&(e._timer=setTimeout(()=>{e._cameraFly()},(e._options.dwellTime||1)*1e3))):!o&&e._options.loop&&(e._currentIndex=0,e._timer=setTimeout(()=>{e._cameraFly()},(e._options.dwellTime||1)*1e3)),e._options.callback&&e._options.callback(e._currentIndex)};r&&t.flyTo({destination:u.transformWGS84ToCartesian(r),orientation:{heading:i.Math.toRadians(r.heading),pitch:i.Math.toRadians(r.pitch),roll:i.Math.toRadians(r.roll)},complete:s,duration:this._durations.length===1?this._durations[0]:this._durations[this._currentIndex]})}start(){return this._positions&&this._positions.length&&(this._currentIndex=0,this._cameraFly()),this}pause(){return this._viewer.camera.cancelFlight(),this._timer&&clearTimeout(this._timer),this}restore(){return this._positions&&this._positions.length&&this._cameraFly(),this}};V.FLYING="flying";var Uc=Ho;var No=class extends te{constructor(e,t={}){super(e),this._options=t}get type(){return V.GLOBE_ROTATE}_icrf(e,t){if(e.mode!==i.SceneMode.SCENE3D)return!0;let r=i.Transforms.computeIcrfToFixedMatrix(t);if(r){let s=this._viewer.camera,o=i.Cartesian3.clone(s.position),a=i.Matrix4.fromRotationTranslation(r);s.lookAtTransform(a,o)}}_bindEvent(){this._viewer.clock.multiplier=this._options.speed||12*1e3,this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.scene.postUpdate.addEventListener(this._icrf,this)}_unbindEvent(){this._viewer.clock.multiplier=1,this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.scene.postUpdate.removeEventListener(this._icrf,this)}};V.GLOBE_ROTATE="globe_rotate";var Bc=No;var Vc=`in vec2 v_textureCoordinates;
1539
+ `;var Za=class extends se{constructor(e,t,r,s={}){super(e),this._delegate=void 0,this._position=f.parsePosition(t),this._radius=r||100,this._color=s.color||i.Color.RED,this._speed=s.speed||2}get type(){return Y.CIRCLE_SCAN}_mountContent(){let e=u.transformWGS84ToCartesian(this._position),t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new i.Cartesian3),r=this;this._delegate=new i.PostProcessStage({name:v.uuid(),fragmentShader:tf,uniforms:{centerWC:function(){return e},normalWC:function(){return t},radius:function(){return r._radius},speed:function(){return r._speed},color:function(){return r._color}}})}start(){return!this._delegate&&this._mountContent(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate),this}stop(){return this._delegate&&this._viewer.scene.postProcessStages.remove(this._delegate),this._delegate=void 0,this}};Y.CIRCLE_SCAN="circle_scan";var rf=Za;var Xa=class extends se{constructor(e,t={}){super(e),this._options=t,this._positions=[],this._durations=[3],this._currentIndex=0,this._timer=void 0}get type(){return Y.FLYING}set positions(e){this._positions=f.parsePositions(e)}get positions(){return this._positions}set durations(e){this._durations=e}get durations(){return this._durations}_cameraFly(){let e=this,t=this._viewer.camera,r=this._positions[this._currentIndex],s=()=>{let o=e._positions[e._currentIndex+1];o?(e._currentIndex++,e._currentIndex<=e._positions.length-1&&(e._timer=setTimeout(()=>{e._cameraFly()},(e._options.dwellTime||1)*1e3))):!o&&e._options.loop&&(e._currentIndex=0,e._timer=setTimeout(()=>{e._cameraFly()},(e._options.dwellTime||1)*1e3)),e._options.callback&&e._options.callback(e._currentIndex)};r&&t.flyTo({destination:u.transformWGS84ToCartesian(r),orientation:{heading:i.Math.toRadians(r.heading),pitch:i.Math.toRadians(r.pitch),roll:i.Math.toRadians(r.roll)},complete:s,duration:this._durations.length===1?this._durations[0]:this._durations[this._currentIndex]})}start(){return this._positions&&this._positions.length&&(this._currentIndex=0,this._cameraFly()),this}pause(){return this._viewer.camera.cancelFlight(),this._timer&&clearTimeout(this._timer),this}restore(){return this._positions&&this._positions.length&&this._cameraFly(),this}};Y.FLYING="flying";var sf=Xa;var Ja=class extends se{constructor(e,t={}){super(e),this._options=t}get type(){return Y.GLOBE_ROTATE}_icrf(e,t){if(e.mode!==i.SceneMode.SCENE3D)return!0;let r=i.Transforms.computeIcrfToFixedMatrix(t);if(r){let s=this._viewer.camera,o=i.Cartesian3.clone(s.position),n=i.Matrix4.fromRotationTranslation(r);s.lookAtTransform(n,o)}}_bindEvent(){this._viewer.clock.multiplier=this._options.speed||12*1e3,this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.scene.postUpdate.addEventListener(this._icrf,this)}_unbindEvent(){this._viewer.clock.multiplier=1,this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.scene.postUpdate.removeEventListener(this._icrf,this)}};Y.GLOBE_ROTATE="globe_rotate";var of=Ja;var af=`in vec2 v_textureCoordinates;
1542
1540
  uniform sampler2D colorTexture;
1543
1541
  uniform sampler2D depthTexture;
1544
1542
  uniform vec3 centerWC;
@@ -1608,7 +1606,7 @@ void main() {
1608
1606
  out_FragColor = mix(out_FragColor, color, f + f0);
1609
1607
  }
1610
1608
  }
1611
- `;var Wo=class extends te{constructor(e,t,r,s={}){super(e),this._position=_.parsePosition(t),this._radius=r||100,this._color=s.color||i.Color.BLUE,this._speed=s.speed||3,this._delegate=void 0}get type(){return V.RADAR_SCAN}_mountContent(){let e=u.transformWGS84ToCartesian(this._position),t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new i.Cartesian3),r=new Date().getTime(),s=this;this._delegate=new i.PostProcessStage({name:v.uuid(),fragmentShader:Vc,uniforms:{centerWC:function(){return e},planeNormalWC:function(){return t},lineNormalWC:function(){let o=new i.Quaternion,a=new i.Matrix3,l=i.Cartesian3.cross(i.Cartesian3.UNIT_Z,t,new i.Cartesian3),h=new Date().getTime(),c=i.Math.PI*2*((h-r)/1e4)*s._speed;return i.Quaternion.fromAxisAngle(t,c,o),i.Matrix3.fromQuaternion(o,a),i.Matrix3.multiplyByVector(a,l,l),i.Cartesian3.normalize(l,l),l},radius:function(){return s._radius},color:function(){return s._color}}})}start(){return!this._delegate&&this._mountContent(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate),this}stop(){return this._delegate&&this._viewer.scene.postProcessStages.remove(this._delegate),this._delegate=void 0,this}};V.RADAR_SCAN="radar_scan";var jc=Wo;var Go=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._gradations=1,this._selected=[],this._state=d.INITIALIZED}get type(){return"black_and_white"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set gradations(e){this._gradations=e,this._delegate&&(this._delegate.uniforms.gradations=e)}get gradations(){return this._gradations}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.PostProcessStageLibrary.createBlackAndWhiteStage(),this._delegate&&(this._delegate.uniforms.gradations=this._gradations,this._viewer.scene.postProcessStages.add(this._delegate))}},Yc=Go;var Uo=class{constructor(e){this._viewer=e,this._enable=!1,this._contrast=128,this._brightness=-.3,this._glowOnly=!1,this._delta=1,this._sigma=3.8,this._stepSize=5,this._selected=[],this._state=d.INITIALIZED}get type(){return"bloom"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set contrast(e){this._contrast=e,this._delegate&&(this._delegate.uniforms.contrast=e)}get contrast(){return this._contrast}set brightness(e){this._brightness=e,this._delegate&&(this._delegate.uniforms.brightness=e)}get brightness(){return this._brightness}set glowOnly(e){this._glowOnly=e,this._delegate&&(this._delegate.uniforms.glowOnly=e)}get glowOnly(){return this._glowOnly}set delta(e){this._delta=e,this._delegate&&(this._delegate.uniforms.delta=e)}get delta(){return this._delta}set sigma(e){this._sigma=e,this._delegate&&(this._delegate.uniforms.sigma=e)}get sigma(){return this._sigma}set stepSize(e){this._stepSize=e,this._delegate&&(this._delegate.uniforms.stepSize=e)}get stepSize(){return this._stepSize}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=this._viewer.scene.postProcessStages.bloom,this._delegate.uniforms.contrast=this._contrast,this._delegate.uniforms.brightness=this._brightness,this._delegate.uniforms.glowOnly=this._glowOnly,this._delegate.uniforms.delta=this._delta,this._delegate.uniforms.sigma=this._sigma,this._delegate.uniforms.stepSize=this._stepSize}},Zc=Uo;var Bo=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._intensity=1,this._selected=[],this._state=d.INITIALIZED}get type(){return"brightness"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set intensity(e){this._intensity=e,this._delegate&&(this._delegate.uniforms.brightness=e)}get intensity(){return this._intensity}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.PostProcessStageLibrary.createBrightnessStage(),this._delegate&&(this._delegate.uniforms.brightness=this._intensity,this._viewer.scene.postProcessStages.add(this._delegate))}},qc=Bo;var Vo=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._focalDistance=87,this._delta=1,this._sigma=3.8,this._stepSize=2.5,this._selected=[],this._state=d.INITIALIZED}get type(){return"depth_of_field"}set enable(e){this._enable=e,i.PostProcessStageLibrary.isDepthOfFieldSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set focalDistance(e){this._focalDistance=e,this._delegate&&(this._delegate.uniforms.focalDistance=e)}get focalDistance(){return this._focalDistance}set delta(e){this._delta=e,this._delegate&&(this._delegate.uniforms.delta=e)}get delta(){return this._delta}set sigma(e){this._sigma=e,this._delegate&&(this._delegate.uniforms.sigma=e)}get sigma(){return this._sigma}set stepSize(e){this._stepSize=e,this._delegate&&(this._delegate.uniforms.stepSize=e)}get stepSize(){return this._stepSize}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.PostProcessStageLibrary.createDepthOfFieldStage(),this._delegate&&(this._delegate.uniforms.focalDistance=this._focalDistance,this._delegate.uniforms.delta=this._delta,this._delegate.uniforms.sigma=this._sigma,this._delegate.uniforms.stepSize=this._stepSize,this._viewer.scene.postProcessStages.add(this._delegate))}},Xc=Vo;var jo=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._intensity=6,this._distortion=61,this._dirtAmount=.4,this._haloWidth=.4,this._selected=[],this._state=d.INITIALIZED}get type(){return"lens_flare"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set intensity(e){this._intensity=e,this._delegate&&(this._delegate.uniforms.intensity=e)}get intensity(){return this._intensity}set distortion(e){this._distortion=e,this._delegate&&(this._delegate.uniforms.distortion=e)}get distortion(){return this._distortion}set dirtAmount(e){this._dirtAmount=e,this._delegate&&(this._delegate.uniforms.dirtAmount=e)}get dirtAmount(){return this._dirtAmount}set haloWidth(e){this._haloWidth=e,this._delegate&&(this._delegate.uniforms.haloWidth=e)}get haloWidth(){return this._haloWidth}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.PostProcessStageLibrary.createLensFlareStage(),this._delegate&&(this._delegate.uniforms.intensity=this._intensity,this._delegate.uniforms.distortion=this._distortion,this._delegate.uniforms.dirtAmount=this._dirtAmount,this._delegate.uniforms.haloWidth=this._haloWidth,this._viewer.scene.postProcessStages.add(this._delegate))}},Jc=jo;var Yo=class{constructor(e){this._viewer=e,this._enable=!1,this._selected=[],this._state=d.INITIALIZED}get type(){return"night"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.PostProcessStageLibrary.createNightVisionStage(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate)}},Kc=Yo;var Zo=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._color=i.Color.GREEN,this._length=.5,this._selected=[],this._state=d.INITIALIZED}get type(){return"silhouette"}set enable(e){this._enable=e,i.PostProcessStageLibrary.isSilhouetteSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.color=e)}get color(){return this._color}set length(e){this._length=e,this._delegate&&(this._delegate.uniforms.length=e)}get length(){return this._length}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.PostProcessStageLibrary.createSilhouetteStage(),this._delegate&&(this._delegate.uniforms.color=this._color,this._delegate.uniforms.length=this._length,this._viewer.scene.postProcessStages.add(this._delegate))}},Qc=Zo;var qo=class{constructor(e){if(!e)throw Error("missing viewer param");this._blackAndWhite=new Yc(e),this._bloom=new Zc(e),this._brightness=new qc(e),this._depthOfField=new Xc(e),this._lensFlare=new Jc(e),this._night=new Kc(e),this._silhouette=new Qc(e)}get blackAndWhite(){return this._blackAndWhite}get bloom(){return this._bloom}get brightness(){return this._brightness}get depthOfField(){return this._depthOfField}get lensFlare(){return this._lensFlare}get night(){return this._night}get silhouette(){return this._silhouette}},fu=qo;var $c=`in vec2 v_textureCoordinates;
1609
+ `;var Ka=class extends se{constructor(e,t,r,s={}){super(e),this._position=f.parsePosition(t),this._radius=r||100,this._color=s.color||i.Color.BLUE,this._speed=s.speed||3,this._delegate=void 0}get type(){return Y.RADAR_SCAN}_mountContent(){let e=u.transformWGS84ToCartesian(this._position),t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new i.Cartesian3),r=new Date().getTime(),s=this;this._delegate=new i.PostProcessStage({name:v.uuid(),fragmentShader:af,uniforms:{centerWC:function(){return e},planeNormalWC:function(){return t},lineNormalWC:function(){let o=new i.Quaternion,n=new i.Matrix3,l=i.Cartesian3.cross(i.Cartesian3.UNIT_Z,t,new i.Cartesian3),h=new Date().getTime(),c=i.Math.PI*2*((h-r)/1e4)*s._speed;return i.Quaternion.fromAxisAngle(t,c,o),i.Matrix3.fromQuaternion(o,n),i.Matrix3.multiplyByVector(n,l,l),i.Cartesian3.normalize(l,l),l},radius:function(){return s._radius},color:function(){return s._color}}})}start(){return!this._delegate&&this._mountContent(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate),this}stop(){return this._delegate&&this._viewer.scene.postProcessStages.remove(this._delegate),this._delegate=void 0,this}};Y.RADAR_SCAN="radar_scan";var nf=Ka;var Qa=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._gradations=1,this._selected=[],this._state=m.INITIALIZED}get type(){return"black_and_white"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?m.ENABLED:m.DISABLED}get enable(){return this._enable}set gradations(e){this._gradations=e,this._delegate&&(this._delegate.uniforms.gradations=e)}get gradations(){return this._gradations}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.PostProcessStageLibrary.createBlackAndWhiteStage(),this._delegate&&(this._delegate.uniforms.gradations=this._gradations,this._viewer.scene.postProcessStages.add(this._delegate))}},lf=Qa;var $a=class{constructor(e){this._viewer=e,this._enable=!1,this._contrast=128,this._brightness=-.3,this._glowOnly=!1,this._delta=1,this._sigma=3.8,this._stepSize=5,this._selected=[],this._state=m.INITIALIZED}get type(){return"bloom"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?m.ENABLED:m.DISABLED}get enable(){return this._enable}set contrast(e){this._contrast=e,this._delegate&&(this._delegate.uniforms.contrast=e)}get contrast(){return this._contrast}set brightness(e){this._brightness=e,this._delegate&&(this._delegate.uniforms.brightness=e)}get brightness(){return this._brightness}set glowOnly(e){this._glowOnly=e,this._delegate&&(this._delegate.uniforms.glowOnly=e)}get glowOnly(){return this._glowOnly}set delta(e){this._delta=e,this._delegate&&(this._delegate.uniforms.delta=e)}get delta(){return this._delta}set sigma(e){this._sigma=e,this._delegate&&(this._delegate.uniforms.sigma=e)}get sigma(){return this._sigma}set stepSize(e){this._stepSize=e,this._delegate&&(this._delegate.uniforms.stepSize=e)}get stepSize(){return this._stepSize}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=this._viewer.scene.postProcessStages.bloom,this._delegate.uniforms.contrast=this._contrast,this._delegate.uniforms.brightness=this._brightness,this._delegate.uniforms.glowOnly=this._glowOnly,this._delegate.uniforms.delta=this._delta,this._delegate.uniforms.sigma=this._sigma,this._delegate.uniforms.stepSize=this._stepSize}},hf=$a;var en=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._intensity=1,this._selected=[],this._state=m.INITIALIZED}get type(){return"brightness"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?m.ENABLED:m.DISABLED}get enable(){return this._enable}set intensity(e){this._intensity=e,this._delegate&&(this._delegate.uniforms.brightness=e)}get intensity(){return this._intensity}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.PostProcessStageLibrary.createBrightnessStage(),this._delegate&&(this._delegate.uniforms.brightness=this._intensity,this._viewer.scene.postProcessStages.add(this._delegate))}},cf=en;var tn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._focalDistance=87,this._delta=1,this._sigma=3.8,this._stepSize=2.5,this._selected=[],this._state=m.INITIALIZED}get type(){return"depth_of_field"}set enable(e){this._enable=e,i.PostProcessStageLibrary.isDepthOfFieldSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?m.ENABLED:m.DISABLED}get enable(){return this._enable}set focalDistance(e){this._focalDistance=e,this._delegate&&(this._delegate.uniforms.focalDistance=e)}get focalDistance(){return this._focalDistance}set delta(e){this._delta=e,this._delegate&&(this._delegate.uniforms.delta=e)}get delta(){return this._delta}set sigma(e){this._sigma=e,this._delegate&&(this._delegate.uniforms.sigma=e)}get sigma(){return this._sigma}set stepSize(e){this._stepSize=e,this._delegate&&(this._delegate.uniforms.stepSize=e)}get stepSize(){return this._stepSize}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.PostProcessStageLibrary.createDepthOfFieldStage(),this._delegate&&(this._delegate.uniforms.focalDistance=this._focalDistance,this._delegate.uniforms.delta=this._delta,this._delegate.uniforms.sigma=this._sigma,this._delegate.uniforms.stepSize=this._stepSize,this._viewer.scene.postProcessStages.add(this._delegate))}},pf=tn;var rn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._intensity=6,this._distortion=61,this._dirtAmount=.4,this._haloWidth=.4,this._selected=[],this._state=m.INITIALIZED}get type(){return"lens_flare"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?m.ENABLED:m.DISABLED}get enable(){return this._enable}set intensity(e){this._intensity=e,this._delegate&&(this._delegate.uniforms.intensity=e)}get intensity(){return this._intensity}set distortion(e){this._distortion=e,this._delegate&&(this._delegate.uniforms.distortion=e)}get distortion(){return this._distortion}set dirtAmount(e){this._dirtAmount=e,this._delegate&&(this._delegate.uniforms.dirtAmount=e)}get dirtAmount(){return this._dirtAmount}set haloWidth(e){this._haloWidth=e,this._delegate&&(this._delegate.uniforms.haloWidth=e)}get haloWidth(){return this._haloWidth}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.PostProcessStageLibrary.createLensFlareStage(),this._delegate&&(this._delegate.uniforms.intensity=this._intensity,this._delegate.uniforms.distortion=this._distortion,this._delegate.uniforms.dirtAmount=this._dirtAmount,this._delegate.uniforms.haloWidth=this._haloWidth,this._viewer.scene.postProcessStages.add(this._delegate))}},df=rn;var sn=class{constructor(e){this._viewer=e,this._enable=!1,this._selected=[],this._state=m.INITIALIZED}get type(){return"night"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?m.ENABLED:m.DISABLED}get enable(){return this._enable}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.PostProcessStageLibrary.createNightVisionStage(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate)}},mf=sn;var on=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._color=i.Color.GREEN,this._length=.5,this._selected=[],this._state=m.INITIALIZED}get type(){return"silhouette"}set enable(e){this._enable=e,i.PostProcessStageLibrary.isSilhouetteSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?m.ENABLED:m.DISABLED}get enable(){return this._enable}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.color=e)}get color(){return this._color}set length(e){this._length=e,this._delegate&&(this._delegate.uniforms.length=e)}get length(){return this._length}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.PostProcessStageLibrary.createSilhouetteStage(),this._delegate&&(this._delegate.uniforms.color=this._color,this._delegate.uniforms.length=this._length,this._viewer.scene.postProcessStages.add(this._delegate))}},uf=on;var an=class{constructor(e){if(!e)throw Error("missing viewer param");this._blackAndWhite=new lf(e),this._bloom=new hf(e),this._brightness=new cf(e),this._depthOfField=new pf(e),this._lensFlare=new df(e),this._night=new mf(e),this._silhouette=new uf(e)}get blackAndWhite(){return this._blackAndWhite}get bloom(){return this._bloom}get brightness(){return this._brightness}get depthOfField(){return this._depthOfField}get lensFlare(){return this._lensFlare}get night(){return this._night}get silhouette(){return this._silhouette}},pP=an;var _f=`in vec2 v_textureCoordinates;
1612
1610
  uniform sampler2D colorTexture;
1613
1611
  uniform sampler2D depthTexture;
1614
1612
  uniform vec4 fogByDistance;
@@ -1645,7 +1643,7 @@ void main(void){
1645
1643
  vec4 finalFogColor = vec4(fogColor.rgb, fogColor.a * blendAmount);
1646
1644
  out_FragColor = alphaBlend(finalFogColor, sceneColor);
1647
1645
  }
1648
- `;var Xo=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._fogByDistance={near:10,nearValue:0,far:2e3,farValue:1},this._color=new i.Color(0,0,0,1),this._state=d.INITIALIZED}get type(){return"fog"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set fogByDistance(e){var t,r,s,o;this._fogByDistance=e,this._delegate&&(this._delegate.uniforms.fogByDistance=new i.Cartesian4(((t=this._fogByDistance)==null?void 0:t.near)||10,((r=this._fogByDistance)==null?void 0:r.nearValue)||0,((s=this._fogByDistance)==null?void 0:s.far)||2e3,((o=this._fogByDistance)==null?void 0:o.farValue)||1))}get fogByDistance(){return this._fogByDistance}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.fogColor=e)}get color(){return this._color}_createPostProcessStage(){var e,t,r,s;this._delegate=new i.PostProcessStage({name:this._id,fragmentShader:$c,uniforms:{fogByDistance:new i.Cartesian4(((e=this._fogByDistance)==null?void 0:e.near)||10,((t=this._fogByDistance)==null?void 0:t.nearValue)||0,((r=this._fogByDistance)==null?void 0:r.far)||200,((s=this._fogByDistance)==null?void 0:s.farValue)||1),fogColor:this._color}}),this._viewer.scene.postProcessStages.add(this._delegate)}},ep=Xo;var tp=`in vec2 v_textureCoordinates;
1646
+ `;var nn=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._fogByDistance={near:10,nearValue:0,far:2e3,farValue:1},this._color=new i.Color(0,0,0,1),this._state=m.INITIALIZED}get type(){return"fog"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set fogByDistance(e){var t,r,s,o;this._fogByDistance=e,this._delegate&&(this._delegate.uniforms.fogByDistance=new i.Cartesian4(((t=this._fogByDistance)==null?void 0:t.near)||10,((r=this._fogByDistance)==null?void 0:r.nearValue)||0,((s=this._fogByDistance)==null?void 0:s.far)||2e3,((o=this._fogByDistance)==null?void 0:o.farValue)||1))}get fogByDistance(){return this._fogByDistance}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.fogColor=e)}get color(){return this._color}_createPostProcessStage(){var e,t,r,s;this._delegate=new i.PostProcessStage({name:this._id,fragmentShader:_f,uniforms:{fogByDistance:new i.Cartesian4(((e=this._fogByDistance)==null?void 0:e.near)||10,((t=this._fogByDistance)==null?void 0:t.nearValue)||0,((r=this._fogByDistance)==null?void 0:r.far)||200,((s=this._fogByDistance)==null?void 0:s.farValue)||1),fogColor:this._color}}),this._viewer.scene.postProcessStages.add(this._delegate)}},ff=nn;var gf=`in vec2 v_textureCoordinates;
1649
1647
  uniform sampler2D colorTexture;
1650
1648
  uniform float speed;
1651
1649
  uniform float mixNum;
@@ -1668,7 +1666,7 @@ void main(){
1668
1666
  c*=v*b;
1669
1667
  out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(c,1), mixNum);
1670
1668
  }
1671
- `;var Jo=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._mixNum=.5,this._state=d.INITIALIZED}get type(){return"rain"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}get speed(){return this._speed}set mixNum(e){this._mixNum=e,this._delegate&&(this._delegate.uniforms.mixNum=e)}get mixNum(){return this._mixNum}_createPostProcessStage(){this._delegate=new i.PostProcessStage({name:this._id,fragmentShader:tp,uniforms:{speed:this._speed,mixNum:this._mixNum}}),this._viewer.scene.postProcessStages.add(this._delegate)}},ip=Jo;var rp=`in vec2 v_textureCoordinates;
1669
+ `;var ln=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._mixNum=.5,this._state=m.INITIALIZED}get type(){return"rain"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}get speed(){return this._speed}set mixNum(e){this._mixNum=e,this._delegate&&(this._delegate.uniforms.mixNum=e)}get mixNum(){return this._mixNum}_createPostProcessStage(){this._delegate=new i.PostProcessStage({name:this._id,fragmentShader:gf,uniforms:{speed:this._speed,mixNum:this._mixNum}}),this._viewer.scene.postProcessStages.add(this._delegate)}},yf=ln;var vf=`in vec2 v_textureCoordinates;
1672
1670
  uniform sampler2D colorTexture;
1673
1671
  uniform float speed;
1674
1672
 
@@ -1701,7 +1699,7 @@ void main(){
1701
1699
  finalColor=(vec3(c));
1702
1700
  out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.3);
1703
1701
  }
1704
- `;var Ko=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._state=d.INITIALIZED}get type(){return"snow"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}get speed(){return this._speed}_createPostProcessStage(){this._delegate=new i.PostProcessStage({name:this._id,fragmentShader:rp,uniforms:{speed:this._speed}}),this._viewer.scene.postProcessStages.add(this._delegate)}},sp=Ko;var op="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAgCgAwAEAAAAAQAAAQAAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAQACAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0R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y8hfX9DQIU9T+RoArEU3bV3yU9/ypwjjHUfoaAKGwilCn0rRAiHr+RqZZ414CfpQBlCJj2pPKb0rVMynsfyppkUjAB/KgDKIxTa0mVeyj8qZ5Q9KAKIAowK0BGPQUmwe35UAUgAOhqZX7frUvlD2o8laAEV/cGnbUblhz7Uxov7tM2yelAErRRt0OPwpi25z8rUgEnp+tJ+8/u0ATKzL3qQSt6/pVbL/AN39acN/ofzoAmNwR1H6Go2nbtj9aT5vQ0ZagBvnSe1J5jt1xT8Me36UbT6UAQnd6/rSYcd/1qx5Z9KNh9qAIlLDvSncepP0qTyzQIz7UAQFOOv60qqB3NTeWfajyj/kUARYFPDFehp3lH1FHlH1oATcT1Jpufen+V70eSPWgBm7FJnNS+WtLsHpQBHz6UeWW9Kl2CjFAELRkdaZg1ZIzTNpFAEJWkK1Pg0YYdqAKrCq8lXmBPUVVlX2oAoSVXPWrUq+1ViOaAP/2Q==";var Qo=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._rotateAmount=0,this._enable=!1,this._heading=0,this._state=d.INITIALIZED}get type(){return"cloud"}set enable(e){!this._viewer.scene.mode!==i.SceneMode.SCENE3D&&(this._delegate||this._createPrimitive(),this._enable=this._delegate.show=e,this._enable?this._viewer.scene.postUpdate.addEventListener(this._onRotate,this):this._viewer.scene.postUpdate.removeEventListener(this._onRotate,this))}get enable(){return this._enable}set rotateAmount(e){this._rotateAmount=e}get rotateAmount(){return this._rotateAmount}_onRotate(e,t){this._rotateAmount!==0&&(this._heading+=this._rotateAmount,(this._heading>=360||this._heading<=-360)&&(this._heading=0),this._delegate.modelMatrix=i.Transforms.headingPitchRollToFixedFrame(new i.Cartesian3,new i.HeadingPitchRoll(i.Math.toRadians(this._heading),0,0)))}_createPrimitive(){this._delegate=new i.Primitive({appearance:new i.EllipsoidSurfaceAppearance({material:new i.Material({fabric:{type:"Image",uniforms:{color:new i.Color(1,1,1,1),image:op},components:{alpha:"texture(image, fract(repeat * materialInput.st)).r * color.a",diffuse:"vec3(1.0)"}}}),translucent:!0,aboveGround:!0})}),this._delegate.geometryInstances=new i.GeometryInstance({geometry:new i.EllipsoidGeometry({vertexFormat:i.VertexFormat.POSITION_AND_ST,radii:this._viewer.scene.globe.ellipsoid.radii}),id:this._id}),this._delegate.show=this._enable,this._viewer.scene.primitives.add(this._delegate)}},ap=Qo;var $o=class{constructor(e){if(!e)throw Error("missing viewer param");this._fog=new ep(e),this._rain=new ip(e),this._snow=new sp(e),this._cloud=new ap(e)}get fog(){return this._fog}get rain(){return this._rain}get snow(){return this._snow}get cloud(){return this._cloud}},Tu=$o;var ea=class{constructor(e){this._viewer=e,this._enable=!1,this._moveRate=100,this._rotateRate=.01,this._flags={moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1,turnLeft:!1,turnRight:!1}}set enable(e){this._enable!==e&&this._viewer.scene.mode===i.SceneMode.SCENE3D&&(this._enable=e,this._enable?this._bindEvent():this._unbindEvent())}get enable(){return this._enable}set moveRate(e){this._moveRate=e}get moveRate(){return this._moveRate}set rotateRate(e){this._rotateRate=e}get rotateRate(){return this._rotateRate}_bindEvent(){let e=this._viewer.scene.canvas;e.setAttribute("tabindex","0"),e.addEventListener("click",this._onClick.bind(this),!1),this._viewer.clock.onTick.addEventListener(this._onTick,this),document.addEventListener("keydown",this._onKeydown.bind(this),!1),document.addEventListener("keyup",this._onKeyup.bind(this),!1)}_unbindEvent(){Object.keys(this._flags).forEach(t=>{this._flags[t]=!1});let e=this._viewer.scene.canvas;e.removeAttribute("tabindex"),e.removeEventListener("click",this._onClick,!1),this._viewer.clock.onTick.removeEventListener(this._onTick,this),document.removeEventListener("keydown",this._onKeydown,!1),document.removeEventListener("keyup",this._onKeyup,!1)}_getFlagForKeyCode(e){let t;switch(e.keyCode){case 87:case 38:e.shiftKey?t="moveUp":t="moveForward";break;case 83:case 40:e.shiftKey?t="moveDown":t="moveBackward";break;case 65:case 37:t="moveLeft";break;case 68:case 39:t="moveRight";break;case 81:t="turnLeft";break;case 69:t="turnRight";break;default:break}return t}_onClick(){this._viewer.scene.canvas.focus()}_onKeydown(e){let t=this._getFlagForKeyCode(e);t&&(this._flags[t]=!0)}_onKeyup(e){Object.keys(this._flags).forEach(t=>{this._flags[t]=!1})}_onTick(){let e=this._viewer.scene.camera,r=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(e.position).height/this._moveRate,s=i.Cartesian3.clone(e.position,new i.Cartesian3);this._flags.moveForward&&e.moveForward(r),this._flags.moveBackward&&e.moveBackward(r),this._flags.moveUp&&e.moveUp(r),this._flags.moveDown&&e.moveDown(r),this._flags.moveLeft&&e.moveLeft(r),this._flags.moveRight&&e.moveRight(r),this._flags.turnLeft&&e.rotate(s,-this._rotateRate),this._flags.turnRight&&e.rotate(s,this._rotateRate)}},np=ea;var ta=class{constructor(e){this._viewer=e,this._viewOption={},this._cache={},this._activedPath=void 0}_onPostRender(){if(!this._activedPath)return!1;this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(re.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}addPath(e){return e&&!this._cache.hasOwnProperty(e.pathId)&&(e.pathEvent.fire(re.ADD),this._cache[e.pathId]=e),this}addPaths(e){return Array.isArray(e)&&e.forEach(t=>{this.addPath(t)}),this}removePath(e){return e&&this._cache.hasOwnProperty(e.pathId)&&(delete this._cache[e.pathId],e.pathEvent.fire(re.REMOVE)),this}getPath(e){let t=this.getPaths().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}getPaths(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}activate(e,t={}){var r;return!e||(e==null?void 0:e.pathId)===((r=this._activedPath)==null?void 0:r.pathId)||!this._cache.hasOwnProperty(e==null?void 0:e.pathId)?this:(this._viewOption=t,this._activedPath&&this.deactivate(),this._activedPath=e,this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(re.RESET_TIME_LINE),this._viewer.on(A.POST_RENDER,this._onPostRender,this),this)}deactivate(){return this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this}clear(){return this._cache={},this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this}},lp=ta;var ia=class{constructor(e,t,r){this._id=v.uuid(),this._bid=void 0,this._positions=_.parsePositions(e),this._duration=t||20,this._pathMode=r||"speed",this._timeLine=[],this._sampledPosition=void 0,this._actived=!1,this._endTime=i.JulianDate.now(),this._pathEvent=new Ri,this._pathEvent.on(re.ADD,this._onAdd,this),this._pathEvent.on(re.REMOVE,this._onRemove,this),this._pathEvent.on(re.POST_RENDER,this._onPostRender,this),this._pathEvent.on(re.RESET_TIME_LINE,this._resetTimeLine,this),this._state=d.INITIALIZED}get pathId(){return this._id}set id(e){this._bid=e}get id(){return this._bid}set positions(e){this._positions=_.parsePositions(e)}get positions(){return this._positions}set duration(e){this._duration=e}get duration(){return this._duration}set pathMode(e){this._pathMode=e}get pathMode(){return this._pathMode}get pathEvent(){return this._pathEvent}set actived(e){this._actived=e}get actived(){return this._actived}get state(){return this._state}_onAdd(){this._state=d.ADDED}_onRemove(){this._state=d.REMOVED}_onPostRender({viewer:e,viewOption:t}){if(!this.actived)return!1;let r=i.JulianDate.now();if(i.JulianDate.lessThan(r,this._endTime)&&this._sampledPosition){let s=this._sampledPosition.getValue(r),o=this._sampledPosition.getValue(i.JulianDate.addSeconds(r,.001,new i.JulianDate));s&&o&&e.camera.lookAt(s,new i.HeadingPitchRange(fe(s,o),i.Math.toRadians((t==null?void 0:t.pitch)||-20),(t==null?void 0:t.range)||2e3))}else e.camera.lookAtTransform(i.Matrix4.IDENTITY),this._actived=!1}_resetTimeLine(){if(!this._positions||!this._positions.length)return!1;let e=i.JulianDate.now(),t=0,r=[];if(this._pathMode==="speed"){let s=Q(this._positions)/this._duration;r=this._positions.map((o,a,l)=>(a!==0&&(t+=Q([l[a-1],o])/s),i.JulianDate.addSeconds(e,t,new i.JulianDate)))}else{let s=this._positions.length,o=(this._duration-this._duration%s)/s;r=this._positions.map((a,l)=>i.JulianDate.addSeconds(e,l*o,new i.JulianDate))}this._sampledPosition=new i.SampledPositionProperty,this._sampledPosition.addSamples(r,u.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=i.ExtrapolationType.HOLD,this._sampledPosition.setInterpolationOptions({interpolationDegree:2,interpolationAlgorithm:i.HermitePolynomialApproximation}),this._endTime=r[r.length-1],this._actived=!0}},hp=ia;var Cu={FP:"1",TP:"2",TRACKED:"tracked",FREE:"free"},Ie=Cu;var ra=class{constructor(e){this._viewer=e,this._cache={},this._delegete=new i.CustomDataSource("history-track-layer"),this._viewer.dataSources.add(this._delegete),this._activedTrack=void 0,this._viewOption={},this._stopTime=void 0,this._state=d.INITIALIZED}get delegate(){return this._delegete.entities}get state(){return this._state}_onPostRender(){Object.keys(this._cache).forEach(e=>{let t=this._cache[e];t.trackEvent&&t.trackEvent.fire(ie.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}),this._viewer.scene.requestRender()}addTrack(e){return e&&e.trackEvent&&!this._cache.hasOwnProperty(e.trackId)&&(e.trackEvent.fire(ie.ADD,this),this._cache[e.trackId]=e),this}addTracks(e){return Array.isArray(e)&&e.forEach(t=>{this.addTrack(t)}),this}getTrack(e){let t=this.getTracks().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}removeTrack(e){return e&&e.trackEvent&&this._cache.hasOwnProperty(e.trackId)&&(e.trackEvent.fire(ie.REMOVE,this),delete this._cache[e.trackId]),this}getTracks(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}play(){let e=i.JulianDate.now();return Object.keys(this._cache).forEach(t=>{let r=this._cache[t];r.startTime=e,r.viewed=!1}),this._activedTrack=void 0,this._stopTime=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.on(A.POST_RENDER,this._onPostRender,this),this._state=d.PLAY,this}pause(){return this._stopTime=i.JulianDate.now(),this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._state=d.PAUSE,this}restore(){if(this._state!==d.PAUSE)return this;if(this._stopTime){let e=i.JulianDate.now();Object.keys(this._cache).forEach(t=>{this._cache[t].trackEvent.fire(ie.RESET_TIME_LINE,{stopTime:this._stopTime,duration:i.JulianDate.secondsDifference(e,this._stopTime)})})}return this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.on(A.POST_RENDER,this._onPostRender,this),this._state=d.PLAY,this}viewTrack(e,t={}){if(!this._cache.hasOwnProperty(e.trackId))throw new Error("TrackController: track does not added ");return this._viewOption=t,this._activedTrack&&(this._activedTrack.viewed=!1),e.viewed=!0,this._activedTrack=e,t.mode===Ie.FREE&&(this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0),this}releaseTrack(e){if(!this._cache.hasOwnProperty(e.trackId))throw new Error("TrackController: track does not added ");return e.viewed&&(e.viewed=!1),this._activedTrack=void 0,this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}clear(){return Object.keys(this._cache).forEach(e=>{this.removeTrack(this._cache[e])}),this._activedTrack&&(this._activedTrack.viewed=!1),this._activedTrack=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}},cp=ra;var xu={clampToGround:!1,clampToTileset:!1,interpolationType:"Linear",interpolationDegree:2,endDelayTime:.5,headingOffset:0},Eu={width:2,material:i.Color.ORANGE,clampToGround:!0,depthFailMaterial:i.Color.ORANGE.withAlpha(.8)},sa=class{constructor(e,t,r,s){this._id=v.uuid(),this._bid=void 0,this._positions=_.parsePositions(e),this._duration=t||20,this._callback=r,this._options={...xu,...s},this._controller=void 0,this._sampledPosition=void 0,this._velocityOrientation=void 0,this._viewed=!1,this._delegate=new i.Entity,this._pathPositions=[],this._path=new i.Entity({show:!1,polyline:{positions:new i.CallbackProperty(()=>this._pathPositions,!1)}}),this._positionIndex=0,this._timeLine=[],this._startTime=void 0,this._endTime=void 0,this._trackEvent=new Di,this._trackEvent.on(ie.POST_RENDER,this._onPostRender,this),this._trackEvent.on(ie.ADD,this._onAdd,this),this._trackEvent.on(ie.REMOVE,this._onRemove,this),this._trackEvent.on(ie.RESET_TIME_LINE,this._resetTimeLine,this),this._state=d.INITIALIZED}get currentDistance(){return Q(_.parsePositions(this._pathPositions))}get currentPosition(){let[e]=this._pathPositions.slice(-1);return _.parsePosition(e)}get allDistance(){return Q(this._positions)}get trackId(){return this._id}set id(e){this._bid=e}get id(){return this._bid}set positions(e){this._positions=_.parsePositions(e),this._resetTimeLine({})}get positions(){return this._positions}set duration(e){this._duration=e,this._resetTimeLine({})}get duration(){return this._duration}set startTime(e){e instanceof Date?this._startTime=i.JulianDate.fromDate(e):this._startTime=e,this._resetTimeLine({})}get startTime(){return this._startTime}set viewed(e){this._viewed=e}get viewed(){return this._viewed}get trackEvent(){return this._trackEvent}get state(){return this._state}_onAdd(e){if(!e)return!1;this._controller=e,this._controller.delegate.add(this._delegate),this._controller.delegate.add(this._path),!this._startTime&&(this._startTime=i.JulianDate.now()),this._state=d.ADDED}_onRemove(){if(!this._controller)return!1;this._controller.delegate.remove(this._delegate),this._controller.delegate.remove(this._path),this._viewed=!1,this._startTime=void 0,this._state=d.REMOVED}_onPostRender({viewer:e,viewOption:t}){if(!this._startTime||!this._endTime)return!1;let r=i.JulianDate.now();if(i.JulianDate.lessThanOrEquals(r,this._endTime)){let s=this._sampledPosition.getValue(r);if(!s)return!1;this._pathPositions.push(s),this._options.clampToTileset?this._delegate.position=e.scene.clampToHeight(s,[this._delegate]):this._delegate.position=s;let o=this._velocityOrientation.getValue(r);if(o){let l=i.Quaternion.fromHeadingPitchRoll(new i.HeadingPitchRoll(i.Math.toRadians(this._options.headingOffset||0),0,0),new i.Quaternion);this._delegate.orientation=i.Quaternion.multiply(o,l,new i.Quaternion)}let a=this._timeLine[this._positionIndex];if(a){let l=i.JulianDate.secondsDifference(r,a);if(l>=0&&l<=1){let h=this._positions[this._positionIndex]||void 0;if(h&&o){let c=i.Matrix3.fromQuaternion(o),p=i.Matrix4.fromRotationTranslation(c,s),f=i.Transforms.fixedFrameToHeadingPitchRoll(p);h.heading=i.Math.toDegrees(f.heading),h.pitch=i.Math.toDegrees(f.pitch),h.roll=i.Math.toDegrees(f.roll)}this._callback&&this._callback(h,this._positionIndex+1===this._positions.length),this._positionIndex++,this._options.loop&&this._positionIndex===this._positions.length&&this._restart()}}}this._setCameraView(e,t)}_restart(){this._startTime=i.JulianDate.now(),this._resetTimeLine({})}_setCameraView(e,t){var s,o,a;if(!this._viewed)return!1;let r=i.JulianDate.now();if(i.JulianDate.greaterThan(r,this._endTime))e.camera.lookAtTransform(i.Matrix4.IDENTITY),e.delegate.trackedEntity&&(e.delegate.trackedEntity=void 0),this._viewed=!1;else{let l=this._sampledPosition.getValue(r),h=this._sampledPosition.getValue(i.JulianDate.addSeconds(r,1/60,new i.JulianDate));l&&h&&((t==null?void 0:t.mode)===Ie.TRACKED&&((o=(s=e.delegate)==null?void 0:s.trackedEntity)==null?void 0:o.id)!==((a=this._delegate)==null?void 0:a.id)?e.delegate.trackedEntity=this._delegate:(t==null?void 0:t.mode)===Ie.FP?e.camera.lookAt(l,new i.HeadingPitchRange(fe(l,h),i.Math.toRadians((t==null?void 0:t.pitch)||0),(t==null?void 0:t.range)||10)):(t==null?void 0:t.mode)===Ie.TP&&e.camera.lookAt(l,new i.HeadingPitchRange(0,i.Math.toRadians((t==null?void 0:t.pitch)||-90),(t==null?void 0:t.range)||1e3)))}}_resetTimeLine(e){var r;if(!this._startTime||!this._duration||!((r=this._positions)!=null&&r.length))return!1;let t=0;if(!(e!=null&&e.stopTime)&&!(e!=null&&e.duration)){let s=Q(this._positions)/this._duration;this._timeLine=this._positions.map((o,a,l)=>(a!==0&&(t+=Q([l[a-1],o])/s),i.JulianDate.addSeconds(this._startTime,t,new i.JulianDate))),this._pathPositions=[],this._positionIndex=0}else e!=null&&e.stopTime&&(e!=null&&e.duration)&&(this._duration+=e.duration,this._timeLine=this._timeLine.map(s=>(i.JulianDate.greaterThan(s,e.stopTime)&&(s=i.JulianDate.addSeconds(s,e.duration,new i.JulianDate)),s)));this._sampledPosition=new i.SampledPositionProperty,this._sampledPosition.addSamples(this._timeLine,u.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=i.ExtrapolationType.HOLD,this._options.interpolationType==="Hermite"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||2,interpolationAlgorithm:i.HermitePolynomialApproximation}):this._options.interpolationType==="Linear"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||1,interpolationAlgorithm:i.LinearApproximation}):this._options.interpolationType==="Lagrange"&&this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||5,interpolationAlgorithm:i.LagrangePolynomialApproximation}),this._velocityOrientation=new i.VelocityOrientationProperty(this._sampledPosition),this._endTime=i.JulianDate.addSeconds(this._timeLine[this._timeLine.length-1],this._options.endDelayTime,new i.JulianDate)}addPosition(e,t){return this._positions.push(_.parsePosition(e)),this._duration+=t,this._resetTimeLine({}),this}setModel(e,t){return this._delegate.model={...t,uri:e,heightReference:this._options.clampToGround?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE},this}setBillboard(e,t){return this._delegate.billboard={...t,image:e,heightReference:this._options.clampToGround?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE},this}setLabel(e,t){return this._delegate.label={...t,text:e,heightReference:this._options.clampToGround?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE},this}setPath(e,t={}){return this._path.show=!!e,v.merge(this._path.polyline,Eu,t),this}},pp=sa;var Pu={ANGLE:"angle",AREA:"area",AREA_HEIGHT:"area_height",AREA_SURFACE:"area_surface",DISTANCE:"distance",DISTANCE_SURFACE:"distance_surface",HEADING:"heading",HEIGHT:"height",TRIANGLE_HEIGHT:"triangle_height"},se=Pu;var oa=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e),this._options.onCalc&&this._options.onCalc(this._positions)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._options.onDrawStop&&this._options.onDrawStop(this._delegate)}_bindEvent(){this.drawTool.on(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(C.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(C.DRAW_STOP,this._onDrawStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(t),this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},Kt=oa;var aa=class extends Kt{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Entity({polyline:{...this._style,positions:new i.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),t>0&&this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP,e))}},oe=aa;var na=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._delegate=new i.Entity,this._delegate.merge(e),this._options={},this._positions=[]}get editTool(){return this._viewer.editTool}_mountedHook(){}_mountAnchor(){}_onAnchorMoving({pickedAnchor:e,position:t}){}_onEditAnchorStop({pickedAnchor:e,position:t}){}_onEditStop({pickedAnchor:e,position:t}){this._unbindEvent(),this._viewer.editTool.deactivate()}_bindEvent(){return this.editTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(C.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(C.EDIT_STOP,this._onEditStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.editTool.activate(t),this._mountedHook(),this._mountAnchor(),this._unbindEvent(),this._bindEvent(),this}},Qt=na;var la=class extends Qt{constructor(e){super(e)}_mountedHook(){this.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._delegate.polyline.positions=new i.CallbackProperty(()=>this._positions.length>1?this._positions:null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polyline.positions.getValue(i.JulianDate.now()));if(this._options.maxAnchorSize>2){for(let t=0;t<e.length-1;t++){let r=k(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.push(e[e.length-1]),this._positions.forEach((t,r)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}else this._positions=e,this._positions.forEach((t,r)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:t,index:r})});this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(r.isMid){let o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1]);this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((l,h)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:l,index:h,isMid:h%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(this._positions[s]=t,!r.isMid&&this._options.maxAnchorSize>2){let o=-1,a=-1,l=-1,h=-1,c=this._positions.length;if(s===0?(l=s+2,h=s+1):r.index===c-1?(o=s-2,a=s-1):(o=s-2,a=s-1,l=s+2,h=s+1),o>0){let p=k(this._positions[o],this._positions[s]);this._positions[a]=p,this.editTool.fire(C.UPDATE_ANCHOR,{index:a,position:p})}if(l>0){let p=k(this._positions[l],this._positions[s]);this._positions[h]=p,this.editTool.fire(C.UPDATE_ANCHOR,{index:h,position:p})}}this._options.onCalc&&this._options.onCalc(this._positions)}},ae=la;var ha=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new i.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._options={}}_getSampledHeight(e,t=!1){let r=this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof i.EllipsoidTerrainProvider)?i.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(o=>i.Cartographic.fromCartesian(o))):Promise.resolve(e.map(o=>i.Cartographic.fromCartesian(o))),s=this._viewer.scene.clampToHeightSupported&&t?this._viewer.scene.clampToHeightMostDetailed(e,this._layer.entities.values):Promise.resolve(e);return Promise.all([r,s])}_onDrawStop(e){}_onCalc(e){}_startHook(e,t){this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._options.onDrawStop=this._onDrawStop.bind(this),this._options.onCalc=this._onCalc.bind(this),this._layer.entities.add(this._startLabel),this._layer.entities.add(this._resultLabel)}start(e,t){return this}},Z=ha;var ca=class extends Z{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Entity({polyline:{positions:new i.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ae(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[1];let t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cartesian3),r=i.Plane.fromPointNormal(e[0],t);this._helpLinePositions=[e[0],i.Plane.projectPointOntoPlane(r,e[1],new i.Cartesian3),e[1]];let s=Math.abs(i.Plane.getPointDistance(r,e[1]));this._resultLabel.label.text=`\u89D2\u5EA6\uFF1A${i.Math.toDegrees(Math.asin(s/i.Cartesian3.distance(e[0],e[1]))).toFixed(2)} \u5EA6`}}start(e,t){this._startHook(e,t);let r=new i.PolylineDashMaterialProperty({color:i.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),new oe({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},dp=ca;var pa=class extends Kt{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>2?new i.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e})}},We=pa;var da=class extends Qt{constructor(e){super(e)}_mountedHook(){this.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._delegate.polygon.hierarchy=new i.CallbackProperty(e=>this._positions.length>2?new i.PolygonHierarchy(this._positions):null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polygon.hierarchy.getValue(i.JulianDate.now()).positions);e.push(e[0]);for(let t=0;t<e.length-1;t++){let r=k(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.forEach((t,r)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})}),this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(r.isMid){let o,a,l=this._positions.length;s===l-1?(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[0])):(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1])),this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;this._positions[s]=t;let o=this._positions.length;if(!r.isMid){let a=-1,l=-1,h=-1,c=-1;s===0?(a=o-2,l=o-1,h=s+2,c=s+1):s===o-2?(a=s-2,l=s-1,h=0,c=o-1):(a=s-2,l=s-1,h=s+2,c=s+1);let p=k(this._positions[a],this._positions[s]),f=k(this._positions[h],this._positions[s]);this._positions[l]=p,this._positions[c]=f,this.editTool.fire(C.UPDATE_ANCHOR,{index:l,position:p}),this.editTool.fire(C.UPDATE_ANCHOR,{index:c,position:f})}this._options.onCalc&&this._options.onCalc(this._positions)}},Ge=da;var ma=class extends Z{constructor(){super()}_onDrawStop(e){new Ge(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var t;e.length>2&&(this._resultLabel.position=(t=i.BoundingSphere.fromPoints(e))==null?void 0:t.center,this._resultLabel.label.text=`\u9762\u79EF\uFF1A${ue(e).toFixed(2)} \u5E73\u65B9\u7C73`)}start(e,t){return this._startHook(e,t),new We({material:t.material||i.Color.YELLOW.withAlpha(.6),perPositionHeight:!0}).start(e,this._options),this}},mp=ma;var ua=class extends Z{constructor(){super()}_onDrawStop(e){new Ge(e).start({viewer:this._viewer,layer:this._layer},this._options)}_lerp(e,t=4){let r=[];for(let s=0;s<t;++s)for(let o=0;o<t;++o){let a=i.Math.lerp(e.west,e.east,o/(t-1)),l=i.Math.lerp(e.south,e.north,s/(t-1));r.push(i.Cartesian3.fromRadians(a,l))}return r}_onCalc(e){if(e.length>2){let t=this._lerp(i.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(t,!0).then(([r,s])=>r.map((o,a)=>({lng:o.longitude,lat:o.latitude,alt:Math.max(o.height||0,s[a]?i.Cartographic.fromCartesian(s[a]).height:0)}))).then(r=>{let s=0,o;r.forEach(a=>{a.alt>s&&(s=a.alt,o=a)}),o&&(this._resultLabel.position=i.Cartesian3.fromRadians(o.lng,o.lat,o.alt),this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${s.toFixed(2)} \u7C73`)})}}start(e,t){return this._startHook(e,t),new We({material:t.material||i.Color.YELLOW.withAlpha(.6)}).start(e,this._options),this}},up=ua;var _a=class extends Z{constructor(){super()}_lerp(e,t=4){let r=[];for(let s=0;s<t;++s)for(let o=0;o<t;++o){let a=i.Math.lerp(e.west,e.east,o/(t-1)),l=i.Math.lerp(e.south,e.north,s/(t-1));r.push(i.Cartesian3.fromRadians(a,l))}return r}_onDrawStop(e){new Ge(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var t;if(e.length>2){this._resultLabel.position=(t=i.BoundingSphere.fromPoints(e))==null?void 0:t.center;let r=this._lerp(i.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(r.concat(e),!1).then(([s])=>s.map(o=>i.Cartesian3.fromDegrees(i.Math.toDegrees(o.longitude),i.Math.toDegrees(o.latitude),o.height))).then(s=>{this._resultLabel.label.text=`\u9762\u79EF\uFF1A${ue(s).toFixed(2)} \u5E73\u65B9\u7C73`})}}start(e,t){return this._startHook(e,t),new We({material:t.material||i.Color.YELLOW.withAlpha(.6)}).start(e,this._options),this}},_p=_a;var fa=class extends Z{constructor(){super(),this._maxAnchorSize=9999}_onDrawStop(e){new ae(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[e.length-1];let t=0;for(let r=0;r<e.length-1;r++){let s=i.Cartesian3.distance(e[r],e[r+1]);t+=s}this._resultLabel.label.text=t>1e3?`\u8DDD\u79BB\uFF1A${(t/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${t.toFixed(2)} \u7C73`}}start(e,t){return this._startHook(e,t),new oe({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},fp=fa;var ga=class extends Z{constructor(){super(),this._maxAnchorSize=9999}_lerp(e,t,r=5){let s=[],o=i.Cartographic.fromCartesian(e),a=i.Cartographic.fromCartesian(t);for(let l=0;l<r;l++){let h=i.Math.lerp(o.longitude,a.longitude,l/r),c=i.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push(i.Cartesian3.fromRadians(h,c,p))}return s}_onDrawStop(e){new ae(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let t=[e[0]];this._resultLabel.position=e[e.length-1];for(let r=0;r<e.length-1;r++)t=t.concat(this._lerp(e[r],e[r+1],this._options.lerpNum));t.push(e[e.length-1]),this._getSampledHeight(t).then(([r,s])=>r.map((o,a)=>i.Cartesian3.fromDegrees(i.Math.toDegrees(o.longitude),i.Math.toDegrees(o.latitude),Math.max(o.height||0,s[a]?i.Cartographic.fromCartesian(s[a]).height:0)))).then(r=>{let s=0;for(let o=0;o<r.length-1;o++){let a=i.Cartesian3.distance(r[o],r[o+1]);s+=a}this._resultLabel.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`})}}start(e,t){return this._startHook(e,t),new oe({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},gp=ga;var ya=class extends Z{constructor(){super(),this._maxAnchorSize=2}_onDrawStop(e){new ae(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){e.length>0&&(this._startLabel.position=e[0]),e.length>1&&(this._resultLabel.position=e[e.length-1],this._resultLabel.label.text=`\u504F\u822A\uFF1A${i.Math.toDegrees(fe(e[0],e[1])).toFixed(1)} \u5EA6`)}start(e,t){return this._startHook(e,t),new oe({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},yp=ya;var va=class extends Z{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Entity({polyline:{positions:new i.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ae(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[1];let t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cartesian3),r=i.Plane.fromPointNormal(e[0],t);this._helpLinePositions=[e[0],i.Plane.projectPointOntoPlane(r,e[1],new i.Cartesian3),e[1]];let s=Math.abs(i.Plane.getPointDistance(r,e[1]));this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${s.toFixed(2)} \u7C73`}}start(e,t){this._startHook(e,t);let r=new i.PolylineDashMaterialProperty({color:i.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),new oe({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},vp=va;var wa=class extends Z{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Entity({polyline:{positions:new i.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}}),this._lengthLabel=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._heightLabel=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._distanceLabel=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}})}_onDrawStop(e){new ae(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cartesian3),r=i.Plane.fromPointNormal(e[0],t),s=i.Plane.projectPointOntoPlane(r,e[1],new i.Cartesian3);this._helpLinePositions=[e[0],s,e[1]];let o=i.Cartesian3.distance(e[0],s),a=Math.abs(i.Plane.getPointDistance(r,e[1])),l=i.Cartesian3.distance(e[0],e[1]);this._lengthLabel.position=i.Cartesian3.midpoint(e[0],s,new i.Cartesian3),this._lengthLabel.label.text=o>1e3?`${(o/1e3).toFixed(2)} \u516C\u91CC`:`${o.toFixed(2)} \u7C73`,this._distanceLabel.position=i.Cartesian3.midpoint(e[0],e[1],new i.Cartesian3),this._distanceLabel.label.text=l>1e3?`${(l/1e3).toFixed(2)} \u516C\u91CC`:`${l.toFixed(2)} \u7C73`,this._heightLabel.position=i.Cartesian3.midpoint(s,e[1],new i.Cartesian3),this._heightLabel.label.text=a>1e3?`${(a/1e3).toFixed(2)} \u516C\u91CC`:`${a.toFixed(2)} \u7C73`}}start(e,t){this._startHook(e,t);let r=new i.PolylineDashMaterialProperty({color:i.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),this._layer.entities.add(this._lengthLabel),this._layer.entities.add(this._heightLabel),this._layer.entities.add(this._distanceLabel),new oe({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},wp=wa;var Ta=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new i.CustomDataSource("measure-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}angle(e={}){return new dp().start(this,e),this}area(e={}){return new mp().start(this,e),this}areaHeight(e={}){return new up().start(this,e),this}areaSurface(e={}){return new _p().start(this,e),this}distance(e={}){return new fp().start(this,e),this}distanceSurface(e={}){return new gp().start(this,e),this}heading(e={}){return new yp().start(this,e),this}height(e={}){return new vp().start(this,e),this}triangleHeight(e={}){return new wp().start(this,e),this}activate(e,t){switch(e){case se.ANGLE:this.angle(t);break;case se.AREA:this.area(t);break;case se.AREA_HEIGHT:this.areaHeight(t);break;case se.AREA_SURFACE:this.areaSurface(t);break;case se.DISTANCE:this.distance(t);break;case se.DISTANCE_SURFACE:this.distanceSurface(t);break;case se.HEADING:this.heading(t);break;case se.HEIGHT:this.height(t);break;case se.TRIANGLE_HEIGHT:this.triangleHeight(t);break;default:break}return this}deactivate(){return this._layer.entities.removeAll(),this._viewer.drawTool.tooltipMess="",this._viewer.drawTool.deactivate(),this._viewer.editTool.tooltipMess="",this._viewer.editTool.deactivate(),this}},Tp=Ta;var bu={SIGHT_LINE:"sightLine"},$t=bu;var Su={PROFILE:"profile"},ei=Su;var Ca=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._color=i.Color.YELLOW,this._width=1,this._spacing=100,this._state=d.INITIALIZED}get type(){return"contourLine"}set enable(e){this._enable=e,e&&this._viewer?this._createAnalysis():(this._delegate&&(this._delegate=null),this._viewer&&(this._viewer.scene.globe.material=null))}get enable(){return this._enable}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.color=e)}get color(){return this._color}set width(e){this._width=e,this._delegate&&(this._delegate.uniforms.width=e)}get width(){return this._width}set spacing(e){this._spacing=e,this._delegate&&(this._delegate.uniforms.spacing=e)}get spacing(){return this._spacing}_init(e,t,r){this._enable=!0,this._color=e||i.Color.YELLOW,this._width=t||1,this._spacing=r||100,this._enable&&this._viewer&&this._createAnalysis()}deactivate(){this._enable=!1,this._delegate&&(this._delegate=null),this._viewer&&(this._viewer.scene.globe.material=null)}_createAnalysis(){let e=this._viewer.scene.globe,t=i.Material.fromType("ElevationContour"),r=t.uniforms;r.width=this._width,r.spacing=this._spacing,r.color=this._color,e.material=t,this._delegate=t}},Cp=Ca;var xa=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._enable=!1,this._positions=[],this._maxDistance=5,this._speed=1e3,this._maxHeight=20,this._inRangeColor=i.Color.YELLOW,this._outRangeColor=i.Color.WHITE,this._state=d.INITIALIZED}get type(){return"tilesetShake"}set enable(e){this._enable=e,this.tileset_arr.forEach(t=>{let r=null;this._enable?r=this._getShader(t.tileset2):r=new window.GM.CustomShader,t.tileset.setCustomShader(r)})}get enable(){return this._enable}set maxDistance(e){this._maxDistance=e,this._enable&&this._changeSettings()}get maxDistance(){return this._maxDistance}set speed(e){this._speed=e,this._enable&&this._changeSettings()}get speed(){return this._speed}set maxHeight(e){this._maxHeight=e,this._enable&&this._changeSettings()}get maxHeight(){return this._maxHeight}_getShader(e){let t=e.boundingSphere.center.clone(),r=i.Transforms.eastNorthUpToFixedFrame(t),s=i.Matrix4.inverse(r,new i.Matrix4);return new i.CustomShader({uniforms:{M_LocaltoWorld:{type:i.UniformType.MAT4,value:r},M_WorldtoLocal:{type:i.UniformType.MAT4,value:s},center:{type:i.UniformType.VEC3,value:t},MAX_Distance:{type:i.UniformType.FLOAT,value:this._maxDistance},Speed:{type:i.UniformType.FLOAT,value:this._speed},height:{type:i.UniformType.FLOAT,value:this._maxHeight}},vertexShaderText:this._getVs(),fragmentShaderText:this._getFs()})}_changeSettings(){this.tileset_arr.forEach(e=>{let t=this._getShader(e.tileset2);e.tileset.setCustomShader(t)})}_getVs(){return`
1702
+ `;var hn=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._state=m.INITIALIZED}get type(){return"snow"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}get speed(){return this._speed}_createPostProcessStage(){this._delegate=new i.PostProcessStage({name:this._id,fragmentShader:vf,uniforms:{speed:this._speed}}),this._viewer.scene.postProcessStages.add(this._delegate)}},wf=hn;var Cf="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAgCgAwAEAAAAAQAAAQAAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAQACAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDABQQEBkSGScXFycyJh8mMi4mJiYmLj41NTU1NT5EQUFBQUFBRERERERERERERERERERERERERERERERERERERET/2wBDARUZGSAcICYYGCY2JiAmN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ofzoAmNwR1H6Go2nbtj9aT5vQ0ZagBvnSe1J5jt1xT8Me36UbT6UAQnd6/rSYcd/1qx5Z9KNh9qAIlLDvSncepP0qTyzQIz7UAQFOOv60qqB3NTeWfajyj/kUARYFPDFehp3lH1FHlH1oATcT1Jpufen+V70eSPWgBm7FJnNS+WtLsHpQBHz6UeWW9Kl2CjFAELRkdaZg1ZIzTNpFAEJWkK1Pg0YYdqAKrCq8lXmBPUVVlX2oAoSVXPWrUq+1ViOaAP/2Q==";var cn=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._rotateAmount=0,this._enable=!1,this._heading=0,this._state=m.INITIALIZED}get type(){return"cloud"}set enable(e){!this._viewer.scene.mode!==i.SceneMode.SCENE3D&&(this._delegate||this._createPrimitive(),this._enable=this._delegate.show=e,this._enable?this._viewer.scene.postUpdate.addEventListener(this._onRotate,this):this._viewer.scene.postUpdate.removeEventListener(this._onRotate,this))}get enable(){return this._enable}set rotateAmount(e){this._rotateAmount=e}get rotateAmount(){return this._rotateAmount}_onRotate(e,t){this._rotateAmount!==0&&(this._heading+=this._rotateAmount,(this._heading>=360||this._heading<=-360)&&(this._heading=0),this._delegate.modelMatrix=i.Transforms.headingPitchRollToFixedFrame(new i.Cartesian3,new i.HeadingPitchRoll(i.Math.toRadians(this._heading),0,0)))}_createPrimitive(){this._delegate=new i.Primitive({appearance:new i.EllipsoidSurfaceAppearance({material:new i.Material({fabric:{type:"Image",uniforms:{color:new i.Color(1,1,1,1),image:Cf},components:{alpha:"texture(image, fract(repeat * materialInput.st)).r * color.a",diffuse:"vec3(1.0)"}}}),translucent:!0,aboveGround:!0})}),this._delegate.geometryInstances=new i.GeometryInstance({geometry:new i.EllipsoidGeometry({vertexFormat:i.VertexFormat.POSITION_AND_ST,radii:this._viewer.scene.globe.ellipsoid.radii}),id:this._id}),this._delegate.show=this._enable,this._viewer.scene.primitives.add(this._delegate)}},Tf=cn;var pn=class{constructor(e){if(!e)throw Error("missing viewer param");this._fog=new ff(e),this._rain=new yf(e),this._snow=new wf(e),this._cloud=new Tf(e)}get fog(){return this._fog}get rain(){return this._rain}get snow(){return this._snow}get cloud(){return this._cloud}},fP=pn;var dn=class{constructor(e){this._viewer=e,this._enable=!1,this._moveRate=100,this._rotateRate=.01,this._flags={moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1,turnLeft:!1,turnRight:!1}}set enable(e){this._enable!==e&&this._viewer.scene.mode===i.SceneMode.SCENE3D&&(this._enable=e,this._enable?this._bindEvent():this._unbindEvent())}get enable(){return this._enable}set moveRate(e){this._moveRate=e}get moveRate(){return this._moveRate}set rotateRate(e){this._rotateRate=e}get rotateRate(){return this._rotateRate}_bindEvent(){let e=this._viewer.scene.canvas;e.setAttribute("tabindex","0"),e.addEventListener("click",this._onClick.bind(this),!1),this._viewer.clock.onTick.addEventListener(this._onTick,this),document.addEventListener("keydown",this._onKeydown.bind(this),!1),document.addEventListener("keyup",this._onKeyup.bind(this),!1)}_unbindEvent(){Object.keys(this._flags).forEach(t=>{this._flags[t]=!1});let e=this._viewer.scene.canvas;e.removeAttribute("tabindex"),e.removeEventListener("click",this._onClick,!1),this._viewer.clock.onTick.removeEventListener(this._onTick,this),document.removeEventListener("keydown",this._onKeydown,!1),document.removeEventListener("keyup",this._onKeyup,!1)}_getFlagForKeyCode(e){let t;switch(e.keyCode){case 87:case 38:e.shiftKey?t="moveUp":t="moveForward";break;case 83:case 40:e.shiftKey?t="moveDown":t="moveBackward";break;case 65:case 37:t="moveLeft";break;case 68:case 39:t="moveRight";break;case 81:t="turnLeft";break;case 69:t="turnRight";break;default:break}return t}_onClick(){this._viewer.scene.canvas.focus()}_onKeydown(e){let t=this._getFlagForKeyCode(e);t&&(this._flags[t]=!0)}_onKeyup(e){Object.keys(this._flags).forEach(t=>{this._flags[t]=!1})}_onTick(){let e=this._viewer.scene.camera,r=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(e.position).height/this._moveRate,s=i.Cartesian3.clone(e.position,new i.Cartesian3);this._flags.moveForward&&e.moveForward(r),this._flags.moveBackward&&e.moveBackward(r),this._flags.moveUp&&e.moveUp(r),this._flags.moveDown&&e.moveDown(r),this._flags.moveLeft&&e.moveLeft(r),this._flags.moveRight&&e.moveRight(r),this._flags.turnLeft&&e.rotate(s,-this._rotateRate),this._flags.turnRight&&e.rotate(s,this._rotateRate)}},xf=dn;var mn=class{constructor(e){this._viewer=e,this._viewOption={},this._cache={},this._activedPath=void 0}_onPostRender(){if(!this._activedPath)return!1;this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(ne.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}addPath(e){return e&&!this._cache.hasOwnProperty(e.pathId)&&(e.pathEvent.fire(ne.ADD),this._cache[e.pathId]=e),this}addPaths(e){return Array.isArray(e)&&e.forEach(t=>{this.addPath(t)}),this}removePath(e){return e&&this._cache.hasOwnProperty(e.pathId)&&(delete this._cache[e.pathId],e.pathEvent.fire(ne.REMOVE)),this}getPath(e){let t=this.getPaths().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}getPaths(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}activate(e,t={}){var r;return!e||(e==null?void 0:e.pathId)===((r=this._activedPath)==null?void 0:r.pathId)||!this._cache.hasOwnProperty(e==null?void 0:e.pathId)?this:(this._viewOption=t,this._activedPath&&this.deactivate(),this._activedPath=e,this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(ne.RESET_TIME_LINE),this._viewer.on(D.POST_RENDER,this._onPostRender,this),this)}deactivate(){return this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this}clear(){return this._cache={},this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this}},Ef=mn;var un=class{constructor(e,t,r){this._id=v.uuid(),this._bid=void 0,this._positions=f.parsePositions(e),this._duration=t||20,this._pathMode=r||"speed",this._timeLine=[],this._sampledPosition=void 0,this._actived=!1,this._endTime=i.JulianDate.now(),this._pathEvent=new vr,this._pathEvent.on(ne.ADD,this._onAdd,this),this._pathEvent.on(ne.REMOVE,this._onRemove,this),this._pathEvent.on(ne.POST_RENDER,this._onPostRender,this),this._pathEvent.on(ne.RESET_TIME_LINE,this._resetTimeLine,this),this._state=m.INITIALIZED}get pathId(){return this._id}set id(e){this._bid=e}get id(){return this._bid}set positions(e){this._positions=f.parsePositions(e)}get positions(){return this._positions}set duration(e){this._duration=e}get duration(){return this._duration}set pathMode(e){this._pathMode=e}get pathMode(){return this._pathMode}get pathEvent(){return this._pathEvent}set actived(e){this._actived=e}get actived(){return this._actived}get state(){return this._state}_onAdd(){this._state=m.ADDED}_onRemove(){this._state=m.REMOVED}_onPostRender({viewer:e,viewOption:t}){if(!this.actived)return!1;let r=i.JulianDate.now();if(i.JulianDate.lessThan(r,this._endTime)&&this._sampledPosition){let s=this._sampledPosition.getValue(r),o=this._sampledPosition.getValue(i.JulianDate.addSeconds(r,.001,new i.JulianDate));s&&o&&e.camera.lookAt(s,new i.HeadingPitchRange(we(s,o),i.Math.toRadians((t==null?void 0:t.pitch)||-20),(t==null?void 0:t.range)||2e3))}else e.camera.lookAtTransform(i.Matrix4.IDENTITY),this._actived=!1}_resetTimeLine(){if(!this._positions||!this._positions.length)return!1;let e=i.JulianDate.now(),t=0,r=[];if(this._pathMode==="speed"){let s=te(this._positions)/this._duration;r=this._positions.map((o,n,l)=>(n!==0&&(t+=te([l[n-1],o])/s),i.JulianDate.addSeconds(e,t,new i.JulianDate)))}else{let s=this._positions.length,o=(this._duration-this._duration%s)/s;r=this._positions.map((n,l)=>i.JulianDate.addSeconds(e,l*o,new i.JulianDate))}this._sampledPosition=new i.SampledPositionProperty,this._sampledPosition.addSamples(r,u.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=i.ExtrapolationType.HOLD,this._sampledPosition.setInterpolationOptions({interpolationDegree:2,interpolationAlgorithm:i.HermitePolynomialApproximation}),this._endTime=r[r.length-1],this._actived=!0}},Pf=un;var gP={FP:"1",TP:"2",TRACKED:"tracked",FREE:"free"},Re=gP;var _n=class{constructor(e){this._viewer=e,this._cache={},this._delegete=new i.CustomDataSource("history-track-layer"),this._viewer.dataSources.add(this._delegete),this._activedTrack=void 0,this._viewOption={},this._stopTime=void 0,this._state=m.INITIALIZED}get delegate(){return this._delegete.entities}get state(){return this._state}_onPostRender(){Object.keys(this._cache).forEach(e=>{let t=this._cache[e];t.trackEvent&&t.trackEvent.fire(ae.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}),this._viewer.scene.requestRender()}addTrack(e){return e&&e.trackEvent&&!this._cache.hasOwnProperty(e.trackId)&&(e.trackEvent.fire(ae.ADD,this),this._cache[e.trackId]=e),this}addTracks(e){return Array.isArray(e)&&e.forEach(t=>{this.addTrack(t)}),this}getTrack(e){let t=this.getTracks().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}removeTrack(e){return e&&e.trackEvent&&this._cache.hasOwnProperty(e.trackId)&&(e.trackEvent.fire(ae.REMOVE,this),delete this._cache[e.trackId]),this}getTracks(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}play(){let e=i.JulianDate.now();return Object.keys(this._cache).forEach(t=>{let r=this._cache[t];r.startTime=e,r.viewed=!1}),this._activedTrack=void 0,this._stopTime=void 0,this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._viewer.on(D.POST_RENDER,this._onPostRender,this),this._state=m.PLAY,this}pause(){return this._stopTime=i.JulianDate.now(),this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._state=m.PAUSE,this}restore(){if(this._state!==m.PAUSE)return this;if(this._stopTime){let e=i.JulianDate.now();Object.keys(this._cache).forEach(t=>{this._cache[t].trackEvent.fire(ae.RESET_TIME_LINE,{stopTime:this._stopTime,duration:i.JulianDate.secondsDifference(e,this._stopTime)})})}return this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._viewer.on(D.POST_RENDER,this._onPostRender,this),this._state=m.PLAY,this}viewTrack(e,t={}){if(!this._cache.hasOwnProperty(e.trackId))throw new Error("TrackController: track does not added ");return this._viewOption=t,this._activedTrack&&(this._activedTrack.viewed=!1),e.viewed=!0,this._activedTrack=e,t.mode===Re.FREE&&(this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0),this}releaseTrack(e){if(!this._cache.hasOwnProperty(e.trackId))throw new Error("TrackController: track does not added ");return e.viewed&&(e.viewed=!1),this._activedTrack=void 0,this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}clear(){return Object.keys(this._cache).forEach(e=>{this.removeTrack(this._cache[e])}),this._activedTrack&&(this._activedTrack.viewed=!1),this._activedTrack=void 0,this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}},bf=_n;var yP={clampToGround:!1,clampToTileset:!1,interpolationType:"Linear",interpolationDegree:2,endDelayTime:.5,headingOffset:0},vP={width:2,material:i.Color.ORANGE,clampToGround:!0,depthFailMaterial:i.Color.ORANGE.withAlpha(.8)},fn=class{constructor(e,t,r,s){this._id=v.uuid(),this._bid=void 0,this._positions=f.parsePositions(e),this._duration=t||20,this._callback=r,this._options={...yP,...s},this._controller=void 0,this._sampledPosition=void 0,this._velocityOrientation=void 0,this._viewed=!1,this._delegate=new i.Entity,this._pathPositions=[],this._path=new i.Entity({show:!1,polyline:{positions:new i.CallbackProperty(()=>this._pathPositions,!1)}}),this._positionIndex=0,this._timeLine=[],this._startTime=void 0,this._endTime=void 0,this._trackEvent=new gr,this._trackEvent.on(ae.POST_RENDER,this._onPostRender,this),this._trackEvent.on(ae.ADD,this._onAdd,this),this._trackEvent.on(ae.REMOVE,this._onRemove,this),this._trackEvent.on(ae.RESET_TIME_LINE,this._resetTimeLine,this),this._state=m.INITIALIZED}get currentDistance(){return te(f.parsePositions(this._pathPositions))}get currentPosition(){let[e]=this._pathPositions.slice(-1);return f.parsePosition(e)}get allDistance(){return te(this._positions)}get trackId(){return this._id}set id(e){this._bid=e}get id(){return this._bid}set positions(e){this._positions=f.parsePositions(e),this._resetTimeLine({})}get positions(){return this._positions}set duration(e){this._duration=e,this._resetTimeLine({})}get duration(){return this._duration}set startTime(e){e instanceof Date?this._startTime=i.JulianDate.fromDate(e):this._startTime=e,this._resetTimeLine({})}get startTime(){return this._startTime}set viewed(e){this._viewed=e}get viewed(){return this._viewed}get trackEvent(){return this._trackEvent}get state(){return this._state}_onAdd(e){if(!e)return!1;this._controller=e,this._controller.delegate.add(this._delegate),this._controller.delegate.add(this._path),!this._startTime&&(this._startTime=i.JulianDate.now()),this._state=m.ADDED}_onRemove(){if(!this._controller)return!1;this._controller.delegate.remove(this._delegate),this._controller.delegate.remove(this._path),this._viewed=!1,this._startTime=void 0,this._state=m.REMOVED}_onPostRender({viewer:e,viewOption:t}){if(!this._startTime||!this._endTime)return!1;let r=i.JulianDate.now();if(i.JulianDate.lessThanOrEquals(r,this._endTime)){let s=this._sampledPosition.getValue(r);if(!s)return!1;this._pathPositions.push(s),this._options.clampToTileset?this._delegate.position=e.scene.clampToHeight(s,[this._delegate]):this._delegate.position=s;let o=this._velocityOrientation.getValue(r),n;if(o){let c=i.Quaternion.fromHeadingPitchRoll(new i.HeadingPitchRoll(i.Math.toRadians(this._options.headingOffset||0),0,0),new i.Quaternion);this._delegate.orientation=i.Quaternion.multiply(o,c,new i.Quaternion);let p=i.Matrix3.fromQuaternion(o),_=i.Matrix4.fromRotationTranslation(p,s);n=i.Transforms.fixedFrameToHeadingPitchRoll(_)}let l=this._timeLine[this._positionIndex],h;if(l){let c=i.JulianDate.secondsDifference(r,l);c>=0&&c<=1&&(h=this._positions[this._positionIndex]||void 0,h&&o&&(h.heading=i.Math.toDegrees(n.heading),h.pitch=i.Math.toDegrees(n.pitch),h.roll=i.Math.toDegrees(n.roll)),this._positionIndex++,this._options.loop&&this._positionIndex===this._positions.length&&this._restart()),this._callback&&this._callback(h,s,n?i.Math.toDegrees(n.heading)+90:void 0,this._positionIndex===this._positions.length)}}this._setCameraView(e,t)}_restart(){this._startTime=i.JulianDate.now(),this._resetTimeLine({})}_setCameraView(e,t){var s,o,n;if(!this._viewed)return!1;let r=i.JulianDate.now();if(i.JulianDate.greaterThan(r,this._endTime))e.camera.lookAtTransform(i.Matrix4.IDENTITY),e.delegate.trackedEntity&&(e.delegate.trackedEntity=void 0),this._viewed=!1;else{let l=this._sampledPosition.getValue(r),h=this._sampledPosition.getValue(i.JulianDate.addSeconds(r,1/60,new i.JulianDate));l&&h&&((t==null?void 0:t.mode)===Re.TRACKED&&((o=(s=e.delegate)==null?void 0:s.trackedEntity)==null?void 0:o.id)!==((n=this._delegate)==null?void 0:n.id)?e.delegate.trackedEntity=this._delegate:(t==null?void 0:t.mode)===Re.FP?e.camera.lookAt(l,new i.HeadingPitchRange(we(l,h),i.Math.toRadians((t==null?void 0:t.pitch)||0),(t==null?void 0:t.range)||10)):(t==null?void 0:t.mode)===Re.TP&&e.camera.lookAt(l,new i.HeadingPitchRange(0,i.Math.toRadians((t==null?void 0:t.pitch)||-90),(t==null?void 0:t.range)||1e3)))}}_resetTimeLine(e){var r;if(!this._startTime||!this._duration||!((r=this._positions)!=null&&r.length))return!1;let t=0;if(!(e!=null&&e.stopTime)&&!(e!=null&&e.duration)){let s=te(this._positions)/this._duration;this._timeLine=this._positions.map((o,n,l)=>(n!==0&&(t+=te([l[n-1],o])/s),i.JulianDate.addSeconds(this._startTime,t,new i.JulianDate))),this._pathPositions=[],this._positionIndex=0}else e!=null&&e.stopTime&&(e!=null&&e.duration)&&(this._duration+=e.duration,this._timeLine=this._timeLine.map(s=>(i.JulianDate.greaterThan(s,e.stopTime)&&(s=i.JulianDate.addSeconds(s,e.duration,new i.JulianDate)),s)));this._sampledPosition=new i.SampledPositionProperty,this._sampledPosition.addSamples(this._timeLine,u.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=i.ExtrapolationType.HOLD,this._options.interpolationType==="Hermite"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||2,interpolationAlgorithm:i.HermitePolynomialApproximation}):this._options.interpolationType==="Linear"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||1,interpolationAlgorithm:i.LinearApproximation}):this._options.interpolationType==="Lagrange"&&this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||5,interpolationAlgorithm:i.LagrangePolynomialApproximation}),this._velocityOrientation=new i.VelocityOrientationProperty(this._sampledPosition),this._endTime=i.JulianDate.addSeconds(this._timeLine[this._timeLine.length-1],this._options.endDelayTime,new i.JulianDate)}addPosition(e,t){return this._positions.push(f.parsePosition(e)),this._duration+=t,this._resetTimeLine({}),this}setModel(e,t){return this._delegate.model={...t,uri:e,heightReference:this._options.clampToGround?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE},this}setBillboard(e,t){return this._delegate.billboard={...t,image:e,heightReference:this._options.clampToGround?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE},this}setLabel(e,t){return this._delegate.label={...t,text:e,heightReference:this._options.clampToGround?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE},this}setPath(e,t={}){return this._path.show=!!e,v.merge(this._path.polyline,vP,t),this}},Sf=fn;var wP={ANGLE:"angle",AREA:"area",AREA_HEIGHT:"area_height",AREA_SURFACE:"area_surface",DISTANCE:"distance",DISTANCE_SURFACE:"distance_surface",HEADING:"heading",HEIGHT:"height",TRIANGLE_HEIGHT:"triangle_height"},le=wP;var gn=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e),this._options.onCalc&&this._options.onCalc(this._positions)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._options.onDrawStop&&this._options.onDrawStop(this._delegate)}_bindEvent(){this.drawTool.on(x.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(x.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(x.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(x.DRAW_STOP,this._onDrawStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(t),this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},Fi=gn;var yn=class extends Fi{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Entity({polyline:{...this._style,positions:new i.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),t>0&&this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP,e))}},he=yn;var vn=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._delegate=new i.Entity,this._delegate.merge(e),this._options={},this._positions=[]}get editTool(){return this._viewer.editTool}_mountedHook(){}_mountAnchor(){}_onAnchorMoving({pickedAnchor:e,position:t}){}_onEditAnchorStop({pickedAnchor:e,position:t}){}_onEditStop({pickedAnchor:e,position:t}){this._unbindEvent(),this._viewer.editTool.deactivate()}_bindEvent(){return this.editTool.on(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(x.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(x.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(x.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(x.EDIT_STOP,this._onEditStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.editTool.activate(t),this._mountedHook(),this._mountAnchor(),this._unbindEvent(),this._bindEvent(),this}},Hi=vn;var wn=class extends Hi{constructor(e){super(e)}_mountedHook(){this.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._delegate.polyline.positions=new i.CallbackProperty(()=>this._positions.length>1?this._positions:null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polyline.positions.getValue(i.JulianDate.now()));if(this._options.maxAnchorSize>2){for(let t=0;t<e.length-1;t++){let r=z(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.push(e[e.length-1]),this._positions.forEach((t,r)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}else this._positions=e,this._positions.forEach((t,r)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:t,index:r})});this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(r.isMid){let o=z(this._positions[s],this._positions[s-1]),n=z(this._positions[s],this._positions[s+1]);this._positions.splice(s,1,o,t,n),this.editTool.fire(x.CLEAR_ANCHOR),this._positions.forEach((l,h)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:l,index:h,isMid:h%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(this._positions[s]=t,!r.isMid&&this._options.maxAnchorSize>2){let o=-1,n=-1,l=-1,h=-1,c=this._positions.length;if(s===0?(l=s+2,h=s+1):r.index===c-1?(o=s-2,n=s-1):(o=s-2,n=s-1,l=s+2,h=s+1),o>0){let p=z(this._positions[o],this._positions[s]);this._positions[n]=p,this.editTool.fire(x.UPDATE_ANCHOR,{index:n,position:p})}if(l>0){let p=z(this._positions[l],this._positions[s]);this._positions[h]=p,this.editTool.fire(x.UPDATE_ANCHOR,{index:h,position:p})}}this._options.onCalc&&this._options.onCalc(this._positions)}},ce=wn;var Cn=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new i.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._options={}}_getSampledHeight(e,t=!1){let r=this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof i.EllipsoidTerrainProvider)?i.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(o=>i.Cartographic.fromCartesian(o))):Promise.resolve(e.map(o=>i.Cartographic.fromCartesian(o))),s=this._viewer.scene.clampToHeightSupported&&t?this._viewer.scene.clampToHeightMostDetailed(e,this._layer.entities.values):Promise.resolve(e);return Promise.all([r,s])}_onDrawStop(e){}_onCalc(e){}_startHook(e,t){this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._options.onDrawStop=this._onDrawStop.bind(this),this._options.onCalc=this._onCalc.bind(this),this._layer.entities.add(this._startLabel),this._layer.entities.add(this._resultLabel)}start(e,t){return this}},J=Cn;var Tn=class extends J{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Entity({polyline:{positions:new i.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ce(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[1];let t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cartesian3),r=i.Plane.fromPointNormal(e[0],t);this._helpLinePositions=[e[0],i.Plane.projectPointOntoPlane(r,e[1],new i.Cartesian3),e[1]];let s=Math.abs(i.Plane.getPointDistance(r,e[1]));this._resultLabel.label.text=`\u89D2\u5EA6\uFF1A${i.Math.toDegrees(Math.asin(s/i.Cartesian3.distance(e[0],e[1]))).toFixed(2)} \u5EA6`}}start(e,t){this._startHook(e,t);let r=new i.PolylineDashMaterialProperty({color:i.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),new he({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},Af=Tn;var xn=class extends Fi{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>2?new i.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(x.CREATE_ANCHOR,{position:e})}},it=xn;var En=class extends Hi{constructor(e){super(e)}_mountedHook(){this.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._delegate.polygon.hierarchy=new i.CallbackProperty(e=>this._positions.length>2?new i.PolygonHierarchy(this._positions):null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polygon.hierarchy.getValue(i.JulianDate.now()).positions);e.push(e[0]);for(let t=0;t<e.length-1;t++){let r=z(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.forEach((t,r)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})}),this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(r.isMid){let o,n,l=this._positions.length;s===l-1?(o=z(this._positions[s],this._positions[s-1]),n=z(this._positions[s],this._positions[0])):(o=z(this._positions[s],this._positions[s-1]),n=z(this._positions[s],this._positions[s+1])),this._positions.splice(s,1,o,t,n),this.editTool.fire(x.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(x.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;this._positions[s]=t;let o=this._positions.length;if(!r.isMid){let n=-1,l=-1,h=-1,c=-1;s===0?(n=o-2,l=o-1,h=s+2,c=s+1):s===o-2?(n=s-2,l=s-1,h=0,c=o-1):(n=s-2,l=s-1,h=s+2,c=s+1);let p=z(this._positions[n],this._positions[s]),_=z(this._positions[h],this._positions[s]);this._positions[l]=p,this._positions[c]=_,this.editTool.fire(x.UPDATE_ANCHOR,{index:l,position:p}),this.editTool.fire(x.UPDATE_ANCHOR,{index:c,position:_})}this._options.onCalc&&this._options.onCalc(this._positions)}},rt=En;var Pn=class extends J{constructor(){super()}_onDrawStop(e){new rt(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var t;e.length>2&&(this._resultLabel.position=(t=i.BoundingSphere.fromPoints(e))==null?void 0:t.center,this._resultLabel.label.text=`\u9762\u79EF\uFF1A${ye(e).toFixed(2)} \u5E73\u65B9\u7C73`)}start(e,t){return this._startHook(e,t),new it({material:t.material||i.Color.YELLOW.withAlpha(.6),perPositionHeight:!0}).start(e,this._options),this}},Mf=Pn;var bn=class extends J{constructor(){super()}_onDrawStop(e){new rt(e).start({viewer:this._viewer,layer:this._layer},this._options)}_lerp(e,t=4){let r=[];for(let s=0;s<t;++s)for(let o=0;o<t;++o){let n=i.Math.lerp(e.west,e.east,o/(t-1)),l=i.Math.lerp(e.south,e.north,s/(t-1));r.push(i.Cartesian3.fromRadians(n,l))}return r}_onCalc(e){if(e.length>2){let t=this._lerp(i.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(t,!0).then(([r,s])=>r.map((o,n)=>({lng:o.longitude,lat:o.latitude,alt:Math.max(o.height||0,s[n]?i.Cartographic.fromCartesian(s[n]).height:0)}))).then(r=>{let s=0,o;r.forEach(n=>{n.alt>s&&(s=n.alt,o=n)}),o&&(this._resultLabel.position=i.Cartesian3.fromRadians(o.lng,o.lat,o.alt),this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${s.toFixed(2)} \u7C73`)})}}start(e,t){return this._startHook(e,t),new it({material:t.material||i.Color.YELLOW.withAlpha(.6)}).start(e,this._options),this}},If=bn;var Sn=class extends J{constructor(){super()}_lerp(e,t=4){let r=[];for(let s=0;s<t;++s)for(let o=0;o<t;++o){let n=i.Math.lerp(e.west,e.east,o/(t-1)),l=i.Math.lerp(e.south,e.north,s/(t-1));r.push(i.Cartesian3.fromRadians(n,l))}return r}_onDrawStop(e){new rt(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var t;if(e.length>2){this._resultLabel.position=(t=i.BoundingSphere.fromPoints(e))==null?void 0:t.center;let r=this._lerp(i.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(r.concat(e),!1).then(([s])=>s.map(o=>i.Cartesian3.fromDegrees(i.Math.toDegrees(o.longitude),i.Math.toDegrees(o.latitude),o.height))).then(s=>{this._resultLabel.label.text=`\u9762\u79EF\uFF1A${ye(s).toFixed(2)} \u5E73\u65B9\u7C73`})}}start(e,t){return this._startHook(e,t),new it({material:t.material||i.Color.YELLOW.withAlpha(.6)}).start(e,this._options),this}},Df=Sn;var An=class extends J{constructor(){super(),this._maxAnchorSize=9999}_onDrawStop(e){new ce(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[e.length-1];let t=0;for(let r=0;r<e.length-1;r++){let s=i.Cartesian3.distance(e[r],e[r+1]);t+=s}this._resultLabel.label.text=t>1e3?`\u8DDD\u79BB\uFF1A${(t/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${t.toFixed(2)} \u7C73`}}start(e,t){return this._startHook(e,t),new he({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},Lf=An;var Mn=class extends J{constructor(){super(),this._maxAnchorSize=9999}_lerp(e,t,r=5){let s=[],o=i.Cartographic.fromCartesian(e),n=i.Cartographic.fromCartesian(t);for(let l=0;l<r;l++){let h=i.Math.lerp(o.longitude,n.longitude,l/r),c=i.Math.lerp(o.latitude,n.latitude,l/r),p=o.height-(o.height-n.height)*(l/r);s.push(i.Cartesian3.fromRadians(h,c,p))}return s}_onDrawStop(e){new ce(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let t=[e[0]];this._resultLabel.position=e[e.length-1];for(let r=0;r<e.length-1;r++)t=t.concat(this._lerp(e[r],e[r+1],this._options.lerpNum));t.push(e[e.length-1]),this._getSampledHeight(t).then(([r,s])=>r.map((o,n)=>i.Cartesian3.fromDegrees(i.Math.toDegrees(o.longitude),i.Math.toDegrees(o.latitude),Math.max(o.height||0,s[n]?i.Cartographic.fromCartesian(s[n]).height:0)))).then(r=>{let s=0;for(let o=0;o<r.length-1;o++){let n=i.Cartesian3.distance(r[o],r[o+1]);s+=n}this._resultLabel.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`})}}start(e,t){return this._startHook(e,t),new he({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Rf=Mn;var In=class extends J{constructor(){super(),this._maxAnchorSize=2}_onDrawStop(e){new ce(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){e.length>0&&(this._startLabel.position=e[0]),e.length>1&&(this._resultLabel.position=e[e.length-1],this._resultLabel.label.text=`\u504F\u822A\uFF1A${i.Math.toDegrees(we(e[0],e[1])).toFixed(1)} \u5EA6`)}start(e,t){return this._startHook(e,t),new he({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Of=In;var Dn=class extends J{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Entity({polyline:{positions:new i.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ce(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[1];let t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cartesian3),r=i.Plane.fromPointNormal(e[0],t);this._helpLinePositions=[e[0],i.Plane.projectPointOntoPlane(r,e[1],new i.Cartesian3),e[1]];let s=Math.abs(i.Plane.getPointDistance(r,e[1]));this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${s.toFixed(2)} \u7C73`}}start(e,t){this._startHook(e,t);let r=new i.PolylineDashMaterialProperty({color:i.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),new he({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},kf=Dn;var Ln=class extends J{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Entity({polyline:{positions:new i.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}}),this._lengthLabel=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._heightLabel=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._distanceLabel=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}})}_onDrawStop(e){new ce(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cartesian3),r=i.Plane.fromPointNormal(e[0],t),s=i.Plane.projectPointOntoPlane(r,e[1],new i.Cartesian3);this._helpLinePositions=[e[0],s,e[1]];let o=i.Cartesian3.distance(e[0],s),n=Math.abs(i.Plane.getPointDistance(r,e[1])),l=i.Cartesian3.distance(e[0],e[1]);this._lengthLabel.position=i.Cartesian3.midpoint(e[0],s,new i.Cartesian3),this._lengthLabel.label.text=o>1e3?`${(o/1e3).toFixed(2)} \u516C\u91CC`:`${o.toFixed(2)} \u7C73`,this._distanceLabel.position=i.Cartesian3.midpoint(e[0],e[1],new i.Cartesian3),this._distanceLabel.label.text=l>1e3?`${(l/1e3).toFixed(2)} \u516C\u91CC`:`${l.toFixed(2)} \u7C73`,this._heightLabel.position=i.Cartesian3.midpoint(s,e[1],new i.Cartesian3),this._heightLabel.label.text=n>1e3?`${(n/1e3).toFixed(2)} \u516C\u91CC`:`${n.toFixed(2)} \u7C73`}}start(e,t){this._startHook(e,t);let r=new i.PolylineDashMaterialProperty({color:i.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),this._layer.entities.add(this._lengthLabel),this._layer.entities.add(this._heightLabel),this._layer.entities.add(this._distanceLabel),new he({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},zf=Ln;var Rn=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new i.CustomDataSource("measure-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}angle(e={}){return new Af().start(this,e),this}area(e={}){return new Mf().start(this,e),this}areaHeight(e={}){return new If().start(this,e),this}areaSurface(e={}){return new Df().start(this,e),this}distance(e={}){return new Lf().start(this,e),this}distanceSurface(e={}){return new Rf().start(this,e),this}heading(e={}){return new Of().start(this,e),this}height(e={}){return new kf().start(this,e),this}triangleHeight(e={}){return new zf().start(this,e),this}activate(e,t){switch(e){case le.ANGLE:this.angle(t);break;case le.AREA:this.area(t);break;case le.AREA_HEIGHT:this.areaHeight(t);break;case le.AREA_SURFACE:this.areaSurface(t);break;case le.DISTANCE:this.distance(t);break;case le.DISTANCE_SURFACE:this.distanceSurface(t);break;case le.HEADING:this.heading(t);break;case le.HEIGHT:this.height(t);break;case le.TRIANGLE_HEIGHT:this.triangleHeight(t);break;default:break}return this}deactivate(){return this._layer.entities.removeAll(),this._viewer.drawTool.tooltipMess="",this._viewer.drawTool.deactivate(),this._viewer.editTool.tooltipMess="",this._viewer.editTool.deactivate(),this}},Ff=Rn;var CP={SIGHT_LINE:"sightLine",VIEW_SHED:"viewshed"},xt=CP;var TP={PROFILE:"profile"},Ni=TP;var On=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._color=i.Color.YELLOW,this._width=1,this._spacing=100,this._state=m.INITIALIZED}get type(){return"contourLine"}set enable(e){this._enable=e,e&&this._viewer?this._createAnalysis():(this._delegate&&(this._delegate=null),this._viewer&&(this._viewer.scene.globe.material=null))}get enable(){return this._enable}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.color=e)}get color(){return this._color}set width(e){this._width=e,this._delegate&&(this._delegate.uniforms.width=e)}get width(){return this._width}set spacing(e){this._spacing=e,this._delegate&&(this._delegate.uniforms.spacing=e)}get spacing(){return this._spacing}_init(e,t,r){this._enable=!0,this._color=e||i.Color.YELLOW,this._width=t||1,this._spacing=r||100,this._enable&&this._viewer&&this._createAnalysis()}deactivate(){this._enable=!1,this._delegate&&(this._delegate=null),this._viewer&&(this._viewer.scene.globe.material=null)}_createAnalysis(){let e=this._viewer.scene.globe,t=i.Material.fromType("ElevationContour"),r=t.uniforms;r.width=this._width,r.spacing=this._spacing,r.color=this._color,e.material=t,this._delegate=t}},Hf=On;var kn=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._enable=!1,this._positions=[],this._maxDistance=5,this._speed=1e3,this._maxHeight=20,this._inRangeColor=i.Color.YELLOW,this._outRangeColor=i.Color.WHITE,this._state=m.INITIALIZED}get type(){return"tilesetShake"}set enable(e){this._enable=e,this.tileset_arr.forEach(t=>{let r=null;this._enable?r=this._getShader(t.tileset2):r=new window.GM.CustomShader,t.tileset.setCustomShader(r)})}get enable(){return this._enable}set maxDistance(e){this._maxDistance=e,this._enable&&this._changeSettings()}get maxDistance(){return this._maxDistance}set speed(e){this._speed=e,this._enable&&this._changeSettings()}get speed(){return this._speed}set maxHeight(e){this._maxHeight=e,this._enable&&this._changeSettings()}get maxHeight(){return this._maxHeight}_getShader(e){let t=e.boundingSphere.center.clone(),r=i.Transforms.eastNorthUpToFixedFrame(t),s=i.Matrix4.inverse(r,new i.Matrix4);return new i.CustomShader({uniforms:{M_LocaltoWorld:{type:i.UniformType.MAT4,value:r},M_WorldtoLocal:{type:i.UniformType.MAT4,value:s},center:{type:i.UniformType.VEC3,value:t},MAX_Distance:{type:i.UniformType.FLOAT,value:this._maxDistance},Speed:{type:i.UniformType.FLOAT,value:this._speed},height:{type:i.UniformType.FLOAT,value:this._maxHeight}},vertexShaderText:this._getVs(),fragmentShaderText:this._getFs()})}_changeSettings(){this.tileset_arr.forEach(e=>{let t=this._getShader(e.tileset2);e.tileset.setCustomShader(t)})}_getVs(){return`
1705
1703
  void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput) {
1706
1704
  vec3 positionMC = vsInput.attributes.positionMC;
1707
1705
  //\u4E16\u754C\u5750\u6807\u8F6C\u5C40\u90E8 \u8981\u5C06\u6A21\u578B\u5750\u6807\u8F6C\u4E3A\u4E16\u754C\u5750\u6807
@@ -1746,8 +1744,128 @@ void main(){
1746
1744
  void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
1747
1745
  material.diffuse = vec3(0.2, 0.5, 1.0); // \u5C06\u6750\u8D28\u989C\u8272\u8BBE\u7F6E\u4E3A\u7EA2\u8272 vec3(1.0, 0.0, 0.0) vec3(0.945, 0.459, 0.620)
1748
1746
  }
1749
- `}_init(e,t={}){this._enable=!0,this._maxDistance=t.maxDistance||5,this._speed=t.speed||1e3,this._maxHeight=t.maxHeight||20,e&&(this._layer=e,this.tileset_arr=this._layer.delegate._primitives.map(r=>({overlayId:r.overlayId,tileset2:r,tileset:this._layer._cache[r.overlayId]||null})),this.tileset_arr.forEach(r=>{let s=this._getShader(r.tileset2);r.tileset.setCustomShader(s)}))}deactivate(){this._enable=!1,!(!this.tileset_arr||this.tileset_arr.length===0)&&this.tileset_arr.forEach(e=>{let t=new window.GM.CustomShader;e.tileset.setCustomShader(t)})}},xp=xa;var Ea=class{constructor(e,t={}){if(!e)throw Error("missing viewer param");this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._layer=new i.CustomDataSource("terrainClip"),e.dataSources.add(this._layer),this._minHeight=null,this._currentHeight=[],this._area=[],this._enable=t.enable||!0,this._clipOutSide=t.clipOutSide||!1,this._diffHeight=t.diffHeight||0,this._image=t.image||"//data.mars3d.cn/img/textures/poly-land.png",this._imageBottom=t.imageBottom||"//data.mars3d.cn/img/textures/poly-soil.jpg",this._splitNum=t.splitNum||30,this._clippingPolygons=new i.ClippingPolygonCollection({enabled:this._enable,polygons:[],inverse:this._clipOutSide}),this._viewer.scene.globe.backFaceCulling=!0,this._viewer.scene.globe.showSkirts=!0,this._state=d.INITIALIZED,this._callback=null}get type(){return"terrainClip"}get layer(){return this._layer}set enable(e){this._enable=e,this._viewer.scene.globe.clippingPolygons.enabled=e}get enable(){return this._enable}set clipOutSide(e){this._clipOutSide=e,this._viewer.scene.globe.clippingPolygons.inverse=e}get clipOutSide(){return this._clipOutSide}set splitNum(e){this._splitNum=e}get splitNum(){return this._splitNum}set diffHeight(e){this._diffHeight=e}get diffHeight(){return this._diffHeight}addArea(e=[],t={},r){t!=null&&t.diffHeight&&(this._diffHeight=t.diffHeight);let s=e.map(a=>i.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.ClippingPolygon({positions:s});this._id=v.uuid(),o.id=this._id,this._clippingPolygons.add(o),this._viewer.scene.globe.clippingPolygons=this._clippingPolygons,this._prepareWall(e,t),this._callback=r}_prepareWall(e,t={}){let r=e.concat([e[0]]);this._minHeight=null,this._currentHeight=[];let s=this._viewer.terrainProvider;if(s&&!(s instanceof i.EllipsoidTerrainProvider)){let o=[];for(let l=0;l<r.length-1;l++){let h=this._lerp(r[l],r[l+1],this._splitNum);o=o.concat(h)}o.push(r[0]);let a=o.map(l=>i.Cartographic.fromDegrees(l.lng,l.lat,l.alt));i.sampleTerrainMostDetailed(s,a).then(l=>{let h=l.map(c=>{let p=i.Math.toDegrees(c.longitude),f=i.Math.toDegrees(c.latitude);return this._currentHeight.push(parseFloat(c.height)),(!this._minHeight||c.height<this._minHeight)&&(this._minHeight=c.height),{lng:p,lat:f,alt:c.height}});this._perCreateEntity(e,h,t)})}else r.forEach(o=>{this._currentHeight.push(parseFloat(o.alt)),(!this._minHeight||o.alt<this._minHeight)&&(this._minHeight=o.alt)}),this._perCreateEntity(r,r,t)}_perCreateEntity(e,t,r){let s=this._createWallSurface(t),o=this._createBottomSurface(e),a={id:this._id,diffHeight:this._diffHeight,original:r,positions:e,show:!0};this._area.push({id:this._id,diffHeight:this._diffHeight,original:r,positions:e,entityIds:[s,o],show:!0}),typeof this._callback=="function"&&this._callback(a)}_createWallSurface(e){let t=[];return e.forEach(s=>{t.push(parseFloat(s.lng)),t.push(parseFloat(s.lat))}),this._layer.entities.add({wall:{positions:i.Cartesian3.fromDegreesArray(t),material:new i.ImageMaterialProperty({image:this._image,repeat:new i.Cartesian2(8,1)}),minimumHeights:this._getHeights(e.length,this._minHeight-this._diffHeight),maximumHeights:this._currentHeight}}).id}_createBottomSurface(e){let t=[];e.forEach(o=>{t.push(parseFloat(o.lng)),t.push(parseFloat(o.lat)),t.push(this._minHeight-this._diffHeight)});let r=new i.PolygonHierarchy(i.Cartesian3.fromDegreesArrayHeights(t));return this._layer.entities.add({polygon:{hierarchy:r,material:new i.ImageMaterialProperty({image:this._imageBottom,repeat:new i.Cartesian2(1,2)}),perPositionHeight:!0,outline:!1,outlineColor:i.Color.BLUE}}).id}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}_lerp(e,t,r=10){let s=[],o=i.Cartographic.fromDegrees(e.lng,e.lat,e.alt),a=i.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Math.lerp(o.longitude,a.longitude,l/r),c=i.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push({lng:i.Math.toDegrees(h),lat:i.Math.toDegrees(c),alt:p})}return s}getAreaById(e){let t=this._area.filter(r=>r.id===e);return t&&t.length>0?t[0]:null}removeArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];this._layer.entities.removeById(r.entityIds[0]),this._layer.entities.removeById(r.entityIds[1]);let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return this._area.splice(t,1),o&&this._clippingPolygons.remove(o),this}showArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(r.show)return;r.show=!0,this._layer.entities.getById(r.entityIds[0]).show=!0,this._layer.entities.getById(r.entityIds[1]).show=!0;let s=r.positions.map(a=>i.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.ClippingPolygon({positions:s});return o.id=e,this._clippingPolygons.add(o),this}hideArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(!r.show)return;r.show=!1,this._layer.entities.getById(r.entityIds[0]).show=!1,this._layer.entities.getById(r.entityIds[1]).show=!1;let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return o&&this._clippingPolygons.remove(o),this}flyToArea(e){let t=this._area.findIndex(o=>o.id===e);if(t==null)throw Error("missing index result");let r=this._area[t],s=this._layer.entities.getById(r.entityIds[0]);return this._viewer.flyTo(s),this}toJSON(){return this._area}clear(){this._layer.entities.removeAll(),this._clippingPolygons.removeAll()}},Ep=Ea;function ne(n,e){this.viewer=n,this.options=e||{},this._positions=[new i.Cartesian3(-1.1825928630924462e6,5.5155809806405855e6,2966674365247578e-9),new i.Cartesian3(-1183337777477057e-9,5515825617716778e-9,2.9659274345367434e6),new i.Cartesian3(-1.1845084932830015e6,5515571328839522e-9,2965932974956288e-9),new i.Cartesian3(-1.1855870332886775e6,5514889448799464e-9,2.9667642948399023e6),new i.Cartesian3(-1.1850990292063756e6,5514576687407264e-9,2967535347584739e-9),new i.Cartesian3(-1.1828409384216308e6,551522464431188e-8,2.9672341119776894e6)],this._height=this.options.height||0,this.bottomImg=e.bottomImg,this.wallImg=e.wallImg,this.splitNum=i.defaultValue(e.splitNum,50),this._positions&&this._positions.length>0&&this.updateData(this._positions)}Object.defineProperties(ne.prototype,{show:{get:function(){return this._show},set:function(n){this._show=n,this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=n),this._switchExcavate(n)}},height:{get:function(){return this._height},set:function(n){this._height=n,this._updateExcavateDepth(n)}}});ne.prototype.updateData=function(n){this.clear();var e=[],t=n.length,r=new i.Cartesian3,s=i.Cartesian3.subtract(n[0],n[1],r);s=s.x>0,this.excavateMinHeight=9999;for(var o=0;o<t;++o){var a=(o+1)%t,l=i.Cartographic.fromCartesian(n[o]),h=viewer.scene.globe.getHeight(l)||l.height;h<this.excavateMinHeight&&(this.excavateMinHeight=h);var c=i.Cartesian3.add(n[o],n[a],new i.Cartesian3);c=i.Cartesian3.multiplyByScalar(c,.5,c);var p=i.Cartesian3.normalize(c,new i.Cartesian3),f=i.Cartesian3.subtract(n[a],c,new i.Cartesian3);f=i.Cartesian3.normalize(f,f);var T=i.Cartesian3.cross(f,p,new i.Cartesian3);T=i.Cartesian3.normalize(T,T);var y=new i.Plane(T,0),m=i.Plane.getPointDistance(y,c);e.push(new i.ClippingPlane(T,m))}this.viewer.scene.globe.clippingPlanes=new i.ClippingPlaneCollection({planes:e,edgeWidth:1,edgeColor:i.Color.WHITE,enabled:!0}),this._prepareWell(n),this._createWell(this.wellData)};ne.prototype.clear=function(){this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=!1,this.viewer.scene.globe.clippingPlanes.removeAll(),this.viewer.scene.globe.clippingPlanes.isDestroyed()||this.viewer.scene.globe.clippingPlanes.destroy()),this.viewer.scene.globe.clippingPlanes=void 0,this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall),delete this.bottomSurface,delete this.wellWall,this.viewer.scene.render()};ne.prototype._prepareWell=function(n){var e=this.splitNum,t=n.length;if(t!=0){for(var r=this.excavateMinHeight-this.height,s=[],o=[],a=[],l=0;l<t;l++){var h=l==t-1?0:l+1,c=i.Cartographic.fromCartesian(n[l]),p=i.Cartographic.fromCartesian(n[h]),f=[c.longitude,c.latitude],T=[p.longitude,p.latitude];l==0&&(a.push(new i.Cartographic(f[0],f[1])),o.push(i.Cartesian3.fromRadians(f[0],f[1],r)),s.push(i.Cartesian3.fromRadians(f[0],f[1],0)));for(var y=1;y<=e;y++){var m=i.Math.lerp(f[0],T[0],y/e),E=i.Math.lerp(f[1],T[1],y/e);l==t-1&&y==e||(a.push(new i.Cartographic(m,E)),o.push(i.Cartesian3.fromRadians(m,E,r)),s.push(i.Cartesian3.fromRadians(m,E,0)))}}this.wellData={lerp_pos:a,bottom_pos:o,no_height_top:s}}};ne.prototype._createWell=function(n){if(this.viewer.terrainProvider._layers){var e=this;this._createBottomSurface(n.bottom_pos);var t=i.sampleTerrainMostDetailed(this.viewer.terrainProvider,n.lerp_pos);i.when(t,function(r){for(var s=r.length,o=[],a=0;a<s;a++){var l=i.Cartesian3.fromRadians(r[a].longitude,r[a].latitude,r[a].height);o.push(l)}e._createWellWall(n.bottom_pos,o)})}else this._createBottomSurface(n.bottom_pos),this._createWellWall(n.bottom_pos,n.no_height_top)};ne.prototype._getMinHeight=function(n){let e=5e6,t=null;for(let r=0;r<n.length;r++){let s=n[r].z;s<e&&(e=s,t=this._ellipsoidToLonLat(n[r]))}return t.altitude};ne.prototype._ellipsoidToLonLat=function(n){let e=this.viewer.scene.globe.ellipsoid,t=new i.Cartesian3(n.x,n.y,n.z),r=e.cartesianToCartographic(t),s=i.Math.toDegrees(r.latitude),o=i.Math.toDegrees(r.longitude),a=r.height;return{longitude:o,latitude:s,altitude:a}};ne.prototype._createBottomSurface=function(n){if(n.length){let r=this._getMinHeight(n),s=[];for(let l=0;l<n.length;l++){let h=this._ellipsoidToLonLat(n[l]);s.push(h.longitude),s.push(h.latitude),s.push(r)}let o=new i.PolygonGeometry({polygonHierarchy:new i.PolygonHierarchy(i.Cartesian3.fromDegreesArrayHeights(s)),perPositionHeight:!0,closeBottom:!1}),a=i.PolygonGeometry.createGeometry(o);var e=new i.Material({fabric:{type:"Image",uniforms:{image:this.bottomImg}}}),t=new i.MaterialAppearance({translucent:!1,flat:!0,material:e});this.bottomSurface=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:a}),appearance:t,asynchronous:!1}),this.viewer.scene.primitives.add(this.bottomSurface)}};ne.prototype._createWellWall=function(n,e){let t=this._getMinHeight(n),r=[],s=[];for(let c=0;c<e.length;c++)r.push(this._ellipsoidToLonLat(e[c]).altitude),s.push(t);let o=new i.WallGeometry({positions:e,maximumHeights:r,minimumHeights:s}),a=i.WallGeometry.createGeometry(o);var l=new i.Material({fabric:{type:"Image",uniforms:{image:this.wallImg}}}),h=new i.MaterialAppearance({translucent:!1,flat:!0,material:l});this.wellWall=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:a,attributes:{color:i.ColorGeometryInstanceAttribute.fromColor(i.Color.GREY)},id:"PitWall"}),appearance:h,asynchronous:!1}),this.viewer.scene.primitives.add(this.wellWall)};ne.prototype._switchExcavate=function(n){n?(this.viewer.scene.globe.material=i.Material.fromType("WaJue"),this.wellWall.show=!0,this.bottomSurface.show=!0):(this.viewer.scene.globe.material=null,this.wellWall.show=!1,this.bottomSurface.show=!1)};ne.prototype._updateExcavateDepth=function(n){this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall);for(var e=this.wellData.lerp_pos,t=[],r=e.length,s=0;s<r;s++)t.push(i.Cartesian3.fromRadians(e[s].longitude,e[s].latitude,this.excavateMinHeight-n));this.wellData.bottom_pos=t,this._createWell(this.wellData),this.viewer.scene.primitives.add(this.bottomSurface),this.viewer.scene.primitives.add(this.wellWall)};var Pp=ne;var Pa=class{constructor(e,t={}){if(!e)throw Error("missing viewer param");this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._layer=new i.CustomDataSource("TerrainUplift"),e.dataSources.add(this._layer),this._minHeight=null,this._currentHeight=[],this._area=[],this._enable=t.enable||!0,this._upHeight=t.upHeight||0,this._clipOutSide=t.clipOutSide||!1,this._diffHeight=t.diffHeight||0,this._image=t.image||"//data.mars3d.cn/img/textures/poly-land.png",this._imageBottom=t.imageBottom||"//data.mars3d.cn/img/textures/poly-soil.jpg",this._splitNum=t.splitNum||30,this._clippingPolygons=new i.ClippingPolygonCollection({enabled:this._enable,polygons:[],inverse:this._clipOutSide}),this._viewer.scene.globe.backFaceCulling=!0,this._viewer.scene.globe.showSkirts=!0,this._state=d.INITIALIZED,this._callback=null}get type(){return"TerrainUplift"}get layer(){return this._layer}set enable(e){this._enable=e,this._viewer.scene.globe.clippingPolygons.enabled=e}get enable(){return this._enable}set clipOutSide(e){this._clipOutSide=e,this._viewer.scene.globe.clippingPolygons.inverse=e}get clipOutSide(){return this._clipOutSide}set splitNum(e){this._splitNum=e}get splitNum(){return this._splitNum}set diffHeight(e){this._diffHeight=e}get diffHeight(){return this._diffHeight}addArea(e=[],t={},r){t!=null&&t.diffHeight&&(this._diffHeight=t.diffHeight);let s=e.map(a=>i.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.ClippingPolygon({positions:s});this._id=v.uuid(),o.id=this._id,this._clippingPolygons.add(o),this._viewer.scene.globe.clippingPolygons=this._clippingPolygons,this._prepareWall(e,t),this._callback=r}_prepareWall(e,t={}){let r=e.concat([e[0]]);this._minHeight=null,this._currentHeight=[];let s=this._viewer.terrainProvider;if(s&&!(s instanceof i.EllipsoidTerrainProvider)){let o=[];for(let l=0;l<r.length-1;l++){let h=this._lerp(r[l],r[l+1],this._splitNum);o=o.concat(h)}o.push(r[0]);let a=o.map(l=>i.Cartographic.fromDegrees(l.lng,l.lat,l.alt));i.sampleTerrainMostDetailed(s,a).then(l=>{let h=l.map(c=>{let p=i.Math.toDegrees(c.longitude),f=i.Math.toDegrees(c.latitude);return this._currentHeight.push(parseFloat(c.height)),(!this._minHeight||c.height<this._minHeight)&&(this._minHeight=c.height),{lng:p,lat:f,alt:c.height}});this._perCreateEntity(e,h,t)})}else r.forEach(o=>{this._currentHeight.push(parseFloat(o.alt)),(!this._minHeight||o.alt<this._minHeight)&&(this._minHeight=o.alt)}),this._perCreateEntity(r,r,t)}_perCreateEntity(e,t,r){let s=this._createWallSurface(t),o=this._createBottomSurface(e),a=this._adjustTerrainHeight(e),l={id:this._id,diffHeight:this._diffHeight,original:r,positions:e,entityIds:[s,o],show:!0};this._area.push(l),typeof this._callback=="function"&&this._callback(l)}_adjustTerrainHeight(e,t=1e3){console.log(111111111111);let r=new i.EllipsoidSurfaceAppearance({}),s=[];e.forEach(l=>{s.push(parseFloat(l.lng)),s.push(parseFloat(l.lat)),s.push(this._minHeight+t)});let o=new i.PolygonHierarchy(i.Cartesian3.fromDegreesArrayHeights(s));return this._layer.entities.add({polygon:{hierarchy:o,material:r.material,perPositionHeight:!0,outline:!1,outlineColor:i.Color.BLUE}}).id}_createWallSurface(e){let t=[];return e.forEach(s=>{t.push(parseFloat(s.lng)),t.push(parseFloat(s.lat))}),this._layer.entities.add({wall:{positions:i.Cartesian3.fromDegreesArray(t),material:new i.ImageMaterialProperty({image:this._image,repeat:new i.Cartesian2(8,1)}),minimumHeights:this._getHeights(e.length,this._minHeight-this._diffHeight),maximumHeights:this._currentHeight}}).id}_createBottomSurface(e){let t=[];e.forEach(o=>{t.push(parseFloat(o.lng)),t.push(parseFloat(o.lat)),t.push(this._minHeight-this._diffHeight)});let r=new i.PolygonHierarchy(i.Cartesian3.fromDegreesArrayHeights(t));return this._layer.entities.add({polygon:{hierarchy:r,material:new i.ImageMaterialProperty({image:this._imageBottom,repeat:new i.Cartesian2(1,2)}),perPositionHeight:!0,outline:!1,outlineColor:i.Color.BLUE}}).id}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}_lerp(e,t,r=10){let s=[],o=i.Cartographic.fromDegrees(e.lng,e.lat,e.alt),a=i.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Math.lerp(o.longitude,a.longitude,l/r),c=i.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push({lng:i.Math.toDegrees(h),lat:i.Math.toDegrees(c),alt:p})}return s}getAreaById(e){let t=this._area.filter(r=>r.id===e);return t&&t.length>0?t[0]:null}removeArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];this._layer.entities.removeById(r.entityIds[0]),this._layer.entities.removeById(r.entityIds[1]);let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return this._area.splice(t,1),o&&this._clippingPolygons.remove(o),this}showArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(r.show)return;r.show=!0,this._layer.entities.getById(r.entityIds[0]).show=!0,this._layer.entities.getById(r.entityIds[1]).show=!0;let s=r.positions.map(a=>i.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.ClippingPolygon({positions:s});return o.id=e,this._clippingPolygons.add(o),this}hideArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(!r.show)return;r.show=!1,this._layer.entities.getById(r.entityIds[0]).show=!1,this._layer.entities.getById(r.entityIds[1]).show=!1;let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return o&&this._clippingPolygons.remove(o),this}flyToArea(e){let t=this._area.findIndex(o=>o.id===e);if(t==null)throw Error("missing index result");let r=this._area[t],s=this._layer.entities.getById(r.entityIds[0]);return this._viewer.flyTo(s),this}toJSON(){return this._area}clear(){this._layer.entities.removeAll(),this._clippingPolygons.removeAll()}},bp=Pa;var ba=class{constructor(e){ai(this,"_analysisTerrainVisible",e=>{let t=this._viewer.terrainProvider,r=e.map(s=>i.Cartographic.fromDegrees(s.lng,s.lat,s.alt));i.sampleTerrainMostDetailed(t,r).then(s=>{let o=0,a=null;for(let l=0;l<s.length-1;l++){if(l<s.length-2){let h=e[l],c=e[l+1],p=i.Cartesian3.fromDegrees(h.lng,h.lat,h.alt),f=i.Cartesian3.fromDegrees(c.lng,c.lat,c.alt);if(a=this._analysisModelVisible([p,f]),i.defined(a)&&i.defined(a.object)){console.log("\u5728\u6A21\u578B\u4E0A.");let T=i.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),y=i.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(a.position,T,i.Color.GREEN),this._drawLine(a.position,y,i.Color.RED);break}}if(s[l].height>=e[l].alt){console.log("\u5728\u5730\u5F62\u4E0A."),o=l;let h=i.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),c=i.Cartesian3.fromDegrees(e[l].lng,e[l].lat,e[l].alt),p=i.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(h,c,i.Color.GREEN),this._drawLine(c,p,i.Color.RED);break}}if(o===0&&a===null){console.log("\u5168\u90E8\u53EF\u89C6.");let l=i.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),h=i.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(l,h,i.Color.GREEN)}})});ai(this,"_analysisModelVisible",e=>{let t=i.Cartesian3.normalize(i.Cartesian3.subtract(e[1],e[0],new i.Cartesian3),new i.Cartesian3),r=new i.Ray(e[0],t);return this._viewer.scene.pickFromRay(r)});this._id=v.uuid(),this._viewer=e,this._layer=new i.CustomDataSource("sightLine"),this._viewer.dataSources.add(this._layer)}get type(){return"sightLine"}get layer(){return this._layer}_init(e,t,r=10){this._layer&&this._layer.entities.removeAll();let s=i.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),o=i.Cartesian3.fromDegrees(t.lng,t.lat,t.alt),a=this._viewer.terrainProvider;if(a&&!(a instanceof i.EllipsoidTerrainProvider)){let l=this._lerp(e,t,r).concat([t]);this._analysisTerrainVisible(l)}else this._analysisVisible([s,o])}_analysisVisible(e){let t=this._analysisModelVisible(e);if(i.defined(t)&&i.defined(t.object)){let r=this._drawLine(t.position,e[0],i.Color.GREEN),s=this._drawLine(t.position,e[1],i.Color.RED);console.log("\u5728\u6A21\u578B\u4E0A.",r,s)}else{let r=this._drawLine(e[0],e[1],i.Color.GREEN);console.log("\u4E0D\u5728\u6A21\u578B\u4E0A",r)}}_drawLine(e,t,r){return this._layer||(this._layer=new i.CustomDataSource("sightLine"),this._viewer.dataSources.add(this._layer)),this._layer&&this._layer.entities.add({polyline:{positions:[e,t],width:2,material:r,depthFailMaterial:r}}),this}_lerp(e,t,r=10){let s=[],o=i.Cartographic.fromDegrees(e.lng,e.lat,e.alt),a=i.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Math.lerp(o.longitude,a.longitude,l/r),c=i.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push({lng:i.Math.toDegrees(h),lat:i.Math.toDegrees(c),alt:p})}return s}deactivate(){this._layer&&this._layer.entities.removeAll(),this._layer&&this._viewer.dataSources.remove(this._layer),this._layer=null}},Sp=ba;var Sa=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._contourLine=new Cp(e),this._tilesetShake=new xp(e),this._sightLine=new Sp(e)}get ContourLine(){return this._contourLine}get TilesetShake(){return this._tilesetShake}get SightLine(){return this._sightLine}contourLine(e,t,r){this._contourLine._init(e,t,r)}tilesetShake(e,t){this._tilesetShake._init(e,t)}terrainClip(e={}){return new Ep(this._viewer,e)}terrainClipPlan(e={}){return new Pp(this._viewer,e)}terrainUplift(e={}){return new bp(this._viewer,e)}sightLine(e,t,r){return this._sightLine._init(e,t,r)}deactivate(e=null){switch(e){case $t.SIGHT_LINE:this._sightLine.deactivate();break;default:this._contourLine.deactivate(),this._tilesetShake.deactivate();break}return this}},Ip=Sa;var Ia=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e),this._options.onCalc&&this._options.onCalc(this._positions)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._options.onDrawStop&&this._options.onDrawStop(this._delegate)}_bindEvent(){this.drawTool.on(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(C.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(C.DRAW_STOP,this._onDrawStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(t),this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},Mp=Ia;var Ma=class extends Mp{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Entity({polyline:{...this._style,positions:new i.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),t>0&&this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP,e))}},Ap=Ma;var Aa=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new i.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._options={}}_getSampledHeight(e,t=!1){let r=this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof i.EllipsoidTerrainProvider)?i.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(o=>i.Cartographic.fromCartesian(o))):Promise.resolve(e.map(o=>i.Cartographic.fromCartesian(o))),s=this._viewer.scene.clampToHeightSupported&&t?this._viewer.scene.clampToHeightMostDetailed(e,this._layer.entities.values):Promise.resolve(e);return Promise.all([r,s])}_onDrawStop(e){}_onComputedStop(e,t=!1){let r=[];return t?r=e.map((s,o)=>{let l=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(s),h=0;for(let c=1;c<=o;c++){let p=i.Cartesian3.distance(e[c-1],e[c]);h+=p}return{longitude:i.Math.toDegrees(l.longitude),latitude:i.Math.toDegrees(l.latitude),height:l.height,distance:h,cartesian3Position:s}}):r=e.map((s,o)=>{let a=0;for(let l=1;l<=o;l++){let h=i.Cartesian3.fromRadians(e[l-1].longitude,e[l-1].latitude,e[l-1].height),c=i.Cartesian3.fromRadians(e[l].longitude,e[l].latitude,e[l].height),p=i.Cartesian3.distance(h,c);a+=p}return{longitude:i.Math.toDegrees(s.longitude),latitude:i.Math.toDegrees(s.latitude),height:s.height,distance:a,cartesian3Position:i.Cartesian3.fromRadians(s.longitude,s.latitude,s.height)}}),r}_onCalc(e){}_startHook(e,t){this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._options.onDrawStop=this._onDrawStop.bind(this),this._options.onCalc=this._onCalc.bind(this),this._layer.entities.add(this._startLabel),this._layer.entities.add(this._resultLabel)}start(e,t){return this}},Dp=Aa;var Da=class extends Dp{constructor(){super(),this._maxAnchorSize=9999,this._positions=[],this._includeModel=!0,this._callback=null}_lerp(e,t,r=5){let s=[],o=i.Cartographic.fromCartesian(e),a=i.Cartographic.fromCartesian(t);for(let l=0;l<r;l++){let h=i.Math.lerp(o.longitude,a.longitude,l/r),c=i.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push(i.Cartesian3.fromRadians(h,c,p))}return s}async _onDrawStop(e){let t=this._positions.filter((s,o)=>o!==1),r=await this._onComputedStop(t,this._includeModel);typeof this._callback=="function"&&await this._callback(r)}_stoppedHook(){this._options.onDrawStop&&this._options.onDrawStop(entity)}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let t=[e[0]];this._resultLabel.position=e[e.length-1];for(let r=0;r<e.length-1;r++)t=t.concat(this._lerp(e[r],e[r+1],this._options.lerpNum));t.push(e[e.length-1]),this._getSampledHeight(t,this._includeModel).then(([r,s])=>(this._includeModel||(this._positions=r),r.map((o,a)=>i.Cartesian3.fromDegrees(i.Math.toDegrees(o.longitude),i.Math.toDegrees(o.latitude),Math.max(o.height||0,s[a]?i.Cartographic.fromCartesian(s[a]).height:0))))).then(r=>{this._includeModel&&(this._positions=r);let s=0;for(let o=0;o<r.length-1;o++){let a=i.Cartesian3.distance(r[o],r[o+1]);s+=a}this._resultLabel.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`})}}start(e,t,r={}){return this._startHook(e,r),new Ap({material:r.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:r.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:r.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this._includeModel=r==null?void 0:r.includeModel,this._callback=t,this}},Lp=Da;var La=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new i.CustomDataSource("plotAnalysis-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}profile(e,t={}){var r;return(r=new Lp)==null||r.start(this,e,t),this}activate(e,t){switch(e){case ei.PROFILE:this.profile(t);break;default:break}return this}deactivate(){return this._layer.entities.removeAll(),this._viewer.drawTool.tooltipMess="",this._viewer.drawTool.deactivate(),this._viewer.editTool.tooltipMess="",this._viewer.editTool.deactivate(),this}},Rp=La;var Ra=class{static init(){let e=me("turf");if(!e)throw new Error("miss the turf lib");return e}static pointBuffer(e,t=50,r=8){let s=this.init(),o=_.parsePosition(e),a=s.point([o.lng,o.lat,o.alt]),l=s.buffer(a,t,{units:"meters",steps:r}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static polylineBuffer(e,t=50,r=8){let s=this.init(),a=_.parsePositions(e).map(p=>[p.lng,p.lat,p.alt]),l=s.lineString(a),h=s.buffer(l,t,{units:"meters",steps:r}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static polygonBuffer(e,t=50,r=8){let s=this.init(),o=_.parsePositions(e),a=o.concat(o[0]).map(p=>[p.lng,p.lat,p.alt]),l=s.polygon([a]),h=s.buffer(l,t,{units:"meters",steps:r}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static transformPolylineScale(e,t=1){let r=this.init(),o=_.parsePositions(e).map(c=>[c.lng,c.lat,c.alt]),a=r.lineString(o),l=r.transformScale(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h}static transformPolygonScale(e,t){let r=this.init(),s=_.parsePositions(e),o=s.concat(s[0]).map(c=>[c.lng,c.lat,c.alt]),a=r.polygon([o]),l=r.transformScale(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static transformPolylineRotate(e,t=0){let r=this.init(),o=_.parsePositions(e).map(c=>[c.lng,c.lat,c.alt]),a=r.lineString(o),l=r.transformRotate(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h}static transformPolygonRotate(e,t=0){let r=this.init(),s=_.parsePositions(e),o=s.concat(s[0]).map(c=>[c.lng,c.lat,c.alt]),a=r.polygon([o]),l=r.transformRotate(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static sector(e,t,r,s){let o=this.init(),a=_.parsePosition(e),l=o.point([a.lng,a.lat,a.alt]),h=o.sector(l,t,r,s,{units:"meters"}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static polygonEquivalent(e,t,r,s=null){let o=this.init(),a=[];for(let p=0,f=e.length;p<f;p++){let T=e[p];a.push({type:"Feature",properties:T,geometry:{type:"Point",coordinates:[T.x,T.y]}})}let l={type:"FeatureCollection",features:a};s&&s!==null&&(l=o.interpolate(l,s.cellSize||10,{gridType:"point",property:r,units:(s==null?void 0:s.units)||"kilometers",weight:(s==null?void 0:s.weight)||1}),l.features.map(p=>p.properties[r]=Number(p.properties[r].toFixed(2))));let h=o.isobands(l,t,{zProperty:r}),c=o.isolines(l,t,{zProperty:r});return{geojsonPoly:h,geojsonLine:c}}},Op=Ra;var n9=i.Cartesian2,l9=i.Cartesian3,h9=i.Matrix3,c9=i.Matrix4,p9=i.Material,d9=i.SceneMode,m9=i.SkyBox,u9=i.Color,_9=i.Rectangle,f9=i.ShadowMode,g9=i.JulianDate,y9=i.HeightReference,v9=i.HorizontalOrigin,w9=i.VerticalOrigin,T9=i.CallbackProperty,C9=i.ClassificationType,x9=i.Cesium3DTileStyle,E9=i.GeographicTilingScheme,P9=i.WebMercatorTilingScheme,b9=i.ColorMaterialProperty,S9=i.ImageMaterialProperty,I9=i.PolylineDashMaterialProperty,M9=i.PolylineGlowMaterialProperty,A9=i.PolylineOutlineMaterialProperty,D9=i.PolylineArrowMaterialProperty,L9=i.writeTextToCanvas,R9=i.CustomShaderMode,O9=i.CustomShaderTranslucencyMode,k9=i.CustomShader,F9=i.UniformType,z9=i.Ellipsoid,H9=i.Resource,N9=i.createGooglePhotorealistic3DTileset,W9=i.createElevationBandMaterial,G9=i.ModelAnimationLoop,U9=i.ClippingPlane,B9=i.ClippingPlaneCollection,V9=i.ClippingPolygon,j9=i.ClippingPolygonCollection;var Iu="./libs/gm-sdk/resources/",kp=Iu,Fp=!1,X9={set baseUrl(n){kp=n},get baseUrl(){return kp}};function J9(n={}){return Fp?Promise.resolve():(zp&&zp(),new Promise((e,t)=>{n.baseUrl&&(this.config.baseUrl=n.baseUrl),n.echarts&&(Xn(n.echarts),de("echarts",n.echarts)),n.turf&&de("turf",n.turf),n.shpUtil&&de("shpUtil",n.shpUtil),Fp=!0,$e("isInitialized",!0),$e("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)}))}function zp(){console.clear(),console.log(`%c
1747
+ `}_init(e,t={}){this._enable=!0,this._maxDistance=t.maxDistance||5,this._speed=t.speed||1e3,this._maxHeight=t.maxHeight||20,e&&(this._layer=e,this.tileset_arr=this._layer.delegate._primitives.map(r=>({overlayId:r.overlayId,tileset2:r,tileset:this._layer._cache[r.overlayId]||null})),this.tileset_arr.forEach(r=>{let s=this._getShader(r.tileset2);r.tileset.setCustomShader(s)}))}deactivate(){this._enable=!1,!(!this.tileset_arr||this.tileset_arr.length===0)&&this.tileset_arr.forEach(e=>{let t=new window.GM.CustomShader;e.tileset.setCustomShader(t)})}},Nf=kn;var zn=class{constructor(e,t={}){if(!e)throw Error("missing viewer param");this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._layer=new i.CustomDataSource("terrainClip"),e.dataSources.add(this._layer),this._minHeight=null,this._currentHeight=[],this._area=[],this._enable=t.enable||!0,this._clipOutSide=t.clipOutSide||!1,this._diffHeight=t.diffHeight||0,this._image=t.image||"//data.mars3d.cn/img/textures/poly-land.png",this._imageBottom=t.imageBottom||"//data.mars3d.cn/img/textures/poly-soil.jpg",this._splitNum=t.splitNum||30,this._clippingPolygons=new i.ClippingPolygonCollection({enabled:this._enable,polygons:[],inverse:this._clipOutSide}),this._viewer.scene.globe.backFaceCulling=!0,this._viewer.scene.globe.showSkirts=!0,this._state=m.INITIALIZED,this._callback=null}get type(){return"terrainClip"}get layer(){return this._layer}set enable(e){this._enable=e,this._viewer.scene.globe.clippingPolygons.enabled=e}get enable(){return this._enable}set clipOutSide(e){this._clipOutSide=e,this._viewer.scene.globe.clippingPolygons.inverse=e}get clipOutSide(){return this._clipOutSide}set splitNum(e){this._splitNum=e}get splitNum(){return this._splitNum}set diffHeight(e){this._diffHeight=e}get diffHeight(){return this._diffHeight}addArea(e=[],t={},r){t!=null&&t.diffHeight&&(this._diffHeight=t.diffHeight);let s=e.map(n=>i.Cartesian3.fromDegrees(n.lng,n.lat,n.alt)),o=new i.ClippingPolygon({positions:s});this._id=v.uuid(),o.id=this._id,this._clippingPolygons.add(o),this._viewer.scene.globe.clippingPolygons=this._clippingPolygons,this._prepareWall(e,t),this._callback=r}_prepareWall(e,t={}){let r=e.concat([e[0]]);this._minHeight=null,this._currentHeight=[];let s=this._viewer.terrainProvider;if(s&&!(s instanceof i.EllipsoidTerrainProvider)){let o=[];for(let l=0;l<r.length-1;l++){let h=this._lerp(r[l],r[l+1],this._splitNum);o=o.concat(h)}o.push(r[0]);let n=o.map(l=>i.Cartographic.fromDegrees(l.lng,l.lat,l.alt));i.sampleTerrainMostDetailed(s,n).then(l=>{let h=l.map(c=>{let p=i.Math.toDegrees(c.longitude),_=i.Math.toDegrees(c.latitude);return this._currentHeight.push(parseFloat(c.height)),(!this._minHeight||c.height<this._minHeight)&&(this._minHeight=c.height),{lng:p,lat:_,alt:c.height}});this._perCreateEntity(e,h,t)})}else r.forEach(o=>{this._currentHeight.push(parseFloat(o.alt)),(!this._minHeight||o.alt<this._minHeight)&&(this._minHeight=o.alt)}),this._perCreateEntity(r,r,t)}_perCreateEntity(e,t,r){let s=this._createWallSurface(t),o=this._createBottomSurface(e),n={id:this._id,diffHeight:this._diffHeight,original:r,positions:e,show:!0};this._area.push({id:this._id,diffHeight:this._diffHeight,original:r,positions:e,entityIds:[s,o],show:!0}),typeof this._callback=="function"&&this._callback(n)}_createWallSurface(e){let t=[];return e.forEach(s=>{t.push(parseFloat(s.lng)),t.push(parseFloat(s.lat))}),this._layer.entities.add({wall:{positions:i.Cartesian3.fromDegreesArray(t),material:new i.ImageMaterialProperty({image:this._image,repeat:new i.Cartesian2(8,1)}),minimumHeights:this._getHeights(e.length,this._minHeight-this._diffHeight),maximumHeights:this._currentHeight}}).id}_createBottomSurface(e){let t=[];e.forEach(o=>{t.push(parseFloat(o.lng)),t.push(parseFloat(o.lat)),t.push(this._minHeight-this._diffHeight)});let r=new i.PolygonHierarchy(i.Cartesian3.fromDegreesArrayHeights(t));return this._layer.entities.add({polygon:{hierarchy:r,material:new i.ImageMaterialProperty({image:this._imageBottom,repeat:new i.Cartesian2(1,2)}),perPositionHeight:!0,outline:!1,outlineColor:i.Color.BLUE}}).id}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}_lerp(e,t,r=10){let s=[],o=i.Cartographic.fromDegrees(e.lng,e.lat,e.alt),n=i.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Math.lerp(o.longitude,n.longitude,l/r),c=i.Math.lerp(o.latitude,n.latitude,l/r),p=o.height-(o.height-n.height)*(l/r);s.push({lng:i.Math.toDegrees(h),lat:i.Math.toDegrees(c),alt:p})}return s}getAreaById(e){let t=this._area.filter(r=>r.id===e);return t&&t.length>0?t[0]:null}removeArea(e){let t=this._area.findIndex(n=>n.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];this._layer.entities.removeById(r.entityIds[0]),this._layer.entities.removeById(r.entityIds[1]);let s=this._clippingPolygons._polygons.findIndex(n=>n.id===e),o=this._clippingPolygons.get(s);return this._area.splice(t,1),o&&this._clippingPolygons.remove(o),this}showArea(e){let t=this._area.findIndex(n=>n.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(r.show)return;r.show=!0,this._layer.entities.getById(r.entityIds[0]).show=!0,this._layer.entities.getById(r.entityIds[1]).show=!0;let s=r.positions.map(n=>i.Cartesian3.fromDegrees(n.lng,n.lat,n.alt)),o=new i.ClippingPolygon({positions:s});return o.id=e,this._clippingPolygons.add(o),this}hideArea(e){let t=this._area.findIndex(n=>n.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(!r.show)return;r.show=!1,this._layer.entities.getById(r.entityIds[0]).show=!1,this._layer.entities.getById(r.entityIds[1]).show=!1;let s=this._clippingPolygons._polygons.findIndex(n=>n.id===e),o=this._clippingPolygons.get(s);return o&&this._clippingPolygons.remove(o),this}flyToArea(e){let t=this._area.findIndex(o=>o.id===e);if(t==null)throw Error("missing index result");let r=this._area[t],s=this._layer.entities.getById(r.entityIds[0]);return this._viewer.flyTo(s),this}toJSON(){return this._area}clear(){this._layer.entities.removeAll(),this._clippingPolygons.removeAll()}},Wf=zn;function pe(a,e){this.viewer=a,this.options=e||{},this._positions=[new i.Cartesian3(-1.1825928630924462e6,5.5155809806405855e6,2966674365247578e-9),new i.Cartesian3(-1183337777477057e-9,5515825617716778e-9,2.9659274345367434e6),new i.Cartesian3(-1.1845084932830015e6,5515571328839522e-9,2965932974956288e-9),new i.Cartesian3(-1.1855870332886775e6,5514889448799464e-9,2.9667642948399023e6),new i.Cartesian3(-1.1850990292063756e6,5514576687407264e-9,2967535347584739e-9),new i.Cartesian3(-1.1828409384216308e6,551522464431188e-8,2.9672341119776894e6)],this._height=this.options.height||0,this.bottomImg=e.bottomImg,this.wallImg=e.wallImg,this.splitNum=i.defaultValue(e.splitNum,50),this._positions&&this._positions.length>0&&this.updateData(this._positions)}Object.defineProperties(pe.prototype,{show:{get:function(){return this._show},set:function(a){this._show=a,this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=a),this._switchExcavate(a)}},height:{get:function(){return this._height},set:function(a){this._height=a,this._updateExcavateDepth(a)}}});pe.prototype.updateData=function(a){this.clear();var e=[],t=a.length,r=new i.Cartesian3,s=i.Cartesian3.subtract(a[0],a[1],r);s=s.x>0,this.excavateMinHeight=9999;for(var o=0;o<t;++o){var n=(o+1)%t,l=i.Cartographic.fromCartesian(a[o]),h=viewer.scene.globe.getHeight(l)||l.height;h<this.excavateMinHeight&&(this.excavateMinHeight=h);var c=i.Cartesian3.add(a[o],a[n],new i.Cartesian3);c=i.Cartesian3.multiplyByScalar(c,.5,c);var p=i.Cartesian3.normalize(c,new i.Cartesian3),_=i.Cartesian3.subtract(a[n],c,new i.Cartesian3);_=i.Cartesian3.normalize(_,_);var w=i.Cartesian3.cross(_,p,new i.Cartesian3);w=i.Cartesian3.normalize(w,w);var g=new i.Plane(w,0),d=i.Plane.getPointDistance(g,c);e.push(new i.ClippingPlane(w,d))}this.viewer.scene.globe.clippingPlanes=new i.ClippingPlaneCollection({planes:e,edgeWidth:1,edgeColor:i.Color.WHITE,enabled:!0}),this._prepareWell(a),this._createWell(this.wellData)};pe.prototype.clear=function(){this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=!1,this.viewer.scene.globe.clippingPlanes.removeAll(),this.viewer.scene.globe.clippingPlanes.isDestroyed()||this.viewer.scene.globe.clippingPlanes.destroy()),this.viewer.scene.globe.clippingPlanes=void 0,this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall),delete this.bottomSurface,delete this.wellWall,this.viewer.scene.render()};pe.prototype._prepareWell=function(a){var e=this.splitNum,t=a.length;if(t!=0){for(var r=this.excavateMinHeight-this.height,s=[],o=[],n=[],l=0;l<t;l++){var h=l==t-1?0:l+1,c=i.Cartographic.fromCartesian(a[l]),p=i.Cartographic.fromCartesian(a[h]),_=[c.longitude,c.latitude],w=[p.longitude,p.latitude];l==0&&(n.push(new i.Cartographic(_[0],_[1])),o.push(i.Cartesian3.fromRadians(_[0],_[1],r)),s.push(i.Cartesian3.fromRadians(_[0],_[1],0)));for(var g=1;g<=e;g++){var d=i.Math.lerp(_[0],w[0],g/e),E=i.Math.lerp(_[1],w[1],g/e);l==t-1&&g==e||(n.push(new i.Cartographic(d,E)),o.push(i.Cartesian3.fromRadians(d,E,r)),s.push(i.Cartesian3.fromRadians(d,E,0)))}}this.wellData={lerp_pos:n,bottom_pos:o,no_height_top:s}}};pe.prototype._createWell=function(a){if(this.viewer.terrainProvider._layers){var e=this;this._createBottomSurface(a.bottom_pos);var t=i.sampleTerrainMostDetailed(this.viewer.terrainProvider,a.lerp_pos);i.when(t,function(r){for(var s=r.length,o=[],n=0;n<s;n++){var l=i.Cartesian3.fromRadians(r[n].longitude,r[n].latitude,r[n].height);o.push(l)}e._createWellWall(a.bottom_pos,o)})}else this._createBottomSurface(a.bottom_pos),this._createWellWall(a.bottom_pos,a.no_height_top)};pe.prototype._getMinHeight=function(a){let e=5e6,t=null;for(let r=0;r<a.length;r++){let s=a[r].z;s<e&&(e=s,t=this._ellipsoidToLonLat(a[r]))}return t.altitude};pe.prototype._ellipsoidToLonLat=function(a){let e=this.viewer.scene.globe.ellipsoid,t=new i.Cartesian3(a.x,a.y,a.z),r=e.cartesianToCartographic(t),s=i.Math.toDegrees(r.latitude),o=i.Math.toDegrees(r.longitude),n=r.height;return{longitude:o,latitude:s,altitude:n}};pe.prototype._createBottomSurface=function(a){if(a.length){let r=this._getMinHeight(a),s=[];for(let l=0;l<a.length;l++){let h=this._ellipsoidToLonLat(a[l]);s.push(h.longitude),s.push(h.latitude),s.push(r)}let o=new i.PolygonGeometry({polygonHierarchy:new i.PolygonHierarchy(i.Cartesian3.fromDegreesArrayHeights(s)),perPositionHeight:!0,closeBottom:!1}),n=i.PolygonGeometry.createGeometry(o);var e=new i.Material({fabric:{type:"Image",uniforms:{image:this.bottomImg}}}),t=new i.MaterialAppearance({translucent:!1,flat:!0,material:e});this.bottomSurface=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:n}),appearance:t,asynchronous:!1}),this.viewer.scene.primitives.add(this.bottomSurface)}};pe.prototype._createWellWall=function(a,e){let t=this._getMinHeight(a),r=[],s=[];for(let c=0;c<e.length;c++)r.push(this._ellipsoidToLonLat(e[c]).altitude),s.push(t);let o=new i.WallGeometry({positions:e,maximumHeights:r,minimumHeights:s}),n=i.WallGeometry.createGeometry(o);var l=new i.Material({fabric:{type:"Image",uniforms:{image:this.wallImg}}}),h=new i.MaterialAppearance({translucent:!1,flat:!0,material:l});this.wellWall=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:n,attributes:{color:i.ColorGeometryInstanceAttribute.fromColor(i.Color.GREY)},id:"PitWall"}),appearance:h,asynchronous:!1}),this.viewer.scene.primitives.add(this.wellWall)};pe.prototype._switchExcavate=function(a){a?(this.viewer.scene.globe.material=i.Material.fromType("WaJue"),this.wellWall.show=!0,this.bottomSurface.show=!0):(this.viewer.scene.globe.material=null,this.wellWall.show=!1,this.bottomSurface.show=!1)};pe.prototype._updateExcavateDepth=function(a){this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall);for(var e=this.wellData.lerp_pos,t=[],r=e.length,s=0;s<r;s++)t.push(i.Cartesian3.fromRadians(e[s].longitude,e[s].latitude,this.excavateMinHeight-a));this.wellData.bottom_pos=t,this._createWell(this.wellData),this.viewer.scene.primitives.add(this.bottomSurface),this.viewer.scene.primitives.add(this.wellWall)};var Gf=pe;var Fn=class{constructor(e,t={}){if(!e)throw Error("missing viewer param");this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._layer=new i.CustomDataSource("TerrainUplift"),e.dataSources.add(this._layer),this._layerUplift=new i.CustomDataSource("TerrainUplift2"),e.dataSources.add(this._layerUplift),this._minHeight=null,this._currentHeight=[],this._area=[],this._enable=t.enable||!0,this._upHeight=t.upHeight||0,this._clipOutSide=t.clipOutSide||!1,this._diffHeight=t.diffHeight||0,this._upHeight=t.upHeight||0,this._image=t.image||"//data.mars3d.cn/img/textures/poly-land.png",this._imageBottom=t.imageBottom||"//data.mars3d.cn/img/textures/poly-soil.jpg",this._splitNum=t.splitNum||30,this._clippingPolygons=new i.ClippingPolygonCollection({enabled:this._enable,polygons:[],inverse:this._clipOutSide}),this._viewer.scene.globe.backFaceCulling=!0,this._viewer.scene.globe.showSkirts=!0,this._state=m.INITIALIZED,this._callback=null}get type(){return"TerrainUplift"}get layer(){return this._layer}set enable(e){this._enable=e,this._viewer.scene.globe.clippingPolygons.enabled=e}get enable(){return this._enable}set clipOutSide(e){this._clipOutSide=e,this._viewer.scene.globe.clippingPolygons.inverse=e}get clipOutSide(){return this._clipOutSide}set splitNum(e){this._splitNum=e}get splitNum(){return this._splitNum}set diffHeight(e){this._diffHeight=e}get diffHeight(){return this._diffHeight}set upHeight(e){this._upHeight=e}get upHeight(){return this._upHeight}addArea(e=[],t={},r){t!=null&&t.diffHeight&&(this._diffHeight=t.diffHeight),t!=null&&t.upHeight&&(this._upHeight=t.upHeight);let s=e.map(n=>i.Cartesian3.fromDegrees(n.lng,n.lat,n.alt)),o=new i.ClippingPolygon({positions:s});this._id=v.uuid(),o.id=this._id,this._clippingPolygons.add(o),this._viewer.scene.globe.clippingPolygons=this._clippingPolygons,this._prepareWall(e,t),this._callback=r}_prepareWall(e,t={}){let r=e.concat([e[0]]);this._minHeight=null,this._currentHeight=[];let s=this._viewer.terrainProvider;if(s&&!(s instanceof i.EllipsoidTerrainProvider)){let o=[];for(let l=0;l<r.length-1;l++){let h=this._lerp(r[l],r[l+1],this._splitNum);o=o.concat(h)}o.push(r[0]);let n=o.map(l=>i.Cartographic.fromDegrees(l.lng,l.lat,l.alt));i.sampleTerrainMostDetailed(s,n).then(l=>{let h=l.map(c=>{let p=i.Math.toDegrees(c.longitude),_=i.Math.toDegrees(c.latitude);return this._currentHeight.push(parseFloat(c.height)),(!this._minHeight||c.height<this._minHeight)&&(this._minHeight=c.height),{lng:p,lat:_,alt:c.height}});this._perCreateEntity(e,h,t),this._createUpliftArea(e,h)})}else r.forEach(o=>{this._currentHeight.push(parseFloat(o.alt)),(!this._minHeight||o.alt<this._minHeight)&&(this._minHeight=o.alt)}),this._perCreateEntity(r,r,t)}_createUpliftArea(e,t=[]){let r=this._viewer.terrainProvider,s=this._getTinPoints(e,t);i.sampleTerrainMostDetailed(r,s).then(o=>{let n=oe("turf"),l=o.map(function(p){return n.point([i.Math.toDegrees(p.longitude),i.Math.toDegrees(p.latitude),p.height],{z:p.height})}),h=n.featureCollection(l);n.tin(h,"z").features.forEach(p=>{let _=[];p.geometry.coordinates[0].forEach((d,E)=>{_.push(parseFloat(d[0])),_.push(parseFloat(d[1]));let T=E===1?p.properties.b:E===2?p.properties.c:p.properties.a;_.push(T+this._upHeight)});let w=new i.PolygonHierarchy(i.Cartesian3.fromDegreesArrayHeights(_)),g=this._layerUplift.entities.add({polygon:{hierarchy:w,material:new i.ImageMaterialProperty({image:"/assets/data/aaa.png",repeat:new i.Cartesian2(1,1)}),perPositionHeight:!0,outline:!1,outlineColor:i.Color.BLUE}})})})}_getTinPoints(e,t=[],r=80){let s=oe("turf"),o=e.reduce((T,b)=>T.lng<b.lng?T:b).lng,n=e.reduce((T,b)=>T.lng>b.lng?T:b).lng,l=e.reduce((T,b)=>T.lat<b.lat?T:b).lat,h=e.reduce((T,b)=>T.lat>b.lat?T:b).lat,c=i.Rectangle.fromDegrees(o,l,n,h),p=JSON.parse(JSON.stringify(e)).concat(e[0]).map(T=>[T._lng,T._lat]),_=s.polygon([p]),w=r,g=r,d=[];for(let T=0;T<g;T++)for(var E=0;E<w;E++){let b=i.Math.lerp(c.west,c.east,E/(w-1)),M=i.Math.lerp(c.south,c.north,T/(g-1)),N=s.point([i.Math.toDegrees(b),i.Math.toDegrees(M)]);s.booleanPointInPolygon(N,_)&&d.push(i.Cartographic.fromRadians(b,M))}for(let T=0;T<t.length;T++)d.push(i.Cartographic.fromDegrees(t[T].lng,t[T].lat));return d}_perCreateEntity(e,t,r){let s=this._createWallSurface(t),o=this._createBottomSurface(e),n={id:this._id,diffHeight:this._diffHeight,original:r,positions:e,entityIds:[s[0],o[0]],entityUpliftIds:[s[1],o[1]],show:!0};this._area.push(n),typeof this._callback=="function"&&this._callback(n)}_createWallSurface(e){let t=[];e.forEach(o=>{t.push(parseFloat(o.lng)),t.push(parseFloat(o.lat))});let r=this._layer.entities.add({wall:{positions:i.Cartesian3.fromDegreesArray(t),material:new i.ImageMaterialProperty({image:this._image,repeat:new i.Cartesian2(8,1)}),minimumHeights:this._getHeights(e.length,this._minHeight-this._diffHeight),maximumHeights:this._currentHeight}}),s=this._layerUplift.entities.add({wall:{positions:i.Cartesian3.fromDegreesArray(t),material:new i.ImageMaterialProperty({image:this._image,repeat:new i.Cartesian2(8,1),transparent:!0}),minimumHeights:this._getHeights(e.length,this._minHeight-this._diffHeight,this._upHeight),maximumHeights:this._currentHeight.map(o=>o+this._upHeight)}});return[r.id,s.id]}_createBottomSurface(e){let t=[];e.forEach(h=>{t.push(parseFloat(h.lng)),t.push(parseFloat(h.lat)),t.push(this._minHeight-this._diffHeight)});let r=new i.PolygonHierarchy(i.Cartesian3.fromDegreesArrayHeights(t)),s=this._layer.entities.add({polygon:{hierarchy:r,material:new i.ImageMaterialProperty({image:this._imageBottom,repeat:new i.Cartesian2(1,2)}),perPositionHeight:!0,outline:!1,outlineColor:i.Color.BLUE}}),o=[];e.forEach(h=>{o.push(parseFloat(h.lng)),o.push(parseFloat(h.lat)),o.push(this._minHeight-this._diffHeight+this._upHeight)});let n=new i.PolygonHierarchy(i.Cartesian3.fromDegreesArrayHeights(o)),l=this._layerUplift.entities.add({polygon:{hierarchy:n,material:new i.ImageMaterialProperty({image:this._imageBottom,repeat:new i.Cartesian2(1,2),transparent:!0}),perPositionHeight:!0,outline:!1,outlineColor:i.Color.BLUE}});return[s.id,l.id]}_getHeights(e,t,r=0){let s=[];for(let o=0;o<e;o++)s.push(t+r);return s}_lerp(e,t,r=10){let s=[],o=i.Cartographic.fromDegrees(e.lng,e.lat,e.alt),n=i.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Math.lerp(o.longitude,n.longitude,l/r),c=i.Math.lerp(o.latitude,n.latitude,l/r),p=o.height-(o.height-n.height)*(l/r);s.push({lng:i.Math.toDegrees(h),lat:i.Math.toDegrees(c),alt:p})}return s}getAreaById(e){let t=this._area.filter(r=>r.id===e);return t&&t.length>0?t[0]:null}removeArea(e){let t=this._area.findIndex(n=>n.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];this._layer.entities.removeById(r.entityIds[0]),this._layer.entities.removeById(r.entityIds[1]),this._layerUplift.entities.removeById(r.entityUpliftIds[0]),this._layerUplift.entities.removeById(r.entityUpliftIds[1]);let s=this._clippingPolygons._polygons.findIndex(n=>n.id===e),o=this._clippingPolygons.get(s);return this._area.splice(t,1),o&&this._clippingPolygons.remove(o),this}showArea(e){let t=this._area.findIndex(n=>n.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(r.show)return;r.show=!0,this._layer.entities.getById(r.entityIds[0]).show=!0,this._layer.entities.getById(r.entityIds[1]).show=!0,this._layerUplift.entities.getById(r.entityUpliftIds[0]).show=!0,this._layerUplift.entities.getById(r.entityUpliftIds[1]).show=!0;let s=r.positions.map(n=>i.Cartesian3.fromDegrees(n.lng,n.lat,n.alt)),o=new i.ClippingPolygon({positions:s});return o.id=e,this._clippingPolygons.add(o),this}hideArea(e){let t=this._area.findIndex(n=>n.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(!r.show)return;r.show=!1,this._layer.entities.getById(r.entityIds[0]).show=!1,this._layer.entities.getById(r.entityIds[1]).show=!1,this._layerUplift.entities.getById(r.entityUpliftIds[0]).show=!1,this._layerUplift.entities.getById(r.entityUpliftIds[1]).show=!1;let s=this._clippingPolygons._polygons.findIndex(n=>n.id===e),o=this._clippingPolygons.get(s);return o&&this._clippingPolygons.remove(o),this}flyToArea(e){let t=this._area.findIndex(o=>o.id===e);if(t==null)throw Error("missing index result");let r=this._area[t],s=this._layerUplift.entities.getById(r.entityUpliftIds[0]);return this._viewer.flyTo(s),this}toJSON(){return this._area}clear(){this._layer.entities.removeAll(),this._layerUplift.entities.removeAll(),this._clippingPolygons.removeAll()}},Uf=Fn;var Hn=class{constructor(e){qi(this,"_analysisTerrainVisible",e=>{let t=this._viewer.terrainProvider,r=e.map(s=>i.Cartographic.fromDegrees(s.lng,s.lat,s.alt));i.sampleTerrainMostDetailed(t,r).then(s=>{let o=0,n=null;for(let l=0;l<s.length-1;l++){if(l<s.length-2){let h=e[l],c=e[l+1],p=i.Cartesian3.fromDegrees(h.lng,h.lat,h.alt),_=i.Cartesian3.fromDegrees(c.lng,c.lat,c.alt);if(n=this._analysisModelVisible([p,_]),i.defined(n)&&i.defined(n.object)){console.log("\u5728\u6A21\u578B\u4E0A.");let w=i.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),g=i.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(n.position,w,i.Color.GREEN),this._drawLine(n.position,g,i.Color.RED);break}}if(s[l].height>=e[l].alt){console.log("\u5728\u5730\u5F62\u4E0A."),o=l;let h=i.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),c=i.Cartesian3.fromDegrees(e[l].lng,e[l].lat,e[l].alt),p=i.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(h,c,i.Color.GREEN),this._drawLine(c,p,i.Color.RED);break}}if(o===0&&n===null){console.log("\u5168\u90E8\u53EF\u89C6.");let l=i.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),h=i.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(l,h,i.Color.GREEN)}})});qi(this,"_analysisModelVisible",e=>{let t=i.Cartesian3.normalize(i.Cartesian3.subtract(e[1],e[0],new i.Cartesian3),new i.Cartesian3),r=new i.Ray(e[0],t);return this._viewer.scene.pickFromRay(r)});this._id=v.uuid(),this._viewer=e,this._layer=new i.CustomDataSource("sightLine"),this._viewer.dataSources.add(this._layer)}get type(){return"sightLine"}get layer(){return this._layer}_init(e,t,r=10){this._layer&&this._layer.entities.removeAll();let s=i.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),o=i.Cartesian3.fromDegrees(t.lng,t.lat,t.alt),n=this._viewer.terrainProvider;if(n&&!(n instanceof i.EllipsoidTerrainProvider)){let l=this._lerp(e,t,r).concat([t]);this._analysisTerrainVisible(l)}else this._analysisVisible([s,o])}_analysisVisible(e){let t=this._analysisModelVisible(e);if(i.defined(t)&&i.defined(t.object)){let r=this._drawLine(t.position,e[0],i.Color.GREEN),s=this._drawLine(t.position,e[1],i.Color.RED);console.log("\u5728\u6A21\u578B\u4E0A.",r,s)}else{let r=this._drawLine(e[0],e[1],i.Color.GREEN);console.log("\u4E0D\u5728\u6A21\u578B\u4E0A",r)}}_drawLine(e,t,r){return this._layer||(this._layer=new i.CustomDataSource("sightLine"),this._viewer.dataSources.add(this._layer)),this._layer&&this._layer.entities.add({polyline:{positions:[e,t],width:2,material:r,depthFailMaterial:r}}),this}_lerp(e,t,r=10){let s=[],o=i.Cartographic.fromDegrees(e.lng,e.lat,e.alt),n=i.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Math.lerp(o.longitude,n.longitude,l/r),c=i.Math.lerp(o.latitude,n.latitude,l/r),p=o.height-(o.height-n.height)*(l/r);s.push({lng:i.Math.toDegrees(h),lat:i.Math.toDegrees(c),alt:p})}return s}deactivate(){this._layer&&this._layer.entities.removeAll(),this._layer&&this._viewer.dataSources.remove(this._layer),this._layer=null}},Bf=Hn;var Vf=`#define USE_CUBE_MAP_SHADOW true
1748
+ uniform sampler2D colorTexture;
1749
+ uniform sampler2D depthTexture;
1750
+ in vec2 v_textureCoordinates;
1751
+ out vec4 fragColor;
1752
+ uniform mat4 camera_projection_matrix;
1753
+ uniform mat4 camera_view_matrix;
1754
+ uniform samplerCube shadowMap_textureCube;
1755
+ uniform mat4 shadowMap_matrix;
1756
+ uniform vec4 shadowMap_lightPositionEC;
1757
+ uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;
1758
+ uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;
1759
+ uniform float helsing_viewDistance;
1760
+ uniform vec4 helsing_visibleAreaColor;
1761
+ uniform vec4 helsing_invisibleAreaColor;
1762
+ struct zx_shadowParameters
1763
+ {
1764
+ vec3 texCoords;
1765
+ float depthBias;
1766
+ float depth;
1767
+ float nDotL;
1768
+ vec2 texelStepSize;
1769
+ float normalShadingSmooth;
1770
+ float darkness;
1771
+ };
1772
+ float czm_shadowVisibility(samplerCube shadowMap, zx_shadowParameters shadowParameters)
1773
+ {
1774
+ float depthBias = shadowParameters.depthBias;
1775
+ float depth = shadowParameters.depth;
1776
+ float nDotL = shadowParameters.nDotL;
1777
+ float normalShadingSmooth = shadowParameters.normalShadingSmooth;
1778
+ float darkness = shadowParameters.darkness;
1779
+ vec3 uvw = shadowParameters.texCoords;
1780
+ depth -= depthBias;
1781
+ float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);
1782
+ return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
1783
+ }
1784
+ vec4 getPositionEC(){
1785
+ return czm_windowToEyeCoordinates(gl_FragCoord);
1786
+ }
1787
+ vec3 getNormalEC(){
1788
+ return vec3(1.);
1789
+ }
1790
+ vec4 toEye(in vec2 uv,in float depth){
1791
+ vec2 xy=vec2((uv.x*2.-1.),(uv.y*2.-1.));
1792
+ vec4 posInCamera=czm_inverseProjection*vec4(xy,depth,1.);
1793
+ posInCamera=posInCamera/posInCamera.w;
1794
+ return posInCamera;
1795
+ }
1796
+ vec3 pointProjectOnPlane(in vec3 planeNormal,in vec3 planeOrigin,in vec3 point){
1797
+ vec3 v01=point-planeOrigin;
1798
+ float d=dot(planeNormal,v01);
1799
+ return(point-planeNormal*d);
1800
+ }
1801
+ float getDepth(in vec4 depth){
1802
+ float z_window=czm_unpackDepth(depth);
1803
+ z_window=czm_reverseLogDepth(z_window);
1804
+ float n_range=czm_depthRange.near;
1805
+ float f_range=czm_depthRange.far;
1806
+ return(2.*z_window-n_range-f_range)/(f_range-n_range);
1807
+ }
1808
+ float shadow(in vec4 positionEC){
1809
+ vec3 normalEC=getNormalEC();
1810
+ zx_shadowParameters shadowParameters;
1811
+ shadowParameters.texelStepSize=shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;
1812
+ shadowParameters.depthBias=shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;
1813
+ shadowParameters.normalShadingSmooth=shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;
1814
+ shadowParameters.darkness=shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;
1815
+ vec3 directionEC=positionEC.xyz-shadowMap_lightPositionEC.xyz;
1816
+ float distance=length(directionEC);
1817
+ directionEC=normalize(directionEC);
1818
+ float radius=shadowMap_lightPositionEC.w;
1819
+ if(distance>radius)
1820
+ {
1821
+ return 2.0;
1822
+ }
1823
+ vec3 directionWC=czm_inverseViewRotation*directionEC;
1824
+ shadowParameters.depth=distance/radius-0.0003;
1825
+ shadowParameters.nDotL=clamp(dot(normalEC,-directionEC),0.,1.);
1826
+ shadowParameters.texCoords=directionWC;
1827
+ float visibility=czm_shadowVisibility(shadowMap_textureCube,shadowParameters);
1828
+ return visibility;
1829
+ }
1830
+ bool visible(in vec4 result)
1831
+ {
1832
+ result.x/=result.w;
1833
+ result.y/=result.w;
1834
+ result.z/=result.w;
1835
+ return result.x>=-1.&&result.x<=1.
1836
+ &&result.y>=-1.&&result.y<=1.
1837
+ &&result.z>=-1.&&result.z<=1.;
1838
+ }
1839
+ void main(){
1840
+ // \u91C9\u8272 = \u7ED3\u6784\u4E8C\u7EF4(\u989C\u8272\u7EB9\u7406, \u7EB9\u7406\u5750\u6807)
1841
+ fragColor = texture(colorTexture, v_textureCoordinates);
1842
+ // \u6DF1\u5EA6 = \u83B7\u53D6\u6DF1\u5EA6(\u7ED3\u6784\u4E8C\u7EF4(\u6DF1\u5EA6\u7EB9\u7406, \u7EB9\u7406\u5750\u6807))
1843
+ float depth = getDepth(texture(depthTexture, v_textureCoordinates));
1844
+ // \u89C6\u89D2 = (\u7EB9\u7406\u5750\u6807, \u6DF1\u5EA6)
1845
+ vec4 viewPos = toEye(v_textureCoordinates, depth);
1846
+ // \u4E16\u754C\u5750\u6807
1847
+ vec4 wordPos = czm_inverseView * viewPos;
1848
+ // \u865A\u62DF\u76F8\u673A\u4E2D\u5750\u6807
1849
+ vec4 vcPos = camera_view_matrix * wordPos;
1850
+ float near = .001 * helsing_viewDistance;
1851
+ float dis = length(vcPos.xyz);
1852
+ if(dis > near && dis < helsing_viewDistance){
1853
+ // \u900F\u89C6\u6295\u5F71
1854
+ vec4 posInEye = camera_projection_matrix * vcPos;
1855
+ // \u53EF\u89C6\u533A\u989C\u8272
1856
+ // vec4 helsing_visibleAreaColor=vec4(0.,1.,0.,.5);
1857
+ // vec4 helsing_invisibleAreaColor=vec4(1.,0.,0.,.5);
1858
+ if(visible(posInEye)){
1859
+ float vis = shadow(viewPos);
1860
+ if(vis > 0.3){
1861
+ fragColor = mix(fragColor,helsing_visibleAreaColor,.5);
1862
+ } else{
1863
+ fragColor = mix(fragColor,helsing_invisibleAreaColor,.5);
1864
+ }
1865
+ }
1866
+ }
1867
+ }`;var Nn=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._sketch=void 0,this._postStage=void 0,this._enable=!0,this._viewPosition=void 0,this._viewPositionEnd=void 0,this._viewDistance=void 0,this._viewHeading=void 0,this._viewPitch=void 0,this._horizontalViewAngle=90,this._verticalViewAngle=60,this._visibleAreaColor=i.Color.GREEN,this._invisibleAreaColor=i.Color.RED,this._softShadows=!0,this._size=2048}get type(){return"viewshed"}set enable(e){this._enable=e,this.update()}get enable(){return this._enable}set viewPosition(e){this._viewPosition=e,this.update()}get viewPosition(){return this._viewPosition}set viewDistance(e){this._viewDistance=e,this.update()}get viewDistance(){return this._viewDistance}set viewHeading(e){this._viewHeading=e,this.update()}get viewHeading(){return this._viewHeading}set viewPitch(e){this._viewPitch=e,this.update()}get viewPitch(){return this._viewPitch}set horizontalViewAngle(e){this._horizontalViewAngle=e,this.update()}get horizontalViewAngle(){return this._horizontalViewAngle}set verticalViewAngle(e){this._verticalViewAngle=e,this.update()}get verticalViewAngle(){return this._verticalViewAngle}set visibleAreaColor(e){this._visibleAreaColor=e,this.update()}get visibleAreaColor(){return this._visibleAreaColor}set invisibleAreaColor(e){this._invisibleAreaColor=e,this.update()}get invisibleAreaColor(){return this._invisibleAreaColor}_init(e,t={}){this._enable=typeof t.enable=="boolean"?t.enable:!0,this._viewPosition=u.transformWGS84ToCartesian(e),this._viewPositionEnd=u.transformWGS84ToCartesian(e),this._viewDistance=t.viewDistance||(this._viewPositionEnd?i.Cartesian3.distance(this._viewPosition,this._viewPositionEnd):100),this._viewHeading=t.viewHeading||(this._viewPositionEnd?this._getHeading(this._viewPosition,this._viewPositionEnd):0),this._viewPitch=t.viewPitch||(this._viewPositionEnd?this._getPitch(this._viewPosition,this._viewPositionEnd):0),this._horizontalViewAngle=t.horizontalViewAngle||90,this._verticalViewAngle=t.verticalViewAngle||60,this._visibleAreaColor=t.visibleAreaColor||i.Color.GREEN,this._invisibleAreaColor=t.invisibleAreaColor||i.Color.RED,this._softShadows=typeof t.softShadows=="boolean"?t.softShadows:!0,this._size=t.size||2048}_add(){this._createLightCamera(),this._createShadowMap(),this._drawSketch(),this._createPostStage()}update(){this.deactivate(),this._add()}updatePosition(e){this._viewPositionEnd=e,this._viewDistance=i.Cartesian3.distance(this._viewPosition,this._viewPositionEnd),this._viewHeading=this._getHeading(this._viewPosition,this._viewPositionEnd),this._viewPitch=this._getPitch(this._viewPosition,this._viewPositionEnd),this._sketch||this._drawSketch()}deactivate(){this._sketch&&(this._viewer.entities.remove(this._sketch),this._sketch=void 0),this._postStage&&(this._viewer.scene.postProcessStages.remove(this._postStage),this._postStage=void 0)}_createLightCamera(){this.lightCamera=new i.Camera(this._viewer.scene),this.lightCamera.position=this._viewPosition,this.lightCamera.frustum.near=this._viewDistance*.001,this.lightCamera.frustum.far=this._viewDistance;let e=i.Math.toRadians(this._horizontalViewAngle),t=i.Math.toRadians(this._verticalViewAngle),r=this._viewDistance*Math.tan(e/2)*2/(this._viewDistance*Math.tan(t/2)*2);this.lightCamera.frustum.aspectRatio=r,e>t?this.lightCamera.frustum.fov=e:this.lightCamera.frustum.fov=t,this.lightCamera.setView({destination:this._viewPosition,orientation:{heading:i.Math.toRadians(this._viewHeading||0),pitch:i.Math.toRadians(this._viewPitch||0),roll:0}})}_createShadowMap(){this.shadowMap=new i.ShadowMap({context:this._viewer.scene.context,lightCamera:this.lightCamera,enabled:this._enable,isPointLight:!0,pointLightRadius:this._viewDistance,cascadesEnabled:!1,size:this._size,softShadows:this._softShadows,normalOffset:!1,fromLightSource:!1,darkness:1}),this._viewer.scene.shadowMap=this.shadowMap}_createPostStage(){let e=new i.PostProcessStage({fragmentShader:Vf,uniforms:{shadowMap_textureCube:()=>(this.shadowMap.update(Reflect.get(this._viewer.scene,"_frameState")),Reflect.get(this.shadowMap,"_shadowMapTexture")),shadowMap_matrix:()=>(this.shadowMap.update(Reflect.get(this._viewer.scene,"_frameState")),Reflect.get(this.shadowMap,"_shadowMapMatrix")),shadowMap_lightPositionEC:()=>(this.shadowMap.update(Reflect.get(this._viewer.scene,"_frameState")),Reflect.get(this.shadowMap,"_lightPositionEC")),shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:()=>{this.shadowMap.update(Reflect.get(this._viewer.scene,"_frameState"));let t=this.shadowMap._pointBias;return i.Cartesian4.fromElements(t.normalOffsetScale,this.shadowMap._distance,this.shadowMap.maximumDistance,0,new i.Cartesian4)},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:()=>{this.shadowMap.update(Reflect.get(this._viewer.scene,"_frameState"));let t=this.shadowMap._pointBias,s=new i.Cartesian2;return s.x=1/this.shadowMap._textureSize.x,s.y=1/this.shadowMap._textureSize.y,i.Cartesian4.fromElements(s.x,s.y,t.depthBias,t.normalShadingSmooth,new i.Cartesian4)},camera_projection_matrix:this.lightCamera.frustum.projectionMatrix,camera_view_matrix:this.lightCamera.viewMatrix,helsing_viewDistance:()=>this._viewDistance,helsing_visibleAreaColor:this._visibleAreaColor,helsing_invisibleAreaColor:this._invisibleAreaColor}});this._postStage=this._viewer.scene.postProcessStages.add(e)}drawFrustumOutline(){let e=new i.Cartesian3,t=new i.Matrix3,r=new i.Quaternion,s=this.lightCamera.positionWC,o=this.lightCamera.directionWC,n=this.lightCamera.upWC,l=this.lightCamera.rightWC;l=i.Cartesian3.negate(l,e);let h=t;i.Matrix3.setColumn(h,0,l,h),i.Matrix3.setColumn(h,1,n,h),i.Matrix3.setColumn(h,2,o,h);let c=i.Quaternion.fromRotationMatrix(h,r),p=new i.GeometryInstance({geometry:new i.FrustumOutlineGeometry({frustum:this.lightCamera.frustum,origin:this._viewPosition,orientation:c}),id:Math.random().toString(36).substr(2),attributes:{color:i.ColorGeometryInstanceAttribute.fromColor(i.Color.YELLOWGREEN),show:new i.ShowGeometryInstanceAttribute(!0)}});this.frustumOutline=this._viewer.scene.primitives.add(new i.Primitive({geometryInstances:[p],appearance:new i.PerInstanceColorAppearance({flat:!0,translucent:!1})}))}_drawSketch(){this._sketch=this._viewer.entities.add({name:"sketch",position:this._viewPosition,show:!0,orientation:new i.CallbackProperty(()=>i.Transforms.headingPitchRollQuaternion(this._viewPosition,i.HeadingPitchRoll.fromDegrees(this._viewHeading-90,this._viewPitch,0)),!1),ellipsoid:{radii:new i.CallbackProperty(()=>new i.Cartesian3(this._viewDistance,this._viewDistance,this._viewDistance),!1),innerRadii:new i.Cartesian3(2,2,2),minimumClock:i.Math.toRadians(-this._horizontalViewAngle/2),maximumClock:i.Math.toRadians(this._horizontalViewAngle/2),minimumCone:i.Math.toRadians(this._verticalViewAngle+7.75),maximumCone:i.Math.toRadians(180-this._verticalViewAngle-7.75),fill:!1,outline:!0,subdivisions:256,stackPartitions:64,slicePartitions:64,outlineColor:i.Color.YELLOWGREEN}})}_getHeading(e,t){let r=new i.Cartesian3,s=i.Transforms.eastNorthUpToFixedFrame(e);return i.Matrix4.inverse(s,s),i.Matrix4.multiplyByPoint(s,t,r),i.Cartesian3.normalize(r,r),i.Math.toDegrees(Math.atan2(r.x,r.y))}_getPitch(e,t){let r=new i.Cartesian3,s=i.Transforms.eastNorthUpToFixedFrame(e);return i.Matrix4.inverse(s,s),i.Matrix4.multiplyByPoint(s,t,r),i.Cartesian3.normalize(r,r),i.Math.toDegrees(Math.asin(r.z))}},jf=Nn;var Wn=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._contourLine=new Hf(e),this._tilesetShake=new Nf(e),this._sightLine=new Bf(e),this._viewshed=new jf(e)}get ContourLine(){return this._contourLine}get TilesetShake(){return this._tilesetShake}get SightLine(){return this._sightLine}get ViewShed(){return this._viewshed}contourLine(e,t,r){this._contourLine._init(e,t,r)}tilesetShake(e,t){this._tilesetShake._init(e,t)}terrainClip(e={}){return new Wf(this._viewer,e)}terrainClipPlan(e={}){return new Gf(this._viewer,e)}terrainUplift(e={}){return new Uf(this._viewer,e)}sightLine(e,t,r){return this._sightLine._init(e,t,r)}viewshed(e,t){return this._viewshed._init(e,t),this._viewshed}deactivate(e=null){switch(e){case xt.SIGHT_LINE:this._sightLine.deactivate();break;case xt.VIEW_SHED:this._viewshed.deactivate();break;default:this._contourLine.deactivate(),this._tilesetShake.deactivate();break}return this}},qf=Wn;var Gn=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e),this._options.onCalc&&this._options.onCalc(this._positions)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._options.onDrawStop&&this._options.onDrawStop(this._delegate)}_bindEvent(){this.drawTool.on(x.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(x.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(x.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(x.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(x.DRAW_STOP,this._onDrawStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(t),this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},Yf=Gn;var Un=class extends Yf{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Entity({polyline:{...this._style,positions:new i.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),t>0&&this.drawTool.fire(x.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(x.DRAW_STOP,e))}},Zf=Un;var Bn=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new i.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._options={}}_getSampledHeight(e,t=!1){let r=this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof i.EllipsoidTerrainProvider)?i.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(o=>i.Cartographic.fromCartesian(o))):Promise.resolve(e.map(o=>i.Cartographic.fromCartesian(o))),s=this._viewer.scene.clampToHeightSupported&&t?this._viewer.scene.clampToHeightMostDetailed(e,this._layer.entities.values):Promise.resolve(e);return Promise.all([r,s])}_onDrawStop(e){}_onComputedStop(e,t=!1){let r=[];return t?r=e.map((s,o)=>{let l=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(s),h=0;for(let c=1;c<=o;c++){let p=i.Cartesian3.distance(e[c-1],e[c]);h+=p}return{longitude:i.Math.toDegrees(l.longitude),latitude:i.Math.toDegrees(l.latitude),height:l.height,distance:h,cartesian3Position:s}}):r=e.map((s,o)=>{let n=0;for(let l=1;l<=o;l++){let h=i.Cartesian3.fromRadians(e[l-1].longitude,e[l-1].latitude,e[l-1].height),c=i.Cartesian3.fromRadians(e[l].longitude,e[l].latitude,e[l].height),p=i.Cartesian3.distance(h,c);n+=p}return{longitude:i.Math.toDegrees(s.longitude),latitude:i.Math.toDegrees(s.latitude),height:s.height,distance:n,cartesian3Position:i.Cartesian3.fromRadians(s.longitude,s.latitude,s.height)}}),r}_onCalc(e){}_startHook(e,t){this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._options.onDrawStop=this._onDrawStop.bind(this),this._options.onCalc=this._onCalc.bind(this),this._layer.entities.add(this._startLabel),this._layer.entities.add(this._resultLabel)}start(e,t){return this}},Xf=Bn;var Vn=class extends Xf{constructor(){super(),this._maxAnchorSize=9999,this._positions=[],this._includeModel=!0,this._callback=null}_lerp(e,t,r=5){let s=[],o=i.Cartographic.fromCartesian(e),n=i.Cartographic.fromCartesian(t);for(let l=0;l<r;l++){let h=i.Math.lerp(o.longitude,n.longitude,l/r),c=i.Math.lerp(o.latitude,n.latitude,l/r),p=o.height-(o.height-n.height)*(l/r);s.push(i.Cartesian3.fromRadians(h,c,p))}return s}async _onDrawStop(e){let t=this._positions.filter((s,o)=>o!==1),r=await this._onComputedStop(t,this._includeModel);typeof this._callback=="function"&&await this._callback(r)}_stoppedHook(){this._options.onDrawStop&&this._options.onDrawStop(entity)}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let t=[e[0]];this._resultLabel.position=e[e.length-1];for(let r=0;r<e.length-1;r++)t=t.concat(this._lerp(e[r],e[r+1],this._options.lerpNum));t.push(e[e.length-1]),this._getSampledHeight(t,this._includeModel).then(([r,s])=>(this._includeModel||(this._positions=r),r.map((o,n)=>i.Cartesian3.fromDegrees(i.Math.toDegrees(o.longitude),i.Math.toDegrees(o.latitude),Math.max(o.height||0,s[n]?i.Cartographic.fromCartesian(s[n]).height:0))))).then(r=>{this._includeModel&&(this._positions=r);let s=0;for(let o=0;o<r.length-1;o++){let n=i.Cartesian3.distance(r[o],r[o+1]);s+=n}this._resultLabel.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`})}}start(e,t,r={}){return this._startHook(e,r),new Zf({material:r.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:r.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:r.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this._includeModel=r==null?void 0:r.includeModel,this._callback=t,this}},Jf=Vn;var jn=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new i.CustomDataSource("plotAnalysis-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}profile(e,t={}){var r;return(r=new Jf)==null||r.start(this,e,t),this}activate(e,t){switch(e){case Ni.PROFILE:this.profile(t);break;default:break}return this}deactivate(){return this._layer.entities.removeAll(),this._viewer.drawTool.tooltipMess="",this._viewer.drawTool.deactivate(),this._viewer.editTool.tooltipMess="",this._viewer.editTool.deactivate(),this}},Kf=jn;var qn=class{static init(){let e=oe("turf");if(!e)throw new Error("miss the turf lib");return e}static pointBuffer(e,t=50,r=8){let s=this.init(),o=f.parsePosition(e),n=s.point([o.lng,o.lat,o.alt]),l=s.buffer(n,t,{units:"meters",steps:r}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static polylineBuffer(e,t=50,r=8){let s=this.init(),n=f.parsePositions(e).map(p=>[p.lng,p.lat,p.alt]),l=s.lineString(n),h=s.buffer(l,t,{units:"meters",steps:r}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static polygonBuffer(e,t=50,r=8){let s=this.init(),o=f.parsePositions(e),n=o.concat(o[0]).map(p=>[p.lng,p.lat,p.alt]),l=s.polygon([n]),h=s.buffer(l,t,{units:"meters",steps:r}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static transformPolylineScale(e,t=1){let r=this.init(),o=f.parsePositions(e).map(c=>[c.lng,c.lat,c.alt]),n=r.lineString(o),l=r.transformScale(n,t,{units:"meters"}),{coordinates:h}=l.geometry;return h}static transformPolygonScale(e,t){let r=this.init(),s=f.parsePositions(e),o=s.concat(s[0]).map(c=>[c.lng,c.lat,c.alt]),n=r.polygon([o]),l=r.transformScale(n,t,{units:"meters"}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static transformPolylineRotate(e,t=0){let r=this.init(),o=f.parsePositions(e).map(c=>[c.lng,c.lat,c.alt]),n=r.lineString(o),l=r.transformRotate(n,t,{units:"meters"}),{coordinates:h}=l.geometry;return h}static transformPolygonRotate(e,t=0){let r=this.init(),s=f.parsePositions(e),o=s.concat(s[0]).map(c=>[c.lng,c.lat,c.alt]),n=r.polygon([o]),l=r.transformRotate(n,t,{units:"meters"}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static sector(e,t,r,s){let o=this.init(),n=f.parsePosition(e),l=o.point([n.lng,n.lat,n.alt]),h=o.sector(l,t,r,s,{units:"meters"}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static polygonEquivalent(e,t,r,s=null){let o=this.init(),n=[];for(let p=0,_=e.length;p<_;p++){let w=e[p];n.push({type:"Feature",properties:w,geometry:{type:"Point",coordinates:[w.x,w.y]}})}let l={type:"FeatureCollection",features:n};s&&s!==null&&(l=o.interpolate(l,s.cellSize||10,{gridType:"point",property:r,units:(s==null?void 0:s.units)||"kilometers",weight:(s==null?void 0:s.weight)||1}));let h=o.isobands(l,t,{zProperty:r}),c=o.isolines(l,t,{zProperty:r});return{geojsonPoly:h,geojsonLine:c}}},Qf=qn;var MZ=i.Cartesian2,IZ=i.Cartesian3,DZ=i.Matrix3,LZ=i.Matrix4,RZ=i.Material,OZ=i.SceneMode,kZ=i.SkyBox,zZ=i.Color,FZ=i.Rectangle,HZ=i.ShadowMode,NZ=i.JulianDate,WZ=i.HeightReference,GZ=i.HorizontalOrigin,UZ=i.VerticalOrigin,BZ=i.CallbackProperty,VZ=i.ClassificationType,jZ=i.Cesium3DTileStyle,qZ=i.GeographicTilingScheme,YZ=i.WebMercatorTilingScheme,ZZ=i.ColorMaterialProperty,XZ=i.ImageMaterialProperty,JZ=i.PolylineDashMaterialProperty,KZ=i.PolylineGlowMaterialProperty,QZ=i.PolylineOutlineMaterialProperty,$Z=i.PolylineArrowMaterialProperty,eX=i.writeTextToCanvas,tX=i.CustomShaderMode,iX=i.CustomShaderTranslucencyMode,rX=i.CustomShader,sX=i.UniformType,oX=i.Ellipsoid,aX=i.Resource,nX=i.createGooglePhotorealistic3DTileset,lX=i.createElevationBandMaterial,hX=i.ModelAnimationLoop,cX=i.ClippingPlane,pX=i.ClippingPlaneCollection,dX=i.ClippingPolygon,mX=i.ClippingPolygonCollection;var EP="./libs/gm-sdk/resources/",$f=EP,eg=!1,gX={set baseUrl(a){$f=a},get baseUrl(){return $f}};function yX(a={}){return eg?Promise.resolve():(tg&&tg(),new Promise((e,t)=>{a.baseUrl&&(this.config.baseUrl=a.baseUrl),a.echarts&&(cm(a.echarts),ge("echarts",a.echarts)),a.turf&&ge("turf",a.turf),a.shpUtil&&ge("shpUtil",a.shpUtil),eg=!0,St("isInitialized",!0),St("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)}))}function tg(){console.clear(),console.log(`%c
1750
1868
  GM-SDK %c %c
1751
1869
 
1752
- \u7248\u672C: 1.12.4 - 2025-03-14
1753
- \u7F51\u7AD9\u4E3B\u9875: http://127.0.0.1:8081/greatmap/gm-docs/zh/index.html`,"font-size:20px;padding-left:70px;color:#EEB422","font-size:14px;padding-left:50px;color:#EEB422;font-style:oblique","font-size:12px;color:#0865ba")}var K9="1.12.4";export{Ip as Analysis,$t as AnalysisType,V as AnimationType,Nc as AroundPoint,Hc as AroundView,ke as AttackArrow,Ce as Billboard,ht as BillboardPrimitive,ln as BounceBillboardPrimitive,cn as BounceLabelPrimitive,bn as Box,T9 as CallbackProperty,n9 as Cartesian2,l9 as Cartesian3,Yn as ChartLayer,pt as Circle,Bh as CircleBlurMaterialProperty,Vh as CircleDiffuseMaterialProperty,jh as CircleFadeMaterialProperty,Yh as CirclePulseMaterialProperty,Gc as CircleScan,Zh as CircleScanMaterialProperty,qh as CircleSpiralMaterialProperty,Xh as CircleVaryMaterialProperty,Jh as CircleWaveMaterialProperty,C9 as ClassificationType,U9 as ClippingPlane,B9 as ClippingPlaneCollection,V9 as ClippingPolygon,j9 as ClippingPolygonCollection,pn as CloudPrimitive,Ya as ClusterLayer,u9 as Color,b9 as ColorMaterialProperty,ce as CoordTransform,Sn as Corridor,Ja as CustomBillboard,ql as CustomGeographicTilingScheme,Ka as CustomLabel,Xl as CustomMercatorTilingScheme,k9 as CustomShader,R9 as CustomShaderMode,O9 as CustomShaderTranslucencyMode,In as Cylinder,Za as CzmlLayer,dn as DiffuseWallPrimitive,tn as DivIcon,S as DomUtil,ot as DoubleArrow,Qa as DynamicBillboard,qa as DynamicLayer,$a as DynamicModel,fu as Effect,mn as ElecEllipsoidPrimitive,Mn as Ellipse,z9 as Ellipsoid,Kh as EllipsoidElectricMaterialProperty,Qh as EllipsoidTrailMaterialProperty,Xa as FeatureGridLayer,at as FineArrow,un as FlowLinePrimitive,Uc as Flying,nt as GatheringPlace,_t as GeoJsonLayer,Op as GeoTools,E9 as GeographicTilingScheme,Bc as GlobeRotate,Fn as GpxLayer,zn as GraticuleLayer,Hn as GroundPrimitiveLayer,ul as GroundSkyBox,lm as HeatMapLayer,y9 as HeightReference,v9 as HorizontalOrigin,Nn as HtmlLayer,rn as I3S,Wn as I3SLayer,S9 as ImageMaterialProperty,Zl as ImageryLayerFactory,R as ImageryType,g9 as JulianDate,np as KeyboardRoaming,Gn as KmlLayer,dt as Label,Un as LabelLayer,ct as LabelPrimitive,P as Layer,Ua as LayerGroup,Be as LayerType,fn as LightCylinderPrimitive,p9 as Material,en as Math,h9 as Matrix3,c9 as Matrix4,Tp as Measure,se as MeasureType,Oe as Model,G9 as ModelAnimationLoop,Ae as ModelEventType,gn as ModelPrimitive,L as MouseEventType,Pe as MouseMode,g as Overlay,F as OverlayType,_ as P,_ as Parse,Dn as Plane,du as Plot,Rp as PlotAnalysis,ei as PlotAnalysisType,mt as Point,vn as PointPrimitive,xe as Polygon,Ee as Polyline,D9 as PolylineArrowMaterialProperty,I9 as PolylineDashMaterialProperty,$h as PolylineFlickerMaterialProperty,ec as PolylineFlowMaterialProperty,M9 as PolylineGlowMaterialProperty,tc as PolylineImageTrailMaterialProperty,ic as PolylineLightingMaterialProperty,rc as PolylineLightingTrailMaterialProperty,A9 as PolylineOutlineMaterialProperty,wn as PolylinePrimitive,sc as PolylineTrailMaterialProperty,Rn as PolylineVolume,Y as Position,Bn as PrimitiveLayer,oc as RadarLineMaterialProperty,jc as RadarScan,ac as RadarSweepMaterialProperty,nc as RadarWaveMaterialProperty,Vn as RasterTileLayer,ut as Rect,_9 as Rectangle,Pn as ReflectionWaterPrimitive,H9 as Resource,lp as RoamingController,hp as RoamingPath,Tn as ScanCirclePrimitive,A as SceneEventType,d9 as SceneMode,f9 as ShadowMode,kn as Shp2JsonLayer,m9 as SkyBox,An as Sphere,u as T,lt as TailedAttackArrow,Jl as TerrainFactory,Se as TerrainType,q as TileSetEventType,sn as Tileset,jn as TilesetLayer,x9 as TilesetStyle,pp as Track,cp as TrackController,Ie as TrackViewMode,Cn as TrailLinePrimitive,u as Transform,F9 as UniformType,v as Util,K9 as VERSION,pe as VectorLayer,w9 as VerticalOrigin,xn as VideoPrimitive,Xd as Viewer,On as Wall,lc as WallImageTrailMaterialProperty,cc as WallLineTrailMaterialProperty,dc as WallTrailMaterialProperty,mc as WaterMaterialProperty,En as WaterPrimitive,Tu as Weather,cm as WindLayer,X9 as config,W9 as createElevationBandMaterial,N9 as createGooglePhotorealistic3DTileset,P9 as ebMercatorTilingScheme,me as getLib,J9 as ready,de as registerLib,L9 as writeTextToCanvas};
1870
+ \u7248\u672C: 1.12.5 - 2025-07-24
1871
+ \u7F51\u7AD9\u4E3B\u9875: http://127.0.0.1:8081/greatmap/gm-docs/zh/index.html`,"font-size:20px;padding-left:70px;color:#EEB422","font-size:14px;padding-left:50px;color:#EEB422;font-style:oblique","font-size:12px;color:#0865ba")}var vX="1.12.5";export{qf as Analysis,xt as AnalysisType,Y as AnimationType,ef as AroundPoint,$_ as AroundView,Ge as AttackArrow,Se as Billboard,Ft as BillboardPrimitive,wl as BounceBillboardPrimitive,Tl as BounceLabelPrimitive,Wd as Box,BZ as CallbackProperty,MZ as Cartesian2,IZ as Cartesian3,nm as ChartLayer,Kt as Circle,s_ as CircleBlurMaterialProperty,o_ as CircleDiffuseMaterialProperty,a_ as CircleFadeMaterialProperty,n_ as CirclePulseMaterialProperty,rf as CircleScan,l_ as CircleScanMaterialProperty,h_ as CircleSpiralMaterialProperty,c_ as CircleVaryMaterialProperty,p_ as CircleWaveMaterialProperty,VZ as ClassificationType,cX as ClippingPlane,pX as ClippingPlaneCollection,dX as ClippingPolygon,mX as ClippingPolygonCollection,xl as CloudPrimitive,ol as ClusterLayer,zZ as Color,ZZ as ColorMaterialProperty,_e as CoordTransform,Ud as Corridor,hl as CustomBillboard,hu as CustomGeographicTilingScheme,cl as CustomLabel,cu as CustomMercatorTilingScheme,rX as CustomShader,tX as CustomShaderMode,iX as CustomShaderTranslucencyMode,Bd as Cylinder,al as CzmlLayer,El as DiffuseWallPrimitive,ul as DivIcon,A as DomUtil,Rt as DoubleArrow,pl as DynamicBillboard,nl as DynamicLayer,dl as DynamicModel,pP as Effect,Pl as ElecEllipsoidPrimitive,Vd as Ellipse,oX as Ellipsoid,d_ as EllipsoidElectricMaterialProperty,m_ as EllipsoidTrailMaterialProperty,ll as FeatureGridLayer,Ot as FineArrow,bl as FlowLinePrimitive,sf as Flying,kt as GatheringPlace,ti as GeoJsonLayer,Qf as GeoTools,qZ as GeographicTilingScheme,of as GlobeRotate,Kd as GpxLayer,Qd as GraticuleLayer,$d as GroundPrimitiveLayer,Mm as GroundSkyBox,rE as HeatMapLayer,WZ as HeightReference,GZ as HorizontalOrigin,em as HtmlLayer,_l as I3S,tm as I3SLayer,XZ as ImageMaterialProperty,lu as ImageryLayerFactory,O as ImageryType,NZ as JulianDate,xf as KeyboardRoaming,im as KmlLayer,Qt as Label,rm as LabelLayer,Ht as LabelPrimitive,S as Layer,tl as LayerGroup,ot as LayerType,Al as LightCylinderPrimitive,RZ as Material,ml as Math,DZ as Matrix3,LZ as Matrix4,Ff as Measure,le as MeasureType,We as Model,hX as ModelAnimationLoop,ke as ModelEventType,Ml as ModelPrimitive,R as MouseEventType,Ie as MouseMode,y as Overlay,H as OverlayType,f as P,f as Parse,qd as Plane,nP as Plot,Kf as PlotAnalysis,Ni as PlotAnalysisType,$t as Point,Dl as PointPrimitive,Ae as Polygon,Me as Polyline,$Z as PolylineArrowMaterialProperty,JZ as PolylineDashMaterialProperty,u_ as PolylineFlickerMaterialProperty,__ as PolylineFlowMaterialProperty,KZ as PolylineGlowMaterialProperty,f_ as PolylineImageTrailMaterialProperty,g_ as PolylineLightingMaterialProperty,y_ as PolylineLightingTrailMaterialProperty,QZ as PolylineOutlineMaterialProperty,Ll as PolylinePrimitive,v_ as PolylineTrailMaterialProperty,Zd as PolylineVolume,X as Position,sm as PrimitiveLayer,w_ as RadarLineMaterialProperty,nf as RadarScan,C_ as RadarSweepMaterialProperty,T_ as RadarWaveMaterialProperty,om as RasterTileLayer,ei as Rect,FZ as Rectangle,Nd as ReflectionWaterPrimitive,aX as Resource,Ef as RoamingController,Pf as RoamingPath,Rl as ScanCirclePrimitive,D as SceneEventType,OZ as SceneMode,HZ as ShadowMode,Jd as Shp2JsonLayer,kZ as SkyBox,jd as Sphere,u as T,zt as TailedAttackArrow,pu as TerrainFactory,Le as TerrainType,K as TileSetEventType,fl as Tileset,am as TilesetLayer,jZ as TilesetStyle,Sf as Track,bf as TrackController,Re as TrackViewMode,Ol as TrailLinePrimitive,u as Transform,sX as UniformType,v as Util,vX as VERSION,fe as VectorLayer,UZ as VerticalOrigin,kl as VideoPrimitive,zd as VideoProjectionPrimitive,V1 as Viewer,Gd as VolumRadar,Xd as Wall,x_ as WallImageTrailMaterialProperty,P_ as WallLineTrailMaterialProperty,S_ as WallTrailMaterialProperty,A_ as WaterMaterialProperty,Fd as WaterPrimitive,fP as Weather,oE as WindLayer,gX as config,lX as createElevationBandMaterial,nX as createGooglePhotorealistic3DTileset,YZ as ebMercatorTilingScheme,oe as getLib,yX as ready,ge as registerLib,eX as writeTextToCanvas};