月球大数据地理空间分析展示平台-【前端】-月球2期前端
surprise
2024-02-26 66372722cced2c1310d77388422091f43b654ac5
public/WebSDK/index.cjs
@@ -1,17 +1,17 @@
/**
 *
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 3.2.4-12
 * Version 3.2.4-13
 *
 **/
var J_t=Object.create;var xX=Object.defineProperty;var W_t=Object.getOwnPropertyDescriptor;var j_t=Object.getOwnPropertyNames;var q_t=Object.getPrototypeOf,X_t=Object.prototype.hasOwnProperty;var Z_t=(o,A)=>()=>(A||o((A={exports:{}}).exports,A),A.exports),sde=(o,A)=>{for(var f in A)xX(o,f,{get:A[f],enumerable:!0})},y5e=(o,A,f,m)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of j_t(A))!X_t.call(o,C)&&C!==f&&xX(o,C,{get:()=>A[C],enumerable:!(m=W_t(A,C))||m.enumerable});return o};var S9=(o,A,f)=>(f=o!=null?J_t(q_t(o)):{},y5e(A||!o||!o.__esModule?xX(f,"default",{value:o,enumerable:!0}):f,o)),$_t=o=>y5e(xX({},"__esModule",{value:!0}),o);var Sct=Z_t((Qct,Dse)=>{(function(o,A,f){typeof Dse<"u"&&Dse.exports?Dse.exports=f():typeof define=="function"&&define.amd?define(f):A[o]=f()})("h337",Qct,function(){var o={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},A=function(){var E=function(Q){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=Q.xField||Q.defaultXField,this._yField=Q.yField||Q.defaultYField,this._valueField=Q.valueField||Q.defaultValueField,Q.radius&&(this._cfgRadius=Q.radius)},I=o.defaultRadius;return E.prototype={_organiseData:function(w,Q){var M=w[this._xField],B=w[this._yField],T=this._radi,D=this._data,F=this._max,L=this._min,R=w[this._valueField]||1,k=w.radius||this._cfgRadius||I;D[M]||(D[M]=[],T[M]=[]),D[M][B]?D[M][B]+=R:(D[M][B]=R,T[M][B]=k);var U=D[M][B];return U>F?(Q?this.setDataMax(U):this._max=U,!1):U<L?(Q?this.setDataMin(U):this._min=U,!1):{x:M,y:B,value:R,radius:k,min:L,max:F}},_unOrganizeData:function(){var w=[],Q=this._data,M=this._radi;for(var B in Q)for(var T in Q[B])w.push({x:B,y:T,radius:M[B][T],value:Q[B][T]});return{min:this._min,max:this._max,data:w}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var w=arguments[0],Q=w.length;Q--;)this.addData.call(this,w[Q]);else{var M=this._organiseData(arguments[0],!0);M&&(this._data.length===0&&(this._min=this._max=M.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[M]}))}return this},setData:function(w){var Q=w.data,M=Q.length;this._data=[],this._radi=[];for(var B=0;B<M;B++)this._organiseData(Q[B],!1);return this._max=w.max,this._min=w.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(w){return this._max=w,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(w){return this._min=w,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(w){this._coordinator=w},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},E}(),f=function(){var E=function(M){var B=M.gradient||M.defaultGradient,T=document.createElement("canvas"),D=T.getContext("2d");T.width=256,T.height=1;var F=D.createLinearGradient(0,0,256,1);for(var L in B)F.addColorStop(L,B[L]);return D.fillStyle=F,D.fillRect(0,0,256,1),D.getImageData(0,0,256,1).data},I=function(M,B){var T=document.createElement("canvas"),D=T.getContext("2d"),F=M,L=M;if(T.width=T.height=M*2,B==1)D.beginPath(),D.arc(F,L,M,0,2*Math.PI,!1),D.fillStyle="rgba(0,0,0,1)",D.fill();else{var R=D.createRadialGradient(F,L,M*B,F,L,M);R.addColorStop(0,"rgba(0,0,0,1)"),R.addColorStop(1,"rgba(0,0,0,0)"),D.fillStyle=R,D.fillRect(0,0,2*M,2*M)}return T},w=function(L){for(var B=[],T=L.min,D=L.max,F=L.radi,L=L.data,R=Object.keys(L),k=R.length;k--;)for(var U=R[k],V=Object.keys(L[U]),H=V.length;H--;){var q=V[H],ie=L[U][q],Z=F[U][q];B.push({x:U,y:q,value:ie,radius:Z})}return{min:T,max:D,data:B}};function Q(M){var B=M.container,T=this.shadowCanvas=document.createElement("canvas"),D=this.canvas=M.canvas||document.createElement("canvas"),F=this._renderBoundaries=[1e4,1e4,0,0],L=getComputedStyle(M.container)||{};D.className="heatmap-canvas",this._width=D.width=T.width=M.width||+L.width.replace(/px/,""),this._height=D.height=T.height=M.height||+L.height.replace(/px/,""),this.shadowCtx=T.getContext("2d"),this.ctx=D.getContext("2d"),D.style.cssText=T.style.cssText="position:absolute;left:0;top:0;",B.style.position="relative",B.appendChild(D),this._palette=E(M),this._templates={},this._setStyles(M)}return Q.prototype={renderPartial:function(M){M.data.length>0&&(this._drawAlpha(M),this._colorize())},renderAll:function(M){this._clear(),M.data.length>0&&(this._drawAlpha(w(M)),this._colorize())},_updateGradient:function(M){this._palette=E(M)},updateConfig:function(M){M.gradient&&this._updateGradient(M),this._setStyles(M)},setDimensions:function(M,B){this._width=M,this._height=B,this.canvas.width=this.shadowCanvas.width=M,this.canvas.height=this.shadowCanvas.height=B},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(M){this._blur=M.blur==0?0:M.blur||M.defaultBlur,M.backgroundColor&&(this.canvas.style.backgroundColor=M.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=M.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=M.height||this._height,this._opacity=(M.opacity||0)*255,this._maxOpacity=(M.maxOpacity||M.defaultMaxOpacity)*255,this._minOpacity=(M.minOpacity||M.defaultMinOpacity)*255,this._useGradientOpacity=!!M.useGradientOpacity},_drawAlpha:function(D){for(var B=this._min=D.min,T=this._max=D.max,D=D.data||[],F=D.length,L=1-this._blur;F--;){var R=D[F],k=R.x,U=R.y,V=R.radius,H=Math.min(R.value,T),q=k-V,ie=U-V,Z=this.shadowCtx,oe;this._templates[V]?oe=this._templates[V]:this._templates[V]=oe=I(V,L);var ne=(H-B)/(T-B);Z.globalAlpha=ne<.01?.01:ne,Z.drawImage(oe,q,ie),q<this._renderBoundaries[0]&&(this._renderBoundaries[0]=q),ie<this._renderBoundaries[1]&&(this._renderBoundaries[1]=ie),q+2*V>this._renderBoundaries[2]&&(this._renderBoundaries[2]=q+2*V),ie+2*V>this._renderBoundaries[3]&&(this._renderBoundaries[3]=ie+2*V)}},_colorize:function(){var M=this._renderBoundaries[0],B=this._renderBoundaries[1],T=this._renderBoundaries[2]-M,D=this._renderBoundaries[3]-B,F=this._width,L=this._height,R=this._opacity,k=this._maxOpacity,U=this._minOpacity,V=this._useGradientOpacity;M<0&&(M=0),B<0&&(B=0),M+T>F&&(T=F-M),B+D>L&&(D=L-B);for(var H=this.shadowCtx.getImageData(M,B,T,D),q=H.data,ie=q.length,Z=this._palette,oe=3;oe<ie;oe+=4){var ne=q[oe],se=ne*4;if(!!se){var ce;R>0?ce=R:ne<k?ne<U?ce=U:ce=ne:ce=k,q[oe-3]=Z[se],q[oe-2]=Z[se+1],q[oe-1]=Z[se+2],q[oe]=V?Z[se+3]:ce}}H.data=q,this.ctx.putImageData(H,M,B),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(M){var B,T=this.shadowCtx,D=T.getImageData(M.x,M.y,1,1),F=D.data[3],L=this._max,R=this._min;return B=Math.abs(L-R)*(F/255)>>0,B},getDataURL:function(){return this.canvas.toDataURL()}},Q}(),m=function(){var E=!1;return o.defaultRenderer==="canvas2d"&&(E=f),E}(),C={merge:function(){for(var v={},E=arguments.length,I=0;I<E;I++){var w=arguments[I];for(var Q in w)v[Q]=w[Q]}return v}},y=function(){var E=function(){function M(){this.cStore={}}return M.prototype={on:function(B,T,D){var F=this.cStore;F[B]||(F[B]=[]),F[B].push(function(L){return T.call(D,L)})},emit:function(B,T){var D=this.cStore;if(D[B])for(var F=D[B].length,L=0;L<F;L++){var R=D[B][L];R(T)}}},M}(),I=function(Q){var M=Q._renderer,B=Q._coordinator,T=Q._store;B.on("renderpartial",M.renderPartial,M),B.on("renderall",M.renderAll,M),B.on("extremachange",function(D){Q._config.onExtremaChange&&Q._config.onExtremaChange({min:D.min,max:D.max,gradient:Q._config.gradient||Q._config.defaultGradient})}),T.setCoordinator(B)};function w(){var Q=this._config=C.merge(o,arguments[0]||{});if(this._coordinator=new E,Q.plugin){var M=Q.plugin;if(o.plugins[M]){var B=o.plugins[M];this._renderer=new B.renderer(Q),this._store=new B.store(Q)}else throw new Error("Plugin '"+M+"' not found. Maybe it was not registered.")}else this._renderer=new m(Q),this._store=new A(Q);I(this)}return w.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(Q){return this._config=C.merge(this._config,Q),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(Q){return this._store.getValueAt?this._store.getValueAt(Q):this._renderer.getValueAt?this._renderer.getValueAt(Q):null}},w}(),x={create:function(v){return new y(v)},register:function(v,E){o.plugins[v]=E}};return x})});var Hki={};sde(Hki,{Analysis:()=>Fle,BaseObject:()=>c0,Billboard:()=>Pse,Box:()=>Kse,BwMode:()=>fse,Camera:()=>Wae,Cesium:()=>z2e,ClusterLayer:()=>qut,ColorAdjustment:()=>dse,Core:()=>oct,Cylinder:()=>Jse,Degrees:()=>Xut,DoubleClickObjectTool:()=>rse,DoubleScreen:()=>ect,DynamicEyeOffset:()=>oPi,EarthCtrl:()=>e0t,Edit:()=>vle,EditTool:()=>use,ElevationTool:()=>tct,Ellipse:()=>$se,Ellipsoid:()=>jse,Environment:()=>pse,EventHandler:()=>SN,Explosion:()=>bse,FeatureLayer:()=>ule,Fire:()=>Ise,Fireworks:()=>Sse,FisheyeVideoProjection:()=>xse,Fog:()=>cse,Hawkeye:()=>fle,HorizontalDistanceTool:()=>Zae,HoverObjectTool:()=>ise,ImageryLayer:()=>rle,Label:()=>Nse,LineOfSightTool:()=>i0t,Measure:()=>ase,MeasureAreaTool:()=>kH,MeasureHeightTool:()=>qae,MeasureLineLengthTool:()=>jae,MeasurePathLengthTool:()=>DW,MeasureSlopeTool:()=>Xae,MeasureSurfaceAreaTool:()=>$ae,MilitaryPlotting:()=>nue,Model:()=>Lse,ModelClipping:()=>Dle,ModelEdit:()=>RH,ModelLayer:()=>sle,NightMode:()=>gse,Node:()=>UO,ObjectFactory:()=>D2,PerspectiveVideoProjection:()=>yse,PickObjectTool:()=>ese,PickPositionTool:()=>tse,Point:()=>Vse,Polygon:()=>Gse,Polyline:()=>Ose,PolylineVolume:()=>tle,Profile:()=>Ble,RClickObjectTool:()=>nse,RadarScan:()=>Tse,Rain:()=>Ase,Rectangle:()=>Xse,RestrictHeight:()=>Sle,SampleRenderedDataFlags:()=>nPi,Scene:()=>xle,SceneManager:()=>t0t,SelectSet:()=>Cse,Skyline:()=>ble,Smoke:()=>Bse,Snow:()=>hse,SpatialObject:()=>Qc,SpatialTransform:()=>Vae,SpotLight:()=>ple,Submergence:()=>_le,TerrainExcavation:()=>Rle,TerrainLayer:()=>ole,TerrainModifier:()=>Tle,Tool:()=>ja,ToolManager:()=>Jae,VERSIONINFO:()=>I5e,VideoProjection:()=>r0t,ViewShed:()=>Ele,Volumetric:()=>Ile,WFSTool:()=>jut,Waters:()=>dle,WorkChart:()=>Ale,ZBiasGeometryInstanceAttribute:()=>rPi,czmlPathAnimation:()=>ETe,loadArrayBuffer:()=>hPi,loadBlob:()=>APi,loadImage:()=>dPi,loadJson:()=>cPi,loadLayui:()=>ITe,loadText:()=>uPi,sampleRenderedData:()=>aPi,sampleRenderedMesh:()=>sPi,sampleRenderedTerrain:()=>lPi,viewerNavigationCubeMixin:()=>s0t});module.exports=$_t(Hki);var x5e="WebSDK v3.2.4-12",v5e="Cesium v1.99",E5e="2023.12.1",eBt="SmartEarth",tBt={VERSION:x5e,CesiumVERSION:v5e,CompileTime:E5e},iBt=typeof window<"u"?window:typeof self<"u"?self:{};iBt.logSmartEarth=()=>{let o=`
var J_t=Object.create;var xX=Object.defineProperty;var W_t=Object.getOwnPropertyDescriptor;var j_t=Object.getOwnPropertyNames;var q_t=Object.getPrototypeOf,X_t=Object.prototype.hasOwnProperty;var Z_t=(o,A)=>()=>(A||o((A={exports:{}}).exports,A),A.exports),sde=(o,A)=>{for(var f in A)xX(o,f,{get:A[f],enumerable:!0})},y5e=(o,A,f,m)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of j_t(A))!X_t.call(o,C)&&C!==f&&xX(o,C,{get:()=>A[C],enumerable:!(m=W_t(A,C))||m.enumerable});return o};var S9=(o,A,f)=>(f=o!=null?J_t(q_t(o)):{},y5e(A||!o||!o.__esModule?xX(f,"default",{value:o,enumerable:!0}):f,o)),$_t=o=>y5e(xX({},"__esModule",{value:!0}),o);var Sct=Z_t((Qct,Dse)=>{(function(o,A,f){typeof Dse<"u"&&Dse.exports?Dse.exports=f():typeof define=="function"&&define.amd?define(f):A[o]=f()})("h337",Qct,function(){var o={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},A=function(){var E=function(Q){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=Q.xField||Q.defaultXField,this._yField=Q.yField||Q.defaultYField,this._valueField=Q.valueField||Q.defaultValueField,Q.radius&&(this._cfgRadius=Q.radius)},I=o.defaultRadius;return E.prototype={_organiseData:function(w,Q){var M=w[this._xField],B=w[this._yField],T=this._radi,D=this._data,F=this._max,L=this._min,R=w[this._valueField]||1,k=w.radius||this._cfgRadius||I;D[M]||(D[M]=[],T[M]=[]),D[M][B]?D[M][B]+=R:(D[M][B]=R,T[M][B]=k);var U=D[M][B];return U>F?(Q?this.setDataMax(U):this._max=U,!1):U<L?(Q?this.setDataMin(U):this._min=U,!1):{x:M,y:B,value:R,radius:k,min:L,max:F}},_unOrganizeData:function(){var w=[],Q=this._data,M=this._radi;for(var B in Q)for(var T in Q[B])w.push({x:B,y:T,radius:M[B][T],value:Q[B][T]});return{min:this._min,max:this._max,data:w}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var w=arguments[0],Q=w.length;Q--;)this.addData.call(this,w[Q]);else{var M=this._organiseData(arguments[0],!0);M&&(this._data.length===0&&(this._min=this._max=M.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[M]}))}return this},setData:function(w){var Q=w.data,M=Q.length;this._data=[],this._radi=[];for(var B=0;B<M;B++)this._organiseData(Q[B],!1);return this._max=w.max,this._min=w.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(w){return this._max=w,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(w){return this._min=w,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(w){this._coordinator=w},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},E}(),f=function(){var E=function(M){var B=M.gradient||M.defaultGradient,T=document.createElement("canvas"),D=T.getContext("2d");T.width=256,T.height=1;var F=D.createLinearGradient(0,0,256,1);for(var L in B)F.addColorStop(L,B[L]);return D.fillStyle=F,D.fillRect(0,0,256,1),D.getImageData(0,0,256,1).data},I=function(M,B){var T=document.createElement("canvas"),D=T.getContext("2d"),F=M,L=M;if(T.width=T.height=M*2,B==1)D.beginPath(),D.arc(F,L,M,0,2*Math.PI,!1),D.fillStyle="rgba(0,0,0,1)",D.fill();else{var R=D.createRadialGradient(F,L,M*B,F,L,M);R.addColorStop(0,"rgba(0,0,0,1)"),R.addColorStop(1,"rgba(0,0,0,0)"),D.fillStyle=R,D.fillRect(0,0,2*M,2*M)}return T},w=function(L){for(var B=[],T=L.min,D=L.max,F=L.radi,L=L.data,R=Object.keys(L),k=R.length;k--;)for(var U=R[k],V=Object.keys(L[U]),H=V.length;H--;){var q=V[H],ie=L[U][q],Z=F[U][q];B.push({x:U,y:q,value:ie,radius:Z})}return{min:T,max:D,data:B}};function Q(M){var B=M.container,T=this.shadowCanvas=document.createElement("canvas"),D=this.canvas=M.canvas||document.createElement("canvas"),F=this._renderBoundaries=[1e4,1e4,0,0],L=getComputedStyle(M.container)||{};D.className="heatmap-canvas",this._width=D.width=T.width=M.width||+L.width.replace(/px/,""),this._height=D.height=T.height=M.height||+L.height.replace(/px/,""),this.shadowCtx=T.getContext("2d"),this.ctx=D.getContext("2d"),D.style.cssText=T.style.cssText="position:absolute;left:0;top:0;",B.style.position="relative",B.appendChild(D),this._palette=E(M),this._templates={},this._setStyles(M)}return Q.prototype={renderPartial:function(M){M.data.length>0&&(this._drawAlpha(M),this._colorize())},renderAll:function(M){this._clear(),M.data.length>0&&(this._drawAlpha(w(M)),this._colorize())},_updateGradient:function(M){this._palette=E(M)},updateConfig:function(M){M.gradient&&this._updateGradient(M),this._setStyles(M)},setDimensions:function(M,B){this._width=M,this._height=B,this.canvas.width=this.shadowCanvas.width=M,this.canvas.height=this.shadowCanvas.height=B},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(M){this._blur=M.blur==0?0:M.blur||M.defaultBlur,M.backgroundColor&&(this.canvas.style.backgroundColor=M.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=M.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=M.height||this._height,this._opacity=(M.opacity||0)*255,this._maxOpacity=(M.maxOpacity||M.defaultMaxOpacity)*255,this._minOpacity=(M.minOpacity||M.defaultMinOpacity)*255,this._useGradientOpacity=!!M.useGradientOpacity},_drawAlpha:function(D){for(var B=this._min=D.min,T=this._max=D.max,D=D.data||[],F=D.length,L=1-this._blur;F--;){var R=D[F],k=R.x,U=R.y,V=R.radius,H=Math.min(R.value,T),q=k-V,ie=U-V,Z=this.shadowCtx,oe;this._templates[V]?oe=this._templates[V]:this._templates[V]=oe=I(V,L);var ne=(H-B)/(T-B);Z.globalAlpha=ne<.01?.01:ne,Z.drawImage(oe,q,ie),q<this._renderBoundaries[0]&&(this._renderBoundaries[0]=q),ie<this._renderBoundaries[1]&&(this._renderBoundaries[1]=ie),q+2*V>this._renderBoundaries[2]&&(this._renderBoundaries[2]=q+2*V),ie+2*V>this._renderBoundaries[3]&&(this._renderBoundaries[3]=ie+2*V)}},_colorize:function(){var M=this._renderBoundaries[0],B=this._renderBoundaries[1],T=this._renderBoundaries[2]-M,D=this._renderBoundaries[3]-B,F=this._width,L=this._height,R=this._opacity,k=this._maxOpacity,U=this._minOpacity,V=this._useGradientOpacity;M<0&&(M=0),B<0&&(B=0),M+T>F&&(T=F-M),B+D>L&&(D=L-B);for(var H=this.shadowCtx.getImageData(M,B,T,D),q=H.data,ie=q.length,Z=this._palette,oe=3;oe<ie;oe+=4){var ne=q[oe],se=ne*4;if(!!se){var ce;R>0?ce=R:ne<k?ne<U?ce=U:ce=ne:ce=k,q[oe-3]=Z[se],q[oe-2]=Z[se+1],q[oe-1]=Z[se+2],q[oe]=V?Z[se+3]:ce}}H.data=q,this.ctx.putImageData(H,M,B),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(M){var B,T=this.shadowCtx,D=T.getImageData(M.x,M.y,1,1),F=D.data[3],L=this._max,R=this._min;return B=Math.abs(L-R)*(F/255)>>0,B},getDataURL:function(){return this.canvas.toDataURL()}},Q}(),m=function(){var E=!1;return o.defaultRenderer==="canvas2d"&&(E=f),E}(),C={merge:function(){for(var v={},E=arguments.length,I=0;I<E;I++){var w=arguments[I];for(var Q in w)v[Q]=w[Q]}return v}},y=function(){var E=function(){function M(){this.cStore={}}return M.prototype={on:function(B,T,D){var F=this.cStore;F[B]||(F[B]=[]),F[B].push(function(L){return T.call(D,L)})},emit:function(B,T){var D=this.cStore;if(D[B])for(var F=D[B].length,L=0;L<F;L++){var R=D[B][L];R(T)}}},M}(),I=function(Q){var M=Q._renderer,B=Q._coordinator,T=Q._store;B.on("renderpartial",M.renderPartial,M),B.on("renderall",M.renderAll,M),B.on("extremachange",function(D){Q._config.onExtremaChange&&Q._config.onExtremaChange({min:D.min,max:D.max,gradient:Q._config.gradient||Q._config.defaultGradient})}),T.setCoordinator(B)};function w(){var Q=this._config=C.merge(o,arguments[0]||{});if(this._coordinator=new E,Q.plugin){var M=Q.plugin;if(o.plugins[M]){var B=o.plugins[M];this._renderer=new B.renderer(Q),this._store=new B.store(Q)}else throw new Error("Plugin '"+M+"' not found. Maybe it was not registered.")}else this._renderer=new m(Q),this._store=new A(Q);I(this)}return w.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(Q){return this._config=C.merge(this._config,Q),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(Q){return this._store.getValueAt?this._store.getValueAt(Q):this._renderer.getValueAt?this._renderer.getValueAt(Q):null}},w}(),x={create:function(v){return new y(v)},register:function(v,E){o.plugins[v]=E}};return x})});var Hki={};sde(Hki,{Analysis:()=>Fle,BaseObject:()=>c0,Billboard:()=>Pse,Box:()=>Kse,BwMode:()=>fse,Camera:()=>Wae,Cesium:()=>z2e,ClusterLayer:()=>qut,ColorAdjustment:()=>dse,Core:()=>oct,Cylinder:()=>Jse,Degrees:()=>Xut,DoubleClickObjectTool:()=>rse,DoubleScreen:()=>ect,DynamicEyeOffset:()=>oPi,EarthCtrl:()=>e0t,Edit:()=>vle,EditTool:()=>use,ElevationTool:()=>tct,Ellipse:()=>$se,Ellipsoid:()=>jse,Environment:()=>pse,EventHandler:()=>SN,Explosion:()=>bse,FeatureLayer:()=>ule,Fire:()=>Ise,Fireworks:()=>Sse,FisheyeVideoProjection:()=>xse,Fog:()=>cse,Hawkeye:()=>fle,HorizontalDistanceTool:()=>Zae,HoverObjectTool:()=>ise,ImageryLayer:()=>rle,Label:()=>Nse,LineOfSightTool:()=>i0t,Measure:()=>ase,MeasureAreaTool:()=>kH,MeasureHeightTool:()=>qae,MeasureLineLengthTool:()=>jae,MeasurePathLengthTool:()=>DW,MeasureSlopeTool:()=>Xae,MeasureSurfaceAreaTool:()=>$ae,MilitaryPlotting:()=>nue,Model:()=>Lse,ModelClipping:()=>Dle,ModelEdit:()=>RH,ModelLayer:()=>sle,NightMode:()=>gse,Node:()=>UO,ObjectFactory:()=>D2,PerspectiveVideoProjection:()=>yse,PickObjectTool:()=>ese,PickPositionTool:()=>tse,Point:()=>Vse,Polygon:()=>Gse,Polyline:()=>Ose,PolylineVolume:()=>tle,Profile:()=>Ble,RClickObjectTool:()=>nse,RadarScan:()=>Tse,Rain:()=>Ase,Rectangle:()=>Xse,RestrictHeight:()=>Sle,SampleRenderedDataFlags:()=>nPi,Scene:()=>xle,SceneManager:()=>t0t,SelectSet:()=>Cse,Skyline:()=>ble,Smoke:()=>Bse,Snow:()=>hse,SpatialObject:()=>Qc,SpatialTransform:()=>Vae,SpotLight:()=>ple,Submergence:()=>_le,TerrainExcavation:()=>Rle,TerrainLayer:()=>ole,TerrainModifier:()=>Tle,Tool:()=>ja,ToolManager:()=>Jae,VERSIONINFO:()=>I5e,VideoProjection:()=>r0t,ViewShed:()=>Ele,Volumetric:()=>Ile,WFSTool:()=>jut,Waters:()=>dle,WorkChart:()=>Ale,ZBiasGeometryInstanceAttribute:()=>rPi,czmlPathAnimation:()=>ETe,loadArrayBuffer:()=>hPi,loadBlob:()=>APi,loadImage:()=>dPi,loadJson:()=>cPi,loadLayui:()=>ITe,loadText:()=>uPi,sampleRenderedData:()=>aPi,sampleRenderedMesh:()=>sPi,sampleRenderedTerrain:()=>lPi,viewerNavigationCubeMixin:()=>s0t});module.exports=$_t(Hki);var x5e="WebSDK v3.2.4-13",v5e="Cesium v1.99",E5e="2024.2.1",eBt="SmartEarth",tBt={VERSION:x5e,CesiumVERSION:v5e,CompileTime:E5e},iBt=typeof window<"u"?window:typeof self<"u"?self:{};iBt.logSmartEarth=()=>{let o=`
%c${eBt}
%c
\u7248 \u672C \u53F7\uFF1A${x5e}    ${v5e}
\u7F16\u8BD1\u65F6\u95F4\uFF1A${E5e}
    `;setTimeout(console.log.bind(console,o,"color:#018aff;font-size:30px;font-wight:bold;font-family:\u5FAE\u8F6F\u96C5\u9ED1","color:#018aff;font-size:13px;font-family:\u5FAE\u8F6F\u96C5\u9ED1"),0)};var I5e=tBt;var z2e={};sde(z2e,{AlphaMode:()=>b8,AlphaPipelineStage:()=>E1e,Animation:()=>Ibe,AnimationViewModel:()=>_be,Appearance:()=>Sd,ApproximateTerrainHeights:()=>eh,ArcGISTiledElevationTerrainProvider:()=>Bat,ArcGisMapServerImageryProvider:()=>qb,ArcType:()=>Pa,ArticulationStageType:()=>b_,AssociativeArray:()=>Vo,AttributeCompression:()=>Mu,AttributeType:()=>Is,AutoExposure:()=>$Qe,AutomaticUniforms:()=>BG,Axis:()=>vp,AxisAlignedBoundingBox:()=>xY,B3dmLoader:()=>TBe,B3dmParser:()=>SBe,Base64Encoder:()=>Nee,BaseLayerPicker:()=>wbe,BaseLayerPickerViewModel:()=>Bbe,BatchTable:()=>hre,BatchTableHierarchy:()=>Qne,BatchTexture:()=>Q1,BatchTexturePipelineStage:()=>I1e,Billboard:()=>Zh,BillboardCollection:()=>iI,BillboardGraphics:()=>eP,BillboardVisualizer:()=>c_e,BingMapsApi:()=>wat,BingMapsGeocoderService:()=>Qat,BingMapsImageryProvider:()=>Tbe,BingMapsStyle:()=>Dbe,BlendEquation:()=>sx,BlendFunction:()=>LA,BlendOption:()=>tf,BlendTexture:()=>X8,BlendingState:()=>Bu,BoundingRectangle:()=>Kr,BoundingSphere:()=>wi,BoundingSphereState:()=>ro,BoxEmitter:()=>hst,BoxGeometry:()=>LM,BoxGeometryUpdater:()=>A_e,BoxGraphics:()=>gre,BoxOutlineGeometry:()=>r2,BrdfLutGenerator:()=>lQe,Buffer:()=>vo,BufferLoader:()=>ZY,BufferUsage:()=>ln,CPUStylingPipelineStage:()=>b1e,CallbackProperty:()=>Bn,Camera:()=>Ml,CameraEventAggregator:()=>cSe,CameraEventType:()=>Bc,CameraFlightPath:()=>UIe,Cartesian2:()=>It,Cartesian3:()=>ee,Cartesian4:()=>ai,Cartographic:()=>Kt,CartographicGeocoderService:()=>kSe,CatmullRomSpline:()=>Sat,Cesium3DContentGroup:()=>kne,Cesium3DTile:()=>Ov,Cesium3DTileBatchTable:()=>pJ,Cesium3DTileColorBlendMode:()=>bD,Cesium3DTileContent:()=>dst,Cesium3DTileContentFactory:()=>Vne,Cesium3DTileContentState:()=>NA,Cesium3DTileContentType:()=>Bv,Cesium3DTileFeature:()=>Ts,Cesium3DTileFeatureTable:()=>P6,Cesium3DTileOptimizationHint:()=>XL,Cesium3DTileOptimizations:()=>ibe,Cesium3DTilePass:()=>Ep,Cesium3DTilePassState:()=>wP,Cesium3DTilePointFeature:()=>Rk,Cesium3DTileRefine:()=>Ay,Cesium3DTileStyle:()=>mY,Cesium3DTileStyleEngine:()=>obe,Cesium3DTilesInspector:()=>N2e,Cesium3DTilesInspectorViewModel:()=>F2e,Cesium3DTileset:()=>Fx,Cesium3DTilesetCache:()=>rbe,Cesium3DTilesetGraphics:()=>xre,Cesium3DTilesetHeatmap:()=>nbe,Cesium3DTilesetMetadata:()=>tbe,Cesium3DTilesetMostDetailedTraversal:()=>zne,Cesium3DTilesetStatistics:()=>Wk,Cesium3DTilesetTraversal:()=>dN,Cesium3DTilesetVisualizer:()=>lbe,CesiumInspector:()=>O2e,CesiumInspectorViewModel:()=>k2e,CesiumNavigation:()=>m2e,CesiumRenderPass:()=>o2e,CesiumTerrainProvider:()=>RJ,CesiumWidget:()=>jJ,Check:()=>of,CheckerboardMaterialProperty:()=>lie,CircleEmitter:()=>VDe,CircleGeometry:()=>Dat,CircleOutlineGeometry:()=>Tat,CircleWaveMaterialProperty:()=>Z8,ClassificationModelDrawCommand:()=>qBe,ClassificationPipelineStage:()=>_1e,ClassificationPrimitive:()=>s6,ClassificationType:()=>Gu,ClearCommand:()=>eA,ClippingPlane:()=>kM,ClippingPlaneCollection:()=>rB,Clock:()=>z5,ClockRange:()=>aC,ClockStep:()=>jh,ClockViewModel:()=>LSe,CloudCollection:()=>xst,CloudType:()=>xie,CollectionSource:()=>hJe,Color:()=>At,ColorBlendMode:()=>HD,ColorGeometryInstanceAttribute:()=>Yo,ColorMaterialProperty:()=>Fa,Command:()=>Iat,ComponentDatatype:()=>ei,Composite3DTileContent:()=>Bwe,CompositeEntityCollection:()=>Xot,CompositeMaterialProperty:()=>cie,CompositePositionProperty:()=>U_,CompositeProperty:()=>P1,CompressedTextureBuffer:()=>oY,ComputeCommand:()=>B5,ComputeEngine:()=>$be,ConditionsExpression:()=>bEe,ConeEmitter:()=>mH,ConicArcSensor:()=>Mie,ConicArcSensorCollection:()=>wlt,ConicArcSensorGeometry:()=>Rie,ConicArcSensorGraphics:()=>Tie,ConicArcSensorOutlineGeometry:()=>Lie,ConstantPositionProperty:()=>_D,ConstantProperty:()=>bc,ConstantSpline:()=>NBe,ConstructionWorker:()=>fJe,ContentMetadata:()=>Ywe,ContentState:()=>yD,Context:()=>aQe,ContextLimits:()=>yo,CoplanarPolygonGeometry:()=>b_e,CoplanarPolygonGeometryLibrary:()=>UG,CoplanarPolygonOutlineGeometry:()=>tM,CornerType:()=>ZA,CorridorGeometry:()=>GY,CorridorGeometryLibrary:()=>Gc,CorridorGeometryUpdater:()=>f_e,CorridorGraphics:()=>pre,CorridorOutlineGeometry:()=>d_e,Credit:()=>tl,CreditDisplay:()=>uQe,CubeMap:()=>lQ,CubeMapFace:()=>DL,CubicRealPolynomial:()=>yY,CullFace:()=>CA,CullingVolume:()=>AC,CumulusCloud:()=>TQ,CustomDataSource:()=>Ire,CustomHeightmapTerrainProvider:()=>Mat,CustomMercatorProjection:()=>t6,CustomShader:()=>ZM,CustomShaderManagerEx:()=>sre,CustomShaderMode:()=>gY,CustomShaderPipelineStage:()=>R1e,CustomShaderTranslucencyMode:()=>BF,CustomTilingScheme:()=>jJe,CylinderGeometry:()=>g_e,CylinderGeometryLibrary:()=>ine,CylinderGeometryUpdater:()=>m_e,CylinderGraphics:()=>mre,CylinderOutlineGeometry:()=>p_e,CzmlDataSource:()=>iW,DDSTexture:()=>C2e,DataSource:()=>cy,DataSourceClock:()=>A5,DataSourceCollection:()=>l_e,DataSourceDisplay:()=>_J,DebugAppearance:()=>Bst,DebugCameraPrimitive:()=>_g,DebugInspector:()=>xSe,DebugModelMatrixPrimitive:()=>JDe,DefaultProxy:()=>ZIe,DepthFunction:()=>nI,DepthPlane:()=>hQe,DequantizationPipelineStage:()=>L1e,DerivedCommand:()=>fx,DeveloperError:()=>Ui,DeviceOrientationCameraController:()=>dQe,DirectionalLight:()=>mae,DiscardEmptyTileImagePolicy:()=>soe,DiscardMissingTileImagePolicy:()=>Qbe,DistanceDisplayCondition:()=>$o,DistanceDisplayConditionGeometryInstanceAttribute:()=>vA,DistanceLegendViewModel:()=>l2e,DoubleEndedPriorityQueue:()=>Lat,DoublyLinkedList:()=>qne,DracoLoader:()=>$Y,DrawCommand:()=>On,DynamicGeometryBatch:()=>rne,DynamicGeometryUpdater:()=>EA,ECharts:()=>XJe,EarthOrientationParameters:()=>Dye,EarthOrientationParametersSample:()=>sY,EasingFunction:()=>Ix,EllipseGeometry:()=>W1,EllipseGeometryLibrary:()=>iB,EllipseGeometryUpdater:()=>C_e,EllipseGraphics:()=>Cre,EllipseOutlineGeometry:()=>UD,Ellipsoid:()=>Di,EllipsoidGeodesic:()=>l0,EllipsoidGeometry:()=>gC,EllipsoidGeometryUpdater:()=>E_e,EllipsoidGraphics:()=>u6,EllipsoidOutlineGeometry:()=>J1,EllipsoidPrimitive:()=>Zbe,EllipsoidRhumbLine:()=>k1,EllipsoidSurfaceAppearance:()=>MY,EllipsoidTangentPlane:()=>eQ,EllipsoidTerrainProvider:()=>IP,EllipsoidalOccluder:()=>L5,Empty3DTileContent:()=>LK,EncodedCartesian3:()=>Pu,Entity:()=>UA,EntityCluster:()=>eN,EntityCollection:()=>iw,EntityView:()=>$ne,Event:()=>br,EventHelper:()=>Mx,ExpandBySmartEarth:()=>UE,ExpandByTerra:()=>ZJe,Expression:()=>wF,ExpressionNodeType:()=>jn,ExternalParameter:()=>px,ExtrapolationType:()=>mD,FeatureDataProvider:()=>Nre,FeatureDetection:()=>Mo,FeatureIdPipelineStage:()=>dJ,FeatureJsonData:()=>m6,FisheyeProjectionMap:()=>NY,FisheyeProjectionMapShader:()=>C7,FlattenVS:()=>i1e,FlowEcharts:()=>dae,Fog:()=>fQe,ForEach:()=>Vr,FrameRateMonitor:()=>WDe,FrameState:()=>gQe,Framebuffer:()=>Bp,FramebufferManager:()=>qh,FrustumCommands:()=>xQe,FrustumGeometry:()=>C6,FrustumOutlineGeometry:()=>FY,Fullscreen:()=>yp,FullscreenButton:()=>NSe,FullscreenButtonViewModel:()=>FSe,GWBaiduImageryProvider:()=>Kre,GeoJsonDataSource:()=>mK,GeoJsonLoader:()=>RBe,GeocodeType:()=>XJ,Geocoder:()=>VSe,GeocoderService:()=>Nat,GeocoderViewModel:()=>HSe,GeographicProjection:()=>Dg,GeographicTilingScheme:()=>af,Geometry:()=>Zo,Geometry3DTileContent:()=>wwe,GeometryAttribute:()=>Yr,GeometryAttributes:()=>yc,GeometryFactory:()=>Oat,GeometryInstance:()=>co,GeometryInstanceAttribute:()=>k_,GeometryOffsetAttribute:()=>Cl,GeometryPipeline:()=>rc,GeometryPipelineStage:()=>k1e,GeometryType:()=>GL,GeometryUpdater:()=>nh,GeometryVisualizer:()=>V_e,GetFeatureInfoFormat:()=>T7,GifImageProperty:()=>hXe,Globe:()=>voe,GlobeDepth:()=>vQe,GlobeSurfaceShaderSet:()=>Hbe,GlobeSurfaceTile:()=>zM,GlobeSurfaceTileProvider:()=>Kbe,GlobeTranslucency:()=>LJ,GlobeTranslucencyFramebuffer:()=>EQe,GlobeTranslucencyState:()=>mQe,GltfBufferViewLoader:()=>hne,GltfDracoLoader:()=>dne,GltfImageLoader:()=>gne,GltfIndexBufferLoader:()=>pne,GltfJsonLoader:()=>yne,GltfLoader:()=>aJ,GltfLoaderUtil:()=>OM,GltfStructuralMetadataLoader:()=>xBe,GltfTextureLoader:()=>xne,GltfVertexBufferLoader:()=>vne,GoogleEarthEnterpriseImageryProvider:()=>wst,GoogleEarthEnterpriseMapsProvider:()=>Pbe,GoogleEarthEnterpriseMetadata:()=>vN,GoogleEarthEnterpriseTerrainData:()=>yie,GoogleEarthEnterpriseTerrainProvider:()=>Kat,GoogleEarthEnterpriseTileInformation:()=>NDe,GpxDataSource:()=>BDe,Graticules:()=>fXe,GraticulesImageryProvider:()=>m5,GregorianDate:()=>$8,GridImageryProvider:()=>bst,GridMaterialProperty:()=>Aie,GroundGeometryUpdater:()=>Xl,GroundPolylineGeometry:()=>ure,GroundPolylinePrimitive:()=>a6,GroundPrimitive:()=>nN,GroupMetadata:()=>kte,GwBufferAnalysis:()=>Yre,HeadingPitchRange:()=>Ex,HeadingPitchRoll:()=>dC,Heap:()=>YCe,HeightReference:()=>xn,HeightmapEncoding:()=>HF,HeightmapTerrainData:()=>wQ,HeightmapTessellator:()=>noe,HermitePolynomialApproximation:()=>ADe,HermiteSpline:()=>DK,HilbertOrder:()=>Pte,HomeButton:()=>KSe,HomeButtonViewModel:()=>zSe,HorizontalOrigin:()=>tA,HugeAdapter:()=>O6,I3SDataProvider:()=>Qst,I3SFeature:()=>XDe,I3SField:()=>ZDe,I3SGeometry:()=>vie,I3SLayer:()=>Iie,I3SNode:()=>Eie,I3dmLoader:()=>FBe,I3dmParser:()=>LBe,Iau2000Orientation:()=>jbe,Iau2006XysData:()=>Mye,Iau2006XysSample:()=>qie,IauOrientationAxes:()=>qbe,IauOrientationParameters:()=>Wbe,ImageBasedLighting:()=>bne,ImageBasedLightingPipelineStage:()=>a1e,ImageCombine:()=>nre,ImageMaterialProperty:()=>z0,Imagery:()=>eoe,ImageryLayer:()=>dD,ImageryLayerCollection:()=>Ybe,ImageryLayerFeatureInfo:()=>gN,ImageryProvider:()=>a2,ImageryState:()=>sc,Implicit3DTileContent:()=>Nte,ImplicitAvailabilityBitstream:()=>Lte,ImplicitMetadataView:()=>Une,ImplicitSubdivisionScheme:()=>uC,ImplicitSubtree:()=>Twe,ImplicitSubtreeMetadata:()=>Dwe,ImplicitTileCoordinates:()=>sbe,ImplicitTileset:()=>abe,IndexDatatype:()=>Nn,InfoBox:()=>WSe,InfoBoxViewModel:()=>JSe,InspectorShared:()=>K8,InstanceAttributeSemantic:()=>nC,InstancingPipelineStage:()=>m1e,InterpolationAlgorithm:()=>Yat,InterpolationType:()=>nF,Intersect:()=>La,IntersectionTests:()=>kA,Intersections2D:()=>$6,Interval:()=>fD,InvertClassification:()=>boe,Ion:()=>yF,IonGeocoderService:()=>GSe,IonImageryProvider:()=>WG,IonResource:()=>jk,IonWorldImageryStyle:()=>jG,Iso8601:()=>Cn,JobScheduler:()=>CQe,JobType:()=>KE,JsonMetadataTable:()=>JY,JulianDate:()=>fi,KTX2Transcoder:()=>jCe,KeyboardEventModifier:()=>eI,KmlCamera:()=>sIe,KmlDataSource:()=>Fre,KmlLookAt:()=>lIe,KmlTour:()=>uIe,KmlTourFlyTo:()=>cIe,KmlTourWait:()=>hIe,Label:()=>K7,LabelCollection:()=>qM,LabelGraphics:()=>c6,LabelStyle:()=>mA,LabelVisualizer:()=>z_e,LagrangePolynomialApproximation:()=>dDe,LeapSecond:()=>$c,Light:()=>Dst,LightingModel:()=>rI,LightingPipelineStage:()=>U1e,LinearApproximation:()=>Tre,LinearSampler:()=>s2,LinearSpline:()=>hJ,MVTImageryProvider:()=>EXe,ManagedArray:()=>GM,MapMode2D:()=>rQ,MapProjection:()=>qat,MapWidget:()=>Clt,MapboxApi:()=>jat,MapboxImageryProvider:()=>SJ,MapboxStyleImageryProvider:()=>Mst,Material:()=>ss,MaterialAppearance:()=>Ig,MaterialPass:()=>x2e,MaterialPipelineStage:()=>H1e,MaterialProperty:()=>sC,Math:()=>je,Matrix2:()=>n0,Matrix3:()=>ci,Matrix4:()=>Xe,MetadataClass:()=>S6,MetadataClassProperty:()=>qY,MetadataComponentType:()=>$s,MetadataEntity:()=>su,MetadataEnum:()=>mBe,MetadataEnumValue:()=>pBe,MetadataPipelineStage:()=>IM,MetadataSchema:()=>rO,MetadataSchemaLoader:()=>Ene,MetadataSemantic:()=>Mwe,MetadataTable:()=>tO,MetadataTableProperty:()=>X_e,MetadataType:()=>Zs,MipmapHint:()=>q8,Model:()=>cI,Model3DTileContent:()=>FL,ModelAlphaOptions:()=>awe,ModelAnimation:()=>VBe,ModelAnimationChannel:()=>GBe,ModelAnimationCollection:()=>zBe,ModelAnimationLoop:()=>Ub,ModelAnimationState:()=>OL,ModelArticulation:()=>u1e,ModelArticulationStage:()=>l1e,ModelClippingPlanesPipelineStage:()=>h1e,ModelColorPipelineStage:()=>TK,ModelComponents:()=>ta,ModelDrawCommand:()=>XBe,ModelFeature:()=>KBe,ModelFeatureTable:()=>YBe,ModelGraphics:()=>EY,ModelLightingOptions:()=>ywe,ModelMatrixUpdateStage:()=>y1e,ModelNode:()=>d1e,ModelRenderResources:()=>hwe,ModelRuntimeNode:()=>v1e,ModelRuntimePrimitive:()=>rwe,ModelSceneGraph:()=>vwe,ModelSilhouettePipelineStage:()=>gwe,ModelSkin:()=>owe,ModelSplitterPipelineStage:()=>mwe,ModelStatistics:()=>Ewe,ModelType:()=>K0,ModelUtility:()=>au,ModelVisualizer:()=>_we,Moon:()=>Ioe,MorphTargetsPipelineStage:()=>z1e,MorphWeightSpline:()=>Xat,MortonOrder:()=>D8,MultiResourceImageryProvider:()=>Jre,MultiResourceTerrainProvider:()=>Wre,Multiple3DTileContent:()=>Xwe,MultisampleFramebuffer:()=>bBe,NavigationControl:()=>_H,NavigationHelpButton:()=>qSe,NavigationHelpButtonViewModel:()=>jSe,NavigationUtils:()=>BH,NavigationViewModel:()=>N7,NearFarScalar:()=>To,NeverTileDiscardPolicy:()=>Pst,NodeRenderResources:()=>Cwe,NodeStatisticsPipelineStage:()=>x1e,NodeTransformationProperty:()=>yre,OIT:()=>wQe,Occluder:()=>zre,OctahedralProjectedCubeMap:()=>b5,OffsetGeometryInstanceAttribute:()=>a0,OlMVTImageryProvider:()=>qre,OpenCageGeocoderService:()=>Zat,OpenStreetMapImageryProvider:()=>M7,OrderedGroundPrimitiveCollection:()=>u_e,OrientedBoundingBox:()=>Hf,OrthographicFrustum:()=>Ds,OrthographicOffCenterFrustum:()=>Y0,Packable:()=>$at,PackableForInterpolation:()=>est,Particle:()=>Cae,ParticleBurst:()=>xH,ParticleEmitter:()=>Fst,ParticleSystem:()=>_2,Pass:()=>hr,PassState:()=>cm,PathGraphics:()=>IY,PathVisualizer:()=>ube,PeliasGeocoderService:()=>USe,PerInstanceColorAppearance:()=>za,PerformanceDisplay:()=>GJ,PerformanceWatchdog:()=>V2e,PerformanceWatchdogViewModel:()=>H2e,PerspectiveFrustum:()=>Yu,PerspectiveOffCenterFrustum:()=>n2,PerspectiveProjectionMap:()=>kY,PerspectiveProjectionMapShader:()=>y7,PerspectiveProjectionMapWithDepth:()=>OY,PerspectiveProjectionMapWithDepthShader:()=>rF,PickDepth:()=>yQe,PickDepthFramebuffer:()=>bQe,PickFramebuffer:()=>QQe,PickGlobeSlope:()=>Pot,Picking:()=>RQe,PickingPipelineStage:()=>K1e,PinBuilder:()=>bY,PixelDatatype:()=>wn,PixelFormat:()=>Gn,Plane:()=>Wa,PlaneGeometry:()=>I_e,PlaneGeometryUpdater:()=>w_e,PlaneGraphics:()=>jEe,PlaneOutlineGeometry:()=>__e,PntsLoader:()=>Iwe,PntsParser:()=>Nne,PointCloud:()=>ybe,PointCloudEyeDomeLighting:()=>lJ,PointCloudShading:()=>M6,PointCloudStylingPipelineStage:()=>J1e,PointGraphics:()=>vre,PointPrimitive:()=>Tx,PointPrimitiveCollection:()=>uY,PointVisualizer:()=>cbe,PolygonDepth:()=>Q8,PolygonDepthFS:()=>Mne,PolygonDepthVS:()=>Pne,PolygonGeometry:()=>rh,PolygonGeometryLibrary:()=>ql,PolygonGeometryUpdater:()=>S_e,PolygonGraphics:()=>yl,PolygonHierarchy:()=>Un,PolygonOutlineGeometry:()=>Q_e,PolygonPipeline:()=>xA,Polyline:()=>t2,PolylineArrowMaterialProperty:()=>IK,PolylineCollection:()=>Y5,PolylineColorAppearance:()=>ly,PolylineDashMaterialProperty:()=>Vl,PolylineGeometry:()=>Vk,PolylineGeometryUpdater:()=>Abe,PolylineGlowMaterialProperty:()=>hie,PolylineGraphics:()=>FD,PolylineMaterialAppearance:()=>L_,PolylineOutlineMaterialProperty:()=>JM,PolylinePipeline:()=>XA,PolylineTrailLinkMaterialProperty:()=>Rot,PolylineVisualizer:()=>dbe,PolylineVolumeGeometry:()=>D_e,PolylineVolumeGeometryLibrary:()=>C5,PolylineVolumeGeometryUpdater:()=>M_e,PolylineVolumeGraphics:()=>Ere,PolylineVolumeOutlineGeometry:()=>T_e,PositionProperty:()=>vY,PositionPropertyArray:()=>f8,PostProcessStage:()=>va,PostProcessStageCollection:()=>aSe,PostProcessStageComposite:()=>CC,PostProcessStageLibrary:()=>bv,PostProcessStageSampleMode:()=>Dv,PostProcessStageTextureCache:()=>Roe,Primitive:()=>$a,PrimitiveCollection:()=>MD,PrimitiveLoadPlan:()=>oJ,PrimitiveOutlineGenerator:()=>Bne,PrimitiveOutlinePipelineStage:()=>q1e,PrimitivePipeline:()=>s5,PrimitiveRenderResources:()=>xwe,PrimitiveState:()=>i0,PrimitiveStatisticsPipelineStage:()=>X1e,PrimitiveType:()=>yn,ProjectionPicker:()=>ZSe,ProjectionPickerViewModel:()=>XSe,Property:()=>Nt,PropertyArray:()=>lae,PropertyAttribute:()=>Ane,PropertyAttributeProperty:()=>W_e,PropertyBag:()=>LD,PropertyTable:()=>cN,PropertyTexture:()=>cne,PropertyTextureProperty:()=>Y_e,ProviderViewModel:()=>fp,Proxy:()=>rst,QuadraticRealPolynomial:()=>Vb,QuadtreeOccluders:()=>moe,QuadtreePrimitive:()=>BP,QuadtreePrimitivezh:()=>Not,QuadtreeTile:()=>Coe,QuadtreeTileLoadState:()=>mC,QuadtreeTileProvider:()=>Nst,QuantizedMeshTerrainData:()=>doe,QuarticRealPolynomial:()=>MEe,Quaternion:()=>jr,QuaternionSpline:()=>OBe,Queue:()=>d5,RasterizeHtml:()=>lH,Ray:()=>ls,Rectangle:()=>Si,RectangleCollisionChecker:()=>sne,RectangleGeometry:()=>VY,RectangleGeometryLibrary:()=>uy,RectangleGeometryUpdater:()=>k_e,RectangleGraphics:()=>A6,RectangleOutlineGeometry:()=>one,RectangularSensor:()=>XK,RectangularSensorFS:()=>Qie,RectangularSensorGraphics:()=>blt,RectangularSensorPrimitive:()=>R2e,RectangularSensorScanPlaneFS:()=>P2e,RectangularSensorVS:()=>Iae,RectangularSensorVisualizer:()=>L2e,ReferenceFrame:()=>s0,ReferenceProperty:()=>DY,RenderEntity:()=>fW,RenderObjectFactory:()=>zc,RenderState:()=>fn,Renderbuffer:()=>G_,RenderbufferFormat:()=>qE,Request:()=>cC,RequestErrorEvent:()=>r5,RequestScheduler:()=>V1,RequestState:()=>yA,RequestType:()=>oB,ResetViewNavigationControl:()=>A2e,Resource:()=>An,ResourceCache:()=>sf,ResourceCacheKey:()=>nw,ResourceCacheStatistics:()=>yBe,ResourceLoader:()=>fy,ResourceLoaderState:()=>ha,Rotation:()=>YD,RuntimeError:()=>nr,S2Cell:()=>KG,S3MCacheFileRenderEntity:()=>bie,S3MCompressType:()=>Ilt,S3MContentFactory:()=>b2e,S3MContentParser:()=>Q2e,S3MCreateIndexJob:()=>w2e,S3MCreateVertexJob:()=>_2e,S3MDataSource:()=>Got,S3MLayerCache:()=>S2e,S3MLayerScheduler:()=>D2e,S3MPixelFormat:()=>_lt,S3MTile:()=>M2e,S3MTilesFS:()=>E2e,S3MTilesLayer:()=>Eae,S3MTilesVS:()=>v2e,S3ModelParser:()=>T2e,SDFSettings:()=>Qv,SampledPositionProperty:()=>R1,SampledProperty:()=>uM,Sampler:()=>Qs,ScaledPositionProperty:()=>g6,Scene:()=>koe,SceneFramebuffer:()=>Soe,SceneMode:()=>xi,SceneMode2DPipelineStage:()=>Z1e,SceneModePicker:()=>eDe,SceneModePickerViewModel:()=>$Se,SceneTransforms:()=>Ss,SceneTransitioner:()=>uSe,ScreenSpaceCameraController:()=>pSe,ScreenSpaceEventHandler:()=>Ur,ScreenSpaceEventType:()=>Ki,SelectedFeatureIdPipelineStage:()=>MK,SelectionIndicator:()=>iDe,SelectionIndicatorViewModel:()=>tDe,Sensor:()=>llt,ShaderBuilder:()=>Awe,ShaderCache:()=>tQe,ShaderDestination:()=>Sr,ShaderFunction:()=>cwe,ShaderProgram:()=>_s,ShaderSource:()=>Fr,ShaderStruct:()=>lwe,ShadowMap:()=>xQ,ShadowMapShader:()=>gF,ShadowMode:()=>Al,ShadowVolumeAppearance:()=>gM,ShowGeometryInstanceAttribute:()=>wu,Simon1994PlanetaryPositions:()=>UK,SimplePolylineGeometry:()=>nst,SingleTileImageryProvider:()=>bQ,SkinningPipelineStage:()=>ewe,SkyAtmosphere:()=>sH,SkyBox:()=>mN,SphereEmitter:()=>vH,SphereGeometry:()=>ost,SphereOutlineGeometry:()=>tP,Spherical:()=>fDe,Spline:()=>uf,SplitDirection:()=>uI,Splitter:()=>roe,SpotLight:()=>Vot,StaticGeometryColorBatch:()=>AM,StaticGeometryPerMaterialBatch:()=>hM,StaticGroundGeometryColorBatch:()=>_te,StaticGroundGeometryPerMaterialBatch:()=>O_e,StaticGroundPolylinePerMaterialBatch:()=>hbe,StaticOutlineGeometryBatch:()=>Bte,StencilConstants:()=>ca,StencilFunction:()=>Ku,StencilOperation:()=>lo,SteppedSpline:()=>kBe,StripeMaterialProperty:()=>die,StripeOrientation:()=>jF,StructuralMetadata:()=>nP,StyleCommandsNeeded:()=>Q5,StyleExpression:()=>kst,Sun:()=>Uoe,SunLight:()=>iH,SunPostProcess:()=>ySe,SupportedImageFormats:()=>vBe,SvgPathBindingHandler:()=>Ebe,TaskProcessor:()=>Vf,TerrainData:()=>AO,TerrainEncoding:()=>HM,TerrainExaggeration:()=>ID,TerrainFillMesh:()=>goe,TerrainFlatten:()=>IN,TerrainFlattenPolygonTexture:()=>UDe,TerrainMesh:()=>hO,TerrainOffsetProperty:()=>tne,TerrainProvider:()=>Cx,TerrainQuantization:()=>Pv,TerrainState:()=>xh,Texture:()=>mo,TextureAtlas:()=>z7,TextureCache:()=>iQe,TextureMagnificationFilter:()=>th,TextureManager:()=>BEe,TextureMinificationFilter:()=>as,TextureUniform:()=>IEe,TextureWrap:()=>Va,TileAvailability:()=>ZL,TileBoundingRegion:()=>S5,TileBoundingS2Cell:()=>Zwe,TileBoundingSphere:()=>yP,TileBoundingVolume:()=>Ost,TileCoordinatesImageryProvider:()=>i2e,TileDiscardPolicy:()=>Ust,TileEdge:()=>Ga,TileImagery:()=>toe,TileMapServiceImageryProvider:()=>_P,TileMetadata:()=>Wwe,TileOrientedBoundingBox:()=>NF,TileProviderError:()=>wc,TileReplacementQueue:()=>xoe,TileSelectionResult:()=>sa,TileState:()=>Gst,Tileset3DTileContent:()=>Rwe,TilesetMetadata:()=>ebe,TilesetPipelineStage:()=>n1e,TilingScheme:()=>ast,TimeConstants:()=>Uu,TimeDynamicImagery:()=>Aoe,TimeDynamicPointCloud:()=>Y6,TimeInterval:()=>el,TimeIntervalCollection:()=>mx,TimeIntervalCollectionPositionProperty:()=>T8,TimeIntervalCollectionProperty:()=>g8,TimeStandard:()=>nu,Timeline:()=>oDe,TimelineHighlightRange:()=>rDe,TimelineTrack:()=>nDe,Tipsify:()=>HEe,ToggleButtonViewModel:()=>vG,Tonemapper:()=>ZG,Transforms:()=>Vn,TranslationRotationScale:()=>aB,TranslucentTileClassification:()=>DQe,TridiagonalSystemSolver:()=>Sne,TrustedServers:()=>Vie,TweenCollection:()=>Foe,UniformState:()=>rQe,UniformType:()=>pa,UrlTemplateGeojsonProvider:()=>Yot,UrlTemplateImageryProvider:()=>sw,UserInterfaceControl:()=>vae,Utils:()=>dQ,VERSION:()=>Slt,VRButton:()=>sDe,VRButtonViewModel:()=>aDe,VRTheWorldTerrainProvider:()=>ust,VaryingType:()=>xx,Vector3DTileBatch:()=>S8,Vector3DTileClampedPolylines:()=>Uwe,Vector3DTileContent:()=>Vwe,Vector3DTileGeometry:()=>Bk,Vector3DTilePoints:()=>Lwe,Vector3DTilePolygons:()=>Fwe,Vector3DTilePolylines:()=>Hne,Vector3DTilePrimitive:()=>One,VelocityOrientationProperty:()=>gDe,VelocityVectorProperty:()=>uae,VertexArray:()=>Vc,VertexArrayFacade:()=>lY,VertexAttributeSemantic:()=>Fo,VertexCompressOption:()=>_1,VertexFormat:()=>Wr,VerticalOrigin:()=>bn,VideoSynchronizer:()=>sst,View:()=>Toe,ViewShed:()=>Xet,ViewShedMap:()=>oH,ViewShedMapShader:()=>vF,Viewer:()=>$J,ViewportQuad:()=>Hst,Visibility:()=>vg,Visualizer:()=>pat,VulkanConstants:()=>cst,WallGeometry:()=>U_e,WallGeometryLibrary:()=>lne,WallGeometryUpdater:()=>H_e,WallGraphics:()=>_Y,WallOutlineGeometry:()=>G_e,WaterFS:()=>PY,WaterMaterialProperty:()=>Jot,WebGLConstants:()=>Ii,WebMapServiceImageryProvider:()=>MJ,WebMapTileServiceImageryProvider:()=>Z6,WebMercatorProjection:()=>OA,WebMercatorTilingScheme:()=>Am,WindingOrder:()=>Z_,WireframeIndexGenerator:()=>Lne,WireframePipelineStage:()=>iwe,ZoomNavigationControl:()=>Bie,_shadersAcesTonemappingStage:()=>LQe,_shadersAdditiveBlend:()=>mSe,_shadersAdjustTranslucentFS:()=>Xte,_shadersAllMaterialAppearanceFS:()=>bIe,_shadersAllMaterialAppearanceVS:()=>QIe,_shadersAmbientOcclusionGenerate:()=>FQe,_shadersAmbientOcclusionModulate:()=>NQe,_shadersAspectRampMaterial:()=>XCe,_shadersAtmosphereCommon:()=>L8,_shadersBasicMaterialAppearanceFS:()=>SIe,_shadersBasicMaterialAppearanceVS:()=>DIe,_shadersBillboardCollectionFS:()=>sEe,_shadersBillboardCollectionVS:()=>lEe,_shadersBlackAndWhite:()=>kQe,_shadersBloomComposite:()=>OQe,_shadersBrdfLutGeneratorFS:()=>sQe,_shadersBrightPass:()=>CSe,_shadersBrightness:()=>UQe,_shadersBumpMapMaterial:()=>ZCe,_shadersCPUStylingStageFS:()=>w1e,_shadersCPUStylingStageVS:()=>B1e,_shadersCheckFloatTexturePrecisionFS:()=>vat,_shadersCheckerboardMaterial:()=>$Ce,_shadersCloudCollectionFS:()=>wDe,_shadersCloudCollectionVS:()=>bDe,_shadersCloudNoiseFS:()=>QDe,_shadersCloudNoiseVS:()=>SDe,_shadersCompareAndPackTranslucentDepth:()=>SQe,_shadersCompositeOITFS:()=>IQe,_shadersCompositeTranslucentClassification:()=>P7,_shadersContrastBias:()=>GQe,_shadersCustomShaderStageFS:()=>S1e,_shadersCustomShaderStageVS:()=>Q1e,_shadersCzmBuiltins:()=>l7,_shadersDepthOfField:()=>HQe,_shadersDepthPlaneFS:()=>cQe,_shadersDepthPlaneVS:()=>AQe,_shadersDepthView:()=>VQe,_shadersDepthViewPacked:()=>ult,_shadersDotMaterial:()=>eye,_shadersEdgeDetection:()=>zQe,_shadersElevationBandMaterial:()=>tye,_shadersElevationContourMaterial:()=>iye,_shadersElevationRampMaterial:()=>rye,_shadersEllipsoidFS:()=>jte,_shadersEllipsoidSurfaceAppearanceFS:()=>PIe,_shadersEllipsoidSurfaceAppearanceVS:()=>RIe,_shadersEllipsoidVS:()=>qte,_shadersFXAA:()=>YQe,_shadersFXAA3_11:()=>ZQe,_shadersFadeMaterial:()=>nye,_shadersFeatureIdStageFS:()=>D1e,_shadersFeatureIdStageVS:()=>T1e,_shadersFilmicTonemapping:()=>KQe,_shadersGaussianBlur1D:()=>VK,_shadersGaussianBlur1DSun:()=>tSe,_shadersGeometryStageFS:()=>F1e,_shadersGeometryStageVS:()=>N1e,_shadersGlobeFS:()=>Obe,_shadersGlobeVS:()=>Ube,_shadersGridMaterial:()=>oye,_shadersGroundAtmosphere:()=>Kte,_shadersHSBToRGB:()=>ave,_shadersHSLToRGB:()=>sve,_shadersImageBasedLightingStageFS:()=>o1e,_shadersInstancingStageCommon:()=>f1e,_shadersInstancingStageVS:()=>g1e,_shadersLegacyInstancingStageVS:()=>p1e,_shadersLensFlare:()=>JQe,_shadersLightingStageFS:()=>O1e,_shadersMaterialStageFS:()=>G1e,_shadersMetadataStageFS:()=>M1e,_shadersMetadataStageVS:()=>P1e,_shadersModelClippingPlanesStageFS:()=>A1e,_shadersModelColorStageFS:()=>c1e,_shadersModelFS:()=>JBe,_shadersModelSilhouetteStageFS:()=>dwe,_shadersModelSilhouetteStageVS:()=>fwe,_shadersModelSplitterStageFS:()=>pwe,_shadersModelVS:()=>WBe,_shadersModifiedReinhardTonemapping:()=>WQe,_shadersMorphTargetsStageVS:()=>V1e,_shadersNightVision:()=>jQe,_shadersNormalMapMaterial:()=>aye,_shadersOctahedralProjectionAtlasFS:()=>IBe,_shadersOctahedralProjectionFS:()=>_Be,_shadersOctahedralProjectionVS:()=>BBe,_shadersPassThrough:()=>KM,_shadersPassThroughDepth:()=>HK,_shadersPerInstanceColorAppearanceFS:()=>YEe,_shadersPerInstanceColorAppearanceVS:()=>JEe,_shadersPerInstanceFlatColorAppearanceFS:()=>cre,_shadersPerInstanceFlatColorAppearanceVS:()=>WEe,_shadersPointCloudEyeDomeLighting:()=>QBe,_shadersPointCloudStylingStageVS:()=>Y1e,_shadersPointPrimitiveCollectionFS:()=>cG,_shadersPointPrimitiveCollectionVS:()=>AEe,_shadersPolylineArrowMaterial:()=>sye,_shadersPolylineColorAppearanceVS:()=>kEe,_shadersPolylineCommon:()=>U5,_shadersPolylineDashMaterial:()=>lye,_shadersPolylineFS:()=>Are,_shadersPolylineGlowMaterial:()=>uye,_shadersPolylineMaterialAppearanceVS:()=>OEe,_shadersPolylineOutlineMaterial:()=>cye,_shadersPolylineShadowVolumeFS:()=>REe,_shadersPolylineShadowVolumeMorphFS:()=>LEe,_shadersPolylineShadowVolumeMorphVS:()=>FEe,_shadersPolylineShadowVolumeVS:()=>NEe,_shadersPolylineVS:()=>LIe,_shadersPostProcessRain:()=>clt,_shadersPostProcessSnow:()=>Alt,_shadersPrimitiveOutlineStageFS:()=>j1e,_shadersPrimitiveOutlineStageVS:()=>W1e,_shadersRGBToHSB:()=>Pve,_shadersRGBToHSL:()=>Rve,_shadersRGBToXYZ:()=>Lve,_shadersReinhardTonemapping:()=>qQe,_shadersReprojectWebMercatorFS:()=>gbe,_shadersReprojectWebMercatorVS:()=>pbe,_shadersRimLightingMaterial:()=>Aye,_shadersSelectedFeatureIdStageCommon:()=>Dte,_shadersShadowVolumeAppearanceFS:()=>fre,_shadersShadowVolumeAppearanceVS:()=>KEe,_shadersShadowVolumeFS:()=>Z7,_shadersSilhouette:()=>XQe,_shadersSkinningStageVS:()=>$1e,_shadersSkyAtmosphereCommon:()=>iie,_shadersSkyAtmosphereFS:()=>bSe,_shadersSkyAtmosphereVS:()=>QSe,_shadersSkyBoxFS:()=>DSe,_shadersSkyBoxVS:()=>TSe,_shadersSlopeRampMaterial:()=>hye,_shadersStripeMaterial:()=>dye,_shadersSunFS:()=>MSe,_shadersSunShaft:()=>hlt,_shadersSunShaftHdr:()=>dlt,_shadersSunShaftModulate:()=>eSe,_shadersSunTextureFS:()=>Eat,_shadersSunTextureFS_v2:()=>RSe,_shadersSunVS:()=>PSe,_shadersSunVisibleFS:()=>iSe,_shadersSunVisibleShaft:()=>rSe,_shadersSunVisibleVS:()=>t1e,_shadersTexturedMaterialAppearanceFS:()=>TIe,_shadersTexturedMaterialAppearanceVS:()=>MIe,_shadersVector3DTileClampedPolylinesFS:()=>Owe,_shadersVector3DTileClampedPolylinesVS:()=>kwe,_shadersVector3DTilePolylinesVS:()=>Nwe,_shadersVectorTileVS:()=>Mte,_shadersViewportQuadFS:()=>DDe,_shadersViewportQuadVS:()=>_oe,_shadersWater:()=>fye,_shadersXYZToRGB:()=>nEe,_shadersacesTonemapping:()=>Dxe,_shadersalphaWeight:()=>Txe,_shadersantialias:()=>Mxe,_shadersapproximateSphericalCoordinates:()=>Pxe,_shadersbackFacing:()=>Rxe,_shadersbranchFreeTernary:()=>Lxe,_shaderscascadeColor:()=>Fxe,_shaderscascadeDistance:()=>Nxe,_shaderscascadeMatrix:()=>kxe,_shaderscascadeWeights:()=>Oxe,_shaderscolumbusViewMorph:()=>Uxe,_shaderscomputePosition:()=>Gxe,_shaderscosineAndSine:()=>Hxe,_shadersdecompressTextureCoordinates:()=>Vxe,_shadersdefaultPbrMaterial:()=>zxe,_shadersdegreesPerRadian:()=>kye,_shadersdepthClamp:()=>Kxe,_shadersdepthRange:()=>Oye,_shadersdepthRangeStruct:()=>vxe,_shaderseastNorthUpToEyeCoordinates:()=>Yxe,_shadersellipsoidContainsPoint:()=>Jxe,_shadersellipsoidWgs84TextureCoordinates:()=>Wxe,_shadersepsilon1:()=>Uye,_shadersepsilon2:()=>Gye,_shadersepsilon3:()=>Hye,_shadersepsilon4:()=>Vye,_shadersepsilon5:()=>zye,_shadersepsilon6:()=>Kye,_shadersepsilon7:()=>Yye,_shadersequalsEpsilon:()=>jxe,_shaderseyeOffset:()=>qxe,_shaderseyeToWindowCoordinates:()=>Xxe,_shadersfastApproximateAtan:()=>Zxe,_shadersfog:()=>$xe,_shadersgammaCorrect:()=>eve,_shadersgeodeticSurfaceNormal:()=>tve,_shadersgetDefaultMaterial:()=>ive,_shadersgetLambertDiffuse:()=>rve,_shadersgetSpecular:()=>nve,_shadersgetWaterNoise:()=>ove,_shadershue:()=>lve,_shadersinfinity:()=>Jye,_shadersinverseGamma:()=>uve,_shadersisEmpty:()=>cve,_shadersisFull:()=>Ave,_shaderslatitudeToWebMercatorFraction:()=>hve,_shaderslineDistance:()=>fve,_shaderslinearToSrgb:()=>dve,_shadersluminance:()=>gve,_shadersmaterial:()=>Exe,_shadersmaterialInput:()=>Ixe,_shadersmetersPerPixel:()=>pve,_shadersmodelMaterial:()=>_xe,_shadersmodelToWindowCoordinates:()=>mve,_shadersmodelVertexOutput:()=>Bxe,_shadersmultiplyWithColorBalance:()=>Cve,_shadersnearFarScalar:()=>yve,_shadersoctDecode:()=>xve,_shadersoneOverPi:()=>Wye,_shadersoneOverTwoPi:()=>jye,_shaderspackDepth:()=>vve,_shaderspassCesium3DTile:()=>qye,_shaderspassCesium3DTileClassification:()=>Xye,_shaderspassCesium3DTileClassificationIgnoreShow:()=>Zye,_shaderspassClassification:()=>$ye,_shaderspassCompute:()=>exe,_shaderspassEnvironment:()=>txe,_shaderspassGlobe:()=>ixe,_shaderspassOpaque:()=>rxe,_shaderspassOverlay:()=>nxe,_shaderspassTerrainClassification:()=>oxe,_shaderspassTranslucent:()=>axe,_shaderspbrLighting:()=>Eve,_shaderspbrMetallicRoughnessMaterial:()=>Ive,_shaderspbrParameters:()=>wxe,_shaderspbrSpecularGlossinessMaterial:()=>_ve,_shadersphong:()=>Bve,_shaderspi:()=>sxe,_shaderspiOverFour:()=>lxe,_shaderspiOverSix:()=>uxe,_shaderspiOverThree:()=>cxe,_shaderspiOverTwo:()=>Axe,_shadersplaneDistance:()=>wve,_shaderspointAlongRay:()=>bve,_shadersradiansPerDegree:()=>hxe,_shadersray:()=>bxe,_shadersrayEllipsoidIntersectionInterval:()=>Qve,_shadersraySegment:()=>Qxe,_shadersraySphereIntersectionInterval:()=>Sve,_shadersreadDepth:()=>Dve,_shadersreadNonPerspective:()=>Tve,_shadersreverseLogDepth:()=>Mve,_shadersround:()=>Fve,_shaderssampleOctahedralProjection:()=>Nve,_shaderssaturation:()=>kve,_shaderssceneMode2D:()=>dxe,_shaderssceneMode3D:()=>fxe,_shaderssceneModeColumbusView:()=>gxe,_shaderssceneModeMorphing:()=>pxe,_shadersshadowDepthCompare:()=>Ove,_shadersshadowParameters:()=>Sxe,_shadersshadowVisibility:()=>Uve,_shaderssignNotZero:()=>Gve,_shaderssolarRadius:()=>mxe,_shaderssphericalHarmonics:()=>Hve,_shaderssrgbToLinear:()=>Vve,_shaderstangentToEyeSpaceMatrix:()=>zve,_shadersthreePiOver2:()=>Cxe,_shaderstransformPlane:()=>Kve,_shaderstranslateRelativeToEye:()=>Yve,_shaderstranslucentPhong:()=>Jve,_shaderstranspose:()=>Wve,_shaderstwoPi:()=>yxe,_shadersunpackDepth:()=>jve,_shadersunpackFloat:()=>qve,_shadersunpackUint:()=>Xve,_shadersvalueTransform:()=>Zve,_shadersvertexLogDepth:()=>$ve,_shaderswebMercatorMaxLatitude:()=>xxe,_shaderswindowToEyeCoordinates:()=>eEe,_shaderswriteDepthClamp:()=>tEe,_shaderswriteLogDepth:()=>iEe,_shaderswriteNonPerspective:()=>rEe,addBuffer:()=>uBe,addDefaults:()=>tBe,addExtensionsRequired:()=>aBe,addExtensionsUsed:()=>iO,addPipelineExtras:()=>eJ,addToArray:()=>H_,appendForwardSlash:()=>GCe,arrayRemoveDuplicates:()=>fC,barycentricCoordinates:()=>dre,binarySearch:()=>hC,buildDrawCommand:()=>r1e,buildModuleUrl:()=>xs,clone:()=>xo,combine:()=>ia,computeFlyToLocationForRectangle:()=>BJ,createBillboardPointCallback:()=>Gne,createBlurStage:()=>_ie,createCommand:()=>Hl,createDefaultImageryProviderViewModels:()=>Lbe,createDefaultTerrainProviderViewModels:()=>kbe,createEdgeStage:()=>IH,createElevationBandMaterial:()=>Est,createFragmentFromTemplate:()=>s2e,createGuid:()=>Vu,createMaterialPropertyDescriptor:()=>hy,createOsmBuildings:()=>Ist,createPropertyDescriptor:()=>Bi,createRawPropertyDescriptor:()=>M_,createTangentSpaceDebugPrimitive:()=>_st,createTaskProcessorWorker:()=>Qlt,createUniform:()=>Rye,createUniformArray:()=>Fye,createWorldImagery:()=>Xk,createWorldTerrain:()=>Nbe,crypto_js:()=>nD,decodeGoogleEarthEnterpriseData:()=>LDe,decodeVectorPolylinePositions:()=>Gwe,defaultValue:()=>Ae,defer:()=>rA,defined:()=>O,deprecationWarning:()=>$D,destroyObject:()=>Qr,echarts:()=>Nb,exportKml:()=>cat,findAccessorMinMax:()=>tJ,findContentMetadata:()=>Jne,findGroupMetadata:()=>Wne,findTileMetadata:()=>qwe,forEachTextureInMaterial:()=>Cne,formatError:()=>D5,fragment:()=>qet,freezeRenderState:()=>MKe,getAbsoluteUri:()=>iY,getAccessorByteStride:()=>uN,getBaseUri:()=>VCe,getBinaryAccessor:()=>vM,getClipAndStyleCode:()=>Cbe,getClippingFunction:()=>ioe,getComponentReader:()=>KY,getElement:()=>iA,getExtensionFromUri:()=>Nie,getFilenameFromUri:()=>wY,getImageFromTypedArray:()=>_Ee,getImagePixels:()=>i5,getJsonFromTypedArray:()=>Bx,getMagic:()=>Q6,getStringFromTypedArray:()=>d2,getTimestamp:()=>GA,hasExtension:()=>Qg,heightReferenceOnEntityPropertyChanged:()=>UY,isBitSet:()=>q_,isBlobUri:()=>kie,isCrossOriginUrl:()=>Oie,isDataUri:()=>rY,isLeapYear:()=>n8,jsencrypt:()=>n2e,knockout:()=>gr,knockout_3_5_1:()=>EP,knockout_es5:()=>vbe,libgif:()=>JIe,licensechack:()=>zst,loadAndExecuteScript:()=>Uie,loadCRN:()=>Jat,loadCubeMap:()=>SSe,loadDDS:()=>zie,loadImageFromTypedArray:()=>fne,loadKTX2:()=>XF,loadView:()=>xae,mapbox_gl:()=>$Ie,mergeSort:()=>NJ,modernizeShader:()=>Nye,moveTechniqueRenderStates:()=>oBe,moveTechniquesToExtension:()=>sBe,numberOfComponentsForType:()=>eO,objectToQuery:()=>Gie,oneTimeWarning:()=>ua,packer:()=>QEe,parseBatchTable:()=>AJ,parseBoundingVolumeSemantics:()=>Pwe,parseDefines:()=>a2e,parseFeatureMetadataLegacy:()=>$_e,parseGlb:()=>rBe,parseResponseHeaders:()=>zCe,parseStructuralMetadata:()=>Z_e,pointInsideTriangle:()=>tst,preprocess3DTileContent:()=>jne,purify:()=>xat,queryToObject:()=>xD,rasterizeHTML_allinone:()=>lDe,readAccessorPacked:()=>cBe,removeExtension:()=>SK,removeExtensionsRequired:()=>iBe,removeExtensionsUsed:()=>mne,removePipelineExtras:()=>nBe,removeUnusedElements:()=>lBe,remove_primitive:()=>qK,resizeImageToNextPowerOfTwo:()=>q7,sampleTerrain:()=>gJ,sampleTerrainMostDetailed:()=>vQ,scaleToGeodeticSurface:()=>Yie,subdivideArray:()=>UEe,subscribeAndEvaluate:()=>WE,svgCompassGyro:()=>d2e,svgCompassOuterRing:()=>h2e,svgCompassRotationMarker:()=>f2e,svgReset:()=>u2e,turf:()=>Zl,updateAccessorComponentTypes:()=>ABe,updateVersion:()=>hBe,usesExtension:()=>_p,vertex:()=>jet,viewerCesium3DTilesInspectorMixin:()=>ylt,viewerCesiumInspectorMixin:()=>xlt,viewerCesiumNavigationMixin:()=>jst,viewerDragDropMixin:()=>vlt,viewerPerformanceWatchdogMixin:()=>Elt,webGLConstantToGlslType:()=>Ast,wrapFunction:()=>ODe,writeTextToCanvas:()=>N5});var rBt=Object.create,S7e=Object.defineProperty,nBt=Object.getOwnPropertyDescriptor,oBt=Object.getOwnPropertyNames,aBt=Object.getPrototypeOf,sBt=Object.prototype.hasOwnProperty,sM=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(A,f)=>(typeof require<"u"?require:A)[f]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+o+'" is not supported')}),vh=(o,A)=>()=>(A||o((A={exports:{}}).exports,A),A.exports),lBt=(o,A,f,m)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of oBt(A))!sBt.call(o,C)&&C!==f&&S7e(o,C,{get:()=>A[C],enumerable:!(m=nBt(A,C))||m.enumerable});return o},Eh=(o,A,f)=>(f=o!=null?rBt(aBt(o)):{},lBt(A||!o||!o.__esModule?S7e(f,"default",{value:o,enumerable:!0}):f,o)),NCe=vh((o,A)=>{var f=function(m){m==null&&(m=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,m.constructor==Array?this.init_by_array(m,m.length):this.init_seed(m)};f.prototype.init_seed=function(m){for(this.mt[0]=m>>>0,this.mti=1;this.mti<this.N;this.mti++){var m=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((m&4294901760)>>>16)*1812433253<<16)+(m&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}},f.prototype.init_by_array=function(m,C){var y,x,v;for(this.init_seed(19650218),y=1,x=0,v=this.N>C?this.N:C;v;v--){var E=this.mt[y-1]^this.mt[y-1]>>>30;this.mt[y]=(this.mt[y]^(((E&4294901760)>>>16)*1664525<<16)+(E&65535)*1664525)+m[x]+x,this.mt[y]>>>=0,y++,x++,y>=this.N&&(this.mt[0]=this.mt[this.N-1],y=1),x>=C&&(x=0)}for(v=this.N-1;v;v--){var E=this.mt[y-1]^this.mt[y-1]>>>30;this.mt[y]=(this.mt[y]^(((E&4294901760)>>>16)*1566083941<<16)+(E&65535)*1566083941)-y,this.mt[y]>>>=0,y++,y>=this.N&&(this.mt[0]=this.mt[this.N-1],y=1)}this.mt[0]=2147483648},f.prototype.random_int=function(){var m,C=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var y;for(this.mti==this.N+1&&this.init_seed(5489),y=0;y<this.N-this.M;y++)m=this.mt[y]&this.UPPER_MASK|this.mt[y+1]&this.LOWER_MASK,this.mt[y]=this.mt[y+this.M]^m>>>1^C[m&1];for(;y<this.N-1;y++)m=this.mt[y]&this.UPPER_MASK|this.mt[y+1]&this.LOWER_MASK,this.mt[y]=this.mt[y+(this.M-this.N)]^m>>>1^C[m&1];m=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^m>>>1^C[m&1],this.mti=0}return m=this.mt[this.mti++],m^=m>>>11,m^=m<<7&2636928640,m^=m<<15&4022730752,m^=m>>>18,m>>>0},f.prototype.random_int31=function(){return this.random_int()>>>1},f.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},f.prototype.random=function(){return this.random_int()*(1/4294967296)},f.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},f.prototype.random_long=function(){var m=this.random_int()>>>5,C=this.random_int()>>>6;return(m*67108864+C)*(1/9007199254740992)},A.exports=f}),uBt=vh((o,A)=>{/*! https://mths.be/punycode v1.4.0 by @mathias */(function(f){var m=typeof o=="object"&&o&&!o.nodeType&&o,C=typeof A=="object"&&A&&!A.nodeType&&A,y=typeof global=="object"&&global;(y.global===y||y.window===y||y.self===y)&&(f=y);var x,v=2147483647,E=36,I=1,w=26,Q=38,M=700,B=72,T=128,D="-",F=/^xn--/,L=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},U=E-I,V=Math.floor,H=String.fromCharCode,q;function ie(Ie){throw new RangeError(k[Ie])}function Z(Ie,ve){for(var K=Ie.length,W=[];K--;)W[K]=ve(Ie[K]);return W}function oe(Ie,ve){var K=Ie.split("@"),W="";K.length>1&&(W=K[0]+"@",Ie=K[1]),Ie=Ie.replace(R,".");var te=Ie.split("."),Y=Z(te,ve).join(".");return W+Y}function ne(Ie){for(var ve=[],K=0,W=Ie.length,te,Y;K<W;)te=Ie.charCodeAt(K++),te>=55296&&te<=56319&&K<W?(Y=Ie.charCodeAt(K++),(Y&64512)==56320?ve.push(((te&1023)<<10)+(Y&1023)+65536):(ve.push(te),K--)):ve.push(te);return ve}function se(Ie){return Z(Ie,function(ve){var K="";return ve>65535&&(ve-=65536,K+=H(ve>>>10&1023|55296),ve=56320|ve&1023),K+=H(ve),K}).join("")}function ce(Ie){return Ie-48<10?Ie-22:Ie-65<26?Ie-65:Ie-97<26?Ie-97:E}function j(Ie,ve){return Ie+22+75*(Ie<26)-((ve!=0)<<5)}function de(Ie,ve,K){var W=0;for(Ie=K?V(Ie/M):Ie>>1,Ie+=V(Ie/ve);Ie>U*w>>1;W+=E)Ie=V(Ie/U);return V(W+(U+1)*Ie/(Ie+Q))}function me(Ie){var ve=[],K=Ie.length,W,te=0,Y=T,he=B,fe,Ce,Ee,be,Re,Ne,Je,ot,nt;for(fe=Ie.lastIndexOf(D),fe<0&&(fe=0),Ce=0;Ce<fe;++Ce)Ie.charCodeAt(Ce)>=128&&ie("not-basic"),ve.push(Ie.charCodeAt(Ce));for(Ee=fe>0?fe+1:0;Ee<K;){for(be=te,Re=1,Ne=E;Ee>=K&&ie("invalid-input"),Je=ce(Ie.charCodeAt(Ee++)),(Je>=E||Je>V((v-te)/Re))&&ie("overflow"),te+=Je*Re,ot=Ne<=he?I:Ne>=he+w?w:Ne-he,!(Je<ot);Ne+=E)nt=E-ot,Re>V(v/nt)&&ie("overflow"),Re*=nt;W=ve.length+1,he=de(te-be,W,be==0),V(te/W)>v-Y&&ie("overflow"),Y+=V(te/W),te%=W,ve.splice(te++,0,Y)}return se(ve)}function _e(Ie){var ve,K,W,te,Y,he,fe,Ce,Ee,be,Re,Ne=[],Je,ot,nt,$e;for(Ie=ne(Ie),Je=Ie.length,ve=T,K=0,Y=B,he=0;he<Je;++he)Re=Ie[he],Re<128&&Ne.push(H(Re));for(W=te=Ne.length,te&&Ne.push(D);W<Je;){for(fe=v,he=0;he<Je;++he)Re=Ie[he],Re>=ve&&Re<fe&&(fe=Re);for(ot=W+1,fe-ve>V((v-K)/ot)&&ie("overflow"),K+=(fe-ve)*ot,ve=fe,he=0;he<Je;++he)if(Re=Ie[he],Re<ve&&++K>v&&ie("overflow"),Re==ve){for(Ce=K,Ee=E;be=Ee<=Y?I:Ee>=Y+w?w:Ee-Y,!(Ce<be);Ee+=E)$e=Ce-be,nt=E-be,Ne.push(H(j(be+$e%nt,0))),Ce=V($e/nt);Ne.push(H(j(Ce,0))),Y=de(K,ot,W==te),K=0,++W}++K,++ve}return Ne.join("")}function Be(Ie){return oe(Ie,function(ve){return F.test(ve)?me(ve.slice(4).toLowerCase()):ve})}function Qe(Ie){return oe(Ie,function(ve){return L.test(ve)?"xn--"+_e(ve):ve})}if(x={version:"1.3.2",ucs2:{decode:ne,encode:se},decode:me,encode:_e,toASCII:Qe,toUnicode:Be},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return x});else if(m&&C)if(A.exports==m)C.exports=x;else for(q in x)x.hasOwnProperty(q)&&(m[q]=x[q]);else f.punycode=x})(o)}),cBt=vh((o,A)=>{/*!
    `;setTimeout(console.log.bind(console,o,"color:#018aff;font-size:30px;font-wight:bold;font-family:\u5FAE\u8F6F\u96C5\u9ED1","color:#018aff;font-size:13px;font-family:\u5FAE\u8F6F\u96C5\u9ED1"),0)};var I5e=tBt;var z2e={};sde(z2e,{AlphaMode:()=>b8,AlphaPipelineStage:()=>E1e,Animation:()=>Ibe,AnimationViewModel:()=>_be,Appearance:()=>Sd,ApproximateTerrainHeights:()=>eh,ArcGISTiledElevationTerrainProvider:()=>Rat,ArcGisMapServerImageryProvider:()=>qb,ArcType:()=>Pa,ArticulationStageType:()=>b_,AssociativeArray:()=>Vo,AttributeCompression:()=>Mu,AttributeType:()=>Is,AutoExposure:()=>$Qe,AutomaticUniforms:()=>BG,Axis:()=>vp,AxisAlignedBoundingBox:()=>xY,B3dmLoader:()=>TBe,B3dmParser:()=>SBe,Base64Encoder:()=>Nee,BaseLayerPicker:()=>wbe,BaseLayerPickerViewModel:()=>Bbe,BatchTable:()=>hre,BatchTableHierarchy:()=>Qne,BatchTexture:()=>Q1,BatchTexturePipelineStage:()=>I1e,Billboard:()=>Zh,BillboardCollection:()=>iI,BillboardGraphics:()=>eP,BillboardVisualizer:()=>c_e,BingMapsApi:()=>Lat,BingMapsGeocoderService:()=>Nat,BingMapsImageryProvider:()=>Tbe,BingMapsStyle:()=>Dbe,BlendEquation:()=>sx,BlendFunction:()=>LA,BlendOption:()=>tf,BlendTexture:()=>X8,BlendingState:()=>Bu,BoundingRectangle:()=>Kr,BoundingSphere:()=>wi,BoundingSphereState:()=>ro,BoxEmitter:()=>wst,BoxGeometry:()=>LM,BoxGeometryUpdater:()=>A_e,BoxGraphics:()=>gre,BoxOutlineGeometry:()=>r2,BrdfLutGenerator:()=>lQe,Buffer:()=>vo,BufferLoader:()=>ZY,BufferUsage:()=>ln,CPUStylingPipelineStage:()=>b1e,CallbackProperty:()=>Bn,Camera:()=>Ml,CameraEventAggregator:()=>cSe,CameraEventType:()=>Bc,CameraFlightPath:()=>UIe,Cartesian2:()=>It,Cartesian3:()=>ee,Cartesian4:()=>ai,Cartographic:()=>Kt,CartographicGeocoderService:()=>kSe,CatmullRomSpline:()=>kat,Cesium3DContentGroup:()=>kne,Cesium3DTile:()=>Ov,Cesium3DTileBatchTable:()=>pJ,Cesium3DTileColorBlendMode:()=>bD,Cesium3DTileContent:()=>bst,Cesium3DTileContentFactory:()=>Vne,Cesium3DTileContentState:()=>NA,Cesium3DTileContentType:()=>Bv,Cesium3DTileFeature:()=>Ts,Cesium3DTileFeatureTable:()=>P6,Cesium3DTileOptimizationHint:()=>XL,Cesium3DTileOptimizations:()=>ibe,Cesium3DTilePass:()=>Ep,Cesium3DTilePassState:()=>wP,Cesium3DTilePointFeature:()=>Rk,Cesium3DTileRefine:()=>Ay,Cesium3DTileStyle:()=>mY,Cesium3DTileStyleEngine:()=>obe,Cesium3DTilesInspector:()=>E2e,Cesium3DTilesInspectorViewModel:()=>v2e,Cesium3DTileset:()=>Fx,Cesium3DTilesetCache:()=>rbe,Cesium3DTilesetGraphics:()=>xre,Cesium3DTilesetHeatmap:()=>nbe,Cesium3DTilesetMetadata:()=>tbe,Cesium3DTilesetMostDetailedTraversal:()=>zne,Cesium3DTilesetStatistics:()=>Wk,Cesium3DTilesetTraversal:()=>dN,Cesium3DTilesetVisualizer:()=>lbe,CesiumInspector:()=>_2e,CesiumInspectorViewModel:()=>I2e,CesiumNavigation:()=>zDe,CesiumRenderPass:()=>KDe,CesiumTerrainProvider:()=>RJ,CesiumWidget:()=>jJ,Check:()=>of,CheckerboardMaterialProperty:()=>lie,CircleEmitter:()=>a2e,CircleGeometry:()=>Oat,CircleOutlineGeometry:()=>Uat,CircleWaveMaterialProperty:()=>Z8,ClassificationModelDrawCommand:()=>qBe,ClassificationPipelineStage:()=>_1e,ClassificationPrimitive:()=>s6,ClassificationType:()=>Gu,ClearCommand:()=>eA,ClippingPlane:()=>kM,ClippingPlaneCollection:()=>rB,Clock:()=>z5,ClockRange:()=>aC,ClockStep:()=>jh,ClockViewModel:()=>LSe,CloudCollection:()=>Rst,CloudType:()=>wie,CollectionSource:()=>hJe,Color:()=>At,ColorBlendMode:()=>HD,ColorGeometryInstanceAttribute:()=>Yo,ColorMaterialProperty:()=>Fa,Command:()=>Iat,ComponentDatatype:()=>ei,Composite3DTileContent:()=>Bwe,CompositeEntityCollection:()=>$ot,CompositeMaterialProperty:()=>cie,CompositePositionProperty:()=>U_,CompositeProperty:()=>P1,CompressedTextureBuffer:()=>oY,ComputeCommand:()=>B5,ComputeEngine:()=>$be,ConditionsExpression:()=>bEe,ConeEmitter:()=>vH,ConicArcSensor:()=>Mie,ConicArcSensorCollection:()=>_lt,ConicArcSensorGeometry:()=>Rie,ConicArcSensorGraphics:()=>Tie,ConicArcSensorOutlineGeometry:()=>Lie,ConstantPositionProperty:()=>_D,ConstantProperty:()=>bc,ConstantSpline:()=>NBe,ConstructionWorker:()=>fJe,ContentMetadata:()=>Ywe,ContentState:()=>yD,Context:()=>aQe,ContextLimits:()=>yo,CoplanarPolygonGeometry:()=>b_e,CoplanarPolygonGeometryLibrary:()=>UG,CoplanarPolygonOutlineGeometry:()=>tM,CornerType:()=>ZA,CorridorGeometry:()=>GY,CorridorGeometryLibrary:()=>Gc,CorridorGeometryUpdater:()=>f_e,CorridorGraphics:()=>pre,CorridorOutlineGeometry:()=>d_e,Credit:()=>tl,CreditDisplay:()=>uQe,CubeMap:()=>lQ,CubeMapFace:()=>DL,CubicRealPolynomial:()=>yY,CullFace:()=>CA,CullingVolume:()=>AC,CumulusCloud:()=>TQ,CustomDataSource:()=>Ire,CustomHeightmapTerrainProvider:()=>Gat,CustomMercatorProjection:()=>t6,CustomShader:()=>ZM,CustomShaderManagerEx:()=>sre,CustomShaderMode:()=>gY,CustomShaderPipelineStage:()=>R1e,CustomShaderTranslucencyMode:()=>BF,CustomTilingScheme:()=>jJe,CylinderGeometry:()=>g_e,CylinderGeometryLibrary:()=>ine,CylinderGeometryUpdater:()=>m_e,CylinderGraphics:()=>mre,CylinderOutlineGeometry:()=>p_e,CzmlDataSource:()=>iW,DDSTexture:()=>B2e,DataSource:()=>cy,DataSourceClock:()=>A5,DataSourceCollection:()=>l_e,DataSourceDisplay:()=>_J,DebugAppearance:()=>Ost,DebugCameraPrimitive:()=>_g,DebugInspector:()=>xSe,DebugModelMatrixPrimitive:()=>c2e,DefaultProxy:()=>ZIe,DepthFunction:()=>nI,DepthPlane:()=>hQe,DequantizationPipelineStage:()=>L1e,DerivedCommand:()=>fx,DeveloperError:()=>Ui,DeviceOrientationCameraController:()=>dQe,DirectionalLight:()=>xae,DiscardEmptyTileImagePolicy:()=>soe,DiscardMissingTileImagePolicy:()=>Qbe,DistanceDisplayCondition:()=>$o,DistanceDisplayConditionGeometryInstanceAttribute:()=>vA,DistanceLegendViewModel:()=>LDe,DoubleEndedPriorityQueue:()=>zat,DoublyLinkedList:()=>qne,DracoLoader:()=>$Y,DrawCommand:()=>On,DynamicGeometryBatch:()=>rne,DynamicGeometryUpdater:()=>EA,ECharts:()=>XJe,EarthOrientationParameters:()=>Dye,EarthOrientationParametersSample:()=>sY,EasingFunction:()=>Ix,EllipseGeometry:()=>W1,EllipseGeometryLibrary:()=>iB,EllipseGeometryUpdater:()=>C_e,EllipseGraphics:()=>Cre,EllipseOutlineGeometry:()=>UD,Ellipsoid:()=>Di,EllipsoidGeodesic:()=>l0,EllipsoidGeometry:()=>gC,EllipsoidGeometryUpdater:()=>E_e,EllipsoidGraphics:()=>u6,EllipsoidOutlineGeometry:()=>J1,EllipsoidPrimitive:()=>Zbe,EllipsoidRhumbLine:()=>k1,EllipsoidSurfaceAppearance:()=>MY,EllipsoidTangentPlane:()=>eQ,EllipsoidTerrainProvider:()=>IP,EllipsoidalOccluder:()=>L5,Empty3DTileContent:()=>LK,EncodedCartesian3:()=>Pu,Entity:()=>UA,EntityCluster:()=>eN,EntityCollection:()=>iw,EntityView:()=>$ne,Event:()=>br,EventHelper:()=>Mx,ExpandBySmartEarth:()=>UE,ExpandByTerra:()=>ZJe,Expression:()=>wF,ExpressionNodeType:()=>jn,ExternalParameter:()=>px,ExtrapolationType:()=>mD,FeatureDataProvider:()=>Nre,FeatureDetection:()=>Mo,FeatureIdPipelineStage:()=>dJ,FeatureJsonData:()=>m6,FisheyeProjectionMap:()=>NY,FisheyeProjectionMapShader:()=>C7,FlattenVS:()=>i1e,FlowEcharts:()=>dae,Fog:()=>fQe,ForEach:()=>Vr,FrameRateMonitor:()=>A2e,FrameState:()=>gQe,Framebuffer:()=>Bp,FramebufferManager:()=>qh,FrustumCommands:()=>xQe,FrustumGeometry:()=>C6,FrustumOutlineGeometry:()=>FY,Fullscreen:()=>yp,FullscreenButton:()=>NSe,FullscreenButtonViewModel:()=>FSe,GWBaiduImageryProvider:()=>Kre,GeoJsonDataSource:()=>mK,GeoJsonLoader:()=>RBe,GeocodeType:()=>XJ,Geocoder:()=>VSe,GeocoderService:()=>Yat,GeocoderViewModel:()=>HSe,GeographicProjection:()=>Dg,GeographicTilingScheme:()=>af,Geometry:()=>Zo,Geometry3DTileContent:()=>wwe,GeometryAttribute:()=>Yr,GeometryAttributes:()=>yc,GeometryFactory:()=>Wat,GeometryInstance:()=>co,GeometryInstanceAttribute:()=>k_,GeometryOffsetAttribute:()=>Cl,GeometryPipeline:()=>rc,GeometryPipelineStage:()=>k1e,GeometryType:()=>GL,GeometryUpdater:()=>nh,GeometryVisualizer:()=>V_e,GetFeatureInfoFormat:()=>T7,GifImageProperty:()=>hXe,Globe:()=>voe,GlobeDepth:()=>vQe,GlobeSurfaceShaderSet:()=>Hbe,GlobeSurfaceTile:()=>zM,GlobeSurfaceTileProvider:()=>Kbe,GlobeTranslucency:()=>LJ,GlobeTranslucencyFramebuffer:()=>EQe,GlobeTranslucencyState:()=>mQe,GltfBufferViewLoader:()=>hne,GltfDracoLoader:()=>dne,GltfImageLoader:()=>gne,GltfIndexBufferLoader:()=>pne,GltfJsonLoader:()=>yne,GltfLoader:()=>aJ,GltfLoaderUtil:()=>OM,GltfStructuralMetadataLoader:()=>xBe,GltfTextureLoader:()=>xne,GltfVertexBufferLoader:()=>vne,GoogleEarthEnterpriseImageryProvider:()=>Ust,GoogleEarthEnterpriseMapsProvider:()=>Pbe,GoogleEarthEnterpriseMetadata:()=>EN,GoogleEarthEnterpriseTerrainData:()=>Bie,GoogleEarthEnterpriseTerrainProvider:()=>est,GoogleEarthEnterpriseTileInformation:()=>t2e,GpxDataSource:()=>DDe,Graticules:()=>fXe,GraticulesImageryProvider:()=>m5,GregorianDate:()=>$8,GridImageryProvider:()=>Gst,GridMaterialProperty:()=>Aie,GroundGeometryUpdater:()=>Xl,GroundPolylineGeometry:()=>ure,GroundPolylinePrimitive:()=>a6,GroundPrimitive:()=>nN,GroupMetadata:()=>kte,GwBufferAnalysis:()=>Yre,HeadingPitchRange:()=>Ex,HeadingPitchRoll:()=>dC,Heap:()=>YCe,HeightReference:()=>xn,HeightmapEncoding:()=>HF,HeightmapTerrainData:()=>wQ,HeightmapTessellator:()=>noe,HermitePolynomialApproximation:()=>pDe,HermiteSpline:()=>DK,HilbertOrder:()=>Pte,HomeButton:()=>KSe,HomeButtonViewModel:()=>zSe,HorizontalOrigin:()=>tA,HugeAdapter:()=>O6,I3SDataProvider:()=>Hst,I3SFeature:()=>f2e,I3SField:()=>g2e,I3SGeometry:()=>bie,I3SLayer:()=>Sie,I3SNode:()=>Qie,I3dmLoader:()=>FBe,I3dmParser:()=>LBe,Iau2000Orientation:()=>jbe,Iau2006XysData:()=>Mye,Iau2006XysSample:()=>qie,IauOrientationAxes:()=>qbe,IauOrientationParameters:()=>Wbe,ImageBasedLighting:()=>bne,ImageBasedLightingPipelineStage:()=>a1e,ImageCombine:()=>nre,ImageMaterialProperty:()=>z0,Imagery:()=>eoe,ImageryLayer:()=>dD,ImageryLayerCollection:()=>Ybe,ImageryLayerFeatureInfo:()=>gN,ImageryProvider:()=>a2,ImageryState:()=>sc,Implicit3DTileContent:()=>Nte,ImplicitAvailabilityBitstream:()=>Lte,ImplicitMetadataView:()=>Une,ImplicitSubdivisionScheme:()=>uC,ImplicitSubtree:()=>Twe,ImplicitSubtreeMetadata:()=>Dwe,ImplicitTileCoordinates:()=>sbe,ImplicitTileset:()=>abe,IndexDatatype:()=>Nn,InfoBox:()=>WSe,InfoBoxViewModel:()=>JSe,InspectorShared:()=>K8,InstanceAttributeSemantic:()=>nC,InstancingPipelineStage:()=>m1e,InterpolationAlgorithm:()=>tst,InterpolationType:()=>nF,Intersect:()=>La,IntersectionTests:()=>kA,Intersections2D:()=>$6,Interval:()=>fD,InvertClassification:()=>boe,Ion:()=>yF,IonGeocoderService:()=>GSe,IonImageryProvider:()=>WG,IonResource:()=>jk,IonWorldImageryStyle:()=>jG,Iso8601:()=>Cn,JobScheduler:()=>CQe,JobType:()=>KE,JsonMetadataTable:()=>JY,JulianDate:()=>fi,KTX2Transcoder:()=>jCe,KeyboardEventModifier:()=>eI,KmlCamera:()=>sIe,KmlDataSource:()=>Fre,KmlLookAt:()=>lIe,KmlTour:()=>uIe,KmlTourFlyTo:()=>cIe,KmlTourWait:()=>hIe,Label:()=>K7,LabelCollection:()=>qM,LabelGraphics:()=>c6,LabelStyle:()=>mA,LabelVisualizer:()=>z_e,LagrangePolynomialApproximation:()=>CDe,LeapSecond:()=>$c,Light:()=>zst,LightingModel:()=>rI,LightingPipelineStage:()=>U1e,LinearApproximation:()=>Tre,LinearSampler:()=>s2,LinearSpline:()=>hJ,MVTImageryProvider:()=>EXe,ManagedArray:()=>GM,MapMode2D:()=>rQ,MapProjection:()=>ost,MapWidget:()=>Clt,MapboxApi:()=>nst,MapboxImageryProvider:()=>SJ,MapboxStyleImageryProvider:()=>Yst,Material:()=>ss,MaterialAppearance:()=>Ig,MaterialPass:()=>b2e,MaterialPipelineStage:()=>H1e,MaterialProperty:()=>sC,Math:()=>je,Matrix2:()=>n0,Matrix3:()=>ci,Matrix4:()=>Xe,MetadataClass:()=>S6,MetadataClassProperty:()=>qY,MetadataComponentType:()=>$s,MetadataEntity:()=>su,MetadataEnum:()=>mBe,MetadataEnumValue:()=>pBe,MetadataPipelineStage:()=>IM,MetadataSchema:()=>rO,MetadataSchemaLoader:()=>Ene,MetadataSemantic:()=>Mwe,MetadataTable:()=>tO,MetadataTableProperty:()=>X_e,MetadataType:()=>Zs,MipmapHint:()=>q8,Model:()=>cI,Model3DTileContent:()=>FL,ModelAlphaOptions:()=>awe,ModelAnimation:()=>VBe,ModelAnimationChannel:()=>GBe,ModelAnimationCollection:()=>zBe,ModelAnimationLoop:()=>Ub,ModelAnimationState:()=>OL,ModelArticulation:()=>u1e,ModelArticulationStage:()=>l1e,ModelClippingPlanesPipelineStage:()=>h1e,ModelColorPipelineStage:()=>TK,ModelComponents:()=>ta,ModelDrawCommand:()=>XBe,ModelFeature:()=>KBe,ModelFeatureTable:()=>YBe,ModelGraphics:()=>EY,ModelLightingOptions:()=>ywe,ModelMatrixUpdateStage:()=>y1e,ModelNode:()=>d1e,ModelRenderResources:()=>hwe,ModelRuntimeNode:()=>v1e,ModelRuntimePrimitive:()=>rwe,ModelSceneGraph:()=>vwe,ModelSilhouettePipelineStage:()=>gwe,ModelSkin:()=>owe,ModelSplitterPipelineStage:()=>mwe,ModelStatistics:()=>Ewe,ModelType:()=>K0,ModelUtility:()=>au,ModelVisualizer:()=>_we,Moon:()=>Ioe,MorphTargetsPipelineStage:()=>z1e,MorphWeightSpline:()=>ast,MortonOrder:()=>D8,MultiResourceImageryProvider:()=>Jre,MultiResourceTerrainProvider:()=>Wre,Multiple3DTileContent:()=>Xwe,MultisampleFramebuffer:()=>bBe,NavigationControl:()=>hH,NavigationHelpButton:()=>qSe,NavigationHelpButtonViewModel:()=>jSe,NavigationUtils:()=>dH,NavigationViewModel:()=>F7,NearFarScalar:()=>To,NeverTileDiscardPolicy:()=>Jst,NodeRenderResources:()=>Cwe,NodeStatisticsPipelineStage:()=>x1e,NodeTransformationProperty:()=>yre,OIT:()=>wQe,Occluder:()=>zre,OctahedralProjectedCubeMap:()=>b5,OffsetGeometryInstanceAttribute:()=>a0,OlMVTImageryProvider:()=>qre,OpenCageGeocoderService:()=>sst,OpenStreetMapImageryProvider:()=>M7,OrderedGroundPrimitiveCollection:()=>u_e,OrientedBoundingBox:()=>Hf,OrthographicFrustum:()=>Ds,OrthographicOffCenterFrustum:()=>Y0,Packable:()=>lst,PackableForInterpolation:()=>ust,Particle:()=>vae,ParticleBurst:()=>_H,ParticleEmitter:()=>qst,ParticleSystem:()=>_2,Pass:()=>hr,PassState:()=>cm,PathGraphics:()=>IY,PathVisualizer:()=>ube,PeliasGeocoderService:()=>USe,PerInstanceColorAppearance:()=>za,PerformanceDisplay:()=>GJ,PerformanceWatchdog:()=>V2e,PerformanceWatchdogViewModel:()=>H2e,PerspectiveFrustum:()=>Yu,PerspectiveOffCenterFrustum:()=>n2,PerspectiveProjectionMap:()=>kY,PerspectiveProjectionMapShader:()=>y7,PerspectiveProjectionMapWithDepth:()=>OY,PerspectiveProjectionMapWithDepthShader:()=>rF,PickDepth:()=>yQe,PickDepthFramebuffer:()=>bQe,PickFramebuffer:()=>QQe,PickGlobeSlope:()=>Pot,Picking:()=>RQe,PickingPipelineStage:()=>K1e,PinBuilder:()=>bY,PixelDatatype:()=>wn,PixelFormat:()=>Gn,Plane:()=>Wa,PlaneGeometry:()=>I_e,PlaneGeometryUpdater:()=>w_e,PlaneGraphics:()=>jEe,PlaneOutlineGeometry:()=>__e,PntsLoader:()=>Iwe,PntsParser:()=>Nne,PointCloud:()=>ybe,PointCloudEyeDomeLighting:()=>lJ,PointCloudShading:()=>M6,PointCloudStylingPipelineStage:()=>J1e,PointGraphics:()=>vre,PointPrimitive:()=>Tx,PointPrimitiveCollection:()=>uY,PointVisualizer:()=>cbe,PolygonDepth:()=>Q8,PolygonDepthFS:()=>Mne,PolygonDepthVS:()=>Pne,PolygonGeometry:()=>rh,PolygonGeometryLibrary:()=>ql,PolygonGeometryUpdater:()=>S_e,PolygonGraphics:()=>yl,PolygonHierarchy:()=>Un,PolygonOutlineGeometry:()=>Q_e,PolygonPipeline:()=>xA,Polyline:()=>t2,PolylineArrowMaterialProperty:()=>IK,PolylineCollection:()=>Y5,PolylineColorAppearance:()=>ly,PolylineDashMaterialProperty:()=>Vl,PolylineGeometry:()=>Vk,PolylineGeometryUpdater:()=>Abe,PolylineGlowMaterialProperty:()=>hie,PolylineGraphics:()=>FD,PolylineMaterialAppearance:()=>L_,PolylineOutlineMaterialProperty:()=>JM,PolylinePipeline:()=>XA,PolylineTrailLinkMaterialProperty:()=>Rot,PolylineVisualizer:()=>dbe,PolylineVolumeGeometry:()=>D_e,PolylineVolumeGeometryLibrary:()=>C5,PolylineVolumeGeometryUpdater:()=>M_e,PolylineVolumeGraphics:()=>Ere,PolylineVolumeOutlineGeometry:()=>T_e,PositionProperty:()=>vY,PositionPropertyArray:()=>f8,PostProcessStage:()=>va,PostProcessStageCollection:()=>aSe,PostProcessStageComposite:()=>CC,PostProcessStageLibrary:()=>bv,PostProcessStageSampleMode:()=>Dv,PostProcessStageTextureCache:()=>Roe,Primitive:()=>$a,PrimitiveCollection:()=>MD,PrimitiveLoadPlan:()=>oJ,PrimitiveOutlineGenerator:()=>Bne,PrimitiveOutlinePipelineStage:()=>q1e,PrimitivePipeline:()=>s5,PrimitiveRenderResources:()=>xwe,PrimitiveState:()=>i0,PrimitiveStatisticsPipelineStage:()=>X1e,PrimitiveType:()=>yn,ProjectionPicker:()=>ZSe,ProjectionPickerViewModel:()=>XSe,Property:()=>Nt,PropertyArray:()=>lae,PropertyAttribute:()=>Ane,PropertyAttributeProperty:()=>W_e,PropertyBag:()=>LD,PropertyTable:()=>cN,PropertyTexture:()=>cne,PropertyTextureProperty:()=>Y_e,ProviderViewModel:()=>fp,Proxy:()=>hst,QuadraticRealPolynomial:()=>Vb,QuadtreeOccluders:()=>moe,QuadtreePrimitive:()=>BP,QuadtreePrimitivezh:()=>Not,QuadtreeTile:()=>Coe,QuadtreeTileLoadState:()=>mC,QuadtreeTileProvider:()=>Xst,QuantizedMeshTerrainData:()=>doe,QuarticRealPolynomial:()=>MEe,Quaternion:()=>jr,QuaternionSpline:()=>OBe,Queue:()=>d5,RasterizeHtml:()=>lH,Ray:()=>ls,Rectangle:()=>Si,RectangleCollisionChecker:()=>sne,RectangleGeometry:()=>VY,RectangleGeometryLibrary:()=>uy,RectangleGeometryUpdater:()=>k_e,RectangleGraphics:()=>A6,RectangleOutlineGeometry:()=>one,RectangularSensor:()=>qK,RectangularSensorFS:()=>xie,RectangularSensorGraphics:()=>blt,RectangularSensorPrimitive:()=>WDe,RectangularSensorScanPlaneFS:()=>JDe,RectangularSensorVS:()=>pae,RectangularSensorVisualizer:()=>jDe,ReferenceFrame:()=>s0,ReferenceProperty:()=>DY,RenderEntity:()=>gW,RenderObjectFactory:()=>zc,RenderState:()=>fn,Renderbuffer:()=>G_,RenderbufferFormat:()=>qE,Request:()=>cC,RequestErrorEvent:()=>r5,RequestScheduler:()=>V1,RequestState:()=>yA,RequestType:()=>oB,ResetViewNavigationControl:()=>kDe,Resource:()=>An,ResourceCache:()=>sf,ResourceCacheKey:()=>nw,ResourceCacheStatistics:()=>yBe,ResourceLoader:()=>fy,ResourceLoaderState:()=>ha,Rotation:()=>YD,RuntimeError:()=>nr,S2Cell:()=>KG,S3MCacheFileRenderEntity:()=>Die,S3MCompressType:()=>Blt,S3MContentFactory:()=>R2e,S3MContentParser:()=>L2e,S3MCreateIndexJob:()=>P2e,S3MCreateVertexJob:()=>T2e,S3MDataSource:()=>Got,S3MLayerCache:()=>F2e,S3MLayerScheduler:()=>N2e,S3MPixelFormat:()=>wlt,S3MTile:()=>O2e,S3MTilesFS:()=>S2e,S3MTilesLayer:()=>Bae,S3MTilesVS:()=>Q2e,S3ModelParser:()=>k2e,SDFSettings:()=>Qv,SampledPositionProperty:()=>R1,SampledProperty:()=>uM,Sampler:()=>Qs,ScaledPositionProperty:()=>g6,Scene:()=>koe,SceneFramebuffer:()=>Soe,SceneMode:()=>xi,SceneMode2DPipelineStage:()=>Z1e,SceneModePicker:()=>eDe,SceneModePickerViewModel:()=>$Se,SceneTransforms:()=>Ss,SceneTransitioner:()=>uSe,ScreenSpaceCameraController:()=>pSe,ScreenSpaceEventHandler:()=>Ur,ScreenSpaceEventType:()=>Ki,SelectedFeatureIdPipelineStage:()=>MK,SelectionIndicator:()=>iDe,SelectionIndicatorViewModel:()=>tDe,Sensor:()=>Mat,ShaderBuilder:()=>Awe,ShaderCache:()=>tQe,ShaderDestination:()=>Sr,ShaderFunction:()=>cwe,ShaderProgram:()=>_s,ShaderSource:()=>Fr,ShaderStruct:()=>lwe,ShadowMap:()=>xQ,ShadowMapShader:()=>gF,ShadowMode:()=>Al,ShadowVolumeAppearance:()=>gM,ShowGeometryInstanceAttribute:()=>wu,Simon1994PlanetaryPositions:()=>UK,SimplePolylineGeometry:()=>dst,SingleTileImageryProvider:()=>bQ,SkinningPipelineStage:()=>ewe,SkyAtmosphere:()=>sH,SkyBox:()=>mN,SphereEmitter:()=>BH,SphereGeometry:()=>fst,SphereOutlineGeometry:()=>tP,Spherical:()=>yDe,Spline:()=>uf,SplitDirection:()=>uI,Splitter:()=>roe,SpotLight:()=>Vot,StaticGeometryColorBatch:()=>AM,StaticGeometryPerMaterialBatch:()=>hM,StaticGroundGeometryColorBatch:()=>_te,StaticGroundGeometryPerMaterialBatch:()=>O_e,StaticGroundPolylinePerMaterialBatch:()=>hbe,StaticOutlineGeometryBatch:()=>Bte,StencilConstants:()=>ca,StencilFunction:()=>Ku,StencilOperation:()=>lo,SteppedSpline:()=>kBe,StripeMaterialProperty:()=>die,StripeOrientation:()=>jF,StructuralMetadata:()=>nP,StyleCommandsNeeded:()=>Q5,StyleExpression:()=>Zst,Sun:()=>Uoe,SunLight:()=>iH,SunPostProcess:()=>ySe,SupportedImageFormats:()=>vBe,SvgPathBindingHandler:()=>Ebe,TaskProcessor:()=>Vf,TerrainData:()=>AO,TerrainEncoding:()=>HM,TerrainExaggeration:()=>ID,TerrainFillMesh:()=>goe,TerrainFlatten:()=>xN,TerrainFlattenPolygonTexture:()=>MDe,TerrainMesh:()=>hO,TerrainOffsetProperty:()=>tne,TerrainProvider:()=>Cx,TerrainQuantization:()=>Pv,TerrainState:()=>xh,Texture:()=>mo,TextureAtlas:()=>z7,TextureCache:()=>iQe,TextureMagnificationFilter:()=>th,TextureManager:()=>BEe,TextureMinificationFilter:()=>as,TextureUniform:()=>IEe,TextureWrap:()=>Va,TileAvailability:()=>ZL,TileBoundingRegion:()=>S5,TileBoundingS2Cell:()=>Zwe,TileBoundingSphere:()=>yP,TileBoundingVolume:()=>$st,TileCoordinatesImageryProvider:()=>y2e,TileDiscardPolicy:()=>elt,TileEdge:()=>Ga,TileImagery:()=>toe,TileMapServiceImageryProvider:()=>_P,TileMetadata:()=>Wwe,TileOrientedBoundingBox:()=>NF,TileProviderError:()=>wc,TileReplacementQueue:()=>xoe,TileSelectionResult:()=>sa,TileState:()=>tlt,Tileset3DTileContent:()=>Rwe,TilesetMetadata:()=>ebe,TilesetPipelineStage:()=>n1e,TilingScheme:()=>gst,TimeConstants:()=>Uu,TimeDynamicImagery:()=>Aoe,TimeDynamicPointCloud:()=>Y6,TimeInterval:()=>el,TimeIntervalCollection:()=>mx,TimeIntervalCollectionPositionProperty:()=>T8,TimeIntervalCollectionProperty:()=>g8,TimeStandard:()=>nu,Timeline:()=>oDe,TimelineHighlightRange:()=>rDe,TimelineTrack:()=>nDe,Tipsify:()=>HEe,ToggleButtonViewModel:()=>vG,Tonemapper:()=>ZG,Transforms:()=>Vn,TranslationRotationScale:()=>aB,TranslucentTileClassification:()=>DQe,TridiagonalSystemSolver:()=>Sne,TrustedServers:()=>Vie,TweenCollection:()=>Foe,UniformState:()=>rQe,UniformType:()=>pa,UrlTemplateGeojsonProvider:()=>Yot,UrlTemplateImageryProvider:()=>sw,UserInterfaceControl:()=>gae,Utils:()=>dQ,VERSION:()=>Slt,VRButton:()=>sDe,VRButtonViewModel:()=>aDe,VRTheWorldTerrainProvider:()=>Cst,VaryingType:()=>xx,Vector3DTileBatch:()=>S8,Vector3DTileClampedPolylines:()=>Uwe,Vector3DTileContent:()=>Vwe,Vector3DTileGeometry:()=>Bk,Vector3DTilePoints:()=>Lwe,Vector3DTilePolygons:()=>Fwe,Vector3DTilePolylines:()=>Hne,Vector3DTilePrimitive:()=>One,VelocityOrientationProperty:()=>xDe,VelocityVectorProperty:()=>uae,VertexArray:()=>Vc,VertexArrayFacade:()=>lY,VertexAttributeSemantic:()=>Fo,VertexCompressOption:()=>_1,VertexFormat:()=>Wr,VerticalOrigin:()=>bn,VideoSynchronizer:()=>pst,View:()=>Toe,ViewShed:()=>Xet,ViewShedMap:()=>oH,ViewShedMapShader:()=>vF,Viewer:()=>$J,ViewportQuad:()=>ilt,Visibility:()=>vg,Visualizer:()=>Cat,VulkanConstants:()=>yst,WallGeometry:()=>U_e,WallGeometryLibrary:()=>lne,WallGeometryUpdater:()=>H_e,WallGraphics:()=>_Y,WallOutlineGeometry:()=>G_e,WaterFS:()=>PY,WaterMaterialProperty:()=>Jot,WebGLConstants:()=>Ii,WebMapServiceImageryProvider:()=>MJ,WebMapTileServiceImageryProvider:()=>Z6,WebMercatorProjection:()=>OA,WebMercatorTilingScheme:()=>Am,WindingOrder:()=>Z_,WireframeIndexGenerator:()=>Lne,WireframePipelineStage:()=>iwe,ZoomNavigationControl:()=>mie,_shadersAcesTonemappingStage:()=>LQe,_shadersAdditiveBlend:()=>mSe,_shadersAdjustTranslucentFS:()=>Xte,_shadersAllMaterialAppearanceFS:()=>bIe,_shadersAllMaterialAppearanceVS:()=>QIe,_shadersAmbientOcclusionGenerate:()=>FQe,_shadersAmbientOcclusionModulate:()=>NQe,_shadersAspectRampMaterial:()=>XCe,_shadersAtmosphereCommon:()=>L8,_shadersBasicMaterialAppearanceFS:()=>SIe,_shadersBasicMaterialAppearanceVS:()=>DIe,_shadersBillboardCollectionFS:()=>sEe,_shadersBillboardCollectionVS:()=>lEe,_shadersBlackAndWhite:()=>kQe,_shadersBloomComposite:()=>OQe,_shadersBrdfLutGeneratorFS:()=>sQe,_shadersBrightPass:()=>CSe,_shadersBrightness:()=>UQe,_shadersBumpMapMaterial:()=>ZCe,_shadersCPUStylingStageFS:()=>w1e,_shadersCPUStylingStageVS:()=>B1e,_shadersCheckFloatTexturePrecisionFS:()=>Wot,_shadersCheckerboardMaterial:()=>$Ce,_shadersCloudCollectionFS:()=>cDe,_shadersCloudCollectionVS:()=>ADe,_shadersCloudNoiseFS:()=>hDe,_shadersCloudNoiseVS:()=>dDe,_shadersCompareAndPackTranslucentDepth:()=>SQe,_shadersCompositeOITFS:()=>IQe,_shadersCompositeTranslucentClassification:()=>P7,_shadersContrastBias:()=>GQe,_shadersCustomShaderStageFS:()=>S1e,_shadersCustomShaderStageVS:()=>Q1e,_shadersCzmBuiltins:()=>l7,_shadersDepthOfField:()=>HQe,_shadersDepthPlaneFS:()=>cQe,_shadersDepthPlaneVS:()=>AQe,_shadersDepthView:()=>VQe,_shadersDepthViewPacked:()=>vst,_shadersDotMaterial:()=>eye,_shadersEdgeDetection:()=>zQe,_shadersElevationBandMaterial:()=>tye,_shadersElevationContourMaterial:()=>iye,_shadersElevationRampMaterial:()=>rye,_shadersEllipsoidFS:()=>jte,_shadersEllipsoidSurfaceAppearanceFS:()=>PIe,_shadersEllipsoidSurfaceAppearanceVS:()=>RIe,_shadersEllipsoidVS:()=>qte,_shadersFXAA:()=>YQe,_shadersFXAA3_11:()=>ZQe,_shadersFadeMaterial:()=>nye,_shadersFeatureIdStageFS:()=>D1e,_shadersFeatureIdStageVS:()=>T1e,_shadersFilmicTonemapping:()=>KQe,_shadersGaussianBlur1D:()=>VK,_shadersGaussianBlur1DSun:()=>tSe,_shadersGeometryStageFS:()=>F1e,_shadersGeometryStageVS:()=>N1e,_shadersGlobeFS:()=>Obe,_shadersGlobeVS:()=>Ube,_shadersGridMaterial:()=>oye,_shadersGroundAtmosphere:()=>Kte,_shadersHSBToRGB:()=>ave,_shadersHSLToRGB:()=>sve,_shadersImageBasedLightingStageFS:()=>o1e,_shadersInstancingStageCommon:()=>f1e,_shadersInstancingStageVS:()=>g1e,_shadersLegacyInstancingStageVS:()=>p1e,_shadersLensFlare:()=>JQe,_shadersLightingStageFS:()=>O1e,_shadersMaterialStageFS:()=>G1e,_shadersMetadataStageFS:()=>M1e,_shadersMetadataStageVS:()=>P1e,_shadersModelClippingPlanesStageFS:()=>A1e,_shadersModelColorStageFS:()=>c1e,_shadersModelFS:()=>JBe,_shadersModelSilhouetteStageFS:()=>dwe,_shadersModelSilhouetteStageVS:()=>fwe,_shadersModelSplitterStageFS:()=>pwe,_shadersModelVS:()=>WBe,_shadersModifiedReinhardTonemapping:()=>WQe,_shadersMorphTargetsStageVS:()=>V1e,_shadersNightVision:()=>jQe,_shadersNormalMapMaterial:()=>aye,_shadersOctahedralProjectionAtlasFS:()=>IBe,_shadersOctahedralProjectionFS:()=>_Be,_shadersOctahedralProjectionVS:()=>BBe,_shadersPassThrough:()=>KM,_shadersPassThroughDepth:()=>HK,_shadersPerInstanceColorAppearanceFS:()=>YEe,_shadersPerInstanceColorAppearanceVS:()=>JEe,_shadersPerInstanceFlatColorAppearanceFS:()=>cre,_shadersPerInstanceFlatColorAppearanceVS:()=>WEe,_shadersPointCloudEyeDomeLighting:()=>QBe,_shadersPointCloudStylingStageVS:()=>Y1e,_shadersPointPrimitiveCollectionFS:()=>cG,_shadersPointPrimitiveCollectionVS:()=>AEe,_shadersPolylineArrowMaterial:()=>sye,_shadersPolylineColorAppearanceVS:()=>kEe,_shadersPolylineCommon:()=>U5,_shadersPolylineDashMaterial:()=>lye,_shadersPolylineFS:()=>Are,_shadersPolylineGlowMaterial:()=>uye,_shadersPolylineMaterialAppearanceVS:()=>OEe,_shadersPolylineOutlineMaterial:()=>cye,_shadersPolylineShadowVolumeFS:()=>REe,_shadersPolylineShadowVolumeMorphFS:()=>LEe,_shadersPolylineShadowVolumeMorphVS:()=>FEe,_shadersPolylineShadowVolumeVS:()=>NEe,_shadersPolylineVS:()=>LIe,_shadersPostProcessRain:()=>Est,_shadersPostProcessSnow:()=>Ist,_shadersPrimitiveOutlineStageFS:()=>j1e,_shadersPrimitiveOutlineStageVS:()=>W1e,_shadersRGBToHSB:()=>Pve,_shadersRGBToHSL:()=>Rve,_shadersRGBToXYZ:()=>Lve,_shadersReinhardTonemapping:()=>qQe,_shadersReprojectWebMercatorFS:()=>gbe,_shadersReprojectWebMercatorVS:()=>pbe,_shadersRimLightingMaterial:()=>Aye,_shadersSelectedFeatureIdStageCommon:()=>Dte,_shadersShadowVolumeAppearanceFS:()=>fre,_shadersShadowVolumeAppearanceVS:()=>KEe,_shadersShadowVolumeFS:()=>Z7,_shadersSilhouette:()=>XQe,_shadersSkinningStageVS:()=>$1e,_shadersSkyAtmosphereCommon:()=>iie,_shadersSkyAtmosphereFS:()=>bSe,_shadersSkyAtmosphereVS:()=>QSe,_shadersSkyBoxFS:()=>DSe,_shadersSkyBoxVS:()=>TSe,_shadersSlopeRampMaterial:()=>hye,_shadersStripeMaterial:()=>dye,_shadersSunFS:()=>MSe,_shadersSunShaft:()=>_st,_shadersSunShaftHdr:()=>Bst,_shadersSunShaftModulate:()=>eSe,_shadersSunTextureFS:()=>jot,_shadersSunTextureFS_v2:()=>RSe,_shadersSunVS:()=>PSe,_shadersSunVisibleFS:()=>iSe,_shadersSunVisibleShaft:()=>rSe,_shadersSunVisibleVS:()=>t1e,_shadersTexturedMaterialAppearanceFS:()=>TIe,_shadersTexturedMaterialAppearanceVS:()=>MIe,_shadersVector3DTileClampedPolylinesFS:()=>Owe,_shadersVector3DTileClampedPolylinesVS:()=>kwe,_shadersVector3DTilePolylinesVS:()=>Nwe,_shadersVectorTileVS:()=>Mte,_shadersViewportQuadFS:()=>fDe,_shadersViewportQuadVS:()=>_oe,_shadersWater:()=>fye,_shadersXYZToRGB:()=>nEe,_shadersacesTonemapping:()=>Dxe,_shadersalphaWeight:()=>Txe,_shadersantialias:()=>Mxe,_shadersapproximateSphericalCoordinates:()=>Pxe,_shadersbackFacing:()=>Rxe,_shadersbranchFreeTernary:()=>Lxe,_shaderscascadeColor:()=>Fxe,_shaderscascadeDistance:()=>Nxe,_shaderscascadeMatrix:()=>kxe,_shaderscascadeWeights:()=>Oxe,_shaderscolumbusViewMorph:()=>Uxe,_shaderscomputePosition:()=>Gxe,_shaderscosineAndSine:()=>Hxe,_shadersdecompressTextureCoordinates:()=>Vxe,_shadersdefaultPbrMaterial:()=>zxe,_shadersdegreesPerRadian:()=>kye,_shadersdepthClamp:()=>Kxe,_shadersdepthRange:()=>Oye,_shadersdepthRangeStruct:()=>vxe,_shaderseastNorthUpToEyeCoordinates:()=>Yxe,_shadersellipsoidContainsPoint:()=>Jxe,_shadersellipsoidWgs84TextureCoordinates:()=>Wxe,_shadersepsilon1:()=>Uye,_shadersepsilon2:()=>Gye,_shadersepsilon3:()=>Hye,_shadersepsilon4:()=>Vye,_shadersepsilon5:()=>zye,_shadersepsilon6:()=>Kye,_shadersepsilon7:()=>Yye,_shadersequalsEpsilon:()=>jxe,_shaderseyeOffset:()=>qxe,_shaderseyeToWindowCoordinates:()=>Xxe,_shadersfastApproximateAtan:()=>Zxe,_shadersfog:()=>$xe,_shadersgammaCorrect:()=>eve,_shadersgeodeticSurfaceNormal:()=>tve,_shadersgetDefaultMaterial:()=>ive,_shadersgetLambertDiffuse:()=>rve,_shadersgetSpecular:()=>nve,_shadersgetWaterNoise:()=>ove,_shadershue:()=>lve,_shadersinfinity:()=>Jye,_shadersinverseGamma:()=>uve,_shadersisEmpty:()=>cve,_shadersisFull:()=>Ave,_shaderslatitudeToWebMercatorFraction:()=>hve,_shaderslineDistance:()=>fve,_shaderslinearToSrgb:()=>dve,_shadersluminance:()=>gve,_shadersmaterial:()=>Exe,_shadersmaterialInput:()=>Ixe,_shadersmetersPerPixel:()=>pve,_shadersmodelMaterial:()=>_xe,_shadersmodelToWindowCoordinates:()=>mve,_shadersmodelVertexOutput:()=>Bxe,_shadersmultiplyWithColorBalance:()=>Cve,_shadersnearFarScalar:()=>yve,_shadersoctDecode:()=>xve,_shadersoneOverPi:()=>Wye,_shadersoneOverTwoPi:()=>jye,_shaderspackDepth:()=>vve,_shaderspassCesium3DTile:()=>qye,_shaderspassCesium3DTileClassification:()=>Xye,_shaderspassCesium3DTileClassificationIgnoreShow:()=>Zye,_shaderspassClassification:()=>$ye,_shaderspassCompute:()=>exe,_shaderspassEnvironment:()=>txe,_shaderspassGlobe:()=>ixe,_shaderspassOpaque:()=>rxe,_shaderspassOverlay:()=>nxe,_shaderspassTerrainClassification:()=>oxe,_shaderspassTranslucent:()=>axe,_shaderspbrLighting:()=>Eve,_shaderspbrMetallicRoughnessMaterial:()=>Ive,_shaderspbrParameters:()=>wxe,_shaderspbrSpecularGlossinessMaterial:()=>_ve,_shadersphong:()=>Bve,_shaderspi:()=>sxe,_shaderspiOverFour:()=>lxe,_shaderspiOverSix:()=>uxe,_shaderspiOverThree:()=>cxe,_shaderspiOverTwo:()=>Axe,_shadersplaneDistance:()=>wve,_shaderspointAlongRay:()=>bve,_shadersradiansPerDegree:()=>hxe,_shadersray:()=>bxe,_shadersrayEllipsoidIntersectionInterval:()=>Qve,_shadersraySegment:()=>Qxe,_shadersraySphereIntersectionInterval:()=>Sve,_shadersreadDepth:()=>Dve,_shadersreadNonPerspective:()=>Tve,_shadersreverseLogDepth:()=>Mve,_shadersround:()=>Fve,_shaderssampleOctahedralProjection:()=>Nve,_shaderssaturation:()=>kve,_shaderssceneMode2D:()=>dxe,_shaderssceneMode3D:()=>fxe,_shaderssceneModeColumbusView:()=>gxe,_shaderssceneModeMorphing:()=>pxe,_shadersshadowDepthCompare:()=>Ove,_shadersshadowParameters:()=>Sxe,_shadersshadowVisibility:()=>Uve,_shaderssignNotZero:()=>Gve,_shaderssolarRadius:()=>mxe,_shaderssphericalHarmonics:()=>Hve,_shaderssrgbToLinear:()=>Vve,_shaderstangentToEyeSpaceMatrix:()=>zve,_shadersthreePiOver2:()=>Cxe,_shaderstransformPlane:()=>Kve,_shaderstranslateRelativeToEye:()=>Yve,_shaderstranslucentPhong:()=>Jve,_shaderstranspose:()=>Wve,_shaderstwoPi:()=>yxe,_shadersunpackDepth:()=>jve,_shadersunpackFloat:()=>qve,_shadersunpackUint:()=>Xve,_shadersvalueTransform:()=>Zve,_shadersvertexLogDepth:()=>$ve,_shaderswebMercatorMaxLatitude:()=>xxe,_shaderswindowToEyeCoordinates:()=>eEe,_shaderswriteDepthClamp:()=>tEe,_shaderswriteLogDepth:()=>iEe,_shaderswriteNonPerspective:()=>rEe,addBuffer:()=>uBe,addDefaults:()=>tBe,addExtensionsRequired:()=>aBe,addExtensionsUsed:()=>iO,addPipelineExtras:()=>eJ,addToArray:()=>H_,appendForwardSlash:()=>GCe,arrayRemoveDuplicates:()=>fC,barycentricCoordinates:()=>dre,binarySearch:()=>hC,buildDrawCommand:()=>r1e,buildModuleUrl:()=>xs,clone:()=>xo,combine:()=>ia,computeFlyToLocationForRectangle:()=>BJ,createBillboardPointCallback:()=>Gne,createBlurStage:()=>yie,createCommand:()=>Hl,createDefaultImageryProviderViewModels:()=>Lbe,createDefaultTerrainProviderViewModels:()=>kbe,createEdgeStage:()=>fH,createElevationBandMaterial:()=>Fst,createFragmentFromTemplate:()=>RDe,createGuid:()=>Vu,createMaterialPropertyDescriptor:()=>hy,createOsmBuildings:()=>Nst,createPropertyDescriptor:()=>Bi,createRawPropertyDescriptor:()=>M_,createTangentSpaceDebugPrimitive:()=>kst,createTaskProcessorWorker:()=>Qlt,createUniform:()=>Rye,createUniformArray:()=>Fye,createWorldImagery:()=>Xk,createWorldTerrain:()=>Nbe,crypto_js:()=>nD,decodeGoogleEarthEnterpriseData:()=>$De,decodeVectorPolylinePositions:()=>Gwe,defaultValue:()=>Ae,defer:()=>rA,defined:()=>O,deprecationWarning:()=>$D,destroyObject:()=>Qr,echarts:()=>Nb,exportKml:()=>hat,findAccessorMinMax:()=>tJ,findContentMetadata:()=>Jne,findGroupMetadata:()=>Wne,findTileMetadata:()=>qwe,forEachTextureInMaterial:()=>Cne,formatError:()=>D5,fragment:()=>qet,freezeRenderState:()=>MKe,getAbsoluteUri:()=>iY,getAccessorByteStride:()=>uN,getBaseUri:()=>VCe,getBinaryAccessor:()=>vM,getClipAndStyleCode:()=>Cbe,getClippingFunction:()=>ioe,getComponentReader:()=>KY,getElement:()=>iA,getExtensionFromUri:()=>Nie,getFilenameFromUri:()=>wY,getImageFromTypedArray:()=>_Ee,getImagePixels:()=>i5,getJsonFromTypedArray:()=>Bx,getMagic:()=>Q6,getStringFromTypedArray:()=>d2,getTimestamp:()=>GA,hasExtension:()=>Qg,heightReferenceOnEntityPropertyChanged:()=>UY,isBitSet:()=>q_,isBlobUri:()=>kie,isCrossOriginUrl:()=>Oie,isDataUri:()=>rY,isLeapYear:()=>n8,jsencrypt:()=>PDe,knockout:()=>gr,knockout_3_5_1:()=>EP,knockout_es5:()=>vbe,libgif:()=>JIe,licensechack:()=>Bat,loadAndExecuteScript:()=>Uie,loadCRN:()=>ist,loadCubeMap:()=>SSe,loadDDS:()=>zie,loadImageFromTypedArray:()=>fne,loadKTX2:()=>XF,loadView:()=>fae,mapbox_gl:()=>$Ie,mergeSort:()=>NJ,modernizeShader:()=>Nye,moveTechniqueRenderStates:()=>oBe,moveTechniquesToExtension:()=>sBe,numberOfComponentsForType:()=>eO,objectToQuery:()=>Gie,oneTimeWarning:()=>ua,packer:()=>QEe,parseBatchTable:()=>AJ,parseBoundingVolumeSemantics:()=>Pwe,parseDefines:()=>YDe,parseFeatureMetadataLegacy:()=>$_e,parseGlb:()=>rBe,parseResponseHeaders:()=>zCe,parseStructuralMetadata:()=>Z_e,pointInsideTriangle:()=>cst,preprocess3DTileContent:()=>jne,purify:()=>Eat,queryToObject:()=>xD,rasterizeHTML_allinone:()=>lDe,readAccessorPacked:()=>cBe,removeExtension:()=>SK,removeExtensionsRequired:()=>iBe,removeExtensionsUsed:()=>mne,removePipelineExtras:()=>nBe,removeUnusedElements:()=>lBe,remove_primitive:()=>jK,resizeImageToNextPowerOfTwo:()=>q7,sampleTerrain:()=>gJ,sampleTerrainMostDetailed:()=>vQ,scaleToGeodeticSurface:()=>Yie,subdivideArray:()=>UEe,subscribeAndEvaluate:()=>WE,svgCompassGyro:()=>UDe,svgCompassOuterRing:()=>ODe,svgCompassRotationMarker:()=>GDe,svgReset:()=>FDe,turf:()=>Zl,updateAccessorComponentTypes:()=>ABe,updateVersion:()=>hBe,usesExtension:()=>_p,vertex:()=>jet,viewerCesium3DTilesInspectorMixin:()=>ylt,viewerCesiumInspectorMixin:()=>xlt,viewerCesiumNavigationMixin:()=>Dat,viewerDragDropMixin:()=>vlt,viewerPerformanceWatchdogMixin:()=>Elt,webGLConstantToGlslType:()=>xst,wrapFunction:()=>r2e,writeTextToCanvas:()=>N5});var rBt=Object.create,S7e=Object.defineProperty,nBt=Object.getOwnPropertyDescriptor,oBt=Object.getOwnPropertyNames,aBt=Object.getPrototypeOf,sBt=Object.prototype.hasOwnProperty,sM=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(A,f)=>(typeof require<"u"?require:A)[f]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+o+'" is not supported')}),vh=(o,A)=>()=>(A||o((A={exports:{}}).exports,A),A.exports),lBt=(o,A,f,m)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of oBt(A))!sBt.call(o,C)&&C!==f&&S7e(o,C,{get:()=>A[C],enumerable:!(m=nBt(A,C))||m.enumerable});return o},Eh=(o,A,f)=>(f=o!=null?rBt(aBt(o)):{},lBt(A||!o||!o.__esModule?S7e(f,"default",{value:o,enumerable:!0}):f,o)),NCe=vh((o,A)=>{var f=function(m){m==null&&(m=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,m.constructor==Array?this.init_by_array(m,m.length):this.init_seed(m)};f.prototype.init_seed=function(m){for(this.mt[0]=m>>>0,this.mti=1;this.mti<this.N;this.mti++){var m=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((m&4294901760)>>>16)*1812433253<<16)+(m&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}},f.prototype.init_by_array=function(m,C){var y,x,v;for(this.init_seed(19650218),y=1,x=0,v=this.N>C?this.N:C;v;v--){var E=this.mt[y-1]^this.mt[y-1]>>>30;this.mt[y]=(this.mt[y]^(((E&4294901760)>>>16)*1664525<<16)+(E&65535)*1664525)+m[x]+x,this.mt[y]>>>=0,y++,x++,y>=this.N&&(this.mt[0]=this.mt[this.N-1],y=1),x>=C&&(x=0)}for(v=this.N-1;v;v--){var E=this.mt[y-1]^this.mt[y-1]>>>30;this.mt[y]=(this.mt[y]^(((E&4294901760)>>>16)*1566083941<<16)+(E&65535)*1566083941)-y,this.mt[y]>>>=0,y++,y>=this.N&&(this.mt[0]=this.mt[this.N-1],y=1)}this.mt[0]=2147483648},f.prototype.random_int=function(){var m,C=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var y;for(this.mti==this.N+1&&this.init_seed(5489),y=0;y<this.N-this.M;y++)m=this.mt[y]&this.UPPER_MASK|this.mt[y+1]&this.LOWER_MASK,this.mt[y]=this.mt[y+this.M]^m>>>1^C[m&1];for(;y<this.N-1;y++)m=this.mt[y]&this.UPPER_MASK|this.mt[y+1]&this.LOWER_MASK,this.mt[y]=this.mt[y+(this.M-this.N)]^m>>>1^C[m&1];m=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^m>>>1^C[m&1],this.mti=0}return m=this.mt[this.mti++],m^=m>>>11,m^=m<<7&2636928640,m^=m<<15&4022730752,m^=m>>>18,m>>>0},f.prototype.random_int31=function(){return this.random_int()>>>1},f.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},f.prototype.random=function(){return this.random_int()*(1/4294967296)},f.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},f.prototype.random_long=function(){var m=this.random_int()>>>5,C=this.random_int()>>>6;return(m*67108864+C)*(1/9007199254740992)},A.exports=f}),uBt=vh((o,A)=>{/*! https://mths.be/punycode v1.4.0 by @mathias */(function(f){var m=typeof o=="object"&&o&&!o.nodeType&&o,C=typeof A=="object"&&A&&!A.nodeType&&A,y=typeof global=="object"&&global;(y.global===y||y.window===y||y.self===y)&&(f=y);var x,v=2147483647,E=36,I=1,w=26,Q=38,M=700,B=72,T=128,D="-",F=/^xn--/,L=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},U=E-I,V=Math.floor,H=String.fromCharCode,q;function ie(Ie){throw new RangeError(k[Ie])}function Z(Ie,ve){for(var K=Ie.length,W=[];K--;)W[K]=ve(Ie[K]);return W}function oe(Ie,ve){var K=Ie.split("@"),W="";K.length>1&&(W=K[0]+"@",Ie=K[1]),Ie=Ie.replace(R,".");var te=Ie.split("."),Y=Z(te,ve).join(".");return W+Y}function ne(Ie){for(var ve=[],K=0,W=Ie.length,te,Y;K<W;)te=Ie.charCodeAt(K++),te>=55296&&te<=56319&&K<W?(Y=Ie.charCodeAt(K++),(Y&64512)==56320?ve.push(((te&1023)<<10)+(Y&1023)+65536):(ve.push(te),K--)):ve.push(te);return ve}function se(Ie){return Z(Ie,function(ve){var K="";return ve>65535&&(ve-=65536,K+=H(ve>>>10&1023|55296),ve=56320|ve&1023),K+=H(ve),K}).join("")}function ce(Ie){return Ie-48<10?Ie-22:Ie-65<26?Ie-65:Ie-97<26?Ie-97:E}function j(Ie,ve){return Ie+22+75*(Ie<26)-((ve!=0)<<5)}function de(Ie,ve,K){var W=0;for(Ie=K?V(Ie/M):Ie>>1,Ie+=V(Ie/ve);Ie>U*w>>1;W+=E)Ie=V(Ie/U);return V(W+(U+1)*Ie/(Ie+Q))}function me(Ie){var ve=[],K=Ie.length,W,te=0,Y=T,he=B,fe,Ce,Ee,be,Re,Ne,Je,ot,nt;for(fe=Ie.lastIndexOf(D),fe<0&&(fe=0),Ce=0;Ce<fe;++Ce)Ie.charCodeAt(Ce)>=128&&ie("not-basic"),ve.push(Ie.charCodeAt(Ce));for(Ee=fe>0?fe+1:0;Ee<K;){for(be=te,Re=1,Ne=E;Ee>=K&&ie("invalid-input"),Je=ce(Ie.charCodeAt(Ee++)),(Je>=E||Je>V((v-te)/Re))&&ie("overflow"),te+=Je*Re,ot=Ne<=he?I:Ne>=he+w?w:Ne-he,!(Je<ot);Ne+=E)nt=E-ot,Re>V(v/nt)&&ie("overflow"),Re*=nt;W=ve.length+1,he=de(te-be,W,be==0),V(te/W)>v-Y&&ie("overflow"),Y+=V(te/W),te%=W,ve.splice(te++,0,Y)}return se(ve)}function _e(Ie){var ve,K,W,te,Y,he,fe,Ce,Ee,be,Re,Ne=[],Je,ot,nt,$e;for(Ie=ne(Ie),Je=Ie.length,ve=T,K=0,Y=B,he=0;he<Je;++he)Re=Ie[he],Re<128&&Ne.push(H(Re));for(W=te=Ne.length,te&&Ne.push(D);W<Je;){for(fe=v,he=0;he<Je;++he)Re=Ie[he],Re>=ve&&Re<fe&&(fe=Re);for(ot=W+1,fe-ve>V((v-K)/ot)&&ie("overflow"),K+=(fe-ve)*ot,ve=fe,he=0;he<Je;++he)if(Re=Ie[he],Re<ve&&++K>v&&ie("overflow"),Re==ve){for(Ce=K,Ee=E;be=Ee<=Y?I:Ee>=Y+w?w:Ee-Y,!(Ce<be);Ee+=E)$e=Ce-be,nt=E-be,Ne.push(H(j(be+$e%nt,0))),Ce=V($e/nt);Ne.push(H(j(Ce,0))),Y=de(K,ot,W==te),K=0,++W}++K,++ve}return Ne.join("")}function Be(Ie){return oe(Ie,function(ve){return F.test(ve)?me(ve.slice(4).toLowerCase()):ve})}function Qe(Ie){return oe(Ie,function(ve){return L.test(ve)?"xn--"+_e(ve):ve})}if(x={version:"1.3.2",ucs2:{decode:ne,encode:se},decode:me,encode:_e,toASCII:Qe,toUnicode:Be},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return x});else if(m&&C)if(A.exports==m)C.exports=x;else for(q in x)x.hasOwnProperty(q)&&(m[q]=x[q]);else f.punycode=x})(o)}),cBt=vh((o,A)=>{/*!
* URI.js - Mutating URLs
* IPv6 Support
*
@@ -10030,7 +10030,7 @@
        nightBlend        );
`,Z&&(ot+=`        color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);
`);ot+=`        return color;
    }`,Je.sources.push(ot),Ne.sources.push(Hgi(fe)),Ne.sources.push(Vgi(U));let nt=_s.fromCache({context:A.context,vertexShaderSource:Ne,fragmentShaderSource:Je,attributeLocations:K.getAttributeLocations()});be=Re[Ce]=new Ggi(m,Ce,this.material,nt,Ee,_e)}return f.surfaceShader=be,be.shaderProgram};Gbe.prototype.destroy=function(){let o,A,f=this._shadersByTexturesFlags;for(let m in f)if(f.hasOwnProperty(m)){let C=f[m];if(!O(C))continue;for(o in C)C.hasOwnProperty(o)&&(A=C[o],O(A)&&A.shaderProgram.destroy())}return Qr(this)};var Hbe=Gbe,zgi={START:0,LOADING:1,DONE:2,FAILED:3},mC=Object.freeze(zgi),Kgi={FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6},xh=Object.freeze(Kgi);function pA(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new ai(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new ee,this.boundingVolumeSourceTile=void 0,this.boundingVolumeIsFromMesh=!1,this.terrainState=xh.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new wi,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1,this.contourLineTexture=void 0,this.contourLineTranslationAndScale=new ai(0,0,1,1)}Object.defineProperties(pA.prototype,{eligibleForUnloading:{get:function(){let o=this.terrainState,A=!(o===xh.RECEIVING||o===xh.TRANSFORMING),f=this.imagery;for(let m=0,C=f.length;A&&m<C;++m){let y=f[m];A=!O(y.loadingImagery)||y.loadingImagery.state!==sc.TRANSITIONING}return A}},renderedMesh:{get:function(){if(O(this.vertexArray))return this.mesh;if(O(this.fill))return this.fill.mesh}}});var Ygi=new Kt;function sD(o,A,f,m,C,y){let x=o.getExaggeratedPosition(m,C,y);if(O(A)&&A!==xi.SCENE3D){let v=f.ellipsoid.cartesianToCartographic(x,Ygi);x=f.project(v,y),x=ee.fromElements(x.z,x.x,x.y,y)}return x}var Yte=new ee,sCe=new ee,lCe=new ee;pA.prototype.pick=function(o,A,f,m,C){let y=this.renderedMesh;if(!O(y))return;let x=y.vertices,v=y.indices,E=y.encoding,I=v.length,w=Number.MAX_VALUE;for(let Q=0;Q<I;Q+=3){let M=v[Q],B=v[Q+1],T=v[Q+2],D=sD(E,A,f,x,M,Yte),F=sD(E,A,f,x,B,sCe),L=sD(E,A,f,x,T,lCe),R=kA.rayTriangleParametric(o,D,F,L,m);O(R)&&R<w&&R>=0&&(w=R)}return w!==Number.MAX_VALUE?ls.getPoint(o,w,C):void 0};pA.prototype.pickTriangle=function(o,A,f,m,C){let y=this.renderedMesh;if(!O(y))return;let x=y.vertices,v=y.indices,E=y.encoding,I=v.length,w=Number.MAX_VALUE,Q=-1;for(let M=0;M<I;M+=3){let B=v[M],T=v[M+1],D=v[M+2],F=sD(E,A,f,x,B,Yte),L=sD(E,A,f,x,T,sCe),R=sD(E,A,f,x,D,lCe),k=kA.rayTriangleParametric(o,F,L,R,m);O(k)&&k<w&&k>=0&&(Q=M,w=k)}if(w!==Number.MAX_VALUE){let M=v[Q],B=v[Q+1],T=v[Q+2],D=sD(E,A,f,x,M,Yte),F=sD(E,A,f,x,B,sCe),L=sD(E,A,f,x,T,lCe);return C=[D,F,L],C}};pA.prototype.findNextSegment=function(o,A,f,m,C){for(let y=0;y<A.length;y++){let x=A[y];if(o[m].start===x[C].start&&o[m].end===x[C].end||o[m].start===x[C].end&&o[m].end===x[C].start){A.splice(y,1),f.push(x),this.findNextSegment(x,A,f,0,1),this.findNextSegment(x,A,f,0,1),this.findNextSegment(x,A,f,1,0),this.findNextSegment(x,A,f,1,1);break}}};pA.prototype.contourLineTopy=function(o){for(let A=0;A<o.length;A++){let f=o[A],m=f.positions,C=f.polylines;for(;m.length>0;){let y=[],x=m.shift();y.push(x),this.findNextSegment(x,m,y,0,1),this.findNextSegment(x,m,y,0,1),this.findNextSegment(x,m,y,1,0),this.findNextSegment(x,m,y,1,1),C.push(y)}}};function Jgi(o,A,f){let m=new It(A.x-o.x,A.y-o.y);It.normalize(m,m);let C=new It((A.x+o.x)*.5,(A.y+o.y)*.5),y=new It(f.x-C.x,f.y-C.y);It.normalize(y,y);let x=new It(-m.y,m.x),v=It.angleBetween(x,y);v>je.PI_OVER_TWO&&(x=new It(m.y,-m.x));let E=new It(0,1);return v=It.angleBetween(x,E),It.cross(E,x)<0&&(v=-v),v}pA.prototype.createContourLineTexture=function(o,A,f){let m=document.createElement("canvas");m.width=256,m.height=256;let C=m.getContext("2d");for(let v=0;v<o.length;v++){let E=o[v],I=E.halfScale,w=E.polylines,Q=E.elevation,M=E.font,B=E.fontColor,T=E.fontSize,D=0;for(;D<w.length;D++){let F=w[D];for(let L=0;L<F.length;L++){let R=F[L],k=R[0].insertPosition,U=R[1].insertPosition,V=R[0].maxVv,H=(k.x+I.x)/I.x/2*256,q=(k.y+I.y)/I.y/2*256,ie=(U.x+I.x)/I.x/2*256,Z=(U.y+I.y)/I.y/2*256,oe=(H+ie)*.5,ne=(q+Z)*.5,se=(V.x+I.x)/I.x/2*256,ce=(V.y+I.y)/I.y/2*256;if(100<oe&&oe<256-100&&100<ne&&ne<256-100){C.fillStyle=B,C.font=`${T-f*.25}px ${M}`,C.textAlign="center",C.translate(oe,ne);let j=Jgi(new It(H,q),new It(ie,Z),new It(se,ce));C.rotate(j),C.scale(1,-1),C.fillText(`${Q}`,0,0),D=w.length;break}}}}let y=new Qs({wrapS:Va.CLAMP_TO_EDGE,wrapT:Va.CLAMP_TO_EDGE,minificationFilter:as.LINEAR,magnificationFilter:th.LINEAR,maximumAnisotropy:1}),x=mo.create({context:A.context,pixelFormat:Gn.RGBA,pixelDatatype:wn.UNSIGNED_BYTE,source:m,sampler:y,flipY:!1});x.referenceCount=0,++x.referenceCount,this.contourLineTexture=x};var fVe=new ee,gVe=new ee,pVe=new ee;pA.prototype.drawContourLine=function(o,A,f,m,C){if(A.length===0){O(this.contourLineTexture)&&(--this.contourLineTexture.referenceCount,this.contourLineTexture.referenceCount===0&&this.contourLineTexture.destroy(),this.contourLineTexture=void 0);return}if(A[0].minShowLevel>o.level)return;let y=this.mesh;if(!O(y)||O(this.contourLineTexture))return;let x=[],v=new ee,E=y.orientedBoundingBox.halfAxes;ci.getScale(E,v);let I=y.vertices,w=y.indices,Q=y.encoding,M=y.indexCountWithoutSkirts,B=y.minimumHeight,T=y.maximumHeight,D=o.tilingScheme.ellipsoid,F=D.cartesianToCartographic(y.center,new ee);(F.height<B||F.height>T)&&console.log(`${o.x}-${o.y}-${o.level}----:${F.height}, ${B}, ${T}`),console.log(`${o.x}-${o.y}-${o.level}:${I.length}, ${w.length}, ${M}`),F.height=0;let L=D.cartographicToCartesian(F,new ee),R=Vn.eastNorthUpToFixedFrame(L,D),k=Xe.inverseTransformation(R,new Xe),U=new Array(M);for(let V=0;V<M;V++){let H=w[V];if(!U[H]){let q=sD(Q,f,m,I,H,Yte),ie=Xe.multiplyByPoint(k,q,new ee);U[H]=ie}}o.y===window.ddd.y&&o.x===window.ddd.y&&o.level===window.ddd.level&&console.log(`----sdf----${M}`);for(let V=0;V<A.length;V++){let H=A[V],q=H.plane,ie={halfScale:v,planeIndex:V,positions:[],polylines:[],elevation:q.distance,font:H.font,fontSize:H.fontSize,fontColor:H.fontColor};for(let Z=0;Z<M;Z+=3){let oe=w[Z],ne=w[Z+1],se=w[Z+2],ce=0,j=[],de=U[oe],me=U[ne],_e=U[se],Be=de.z>me.z?de.z>_e.z?de:_e:me.z>_e.z?me:_e,Qe=new ee;if(Be.clone(Qe),kA.lineSegmentPlane(de,me,q,fVe)){let Ie=new ee;fVe.clone(Ie),j.push({insertPosition:Ie,start:oe,end:ne,maxVv:Qe}),ce++}if(kA.lineSegmentPlane(me,_e,q,gVe)){let Ie=new ee;gVe.clone(Ie),j.push({insertPosition:Ie,start:ne,end:se,maxVv:Qe}),ce++}if(kA.lineSegmentPlane(_e,de,q,pVe)){let Ie=new ee;pVe.clone(Ie),j.push({insertPosition:Ie,start:se,end:oe,maxVv:Qe}),ce++}ce===2&&ie.positions.push(j)}x.push(ie)}this.contourLineTopy(x),this.createContourLineTexture(x,C,o.level)};pA.prototype.freeResources=function(){O(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),O(this.contourLineTexture)&&(--this.contourLineTexture.referenceCount,this.contourLineTexture.referenceCount===0&&this.contourLineTexture.destroy(),this.contourLineTexture=void 0),this.terrainData=void 0,this.terrainState=xh.UNLOADED,this.mesh=void 0,this.fill=this.fill&&this.fill.destroy();let o=this.imagery;for(let A=0,f=o.length;A<f;++A)o[A].freeResources();this.imagery.length=0,this.freeVertexArray()};pA.prototype.freeVertexArray=function(){pA._freeVertexArray(this.vertexArray),this.vertexArray=void 0,pA._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0};pA.initialize=function(o,A,f){let m=o.data;O(m)||(m=o.data=new pA),o.state===mC.START&&(Wgi(o,A,f),o.state=mC.LOADING)};pA.processStateMachine=function(o,A,f,m,C,y,x){pA.initialize(o,f,m);let v=o.data;if(o.state===mC.LOADING&&jgi(o,A,f,m,C,y),x)return;let E=o.renderable;o.renderable=O(v.vertexArray);let I=v.terrainState===xh.READY;o.upsampledFromParent=O(v.terrainData)&&v.terrainData.wasCreatedByUpsampling();let w=v.processImagery(o,f,A);if(I&&w){let Q=o._loadedCallbacks,M={};for(let B in Q)Q.hasOwnProperty(B)&&(Q[B](o)||(M[B]=Q[B]));o._loadedCallbacks=M,o.state=mC.DONE}E&&(o.renderable=!0)};pA.prototype.processImagery=function(o,A,f,m){let C=o.data,y=o.upsampledFromParent,x=!1,v=!0,E=C.imagery,I,w;for(I=0,w=E.length;I<w;++I){let Q=E[I];if(!O(Q.loadingImagery)){y=!1;continue}if(Q.loadingImagery.state===sc.PLACEHOLDER){let B=Q.loadingImagery.imageryLayer;if(B.imageryProvider.ready){Q.freeResources(),E.splice(I,1),B._createTileImagerySkeletons(o,A,I),--I,w=E.length;continue}else y=!1}let M=Q.processStateMachine(o,f,m);v=v&&M,x=x||M||O(Q.readyImagery),y=y&&O(Q.loadingImagery)&&(Q.loadingImagery.state===sc.FAILED||Q.loadingImagery.state===sc.INVALID)}return o.upsampledFromParent=y,o.renderable=o.renderable&&(x||v),v};function wrt(o,A,f,m){let C=o.renderedMesh,y=C.vertices,x=C.encoding,v=y.length/x.stride,E=HM.clone(x);E.hasGeodeticSurfaceNormals=A,E=HM.clone(E);let I=E.stride,w=new Float32Array(v*I);A?x.addGeodeticSurfaceNormals(y,w,f):x.removeGeodeticSurfaceNormals(y,w),C.vertices=w,C.stride=I,C!==o.mesh?(pA._freeVertexArray(o.fill.vertexArray),o.fill.vertexArray=pA._createVertexArrayForMesh(m.context,C)):(pA._freeVertexArray(o.vertexArray),o.vertexArray=pA._createVertexArrayForMesh(m.context,C)),pA._freeVertexArray(o.wireframeVertexArray),o.wireframeVertexArray=void 0}pA.prototype.addGeodeticSurfaceNormals=function(o,A){wrt(this,!0,o,A)};pA.prototype.removeGeodeticSurfaceNormals=function(o){wrt(this,!1,void 0,o)};pA.prototype.updateExaggeration=function(o,A,f){let m=this,C=m.renderedMesh;if(C===void 0)return;let y=A.terrainExaggeration,x=A.terrainExaggerationRelativeHeight,v=y!==1,E=C.encoding,I=E.exaggeration!==y,w=E.exaggerationRelativeHeight!==x;if(I||w){if(I)if(v&&!E.hasGeodeticSurfaceNormals){let Q=o.tilingScheme.ellipsoid;m.addGeodeticSurfaceNormals(Q,A)}else!v&&E.hasGeodeticSurfaceNormals&&m.removeGeodeticSurfaceNormals(A);if(E.exaggeration=y,E.exaggerationRelativeHeight=x,f!==void 0){f._tileToUpdateHeights.push(o);let Q=o.customData,M=Q.length;for(let B=0;B<M;B++){let T=Q[B];T.level=-1}}}};function Wgi(o,A,f){let m=A.getTileDataAvailable(o.x,o.y,o.level);if(!O(m)&&O(o.parent)){let C=o.parent,y=C.data;O(y)&&O(y.terrainData)&&(m=y.terrainData.isChildAvailable(C.x,C.y,o.x,o.y))}m===!1&&(o.data.terrainState=xh.FAILED);for(let C=0,y=f.length;C<y;++C){let x=f.get(C);x.show&&x._createTileImagerySkeletons(o,A)}}function jgi(o,A,f,m,C,y){let x=o.data,v=o.parent;if(x.terrainState===xh.FAILED&&v!==void 0&&(v.data!==void 0&&v.data.terrainData!==void 0&&v.data.terrainData.canUpsample!==!1||pA.processStateMachine(v,A,f,m,C,y,!0)),x.terrainState===xh.FAILED&&qgi(x,o,A,f,o.x,o.y,o.level),x.terrainState===xh.UNLOADED&&Xgi(x,f,o.x,o.y,o.level),x.terrainState===xh.RECEIVED&&$gi(x,A,f,o.x,o.y,o.level),x.terrainState===xh.TRANSFORMED&&(e0i(x,A.context,f,o.x,o.y,o.level,y),x.updateExaggeration(o,A,C)),x.terrainState>=xh.RECEIVED&&x.waterMaskTexture===void 0&&f.hasWaterMask)if(x.terrainData.waterMask!==void 0)i0i(A.context,x);else{let E=x._findAncestorTileWithTerrainData(o);O(E)&&O(E.data.waterMaskTexture)&&(x.waterMaskTexture=E.data.waterMaskTexture,++x.waterMaskTexture.referenceCount,x._computeWaterMaskTranslationAndScale(o,E,x.waterMaskTranslationAndScale))}}function qgi(o,A,f,m,C,y,x){let v=A.parent;if(!v){A.state=mC.FAILED;return}let E=v.data.terrainData,I=v.x,w=v.y,Q=v.level;if(!O(E))return;let M=E.upsample(m.tilingScheme,I,w,Q,C,y,x);!O(M)||(o.terrainState=xh.RECEIVING,Promise.resolve(M).then(function(B){o.terrainData=B,o.terrainState=xh.RECEIVED}).catch(function(){o.terrainState=xh.FAILED}))}function Xgi(o,A,f,m,C){function y(E){o.terrainData=E,o.terrainState=xh.RECEIVED,o.request=void 0}function x(E){if(o.request.state===yA.CANCELLED){o.terrainData=void 0,o.terrainState=xh.UNLOADED,o.request=void 0;return}o.terrainState=xh.FAILED,o.request=void 0;let I=`Failed to obtain terrain tile X: ${f} Y: ${m} Level: ${C}. Error message: "${E}"`;A._requestError=wc.reportError(A._requestError,A,A.errorEvent,I,f,m,C),A._requestError.retry&&v()}function v(){let E=new cC({throttle:!1,throttleByServer:!0,type:oB.TERRAIN});o.request=E;let I=A.requestTileGeometry(f,m,C,E);O(I)?(o.terrainState=xh.RECEIVING,Promise.resolve(I).then(function(w){y(w)}).catch(function(w){x(w)})):(o.terrainState=xh.UNLOADED,o.request=void 0)}v()}var Zgi={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0,throttle:!0};function $gi(o,A,f,m,C,y){let x=f.tilingScheme,v=Zgi;v.tilingScheme=x,v.x=m,v.y=C,v.level=y,v.exaggeration=A.terrainExaggeration,v.exaggerationRelativeHeight=A.terrainExaggerationRelativeHeight,v.throttle=!0;let E=o.terrainData.createMesh(v);!O(E)||(o.terrainState=xh.TRANSFORMING,Promise.resolve(E).then(function(I){o.mesh=I,o.terrainState=xh.TRANSFORMED}).catch(function(){o.terrainState=xh.FAILED}))}pA._createVertexArrayForMesh=function(o,A){let f=A.vertices,m=vo.createVertexBuffer({context:o,typedArray:f,usage:ln.STATIC_DRAW}),C=A.encoding.getAttributes(m),y=A.indices.indexBuffers||{},x=y[o.id];if(!O(x)||x.isDestroyed()){let v=A.indices;x=vo.createIndexBuffer({context:o,typedArray:v,usage:ln.STATIC_DRAW,indexDatatype:Nn.fromSizeInBytes(v.BYTES_PER_ELEMENT)}),x.vertexArrayDestroyable=!1,x.referenceCount=1,y[o.id]=x,A.indices.indexBuffers=y}else++x.referenceCount;return new Vc({context:o,attributes:C,indexBuffer:x})};pA._freeVertexArray=function(o){if(O(o)){let A=o.indexBuffer;o.isDestroyed()||o.destroy(),O(A)&&!A.isDestroyed()&&O(A.referenceCount)&&(--A.referenceCount,A.referenceCount===0&&A.destroy())}};function e0i(o,A,f,m,C,y,x){o.vertexArray=pA._createVertexArrayForMesh(A,o.mesh),o.terrainState=xh.READY,o.fill=o.fill&&o.fill.destroy(x)}function t0i(o){let A=o.cache.tile_waterMaskData;if(!O(A)){let f=mo.create({context:o,pixelFormat:Gn.LUMINANCE,pixelDatatype:wn.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});f.referenceCount=1;let m=new Qs({wrapS:Va.CLAMP_TO_EDGE,wrapT:Va.CLAMP_TO_EDGE,minificationFilter:as.LINEAR,magnificationFilter:th.LINEAR});A={allWaterTexture:f,sampler:m,destroy:function(){this.allWaterTexture.destroy()}},o.cache.tile_waterMaskData=A}return A}function i0i(o,A){let f=A.terrainData.waterMask,m=t0i(o),C,y=f.length;if(y===1)if(f[0]!==0)C=m.allWaterTexture;else return;else{let x=Math.sqrt(y);C=mo.create({context:o,pixelFormat:Gn.LUMINANCE,pixelDatatype:wn.UNSIGNED_BYTE,source:{width:x,height:x,arrayBufferView:f},sampler:m.sampler,flipY:!1}),C.referenceCount=0}++C.referenceCount,A.waterMaskTexture=C,ai.fromElements(0,0,1,1,A.waterMaskTranslationAndScale)}pA.prototype._findAncestorTileWithTerrainData=function(o){let A=o.parent;for(;O(A)&&(!O(A.data)||!O(A.data.terrainData)||A.data.terrainData.wasCreatedByUpsampling());)A=A.parent;return A};pA.prototype._computeWaterMaskTranslationAndScale=function(o,A,f){let m=A.rectangle,C=o.rectangle,y=C.width,x=C.height,v=y/m.width,E=x/m.height;return f.x=v*(C.west-m.west)/y,f.y=E*(C.south-m.south)/x,f.z=v,f.w=E,f};var zM=pA,r0i={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7},Ga=r0i,brt={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(o){return o>=brt.RENDERED_AND_KICKED},originalResult:function(o){return o&3},kick:function(o){return o|4}},sa=brt;function tH(o){this.tile=o,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new ai}tH.prototype.update=function(o,A,f){this.changedThisFrame&&(Qrt(o,A,this.tile,f),this.changedThisFrame=!1)};tH.prototype.destroy=function(o){this._destroyVertexArray(o),O(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};tH.prototype._destroyVertexArray=function(o){O(this.vertexArray)&&(O(o)?o.push(this.vertexArray):zM._freeVertexArray(this.vertexArray),this.vertexArray=void 0)};var n0i=new d5;tH.updateFillTiles=function(o,A,f,m){let C=o._quadtree,y=C._levelZeroTiles,x=C._lastSelectionFrameNumber,v=n0i;v.clear();for(let I=0;I<A.length;++I){let w=A[I];O(w.data.vertexArray)&&v.enqueue(A[I])}let E=v.dequeue();for(;E!==void 0;){let I=E.findTileToWest(y),w=E.findTileToSouth(y),Q=E.findTileToEast(y),M=E.findTileToNorth(y);gp(o,f,E,I,x,Ga.EAST,!1,v,m),gp(o,f,E,w,x,Ga.NORTH,!1,v,m),gp(o,f,E,Q,x,Ga.WEST,!1,v,m),gp(o,f,E,M,x,Ga.SOUTH,!1,v,m);let B=I.findTileToNorth(y),T=I.findTileToSouth(y),D=Q.findTileToNorth(y),F=Q.findTileToSouth(y);gp(o,f,E,B,x,Ga.SOUTHEAST,!1,v,m),gp(o,f,E,D,x,Ga.SOUTHWEST,!1,v,m),gp(o,f,E,T,x,Ga.NORTHEAST,!1,v,m),gp(o,f,E,F,x,Ga.NORTHWEST,!1,v,m),E=v.dequeue()}};function gp(o,A,f,m,C,y,x,v,E){if(m===void 0)return;let I=m;for(;I&&(I._lastSelectionResultFrame!==C||sa.wasKicked(I._lastSelectionResult)||sa.originalResult(I._lastSelectionResult)===sa.CULLED);){if(x)return;let w=I.parent;if(y>=Ga.NORTHWEST&&w!==void 0)switch(y){case Ga.NORTHWEST:I=I===w.northwestChild?w:void 0;break;case Ga.NORTHEAST:I=I===w.northeastChild?w:void 0;break;case Ga.SOUTHWEST:I=I===w.southwestChild?w:void 0;break;case Ga.SOUTHEAST:I=I===w.southeastChild?w:void 0;break}else I=w}if(I!==void 0){if(I._lastSelectionResult===sa.RENDERED){if(O(I.data.vertexArray))return;o0i(o,A,f,I,y,C,v,E);return}if(sa.originalResult(m._lastSelectionResult)!==sa.CULLED)switch(y){case Ga.WEST:gp(o,A,f,m.northwestChild,C,y,!0,v,E),gp(o,A,f,m.southwestChild,C,y,!0,v,E);break;case Ga.EAST:gp(o,A,f,m.southeastChild,C,y,!0,v,E),gp(o,A,f,m.northeastChild,C,y,!0,v,E);break;case Ga.SOUTH:gp(o,A,f,m.southwestChild,C,y,!0,v,E),gp(o,A,f,m.southeastChild,C,y,!0,v,E);break;case Ga.NORTH:gp(o,A,f,m.northeastChild,C,y,!0,v,E),gp(o,A,f,m.northwestChild,C,y,!0,v,E);break;case Ga.NORTHWEST:gp(o,A,f,m.northwestChild,C,y,!0,v,E);break;case Ga.NORTHEAST:gp(o,A,f,m.northeastChild,C,y,!0,v,E);break;case Ga.SOUTHWEST:gp(o,A,f,m.southwestChild,C,y,!0,v,E);break;case Ga.SOUTHEAST:gp(o,A,f,m.southeastChild,C,y,!0,v,E);break;default:throw new Ui("Invalid edge")}}}function o0i(o,A,f,m,C,y,x,v){let E=m.data;if(E.fill===void 0)E.fill=new tH(m);else if(E.fill.visitedFrame===y)return;E.fill.enqueuedFrame!==y&&(E.fill.enqueuedFrame=y,E.fill.changedThisFrame=!1,x.enqueue(m)),a0i(o,A,f,m,C,v)}function a0i(o,A,f,m,C,y){let x=m.data.fill,v,E=f.data.fill;O(E)?(E.visitedFrame=A.frameNumber,E.changedThisFrame&&(Qrt(o,A,f,y),E.changedThisFrame=!1),v=f.data.fill.mesh):v=f.data.mesh;let I,w;switch(C){case Ga.WEST:I=x.westMeshes,w=x.westTiles;break;case Ga.SOUTH:I=x.southMeshes,w=x.southTiles;break;case Ga.EAST:I=x.eastMeshes,w=x.eastTiles;break;case Ga.NORTH:I=x.northMeshes,w=x.northTiles;break;case Ga.NORTHWEST:x.changedThisFrame=x.changedThisFrame||x.northwestMesh!==v,x.northwestMesh=v,x.northwestTile=f;return;case Ga.NORTHEAST:x.changedThisFrame=x.changedThisFrame||x.northeastMesh!==v,x.northeastMesh=v,x.northeastTile=f;return;case Ga.SOUTHWEST:x.changedThisFrame=x.changedThisFrame||x.southwestMesh!==v,x.southwestMesh=v,x.southwestTile=f;return;case Ga.SOUTHEAST:x.changedThisFrame=x.changedThisFrame||x.southeastMesh!==v,x.southeastMesh=v,x.southeastTile=f;return}if(f.level<=m.level){x.changedThisFrame=x.changedThisFrame||I[0]!==v||I.length!==1,I[0]=v,w[0]=f,I.length=1,w.length=1;return}let Q,M,B,T,D=f.rectangle,F,L=m.rectangle;switch(C){case Ga.WEST:for(F=(L.north-L.south)*je.EPSILON5,Q=0;Q<w.length&&(B=w[Q],T=B.rectangle,!je.greaterThan(D.north,T.south,F));++Q);for(M=Q;M<w.length&&(B=w[M],T=B.rectangle,!je.greaterThanOrEquals(D.south,T.north,F));++M);break;case Ga.SOUTH:for(F=(L.east-L.west)*je.EPSILON5,Q=0;Q<w.length&&(B=w[Q],T=B.rectangle,!je.lessThan(D.west,T.east,F));++Q);for(M=Q;M<w.length&&(B=w[M],T=B.rectangle,!je.lessThanOrEquals(D.east,T.west,F));++M);break;case Ga.EAST:for(F=(L.north-L.south)*je.EPSILON5,Q=0;Q<w.length&&(B=w[Q],T=B.rectangle,!je.lessThan(D.south,T.north,F));++Q);for(M=Q;M<w.length&&(B=w[M],T=B.rectangle,!je.lessThanOrEquals(D.north,T.south,F));++M);break;case Ga.NORTH:for(F=(L.east-L.west)*je.EPSILON5,Q=0;Q<w.length&&(B=w[Q],T=B.rectangle,!je.greaterThan(D.east,T.west,F));++Q);for(M=Q;M<w.length&&(B=w[M],T=B.rectangle,!je.greaterThanOrEquals(D.west,T.east,F));++M);break}M-Q===1?(x.changedThisFrame=x.changedThisFrame||I[Q]!==v,I[Q]=v,w[Q]=f):(x.changedThisFrame=!0,I.splice(Q,M-Q,v),w.splice(Q,M-Q,f))}var Fk=new Kt,s0i=new Kt,qG=new ee,Vbe=new ee,uCe=new It,cCe=new It,P_=new It;function foe(){this.height=0,this.encodedNormal=new It}function d$(o,A,f,m,C,y,x,v,E){if(O(C))return C;let I;if(O(y)&&O(x))I=(y.height+x.height)*.5;else if(O(y))I=y.height;else if(O(x))I=x.height;else if(O(v))I=v.height;else{let w=o.tile.data.tileBoundingRegion,Q=0,M=0;O(w)&&(Q=w.minimumHeight,M=w.maximumHeight),I=(Q+M)*.5}return Srt(o,A,f,m,I,E),E}var l0i={minimumHeight:0,maximumHeight:0},u0i=new ee,mVe=new foe,CVe=new foe,yVe=new foe,xVe=new foe,c0i=typeof Uint8Array<"u"?new Uint8Array(9*9):void 0,A0i={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0};function Qrt(o,A,f,m){zM.initialize(f,o.terrainProvider,o._imageryLayers);let C=f.data,y=C.fill,x=f.rectangle,v=A.terrainExaggeration,E=A.terrainExaggerationRelativeHeight,I=v!==1,w=f.tilingScheme.ellipsoid,Q=g$(y,w,0,1,y.northwestTile,y.northwestMesh,y.northTiles,y.northMeshes,y.westTiles,y.westMeshes,yVe),M=g$(y,w,0,0,y.southwestTile,y.southwestMesh,y.westTiles,y.westMeshes,y.southTiles,y.southMeshes,mVe),B=g$(y,w,1,0,y.southeastTile,y.southeastMesh,y.southTiles,y.southMeshes,y.eastTiles,y.eastMeshes,CVe),T=g$(y,w,1,1,y.northeastTile,y.northeastMesh,y.eastTiles,y.eastMeshes,y.northTiles,y.northMeshes,xVe);Q=d$(y,w,0,1,Q,M,T,B,yVe),M=d$(y,w,0,0,M,Q,B,T,mVe),B=d$(y,w,1,1,B,M,T,Q,CVe),T=d$(y,w,1,1,T,B,Q,M,xVe);let D=M.height,F=B.height,L=Q.height,R=T.height,k=Math.min(D,F,L,R),U=Math.max(D,F,L,R),V=(k+U)*.5,H,q,ie=o.getLevelMaximumGeometricError(f.level),Z=w.maximumRadius-ie,oe=Math.acos(Z/w.maximumRadius)*4;if(oe*=1.5,x.width>oe&&U-k<=ie){let ce=new wQ({width:9,height:9,buffer:c0i,structure:{heightOffset:U},flattenPolygonHeight:[1],flattenPolygon:[]}),j=A0i;j.tilingScheme=f.tilingScheme,j.x=f.x,j.y=f.y,j.level=f.level,j.exaggeration=v,j.exaggerationRelativeHeight=E,y.mesh=ce._createMeshSync(j)}else{let ce=I,j=Si.center(x,s0i);j.height=V;let de=w.cartographicToCartesian(j,u0i),me=new HM(de,void 0,void 0,void 0,void 0,!0,!0,ce,v,E),_e=5,Be;for(Be=y.westMeshes,H=0,q=Be.length;H<q;++H)_e+=Be[H].eastIndicesNorthToSouth.length;for(Be=y.southMeshes,H=0,q=Be.length;H<q;++H)_e+=Be[H].northIndicesWestToEast.length;for(Be=y.eastMeshes,H=0,q=Be.length;H<q;++H)_e+=Be[H].westIndicesSouthToNorth.length;for(Be=y.northMeshes,H=0,q=Be.length;H<q;++H)_e+=Be[H].southIndicesEastToWest.length;let Qe=l0i;Qe.minimumHeight=k,Qe.maximumHeight=U;let Ie=me.stride,ve=new Float32Array(_e*Ie),K=0,W=K;K=f$(w,x,me,ve,K,0,1,Q.height,Q.encodedNormal,1,Qe),K=m$(y,w,me,ve,K,y.westTiles,y.westMeshes,Ga.EAST,Qe);let te=K;K=f$(w,x,me,ve,K,0,0,M.height,M.encodedNormal,0,Qe),K=m$(y,w,me,ve,K,y.southTiles,y.southMeshes,Ga.NORTH,Qe);let Y=K;K=f$(w,x,me,ve,K,1,0,B.height,B.encodedNormal,0,Qe),K=m$(y,w,me,ve,K,y.eastTiles,y.eastMeshes,Ga.WEST,Qe);let he=K;K=f$(w,x,me,ve,K,1,1,T.height,T.encodedNormal,1,Qe),K=m$(y,w,me,ve,K,y.northTiles,y.northMeshes,Ga.SOUTH,Qe),k=Qe.minimumHeight,U=Qe.maximumHeight;let fe=Hf.fromRectangle(x,k,U,f.tilingScheme.ellipsoid),Ce=OA.geodeticLatitudeToMercatorAngle(x.south),Ee=1/(OA.geodeticLatitudeToMercatorAngle(x.north)-Ce),be=(OA.geodeticLatitudeToMercatorAngle(j.latitude)-Ce)*Ee,Re=w.geodeticSurfaceNormalCartographic(Fk,Vbe),Ne=Mu.octEncode(Re,uCe),Je=K;me.encode(ve,K*Ie,fe.center,It.fromElements(.5,.5,P_),V,Ne,be,Re),++K;let ot=K,nt=ot<256?1:2,$e=(ot-1)*3,ht=$e*nt,ze=(ve.length-ot*Ie)*Float32Array.BYTES_PER_ELEMENT,Ze;if(ze>=ht){let gt=ot*Ie*Float32Array.BYTES_PER_ELEMENT;Ze=ot<256?new Uint8Array(ve.buffer,gt,$e):new Uint16Array(ve.buffer,gt,$e)}else Ze=ot<256?new Uint8Array($e):new Uint16Array($e);ve=new Float32Array(ve.buffer,0,ot*Ie);let ct=0;for(H=0;H<ot-2;++H)Ze[ct++]=Je,Ze[ct++]=H,Ze[ct++]=H+1;Ze[ct++]=Je,Ze[ct++]=H,Ze[ct++]=0;let We=[];for(H=te;H>=W;--H)We.push(H);let Oe=[];for(H=Y;H>=te;--H)Oe.push(H);let Ye=[];for(H=he;H>=Y;--H)Ye.push(H);let rt=[];for(rt.push(0),H=Je-1;H>=he;--H)rt.push(H);y.mesh=new hO(me.center,ve,Ze,$e,ot,k,U,wi.fromOrientedBoundingBox(fe),C0i(o,fe.center,x,k,U),me.stride,fe,me,We,Oe,Ye,rt)}let ne=A.context;y._destroyVertexArray(m),y.vertexArray=zM._createVertexArrayForMesh(ne,y.mesh),C.processImagery(f,o.terrainProvider,A,!0);let se=y.waterMaskTexture;if(y.waterMaskTexture=void 0,o.terrainProvider.hasWaterMask){let ce=C._findAncestorTileWithTerrainData(f);O(ce)&&O(ce.data.waterMaskTexture)&&(y.waterMaskTexture=ce.data.waterMaskTexture,++y.waterMaskTexture.referenceCount,C._computeWaterMaskTranslationAndScale(f,ce,y.waterMaskTranslationAndScale))}O(se)&&(--se.referenceCount,se.referenceCount===0&&se.destroy())}function f$(o,A,f,m,C,y,x,v,E,I,w){let Q=Fk;Q.longitude=je.lerp(A.west,A.east,y),Q.latitude=je.lerp(A.south,A.north,x),Q.height=v;let M=o.cartographicToCartesian(Q,qG),B;f.hasGeodeticSurfaceNormals&&(B=o.geodeticSurfaceNormal(M,Vbe));let T=cCe;return T.x=y,T.y=x,f.encode(m,C*f.stride,M,T,v,E,I,B),w.minimumHeight=Math.min(w.minimumHeight,v),w.maximumHeight=Math.max(w.maximumHeight,v),C+1}var Jte=new Si;function OK(o,A,f,m){let C=o.rectangle,y=A.rectangle;A.x===0&&f.x===1&&o.x===o.tilingScheme.getNumberOfXTilesAtLevel(o.level)-1?(C=Si.clone(o.rectangle,Jte),C.west-=je.TWO_PI,C.east-=je.TWO_PI):o.x===0&&f.x===0&&A.x===A.tilingScheme.getNumberOfXTilesAtLevel(A.level)-1&&(C=Si.clone(o.rectangle,Jte),C.west+=je.TWO_PI,C.east+=je.TWO_PI);let x=C.east-C.west,v=(y.west-C.west)/x,E=(y.east-C.west)/x,I=C.north-C.south,w=(y.south-C.south)/I,Q=(y.north-C.south)/I,M=(f.x-v)/(E-v),B=(f.y-w)/(Q-w);return Math.abs(M)<Math.EPSILON5?M=0:Math.abs(M-1)<Math.EPSILON5&&(M=1),Math.abs(B)<Math.EPSILON5?B=0:Math.abs(B-1)<Math.EPSILON5&&(B=1),m.x=M,m.y=B,m}var h0i=new It;function ACe(o,A,f,m,C){let y=o.encoding,x=o.vertices;if(C.height=y.decodeHeight(x,A),y.hasVertexNormals)y.getOctEncodedNormal(x,A,C.encodedNormal);else{let v=C.encodedNormal;v.x=0,v.y=0}}var d0i=new It,f0i=new ee;function g0i(o,A,f,m,C,y,x,v,E,I){let w=m.encoding,Q=m.vertices,M=OK(A,f,w.decodeTextureCoordinates(Q,C,P_),P_),B=OK(A,f,w.decodeTextureCoordinates(Q,y,cCe),cCe),T;E?T=(x-M.x)/(B.x-M.x):T=(v-M.y)/(B.y-M.y);let D=w.decodeHeight(Q,C),F=w.decodeHeight(Q,y),L=f.rectangle;Fk.longitude=je.lerp(L.west,L.east,x),Fk.latitude=je.lerp(L.south,L.north,v),I.height=Fk.height=je.lerp(D,F,T);let R;if(w.hasVertexNormals){let k=w.getOctEncodedNormal(Q,C,h0i),U=w.getOctEncodedNormal(Q,y,d0i),V=Mu.octDecode(k.x,k.y,qG),H=Mu.octDecode(U.x,U.y,f0i);R=ee.lerp(V,H,T,qG),ee.normalize(R,R),Mu.octEncode(R,I.encodedNormal)}else R=o.geodeticSurfaceNormalCartographic(Fk,qG),Mu.octEncode(R,I.encodedNormal)}function Srt(o,A,f,m,C,y){y.height=C;let x=A.geodeticSurfaceNormalCartographic(Fk,qG);Mu.octEncode(x,y.encodedNormal)}function g$(o,A,f,m,C,y,x,v,E,I,w){if(EVe(o,A,v,x,!1,f,m,w)||EVe(o,A,I,E,!0,f,m,w))return w;let Q;if(zbe(C,y))return f===0?m===0?Q=y.eastIndicesNorthToSouth[0]:Q=y.southIndicesEastToWest[0]:m===0?Q=y.northIndicesWestToEast[0]:Q=y.westIndicesSouthToNorth[0],ACe(y,Q,f,m,w),w;let M;if(f===0?m===0?M=p$(o.westMeshes,o.westTiles,Ga.EAST,o.southMeshes,o.southTiles,Ga.NORTH,f,m):M=p$(o.northMeshes,o.northTiles,Ga.SOUTH,o.westMeshes,o.westTiles,Ga.EAST,f,m):m===0?M=p$(o.southMeshes,o.southTiles,Ga.NORTH,o.eastMeshes,o.eastTiles,Ga.WEST,f,m):M=p$(o.eastMeshes,o.eastTiles,Ga.WEST,o.northMeshes,o.northTiles,Ga.SOUTH,f,m),O(M))return Srt(o,A,f,m,M,w),w}function p$(o,A,f,m,C,y,x,v){let E=vVe(o,A,!1,f,x,v),I=vVe(m,C,!0,y,x,v);return O(E)&&O(I)?(E+I)*.5:O(E)?E:I}function m$(o,A,f,m,C,y,x,v,E){for(let I=0;I<y.length;++I)C=p0i(o,A,f,m,C,y[I],x[I],v,E);return C}function p0i(o,A,f,m,C,y,x,v,E){let I=y.rectangle;v===Ga.EAST&&o.tile.x===0?(I=Si.clone(y.rectangle,Jte),I.west-=je.TWO_PI,I.east-=je.TWO_PI):v===Ga.WEST&&y.x===0&&(I=Si.clone(y.rectangle,Jte),I.west+=je.TWO_PI,I.east+=je.TWO_PI);let w=o.tile.rectangle,Q,M;C>0&&(f.decodeTextureCoordinates(m,C-1,P_),Q=P_.x,M=P_.y);let B,T;switch(v){case Ga.WEST:B=x.westIndicesSouthToNorth,T=!1;break;case Ga.NORTH:B=x.northIndicesWestToEast,T=!0;break;case Ga.EAST:B=x.eastIndicesNorthToSouth,T=!1;break;case Ga.SOUTH:B=x.southIndicesEastToWest,T=!0;break}let D=y,F=o.tile,L=x.encoding,R=x.vertices,k=f.stride,U,V;L.hasWebMercatorT&&(U=OA.geodeticLatitudeToMercatorAngle(w.south),V=1/(OA.geodeticLatitudeToMercatorAngle(w.north)-U));for(let H=0;H<B.length;++H){let q=B[H],ie=L.decodeTextureCoordinates(R,q,P_);OK(D,F,ie,ie);let Z=ie.x,oe=ie.y,ne=T?Z:oe;if(ne<0||ne>1||Math.abs(Z-Q)<je.EPSILON5&&Math.abs(oe-M)<je.EPSILON5)continue;let se=Math.abs(Z)<je.EPSILON5||Math.abs(Z-1)<je.EPSILON5,ce=Math.abs(oe)<je.EPSILON5||Math.abs(oe-1)<je.EPSILON5;if(se&&ce)continue;let j=L.decodePosition(R,q,qG),de=L.decodeHeight(R,q),me;L.hasVertexNormals?me=L.getOctEncodedNormal(R,q,uCe):(me=uCe,me.x=0,me.y=0);let _e=oe;if(L.hasWebMercatorT){let Qe=je.lerp(w.south,w.north,oe);_e=(OA.geodeticLatitudeToMercatorAngle(Qe)-U)*V}let Be;f.hasGeodeticSurfaceNormals&&(Be=A.geodeticSurfaceNormal(j,Vbe)),f.encode(m,C*k,j,ie,de,me,_e,Be),E.minimumHeight=Math.min(E.minimumHeight,de),E.maximumHeight=Math.max(E.maximumHeight,de),++C}return C}function vVe(o,A,f,m,C,y){let x,v,E;f?(x=0,v=o.length,E=1):(x=o.length-1,v=-1,E=-1);for(let I=x;I!==v;I+=E){let w=o[I],Q=A[I];if(!zbe(Q,w))continue;let M;switch(m){case Ga.WEST:M=w.westIndicesSouthToNorth;break;case Ga.SOUTH:M=w.southIndicesEastToWest;break;case Ga.EAST:M=w.eastIndicesNorthToSouth;break;case Ga.NORTH:M=w.northIndicesWestToEast;break}let B=M[f?0:M.length-1];if(O(B))return w.encoding.decodeHeight(w.vertices,B)}}function zbe(o,A){return O(A)&&(!O(o.data.fill)||!o.data.fill.changedThisFrame)}function EVe(o,A,f,m,C,y,x,v){let E,I,w,Q,M,B=m[C?0:f.length-1],T=f[C?0:f.length-1];if(zbe(B,T)&&(y===0?x===0?(E=C?T.northIndicesWestToEast:T.eastIndicesNorthToSouth,I=C,w=C):(E=C?T.eastIndicesNorthToSouth:T.southIndicesEastToWest,I=!C,w=!1):x===0?(E=C?T.westIndicesSouthToNorth:T.northIndicesWestToEast,I=!C,w=!0):(E=C?T.southIndicesEastToWest:T.westIndicesSouthToNorth,I=C,w=!C),E.length>0)){Q=C?0:E.length-1,M=E[Q],T.encoding.decodeTextureCoordinates(T.vertices,M,P_);let D=OK(B,o.tile,P_,P_);if(D.x===y&&D.y===x)return ACe(T,M,y,x,v),!0;if(Q=hC(E,I?y:x,function(F,L){T.encoding.decodeTextureCoordinates(T.vertices,F,P_);let R=OK(B,o.tile,P_,P_);return w?I?R.x-y:R.y-x:I?y-R.x:x-R.y}),Q<0){if(Q=~Q,Q>0&&Q<E.length)return g0i(A,B,o.tile,T,E[Q-1],E[Q],y,x,I,v),!0}else return ACe(T,E[Q],y,x,v),!0}return!1}var m0i=[new ee,new ee,new ee,new ee];function C0i(o,A,f,m,C,y){let x=o.quadtree._occluders.ellipsoid,v=x.ellipsoid,E=m0i;return ee.fromRadians(f.west,f.south,C,v,E[0]),ee.fromRadians(f.east,f.south,C,v,E[1]),ee.fromRadians(f.west,f.north,C,v,E[2]),ee.fromRadians(f.east,f.north,C,v,E[3]),x.computeHorizonCullingPointPossiblyUnderEllipsoid(A,E,m,y)}var goe=tH;function Qd(o){this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=Al.RECEIVE_ONLY,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this.undergroundColor=void 0,this.undergroundColorAlphaByDistance=void 0,this.lambertDiffuseMultiplier=0,this.materialUniformMap=void 0,this._materialUniformMap=void 0,this._quadtree=void 0,this._terrainProvider=o.terrainProvider,this._imageryLayers=o.imageryLayers,this._surfaceShaderSet=o.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new br,this._imageryLayers.layerAdded.addEventListener(Qd.prototype._onLayerAdded,this),this._imageryLayers.layerRemoved.addEventListener(Qd.prototype._onLayerRemoved,this),this._imageryLayers.layerMoved.addEventListener(Qd.prototype._onLayerMoved,this),this._imageryLayers.layerShownOrHidden.addEventListener(Qd.prototype._onLayerShownOrHidden,this),this._imageryLayersUpdatedEvent=new br,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._uniformMaps=[],this._usedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new At(0,0,.5,1),this._clippingPlanes=void 0,this._multiClippingPlanes=void 0,this.cartographicLimitRectangle=Si.clone(Si.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._oldTerrainExaggeration=void 0,this._oldTerrainExaggerationRelativeHeight=void 0,this._flattenPolygonRegion={},this.graticulesLevel=1,this.graticulesEnable=!1,this.clipPlanes=[],this._clipPlanes=[]}Object.defineProperties(Qd.prototype,{baseColor:{get:function(){return this._baseColor},set:function(o){this._baseColor=o,this._firstPassInitialColor=ai.fromColor(o,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(o){this._quadtree=o}},ready:{get:function(){return this._terrainProvider.ready&&(this._imageryLayers.length===0||this._imageryLayers.get(0).imageryProvider.ready)}},tilingScheme:{get:function(){return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(o){this._terrainProvider!==o&&(this._terrainProvider=o,O(this._quadtree)&&this._quadtree.invalidateAllTiles())}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(o){rB.setOwner(o,this,"_clippingPlanes")}},multiClippingPlanes:{get:function(){return this._multiClippingPlanes},set:function(o){O(o)?this._multiClippingPlanes=o:this._multiClippingPlanes=void 0}}});function y0i(o,A){let f=o.loadingImagery;O(f)||(f=o.readyImagery);let m=A.loadingImagery;return O(m)||(m=A.readyImagery),f.imageryLayer._layerIndex-m.imageryLayer._layerIndex}Qd.prototype.update=function(o){this._imageryLayers._update()};function x0i(o,A){let f=A.creditDisplay;o._terrainProvider.ready&&O(o._terrainProvider.credit)&&f.addCredit(o._terrainProvider.credit);let m=o._imageryLayers;for(let C=0,y=m.length;C<y;++C){let x=m.get(C).imageryProvider;x.ready&&O(x.credit)&&f.addCredit(x.credit)}}Qd.prototype.initialize=function(o){this._imageryLayers.queueReprojectionCommands(o),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile(function(m){m.data.imagery.sort(y0i)})),x0i(this,o);let A=this._vertexArraysToDestroy,f=A.length;for(let m=0;m<f;++m)zM._freeVertexArray(A[m]);A.length=0};Qd.prototype.beginUpdate=function(o){let A=this._tilesToRenderByTextureCount;for(let C=0,y=A.length;C<y;++C){let x=A[C];O(x)&&(x.length=0)}let f=this._clippingPlanes;O(f)&&f.enabled&&f.update(o);let m=this._multiClippingPlanes;O(m)&&m.update(o),this._usedDrawCommands=0,this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1};Qd.prototype.endUpdate=function(o){if(!O(this._renderState)){this._renderState=fn.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:nI.LESS}}),this._blendRenderState=fn.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:nI.LESS_OR_EQUAL},blending:Bu.ALPHA_BLEND});let x=xo(this._renderState,!0);x.cull.enabled=!1,this._disableCullingRenderState=fn.fromCache(x),x=xo(this._blendRenderState,!0),x.cull.enabled=!1,this._disableCullingBlendRenderState=fn.fromCache(x)}this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&goe.updateFillTiles(this,this._quadtree._tilesToRender,o,this._vertexArraysToDestroy);let A=this.quadtree,f=o.terrainExaggeration,m=o.terrainExaggerationRelativeHeight,C=this._oldTerrainExaggeration!==f||this._oldTerrainExaggerationRelativeHeight!==m;this._oldTerrainExaggeration=f,this._oldTerrainExaggerationRelativeHeight=m,C&&A.forEachLoadedTile(function(x){x.data.updateExaggeration(x,o,A)});let y=this._tilesToRenderByTextureCount;for(let x=0,v=y.length;x<v;++x){let E=y[x];if(O(E))for(let I=0,w=E.length;I<w;++I){let Q=E[I],M=Q.data.tileBoundingRegion;Y0i(this,Q,o),o.minimumTerrainHeight=Math.min(o.minimumTerrainHeight,M.minimumHeight)}}};function Drt(o,A){let f=A.globeTranslucencyState;if(f.translucent){let m=o.renderState.blending.enabled;f.pushDerivedCommands(o,m,A)}else A.commandList.push(o)}Qd.prototype.updateForPick=function(o){let A=this._drawCommands;for(let f=0,m=this._usedDrawCommands;f<m;++f)Drt(A[f],o)};Qd.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()};Qd.prototype.getLevelMaximumGeometricError=function(o){return this._terrainProvider.getLevelMaximumGeometricError(o)};Qd.prototype.loadTile=function(o,A){let f=A.data,m=!0,C;O(f)&&(m=f.boundingVolumeSourceTile!==A||A._lastSelectionResult===sa.CULLED_BUT_NEEDED,C=f.terrainState),zM.processStateMachine(A,o,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,m),f=A.data,m&&C!==A.data.terrainState&&this.computeTileVisibility(A,o,this.quadtree.occluders)!==vg.NONE&&f.boundingVolumeSourceTile===A&&(m=!1,zM.processStateMachine(A,o,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,m))};var v0i=new wi,Trt=new Si,E0i=new Si,I0i=new Kt;function Bee(o,A){if(A.west<A.east)return A;let f=Si.clone(A,E0i);return Si.center(o,I0i).longitude>0?f.east=je.PI:f.west=-je.PI,f}function Mrt(o,A){if(A.cameraUnderground||A.globeTranslucencyState.translucent)return!0;if(o.backFaceCulling)return!1;let f=o._clippingPlanes;return!!(O(f)&&f.enabled||O(o._multiClippingPlanes)||!Si.equals(o.cartographicLimitRectangle,Si.MAX_VALUE))}Qd.prototype.computeTileVisibility=function(o,A,f){let m=this.computeDistanceToTile(o,A);o._distance=m;let C=Mrt(this,A);if(A.fog.enabled&&!C&&je.fog(m,A.fog.density)>=1)return vg.NONE;let y=o.data,x=y.tileBoundingRegion;if(y.boundingVolumeSourceTile===void 0)return vg.PARTIAL;let v=A.cullingVolume,E=x.boundingVolume;O(E)||(E=x.boundingSphere),y.clippedByBoundaries=!1;let I=Bee(o.rectangle,this.cartographicLimitRectangle),w=Si.simpleIntersection(I,o.rectangle,Trt);if(!O(w))return vg.NONE;if(Si.equals(w,o.rectangle)||(y.clippedByBoundaries=!0),A.mode!==xi.SCENE3D&&(E=v0i,wi.fromRectangleWithHeights2D(o.rectangle,A.mapProjection,x.minimumHeight,x.maximumHeight,E),ee.fromElements(E.center.z,E.center.x,E.center.y,E.center),A.mode===xi.MORPHING&&O(y.renderedMesh)&&(E=wi.union(x.boundingSphere,E,E))),!O(E))return vg.PARTIAL;let Q=this._clippingPlanes;if(O(Q)&&Q.enabled){let F=Q.computeIntersectionWithBoundingVolume(E);if(o.isClipped=F!==La.INSIDE,F===La.OUTSIDE)return vg.NONE}let M=this._multiClippingPlanes;if(O(M)&&M.enabled)for(let F=0;M.length;F++){let L=M[F].computeIntersectionWithBoundingVolume(E);if(o.isClipped=L!==La.INSIDE,L===La.OUTSIDE)return vg.NONE}let B,T=v.computeVisibility(E);if(T===La.OUTSIDE?B=vg.NONE:T===La.INTERSECTING?B=vg.PARTIAL:T===La.INSIDE&&(B=vg.FULL),B===vg.NONE)return B;let D=A.mode===xi.SCENE3D&&A.camera.frustum instanceof Ds;if(A.mode===xi.SCENE3D&&!D&&O(f)&&!C){let F=y.occludeePointInScaledSpace;return!O(F)||f.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(F,x.minimumHeight)?B:vg.NONE}return B};Qd.prototype.canRefine=function(o){return O(o.data.terrainData)?!0:this.terrainProvider.getTileDataAvailable(o.x*2,o.y*2,o.level+1)!==void 0};var _0i=[],B0i=[];Qd.prototype.canRenderWithoutLosingDetail=function(o,A){let f=o.data,m=_0i;m.length=this._imageryLayers.length;let C=!1,y=!1,x;O(f)&&(C=f.terrainState===xh.READY,y=!0,x=f.imagery);let v,E;for(v=0,E=m.length;v<E;++v)m[v]=y;if(O(x))for(v=0,E=x.length;v<E;++v){let Q=x[v],M=Q.loadingImagery,B=!O(M)||M.state===sc.FAILED||M.state===sc.INVALID,T=(Q.loadingImagery||Q.readyImagery).imageryLayer._layerIndex;m[T]=B&&m[T]}let I=this.quadtree._lastSelectionFrameNumber,w=B0i;for(w.length=0,w.push(o.southwestChild,o.southeastChild,o.northwestChild,o.northeastChild);w.length>0;){let Q=w.pop(),M=Q._lastSelectionResultFrame===I?Q._lastSelectionResult:sa.NONE;if(M===sa.RENDERED){let B=Q.data;if(!O(B))continue;if(!C&&Q.data.terrainState===xh.READY)return!1;let T=Q.data.imagery;for(v=0,E=T.length;v<E;++v){let D=T[v],F=D.loadingImagery,L=!O(F)||F.state===sc.FAILED||F.state===sc.INVALID,R=(D.loadingImagery||D.readyImagery).imageryLayer._layerIndex;if(L&&!m[R])return!1}}else M===sa.REFINED&&w.push(Q.southwestChild,Q.southeastChild,Q.northwestChild,Q.northeastChild)}return!0};var w0i=new ee;Qd.prototype.computeTileLoadPriority=function(o,A){let f=o.data;if(f===void 0)return 0;let m=f.tileBoundingRegion.boundingVolume;if(m===void 0)return 0;let C=A.camera.positionWC,y=A.camera.directionWC,x=ee.subtract(m.center,C,w0i),v=ee.magnitude(x);return v<je.EPSILON5?0:(ee.divideByScalar(x,v,x),(1-ee.dot(x,y))*o._distance)};var IVe=new Xe,C$=new Xe,b0i=new ai,Q0i=new ai,S0i=new ai,D0i=new ee,_Ve=new ee,T0i=new ee,M0i=new ee;Qd.prototype.showTileThisFrame=function(o,A){let f=0,m=o.data.imagery;for(let v=0,E=m.length;v<E;++v){let I=m[v];O(I.readyImagery)&&I.readyImagery.imageryLayer.alpha!==0&&++f}let C=this._tilesToRenderByTextureCount[f];O(C)||(C=[],this._tilesToRenderByTextureCount[f]=C),C.push(o);let y=o.data;O(y.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;let x=this._debug;++x.tilesRendered,x.texturesRendered+=f};var P0i=[new ee,new ee,new ee,new ee];function BVe(o,A,f,m,C,y){let x=o.quadtree._occluders.ellipsoid,v=x.ellipsoid,E=P0i;return ee.fromRadians(f.west,f.south,C,v,E[0]),ee.fromRadians(f.east,f.south,C,v,E[1]),ee.fromRadians(f.west,f.north,C,v,E[2]),ee.fromRadians(f.east,f.north,C,v,E[3]),x.computeHorizonCullingPointPossiblyUnderEllipsoid(A,E,m,y)}Qd.prototype.computeDistanceToTile=function(o,A){N0i(o,this,A);let f=o.data;if(f.boundingVolumeSourceTile===void 0)return 9999999999;let m=f.tileBoundingRegion,C=m.minimumHeight,y=m.maximumHeight;if(f.boundingVolumeSourceTile!==o){let v=A.camera.positionCartographic.height,E=Math.abs(v-C),I=Math.abs(v-y);E>I?(m.minimumHeight=C,m.maximumHeight=C):(m.minimumHeight=y,m.maximumHeight=y)}let x=m.distanceToCamera(A);return m.minimumHeight=C,m.maximumHeight=y,x};function R0i(o,A){let f=0,m,C,y,x,v=A.length;for(y=A[0],m=1;m<=v;m++)x=A[m%v],o[0]>Math.min(y[0],x[0])&&o[0]<=Math.max(y[0],x[0])&&o[1]<=Math.max(y[1],x[1])&&y[0]!==x[0]&&(C=(o[0]-y[0])*(x[1]-y[1])/(x[0]-y[0])+y[1],(y[1]===x[1]||o[1]<=C)&&f++),y=x;return f%2!==0}function L0i(o,A,f,m){let C=(o.x-f.x)*(A.y-f.y)-(o.y-f.y)*(A.x-f.x),y=(o.x-m.x)*(A.y-m.y)-(o.y-m.y)*(A.x-m.x);if(C*y>=0)return!1;let x=(f.x-o.x)*(m.y-o.y)-(f.y-o.y)*(m.x-o.x),v=x+C-y;if(x*v>=0)return!1;let E=x/(y-C),I=E*(A.x-o.x),w=E*(A.y-o.y);return{x:o.x+I,y:o.y+w}}var y$=new Kt,xz=[],x$=[];function F0i(o,A,f){if(!O(o._flattenPolygonRegion.flattenPolygons))return!1;let m=o._flattenPolygonRegion.flattenPolygons,C=o._flattenPolygonRegion.flattenPolygonHeights,y=f.rectangle,x=y.west,v=y.south,E=y.east,I=y.north;xz.length=0,x$.length=0;let w=!1,Q=[[x,v],[E,v],[E,I],[x,I]];for(let M=0;M<C.length;M++){w=!1;for(let B=0;B<m[M].length;B++){let T=m[M][B];if(y$.longitude=T[0],y$.latitude=T[1],y$.height=0,Si.contains(y,y$)){xz.push(C[M]),x$.push(m[M]),w=!0;break}}if(!w){for(let B=0;B<Q.length;B++)if(R0i(Q[B],m[M])){xz.push(C[M]),x$.push(m[M]),w=!0;break}}if(!w)for(let B=0;B<m[M].length-1;B++){for(let T=0;T<Q.length-1;T++){let D={x:Q[T][0],y:Q[T][1]},F={x:Q[T+1][0],y:Q[T+1][1]},L={x:m[M][B][0],y:m[M][B][1]},R={x:m[M][B+1][0],y:m[M][B+1][1]};if(L0i(D,F,L,R)){xz.push(C[M]),x$.push(m[M]),w=!0;break}}if(w)break}if(w){let B=xz[0],T=B.maxHeight,D=B.minHeight,F=f.maximumHeight,L=f.minimumHeight;D>L&&T<F,T>=F&&(F=T),D<=L&&(L=D),f.maximumHeight=F,f.minimumHeight=L}}return!0}function N0i(o,A,f){let m=o.data;m===void 0&&(m=o.data=new zM);let C=o.tilingScheme.ellipsoid;m.tileBoundingRegion===void 0&&(m.tileBoundingRegion=new S5({computeBoundingVolumes:!1,rectangle:o.rectangle,ellipsoid:C,minimumHeight:0,maximumHeight:0}));let y=m.tileBoundingRegion,x=y.minimumHeight,v=y.maximumHeight,E=!1,I=o,w=m.mesh,Q=m.terrainData;if(w!==void 0&&w.minimumHeight!==void 0&&w.maximumHeight!==void 0)y.minimumHeight=w.minimumHeight,y.maximumHeight=w.maximumHeight,E=!0;else if(Q!==void 0&&Q._minimumHeight!==void 0&&Q._maximumHeight!==void 0)y.minimumHeight=Q._minimumHeight,y.maximumHeight=Q._maximumHeight;else{y.minimumHeight=Number.NaN,y.maximumHeight=Number.NaN;let M=o.parent;for(;M!==void 0;){let B=M.data;if(B!==void 0){let T=B.mesh,D=B.terrainData;if(T!==void 0&&T.minimumHeight!==void 0&&T.maximumHeight!==void 0){y.minimumHeight=T.minimumHeight,y.maximumHeight=T.maximumHeight;break}else if(D!==void 0&&D._minimumHeight!==void 0&&D._maximumHeight!==void 0){y.minimumHeight=D._minimumHeight,y.maximumHeight=D._maximumHeight;break}}M=M.parent}I=M}if(I!==void 0){let M=f.terrainExaggeration,B=f.terrainExaggerationRelativeHeight;if(M!==1&&(E=!1,y.minimumHeight=ID.getHeight(y.minimumHeight,M,B),y.maximumHeight=ID.getHeight(y.maximumHeight,M,B)),F0i(A,C,y)&&(E=!1),E)m.boundingVolumeIsFromMesh||(y._orientedBoundingBox=Hf.clone(w.orientedBoundingBox,y._orientedBoundingBox),y._boundingSphere=wi.clone(w.boundingSphere3D,y._boundingSphere),m.occludeePointInScaledSpace=ee.clone(w.occludeePointInScaledSpace,m.occludeePointInScaledSpace),O(m.occludeePointInScaledSpace)||(m.occludeePointInScaledSpace=BVe(A,y._orientedBoundingBox.center,o.rectangle,y.minimumHeight,y.maximumHeight,m.occludeePointInScaledSpace)));else{let T=y._orientedBoundingBox===void 0||y._boundingSphere===void 0;(y.minimumHeight!==x||y.maximumHeight!==v||T)&&(y.computeBoundingVolumes(C),m.occludeePointInScaledSpace=BVe(A,y._orientedBoundingBox.center,o.rectangle,y.minimumHeight,y.maximumHeight,m.occludeePointInScaledSpace))}m.boundingVolumeSourceTile=I,m.boundingVolumeIsFromMesh=E}else m.boundingVolumeSourceTile=void 0,m.boundingVolumeIsFromMesh=!1}Qd.prototype.isDestroyed=function(){return!1};Qd.prototype.destroy=function(){return this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),O(this._multiClippingPlanes)&&(this._multiClippingPlanes.destroy(),this._multiClippingPlanes=void 0),Qr(this)};function k0i(o,A,f){return function(m){let C,y,x=-1,v=m.data.imagery,E=v.length,I;for(I=0;I<E;++I)if(C=v[I],y=Ae(C.readyImagery,C.loadingImagery),y.imageryLayer===A){x=I;break}if(x!==-1){let w=x+o;if(C=v[w],y=O(C)?Ae(C.readyImagery,C.loadingImagery):void 0,!O(y)||y.imageryLayer!==A)return!A._createTileImagerySkeletons(m,f,w);for(I=x;I<w;++I)v[I].freeResources();v.splice(x,o)}return!0}}Qd.prototype._onLayerAdded=function(o,A){if(o.show){let f=this._terrainProvider,m=this,C=o.imageryProvider,y=this._imageryLayersUpdatedEvent;C._reload=function(){o._imageryCache={},m._quadtree.forEachLoadedTile(function(x){if(O(x._loadedCallbacks[o._layerIndex]))return;let v,E=x.data.imagery,I=E.length,w=-1,Q=0;for(v=0;v<I;++v){let B=E[v];if(Ae(B.readyImagery,B.loadingImagery).imageryLayer===o)w===-1&&(w=v),++Q;else if(w!==-1)break}if(w===-1)return;let M=w+Q;o._createTileImagerySkeletons(x,f,M)&&(x._loadedCallbacks[o._layerIndex]=k0i(Q,o,f),x.state=mC.LOADING)})},this._quadtree.forEachLoadedTile(function(x){o._createTileImagerySkeletons(x,f)&&(x.state=mC.LOADING,x.level!==0&&(x._lastSelectionResultFrame!==m.quadtree._lastSelectionFrameNumber||x._lastSelectionResult!==sa.RENDERED)&&(x.renderable=!1))}),this._layerOrderChanged=!0,y.raiseEvent()}};Qd.prototype._onLayerRemoved=function(o,A){this._quadtree.forEachLoadedTile(function(f){let m=f.data.imagery,C=-1,y=0;for(let x=0,v=m.length;x<v;++x){let E=m[x],I=E.loadingImagery;if(O(I)||(I=E.readyImagery),I.imageryLayer===o)C===-1&&(C=x),E.freeResources(),++y;else if(C!==-1)break}C!==-1&&m.splice(C,y)}),O(o.imageryProvider)&&(o.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()};Qd.prototype._onLayerMoved=function(o,A,f){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()};Qd.prototype._onLayerShownOrHidden=function(o,A,f){f?this._onLayerAdded(o,A):this._onLayerRemoved(o,A)};var wVe=new Xe,bVe=new Xe;function QVe(o,A){let f={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_atmosphereLightIntensity:function(){return this.properties.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return this.properties.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return this.properties.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return this.properties.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return this.properties.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return this.properties.atmosphereMieAnisotropy},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_terrainExaggerationAndRelativeHeight:function(){return this.properties.terrainExaggerationAndRelativeHeight},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){let C=o.context.uniformState.view,y=Xe.multiplyByPoint(C,this.properties.rtc,_Ve);return Xe.setTranslation(C,y,IVe),IVe},u_modifiedModelViewProjection:function(){let C=o.context.uniformState.view,y=o.context.uniformState.projection,x=Xe.multiplyByPoint(C,this.properties.rtc,_Ve);return Xe.setTranslation(C,x,C$),Xe.multiply(y,C$,C$),C$},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureAlpha:function(){return this.properties.dayTextureAlpha},u_dayTextureNightAlpha:function(){return this.properties.dayTextureNightAlpha},u_dayTextureDayAlpha:function(){return this.properties.dayTextureDayAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_slopeColorsTexture:function(){return UE.isSlopeDirty&&(UE._slopeTex=UE.createElevationTextureFromPallete(UE.SlopeMapPallete,o),this.properties.slopeColorsTexture2=UE._slopeTex,UE.isSlopeDirty=!1),UE._slopeTex},u_clippingPlanes:function(){let C=A._multiClippingPlanes;if(O(C)&&O(C.dataTexture))return C.dataTexture;let y=A._clippingPlanes;return O(y)&&O(y.texture)?y.texture:o.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){let C=A._multiClippingPlanes;if(O(C)){let v=Xe.multiply(o.context.uniformState.view,C.modelMatrix,wVe);return Xe.inverseTranspose(v,bVe)}let y=A._clippingPlanes,x=O(y)?Xe.multiply(o.context.uniformState.view,y.modelMatrix,wVe):Xe.IDENTITY;return Xe.inverseTranspose(x,bVe)},u_clippingPlanesEdgeStyle:function(){let C=A._multiClippingPlanes;if(O(C)){let x=C.edgeColor.clone();return x.alpha=C.edgeWidth,x}let y=this.properties.clippingPlanesEdgeColor;return y.alpha=this.properties.clippingPlanesEdgeWidth,y},u_multiClippingPlanesLength:function(){let C=A._multiClippingPlanes;if(O(C)){let y=C.lengthTexture;if(O(y))return y}return O(C)?C:o.context.defaultTexture},u_minimumBrightness:function(){return o.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_colorsToAlpha:function(){return this.properties.colorsToAlpha},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},u_translucencyRectangle:function(){return this.properties.localizedTranslucencyRectangle},u_undergroundColor:function(){return this.properties.undergroundColor},u_undergroundColorAlphaByDistance:function(){return this.properties.undergroundColorAlphaByDistance},u_lambertDiffuseMultiplier:function(){return this.properties.lambertDiffuseMultiplier},properties:{initialColor:new ai(0,0,.5,1),fillHighlightColor:new At(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new It(65e5,9e6),nightFadeDistance:new It(1e7,4e7),atmosphereLightIntensity:10,atmosphereRayleighCoefficient:new ee(55e-7,13e-6,284e-7),atmosphereMieCoefficient:new ee(21e-6,21e-6,21e-6),atmosphereRayleighScaleHeight:1e4,atmosphereMieScaleHeight:3200,atmosphereMieAnisotropy:.9,hsbShift:new ee,center3D:void 0,rtc:new ee,modifiedModelView:new Xe,tileRectangle:new ai,terrainExaggerationAndRelativeHeight:new It(1,0),dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new It,southMercatorYAndOneOverHeight:new It,waterMask:void 0,waterMaskTranslationAndScale:new ai,minMaxHeight:new It,scaleAndBias:new Xe,clippingPlanesEdgeColor:At.clone(At.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new ai,frontFaceAlphaByDistance:new ai,backFaceAlphaByDistance:new ai,localizedTranslucencyRectangle:new ai,undergroundColor:At.clone(At.TRANSPARENT),undergroundColorAlphaByDistance:new ai,lambertDiffuseMultiplier:0,slopeColorsTexture2:O(UE._slopeTex)?UE._slopeTex:UE.createElevationTextureFromPallete(UE.SlopeMapPallete,o)}};if(A.clipPlanes.length>0&&(f.properties.contourLineTexture=null,f.u_contourLineTexture=function(){return f.properties.contourLineTexture},f.properties.contourLineTranslationAndScale=new ai,f.u_contourLineTranslationAndScale=function(){return this.properties.contourLineTranslationAndScale}),O(A.cutPolygonUniformMap))return ia(f,A.cutPolygonUniformMap);let m=A.materialUniformMap;if(O(m)){let C=m.u_bFlatten;if(O(C)&&C()){let y=m.u_r_eastNorthUpToFixedFrame(),x=m.u_eastNorthUpToFixedFrame(),v=function(){let I=new Xe;return Xe.fromTranslation(f.properties.rtc,I),I},E=function(){let I=new Xe;Xe.fromTranslation(f.properties.rtc,I);let w=new Xe;return Xe.inverse(I,w),w};f=ia(f,{u_eastNorthUpToFixedFrameA:function(){let I=E(),w=new Xe;return Xe.multiply(I,x,w),w},u_r_eastNorthUpToFixedFrameA:function(){let I=v(),w=new Xe;return Xe.multiply(y,I,w),w}})}return ia(f,m)}return f}function O0i(o,A,f){let m=f.data,C,y;if(O(m.vertexArray)?(C=m.mesh,y=m.vertexArray):O(m.fill)&&O(m.fill.vertexArray)&&(C=m.fill.mesh,y=m.fill.vertexArray),!(!O(C)||!O(y))){if(O(m.wireframeVertexArray)){if(m.wireframeVertexArray.mesh===C)return;m.wireframeVertexArray.destroy(),m.wireframeVertexArray=void 0}m.wireframeVertexArray=U0i(o,y,C),m.wireframeVertexArray.mesh=C}}function U0i(o,A,f){let m={indices:f.indices,primitiveType:yn.TRIANGLES};rc.toWireframe(m);let C=m.indices,y=vo.createIndexBuffer({context:o,typedArray:C,usage:ln.STATIC_DRAW,indexDatatype:Nn.fromSizeInBytes(C.BYTES_PER_ELEMENT)});return new Vc({context:o,attributes:A._attributes,indexBuffer:y})}var Prt,Rrt,wee;(function(){let o=new co({geometry:r2.fromDimensions({dimensions:new ee(2,2,2)})}),A=new co({geometry:new tP({radius:1})}),f=new Xe,m,C;function y(x){return new $a({geometryInstances:x,appearance:new za({translucent:!1,flat:!0}),asynchronous:!1})}Prt=function(x,v){return x===m||(wee(),m=x,f=Xe.fromRotationTranslation(x.halfAxes,x.center,f),o.modelMatrix=f,o.attributes.color=Yo.fromColor(v),C=y(o)),C},Rrt=function(x,v){return x===m||(wee(),m=x,f=Xe.fromTranslation(x.center,f),f=Xe.multiplyByUniformScale(f,x.radius,f),A.modelMatrix=f,A.attributes.color=Yo.fromColor(v),C=y(A)),C},wee=function(){O(C)&&(C.destroy(),C=void 0,m=void 0)}})();var G0i=new ai(0,0,0,0),H0i={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applyDayNightAlpha:void 0,applySplit:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,colorToAlpha:void 0,hasGeodeticSurfaceNormals:void 0,hasExaggeration:void 0},V0i=At.TRANSPARENT,z0i=new To;function K0i(o,A){let f=new ai,m=o.graticulesLevel,C=o.graticulesEnable,y=A._rectangle,x=A.tilingScheme,v=Math.pow(2,m)*36,E=Math.pow(2,m)*18,I=je.TWO_PI/v,w=je.PI/E,Q=y.west,M=(Q-Math.floor(Q/I)*I)/I,B=y.east,T=(B-Q)/I,D=y.south+je.PI_OVER_TWO,F=(D-Math.floor(D/w)*w)/w,L=y.north+je.PI_OVER_TWO,R=(L-D)/w;return Q>B&&console.log("west > east"),D>L&&console.log("west > east"),f.x=M,f.y=F,f.z=T,f.w=R,f}function Y0i(o,A,f){let m=A.data;O(m.vertexArray)||(m.fill===void 0&&(m.fill=new goe(A)),m.fill.update(o,f));let C=f.creditDisplay,y=m.terrainData;if(O(y)&&O(y.credits)){let We=y.credits;for(let Oe=0,Ye=We.length;Oe<Ye;++Oe)C.addCredit(We[Oe])}let x=yo.maximumTextureImageUnits,v=m.waterMaskTexture,E=m.waterMaskTranslationAndScale;!O(v)&&O(m.fill)&&(v=m.fill.waterMaskTexture,E=m.fill.waterMaskTranslationAndScale);let I=f.cameraUnderground,w=f.globeTranslucencyState,Q=w.translucent,M=w.frontFaceAlphaByDistance,B=w.backFaceAlphaByDistance,T=w.rectangle,D=Ae(o.undergroundColor,V0i),F=Ae(o.undergroundColorAlphaByDistance,z0i),L=Mrt(o,f)&&f.mode===xi.SCENE3D&&D.alpha>0&&(F.nearValue>0||F.farValue>0),R=o.lambertDiffuseMultiplier,k=o.hasWaterMask&&O(v),U=o.oceanNormalMap,V=k&&O(U),H=o.terrainProvider.ready&&o.terrainProvider.hasVertexNormals,q=f.fog.enabled&&f.fog.renderable&&!I,ie=o.showGroundAtmosphere&&f.mode===xi.SCENE3D,Z=Al.castShadows(o.shadows)&&!Q,oe=Al.receiveShadows(o.shadows)&&!Q,ne=o.hueShift,se=o.saturationShift,ce=o.brightnessShift,j=!(je.equalsEpsilon(ne,0,je.EPSILON7)&&je.equalsEpsilon(se,0,je.EPSILON7)&&je.equalsEpsilon(ce,0,je.EPSILON7)),de=!1;if(ie){let We=ee.magnitude(f.camera.positionWC),Oe=o.nightFadeOutDistance;de=We>Oe}k&&--x,V&&--x,O(f.shadowState)&&f.shadowState.shadowsEnabled&&--x,O(o.clippingPlanes)&&o.clippingPlanes.enabled&&--x,x-=w.numberOfTextureUniforms;let me=m.renderedMesh,_e=me.center,Be=me.encoding,Qe=m.tileBoundingRegion,Ie=f.terrainExaggeration,ve=f.terrainExaggerationRelativeHeight,K=Ie!==1,W=Be.hasGeodeticSurfaceNormals,te=b0i,Y=0,he=0,fe=0,Ce=0,Ee=!1;if(f.mode!==xi.SCENE3D){let We=f.mapProjection,Oe=We.project(Si.southwest(A.rectangle),T0i),Ye=We.project(Si.northeast(A.rectangle),M0i);if(te.x=Oe.x,te.y=Oe.y,te.z=Ye.x,te.w=Ye.y,f.mode!==xi.MORPHING&&(_e=D0i,_e.x=0,_e.y=(te.z+te.x)*.5,_e.z=(te.w+te.y)*.5,te.x-=_e.y,te.y-=_e.z,te.z-=_e.y,te.w-=_e.z),f.mode===xi.SCENE2D&&Be.quantization===Pv.BITS12){let rt=1/(Math.pow(2,12)-1)*.5,gt=(te.z-te.x)*rt,Et=(te.w-te.y)*rt;te.x-=gt,te.y-=Et,te.z+=gt,te.w+=Et}(We instanceof OA||We instanceof t6)&&(Y=A.rectangle.south,he=A.rectangle.north,fe=OA.geodeticLatitudeToMercatorAngle(Y),Ce=1/(OA.geodeticLatitudeToMercatorAngle(he)-fe),Ee=!0)}let be=H0i;be.frameState=f,be.surfaceTile=m,be.showReflectiveOcean=k,be.showOceanWaves=V,be.enableLighting=o.enableLighting,be.dynamicAtmosphereLighting=o.dynamicAtmosphereLighting,be.dynamicAtmosphereLightingFromSun=o.dynamicAtmosphereLightingFromSun,be.showGroundAtmosphere=ie,be.atmosphereLightIntensity=o.atmosphereLightIntensity,be.atmosphereRayleighCoefficient=o.atmosphereRayleighCoefficient,be.atmosphereMieCoefficient=o.atmosphereMieCoefficient,be.atmosphereRayleighScaleHeight=o.atmosphereRayleighScaleHeight,be.atmosphereMieScaleHeight=o.atmosphereMieScaleHeight,be.atmosphereMieAnisotropy=o.atmosphereMieAnisotropy,be.perFragmentGroundAtmosphere=de,be.hasVertexNormals=H,be.useWebMercatorProjection=Ee,be.clippedByBoundaries=m.clippedByBoundaries,be.hasGeodeticSurfaceNormals=W,be.hasExaggeration=K;let Re=m.imagery,Ne=0,Je=Re.length,ot=o.showSkirts&&!I&&!Q,nt=o.backFaceCulling&&!I&&!Q,$e=nt?o._renderState:o._disableCullingRenderState,ht=nt?o._blendRenderState:o._disableCullingBlendRenderState,ze=$e,Ze=o._firstPassInitialColor,ct=f.context;if(O(o._debug.boundingSphereTile)||wee(),o._materialUniformMap!==o.materialUniformMap||o.clipPlanes.length!==o._clipPlanes.length){o._materialUniformMap=o.materialUniformMap;let We=o._drawCommands.length;for(let Oe=0;Oe<We;++Oe)o._uniformMaps[Oe]=QVe(f,o);o._clipPlanes=o.clipPlanes}do{let We=0,Oe,Ye;if(o._drawCommands.length<=o._usedDrawCommands?(Oe=new On,Oe.owner=A,Oe.cull=!1,Oe.boundingVolume=new wi,Oe.orientedBoundingBox=void 0,Ye=QVe(f,o),o._drawCommands.push(Oe),o._uniformMaps.push(Ye)):(Oe=o._drawCommands[o._usedDrawCommands],Ye=o._uniformMaps[o._usedDrawCommands]),Oe.owner=A,++o._usedDrawCommands,A===o._debug.boundingSphereTile){let hi=Qe.boundingVolume,Ni=Qe.boundingSphere;O(hi)?Prt(hi,At.RED).update(f):O(Ni)&&Rrt(Ni,At.RED).update(f)}let rt=Ye.properties;ai.clone(Ze,rt.initialColor),rt.oceanNormalMap=U,rt.lightingFadeDistance.x=o.lightingFadeOutDistance,rt.lightingFadeDistance.y=o.lightingFadeInDistance,rt.nightFadeDistance.x=o.nightFadeOutDistance,rt.nightFadeDistance.y=o.nightFadeInDistance,rt.atmosphereLightIntensity=o.atmosphereLightIntensity,rt.atmosphereRayleighCoefficient=o.atmosphereRayleighCoefficient,rt.atmosphereMieCoefficient=o.atmosphereMieCoefficient,rt.atmosphereRayleighScaleHeight=o.atmosphereRayleighScaleHeight,rt.atmosphereMieScaleHeight=o.atmosphereMieScaleHeight,rt.atmosphereMieAnisotropy=o.atmosphereMieAnisotropy,rt.zoomedOutOceanSpecularIntensity=o.zoomedOutOceanSpecularIntensity;let gt=I?B:M,Et=I?M:B;O(gt)&&(ai.fromElements(gt.near,gt.nearValue,gt.far,gt.farValue,rt.frontFaceAlphaByDistance),ai.fromElements(Et.near,Et.nearValue,Et.far,Et.farValue,rt.backFaceAlphaByDistance)),ai.fromElements(F.near,F.nearValue,F.far,F.farValue,rt.undergroundColorAlphaByDistance),At.clone(D,rt.undergroundColor),rt.lambertDiffuseMultiplier=R;let yt=!O(m.vertexArray)&&O(o.fillHighlightColor)&&o.fillHighlightColor.alpha>0;yt&&At.clone(o.fillHighlightColor,rt.fillHighlightColor),rt.terrainExaggerationAndRelativeHeight.x=Ie,rt.terrainExaggerationAndRelativeHeight.y=ve,rt.center3D=me.center,ee.clone(_e,rt.rtc),ai.clone(te,rt.tileRectangle),rt.southAndNorthLatitude.x=Y,rt.southAndNorthLatitude.y=he,rt.southMercatorYAndOneOverHeight.x=fe,rt.southMercatorYAndOneOverHeight.y=Ce;let vt=Q0i,Rt=Bee(A.rectangle,o.cartographicLimitRectangle),qt=S0i,wt=Bee(A.rectangle,T);ee.fromElements(ne,se,ce,rt.hsbShift);let Lt=A.rectangle,pi=1/Lt.width,Ut=1/Lt.height;vt.x=(Rt.west-Lt.west)*pi,vt.y=(Rt.south-Lt.south)*Ut,vt.z=(Rt.east-Lt.west)*pi,vt.w=(Rt.north-Lt.south)*Ut,ai.clone(vt,rt.localizedCartographicLimitRectangle),qt.x=(wt.west-Lt.west)*pi,qt.y=(wt.south-Lt.south)*Ut,qt.z=(wt.east-Lt.west)*pi,qt.w=(wt.north-Lt.south)*Ut,ai.clone(qt,rt.localizedTranslucencyRectangle);let ri=q&&je.fog(A._distance,f.fog.density)>je.EPSILON3;j=j&&(ri||ie);let ni=!1,kt=!1,qe=!1,Fe=!1,it=!1,Ht=!1,Jt=!1,jt=!1,or=!1,Pr=!1;for(;We<x&&Ne<Je;){let hi=Re[Ne],Ni=hi.readyImagery;if(++Ne,!O(Ni)||Ni.imageryLayer.alpha===0)continue;let ki=hi.useWebMercatorT?Ni.textureWebMercator:Ni.texture,di=Ni.imageryLayer;O(hi.textureTranslationAndScale)||(hi.textureTranslationAndScale=di._calculateTextureTranslationAndScale(A,hi)),rt.dayTextures[We]=ki,di.imageryProvider instanceof m5?rt.dayTextureTranslationAndScale[We]=K0i(o,A):rt.dayTextureTranslationAndScale[We]=hi.textureTranslationAndScale,rt.dayTextureTexCoordsRectangle[We]=hi.textureCoordinateRectangle,rt.dayTextureUseWebMercatorT[We]=hi.useWebMercatorT,rt.dayTextureAlpha[We]=di.alpha,Ht=Ht||rt.dayTextureAlpha[We]!==1,rt.dayTextureNightAlpha[We]=di.nightAlpha,Jt=Jt||rt.dayTextureNightAlpha[We]!==1,rt.dayTextureDayAlpha[We]=di.dayAlpha,Jt=Jt||rt.dayTextureDayAlpha[We]!==1,rt.dayTextureBrightness[We]=di.brightness,ni=ni||rt.dayTextureBrightness[We]!==dD.DEFAULT_BRIGHTNESS,rt.dayTextureContrast[We]=di.contrast,kt=kt||rt.dayTextureContrast[We]!==dD.DEFAULT_CONTRAST,rt.dayTextureHue[We]=di.hue,qe=qe||rt.dayTextureHue[We]!==dD.DEFAULT_HUE,rt.dayTextureSaturation[We]=di.saturation,Fe=Fe||rt.dayTextureSaturation[We]!==dD.DEFAULT_SATURATION,rt.dayTextureOneOverGamma[We]=1/di.gamma,it=it||rt.dayTextureOneOverGamma[We]!==1/dD.DEFAULT_GAMMA,rt.dayTextureSplit[We]=di.splitDirection,jt=jt||rt.dayTextureSplit[We]!==0;let Oi=rt.dayTextureCutoutRectangles[We];if(O(Oi)||(Oi=rt.dayTextureCutoutRectangles[We]=new ai),ai.clone(ai.ZERO,Oi),O(di.cutoutRectangle)){let Qi=Bee(Lt,di.cutoutRectangle),Pi=Si.simpleIntersection(Qi,Lt,Trt);or=O(Pi)||or,Oi.x=(Qi.west-Lt.west)*pi,Oi.y=(Qi.south-Lt.south)*Ut,Oi.z=(Qi.east-Lt.west)*pi,Oi.w=(Qi.north-Lt.south)*Ut}let Hi=rt.colorsToAlpha[We];O(Hi)||(Hi=rt.colorsToAlpha[We]=new ai);let Fi=O(di.colorToAlpha)&&di.colorToAlphaThreshold>0;if(Pr=Pr||Fi,Fi){let Qi=di.colorToAlpha;Hi.x=Qi.red,Hi.y=Qi.green,Hi.z=Qi.blue,Hi.w=di.colorToAlphaThreshold}else Hi.w=-1;if(O(Ni.credits)){let Qi=Ni.credits;for(let Pi=0,Yn=Qi.length;Pi<Yn;++Pi)C.addCredit(Qi[Pi])}++We}if(rt.dayTextures.length=We,rt.waterMask=v,ai.clone(E,rt.waterMaskTranslationAndScale),o.clipPlanes.length>0){let hi=m.contourLineTexture?m.contourLineTexture:f.context.defaultTexture;rt.contourLineTexture=hi,ai.clone(m.contourLineTranslationAndScale,rt.contourLineTranslationAndScale)}rt.minMaxHeight.x=Be.minimumHeight,rt.minMaxHeight.y=Be.maximumHeight,Xe.clone(Be.matrix,rt.scaleAndBias);let Mi=o._clippingPlanes,Zi=O(Mi)&&Mi.enabled&&A.isClipped;Zi&&(rt.clippingPlanesEdgeColor=At.clone(Mi.edgeColor,rt.clippingPlanesEdgeColor),rt.clippingPlanesEdgeWidth=Mi.edgeWidth),be.numberOfDayTextures=We,be.applyBrightness=ni,be.applyContrast=kt,be.applyHue=qe,be.applySaturation=Fe,be.applyGamma=it,be.applyAlpha=Ht,be.applyDayNightAlpha=Jt,be.applySplit=jt,be.enableFog=ri,be.enableClippingPlanes=Zi,be.clippingPlanes=Mi,be.hasImageryLayerCutout=or,be.colorCorrect=j,be.highlightFillTile=yt,be.colorToAlpha=Pr,be.showUndergroundColor=L,be.translucent=Q,be.enableFlatten=o._flattenPolygonRegion.enableFlatten,be.showSlopeMap=UE.displaySlopeMap,be.smoothSlopeAtHigherAlt=!1,be.multiClippingPlanes=o._multiClippingPlanes;let lr=m.renderedMesh.indices.length;ot||(lr=m.renderedMesh.indexCountWithoutSkirts),Oe.shaderProgram=o._surfaceShaderSet.getShaderProgram(be),Oe.castShadows=Z,Oe.receiveShadows=oe,Oe.renderState=ze,Oe.primitiveType=yn.TRIANGLES,Oe.vertexArray=m.vertexArray||m.fill.vertexArray,Oe.count=lr,Oe.uniformMap=Ye,Oe.pass=hr.GLOBE,o._debug.wireframe&&(O0i(ct,o,A),O(m.wireframeVertexArray)&&(Oe.vertexArray=m.wireframeVertexArray,Oe.primitiveType=yn.LINES,Oe.count=lr*2));let Gi=Oe.boundingVolume,li=Oe.orientedBoundingBox;f.mode!==xi.SCENE3D?(wi.fromRectangleWithHeights2D(A.rectangle,f.mapProjection,Qe.minimumHeight,Qe.maximumHeight,Gi),ee.fromElements(Gi.center.z,Gi.center.x,Gi.center.y,Gi.center),f.mode===xi.MORPHING&&(Gi=wi.union(Qe.boundingSphere,Gi,Gi))):(Oe.boundingVolume=wi.clone(Qe.boundingSphere,Gi),Oe.orientedBoundingBox=Hf.clone(Qe.boundingVolume,li)),Oe.dirty=!0,Q&&w.updateDerivedCommands(Oe,f),Drt(Oe,f),ze=ht,Ze=G0i}while(Ne<Je)}var Kbe=Qd;function Lrt(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=Si.clone(Si.MAX_VALUE)}Object.defineProperties(Lrt.prototype,{enabled:{get:function(){return this._enabled},set:function(o){this._enabled=o}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(o){this._frontFaceAlpha=o}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(o){this._frontFaceAlphaByDistance=To.clone(o,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(o){this._backFaceAlpha=o}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(o){this._backFaceAlphaByDistance=To.clone(o,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(o){O(o)||(o=Si.clone(Si.MAX_VALUE)),Si.clone(o,this._rectangle)}}});var LJ=Lrt;function bp(){this._layers=[],this.layerAdded=new br,this.layerRemoved=new br,this.layerMoved=new br,this.layerShownOrHidden=new br}Object.defineProperties(bp.prototype,{length:{get:function(){return this._layers.length}}});bp.prototype.add=function(o,A){O(A)?this._layers.splice(A,0,o):(A=this._layers.length,this._layers.push(o)),this._update(),this.layerAdded.raiseEvent(o,A)};bp.prototype.addImageryProvider=function(o,A){let f=new dD(o);return this.add(f,A),f};bp.prototype.remove=function(o,A){A=Ae(A,!0);let f=this._layers.indexOf(o);return f!==-1?(this._layers.splice(f,1),this._update(),this.layerRemoved.raiseEvent(o,f),A&&o.destroy(),!0):!1};bp.prototype.removeAll=function(o){o=Ae(o,!0);let A=this._layers;for(let f=0,m=A.length;f<m;f++){let C=A[f];this.layerRemoved.raiseEvent(C,f),o&&C.destroy()}this._layers=[]};bp.prototype.contains=function(o){return this.indexOf(o)!==-1};bp.prototype.indexOf=function(o){return this._layers.indexOf(o)};bp.prototype.get=function(o){return this._layers[o]};function poe(o,A){return o.indexOf(A)}function Frt(o,A,f){let m=o._layers;if(A=je.clamp(A,0,m.length-1),f=je.clamp(f,0,m.length-1),A===f)return;let C=m[A];m[A]=m[f],m[f]=C,o._update(),o.layerMoved.raiseEvent(C,f,A)}bp.prototype.raise=function(o){let A=poe(this._layers,o);Frt(this,A,A+1)};bp.prototype.lower=function(o){let A=poe(this._layers,o);Frt(this,A,A-1)};bp.prototype.raiseToTop=function(o){let A=poe(this._layers,o);A!==this._layers.length-1&&(this._layers.splice(A,1),this._layers.push(o),this._update(),this.layerMoved.raiseEvent(o,this._layers.length-1,A))};bp.prototype.lowerToBottom=function(o){let A=poe(this._layers,o);A!==0&&(this._layers.splice(A,1),this._layers.splice(0,0,o),this._update(),this.layerMoved.raiseEvent(o,0,A))};var J0i=new Si;function Nrt(o,A,f,m){let C=o.globe._surface._tilesToRender,y;for(let v=0;!O(y)&&v<C.length;++v){let E=C[v];Si.contains(E.rectangle,A)&&(y=E)}if(!O(y))return;let x=y.data.imagery;for(let v=x.length-1;v>=0;--v){let E=x[v],I=E.readyImagery;if(!O(I))continue;let w=I.imageryLayer.imageryProvider;if(f&&!O(w.pickFeatures)||!Si.contains(I.rectangle,A))continue;let Q=J0i,M=1/1024;Q.west=je.lerp(y.rectangle.west,y.rectangle.east,E.textureCoordinateRectangle.x-M),Q.east=je.lerp(y.rectangle.west,y.rectangle.east,E.textureCoordinateRectangle.z+M),Q.south=je.lerp(y.rectangle.south,y.rectangle.north,E.textureCoordinateRectangle.y-M),Q.north=je.lerp(y.rectangle.south,y.rectangle.north,E.textureCoordinateRectangle.w+M),Si.contains(Q,A)&&m(I)}}bp.prototype.pickImageryLayers=function(o,A){let f=A.globe.pick(o,A);if(!O(f))return;let m=A.globe.ellipsoid.cartesianToCartographic(f),C=[];if(Nrt(A,m,!1,function(y){C.push(y.imageryLayer)}),C.length!==0)return C};bp.prototype.pickImageryLayerFeatures=function(o,A){let f=A.globe.pick(o,A);if(!O(f))return;let m=A.globe.ellipsoid.cartesianToCartographic(f),C=[],y=[];if(Nrt(A,m,!0,function(x){let v=x.imageryLayer.imageryProvider.pickFeatures(x.x,x.y,x.level,m.longitude,m.latitude);O(v)&&(C.push(v),y.push(x.imageryLayer))}),C.length!==0)return Promise.all(C).then(function(x){let v=[];for(let E=0;E<x.length;++E){let I=x[E],w=y[E];if(O(I)&&I.length>0)for(let Q=0;Q<I.length;++Q){let M=I[Q];M.imageryLayer=w,O(M.position)||(M.position=m),v.push(M)}}return v})};bp.prototype.queueReprojectionCommands=function(o){let A=this._layers;for(let f=0,m=A.length;f<m;++f)A[f].queueReprojectionCommands(o)};bp.prototype.cancelReprojections=function(){let o=this._layers;for(let A=0,f=o.length;A<f;++A)o[A].cancelReprojections()};bp.prototype.isDestroyed=function(){return!1};bp.prototype.destroy=function(){return this.removeAll(!0),Qr(this)};bp.prototype._update=function(){let o=!0,A=this._layers,f,m,C,y;for(C=0,y=A.length;C<y;++C)m=A[C],m._layerIndex=C,m.show?(m._isBaseLayer=o,o=!1):m._isBaseLayer=!1,m.show!==m._show&&(O(m._show)&&(O(f)||(f=[]),f.push(m)),m._show=m.show);if(O(f))for(C=0,y=f.length;C<y;++C)m=f[C],this.layerShownOrHidden.raiseEvent(m,m._layerIndex,m.show)};var Ybe=bp;function krt(o){this._ellipsoid=new L5(o.ellipsoid,ee.ZERO)}Object.defineProperties(krt.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var moe=krt;function wv(o){this._tilingScheme=o.tilingScheme,this._x=o.x,this._y=o.y,this._level=o.level,this._parent=o.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=[],this._frameUpdated=void 0,this._lastSelectionResult=sa.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=mC.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0,this.datazh=void 0}wv.createLevelZeroTiles=function(o){let A=o.getNumberOfXTilesAtLevel(0),f=o.getNumberOfYTilesAtLevel(0),m=new Array(A*f),C=0;for(let y=0;y<f;++y)for(let x=0;x<A;++x)m[C++]=new wv({tilingScheme:o,x,y,level:0});return m};wv.prototype._updateCustomData=function(o,A,f){let m=this.customData,C,y,x;if(O(A)&&O(f)){for(m=m.filter(function(v){return f.indexOf(v)===-1}),this._customData=m,x=this._rectangle,C=0;C<A.length;++C)y=A[C],Si.contains(x,y.positionCartographic)&&m.push(y);this._frameUpdated=o}else{let v=this._parent;if(O(v)&&this._frameUpdated!==v._frameUpdated){m.length=0,x=this._rectangle;let E=v.customData;for(C=0;C<E.length;++C)y=E[C],Si.contains(x,y.positionCartographic)&&m.push(y);this._frameUpdated=v._frameUpdated}}};Object.defineProperties(wv.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return O(this._southwestChild)||(this._southwestChild=new wv({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return O(this._southeastChild)||(this._southeastChild=new wv({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return O(this._northwestChild)||(this._northwestChild=new wv({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return O(this._northeastChild)||(this._northeastChild=new wv({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<mC.DONE}},eligibleForUnloading:{get:function(){let o=!0;return O(this.data)&&(o=this.data.eligibleForUnloading,O(o)||(o=!0)),o}}});wv.prototype.findLevelZeroTile=function(o,A,f){let m=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(A<0?A+=m:A>=m&&(A-=m),!(f<0||f>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return o.filter(function(C){return C.x===A&&C.y===f})[0]};wv.prototype.findTileToWest=function(o){let A=this.parent;if(A===void 0)return this.findLevelZeroTile(o,this.x-1,this.y);if(A.southeastChild===this)return A.southwestChild;if(A.northeastChild===this)return A.northwestChild;let f=A.findTileToWest(o);if(f!==void 0)return A.southwestChild===this?f.southeastChild:f.northeastChild};wv.prototype.findTileToEast=function(o){let A=this.parent;if(A===void 0)return this.findLevelZeroTile(o,this.x+1,this.y);if(A.southwestChild===this)return A.southeastChild;if(A.northwestChild===this)return A.northeastChild;let f=A.findTileToEast(o);if(f!==void 0)return A.southeastChild===this?f.southwestChild:f.northwestChild};wv.prototype.findTileToSouth=function(o){let A=this.parent;if(A===void 0)return this.findLevelZeroTile(o,this.x,this.y+1);if(A.northwestChild===this)return A.southwestChild;if(A.northeastChild===this)return A.southeastChild;let f=A.findTileToSouth(o);if(f!==void 0)return A.southwestChild===this?f.northwestChild:f.northeastChild};wv.prototype.findTileToNorth=function(o){let A=this.parent;if(A===void 0)return this.findLevelZeroTile(o,this.x,this.y-1);if(A.southwestChild===this)return A.northwestChild;if(A.southeastChild===this)return A.northeastChild;let f=A.findTileToNorth(o);if(f!==void 0)return A.northwestChild===this?f.southwestChild:f.southeastChild};wv.prototype.freeResources=function(){this.state=mC.START,this.renderable=!1,this.upsampledFromParent=!1,O(this.data)&&O(this.data.freeResources)&&this.data.freeResources(),O(this.data)&&O(this.data.geometryPrimitive)&&(this.data.geometryPrimitive.destroy(),this.data.geometryPrimitive=void 0),v$(this._southwestChild),this._southwestChild=void 0,v$(this._southeastChild),this._southeastChild=void 0,v$(this._northwestChild),this._northwestChild=void 0,v$(this._northeastChild),this._northeastChild=void 0};function v$(o){O(o)&&o.freeResources()}var Coe=wv;function yoe(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}yoe.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head};yoe.prototype.trimTiles=function(o){let A=this.tail,f=!0;for(;f&&O(this._lastBeforeStartOfFrame)&&this.count>o&&O(A);){f=A!==this._lastBeforeStartOfFrame;let m=A.replacementPrevious;A.eligibleForUnloading&&(A.freeResources(),Ort(this,A)),A=m}};function Ort(o,A){let f=A.replacementPrevious,m=A.replacementNext;A===o._lastBeforeStartOfFrame&&(o._lastBeforeStartOfFrame=m),A===o.head?o.head=m:f.replacementNext=m,A===o.tail?o.tail=f:m.replacementPrevious=f,A.replacementPrevious=void 0,A.replacementNext=void 0,--o.count}yoe.prototype.markTileRendered=function(o){let A=this.head;if(A===o){o===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=o.replacementNext);return}if(++this.count,!O(A)){o.replacementPrevious=void 0,o.replacementNext=void 0,this.head=o,this.tail=o;return}(O(o.replacementPrevious)||O(o.replacementNext))&&Ort(this,o),o.replacementPrevious=void 0,o.replacementNext=A,A.replacementPrevious=o,this.head=o};var xoe=yoe;function lw(o){this._tileProvider=o.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};let A=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new xoe,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=Ae(o.maximumScreenSpaceError,2),this.tileCacheSize=Ae(o.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new moe({ellipsoid:A}),this._tileLoadProgressEvent=new br,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(lw.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});lw.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function W0i(o){let A=o._tileReplacementQueue;A.head=void 0,A.tail=void 0,A.count=0,Urt(o);let f=o._levelZeroTiles;if(O(f))for(let m=0;m<f.length;++m){let C=f[m].customData,y=C.length;for(let x=0;x<y;++x){let v=C[x];v.level=0,o._addHeightCallbacks.push(v)}f[m].freeResources()}o._levelZeroTiles=void 0,o._tileProvider.cancelReprojections()}lw.prototype.forEachLoadedTile=function(o){let A=this._tileReplacementQueue.head;for(;O(A);)A.state!==mC.START&&o(A),A=A.replacementNext};lw.prototype.forEachRenderedTile=function(o){let A=this._tilesToRender;for(let f=0,m=A.length;f<m;++f)o(A[f])};lw.prototype.updateHeight=function(o,A){let f=this,m={positionOnEllipsoidSurface:void 0,positionCartographic:o,level:-1,callback:A};return m.removeFunc=function(){let C=f._addHeightCallbacks,y=C.length;for(let x=0;x<y;++x)if(C[x]===m){C.splice(x,1);break}f._removeHeightCallbacks.push(m),m.callback&&(m.callback=void 0)},f._addHeightCallbacks.push(m),m.removeFunc};lw.prototype.update=function(o){O(this._tileProvider.update)&&this._tileProvider.update(o)};function Urt(o){let A=o._debug;A.maxDepth=0,A.maxDepthVisited=0,A.tilesVisited=0,A.tilesCulled=0,A.tilesRendered=0,A.tilesWaitingForChildren=0,o._tileLoadQueueHigh.length=0,o._tileLoadQueueMedium.length=0,o._tileLoadQueueLow.length=0}lw.prototype.beginFrame=function(o){!o.passes.render||(this._tilesInvalidated&&(W0i(this),this._tilesInvalidated=!1),this._tileProvider.initialize(o),Urt(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())};lw.prototype.render=function(o){let A=o.passes,f=this._tileProvider;A.render&&(f.beginUpdate(o),Z0i(this,o),lpi(this,o),f.endUpdate(o)),A.pick&&this._tilesToRender.length>0&&f.updateForPick(o)};function j0i(o,A){let f=o._tileLoadQueueHigh.length+o._tileLoadQueueMedium.length+o._tileLoadQueueLow.length;if(f!==o._lastTileLoadQueueLength||o._tilesInvalidated){let C=br.prototype.raiseEvent.bind(o._tileLoadProgressEvent,f);A.afterRender.push(()=>(C(),!0)),o._lastTileLoadQueueLength=f}let m=o._debug;m.enableDebugOutput&&!m.suspendLodUpdate&&(m.maxDepth=o._tilesToRender.reduce(function(C,y){return Math.max(C,y.level)},-1),m.tilesRendered=o._tilesToRender.length,(m.tilesVisited!==m.lastTilesVisited||m.tilesRendered!==m.lastTilesRendered||m.tilesCulled!==m.lastTilesCulled||m.maxDepth!==m.lastMaxDepth||m.tilesWaitingForChildren!==m.lastTilesWaitingForChildren||m.maxDepthVisited!==m.lastMaxDepthVisited)&&(console.log(`Visited ${m.tilesVisited}, Rendered: ${m.tilesRendered}, Culled: ${m.tilesCulled}, Max Depth Rendered: ${m.maxDepth}, Max Depth Visited: ${m.maxDepthVisited}, Waiting for children: ${m.tilesWaitingForChildren}`),m.lastTilesVisited=m.tilesVisited,m.lastTilesRendered=m.tilesRendered,m.lastTilesCulled=m.tilesCulled,m.lastMaxDepth=m.maxDepth,m.lastTilesWaitingForChildren=m.tilesWaitingForChildren,m.lastMaxDepthVisited=m.maxDepthVisited))}lw.prototype.endFrame=function(o){!o.passes.render||o.mode===xi.MORPHING||(npi(this,o),spi(this,o),j0i(this,o))};lw.prototype.isDestroyed=function(){return!1};lw.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var Zz,SVe=new Kt;function q0i(o,A){let f=Si.center(o.rectangle,SVe),m=f.longitude-Zz.longitude,C=f.latitude-Zz.latitude;f=Si.center(A.rectangle,SVe);let y=f.longitude-Zz.longitude,x=f.latitude-Zz.latitude;return m*m+C*C-(y*y+x*x)}var X0i=new ee,vz=[];function Z0i(o,A){let f=o._debug;if(f.suspendLodUpdate)return;let m=o._tilesToRender;m.length=0;let C,y=o._tileProvider;if(!O(o._levelZeroTiles))if(y.ready){let D=y.tilingScheme;o._levelZeroTiles=Coe.createLevelZeroTiles(D);let F=o._levelZeroTiles.length;if(vz.length<F)for(vz=new Array(F),C=0;C<F;++C)vz[C]===void 0&&(vz[C]=new $z)}else return;o._occluders.ellipsoid.cameraPosition=A.camera.positionWC;let x,v=o._levelZeroTiles,E=v.length>1?o._occluders:void 0;Zz=A.camera.positionCartographic,v.sort(q0i);let I=o._addHeightCallbacks,w=o._removeHeightCallbacks,Q=A.frameNumber,M;if(I.length>0||w.length>0){for(C=0,M=v.length;C<M;++C)x=v[C],x._updateCustomData(Q,I,w);I.length=0,w.length=0}let B=A.camera;o._cameraPositionCartographic=B.positionCartographic;let T=Xe.getTranslation(B.transform,X0i);for(o._cameraReferenceFrameOriginCartographic=o.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(T,o._cameraReferenceFrameOriginCartographic),C=0,M=v.length;C<M;++C)x=v[C],o._tileReplacementQueue.markTileRendered(x),x.renderable?ey(o,x,y,A,E,!1,vz[C]):(rM(o,o._tileLoadQueueHigh,x,A),++f.tilesWaitingForChildren);o._lastSelectionFrameNumber=Q}function rM(o,A,f,m){!f.needsLoading||(o.tileProvider.computeTileLoadPriority!==void 0&&(f._loadPriority=o.tileProvider.computeTileLoadPriority(f,m)),A.push(f))}function $z(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function Grt(){this.southwest=new $z,this.southeast=new $z,this.northwest=new $z,this.northeast=new $z}Grt.prototype.combine=function(o){let A=this.southwest,f=this.southeast,m=this.northwest,C=this.northeast;o.allAreRenderable=A.allAreRenderable&&f.allAreRenderable&&m.allAreRenderable&&C.allAreRenderable,o.anyWereRenderedLastFrame=A.anyWereRenderedLastFrame||f.anyWereRenderedLastFrame||m.anyWereRenderedLastFrame||C.anyWereRenderedLastFrame,o.notYetRenderableCount=A.notYetRenderableCount+f.notYetRenderableCount+m.notYetRenderableCount+C.notYetRenderableCount};var hCe=new Array(31);for(let o=0;o<hCe.length;++o)hCe[o]=new Grt;function $0i(o,A,f,m,C){let y=o._debug;++y.tilesVisited,o._tileReplacementQueue.markTileRendered(f),f._updateCustomData(A.frameNumber),f.level>y.maxDepthVisited&&(y.maxDepthVisited=f.level);let x=ipi(o,A,f)<o.maximumScreenSpaceError,v=f.southwestChild,E=f.southeastChild,I=f.northwestChild,w=f.northeastChild,Q=o._lastSelectionFrameNumber,M=f._lastSelectionResultFrame===Q?f._lastSelectionResult:sa.NONE,B=o.tileProvider;if(x||m){let T=sa.originalResult(M)===sa.RENDERED,D=sa.originalResult(M)===sa.CULLED||M===sa.NONE,F=f.state===mC.DONE,L=T||D||F;if(L||O(B.canRenderWithoutLosingDetail)&&(L=B.canRenderWithoutLosingDetail(f)),L){x&&rM(o,o._tileLoadQueueMedium,f,A),E$(o,f),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1,f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,C.anyWereRenderedLastFrame||o._tileToUpdateHeights.push(f);return}m=!0,x&&rM(o,o._tileLoadQueueHigh,f,A)}if(B.canRefine(f)){if(v.upsampledFromParent&&E.upsampledFromParent&&I.upsampledFromParent&&w.upsampledFromParent){E$(o,f),rM(o,o._tileLoadQueueMedium,f,A),o._tileReplacementQueue.markTileRendered(v),o._tileReplacementQueue.markTileRendered(E),o._tileReplacementQueue.markTileRendered(I),o._tileReplacementQueue.markTileRendered(w),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1,f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,C.anyWereRenderedLastFrame||o._tileToUpdateHeights.push(f);return}f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.REFINED;let T=o._tilesToRender.length,D=o._tileLoadQueueLow.length,F=o._tileLoadQueueMedium.length,L=o._tileLoadQueueHigh.length,R=o._tileToUpdateHeights.length;if(epi(o,v,E,I,w,A,m,C),T!==o._tilesToRender.length){let k=C.allAreRenderable,U=C.anyWereRenderedLastFrame,V=C.notYetRenderableCount,H=!1;if(!k&&!U){let q=o._tilesToRender;for(let Z=T;Z<q.length;++Z){let oe=q[Z];for(;oe!==void 0&&oe._lastSelectionResult!==sa.KICKED&&oe!==f;)oe._lastSelectionResult=sa.kick(oe._lastSelectionResult),oe=oe.parent}o._tilesToRender.length=T,o._tileToUpdateHeights.length=R,E$(o,f),f._lastSelectionResult=sa.RENDERED;let ie=M===sa.RENDERED;!ie&&V>o.loadingDescendantLimit&&(o._tileLoadQueueLow.length=D,o._tileLoadQueueMedium.length=F,o._tileLoadQueueHigh.length=L,rM(o,o._tileLoadQueueMedium,f,A),C.notYetRenderableCount=f.renderable?0:1,H=!0),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=ie,ie||o._tileToUpdateHeights.push(f),++y.tilesWaitingForChildren}o.preloadAncestors&&!H&&rM(o,o._tileLoadQueueLow,f,A)}return}f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,E$(o,f),rM(o,o._tileLoadQueueHigh,f,A),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1}function epi(o,A,f,m,C,y,x,v){let E=y.camera.positionCartographic,I=o._tileProvider,w=o._occluders,Q=hCe[A.level],M=Q.southwest,B=Q.southeast,T=Q.northwest,D=Q.northeast;E.longitude<A.rectangle.east?E.latitude<A.rectangle.north?(ey(o,A,I,y,w,x,M),ey(o,f,I,y,w,x,B),ey(o,m,I,y,w,x,T),ey(o,C,I,y,w,x,D)):(ey(o,m,I,y,w,x,T),ey(o,A,I,y,w,x,M),ey(o,C,I,y,w,x,D),ey(o,f,I,y,w,x,B)):E.latitude<A.rectangle.north?(ey(o,f,I,y,w,x,B),ey(o,A,I,y,w,x,M),ey(o,C,I,y,w,x,D),ey(o,m,I,y,w,x,T)):(ey(o,C,I,y,w,x,D),ey(o,m,I,y,w,x,T),ey(o,f,I,y,w,x,B),ey(o,A,I,y,w,x,M)),Q.combine(v)}function tpi(o,A){let f=A.rectangle;return O(o._cameraPositionCartographic)&&Si.contains(f,o._cameraPositionCartographic)||O(o._cameraReferenceFrameOriginCartographic)&&Si.contains(f,o._cameraReferenceFrameOriginCartographic)}function ey(o,A,f,m,C,y,x){if(f.computeTileVisibility(A,m,C)!==vg.NONE)return $0i(o,m,A,y,x);if(++o._debug.tilesCulled,o._tileReplacementQueue.markTileRendered(A),x.allAreRenderable=!0,x.anyWereRenderedLastFrame=!1,x.notYetRenderableCount=0,tpi(o,A)){(!O(A.data)||!O(A.data.vertexArray))&&rM(o,o._tileLoadQueueMedium,A,m);let v=o._lastSelectionFrameNumber,E=A._lastSelectionResultFrame===v?A._lastSelectionResult:sa.NONE;E!==sa.CULLED_BUT_NEEDED&&E!==sa.RENDERED&&o._tileToUpdateHeights.push(A),A._lastSelectionResult=sa.CULLED_BUT_NEEDED}else(o.preloadSiblings||A.level===0)&&rM(o,o._tileLoadQueueLow,A,m),A._lastSelectionResult=sa.CULLED;A._lastSelectionResultFrame=m.frameNumber}function ipi(o,A,f){if(A.mode===xi.SCENE2D||A.camera.frustum instanceof Ds||A.camera.frustum instanceof Y0)return rpi(o,A,f);let m=o._tileProvider.getLevelMaximumGeometricError(f.level),C=f._distance,y=A.context.drawingBufferHeight,x=A.camera.frustum.sseDenominator,v=m*y/(C*x);return A.fog.enabled&&(v-=je.fog(C,A.fog.density)*A.fog.sse),v/=A.pixelRatio,v}function rpi(o,A,f){let m=A.camera.frustum;O(m._offCenterFrustum)&&(m=m._offCenterFrustum);let C=A.context,y=C.drawingBufferWidth,x=C.drawingBufferHeight,v=o._tileProvider.getLevelMaximumGeometricError(f.level),E=Math.max(m.top-m.bottom,m.right-m.left)/Math.max(y,x),I=v/E;return A.fog.enabled&&A.mode!==xi.SCENE2D&&(I-=je.fog(f._distance,A.fog.density)*A.fog.sse),I/=A.pixelRatio,I}function E$(o,A){o._tilesToRender.push(A)}function npi(o,A){let f=o._tileLoadQueueHigh,m=o._tileLoadQueueMedium,C=o._tileLoadQueueLow;if(f.length===0&&m.length===0&&C.length===0)return;o._tileReplacementQueue.trimTiles(o.tileCacheSize);let y=GA()+o._loadQueueTimeSlice,x=o._tileProvider,v=D0e(o,A,x,y,f,!1);v=D0e(o,A,x,y,m,v),D0e(o,A,x,y,C,v)}function opi(o,A){return o._loadPriority-A._loadPriority}function D0e(o,A,f,m,C,y){f.computeTileLoadPriority!==void 0&&C.sort(opi);for(let x=0,v=C.length;x<v&&(GA()<m||!y);++x){let E=C[x];o._tileReplacementQueue.markTileRendered(E),f.loadTile(A,E),y=!0}return y}var UU=new ls,T0e=new Kt,vL=new ee,api=[];function spi(o,A){if(!o.tileProvider.ready)return;let f=api;f.length=0;let m=o._tileToUpdateHeights,C=GA(),y=o._updateHeightsTimeSlice,x=C+y,v=A.mode,E=A.mapProjection,I=o.tileProvider.tilingScheme.ellipsoid,w;for(;m.length>0;){let Q=m[0];if(!O(Q.data)||!O(Q.data.mesh)){let D=Q._lastSelectionResultFrame===o._lastSelectionFrameNumber?Q._lastSelectionResult:sa.NONE;(D===sa.RENDERED||D===sa.CULLED_BUT_NEEDED)&&f.push(Q),m.shift(),o._lastTileIndex=0;continue}let M=Q.customData,B=M.length,T=!1;for(w=o._lastTileIndex;w<B;++w){let D=M[w],F=Q.data.terrainData,L=O(F)&&F.wasCreatedByUpsampling();if(Q.level>D.level&&!L){if(O(D.positionOnEllipsoidSurface)||(D.positionOnEllipsoidSurface=ee.fromRadians(D.positionCartographic.longitude,D.positionCartographic.latitude,0,I)),v===xi.SCENE3D){let k=I.geodeticSurfaceNormal(D.positionOnEllipsoidSurface,UU.direction),U=I.getSurfaceNormalIntersectionWithZAxis(D.positionOnEllipsoidSurface,11500,UU.origin);if(!O(U)){let V=0;O(Q.data.tileBoundingRegion)&&(V=Q.data.tileBoundingRegion.minimumHeight);let H=Math.min(V,-11500),q=ee.multiplyByScalar(k,Math.abs(H)+1,vL);ee.subtract(D.positionOnEllipsoidSurface,q,UU.origin)}}else Kt.clone(D.positionCartographic,T0e),T0e.height=-11500,E.project(T0e,vL),ee.fromElements(vL.z,vL.x,vL.y,vL),ee.clone(vL,UU.origin),ee.clone(ee.UNIT_X,UU.direction);let R=Q.data.pick(UU,v,E,!1,vL);O(R)&&(O(D.callback)&&D.callback(R),D.level=Q.level)}if(GA()>=x){T=!0;break}}if(T){o._lastTileIndex=w;break}else o._lastTileIndex=0,m.shift()}for(w=0;w<f.length;w++)m.push(f[w])}function lpi(o,A){let f=o._tileProvider,m=o._tilesToRender;for(let C=0,y=m.length;C<y;++C){let x=m[C];f.showTileThisFrame(x,A)}}var BP=lw;function cB(o,A){this._scene=A,o=Ae(o,Di.WGS84);let f=new IP({ellipsoid:o}),m=new Ybe;this._ellipsoid=o,this._imageryLayerCollection=m,this._spotMaterial=void 0,this._surfaceShaderSet=new Hbe,this._material=void 0,this._surface=new BP({tileProvider:new Kbe({terrainProvider:f,imageryLayers:m,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=f,this._terrainProviderChanged=new br,this._undergroundColor=At.clone(At.BLACK),this._undergroundColorAlphaByDistance=new To(o.maximumRadius/1e3,0,o.maximumRadius/5,1),this._translucency=new LJ,this._clipPlanes=[],nG(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new An({url:xs("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this.fillHighlightColor=void 0,this.enableLighting=!1,this.lambertDiffuseMultiplier=.9,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!0,this.atmosphereLightIntensity=10,this.atmosphereRayleighCoefficient=new ee(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new ee(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.lightingFadeOutDistance=1e7,this.lightingFadeInDistance=2e7,this.nightFadeOutDistance=1e7,this.nightFadeInDistance=5e7,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!0,this.shadows=Al.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.terrainExaggeration=1,this.terrainExaggerationRelativeHeight=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0,this._flattenPolygonRegion={},this._flattenUniforms=void 0,this._graticulesEnable=!0,this._graticulesLevel=1}Object.defineProperties(cB.prototype,{flattenPolygonRegion:{get:function(){return this._flattenPolygonRegion},set:function(o){this._flattenPolygonRegion=o}},flattenUniforms:{get:function(){return this._flattenUniforms},set:function(o){this._flattenUniforms!==o&&(this._flattenUniforms=o,nG(this))}},ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tilesLoaded:{get:function(){return O(this._surface)?this._surface.tileProvider.ready&&this._surface._tileLoadQueueHigh.length===0&&this._surface._tileLoadQueueMedium.length===0&&this._surface._tileLoadQueueLow.length===0:!0}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(o){this._surface.tileProvider.baseColor=o}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(o){this._surface.tileProvider.clippingPlanes=o}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(o){O(o)||(o=Si.clone(Si.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=o}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(o){this._oceanNormalMapResource.url=o,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(o){o!==this._terrainProvider&&(this._terrainProvider=o,this._terrainProviderChanged.raiseEvent(o),O(this._material)&&nG(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(o){this._material!==o&&(this._material=o,nG(this))}},undergroundColor:{get:function(){return this._undergroundColor},set:function(o){this._undergroundColor=At.clone(o,this._undergroundColor)}},spotMaterial:{get:function(){return this._spotMaterial},set:function(o){this._spotMaterial!==o&&(this._spotMaterial=o,nG(this))}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(o){this._undergroundColorAlphaByDistance=To.clone(o,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}},graticulesLevel:{get:function(){return this._graticulesLevel},set:function(o){this._graticulesLevel!==o&&(this._graticulesLevel=o)}},clipPlanes:{get:function(){return this._clipPlanes},set:function(o){this._clipPlanes=o,nG(this)}}});function nG(o){let A=[],f=O(o._material)&&(o._material.shaderSource.match(/slope/)||o._material.shaderSource.match("normalEC")),m=[L8,Kte];O(o._material)&&(!f||o._terrainProvider.requestVertexNormals)?(m.push(o._material.shaderSource),A.push("APPLY_MATERIAL"),o._surface._tileProvider.materialUniformMap=o._material._uniforms):O(o._spotMaterial)?(m.push(o._spotMaterial.shaderSource),A.push("APPLY_SPOT"),o._surface._tileProvider.materialUniformMap=o._spotMaterial._uniforms):o.flattenUniforms?(o._surface._tileProvider.materialUniformMap=o.flattenUniforms,A.push("APPLY_FLATTEN")):o._surface._tileProvider.materialUniformMap=void 0,m.push(Obe),o._clipPlanes.length>0&&A.push("SHOW_CONTOUR_LINE"),o._surfaceShaderSet.baseVertexShaderSource=new Fr({sources:[L8,Kte,Ube],defines:A}),o._surfaceShaderSet.baseFragmentShaderSource=new Fr({sources:m,defines:A}),o._material?o._surfaceShaderSet.material=o._material:o._spotMaterial?o._surfaceShaderSet.material=o._spotMaterial:o._surfaceShaderSet.material=void 0}function Hrt(o){return function(A,f){let m=wi.distanceSquaredTo(A.pickBoundingSphere,o),C=wi.distanceSquaredTo(f.pickBoundingSphere,o);return m-C}}var Jbe=[],Vrt={start:0,stop:0};cB.prototype.pickWorldCoordinates=function(o,A,f,m){f=Ae(f,!0);let C=A.mode,y=A.mapProjection,x=Jbe;x.length=0;let v=this._surface._tilesToRender,E=v.length,I,w;for(w=0;w<E;++w){I=v[w];let M=I.data;if(!O(M))continue;let B=M.pickBoundingSphere;if(C!==xi.SCENE3D)M.pickBoundingSphere=B=wi.fromRectangleWithHeights2D(I.rectangle,y,M.tileBoundingRegion.minimumHeight,M.tileBoundingRegion.maximumHeight,B),ee.fromElements(B.center.z,B.center.x,B.center.y,B.center);else if(O(M.renderedMesh))wi.clone(M.tileBoundingRegion.boundingSphere,B);else continue;let T=kA.raySphere(o,B,Vrt);O(T)&&x.push(M)}x.sort(Hrt(o.origin));let Q;for(E=x.length,w=0;w<E&&(Q=x[w].pick(o,A.mode,A.mapProjection,f,m),!O(Q));++w);return Q};cB.prototype.drawTileContourLine=function(o,A,f){let m=Jbe;m.length=0;let C=this._surface._tilesToRender,y=C.length;for(let x=0;x<y;++x){let v=C[x],E=v.data;!O(E)||E.drawContourLine(v,o,A.mode,A.mapProjection,f)}};cB.prototype.pickTriangle=function(o,A,f,m){f=Ae(f,!0);let C=A.mode,y=A.mapProjection,x=Jbe;x.length=0;let v=this._surface._tilesToRender,E=v.length,I,w;for(w=0;w<E;++w){I=v[w];let M=I.data;if(!O(M))continue;let B=M.pickBoundingSphere;if(C!==xi.SCENE3D)M.pickBoundingSphere=B=wi.fromRectangleWithHeights2D(I.rectangle,y,M.tileBoundingRegion.minimumHeight,M.tileBoundingRegion.maximumHeight,B),ee.fromElements(B.center.z,B.center.x,B.center.y,B.center);else if(O(M.renderedMesh))wi.clone(M.tileBoundingRegion.boundingSphere,B);else continue;let T=kA.raySphere(o,B,Vrt);O(T)&&x.push(M)}x.sort(Hrt(o.origin));let Q;for(E=x.length,w=0;w<E&&(Q=x[w].pickTriangle(o,A.mode,A.mapProjection,f,m),!O(Q));++w);return Q};var upi=new Kt;cB.prototype.pick=function(o,A,f){if(f=this.pickWorldCoordinates(o,A,!0,f),O(f)&&A.mode!==xi.SCENE3D){f=ee.fromElements(f.y,f.z,f.x,f);let m=A.mapProjection.unproject(f,upi);f=A.globe.ellipsoid.cartographicToCartesian(m,f)}return f};var cpi=new ee,DVe=new ee,Api=new Kt,hpi=new ls;function M0e(o,A){return O(o)&&Si.contains(o.rectangle,A)?o:void 0}cB.prototype.getHeight=function(o){let A=this._surface._levelZeroTiles;if(!O(A))return;let f,m,C=A.length;for(m=0;m<C&&(f=A[m],!Si.contains(f.rectangle,o));++m);if(m>=C)return;let y=f;for(;O(f);)f=M0e(f._southwestChild,o)||M0e(f._southeastChild,o)||M0e(f._northwestChild,o)||f._northeastChild,O(f)&&O(f.data)&&O(f.data.renderedMesh)&&(y=f);if(f=y,!O(f)||!O(f.data)||!O(f.data.renderedMesh))return;let x=this._surface._tileProvider.tilingScheme.projection,v=this._surface._tileProvider.tilingScheme.ellipsoid,E=ee.fromRadians(o.longitude,o.latitude,0,v,cpi),I=hpi,w=v.geodeticSurfaceNormal(E,I.direction),Q=v.getSurfaceNormalIntersectionWithZAxis(E,11500,I.origin);if(!O(Q)){let B;O(f.data.tileBoundingRegion)&&(B=f.data.tileBoundingRegion.minimumHeight);let T=Math.min(Ae(B,0),-11500),D=ee.multiplyByScalar(w,Math.abs(T)+1,DVe);ee.subtract(E,D,I.origin)}let M=f.data.pick(I,void 0,x,!1,DVe);if(O(M))return v.cartesianToCartographic(M,Api).height};cB.prototype.update=function(o){!this.show||o.passes.render&&this._surface.update(o)};cB.prototype.beginFrame=function(o){let A=this._surface,f=A.tileProvider,m=this.terrainProvider,C=this.showWaterEffect&&m.ready&&m.hasWaterMask;if(C&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;let v=this._oceanNormalMapResource,E=v.url;if(O(E)){let I=this;v.fetchImage().then(function(w){E===I._oceanNormalMapResource.url&&(I._oceanNormalMap=I._oceanNormalMap&&I._oceanNormalMap.destroy(),I._oceanNormalMap=new mo({context:o.context,source:w}))})}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}let y=o.passes,x=o.mode;y.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,A.maximumScreenSpaceError=this.maximumScreenSpaceError,A.tileCacheSize=this.tileCacheSize,A.loadingDescendantLimit=this.loadingDescendantLimit,A.preloadAncestors=this.preloadAncestors,A.preloadSiblings=this.preloadSiblings,f.terrainProvider=this.terrainProvider,f.lightingFadeOutDistance=this.lightingFadeOutDistance,f.lightingFadeInDistance=this.lightingFadeInDistance,f.nightFadeOutDistance=this.nightFadeOutDistance,f.nightFadeInDistance=this.nightFadeInDistance,f.zoomedOutOceanSpecularIntensity=x===xi.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,f.hasWaterMask=C,f.oceanNormalMap=this._oceanNormalMap,f.enableLighting=this.enableLighting,f.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,f.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,f.showGroundAtmosphere=this.showGroundAtmosphere,f.atmosphereLightIntensity=this.atmosphereLightIntensity,f.atmosphereRayleighCoefficient=this.atmosphereRayleighCoefficient,f.atmosphereMieCoefficient=this.atmosphereMieCoefficient,f.atmosphereRayleighScaleHeight=this.atmosphereRayleighScaleHeight,f.atmosphereMieScaleHeight=this.atmosphereMieScaleHeight,f.atmosphereMieAnisotropy=this.atmosphereMieAnisotropy,f.shadows=this.shadows,f.hueShift=this.atmosphereHueShift,f.saturationShift=this.atmosphereSaturationShift,f.brightnessShift=this.atmosphereBrightnessShift,f.fillHighlightColor=this.fillHighlightColor,f.showSkirts=this.showSkirts,f.backFaceCulling=this.backFaceCulling,f.undergroundColor=this._undergroundColor,f.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,f.lambertDiffuseMultiplier=this.lambertDiffuseMultiplier,f._flattenPolygonRegion=this._flattenPolygonRegion,f.graticulesLevel=this._graticulesLevel,f.graticulesEnable=this._graticulesEnable,f.clipPlanes=this._clipPlanes,A.beginFrame(o))};cB.prototype.render=function(o){!this.show||(O(this._material)&&this._material.update(o.context),this.drawTileContourLine(this._clipPlanes,this._scene,o),this._surface.render(o))};cB.prototype.endFrame=function(o){!this.show||o.passes.render&&this._surface.endFrame(o)};cB.prototype.isDestroyed=function(){return!1};cB.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),Qr(this)};var voe=cB;function dpi(o,A,f,m){this.rightAscension=o,this.declination=A,this.rotation=f,this.rotationRate=m}var Wbe=dpi,zrt={},fpi=32.184,gpi=2451545,TVe=-.0529921,MVe=-.1059842,PVe=13.0120009,RVe=13.3407154,LVe=.9856003,FVe=26.4057084,NVe=13.064993,kVe=.3287146,OVe=1.7484877,UVe=-.1589763,GVe=.0036096,HVe=.1643573,VVe=12.9590088,P0e=new fi;zrt.ComputeMoon=function(o,A){O(o)||(o=fi.now()),P0e=fi.addSeconds(o,fpi,P0e);let f=fi.totalDays(P0e)-gpi,m=f/Uu.DAYS_PER_JULIAN_CENTURY,C=(125.045+TVe*f)*je.RADIANS_PER_DEGREE,y=(250.089+MVe*f)*je.RADIANS_PER_DEGREE,x=(260.008+PVe*f)*je.RADIANS_PER_DEGREE,v=(176.625+RVe*f)*je.RADIANS_PER_DEGREE,E=(357.529+LVe*f)*je.RADIANS_PER_DEGREE,I=(311.589+FVe*f)*je.RADIANS_PER_DEGREE,w=(134.963+NVe*f)*je.RADIANS_PER_DEGREE,Q=(276.617+kVe*f)*je.RADIANS_PER_DEGREE,M=(34.226+OVe*f)*je.RADIANS_PER_DEGREE,B=(15.134+UVe*f)*je.RADIANS_PER_DEGREE,T=(119.743+GVe*f)*je.RADIANS_PER_DEGREE,D=(239.961+HVe*f)*je.RADIANS_PER_DEGREE,F=(25.053+VVe*f)*je.RADIANS_PER_DEGREE,L=Math.sin(C),R=Math.sin(y),k=Math.sin(x),U=Math.sin(v),V=Math.sin(E),H=Math.sin(I),q=Math.sin(w),ie=Math.sin(Q),Z=Math.sin(M),oe=Math.sin(B),ne=Math.sin(T),se=Math.sin(D),ce=Math.sin(F),j=Math.cos(C),de=Math.cos(y),me=Math.cos(x),_e=Math.cos(v),Be=Math.cos(E),Qe=Math.cos(I),Ie=Math.cos(w),ve=Math.cos(Q),K=Math.cos(M),W=Math.cos(B),te=Math.cos(T),Y=Math.cos(D),he=Math.cos(F),fe=(269.9949+.0031*m-3.8787*L-.1204*R+.07*k-.0172*U+.0072*H-.0052*oe+.0043*ce)*je.RADIANS_PER_DEGREE,Ce=(66.5392+.013*m+1.5419*j+.0239*de-.0278*me+.0068*_e-.0029*Qe+9e-4*Ie+8e-4*W-9e-4*he)*je.RADIANS_PER_DEGREE,Ee=(38.3213+13.17635815*f-14e-13*f*f+3.561*L+.1208*R-.0642*k+.0158*U+.0252*V-.0066*H-.0047*q-.0046*ie+.0028*Z+.0052*oe+.004*ne+.0019*se-.0044*ce)*je.RADIANS_PER_DEGREE,be=(13.17635815-14e-13*(2*f)+3.561*j*TVe+.1208*de*MVe-.0642*me*PVe+.0158*_e*RVe+.0252*Be*LVe-.0066*Qe*FVe-.0047*Ie*NVe-.0046*ve*kVe+.0028*K*OVe+.0052*W*UVe+.004*te*GVe+.0019*Y*HVe-.0044*he*VVe)/86400*je.RADIANS_PER_DEGREE;return O(A)||(A=new Wbe),A.rightAscension=fe,A.declination=Ce,A.rotation=Ee,A.rotationRate=be,A};var jbe=zrt;function Krt(o){(!O(o)||typeof o!="function")&&(o=jbe.ComputeMoon),this._computeFunction=o}var ppi=new ee,mpi=new ee,Cpi=new ee;function ypi(o,A,f){let m=ppi;m.x=Math.cos(o+je.PI_OVER_TWO),m.y=Math.sin(o+je.PI_OVER_TWO),m.z=0;let C=Math.cos(A),y=Cpi;y.x=C*Math.cos(o),y.y=C*Math.sin(o),y.z=Math.sin(A);let x=ee.cross(y,m,mpi);return O(f)||(f=new ci),f[0]=m.x,f[1]=x.x,f[2]=y.x,f[3]=m.y,f[4]=x.y,f[5]=y.y,f[6]=m.z,f[7]=x.z,f[8]=y.z,f}var xpi=new ci,vpi=new jr;Krt.prototype.evaluate=function(o,A){O(o)||(o=fi.now());let f=this._computeFunction(o),m=ypi(f.rightAscension,f.declination,A),C=je.zeroToTwoPi(f.rotation),y=jr.fromAxisAngle(ee.UNIT_Z,C,vpi),x=ci.fromQuaternion(jr.conjugate(y,y),xpi);return ci.multiply(x,m,m)};var qbe=Krt,Xbe={};function Epi(o){let A=6.239996+.0172019696544*o;return .001657*Math.sin(A+.01671*Math.sin(A))}var Ipi=32.184,_pi=2451545;function Yrt(o,A){A=fi.addSeconds(o,Ipi,A);let f=fi.totalDays(A)-_pi;return A=fi.addSeconds(A,Epi(f),A),A}var Wte=new fi(2451545,0,nu.TAI),Bpi=1e3,v1=je.RADIANS_PER_DEGREE,S_=je.RADIANS_PER_ARCSECOND,gy=14959787e4,zVe=new ci;function Jrt(o,A,f,m,C,y,x){f<0&&(f=-f,C+=je.PI);let v=o*(1-A),E=m-C,I=C,w=bpi(y-m,A),Q=wpi(A,0);Mpi(E,f,I,zVe);let M=v*(1+A),B=Math.cos(w),T=Math.sin(w),D=1+A*B,F=M/D;return O(x)?(x.x=F*B,x.y=F*T,x.z=0):x=new ee(F*B,F*T,0),ci.multiplyByVector(zVe,x,x)}function wpi(o,A){return o<=A?"Circular":o<1-A?"Elliptical":o<=1+A?"Parabolic":"Hyperbolic"}function bpi(o,A){let f=Dpi(o,A);return Tpi(f,A)}var Qpi=50,Spi=je.EPSILON8;function Dpi(o,A){let f=Math.floor(o/je.TWO_PI);o-=f*je.TWO_PI;let m=o+A*Math.sin(o)/(1-Math.sin(o+A)+Math.sin(o)),C=Number.MAX_VALUE,y;for(y=0;y<Qpi&&Math.abs(C-m)>Spi;++y){C=m;let x=C-A*Math.sin(C)-o,v=1-A*Math.cos(C);m=C-x/v}return C=m+f*je.TWO_PI,C}function Tpi(o,A){let f=Math.floor(o/je.TWO_PI);o-=f*je.TWO_PI;let m=Math.cos(o)-A,C=Math.sin(o)*Math.sqrt(1-A*A),y=Math.atan2(C,m);return y=je.zeroToTwoPi(y),o<0&&(y-=je.TWO_PI),y+=f*je.TWO_PI,y}function Mpi(o,A,f,m){let C=Math.cos(o),y=Math.sin(o),x=Math.cos(A),v=Math.sin(A),E=Math.cos(f),I=Math.sin(f);return O(m)?(m[0]=E*C-I*y*x,m[1]=I*C+E*y*x,m[2]=y*v,m[3]=-E*y-I*C*x,m[4]=-I*y+E*C*x,m[5]=C*v,m[6]=I*v,m[7]=-E*v,m[8]=x):m=new ci(E*C-I*y*x,-E*y-I*C*x,I*v,I*C+E*y*x,-I*y+E*C*x,-E*v,y*v,C*v,x),m}var Ppi=1.0000010178*gy,Rpi=100.46645683*v1,Lpi=129597742283429e-5*S_,KVe=16002,YVe=21863,JVe=32004,WVe=10931,jVe=14529,qVe=16368,XVe=15318,ZVe=32794,Fpi=64*1e-7*gy,Npi=-152*1e-7*gy,kpi=62*1e-7*gy,Opi=-8*1e-7*gy,Upi=32*1e-7*gy,Gpi=-41*1e-7*gy,Hpi=19*1e-7*gy,Vpi=-11*1e-7*gy,zpi=-150*1e-7*gy,Kpi=-46*1e-7*gy,Ypi=68*1e-7*gy,Jpi=54*1e-7*gy,Wpi=14*1e-7*gy,jpi=24*1e-7*gy,qpi=-28*1e-7*gy,Xpi=22*1e-7*gy,$Ve=10,e9e=16002,t9e=21863,i9e=10931,r9e=1473,n9e=32004,o9e=4387,a9e=73,Zpi=-325*1e-7,$pi=-322*1e-7,emi=-79*1e-7,tmi=232*1e-7,imi=-52*1e-7,rmi=97*1e-7,nmi=55*1e-7,omi=-41*1e-7,ami=-105*1e-7,smi=-137*1e-7,lmi=258*1e-7,umi=35*1e-7,cmi=-116*1e-7,Ami=-88*1e-7,hmi=-112*1e-7,dmi=-80*1e-7,XG=new fi(0,0,nu.TAI);function fmi(o,A){Yrt(o,XG);let f=(XG.dayNumber-Wte.dayNumber+(XG.secondsOfDay-Wte.secondsOfDay)/Uu.SECONDS_PER_DAY)/(Uu.DAYS_PER_JULIAN_CENTURY*10),m=.3595362*f,C=Ppi+Fpi*Math.cos(KVe*m)+zpi*Math.sin(KVe*m)+Npi*Math.cos(YVe*m)+Kpi*Math.sin(YVe*m)+kpi*Math.cos(JVe*m)+Ypi*Math.sin(JVe*m)+Opi*Math.cos(WVe*m)+Jpi*Math.sin(WVe*m)+Upi*Math.cos(jVe*m)+Wpi*Math.sin(jVe*m)+Gpi*Math.cos(qVe*m)+jpi*Math.sin(qVe*m)+Hpi*Math.cos(XVe*m)+qpi*Math.sin(XVe*m)+Vpi*Math.cos(ZVe*m)+Xpi*Math.sin(ZVe*m),y=Rpi+Lpi*f+Zpi*Math.cos($Ve*m)+ami*Math.sin($Ve*m)+$pi*Math.cos(e9e*m)+smi*Math.sin(e9e*m)+emi*Math.cos(t9e*m)+lmi*Math.sin(t9e*m)+tmi*Math.cos(i9e*m)+umi*Math.sin(i9e*m)+imi*Math.cos(r9e*m)+cmi*Math.sin(r9e*m)+rmi*Math.cos(n9e*m)+Ami*Math.sin(n9e*m)+nmi*Math.cos(o9e*m)+hmi*Math.sin(o9e*m)+omi*Math.cos(a9e*m)+dmi*Math.sin(a9e*m),x=.0167086342-.0004203654*f,v=102.93734808*v1+11612.3529*S_*f,E=469.97289*S_*f,I=174.87317577*v1-8679.27034*S_*f;return Jrt(C,x,E,v,I,y,A)}function Wrt(o,A){Yrt(o,XG);let f=(XG.dayNumber-Wte.dayNumber+(XG.secondsOfDay-Wte.secondsOfDay)/Uu.SECONDS_PER_DAY)/Uu.DAYS_PER_JULIAN_CENTURY,m=f*f,C=m*f,y=C*f,x=383397.7725+.004*f,v=.055545526-16e-9*f,E=5.15668983*v1,I=-8e-5*f+.02966*m-42e-6*C-13e-8*y,w=83.35324312*v1,Q=146434202669e-4*f-38.2702*m-.045047*C+21301e-8*y,M=125.04455501*v1,B=-69679193631e-4*f+6.3602*m+.007625*C-3586e-8*y,T=218.31664563*v1,D=17325593434847e-4*f-6.391*m+.006588*C-3169e-8*y,F=297.85019547*v1+S_*(1602961601209e-3*f-6.3706*m+.006593*C-3169e-8*y),L=93.27209062*v1+S_*(17395272628478e-4*f-12.7512*m-.001037*C+417e-8*y),R=134.96340251*v1+S_*(17179159232178e-4*f+31.8792*m+.051635*C-2447e-7*y),k=357.52910918*v1+S_*(1295965810481e-4*f-.5532*m+136e-6*C-1149e-8*y),U=310.17137918*v1-S_*(6967051436e-3*f+6.2068*m+.007618*C-3219e-8*y),V=2*F,H=4*F,q=6*F,ie=2*R,Z=3*R,oe=4*R,ne=2*L;x+=3400.4*Math.cos(V)-635.6*Math.cos(V-R)-235.6*Math.cos(R)+218.1*Math.cos(V-k)+181*Math.cos(V+R),v+=.014216*Math.cos(V-R)+.008551*Math.cos(V-ie)-.001383*Math.cos(R)+.001356*Math.cos(V+R)-.001147*Math.cos(H-Z)-914e-6*Math.cos(H-ie)+869e-6*Math.cos(V-k-R)-627e-6*Math.cos(V)-394e-6*Math.cos(H-oe)+282e-6*Math.cos(V-k-ie)-279e-6*Math.cos(F-R)-236e-6*Math.cos(ie)+231e-6*Math.cos(H)+229e-6*Math.cos(q-oe)-201e-6*Math.cos(ie-ne),I+=486.26*Math.cos(V-ne)-40.13*Math.cos(V)+37.51*Math.cos(ne)+25.73*Math.cos(ie-ne)+19.97*Math.cos(V-k-ne),Q+=-55609*Math.sin(V-R)-34711*Math.sin(V-ie)-9792*Math.sin(R)+9385*Math.sin(H-Z)+7505*Math.sin(H-ie)+5318*Math.sin(V+R)+3484*Math.sin(H-oe)-3417*Math.sin(V-k-R)-2530*Math.sin(q-oe)-2376*Math.sin(V)-2075*Math.sin(V-Z)-1883*Math.sin(ie)-1736*Math.sin(q-5*R)+1626*Math.sin(k)-1370*Math.sin(q-Z),B+=-5392*Math.sin(V-ne)-540*Math.sin(k)-441*Math.sin(V)+423*Math.sin(ne)-288*Math.sin(ie-ne),D+=-3332.9*Math.sin(V)+1197.4*Math.sin(V-R)-662.5*Math.sin(k)+396.3*Math.sin(R)-218*Math.sin(V-k);let se=2*U,ce=3*U;I+=46.997*Math.cos(U)*f-.614*Math.cos(V-ne+U)*f+.614*Math.cos(V-ne-U)*f-.0297*Math.cos(se)*m-.0335*Math.cos(U)*m+.0012*Math.cos(V-ne+se)*m-16e-5*Math.cos(U)*C+4e-5*Math.cos(ce)*C+4e-5*Math.cos(se)*C;let j=2.116*Math.sin(U)*f-.111*Math.sin(V-ne-U)*f-.0015*Math.sin(U)*m;Q+=j,D+=j,B+=-520.77*Math.sin(U)*f+13.66*Math.sin(V-ne+U)*f+1.12*Math.sin(V-U)*f-1.06*Math.sin(ne-U)*f+.66*Math.sin(se)*m+.371*Math.sin(U)*m-.035*Math.sin(V-ne+se)*m-.015*Math.sin(V-ne+U)*m+.0014*Math.sin(U)*C-.0011*Math.sin(ce)*C-9e-4*Math.sin(se)*C,x*=Bpi;let de=E+I*S_,me=w+Q*S_,_e=T+D*S_,Be=M+B*S_;return Jrt(x,v,de,me,Be,_e,A)}var s9e=.012300034,gmi=s9e/(s9e+1)*-1;function pmi(o,A){return A=Wrt(o,A),ee.multiplyByScalar(A,gmi,A)}var jrt=new ci(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),Ez=new ee;Xbe.computeSunPositionInEarthInertialFrame=function(o,A){return O(o)||(o=fi.now()),O(A)||(A=new ee),Ez=fmi(o,Ez),A=ee.negate(Ez,A),pmi(o,Ez),ee.subtract(A,Ez,A),ci.multiplyByVector(jrt,A,A),A};Xbe.computeMoonPositionInEarthInertialFrame=function(o,A){return O(o)||(o=fi.now()),A=Wrt(o,A),ci.multiplyByVector(jrt,A,A),A};var UK=Xbe,jte=`#ifdef WRITE_DEPTH
    }`,Je.sources.push(ot),Ne.sources.push(Hgi(fe)),Ne.sources.push(Vgi(U));let nt=_s.fromCache({context:A.context,vertexShaderSource:Ne,fragmentShaderSource:Je,attributeLocations:K.getAttributeLocations()});be=Re[Ce]=new Ggi(m,Ce,this.material,nt,Ee,_e)}return f.surfaceShader=be,be.shaderProgram};Gbe.prototype.destroy=function(){let o,A,f=this._shadersByTexturesFlags;for(let m in f)if(f.hasOwnProperty(m)){let C=f[m];if(!O(C))continue;for(o in C)C.hasOwnProperty(o)&&(A=C[o],O(A)&&A.shaderProgram.destroy())}return Qr(this)};var Hbe=Gbe,zgi={START:0,LOADING:1,DONE:2,FAILED:3},mC=Object.freeze(zgi),Kgi={FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6},xh=Object.freeze(Kgi);function pA(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new ai(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new ee,this.boundingVolumeSourceTile=void 0,this.boundingVolumeIsFromMesh=!1,this.terrainState=xh.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new wi,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1,this.contourLineTexture=void 0,this.contourLineTranslationAndScale=new ai(0,0,1,1)}Object.defineProperties(pA.prototype,{eligibleForUnloading:{get:function(){let o=this.terrainState,A=!(o===xh.RECEIVING||o===xh.TRANSFORMING),f=this.imagery;for(let m=0,C=f.length;A&&m<C;++m){let y=f[m];A=!O(y.loadingImagery)||y.loadingImagery.state!==sc.TRANSITIONING}return A}},renderedMesh:{get:function(){if(O(this.vertexArray))return this.mesh;if(O(this.fill))return this.fill.mesh}}});var Ygi=new Kt;function sD(o,A,f,m,C,y){let x=o.getExaggeratedPosition(m,C,y);if(O(A)&&A!==xi.SCENE3D){let v=f.ellipsoid.cartesianToCartographic(x,Ygi);x=f.project(v,y),x=ee.fromElements(x.z,x.x,x.y,y)}return x}var Yte=new ee,sCe=new ee,lCe=new ee;pA.prototype.pick=function(o,A,f,m,C){let y=this.renderedMesh;if(!O(y))return;let x=y.vertices,v=y.indices,E=y.encoding,I=v.length,w=Number.MAX_VALUE;for(let Q=0;Q<I;Q+=3){let M=v[Q],B=v[Q+1],T=v[Q+2],D=sD(E,A,f,x,M,Yte),F=sD(E,A,f,x,B,sCe),L=sD(E,A,f,x,T,lCe),R=kA.rayTriangleParametric(o,D,F,L,m);O(R)&&R<w&&R>=0&&(w=R)}return w!==Number.MAX_VALUE?ls.getPoint(o,w,C):void 0};pA.prototype.pickTriangle=function(o,A,f,m,C){let y=this.renderedMesh;if(!O(y))return;let x=y.vertices,v=y.indices,E=y.encoding,I=v.length,w=Number.MAX_VALUE,Q=-1;for(let M=0;M<I;M+=3){let B=v[M],T=v[M+1],D=v[M+2],F=sD(E,A,f,x,B,Yte),L=sD(E,A,f,x,T,sCe),R=sD(E,A,f,x,D,lCe),k=kA.rayTriangleParametric(o,F,L,R,m);O(k)&&k<w&&k>=0&&(Q=M,w=k)}if(w!==Number.MAX_VALUE){let M=v[Q],B=v[Q+1],T=v[Q+2],D=sD(E,A,f,x,M,Yte),F=sD(E,A,f,x,B,sCe),L=sD(E,A,f,x,T,lCe);return C=[D,F,L],C}};pA.prototype.findNextSegment=function(o,A,f,m,C){for(let y=0;y<A.length;y++){let x=A[y];if(o[m].start===x[C].start&&o[m].end===x[C].end||o[m].start===x[C].end&&o[m].end===x[C].start){A.splice(y,1),f.push(x),this.findNextSegment(x,A,f,0,1),this.findNextSegment(x,A,f,0,1),this.findNextSegment(x,A,f,1,0),this.findNextSegment(x,A,f,1,1);break}}};pA.prototype.contourLineTopy=function(o){for(let A=0;A<o.length;A++){let f=o[A],m=f.positions,C=f.polylines;for(;m.length>0;){let y=[],x=m.shift();y.push(x),this.findNextSegment(x,m,y,0,1),this.findNextSegment(x,m,y,0,1),this.findNextSegment(x,m,y,1,0),this.findNextSegment(x,m,y,1,1),C.push(y)}}};function Jgi(o,A,f){let m=new It(A.x-o.x,A.y-o.y);It.normalize(m,m);let C=new It((A.x+o.x)*.5,(A.y+o.y)*.5),y=new It(f.x-C.x,f.y-C.y);It.normalize(y,y);let x=new It(-m.y,m.x),v=It.angleBetween(x,y);v>je.PI_OVER_TWO&&(x=new It(m.y,-m.x));let E=new It(0,1);return v=It.angleBetween(x,E),It.cross(E,x)<0&&(v=-v),v}pA.prototype.createContourLineTexture=function(o,A,f){let m=document.createElement("canvas");m.width=256,m.height=256;let C=m.getContext("2d");for(let v=0;v<o.length;v++){let E=o[v],I=E.halfScale,w=E.polylines,Q=E.elevation,M=E.font,B=E.fontColor,T=E.fontSize,D=0;for(;D<w.length;D++){let F=w[D];for(let L=0;L<F.length;L++){let R=F[L],k=R[0].insertPosition,U=R[1].insertPosition,V=R[0].maxVv,H=(k.x+I.x)/I.x/2*256,q=(k.y+I.y)/I.y/2*256,ie=(U.x+I.x)/I.x/2*256,Z=(U.y+I.y)/I.y/2*256,oe=(H+ie)*.5,ne=(q+Z)*.5,se=(V.x+I.x)/I.x/2*256,ce=(V.y+I.y)/I.y/2*256;if(100<oe&&oe<256-100&&100<ne&&ne<256-100){C.fillStyle=B,C.font=`${T-f*.25}px ${M}`,C.textAlign="center",C.translate(oe,ne);let j=Jgi(new It(H,q),new It(ie,Z),new It(se,ce));C.rotate(j),C.scale(1,-1),C.fillText(`${Q}`,0,0),D=w.length;break}}}}let y=new Qs({wrapS:Va.CLAMP_TO_EDGE,wrapT:Va.CLAMP_TO_EDGE,minificationFilter:as.LINEAR,magnificationFilter:th.LINEAR,maximumAnisotropy:1}),x=mo.create({context:A.context,pixelFormat:Gn.RGBA,pixelDatatype:wn.UNSIGNED_BYTE,source:m,sampler:y,flipY:!1});x.referenceCount=0,++x.referenceCount,this.contourLineTexture=x};var fVe=new ee,gVe=new ee,pVe=new ee;pA.prototype.drawContourLine=function(o,A,f,m,C){if(A.length===0){O(this.contourLineTexture)&&(--this.contourLineTexture.referenceCount,this.contourLineTexture.referenceCount===0&&this.contourLineTexture.destroy(),this.contourLineTexture=void 0);return}if(A[0].minShowLevel>o.level)return;let y=this.mesh;if(!O(y)||O(this.contourLineTexture))return;let x=[],v=new ee,E=y.orientedBoundingBox.halfAxes;ci.getScale(E,v);let I=y.vertices,w=y.indices,Q=y.encoding,M=y.indexCountWithoutSkirts,B=y.minimumHeight,T=y.maximumHeight,D=o.tilingScheme.ellipsoid,F=D.cartesianToCartographic(y.center,new ee);F.height=0;let L=D.cartographicToCartesian(F,new ee),R=Vn.eastNorthUpToFixedFrame(L,D),k=Xe.inverseTransformation(R,new Xe),U=new Array(M);for(let V=0;V<M;V++){let H=w[V];if(!U[H]){let q=sD(Q,f,m,I,H,Yte),ie=Xe.multiplyByPoint(k,q,new ee);U[H]=ie}}for(let V=0;V<A.length;V++){let H=A[V],q=H.plane,ie={halfScale:v,planeIndex:V,positions:[],polylines:[],elevation:q.distance,font:H.font,fontSize:H.fontSize,fontColor:H.fontColor};for(let Z=0;Z<M;Z+=3){let oe=w[Z],ne=w[Z+1],se=w[Z+2],ce=0,j=[],de=U[oe],me=U[ne],_e=U[se],Be=de.z>me.z?de.z>_e.z?de:_e:me.z>_e.z?me:_e,Qe=new ee;if(Be.clone(Qe),kA.lineSegmentPlane(de,me,q,fVe)){let Ie=new ee;fVe.clone(Ie),j.push({insertPosition:Ie,start:oe,end:ne,maxVv:Qe}),ce++}if(kA.lineSegmentPlane(me,_e,q,gVe)){let Ie=new ee;gVe.clone(Ie),j.push({insertPosition:Ie,start:ne,end:se,maxVv:Qe}),ce++}if(kA.lineSegmentPlane(_e,de,q,pVe)){let Ie=new ee;pVe.clone(Ie),j.push({insertPosition:Ie,start:se,end:oe,maxVv:Qe}),ce++}ce===2&&ie.positions.push(j)}x.push(ie)}this.contourLineTopy(x),this.createContourLineTexture(x,C,o.level)};pA.prototype.freeResources=function(){O(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),O(this.contourLineTexture)&&(--this.contourLineTexture.referenceCount,this.contourLineTexture.referenceCount===0&&this.contourLineTexture.destroy(),this.contourLineTexture=void 0),this.terrainData=void 0,this.terrainState=xh.UNLOADED,this.mesh=void 0,this.fill=this.fill&&this.fill.destroy();let o=this.imagery;for(let A=0,f=o.length;A<f;++A)o[A].freeResources();this.imagery.length=0,this.freeVertexArray()};pA.prototype.freeVertexArray=function(){pA._freeVertexArray(this.vertexArray),this.vertexArray=void 0,pA._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0};pA.initialize=function(o,A,f){let m=o.data;O(m)||(m=o.data=new pA),o.state===mC.START&&(Wgi(o,A,f),o.state=mC.LOADING)};pA.processStateMachine=function(o,A,f,m,C,y,x){pA.initialize(o,f,m);let v=o.data;if(o.state===mC.LOADING&&jgi(o,A,f,m,C,y),x)return;let E=o.renderable;o.renderable=O(v.vertexArray);let I=v.terrainState===xh.READY;o.upsampledFromParent=O(v.terrainData)&&v.terrainData.wasCreatedByUpsampling();let w=v.processImagery(o,f,A);if(I&&w){let Q=o._loadedCallbacks,M={};for(let B in Q)Q.hasOwnProperty(B)&&(Q[B](o)||(M[B]=Q[B]));o._loadedCallbacks=M,o.state=mC.DONE}E&&(o.renderable=!0)};pA.prototype.processImagery=function(o,A,f,m){let C=o.data,y=o.upsampledFromParent,x=!1,v=!0,E=C.imagery,I,w;for(I=0,w=E.length;I<w;++I){let Q=E[I];if(!O(Q.loadingImagery)){y=!1;continue}if(Q.loadingImagery.state===sc.PLACEHOLDER){let B=Q.loadingImagery.imageryLayer;if(B.imageryProvider.ready){Q.freeResources(),E.splice(I,1),B._createTileImagerySkeletons(o,A,I),--I,w=E.length;continue}else y=!1}let M=Q.processStateMachine(o,f,m);v=v&&M,x=x||M||O(Q.readyImagery),y=y&&O(Q.loadingImagery)&&(Q.loadingImagery.state===sc.FAILED||Q.loadingImagery.state===sc.INVALID)}return o.upsampledFromParent=y,o.renderable=o.renderable&&(x||v),v};function wrt(o,A,f,m){let C=o.renderedMesh,y=C.vertices,x=C.encoding,v=y.length/x.stride,E=HM.clone(x);E.hasGeodeticSurfaceNormals=A,E=HM.clone(E);let I=E.stride,w=new Float32Array(v*I);A?x.addGeodeticSurfaceNormals(y,w,f):x.removeGeodeticSurfaceNormals(y,w),C.vertices=w,C.stride=I,C!==o.mesh?(pA._freeVertexArray(o.fill.vertexArray),o.fill.vertexArray=pA._createVertexArrayForMesh(m.context,C)):(pA._freeVertexArray(o.vertexArray),o.vertexArray=pA._createVertexArrayForMesh(m.context,C)),pA._freeVertexArray(o.wireframeVertexArray),o.wireframeVertexArray=void 0}pA.prototype.addGeodeticSurfaceNormals=function(o,A){wrt(this,!0,o,A)};pA.prototype.removeGeodeticSurfaceNormals=function(o){wrt(this,!1,void 0,o)};pA.prototype.updateExaggeration=function(o,A,f){let m=this,C=m.renderedMesh;if(C===void 0)return;let y=A.terrainExaggeration,x=A.terrainExaggerationRelativeHeight,v=y!==1,E=C.encoding,I=E.exaggeration!==y,w=E.exaggerationRelativeHeight!==x;if(I||w){if(I)if(v&&!E.hasGeodeticSurfaceNormals){let Q=o.tilingScheme.ellipsoid;m.addGeodeticSurfaceNormals(Q,A)}else!v&&E.hasGeodeticSurfaceNormals&&m.removeGeodeticSurfaceNormals(A);if(E.exaggeration=y,E.exaggerationRelativeHeight=x,f!==void 0){f._tileToUpdateHeights.push(o);let Q=o.customData,M=Q.length;for(let B=0;B<M;B++){let T=Q[B];T.level=-1}}}};function Wgi(o,A,f){let m=A.getTileDataAvailable(o.x,o.y,o.level);if(!O(m)&&O(o.parent)){let C=o.parent,y=C.data;O(y)&&O(y.terrainData)&&(m=y.terrainData.isChildAvailable(C.x,C.y,o.x,o.y))}m===!1&&(o.data.terrainState=xh.FAILED);for(let C=0,y=f.length;C<y;++C){let x=f.get(C);x.show&&x._createTileImagerySkeletons(o,A)}}function jgi(o,A,f,m,C,y){let x=o.data,v=o.parent;if(x.terrainState===xh.FAILED&&v!==void 0&&(v.data!==void 0&&v.data.terrainData!==void 0&&v.data.terrainData.canUpsample!==!1||pA.processStateMachine(v,A,f,m,C,y,!0)),x.terrainState===xh.FAILED&&qgi(x,o,A,f,o.x,o.y,o.level),x.terrainState===xh.UNLOADED&&Xgi(x,f,o.x,o.y,o.level),x.terrainState===xh.RECEIVED&&$gi(x,A,f,o.x,o.y,o.level),x.terrainState===xh.TRANSFORMED&&(e0i(x,A.context,f,o.x,o.y,o.level,y),x.updateExaggeration(o,A,C)),x.terrainState>=xh.RECEIVED&&x.waterMaskTexture===void 0&&f.hasWaterMask)if(x.terrainData.waterMask!==void 0)i0i(A.context,x);else{let E=x._findAncestorTileWithTerrainData(o);O(E)&&O(E.data.waterMaskTexture)&&(x.waterMaskTexture=E.data.waterMaskTexture,++x.waterMaskTexture.referenceCount,x._computeWaterMaskTranslationAndScale(o,E,x.waterMaskTranslationAndScale))}}function qgi(o,A,f,m,C,y,x){let v=A.parent;if(!v){A.state=mC.FAILED;return}let E=v.data.terrainData,I=v.x,w=v.y,Q=v.level;if(!O(E))return;let M=E.upsample(m.tilingScheme,I,w,Q,C,y,x);!O(M)||(o.terrainState=xh.RECEIVING,Promise.resolve(M).then(function(B){o.terrainData=B,o.terrainState=xh.RECEIVED}).catch(function(){o.terrainState=xh.FAILED}))}function Xgi(o,A,f,m,C){function y(E){o.terrainData=E,o.terrainState=xh.RECEIVED,o.request=void 0}function x(E){if(o.request.state===yA.CANCELLED){o.terrainData=void 0,o.terrainState=xh.UNLOADED,o.request=void 0;return}o.terrainState=xh.FAILED,o.request=void 0;let I=`Failed to obtain terrain tile X: ${f} Y: ${m} Level: ${C}. Error message: "${E}"`;A._requestError=wc.reportError(A._requestError,A,A.errorEvent,I,f,m,C),A._requestError.retry&&v()}function v(){let E=new cC({throttle:!1,throttleByServer:!0,type:oB.TERRAIN});o.request=E;let I=A.requestTileGeometry(f,m,C,E);O(I)?(o.terrainState=xh.RECEIVING,Promise.resolve(I).then(function(w){y(w)}).catch(function(w){x(w)})):(o.terrainState=xh.UNLOADED,o.request=void 0)}v()}var Zgi={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0,throttle:!0};function $gi(o,A,f,m,C,y){let x=f.tilingScheme,v=Zgi;v.tilingScheme=x,v.x=m,v.y=C,v.level=y,v.exaggeration=A.terrainExaggeration,v.exaggerationRelativeHeight=A.terrainExaggerationRelativeHeight,v.throttle=!0;let E=o.terrainData.createMesh(v);!O(E)||(o.terrainState=xh.TRANSFORMING,Promise.resolve(E).then(function(I){o.mesh=I,o.terrainState=xh.TRANSFORMED}).catch(function(){o.terrainState=xh.FAILED}))}pA._createVertexArrayForMesh=function(o,A){let f=A.vertices,m=vo.createVertexBuffer({context:o,typedArray:f,usage:ln.STATIC_DRAW}),C=A.encoding.getAttributes(m),y=A.indices.indexBuffers||{},x=y[o.id];if(!O(x)||x.isDestroyed()){let v=A.indices;x=vo.createIndexBuffer({context:o,typedArray:v,usage:ln.STATIC_DRAW,indexDatatype:Nn.fromSizeInBytes(v.BYTES_PER_ELEMENT)}),x.vertexArrayDestroyable=!1,x.referenceCount=1,y[o.id]=x,A.indices.indexBuffers=y}else++x.referenceCount;return new Vc({context:o,attributes:C,indexBuffer:x})};pA._freeVertexArray=function(o){if(O(o)){let A=o.indexBuffer;o.isDestroyed()||o.destroy(),O(A)&&!A.isDestroyed()&&O(A.referenceCount)&&(--A.referenceCount,A.referenceCount===0&&A.destroy())}};function e0i(o,A,f,m,C,y,x){o.vertexArray=pA._createVertexArrayForMesh(A,o.mesh),o.terrainState=xh.READY,o.fill=o.fill&&o.fill.destroy(x)}function t0i(o){let A=o.cache.tile_waterMaskData;if(!O(A)){let f=mo.create({context:o,pixelFormat:Gn.LUMINANCE,pixelDatatype:wn.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});f.referenceCount=1;let m=new Qs({wrapS:Va.CLAMP_TO_EDGE,wrapT:Va.CLAMP_TO_EDGE,minificationFilter:as.LINEAR,magnificationFilter:th.LINEAR});A={allWaterTexture:f,sampler:m,destroy:function(){this.allWaterTexture.destroy()}},o.cache.tile_waterMaskData=A}return A}function i0i(o,A){let f=A.terrainData.waterMask,m=t0i(o),C,y=f.length;if(y===1)if(f[0]!==0)C=m.allWaterTexture;else return;else{let x=Math.sqrt(y);C=mo.create({context:o,pixelFormat:Gn.LUMINANCE,pixelDatatype:wn.UNSIGNED_BYTE,source:{width:x,height:x,arrayBufferView:f},sampler:m.sampler,flipY:!1}),C.referenceCount=0}++C.referenceCount,A.waterMaskTexture=C,ai.fromElements(0,0,1,1,A.waterMaskTranslationAndScale)}pA.prototype._findAncestorTileWithTerrainData=function(o){let A=o.parent;for(;O(A)&&(!O(A.data)||!O(A.data.terrainData)||A.data.terrainData.wasCreatedByUpsampling());)A=A.parent;return A};pA.prototype._computeWaterMaskTranslationAndScale=function(o,A,f){let m=A.rectangle,C=o.rectangle,y=C.width,x=C.height,v=y/m.width,E=x/m.height;return f.x=v*(C.west-m.west)/y,f.y=E*(C.south-m.south)/x,f.z=v,f.w=E,f};var zM=pA,r0i={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7},Ga=r0i,brt={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(o){return o>=brt.RENDERED_AND_KICKED},originalResult:function(o){return o&3},kick:function(o){return o|4}},sa=brt;function tH(o){this.tile=o,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new ai}tH.prototype.update=function(o,A,f){this.changedThisFrame&&(Qrt(o,A,this.tile,f),this.changedThisFrame=!1)};tH.prototype.destroy=function(o){this._destroyVertexArray(o),O(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};tH.prototype._destroyVertexArray=function(o){O(this.vertexArray)&&(O(o)?o.push(this.vertexArray):zM._freeVertexArray(this.vertexArray),this.vertexArray=void 0)};var n0i=new d5;tH.updateFillTiles=function(o,A,f,m){let C=o._quadtree,y=C._levelZeroTiles,x=C._lastSelectionFrameNumber,v=n0i;v.clear();for(let I=0;I<A.length;++I){let w=A[I];O(w.data.vertexArray)&&v.enqueue(A[I])}let E=v.dequeue();for(;E!==void 0;){let I=E.findTileToWest(y),w=E.findTileToSouth(y),Q=E.findTileToEast(y),M=E.findTileToNorth(y);gp(o,f,E,I,x,Ga.EAST,!1,v,m),gp(o,f,E,w,x,Ga.NORTH,!1,v,m),gp(o,f,E,Q,x,Ga.WEST,!1,v,m),gp(o,f,E,M,x,Ga.SOUTH,!1,v,m);let B=I.findTileToNorth(y),T=I.findTileToSouth(y),D=Q.findTileToNorth(y),F=Q.findTileToSouth(y);gp(o,f,E,B,x,Ga.SOUTHEAST,!1,v,m),gp(o,f,E,D,x,Ga.SOUTHWEST,!1,v,m),gp(o,f,E,T,x,Ga.NORTHEAST,!1,v,m),gp(o,f,E,F,x,Ga.NORTHWEST,!1,v,m),E=v.dequeue()}};function gp(o,A,f,m,C,y,x,v,E){if(m===void 0)return;let I=m;for(;I&&(I._lastSelectionResultFrame!==C||sa.wasKicked(I._lastSelectionResult)||sa.originalResult(I._lastSelectionResult)===sa.CULLED);){if(x)return;let w=I.parent;if(y>=Ga.NORTHWEST&&w!==void 0)switch(y){case Ga.NORTHWEST:I=I===w.northwestChild?w:void 0;break;case Ga.NORTHEAST:I=I===w.northeastChild?w:void 0;break;case Ga.SOUTHWEST:I=I===w.southwestChild?w:void 0;break;case Ga.SOUTHEAST:I=I===w.southeastChild?w:void 0;break}else I=w}if(I!==void 0){if(I._lastSelectionResult===sa.RENDERED){if(O(I.data.vertexArray))return;o0i(o,A,f,I,y,C,v,E);return}if(sa.originalResult(m._lastSelectionResult)!==sa.CULLED)switch(y){case Ga.WEST:gp(o,A,f,m.northwestChild,C,y,!0,v,E),gp(o,A,f,m.southwestChild,C,y,!0,v,E);break;case Ga.EAST:gp(o,A,f,m.southeastChild,C,y,!0,v,E),gp(o,A,f,m.northeastChild,C,y,!0,v,E);break;case Ga.SOUTH:gp(o,A,f,m.southwestChild,C,y,!0,v,E),gp(o,A,f,m.southeastChild,C,y,!0,v,E);break;case Ga.NORTH:gp(o,A,f,m.northeastChild,C,y,!0,v,E),gp(o,A,f,m.northwestChild,C,y,!0,v,E);break;case Ga.NORTHWEST:gp(o,A,f,m.northwestChild,C,y,!0,v,E);break;case Ga.NORTHEAST:gp(o,A,f,m.northeastChild,C,y,!0,v,E);break;case Ga.SOUTHWEST:gp(o,A,f,m.southwestChild,C,y,!0,v,E);break;case Ga.SOUTHEAST:gp(o,A,f,m.southeastChild,C,y,!0,v,E);break;default:throw new Ui("Invalid edge")}}}function o0i(o,A,f,m,C,y,x,v){let E=m.data;if(E.fill===void 0)E.fill=new tH(m);else if(E.fill.visitedFrame===y)return;E.fill.enqueuedFrame!==y&&(E.fill.enqueuedFrame=y,E.fill.changedThisFrame=!1,x.enqueue(m)),a0i(o,A,f,m,C,v)}function a0i(o,A,f,m,C,y){let x=m.data.fill,v,E=f.data.fill;O(E)?(E.visitedFrame=A.frameNumber,E.changedThisFrame&&(Qrt(o,A,f,y),E.changedThisFrame=!1),v=f.data.fill.mesh):v=f.data.mesh;let I,w;switch(C){case Ga.WEST:I=x.westMeshes,w=x.westTiles;break;case Ga.SOUTH:I=x.southMeshes,w=x.southTiles;break;case Ga.EAST:I=x.eastMeshes,w=x.eastTiles;break;case Ga.NORTH:I=x.northMeshes,w=x.northTiles;break;case Ga.NORTHWEST:x.changedThisFrame=x.changedThisFrame||x.northwestMesh!==v,x.northwestMesh=v,x.northwestTile=f;return;case Ga.NORTHEAST:x.changedThisFrame=x.changedThisFrame||x.northeastMesh!==v,x.northeastMesh=v,x.northeastTile=f;return;case Ga.SOUTHWEST:x.changedThisFrame=x.changedThisFrame||x.southwestMesh!==v,x.southwestMesh=v,x.southwestTile=f;return;case Ga.SOUTHEAST:x.changedThisFrame=x.changedThisFrame||x.southeastMesh!==v,x.southeastMesh=v,x.southeastTile=f;return}if(f.level<=m.level){x.changedThisFrame=x.changedThisFrame||I[0]!==v||I.length!==1,I[0]=v,w[0]=f,I.length=1,w.length=1;return}let Q,M,B,T,D=f.rectangle,F,L=m.rectangle;switch(C){case Ga.WEST:for(F=(L.north-L.south)*je.EPSILON5,Q=0;Q<w.length&&(B=w[Q],T=B.rectangle,!je.greaterThan(D.north,T.south,F));++Q);for(M=Q;M<w.length&&(B=w[M],T=B.rectangle,!je.greaterThanOrEquals(D.south,T.north,F));++M);break;case Ga.SOUTH:for(F=(L.east-L.west)*je.EPSILON5,Q=0;Q<w.length&&(B=w[Q],T=B.rectangle,!je.lessThan(D.west,T.east,F));++Q);for(M=Q;M<w.length&&(B=w[M],T=B.rectangle,!je.lessThanOrEquals(D.east,T.west,F));++M);break;case Ga.EAST:for(F=(L.north-L.south)*je.EPSILON5,Q=0;Q<w.length&&(B=w[Q],T=B.rectangle,!je.lessThan(D.south,T.north,F));++Q);for(M=Q;M<w.length&&(B=w[M],T=B.rectangle,!je.lessThanOrEquals(D.north,T.south,F));++M);break;case Ga.NORTH:for(F=(L.east-L.west)*je.EPSILON5,Q=0;Q<w.length&&(B=w[Q],T=B.rectangle,!je.greaterThan(D.east,T.west,F));++Q);for(M=Q;M<w.length&&(B=w[M],T=B.rectangle,!je.greaterThanOrEquals(D.west,T.east,F));++M);break}M-Q===1?(x.changedThisFrame=x.changedThisFrame||I[Q]!==v,I[Q]=v,w[Q]=f):(x.changedThisFrame=!0,I.splice(Q,M-Q,v),w.splice(Q,M-Q,f))}var Fk=new Kt,s0i=new Kt,qG=new ee,Vbe=new ee,uCe=new It,cCe=new It,P_=new It;function foe(){this.height=0,this.encodedNormal=new It}function d$(o,A,f,m,C,y,x,v,E){if(O(C))return C;let I;if(O(y)&&O(x))I=(y.height+x.height)*.5;else if(O(y))I=y.height;else if(O(x))I=x.height;else if(O(v))I=v.height;else{let w=o.tile.data.tileBoundingRegion,Q=0,M=0;O(w)&&(Q=w.minimumHeight,M=w.maximumHeight),I=(Q+M)*.5}return Srt(o,A,f,m,I,E),E}var l0i={minimumHeight:0,maximumHeight:0},u0i=new ee,mVe=new foe,CVe=new foe,yVe=new foe,xVe=new foe,c0i=typeof Uint8Array<"u"?new Uint8Array(9*9):void 0,A0i={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0};function Qrt(o,A,f,m){zM.initialize(f,o.terrainProvider,o._imageryLayers);let C=f.data,y=C.fill,x=f.rectangle,v=A.terrainExaggeration,E=A.terrainExaggerationRelativeHeight,I=v!==1,w=f.tilingScheme.ellipsoid,Q=g$(y,w,0,1,y.northwestTile,y.northwestMesh,y.northTiles,y.northMeshes,y.westTiles,y.westMeshes,yVe),M=g$(y,w,0,0,y.southwestTile,y.southwestMesh,y.westTiles,y.westMeshes,y.southTiles,y.southMeshes,mVe),B=g$(y,w,1,0,y.southeastTile,y.southeastMesh,y.southTiles,y.southMeshes,y.eastTiles,y.eastMeshes,CVe),T=g$(y,w,1,1,y.northeastTile,y.northeastMesh,y.eastTiles,y.eastMeshes,y.northTiles,y.northMeshes,xVe);Q=d$(y,w,0,1,Q,M,T,B,yVe),M=d$(y,w,0,0,M,Q,B,T,mVe),B=d$(y,w,1,1,B,M,T,Q,CVe),T=d$(y,w,1,1,T,B,Q,M,xVe);let D=M.height,F=B.height,L=Q.height,R=T.height,k=Math.min(D,F,L,R),U=Math.max(D,F,L,R),V=(k+U)*.5,H,q,ie=o.getLevelMaximumGeometricError(f.level),Z=w.maximumRadius-ie,oe=Math.acos(Z/w.maximumRadius)*4;if(oe*=1.5,x.width>oe&&U-k<=ie){let ce=new wQ({width:9,height:9,buffer:c0i,structure:{heightOffset:U},flattenPolygonHeight:[1],flattenPolygon:[]}),j=A0i;j.tilingScheme=f.tilingScheme,j.x=f.x,j.y=f.y,j.level=f.level,j.exaggeration=v,j.exaggerationRelativeHeight=E,y.mesh=ce._createMeshSync(j)}else{let ce=I,j=Si.center(x,s0i);j.height=V;let de=w.cartographicToCartesian(j,u0i),me=new HM(de,void 0,void 0,void 0,void 0,!0,!0,ce,v,E),_e=5,Be;for(Be=y.westMeshes,H=0,q=Be.length;H<q;++H)_e+=Be[H].eastIndicesNorthToSouth.length;for(Be=y.southMeshes,H=0,q=Be.length;H<q;++H)_e+=Be[H].northIndicesWestToEast.length;for(Be=y.eastMeshes,H=0,q=Be.length;H<q;++H)_e+=Be[H].westIndicesSouthToNorth.length;for(Be=y.northMeshes,H=0,q=Be.length;H<q;++H)_e+=Be[H].southIndicesEastToWest.length;let Qe=l0i;Qe.minimumHeight=k,Qe.maximumHeight=U;let Ie=me.stride,ve=new Float32Array(_e*Ie),K=0,W=K;K=f$(w,x,me,ve,K,0,1,Q.height,Q.encodedNormal,1,Qe),K=m$(y,w,me,ve,K,y.westTiles,y.westMeshes,Ga.EAST,Qe);let te=K;K=f$(w,x,me,ve,K,0,0,M.height,M.encodedNormal,0,Qe),K=m$(y,w,me,ve,K,y.southTiles,y.southMeshes,Ga.NORTH,Qe);let Y=K;K=f$(w,x,me,ve,K,1,0,B.height,B.encodedNormal,0,Qe),K=m$(y,w,me,ve,K,y.eastTiles,y.eastMeshes,Ga.WEST,Qe);let he=K;K=f$(w,x,me,ve,K,1,1,T.height,T.encodedNormal,1,Qe),K=m$(y,w,me,ve,K,y.northTiles,y.northMeshes,Ga.SOUTH,Qe),k=Qe.minimumHeight,U=Qe.maximumHeight;let fe=Hf.fromRectangle(x,k,U,f.tilingScheme.ellipsoid),Ce=OA.geodeticLatitudeToMercatorAngle(x.south),Ee=1/(OA.geodeticLatitudeToMercatorAngle(x.north)-Ce),be=(OA.geodeticLatitudeToMercatorAngle(j.latitude)-Ce)*Ee,Re=w.geodeticSurfaceNormalCartographic(Fk,Vbe),Ne=Mu.octEncode(Re,uCe),Je=K;me.encode(ve,K*Ie,fe.center,It.fromElements(.5,.5,P_),V,Ne,be,Re),++K;let ot=K,nt=ot<256?1:2,$e=(ot-1)*3,ht=$e*nt,ze=(ve.length-ot*Ie)*Float32Array.BYTES_PER_ELEMENT,Ze;if(ze>=ht){let gt=ot*Ie*Float32Array.BYTES_PER_ELEMENT;Ze=ot<256?new Uint8Array(ve.buffer,gt,$e):new Uint16Array(ve.buffer,gt,$e)}else Ze=ot<256?new Uint8Array($e):new Uint16Array($e);ve=new Float32Array(ve.buffer,0,ot*Ie);let ct=0;for(H=0;H<ot-2;++H)Ze[ct++]=Je,Ze[ct++]=H,Ze[ct++]=H+1;Ze[ct++]=Je,Ze[ct++]=H,Ze[ct++]=0;let We=[];for(H=te;H>=W;--H)We.push(H);let Oe=[];for(H=Y;H>=te;--H)Oe.push(H);let Ye=[];for(H=he;H>=Y;--H)Ye.push(H);let rt=[];for(rt.push(0),H=Je-1;H>=he;--H)rt.push(H);y.mesh=new hO(me.center,ve,Ze,$e,ot,k,U,wi.fromOrientedBoundingBox(fe),C0i(o,fe.center,x,k,U),me.stride,fe,me,We,Oe,Ye,rt)}let ne=A.context;y._destroyVertexArray(m),y.vertexArray=zM._createVertexArrayForMesh(ne,y.mesh),C.processImagery(f,o.terrainProvider,A,!0);let se=y.waterMaskTexture;if(y.waterMaskTexture=void 0,o.terrainProvider.hasWaterMask){let ce=C._findAncestorTileWithTerrainData(f);O(ce)&&O(ce.data.waterMaskTexture)&&(y.waterMaskTexture=ce.data.waterMaskTexture,++y.waterMaskTexture.referenceCount,C._computeWaterMaskTranslationAndScale(f,ce,y.waterMaskTranslationAndScale))}O(se)&&(--se.referenceCount,se.referenceCount===0&&se.destroy())}function f$(o,A,f,m,C,y,x,v,E,I,w){let Q=Fk;Q.longitude=je.lerp(A.west,A.east,y),Q.latitude=je.lerp(A.south,A.north,x),Q.height=v;let M=o.cartographicToCartesian(Q,qG),B;f.hasGeodeticSurfaceNormals&&(B=o.geodeticSurfaceNormal(M,Vbe));let T=cCe;return T.x=y,T.y=x,f.encode(m,C*f.stride,M,T,v,E,I,B),w.minimumHeight=Math.min(w.minimumHeight,v),w.maximumHeight=Math.max(w.maximumHeight,v),C+1}var Jte=new Si;function OK(o,A,f,m){let C=o.rectangle,y=A.rectangle;A.x===0&&f.x===1&&o.x===o.tilingScheme.getNumberOfXTilesAtLevel(o.level)-1?(C=Si.clone(o.rectangle,Jte),C.west-=je.TWO_PI,C.east-=je.TWO_PI):o.x===0&&f.x===0&&A.x===A.tilingScheme.getNumberOfXTilesAtLevel(A.level)-1&&(C=Si.clone(o.rectangle,Jte),C.west+=je.TWO_PI,C.east+=je.TWO_PI);let x=C.east-C.west,v=(y.west-C.west)/x,E=(y.east-C.west)/x,I=C.north-C.south,w=(y.south-C.south)/I,Q=(y.north-C.south)/I,M=(f.x-v)/(E-v),B=(f.y-w)/(Q-w);return Math.abs(M)<Math.EPSILON5?M=0:Math.abs(M-1)<Math.EPSILON5&&(M=1),Math.abs(B)<Math.EPSILON5?B=0:Math.abs(B-1)<Math.EPSILON5&&(B=1),m.x=M,m.y=B,m}var h0i=new It;function ACe(o,A,f,m,C){let y=o.encoding,x=o.vertices;if(C.height=y.decodeHeight(x,A),y.hasVertexNormals)y.getOctEncodedNormal(x,A,C.encodedNormal);else{let v=C.encodedNormal;v.x=0,v.y=0}}var d0i=new It,f0i=new ee;function g0i(o,A,f,m,C,y,x,v,E,I){let w=m.encoding,Q=m.vertices,M=OK(A,f,w.decodeTextureCoordinates(Q,C,P_),P_),B=OK(A,f,w.decodeTextureCoordinates(Q,y,cCe),cCe),T;E?T=(x-M.x)/(B.x-M.x):T=(v-M.y)/(B.y-M.y);let D=w.decodeHeight(Q,C),F=w.decodeHeight(Q,y),L=f.rectangle;Fk.longitude=je.lerp(L.west,L.east,x),Fk.latitude=je.lerp(L.south,L.north,v),I.height=Fk.height=je.lerp(D,F,T);let R;if(w.hasVertexNormals){let k=w.getOctEncodedNormal(Q,C,h0i),U=w.getOctEncodedNormal(Q,y,d0i),V=Mu.octDecode(k.x,k.y,qG),H=Mu.octDecode(U.x,U.y,f0i);R=ee.lerp(V,H,T,qG),ee.normalize(R,R),Mu.octEncode(R,I.encodedNormal)}else R=o.geodeticSurfaceNormalCartographic(Fk,qG),Mu.octEncode(R,I.encodedNormal)}function Srt(o,A,f,m,C,y){y.height=C;let x=A.geodeticSurfaceNormalCartographic(Fk,qG);Mu.octEncode(x,y.encodedNormal)}function g$(o,A,f,m,C,y,x,v,E,I,w){if(EVe(o,A,v,x,!1,f,m,w)||EVe(o,A,I,E,!0,f,m,w))return w;let Q;if(zbe(C,y))return f===0?m===0?Q=y.eastIndicesNorthToSouth[0]:Q=y.southIndicesEastToWest[0]:m===0?Q=y.northIndicesWestToEast[0]:Q=y.westIndicesSouthToNorth[0],ACe(y,Q,f,m,w),w;let M;if(f===0?m===0?M=p$(o.westMeshes,o.westTiles,Ga.EAST,o.southMeshes,o.southTiles,Ga.NORTH,f,m):M=p$(o.northMeshes,o.northTiles,Ga.SOUTH,o.westMeshes,o.westTiles,Ga.EAST,f,m):m===0?M=p$(o.southMeshes,o.southTiles,Ga.NORTH,o.eastMeshes,o.eastTiles,Ga.WEST,f,m):M=p$(o.eastMeshes,o.eastTiles,Ga.WEST,o.northMeshes,o.northTiles,Ga.SOUTH,f,m),O(M))return Srt(o,A,f,m,M,w),w}function p$(o,A,f,m,C,y,x,v){let E=vVe(o,A,!1,f,x,v),I=vVe(m,C,!0,y,x,v);return O(E)&&O(I)?(E+I)*.5:O(E)?E:I}function m$(o,A,f,m,C,y,x,v,E){for(let I=0;I<y.length;++I)C=p0i(o,A,f,m,C,y[I],x[I],v,E);return C}function p0i(o,A,f,m,C,y,x,v,E){let I=y.rectangle;v===Ga.EAST&&o.tile.x===0?(I=Si.clone(y.rectangle,Jte),I.west-=je.TWO_PI,I.east-=je.TWO_PI):v===Ga.WEST&&y.x===0&&(I=Si.clone(y.rectangle,Jte),I.west+=je.TWO_PI,I.east+=je.TWO_PI);let w=o.tile.rectangle,Q,M;C>0&&(f.decodeTextureCoordinates(m,C-1,P_),Q=P_.x,M=P_.y);let B,T;switch(v){case Ga.WEST:B=x.westIndicesSouthToNorth,T=!1;break;case Ga.NORTH:B=x.northIndicesWestToEast,T=!0;break;case Ga.EAST:B=x.eastIndicesNorthToSouth,T=!1;break;case Ga.SOUTH:B=x.southIndicesEastToWest,T=!0;break}let D=y,F=o.tile,L=x.encoding,R=x.vertices,k=f.stride,U,V;L.hasWebMercatorT&&(U=OA.geodeticLatitudeToMercatorAngle(w.south),V=1/(OA.geodeticLatitudeToMercatorAngle(w.north)-U));for(let H=0;H<B.length;++H){let q=B[H],ie=L.decodeTextureCoordinates(R,q,P_);OK(D,F,ie,ie);let Z=ie.x,oe=ie.y,ne=T?Z:oe;if(ne<0||ne>1||Math.abs(Z-Q)<je.EPSILON5&&Math.abs(oe-M)<je.EPSILON5)continue;let se=Math.abs(Z)<je.EPSILON5||Math.abs(Z-1)<je.EPSILON5,ce=Math.abs(oe)<je.EPSILON5||Math.abs(oe-1)<je.EPSILON5;if(se&&ce)continue;let j=L.decodePosition(R,q,qG),de=L.decodeHeight(R,q),me;L.hasVertexNormals?me=L.getOctEncodedNormal(R,q,uCe):(me=uCe,me.x=0,me.y=0);let _e=oe;if(L.hasWebMercatorT){let Qe=je.lerp(w.south,w.north,oe);_e=(OA.geodeticLatitudeToMercatorAngle(Qe)-U)*V}let Be;f.hasGeodeticSurfaceNormals&&(Be=A.geodeticSurfaceNormal(j,Vbe)),f.encode(m,C*k,j,ie,de,me,_e,Be),E.minimumHeight=Math.min(E.minimumHeight,de),E.maximumHeight=Math.max(E.maximumHeight,de),++C}return C}function vVe(o,A,f,m,C,y){let x,v,E;f?(x=0,v=o.length,E=1):(x=o.length-1,v=-1,E=-1);for(let I=x;I!==v;I+=E){let w=o[I],Q=A[I];if(!zbe(Q,w))continue;let M;switch(m){case Ga.WEST:M=w.westIndicesSouthToNorth;break;case Ga.SOUTH:M=w.southIndicesEastToWest;break;case Ga.EAST:M=w.eastIndicesNorthToSouth;break;case Ga.NORTH:M=w.northIndicesWestToEast;break}let B=M[f?0:M.length-1];if(O(B))return w.encoding.decodeHeight(w.vertices,B)}}function zbe(o,A){return O(A)&&(!O(o.data.fill)||!o.data.fill.changedThisFrame)}function EVe(o,A,f,m,C,y,x,v){let E,I,w,Q,M,B=m[C?0:f.length-1],T=f[C?0:f.length-1];if(zbe(B,T)&&(y===0?x===0?(E=C?T.northIndicesWestToEast:T.eastIndicesNorthToSouth,I=C,w=C):(E=C?T.eastIndicesNorthToSouth:T.southIndicesEastToWest,I=!C,w=!1):x===0?(E=C?T.westIndicesSouthToNorth:T.northIndicesWestToEast,I=!C,w=!0):(E=C?T.southIndicesEastToWest:T.westIndicesSouthToNorth,I=C,w=!C),E.length>0)){Q=C?0:E.length-1,M=E[Q],T.encoding.decodeTextureCoordinates(T.vertices,M,P_);let D=OK(B,o.tile,P_,P_);if(D.x===y&&D.y===x)return ACe(T,M,y,x,v),!0;if(Q=hC(E,I?y:x,function(F,L){T.encoding.decodeTextureCoordinates(T.vertices,F,P_);let R=OK(B,o.tile,P_,P_);return w?I?R.x-y:R.y-x:I?y-R.x:x-R.y}),Q<0){if(Q=~Q,Q>0&&Q<E.length)return g0i(A,B,o.tile,T,E[Q-1],E[Q],y,x,I,v),!0}else return ACe(T,E[Q],y,x,v),!0}return!1}var m0i=[new ee,new ee,new ee,new ee];function C0i(o,A,f,m,C,y){let x=o.quadtree._occluders.ellipsoid,v=x.ellipsoid,E=m0i;return ee.fromRadians(f.west,f.south,C,v,E[0]),ee.fromRadians(f.east,f.south,C,v,E[1]),ee.fromRadians(f.west,f.north,C,v,E[2]),ee.fromRadians(f.east,f.north,C,v,E[3]),x.computeHorizonCullingPointPossiblyUnderEllipsoid(A,E,m,y)}var goe=tH;function Qd(o){this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=Al.RECEIVE_ONLY,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this.undergroundColor=void 0,this.undergroundColorAlphaByDistance=void 0,this.lambertDiffuseMultiplier=0,this.materialUniformMap=void 0,this._materialUniformMap=void 0,this._quadtree=void 0,this._terrainProvider=o.terrainProvider,this._imageryLayers=o.imageryLayers,this._surfaceShaderSet=o.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new br,this._imageryLayers.layerAdded.addEventListener(Qd.prototype._onLayerAdded,this),this._imageryLayers.layerRemoved.addEventListener(Qd.prototype._onLayerRemoved,this),this._imageryLayers.layerMoved.addEventListener(Qd.prototype._onLayerMoved,this),this._imageryLayers.layerShownOrHidden.addEventListener(Qd.prototype._onLayerShownOrHidden,this),this._imageryLayersUpdatedEvent=new br,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._uniformMaps=[],this._usedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new At(0,0,.5,1),this._clippingPlanes=void 0,this._multiClippingPlanes=void 0,this.cartographicLimitRectangle=Si.clone(Si.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._oldTerrainExaggeration=void 0,this._oldTerrainExaggerationRelativeHeight=void 0,this._flattenPolygonRegion={},this.graticulesLevel=1,this.graticulesEnable=!1,this.clipPlanes=[],this._clipPlanes=[]}Object.defineProperties(Qd.prototype,{baseColor:{get:function(){return this._baseColor},set:function(o){this._baseColor=o,this._firstPassInitialColor=ai.fromColor(o,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(o){this._quadtree=o}},ready:{get:function(){return this._terrainProvider.ready&&(this._imageryLayers.length===0||this._imageryLayers.get(0).imageryProvider.ready)}},tilingScheme:{get:function(){return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(o){this._terrainProvider!==o&&(this._terrainProvider=o,O(this._quadtree)&&this._quadtree.invalidateAllTiles())}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(o){rB.setOwner(o,this,"_clippingPlanes")}},multiClippingPlanes:{get:function(){return this._multiClippingPlanes},set:function(o){O(o)?this._multiClippingPlanes=o:this._multiClippingPlanes=void 0}}});function y0i(o,A){let f=o.loadingImagery;O(f)||(f=o.readyImagery);let m=A.loadingImagery;return O(m)||(m=A.readyImagery),f.imageryLayer._layerIndex-m.imageryLayer._layerIndex}Qd.prototype.update=function(o){this._imageryLayers._update()};function x0i(o,A){let f=A.creditDisplay;o._terrainProvider.ready&&O(o._terrainProvider.credit)&&f.addCredit(o._terrainProvider.credit);let m=o._imageryLayers;for(let C=0,y=m.length;C<y;++C){let x=m.get(C).imageryProvider;x.ready&&O(x.credit)&&f.addCredit(x.credit)}}Qd.prototype.initialize=function(o){this._imageryLayers.queueReprojectionCommands(o),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile(function(m){m.data.imagery.sort(y0i)})),x0i(this,o);let A=this._vertexArraysToDestroy,f=A.length;for(let m=0;m<f;++m)zM._freeVertexArray(A[m]);A.length=0};Qd.prototype.beginUpdate=function(o){let A=this._tilesToRenderByTextureCount;for(let C=0,y=A.length;C<y;++C){let x=A[C];O(x)&&(x.length=0)}let f=this._clippingPlanes;O(f)&&f.enabled&&f.update(o);let m=this._multiClippingPlanes;O(m)&&m.update(o),this._usedDrawCommands=0,this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1};Qd.prototype.endUpdate=function(o){if(!O(this._renderState)){this._renderState=fn.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:nI.LESS}}),this._blendRenderState=fn.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:nI.LESS_OR_EQUAL},blending:Bu.ALPHA_BLEND});let x=xo(this._renderState,!0);x.cull.enabled=!1,this._disableCullingRenderState=fn.fromCache(x),x=xo(this._blendRenderState,!0),x.cull.enabled=!1,this._disableCullingBlendRenderState=fn.fromCache(x)}this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&goe.updateFillTiles(this,this._quadtree._tilesToRender,o,this._vertexArraysToDestroy);let A=this.quadtree,f=o.terrainExaggeration,m=o.terrainExaggerationRelativeHeight,C=this._oldTerrainExaggeration!==f||this._oldTerrainExaggerationRelativeHeight!==m;this._oldTerrainExaggeration=f,this._oldTerrainExaggerationRelativeHeight=m,C&&A.forEachLoadedTile(function(x){x.data.updateExaggeration(x,o,A)});let y=this._tilesToRenderByTextureCount;for(let x=0,v=y.length;x<v;++x){let E=y[x];if(O(E))for(let I=0,w=E.length;I<w;++I){let Q=E[I],M=Q.data.tileBoundingRegion;Y0i(this,Q,o),o.minimumTerrainHeight=Math.min(o.minimumTerrainHeight,M.minimumHeight)}}};function Drt(o,A){let f=A.globeTranslucencyState;if(f.translucent){let m=o.renderState.blending.enabled;f.pushDerivedCommands(o,m,A)}else A.commandList.push(o)}Qd.prototype.updateForPick=function(o){let A=this._drawCommands;for(let f=0,m=this._usedDrawCommands;f<m;++f)Drt(A[f],o)};Qd.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()};Qd.prototype.getLevelMaximumGeometricError=function(o){return this._terrainProvider.getLevelMaximumGeometricError(o)};Qd.prototype.loadTile=function(o,A){let f=A.data,m=!0,C;O(f)&&(m=f.boundingVolumeSourceTile!==A||A._lastSelectionResult===sa.CULLED_BUT_NEEDED,C=f.terrainState),zM.processStateMachine(A,o,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,m),f=A.data,m&&C!==A.data.terrainState&&this.computeTileVisibility(A,o,this.quadtree.occluders)!==vg.NONE&&f.boundingVolumeSourceTile===A&&(m=!1,zM.processStateMachine(A,o,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,m))};var v0i=new wi,Trt=new Si,E0i=new Si,I0i=new Kt;function Bee(o,A){if(A.west<A.east)return A;let f=Si.clone(A,E0i);return Si.center(o,I0i).longitude>0?f.east=je.PI:f.west=-je.PI,f}function Mrt(o,A){if(A.cameraUnderground||A.globeTranslucencyState.translucent)return!0;if(o.backFaceCulling)return!1;let f=o._clippingPlanes;return!!(O(f)&&f.enabled||O(o._multiClippingPlanes)||!Si.equals(o.cartographicLimitRectangle,Si.MAX_VALUE))}Qd.prototype.computeTileVisibility=function(o,A,f){let m=this.computeDistanceToTile(o,A);o._distance=m;let C=Mrt(this,A);if(A.fog.enabled&&!C&&je.fog(m,A.fog.density)>=1)return vg.NONE;let y=o.data,x=y.tileBoundingRegion;if(y.boundingVolumeSourceTile===void 0)return vg.PARTIAL;let v=A.cullingVolume,E=x.boundingVolume;O(E)||(E=x.boundingSphere),y.clippedByBoundaries=!1;let I=Bee(o.rectangle,this.cartographicLimitRectangle),w=Si.simpleIntersection(I,o.rectangle,Trt);if(!O(w))return vg.NONE;if(Si.equals(w,o.rectangle)||(y.clippedByBoundaries=!0),A.mode!==xi.SCENE3D&&(E=v0i,wi.fromRectangleWithHeights2D(o.rectangle,A.mapProjection,x.minimumHeight,x.maximumHeight,E),ee.fromElements(E.center.z,E.center.x,E.center.y,E.center),A.mode===xi.MORPHING&&O(y.renderedMesh)&&(E=wi.union(x.boundingSphere,E,E))),!O(E))return vg.PARTIAL;let Q=this._clippingPlanes;if(O(Q)&&Q.enabled){let F=Q.computeIntersectionWithBoundingVolume(E);if(o.isClipped=F!==La.INSIDE,F===La.OUTSIDE)return vg.NONE}let M=this._multiClippingPlanes;if(O(M)&&M.enabled)for(let F=0;M.length;F++){let L=M[F].computeIntersectionWithBoundingVolume(E);if(o.isClipped=L!==La.INSIDE,L===La.OUTSIDE)return vg.NONE}let B,T=v.computeVisibility(E);if(T===La.OUTSIDE?B=vg.NONE:T===La.INTERSECTING?B=vg.PARTIAL:T===La.INSIDE&&(B=vg.FULL),B===vg.NONE)return B;let D=A.mode===xi.SCENE3D&&A.camera.frustum instanceof Ds;if(A.mode===xi.SCENE3D&&!D&&O(f)&&!C){let F=y.occludeePointInScaledSpace;return!O(F)||f.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(F,x.minimumHeight)?B:vg.NONE}return B};Qd.prototype.canRefine=function(o){return O(o.data.terrainData)?!0:this.terrainProvider.getTileDataAvailable(o.x*2,o.y*2,o.level+1)!==void 0};var _0i=[],B0i=[];Qd.prototype.canRenderWithoutLosingDetail=function(o,A){let f=o.data,m=_0i;m.length=this._imageryLayers.length;let C=!1,y=!1,x;O(f)&&(C=f.terrainState===xh.READY,y=!0,x=f.imagery);let v,E;for(v=0,E=m.length;v<E;++v)m[v]=y;if(O(x))for(v=0,E=x.length;v<E;++v){let Q=x[v],M=Q.loadingImagery,B=!O(M)||M.state===sc.FAILED||M.state===sc.INVALID,T=(Q.loadingImagery||Q.readyImagery).imageryLayer._layerIndex;m[T]=B&&m[T]}let I=this.quadtree._lastSelectionFrameNumber,w=B0i;for(w.length=0,w.push(o.southwestChild,o.southeastChild,o.northwestChild,o.northeastChild);w.length>0;){let Q=w.pop(),M=Q._lastSelectionResultFrame===I?Q._lastSelectionResult:sa.NONE;if(M===sa.RENDERED){let B=Q.data;if(!O(B))continue;if(!C&&Q.data.terrainState===xh.READY)return!1;let T=Q.data.imagery;for(v=0,E=T.length;v<E;++v){let D=T[v],F=D.loadingImagery,L=!O(F)||F.state===sc.FAILED||F.state===sc.INVALID,R=(D.loadingImagery||D.readyImagery).imageryLayer._layerIndex;if(L&&!m[R])return!1}}else M===sa.REFINED&&w.push(Q.southwestChild,Q.southeastChild,Q.northwestChild,Q.northeastChild)}return!0};var w0i=new ee;Qd.prototype.computeTileLoadPriority=function(o,A){let f=o.data;if(f===void 0)return 0;let m=f.tileBoundingRegion.boundingVolume;if(m===void 0)return 0;let C=A.camera.positionWC,y=A.camera.directionWC,x=ee.subtract(m.center,C,w0i),v=ee.magnitude(x);return v<je.EPSILON5?0:(ee.divideByScalar(x,v,x),(1-ee.dot(x,y))*o._distance)};var IVe=new Xe,C$=new Xe,b0i=new ai,Q0i=new ai,S0i=new ai,D0i=new ee,_Ve=new ee,T0i=new ee,M0i=new ee;Qd.prototype.showTileThisFrame=function(o,A){let f=0,m=o.data.imagery;for(let v=0,E=m.length;v<E;++v){let I=m[v];O(I.readyImagery)&&I.readyImagery.imageryLayer.alpha!==0&&++f}let C=this._tilesToRenderByTextureCount[f];O(C)||(C=[],this._tilesToRenderByTextureCount[f]=C),C.push(o);let y=o.data;O(y.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;let x=this._debug;++x.tilesRendered,x.texturesRendered+=f};var P0i=[new ee,new ee,new ee,new ee];function BVe(o,A,f,m,C,y){let x=o.quadtree._occluders.ellipsoid,v=x.ellipsoid,E=P0i;return ee.fromRadians(f.west,f.south,C,v,E[0]),ee.fromRadians(f.east,f.south,C,v,E[1]),ee.fromRadians(f.west,f.north,C,v,E[2]),ee.fromRadians(f.east,f.north,C,v,E[3]),x.computeHorizonCullingPointPossiblyUnderEllipsoid(A,E,m,y)}Qd.prototype.computeDistanceToTile=function(o,A){N0i(o,this,A);let f=o.data;if(f.boundingVolumeSourceTile===void 0)return 9999999999;let m=f.tileBoundingRegion,C=m.minimumHeight,y=m.maximumHeight;if(f.boundingVolumeSourceTile!==o){let v=A.camera.positionCartographic.height,E=Math.abs(v-C),I=Math.abs(v-y);E>I?(m.minimumHeight=C,m.maximumHeight=C):(m.minimumHeight=y,m.maximumHeight=y)}let x=m.distanceToCamera(A);return m.minimumHeight=C,m.maximumHeight=y,x};function R0i(o,A){let f=0,m,C,y,x,v=A.length;for(y=A[0],m=1;m<=v;m++)x=A[m%v],o[0]>Math.min(y[0],x[0])&&o[0]<=Math.max(y[0],x[0])&&o[1]<=Math.max(y[1],x[1])&&y[0]!==x[0]&&(C=(o[0]-y[0])*(x[1]-y[1])/(x[0]-y[0])+y[1],(y[1]===x[1]||o[1]<=C)&&f++),y=x;return f%2!==0}function L0i(o,A,f,m){let C=(o.x-f.x)*(A.y-f.y)-(o.y-f.y)*(A.x-f.x),y=(o.x-m.x)*(A.y-m.y)-(o.y-m.y)*(A.x-m.x);if(C*y>=0)return!1;let x=(f.x-o.x)*(m.y-o.y)-(f.y-o.y)*(m.x-o.x),v=x+C-y;if(x*v>=0)return!1;let E=x/(y-C),I=E*(A.x-o.x),w=E*(A.y-o.y);return{x:o.x+I,y:o.y+w}}var y$=new Kt,xz=[],x$=[];function F0i(o,A,f){if(!O(o._flattenPolygonRegion.flattenPolygons))return!1;let m=o._flattenPolygonRegion.flattenPolygons,C=o._flattenPolygonRegion.flattenPolygonHeights,y=f.rectangle,x=y.west,v=y.south,E=y.east,I=y.north;xz.length=0,x$.length=0;let w=!1,Q=[[x,v],[E,v],[E,I],[x,I]];for(let M=0;M<C.length;M++){w=!1;for(let B=0;B<m[M].length;B++){let T=m[M][B];if(y$.longitude=T[0],y$.latitude=T[1],y$.height=0,Si.contains(y,y$)){xz.push(C[M]),x$.push(m[M]),w=!0;break}}if(!w){for(let B=0;B<Q.length;B++)if(R0i(Q[B],m[M])){xz.push(C[M]),x$.push(m[M]),w=!0;break}}if(!w)for(let B=0;B<m[M].length-1;B++){for(let T=0;T<Q.length-1;T++){let D={x:Q[T][0],y:Q[T][1]},F={x:Q[T+1][0],y:Q[T+1][1]},L={x:m[M][B][0],y:m[M][B][1]},R={x:m[M][B+1][0],y:m[M][B+1][1]};if(L0i(D,F,L,R)){xz.push(C[M]),x$.push(m[M]),w=!0;break}}if(w)break}if(w){let B=xz[0],T=B.maxHeight,D=B.minHeight,F=f.maximumHeight,L=f.minimumHeight;D>L&&T<F,T>=F&&(F=T),D<=L&&(L=D),f.maximumHeight=F,f.minimumHeight=L}}return!0}function N0i(o,A,f){let m=o.data;m===void 0&&(m=o.data=new zM);let C=o.tilingScheme.ellipsoid;m.tileBoundingRegion===void 0&&(m.tileBoundingRegion=new S5({computeBoundingVolumes:!1,rectangle:o.rectangle,ellipsoid:C,minimumHeight:0,maximumHeight:0}));let y=m.tileBoundingRegion,x=y.minimumHeight,v=y.maximumHeight,E=!1,I=o,w=m.mesh,Q=m.terrainData;if(w!==void 0&&w.minimumHeight!==void 0&&w.maximumHeight!==void 0)y.minimumHeight=w.minimumHeight,y.maximumHeight=w.maximumHeight,E=!0;else if(Q!==void 0&&Q._minimumHeight!==void 0&&Q._maximumHeight!==void 0)y.minimumHeight=Q._minimumHeight,y.maximumHeight=Q._maximumHeight;else{y.minimumHeight=Number.NaN,y.maximumHeight=Number.NaN;let M=o.parent;for(;M!==void 0;){let B=M.data;if(B!==void 0){let T=B.mesh,D=B.terrainData;if(T!==void 0&&T.minimumHeight!==void 0&&T.maximumHeight!==void 0){y.minimumHeight=T.minimumHeight,y.maximumHeight=T.maximumHeight;break}else if(D!==void 0&&D._minimumHeight!==void 0&&D._maximumHeight!==void 0){y.minimumHeight=D._minimumHeight,y.maximumHeight=D._maximumHeight;break}}M=M.parent}I=M}if(I!==void 0){let M=f.terrainExaggeration,B=f.terrainExaggerationRelativeHeight;if(M!==1&&(E=!1,y.minimumHeight=ID.getHeight(y.minimumHeight,M,B),y.maximumHeight=ID.getHeight(y.maximumHeight,M,B)),F0i(A,C,y)&&(E=!1),E)m.boundingVolumeIsFromMesh||(y._orientedBoundingBox=Hf.clone(w.orientedBoundingBox,y._orientedBoundingBox),y._boundingSphere=wi.clone(w.boundingSphere3D,y._boundingSphere),m.occludeePointInScaledSpace=ee.clone(w.occludeePointInScaledSpace,m.occludeePointInScaledSpace),O(m.occludeePointInScaledSpace)||(m.occludeePointInScaledSpace=BVe(A,y._orientedBoundingBox.center,o.rectangle,y.minimumHeight,y.maximumHeight,m.occludeePointInScaledSpace)));else{let T=y._orientedBoundingBox===void 0||y._boundingSphere===void 0;(y.minimumHeight!==x||y.maximumHeight!==v||T)&&(y.computeBoundingVolumes(C),m.occludeePointInScaledSpace=BVe(A,y._orientedBoundingBox.center,o.rectangle,y.minimumHeight,y.maximumHeight,m.occludeePointInScaledSpace))}m.boundingVolumeSourceTile=I,m.boundingVolumeIsFromMesh=E}else m.boundingVolumeSourceTile=void 0,m.boundingVolumeIsFromMesh=!1}Qd.prototype.isDestroyed=function(){return!1};Qd.prototype.destroy=function(){return this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),O(this._multiClippingPlanes)&&(this._multiClippingPlanes.destroy(),this._multiClippingPlanes=void 0),Qr(this)};function k0i(o,A,f){return function(m){let C,y,x=-1,v=m.data.imagery,E=v.length,I;for(I=0;I<E;++I)if(C=v[I],y=Ae(C.readyImagery,C.loadingImagery),y.imageryLayer===A){x=I;break}if(x!==-1){let w=x+o;if(C=v[w],y=O(C)?Ae(C.readyImagery,C.loadingImagery):void 0,!O(y)||y.imageryLayer!==A)return!A._createTileImagerySkeletons(m,f,w);for(I=x;I<w;++I)v[I].freeResources();v.splice(x,o)}return!0}}Qd.prototype._onLayerAdded=function(o,A){if(o.show){let f=this._terrainProvider,m=this,C=o.imageryProvider,y=this._imageryLayersUpdatedEvent;C._reload=function(){o._imageryCache={},m._quadtree.forEachLoadedTile(function(x){if(O(x._loadedCallbacks[o._layerIndex]))return;let v,E=x.data.imagery,I=E.length,w=-1,Q=0;for(v=0;v<I;++v){let B=E[v];if(Ae(B.readyImagery,B.loadingImagery).imageryLayer===o)w===-1&&(w=v),++Q;else if(w!==-1)break}if(w===-1)return;let M=w+Q;o._createTileImagerySkeletons(x,f,M)&&(x._loadedCallbacks[o._layerIndex]=k0i(Q,o,f),x.state=mC.LOADING)})},this._quadtree.forEachLoadedTile(function(x){o._createTileImagerySkeletons(x,f)&&(x.state=mC.LOADING,x.level!==0&&(x._lastSelectionResultFrame!==m.quadtree._lastSelectionFrameNumber||x._lastSelectionResult!==sa.RENDERED)&&(x.renderable=!1))}),this._layerOrderChanged=!0,y.raiseEvent()}};Qd.prototype._onLayerRemoved=function(o,A){this._quadtree.forEachLoadedTile(function(f){let m=f.data.imagery,C=-1,y=0;for(let x=0,v=m.length;x<v;++x){let E=m[x],I=E.loadingImagery;if(O(I)||(I=E.readyImagery),I.imageryLayer===o)C===-1&&(C=x),E.freeResources(),++y;else if(C!==-1)break}C!==-1&&m.splice(C,y)}),O(o.imageryProvider)&&(o.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()};Qd.prototype._onLayerMoved=function(o,A,f){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()};Qd.prototype._onLayerShownOrHidden=function(o,A,f){f?this._onLayerAdded(o,A):this._onLayerRemoved(o,A)};var wVe=new Xe,bVe=new Xe;function QVe(o,A){let f={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_atmosphereLightIntensity:function(){return this.properties.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return this.properties.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return this.properties.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return this.properties.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return this.properties.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return this.properties.atmosphereMieAnisotropy},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_terrainExaggerationAndRelativeHeight:function(){return this.properties.terrainExaggerationAndRelativeHeight},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){let C=o.context.uniformState.view,y=Xe.multiplyByPoint(C,this.properties.rtc,_Ve);return Xe.setTranslation(C,y,IVe),IVe},u_modifiedModelViewProjection:function(){let C=o.context.uniformState.view,y=o.context.uniformState.projection,x=Xe.multiplyByPoint(C,this.properties.rtc,_Ve);return Xe.setTranslation(C,x,C$),Xe.multiply(y,C$,C$),C$},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureAlpha:function(){return this.properties.dayTextureAlpha},u_dayTextureNightAlpha:function(){return this.properties.dayTextureNightAlpha},u_dayTextureDayAlpha:function(){return this.properties.dayTextureDayAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_slopeColorsTexture:function(){return UE.isSlopeDirty&&(UE._slopeTex=UE.createElevationTextureFromPallete(UE.SlopeMapPallete,o),this.properties.slopeColorsTexture2=UE._slopeTex,UE.isSlopeDirty=!1),UE._slopeTex},u_clippingPlanes:function(){let C=A._multiClippingPlanes;if(O(C)&&O(C.dataTexture))return C.dataTexture;let y=A._clippingPlanes;return O(y)&&O(y.texture)?y.texture:o.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){let C=A._multiClippingPlanes;if(O(C)){let v=Xe.multiply(o.context.uniformState.view,C.modelMatrix,wVe);return Xe.inverseTranspose(v,bVe)}let y=A._clippingPlanes,x=O(y)?Xe.multiply(o.context.uniformState.view,y.modelMatrix,wVe):Xe.IDENTITY;return Xe.inverseTranspose(x,bVe)},u_clippingPlanesEdgeStyle:function(){let C=A._multiClippingPlanes;if(O(C)){let x=C.edgeColor.clone();return x.alpha=C.edgeWidth,x}let y=this.properties.clippingPlanesEdgeColor;return y.alpha=this.properties.clippingPlanesEdgeWidth,y},u_multiClippingPlanesLength:function(){let C=A._multiClippingPlanes;if(O(C)){let y=C.lengthTexture;if(O(y))return y}return O(C)?C:o.context.defaultTexture},u_minimumBrightness:function(){return o.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_colorsToAlpha:function(){return this.properties.colorsToAlpha},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},u_translucencyRectangle:function(){return this.properties.localizedTranslucencyRectangle},u_undergroundColor:function(){return this.properties.undergroundColor},u_undergroundColorAlphaByDistance:function(){return this.properties.undergroundColorAlphaByDistance},u_lambertDiffuseMultiplier:function(){return this.properties.lambertDiffuseMultiplier},properties:{initialColor:new ai(0,0,.5,1),fillHighlightColor:new At(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new It(65e5,9e6),nightFadeDistance:new It(1e7,4e7),atmosphereLightIntensity:10,atmosphereRayleighCoefficient:new ee(55e-7,13e-6,284e-7),atmosphereMieCoefficient:new ee(21e-6,21e-6,21e-6),atmosphereRayleighScaleHeight:1e4,atmosphereMieScaleHeight:3200,atmosphereMieAnisotropy:.9,hsbShift:new ee,center3D:void 0,rtc:new ee,modifiedModelView:new Xe,tileRectangle:new ai,terrainExaggerationAndRelativeHeight:new It(1,0),dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new It,southMercatorYAndOneOverHeight:new It,waterMask:void 0,waterMaskTranslationAndScale:new ai,minMaxHeight:new It,scaleAndBias:new Xe,clippingPlanesEdgeColor:At.clone(At.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new ai,frontFaceAlphaByDistance:new ai,backFaceAlphaByDistance:new ai,localizedTranslucencyRectangle:new ai,undergroundColor:At.clone(At.TRANSPARENT),undergroundColorAlphaByDistance:new ai,lambertDiffuseMultiplier:0,slopeColorsTexture2:O(UE._slopeTex)?UE._slopeTex:UE.createElevationTextureFromPallete(UE.SlopeMapPallete,o)}};if(A.clipPlanes.length>0&&(f.properties.contourLineTexture=null,f.u_contourLineTexture=function(){return f.properties.contourLineTexture},f.properties.contourLineTranslationAndScale=new ai,f.u_contourLineTranslationAndScale=function(){return this.properties.contourLineTranslationAndScale}),O(A.cutPolygonUniformMap))return ia(f,A.cutPolygonUniformMap);let m=A.materialUniformMap;if(O(m)){let C=m.u_bFlatten;if(O(C)&&C()){let y=m.u_r_eastNorthUpToFixedFrame(),x=m.u_eastNorthUpToFixedFrame(),v=function(){let I=new Xe;return Xe.fromTranslation(f.properties.rtc,I),I},E=function(){let I=new Xe;Xe.fromTranslation(f.properties.rtc,I);let w=new Xe;return Xe.inverse(I,w),w};f=ia(f,{u_eastNorthUpToFixedFrameA:function(){let I=E(),w=new Xe;return Xe.multiply(I,x,w),w},u_r_eastNorthUpToFixedFrameA:function(){let I=v(),w=new Xe;return Xe.multiply(y,I,w),w}})}return ia(f,m)}return f}function O0i(o,A,f){let m=f.data,C,y;if(O(m.vertexArray)?(C=m.mesh,y=m.vertexArray):O(m.fill)&&O(m.fill.vertexArray)&&(C=m.fill.mesh,y=m.fill.vertexArray),!(!O(C)||!O(y))){if(O(m.wireframeVertexArray)){if(m.wireframeVertexArray.mesh===C)return;m.wireframeVertexArray.destroy(),m.wireframeVertexArray=void 0}m.wireframeVertexArray=U0i(o,y,C),m.wireframeVertexArray.mesh=C}}function U0i(o,A,f){let m={indices:f.indices,primitiveType:yn.TRIANGLES};rc.toWireframe(m);let C=m.indices,y=vo.createIndexBuffer({context:o,typedArray:C,usage:ln.STATIC_DRAW,indexDatatype:Nn.fromSizeInBytes(C.BYTES_PER_ELEMENT)});return new Vc({context:o,attributes:A._attributes,indexBuffer:y})}var Prt,Rrt,wee;(function(){let o=new co({geometry:r2.fromDimensions({dimensions:new ee(2,2,2)})}),A=new co({geometry:new tP({radius:1})}),f=new Xe,m,C;function y(x){return new $a({geometryInstances:x,appearance:new za({translucent:!1,flat:!0}),asynchronous:!1})}Prt=function(x,v){return x===m||(wee(),m=x,f=Xe.fromRotationTranslation(x.halfAxes,x.center,f),o.modelMatrix=f,o.attributes.color=Yo.fromColor(v),C=y(o)),C},Rrt=function(x,v){return x===m||(wee(),m=x,f=Xe.fromTranslation(x.center,f),f=Xe.multiplyByUniformScale(f,x.radius,f),A.modelMatrix=f,A.attributes.color=Yo.fromColor(v),C=y(A)),C},wee=function(){O(C)&&(C.destroy(),C=void 0,m=void 0)}})();var G0i=new ai(0,0,0,0),H0i={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applyDayNightAlpha:void 0,applySplit:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,colorToAlpha:void 0,hasGeodeticSurfaceNormals:void 0,hasExaggeration:void 0},V0i=At.TRANSPARENT,z0i=new To;function K0i(o,A){let f=new ai,m=o.graticulesLevel,C=o.graticulesEnable,y=A._rectangle,x=A.tilingScheme,v=Math.pow(2,m)*36,E=Math.pow(2,m)*18,I=je.TWO_PI/v,w=je.PI/E,Q=y.west,M=(Q-Math.floor(Q/I)*I)/I,B=y.east,T=(B-Q)/I,D=y.south+je.PI_OVER_TWO,F=(D-Math.floor(D/w)*w)/w,L=y.north+je.PI_OVER_TWO,R=(L-D)/w;return Q>B&&console.log("west > east"),D>L&&console.log("west > east"),f.x=M,f.y=F,f.z=T,f.w=R,f}function Y0i(o,A,f){let m=A.data;O(m.vertexArray)||(m.fill===void 0&&(m.fill=new goe(A)),m.fill.update(o,f));let C=f.creditDisplay,y=m.terrainData;if(O(y)&&O(y.credits)){let We=y.credits;for(let Oe=0,Ye=We.length;Oe<Ye;++Oe)C.addCredit(We[Oe])}let x=yo.maximumTextureImageUnits,v=m.waterMaskTexture,E=m.waterMaskTranslationAndScale;!O(v)&&O(m.fill)&&(v=m.fill.waterMaskTexture,E=m.fill.waterMaskTranslationAndScale);let I=f.cameraUnderground,w=f.globeTranslucencyState,Q=w.translucent,M=w.frontFaceAlphaByDistance,B=w.backFaceAlphaByDistance,T=w.rectangle,D=Ae(o.undergroundColor,V0i),F=Ae(o.undergroundColorAlphaByDistance,z0i),L=Mrt(o,f)&&f.mode===xi.SCENE3D&&D.alpha>0&&(F.nearValue>0||F.farValue>0),R=o.lambertDiffuseMultiplier,k=o.hasWaterMask&&O(v),U=o.oceanNormalMap,V=k&&O(U),H=o.terrainProvider.ready&&o.terrainProvider.hasVertexNormals,q=f.fog.enabled&&f.fog.renderable&&!I,ie=o.showGroundAtmosphere&&f.mode===xi.SCENE3D,Z=Al.castShadows(o.shadows)&&!Q,oe=Al.receiveShadows(o.shadows)&&!Q,ne=o.hueShift,se=o.saturationShift,ce=o.brightnessShift,j=!(je.equalsEpsilon(ne,0,je.EPSILON7)&&je.equalsEpsilon(se,0,je.EPSILON7)&&je.equalsEpsilon(ce,0,je.EPSILON7)),de=!1;if(ie){let We=ee.magnitude(f.camera.positionWC),Oe=o.nightFadeOutDistance;de=We>Oe}k&&--x,V&&--x,O(f.shadowState)&&f.shadowState.shadowsEnabled&&--x,O(o.clippingPlanes)&&o.clippingPlanes.enabled&&--x,x-=w.numberOfTextureUniforms;let me=m.renderedMesh,_e=me.center,Be=me.encoding,Qe=m.tileBoundingRegion,Ie=f.terrainExaggeration,ve=f.terrainExaggerationRelativeHeight,K=Ie!==1,W=Be.hasGeodeticSurfaceNormals,te=b0i,Y=0,he=0,fe=0,Ce=0,Ee=!1;if(f.mode!==xi.SCENE3D){let We=f.mapProjection,Oe=We.project(Si.southwest(A.rectangle),T0i),Ye=We.project(Si.northeast(A.rectangle),M0i);if(te.x=Oe.x,te.y=Oe.y,te.z=Ye.x,te.w=Ye.y,f.mode!==xi.MORPHING&&(_e=D0i,_e.x=0,_e.y=(te.z+te.x)*.5,_e.z=(te.w+te.y)*.5,te.x-=_e.y,te.y-=_e.z,te.z-=_e.y,te.w-=_e.z),f.mode===xi.SCENE2D&&Be.quantization===Pv.BITS12){let rt=1/(Math.pow(2,12)-1)*.5,gt=(te.z-te.x)*rt,Et=(te.w-te.y)*rt;te.x-=gt,te.y-=Et,te.z+=gt,te.w+=Et}(We instanceof OA||We instanceof t6)&&(Y=A.rectangle.south,he=A.rectangle.north,fe=OA.geodeticLatitudeToMercatorAngle(Y),Ce=1/(OA.geodeticLatitudeToMercatorAngle(he)-fe),Ee=!0)}let be=H0i;be.frameState=f,be.surfaceTile=m,be.showReflectiveOcean=k,be.showOceanWaves=V,be.enableLighting=o.enableLighting,be.dynamicAtmosphereLighting=o.dynamicAtmosphereLighting,be.dynamicAtmosphereLightingFromSun=o.dynamicAtmosphereLightingFromSun,be.showGroundAtmosphere=ie,be.atmosphereLightIntensity=o.atmosphereLightIntensity,be.atmosphereRayleighCoefficient=o.atmosphereRayleighCoefficient,be.atmosphereMieCoefficient=o.atmosphereMieCoefficient,be.atmosphereRayleighScaleHeight=o.atmosphereRayleighScaleHeight,be.atmosphereMieScaleHeight=o.atmosphereMieScaleHeight,be.atmosphereMieAnisotropy=o.atmosphereMieAnisotropy,be.perFragmentGroundAtmosphere=de,be.hasVertexNormals=H,be.useWebMercatorProjection=Ee,be.clippedByBoundaries=m.clippedByBoundaries,be.hasGeodeticSurfaceNormals=W,be.hasExaggeration=K;let Re=m.imagery,Ne=0,Je=Re.length,ot=o.showSkirts&&!I&&!Q,nt=o.backFaceCulling&&!I&&!Q,$e=nt?o._renderState:o._disableCullingRenderState,ht=nt?o._blendRenderState:o._disableCullingBlendRenderState,ze=$e,Ze=o._firstPassInitialColor,ct=f.context;if(O(o._debug.boundingSphereTile)||wee(),o._materialUniformMap!==o.materialUniformMap||o.clipPlanes.length!==o._clipPlanes.length){o._materialUniformMap=o.materialUniformMap;let We=o._drawCommands.length;for(let Oe=0;Oe<We;++Oe)o._uniformMaps[Oe]=QVe(f,o);o._clipPlanes=o.clipPlanes}do{let We=0,Oe,Ye;if(o._drawCommands.length<=o._usedDrawCommands?(Oe=new On,Oe.owner=A,Oe.cull=!1,Oe.boundingVolume=new wi,Oe.orientedBoundingBox=void 0,Ye=QVe(f,o),o._drawCommands.push(Oe),o._uniformMaps.push(Ye)):(Oe=o._drawCommands[o._usedDrawCommands],Ye=o._uniformMaps[o._usedDrawCommands]),Oe.owner=A,++o._usedDrawCommands,A===o._debug.boundingSphereTile){let hi=Qe.boundingVolume,Ni=Qe.boundingSphere;O(hi)?Prt(hi,At.RED).update(f):O(Ni)&&Rrt(Ni,At.RED).update(f)}let rt=Ye.properties;ai.clone(Ze,rt.initialColor),rt.oceanNormalMap=U,rt.lightingFadeDistance.x=o.lightingFadeOutDistance,rt.lightingFadeDistance.y=o.lightingFadeInDistance,rt.nightFadeDistance.x=o.nightFadeOutDistance,rt.nightFadeDistance.y=o.nightFadeInDistance,rt.atmosphereLightIntensity=o.atmosphereLightIntensity,rt.atmosphereRayleighCoefficient=o.atmosphereRayleighCoefficient,rt.atmosphereMieCoefficient=o.atmosphereMieCoefficient,rt.atmosphereRayleighScaleHeight=o.atmosphereRayleighScaleHeight,rt.atmosphereMieScaleHeight=o.atmosphereMieScaleHeight,rt.atmosphereMieAnisotropy=o.atmosphereMieAnisotropy,rt.zoomedOutOceanSpecularIntensity=o.zoomedOutOceanSpecularIntensity;let gt=I?B:M,Et=I?M:B;O(gt)&&(ai.fromElements(gt.near,gt.nearValue,gt.far,gt.farValue,rt.frontFaceAlphaByDistance),ai.fromElements(Et.near,Et.nearValue,Et.far,Et.farValue,rt.backFaceAlphaByDistance)),ai.fromElements(F.near,F.nearValue,F.far,F.farValue,rt.undergroundColorAlphaByDistance),At.clone(D,rt.undergroundColor),rt.lambertDiffuseMultiplier=R;let yt=!O(m.vertexArray)&&O(o.fillHighlightColor)&&o.fillHighlightColor.alpha>0;yt&&At.clone(o.fillHighlightColor,rt.fillHighlightColor),rt.terrainExaggerationAndRelativeHeight.x=Ie,rt.terrainExaggerationAndRelativeHeight.y=ve,rt.center3D=me.center,ee.clone(_e,rt.rtc),ai.clone(te,rt.tileRectangle),rt.southAndNorthLatitude.x=Y,rt.southAndNorthLatitude.y=he,rt.southMercatorYAndOneOverHeight.x=fe,rt.southMercatorYAndOneOverHeight.y=Ce;let vt=Q0i,Rt=Bee(A.rectangle,o.cartographicLimitRectangle),qt=S0i,wt=Bee(A.rectangle,T);ee.fromElements(ne,se,ce,rt.hsbShift);let Lt=A.rectangle,pi=1/Lt.width,Ut=1/Lt.height;vt.x=(Rt.west-Lt.west)*pi,vt.y=(Rt.south-Lt.south)*Ut,vt.z=(Rt.east-Lt.west)*pi,vt.w=(Rt.north-Lt.south)*Ut,ai.clone(vt,rt.localizedCartographicLimitRectangle),qt.x=(wt.west-Lt.west)*pi,qt.y=(wt.south-Lt.south)*Ut,qt.z=(wt.east-Lt.west)*pi,qt.w=(wt.north-Lt.south)*Ut,ai.clone(qt,rt.localizedTranslucencyRectangle);let ri=q&&je.fog(A._distance,f.fog.density)>je.EPSILON3;j=j&&(ri||ie);let ni=!1,kt=!1,qe=!1,Fe=!1,it=!1,Ht=!1,Jt=!1,jt=!1,or=!1,Pr=!1;for(;We<x&&Ne<Je;){let hi=Re[Ne],Ni=hi.readyImagery;if(++Ne,!O(Ni)||Ni.imageryLayer.alpha===0)continue;let ki=hi.useWebMercatorT?Ni.textureWebMercator:Ni.texture,di=Ni.imageryLayer;O(hi.textureTranslationAndScale)||(hi.textureTranslationAndScale=di._calculateTextureTranslationAndScale(A,hi)),rt.dayTextures[We]=ki,di.imageryProvider instanceof m5?rt.dayTextureTranslationAndScale[We]=K0i(o,A):rt.dayTextureTranslationAndScale[We]=hi.textureTranslationAndScale,rt.dayTextureTexCoordsRectangle[We]=hi.textureCoordinateRectangle,rt.dayTextureUseWebMercatorT[We]=hi.useWebMercatorT,rt.dayTextureAlpha[We]=di.alpha,Ht=Ht||rt.dayTextureAlpha[We]!==1,rt.dayTextureNightAlpha[We]=di.nightAlpha,Jt=Jt||rt.dayTextureNightAlpha[We]!==1,rt.dayTextureDayAlpha[We]=di.dayAlpha,Jt=Jt||rt.dayTextureDayAlpha[We]!==1,rt.dayTextureBrightness[We]=di.brightness,ni=ni||rt.dayTextureBrightness[We]!==dD.DEFAULT_BRIGHTNESS,rt.dayTextureContrast[We]=di.contrast,kt=kt||rt.dayTextureContrast[We]!==dD.DEFAULT_CONTRAST,rt.dayTextureHue[We]=di.hue,qe=qe||rt.dayTextureHue[We]!==dD.DEFAULT_HUE,rt.dayTextureSaturation[We]=di.saturation,Fe=Fe||rt.dayTextureSaturation[We]!==dD.DEFAULT_SATURATION,rt.dayTextureOneOverGamma[We]=1/di.gamma,it=it||rt.dayTextureOneOverGamma[We]!==1/dD.DEFAULT_GAMMA,rt.dayTextureSplit[We]=di.splitDirection,jt=jt||rt.dayTextureSplit[We]!==0;let Oi=rt.dayTextureCutoutRectangles[We];if(O(Oi)||(Oi=rt.dayTextureCutoutRectangles[We]=new ai),ai.clone(ai.ZERO,Oi),O(di.cutoutRectangle)){let Qi=Bee(Lt,di.cutoutRectangle),Pi=Si.simpleIntersection(Qi,Lt,Trt);or=O(Pi)||or,Oi.x=(Qi.west-Lt.west)*pi,Oi.y=(Qi.south-Lt.south)*Ut,Oi.z=(Qi.east-Lt.west)*pi,Oi.w=(Qi.north-Lt.south)*Ut}let Hi=rt.colorsToAlpha[We];O(Hi)||(Hi=rt.colorsToAlpha[We]=new ai);let Fi=O(di.colorToAlpha)&&di.colorToAlphaThreshold>0;if(Pr=Pr||Fi,Fi){let Qi=di.colorToAlpha;Hi.x=Qi.red,Hi.y=Qi.green,Hi.z=Qi.blue,Hi.w=di.colorToAlphaThreshold}else Hi.w=-1;if(O(Ni.credits)){let Qi=Ni.credits;for(let Pi=0,Yn=Qi.length;Pi<Yn;++Pi)C.addCredit(Qi[Pi])}++We}if(rt.dayTextures.length=We,rt.waterMask=v,ai.clone(E,rt.waterMaskTranslationAndScale),o.clipPlanes.length>0){let hi=m.contourLineTexture?m.contourLineTexture:f.context.defaultTexture;rt.contourLineTexture=hi,ai.clone(m.contourLineTranslationAndScale,rt.contourLineTranslationAndScale)}rt.minMaxHeight.x=Be.minimumHeight,rt.minMaxHeight.y=Be.maximumHeight,Xe.clone(Be.matrix,rt.scaleAndBias);let Mi=o._clippingPlanes,Zi=O(Mi)&&Mi.enabled&&A.isClipped;Zi&&(rt.clippingPlanesEdgeColor=At.clone(Mi.edgeColor,rt.clippingPlanesEdgeColor),rt.clippingPlanesEdgeWidth=Mi.edgeWidth),be.numberOfDayTextures=We,be.applyBrightness=ni,be.applyContrast=kt,be.applyHue=qe,be.applySaturation=Fe,be.applyGamma=it,be.applyAlpha=Ht,be.applyDayNightAlpha=Jt,be.applySplit=jt,be.enableFog=ri,be.enableClippingPlanes=Zi,be.clippingPlanes=Mi,be.hasImageryLayerCutout=or,be.colorCorrect=j,be.highlightFillTile=yt,be.colorToAlpha=Pr,be.showUndergroundColor=L,be.translucent=Q,be.enableFlatten=o._flattenPolygonRegion.enableFlatten,be.showSlopeMap=UE.displaySlopeMap,be.smoothSlopeAtHigherAlt=!1,be.multiClippingPlanes=o._multiClippingPlanes;let lr=m.renderedMesh.indices.length;ot||(lr=m.renderedMesh.indexCountWithoutSkirts),Oe.shaderProgram=o._surfaceShaderSet.getShaderProgram(be),Oe.castShadows=Z,Oe.receiveShadows=oe,Oe.renderState=ze,Oe.primitiveType=yn.TRIANGLES,Oe.vertexArray=m.vertexArray||m.fill.vertexArray,Oe.count=lr,Oe.uniformMap=Ye,Oe.pass=hr.GLOBE,o._debug.wireframe&&(O0i(ct,o,A),O(m.wireframeVertexArray)&&(Oe.vertexArray=m.wireframeVertexArray,Oe.primitiveType=yn.LINES,Oe.count=lr*2));let Gi=Oe.boundingVolume,li=Oe.orientedBoundingBox;f.mode!==xi.SCENE3D?(wi.fromRectangleWithHeights2D(A.rectangle,f.mapProjection,Qe.minimumHeight,Qe.maximumHeight,Gi),ee.fromElements(Gi.center.z,Gi.center.x,Gi.center.y,Gi.center),f.mode===xi.MORPHING&&(Gi=wi.union(Qe.boundingSphere,Gi,Gi))):(Oe.boundingVolume=wi.clone(Qe.boundingSphere,Gi),Oe.orientedBoundingBox=Hf.clone(Qe.boundingVolume,li)),Oe.dirty=!0,Q&&w.updateDerivedCommands(Oe,f),Drt(Oe,f),ze=ht,Ze=G0i}while(Ne<Je)}var Kbe=Qd;function Lrt(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=Si.clone(Si.MAX_VALUE)}Object.defineProperties(Lrt.prototype,{enabled:{get:function(){return this._enabled},set:function(o){this._enabled=o}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(o){this._frontFaceAlpha=o}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(o){this._frontFaceAlphaByDistance=To.clone(o,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(o){this._backFaceAlpha=o}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(o){this._backFaceAlphaByDistance=To.clone(o,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(o){O(o)||(o=Si.clone(Si.MAX_VALUE)),Si.clone(o,this._rectangle)}}});var LJ=Lrt;function bp(){this._layers=[],this.layerAdded=new br,this.layerRemoved=new br,this.layerMoved=new br,this.layerShownOrHidden=new br}Object.defineProperties(bp.prototype,{length:{get:function(){return this._layers.length}}});bp.prototype.add=function(o,A){O(A)?this._layers.splice(A,0,o):(A=this._layers.length,this._layers.push(o)),this._update(),this.layerAdded.raiseEvent(o,A)};bp.prototype.addImageryProvider=function(o,A){let f=new dD(o);return this.add(f,A),f};bp.prototype.remove=function(o,A){A=Ae(A,!0);let f=this._layers.indexOf(o);return f!==-1?(this._layers.splice(f,1),this._update(),this.layerRemoved.raiseEvent(o,f),A&&o.destroy(),!0):!1};bp.prototype.removeAll=function(o){o=Ae(o,!0);let A=this._layers;for(let f=0,m=A.length;f<m;f++){let C=A[f];this.layerRemoved.raiseEvent(C,f),o&&C.destroy()}this._layers=[]};bp.prototype.contains=function(o){return this.indexOf(o)!==-1};bp.prototype.indexOf=function(o){return this._layers.indexOf(o)};bp.prototype.get=function(o){return this._layers[o]};function poe(o,A){return o.indexOf(A)}function Frt(o,A,f){let m=o._layers;if(A=je.clamp(A,0,m.length-1),f=je.clamp(f,0,m.length-1),A===f)return;let C=m[A];m[A]=m[f],m[f]=C,o._update(),o.layerMoved.raiseEvent(C,f,A)}bp.prototype.raise=function(o){let A=poe(this._layers,o);Frt(this,A,A+1)};bp.prototype.lower=function(o){let A=poe(this._layers,o);Frt(this,A,A-1)};bp.prototype.raiseToTop=function(o){let A=poe(this._layers,o);A!==this._layers.length-1&&(this._layers.splice(A,1),this._layers.push(o),this._update(),this.layerMoved.raiseEvent(o,this._layers.length-1,A))};bp.prototype.lowerToBottom=function(o){let A=poe(this._layers,o);A!==0&&(this._layers.splice(A,1),this._layers.splice(0,0,o),this._update(),this.layerMoved.raiseEvent(o,0,A))};var J0i=new Si;function Nrt(o,A,f,m){let C=o.globe._surface._tilesToRender,y;for(let v=0;!O(y)&&v<C.length;++v){let E=C[v];Si.contains(E.rectangle,A)&&(y=E)}if(!O(y))return;let x=y.data.imagery;for(let v=x.length-1;v>=0;--v){let E=x[v],I=E.readyImagery;if(!O(I))continue;let w=I.imageryLayer.imageryProvider;if(f&&!O(w.pickFeatures)||!Si.contains(I.rectangle,A))continue;let Q=J0i,M=1/1024;Q.west=je.lerp(y.rectangle.west,y.rectangle.east,E.textureCoordinateRectangle.x-M),Q.east=je.lerp(y.rectangle.west,y.rectangle.east,E.textureCoordinateRectangle.z+M),Q.south=je.lerp(y.rectangle.south,y.rectangle.north,E.textureCoordinateRectangle.y-M),Q.north=je.lerp(y.rectangle.south,y.rectangle.north,E.textureCoordinateRectangle.w+M),Si.contains(Q,A)&&m(I)}}bp.prototype.pickImageryLayers=function(o,A){let f=A.globe.pick(o,A);if(!O(f))return;let m=A.globe.ellipsoid.cartesianToCartographic(f),C=[];if(Nrt(A,m,!1,function(y){C.push(y.imageryLayer)}),C.length!==0)return C};bp.prototype.pickImageryLayerFeatures=function(o,A){let f=A.globe.pick(o,A);if(!O(f))return;let m=A.globe.ellipsoid.cartesianToCartographic(f),C=[],y=[];if(Nrt(A,m,!0,function(x){let v=x.imageryLayer.imageryProvider.pickFeatures(x.x,x.y,x.level,m.longitude,m.latitude);O(v)&&(C.push(v),y.push(x.imageryLayer))}),C.length!==0)return Promise.all(C).then(function(x){let v=[];for(let E=0;E<x.length;++E){let I=x[E],w=y[E];if(O(I)&&I.length>0)for(let Q=0;Q<I.length;++Q){let M=I[Q];M.imageryLayer=w,O(M.position)||(M.position=m),v.push(M)}}return v})};bp.prototype.queueReprojectionCommands=function(o){let A=this._layers;for(let f=0,m=A.length;f<m;++f)A[f].queueReprojectionCommands(o)};bp.prototype.cancelReprojections=function(){let o=this._layers;for(let A=0,f=o.length;A<f;++A)o[A].cancelReprojections()};bp.prototype.isDestroyed=function(){return!1};bp.prototype.destroy=function(){return this.removeAll(!0),Qr(this)};bp.prototype._update=function(){let o=!0,A=this._layers,f,m,C,y;for(C=0,y=A.length;C<y;++C)m=A[C],m._layerIndex=C,m.show?(m._isBaseLayer=o,o=!1):m._isBaseLayer=!1,m.show!==m._show&&(O(m._show)&&(O(f)||(f=[]),f.push(m)),m._show=m.show);if(O(f))for(C=0,y=f.length;C<y;++C)m=f[C],this.layerShownOrHidden.raiseEvent(m,m._layerIndex,m.show)};var Ybe=bp;function krt(o){this._ellipsoid=new L5(o.ellipsoid,ee.ZERO)}Object.defineProperties(krt.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var moe=krt;function wv(o){this._tilingScheme=o.tilingScheme,this._x=o.x,this._y=o.y,this._level=o.level,this._parent=o.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=[],this._frameUpdated=void 0,this._lastSelectionResult=sa.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=mC.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0,this.datazh=void 0}wv.createLevelZeroTiles=function(o){let A=o.getNumberOfXTilesAtLevel(0),f=o.getNumberOfYTilesAtLevel(0),m=new Array(A*f),C=0;for(let y=0;y<f;++y)for(let x=0;x<A;++x)m[C++]=new wv({tilingScheme:o,x,y,level:0});return m};wv.prototype._updateCustomData=function(o,A,f){let m=this.customData,C,y,x;if(O(A)&&O(f)){for(m=m.filter(function(v){return f.indexOf(v)===-1}),this._customData=m,x=this._rectangle,C=0;C<A.length;++C)y=A[C],Si.contains(x,y.positionCartographic)&&m.push(y);this._frameUpdated=o}else{let v=this._parent;if(O(v)&&this._frameUpdated!==v._frameUpdated){m.length=0,x=this._rectangle;let E=v.customData;for(C=0;C<E.length;++C)y=E[C],Si.contains(x,y.positionCartographic)&&m.push(y);this._frameUpdated=v._frameUpdated}}};Object.defineProperties(wv.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return O(this._southwestChild)||(this._southwestChild=new wv({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return O(this._southeastChild)||(this._southeastChild=new wv({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return O(this._northwestChild)||(this._northwestChild=new wv({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return O(this._northeastChild)||(this._northeastChild=new wv({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<mC.DONE}},eligibleForUnloading:{get:function(){let o=!0;return O(this.data)&&(o=this.data.eligibleForUnloading,O(o)||(o=!0)),o}}});wv.prototype.findLevelZeroTile=function(o,A,f){let m=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(A<0?A+=m:A>=m&&(A-=m),!(f<0||f>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return o.filter(function(C){return C.x===A&&C.y===f})[0]};wv.prototype.findTileToWest=function(o){let A=this.parent;if(A===void 0)return this.findLevelZeroTile(o,this.x-1,this.y);if(A.southeastChild===this)return A.southwestChild;if(A.northeastChild===this)return A.northwestChild;let f=A.findTileToWest(o);if(f!==void 0)return A.southwestChild===this?f.southeastChild:f.northeastChild};wv.prototype.findTileToEast=function(o){let A=this.parent;if(A===void 0)return this.findLevelZeroTile(o,this.x+1,this.y);if(A.southwestChild===this)return A.southeastChild;if(A.northwestChild===this)return A.northeastChild;let f=A.findTileToEast(o);if(f!==void 0)return A.southeastChild===this?f.southwestChild:f.northwestChild};wv.prototype.findTileToSouth=function(o){let A=this.parent;if(A===void 0)return this.findLevelZeroTile(o,this.x,this.y+1);if(A.northwestChild===this)return A.southwestChild;if(A.northeastChild===this)return A.southeastChild;let f=A.findTileToSouth(o);if(f!==void 0)return A.southwestChild===this?f.northwestChild:f.northeastChild};wv.prototype.findTileToNorth=function(o){let A=this.parent;if(A===void 0)return this.findLevelZeroTile(o,this.x,this.y-1);if(A.southwestChild===this)return A.northwestChild;if(A.southeastChild===this)return A.northeastChild;let f=A.findTileToNorth(o);if(f!==void 0)return A.northwestChild===this?f.southwestChild:f.southeastChild};wv.prototype.freeResources=function(){this.state=mC.START,this.renderable=!1,this.upsampledFromParent=!1,O(this.data)&&O(this.data.freeResources)&&this.data.freeResources(),O(this.data)&&O(this.data.geometryPrimitive)&&(this.data.geometryPrimitive.destroy(),this.data.geometryPrimitive=void 0),v$(this._southwestChild),this._southwestChild=void 0,v$(this._southeastChild),this._southeastChild=void 0,v$(this._northwestChild),this._northwestChild=void 0,v$(this._northeastChild),this._northeastChild=void 0};function v$(o){O(o)&&o.freeResources()}var Coe=wv;function yoe(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}yoe.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head};yoe.prototype.trimTiles=function(o){let A=this.tail,f=!0;for(;f&&O(this._lastBeforeStartOfFrame)&&this.count>o&&O(A);){f=A!==this._lastBeforeStartOfFrame;let m=A.replacementPrevious;A.eligibleForUnloading&&(A.freeResources(),Ort(this,A)),A=m}};function Ort(o,A){let f=A.replacementPrevious,m=A.replacementNext;A===o._lastBeforeStartOfFrame&&(o._lastBeforeStartOfFrame=m),A===o.head?o.head=m:f.replacementNext=m,A===o.tail?o.tail=f:m.replacementPrevious=f,A.replacementPrevious=void 0,A.replacementNext=void 0,--o.count}yoe.prototype.markTileRendered=function(o){let A=this.head;if(A===o){o===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=o.replacementNext);return}if(++this.count,!O(A)){o.replacementPrevious=void 0,o.replacementNext=void 0,this.head=o,this.tail=o;return}(O(o.replacementPrevious)||O(o.replacementNext))&&Ort(this,o),o.replacementPrevious=void 0,o.replacementNext=A,A.replacementPrevious=o,this.head=o};var xoe=yoe;function lw(o){this._tileProvider=o.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};let A=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new xoe,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=Ae(o.maximumScreenSpaceError,2),this.tileCacheSize=Ae(o.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new moe({ellipsoid:A}),this._tileLoadProgressEvent=new br,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(lw.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});lw.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function W0i(o){let A=o._tileReplacementQueue;A.head=void 0,A.tail=void 0,A.count=0,Urt(o);let f=o._levelZeroTiles;if(O(f))for(let m=0;m<f.length;++m){let C=f[m].customData,y=C.length;for(let x=0;x<y;++x){let v=C[x];v.level=0,o._addHeightCallbacks.push(v)}f[m].freeResources()}o._levelZeroTiles=void 0,o._tileProvider.cancelReprojections()}lw.prototype.forEachLoadedTile=function(o){let A=this._tileReplacementQueue.head;for(;O(A);)A.state!==mC.START&&o(A),A=A.replacementNext};lw.prototype.forEachRenderedTile=function(o){let A=this._tilesToRender;for(let f=0,m=A.length;f<m;++f)o(A[f])};lw.prototype.updateHeight=function(o,A){let f=this,m={positionOnEllipsoidSurface:void 0,positionCartographic:o,level:-1,callback:A};return m.removeFunc=function(){let C=f._addHeightCallbacks,y=C.length;for(let x=0;x<y;++x)if(C[x]===m){C.splice(x,1);break}f._removeHeightCallbacks.push(m),m.callback&&(m.callback=void 0)},f._addHeightCallbacks.push(m),m.removeFunc};lw.prototype.update=function(o){O(this._tileProvider.update)&&this._tileProvider.update(o)};function Urt(o){let A=o._debug;A.maxDepth=0,A.maxDepthVisited=0,A.tilesVisited=0,A.tilesCulled=0,A.tilesRendered=0,A.tilesWaitingForChildren=0,o._tileLoadQueueHigh.length=0,o._tileLoadQueueMedium.length=0,o._tileLoadQueueLow.length=0}lw.prototype.beginFrame=function(o){!o.passes.render||(this._tilesInvalidated&&(W0i(this),this._tilesInvalidated=!1),this._tileProvider.initialize(o),Urt(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())};lw.prototype.render=function(o){let A=o.passes,f=this._tileProvider;A.render&&(f.beginUpdate(o),Z0i(this,o),lpi(this,o),f.endUpdate(o)),A.pick&&this._tilesToRender.length>0&&f.updateForPick(o)};function j0i(o,A){let f=o._tileLoadQueueHigh.length+o._tileLoadQueueMedium.length+o._tileLoadQueueLow.length;if(f!==o._lastTileLoadQueueLength||o._tilesInvalidated){let C=br.prototype.raiseEvent.bind(o._tileLoadProgressEvent,f);A.afterRender.push(()=>(C(),!0)),o._lastTileLoadQueueLength=f}let m=o._debug;m.enableDebugOutput&&!m.suspendLodUpdate&&(m.maxDepth=o._tilesToRender.reduce(function(C,y){return Math.max(C,y.level)},-1),m.tilesRendered=o._tilesToRender.length,(m.tilesVisited!==m.lastTilesVisited||m.tilesRendered!==m.lastTilesRendered||m.tilesCulled!==m.lastTilesCulled||m.maxDepth!==m.lastMaxDepth||m.tilesWaitingForChildren!==m.lastTilesWaitingForChildren||m.maxDepthVisited!==m.lastMaxDepthVisited)&&(console.log(`Visited ${m.tilesVisited}, Rendered: ${m.tilesRendered}, Culled: ${m.tilesCulled}, Max Depth Rendered: ${m.maxDepth}, Max Depth Visited: ${m.maxDepthVisited}, Waiting for children: ${m.tilesWaitingForChildren}`),m.lastTilesVisited=m.tilesVisited,m.lastTilesRendered=m.tilesRendered,m.lastTilesCulled=m.tilesCulled,m.lastMaxDepth=m.maxDepth,m.lastTilesWaitingForChildren=m.tilesWaitingForChildren,m.lastMaxDepthVisited=m.maxDepthVisited))}lw.prototype.endFrame=function(o){!o.passes.render||o.mode===xi.MORPHING||(npi(this,o),spi(this,o),j0i(this,o))};lw.prototype.isDestroyed=function(){return!1};lw.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var Zz,SVe=new Kt;function q0i(o,A){let f=Si.center(o.rectangle,SVe),m=f.longitude-Zz.longitude,C=f.latitude-Zz.latitude;f=Si.center(A.rectangle,SVe);let y=f.longitude-Zz.longitude,x=f.latitude-Zz.latitude;return m*m+C*C-(y*y+x*x)}var X0i=new ee,vz=[];function Z0i(o,A){let f=o._debug;if(f.suspendLodUpdate)return;let m=o._tilesToRender;m.length=0;let C,y=o._tileProvider;if(!O(o._levelZeroTiles))if(y.ready){let D=y.tilingScheme;o._levelZeroTiles=Coe.createLevelZeroTiles(D);let F=o._levelZeroTiles.length;if(vz.length<F)for(vz=new Array(F),C=0;C<F;++C)vz[C]===void 0&&(vz[C]=new $z)}else return;o._occluders.ellipsoid.cameraPosition=A.camera.positionWC;let x,v=o._levelZeroTiles,E=v.length>1?o._occluders:void 0;Zz=A.camera.positionCartographic,v.sort(q0i);let I=o._addHeightCallbacks,w=o._removeHeightCallbacks,Q=A.frameNumber,M;if(I.length>0||w.length>0){for(C=0,M=v.length;C<M;++C)x=v[C],x._updateCustomData(Q,I,w);I.length=0,w.length=0}let B=A.camera;o._cameraPositionCartographic=B.positionCartographic;let T=Xe.getTranslation(B.transform,X0i);for(o._cameraReferenceFrameOriginCartographic=o.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(T,o._cameraReferenceFrameOriginCartographic),C=0,M=v.length;C<M;++C)x=v[C],o._tileReplacementQueue.markTileRendered(x),x.renderable?ey(o,x,y,A,E,!1,vz[C]):(rM(o,o._tileLoadQueueHigh,x,A),++f.tilesWaitingForChildren);o._lastSelectionFrameNumber=Q}function rM(o,A,f,m){!f.needsLoading||(o.tileProvider.computeTileLoadPriority!==void 0&&(f._loadPriority=o.tileProvider.computeTileLoadPriority(f,m)),A.push(f))}function $z(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function Grt(){this.southwest=new $z,this.southeast=new $z,this.northwest=new $z,this.northeast=new $z}Grt.prototype.combine=function(o){let A=this.southwest,f=this.southeast,m=this.northwest,C=this.northeast;o.allAreRenderable=A.allAreRenderable&&f.allAreRenderable&&m.allAreRenderable&&C.allAreRenderable,o.anyWereRenderedLastFrame=A.anyWereRenderedLastFrame||f.anyWereRenderedLastFrame||m.anyWereRenderedLastFrame||C.anyWereRenderedLastFrame,o.notYetRenderableCount=A.notYetRenderableCount+f.notYetRenderableCount+m.notYetRenderableCount+C.notYetRenderableCount};var hCe=new Array(31);for(let o=0;o<hCe.length;++o)hCe[o]=new Grt;function $0i(o,A,f,m,C){let y=o._debug;++y.tilesVisited,o._tileReplacementQueue.markTileRendered(f),f._updateCustomData(A.frameNumber),f.level>y.maxDepthVisited&&(y.maxDepthVisited=f.level);let x=ipi(o,A,f)<o.maximumScreenSpaceError,v=f.southwestChild,E=f.southeastChild,I=f.northwestChild,w=f.northeastChild,Q=o._lastSelectionFrameNumber,M=f._lastSelectionResultFrame===Q?f._lastSelectionResult:sa.NONE,B=o.tileProvider;if(x||m){let T=sa.originalResult(M)===sa.RENDERED,D=sa.originalResult(M)===sa.CULLED||M===sa.NONE,F=f.state===mC.DONE,L=T||D||F;if(L||O(B.canRenderWithoutLosingDetail)&&(L=B.canRenderWithoutLosingDetail(f)),L){x&&rM(o,o._tileLoadQueueMedium,f,A),E$(o,f),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1,f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,C.anyWereRenderedLastFrame||o._tileToUpdateHeights.push(f);return}m=!0,x&&rM(o,o._tileLoadQueueHigh,f,A)}if(B.canRefine(f)){if(v.upsampledFromParent&&E.upsampledFromParent&&I.upsampledFromParent&&w.upsampledFromParent){E$(o,f),rM(o,o._tileLoadQueueMedium,f,A),o._tileReplacementQueue.markTileRendered(v),o._tileReplacementQueue.markTileRendered(E),o._tileReplacementQueue.markTileRendered(I),o._tileReplacementQueue.markTileRendered(w),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1,f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,C.anyWereRenderedLastFrame||o._tileToUpdateHeights.push(f);return}f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.REFINED;let T=o._tilesToRender.length,D=o._tileLoadQueueLow.length,F=o._tileLoadQueueMedium.length,L=o._tileLoadQueueHigh.length,R=o._tileToUpdateHeights.length;if(epi(o,v,E,I,w,A,m,C),T!==o._tilesToRender.length){let k=C.allAreRenderable,U=C.anyWereRenderedLastFrame,V=C.notYetRenderableCount,H=!1;if(!k&&!U){let q=o._tilesToRender;for(let Z=T;Z<q.length;++Z){let oe=q[Z];for(;oe!==void 0&&oe._lastSelectionResult!==sa.KICKED&&oe!==f;)oe._lastSelectionResult=sa.kick(oe._lastSelectionResult),oe=oe.parent}o._tilesToRender.length=T,o._tileToUpdateHeights.length=R,E$(o,f),f._lastSelectionResult=sa.RENDERED;let ie=M===sa.RENDERED;!ie&&V>o.loadingDescendantLimit&&(o._tileLoadQueueLow.length=D,o._tileLoadQueueMedium.length=F,o._tileLoadQueueHigh.length=L,rM(o,o._tileLoadQueueMedium,f,A),C.notYetRenderableCount=f.renderable?0:1,H=!0),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=ie,ie||o._tileToUpdateHeights.push(f),++y.tilesWaitingForChildren}o.preloadAncestors&&!H&&rM(o,o._tileLoadQueueLow,f,A)}return}f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,E$(o,f),rM(o,o._tileLoadQueueHigh,f,A),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1}function epi(o,A,f,m,C,y,x,v){let E=y.camera.positionCartographic,I=o._tileProvider,w=o._occluders,Q=hCe[A.level],M=Q.southwest,B=Q.southeast,T=Q.northwest,D=Q.northeast;E.longitude<A.rectangle.east?E.latitude<A.rectangle.north?(ey(o,A,I,y,w,x,M),ey(o,f,I,y,w,x,B),ey(o,m,I,y,w,x,T),ey(o,C,I,y,w,x,D)):(ey(o,m,I,y,w,x,T),ey(o,A,I,y,w,x,M),ey(o,C,I,y,w,x,D),ey(o,f,I,y,w,x,B)):E.latitude<A.rectangle.north?(ey(o,f,I,y,w,x,B),ey(o,A,I,y,w,x,M),ey(o,C,I,y,w,x,D),ey(o,m,I,y,w,x,T)):(ey(o,C,I,y,w,x,D),ey(o,m,I,y,w,x,T),ey(o,f,I,y,w,x,B),ey(o,A,I,y,w,x,M)),Q.combine(v)}function tpi(o,A){let f=A.rectangle;return O(o._cameraPositionCartographic)&&Si.contains(f,o._cameraPositionCartographic)||O(o._cameraReferenceFrameOriginCartographic)&&Si.contains(f,o._cameraReferenceFrameOriginCartographic)}function ey(o,A,f,m,C,y,x){if(f.computeTileVisibility(A,m,C)!==vg.NONE)return $0i(o,m,A,y,x);if(++o._debug.tilesCulled,o._tileReplacementQueue.markTileRendered(A),x.allAreRenderable=!0,x.anyWereRenderedLastFrame=!1,x.notYetRenderableCount=0,tpi(o,A)){(!O(A.data)||!O(A.data.vertexArray))&&rM(o,o._tileLoadQueueMedium,A,m);let v=o._lastSelectionFrameNumber,E=A._lastSelectionResultFrame===v?A._lastSelectionResult:sa.NONE;E!==sa.CULLED_BUT_NEEDED&&E!==sa.RENDERED&&o._tileToUpdateHeights.push(A),A._lastSelectionResult=sa.CULLED_BUT_NEEDED}else(o.preloadSiblings||A.level===0)&&rM(o,o._tileLoadQueueLow,A,m),A._lastSelectionResult=sa.CULLED;A._lastSelectionResultFrame=m.frameNumber}function ipi(o,A,f){if(A.mode===xi.SCENE2D||A.camera.frustum instanceof Ds||A.camera.frustum instanceof Y0)return rpi(o,A,f);let m=o._tileProvider.getLevelMaximumGeometricError(f.level),C=f._distance,y=A.context.drawingBufferHeight,x=A.camera.frustum.sseDenominator,v=m*y/(C*x);return A.fog.enabled&&(v-=je.fog(C,A.fog.density)*A.fog.sse),v/=A.pixelRatio,v}function rpi(o,A,f){let m=A.camera.frustum;O(m._offCenterFrustum)&&(m=m._offCenterFrustum);let C=A.context,y=C.drawingBufferWidth,x=C.drawingBufferHeight,v=o._tileProvider.getLevelMaximumGeometricError(f.level),E=Math.max(m.top-m.bottom,m.right-m.left)/Math.max(y,x),I=v/E;return A.fog.enabled&&A.mode!==xi.SCENE2D&&(I-=je.fog(f._distance,A.fog.density)*A.fog.sse),I/=A.pixelRatio,I}function E$(o,A){o._tilesToRender.push(A)}function npi(o,A){let f=o._tileLoadQueueHigh,m=o._tileLoadQueueMedium,C=o._tileLoadQueueLow;if(f.length===0&&m.length===0&&C.length===0)return;o._tileReplacementQueue.trimTiles(o.tileCacheSize);let y=GA()+o._loadQueueTimeSlice,x=o._tileProvider,v=D0e(o,A,x,y,f,!1);v=D0e(o,A,x,y,m,v),D0e(o,A,x,y,C,v)}function opi(o,A){return o._loadPriority-A._loadPriority}function D0e(o,A,f,m,C,y){f.computeTileLoadPriority!==void 0&&C.sort(opi);for(let x=0,v=C.length;x<v&&(GA()<m||!y);++x){let E=C[x];o._tileReplacementQueue.markTileRendered(E),f.loadTile(A,E),y=!0}return y}var UU=new ls,T0e=new Kt,vL=new ee,api=[];function spi(o,A){if(!o.tileProvider.ready)return;let f=api;f.length=0;let m=o._tileToUpdateHeights,C=GA(),y=o._updateHeightsTimeSlice,x=C+y,v=A.mode,E=A.mapProjection,I=o.tileProvider.tilingScheme.ellipsoid,w;for(;m.length>0;){let Q=m[0];if(!O(Q.data)||!O(Q.data.mesh)){let D=Q._lastSelectionResultFrame===o._lastSelectionFrameNumber?Q._lastSelectionResult:sa.NONE;(D===sa.RENDERED||D===sa.CULLED_BUT_NEEDED)&&f.push(Q),m.shift(),o._lastTileIndex=0;continue}let M=Q.customData,B=M.length,T=!1;for(w=o._lastTileIndex;w<B;++w){let D=M[w],F=Q.data.terrainData,L=O(F)&&F.wasCreatedByUpsampling();if(Q.level>D.level&&!L){if(O(D.positionOnEllipsoidSurface)||(D.positionOnEllipsoidSurface=ee.fromRadians(D.positionCartographic.longitude,D.positionCartographic.latitude,0,I)),v===xi.SCENE3D){let k=I.geodeticSurfaceNormal(D.positionOnEllipsoidSurface,UU.direction),U=I.getSurfaceNormalIntersectionWithZAxis(D.positionOnEllipsoidSurface,11500,UU.origin);if(!O(U)){let V=0;O(Q.data.tileBoundingRegion)&&(V=Q.data.tileBoundingRegion.minimumHeight);let H=Math.min(V,-11500),q=ee.multiplyByScalar(k,Math.abs(H)+1,vL);ee.subtract(D.positionOnEllipsoidSurface,q,UU.origin)}}else Kt.clone(D.positionCartographic,T0e),T0e.height=-11500,E.project(T0e,vL),ee.fromElements(vL.z,vL.x,vL.y,vL),ee.clone(vL,UU.origin),ee.clone(ee.UNIT_X,UU.direction);let R=Q.data.pick(UU,v,E,!1,vL);O(R)&&(O(D.callback)&&D.callback(R),D.level=Q.level)}if(GA()>=x){T=!0;break}}if(T){o._lastTileIndex=w;break}else o._lastTileIndex=0,m.shift()}for(w=0;w<f.length;w++)m.push(f[w])}function lpi(o,A){let f=o._tileProvider,m=o._tilesToRender;for(let C=0,y=m.length;C<y;++C){let x=m[C];f.showTileThisFrame(x,A)}}var BP=lw;function cB(o,A){this._scene=A,o=Ae(o,Di.WGS84);let f=new IP({ellipsoid:o}),m=new Ybe;this._ellipsoid=o,this._imageryLayerCollection=m,this._spotMaterial=void 0,this._surfaceShaderSet=new Hbe,this._material=void 0,this._surface=new BP({tileProvider:new Kbe({terrainProvider:f,imageryLayers:m,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=f,this._terrainProviderChanged=new br,this._undergroundColor=At.clone(At.BLACK),this._undergroundColorAlphaByDistance=new To(o.maximumRadius/1e3,0,o.maximumRadius/5,1),this._translucency=new LJ,this._clipPlanes=[],nG(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new An({url:xs("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this.fillHighlightColor=void 0,this.enableLighting=!1,this.lambertDiffuseMultiplier=.9,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!0,this.atmosphereLightIntensity=10,this.atmosphereRayleighCoefficient=new ee(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new ee(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.lightingFadeOutDistance=1e7,this.lightingFadeInDistance=2e7,this.nightFadeOutDistance=1e7,this.nightFadeInDistance=5e7,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!0,this.shadows=Al.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.terrainExaggeration=1,this.terrainExaggerationRelativeHeight=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0,this._flattenPolygonRegion={},this._flattenUniforms=void 0,this._graticulesEnable=!0,this._graticulesLevel=1}Object.defineProperties(cB.prototype,{flattenPolygonRegion:{get:function(){return this._flattenPolygonRegion},set:function(o){this._flattenPolygonRegion=o}},flattenUniforms:{get:function(){return this._flattenUniforms},set:function(o){this._flattenUniforms!==o&&(this._flattenUniforms=o,nG(this))}},ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tilesLoaded:{get:function(){return O(this._surface)?this._surface.tileProvider.ready&&this._surface._tileLoadQueueHigh.length===0&&this._surface._tileLoadQueueMedium.length===0&&this._surface._tileLoadQueueLow.length===0:!0}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(o){this._surface.tileProvider.baseColor=o}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(o){this._surface.tileProvider.clippingPlanes=o}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(o){O(o)||(o=Si.clone(Si.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=o}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(o){this._oceanNormalMapResource.url=o,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(o){o!==this._terrainProvider&&(this._terrainProvider=o,this._terrainProviderChanged.raiseEvent(o),O(this._material)&&nG(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(o){this._material!==o&&(this._material=o,nG(this))}},undergroundColor:{get:function(){return this._undergroundColor},set:function(o){this._undergroundColor=At.clone(o,this._undergroundColor)}},spotMaterial:{get:function(){return this._spotMaterial},set:function(o){this._spotMaterial!==o&&(this._spotMaterial=o,nG(this))}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(o){this._undergroundColorAlphaByDistance=To.clone(o,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}},graticulesLevel:{get:function(){return this._graticulesLevel},set:function(o){this._graticulesLevel!==o&&(this._graticulesLevel=o)}},clipPlanes:{get:function(){return this._clipPlanes},set:function(o){this._clipPlanes=o,nG(this)}}});function nG(o){let A=[],f=O(o._material)&&(o._material.shaderSource.match(/slope/)||o._material.shaderSource.match("normalEC")),m=[L8,Kte];O(o._material)&&(!f||o._terrainProvider.requestVertexNormals)?(m.push(o._material.shaderSource),A.push("APPLY_MATERIAL"),o._surface._tileProvider.materialUniformMap=o._material._uniforms):O(o._spotMaterial)?(m.push(o._spotMaterial.shaderSource),A.push("APPLY_SPOT"),o._surface._tileProvider.materialUniformMap=o._spotMaterial._uniforms):o.flattenUniforms?(o._surface._tileProvider.materialUniformMap=o.flattenUniforms,A.push("APPLY_FLATTEN")):o._surface._tileProvider.materialUniformMap=void 0,m.push(Obe),o._clipPlanes.length>0&&A.push("SHOW_CONTOUR_LINE"),o._surfaceShaderSet.baseVertexShaderSource=new Fr({sources:[L8,Kte,Ube],defines:A}),o._surfaceShaderSet.baseFragmentShaderSource=new Fr({sources:m,defines:A}),o._material?o._surfaceShaderSet.material=o._material:o._spotMaterial?o._surfaceShaderSet.material=o._spotMaterial:o._surfaceShaderSet.material=void 0}function Hrt(o){return function(A,f){let m=wi.distanceSquaredTo(A.pickBoundingSphere,o),C=wi.distanceSquaredTo(f.pickBoundingSphere,o);return m-C}}var Jbe=[],Vrt={start:0,stop:0};cB.prototype.pickWorldCoordinates=function(o,A,f,m){f=Ae(f,!0);let C=A.mode,y=A.mapProjection,x=Jbe;x.length=0;let v=this._surface._tilesToRender,E=v.length,I,w;for(w=0;w<E;++w){I=v[w];let M=I.data;if(!O(M))continue;let B=M.pickBoundingSphere;if(C!==xi.SCENE3D)M.pickBoundingSphere=B=wi.fromRectangleWithHeights2D(I.rectangle,y,M.tileBoundingRegion.minimumHeight,M.tileBoundingRegion.maximumHeight,B),ee.fromElements(B.center.z,B.center.x,B.center.y,B.center);else if(O(M.renderedMesh))wi.clone(M.tileBoundingRegion.boundingSphere,B);else continue;let T=kA.raySphere(o,B,Vrt);O(T)&&x.push(M)}x.sort(Hrt(o.origin));let Q;for(E=x.length,w=0;w<E&&(Q=x[w].pick(o,A.mode,A.mapProjection,f,m),!O(Q));++w);return Q};cB.prototype.drawTileContourLine=function(o,A,f){let m=Jbe;m.length=0;let C=this._surface._tilesToRender,y=C.length;for(let x=0;x<y;++x){let v=C[x],E=v.data;!O(E)||E.drawContourLine(v,o,A.mode,A.mapProjection,f)}};cB.prototype.pickTriangle=function(o,A,f,m){f=Ae(f,!0);let C=A.mode,y=A.mapProjection,x=Jbe;x.length=0;let v=this._surface._tilesToRender,E=v.length,I,w;for(w=0;w<E;++w){I=v[w];let M=I.data;if(!O(M))continue;let B=M.pickBoundingSphere;if(C!==xi.SCENE3D)M.pickBoundingSphere=B=wi.fromRectangleWithHeights2D(I.rectangle,y,M.tileBoundingRegion.minimumHeight,M.tileBoundingRegion.maximumHeight,B),ee.fromElements(B.center.z,B.center.x,B.center.y,B.center);else if(O(M.renderedMesh))wi.clone(M.tileBoundingRegion.boundingSphere,B);else continue;let T=kA.raySphere(o,B,Vrt);O(T)&&x.push(M)}x.sort(Hrt(o.origin));let Q;for(E=x.length,w=0;w<E&&(Q=x[w].pickTriangle(o,A.mode,A.mapProjection,f,m),!O(Q));++w);return Q};var upi=new Kt;cB.prototype.pick=function(o,A,f){if(f=this.pickWorldCoordinates(o,A,!0,f),O(f)&&A.mode!==xi.SCENE3D){f=ee.fromElements(f.y,f.z,f.x,f);let m=A.mapProjection.unproject(f,upi);f=A.globe.ellipsoid.cartographicToCartesian(m,f)}return f};var cpi=new ee,DVe=new ee,Api=new Kt,hpi=new ls;function M0e(o,A){return O(o)&&Si.contains(o.rectangle,A)?o:void 0}cB.prototype.getHeight=function(o){let A=this._surface._levelZeroTiles;if(!O(A))return;let f,m,C=A.length;for(m=0;m<C&&(f=A[m],!Si.contains(f.rectangle,o));++m);if(m>=C)return;let y=f;for(;O(f);)f=M0e(f._southwestChild,o)||M0e(f._southeastChild,o)||M0e(f._northwestChild,o)||f._northeastChild,O(f)&&O(f.data)&&O(f.data.renderedMesh)&&(y=f);if(f=y,!O(f)||!O(f.data)||!O(f.data.renderedMesh))return;let x=this._surface._tileProvider.tilingScheme.projection,v=this._surface._tileProvider.tilingScheme.ellipsoid,E=ee.fromRadians(o.longitude,o.latitude,0,v,cpi),I=hpi,w=v.geodeticSurfaceNormal(E,I.direction),Q=v.getSurfaceNormalIntersectionWithZAxis(E,11500,I.origin);if(!O(Q)){let B;O(f.data.tileBoundingRegion)&&(B=f.data.tileBoundingRegion.minimumHeight);let T=Math.min(Ae(B,0),-11500),D=ee.multiplyByScalar(w,Math.abs(T)+1,DVe);ee.subtract(E,D,I.origin)}let M=f.data.pick(I,void 0,x,!1,DVe);if(O(M))return v.cartesianToCartographic(M,Api).height};cB.prototype.update=function(o){!this.show||o.passes.render&&this._surface.update(o)};cB.prototype.beginFrame=function(o){let A=this._surface,f=A.tileProvider,m=this.terrainProvider,C=this.showWaterEffect&&m.ready&&m.hasWaterMask;if(C&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;let v=this._oceanNormalMapResource,E=v.url;if(O(E)){let I=this;v.fetchImage().then(function(w){E===I._oceanNormalMapResource.url&&(I._oceanNormalMap=I._oceanNormalMap&&I._oceanNormalMap.destroy(),I._oceanNormalMap=new mo({context:o.context,source:w}))})}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}let y=o.passes,x=o.mode;y.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,A.maximumScreenSpaceError=this.maximumScreenSpaceError,A.tileCacheSize=this.tileCacheSize,A.loadingDescendantLimit=this.loadingDescendantLimit,A.preloadAncestors=this.preloadAncestors,A.preloadSiblings=this.preloadSiblings,f.terrainProvider=this.terrainProvider,f.lightingFadeOutDistance=this.lightingFadeOutDistance,f.lightingFadeInDistance=this.lightingFadeInDistance,f.nightFadeOutDistance=this.nightFadeOutDistance,f.nightFadeInDistance=this.nightFadeInDistance,f.zoomedOutOceanSpecularIntensity=x===xi.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,f.hasWaterMask=C,f.oceanNormalMap=this._oceanNormalMap,f.enableLighting=this.enableLighting,f.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,f.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,f.showGroundAtmosphere=this.showGroundAtmosphere,f.atmosphereLightIntensity=this.atmosphereLightIntensity,f.atmosphereRayleighCoefficient=this.atmosphereRayleighCoefficient,f.atmosphereMieCoefficient=this.atmosphereMieCoefficient,f.atmosphereRayleighScaleHeight=this.atmosphereRayleighScaleHeight,f.atmosphereMieScaleHeight=this.atmosphereMieScaleHeight,f.atmosphereMieAnisotropy=this.atmosphereMieAnisotropy,f.shadows=this.shadows,f.hueShift=this.atmosphereHueShift,f.saturationShift=this.atmosphereSaturationShift,f.brightnessShift=this.atmosphereBrightnessShift,f.fillHighlightColor=this.fillHighlightColor,f.showSkirts=this.showSkirts,f.backFaceCulling=this.backFaceCulling,f.undergroundColor=this._undergroundColor,f.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,f.lambertDiffuseMultiplier=this.lambertDiffuseMultiplier,f._flattenPolygonRegion=this._flattenPolygonRegion,f.graticulesLevel=this._graticulesLevel,f.graticulesEnable=this._graticulesEnable,f.clipPlanes=this._clipPlanes,A.beginFrame(o))};cB.prototype.render=function(o){!this.show||(O(this._material)&&this._material.update(o.context),this.drawTileContourLine(this._clipPlanes,this._scene,o),this._surface.render(o))};cB.prototype.endFrame=function(o){!this.show||o.passes.render&&this._surface.endFrame(o)};cB.prototype.isDestroyed=function(){return!1};cB.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),Qr(this)};var voe=cB;function dpi(o,A,f,m){this.rightAscension=o,this.declination=A,this.rotation=f,this.rotationRate=m}var Wbe=dpi,zrt={},fpi=32.184,gpi=2451545,TVe=-.0529921,MVe=-.1059842,PVe=13.0120009,RVe=13.3407154,LVe=.9856003,FVe=26.4057084,NVe=13.064993,kVe=.3287146,OVe=1.7484877,UVe=-.1589763,GVe=.0036096,HVe=.1643573,VVe=12.9590088,P0e=new fi;zrt.ComputeMoon=function(o,A){O(o)||(o=fi.now()),P0e=fi.addSeconds(o,fpi,P0e);let f=fi.totalDays(P0e)-gpi,m=f/Uu.DAYS_PER_JULIAN_CENTURY,C=(125.045+TVe*f)*je.RADIANS_PER_DEGREE,y=(250.089+MVe*f)*je.RADIANS_PER_DEGREE,x=(260.008+PVe*f)*je.RADIANS_PER_DEGREE,v=(176.625+RVe*f)*je.RADIANS_PER_DEGREE,E=(357.529+LVe*f)*je.RADIANS_PER_DEGREE,I=(311.589+FVe*f)*je.RADIANS_PER_DEGREE,w=(134.963+NVe*f)*je.RADIANS_PER_DEGREE,Q=(276.617+kVe*f)*je.RADIANS_PER_DEGREE,M=(34.226+OVe*f)*je.RADIANS_PER_DEGREE,B=(15.134+UVe*f)*je.RADIANS_PER_DEGREE,T=(119.743+GVe*f)*je.RADIANS_PER_DEGREE,D=(239.961+HVe*f)*je.RADIANS_PER_DEGREE,F=(25.053+VVe*f)*je.RADIANS_PER_DEGREE,L=Math.sin(C),R=Math.sin(y),k=Math.sin(x),U=Math.sin(v),V=Math.sin(E),H=Math.sin(I),q=Math.sin(w),ie=Math.sin(Q),Z=Math.sin(M),oe=Math.sin(B),ne=Math.sin(T),se=Math.sin(D),ce=Math.sin(F),j=Math.cos(C),de=Math.cos(y),me=Math.cos(x),_e=Math.cos(v),Be=Math.cos(E),Qe=Math.cos(I),Ie=Math.cos(w),ve=Math.cos(Q),K=Math.cos(M),W=Math.cos(B),te=Math.cos(T),Y=Math.cos(D),he=Math.cos(F),fe=(269.9949+.0031*m-3.8787*L-.1204*R+.07*k-.0172*U+.0072*H-.0052*oe+.0043*ce)*je.RADIANS_PER_DEGREE,Ce=(66.5392+.013*m+1.5419*j+.0239*de-.0278*me+.0068*_e-.0029*Qe+9e-4*Ie+8e-4*W-9e-4*he)*je.RADIANS_PER_DEGREE,Ee=(38.3213+13.17635815*f-14e-13*f*f+3.561*L+.1208*R-.0642*k+.0158*U+.0252*V-.0066*H-.0047*q-.0046*ie+.0028*Z+.0052*oe+.004*ne+.0019*se-.0044*ce)*je.RADIANS_PER_DEGREE,be=(13.17635815-14e-13*(2*f)+3.561*j*TVe+.1208*de*MVe-.0642*me*PVe+.0158*_e*RVe+.0252*Be*LVe-.0066*Qe*FVe-.0047*Ie*NVe-.0046*ve*kVe+.0028*K*OVe+.0052*W*UVe+.004*te*GVe+.0019*Y*HVe-.0044*he*VVe)/86400*je.RADIANS_PER_DEGREE;return O(A)||(A=new Wbe),A.rightAscension=fe,A.declination=Ce,A.rotation=Ee,A.rotationRate=be,A};var jbe=zrt;function Krt(o){(!O(o)||typeof o!="function")&&(o=jbe.ComputeMoon),this._computeFunction=o}var ppi=new ee,mpi=new ee,Cpi=new ee;function ypi(o,A,f){let m=ppi;m.x=Math.cos(o+je.PI_OVER_TWO),m.y=Math.sin(o+je.PI_OVER_TWO),m.z=0;let C=Math.cos(A),y=Cpi;y.x=C*Math.cos(o),y.y=C*Math.sin(o),y.z=Math.sin(A);let x=ee.cross(y,m,mpi);return O(f)||(f=new ci),f[0]=m.x,f[1]=x.x,f[2]=y.x,f[3]=m.y,f[4]=x.y,f[5]=y.y,f[6]=m.z,f[7]=x.z,f[8]=y.z,f}var xpi=new ci,vpi=new jr;Krt.prototype.evaluate=function(o,A){O(o)||(o=fi.now());let f=this._computeFunction(o),m=ypi(f.rightAscension,f.declination,A),C=je.zeroToTwoPi(f.rotation),y=jr.fromAxisAngle(ee.UNIT_Z,C,vpi),x=ci.fromQuaternion(jr.conjugate(y,y),xpi);return ci.multiply(x,m,m)};var qbe=Krt,Xbe={};function Epi(o){let A=6.239996+.0172019696544*o;return .001657*Math.sin(A+.01671*Math.sin(A))}var Ipi=32.184,_pi=2451545;function Yrt(o,A){A=fi.addSeconds(o,Ipi,A);let f=fi.totalDays(A)-_pi;return A=fi.addSeconds(A,Epi(f),A),A}var Wte=new fi(2451545,0,nu.TAI),Bpi=1e3,v1=je.RADIANS_PER_DEGREE,S_=je.RADIANS_PER_ARCSECOND,gy=14959787e4,zVe=new ci;function Jrt(o,A,f,m,C,y,x){f<0&&(f=-f,C+=je.PI);let v=o*(1-A),E=m-C,I=C,w=bpi(y-m,A),Q=wpi(A,0);Mpi(E,f,I,zVe);let M=v*(1+A),B=Math.cos(w),T=Math.sin(w),D=1+A*B,F=M/D;return O(x)?(x.x=F*B,x.y=F*T,x.z=0):x=new ee(F*B,F*T,0),ci.multiplyByVector(zVe,x,x)}function wpi(o,A){return o<=A?"Circular":o<1-A?"Elliptical":o<=1+A?"Parabolic":"Hyperbolic"}function bpi(o,A){let f=Dpi(o,A);return Tpi(f,A)}var Qpi=50,Spi=je.EPSILON8;function Dpi(o,A){let f=Math.floor(o/je.TWO_PI);o-=f*je.TWO_PI;let m=o+A*Math.sin(o)/(1-Math.sin(o+A)+Math.sin(o)),C=Number.MAX_VALUE,y;for(y=0;y<Qpi&&Math.abs(C-m)>Spi;++y){C=m;let x=C-A*Math.sin(C)-o,v=1-A*Math.cos(C);m=C-x/v}return C=m+f*je.TWO_PI,C}function Tpi(o,A){let f=Math.floor(o/je.TWO_PI);o-=f*je.TWO_PI;let m=Math.cos(o)-A,C=Math.sin(o)*Math.sqrt(1-A*A),y=Math.atan2(C,m);return y=je.zeroToTwoPi(y),o<0&&(y-=je.TWO_PI),y+=f*je.TWO_PI,y}function Mpi(o,A,f,m){let C=Math.cos(o),y=Math.sin(o),x=Math.cos(A),v=Math.sin(A),E=Math.cos(f),I=Math.sin(f);return O(m)?(m[0]=E*C-I*y*x,m[1]=I*C+E*y*x,m[2]=y*v,m[3]=-E*y-I*C*x,m[4]=-I*y+E*C*x,m[5]=C*v,m[6]=I*v,m[7]=-E*v,m[8]=x):m=new ci(E*C-I*y*x,-E*y-I*C*x,I*v,I*C+E*y*x,-I*y+E*C*x,-E*v,y*v,C*v,x),m}var Ppi=1.0000010178*gy,Rpi=100.46645683*v1,Lpi=129597742283429e-5*S_,KVe=16002,YVe=21863,JVe=32004,WVe=10931,jVe=14529,qVe=16368,XVe=15318,ZVe=32794,Fpi=64*1e-7*gy,Npi=-152*1e-7*gy,kpi=62*1e-7*gy,Opi=-8*1e-7*gy,Upi=32*1e-7*gy,Gpi=-41*1e-7*gy,Hpi=19*1e-7*gy,Vpi=-11*1e-7*gy,zpi=-150*1e-7*gy,Kpi=-46*1e-7*gy,Ypi=68*1e-7*gy,Jpi=54*1e-7*gy,Wpi=14*1e-7*gy,jpi=24*1e-7*gy,qpi=-28*1e-7*gy,Xpi=22*1e-7*gy,$Ve=10,e9e=16002,t9e=21863,i9e=10931,r9e=1473,n9e=32004,o9e=4387,a9e=73,Zpi=-325*1e-7,$pi=-322*1e-7,emi=-79*1e-7,tmi=232*1e-7,imi=-52*1e-7,rmi=97*1e-7,nmi=55*1e-7,omi=-41*1e-7,ami=-105*1e-7,smi=-137*1e-7,lmi=258*1e-7,umi=35*1e-7,cmi=-116*1e-7,Ami=-88*1e-7,hmi=-112*1e-7,dmi=-80*1e-7,XG=new fi(0,0,nu.TAI);function fmi(o,A){Yrt(o,XG);let f=(XG.dayNumber-Wte.dayNumber+(XG.secondsOfDay-Wte.secondsOfDay)/Uu.SECONDS_PER_DAY)/(Uu.DAYS_PER_JULIAN_CENTURY*10),m=.3595362*f,C=Ppi+Fpi*Math.cos(KVe*m)+zpi*Math.sin(KVe*m)+Npi*Math.cos(YVe*m)+Kpi*Math.sin(YVe*m)+kpi*Math.cos(JVe*m)+Ypi*Math.sin(JVe*m)+Opi*Math.cos(WVe*m)+Jpi*Math.sin(WVe*m)+Upi*Math.cos(jVe*m)+Wpi*Math.sin(jVe*m)+Gpi*Math.cos(qVe*m)+jpi*Math.sin(qVe*m)+Hpi*Math.cos(XVe*m)+qpi*Math.sin(XVe*m)+Vpi*Math.cos(ZVe*m)+Xpi*Math.sin(ZVe*m),y=Rpi+Lpi*f+Zpi*Math.cos($Ve*m)+ami*Math.sin($Ve*m)+$pi*Math.cos(e9e*m)+smi*Math.sin(e9e*m)+emi*Math.cos(t9e*m)+lmi*Math.sin(t9e*m)+tmi*Math.cos(i9e*m)+umi*Math.sin(i9e*m)+imi*Math.cos(r9e*m)+cmi*Math.sin(r9e*m)+rmi*Math.cos(n9e*m)+Ami*Math.sin(n9e*m)+nmi*Math.cos(o9e*m)+hmi*Math.sin(o9e*m)+omi*Math.cos(a9e*m)+dmi*Math.sin(a9e*m),x=.0167086342-.0004203654*f,v=102.93734808*v1+11612.3529*S_*f,E=469.97289*S_*f,I=174.87317577*v1-8679.27034*S_*f;return Jrt(C,x,E,v,I,y,A)}function Wrt(o,A){Yrt(o,XG);let f=(XG.dayNumber-Wte.dayNumber+(XG.secondsOfDay-Wte.secondsOfDay)/Uu.SECONDS_PER_DAY)/Uu.DAYS_PER_JULIAN_CENTURY,m=f*f,C=m*f,y=C*f,x=383397.7725+.004*f,v=.055545526-16e-9*f,E=5.15668983*v1,I=-8e-5*f+.02966*m-42e-6*C-13e-8*y,w=83.35324312*v1,Q=146434202669e-4*f-38.2702*m-.045047*C+21301e-8*y,M=125.04455501*v1,B=-69679193631e-4*f+6.3602*m+.007625*C-3586e-8*y,T=218.31664563*v1,D=17325593434847e-4*f-6.391*m+.006588*C-3169e-8*y,F=297.85019547*v1+S_*(1602961601209e-3*f-6.3706*m+.006593*C-3169e-8*y),L=93.27209062*v1+S_*(17395272628478e-4*f-12.7512*m-.001037*C+417e-8*y),R=134.96340251*v1+S_*(17179159232178e-4*f+31.8792*m+.051635*C-2447e-7*y),k=357.52910918*v1+S_*(1295965810481e-4*f-.5532*m+136e-6*C-1149e-8*y),U=310.17137918*v1-S_*(6967051436e-3*f+6.2068*m+.007618*C-3219e-8*y),V=2*F,H=4*F,q=6*F,ie=2*R,Z=3*R,oe=4*R,ne=2*L;x+=3400.4*Math.cos(V)-635.6*Math.cos(V-R)-235.6*Math.cos(R)+218.1*Math.cos(V-k)+181*Math.cos(V+R),v+=.014216*Math.cos(V-R)+.008551*Math.cos(V-ie)-.001383*Math.cos(R)+.001356*Math.cos(V+R)-.001147*Math.cos(H-Z)-914e-6*Math.cos(H-ie)+869e-6*Math.cos(V-k-R)-627e-6*Math.cos(V)-394e-6*Math.cos(H-oe)+282e-6*Math.cos(V-k-ie)-279e-6*Math.cos(F-R)-236e-6*Math.cos(ie)+231e-6*Math.cos(H)+229e-6*Math.cos(q-oe)-201e-6*Math.cos(ie-ne),I+=486.26*Math.cos(V-ne)-40.13*Math.cos(V)+37.51*Math.cos(ne)+25.73*Math.cos(ie-ne)+19.97*Math.cos(V-k-ne),Q+=-55609*Math.sin(V-R)-34711*Math.sin(V-ie)-9792*Math.sin(R)+9385*Math.sin(H-Z)+7505*Math.sin(H-ie)+5318*Math.sin(V+R)+3484*Math.sin(H-oe)-3417*Math.sin(V-k-R)-2530*Math.sin(q-oe)-2376*Math.sin(V)-2075*Math.sin(V-Z)-1883*Math.sin(ie)-1736*Math.sin(q-5*R)+1626*Math.sin(k)-1370*Math.sin(q-Z),B+=-5392*Math.sin(V-ne)-540*Math.sin(k)-441*Math.sin(V)+423*Math.sin(ne)-288*Math.sin(ie-ne),D+=-3332.9*Math.sin(V)+1197.4*Math.sin(V-R)-662.5*Math.sin(k)+396.3*Math.sin(R)-218*Math.sin(V-k);let se=2*U,ce=3*U;I+=46.997*Math.cos(U)*f-.614*Math.cos(V-ne+U)*f+.614*Math.cos(V-ne-U)*f-.0297*Math.cos(se)*m-.0335*Math.cos(U)*m+.0012*Math.cos(V-ne+se)*m-16e-5*Math.cos(U)*C+4e-5*Math.cos(ce)*C+4e-5*Math.cos(se)*C;let j=2.116*Math.sin(U)*f-.111*Math.sin(V-ne-U)*f-.0015*Math.sin(U)*m;Q+=j,D+=j,B+=-520.77*Math.sin(U)*f+13.66*Math.sin(V-ne+U)*f+1.12*Math.sin(V-U)*f-1.06*Math.sin(ne-U)*f+.66*Math.sin(se)*m+.371*Math.sin(U)*m-.035*Math.sin(V-ne+se)*m-.015*Math.sin(V-ne+U)*m+.0014*Math.sin(U)*C-.0011*Math.sin(ce)*C-9e-4*Math.sin(se)*C,x*=Bpi;let de=E+I*S_,me=w+Q*S_,_e=T+D*S_,Be=M+B*S_;return Jrt(x,v,de,me,Be,_e,A)}var s9e=.012300034,gmi=s9e/(s9e+1)*-1;function pmi(o,A){return A=Wrt(o,A),ee.multiplyByScalar(A,gmi,A)}var jrt=new ci(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),Ez=new ee;Xbe.computeSunPositionInEarthInertialFrame=function(o,A){return O(o)||(o=fi.now()),O(A)||(A=new ee),Ez=fmi(o,Ez),A=ee.negate(Ez,A),pmi(o,Ez),ee.subtract(A,Ez,A),ci.multiplyByVector(jrt,A,A),A};Xbe.computeMoonPositionInEarthInertialFrame=function(o,A){return O(o)||(o=fi.now()),A=Wrt(o,A),ci.multiplyByVector(jrt,A,A),A};var UK=Xbe,jte=`#ifdef WRITE_DEPTH
#ifdef GL_EXT_frag_depth
#extension GL_EXT_frag_depth : enable
#endif
@@ -12192,7 +12192,7 @@
}
`;function WJ(){this.show=!0,this._drawCommand=new On({primitiveType:yn.TRIANGLES,boundingVolume:new wi,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new wi,this._boundingVolume2D=new wi,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;let o=this;this._uniformMap={u_texture:function(){return o._texture},u_size:function(){return o._size}}}Object.defineProperties(WJ.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(o){o=Math.max(o,0),this._glowFactor=o,this._glowFactorDirty=!0}}});var L_i=new It,F_i=new It,N_i=new ai,Dz=new ai;WJ.prototype.update=function(o,A,f){if(!this.show)return;let m=o.mode;if(m===xi.SCENE2D||m===xi.MORPHING||!o.passes.render)return;let C=o.context,y=A.viewport.width,x=A.viewport.height;if(!O(this._texture)||y!==this._drawingBufferWidth||x!==this._drawingBufferHeight||this._glowFactorDirty||f!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=y,this._drawingBufferHeight=x,this._glowFactorDirty=!1,this._useHdr=f;let U=Math.max(y,x);U=Math.pow(2,Math.ceil(Math.log(U)/Math.log(2))-2),U=Math.max(1,U);let V=f?C.halfFloatingPointTexture?wn.HALF_FLOAT:wn.FLOAT:wn.UNSIGNED_BYTE;this._texture=new mo({context:C,width:U,height:U,pixelFormat:Gn.RGBA,pixelDatatype:V}),this._glowLengthTS=this._glowFactor*5,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;let H=this,q={u_radiusTS:function(){return H._radiusTS}};this._commands.computeCommand=new B5({fragmentShaderSource:RSe,outputTexture:this._texture,uniformMap:q,persists:!1,owner:this,postExecute:function(){H._commands.computeCommand=void 0}})}let v=this._drawCommand;if(!O(v.vertexArray)){let U={direction:0},V=new Uint8Array(4*2);V[0]=0,V[1]=0,V[2]=255,V[3]=0,V[4]=255,V[5]=255,V[6]=0,V[7]=255;let H=vo.createVertexBuffer({context:C,typedArray:V,usage:ln.STATIC_DRAW}),q=[{index:U.direction,vertexBuffer:H,componentsPerAttribute:2,normalize:!0,componentDatatype:ei.UNSIGNED_BYTE}],ie=vo.createIndexBuffer({context:C,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT});v.vertexArray=new Vc({context:C,attributes:q,indexBuffer:ie}),v.shaderProgram=_s.fromCache({context:C,vertexShaderSource:PSe,fragmentShaderSource:MSe,attributeLocations:U}),v.renderState=fn.fromCache({blending:Bu.ALPHA_BLEND}),v.uniformMap=this._uniformMap}let E=C.uniformState.sunPositionWC,I=C.uniformState.sunPositionColumbusView,w=this._boundingVolume,Q=this._boundingVolume2D;ee.clone(E,w.center),Q.center.x=I.z,Q.center.y=I.x,Q.center.z=I.y,w.radius=je.SOLAR_RADIUS+je.SOLAR_RADIUS*this._glowLengthTS,Q.radius=w.radius,m===xi.SCENE3D?wi.clone(w,v.boundingVolume):m===xi.COLUMBUS_VIEW&&wi.clone(Q,v.boundingVolume);let M=Ss.computeActualWgs84Position(o,E,Dz),B=ee.magnitude(ee.subtract(M,o.camera.position,Dz)),T=C.uniformState.projection,D=N_i;D.x=0,D.y=0,D.z=-B,D.w=1;let F=Xe.multiplyByVector(T,D,Dz),L=Ss.clipToGLWindowCoordinates(A.viewport,F,L_i);D.x=je.SOLAR_RADIUS;let R=Xe.multiplyByVector(T,D,Dz),k=Ss.clipToGLWindowCoordinates(A.viewport,R,F_i);return this._size=It.magnitude(It.subtract(k,L,Dz)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands};WJ.prototype.isDestroyed=function(){return!1};WJ.prototype.destroy=function(){let o=this._drawCommand;return o.vertexArray=o.vertexArray&&o.vertexArray.destroy(),o.shaderProgram=o.shaderProgram&&o.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),Qr(this)};var Uoe=WJ;function VU(o){return xs(`Assets/Textures/SkyBox/skyBox_${o}.jpg`)}function k_i(o){o._renderLoopRunning=!0;let A=0;function f(m){if(!o.isDestroyed())if(o._useDefaultRenderLoop)try{let C=o._targetFrameRate;if(!O(C))o.resize(),o.render(),requestAnimationFrame(f);else{let y=1e3/C,x=m-A;x>y&&(o.resize(),o.render(),A=m-x%y),requestAnimationFrame(f)}}catch(C){if(o._useDefaultRenderLoop=!1,o._renderLoopRunning=!1,o._showRenderLoopErrors){let y="An error occurred while rendering.  Rendering has stopped.";o.showErrorPanel(y,void 0,C)}}else o._renderLoopRunning=!1}requestAnimationFrame(f)}function Cot(o){let A=o._useBrowserRecommendedResolution?1:window.devicePixelRatio;return A*=o._resolutionScale,O(o._scene)&&(o._scene.pixelRatio=A),A}function yot(o){let A=o._canvas,f=A.clientWidth,m=A.clientHeight,C=Cot(o);o._canvasClientWidth=f,o._canvasClientHeight=m,f*=C,m*=C,A.width=f,A.height=m,o._canRender=f!==0&&m!==0,o._lastDevicePixelRatio=window.devicePixelRatio}function xot(o){let A=o._canvas,f=A.width,m=A.height;if(f!==0&&m!==0){let C=o._scene.camera.frustum;O(C.aspectRatio)?C.aspectRatio=f/m:(C.top=C.right*(m/f),C.bottom=-C.top)}}function EO(o,A){o=iA(o),A=Ae(A,Ae.EMPTY_OBJECT);let f=document.createElement("div");f.className="map-widget",o.appendChild(f);let m=document.createElement("canvas");m.setAttribute("id","mapRenderCanvas");let C=Mo.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=C,C&&(m.style.imageRendering=Mo.imageRenderingValue()),m.oncontextmenu=function(){return!1},m.onselectstart=function(){return!1};function y(){m!==m.ownerDocument.activeElement&&m.ownerDocument.activeElement.blur()}Ae(A.blurActiveElementOnCanvasFocus,!0)&&(m.addEventListener("mousedown",y),m.addEventListener("pointerdown",y)),f.appendChild(m);let x=document.createElement("div");x.className="map-widget-credits";let v=O(A.creditContainer)?iA(A.creditContainer):f;v.appendChild(x);let E=O(A.creditViewport)?iA(A.creditViewport):f,I=Ae(A.showRenderLoopErrors,!0),w=Ae(A.useBrowserRecommendedResolution,!0);this._element=f,this._container=o,this._canvas=m,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=E,this._creditContainer=v,this._innerCreditContainer=x,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=I,this._resolutionScale=1,this._useBrowserRecommendedResolution=w,this._forceResize=!1,this._clock=O(A.clock)?A.clock:new z5,yot(this);try{let Q=new koe({canvas:m,contextOptions:A.contextOptions,creditContainer:x,creditViewport:E,mapProjection:A.mapProjection,orderIndependentTranslucency:A.orderIndependentTranslucency,scene3DOnly:Ae(A.scene3DOnly,!1),shadows:A.shadows,mapMode2D:A.mapMode2D,requestRenderMode:A.requestRenderMode,maximumRenderTimeChange:A.maximumRenderTimeChange,depthPlaneEllipsoidOffset:A.depthPlaneEllipsoidOffset,msaaSamples:A.msaaSamples,shadowBackCull:A.shadowBackCull});this._scene=Q,Q.camera.constrainedAxis=ee.UNIT_Z,Cot(this),xot(this);let M=null;A.contextOptions.ellipsoidCoordinates==="CGCS2000"?M=Di.CGCS2000:A.contextOptions.ellipsoidCoordinates==="MOON"||A.contextOptions.ellipsoidCoordinates==="MOON2000"?M=Di.MOON2000:M=Ae(Q.mapProjection.ellipsoid,Di.WGS84),px.ellipsoidCoordinates=A.contextOptions.ellipsoidCoordinates;let B=A.globe;O(B)||(B=new voe(M,Q)),B!==!1&&(Q.globe=B,Q.globe.shadows=Ae(A.terrainShadows,Al.RECEIVE_ONLY));let T=A.skyBox;O(T)||(T=new mN({sources:{positiveX:VU("px"),negativeX:VU("mx"),positiveY:VU("py"),negativeY:VU("my"),positiveZ:VU("pz"),negativeZ:VU("mz")}})),T!==!1&&(Q.skyBox=T,Q.sun=new Uoe,Q.moon=new Ioe);let D=A.skyAtmosphere;O(D)||(D=new sH(M)),D!==!1&&(Q.skyAtmosphere=D);let F=A.globe===!1?!1:A.imageryProvider;O(F)||(F=Xk()),F!==!1&&Q.imageryLayers.addImageryProvider(F),O(A.terrainProvider)&&A.globe!==!1&&(Q.terrainProvider=A.terrainProvider),this._screenSpaceEventHandler=new Ur(m),O(A.sceneMode)&&(A.sceneMode===xi.SCENE2D&&this._scene.morphTo2D(0),A.sceneMode===xi.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=Ae(A.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=A.targetFrameRate;let L=this;this._onRenderError=function(R,k){if(L._useDefaultRenderLoop=!1,L._renderLoopRunning=!1,L._showRenderLoopErrors){let U="An error occurred while rendering.  Rendering has stopped.";L.showErrorPanel(U,void 0,k)}},Q.renderError.addEventListener(this._onRenderError)}catch(Q){if(I){let M="Error constructing CesiumWidget.",B='Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL.  Consider trying a different web browser or updating your video drivers.  Detailed error information is below:';this.showErrorPanel(M,B,Q)}throw Q}}Object.defineProperties(EO.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(o){this._scene.terrainProvider=o}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(o){this._targetFrameRate=o}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(o){this._useDefaultRenderLoop!==o&&(this._useDefaultRenderLoop=o,o&&!this._renderLoopRunning&&k_i(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(o){this._resolutionScale!==o&&(this._resolutionScale=o,this._forceResize=!0)}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(o){this._useBrowserRecommendedResolution!==o&&(this._useBrowserRecommendedResolution=o,this._forceResize=!0)}}});EO.prototype.showErrorPanel=function(o,A,f){let m=this._element,C=document.createElement("div");C.className="map-widget-errorPanel";let y=document.createElement("div");y.className="map-widget-errorPanel-content",C.appendChild(y);let x=document.createElement("div");x.className="map-widget-errorPanel-header",x.appendChild(document.createTextNode(o)),y.appendChild(x);let v=document.createElement("div");v.className="map-widget-errorPanel-scroll",y.appendChild(v);function E(){v.style.maxHeight=`${Math.max(Math.round(m.clientHeight*.9-100),30)}px`}E(),O(window.addEventListener)&&window.addEventListener("resize",E,!1);let I=O(A),w=O(f);if(I||w){let B=document.createElement("div");if(B.className="map-widget-errorPanel-message",v.appendChild(B),w){let T=D5(f);I||(typeof f=="string"&&(f=new Error(f)),A=D5({name:f.name,message:f.message}),T=f.stack),typeof console<"u"&&console.error(`${o}
${A}
${T}`);let D=document.createElement("div");D.className="map-widget-errorPanel-message-details collapsed";let F=document.createElement("span");F.className="map-widget-errorPanel-more-details",F.appendChild(document.createTextNode("See more...")),D.appendChild(F),D.onclick=function(L){D.removeChild(F),D.appendChild(document.createTextNode(T)),D.className="map-widget-errorPanel-message-details",y.className="map-widget-errorPanel-content expanded",D.onclick=void 0},v.appendChild(D)}B.innerHTML=`<p>${A}</p>`}let Q=document.createElement("div");Q.className="map-widget-errorPanel-buttonPanel",y.appendChild(Q);let M=document.createElement("button");M.setAttribute("type","button"),M.className="map-button",M.appendChild(document.createTextNode("OK")),M.onclick=function(){O(E)&&O(window.removeEventListener)&&window.removeEventListener("resize",E,!1),m.removeChild(C)},Q.appendChild(M),m.appendChild(C)};EO.prototype.isDestroyed=function(){return!1};EO.prototype.destroy=function(){O(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),Qr(this)};EO.prototype.resize=function(){let o=this._canvas;!this._forceResize&&this._canvasClientWidth===o.clientWidth&&this._canvasClientHeight===o.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,yot(this),xot(this),this._scene.requestRender())};EO.prototype.render=function(){if(this._scene._frameState||console.log("\u6388\u6743\u9A8C\u8BC1\u9519\u8BEF\uFF01"),this._canRender){this._scene.initializeFrame();let o=this._clock.tick();this._scene.render(o)}else this._clock.tick()};var jJ=EO;function qJ(o){O(o)||(o=new z5),this._clock=o,this._eventHelper=new Mx,this._eventHelper.add(o.onTick,this.synchronize,this),this.systemTime=gr.observable(fi.now()),this.systemTime.equalityComparer=fi.equals,this.startTime=gr.observable(o.startTime),this.startTime.equalityComparer=fi.equals,this.startTime.subscribe(function(A){o.startTime=A,this.synchronize()},this),this.stopTime=gr.observable(o.stopTime),this.stopTime.equalityComparer=fi.equals,this.stopTime.subscribe(function(A){o.stopTime=A,this.synchronize()},this),this.currentTime=gr.observable(o.currentTime),this.currentTime.equalityComparer=fi.equals,this.currentTime.subscribe(function(A){o.currentTime=A,this.synchronize()},this),this.multiplier=gr.observable(o.multiplier),this.multiplier.subscribe(function(A){o.multiplier=A,this.synchronize()},this),this.clockStep=gr.observable(o.clockStep),this.clockStep.subscribe(function(A){o.clockStep=A,this.synchronize()},this),this.clockRange=gr.observable(o.clockRange),this.clockRange.subscribe(function(A){o.clockRange=A,this.synchronize()},this),this.canAnimate=gr.observable(o.canAnimate),this.canAnimate.subscribe(function(A){o.canAnimate=A,this.synchronize()},this),this.shouldAnimate=gr.observable(o.shouldAnimate),this.shouldAnimate.subscribe(function(A){o.shouldAnimate=A,this.synchronize()},this),gr.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(qJ.prototype,{clock:{get:function(){return this._clock}}});qJ.prototype.synchronize=function(){let o=this._clock;this.systemTime=fi.now(),this.startTime=o.startTime,this.stopTime=o.stopTime,this.currentTime=o.currentTime,this.multiplier=o.multiplier,this.clockStep=o.clockStep,this.clockRange=o.clockRange,this.canAnimate=o.canAnimate,this.shouldAnimate=o.shouldAnimate};qJ.prototype.isDestroyed=function(){return!1};qJ.prototype.destroy=function(){this._eventHelper.removeAll(),Qr(this)};var LSe=qJ;function Goe(o,A){O(A)||(A=document.body),A=iA(A);let f=this,m=gr.observable(yp.fullscreen),C=gr.observable(yp.enabled),y=A.ownerDocument;this.isFullscreen=void 0,gr.defineProperty(this,"isFullscreen",{get:function(){return m()}}),this.isFullscreenEnabled=void 0,gr.defineProperty(this,"isFullscreenEnabled",{get:function(){return C()},set:function(x){C(x&&yp.enabled)}}),this.tooltip=void 0,gr.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?m()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=Hl(function(){yp.fullscreen?yp.exitFullscreen():yp.requestFullscreen(f._fullscreenElement)},gr.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=Ae(iA(o),y.body),this._callback=function(){m(yp.fullscreen)},y.addEventListener(yp.changeEventName,this._callback)}Object.defineProperties(Goe.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(o){this._fullscreenElement=o}},command:{get:function(){return this._command}}});Goe.prototype.isDestroyed=function(){return!1};Goe.prototype.destroy=function(){document.removeEventListener(yp.changeEventName,this._callback),Qr(this)};var FSe=Goe,O_i="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",U_i="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function Hoe(o,A){o=iA(o);let f=new FSe(A,o);f._exitFullScreenPath=U_i,f._enterFullScreenPath=O_i;let m=document.createElement("button");m.type="button",m.className="cesium-button cesium-fullscreenButton",m.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),o.appendChild(m),gr.applyBindings(f,m),this._container=o,this._viewModel=f,this._element=m}Object.defineProperties(Hoe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Hoe.prototype.isDestroyed=function(){return!1};Hoe.prototype.destroy=function(){return this._viewModel.destroy(),gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var NSe=Hoe;function vot(){}vot.prototype.geocode=function(o){let A=o.match(/[^\s,\n]+/g);if(A.length===2||A.length===3){let f=+A[0],m=+A[1],C=A.length===3?+A[2]:300;if(isNaN(f)&&isNaN(m)){let y=/^(\d+.?\d*)([nsew])/i;for(let x=0;x<A.length;++x){let v=A[x].match(y);y.test(A[x])&&v.length===3&&(/^[ns]/i.test(v[2])?m=/^[n]/i.test(v[2])?+v[1]:-v[1]:/^[ew]/i.test(v[2])&&(f=/^[e]/i.test(v[2])?+v[1]:-v[1]))}}if(!isNaN(f)&&!isNaN(m)&&!isNaN(C)){let y={displayName:o,destination:ee.fromDegrees(f,m,C)};return Promise.resolve([y])}}return Promise.resolve([])};var kSe=vot,G_i={SEARCH:0,AUTOCOMPLETE:1},XJ=Object.freeze(G_i);function OSe(o){this._url=An.createIfNeeded(o),this._url.appendForwardSlash()}Object.defineProperties(OSe.prototype,{url:{get:function(){return this._url}}});OSe.prototype.geocode=function(o,A){return this._url.getDerivedResource({url:A===XJ.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:o}}).fetchJson().then(function(f){return f.features.map(function(m){let C,y=m.bbox;if(O(y))C=Si.fromDegrees(y[0],y[1],y[2],y[3]);else{let x=m.geometry.coordinates[0],v=m.geometry.coordinates[1];C=ee.fromDegrees(x,v)}return{displayName:m.properties.label,destination:C}})})};var USe=OSe;function Eot(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=Ae(o.accessToken,yF.defaultAccessToken),f=An.createIfNeeded(Ae(o.server,yF.defaultServer));f.appendForwardSlash();let m=yF.getDefaultTokenCredit(A);O(m)&&o.scene.frameState.creditDisplay.addDefaultCredit(tl.clone(m));let C=f.getDerivedResource({url:"v1/geocode"});O(A)&&C.appendQueryParameters({access_token:A}),this._accessToken=A,this._server=f,this._pelias=new USe(C)}Eot.prototype.geocode=function(o,A){return this._pelias.geocode(o,A)};var GSe=Eot,aze=1e3;function KD(o){O(o.geocoderServices)?this._geocoderServices=o.geocoderServices:this._geocoderServices=[new kSe,new GSe({scene:o.scene})],this._viewContainer=o.container,this._scene=o.scene,this._flightDuration=o.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodePromise=void 0,this._complete=new br,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=lze,this._handleArrowUp=sze;let A=this;this._suggestionsVisible=gr.pureComputed(function(){let m=gr.getObservable(A,"_suggestions")().length>0,C=gr.getObservable(A,"_showSuggestions")();return m&&C}),this._searchCommand=Hl(function(m){if(m=Ae(m,XJ.SEARCH),A._focusTextbox=!1,O(A._selectedSuggestion))return A.activateSuggestion(A._selectedSuggestion),!1;A.hideSuggestions(),A.isSearchInProgress?J_i(A):K_i(A,A._geocoderServices,m)}),this.deselectSuggestion=function(){A._selectedSuggestion=void 0},this.handleKeyDown=function(m,C){let y=C.key==="ArrowDown"||C.key==="Down"||C.keyCode===40,x=C.key==="ArrowUp"||C.key==="Up"||C.keyCode===38;return(y||x)&&C.preventDefault(),!0},this.handleKeyUp=function(m,C){let y=C.key==="ArrowDown"||C.key==="Down"||C.keyCode===40,x=C.key==="ArrowUp"||C.key==="Up"||C.keyCode===38,v=C.key==="Enter"||C.keyCode===13;return x?sze(A):y?lze(A):v&&A._searchCommand(),!0},this.activateSuggestion=function(m){A.hideSuggestions(),A._searchText=m.displayName;let C=m.destination;_ot(A),A.destinationFound(A,C)},this.hideSuggestions=function(){A._showSuggestions=!1,A._selectedSuggestion=void 0},this.showSuggestions=function(){A._showSuggestions=!0},this.handleMouseover=function(m,C){m!==A._selectedSuggestion&&(A._selectedSuggestion=m)},this.keepExpanded=!1,this.autoComplete=Ae(o.autocomplete,!0),this.destinationFound=Ae(o.destinationFound,KD.flyToDestination),this._focusTextbox=!1,gr.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);let f=gr.getObservable(this,"_searchText");f.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=f.subscribe(function(){KD._updateSearchSuggestions(A)}),this.isSearchInProgress=void 0,gr.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,gr.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(m){this._searchText=m}}),this.flightDuration=void 0,gr.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(m){this._flightDuration=m}})}Object.defineProperties(KD.prototype,{complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},selectedSuggestion:{get:function(){return this._selectedSuggestion}},suggestions:{get:function(){return this._suggestions}}});KD.prototype.destroy=function(){this._suggestionSubscription.dispose()};function sze(o){if(o._suggestions.length===0)return;let A=o._suggestions.indexOf(o._selectedSuggestion);if(A===-1||A===0){o._selectedSuggestion=void 0;return}let f=A-1;o._selectedSuggestion=o._suggestions[f],KD._adjustSuggestionsScroll(o,f)}function lze(o){if(o._suggestions.length===0)return;let A=o._suggestions.length,f=(o._suggestions.indexOf(o._selectedSuggestion)+1)%A;o._selectedSuggestion=o._suggestions[f],KD._adjustSuggestionsScroll(o,f)}function H_i(o,A){let f=O(A)?A.availability:void 0;return O(f)?vQ(A,[o]).then(function(m){return o=m[0],o.height+=aze,o}):(o.height+=aze,Promise.resolve(o))}function V_i(o,A){let f=o._scene,m=f.mapProjection.ellipsoid,C=f.camera,y=f.terrainProvider,x=A,v;return A instanceof Si?je.equalsEpsilon(A.south,A.north,je.EPSILON7)&&je.equalsEpsilon(A.east,A.west,je.EPSILON7)?A=Si.center(A):v=BJ(A,f):A=m.cartesianToCartographic(A),O(v)||(v=H_i(A,y)),v.then(function(E){x=m.cartographicToCartesian(E)}).finally(function(){C.flyTo({destination:x,complete:function(){o._complete.raiseEvent()},duration:o._flightDuration,endTransform:Xe.IDENTITY})})}function z_i(o,A,f,m){return o.then(function(C){return O(C)&&C.state==="fulfilled"&&C.value.length>0?C:A.geocode(f,m).then(function(y){return{state:"fulfilled",value:y}}).catch(function(y){return{state:"rejected",reason:y}})})}function K_i(o,A,f){let m=o._searchText;if(Iot(m)){o.showSuggestions();return}o._isSearchInProgress=!0;let C=Promise.resolve();for(let y=0;y<A.length;y++)C=z_i(C,A[y],m,f);o._geocodePromise=C,C.then(function(y){if(C.cancel)return;o._isSearchInProgress=!1;let x=y.value;if(y.state==="fulfilled"&&O(x)&&x.length>0){o._searchText=x[0].displayName,o.destinationFound(o,x[0].destination);return}o._searchText=`${m} (not found)`})}function Y_i(o,A){let f=iA(o._viewContainer),m=f.getElementsByClassName("search-results")[0],C=f.getElementsByTagName("li")[A];if(A===0){m.scrollTop=0;return}let y=C.offsetTop;y+C.clientHeight>m.clientHeight?m.scrollTop=y+C.clientHeight:y<m.scrollTop&&(m.scrollTop=y)}function J_i(o){o._isSearchInProgress=!1,O(o._geocodePromise)&&(o._geocodePromise.cancel=!0,o._geocodePromise=void 0)}function Iot(o){return/^\s*$/.test(o)}function _ot(o){gr.getObservable(o,"_suggestions").removeAll()}function W_i(o){if(!o.autoComplete)return;let A=o._searchText;if(_ot(o),Iot(A))return;let f=Promise.resolve([]);return o._geocoderServices.forEach(function(m){f=f.then(function(C){return C.length>=5?C:m.geocode(A,XJ.AUTOCOMPLETE).then(function(y){return C=C.concat(y),C})})}),f.then(function(m){let C=o._suggestions;for(let y=0;y<m.length;y++)C.push(m[y])})}KD.flyToDestination=V_i;KD._updateSearchSuggestions=W_i;KD._adjustSuggestionsScroll=Y_i;var HSe=KD,j_i="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",q_i="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function Voe(o){let A=iA(o.container),f=new HSe(o);f._startSearchPath=j_i,f._stopSearchPath=q_i;let m=document.createElement("form");m.setAttribute("data-bind","submit: search");let C=document.createElement("input");C.type="search",C.className="cesium-geocoder-input",C.setAttribute("placeholder","Enter an address or landmark..."),C.setAttribute("data-bind",'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout(function(){C.select()},0)},C.addEventListener("focus",this._onTextBoxFocus,!1),m.appendChild(C),this._textBox=C;let y=document.createElement("span");y.className="cesium-geocoder-searchButton",y.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),m.appendChild(y),A.appendChild(m);let x=document.createElement("div");x.className="search-results",x.setAttribute("data-bind","visible: _suggestionsVisible");let v=document.createElement("ul");v.setAttribute("data-bind","foreach: _suggestions");let E=document.createElement("li");v.appendChild(E),E.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),x.appendChild(v),A.appendChild(x),gr.applyBindings(f,m),gr.applyBindings(f,x),this._container=A,this._searchSuggestionsContainer=x,this._viewModel=f,this._form=m,this._onInputBegin=function(I){let w=I.target;typeof I.composedPath=="function"&&(w=I.composedPath()[0]),A.contains(w)||(f._focusTextbox=!1,f.hideSuggestions())},this._onInputEnd=function(I){f._focusTextbox=!0,f.showSuggestions()},Mo.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),A.addEventListener("pointerup",this._onInputEnd,!0),A.addEventListener("pointercancel",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),A.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),A.addEventListener("touchend",this._onInputEnd,!0),A.addEventListener("touchcancel",this._onInputEnd,!0))}Object.defineProperties(Voe.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}});Voe.prototype.isDestroyed=function(){return!1};Voe.prototype.destroy=function(){let o=this._container;return Mo.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),o.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),o.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),o.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),gr.cleanNode(this._form),gr.cleanNode(this._searchSuggestionsContainer),o.removeChild(this._form),o.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),Qr(this)};var VSe=Voe;function Bot(o,A){this._scene=o,this._duration=A;let f=this;this._command=Hl(function(){f._scene.camera.flyHome(f._duration)}),this.tooltip="View Home",gr.track(this,["tooltip"])}Object.defineProperties(Bot.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(o){this._duration=o}}});var zSe=Bot;function zoe(o,A,f){o=iA(o);let m=new zSe(A,f);m._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";let C=document.createElement("button");C.type="button",C.className="cesium-button cesium-toolbar-button cesium-home-button",C.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),o.appendChild(C),gr.applyBindings(m,C),this._container=o,this._viewModel=m,this._element=C}Object.defineProperties(zoe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});zoe.prototype.isDestroyed=function(){return!1};zoe.prototype.destroy=function(){return gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var KSe=zoe,X_i="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",Z_i="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function YSe(){this._cameraClicked=new br,this._closeClicked=new br,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",gr.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,gr.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?Z_i:X_i}}),gr.defineProperty(this,"_bodyless",{get:function(){return!O(this.description)||this.description.length===0}})}YSe.prototype.maxHeightOffset=function(o){return`${this.maxHeight-o}px`};Object.defineProperties(YSe.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var JSe=YSe;function Koe(o){o=iA(o);let A=document.createElement("div");A.className="cesium-infoBox",A.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),o.appendChild(A);let f=document.createElement("div");f.className="cesium-infoBox-title",f.setAttribute("data-bind","text: titleText"),A.appendChild(f);let m=document.createElement("button");m.type="button",m.className="cesium-button cesium-infoBox-camera",m.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),A.appendChild(m);let C=document.createElement("button");C.type="button",C.className="cesium-infoBox-close",C.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),C.innerHTML="&times;",A.appendChild(C);let y=document.createElement("iframe");y.className="cesium-infoBox-iframe",y.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),y.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),y.setAttribute("allowfullscreen",!0),A.appendChild(y);let x=new JSe;gr.applyBindings(x,A),this._container=o,this._element=A,this._frame=y,this._viewModel=x,this._descriptionSubscription=void 0;let v=this;y.addEventListener("load",function(){let E=y.contentDocument,I=E.createElement("link");I.href=xs("Widgets/InfoBox/InfoBoxDescription.css"),I.rel="stylesheet",I.type="text/css";let w=E.createElement("div");w.className="cesium-infoBox-description",E.head.appendChild(I),E.body.appendChild(w),v._descriptionSubscription=WE(x,"description",function(Q){y.style.height="5px",w.innerHTML=Q;let M=null,B=w.firstElementChild;if(B!==null&&w.childNodes.length===1){let D=window.getComputedStyle(B);if(D!==null){let F=D["background-color"],L=At.fromCssColorString(F);O(L)&&L.alpha!==0&&(M=D["background-color"])}}A.style["background-color"]=M;let T=w.getBoundingClientRect().height;y.style.height=`${T}px`})}),y.setAttribute("src","about:blank")}Object.defineProperties(Koe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}});Koe.prototype.isDestroyed=function(){return!1};Koe.prototype.destroy=function(){let o=this._container;return gr.cleanNode(this._element),o.removeChild(this._element),O(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),Qr(this)};var WSe=Koe;function wot(){this.showInstructions=!1;let o=this;this._command=Hl(function(){o.showInstructions=!o.showInstructions}),this._showClick=Hl(function(){o._touch=!1}),this._showTouch=Hl(function(){o._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",gr.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(wot.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var jSe=wot;function Yoe(o){let A=iA(o.container),f=new jSe,m=Ae(o.instructionsInitiallyVisible,!1);f.showInstructions=m,f._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";let C=document.createElement("span");C.className="cesium-navigationHelpButton-wrapper",A.appendChild(C);let y=document.createElement("button");y.type="button",y.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",y.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),C.appendChild(y);let x=document.createElement("div");x.className="cesium-navigation-help",x.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),C.appendChild(x);let v=document.createElement("button");v.type="button",v.className="cesium-navigation-button cesium-navigation-button-left",v.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');let E=document.createElement("img");E.src=xs("Widgets/Images/NavigationHelp/Mouse.svg"),E.className="cesium-navigation-button-icon",E.style.width="25px",E.style.height="25px",v.appendChild(E),v.appendChild(document.createTextNode("Mouse"));let I=document.createElement("button");I.type="button",I.className="cesium-navigation-button cesium-navigation-button-right",I.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');let w=document.createElement("img");w.src=xs("Widgets/Images/NavigationHelp/Touch.svg"),w.className="cesium-navigation-button-icon",w.style.width="25px",w.style.height="25px",I.appendChild(w),I.appendChild(document.createTextNode("Touch")),x.appendChild(v),x.appendChild(I);let Q=document.createElement("div");Q.className="cesium-click-navigation-help cesium-navigation-help-instructions",Q.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),Q.innerHTML=`            <table>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/MouseLeft.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-pan">Pan view</div>                        <div class="cesium-navigation-help-details">Left click + drag</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/MouseRight.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-zoom">Zoom view</div>                        <div class="cesium-navigation-help-details">Right click + drag, or</div>                        <div class="cesium-navigation-help-details">Mouse wheel scroll</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/MouseMiddle.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-rotate">Rotate view</div>                        <div class="cesium-navigation-help-details">Middle click + drag, or</div>                        <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div>                    </td>                </tr>            </table>`,x.appendChild(Q);let M=document.createElement("div");M.className="cesium-touch-navigation-help cesium-navigation-help-instructions",M.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),M.innerHTML=`            <table>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchDrag.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-pan">Pan view</div>                        <div class="cesium-navigation-help-details">One finger drag</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchZoom.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-zoom">Zoom view</div>                        <div class="cesium-navigation-help-details">Two finger pinch</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchTilt.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-rotate">Tilt view</div>                        <div class="cesium-navigation-help-details">Two finger drag, same direction</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchRotate.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-tilt">Rotate view</div>                        <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div>                    </td>                </tr>            </table>`,x.appendChild(M),gr.applyBindings(f,C),this._container=A,this._viewModel=f,this._wrapper=C,this._closeInstructions=function(B){C.contains(B.target)||(f.showInstructions=!1)},Mo.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(Yoe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Yoe.prototype.isDestroyed=function(){return!1};Yoe.prototype.destroy=function(){return Mo.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),gr.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Qr(this)};var qSe=Yoe;function Joe(o){this._scene=o,this._orthographic=o.camera.frustum instanceof Ds,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=o.mode,gr.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);let A=this;gr.defineProperty(this,"selectedTooltip",function(){return A._orthographic?A.tooltipOrthographic:A.tooltipPerspective}),this._toggleDropDown=Hl(function(){A.sceneMode===xi.SCENE2D||A._flightInProgress||(A.dropDownVisible=!A.dropDownVisible)}),this._eventHelper=new Mx,this._eventHelper.add(o.morphComplete,function(f,m,C,y){A.sceneMode=C,A._orthographic=C===xi.SCENE2D||A._scene.camera.frustum instanceof Ds}),this._eventHelper.add(o.preRender,function(){A._flightInProgress=O(o.camera._currentFlight)}),this._switchToPerspective=Hl(function(){A.sceneMode!==xi.SCENE2D&&(A._scene.camera.switchToPerspectiveFrustum(),A._orthographic=!1,A.dropDownVisible=!1)}),this._switchToOrthographic=Hl(function(){A.sceneMode!==xi.SCENE2D&&(A._scene.camera.switchToOrthographicFrustum(),A._orthographic=!0,A.dropDownVisible=!1)}),this._sceneMode=xi}Object.defineProperties(Joe.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}});Joe.prototype.isDestroyed=function(){return!1};Joe.prototype.destroy=function(){this._eventHelper.removeAll(),Qr(this)};var XSe=Joe,$_i="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",eBi="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function Woe(o,A){o=iA(o);let f=new XSe(A);f._perspectivePath=$_i,f._orthographicPath=eBi;let m=document.createElement("span");m.className="cesium-projectionPicker-wrapper cesium-toolbar-button",o.appendChild(m);let C=document.createElement("button");C.type="button",C.className="cesium-button cesium-toolbar-button",C.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic,       "cesium-projectionPicker-buttonOrthographic": _orthographic,       "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress,        "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),C.innerHTML='<!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --><!-- /ko -->',m.appendChild(C);let y=document.createElement("button");y.type="button",y.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",y.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic),       "cesium-projectionPicker-none" : !_orthographic,       "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),m.appendChild(y);let x=document.createElement("button");x.type="button",x.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",x.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic),       "cesium-projectionPicker-none" : _orthographic,       "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),m.appendChild(x),gr.applyBindings(f,m),this._viewModel=f,this._container=o,this._wrapper=m,this._closeDropDown=function(v){m.contains(v.target)||(f.dropDownVisible=!1)},Mo.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(Woe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Woe.prototype.isDestroyed=function(){return!1};Woe.prototype.destroy=function(){return this._viewModel.destroy(),Mo.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),gr.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Qr(this)};var ZSe=Woe;function joe(o,A){this._scene=o;let f=this,m=function(C,y,x,v){f.sceneMode=x,f.dropDownVisible=!1};this._eventHelper=new Mx,this._eventHelper.add(o.morphStart,m),this._duration=Ae(A,2),this.sceneMode=o.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",gr.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,gr.defineProperty(this,"selectedTooltip",function(){let C=f.sceneMode;return C===xi.SCENE2D?f.tooltip2D:C===xi.SCENE3D?f.tooltip3D:f.tooltipColumbusView}),this._toggleDropDown=Hl(function(){f.dropDownVisible=!f.dropDownVisible}),this._morphTo2D=Hl(function(){o.morphTo2D(f._duration)}),this._morphTo3D=Hl(function(){o.morphTo3D(f._duration)}),this._morphToColumbusView=Hl(function(){o.morphToColumbusView(f._duration)}),this._sceneMode=xi}Object.defineProperties(joe.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(o){this._duration=o}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}});joe.prototype.isDestroyed=function(){return!1};joe.prototype.destroy=function(){this._eventHelper.removeAll(),Qr(this)};var $Se=joe,tBi="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878         -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132         -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285         11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z         M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201         5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461         -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",iBi="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",rBi="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function qoe(o,A,f){o=iA(o);let m=new $Se(A,f);m._globePath=tBi,m._flatMapPath=iBi,m._columbusViewPath=rBi;let C=document.createElement("span");C.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",o.appendChild(C);let y=document.createElement("button");y.type="button",y.className="cesium-button cesium-toolbar-button",y.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D,       "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D,       "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW,       "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),y.innerHTML='<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->',C.appendChild(y);let x=document.createElement("button");x.type="button",x.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",x.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D,       "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),C.appendChild(x);let v=document.createElement("button");v.type="button",v.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",v.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D,       "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),C.appendChild(v);let E=document.createElement("button");E.type="button",E.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",E.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW,       "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),C.appendChild(E),gr.applyBindings(m,C),this._viewModel=m,this._container=o,this._wrapper=C,this._closeDropDown=function(I){C.contains(I.target)||(m.dropDownVisible=!1)},Mo.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(qoe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});qoe.prototype.isDestroyed=function(){return!1};qoe.prototype.destroy=function(){return this._viewModel.destroy(),Mo.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),gr.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Qr(this)};var eDe=qoe,nBi=new It,rie="-1000px";function ZJ(o,A,f){this._scene=o,this._screenPositionX=rie,this._screenPositionY=rie,this._tweens=o.tweens,this._container=Ae(f,document.body),this._selectionIndicatorElement=A,this._scale=1,this.position=void 0,this.showSelection=!1,gr.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,gr.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&O(this.position)}}),gr.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(m,C){return Ss.wgs84ToWindowCoordinates(o,m,C)}}ZJ.prototype.update=function(){if(this.showSelection&&O(this.position)){let o=this.computeScreenSpacePosition(this.position,nBi);if(!O(o))this._screenPositionX=rie,this._screenPositionY=rie;else{let A=this._container,f=A.parentNode.clientWidth,m=A.parentNode.clientHeight,C=this._selectionIndicatorElement.clientWidth,y=C*.5;o.x=Math.min(Math.max(o.x,-C),f+C)-y,o.y=Math.min(Math.max(o.y,-C),m+C)-y,this._screenPositionX=`${Math.floor(o.x+.25)}px`,this._screenPositionY=`${Math.floor(o.y+.25)}px`}}};ZJ.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:Ix.EXPONENTIAL_OUT})};ZJ.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:Ix.EXPONENTIAL_OUT})};Object.defineProperties(ZJ.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var tDe=ZJ;function Xoe(o,A){o=iA(o),this._container=o;let f=document.createElement("div");f.className="cesium-selection-wrapper",f.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),o.appendChild(f),this._element=f;let m="http://www.w3.org/2000/svg",C="M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z",y=document.createElementNS(m,"svg:svg");y.setAttribute("width",160),y.setAttribute("height",160),y.setAttribute("viewBox","0 0 160 160");let x=document.createElementNS(m,"g");x.setAttribute("transform","translate(80,80)"),y.appendChild(x);let v=document.createElementNS(m,"path");v.setAttribute("data-bind","attr: { transform: _transform }"),v.setAttribute("d",C),x.appendChild(v),f.appendChild(y);let E=new tDe(A,this._element,this._container);this._viewModel=E,gr.applyBindings(this._viewModel,this._element)}Object.defineProperties(Xoe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Xoe.prototype.isDestroyed=function(){return!1};Xoe.prototype.destroy=function(){let o=this._container;return gr.cleanNode(this._element),o.removeChild(this._element),Qr(this)};var iDe=Xoe;function IO(o,A,f){this._color=o,this._height=A,this._base=Ae(f,0)}IO.prototype.getHeight=function(){return this._height};IO.prototype.getBase=function(){return this._base};IO.prototype.getStartTime=function(){return this._start};IO.prototype.getStopTime=function(){return this._stop};IO.prototype.setRange=function(o,A){this._start=o,this._stop=A};IO.prototype.render=function(o){let A="";if(this._start&&this._stop&&this._color){let f=fi.secondsDifference(this._start,o.epochJulian),m=Math.round(o.timeBarWidth*o.getAlpha(f)),C=fi.secondsDifference(this._stop,o.epochJulian),y=Math.round(o.timeBarWidth*o.getAlpha(C))-m;m<0&&(y+=m,m=0),m+y>o.timeBarWidth&&(y=o.timeBarWidth-m),y>0&&(A=`<span class="cesium-timeline-highlight" style="left: ${m.toString()}px; width: ${y.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return A};var rDe=IO;function bot(o,A,f,m){this.interval=o,this.height=A,this.color=f||new At(.5,.5,.5,1),this.backgroundColor=m||new At(0,0,0,0)}bot.prototype.render=function(o,A){let f=this.interval.start,m=this.interval.stop,C=A.startJulian,y=fi.addSeconds(A.startJulian,A.duration,new fi);if(fi.lessThan(f,C)&&fi.greaterThan(m,y))o.fillStyle=this.color.toCssColorString(),o.fillRect(0,A.y,A.timeBarWidth,this.height);else if(fi.lessThanOrEquals(f,y)&&fi.greaterThanOrEquals(m,C)){let x,v,E;for(x=0;x<A.timeBarWidth;++x){let I=fi.addSeconds(A.startJulian,x/A.timeBarWidth*A.duration,new fi);!O(v)&&fi.greaterThanOrEquals(I,f)?v=x:!O(E)&&fi.greaterThanOrEquals(I,m)&&(E=x)}o.fillStyle=this.backgroundColor.toCssColorString(),o.fillRect(0,A.y,A.timeBarWidth,this.height),O(v)&&(O(E)||(E=A.timeBarWidth),o.fillStyle=this.color.toCssColorString(),o.fillRect(v,A.y,Math.max(E-v,1),this.height))}};var nDe=bot,q0e=1e12,F1={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},_v={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},EL=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6];function Jv(o,A){o=iA(o);let f=o.ownerDocument;this.container=o;let m=f.createElement("div");m.className="cesium-timeline-main",o.appendChild(m),this._topDiv=m,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=A,this._scrubJulian=A.currentTime,this._mainTicSpan=-1,this._mouseMode=F1.none,this._touchMode=_v.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(A.startTime,A.stopTime),this._onMouseDown=oBi(this),this._onMouseUp=aBi(this),this._onMouseMove=sBi(this),this._onMouseWheel=lBi(this),this._onTouchStart=uBi(this),this._onTouchMove=ABi(this),this._onTouchEnd=cBi(this);let C=this._timeBarEle;f.addEventListener("mouseup",this._onMouseUp,!1),f.addEventListener("mousemove",this._onMouseMove,!1),C.addEventListener("mousedown",this._onMouseDown,!1),C.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),C.addEventListener("mousewheel",this._onMouseWheel,!1),C.addEventListener("touchstart",this._onTouchStart,!1),C.addEventListener("touchmove",this._onTouchMove,!1),C.addEventListener("touchend",this._onTouchEnd,!1),C.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},A.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}Jv.prototype.addEventListener=function(o,A,f){this._topDiv.addEventListener(o,A,f)};Jv.prototype.removeEventListener=function(o,A,f){this._topDiv.removeEventListener(o,A,f)};Jv.prototype.isDestroyed=function(){return!1};Jv.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);let o=this.container.ownerDocument;o.removeEventListener("mouseup",this._onMouseUp,!1),o.removeEventListener("mousemove",this._onMouseMove,!1);let A=this._timeBarEle;A.removeEventListener("mousedown",this._onMouseDown,!1),A.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),A.removeEventListener("mousewheel",this._onMouseWheel,!1),A.removeEventListener("touchstart",this._onTouchStart,!1),A.removeEventListener("touchmove",this._onTouchMove,!1),A.removeEventListener("touchend",this._onTouchEnd,!1),A.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),Qr(this)};Jv.prototype.addHighlightRange=function(o,A,f){let m=new rDe(o,A,f);return this._highlightRanges.push(m),this.resize(),m};Jv.prototype.addTrack=function(o,A,f,m){let C=new nDe(o,A,f,m);return this._trackList.push(C),this._lastHeight=void 0,this.resize(),C};Jv.prototype.zoomTo=function(o,A){if(this._startJulian=o,this._endJulian=A,this._timeBarSecondsSpan=fi.secondsDifference(A,o),this._clock&&this._clock.clockRange!==aC.UNBOUNDED){let m=this._clock.startTime,C=this._clock.stopTime,y=fi.secondsDifference(C,m),x=fi.secondsDifference(m,this._startJulian),v=fi.secondsDifference(C,this._endJulian);this._timeBarSecondsSpan>=y?(this._timeBarSecondsSpan=y,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):x>0?(this._endJulian=fi.addSeconds(this._endJulian,x,new fi),this._startJulian=m,this._timeBarSecondsSpan=fi.secondsDifference(this._endJulian,this._startJulian)):v<0&&(this._startJulian=fi.addSeconds(this._startJulian,v,new fi),this._endJulian=C,this._timeBarSecondsSpan=fi.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();let f=document.createEvent("Event");f.initEvent("setzoom",!0,!0),f.startJulian=this._startJulian,f.endJulian=this._endJulian,f.epochJulian=this._epochJulian,f.totalSpan=this._timeBarSecondsSpan,f.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(f)};Jv.prototype.zoomFrom=function(o){let A=fi.secondsDifference(this._scrubJulian,this._startJulian);o>1||A<0||A>this._timeBarSecondsSpan?A=this._timeBarSecondsSpan*.5:A+=A-this._timeBarSecondsSpan*.5;let f=this._timeBarSecondsSpan-A;this.zoomTo(fi.addSeconds(this._startJulian,A-A*o,new fi),fi.addSeconds(this._endJulian,f*o-f,new fi))};Jv.prototype.makeLabel=function(o){let A=new Date(o);return`${A.getFullYear()} ${A.getMonth()+1} ${A.getDate()-1} ${A.getHours()}:${A.getMinutes()}:${A.getSeconds()}`};Jv.prototype.smallestTicInPixels=7;Jv.prototype._makeTics=function(){let o=this._timeBarEle,A=fi.secondsDifference(this._scrubJulian,this._startJulian),f=Math.round(A*this._topDiv.clientWidth/this._timeBarSecondsSpan),m=f-8,C,y=this;this._needleEle.style.left=`${f.toString()}px`;let x="",v=.01,E=31536e6,I=1e-10,w=0,Q=this._timeBarSecondsSpan;Q<v?(Q=v,this._timeBarSecondsSpan=v,this._endJulian=fi.addSeconds(this._startJulian,v,new fi)):Q>E&&(Q=E,this._timeBarSecondsSpan=E,this._endJulian=fi.addSeconds(this._startJulian,E,new fi));let M=this._timeBarEle.clientWidth;M<10&&(M=10);let B=this._startJulian,T=Math.min(Q/M*1e-5,.4),D,F=fi.toGregorianDate(B);Q>31536e4?D=fi.fromDate(new Date(Date.UTC(Math.floor(F.year/100)*100,0))):Q>31536e3?D=fi.fromDate(new Date(Date.UTC(Math.floor(F.year/10)*10,0))):Q>86400?D=fi.fromDate(new Date(Date.UTC(F.year,0))):D=fi.fromDate(new Date(Date.UTC(F.year,F.month,F.day)));let L=fi.secondsDifference(this._startJulian,fi.addSeconds(D,T,new fi)),R=L+Q;this._epochJulian=D;function k(Ie){return Math.floor(L/Ie)*Ie}function U(Ie,ve){return Math.ceil(Ie/ve+.5)*ve}function V(Ie){return(Ie-L)/Q}function H(Ie,ve){return Ie-ve*Math.round(Ie/ve)}this._rulerEle.innerHTML=this.makeLabel(fi.addSeconds(this._endJulian,-v,new fi));let q=this._rulerEle.offsetWidth+20;q<30&&(q=180);let ie=w;w-=I;let Z={startTime:L,startJulian:B,epochJulian:D,duration:Q,timeBarWidth:M,getAlpha:V};this._highlightRanges.forEach(function(Ie){x+=Ie.render(Z)});let oe=0,ne=0,se=0,ce=q/M;ce>1&&(ce=1),ce*=this._timeBarSecondsSpan;let j=-1,de=-1,me=EL.length,_e;for(_e=0;_e<me;++_e){let Ie=EL[_e];if(++j,oe=Ie,Ie>ce&&Ie>w)break;de<0&&M*(Ie/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(de=j)}if(j>0){for(;j>0;)if(--j,Math.abs(H(oe,EL[j]))<1e-5){EL[j]>=w&&(ne=EL[j]);break}if(de>=0)for(;de<j;){if(Math.abs(H(ne,EL[de]))<1e-5&&EL[de]>=w){se=EL[de];break}++de}}w=ie,w>I&&se<1e-5&&Math.abs(w-oe)>I&&(se=w,w<=oe+I&&(ne=0));let Be=-999999,Qe;if(M*(se/this._timeBarSecondsSpan)>=3)for(C=k(se);C<=R;C=U(C,se))x+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(M*V(C)).toString()}px;"></span>`;if(M*(ne/this._timeBarSecondsSpan)>=3)for(C=k(ne);C<=R;C=U(C,ne))x+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(M*V(C)).toString()}px;"></span>`;if(M*(oe/this._timeBarSecondsSpan)>=2){this._mainTicSpan=oe,R+=oe,C=k(oe);let Ie=fi.computeTaiMinusUtc(D);for(;C<=R;){let ve=fi.addSeconds(B,C-L,new fi);if(oe>2.1){let Y=fi.computeTaiMinusUtc(ve);Math.abs(Y-Ie)>.1&&(C+=Y-Ie,ve=fi.addSeconds(B,C-L,new fi))}let K=Math.round(M*V(C)),W=this.makeLabel(ve);this._rulerEle.innerHTML=W,Qe=this._rulerEle.offsetWidth,Qe<10&&(Qe=q);let te=K-(Qe/2-1);te>Be?(Be=te+Qe+5,x+=`<span class="cesium-timeline-ticMain" style="left: ${K.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${te.toString()}px;">${W}</span>`):x+=`<span class="cesium-timeline-ticSub" style="left: ${K.toString()}px;"></span>`,C=U(C,oe)}}else this._mainTicSpan=-1;x+=`<span class="cesium-timeline-icon16" style="left:${m}px;bottom:0;background-position: 0 0;"></span>`,o.innerHTML=x,this._scrubElement=o.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),Z.y=0,this._trackList.forEach(function(Ie){Ie.render(y._context,Z),Z.y+=Ie.height})};Jv.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;let o=this._scrubElement;if(O(this._scrubElement)){let A=fi.secondsDifference(this._scrubJulian,this._startJulian),f=Math.round(A*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==f&&(this._lastXPos=f,o.style.left=`${f-8}px`,this._needleEle.style.left=`${f}px`)}O(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(fi.addSeconds(this._startJulian,this._timelineDrag,new fi),fi.addSeconds(this._endJulian,this._timelineDrag,new fi)))};Jv.prototype._setTimeBarTime=function(o,A){if(o=Math.round(o),this._scrubJulian=fi.addSeconds(this._startJulian,A,new fi),this._scrubElement){let m=o-8;this._scrubElement.style.left=`${m.toString()}px`,this._needleEle.style.left=`${o.toString()}px`}let f=document.createEvent("Event");f.initEvent("settime",!0,!0),f.clientX=o,f.timeSeconds=A,f.timeJulian=this._scrubJulian,f.clock=this._clock,this._topDiv.dispatchEvent(f)};function oBi(o){return function(A){o._mouseMode!==F1.touchOnly&&(A.button===0?(o._mouseMode=F1.scrub,o._scrubElement&&(o._scrubElement.style.backgroundPosition="-16px 0"),o._onMouseMove(A)):(o._mouseX=A.clientX,A.button===2?o._mouseMode=F1.zoom:o._mouseMode=F1.slide)),A.preventDefault()}}function aBi(o){return function(A){o._mouseMode=F1.none,o._scrubElement&&(o._scrubElement.style.backgroundPosition="0 0"),o._timelineDrag=0,o._timelineDragLocation=void 0}}function sBi(o){return function(A){let f;if(o._mouseMode===F1.scrub){A.preventDefault();let m=A.clientX-o._topDiv.getBoundingClientRect().left;m<0?(o._timelineDragLocation=0,o._timelineDrag=-.01*o._timeBarSecondsSpan):m>o._topDiv.clientWidth?(o._timelineDragLocation=o._topDiv.clientWidth,o._timelineDrag=.01*o._timeBarSecondsSpan):(o._timelineDragLocation=void 0,o._setTimeBarTime(m,m*o._timeBarSecondsSpan/o._topDiv.clientWidth))}else if(o._mouseMode===F1.slide){if(f=o._mouseX-A.clientX,o._mouseX=A.clientX,f!==0){let m=f*o._timeBarSecondsSpan/o._topDiv.clientWidth;o.zoomTo(fi.addSeconds(o._startJulian,m,new fi),fi.addSeconds(o._endJulian,m,new fi))}}else o._mouseMode===F1.zoom&&(f=o._mouseX-A.clientX,o._mouseX=A.clientX,f!==0&&o.zoomFrom(Math.pow(1.01,f)))}}function lBi(o){return function(A){let f=A.wheelDeltaY||A.wheelDelta||-A.detail;q0e=Math.max(Math.min(Math.abs(f),q0e),1),f/=q0e,o.zoomFrom(Math.pow(1.05,-f))}}function uBi(o){return function(A){let f=A.touches.length,m,C,y=o._topDiv.getBoundingClientRect().left;A.preventDefault(),o._mouseMode=F1.touchOnly,f===1?(m=fi.secondsDifference(o._scrubJulian,o._startJulian),C=Math.round(m*o._topDiv.clientWidth/o._timeBarSecondsSpan+y),Math.abs(A.touches[0].clientX-C)<50?(o._touchMode=_v.scrub,o._scrubElement&&(o._scrubElement.style.backgroundPosition=f===1?"-16px 0":"0 0")):(o._touchMode=_v.singleTap,o._touchState.centerX=A.touches[0].clientX-y)):f===2?(o._touchMode=_v.slideZoom,o._touchState.centerX=(A.touches[0].clientX+A.touches[1].clientX)*.5-y,o._touchState.spanX=Math.abs(A.touches[0].clientX-A.touches[1].clientX)):o._touchMode=_v.ignore}}function cBi(o){return function(A){let f=A.touches.length,m=o._topDiv.getBoundingClientRect().left;o._touchMode===_v.singleTap?(o._touchMode=_v.scrub,o._onTouchMove(A)):o._touchMode===_v.scrub&&o._onTouchMove(A),o._mouseMode=F1.touchOnly,f!==1?o._touchMode=f>0?_v.ignore:_v.none:o._touchMode===_v.slideZoom&&(o._touchState.centerX=A.touches[0].clientX-m),o._scrubElement&&(o._scrubElement.style.backgroundPosition="0 0")}}function ABi(o){return function(A){let f,m,C,y,x,v,E=1,I=o._topDiv.getBoundingClientRect().left;o._touchMode===_v.singleTap&&(o._touchMode=_v.slideZoom),o._mouseMode=F1.touchOnly,o._touchMode===_v.scrub?(A.preventDefault(),A.changedTouches.length===1&&(m=A.changedTouches[0].clientX-I,m>=0&&m<=o._topDiv.clientWidth&&o._setTimeBarTime(m,m*o._timeBarSecondsSpan/o._topDiv.clientWidth))):o._touchMode===_v.slideZoom&&(C=A.touches.length,C===2?(y=(A.touches[0].clientX+A.touches[1].clientX)*.5-I,x=Math.abs(A.touches[0].clientX-A.touches[1].clientX)):C===1&&(y=A.touches[0].clientX-I,x=0),O(y)&&(x>0&&o._touchState.spanX>0?(E=o._touchState.spanX/x,v=fi.addSeconds(o._startJulian,(o._touchState.centerX*o._timeBarSecondsSpan-y*o._timeBarSecondsSpan*E)/o._topDiv.clientWidth,new fi)):(f=o._touchState.centerX-y,v=fi.addSeconds(o._startJulian,f*o._timeBarSecondsSpan/o._topDiv.clientWidth,new fi)),o.zoomTo(v,fi.addSeconds(v,o._timeBarSecondsSpan*E,new fi)),o._touchState.centerX=y,o._touchState.spanX=x))}}Jv.prototype.resize=function(){let o=this.container.clientWidth,A=this.container.clientHeight;if(o===this._lastWidth&&A===this._lastHeight)return;this._trackContainer.style.height=`${A}px`;let f=1;this._trackList.forEach(function(m){f+=m.height}),this._trackListEle.style.height=`${f.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=f,this._makeTics(),this._lastXPos=void 0,this._lastWidth=o,this._lastHeight=A};var oDe=Jv,hBi=Eh(xBt(),1);function dBi(o){let A=!1,f=window.screen;return O(f)&&(O(f.lockOrientation)?A=f.lockOrientation(o):O(f.mozLockOrientation)?A=f.mozLockOrientation(o):O(f.msLockOrientation)?A=f.msLockOrientation(o):O(f.orientation&&f.orientation.lock)&&(A=f.orientation.lock(o))),A}function Qot(){let o=window.screen;O(o)&&(O(o.unlockOrientation)?o.unlockOrientation():O(o.mozUnlockOrientation)?o.mozUnlockOrientation():O(o.msUnlockOrientation)?o.msUnlockOrientation():O(o.orientation&&o.orientation.unlock)&&o.orientation.unlock())}function fBi(o,A,f,m){m()||(f()?(A.useWebVR=!1,o._locked&&(Qot(),o._locked=!1),o._noSleep.disable(),yp.exitFullscreen(),f(!1)):(yp.fullscreen||yp.requestFullscreen(o._vrElement),o._noSleep.enable(),o._locked||(o._locked=dBi("landscape")),A.useWebVR=!0,f(!0)))}function Zoe(o,A){let f=this,m=gr.observable(yp.enabled),C=gr.observable(!1);this.isVRMode=void 0,gr.defineProperty(this,"isVRMode",{get:function(){return C()}}),this.isVREnabled=void 0,gr.defineProperty(this,"isVREnabled",{get:function(){return m()},set:function(x){m(x&&yp.enabled)}}),this.tooltip=void 0,gr.defineProperty(this,"tooltip",function(){return m()?C()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});let y=gr.observable(!1);this._isOrthographic=void 0,gr.defineProperty(this,"_isOrthographic",{get:function(){return y()}}),this._eventHelper=new Mx,this._eventHelper.add(o.preRender,function(){y(o.camera.frustum instanceof Ds)}),this._locked=!1,this._noSleep=new hBi.default,this._command=Hl(function(){fBi(f,o,C,y)},gr.getObservable(this,"isVREnabled")),this._vrElement=Ae(iA(A),document.body),this._callback=function(){!yp.fullscreen&&C()&&(o.useWebVR=!1,f._locked&&(Qot(),f._locked=!1),f._noSleep.disable(),C(!1))},document.addEventListener(yp.changeEventName,this._callback)}Object.defineProperties(Zoe.prototype,{vrElement:{get:function(){return this._vrElement},set:function(o){this._vrElement=o}},command:{get:function(){return this._command}}});Zoe.prototype.isDestroyed=function(){return!1};Zoe.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(yp.changeEventName,this._callback),Qr(this)};var aDe=Zoe,gBi="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",pBi="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function $oe(o,A,f){o=iA(o);let m=new aDe(A,f);m._exitVRPath=pBi,m._enterVRPath=gBi;let C=document.createElement("button");C.type="button",C.className="cesium-button cesium-vrButton",C.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),o.appendChild(C),gr.applyBindings(m,C),this._container=o,this._viewModel=m,this._element=C}Object.defineProperties($oe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});$oe.prototype.isDestroyed=function(){return!1};$oe.prototype.destroy=function(){return this._viewModel.destroy(),gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var sDe=$oe,eF=new wi;function Sot(o){let A=o.clock;A.currentTime=o.timeJulian,A.shouldAnimate=!1}function mBi(o){let A=o.getPropertyIds(),f="";return A.forEach(function(m){let C=o.getProperty(m);O(C)&&(f+=`<tr><th>${m}</th><td>${C}</td></tr>`)}),f.length>0&&(f=`<table class="cesium-infoBox-defaultTable"><tbody>${f}</tbody></table>`),f}function CBi(o){let A,f=[],m=o.getPropertyIds();for(A=0;A<m.length;A++){let y=m[A];/^name$/i.test(y)?f[0]=o.getProperty(y):/name/i.test(y)?f[1]=o.getProperty(y):/^title$/i.test(y)?f[2]=o.getProperty(y):/^(id|identifier)$/i.test(y)?f[3]=o.getProperty(y):/element/i.test(y)?f[4]=o.getProperty(y):/(id|identifier)$/i.test(y)&&(f[5]=o.getProperty(y))}let C=f.length;for(A=0;A<C;A++){let y=f[A];if(O(y)&&y!=="")return y}return"Unnamed Feature"}function uze(o,A){let f=o.scene.pick(A.position);if(O(f)){let m=Ae(f.id,f.primitive.id);if(m instanceof UA)return m;if(f instanceof Ts)return new UA({name:CBi(f),description:mBi(f),feature:f})}if(O(o.scene.globe))return vBi(o,A.position)}var yBi=new fi;function Dot(o,A,f){if(O(f)){let m=f.clock;if(O(m)&&(m.getValue(A),O(o))){let C=m.startTime,y=m.stopTime;fi.equals(C,y)&&(y=fi.addSeconds(C,je.EPSILON2,yBi)),o.updateFromClock(),o.zoomTo(C,y)}}}var xBi=new ee;function vBi(o,A){let f=o.scene,m=f.camera.getPickRay(A),C=f.imageryLayers.pickImageryLayerFeatures(m,f);if(!O(C))return;let y=new UA({id:"Loading...",description:"Loading feature information..."});return C.then(function(x){if(o.selectedEntity!==y)return;if(!O(x)||x.length===0){o.selectedEntity=cze();return}let v=x[0],E=new UA({id:v.name,description:v.description});if(O(v.position)){let I=o.scene.globe.ellipsoid.cartographicToCartesian(v.position,xBi);E.position=new _D(I)}o.selectedEntity=E},function(){o.selectedEntity===y&&(o.selectedEntity=cze())}),y}function cze(){return new UA({id:"None",description:"No features found."})}function EBi(o,A){let f=o._geocoder,m=o._homeButton,C=o._sceneModePicker,y=o._projectionPicker,x=o._baseLayerPicker,v=o._animation,E=o._timeline,I=o._fullscreenButton,w=o._infoBox,Q=o._selectionIndicator,M=A?"hidden":"visible";if(O(f)&&(f.container.style.visibility=M),O(m)&&(m.container.style.visibility=M),O(C)&&(C.container.style.visibility=M),O(y)&&(y.container.style.visibility=M),O(x)&&(x.container.style.visibility=M),O(v)&&(v.container.style.visibility=M),O(E)&&(E.container.style.visibility=M),O(I)&&I.viewModel.isFullscreenEnabled&&(I.container.style.visibility=M),O(w)&&(w.container.style.visibility=M),O(Q)&&(Q.container.style.visibility=M),o._container){let B=A||!O(I)?0:I.container.clientWidth;o._vrButton.container.style.right=`${B}px`,o.forceResize()}}function ku(o,A){o=iA(o),A=Ae(A,Ae.EMPTY_OBJECT);let f=(!O(A.globe)||A.globe!==!1)&&(!O(A.baseLayerPicker)||A.baseLayerPicker!==!1),m=this,C=document.createElement("div");C.className="cesium-viewer",o.appendChild(C);let y=document.createElement("div");y.className="cesium-viewer-cesiumWidgetContainer",C.appendChild(y);let x=document.createElement("div");x.className="cesium-viewer-bottom",C.appendChild(x);let v=Ae(A.scene3DOnly,!1),E,I,w=!1;O(A.clockViewModel)?(I=A.clockViewModel,E=I.clock):(E=new z5,I=new LSe(E),w=!0),O(A.shouldAnimate)&&(E.shouldAnimate=A.shouldAnimate);let Q=new jJ(y,{imageryProvider:f||O(A.imageryProvider)?!1:void 0,clock:E,skyBox:A.skyBox,skyAtmosphere:A.skyAtmosphere,sceneMode:A.sceneMode,mapProjection:A.mapProjection,globe:A.globe,orderIndependentTranslucency:A.orderIndependentTranslucency,contextOptions:A.contextOptions,useDefaultRenderLoop:A.useDefaultRenderLoop,targetFrameRate:A.targetFrameRate,showRenderLoopErrors:A.showRenderLoopErrors,useBrowserRecommendedResolution:A.useBrowserRecommendedResolution,creditContainer:O(A.creditContainer)?A.creditContainer:x,creditViewport:A.creditViewport,scene3DOnly:v,shadows:A.shadows,terrainShadows:A.terrainShadows,mapMode2D:A.mapMode2D,blurActiveElementOnCanvasFocus:A.blurActiveElementOnCanvasFocus,requestRenderMode:A.requestRenderMode,maximumRenderTimeChange:A.maximumRenderTimeChange,depthPlaneEllipsoidOffset:A.depthPlaneEllipsoidOffset,msaaSamples:A.msaaSamples,shadowBackCull:A.shadowBackCull}),M=A.dataSources,B=!1;O(M)||(M=new l_e,B=!0);let T=Q.scene,D=new _J({scene:T,dataSourceCollection:M}),F=new Mx;F.add(E.onTick,ku.prototype._onTick,this),F.add(T.morphStart,ku.prototype._clearTrackedObject,this);let L;if(!O(A.selectionIndicator)||A.selectionIndicator!==!1){let K=document.createElement("div");K.className="cesium-viewer-selectionIndicatorContainer",C.appendChild(K),L=new iDe(K,T)}let R;if(!O(A.infoBox)||A.infoBox!==!1){let K=document.createElement("div");K.className="cesium-viewer-infoBoxContainer",C.appendChild(K),R=new WSe(K);let W=R.viewModel;F.add(W.cameraClicked,ku.prototype._onInfoBoxCameraClicked,this),F.add(W.closeClicked,ku.prototype._onInfoBoxClockClicked,this)}let k=document.createElement("div");k.className="cesium-viewer-toolbar",C.appendChild(k);let U;if(!O(A.geocoder)||A.geocoder!==!1){let K=document.createElement("div");K.className="cesium-viewer-geocoderContainer",k.appendChild(K);let W;O(A.geocoder)&&typeof A.geocoder!="boolean"&&(W=Array.isArray(A.geocoder)?A.geocoder:[A.geocoder]),U=new VSe({container:K,geocoderServices:W,scene:T}),F.add(U.viewModel.search.beforeExecute,ku.prototype._clearObjects,this)}let V;(!O(A.homeButton)||A.homeButton!==!1)&&(V=new KSe(k,T),O(U)&&F.add(V.viewModel.command.afterExecute,function(){let K=U.viewModel;K.searchText="",K.isSearchInProgress&&K.search()}),F.add(V.viewModel.command.beforeExecute,ku.prototype._clearTrackedObject,this));let H;!v&&(!O(A.sceneModePicker)||A.sceneModePicker!==!1)&&(H=new eDe(k,T));let q;A.projectionPicker&&(q=new ZSe(k,T));let ie,Z;if(f){let K=Ae(A.imageryProviderViewModels,Lbe()),W=Ae(A.terrainProviderViewModels,kbe());ie=new wbe(k,{globe:T.globe,imageryProviderViewModels:K,selectedImageryProviderViewModel:A.selectedImageryProviderViewModel,terrainProviderViewModels:W,selectedTerrainProviderViewModel:A.selectedTerrainProviderViewModel}),Z=k.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}O(A.imageryProvider)&&A.imageryProvider!==!1&&(f&&(ie.viewModel.selectedImagery=void 0),T.imageryLayers.removeAll(),T.imageryLayers.addImageryProvider(A.imageryProvider)),O(A.terrainProvider)&&(f&&(ie.viewModel.selectedTerrain=void 0),T.terrainProvider=A.terrainProvider);let oe;if(!O(A.navigationHelpButton)||A.navigationHelpButton!==!1){let K=!0;try{if(O(window.localStorage)){let W=window.localStorage.getItem("cesium-hasSeenNavHelp");O(W)&&Boolean(W)?K=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}oe=new qSe({container:k,instructionsInitiallyVisible:Ae(A.navigationInstructionsInitiallyVisible,K)})}let ne;if(!O(A.animation)||A.animation!==!1){let K=document.createElement("div");K.className="cesium-viewer-animationContainer",C.appendChild(K),ne=new Ibe(K,new _be(I))}let se;if(!O(A.timeline)||A.timeline!==!1){let K=document.createElement("div");K.className="cesium-viewer-timelineContainer",C.appendChild(K),se=new oDe(K,E),se.addEventListener("settime",Sot,!1),se.zoomTo(E.startTime,E.stopTime)}let ce,j,de;(!O(A.fullscreenButton)||A.fullscreenButton!==!1)&&(de=document.createElement("div"),de.className="cesium-viewer-fullscreenContainer",C.appendChild(de),ce=new NSe(de,A.fullscreenElement),j=WE(ce.viewModel,"isFullscreenEnabled",function(K){de.style.display=K?"block":"none",O(se)&&(se.container.style.right=`${de.clientWidth}px`,se.resize())}));let me,_e,Be;if(A.vrButton){let K=document.createElement("div");K.className="cesium-viewer-vrContainer",C.appendChild(K),me=new sDe(K,T,A.fullScreenElement),_e=WE(me.viewModel,"isVREnabled",function(W){K.style.display=W?"block":"none",O(ce)&&(K.style.right=`${de.clientWidth}px`),O(se)&&(se.container.style.right=`${K.clientWidth}px`,se.resize())}),Be=WE(me.viewModel,"isVRMode",function(W){EBi(m,W)})}this._baseLayerPickerDropDown=Z,this._fullscreenSubscription=j,this._vrSubscription=_e,this._vrModeSubscription=Be,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=Ae(A.automaticallyTrackDataSourceClocks,!0),this._container=o,this._bottomContainer=x,this._element=C,this._cesiumWidget=Q,this._selectionIndicator=L,this._infoBox=R,this._dataSourceCollection=M,this._destroyDataSourceCollection=B,this._dataSourceDisplay=D,this._clockViewModel=I,this._destroyClockViewModel=w,this._toolbar=k,this._homeButton=V,this._sceneModePicker=H,this._projectionPicker=q,this._baseLayerPicker=ie,this._navigationHelpButton=oe,this._animation=ne,this._timeline=se,this._fullscreenButton=ce,this._vrButton=me,this._geocoder=U,this._eventHelper=F,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=O(R)||O(L),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 br,this._trackedEntityChanged=new br,gr.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),F.add(M.dataSourceAdded,ku.prototype._onDataSourceAdded,this),F.add(M.dataSourceRemoved,ku.prototype._onDataSourceRemoved,this),F.add(T.postUpdate,ku.prototype.resize,this),F.add(T.postRender,ku.prototype._postRender,this);let Qe=M.length;for(let K=0;K<Qe;K++)this._dataSourceAdded(M,M.get(K));this._dataSourceAdded(void 0,D.defaultDataSource),F.add(M.dataSourceAdded,ku.prototype._dataSourceAdded,this),F.add(M.dataSourceRemoved,ku.prototype._dataSourceRemoved,this);function Ie(K){let W=uze(m,K);O(W)?Nt.getValueOrUndefined(W.position,m.clock.currentTime)?m.trackedEntity=W:m.zoomTo(W):O(m.trackedEntity)&&(m.trackedEntity=void 0)}function ve(K){m.selectedEntity=uze(m,K)}Q.screenSpaceEventHandler.setInputAction(ve,Ki.LEFT_CLICK),Q.screenSpaceEventHandler.setInputAction(Ie,Ki.LEFT_DOUBLE_CLICK)}Object.defineProperties(ku.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},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(o){this.scene.shadowMap.enabled=o}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(o){this.scene.globe.shadows=o}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(o){this.scene.terrainProvider=o}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(o){this._cesiumWidget.targetFrameRate=o}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(o){this._cesiumWidget.useDefaultRenderLoop=o}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(o){this._cesiumWidget.resolutionScale=o}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(o){this._cesiumWidget.useBrowserRecommendedResolution=o}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(o){this._allowDataSourcesToSuspendAnimation=o}},trackedEntity:{get:function(){return this._trackedEntity},set:function(o){if(this._trackedEntity!==o){this._trackedEntity=o,nie(this);let A=this.scene,f=A.mode;!O(o)||!O(o.position)?(this._needTrackedEntityUpdate=!1,(f===xi.COLUMBUS_VIEW||f===xi.SCENE2D)&&(A.screenSpaceCameraController.enableTranslate=!0),(f===xi.COLUMBUS_VIEW||f===xi.SCENE3D)&&(A.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(Xe.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(o),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(o){if(this._selectedEntity!==o){this._selectedEntity=o;let A=O(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;O(o)?O(A)&&A.animateAppear():O(A)&&A.animateDepart(),this._selectedEntityChanged.raiseEvent(o)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(o){this._clockTrackedDataSource!==o&&(this._clockTrackedDataSource=o,Dot(this._timeline,this.clock,o))}}});ku.prototype.extend=function(o,A){o(this,A)};ku.prototype.resize=function(){let o=this._cesiumWidget,A=this._container,f=A.clientWidth,m=A.clientHeight,C=O(this._animation),y=O(this._timeline);if(o.resize(),f===this._lastWidth&&m===this._lastHeight)return;let x=m-125,v=this._baseLayerPickerDropDown;if(O(v)&&(v.style.maxHeight=`${x}px`),O(this._geocoder)){let B=this._geocoder.searchSuggestionsContainer;B.style.maxHeight=`${x}px`}O(this._infoBox)&&(this._infoBox.viewModel.maxHeight=x);let E=this._timeline,I,w=0,Q=0,M=0;if(C&&window.getComputedStyle(this._animation.container).visibility!=="hidden"){let B=this._lastWidth;I=this._animation.container,f>900?(w=169,B<=900&&(I.style.width="169px",I.style.height="112px",this._animation.resize())):f>=600?(w=136,(B<600||B>900)&&(I.style.width="136px",I.style.height="90px",this._animation.resize())):(w=106,(B>600||B===0)&&(I.style.width="106px",I.style.height="70px",this._animation.resize())),Q=w+5}if(y&&window.getComputedStyle(this._timeline.container).visibility!=="hidden"){let B=this._fullscreenButton,T=this._vrButton,D=E.container,F=D.style;M=D.clientHeight+3,F.left=`${w}px`;let L=0;O(B)&&(L+=B.container.clientWidth),O(T)&&(L+=T.container.clientWidth),F.right=`${L}px`,E.resize()}this._bottomContainer.style.left=`${Q}px`,this._bottomContainer.style.bottom=`${M}px`,this._lastWidth=f,this._lastHeight=m};ku.prototype.forceResize=function(){this._lastWidth=0,this.resize()};ku.prototype.render=function(){this._cesiumWidget.render()};ku.prototype.isDestroyed=function(){return!1};ku.prototype.destroy=function(){let o;this.screenSpaceEventHandler.removeInputAction(Ki.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Ki.LEFT_DOUBLE_CLICK);let A=this.dataSources,f=A.length;for(o=0;o<f;o++)this._dataSourceRemoved(A,A.get(o));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),O(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),O(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),O(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),O(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),O(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),O(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),O(this._timeline)&&(this._timeline.removeEventListener("settime",Sot,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),O(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),O(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),O(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),O(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),Qr(this)};ku.prototype._dataSourceAdded=function(o,A){A.entities.collectionChanged.addEventListener(ku.prototype._onEntityCollectionChanged,this)};ku.prototype._dataSourceRemoved=function(o,A){let f=A.entities;f.collectionChanged.removeEventListener(ku.prototype._onEntityCollectionChanged,this),O(this.trackedEntity)&&f.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),O(this.selectedEntity)&&f.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};ku.prototype._onTick=function(o){let A=o.currentTime,f=this._dataSourceDisplay.update(A);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=f);let m=this._entityView;if(O(m)){let B=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(B,!1,eF)===ro.DONE&&m.update(A,eF)}let C,y=!1,x=this.selectedEntity,v=O(x)&&this._enableInfoOrSelection;v&&x.isShowing&&x.isAvailable(A)&&(this._dataSourceDisplay.getBoundingSphere(x,!0,eF)!==ro.FAILED?C=eF.center:O(x.position)&&(C=x.position.getValue(A,C)),y=O(C));let E=this.imageryLayers,I,w;for(w=0;w<E.length;w++)I=E.get(w),I&&I._availability&&(I.show=I.isAvailable(A));let Q=O(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;O(Q)&&(Q.position=ee.clone(C,Q.position),Q.showSelection=v&&y,Q.update());let M=O(this._infoBox)?this._infoBox.viewModel:void 0;O(M)&&(M.showInfo=v,M.enableCamera=y,M.isCameraTracking=this.trackedEntity===this.selectedEntity,v?(M.titleText=Ae(x.name,x.id),M.description=Nt.getValueOrDefault(x.description,A,"")):(M.titleText="",M.description=""))};ku.prototype._onEntityCollectionChanged=function(o,A,f){let m=f.length;for(let C=0;C<m;C++){let y=f[C];this.trackedEntity===y&&(this.trackedEntity=void 0),this.selectedEntity===y&&(this.selectedEntity=void 0)}};ku.prototype._onInfoBoxCameraClicked=function(o){if(o.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let A=this.selectedEntity.position;O(A)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};ku.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};ku.prototype._onInfoBoxClockClicked=function(o){this.selectedEntity=void 0};ku.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};ku.prototype._onDataSourceChanged=function(o){this.clockTrackedDataSource===o&&Dot(this.timeline,this.clock,o)};ku.prototype._onDataSourceAdded=function(o,A){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=A);let f=A.entities.id,m=this._eventHelper.add(A.changedEvent,ku.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[f]=m};ku.prototype._onDataSourceRemoved=function(o,A){let f=this.clockTrackedDataSource===A,m=A.entities.id;if(this._dataSourceChangedListeners[m](),this._dataSourceChangedListeners[m]=void 0,f){let C=o.length;this._automaticallyTrackDataSourceClocks&&C>0?this.clockTrackedDataSource=o.get(C-1):this.clockTrackedDataSource=void 0}};ku.prototype.zoomTo=function(o,A){return Tot(this,o,{offset:A},!1)};ku.prototype.flyTo=function(o,A){return Tot(this,o,A,!0)};function Tot(o,A,f,m){nie(o);let C=new Promise(y=>{o._completeZoom=function(x){y(x)}});return o._zoomPromise=C,o._zoomIsFlight=m,o._zoomOptions=f,Promise.resolve(A).then(function(y){if(o._zoomPromise===C){if(y instanceof dD){y.getViewableRectangle().then(function(x){return BJ(x,o.scene)}).then(function(x){o._zoomPromise===C&&(o._zoomTarget=x)});return}if(y instanceof Fx){o._zoomTarget=y;return}if(y instanceof Y6){o._zoomTarget=y;return}if(y.isLoading&&O(y.loadingEvent)){let x=y.loadingEvent.addEventListener(function(){x(),o._zoomPromise===C&&(o._zoomTarget=y.entities.values.slice(0))});return}if(Array.isArray(y)){o._zoomTarget=y.slice(0);return}y=Ae(y.values,y),O(y.entities)&&(y=y.entities.values),Array.isArray(y)?o._zoomTarget=y.slice(0):o._zoomTarget=[y]}}),o.scene.requestRender(),C}function sG(o){o._zoomPromise=void 0,o._zoomTarget=void 0,o._zoomOptions=void 0}function nie(o){let A=o._zoomPromise;O(A)&&(sG(o),o._completeZoom(!1))}ku.prototype._postRender=function(){IBi(this),_Bi(this)};function IBi(o){let A=o._zoomTarget;if(!O(A)||o.scene.mode===xi.MORPHING)return;let f=o.scene,m=f.camera,C=Ae(o._zoomOptions,{}),y;if(A instanceof Fx)return A.readyPromise.then(function(){let I=A.boundingSphere;O(C.offset)||(C.offset=new Ex(0,-.5,I.radius)),y={offset:C.offset,duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)}},o._zoomIsFlight?m.flyToBoundingSphere(A.boundingSphere,y):(m.viewBoundingSphere(I,C.offset),m.lookAtTransform(Xe.IDENTITY),o._completeZoom(!0)),sG(o)}).catch(()=>{nie(o)});if(A instanceof Y6)return A.readyPromise.then(function(){let I=A.boundingSphere;O(C.offset)||(C.offset=new Ex(0,-.5,I.radius)),y={offset:C.offset,duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)}},o._zoomIsFlight?m.flyToBoundingSphere(I,y):(m.viewBoundingSphere(I,C.offset),m.lookAtTransform(Xe.IDENTITY),o._completeZoom(!0)),sG(o)});if(A instanceof Kt){y={destination:f.mapProjection.ellipsoid.cartographicToCartesian(A),duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)}},o._zoomIsFlight?m.flyTo(y):(m.setView(y),o._completeZoom(!0)),sG(o);return}let x=A,v=[];for(let I=0,w=x.length;I<w;I++){let Q=o._dataSourceDisplay.getBoundingSphere(x[I],!1,eF);if(Q===ro.PENDING)return;Q!==ro.FAILED&&v.push(wi.clone(eF))}if(v.length===0){nie(o);return}o.trackedEntity=void 0;let E=wi.fromBoundingSpheres(v);o._zoomIsFlight?(sG(o),m.flyToBoundingSphere(E,{duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)},offset:C.offset})):(m.viewBoundingSphere(E,C.offset),m.lookAtTransform(Xe.IDENTITY),sG(o),o._completeZoom(!0))}function _Bi(o){if(!o._needTrackedEntityUpdate)return;let A=o._trackedEntity,f=o.clock.currentTime,m=Nt.getValueOrUndefined(A.position,f);if(!O(m))return;let C=o.scene,y=o._dataSourceDisplay.getBoundingSphere(A,!1,eF);if(y===ro.PENDING)return;let x=C.mode;(x===xi.COLUMBUS_VIEW||x===xi.SCENE2D)&&(C.screenSpaceCameraController.enableTranslate=!1),(x===xi.COLUMBUS_VIEW||x===xi.SCENE3D)&&(C.screenSpaceCameraController.enableTilt=!1);let v=y!==ro.FAILED?eF:void 0;o._entityView=new $ne(A,C,C.mapProjection.ellipsoid),o._entityView.update(f,v),o._needTrackedEntityUpdate=!1}var $J=ku;function Mot(o,A){if(!O(o)||!(o instanceof $J))throw new Ui("viewer is required.");this._camera=o.camera,this._scene=o.scene,this._globe=o.scene.globe,this._ellipsoid=o.scene.globe.ellipsoid}var Aze=new ee,D$=new ee,T$=new ee;Mot.prototype.pickSlope=function(o){if(!O(o)||!(o instanceof It))throw new Ui("windowCoordinates is required.");let A=this._camera,f=this._scene,m=this._globe,C=this._ellipsoid,y=A.getPickRay(o),x=m.pick(y,f),v=C.geodeticSurfaceNormal(x);if(x){let E=m.pickTriangle(y,f);ee.subtract(E[1],E[0],D$),ee.subtract(E[2],E[0],T$),ee.normalize(D$,D$),ee.normalize(T$,T$),ee.cross(D$,T$,Aze);let I=ee.angleBetween(v,Aze);return je.toDegrees(I)}};var Pot=Mot,BBi=[{value:0,color:"#ffffff"},{value:1,color:"#ffa500"}];function YM(o){this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this.color=Ae(o.color,At.RED),this.duration=Ae(o.duration,3e3),this.image=Ae(o.image,void 0),this.ramp=Ae(o.ramp,BBi),this._translucnet=Ae(o.translucent,!0),this._repeat=Ae(o.repeat,1),this._time=new Date().getTime()}Object.defineProperties(YM.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color")});YM.prototype.getType=function(o){return ss.PolylineTrailLinkType};YM.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this.color,o,At.WHITE,A.color),A.image=this.getColorRamp(),A.repeat=this._repeat,A.time=(new Date().getTime()-this._time)%this.duration/this.duration,A};YM.prototype.update=function(){let o=fi.now();return this.getValue(o)};YM.prototype.isTranslucent=function(){return this._translucnet};YM.prototype.getColorRamp=function(){if(O(this.image))return this.image;let o=document.createElement("canvas");o.width=100,o.height=1;let A=o.getContext("2d"),f=A.createLinearGradient(0,0,100,0),m=this;for(let C=0;C<m.ramp.length;C++){let y=m.ramp[C].value,x=m.ramp[C].color;f.addColorStop(y,x)}return A.fillStyle=f,A.fillRect(0,0,100,1),o};YM.prototype.equals=function(o){return this===o||o instanceof YM&&Nt.equals(this._color,o._color)};var Rot=YM;function cw(o){this._tileProvider=o.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};let A=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new xoe,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=Ae(o.maximumScreenSpaceError,2),this.tileCacheSize=Ae(o.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new moe({ellipsoid:A}),this._tileLoadProgressEvent=new br,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(cw.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});cw.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function wBi(o){let A=o._tileReplacementQueue;A.head=void 0,A.tail=void 0,A.count=0,Lot(o);let f=o._levelZeroTiles;if(O(f))for(let m=0;m<f.length;++m){let C=f[m].customData,y=C.length;for(let x=0;x<y;++x){let v=C[x];v.level=0,o._addHeightCallbacks.push(v)}f[m].freeResources()}o._levelZeroTiles=void 0,o._tileProvider.cancelReprojections()}cw.prototype.forEachLoadedTile=function(o){let A=this._tileReplacementQueue.head;for(;O(A);)A.state!==mC.START&&o(A),A=A.replacementNext};cw.prototype.forEachRenderedTile=function(o){let A=this._tilesToRender;for(let f=0,m=A.length;f<m;++f)o(A[f])};cw.prototype.updateHeight=function(o,A){let f=this,m={positionOnEllipsoidSurface:void 0,positionCartographic:o,level:-1,callback:A};return m.removeFunc=function(){let C=f._addHeightCallbacks,y=C.length;for(let x=0;x<y;++x)if(C[x]===m){C.splice(x,1);break}f._removeHeightCallbacks.push(m)},f._addHeightCallbacks.push(m),m.removeFunc};cw.prototype.update=function(o){O(this._tileProvider.update)&&this._tileProvider.update(o)};function Lot(o){let A=o._debug;A.maxDepth=0,A.maxDepthVisited=0,A.tilesVisited=0,A.tilesCulled=0,A.tilesRendered=0,A.tilesWaitingForChildren=0,o._tileLoadQueueHigh.length=0,o._tileLoadQueueMedium.length=0,o._tileLoadQueueLow.length=0}cw.prototype.beginFrame=function(o){!o.passes.render||(this._tilesInvalidated&&(wBi(this),this._tilesInvalidated=!1),this._tileProvider.initialize(o),Lot(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())};cw.prototype.render=function(o){let A=o.passes,f=this._tileProvider;if(A.render&&(f.beginUpdate(o),DBi(this,o),UBi(this,o),f.endUpdate(o)),A.pick&&this._tilesToRender.length>0)try{f.updateForPick(o)}catch(m){console.error(m)}};function bBi(o,A){let f=o._tileLoadQueueHigh.length+o._tileLoadQueueMedium.length+o._tileLoadQueueLow.length;(f!==o._lastTileLoadQueueLength||o._tilesInvalidated)&&(A.afterRender.push(br.prototype.raiseEvent.bind(o._tileLoadProgressEvent,f)),o._lastTileLoadQueueLength=f);let m=o._debug;m.enableDebugOutput&&!m.suspendLodUpdate&&(m.maxDepth=o._tilesToRender.reduce(function(C,y){return Math.max(C,y.level)},-1),m.tilesRendered=o._tilesToRender.length,(m.tilesVisited!==m.lastTilesVisited||m.tilesRendered!==m.lastTilesRendered||m.tilesCulled!==m.lastTilesCulled||m.maxDepth!==m.lastMaxDepth||m.tilesWaitingForChildren!==m.lastTilesWaitingForChildren||m.maxDepthVisited!==m.lastMaxDepthVisited)&&(console.log(`Visited ${m.tilesVisited}, Rendered: ${m.tilesRendered}, Culled: ${m.tilesCulled}, Max Depth Rendered: ${m.maxDepth}, Max Depth Visited: ${m.maxDepthVisited}, Waiting for children: ${m.tilesWaitingForChildren}`),m.lastTilesVisited=m.tilesVisited,m.lastTilesRendered=m.tilesRendered,m.lastTilesCulled=m.tilesCulled,m.lastMaxDepth=m.maxDepth,m.lastTilesWaitingForChildren=m.tilesWaitingForChildren,m.lastMaxDepthVisited=m.maxDepthVisited))}cw.prototype.endFrame=function(o){!o.passes.render||o.mode===xi.MORPHING||(FBi(this,o),OBi(this,o),bBi(this,o))};var i7,hze=new Kt;function QBi(o,A){let f=Si.center(o.rectangle,hze),m=f.longitude-i7.longitude,C=f.latitude-i7.latitude;f=Si.center(A.rectangle,hze);let y=f.longitude-i7.longitude,x=f.latitude-i7.latitude;return m*m+C*C-(y*y+x*x)}var SBi=new ee,Tz=[];function DBi(o,A){let f=o._debug;if(f.suspendLodUpdate)return;let m=o._tilesToRender;m.length=0;let C,y=o._tileProvider;if(!O(o._levelZeroTiles))if(y.ready){let D=y.tilingScheme;o._levelZeroTiles=Coe.createLevelZeroTiles(D);let F=o._levelZeroTiles.length;if(Tz.length<F)for(Tz=new Array(F),C=0;C<F;++C)Tz[C]===void 0&&(Tz[C]=new r7)}else return;o._occluders.ellipsoid.cameraPosition=A.camera.positionWC;let x,v=o._levelZeroTiles,E=v.length>1?o._occluders:void 0;i7=A.camera.positionCartographic,v.sort(QBi);let I=o._addHeightCallbacks,w=o._removeHeightCallbacks,Q=A.frameNumber,M;if(I.length>0||w.length>0){for(C=0,M=v.length;C<M;++C)x=v[C],x._updateCustomData(Q,I,w);I.length=0,w.length=0}let B=A.camera;o._cameraPositionCartographic=B.positionCartographic;let T=Xe.getTranslation(B.transform,SBi);for(o._cameraReferenceFrameOriginCartographic=o.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(T,o._cameraReferenceFrameOriginCartographic),C=0,M=v.length;C<M;++C)x=v[C],o._tileReplacementQueue.markTileRendered(x),x.renderable?ty(o,x,y,A,E,!1,Tz[C]):(nM(o,o._tileLoadQueueHigh,x,A),++f.tilesWaitingForChildren);o._lastSelectionFrameNumber=Q}function nM(o,A,f,m){!f.needsLoading||(o.tileProvider.computeTileLoadPriority!==void 0&&(f._loadPriority=o.tileProvider.computeTileLoadPriority(f,m)),A.push(f))}function r7(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function Fot(){this.southwest=new r7,this.southeast=new r7,this.northwest=new r7,this.northeast=new r7}Fot.prototype.combine=function(o){let A=this.southwest,f=this.southeast,m=this.northwest,C=this.northeast;o.allAreRenderable=A.allAreRenderable&&f.allAreRenderable&&m.allAreRenderable&&C.allAreRenderable,o.anyWereRenderedLastFrame=A.anyWereRenderedLastFrame||f.anyWereRenderedLastFrame||m.anyWereRenderedLastFrame||C.anyWereRenderedLastFrame,o.notYetRenderableCount=A.notYetRenderableCount+f.notYetRenderableCount+m.notYetRenderableCount+C.notYetRenderableCount};var BCe=new Array(31);for(let o=0;o<BCe.length;++o)BCe[o]=new Fot;function TBi(o,A,f,m,C){let y=o._debug;++y.tilesVisited,o._tileReplacementQueue.markTileRendered(f),f._updateCustomData(A.frameNumber),f.level>y.maxDepthVisited&&(y.maxDepthVisited=f.level);let x=RBi(o,A,f)<o.maximumScreenSpaceError,v=f.southwestChild,E=f.southeastChild,I=f.northwestChild,w=f.northeastChild,Q=o._lastSelectionFrameNumber,M=f._lastSelectionResultFrame===Q?f._lastSelectionResult:sa.NONE,B=o.tileProvider;if(x||m){let T=sa.originalResult(M)===sa.RENDERED,D=sa.originalResult(M)===sa.CULLED||M===sa.NONE,F=f.state===mC.DONE,L=T||D||F;if(L||O(B.canRenderWithoutLosingDetail)&&(L=B.canRenderWithoutLosingDetail(f)),L){x&&nM(o,o._tileLoadQueueMedium,f,A),M$(o,f),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1,f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,C.anyWereRenderedLastFrame||o._tileToUpdateHeights.push(f);return}m=!0,x&&nM(o,o._tileLoadQueueHigh,f,A)}if(B.canRefine(f)){if(v.upsampledFromParent&&E.upsampledFromParent&&I.upsampledFromParent&&w.upsampledFromParent){M$(o,f),nM(o,o._tileLoadQueueMedium,f,A),o._tileReplacementQueue.markTileRendered(v),o._tileReplacementQueue.markTileRendered(E),o._tileReplacementQueue.markTileRendered(I),o._tileReplacementQueue.markTileRendered(w),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1,f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,C.anyWereRenderedLastFrame||o._tileToUpdateHeights.push(f);return}f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.REFINED;let T=o._tilesToRender.length,D=o._tileLoadQueueLow.length,F=o._tileLoadQueueMedium.length,L=o._tileLoadQueueHigh.length,R=o._tileToUpdateHeights.length;if(MBi(o,v,E,I,w,A,m,C),T!==o._tilesToRender.length){let k=C.allAreRenderable,U=C.anyWereRenderedLastFrame,V=C.notYetRenderableCount,H=!1;if(!k&&!U){let q=o._tilesToRender;for(let Z=T;Z<q.length;++Z){let oe=q[Z];for(;oe!==void 0&&oe._lastSelectionResult!==sa.KICKED&&oe!==f;)oe._lastSelectionResult=sa.kick(oe._lastSelectionResult),oe=oe.parent}o._tilesToRender.length=T,o._tileToUpdateHeights.length=R,M$(o,f),f._lastSelectionResult=sa.RENDERED;let ie=M===sa.RENDERED;!ie&&V>o.loadingDescendantLimit&&(o._tileLoadQueueLow.length=D,o._tileLoadQueueMedium.length=F,o._tileLoadQueueHigh.length=L,nM(o,o._tileLoadQueueMedium,f,A),C.notYetRenderableCount=f.renderable?0:1,H=!0),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=ie,ie||o._tileToUpdateHeights.push(f),++y.tilesWaitingForChildren}o.preloadAncestors&&!H&&nM(o,o._tileLoadQueueLow,f,A)}return}f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,M$(o,f),nM(o,o._tileLoadQueueHigh,f,A),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1}function MBi(o,A,f,m,C,y,x,v){let E=y.camera.positionCartographic,I=o._tileProvider,w=o._occluders,Q=BCe[A.level],M=Q.southwest,B=Q.southeast,T=Q.northwest,D=Q.northeast;E.longitude<A.rectangle.east?E.latitude<A.rectangle.north?(ty(o,A,I,y,w,x,M),ty(o,f,I,y,w,x,B),ty(o,m,I,y,w,x,T),ty(o,C,I,y,w,x,D)):(ty(o,m,I,y,w,x,T),ty(o,A,I,y,w,x,M),ty(o,C,I,y,w,x,D),ty(o,f,I,y,w,x,B)):E.latitude<A.rectangle.north?(ty(o,f,I,y,w,x,B),ty(o,A,I,y,w,x,M),ty(o,C,I,y,w,x,D),ty(o,m,I,y,w,x,T)):(ty(o,C,I,y,w,x,D),ty(o,m,I,y,w,x,T),ty(o,f,I,y,w,x,B),ty(o,A,I,y,w,x,M)),Q.combine(v)}function PBi(o,A){let f=A.rectangle;return O(o._cameraPositionCartographic)&&Si.contains(f,o._cameraPositionCartographic)||O(o._cameraReferenceFrameOriginCartographic)&&Si.contains(f,o._cameraReferenceFrameOriginCartographic)}function ty(o,A,f,m,C,y,x){if(f.computeTileVisibility(A,m,C)!==vg.NONE)return TBi(o,m,A,y,x);if(++o._debug.tilesCulled,o._tileReplacementQueue.markTileRendered(A),x.allAreRenderable=!0,x.anyWereRenderedLastFrame=!1,x.notYetRenderableCount=0,PBi(o,A)){(!O(A.data)||!O(A.data.vertexArray))&&nM(o,o._tileLoadQueueMedium,A,m);let v=o._lastSelectionFrameNumber,E=A._lastSelectionResultFrame===v?A._lastSelectionResult:sa.NONE;E!==sa.CULLED_BUT_NEEDED&&E!==sa.RENDERED&&o._tileToUpdateHeights.push(A),A._lastSelectionResult=sa.CULLED_BUT_NEEDED}else(o.preloadSiblings||A.level===0)&&nM(o,o._tileLoadQueueLow,A,m),A._lastSelectionResult=sa.CULLED;A._lastSelectionResultFrame=m.frameNumber}function RBi(o,A,f){if(A.mode===xi.SCENE2D||A.camera.frustum instanceof Ds||A.camera.frustum instanceof Y0)return LBi(o,A,f);let m=o._tileProvider.getLevelMaximumGeometricError(f.level),C=f._distance,y=A.context.drawingBufferHeight,x=A.camera.frustum.sseDenominator,v=m*y/(C*x);return A.fog.enabled&&(v-=je.fog(C,A.fog.density)*A.fog.sse),v/=A.pixelRatio,v}function LBi(o,A,f){let m=A.camera.frustum;O(m._offCenterFrustum)&&(m=m._offCenterFrustum);let C=A.context,y=C.drawingBufferWidth,x=C.drawingBufferHeight,v=o._tileProvider.getLevelMaximumGeometricError(f.level),E=Math.max(m.top-m.bottom,m.right-m.left)/Math.max(y,x),I=v/E;return A.fog.enabled&&A.mode!==xi.SCENE2D&&(I-=je.fog(f._distance,A.fog.density)*A.fog.sse),I/=A.pixelRatio,I}function M$(o,A){o._tilesToRender.push(A)}function FBi(o,A){let f=o._tileLoadQueueHigh,m=o._tileLoadQueueMedium,C=o._tileLoadQueueLow;if(f.length===0&&m.length===0&&C.length===0)return;o._tileReplacementQueue.trimTiles(o.tileCacheSize);let y=GA()+o._loadQueueTimeSlice,x=o._tileProvider,v=X0e(o,A,x,y,f,!1);v=X0e(o,A,x,y,m,v),X0e(o,A,x,y,C,v)}function NBi(o,A){return o._loadPriority-A._loadPriority}function X0e(o,A,f,m,C,y){f.computeTileLoadPriority!==void 0&&C.sort(NBi);for(let x=0,v=C.length;x<v&&(GA()<m||!y);++x){let E=C[x];o._tileReplacementQueue.markTileRendered(E),f.loadTile(A,E),y=!0}return y}cw.prototype.isDestroyed=function(){return!1};cw.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var zU=new ls,Z0e=new Kt,IL=new ee,kBi=[];function OBi(o,A){if(!o.tileProvider.ready)return;let f=kBi;f.length=0;let m=o._tileToUpdateHeights,C=GA(),y=o._updateHeightsTimeSlice,x=C+y,v=A.mode,E=A.mapProjection,I=o.tileProvider.tilingScheme.ellipsoid,w;for(;m.length>0;){let Q=m[0];if(!O(Q.data)||!O(Q.data.mesh)){let D=Q._lastSelectionResultFrame===o._lastSelectionFrameNumber?Q._lastSelectionResult:sa.NONE;(D===sa.RENDERED||D===sa.CULLED_BUT_NEEDED)&&f.push(Q),m.shift(),o._lastTileIndex=0;continue}let M=Q.customData,B=M.length,T=!1;for(w=o._lastTileIndex;w<B;++w){let D=M[w],F=Q.data.terrainData,L=O(F)&&F.wasCreatedByUpsampling();if(Q.level>D.level&&!L){if(O(D.positionOnEllipsoidSurface)||(D.positionOnEllipsoidSurface=ee.fromRadians(D.positionCartographic.longitude,D.positionCartographic.latitude,0,I)),v===xi.SCENE3D){let k=I.geodeticSurfaceNormal(D.positionOnEllipsoidSurface,zU.direction),U=I.getSurfaceNormalIntersectionWithZAxis(D.positionOnEllipsoidSurface,11500,zU.origin);if(!O(U)){let V;O(Q.data.tileBoundingRegion)&&(V=Q.data.tileBoundingRegion.minimumHeight);let H=Math.min(Ae(V,0),-11500),q=ee.multiplyByScalar(k,Math.abs(H)+1,IL);ee.subtract(D.positionOnEllipsoidSurface,q,zU.origin)}}else Kt.clone(D.positionCartographic,Z0e),Z0e.height=-11500,E.project(Z0e,IL),ee.fromElements(IL.z,IL.x,IL.y,IL),ee.clone(IL,zU.origin),ee.clone(ee.UNIT_X,zU.direction);let R=Q.data.pick(zU,v,E,!1,IL);O(R)&&(D.callback(R),D.level=Q.level)}if(GA()>=x){T=!0;break}}if(T){o._lastTileIndex=w;break}else o._lastTileIndex=0,m.shift()}for(w=0;w<f.length;w++)m.push(f[w])}function UBi(o,A){let f=o._tileProvider,m=o._tilesToRender;for(let C=0,y=m.length;C<y;++C){let x=m[C];f.showTileThisFrame(x,A)}}var Not=cw;/*! rasterizeHTML.js - v1.3.0 - 2018-03-18
${T}`);let D=document.createElement("div");D.className="map-widget-errorPanel-message-details collapsed";let F=document.createElement("span");F.className="map-widget-errorPanel-more-details",F.appendChild(document.createTextNode("See more...")),D.appendChild(F),D.onclick=function(L){D.removeChild(F),D.appendChild(document.createTextNode(T)),D.className="map-widget-errorPanel-message-details",y.className="map-widget-errorPanel-content expanded",D.onclick=void 0},v.appendChild(D)}B.innerHTML=`<p>${A}</p>`}let Q=document.createElement("div");Q.className="map-widget-errorPanel-buttonPanel",y.appendChild(Q);let M=document.createElement("button");M.setAttribute("type","button"),M.className="map-button",M.appendChild(document.createTextNode("OK")),M.onclick=function(){O(E)&&O(window.removeEventListener)&&window.removeEventListener("resize",E,!1),m.removeChild(C)},Q.appendChild(M),m.appendChild(C)};EO.prototype.isDestroyed=function(){return!1};EO.prototype.destroy=function(){O(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),Qr(this)};EO.prototype.resize=function(){let o=this._canvas;!this._forceResize&&this._canvasClientWidth===o.clientWidth&&this._canvasClientHeight===o.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,yot(this),xot(this),this._scene.requestRender())};EO.prototype.render=function(){if(this._scene._frameState||console.log("\u6388\u6743\u9A8C\u8BC1\u9519\u8BEF\uFF01"),this._canRender){this._scene.initializeFrame();let o=this._clock.tick();this._scene.render(o)}else this._clock.tick()};var jJ=EO;function qJ(o){O(o)||(o=new z5),this._clock=o,this._eventHelper=new Mx,this._eventHelper.add(o.onTick,this.synchronize,this),this.systemTime=gr.observable(fi.now()),this.systemTime.equalityComparer=fi.equals,this.startTime=gr.observable(o.startTime),this.startTime.equalityComparer=fi.equals,this.startTime.subscribe(function(A){o.startTime=A,this.synchronize()},this),this.stopTime=gr.observable(o.stopTime),this.stopTime.equalityComparer=fi.equals,this.stopTime.subscribe(function(A){o.stopTime=A,this.synchronize()},this),this.currentTime=gr.observable(o.currentTime),this.currentTime.equalityComparer=fi.equals,this.currentTime.subscribe(function(A){o.currentTime=A,this.synchronize()},this),this.multiplier=gr.observable(o.multiplier),this.multiplier.subscribe(function(A){o.multiplier=A,this.synchronize()},this),this.clockStep=gr.observable(o.clockStep),this.clockStep.subscribe(function(A){o.clockStep=A,this.synchronize()},this),this.clockRange=gr.observable(o.clockRange),this.clockRange.subscribe(function(A){o.clockRange=A,this.synchronize()},this),this.canAnimate=gr.observable(o.canAnimate),this.canAnimate.subscribe(function(A){o.canAnimate=A,this.synchronize()},this),this.shouldAnimate=gr.observable(o.shouldAnimate),this.shouldAnimate.subscribe(function(A){o.shouldAnimate=A,this.synchronize()},this),gr.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(qJ.prototype,{clock:{get:function(){return this._clock}}});qJ.prototype.synchronize=function(){let o=this._clock;this.systemTime=fi.now(),this.startTime=o.startTime,this.stopTime=o.stopTime,this.currentTime=o.currentTime,this.multiplier=o.multiplier,this.clockStep=o.clockStep,this.clockRange=o.clockRange,this.canAnimate=o.canAnimate,this.shouldAnimate=o.shouldAnimate};qJ.prototype.isDestroyed=function(){return!1};qJ.prototype.destroy=function(){this._eventHelper.removeAll(),Qr(this)};var LSe=qJ;function Goe(o,A){O(A)||(A=document.body),A=iA(A);let f=this,m=gr.observable(yp.fullscreen),C=gr.observable(yp.enabled),y=A.ownerDocument;this.isFullscreen=void 0,gr.defineProperty(this,"isFullscreen",{get:function(){return m()}}),this.isFullscreenEnabled=void 0,gr.defineProperty(this,"isFullscreenEnabled",{get:function(){return C()},set:function(x){C(x&&yp.enabled)}}),this.tooltip=void 0,gr.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?m()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=Hl(function(){yp.fullscreen?yp.exitFullscreen():yp.requestFullscreen(f._fullscreenElement)},gr.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=Ae(iA(o),y.body),this._callback=function(){m(yp.fullscreen)},y.addEventListener(yp.changeEventName,this._callback)}Object.defineProperties(Goe.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(o){this._fullscreenElement=o}},command:{get:function(){return this._command}}});Goe.prototype.isDestroyed=function(){return!1};Goe.prototype.destroy=function(){document.removeEventListener(yp.changeEventName,this._callback),Qr(this)};var FSe=Goe,O_i="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",U_i="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function Hoe(o,A){o=iA(o);let f=new FSe(A,o);f._exitFullScreenPath=U_i,f._enterFullScreenPath=O_i;let m=document.createElement("button");m.type="button",m.className="cesium-button cesium-fullscreenButton",m.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),o.appendChild(m),gr.applyBindings(f,m),this._container=o,this._viewModel=f,this._element=m}Object.defineProperties(Hoe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Hoe.prototype.isDestroyed=function(){return!1};Hoe.prototype.destroy=function(){return this._viewModel.destroy(),gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var NSe=Hoe;function vot(){}vot.prototype.geocode=function(o){let A=o.match(/[^\s,\n]+/g);if(A.length===2||A.length===3){let f=+A[0],m=+A[1],C=A.length===3?+A[2]:300;if(isNaN(f)&&isNaN(m)){let y=/^(\d+.?\d*)([nsew])/i;for(let x=0;x<A.length;++x){let v=A[x].match(y);y.test(A[x])&&v.length===3&&(/^[ns]/i.test(v[2])?m=/^[n]/i.test(v[2])?+v[1]:-v[1]:/^[ew]/i.test(v[2])&&(f=/^[e]/i.test(v[2])?+v[1]:-v[1]))}}if(!isNaN(f)&&!isNaN(m)&&!isNaN(C)){let y={displayName:o,destination:ee.fromDegrees(f,m,C)};return Promise.resolve([y])}}return Promise.resolve([])};var kSe=vot,G_i={SEARCH:0,AUTOCOMPLETE:1},XJ=Object.freeze(G_i);function OSe(o){this._url=An.createIfNeeded(o),this._url.appendForwardSlash()}Object.defineProperties(OSe.prototype,{url:{get:function(){return this._url}}});OSe.prototype.geocode=function(o,A){return this._url.getDerivedResource({url:A===XJ.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:o}}).fetchJson().then(function(f){return f.features.map(function(m){let C,y=m.bbox;if(O(y))C=Si.fromDegrees(y[0],y[1],y[2],y[3]);else{let x=m.geometry.coordinates[0],v=m.geometry.coordinates[1];C=ee.fromDegrees(x,v)}return{displayName:m.properties.label,destination:C}})})};var USe=OSe;function Eot(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=Ae(o.accessToken,yF.defaultAccessToken),f=An.createIfNeeded(Ae(o.server,yF.defaultServer));f.appendForwardSlash();let m=yF.getDefaultTokenCredit(A);O(m)&&o.scene.frameState.creditDisplay.addDefaultCredit(tl.clone(m));let C=f.getDerivedResource({url:"v1/geocode"});O(A)&&C.appendQueryParameters({access_token:A}),this._accessToken=A,this._server=f,this._pelias=new USe(C)}Eot.prototype.geocode=function(o,A){return this._pelias.geocode(o,A)};var GSe=Eot,aze=1e3;function KD(o){O(o.geocoderServices)?this._geocoderServices=o.geocoderServices:this._geocoderServices=[new kSe,new GSe({scene:o.scene})],this._viewContainer=o.container,this._scene=o.scene,this._flightDuration=o.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodePromise=void 0,this._complete=new br,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=lze,this._handleArrowUp=sze;let A=this;this._suggestionsVisible=gr.pureComputed(function(){let m=gr.getObservable(A,"_suggestions")().length>0,C=gr.getObservable(A,"_showSuggestions")();return m&&C}),this._searchCommand=Hl(function(m){if(m=Ae(m,XJ.SEARCH),A._focusTextbox=!1,O(A._selectedSuggestion))return A.activateSuggestion(A._selectedSuggestion),!1;A.hideSuggestions(),A.isSearchInProgress?J_i(A):K_i(A,A._geocoderServices,m)}),this.deselectSuggestion=function(){A._selectedSuggestion=void 0},this.handleKeyDown=function(m,C){let y=C.key==="ArrowDown"||C.key==="Down"||C.keyCode===40,x=C.key==="ArrowUp"||C.key==="Up"||C.keyCode===38;return(y||x)&&C.preventDefault(),!0},this.handleKeyUp=function(m,C){let y=C.key==="ArrowDown"||C.key==="Down"||C.keyCode===40,x=C.key==="ArrowUp"||C.key==="Up"||C.keyCode===38,v=C.key==="Enter"||C.keyCode===13;return x?sze(A):y?lze(A):v&&A._searchCommand(),!0},this.activateSuggestion=function(m){A.hideSuggestions(),A._searchText=m.displayName;let C=m.destination;_ot(A),A.destinationFound(A,C)},this.hideSuggestions=function(){A._showSuggestions=!1,A._selectedSuggestion=void 0},this.showSuggestions=function(){A._showSuggestions=!0},this.handleMouseover=function(m,C){m!==A._selectedSuggestion&&(A._selectedSuggestion=m)},this.keepExpanded=!1,this.autoComplete=Ae(o.autocomplete,!0),this.destinationFound=Ae(o.destinationFound,KD.flyToDestination),this._focusTextbox=!1,gr.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);let f=gr.getObservable(this,"_searchText");f.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=f.subscribe(function(){KD._updateSearchSuggestions(A)}),this.isSearchInProgress=void 0,gr.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,gr.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(m){this._searchText=m}}),this.flightDuration=void 0,gr.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(m){this._flightDuration=m}})}Object.defineProperties(KD.prototype,{complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},selectedSuggestion:{get:function(){return this._selectedSuggestion}},suggestions:{get:function(){return this._suggestions}}});KD.prototype.destroy=function(){this._suggestionSubscription.dispose()};function sze(o){if(o._suggestions.length===0)return;let A=o._suggestions.indexOf(o._selectedSuggestion);if(A===-1||A===0){o._selectedSuggestion=void 0;return}let f=A-1;o._selectedSuggestion=o._suggestions[f],KD._adjustSuggestionsScroll(o,f)}function lze(o){if(o._suggestions.length===0)return;let A=o._suggestions.length,f=(o._suggestions.indexOf(o._selectedSuggestion)+1)%A;o._selectedSuggestion=o._suggestions[f],KD._adjustSuggestionsScroll(o,f)}function H_i(o,A){let f=O(A)?A.availability:void 0;return O(f)?vQ(A,[o]).then(function(m){return o=m[0],o.height+=aze,o}):(o.height+=aze,Promise.resolve(o))}function V_i(o,A){let f=o._scene,m=f.mapProjection.ellipsoid,C=f.camera,y=f.terrainProvider,x=A,v;return A instanceof Si?je.equalsEpsilon(A.south,A.north,je.EPSILON7)&&je.equalsEpsilon(A.east,A.west,je.EPSILON7)?A=Si.center(A):v=BJ(A,f):A=m.cartesianToCartographic(A),O(v)||(v=H_i(A,y)),v.then(function(E){x=m.cartographicToCartesian(E)}).finally(function(){C.flyTo({destination:x,complete:function(){o._complete.raiseEvent()},duration:o._flightDuration,endTransform:Xe.IDENTITY})})}function z_i(o,A,f,m){return o.then(function(C){return O(C)&&C.state==="fulfilled"&&C.value.length>0?C:A.geocode(f,m).then(function(y){return{state:"fulfilled",value:y}}).catch(function(y){return{state:"rejected",reason:y}})})}function K_i(o,A,f){let m=o._searchText;if(Iot(m)){o.showSuggestions();return}o._isSearchInProgress=!0;let C=Promise.resolve();for(let y=0;y<A.length;y++)C=z_i(C,A[y],m,f);o._geocodePromise=C,C.then(function(y){if(C.cancel)return;o._isSearchInProgress=!1;let x=y.value;if(y.state==="fulfilled"&&O(x)&&x.length>0){o._searchText=x[0].displayName,o.destinationFound(o,x[0].destination);return}o._searchText=`${m} (not found)`})}function Y_i(o,A){let f=iA(o._viewContainer),m=f.getElementsByClassName("search-results")[0],C=f.getElementsByTagName("li")[A];if(A===0){m.scrollTop=0;return}let y=C.offsetTop;y+C.clientHeight>m.clientHeight?m.scrollTop=y+C.clientHeight:y<m.scrollTop&&(m.scrollTop=y)}function J_i(o){o._isSearchInProgress=!1,O(o._geocodePromise)&&(o._geocodePromise.cancel=!0,o._geocodePromise=void 0)}function Iot(o){return/^\s*$/.test(o)}function _ot(o){gr.getObservable(o,"_suggestions").removeAll()}function W_i(o){if(!o.autoComplete)return;let A=o._searchText;if(_ot(o),Iot(A))return;let f=Promise.resolve([]);return o._geocoderServices.forEach(function(m){f=f.then(function(C){return C.length>=5?C:m.geocode(A,XJ.AUTOCOMPLETE).then(function(y){return C=C.concat(y),C})})}),f.then(function(m){let C=o._suggestions;for(let y=0;y<m.length;y++)C.push(m[y])})}KD.flyToDestination=V_i;KD._updateSearchSuggestions=W_i;KD._adjustSuggestionsScroll=Y_i;var HSe=KD,j_i="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",q_i="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function Voe(o){let A=iA(o.container),f=new HSe(o);f._startSearchPath=j_i,f._stopSearchPath=q_i;let m=document.createElement("form");m.setAttribute("data-bind","submit: search");let C=document.createElement("input");C.type="search",C.className="cesium-geocoder-input",C.setAttribute("placeholder","Enter an address or landmark..."),C.setAttribute("data-bind",'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout(function(){C.select()},0)},C.addEventListener("focus",this._onTextBoxFocus,!1),m.appendChild(C),this._textBox=C;let y=document.createElement("span");y.className="cesium-geocoder-searchButton",y.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),m.appendChild(y),A.appendChild(m);let x=document.createElement("div");x.className="search-results",x.setAttribute("data-bind","visible: _suggestionsVisible");let v=document.createElement("ul");v.setAttribute("data-bind","foreach: _suggestions");let E=document.createElement("li");v.appendChild(E),E.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),x.appendChild(v),A.appendChild(x),gr.applyBindings(f,m),gr.applyBindings(f,x),this._container=A,this._searchSuggestionsContainer=x,this._viewModel=f,this._form=m,this._onInputBegin=function(I){let w=I.target;typeof I.composedPath=="function"&&(w=I.composedPath()[0]),A.contains(w)||(f._focusTextbox=!1,f.hideSuggestions())},this._onInputEnd=function(I){f._focusTextbox=!0,f.showSuggestions()},Mo.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),A.addEventListener("pointerup",this._onInputEnd,!0),A.addEventListener("pointercancel",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),A.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),A.addEventListener("touchend",this._onInputEnd,!0),A.addEventListener("touchcancel",this._onInputEnd,!0))}Object.defineProperties(Voe.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}});Voe.prototype.isDestroyed=function(){return!1};Voe.prototype.destroy=function(){let o=this._container;return Mo.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),o.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),o.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),o.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),gr.cleanNode(this._form),gr.cleanNode(this._searchSuggestionsContainer),o.removeChild(this._form),o.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),Qr(this)};var VSe=Voe;function Bot(o,A){this._scene=o,this._duration=A;let f=this;this._command=Hl(function(){f._scene.camera.flyHome(f._duration)}),this.tooltip="View Home",gr.track(this,["tooltip"])}Object.defineProperties(Bot.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(o){this._duration=o}}});var zSe=Bot;function zoe(o,A,f){o=iA(o);let m=new zSe(A,f);m._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";let C=document.createElement("button");C.type="button",C.className="cesium-button cesium-toolbar-button cesium-home-button",C.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),o.appendChild(C),gr.applyBindings(m,C),this._container=o,this._viewModel=m,this._element=C}Object.defineProperties(zoe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});zoe.prototype.isDestroyed=function(){return!1};zoe.prototype.destroy=function(){return gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var KSe=zoe,X_i="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",Z_i="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function YSe(){this._cameraClicked=new br,this._closeClicked=new br,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",gr.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,gr.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?Z_i:X_i}}),gr.defineProperty(this,"_bodyless",{get:function(){return!O(this.description)||this.description.length===0}})}YSe.prototype.maxHeightOffset=function(o){return`${this.maxHeight-o}px`};Object.defineProperties(YSe.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var JSe=YSe;function Koe(o){o=iA(o);let A=document.createElement("div");A.className="cesium-infoBox",A.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),o.appendChild(A);let f=document.createElement("div");f.className="cesium-infoBox-title",f.setAttribute("data-bind","text: titleText"),A.appendChild(f);let m=document.createElement("button");m.type="button",m.className="cesium-button cesium-infoBox-camera",m.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),A.appendChild(m);let C=document.createElement("button");C.type="button",C.className="cesium-infoBox-close",C.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),C.innerHTML="&times;",A.appendChild(C);let y=document.createElement("iframe");y.className="cesium-infoBox-iframe",y.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),y.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),y.setAttribute("allowfullscreen",!0),A.appendChild(y);let x=new JSe;gr.applyBindings(x,A),this._container=o,this._element=A,this._frame=y,this._viewModel=x,this._descriptionSubscription=void 0;let v=this;y.addEventListener("load",function(){let E=y.contentDocument,I=E.createElement("link");I.href=xs("Widgets/InfoBox/InfoBoxDescription.css"),I.rel="stylesheet",I.type="text/css";let w=E.createElement("div");w.className="cesium-infoBox-description",E.head.appendChild(I),E.body.appendChild(w),v._descriptionSubscription=WE(x,"description",function(Q){y.style.height="5px",w.innerHTML=Q;let M=null,B=w.firstElementChild;if(B!==null&&w.childNodes.length===1){let D=window.getComputedStyle(B);if(D!==null){let F=D["background-color"],L=At.fromCssColorString(F);O(L)&&L.alpha!==0&&(M=D["background-color"])}}A.style["background-color"]=M;let T=w.getBoundingClientRect().height;y.style.height=`${T}px`})}),y.setAttribute("src","about:blank")}Object.defineProperties(Koe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}});Koe.prototype.isDestroyed=function(){return!1};Koe.prototype.destroy=function(){let o=this._container;return gr.cleanNode(this._element),o.removeChild(this._element),O(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),Qr(this)};var WSe=Koe;function wot(){this.showInstructions=!1;let o=this;this._command=Hl(function(){o.showInstructions=!o.showInstructions}),this._showClick=Hl(function(){o._touch=!1}),this._showTouch=Hl(function(){o._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",gr.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(wot.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var jSe=wot;function Yoe(o){let A=iA(o.container),f=new jSe,m=Ae(o.instructionsInitiallyVisible,!1);f.showInstructions=m,f._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";let C=document.createElement("span");C.className="cesium-navigationHelpButton-wrapper",A.appendChild(C);let y=document.createElement("button");y.type="button",y.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",y.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),C.appendChild(y);let x=document.createElement("div");x.className="cesium-navigation-help",x.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),C.appendChild(x);let v=document.createElement("button");v.type="button",v.className="cesium-navigation-button cesium-navigation-button-left",v.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');let E=document.createElement("img");E.src=xs("Widgets/Images/NavigationHelp/Mouse.svg"),E.className="cesium-navigation-button-icon",E.style.width="25px",E.style.height="25px",v.appendChild(E),v.appendChild(document.createTextNode("Mouse"));let I=document.createElement("button");I.type="button",I.className="cesium-navigation-button cesium-navigation-button-right",I.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');let w=document.createElement("img");w.src=xs("Widgets/Images/NavigationHelp/Touch.svg"),w.className="cesium-navigation-button-icon",w.style.width="25px",w.style.height="25px",I.appendChild(w),I.appendChild(document.createTextNode("Touch")),x.appendChild(v),x.appendChild(I);let Q=document.createElement("div");Q.className="cesium-click-navigation-help cesium-navigation-help-instructions",Q.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),Q.innerHTML=`            <table>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/MouseLeft.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-pan">Pan view</div>                        <div class="cesium-navigation-help-details">Left click + drag</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/MouseRight.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-zoom">Zoom view</div>                        <div class="cesium-navigation-help-details">Right click + drag, or</div>                        <div class="cesium-navigation-help-details">Mouse wheel scroll</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/MouseMiddle.svg")}" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-rotate">Rotate view</div>                        <div class="cesium-navigation-help-details">Middle click + drag, or</div>                        <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div>                    </td>                </tr>            </table>`,x.appendChild(Q);let M=document.createElement("div");M.className="cesium-touch-navigation-help cesium-navigation-help-instructions",M.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),M.innerHTML=`            <table>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchDrag.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-pan">Pan view</div>                        <div class="cesium-navigation-help-details">One finger drag</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchZoom.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-zoom">Zoom view</div>                        <div class="cesium-navigation-help-details">Two finger pinch</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchTilt.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-rotate">Tilt view</div>                        <div class="cesium-navigation-help-details">Two finger drag, same direction</div>                    </td>                </tr>                <tr>                    <td><img src="${xs("Widgets/Images/NavigationHelp/TouchRotate.svg")}" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-tilt">Rotate view</div>                        <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div>                    </td>                </tr>            </table>`,x.appendChild(M),gr.applyBindings(f,C),this._container=A,this._viewModel=f,this._wrapper=C,this._closeInstructions=function(B){C.contains(B.target)||(f.showInstructions=!1)},Mo.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(Yoe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Yoe.prototype.isDestroyed=function(){return!1};Yoe.prototype.destroy=function(){return Mo.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),gr.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Qr(this)};var qSe=Yoe;function Joe(o){this._scene=o,this._orthographic=o.camera.frustum instanceof Ds,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=o.mode,gr.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);let A=this;gr.defineProperty(this,"selectedTooltip",function(){return A._orthographic?A.tooltipOrthographic:A.tooltipPerspective}),this._toggleDropDown=Hl(function(){A.sceneMode===xi.SCENE2D||A._flightInProgress||(A.dropDownVisible=!A.dropDownVisible)}),this._eventHelper=new Mx,this._eventHelper.add(o.morphComplete,function(f,m,C,y){A.sceneMode=C,A._orthographic=C===xi.SCENE2D||A._scene.camera.frustum instanceof Ds}),this._eventHelper.add(o.preRender,function(){A._flightInProgress=O(o.camera._currentFlight)}),this._switchToPerspective=Hl(function(){A.sceneMode!==xi.SCENE2D&&(A._scene.camera.switchToPerspectiveFrustum(),A._orthographic=!1,A.dropDownVisible=!1)}),this._switchToOrthographic=Hl(function(){A.sceneMode!==xi.SCENE2D&&(A._scene.camera.switchToOrthographicFrustum(),A._orthographic=!0,A.dropDownVisible=!1)}),this._sceneMode=xi}Object.defineProperties(Joe.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}});Joe.prototype.isDestroyed=function(){return!1};Joe.prototype.destroy=function(){this._eventHelper.removeAll(),Qr(this)};var XSe=Joe,$_i="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",eBi="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function Woe(o,A){o=iA(o);let f=new XSe(A);f._perspectivePath=$_i,f._orthographicPath=eBi;let m=document.createElement("span");m.className="cesium-projectionPicker-wrapper cesium-toolbar-button",o.appendChild(m);let C=document.createElement("button");C.type="button",C.className="cesium-button cesium-toolbar-button",C.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic,       "cesium-projectionPicker-buttonOrthographic": _orthographic,       "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress,        "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),C.innerHTML='<!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --><!-- /ko -->',m.appendChild(C);let y=document.createElement("button");y.type="button",y.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",y.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic),       "cesium-projectionPicker-none" : !_orthographic,       "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),m.appendChild(y);let x=document.createElement("button");x.type="button",x.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",x.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic),       "cesium-projectionPicker-none" : _orthographic,       "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),m.appendChild(x),gr.applyBindings(f,m),this._viewModel=f,this._container=o,this._wrapper=m,this._closeDropDown=function(v){m.contains(v.target)||(f.dropDownVisible=!1)},Mo.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(Woe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Woe.prototype.isDestroyed=function(){return!1};Woe.prototype.destroy=function(){return this._viewModel.destroy(),Mo.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),gr.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Qr(this)};var ZSe=Woe;function joe(o,A){this._scene=o;let f=this,m=function(C,y,x,v){f.sceneMode=x,f.dropDownVisible=!1};this._eventHelper=new Mx,this._eventHelper.add(o.morphStart,m),this._duration=Ae(A,2),this.sceneMode=o.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",gr.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,gr.defineProperty(this,"selectedTooltip",function(){let C=f.sceneMode;return C===xi.SCENE2D?f.tooltip2D:C===xi.SCENE3D?f.tooltip3D:f.tooltipColumbusView}),this._toggleDropDown=Hl(function(){f.dropDownVisible=!f.dropDownVisible}),this._morphTo2D=Hl(function(){o.morphTo2D(f._duration)}),this._morphTo3D=Hl(function(){o.morphTo3D(f._duration)}),this._morphToColumbusView=Hl(function(){o.morphToColumbusView(f._duration)}),this._sceneMode=xi}Object.defineProperties(joe.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(o){this._duration=o}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}});joe.prototype.isDestroyed=function(){return!1};joe.prototype.destroy=function(){this._eventHelper.removeAll(),Qr(this)};var $Se=joe,tBi="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878         -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132         -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285         11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z         M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201         5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461         -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",iBi="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",rBi="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function qoe(o,A,f){o=iA(o);let m=new $Se(A,f);m._globePath=tBi,m._flatMapPath=iBi,m._columbusViewPath=rBi;let C=document.createElement("span");C.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",o.appendChild(C);let y=document.createElement("button");y.type="button",y.className="cesium-button cesium-toolbar-button",y.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D,       "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D,       "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW,       "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),y.innerHTML='<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->',C.appendChild(y);let x=document.createElement("button");x.type="button",x.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",x.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D,       "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),C.appendChild(x);let v=document.createElement("button");v.type="button",v.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",v.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D,       "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),C.appendChild(v);let E=document.createElement("button");E.type="button",E.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",E.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW,       "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),C.appendChild(E),gr.applyBindings(m,C),this._viewModel=m,this._container=o,this._wrapper=C,this._closeDropDown=function(I){C.contains(I.target)||(m.dropDownVisible=!1)},Mo.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(qoe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});qoe.prototype.isDestroyed=function(){return!1};qoe.prototype.destroy=function(){return this._viewModel.destroy(),Mo.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),gr.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Qr(this)};var eDe=qoe,nBi=new It,rie="-1000px";function ZJ(o,A,f){this._scene=o,this._screenPositionX=rie,this._screenPositionY=rie,this._tweens=o.tweens,this._container=Ae(f,document.body),this._selectionIndicatorElement=A,this._scale=1,this.position=void 0,this.showSelection=!1,gr.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,gr.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&O(this.position)}}),gr.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(m,C){return Ss.wgs84ToWindowCoordinates(o,m,C)}}ZJ.prototype.update=function(){if(this.showSelection&&O(this.position)){let o=this.computeScreenSpacePosition(this.position,nBi);if(!O(o))this._screenPositionX=rie,this._screenPositionY=rie;else{let A=this._container,f=A.parentNode.clientWidth,m=A.parentNode.clientHeight,C=this._selectionIndicatorElement.clientWidth,y=C*.5;o.x=Math.min(Math.max(o.x,-C),f+C)-y,o.y=Math.min(Math.max(o.y,-C),m+C)-y,this._screenPositionX=`${Math.floor(o.x+.25)}px`,this._screenPositionY=`${Math.floor(o.y+.25)}px`}}};ZJ.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:Ix.EXPONENTIAL_OUT})};ZJ.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:Ix.EXPONENTIAL_OUT})};Object.defineProperties(ZJ.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var tDe=ZJ;function Xoe(o,A){o=iA(o),this._container=o;let f=document.createElement("div");f.className="cesium-selection-wrapper",f.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),o.appendChild(f),this._element=f;let m="http://www.w3.org/2000/svg",C="M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z",y=document.createElementNS(m,"svg:svg");y.setAttribute("width",160),y.setAttribute("height",160),y.setAttribute("viewBox","0 0 160 160");let x=document.createElementNS(m,"g");x.setAttribute("transform","translate(80,80)"),y.appendChild(x);let v=document.createElementNS(m,"path");v.setAttribute("data-bind","attr: { transform: _transform }"),v.setAttribute("d",C),x.appendChild(v),f.appendChild(y);let E=new tDe(A,this._element,this._container);this._viewModel=E,gr.applyBindings(this._viewModel,this._element)}Object.defineProperties(Xoe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Xoe.prototype.isDestroyed=function(){return!1};Xoe.prototype.destroy=function(){let o=this._container;return gr.cleanNode(this._element),o.removeChild(this._element),Qr(this)};var iDe=Xoe;function IO(o,A,f){this._color=o,this._height=A,this._base=Ae(f,0)}IO.prototype.getHeight=function(){return this._height};IO.prototype.getBase=function(){return this._base};IO.prototype.getStartTime=function(){return this._start};IO.prototype.getStopTime=function(){return this._stop};IO.prototype.setRange=function(o,A){this._start=o,this._stop=A};IO.prototype.render=function(o){let A="";if(this._start&&this._stop&&this._color){let f=fi.secondsDifference(this._start,o.epochJulian),m=Math.round(o.timeBarWidth*o.getAlpha(f)),C=fi.secondsDifference(this._stop,o.epochJulian),y=Math.round(o.timeBarWidth*o.getAlpha(C))-m;m<0&&(y+=m,m=0),m+y>o.timeBarWidth&&(y=o.timeBarWidth-m),y>0&&(A=`<span class="cesium-timeline-highlight" style="left: ${m.toString()}px; width: ${y.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return A};var rDe=IO;function bot(o,A,f,m){this.interval=o,this.height=A,this.color=f||new At(.5,.5,.5,1),this.backgroundColor=m||new At(0,0,0,0)}bot.prototype.render=function(o,A){let f=this.interval.start,m=this.interval.stop,C=A.startJulian,y=fi.addSeconds(A.startJulian,A.duration,new fi);if(fi.lessThan(f,C)&&fi.greaterThan(m,y))o.fillStyle=this.color.toCssColorString(),o.fillRect(0,A.y,A.timeBarWidth,this.height);else if(fi.lessThanOrEquals(f,y)&&fi.greaterThanOrEquals(m,C)){let x,v,E;for(x=0;x<A.timeBarWidth;++x){let I=fi.addSeconds(A.startJulian,x/A.timeBarWidth*A.duration,new fi);!O(v)&&fi.greaterThanOrEquals(I,f)?v=x:!O(E)&&fi.greaterThanOrEquals(I,m)&&(E=x)}o.fillStyle=this.backgroundColor.toCssColorString(),o.fillRect(0,A.y,A.timeBarWidth,this.height),O(v)&&(O(E)||(E=A.timeBarWidth),o.fillStyle=this.color.toCssColorString(),o.fillRect(v,A.y,Math.max(E-v,1),this.height))}};var nDe=bot,q0e=1e12,F1={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},_v={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},EL=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6];function Jv(o,A){o=iA(o);let f=o.ownerDocument;this.container=o;let m=f.createElement("div");m.className="cesium-timeline-main",o.appendChild(m),this._topDiv=m,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=A,this._scrubJulian=A.currentTime,this._mainTicSpan=-1,this._mouseMode=F1.none,this._touchMode=_v.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(A.startTime,A.stopTime),this._onMouseDown=oBi(this),this._onMouseUp=aBi(this),this._onMouseMove=sBi(this),this._onMouseWheel=lBi(this),this._onTouchStart=uBi(this),this._onTouchMove=ABi(this),this._onTouchEnd=cBi(this);let C=this._timeBarEle;f.addEventListener("mouseup",this._onMouseUp,!1),f.addEventListener("mousemove",this._onMouseMove,!1),C.addEventListener("mousedown",this._onMouseDown,!1),C.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),C.addEventListener("mousewheel",this._onMouseWheel,!1),C.addEventListener("touchstart",this._onTouchStart,!1),C.addEventListener("touchmove",this._onTouchMove,!1),C.addEventListener("touchend",this._onTouchEnd,!1),C.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},A.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}Jv.prototype.addEventListener=function(o,A,f){this._topDiv.addEventListener(o,A,f)};Jv.prototype.removeEventListener=function(o,A,f){this._topDiv.removeEventListener(o,A,f)};Jv.prototype.isDestroyed=function(){return!1};Jv.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);let o=this.container.ownerDocument;o.removeEventListener("mouseup",this._onMouseUp,!1),o.removeEventListener("mousemove",this._onMouseMove,!1);let A=this._timeBarEle;A.removeEventListener("mousedown",this._onMouseDown,!1),A.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),A.removeEventListener("mousewheel",this._onMouseWheel,!1),A.removeEventListener("touchstart",this._onTouchStart,!1),A.removeEventListener("touchmove",this._onTouchMove,!1),A.removeEventListener("touchend",this._onTouchEnd,!1),A.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),Qr(this)};Jv.prototype.addHighlightRange=function(o,A,f){let m=new rDe(o,A,f);return this._highlightRanges.push(m),this.resize(),m};Jv.prototype.addTrack=function(o,A,f,m){let C=new nDe(o,A,f,m);return this._trackList.push(C),this._lastHeight=void 0,this.resize(),C};Jv.prototype.zoomTo=function(o,A){if(this._startJulian=o,this._endJulian=A,this._timeBarSecondsSpan=fi.secondsDifference(A,o),this._clock&&this._clock.clockRange!==aC.UNBOUNDED){let m=this._clock.startTime,C=this._clock.stopTime,y=fi.secondsDifference(C,m),x=fi.secondsDifference(m,this._startJulian),v=fi.secondsDifference(C,this._endJulian);this._timeBarSecondsSpan>=y?(this._timeBarSecondsSpan=y,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):x>0?(this._endJulian=fi.addSeconds(this._endJulian,x,new fi),this._startJulian=m,this._timeBarSecondsSpan=fi.secondsDifference(this._endJulian,this._startJulian)):v<0&&(this._startJulian=fi.addSeconds(this._startJulian,v,new fi),this._endJulian=C,this._timeBarSecondsSpan=fi.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();let f=document.createEvent("Event");f.initEvent("setzoom",!0,!0),f.startJulian=this._startJulian,f.endJulian=this._endJulian,f.epochJulian=this._epochJulian,f.totalSpan=this._timeBarSecondsSpan,f.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(f)};Jv.prototype.zoomFrom=function(o){let A=fi.secondsDifference(this._scrubJulian,this._startJulian);o>1||A<0||A>this._timeBarSecondsSpan?A=this._timeBarSecondsSpan*.5:A+=A-this._timeBarSecondsSpan*.5;let f=this._timeBarSecondsSpan-A;this.zoomTo(fi.addSeconds(this._startJulian,A-A*o,new fi),fi.addSeconds(this._endJulian,f*o-f,new fi))};Jv.prototype.makeLabel=function(o){let A=new Date(o);return`${A.getFullYear()} ${A.getMonth()+1} ${A.getDate()-1} ${A.getHours()}:${A.getMinutes()}:${A.getSeconds()}`};Jv.prototype.smallestTicInPixels=7;Jv.prototype._makeTics=function(){let o=this._timeBarEle,A=fi.secondsDifference(this._scrubJulian,this._startJulian),f=Math.round(A*this._topDiv.clientWidth/this._timeBarSecondsSpan),m=f-8,C,y=this;this._needleEle.style.left=`${f.toString()}px`;let x="",v=.01,E=31536e6,I=1e-10,w=0,Q=this._timeBarSecondsSpan;Q<v?(Q=v,this._timeBarSecondsSpan=v,this._endJulian=fi.addSeconds(this._startJulian,v,new fi)):Q>E&&(Q=E,this._timeBarSecondsSpan=E,this._endJulian=fi.addSeconds(this._startJulian,E,new fi));let M=this._timeBarEle.clientWidth;M<10&&(M=10);let B=this._startJulian,T=Math.min(Q/M*1e-5,.4),D,F=fi.toGregorianDate(B);Q>31536e4?D=fi.fromDate(new Date(Date.UTC(Math.floor(F.year/100)*100,0))):Q>31536e3?D=fi.fromDate(new Date(Date.UTC(Math.floor(F.year/10)*10,0))):Q>86400?D=fi.fromDate(new Date(Date.UTC(F.year,0))):D=fi.fromDate(new Date(Date.UTC(F.year,F.month,F.day)));let L=fi.secondsDifference(this._startJulian,fi.addSeconds(D,T,new fi)),R=L+Q;this._epochJulian=D;function k(Ie){return Math.floor(L/Ie)*Ie}function U(Ie,ve){return Math.ceil(Ie/ve+.5)*ve}function V(Ie){return(Ie-L)/Q}function H(Ie,ve){return Ie-ve*Math.round(Ie/ve)}this._rulerEle.innerHTML=this.makeLabel(fi.addSeconds(this._endJulian,-v,new fi));let q=this._rulerEle.offsetWidth+20;q<30&&(q=180);let ie=w;w-=I;let Z={startTime:L,startJulian:B,epochJulian:D,duration:Q,timeBarWidth:M,getAlpha:V};this._highlightRanges.forEach(function(Ie){x+=Ie.render(Z)});let oe=0,ne=0,se=0,ce=q/M;ce>1&&(ce=1),ce*=this._timeBarSecondsSpan;let j=-1,de=-1,me=EL.length,_e;for(_e=0;_e<me;++_e){let Ie=EL[_e];if(++j,oe=Ie,Ie>ce&&Ie>w)break;de<0&&M*(Ie/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(de=j)}if(j>0){for(;j>0;)if(--j,Math.abs(H(oe,EL[j]))<1e-5){EL[j]>=w&&(ne=EL[j]);break}if(de>=0)for(;de<j;){if(Math.abs(H(ne,EL[de]))<1e-5&&EL[de]>=w){se=EL[de];break}++de}}w=ie,w>I&&se<1e-5&&Math.abs(w-oe)>I&&(se=w,w<=oe+I&&(ne=0));let Be=-999999,Qe;if(M*(se/this._timeBarSecondsSpan)>=3)for(C=k(se);C<=R;C=U(C,se))x+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(M*V(C)).toString()}px;"></span>`;if(M*(ne/this._timeBarSecondsSpan)>=3)for(C=k(ne);C<=R;C=U(C,ne))x+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(M*V(C)).toString()}px;"></span>`;if(M*(oe/this._timeBarSecondsSpan)>=2){this._mainTicSpan=oe,R+=oe,C=k(oe);let Ie=fi.computeTaiMinusUtc(D);for(;C<=R;){let ve=fi.addSeconds(B,C-L,new fi);if(oe>2.1){let Y=fi.computeTaiMinusUtc(ve);Math.abs(Y-Ie)>.1&&(C+=Y-Ie,ve=fi.addSeconds(B,C-L,new fi))}let K=Math.round(M*V(C)),W=this.makeLabel(ve);this._rulerEle.innerHTML=W,Qe=this._rulerEle.offsetWidth,Qe<10&&(Qe=q);let te=K-(Qe/2-1);te>Be?(Be=te+Qe+5,x+=`<span class="cesium-timeline-ticMain" style="left: ${K.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${te.toString()}px;">${W}</span>`):x+=`<span class="cesium-timeline-ticSub" style="left: ${K.toString()}px;"></span>`,C=U(C,oe)}}else this._mainTicSpan=-1;x+=`<span class="cesium-timeline-icon16" style="left:${m}px;bottom:0;background-position: 0 0;"></span>`,o.innerHTML=x,this._scrubElement=o.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),Z.y=0,this._trackList.forEach(function(Ie){Ie.render(y._context,Z),Z.y+=Ie.height})};Jv.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;let o=this._scrubElement;if(O(this._scrubElement)){let A=fi.secondsDifference(this._scrubJulian,this._startJulian),f=Math.round(A*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==f&&(this._lastXPos=f,o.style.left=`${f-8}px`,this._needleEle.style.left=`${f}px`)}O(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(fi.addSeconds(this._startJulian,this._timelineDrag,new fi),fi.addSeconds(this._endJulian,this._timelineDrag,new fi)))};Jv.prototype._setTimeBarTime=function(o,A){if(o=Math.round(o),this._scrubJulian=fi.addSeconds(this._startJulian,A,new fi),this._scrubElement){let m=o-8;this._scrubElement.style.left=`${m.toString()}px`,this._needleEle.style.left=`${o.toString()}px`}let f=document.createEvent("Event");f.initEvent("settime",!0,!0),f.clientX=o,f.timeSeconds=A,f.timeJulian=this._scrubJulian,f.clock=this._clock,this._topDiv.dispatchEvent(f)};function oBi(o){return function(A){o._mouseMode!==F1.touchOnly&&(A.button===0?(o._mouseMode=F1.scrub,o._scrubElement&&(o._scrubElement.style.backgroundPosition="-16px 0"),o._onMouseMove(A)):(o._mouseX=A.clientX,A.button===2?o._mouseMode=F1.zoom:o._mouseMode=F1.slide)),A.preventDefault()}}function aBi(o){return function(A){o._mouseMode=F1.none,o._scrubElement&&(o._scrubElement.style.backgroundPosition="0 0"),o._timelineDrag=0,o._timelineDragLocation=void 0}}function sBi(o){return function(A){let f;if(o._mouseMode===F1.scrub){A.preventDefault();let m=A.clientX-o._topDiv.getBoundingClientRect().left;m<0?(o._timelineDragLocation=0,o._timelineDrag=-.01*o._timeBarSecondsSpan):m>o._topDiv.clientWidth?(o._timelineDragLocation=o._topDiv.clientWidth,o._timelineDrag=.01*o._timeBarSecondsSpan):(o._timelineDragLocation=void 0,o._setTimeBarTime(m,m*o._timeBarSecondsSpan/o._topDiv.clientWidth))}else if(o._mouseMode===F1.slide){if(f=o._mouseX-A.clientX,o._mouseX=A.clientX,f!==0){let m=f*o._timeBarSecondsSpan/o._topDiv.clientWidth;o.zoomTo(fi.addSeconds(o._startJulian,m,new fi),fi.addSeconds(o._endJulian,m,new fi))}}else o._mouseMode===F1.zoom&&(f=o._mouseX-A.clientX,o._mouseX=A.clientX,f!==0&&o.zoomFrom(Math.pow(1.01,f)))}}function lBi(o){return function(A){let f=A.wheelDeltaY||A.wheelDelta||-A.detail;q0e=Math.max(Math.min(Math.abs(f),q0e),1),f/=q0e,o.zoomFrom(Math.pow(1.05,-f))}}function uBi(o){return function(A){let f=A.touches.length,m,C,y=o._topDiv.getBoundingClientRect().left;A.preventDefault(),o._mouseMode=F1.touchOnly,f===1?(m=fi.secondsDifference(o._scrubJulian,o._startJulian),C=Math.round(m*o._topDiv.clientWidth/o._timeBarSecondsSpan+y),Math.abs(A.touches[0].clientX-C)<50?(o._touchMode=_v.scrub,o._scrubElement&&(o._scrubElement.style.backgroundPosition=f===1?"-16px 0":"0 0")):(o._touchMode=_v.singleTap,o._touchState.centerX=A.touches[0].clientX-y)):f===2?(o._touchMode=_v.slideZoom,o._touchState.centerX=(A.touches[0].clientX+A.touches[1].clientX)*.5-y,o._touchState.spanX=Math.abs(A.touches[0].clientX-A.touches[1].clientX)):o._touchMode=_v.ignore}}function cBi(o){return function(A){let f=A.touches.length,m=o._topDiv.getBoundingClientRect().left;o._touchMode===_v.singleTap?(o._touchMode=_v.scrub,o._onTouchMove(A)):o._touchMode===_v.scrub&&o._onTouchMove(A),o._mouseMode=F1.touchOnly,f!==1?o._touchMode=f>0?_v.ignore:_v.none:o._touchMode===_v.slideZoom&&(o._touchState.centerX=A.touches[0].clientX-m),o._scrubElement&&(o._scrubElement.style.backgroundPosition="0 0")}}function ABi(o){return function(A){let f,m,C,y,x,v,E=1,I=o._topDiv.getBoundingClientRect().left;o._touchMode===_v.singleTap&&(o._touchMode=_v.slideZoom),o._mouseMode=F1.touchOnly,o._touchMode===_v.scrub?(A.preventDefault(),A.changedTouches.length===1&&(m=A.changedTouches[0].clientX-I,m>=0&&m<=o._topDiv.clientWidth&&o._setTimeBarTime(m,m*o._timeBarSecondsSpan/o._topDiv.clientWidth))):o._touchMode===_v.slideZoom&&(C=A.touches.length,C===2?(y=(A.touches[0].clientX+A.touches[1].clientX)*.5-I,x=Math.abs(A.touches[0].clientX-A.touches[1].clientX)):C===1&&(y=A.touches[0].clientX-I,x=0),O(y)&&(x>0&&o._touchState.spanX>0?(E=o._touchState.spanX/x,v=fi.addSeconds(o._startJulian,(o._touchState.centerX*o._timeBarSecondsSpan-y*o._timeBarSecondsSpan*E)/o._topDiv.clientWidth,new fi)):(f=o._touchState.centerX-y,v=fi.addSeconds(o._startJulian,f*o._timeBarSecondsSpan/o._topDiv.clientWidth,new fi)),o.zoomTo(v,fi.addSeconds(v,o._timeBarSecondsSpan*E,new fi)),o._touchState.centerX=y,o._touchState.spanX=x))}}Jv.prototype.resize=function(){let o=this.container.clientWidth,A=this.container.clientHeight;if(o===this._lastWidth&&A===this._lastHeight)return;this._trackContainer.style.height=`${A}px`;let f=1;this._trackList.forEach(function(m){f+=m.height}),this._trackListEle.style.height=`${f.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=f,this._makeTics(),this._lastXPos=void 0,this._lastWidth=o,this._lastHeight=A};var oDe=Jv,hBi=Eh(xBt(),1);function dBi(o){let A=!1,f=window.screen;return O(f)&&(O(f.lockOrientation)?A=f.lockOrientation(o):O(f.mozLockOrientation)?A=f.mozLockOrientation(o):O(f.msLockOrientation)?A=f.msLockOrientation(o):O(f.orientation&&f.orientation.lock)&&(A=f.orientation.lock(o))),A}function Qot(){let o=window.screen;O(o)&&(O(o.unlockOrientation)?o.unlockOrientation():O(o.mozUnlockOrientation)?o.mozUnlockOrientation():O(o.msUnlockOrientation)?o.msUnlockOrientation():O(o.orientation&&o.orientation.unlock)&&o.orientation.unlock())}function fBi(o,A,f,m){m()||(f()?(A.useWebVR=!1,o._locked&&(Qot(),o._locked=!1),o._noSleep.disable(),yp.exitFullscreen(),f(!1)):(yp.fullscreen||yp.requestFullscreen(o._vrElement),o._noSleep.enable(),o._locked||(o._locked=dBi("landscape")),A.useWebVR=!0,f(!0)))}function Zoe(o,A){let f=this,m=gr.observable(yp.enabled),C=gr.observable(!1);this.isVRMode=void 0,gr.defineProperty(this,"isVRMode",{get:function(){return C()}}),this.isVREnabled=void 0,gr.defineProperty(this,"isVREnabled",{get:function(){return m()},set:function(x){m(x&&yp.enabled)}}),this.tooltip=void 0,gr.defineProperty(this,"tooltip",function(){return m()?C()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});let y=gr.observable(!1);this._isOrthographic=void 0,gr.defineProperty(this,"_isOrthographic",{get:function(){return y()}}),this._eventHelper=new Mx,this._eventHelper.add(o.preRender,function(){y(o.camera.frustum instanceof Ds)}),this._locked=!1,this._noSleep=new hBi.default,this._command=Hl(function(){fBi(f,o,C,y)},gr.getObservable(this,"isVREnabled")),this._vrElement=Ae(iA(A),document.body),this._callback=function(){!yp.fullscreen&&C()&&(o.useWebVR=!1,f._locked&&(Qot(),f._locked=!1),f._noSleep.disable(),C(!1))},document.addEventListener(yp.changeEventName,this._callback)}Object.defineProperties(Zoe.prototype,{vrElement:{get:function(){return this._vrElement},set:function(o){this._vrElement=o}},command:{get:function(){return this._command}}});Zoe.prototype.isDestroyed=function(){return!1};Zoe.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(yp.changeEventName,this._callback),Qr(this)};var aDe=Zoe,gBi="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",pBi="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function $oe(o,A,f){o=iA(o);let m=new aDe(A,f);m._exitVRPath=pBi,m._enterVRPath=gBi;let C=document.createElement("button");C.type="button",C.className="cesium-button cesium-vrButton",C.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),o.appendChild(C),gr.applyBindings(m,C),this._container=o,this._viewModel=m,this._element=C}Object.defineProperties($oe.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});$oe.prototype.isDestroyed=function(){return!1};$oe.prototype.destroy=function(){return this._viewModel.destroy(),gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var sDe=$oe,eF=new wi;function Sot(o){let A=o.clock;A.currentTime=o.timeJulian,A.shouldAnimate=!1}function mBi(o){let A=o.getPropertyIds(),f="";return A.forEach(function(m){let C=o.getProperty(m);O(C)&&(f+=`<tr><th>${m}</th><td>${C}</td></tr>`)}),f.length>0&&(f=`<table class="cesium-infoBox-defaultTable"><tbody>${f}</tbody></table>`),f}function CBi(o){let A,f=[],m=o.getPropertyIds();for(A=0;A<m.length;A++){let y=m[A];/^name$/i.test(y)?f[0]=o.getProperty(y):/name/i.test(y)?f[1]=o.getProperty(y):/^title$/i.test(y)?f[2]=o.getProperty(y):/^(id|identifier)$/i.test(y)?f[3]=o.getProperty(y):/element/i.test(y)?f[4]=o.getProperty(y):/(id|identifier)$/i.test(y)&&(f[5]=o.getProperty(y))}let C=f.length;for(A=0;A<C;A++){let y=f[A];if(O(y)&&y!=="")return y}return"Unnamed Feature"}function uze(o,A){let f=o.scene.pick(A.position);if(O(f)){let m=Ae(f.id,f.primitive.id);if(m instanceof UA)return m;if(f instanceof Ts)return new UA({name:CBi(f),description:mBi(f),feature:f})}if(O(o.scene.globe))return vBi(o,A.position)}var yBi=new fi;function Dot(o,A,f){if(O(f)){let m=f.clock;if(O(m)&&(m.getValue(A),O(o))){let C=m.startTime,y=m.stopTime;fi.equals(C,y)&&(y=fi.addSeconds(C,je.EPSILON2,yBi)),o.updateFromClock(),o.zoomTo(C,y)}}}var xBi=new ee;function vBi(o,A){let f=o.scene,m=f.camera.getPickRay(A),C=f.imageryLayers.pickImageryLayerFeatures(m,f);if(!O(C))return;let y=new UA({id:"Loading...",description:"Loading feature information..."});return C.then(function(x){if(o.selectedEntity!==y)return;if(!O(x)||x.length===0){o.selectedEntity=cze();return}let v=x[0],E=new UA({id:v.name,description:v.description});if(O(v.position)){let I=o.scene.globe.ellipsoid.cartographicToCartesian(v.position,xBi);E.position=new _D(I)}o.selectedEntity=E},function(){o.selectedEntity===y&&(o.selectedEntity=cze())}),y}function cze(){return new UA({id:"None",description:"No features found."})}function EBi(o,A){let f=o._geocoder,m=o._homeButton,C=o._sceneModePicker,y=o._projectionPicker,x=o._baseLayerPicker,v=o._animation,E=o._timeline,I=o._fullscreenButton,w=o._infoBox,Q=o._selectionIndicator,M=A?"hidden":"visible";if(O(f)&&(f.container.style.visibility=M),O(m)&&(m.container.style.visibility=M),O(C)&&(C.container.style.visibility=M),O(y)&&(y.container.style.visibility=M),O(x)&&(x.container.style.visibility=M),O(v)&&(v.container.style.visibility=M),O(E)&&(E.container.style.visibility=M),O(I)&&I.viewModel.isFullscreenEnabled&&(I.container.style.visibility=M),O(w)&&(w.container.style.visibility=M),O(Q)&&(Q.container.style.visibility=M),o._container){let B=A||!O(I)?0:I.container.clientWidth;o._vrButton.container.style.right=`${B}px`,o.forceResize()}}function ku(o,A){o=iA(o),A=Ae(A,Ae.EMPTY_OBJECT);let f=(!O(A.globe)||A.globe!==!1)&&(!O(A.baseLayerPicker)||A.baseLayerPicker!==!1),m=this,C=document.createElement("div");C.className="cesium-viewer",o.appendChild(C);let y=document.createElement("div");y.className="cesium-viewer-cesiumWidgetContainer",C.appendChild(y);let x=document.createElement("div");x.className="cesium-viewer-bottom",C.appendChild(x);let v=Ae(A.scene3DOnly,!1),E,I,w=!1;O(A.clockViewModel)?(I=A.clockViewModel,E=I.clock):(E=new z5,I=new LSe(E),w=!0),O(A.shouldAnimate)&&(E.shouldAnimate=A.shouldAnimate);let Q=new jJ(y,{imageryProvider:f||O(A.imageryProvider)?!1:void 0,clock:E,skyBox:A.skyBox,skyAtmosphere:A.skyAtmosphere,sceneMode:A.sceneMode,mapProjection:A.mapProjection,globe:A.globe,orderIndependentTranslucency:A.orderIndependentTranslucency,contextOptions:A.contextOptions,useDefaultRenderLoop:A.useDefaultRenderLoop,targetFrameRate:A.targetFrameRate,showRenderLoopErrors:A.showRenderLoopErrors,useBrowserRecommendedResolution:A.useBrowserRecommendedResolution,creditContainer:O(A.creditContainer)?A.creditContainer:x,creditViewport:A.creditViewport,scene3DOnly:v,shadows:A.shadows,terrainShadows:A.terrainShadows,mapMode2D:A.mapMode2D,blurActiveElementOnCanvasFocus:A.blurActiveElementOnCanvasFocus,requestRenderMode:A.requestRenderMode,maximumRenderTimeChange:A.maximumRenderTimeChange,depthPlaneEllipsoidOffset:A.depthPlaneEllipsoidOffset,msaaSamples:A.msaaSamples,shadowBackCull:A.shadowBackCull}),M=A.dataSources,B=!1;O(M)||(M=new l_e,B=!0);let T=Q.scene,D=new _J({scene:T,dataSourceCollection:M}),F=new Mx;F.add(E.onTick,ku.prototype._onTick,this),F.add(T.morphStart,ku.prototype._clearTrackedObject,this);let L;if(!O(A.selectionIndicator)||A.selectionIndicator!==!1){let K=document.createElement("div");K.className="cesium-viewer-selectionIndicatorContainer",C.appendChild(K),L=new iDe(K,T)}let R;if(!O(A.infoBox)||A.infoBox!==!1){let K=document.createElement("div");K.className="cesium-viewer-infoBoxContainer",C.appendChild(K),R=new WSe(K);let W=R.viewModel;F.add(W.cameraClicked,ku.prototype._onInfoBoxCameraClicked,this),F.add(W.closeClicked,ku.prototype._onInfoBoxClockClicked,this)}let k=document.createElement("div");k.className="cesium-viewer-toolbar",C.appendChild(k);let U;if(!O(A.geocoder)||A.geocoder!==!1){let K=document.createElement("div");K.className="cesium-viewer-geocoderContainer",k.appendChild(K);let W;O(A.geocoder)&&typeof A.geocoder!="boolean"&&(W=Array.isArray(A.geocoder)?A.geocoder:[A.geocoder]),U=new VSe({container:K,geocoderServices:W,scene:T}),F.add(U.viewModel.search.beforeExecute,ku.prototype._clearObjects,this)}let V;(!O(A.homeButton)||A.homeButton!==!1)&&(V=new KSe(k,T),O(U)&&F.add(V.viewModel.command.afterExecute,function(){let K=U.viewModel;K.searchText="",K.isSearchInProgress&&K.search()}),F.add(V.viewModel.command.beforeExecute,ku.prototype._clearTrackedObject,this));let H;!v&&(!O(A.sceneModePicker)||A.sceneModePicker!==!1)&&(H=new eDe(k,T));let q;A.projectionPicker&&(q=new ZSe(k,T));let ie,Z;if(f){let K=Ae(A.imageryProviderViewModels,Lbe()),W=Ae(A.terrainProviderViewModels,kbe());ie=new wbe(k,{globe:T.globe,imageryProviderViewModels:K,selectedImageryProviderViewModel:A.selectedImageryProviderViewModel,terrainProviderViewModels:W,selectedTerrainProviderViewModel:A.selectedTerrainProviderViewModel}),Z=k.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}O(A.imageryProvider)&&A.imageryProvider!==!1&&(f&&(ie.viewModel.selectedImagery=void 0),T.imageryLayers.removeAll(),T.imageryLayers.addImageryProvider(A.imageryProvider)),O(A.terrainProvider)&&(f&&(ie.viewModel.selectedTerrain=void 0),T.terrainProvider=A.terrainProvider);let oe;if(!O(A.navigationHelpButton)||A.navigationHelpButton!==!1){let K=!0;try{if(O(window.localStorage)){let W=window.localStorage.getItem("cesium-hasSeenNavHelp");O(W)&&Boolean(W)?K=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}oe=new qSe({container:k,instructionsInitiallyVisible:Ae(A.navigationInstructionsInitiallyVisible,K)})}let ne;if(!O(A.animation)||A.animation!==!1){let K=document.createElement("div");K.className="cesium-viewer-animationContainer",C.appendChild(K),ne=new Ibe(K,new _be(I))}let se;if(!O(A.timeline)||A.timeline!==!1){let K=document.createElement("div");K.className="cesium-viewer-timelineContainer",C.appendChild(K),se=new oDe(K,E),se.addEventListener("settime",Sot,!1),se.zoomTo(E.startTime,E.stopTime)}let ce,j,de;(!O(A.fullscreenButton)||A.fullscreenButton!==!1)&&(de=document.createElement("div"),de.className="cesium-viewer-fullscreenContainer",C.appendChild(de),ce=new NSe(de,A.fullscreenElement),j=WE(ce.viewModel,"isFullscreenEnabled",function(K){de.style.display=K?"block":"none",O(se)&&(se.container.style.right=`${de.clientWidth}px`,se.resize())}));let me,_e,Be;if(A.vrButton){let K=document.createElement("div");K.className="cesium-viewer-vrContainer",C.appendChild(K),me=new sDe(K,T,A.fullScreenElement),_e=WE(me.viewModel,"isVREnabled",function(W){K.style.display=W?"block":"none",O(ce)&&(K.style.right=`${de.clientWidth}px`),O(se)&&(se.container.style.right=`${K.clientWidth}px`,se.resize())}),Be=WE(me.viewModel,"isVRMode",function(W){EBi(m,W)})}this._baseLayerPickerDropDown=Z,this._fullscreenSubscription=j,this._vrSubscription=_e,this._vrModeSubscription=Be,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=Ae(A.automaticallyTrackDataSourceClocks,!0),this._container=o,this._bottomContainer=x,this._element=C,this._cesiumWidget=Q,this._selectionIndicator=L,this._infoBox=R,this._dataSourceCollection=M,this._destroyDataSourceCollection=B,this._dataSourceDisplay=D,this._clockViewModel=I,this._destroyClockViewModel=w,this._toolbar=k,this._homeButton=V,this._sceneModePicker=H,this._projectionPicker=q,this._baseLayerPicker=ie,this._navigationHelpButton=oe,this._animation=ne,this._timeline=se,this._fullscreenButton=ce,this._vrButton=me,this._geocoder=U,this._eventHelper=F,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=O(R)||O(L),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 br,this._trackedEntityChanged=new br,gr.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),F.add(M.dataSourceAdded,ku.prototype._onDataSourceAdded,this),F.add(M.dataSourceRemoved,ku.prototype._onDataSourceRemoved,this),F.add(T.postUpdate,ku.prototype.resize,this),F.add(T.postRender,ku.prototype._postRender,this);let Qe=M.length;for(let K=0;K<Qe;K++)this._dataSourceAdded(M,M.get(K));this._dataSourceAdded(void 0,D.defaultDataSource),F.add(M.dataSourceAdded,ku.prototype._dataSourceAdded,this),F.add(M.dataSourceRemoved,ku.prototype._dataSourceRemoved,this);function Ie(K){let W=uze(m,K);O(W)?Nt.getValueOrUndefined(W.position,m.clock.currentTime)?m.trackedEntity=W:m.zoomTo(W):O(m.trackedEntity)&&(m.trackedEntity=void 0)}function ve(K){m.selectedEntity=uze(m,K)}Q.screenSpaceEventHandler.setInputAction(ve,Ki.LEFT_CLICK),Q.screenSpaceEventHandler.setInputAction(Ie,Ki.LEFT_DOUBLE_CLICK)}Object.defineProperties(ku.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},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(o){this.scene.shadowMap.enabled=o}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(o){this.scene.globe.shadows=o}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(o){this.scene.terrainProvider=o}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(o){this._cesiumWidget.targetFrameRate=o}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(o){this._cesiumWidget.useDefaultRenderLoop=o}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(o){this._cesiumWidget.resolutionScale=o}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(o){this._cesiumWidget.useBrowserRecommendedResolution=o}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(o){this._allowDataSourcesToSuspendAnimation=o}},trackedEntity:{get:function(){return this._trackedEntity},set:function(o){if(this._trackedEntity!==o){this._trackedEntity=o,nie(this);let A=this.scene,f=A.mode;!O(o)||!O(o.position)?(this._needTrackedEntityUpdate=!1,(f===xi.COLUMBUS_VIEW||f===xi.SCENE2D)&&(A.screenSpaceCameraController.enableTranslate=!0),(f===xi.COLUMBUS_VIEW||f===xi.SCENE3D)&&(A.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(Xe.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(o),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(o){if(this._selectedEntity!==o){this._selectedEntity=o;let A=O(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;O(o)?O(A)&&A.animateAppear():O(A)&&A.animateDepart(),this._selectedEntityChanged.raiseEvent(o)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(o){this._clockTrackedDataSource!==o&&(this._clockTrackedDataSource=o,Dot(this._timeline,this.clock,o))}}});ku.prototype.extend=function(o,A){o(this,A)};ku.prototype.resize=function(){let o=this._cesiumWidget,A=this._container,f=A.clientWidth,m=A.clientHeight,C=O(this._animation),y=O(this._timeline);if(o.resize(),f===this._lastWidth&&m===this._lastHeight)return;let x=m-125,v=this._baseLayerPickerDropDown;if(O(v)&&(v.style.maxHeight=`${x}px`),O(this._geocoder)){let B=this._geocoder.searchSuggestionsContainer;B.style.maxHeight=`${x}px`}O(this._infoBox)&&(this._infoBox.viewModel.maxHeight=x);let E=this._timeline,I,w=0,Q=0,M=0;if(C&&window.getComputedStyle(this._animation.container).visibility!=="hidden"){let B=this._lastWidth;I=this._animation.container,f>900?(w=169,B<=900&&(I.style.width="169px",I.style.height="112px",this._animation.resize())):f>=600?(w=136,(B<600||B>900)&&(I.style.width="136px",I.style.height="90px",this._animation.resize())):(w=106,(B>600||B===0)&&(I.style.width="106px",I.style.height="70px",this._animation.resize())),Q=w+5}if(y&&window.getComputedStyle(this._timeline.container).visibility!=="hidden"){let B=this._fullscreenButton,T=this._vrButton,D=E.container,F=D.style;M=D.clientHeight+3,F.left=`${w}px`;let L=0;O(B)&&(L+=B.container.clientWidth),O(T)&&(L+=T.container.clientWidth),F.right=`${L}px`,E.resize()}this._bottomContainer.style.left=`${Q}px`,this._bottomContainer.style.bottom=`${M}px`,this._lastWidth=f,this._lastHeight=m};ku.prototype.forceResize=function(){this._lastWidth=0,this.resize()};ku.prototype.render=function(){this._cesiumWidget.render()};ku.prototype.isDestroyed=function(){return!1};ku.prototype.destroy=function(){let o;this.screenSpaceEventHandler.removeInputAction(Ki.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Ki.LEFT_DOUBLE_CLICK);let A=this.dataSources,f=A.length;for(o=0;o<f;o++)this._dataSourceRemoved(A,A.get(o));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),O(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),O(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),O(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),O(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),O(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),O(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),O(this._timeline)&&(this._timeline.removeEventListener("settime",Sot,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),O(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),O(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),O(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),O(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),Qr(this)};ku.prototype._dataSourceAdded=function(o,A){A.entities.collectionChanged.addEventListener(ku.prototype._onEntityCollectionChanged,this)};ku.prototype._dataSourceRemoved=function(o,A){let f=A.entities;f.collectionChanged.removeEventListener(ku.prototype._onEntityCollectionChanged,this),O(this.trackedEntity)&&f.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),O(this.selectedEntity)&&f.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};ku.prototype._onTick=function(o){let A=o.currentTime,f=this._dataSourceDisplay.update(A);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=f);let m=this._entityView;if(O(m)){let B=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(B,!1,eF)===ro.DONE&&m.update(A,eF)}let C,y=!1,x=this.selectedEntity,v=O(x)&&this._enableInfoOrSelection;v&&x.isShowing&&x.isAvailable(A)&&(this._dataSourceDisplay.getBoundingSphere(x,!0,eF)!==ro.FAILED?C=eF.center:O(x.position)&&(C=x.position.getValue(A,C)),y=O(C));let E=this.imageryLayers,I,w;for(w=0;w<E.length;w++)I=E.get(w),I&&I._availability&&(I.show=I.isAvailable(A));let Q=O(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;O(Q)&&(Q.position=ee.clone(C,Q.position),Q.showSelection=v&&y,Q.update());let M=O(this._infoBox)?this._infoBox.viewModel:void 0;O(M)&&(M.showInfo=v,M.enableCamera=y,M.isCameraTracking=this.trackedEntity===this.selectedEntity,v?(M.titleText=Ae(x.name,x.id),M.description=Nt.getValueOrDefault(x.description,A,"")):(M.titleText="",M.description=""))};ku.prototype._onEntityCollectionChanged=function(o,A,f){let m=f.length;for(let C=0;C<m;C++){let y=f[C];this.trackedEntity===y&&(this.trackedEntity=void 0),this.selectedEntity===y&&(this.selectedEntity=void 0)}};ku.prototype._onInfoBoxCameraClicked=function(o){if(o.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let A=this.selectedEntity.position;O(A)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};ku.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};ku.prototype._onInfoBoxClockClicked=function(o){this.selectedEntity=void 0};ku.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};ku.prototype._onDataSourceChanged=function(o){this.clockTrackedDataSource===o&&Dot(this.timeline,this.clock,o)};ku.prototype._onDataSourceAdded=function(o,A){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=A);let f=A.entities.id,m=this._eventHelper.add(A.changedEvent,ku.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[f]=m};ku.prototype._onDataSourceRemoved=function(o,A){let f=this.clockTrackedDataSource===A,m=A.entities.id;if(this._dataSourceChangedListeners[m](),this._dataSourceChangedListeners[m]=void 0,f){let C=o.length;this._automaticallyTrackDataSourceClocks&&C>0?this.clockTrackedDataSource=o.get(C-1):this.clockTrackedDataSource=void 0}};ku.prototype.zoomTo=function(o,A){return Tot(this,o,{offset:A},!1)};ku.prototype.flyTo=function(o,A){return Tot(this,o,A,!0)};function Tot(o,A,f,m){nie(o);let C=new Promise(y=>{o._completeZoom=function(x){y(x)}});return o._zoomPromise=C,o._zoomIsFlight=m,o._zoomOptions=f,Promise.resolve(A).then(function(y){if(o._zoomPromise===C){if(y instanceof dD){y.getViewableRectangle().then(function(x){return BJ(x,o.scene)}).then(function(x){o._zoomPromise===C&&(o._zoomTarget=x)});return}if(y instanceof Fx){o._zoomTarget=y;return}if(y instanceof Y6){o._zoomTarget=y;return}if(y.isLoading&&O(y.loadingEvent)){let x=y.loadingEvent.addEventListener(function(){x(),o._zoomPromise===C&&(o._zoomTarget=y.entities.values.slice(0))});return}if(Array.isArray(y)){o._zoomTarget=y.slice(0);return}y=Ae(y.values,y),O(y.entities)&&(y=y.entities.values),Array.isArray(y)?o._zoomTarget=y.slice(0):o._zoomTarget=[y]}}),o.scene.requestRender(),C}function sG(o){o._zoomPromise=void 0,o._zoomTarget=void 0,o._zoomOptions=void 0}function nie(o){let A=o._zoomPromise;O(A)&&(sG(o),o._completeZoom(!1))}ku.prototype._postRender=function(){IBi(this),_Bi(this)};function IBi(o){let A=o._zoomTarget;if(!O(A)||o.scene.mode===xi.MORPHING)return;let f=o.scene,m=f.camera,C=Ae(o._zoomOptions,{}),y;if(A instanceof Fx)return A.readyPromise.then(function(){let I=A.boundingSphere;O(C.offset)||(C.offset=new Ex(0,-.5,I.radius)),y={offset:C.offset,duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)}},o._zoomIsFlight?m.flyToBoundingSphere(A.boundingSphere,y):(m.viewBoundingSphere(I,C.offset),m.lookAtTransform(Xe.IDENTITY),o._completeZoom(!0)),sG(o)}).catch(()=>{nie(o)});if(A instanceof Y6)return A.readyPromise.then(function(){let I=A.boundingSphere;O(C.offset)||(C.offset=new Ex(0,-.5,I.radius)),y={offset:C.offset,duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)}},o._zoomIsFlight?m.flyToBoundingSphere(I,y):(m.viewBoundingSphere(I,C.offset),m.lookAtTransform(Xe.IDENTITY),o._completeZoom(!0)),sG(o)});if(A instanceof Kt){y={destination:f.mapProjection.ellipsoid.cartographicToCartesian(A),duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)}},o._zoomIsFlight?m.flyTo(y):(m.setView(y),o._completeZoom(!0)),sG(o);return}let x=A,v=[];for(let I=0,w=x.length;I<w;I++){let Q=o._dataSourceDisplay.getBoundingSphere(x[I],!1,eF);if(Q===ro.PENDING)return;Q!==ro.FAILED&&v.push(wi.clone(eF))}if(v.length===0){nie(o);return}o.trackedEntity=void 0;let E=wi.fromBoundingSpheres(v);o._zoomIsFlight?(sG(o),m.flyToBoundingSphere(E,{duration:C.duration,maximumHeight:C.maximumHeight,complete:function(){o._completeZoom(!0)},cancel:function(){o._completeZoom(!1)},offset:C.offset})):(m.viewBoundingSphere(E,C.offset),m.lookAtTransform(Xe.IDENTITY),sG(o),o._completeZoom(!0))}function _Bi(o){if(!o._needTrackedEntityUpdate)return;let A=o._trackedEntity,f=o.clock.currentTime,m=Nt.getValueOrUndefined(A.position,f);if(!O(m))return;let C=o.scene,y=o._dataSourceDisplay.getBoundingSphere(A,!1,eF);if(y===ro.PENDING)return;let x=C.mode;(x===xi.COLUMBUS_VIEW||x===xi.SCENE2D)&&(C.screenSpaceCameraController.enableTranslate=!1),(x===xi.COLUMBUS_VIEW||x===xi.SCENE3D)&&(C.screenSpaceCameraController.enableTilt=!1);let v=y!==ro.FAILED?eF:void 0;o._entityView=new $ne(A,C,C.mapProjection.ellipsoid),o._entityView.update(f,v),o._needTrackedEntityUpdate=!1}var $J=ku;function Mot(o,A){if(!O(o)||!(o instanceof $J))throw new Ui("viewer is required.");this._camera=o.camera,this._scene=o.scene,this._globe=o.scene.globe,this._ellipsoid=o.scene.globe.ellipsoid}var Aze=new ee,D$=new ee,T$=new ee;Mot.prototype.pickSlope=function(o){if(!O(o)||!(o instanceof It))throw new Ui("windowCoordinates is required.");let A=this._camera,f=this._scene,m=this._globe,C=this._ellipsoid,y=A.getPickRay(o),x=m.pick(y,f);if(x){let v=C.geodeticSurfaceNormal(x),E=m.pickTriangle(y,f);ee.subtract(E[1],E[0],D$),ee.subtract(E[2],E[0],T$),ee.normalize(D$,D$),ee.normalize(T$,T$),ee.cross(D$,T$,Aze);let I=ee.angleBetween(v,Aze);return je.toDegrees(I)}};var Pot=Mot,BBi=[{value:0,color:"#ffffff"},{value:1,color:"#ffa500"}];function YM(o){this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this.color=Ae(o.color,At.RED),this.duration=Ae(o.duration,3e3),this.image=Ae(o.image,void 0),this.ramp=Ae(o.ramp,BBi),this._translucnet=Ae(o.translucent,!0),this._repeat=Ae(o.repeat,1),this._time=new Date().getTime()}Object.defineProperties(YM.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color")});YM.prototype.getType=function(o){return ss.PolylineTrailLinkType};YM.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this.color,o,At.WHITE,A.color),A.image=this.getColorRamp(),A.repeat=this._repeat,A.time=(new Date().getTime()-this._time)%this.duration/this.duration,A};YM.prototype.update=function(){let o=fi.now();return this.getValue(o)};YM.prototype.isTranslucent=function(){return this._translucnet};YM.prototype.getColorRamp=function(){if(O(this.image))return this.image;let o=document.createElement("canvas");o.width=100,o.height=1;let A=o.getContext("2d"),f=A.createLinearGradient(0,0,100,0),m=this;for(let C=0;C<m.ramp.length;C++){let y=m.ramp[C].value,x=m.ramp[C].color;f.addColorStop(y,x)}return A.fillStyle=f,A.fillRect(0,0,100,1),o};YM.prototype.equals=function(o){return this===o||o instanceof YM&&Nt.equals(this._color,o._color)};var Rot=YM;function cw(o){this._tileProvider=o.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};let A=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new xoe,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=Ae(o.maximumScreenSpaceError,2),this.tileCacheSize=Ae(o.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new moe({ellipsoid:A}),this._tileLoadProgressEvent=new br,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(cw.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});cw.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function wBi(o){let A=o._tileReplacementQueue;A.head=void 0,A.tail=void 0,A.count=0,Lot(o);let f=o._levelZeroTiles;if(O(f))for(let m=0;m<f.length;++m){let C=f[m].customData,y=C.length;for(let x=0;x<y;++x){let v=C[x];v.level=0,o._addHeightCallbacks.push(v)}f[m].freeResources()}o._levelZeroTiles=void 0,o._tileProvider.cancelReprojections()}cw.prototype.forEachLoadedTile=function(o){let A=this._tileReplacementQueue.head;for(;O(A);)A.state!==mC.START&&o(A),A=A.replacementNext};cw.prototype.forEachRenderedTile=function(o){let A=this._tilesToRender;for(let f=0,m=A.length;f<m;++f)o(A[f])};cw.prototype.updateHeight=function(o,A){let f=this,m={positionOnEllipsoidSurface:void 0,positionCartographic:o,level:-1,callback:A};return m.removeFunc=function(){let C=f._addHeightCallbacks,y=C.length;for(let x=0;x<y;++x)if(C[x]===m){C.splice(x,1);break}f._removeHeightCallbacks.push(m)},f._addHeightCallbacks.push(m),m.removeFunc};cw.prototype.update=function(o){O(this._tileProvider.update)&&this._tileProvider.update(o)};function Lot(o){let A=o._debug;A.maxDepth=0,A.maxDepthVisited=0,A.tilesVisited=0,A.tilesCulled=0,A.tilesRendered=0,A.tilesWaitingForChildren=0,o._tileLoadQueueHigh.length=0,o._tileLoadQueueMedium.length=0,o._tileLoadQueueLow.length=0}cw.prototype.beginFrame=function(o){!o.passes.render||(this._tilesInvalidated&&(wBi(this),this._tilesInvalidated=!1),this._tileProvider.initialize(o),Lot(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())};cw.prototype.render=function(o){let A=o.passes,f=this._tileProvider;if(A.render&&(f.beginUpdate(o),DBi(this,o),UBi(this,o),f.endUpdate(o)),A.pick&&this._tilesToRender.length>0)try{f.updateForPick(o)}catch(m){console.error(m)}};function bBi(o,A){let f=o._tileLoadQueueHigh.length+o._tileLoadQueueMedium.length+o._tileLoadQueueLow.length;(f!==o._lastTileLoadQueueLength||o._tilesInvalidated)&&(A.afterRender.push(br.prototype.raiseEvent.bind(o._tileLoadProgressEvent,f)),o._lastTileLoadQueueLength=f);let m=o._debug;m.enableDebugOutput&&!m.suspendLodUpdate&&(m.maxDepth=o._tilesToRender.reduce(function(C,y){return Math.max(C,y.level)},-1),m.tilesRendered=o._tilesToRender.length,(m.tilesVisited!==m.lastTilesVisited||m.tilesRendered!==m.lastTilesRendered||m.tilesCulled!==m.lastTilesCulled||m.maxDepth!==m.lastMaxDepth||m.tilesWaitingForChildren!==m.lastTilesWaitingForChildren||m.maxDepthVisited!==m.lastMaxDepthVisited)&&(console.log(`Visited ${m.tilesVisited}, Rendered: ${m.tilesRendered}, Culled: ${m.tilesCulled}, Max Depth Rendered: ${m.maxDepth}, Max Depth Visited: ${m.maxDepthVisited}, Waiting for children: ${m.tilesWaitingForChildren}`),m.lastTilesVisited=m.tilesVisited,m.lastTilesRendered=m.tilesRendered,m.lastTilesCulled=m.tilesCulled,m.lastMaxDepth=m.maxDepth,m.lastTilesWaitingForChildren=m.tilesWaitingForChildren,m.lastMaxDepthVisited=m.maxDepthVisited))}cw.prototype.endFrame=function(o){!o.passes.render||o.mode===xi.MORPHING||(FBi(this,o),OBi(this,o),bBi(this,o))};var i7,hze=new Kt;function QBi(o,A){let f=Si.center(o.rectangle,hze),m=f.longitude-i7.longitude,C=f.latitude-i7.latitude;f=Si.center(A.rectangle,hze);let y=f.longitude-i7.longitude,x=f.latitude-i7.latitude;return m*m+C*C-(y*y+x*x)}var SBi=new ee,Tz=[];function DBi(o,A){let f=o._debug;if(f.suspendLodUpdate)return;let m=o._tilesToRender;m.length=0;let C,y=o._tileProvider;if(!O(o._levelZeroTiles))if(y.ready){let D=y.tilingScheme;o._levelZeroTiles=Coe.createLevelZeroTiles(D);let F=o._levelZeroTiles.length;if(Tz.length<F)for(Tz=new Array(F),C=0;C<F;++C)Tz[C]===void 0&&(Tz[C]=new r7)}else return;o._occluders.ellipsoid.cameraPosition=A.camera.positionWC;let x,v=o._levelZeroTiles,E=v.length>1?o._occluders:void 0;i7=A.camera.positionCartographic,v.sort(QBi);let I=o._addHeightCallbacks,w=o._removeHeightCallbacks,Q=A.frameNumber,M;if(I.length>0||w.length>0){for(C=0,M=v.length;C<M;++C)x=v[C],x._updateCustomData(Q,I,w);I.length=0,w.length=0}let B=A.camera;o._cameraPositionCartographic=B.positionCartographic;let T=Xe.getTranslation(B.transform,SBi);for(o._cameraReferenceFrameOriginCartographic=o.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(T,o._cameraReferenceFrameOriginCartographic),C=0,M=v.length;C<M;++C)x=v[C],o._tileReplacementQueue.markTileRendered(x),x.renderable?ty(o,x,y,A,E,!1,Tz[C]):(nM(o,o._tileLoadQueueHigh,x,A),++f.tilesWaitingForChildren);o._lastSelectionFrameNumber=Q}function nM(o,A,f,m){!f.needsLoading||(o.tileProvider.computeTileLoadPriority!==void 0&&(f._loadPriority=o.tileProvider.computeTileLoadPriority(f,m)),A.push(f))}function r7(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function Fot(){this.southwest=new r7,this.southeast=new r7,this.northwest=new r7,this.northeast=new r7}Fot.prototype.combine=function(o){let A=this.southwest,f=this.southeast,m=this.northwest,C=this.northeast;o.allAreRenderable=A.allAreRenderable&&f.allAreRenderable&&m.allAreRenderable&&C.allAreRenderable,o.anyWereRenderedLastFrame=A.anyWereRenderedLastFrame||f.anyWereRenderedLastFrame||m.anyWereRenderedLastFrame||C.anyWereRenderedLastFrame,o.notYetRenderableCount=A.notYetRenderableCount+f.notYetRenderableCount+m.notYetRenderableCount+C.notYetRenderableCount};var BCe=new Array(31);for(let o=0;o<BCe.length;++o)BCe[o]=new Fot;function TBi(o,A,f,m,C){let y=o._debug;++y.tilesVisited,o._tileReplacementQueue.markTileRendered(f),f._updateCustomData(A.frameNumber),f.level>y.maxDepthVisited&&(y.maxDepthVisited=f.level);let x=RBi(o,A,f)<o.maximumScreenSpaceError,v=f.southwestChild,E=f.southeastChild,I=f.northwestChild,w=f.northeastChild,Q=o._lastSelectionFrameNumber,M=f._lastSelectionResultFrame===Q?f._lastSelectionResult:sa.NONE,B=o.tileProvider;if(x||m){let T=sa.originalResult(M)===sa.RENDERED,D=sa.originalResult(M)===sa.CULLED||M===sa.NONE,F=f.state===mC.DONE,L=T||D||F;if(L||O(B.canRenderWithoutLosingDetail)&&(L=B.canRenderWithoutLosingDetail(f)),L){x&&nM(o,o._tileLoadQueueMedium,f,A),M$(o,f),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1,f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,C.anyWereRenderedLastFrame||o._tileToUpdateHeights.push(f);return}m=!0,x&&nM(o,o._tileLoadQueueHigh,f,A)}if(B.canRefine(f)){if(v.upsampledFromParent&&E.upsampledFromParent&&I.upsampledFromParent&&w.upsampledFromParent){M$(o,f),nM(o,o._tileLoadQueueMedium,f,A),o._tileReplacementQueue.markTileRendered(v),o._tileReplacementQueue.markTileRendered(E),o._tileReplacementQueue.markTileRendered(I),o._tileReplacementQueue.markTileRendered(w),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1,f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,C.anyWereRenderedLastFrame||o._tileToUpdateHeights.push(f);return}f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.REFINED;let T=o._tilesToRender.length,D=o._tileLoadQueueLow.length,F=o._tileLoadQueueMedium.length,L=o._tileLoadQueueHigh.length,R=o._tileToUpdateHeights.length;if(MBi(o,v,E,I,w,A,m,C),T!==o._tilesToRender.length){let k=C.allAreRenderable,U=C.anyWereRenderedLastFrame,V=C.notYetRenderableCount,H=!1;if(!k&&!U){let q=o._tilesToRender;for(let Z=T;Z<q.length;++Z){let oe=q[Z];for(;oe!==void 0&&oe._lastSelectionResult!==sa.KICKED&&oe!==f;)oe._lastSelectionResult=sa.kick(oe._lastSelectionResult),oe=oe.parent}o._tilesToRender.length=T,o._tileToUpdateHeights.length=R,M$(o,f),f._lastSelectionResult=sa.RENDERED;let ie=M===sa.RENDERED;!ie&&V>o.loadingDescendantLimit&&(o._tileLoadQueueLow.length=D,o._tileLoadQueueMedium.length=F,o._tileLoadQueueHigh.length=L,nM(o,o._tileLoadQueueMedium,f,A),C.notYetRenderableCount=f.renderable?0:1,H=!0),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=ie,ie||o._tileToUpdateHeights.push(f),++y.tilesWaitingForChildren}o.preloadAncestors&&!H&&nM(o,o._tileLoadQueueLow,f,A)}return}f._lastSelectionResultFrame=A.frameNumber,f._lastSelectionResult=sa.RENDERED,M$(o,f),nM(o,o._tileLoadQueueHigh,f,A),C.allAreRenderable=f.renderable,C.anyWereRenderedLastFrame=M===sa.RENDERED,C.notYetRenderableCount=f.renderable?0:1}function MBi(o,A,f,m,C,y,x,v){let E=y.camera.positionCartographic,I=o._tileProvider,w=o._occluders,Q=BCe[A.level],M=Q.southwest,B=Q.southeast,T=Q.northwest,D=Q.northeast;E.longitude<A.rectangle.east?E.latitude<A.rectangle.north?(ty(o,A,I,y,w,x,M),ty(o,f,I,y,w,x,B),ty(o,m,I,y,w,x,T),ty(o,C,I,y,w,x,D)):(ty(o,m,I,y,w,x,T),ty(o,A,I,y,w,x,M),ty(o,C,I,y,w,x,D),ty(o,f,I,y,w,x,B)):E.latitude<A.rectangle.north?(ty(o,f,I,y,w,x,B),ty(o,A,I,y,w,x,M),ty(o,C,I,y,w,x,D),ty(o,m,I,y,w,x,T)):(ty(o,C,I,y,w,x,D),ty(o,m,I,y,w,x,T),ty(o,f,I,y,w,x,B),ty(o,A,I,y,w,x,M)),Q.combine(v)}function PBi(o,A){let f=A.rectangle;return O(o._cameraPositionCartographic)&&Si.contains(f,o._cameraPositionCartographic)||O(o._cameraReferenceFrameOriginCartographic)&&Si.contains(f,o._cameraReferenceFrameOriginCartographic)}function ty(o,A,f,m,C,y,x){if(f.computeTileVisibility(A,m,C)!==vg.NONE)return TBi(o,m,A,y,x);if(++o._debug.tilesCulled,o._tileReplacementQueue.markTileRendered(A),x.allAreRenderable=!0,x.anyWereRenderedLastFrame=!1,x.notYetRenderableCount=0,PBi(o,A)){(!O(A.data)||!O(A.data.vertexArray))&&nM(o,o._tileLoadQueueMedium,A,m);let v=o._lastSelectionFrameNumber,E=A._lastSelectionResultFrame===v?A._lastSelectionResult:sa.NONE;E!==sa.CULLED_BUT_NEEDED&&E!==sa.RENDERED&&o._tileToUpdateHeights.push(A),A._lastSelectionResult=sa.CULLED_BUT_NEEDED}else(o.preloadSiblings||A.level===0)&&nM(o,o._tileLoadQueueLow,A,m),A._lastSelectionResult=sa.CULLED;A._lastSelectionResultFrame=m.frameNumber}function RBi(o,A,f){if(A.mode===xi.SCENE2D||A.camera.frustum instanceof Ds||A.camera.frustum instanceof Y0)return LBi(o,A,f);let m=o._tileProvider.getLevelMaximumGeometricError(f.level),C=f._distance,y=A.context.drawingBufferHeight,x=A.camera.frustum.sseDenominator,v=m*y/(C*x);return A.fog.enabled&&(v-=je.fog(C,A.fog.density)*A.fog.sse),v/=A.pixelRatio,v}function LBi(o,A,f){let m=A.camera.frustum;O(m._offCenterFrustum)&&(m=m._offCenterFrustum);let C=A.context,y=C.drawingBufferWidth,x=C.drawingBufferHeight,v=o._tileProvider.getLevelMaximumGeometricError(f.level),E=Math.max(m.top-m.bottom,m.right-m.left)/Math.max(y,x),I=v/E;return A.fog.enabled&&A.mode!==xi.SCENE2D&&(I-=je.fog(f._distance,A.fog.density)*A.fog.sse),I/=A.pixelRatio,I}function M$(o,A){o._tilesToRender.push(A)}function FBi(o,A){let f=o._tileLoadQueueHigh,m=o._tileLoadQueueMedium,C=o._tileLoadQueueLow;if(f.length===0&&m.length===0&&C.length===0)return;o._tileReplacementQueue.trimTiles(o.tileCacheSize);let y=GA()+o._loadQueueTimeSlice,x=o._tileProvider,v=X0e(o,A,x,y,f,!1);v=X0e(o,A,x,y,m,v),X0e(o,A,x,y,C,v)}function NBi(o,A){return o._loadPriority-A._loadPriority}function X0e(o,A,f,m,C,y){f.computeTileLoadPriority!==void 0&&C.sort(NBi);for(let x=0,v=C.length;x<v&&(GA()<m||!y);++x){let E=C[x];o._tileReplacementQueue.markTileRendered(E),f.loadTile(A,E),y=!0}return y}cw.prototype.isDestroyed=function(){return!1};cw.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var zU=new ls,Z0e=new Kt,IL=new ee,kBi=[];function OBi(o,A){if(!o.tileProvider.ready)return;let f=kBi;f.length=0;let m=o._tileToUpdateHeights,C=GA(),y=o._updateHeightsTimeSlice,x=C+y,v=A.mode,E=A.mapProjection,I=o.tileProvider.tilingScheme.ellipsoid,w;for(;m.length>0;){let Q=m[0];if(!O(Q.data)||!O(Q.data.mesh)){let D=Q._lastSelectionResultFrame===o._lastSelectionFrameNumber?Q._lastSelectionResult:sa.NONE;(D===sa.RENDERED||D===sa.CULLED_BUT_NEEDED)&&f.push(Q),m.shift(),o._lastTileIndex=0;continue}let M=Q.customData,B=M.length,T=!1;for(w=o._lastTileIndex;w<B;++w){let D=M[w],F=Q.data.terrainData,L=O(F)&&F.wasCreatedByUpsampling();if(Q.level>D.level&&!L){if(O(D.positionOnEllipsoidSurface)||(D.positionOnEllipsoidSurface=ee.fromRadians(D.positionCartographic.longitude,D.positionCartographic.latitude,0,I)),v===xi.SCENE3D){let k=I.geodeticSurfaceNormal(D.positionOnEllipsoidSurface,zU.direction),U=I.getSurfaceNormalIntersectionWithZAxis(D.positionOnEllipsoidSurface,11500,zU.origin);if(!O(U)){let V;O(Q.data.tileBoundingRegion)&&(V=Q.data.tileBoundingRegion.minimumHeight);let H=Math.min(Ae(V,0),-11500),q=ee.multiplyByScalar(k,Math.abs(H)+1,IL);ee.subtract(D.positionOnEllipsoidSurface,q,zU.origin)}}else Kt.clone(D.positionCartographic,Z0e),Z0e.height=-11500,E.project(Z0e,IL),ee.fromElements(IL.z,IL.x,IL.y,IL),ee.clone(IL,zU.origin),ee.clone(ee.UNIT_X,zU.direction);let R=Q.data.pick(zU,v,E,!1,IL);O(R)&&(D.callback(R),D.level=Q.level)}if(GA()>=x){T=!0;break}}if(T){o._lastTileIndex=w;break}else o._lastTileIndex=0,m.shift()}for(w=0;w<f.length;w++)m.push(f[w])}function UBi(o,A){let f=o._tileProvider,m=o._tilesToRender;for(let C=0,y=m.length;C<y;++C){let x=m[C];f.showTileThisFrame(x,A)}}var Not=cw;/*! rasterizeHTML.js - v1.3.0 - 2018-03-18
* http://www.github.com/cburgmer/rasterizeHTML.js
* Copyright (c) 2018 Christoph Burgmer; Licensed MIT */var kot={};(function(o){kot.rasterizeHTML=o()})(function(){return function o(A,f,m){function C(v,E){if(!f[v]){if(!A[v]){var I=typeof sM=="function"&&sM;if(!E&&I)return I(v,!0);if(y)return y(v,!0);var w=new Error("Cannot find module '"+v+"'");throw w.code="MODULE_NOT_FOUND",w}var Q=f[v]={exports:{}};A[v][0].call(Q.exports,function(M){var B=A[v][1][M];return C(B||M)},Q,Q.exports,o,A,f,m)}return f[v].exports}for(var y=typeof sM=="function"&&sM,x=0;x<m.length;x++)C(m[x]);return C}({1:[function(o,A,f){var m,C;C=function(y,x,v,E){var I=function(T){"use strict";var D={},F=[];return D.joinUrl=function(L,R){return L?T.resolve(L,R):R},D.getConstantUniqueIdFor=function(L){return F.indexOf(L)<0&&F.push(L),F.indexOf(L)},D.clone=function(L){var R,k={};for(R in L)L.hasOwnProperty(R)&&(k[R]=L[R]);return k},D.parseOptionalParameters=function(L){var R,k,U={canvas:null,options:{}};return L[0]==null||(R=L[0],typeof(k=R)=="object"&&k!==null&&Object.prototype.toString.apply(R).match(/\[object (Canvas|HTMLCanvasElement)\]/i))?(U.canvas=L[0]||null,U.options=D.clone(L[1])):U.options=D.clone(L[0]),U},D}(y),w=function(T){"use strict";var D={},F=function(L,R,k){var U=L[R];return L[R]=function(){var V=Array.prototype.slice.call(arguments);return k.apply(this,[V,U])},U};return D.baseUrlRespectingXhr=function(L,R){return function(){var k=new L;return F(k,"open",function(U,V){var H=U.shift(),q=U.shift(),ie=T.joinUrl(R,q);return V.apply(this,[H,ie].concat(U))}),k}},D.finishNotifyingXhr=function(L){var R,k=0,U=0,V=!1,H=new Promise(function(ie){R=function(){k-U<=0&&V&&ie({totalCount:k})}}),q=function(){var ie=new L;return F(ie,"send",function(Z,oe){return k+=1,oe.apply(this,arguments)}),ie.addEventListener("load",function(){U+=1,R()}),ie};return q.waitForRequestsToFinish=function(){return V=!0,R(),H},q},D}(I),Q=function(T){"use strict";var D={},F=function(R){return Array.prototype.slice.call(R)},L={active:!0,hover:!0,focus:!1,target:!1};return D.fakeUserAction=function(R,k,U){var V=R.querySelector(k),H=":"+U,q="rasterizehtml"+U;V&&(L[U]?T.addClassNameRecursively(V,q):T.addClassName(V,q),T.rewriteCssSelectorWith(R,H,"."+q))},D.persistInputValues=function(R){var k=R.querySelectorAll("input"),U=R.querySelectorAll("textarea"),V=function(H){return H.type==="checkbox"||H.type==="radio"};F(k).filter(V).forEach(function(H){H.checked?H.setAttribute("checked",""):H.removeAttribute("checked")}),F(k).filter(function(H){return!V(H)}).forEach(function(H){H.setAttribute("value",H.value)}),F(U).forEach(function(H){H.textContent=H.value})},D.rewriteTagNameSelectorsToLowerCase=function(R){T.lowercaseCssTypeSelectors(R,T.findHtmlOnlyNodeNames(R))},D}(function(){"use strict";var T={},D=function(k){return Array.prototype.slice.call(k)};T.addClassName=function(k,U){k.className+=" "+U},T.addClassNameRecursively=function(k,U){T.addClassName(k,U),k.parentNode!==k.ownerDocument&&T.addClassNameRecursively(k.parentNode,U)};var F=function(k,U){var V,H,q,ie,Z=k.cssText.replace(/^[^\{]+/,"");H=U+" "+Z,q=(V=k).parentStyleSheet,ie=D(q.cssRules).indexOf(V),q.insertRule(H,ie+1),q.deleteRule(ie)},L=function(k){var U;k.textContent=(U=k.sheet.cssRules,D(U).reduce(function(V,H){return V+H.cssText},""))},R=function(k,U,V){var H="((?:^|[^.#:\\w])|(?=\\W))("+U.join("|")+")(?=\\W|$)";D(k.querySelectorAll("style")).forEach(function(q){var ie,Z,oe;q.sheet===void 0&&(ie=q,Z=document.implementation.createHTMLDocument(""),(oe=document.createElement("style")).textContent=ie.textContent,Z.body.appendChild(oe),ie.sheet=oe.sheet);var ne=D(q.sheet.cssRules).filter(function(se){return se.selectorText&&new RegExp(H,"i").test(se.selectorText)});ne.length&&(ne.forEach(function(se){var ce=se.selectorText.replace(new RegExp(H,"gi"),function(j,de,me){return de+V(me)});ce!==se.selectorText&&F(se,ce)}),L(q))})};return T.rewriteCssSelectorWith=function(k,U,V){R(k,[U],function(){return V})},T.lowercaseCssTypeSelectors=function(k,U){R(k,U,function(V){return V.toLowerCase()})},T.findHtmlOnlyNodeNames=function(k){for(var U,V=k.ownerDocument.createTreeWalker(k,NodeFilter.SHOW_ELEMENT),H={},q={};U=V.currentNode.tagName.toLowerCase(),V.currentNode.namespaceURI==="http://www.w3.org/1999/xhtml"?H[U]=!0:q[U]=!0,V.nextNode(););return Object.keys(H).filter(function(ie){return!q[ie]})},T}()),M=function(T,D,F,L){"use strict";var R={};R.executeJavascript=function(q,ie){return new Promise(function(Z){var oe,ne,se,ce,j,de=(oe=L.document,ne="iframe",se=ie.width,ce=ie.height,(j=oe.createElement(ne)).style.visibility="hidden",j.style.width=se+"px",j.style.height=ce+"px",j.style.position="absolute",j.style.top=-1e4-ce+"px",j.style.left=-1e4-se+"px",oe.getElementsByTagName("body")[0].appendChild(j),j),me=q.outerHTML,_e=[],Be=ie.executeJsTimeout||0,Qe=function(){var W=de.contentDocument;L.document.getElementsByTagName("body")[0].removeChild(de),Z({document:W,errors:_e})},Ie=de.contentWindow.XMLHttpRequest,ve=D.finishNotifyingXhr(Ie),K=D.baseUrlRespectingXhr(ve,ie.baseUrl);de.onload=function(){var W;(W=Be,0<W?new Promise(function(te){setTimeout(te,W)}):Promise.resolve()).then(ve.waitForRequestsToFinish).then(Qe)},de.contentDocument.open(),de.contentWindow.XMLHttpRequest=K,de.contentWindow.onerror=function(W){_e.push({resourceType:"scriptExecution",msg:W})},de.contentDocument.write("<!DOCTYPE html>"),de.contentDocument.write(me),de.contentDocument.close()})};var k=function(q,ie,Z,oe,ne){var se,ce,j,de,me,_e,Be,Qe,Ie,ve,K,W=Math.max(q.scrollWidth,q.clientWidth),te=Math.max(q.scrollHeight,q.clientHeight);return ie?(se=(_e=function(Y,he){var fe=Y.querySelector(he);if(fe)return fe;if(Y.ownerDocument.querySelector(he)===Y)return Y;throw{message:"Clipping selector not found"}}(q,ie).getBoundingClientRect()).top,ce=_e.left,j=_e.width,de=_e.height):(ce=se=0,j=W,de=te),Qe={width:j,height:de},Ie=Z,ve=oe,K=ne,Be={width:Math.max(Qe.width*K,Ie),height:Math.max(Qe.height*K,ve)},me=L.getComputedStyle(q.ownerDocument.documentElement).fontSize,{left:ce,top:se,width:Be.width,height:Be.height,viewportWidth:W,viewportHeight:te,rootFontSize:me}};R.calculateDocumentContentSize=function(q,ie){return new Promise(function(Z,oe){var ne,se,ce,j,de,me,_e,Be,Qe,Ie,ve,K,W=ie.zoom||1;se=ie.width,ce=ie.height,j=W,Qe=Math.floor(se/j),Ie=Math.floor(ce/j),de=L.document,me=Qe,_e=Ie,(Be=de.createElement("iframe")).style.width=me+"px",Be.style.height=_e+"px",Be.style.visibility="hidden",Be.style.position="absolute",Be.style.top=-1e4-_e+"px",Be.style.left=-1e4-me+"px",Be.style.borderWidth=0,Be.sandbox="allow-same-origin",Be.scrolling="no",ne=Be,L.document.getElementsByTagName("body")[0].appendChild(ne),ne.onload=function(){var te,Y,he,fe=ne.contentDocument;try{te=k((Y=fe,he=q.tagName,Y.querySelector(he)),ie.clip,ie.width,ie.height,W),Z(te)}catch(Ce){oe(Ce)}finally{L.document.getElementsByTagName("body")[0].removeChild(ne)}},ne.contentDocument.open(),ne.contentDocument.write("<!DOCTYPE html>"),ne.contentDocument.write((K=(ve=q).tagName.toLowerCase())==="html"||K==="body"?ve.outerHTML:'<body style="margin: 0;">'+ve.outerHTML+"</body>"),ne.contentDocument.close()})},R.parseHtmlFragment=function(q){var ie=L.document.implementation.createHTMLDocument("");ie.documentElement.innerHTML=q;var Z=ie.querySelector("body").firstChild;if(!Z)throw"Invalid source";return Z},R.parseHTML=function(q){var ie=L.document.implementation.createHTMLDocument("");return ie.documentElement.innerHTML=q,function(Z,oe){var ne,se,ce,j,de=/<html((?:\s+[^>]*)?)>/im.exec(oe),me=L.document.implementation.createHTMLDocument("");if(de)for(ne="<div"+de[1]+"></div>",me.documentElement.innerHTML=ne,ce=me.querySelector("div"),se=0;se<ce.attributes.length;se++)j=ce.attributes[se],Z.documentElement.setAttribute(j.name,j.value)}(ie,q),ie};var U=function(q){try{return F.failOnParseError(q)}catch(ie){throw{message:"Invalid source",originalError:ie}}};R.validateXHTML=function(q){var ie=new DOMParser().parseFromString(q,"application/xml");U(ie)};var V=null,H=function(q,ie){return new Promise(function(Z,oe){var ne,se,ce=new window.XMLHttpRequest,j=T.joinUrl(ie.baseUrl,q),de=(ne=j,(se=ie.cache)==="none"||se==="repeated"?(V!==null&&se==="repeated"||(V=Date.now()),ne+"?_="+V):ne),me=function(_e){oe({message:"Unable to load page",originalError:_e})};ce.addEventListener("load",function(){ce.status===200||ce.status===0?Z(ce.responseXML):me(ce.statusText)},!1),ce.addEventListener("error",function(_e){me(_e)},!1);try{ce.open("GET",de,!0),ce.responseType="document",ce.send(null)}catch(_e){me(_e)}})};return R.loadDocument=function(q,ie){return H(q,ie).then(function(Z){return U(Z)})},R}(I,w,v,window),B=function(T){"use strict";var D,F={},L=function(q,ie){return ie?URL.createObjectURL(new Blob([q],{type:"image/svg+xml"})):"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(q)},R=function(q){q instanceof Blob&&URL.revokeObjectURL(q)},k='<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><foreignObject></foreignObject></svg>',U=function(q){return new Promise(function(ie,Z){var oe=document.createElement("canvas"),ne=new Image;ne.onload=function(){var se=oe.getContext("2d");try{se.drawImage(ne,0,0),oe.toDataURL("image/png"),ie(!0)}catch{ie(!1)}},ne.onerror=Z,ne.src=q})},V=function(){return new Promise(function(q,ie){var Z;(function(){if(T.Blob)try{return new Blob(["<b></b>"],{type:"text/xml"}),!0}catch{}return!1})()&&T.URL?(Z=L(k,!0),U(Z).then(function(oe){return R(Z),!oe&&U(L(k,!1)).then(function(ne){return ne})},function(){return!1})).then(function(oe){q(!oe)},function(){ie()}):q(!1)})},H=function(q){return(D===void 0&&(D=V()),D).then(function(ie){return L(q,ie)})};return F.renderSvg=function(q){return new Promise(function(ie,Z){var oe,ne,se=function(){oe&&R(oe)};(ne=new Image).onload=function(){ne.onload=null,ne.onerror=null,se(),ie(ne)},ne.onerror=function(){se(),Z()},H(q).then(function(ce){oe=ce,ne.src=oe},Z)})},F}(window);return function(T,D,F){"use strict";var L={};L.drawDocument=function(){var k,U,V,H,q,ie,Z,oe=arguments[0],ne=Array.prototype.slice.call(arguments,1),se=T.parseOptionalParameters(ne),ce=oe.documentElement?oe.documentElement:oe;return F.rasterize(ce,se.canvas,(V=(k=se).canvas,H=k.options,q=V?V.width:300,ie=V?V.height:200,Z={width:H.width!==void 0?H.width:q,height:H.height!==void 0?H.height:ie},(U=T.clone(k.options)).width=Z.width,U.height=Z.height,U))},L.drawHTML=function(){var k,U,V,H,q=arguments[0],ie=Array.prototype.slice.call(arguments,1),Z=T.parseOptionalParameters(ie);return k=q,U=Z.canvas,V=Z.options,H=D.parseHTML(k),L.drawDocument(H,U,V)};var R=function(k,U,V){return D.loadDocument(k,V).then(function(H){var q=function(ie,Z,oe){var ne=document.implementation.createHTMLDocument("");ne.replaceChild(ie.documentElement,ne.documentElement);var se=oe?T.clone(oe):{};return oe.baseUrl||(se.baseUrl=Z),{document:ne,options:se}}(H,k,V);return L.drawDocument(q.document,U,q.options)})};return L.drawURL=function(){var k=arguments[0],U=Array.prototype.slice.call(arguments,1),V=T.parseOptionalParameters(U);return R(k,V.canvas,V.options)},L}(I,M,function(T,D,F,L,R,k){"use strict";var U={},V=function(ie){return{message:"Error rendering page",originalError:ie}},H=function(ie){return R.renderSvg(ie).then(function(Z){return{image:Z,svg:ie}},function(Z){throw V(Z)})},q=function(ie,Z,oe){return L.drawDocumentAsSvg(ie,oe).then(H).then(function(ne){return Z&&function(se,ce){try{ce.getContext("2d").drawImage(se,0,0)}catch(j){throw V(j)}}(ne.image,Z),ne})};return U.rasterize=function(ie,Z,oe){var ne;return(ne=T.clone(oe)).inlineScripts=oe.executeJs===!0,k.inlineReferences(ie,ne).then(function(se){return oe.executeJs?(ce=ie,j=oe,D.executeJavascript(ce,j).then(function(de){var me=de.document;return F.persistInputValues(me),{document:me,errors:de.errors}})).then(function(de){return{element:de.document.documentElement,errors:se.concat(de.errors)}}):{element:ie,errors:se};var ce,j}).then(function(se){return q(se.element,Z,oe).then(function(ce){return{image:ce.image,svg:ce.svg,errors:se.errors}})})},U}(I,M,Q,function(T,D,F,L){"use strict";var R={},k=function(V){var H=Object.keys(V);return H.length?" "+H.map(function(q){return q+'="'+V[q]+'"'}).join(" "):""},U=function(V,H,q){var ie=L.serializeToString(V);D.validateXHTML(ie);var Z,oe,ne,se,ce,j,de,me,_e=(Z=H,oe=Math.round(Z.viewportWidth),ne=Math.round(Z.viewportHeight),{x:-Z.left,y:-Z.top,width:oe,height:ne});return ce=(se=_e).style||"",se.style=ce+"float: left;",_e.externalResourcesRequired=!0,'<svg xmlns="http://www.w3.org/2000/svg"'+k((de=q||1,me={width:(j=H).width,height:j.height,"font-size":j.rootFontSize},de!==1&&(me.style="transform:scale("+de+"); transform-origin: 0 0;"),me))+'><style scoped="">html::-webkit-scrollbar { display: none; }</style><foreignObject'+k(_e)+">"+ie+"</foreignObject></svg>"};return R.getSvgForDocument=function(V,H,q){return F.rewriteTagNameSelectorsToLowerCase(V),U(V,H,q)},R.drawDocumentAsSvg=function(V,H){return["hover","active","focus","target"].forEach(function(q){H[q]&&F.fakeUserAction(V,H[q],q)}),D.calculateDocumentContentSize(V,H).then(function(q){return R.getSvgForDocument(V,q,H.zoom)})},R}(0,M,Q,x),B,E))},(m=this)===void 0&&window!==void 0&&(m=window),typeof A=="object"&&A.exports?A.exports=C(o("url"),o("xmlserializer"),o("sane-domparser-error"),o("inlineresources")):m.rasterizeHTML=C(m.url,m.xmlserializer,m.sanedomparsererror,m.inlineresources)},{inlineresources:5,"sane-domparser-error":14,url:15,xmlserializer:17}],2:[function(o,A,f){(function(m){(function(C){typeof f=="object"&&A!==void 0?A.exports=C():(typeof window<"u"?window:m!==void 0?m:typeof self<"u"?self:this).cssFontFaceSrc=C()})(function(){return function C(y,x,v){function E(Q,M){if(!x[Q]){if(!y[Q]){var B=typeof o=="function"&&o;if(!M&&B)return B(Q,!0);if(I)return I(Q,!0);var T=new Error("Cannot find module '"+Q+"'");throw T.code="MODULE_NOT_FOUND",T}var D=x[Q]={exports:{}};y[Q][0].call(D.exports,function(F){var L=y[Q][1][F];return E(L||F)},D,D.exports,C,y,x,v)}return x[Q].exports}for(var I=typeof o=="function"&&o,w=0;w<v.length;w++)E(v[w]);return E}({1:[function(C,y,x){"use strict";function v(E,I,w,Q){this.message=E,this.expected=I,this.found=w,this.location=Q,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,v)}(function(E,I){function w(){this.constructor=E}w.prototype=I.prototype,E.prototype=new w})(v,Error),v.buildMessage=function(E,I){var w,Q={literal:function(D){return'"'+B(D.text)+'"'},class:function(D){var F,L="";for(F=0;F<D.parts.length;F++)L+=D.parts[F]instanceof Array?T(D.parts[F][0])+"-"+T(D.parts[F][1]):T(D.parts[F]);return"["+(D.inverted?"^":"")+L+"]"},any:function(D){return"any character"},end:function(D){return"end of input"},other:function(D){return D.description}};function M(D){return D.charCodeAt(0).toString(16).toUpperCase()}function B(D){return D.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(F){return"\\x0"+M(F)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(F){return"\\x"+M(F)})}function T(D){return D.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(F){return"\\x0"+M(F)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(F){return"\\x"+M(F)})}return"Expected "+function(D){var F,L,R,k=new Array(D.length);for(F=0;F<D.length;F++)k[F]=(R=D[F],Q[R.type](R));if(k.sort(),0<k.length){for(L=F=1;F<k.length;F++)k[F-1]!==k[F]&&(k[L]=k[F],L++);k.length=L}switch(k.length){case 1:return k[0];case 2:return k[0]+" or "+k[1];default:return k.slice(0,-1).join(", ")+", or "+k[k.length-1]}}(E)+" but "+((w=I)?'"'+B(w)+'"':"end of input")+" found."},y.exports={SyntaxError:v,parse:function(E,I){I=I!==void 0?I:{};var w,Q={},M={start:Ne},B=Ne,T="",D=function(){return[]},F=",",L=he(",",!1),R=function(ze,Ze){return[ze].concat(Ze)},k=function(ze){return[ze]},U=function(ze,Ze){return{url:ze,format:Ze}},V=function(ze){return{url:ze}},H="url(",q=he("url(",!1),ie=")",Z=he(")",!1),oe=function(ze){return ze},ne="format(",se=he("format(",!1),ce="local(",j=he("local(",!1),de=function(ze){return{local:ze}},me=/^[^)]/,_e=fe([")"],!0,!1),Be=function(ze){return ht.extractValue(ze.join(""))},Qe=/^[ \t\r\n\f]/,Ie=fe([" ","   ","\r",`
`,"\f"],!1,!1),ve=0,K=[{line:1,column:1}],W=0,te=[],Y=0;if("startRule"in I){if(!(I.startRule in M))throw new Error(`Can't start parsing from rule "`+I.startRule+'".');B=M[I.startRule]}function he(ze,Ze){return{type:"literal",text:ze,ignoreCase:Ze}}function fe(ze,Ze,ct){return{type:"class",parts:ze,inverted:Ze,ignoreCase:ct}}function Ce(ze){var Ze,ct=K[ze];if(ct)return ct;for(Ze=ze-1;!K[Ze];)Ze--;for(ct={line:(ct=K[Ze]).line,column:ct.column};Ze<ze;)E.charCodeAt(Ze)===10?(ct.line++,ct.column=1):ct.column++,Ze++;return K[ze]=ct}function Ee(ze,Ze){var ct=Ce(ze),We=Ce(Ze);return{start:{offset:ze,line:ct.line,column:ct.column},end:{offset:Ze,line:We.line,column:We.column}}}function be(ze){ve<W||(W<ve&&(W=ve,te=[]),te.push(ze))}function Re(ze,Ze,ct){return new v(v.buildMessage(ze,Ze),ze,Ze,ct)}function Ne(){var ze,Ze;return(ze=function ct(){var We,Oe,Ye,rt,gt,Et;if(We=ve,(Oe=Je())!==Q){for(Ye=[],rt=$e();rt!==Q;)Ye.push(rt),rt=$e();if(Ye!==Q)if(E.charCodeAt(ve)===44?(rt=F,ve++):(rt=Q,Y===0&&be(L)),rt!==Q){for(gt=[],Et=$e();Et!==Q;)gt.push(Et),Et=$e();gt!==Q&&(Et=ct())!==Q?(Oe=R(Oe,Et),We=Oe):(ve=We,We=Q)}else ve=We,We=Q;else ve=We,We=Q}else ve=We,We=Q;return We===Q&&(We=ve,(Oe=Je())!==Q&&(Oe=k(Oe)),We=Oe),We}())===Q&&(ze=ve,(Ze=T)!==Q&&(Ze=D()),ze=Ze),ze}function Je(){var ze,Ze,ct,We,Oe;return(ze=function(){var Ye,rt,gt,Et,yt,vt,Rt,qt;if(Ye=ve,(rt=ot())!==Q){if(gt=[],(Et=$e())!==Q)for(;Et!==Q;)gt.push(Et),Et=$e();else gt=Q;gt!==Q&&(yt=ve,E.substr(ve,7)===ne?(vt=ne,ve+=7):(vt=Q,Y===0&&be(se)),vt!==Q&&(Rt=nt())!==Q?(E.charCodeAt(ve)===41?(qt=ie,ve++):(qt=Q,Y===0&&be(Z)),qt!==Q?(vt=oe(Rt),yt=vt):(ve=yt,yt=Q)):(ve=yt,yt=Q),(Et=yt)!==Q)?(rt=U(rt,Et),Ye=rt):(ve=Ye,Ye=Q)}else ve=Ye,Ye=Q;return Ye===Q&&(Ye=ve,(rt=ot())!==Q&&(rt=V(rt)),Ye=rt),Ye}())===Q&&(Ze=ve,E.substr(ve,6)===ce?(ct=ce,ve+=6):(ct=Q,Y===0&&be(j)),ct!==Q&&(We=nt())!==Q?(E.charCodeAt(ve)===41?(Oe=ie,ve++):(Oe=Q,Y===0&&be(Z)),Oe!==Q?(ct=de(We),Ze=ct):(ve=Ze,Ze=Q)):(ve=Ze,Ze=Q),ze=Ze),ze}function ot(){var ze,Ze,ct,We;return ze=ve,E.substr(ve,4)===H?(Ze=H,ve+=4):(Ze=Q,Y===0&&be(q)),Ze!==Q&&(ct=nt())!==Q?(E.charCodeAt(ve)===41?(We=ie,ve++):(We=Q,Y===0&&be(Z)),We!==Q?ze=Ze=oe(ct):(ve=ze,ze=Q)):(ve=ze,ze=Q),ze}function nt(){var ze,Ze;if(ze=[],me.test(E.charAt(ve))?(Ze=E.charAt(ve),ve++):(Ze=Q,Y===0&&be(_e)),Ze!==Q)for(;Ze!==Q;)ze.push(Ze),me.test(E.charAt(ve))?(Ze=E.charAt(ve),ve++):(Ze=Q,Y===0&&be(_e));else ze=Q;return ze!==Q&&(ze=Be(ze)),ze}function $e(){var ze;return Qe.test(E.charAt(ve))?(ze=E.charAt(ve),ve++):(ze=Q,Y===0&&be(Ie)),ze}var ht=C("../util");if((w=B())!==Q&&ve===E.length)return w;throw w!==Q&&ve<E.length&&be({type:"end"}),Re(te,W<E.length?E.charAt(W):null,W<E.length?Ee(W,W+1):Ee(W,W))}}},{"../util":3}],2:[function(C,y,x){var v=C("./grammar");x.SyntaxError=function(E,I){this.message=E,this.offset=I},x.parse=function(E){try{return v.parse(E)}catch(I){throw new x.SyntaxError(I.message,I.offset)}},x.serialize=function(E){return E.map(function(I){var w;return I.url?(w='url("'+I.url+'")',I.format&&(w+=' format("'+I.format+'")')):w='local("'+I.local+'")',w}).join(", ")}},{"./grammar":1}],3:[function(C,y,x){x.extractValue=function(v){return E=v.replace(/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/,"$1"),w=/^'(.*)'$/,(I=/^"(.*)"$/).test(E)?E.replace(I,"$1"):w.test(E)?E.replace(w,"$1"):E;var E,I,w}},{}]},{},[2])(2)})}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],3:[function(o,A,f){"use strict";var m=o("./cssSupport");f.extractCssUrl=function(C){var y,x=/^url\(("[^"]+"|'[^']+'|[^\)]+)\)/;if(!x.test(C))throw new Error("Invalid url");return y=x.exec(C)[1],m.unquoteString(y.replace(/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/,"$1"))},f.parse=function(C){return function(y){var x,v=`(url\\(\\s*(?:"[^"]*"|'[^']*'|[^\\(]+)\\s*\\)|[^,\\s]+)`,E="(?:\\s*"+v+")+",I=new RegExp(E,"g"),w=[],Q=function(M){var B,T=new RegExp(v,"g"),D=[];for(B=T.exec(M);B;)D.push(B[1]),B=T.exec(M);return D};if(y.match(new RegExp(`^\\s*((?:\\s*(url\\(\\s*(?:"[^"]*"|'[^']*'|[^\\(]+)\\s*\\)|[^,\\s]+))+)(?:\\s*,\\s*((?:\\s*(url\\(\\s*(?:"[^"]*"|'[^']*'|[^\\(]+)\\s*\\)|[^,\\s]+))+))*\\s*$`))){for(x=I.exec(y);x;)w.push(Q(x[0])),x=I.exec(y);return w}return[]}(C).map(function(y){var x=function(v){var E;for(E=0;E<v.length;E++)try{return{url:f.extractCssUrl(v[E]),idx:E}}catch{}}(y);return x?{preUrl:y.slice(0,x.idx),url:x.url,postUrl:y.slice(x.idx+1)}:{preUrl:y}})},f.serialize=function(C){return C.map(function(y){var x=[].concat(y.preUrl);return y.url&&x.push('url("'+y.url+'")'),y.postUrl&&(x=x.concat(y.postUrl)),x.join(" ")}).join(", ")}},{"./cssSupport":4}],4:[function(o,A,f){"use strict";f.unquoteString=function(m){var C=/^"(.*)"$/,y=/^'(.*)'$/;return C.test(m)?m.replace(C,"$1"):y.test(m)?m.replace(y,"$1"):m},f.rulesForCssText=function(m){var C,y=document.implementation.createHTMLDocument(""),x=document.createElement("style");return x.textContent=m,y.body.appendChild(x),C=x.sheet.cssRules,Array.prototype.slice.call(C)},f.cssRulesToText=function(m){return m.reduce(function(C,y){return C+y.cssText},"")},f.exchangeRule=function(m,C,y){m[m.indexOf(C)]=f.rulesForCssText(y)[0]},f.changeFontFaceRuleSrc=function(m,C,y){var x="@font-face { font-family: "+C.style.getPropertyValue("font-family")+"; ";C.style.getPropertyValue("font-style")&&(x+="font-style: "+C.style.getPropertyValue("font-style")+"; "),C.style.getPropertyValue("font-weight")&&(x+="font-weight: "+C.style.getPropertyValue("font-weight")+"; "),x+="src: "+y+"}",f.exchangeRule(m,C,x)}},{}],5:[function(o,A,f){"use strict";var m=o("./util"),C=o("./inlineImage"),y=o("./inlineScript"),x=o("./inlineCss"),v=o("./cssSupport"),E=function(M){return M.map(function(B,T){var D;return T===M.length-1&&(B={baseUrl:(D=B.baseUrl,m.joinUrl(D,"."))}),JSON.stringify(B)})},I=function(M,B){return B.cache!==!1&&B.cache!=="none"&&B.cacheBucket?m.memoize(M,E,B.cacheBucket):M},w=function(M,B,T){var D=v.rulesForCssText(M);return x.loadCSSImportsForRules(D,B,T).then(function(F){return x.loadAndInlineCSSResourcesForRules(D,T).then(function(L){var R=F.errors.concat(L.errors),k=F.hasChanges||L.hasChanges;return k&&(M=v.cssRulesToText(D)),{hasChanges:k,content:M,errors:R}})})};f.loadAndInlineStyles=function(M,B){var T,D,F=(D=M.getElementsByTagName("style"),Array.prototype.filter.call(D,function(k){return!k.attributes.type||k.attributes.type.value==="text/css"})),L=[],R=[];return(T=m.clone(B)).baseUrl=T.baseUrl||m.getDocumentBaseUrl(M),Promise.all(F.map(function(k){return(U=k,V=T,H=R,q=U.textContent,I(w,V)(q,H,V).then(function(ie){return ie.hasChanges&&(U.childNodes[0].nodeValue=ie.content),m.cloneArray(ie.errors)})).then(function(ie){L=L.concat(ie)});var U,V,H,q})).then(function(){return L})};var Q=function(M,B){return m.ajax(M,B).then(function(T){return{content:T,cssRules:v.rulesForCssText(T)}}).then(function(T){var D=x.adjustPathsOfCssResources(M,T.cssRules);return{content:T.content,cssRules:T.cssRules,hasChanges:D}}).then(function(T){return x.loadCSSImportsForRules(T.cssRules,[],B).then(function(D){return{content:T.content,cssRules:T.cssRules,hasChanges:T.hasChanges||D.hasChanges,errors:D.errors}})}).then(function(T){return x.loadAndInlineCSSResourcesForRules(T.cssRules,B).then(function(D){return{content:T.content,cssRules:T.cssRules,hasChanges:T.hasChanges||D.hasChanges,errors:T.errors.concat(D.errors)}})}).then(function(T){var D=T.content;return T.hasChanges&&(D=v.cssRulesToText(T.cssRules)),{content:D,errors:T.errors}})};f.loadAndInlineCssLinks=function(M,B){var T,D=(T=M.getElementsByTagName("link"),Array.prototype.filter.call(T,function(L){return L.attributes.rel&&L.attributes.rel.value==="stylesheet"&&(!L.attributes.type||L.attributes.type.value==="text/css")})),F=[];return Promise.all(D.map(function(L){return(R=L,k=B,U=R.attributes.href.value,V=m.getDocumentBaseUrl(R.ownerDocument),H=m.clone(k),!H.baseUrl&&V&&(H.baseUrl=V),I(Q,k)(U,H).then(function(q){return{content:q.content,errors:m.cloneArray(q.errors)}})).then(function(q){var ie,Z,oe,ne;ie=L,Z=q.content+`
@@ -14078,27 +14078,14 @@
            material.diffuse = material.diffuse * u_backgroundBrightness + diffuse;
        }`})}function t1i(o,A,f,m,C,y,x){let v=$Bi(A,f,y,x);o.spotMaterial=v,m.preUpdate.addEventListener(function(){let E=m.camera.viewMatrix,I=new Xe;Xe.multiply(E,C,I),Xe.toArray(I,oie),v&&(v.uniforms.u_spotmodelViewMatrix=oie)})}function i1i(o,A,f,m,C,y,x,v){let E=Hot(A,f,y,x,v);o.customShader=E,m.preUpdate.addEventListener(function(){let I=m.camera.viewMatrix,w=new Xe;Xe.multiply(I,C,w),E.setUniform("u_spotmodelViewMatrix",w)})}function r1i(o,A,f,m,C,y,x){let v=Hot(A,f,y,x);o.customShader=v,m.preUpdate.addEventListener(function(){let E=m.camera.viewMatrix,I=new Xe;Xe.multiply(E,C,I),v.setUniform("u_spotmodelViewMatrix",I)})}function tae(o,A={},f=[]){!O(o)||(this._viewer=o,this._texture=void 0,!(!O(A)&&!(O(A.globe)&&O(A.tileset)&&O(A.gltf)))&&this.initialize(o,A,f))}tae.prototype.reSet=function(o={},A=[]){this._texture&&(this._texture.destroy(),this._texture=void 0),this.initialize(this._viewer,o,A)};tae.prototype.destroy=function(o){!O(o)&&!(O(o.globe)&&O(o.tileset)&&O(o.gltf))||(O(o.globe)&&o.globe.spotMaterial&&(o.globe.spotMaterial=void 0),O(o.tileset)&&o.tileset.customShader&&(o.tileset.customShader=null),O(o.gltf)&&o.gltf.customShader&&(o.gltf.customShader=null),this._texture&&(this._texture.destroy(),this._texture=void 0))};tae.prototype.initialize=function(o,A,f){if(!O(A)&&!(O(A.globe)&&O(A.tileset)&&O(A.gltf)))return;let m=Ae(A.globeBrightness,.2),C=Ae(A.gltfBrightness,.2),y=Ae(A.tilesetBrightness,.2),x=Ae(A.gltfLightModel,rI.PBR),v=Ae(A.tilesetLightModel,rI.PBR);if(!Array.isArray(f)||f.length===0)return;let E=o.scene,I=Vn.eastNorthUpToFixedFrame(f[0].position),w=new Xe;Xe.inverseTransformation(I,w);let Q=[],M=new ee;for(let D=0;D<f.length;D++){let F=f[D];Xe.multiplyByPoint(w,F.position,M),Q.push(M.x,M.y,M.z),Q.push(F.direction.x,F.direction.y,F.direction.z),Q.push(F.spotColor.red,F.spotColor.green,F.spotColor.blue),Q.push(F.distance,Math.cos(F.cutOff/180*3.1415),Math.cos(F.outerCutOff/180*3.1415))}let B=!1,T=ZBi(Q,E.context,B);this._texture=T,A.globe&&t1i(A.globe,T,Q,E,I,B,m),A.tileset&&i1i(A.tileset,T,Q,E,I,B,y,v),A.gltf&&r1i(A.gltf,T,Q,E,I,B,C,x)};var Vot=tae,zot=/{[^}]+}/g,Kot={x:s1i,y:u1i,z:h1i,s:d1i,reverseX:l1i,reverseY:c1i,reverseZ:A1i,westDegrees:f1i,southDegrees:g1i,eastDegrees:p1i,northDegrees:m1i,westProjected:C1i,southProjected:y1i,eastProjected:x1i,northProjected:v1i,width:E1i,height:I1i},n1i=ia(Kot,{i:_1i,j:B1i,reverseI:w1i,reverseJ:b1i,longitudeDegrees:S1i,latitudeDegrees:D1i,longitudeProjected:T1i,latitudeProjected:M1i,format:R1i});function _O(o){this._errorEvent=new Event,this._resource=void 0,this._urlSchemeZeroPadding=void 0,this._pickFeaturesResource=void 0,this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._minimumLevel=void 0,this._tilingScheme=void 0,this._rectangle=void 0,this._tileDiscardPolicy=void 0,this._credit=void 0,this._hasAlphaChannel=void 0,this._readyPromise=void 0,this._tags=void 0,this._pickFeaturesTags=void 0,this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this.enablePickFeatures=!0,this.reinitialize(o)}Object.defineProperties(_O.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return O(this._resource)}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return this._hasAlphaChannel}}});_O.prototype.reinitialize=function(o){let A=this;A._readyPromise=Promise.resolve(o).then(function(f){let m=f.customTags,C=ia(Kot,m),y=ia(n1i,m),x=An.createIfNeeded(f.url),v=An.createIfNeeded(f.pickFeaturesUrl);A.enablePickFeatures=Ae(f.enablePickFeatures,A.enablePickFeatures),A._urlSchemeZeroPadding=Ae(f.urlSchemeZeroPadding,A.urlSchemeZeroPadding),A._tileDiscardPolicy=f.tileDiscardPolicy,A._getFeatureInfoFormats=f.getFeatureInfoFormats,A._subdomains=f.subdomains,Array.isArray(A._subdomains)?A._subdomains=A._subdomains.slice():O(A._subdomains)&&A._subdomains.length>0?A._subdomains=A._subdomains.split(""):A._subdomains=["a","b","c"],A._tileWidth=Ae(f.tileWidth,256),A._tileHeight=Ae(f.tileHeight,256),A._minimumLevel=Ae(f.minimumLevel,0),A._maximumLevel=f.maximumLevel,A._tilingScheme=Ae(f.tilingScheme,new Am({ellipsoid:f.ellipsoid})),A._rectangle=Ae(f.rectangle,A._tilingScheme.rectangle),A._rectangle=Si.intersection(A._rectangle,A._tilingScheme.rectangle),A._hasAlphaChannel=Ae(f.hasAlphaChannel,!0);let E=f.credit;return typeof E=="string"&&(E=new tl(E)),A._credit=E,A._resource=x,A._tags=C,A._pickFeaturesResource=v,A._pickFeaturesTags=y,!0})};_O.prototype.getTileCredits=function(o,A,f){};_O.prototype.requestImage=function(o,A,f,m){let C=o1i(this,o,A,f,m),y=a2.loadImage(this,C);return typeof this.loadtitle=="function"&&this.loadtitle(C),y};_O.prototype.loadtitle=function(o){};_O.prototype.pickFeatures=function(o,A,f,m,C){if(!this.enablePickFeatures||!O(this._pickFeaturesResource)||this._getFeatureInfoFormats.length===0)return;let y=0,x=this;function v(I,w){return I.callback(w)}function E(){if(y>=x._getFeatureInfoFormats.length)return Promise.resolve([]);let I=x._getFeatureInfoFormats[y],w=a1i(x,o,A,f,m,C,I.format);return++y,I.type==="json"?w.fetchJson().then(I.callback).otherwise(E):I.type==="xml"?w.fetchXML().then(I.callback).otherwise(E):I.type==="text"||I.type==="html"?w.fetchText().then(I.callback).otherwise(E):w.fetch({responseType:I.format}).then(v.bind(void 0,I)).otherwise(E)}return E()};var aie=!1,D_=new Si,sie=!1,eW=new Si;function o1i(o,A,f,m,C){aie=!1,sie=!1;let y=o._resource,x=y.getUrlComponent(!0),v=o._tags,E={},I=x.match(zot);return O(I)&&I.forEach(function(w){let Q=w.substring(1,w.length-1);O(v[Q])&&(E[Q]=v[Q](o,A,f,m))}),y.getDerivedResource({request:C,templateValues:E})}var wCe=!1,N8=new It,bCe=!1;function a1i(o,A,f,m,C,y,x){aie=!1,sie=!1,wCe=!1,bCe=!1;let v=o._pickFeaturesResource,E=v.getUrlComponent(!0),I=o._pickFeaturesTags,w={},Q=E.match(zot);return O(Q)&&Q.forEach(function(M){let B=M.substring(1,M.length-1);O(I[B])&&(w[B]=I[B](o,A,f,m,C,y,x))}),v.getDerivedResource({templateValues:w})}function cH(o,A,f){if(o&&o.urlSchemeZeroPadding&&o.urlSchemeZeroPadding.hasOwnProperty(A)){let m=o.urlSchemeZeroPadding[A];if(typeof m=="string"){let C=m.length;C>1&&(f=f.length>=C?f:new Array(C-f.toString().length+1).join("0")+f)}}return f}function s1i(o,A,f,m){return cH(o,"{x}",A)}function l1i(o,A,f,m){let C=o.tilingScheme.getNumberOfXTilesAtLevel(m)-A-1;return cH(o,"{reverseX}",C)}function u1i(o,A,f,m){return cH(o,"{y}",f)}function c1i(o,A,f,m){let C=o.tilingScheme.getNumberOfYTilesAtLevel(m)-f-1;return cH(o,"{reverseY}",C)}function A1i(o,A,f,m){let C=o.maximumLevel,y=O(C)&&m<C?C-m-1:m;return cH(o,"{reverseZ}",y)}function h1i(o,A,f,m){return cH(o,"{z}",m)}function d1i(o,A,f,m){let C=(A+f+m)%o._subdomains.length;return o._subdomains[C]}function iae(o,A,f,m){aie||(o.tilingScheme.tileXYToRectangle(A,f,m,D_),D_.west=je.toDegrees(D_.west),D_.south=je.toDegrees(D_.south),D_.east=je.toDegrees(D_.east),D_.north=je.toDegrees(D_.north),aie=!0)}function f1i(o,A,f,m){return iae(o,A,f,m),D_.west}function g1i(o,A,f,m){return iae(o,A,f,m),D_.south}function p1i(o,A,f,m){return iae(o,A,f,m),D_.east}function m1i(o,A,f,m){return iae(o,A,f,m),D_.north}function rae(o,A,f,m){sie||(o.tilingScheme.tileXYToNativeRectangle(A,f,m,eW),sie=!0)}function C1i(o,A,f,m){return rae(o,A,f,m),eW.west}function y1i(o,A,f,m){return rae(o,A,f,m),eW.south}function x1i(o,A,f,m){return rae(o,A,f,m),eW.east}function v1i(o,A,f,m){return rae(o,A,f,m),eW.north}function E1i(o,A,f,m){return o.tileWidth}function I1i(o,A,f,m){return o.tileHeight}function _1i(o,A,f,m,C,y,x){return nae(o,A,f,m,C,y),N8.x}function B1i(o,A,f,m,C,y,x){return nae(o,A,f,m,C,y),N8.y}function w1i(o,A,f,m,C,y,x){return nae(o,A,f,m,C,y),o.tileWidth-N8.x-1}function b1i(o,A,f,m,C,y,x){return nae(o,A,f,m,C,y),o.tileHeight-N8.y-1}var Q1i=new Si,$G=new ee;function nae(o,A,f,m,C,y,x){if(wCe)return;uDe(o,A,f,m,C,y);let v=$G,E=o.tilingScheme.tileXYToNativeRectangle(A,f,m,Q1i);N8.x=o.tileWidth*(v.x-E.west)/E.width|0,N8.y=o.tileHeight*(E.north-v.y)/E.height|0,wCe=!0}function S1i(o,A,f,m,C,y,x){return je.toDegrees(C)}function D1i(o,A,f,m,C,y,x){return je.toDegrees(y)}function T1i(o,A,f,m,C,y,x){return uDe(o,A,f,m,C,y),$G.x}function M1i(o,A,f,m,C,y,x){return uDe(o,A,f,m,C,y),$G.y}var P1i=new Kt;function uDe(o,A,f,m,C,y,x){if(!bCe){if(o.tilingScheme.projection instanceof Dg)$G.x=je.toDegrees(C),$G.y=je.toDegrees(y);else{let v=P1i;v.longitude=C,v.latitude=y,o.tilingScheme.projection.project(v,$G)}bCe=!0}}function R1i(o,A,f,m,C,y,x){return x}var Yot=_O;function YF(o){this._definitionChanged=new br,this.baseWaterColor=Ae(o.baseWaterColor,new At(.2,.3,.6,.5)),this.waterFrequency=Ae(o.waterFrequency,1e3),this.animationSpeed=Ae(o.animationSpeed,.01),this.amplitude=Ae(o.amplitude,10),this._translucnet=Ae(o.translucent,!0),this._time=new Date().getTime()}Object.defineProperties(YF.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}});YF.prototype.getType=function(o){return ss.WaterType};YF.prototype.getValue=function(o,A){return O(A)||(A={}),A.normalMap=xs("Assets/Images/waterNormals.jpg"),A.baseWaterColor=this.baseWaterColor,A.frequency=this.waterFrequency,A.animationSpeed=this.animationSpeed,A.amplitude=this.amplitude,A};YF.prototype.update=function(){let o=fi.now();return this.getValue(o)};YF.prototype.isTranslucent=function(){return this._translucnet};YF.prototype.equals=function(o){return this===o||o instanceof YF&&Nt.equals(this.baseWaterColor,o.baseWaterColor)};var Jot=YF,L1i=At.WHITE,F1i=At.BLACK,N1i=new It(2,2);function k8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=o.evenColor,this.oddColor=o.oddColor,this.repeat=o.repeat}Object.defineProperties(k8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._evenColor)&&Nt.isConstant(this._oddColor)&&Nt.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:Bi("evenColor"),oddColor:Bi("oddColor"),repeat:Bi("repeat")});k8.prototype.getType=function(o){return"Checkerboard"};k8.prototype.getValue=function(o,A){return O(A)||(A={}),A.lightColor=Nt.getValueOrClonedDefault(this._evenColor,o,L1i,A.lightColor),A.darkColor=Nt.getValueOrClonedDefault(this._oddColor,o,F1i,A.darkColor),A.repeat=Nt.getValueOrDefault(this._repeat,o,N1i),A};k8.prototype.equals=function(o){return this===o||o instanceof k8&&Nt.equals(this._evenColor,o._evenColor)&&Nt.equals(this._oddColor,o._oddColor)&&Nt.equals(this._repeat,o._repeat)};var lie=k8,uie={id:void 0},e8=new Array(2);function QCe(o){let A=o.propertyNames,f=A.length;for(let m=0;m<f;m++)o[A[m]]=void 0;o._name=void 0,o._availability=void 0}function Wot(o,A,f,m){e8[0]=f,e8[1]=m.id,A[JSON.stringify(e8)]=m.definitionChanged.addEventListener(Sg.prototype._onDefinitionChanged,o)}function jot(o,A,f,m){e8[0]=f,e8[1]=m.id;let C=JSON.stringify(e8);A[C](),A[C]=void 0}function CN(o){if(o._shouldRecomposite=!0,o._suspendCount!==0)return;let A=o._collections,f=A.length,m=o._collectionsCopy,C=m.length,y,x,v,E,I,w=o._composite,Q=new iw(o),M=o._eventHash,B;for(y=0;y<C;y++)for(I=m[y],I.collectionChanged.removeEventListener(Sg.prototype._onCollectionChanged,o),v=I.values,B=I.id,E=v.length-1;E>-1;E--)x=v[E],jot(o,M,B,x);for(y=f-1;y>=0;y--)for(I=A[y],I.collectionChanged.addEventListener(Sg.prototype._onCollectionChanged,o),v=I.values,B=I.id,E=v.length-1;E>-1;E--){x=v[E],Wot(o,M,B,x);let D=Q.getById(x.id);O(D)||(D=w.getById(x.id),O(D)?QCe(D):(uie.id=x.id,D=new UA(uie)),Q.add(D)),D.merge(x)}o._collectionsCopy=A.slice(0),w.suspendEvents(),w.removeAll();let T=Q.values;for(y=0;y<T.length;y++)w.add(T[y]);w.resumeEvents()}function Sg(o,A){this._owner=A,this._composite=new iw(this),this._suspendCount=0,this._collections=O(o)?o.slice():[],this._collectionsCopy=[],this._id=Vu(),this._eventHash={},CN(this),this._shouldRecomposite=!1}Object.defineProperties(Sg.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}});Sg.prototype.addCollection=function(o,A){O(A)?this._collections.splice(A,0,o):(A=this._collections.length,this._collections.push(o)),CN(this)};Sg.prototype.removeCollection=function(o){let A=this._collections.indexOf(o);return A!==-1?(this._collections.splice(A,1),CN(this),!0):!1};Sg.prototype.removeAllCollections=function(){this._collections.length=0,CN(this)};Sg.prototype.containsCollection=function(o){return this._collections.indexOf(o)!==-1};Sg.prototype.contains=function(o){return this._composite.contains(o)};Sg.prototype.indexOfCollection=function(o){return this._collections.indexOf(o)};Sg.prototype.getCollection=function(o){return this._collections[o]};Sg.prototype.getCollectionsLength=function(){return this._collections.length};function oae(o,A){return o.indexOf(A)}function qot(o,A,f){let m=o._collections;if(A=je.clamp(A,0,m.length-1),f=je.clamp(f,0,m.length-1),A===f)return;let C=m[A];m[A]=m[f],m[f]=C,CN(o)}Sg.prototype.raiseCollection=function(o){let A=oae(this._collections,o);qot(this,A,A+1)};Sg.prototype.lowerCollection=function(o){let A=oae(this._collections,o);qot(this,A,A-1)};Sg.prototype.raiseCollectionToTop=function(o){let A=oae(this._collections,o);A!==this._collections.length-1&&(this._collections.splice(A,1),this._collections.push(o),CN(this))};Sg.prototype.lowerCollectionToBottom=function(o){let A=oae(this._collections,o);A!==0&&(this._collections.splice(A,1),this._collections.splice(0,0,o),CN(this))};Sg.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()};Sg.prototype.resumeEvents=function(){this._suspendCount--,this._shouldRecomposite&&this._suspendCount===0&&(CN(this),this._shouldRecomposite=!1),this._composite.resumeEvents()};Sg.prototype.computeAvailability=function(){return this._composite.computeAvailability()};Sg.prototype.getById=function(o){return this._composite.getById(o)};Sg.prototype._onCollectionChanged=function(o,A,f){let m=this._collectionsCopy,C=m.length,y=this._composite;y.suspendEvents();let x,v,E,I,w=f.length,Q=this._eventHash,M=o.id;for(x=0;x<w;x++){let T=f[x];jot(this,Q,M,T);let D=T.id;for(v=C-1;v>=0;v--)E=m[v].getById(D),O(E)&&(O(I)||(I=y.getById(D),QCe(I)),I.merge(E));O(I)||y.removeById(D),I=void 0}let B=A.length;for(x=0;x<B;x++){let T=A[x];Wot(this,Q,M,T);let D=T.id;for(v=C-1;v>=0;v--)E=m[v].getById(D),O(E)&&(O(I)||(I=y.getById(D),O(I)?QCe(I):(uie.id=D,I=new UA(uie),y.add(I))),I.merge(E));I=void 0}y.resumeEvents()};Sg.prototype._onDefinitionChanged=function(o,A,f,m){let C=this._collections,y=this._composite,x=C.length,v=o.id,E=y.getById(v),I=E[A],w=!O(I),Q=!0;for(let M=x-1;M>=0;M--){let B=C[M].getById(o.id);if(O(B)){let T=B[A];if(O(T)){if(Q)if(Q=!1,O(T.merge)&&O(T.clone))I=T.clone(I);else{I=T;break}I.merge(T)}}}w&&E.propertyNames.indexOf(A)===-1&&E.addProperty(A),E[A]=I};var Xot=Sg;function JF(){this._definitionChanged=new br,this._composite=new P1,this._composite.definitionChanged.addEventListener(JF.prototype._raiseDefinitionChanged,this)}Object.defineProperties(JF.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}});JF.prototype.getType=function(o){let A=this._composite._intervals.findDataForIntervalContainingDate(o);if(O(A))return A.getType(o)};JF.prototype.getValue=function(o,A){let f=this._composite._intervals.findDataForIntervalContainingDate(o);if(O(f))return f.getValue(o,A)};JF.prototype.equals=function(o){return this===o||o instanceof JF&&this._composite.equals(o._composite,Nt.equals)};JF.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var cie=JF,k1i=je.factorial;function cDe(o,A,f,m,C,y){let x=0,v,E,I;if(m>0){for(E=0;E<C;E++){for(v=!1,I=0;I<y.length&&!v;I++)E===y[I]&&(v=!0);v||(y.push(E),x+=cDe(o,A,f,m-1,C,y),y.splice(y.length-1,1))}return x}for(x=1,E=0;E<C;E++){for(v=!1,I=0;I<y.length&&!v;I++)E===y[I]&&(v=!0);v||(x*=o-f[A[E]])}return x}var aae={type:"Hermite"};aae.getRequiredDataPoints=function(o,A){return A=Ae(A,0),Math.max(Math.floor((o+1)/(A+1)),2)};aae.interpolateOrderZero=function(o,A,f,m,C){O(C)||(C=new Array(m));let y,x,v,E,I,w,Q=A.length,M=new Array(m);for(y=0;y<m;y++){C[y]=0;let F=new Array(Q);for(M[y]=F,x=0;x<Q;x++)F[x]=[]}let B=Q,T=new Array(B);for(y=0;y<B;y++)T[y]=y;let D=Q-1;for(E=0;E<m;E++){for(x=0;x<B;x++)w=T[x]*m+E,M[E][0].push(f[w]);for(y=1;y<B;y++){let F=!1;for(x=0;x<B-y;x++){let L=A[T[x]],R=A[T[x+y]],k;R-L<=0?(w=T[x]*m+m*y+E,k=f[w],M[E][y].push(k/k1i(y))):(k=M[E][y-1][x+1]-M[E][y-1][x],M[E][y].push(k/(R-L))),F=F||k!==0}F||(D=y-1)}}for(v=0,I=0;v<=I;v++)for(y=v;y<=D;y++){let F=cDe(o,T,A,v,y,[]);for(E=0;E<m;E++){let L=M[E][y][0];C[E+v*m]+=L*F}}return C};var O1i=[];aae.interpolate=function(o,A,f,m,C,y,x){let v=m*(y+1);O(x)||(x=new Array(v));for(let L=0;L<v;L++)x[L]=0;let E=A.length,I=new Array(E*(C+1)),w;for(w=0;w<E;w++)for(let L=0;L<C+1;L++)I[w*(C+1)+L]=w;let Q=I.length,M=O1i,B=U1i(M,I,A,f,m,C),T=[],D=Q*(Q+1)/2,F=Math.min(B,y);for(let L=0;L<=F;L++)for(w=L;w<=B;w++){T.length=0;let R=cDe(o,I,A,L,w,T),k=Math.floor(w*(1-w)/2)+Q*w;for(let U=0;U<m;U++){let V=Math.floor(U*D),H=M[V+k];x[U+L*m]+=H*R}}return x};function U1i(o,A,f,m,C,y){let x,v,E=-1,I=A.length,w=I*(I+1)/2;for(let Q=0;Q<C;Q++){let M=Math.floor(Q*w);for(x=0;x<I;x++)v=A[x]*C*(y+1)+Q,o[M+x]=m[v];for(let B=1;B<I;B++){let T=0,D=Math.floor(B*(1-B)/2)+I*B,F=!1;for(x=0;x<I-B;x++){let L=f[A[x]],R=f[A[x+B]],k,U;if(R-L<=0)v=A[x]*C*(y+1)+C*B+Q,k=m[v],U=k/je.factorial(B),o[M+D+T]=U,T++;else{let V=Math.floor((B-1)*(2-B)/2)+I*(B-1);k=o[M+V+x+1]-o[M+V+x],U=k/(R-L),o[M+D+T]=U,T++}F=F||k!==0}F&&(E=Math.max(E,B))}}return E}var ADe=aae,hDe={type:"Lagrange"};hDe.getRequiredDataPoints=function(o){return Math.max(o+1,2)};hDe.interpolateOrderZero=function(o,A,f,m,C){O(C)||(C=new Array(m));let y,x,v=A.length;for(y=0;y<m;y++)C[y]=0;for(y=0;y<v;y++){let E=1;for(x=0;x<v;x++)if(x!==y){let I=A[y]-A[x];E*=(o-A[x])/I}for(x=0;x<m;x++)C[x]+=E*f[y*m+x]}return C};var dDe=hDe;function Dx(o,A,f){this.clock=Ae(o,0),this.cone=Ae(A,0),this.magnitude=Ae(f,1)}Dx.fromCartesian3=function(o,A){let f=o.x,m=o.y,C=o.z,y=f*f+m*m;return O(A)||(A=new Dx),A.clock=Math.atan2(m,f),A.cone=Math.atan2(Math.sqrt(y),C),A.magnitude=Math.sqrt(y+C*C),A};Dx.clone=function(o,A){if(O(o))return O(A)?(A.clock=o.clock,A.cone=o.cone,A.magnitude=o.magnitude,A):new Dx(o.clock,o.cone,o.magnitude)};Dx.normalize=function(o,A){return O(A)?(A.clock=o.clock,A.cone=o.cone,A.magnitude=1,A):new Dx(o.clock,o.cone,1)};Dx.equals=function(o,A){return o===A||O(o)&&O(A)&&o.clock===A.clock&&o.cone===A.cone&&o.magnitude===A.magnitude};Dx.equalsEpsilon=function(o,A,f){return f=Ae(f,0),o===A||O(o)&&O(A)&&Math.abs(o.clock-A.clock)<=f&&Math.abs(o.cone-A.cone)<=f&&Math.abs(o.magnitude-A.magnitude)<=f};Dx.prototype.equals=function(o){return Dx.equals(this,o)};Dx.prototype.clone=function(o){return Dx.clone(this,o)};Dx.prototype.equalsEpsilon=function(o,A){return Dx.equalsEpsilon(this,o,A)};Dx.prototype.toString=function(){return`(${this.clock}, ${this.cone}, ${this.magnitude})`};var fDe=Dx,sae=Eh(Z1(),1),G1i=At.WHITE,H1i=.1,V1i=new It(8,8),z1i=new It(0,0),K1i=new It(1,1);function O8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=o.color,this.cellAlpha=o.cellAlpha,this.lineCount=o.lineCount,this.lineThickness=o.lineThickness,this.lineOffset=o.lineOffset}Object.defineProperties(O8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._color)&&Nt.isConstant(this._cellAlpha)&&Nt.isConstant(this._lineCount)&&Nt.isConstant(this._lineThickness)&&Nt.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color"),cellAlpha:Bi("cellAlpha"),lineCount:Bi("lineCount"),lineThickness:Bi("lineThickness"),lineOffset:Bi("lineOffset")});O8.prototype.getType=function(o){return"Grid"};O8.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this._color,o,G1i,A.color),A.cellAlpha=Nt.getValueOrDefault(this._cellAlpha,o,H1i),A.lineCount=Nt.getValueOrClonedDefault(this._lineCount,o,V1i,A.lineCount),A.lineThickness=Nt.getValueOrClonedDefault(this._lineThickness,o,K1i,A.lineThickness),A.lineOffset=Nt.getValueOrClonedDefault(this._lineOffset,o,z1i,A.lineOffset),A};O8.prototype.equals=function(o){return this===o||o instanceof O8&&Nt.equals(this._color,o._color)&&Nt.equals(this._cellAlpha,o._cellAlpha)&&Nt.equals(this._lineCount,o._lineCount)&&Nt.equals(this._lineThickness,o._lineThickness)&&Nt.equals(this._lineOffset,o._lineOffset)};var Aie=O8,Y1i=At.WHITE,J1i=At.TRANSPARENT,W1i=16,j1i=255;function U8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=o.color,this.gapColor=o.gapColor,this.dashLength=o.dashLength,this.dashPattern=o.dashPattern}Object.defineProperties(U8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._color)&&Nt.isConstant(this._gapColor)&&Nt.isConstant(this._dashLength)&&Nt.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color"),gapColor:Bi("gapColor"),dashLength:Bi("dashLength"),dashPattern:Bi("dashPattern")});U8.prototype.getType=function(o){return"PolylineDash"};U8.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this._color,o,Y1i,A.color),A.gapColor=Nt.getValueOrClonedDefault(this._gapColor,o,J1i,A.gapColor),A.dashLength=Nt.getValueOrDefault(this._dashLength,o,W1i,A.dashLength),A.dashPattern=Nt.getValueOrDefault(this._dashPattern,o,j1i,A.dashPattern),A};U8.prototype.equals=function(o){return this===o||o instanceof U8&&Nt.equals(this._color,o._color)&&Nt.equals(this._gapColor,o._gapColor)&&Nt.equals(this._dashLength,o._dashLength)&&Nt.equals(this._dashPattern,o._dashPattern)};var Vl=U8,q1i=At.WHITE,X1i=.25,Z1i=1;function G8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=o.color,this.glowPower=o.glowPower,this.taperPower=o.taperPower}Object.defineProperties(G8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._color)&&Nt.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color"),glowPower:Bi("glowPower"),taperPower:Bi("taperPower")});G8.prototype.getType=function(o){return"PolylineGlow"};G8.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this._color,o,q1i,A.color),A.glowPower=Nt.getValueOrDefault(this._glowPower,o,X1i,A.glowPower),A.taperPower=Nt.getValueOrDefault(this._taperPower,o,Z1i,A.taperPower),A};G8.prototype.equals=function(o){return this===o||o instanceof G8&&Nt.equals(this._color,o._color)&&Nt.equals(this._glowPower,o._glowPower)&&Nt.equals(this._taperPower,o._taperPower)};var hie=G8;function WF(o){this._value=void 0,this._definitionChanged=new br,this._eventHelper=new Mx,this.setValue(o)}Object.defineProperties(WF.prototype,{isConstant:{get:function(){let o=this._value;if(!O(o))return!0;let A=o.length;for(let f=0;f<A;f++)if(!Nt.isConstant(o[f]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}});WF.prototype.getValue=function(o,A){let f=this._value;if(!O(f))return;let m=f.length;O(A)||(A=new Array(m));let C=0,y=0;for(;C<m;){let x=this._value[C].getValue(o,A[C]);O(x)&&(A[y]=x,y++),C++}return A.length=y,A};WF.prototype.setValue=function(o){let A=this._eventHelper;if(A.removeAll(),O(o)){this._value=o.slice();let f=o.length;for(let m=0;m<f;m++){let C=o[m];O(C)&&A.add(C.definitionChanged,WF.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};WF.prototype.equals=function(o){return this===o||o instanceof WF&&Nt.arrayEquals(this._value,o._value)};WF.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var lae=WF,$1i={packedLength:1,pack:function(o,A,f){return f=Ae(f,0),A[f]=o,A},unpack:function(o,A,f){return A=Ae(A,0),o[A]},convertPackedArrayForInterpolation:function(o,A,f,m){O(m)||(m=[]),A=Ae(A,0),f=Ae(f,o.length);let C;for(let y=0,x=f-A+1;y<x;y++){let v=o[A+y];y===0||Math.abs(C-v)<Math.PI?m[y]=v:m[y]=v-je.TWO_PI,C=v}},unpackInterpolationResult:function(o,A,f,m,C){return C=o[0],C<0?C+je.TWO_PI:C}},YD=$1i,ewi={HORIZONTAL:0,VERTICAL:1},jF=Object.freeze(ewi),twi=jF.HORIZONTAL,iwi=At.WHITE,rwi=At.BLACK,nwi=0,owi=1;function H8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=o.orientation,this.evenColor=o.evenColor,this.oddColor=o.oddColor,this.offset=o.offset,this.repeat=o.repeat}Object.defineProperties(H8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._orientation)&&Nt.isConstant(this._evenColor)&&Nt.isConstant(this._oddColor)&&Nt.isConstant(this._offset)&&Nt.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:Bi("orientation"),evenColor:Bi("evenColor"),oddColor:Bi("oddColor"),offset:Bi("offset"),repeat:Bi("repeat")});H8.prototype.getType=function(o){return"Stripe"};H8.prototype.getValue=function(o,A){return O(A)||(A={}),A.horizontal=Nt.getValueOrDefault(this._orientation,o,twi)===jF.HORIZONTAL,A.evenColor=Nt.getValueOrClonedDefault(this._evenColor,o,iwi,A.evenColor),A.oddColor=Nt.getValueOrClonedDefault(this._oddColor,o,rwi,A.oddColor),A.offset=Nt.getValueOrDefault(this._offset,o,nwi),A.repeat=Nt.getValueOrDefault(this._repeat,o,owi),A};H8.prototype.equals=function(o){return this===o||o instanceof H8&&Nt.equals(this._orientation,o._orientation)&&Nt.equals(this._evenColor,o._evenColor)&&Nt.equals(this._oddColor,o._oddColor)&&Nt.equals(this._offset,o._offset)&&Nt.equals(this._repeat,o._repeat)};var die=H8;function V8(o,A){this._position=void 0,this._subscription=void 0,this._definitionChanged=new br,this._normalize=Ae(A,!0),this.position=o}Object.defineProperties(V8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(o){let A=this._position;A!==o&&(O(A)&&this._subscription(),this._position=o,O(o)&&(this._subscription=o._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(o){this._normalize!==o&&(this._normalize=o,this._definitionChanged.raiseEvent(this))}}});var awi=new ee,fze=new ee,gze=new fi,$0e=1/60;V8.prototype.getValue=function(o,A){return this._getValue(o,A)};V8.prototype._getValue=function(o,A,f){O(A)||(A=new ee);let m=this._position;if(Nt.isConstant(m))return this._normalize?void 0:ee.clone(ee.ZERO,A);let C=m.getValue(o,awi),y=m.getValue(fi.addSeconds(o,$0e,gze),fze);if(!O(C)||!O(y)&&(y=C,C=m.getValue(fi.addSeconds(o,-$0e,gze),fze),!O(C)))return;if(ee.equals(C,y))return this._normalize?void 0:ee.clone(ee.ZERO,A);O(f)&&C.clone(f);let x=ee.subtract(y,C,A);return this._normalize?ee.normalize(x,A):ee.divideByScalar(x,$0e,A)};V8.prototype.equals=function(o){return this===o||o instanceof V8&&Nt.equals(this._position,o._position)};var uae=V8;function zK(o,A){this._velocityVectorProperty=new uae(o,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new br,this.ellipsoid=Ae(A,Di.WGS84);let f=this;this._velocityVectorProperty.definitionChanged.addEventListener(function(){f._definitionChanged.raiseEvent(f)})}Object.defineProperties(zK.prototype,{isConstant:{get:function(){return Nt.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(o){this._velocityVectorProperty.position=o}},ellipsoid:{get:function(){return this._ellipsoid},set:function(o){this._ellipsoid!==o&&(this._ellipsoid=o,this._definitionChanged.raiseEvent(this))}}});var pze=new ee,swi=new ee,mze=new ci;zK.prototype.getValue=function(o,A){let f=this._velocityVectorProperty._getValue(o,swi,pze);if(O(f))return Vn.rotationMatrixFromPositionVelocity(pze,f,this._ellipsoid,mze),jr.fromRotationMatrix(mze,A)};zK.prototype.equals=function(o){return this===o||o instanceof zK&&Nt.equals(this._velocityVectorProperty,o._velocityVectorProperty)&&(this._ellipsoid===o._ellipsoid||this._ellipsoid.equals(o._ellipsoid))};var gDe=zK;function qF(){}qF.packedLength=ee.packedLength;qF.unpack=ee.unpack;qF.pack=ee.pack;var SCe;function KK(o,A){return A[0]==="#"&&(A=SCe+A),DY.fromString(o,A)}function Cze(o,A,f){if(O(f.reference))return KK(A,f.reference);if(O(f.velocityReference)){let m=KK(A,f.velocityReference);switch(o){case ee:case qF:return new uae(m,o===qF);case jr:return new gDe(m)}}throw new nr(`${JSON.stringify(f)} is not valid CZML.`)}function lwi(o,A){return new Bn(function(f,m){return A(o.getValue(f,m))},o.isConstant)}var ac=new ee,vv=new fDe,ax=new Kt,BO=new el,P$=new jr;function uwi(o){let A=o.rgbaf;if(O(A))return A;let f=o.rgba;if(!O(f))return;let m=f.length;if(m===At.packedLength)return[At.byteToFloat(f[0]),At.byteToFloat(f[1]),At.byteToFloat(f[2]),At.byteToFloat(f[3])];A=new Array(m);for(let C=0;C<m;C+=5)A[C]=f[C],A[C+1]=At.byteToFloat(f[C+1]),A[C+2]=At.byteToFloat(f[C+2]),A[C+3]=At.byteToFloat(f[C+3]),A[C+4]=At.byteToFloat(f[C+4]);return A}function yze(o,A){let f=Ae(o.uri,o);return O(A)?A.getDerivedResource({url:f}):An.createIfNeeded(f)}function cwi(o){let A=o.wsen;if(O(A))return A;let f=o.wsenDegrees;if(!O(f))return;let m=f.length;if(m===Si.packedLength)return[je.toRadians(f[0]),je.toRadians(f[1]),je.toRadians(f[2]),je.toRadians(f[3])];A=new Array(m);for(let C=0;C<m;C+=5)A[C]=f[C],A[C+1]=je.toRadians(f[C+1]),A[C+2]=je.toRadians(f[C+2]),A[C+3]=je.toRadians(f[C+3]),A[C+4]=je.toRadians(f[C+4]);return A}function Awi(o){let A=o.length;if(vv.magnitude=1,A===2)return vv.clock=o[0],vv.cone=o[1],ee.fromSpherical(vv,ac),[ac.x,ac.y,ac.z];let f=new Array(A/3*4);for(let m=0,C=0;m<A;m+=3,C+=4)f[C]=o[m],vv.clock=o[m+1],vv.cone=o[m+2],ee.fromSpherical(vv,ac),f[C+1]=ac.x,f[C+2]=ac.y,f[C+3]=ac.z;return f}function hwi(o){let A=o.length;if(A===3)return vv.clock=o[0],vv.cone=o[1],vv.magnitude=o[2],ee.fromSpherical(vv,ac),[ac.x,ac.y,ac.z];let f=new Array(A);for(let m=0;m<A;m+=4)f[m]=o[m],vv.clock=o[m+1],vv.cone=o[m+2],vv.magnitude=o[m+3],ee.fromSpherical(vv,ac),f[m+1]=ac.x,f[m+2]=ac.y,f[m+3]=ac.z;return f}function dwi(o){let A=o.length;if(A===3)return ax.longitude=o[0],ax.latitude=o[1],ax.height=o[2],Di.WGS84.cartographicToCartesian(ax,ac),[ac.x,ac.y,ac.z];let f=new Array(A);for(let m=0;m<A;m+=4)f[m]=o[m],ax.longitude=o[m+1],ax.latitude=o[m+2],ax.height=o[m+3],Di.WGS84.cartographicToCartesian(ax,ac),f[m+1]=ac.x,f[m+2]=ac.y,f[m+3]=ac.z;return f}function fwi(o){let A=o.length;if(A===3)return ax.longitude=je.toRadians(o[0]),ax.latitude=je.toRadians(o[1]),ax.height=o[2],Di.WGS84.cartographicToCartesian(ax,ac),[ac.x,ac.y,ac.z];let f=new Array(A);for(let m=0;m<A;m+=4)f[m]=o[m],ax.longitude=je.toRadians(o[m+1]),ax.latitude=je.toRadians(o[m+2]),ax.height=o[m+3],Di.WGS84.cartographicToCartesian(ax,ac),f[m+1]=ac.x,f[m+2]=ac.y,f[m+3]=ac.z;return f}function pDe(o){let A=o.cartesian;if(O(A))return A;let f=o.cartesianVelocity;if(O(f))return f;let m=o.unitCartesian;if(O(m))return m;let C=o.unitSpherical;if(O(C))return Awi(C);let y=o.spherical;if(O(y))return hwi(y);let x=o.cartographicRadians;if(O(x))return dwi(x);let v=o.cartographicDegrees;if(O(v))return fwi(v);throw new nr(`${JSON.stringify(o)} is not a valid CZML interval.`)}function xze(o,A){ee.unpack(o,A,ac),ee.normalize(ac,ac),ee.pack(ac,o,A)}function gwi(o){let A=pDe(o);if(A.length===3)return xze(A,0),A;for(let f=1;f<A.length;f+=4)xze(A,f);return A}function vze(o,A){jr.unpack(o,A,P$),jr.normalize(P$,P$),jr.pack(P$,o,A)}function pwi(o){let A=o.unitQuaternion;if(O(A)){if(A.length===4)return vze(A,0),A;for(let f=1;f<A.length;f+=5)vze(A,f)}return A}function Eze(o){return typeof o=="boolean"?Boolean:typeof o=="number"?Number:typeof o=="string"?String:o.hasOwnProperty("array")?Array:o.hasOwnProperty("boolean")?Boolean:o.hasOwnProperty("boundingRectangle")?Kr:o.hasOwnProperty("cartesian2")?It:o.hasOwnProperty("cartesian")||o.hasOwnProperty("spherical")||o.hasOwnProperty("cartographicRadians")||o.hasOwnProperty("cartographicDegrees")?ee:o.hasOwnProperty("unitCartesian")||o.hasOwnProperty("unitSpherical")?qF:o.hasOwnProperty("rgba")||o.hasOwnProperty("rgbaf")?At:o.hasOwnProperty("arcType")?Pa:o.hasOwnProperty("classificationType")?Gu:o.hasOwnProperty("colorBlendMode")?HD:o.hasOwnProperty("cornerType")?ZA:o.hasOwnProperty("heightReference")?xn:o.hasOwnProperty("horizontalOrigin")?tA:o.hasOwnProperty("date")?fi:o.hasOwnProperty("labelStyle")?mA:o.hasOwnProperty("number")?Number:o.hasOwnProperty("nearFarScalar")?To:o.hasOwnProperty("distanceDisplayCondition")?$o:o.hasOwnProperty("object")||o.hasOwnProperty("value")?Object:o.hasOwnProperty("unitQuaternion")?jr:o.hasOwnProperty("shadowMode")?Al:o.hasOwnProperty("string")?String:o.hasOwnProperty("stripeOrientation")?jF:o.hasOwnProperty("wsen")||o.hasOwnProperty("wsenDegrees")?Si:o.hasOwnProperty("uri")?sae.default:o.hasOwnProperty("verticalOrigin")?bn:Object}function mwi(o,A,f){switch(o){case Pa:return Pa[Ae(A.arcType,A)];case Array:return A.array;case Boolean:return Ae(A.boolean,A);case Kr:return A.boundingRectangle;case It:return A.cartesian2;case ee:return pDe(A);case qF:return gwi(A);case At:return uwi(A);case Gu:return Gu[Ae(A.classificationType,A)];case HD:return HD[Ae(A.colorBlendMode,A)];case ZA:return ZA[Ae(A.cornerType,A)];case xn:return xn[Ae(A.heightReference,A)];case tA:return tA[Ae(A.horizontalOrigin,A)];case Image:return yze(A,f);case fi:return fi.fromIso8601(Ae(A.date,A));case mA:return mA[Ae(A.labelStyle,A)];case Number:return Ae(A.number,A);case To:return A.nearFarScalar;case $o:return A.distanceDisplayCondition;case Object:return Ae(Ae(A.object,A.value),A);case jr:return pwi(A);case YD:return Ae(A.number,A);case Al:return Al[Ae(Ae(A.shadowMode,A.shadows),A)];case String:return Ae(A.string,A);case jF:return jF[Ae(A.stripeOrientation,A)];case Si:return cwi(A);case sae.default:return yze(A,f);case bn:return bn[Ae(A.verticalOrigin,A)];default:throw new nr(o)}}var Cwi={HERMITE:ADe,LAGRANGE:dDe,LINEAR:Tre};function fie(o,A){let f=o.interpolationAlgorithm,m=o.interpolationDegree;(O(f)||O(m))&&A.setInterpolationOptions({interpolationAlgorithm:Cwi[f],interpolationDegree:m});let C=o.forwardExtrapolationType;O(C)&&(A.forwardExtrapolationType=mD[C]);let y=o.forwardExtrapolationDuration;O(y)&&(A.forwardExtrapolationDuration=y);let x=o.backwardExtrapolationType;O(x)&&(A.backwardExtrapolationType=mD[x]);let v=o.backwardExtrapolationDuration;O(v)&&(A.backwardExtrapolationDuration=v)}var Ize={iso8601:void 0};function lf(o){if(O(o))return Ize.iso8601=o,el.fromIso8601(Ize)}function mDe(o){let A=Cn.MAXIMUM_INTERVAL.clone();return A.data=o,A}function _ze(o){let A=new P1;return A.intervals.addInterval(mDe(o)),A}function Bze(o){let A=new U_(o.referenceFrame);return A.intervals.addInterval(mDe(o)),A}function gie(o,A,f,m,C,y,x){let v=lf(m.interval);O(C)&&(O(v)?v=el.intersect(v,C,BO):v=C);let E,I,w,Q=!O(m.reference)&&!O(m.velocityReference),M=O(v)&&!v.equals(Cn.MAXIMUM_INTERVAL);if(m.delete===!0){if(!M){A[f]=void 0;return}return Zot(A[f],v)}let B=!1;if(Q){if(I=mwi(o,m,y),!O(I))return;E=Ae(o.packedLength,1),w=Ae(I.length,1),B=!O(m.array)&&typeof I!="string"&&w>E&&o!==Object}let T=typeof o.unpack=="function"&&o!==YD;if(!B&&!M){Q?A[f]=new bc(T?o.unpack(I,0):I):A[f]=Cze(o,x,m);return}let D=A[f],F,L=m.epoch;if(O(L)&&(F=fi.fromIso8601(L)),B&&!M){D instanceof uM||(A[f]=D=new uM(o)),D.addSamplesPackedArray(I,F),fie(m,D);return}let R;if(!B&&M){v=v.clone(),Q?v.data=T?o.unpack(I,0):I:v.data=Cze(o,x,m),O(D)||(A[f]=D=Q?new g8:new P1),Q&&D instanceof g8?D.intervals.addInterval(v):D instanceof P1?(Q&&(v.data=new bc(v.data)),D.intervals.addInterval(v)):(A[f]=D=_ze(D),Q&&(v.data=new bc(v.data)),D.intervals.addInterval(v));return}O(D)||(A[f]=D=new P1),D instanceof P1||(A[f]=D=_ze(D));let k=D.intervals;R=k.findInterval(v),(!O(R)||!(R.data instanceof uM))&&(R=v.clone(),R.data=new uM(o),k.addInterval(R)),R.data.addSamplesPackedArray(I,F),fie(m,R.data)}function Zot(o,A){if(o instanceof uM){o.removeSamples(A);return}else if(o instanceof g8){o.intervals.removeInterval(A);return}else if(o instanceof P1){let f=o.intervals;for(let m=0;m<f.length;++m){let C=el.intersect(f.get(m),A,BO);C.isEmpty||Zot(C.data,A)}f.removeInterval(A);return}}function zi(o,A,f,m,C,y,x){if(O(m))if(Array.isArray(m))for(let v=0,E=m.length;v<E;++v)gie(o,A,f,m[v],C,y,x);else gie(o,A,f,m,C,y,x)}function wze(o,A,f,m,C,y){let x=lf(f.interval);O(m)&&(O(x)?x=el.intersect(x,m,BO):x=m);let v=O(f.cartesianVelocity)?1:0,E=ee.packedLength*(v+1),I,w,Q=!O(f.reference),M=O(x)&&!x.equals(Cn.MAXIMUM_INTERVAL);if(f.delete===!0){if(!M){o[A]=void 0;return}return $ot(o[A],x)}let B,T=!1;if(Q&&(O(f.referenceFrame)&&(B=s0[f.referenceFrame]),B=Ae(B,s0.FIXED),I=pDe(f),w=Ae(I.length,1),T=w>E),!T&&!M){Q?o[A]=new _D(ee.unpack(I),B):o[A]=KK(y,f.reference);return}let D=o[A],F,L=f.epoch;if(O(L)&&(F=fi.fromIso8601(L)),T&&!M){(!(D instanceof R1)||O(B)&&D.referenceFrame!==B)&&(o[A]=D=new R1(B,v)),D.addSamplesPackedArray(I,F),fie(f,D);return}let R;if(!T&&M){x=x.clone(),Q?x.data=ee.unpack(I):x.data=KK(y,f.reference),O(D)||(Q?D=new T8(B):D=new U_(B),o[A]=D),Q&&D instanceof T8&&O(B)&&D.referenceFrame===B?D.intervals.addInterval(x):D instanceof U_?(Q&&(x.data=new _D(x.data,B)),D.intervals.addInterval(x)):(o[A]=D=Bze(D),Q&&(x.data=new _D(x.data,B)),D.intervals.addInterval(x));return}O(D)?D instanceof U_||(o[A]=D=Bze(D)):o[A]=D=new U_(B);let k=D.intervals;R=k.findInterval(x),(!O(R)||!(R.data instanceof R1)||O(B)&&R.data.referenceFrame!==B)&&(R=x.clone(),R.data=new R1(B,v),k.addInterval(R)),R.data.addSamplesPackedArray(I,F),fie(f,R.data)}function $ot(o,A){if(o instanceof R1){o.removeSamples(A);return}else if(o instanceof T8){o.intervals.removeInterval(A);return}else if(o instanceof U_){let f=o.intervals;for(let m=0;m<f.length;++m){let C=el.intersect(f.get(m),A,BO);C.isEmpty||$ot(C.data,A)}f.removeInterval(A);return}}function eat(o,A,f,m,C,y){if(O(f))if(Array.isArray(f))for(let x=0,v=f.length;x<v;++x)wze(o,A,f[x],m,C,y);else wze(o,A,f,m,C,y)}function bze(o,A,f,m){O(f.references)?cae(o,A,f.references,f.interval,m,lae,P1):(O(f.cartesian2)?f.array=It.unpackArray(f.cartesian2):O(f.cartesian)&&(f.array=It.unpackArray(f.cartesian)),O(f.array)&&zi(Array,o,A,f,void 0,void 0,m))}function Qze(o,A,f,m,C,y){let x=lf(f.interval);O(m)&&(O(x)?x=el.intersect(x,m,BO):x=m);let v=o[A],E,I;if(O(x)){v instanceof cie||(v=new cie,o[A]=v);let Q=v.intervals;I=Q.findInterval({start:x.start,stop:x.stop}),O(I)?E=I.data:(I=x.clone(),Q.addInterval(I))}else E=v;let w;O(f.solidColor)?(E instanceof Fa||(E=new Fa),w=f.solidColor,zi(At,E,"color",w.color,void 0,void 0,y)):O(f.grid)?(E instanceof Aie||(E=new Aie),w=f.grid,zi(At,E,"color",w.color,void 0,C,y),zi(Number,E,"cellAlpha",w.cellAlpha,void 0,C,y),zi(It,E,"lineCount",w.lineCount,void 0,C,y),zi(It,E,"lineThickness",w.lineThickness,void 0,C,y),zi(It,E,"lineOffset",w.lineOffset,void 0,C,y)):O(f.image)?(E instanceof z0||(E=new z0),w=f.image,zi(Image,E,"image",w.image,void 0,C,y),zi(It,E,"repeat",w.repeat,void 0,C,y),zi(At,E,"color",w.color,void 0,C,y),zi(Boolean,E,"transparent",w.transparent,void 0,C,y)):O(f.stripe)?(E instanceof die||(E=new die),w=f.stripe,zi(jF,E,"orientation",w.orientation,void 0,C,y),zi(At,E,"evenColor",w.evenColor,void 0,C,y),zi(At,E,"oddColor",w.oddColor,void 0,C,y),zi(Number,E,"offset",w.offset,void 0,C,y),zi(Number,E,"repeat",w.repeat,void 0,C,y)):O(f.polylineOutline)?(E instanceof JM||(E=new JM),w=f.polylineOutline,zi(At,E,"color",w.color,void 0,C,y),zi(At,E,"outlineColor",w.outlineColor,void 0,C,y),zi(Number,E,"outlineWidth",w.outlineWidth,void 0,C,y)):O(f.polylineGlow)?(E instanceof hie||(E=new hie),w=f.polylineGlow,zi(At,E,"color",w.color,void 0,C,y),zi(Number,E,"glowPower",w.glowPower,void 0,C,y),zi(Number,E,"taperPower",w.taperPower,void 0,C,y)):O(f.polylineArrow)?(E instanceof IK||(E=new IK),w=f.polylineArrow,zi(At,E,"color",w.color,void 0,void 0,y)):O(f.polylineDash)?(E instanceof Vl||(E=new Vl),w=f.polylineDash,zi(At,E,"color",w.color,void 0,void 0,y),zi(At,E,"gapColor",w.gapColor,void 0,void 0,y),zi(Number,E,"dashLength",w.dashLength,void 0,C,y),zi(Number,E,"dashPattern",w.dashPattern,void 0,C,y)):O(f.checkerboard)&&(E instanceof lie||(E=new lie),w=f.checkerboard,zi(At,E,"evenColor",w.evenColor,void 0,C,y),zi(At,E,"oddColor",w.oddColor,void 0,C,y),zi(It,E,"repeat",w.repeat,void 0,C,y)),O(I)?I.data=E:o[A]=E}function nB(o,A,f,m,C,y){if(O(f))if(Array.isArray(f))for(let x=0,v=f.length;x<v;++x)Qze(o,A,f[x],m,C,y);else Qze(o,A,f,m,C,y)}function ywi(o,A,f,m){let C=A.name;O(C)&&(o.name=A.name)}function xwi(o,A,f,m){let C=A.description;O(C)&&zi(String,o,"description",C,void 0,m,f)}function vwi(o,A,f,m){let C=A.position;O(C)&&eat(o,"position",C,void 0,m,f)}function Ewi(o,A,f,m){let C=A.viewFrom;O(C)&&zi(ee,o,"viewFrom",C,void 0,m,f)}function Iwi(o,A,f,m){let C=A.orientation;O(C)&&zi(jr,o,"orientation",C,void 0,m,f)}function _wi(o,A,f,m){let C=A.properties;if(O(C)){O(o.properties)||(o.properties=new LD);for(let y in C)if(C.hasOwnProperty(y)){o.properties.hasProperty(y)||o.properties.addProperty(y);let x=C[y];if(Array.isArray(x))for(let v=0,E=x.length;v<E;++v)gie(Eze(x[v]),o.properties,y,x[v],void 0,m,f);else gie(Eze(x),o.properties,y,x,void 0,m,f)}}}function cae(o,A,f,m,C,y,x){let v=f.map(function(E){return KK(C,E)});if(O(m)){m=lf(m);let E=o[A];if(!(E instanceof x)){let I=new x;I.intervals.addInterval(mDe(E)),o[A]=E=I}m.data=new y(v),E.intervals.addInterval(m)}else o[A]=new y(v)}function Sze(o,A,f,m){let C=f.references;O(C)?cae(o,A,C,f.interval,m,lae,P1):zi(Array,o,A,f,void 0,void 0,m)}function Dze(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;++C)Sze(o,A,f[C],m);else Sze(o,A,f,m)}function Tze(o,A,f,m){let C=f.references;O(C)?cae(o,A,C,f.interval,m,f8,U_):(O(f.cartesian)?f.array=ee.unpackArray(f.cartesian):O(f.cartographicRadians)?f.array=ee.fromRadiansArrayHeights(f.cartographicRadians):O(f.cartographicDegrees)&&(f.array=ee.fromDegreesArrayHeights(f.cartographicDegrees)),O(f.array)&&zi(Array,o,A,f,void 0,void 0,m))}function tW(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;++C)Tze(o,A,f[C],m);else Tze(o,A,f,m)}function Bwi(o){return ee.unpackArray(o)}function wwi(o){return ee.fromRadiansArrayHeights(o)}function bwi(o){return ee.fromDegreesArrayHeights(o)}function Mze(o,A,f,m){let C=f.references;if(O(C)){let y=C.map(function(x){let v={};return cae(v,"positions",x,f.interval,m,f8,U_),v.positions});o[A]=new f8(y)}else O(f.cartesian)?f.array=f.cartesian.map(Bwi):O(f.cartographicRadians)?f.array=f.cartographicRadians.map(wwi):O(f.cartographicDegrees)&&(f.array=f.cartographicDegrees.map(bwi)),O(f.array)&&zi(Array,o,A,f,void 0,void 0,m)}function Qwi(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;++C)Mze(o,A,f[C],m);else Mze(o,A,f,m)}function Swi(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;C++)bze(o,A,f[C],m);else bze(o,A,f,m)}function Dwi(o,A,f,m){let C=A.availability;if(!O(C))return;let y;if(Array.isArray(C))for(let x=0,v=C.length;x<v;++x)O(y)||(y=new mx),y.addInterval(lf(C[x]));else y=new mx,y.addInterval(lf(C));o.availability=y}function Twi(o,A,f,m,C){!O(A)||zi(qF,o,"alignedAxis",A,f,m,C)}function Mwi(o,A,f,m){let C=A.billboard;if(!O(C))return;let y=lf(C.interval),x=o.billboard;O(x)||(o.billboard=x=new eP),zi(Boolean,x,"show",C.show,y,m,f),zi(Image,x,"image",C.image,y,m,f),zi(Number,x,"scale",C.scale,y,m,f),zi(It,x,"pixelOffset",C.pixelOffset,y,m,f),zi(ee,x,"eyeOffset",C.eyeOffset,y,m,f),zi(tA,x,"horizontalOrigin",C.horizontalOrigin,y,m,f),zi(bn,x,"verticalOrigin",C.verticalOrigin,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"color",C.color,y,m,f),zi(YD,x,"rotation",C.rotation,y,m,f),Twi(x,C.alignedAxis,y,m,f),zi(Boolean,x,"sizeInMeters",C.sizeInMeters,y,m,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(To,x,"scaleByDistance",C.scaleByDistance,y,m,f),zi(To,x,"translucencyByDistance",C.translucencyByDistance,y,m,f),zi(To,x,"pixelOffsetScaleByDistance",C.pixelOffsetScaleByDistance,y,m,f),zi(Kr,x,"imageSubRegion",C.imageSubRegion,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Number,x,"disableDepthTestDistance",C.disableDepthTestDistance,y,m,f)}function Pwi(o,A,f,m){let C=A.box;if(!O(C))return;let y=lf(C.interval),x=o.box;O(x)||(o.box=x=new gre),zi(Boolean,x,"show",C.show,y,m,f),zi(ee,x,"dimensions",C.dimensions,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function Rwi(o,A,f,m){let C=A.corridor;if(!O(C))return;let y=lf(C.interval),x=o.corridor;O(x)||(o.corridor=x=new pre),zi(Boolean,x,"show",C.show,y,m,f),tW(x,"positions",C.positions,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(ZA,x,"cornerType",C.cornerType,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function Lwi(o,A,f,m){let C=A.cylinder;if(!O(C))return;let y=lf(C.interval),x=o.cylinder;O(x)||(o.cylinder=x=new mre),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"length",C.length,y,m,f),zi(Number,x,"topRadius",C.topRadius,y,m,f),zi(Number,x,"bottomRadius",C.bottomRadius,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"numberOfVerticalLines",C.numberOfVerticalLines,y,m,f),zi(Number,x,"slices",C.slices,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function Fwi(o,A){let f=o.version;if(O(f)&&typeof f=="string"){let y=f.split(".");if(y.length===2){if(y[0]!=="1")throw new nr("Cesium only supports CZML version 1.");A._version=f}}if(!O(A._version))throw new nr("CZML version information invalid.  It is expected to be a property on the document object in the <Major>.<Minor> version format.");let m=A._documentPacket;O(o.name)&&(m.name=o.name);let C=o.clock;if(O(C)){let y=m.clock;O(y)?(y.interval=Ae(C.interval,y.interval),y.currentTime=Ae(C.currentTime,y.currentTime),y.range=Ae(C.range,y.range),y.step=Ae(C.step,y.step),y.multiplier=Ae(C.multiplier,y.multiplier)):m.clock={interval:C.interval,currentTime:C.currentTime,range:C.range,step:C.step,multiplier:C.multiplier}}}function Nwi(o,A,f,m){let C=A.ellipse;if(!O(C))return;let y=lf(C.interval),x=o.ellipse;O(x)||(o.ellipse=x=new Cre),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"semiMajorAxis",C.semiMajorAxis,y,m,f),zi(Number,x,"semiMinorAxis",C.semiMinorAxis,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(YD,x,"rotation",C.rotation,y,m,f),zi(YD,x,"stRotation",C.stRotation,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"numberOfVerticalLines",C.numberOfVerticalLines,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function kwi(o,A,f,m){let C=A.ellipsoid;if(!O(C))return;let y=lf(C.interval),x=o.ellipsoid;O(x)||(o.ellipsoid=x=new u6),zi(Boolean,x,"show",C.show,y,m,f),zi(ee,x,"radii",C.radii,y,m,f),zi(ee,x,"innerRadii",C.innerRadii,y,m,f),zi(Number,x,"minimumClock",C.minimumClock,y,m,f),zi(Number,x,"maximumClock",C.maximumClock,y,m,f),zi(Number,x,"minimumCone",C.minimumCone,y,m,f),zi(Number,x,"maximumCone",C.maximumCone,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"stackPartitions",C.stackPartitions,y,m,f),zi(Number,x,"slicePartitions",C.slicePartitions,y,m,f),zi(Number,x,"subdivisions",C.subdivisions,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function Owi(o,A,f,m){let C=A.label;if(!O(C))return;let y=lf(C.interval),x=o.label;O(x)||(o.label=x=new c6),zi(Boolean,x,"show",C.show,y,m,f),zi(String,x,"text",C.text,y,m,f),zi(String,x,"font",C.font,y,m,f),zi(mA,x,"style",C.style,y,m,f),zi(Number,x,"scale",C.scale,y,m,f),zi(Boolean,x,"showBackground",C.showBackground,y,m,f),zi(At,x,"backgroundColor",C.backgroundColor,y,m,f),zi(It,x,"backgroundPadding",C.backgroundPadding,y,m,f),zi(It,x,"pixelOffset",C.pixelOffset,y,m,f),zi(ee,x,"eyeOffset",C.eyeOffset,y,m,f),zi(tA,x,"horizontalOrigin",C.horizontalOrigin,y,m,f),zi(bn,x,"verticalOrigin",C.verticalOrigin,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"fillColor",C.fillColor,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(To,x,"translucencyByDistance",C.translucencyByDistance,y,m,f),zi(To,x,"pixelOffsetScaleByDistance",C.pixelOffsetScaleByDistance,y,m,f),zi(To,x,"scaleByDistance",C.scaleByDistance,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Number,x,"disableDepthTestDistance",C.disableDepthTestDistance,y,m,f)}function Uwi(o,A,f,m){let C=A.model;if(!O(C))return;let y=lf(C.interval),x=o.model;O(x)||(o.model=x=new EY),zi(Boolean,x,"show",C.show,y,m,f),zi(sae.default,x,"uri",C.gltf,y,m,f),zi(Number,x,"scale",C.scale,y,m,f),zi(Number,x,"minimumPixelSize",C.minimumPixelSize,y,m,f),zi(Number,x,"maximumScale",C.maximumScale,y,m,f),zi(Boolean,x,"incrementallyLoadTextures",C.incrementallyLoadTextures,y,m,f),zi(Boolean,x,"runAnimations",C.runAnimations,y,m,f),zi(Boolean,x,"clampAnimations",C.clampAnimations,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"silhouetteColor",C.silhouetteColor,y,m,f),zi(Number,x,"silhouetteSize",C.silhouetteSize,y,m,f),zi(At,x,"color",C.color,y,m,f),zi(HD,x,"colorBlendMode",C.colorBlendMode,y,m,f),zi(Number,x,"colorBlendAmount",C.colorBlendAmount,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f);let v,E,I=C.nodeTransformations;if(O(I))if(Array.isArray(I))for(v=0,E=I.length;v<E;++v)Pze(x,I[v],y,m,f);else Pze(x,I,y,m,f);let w=C.articulations;if(O(w))if(Array.isArray(w))for(v=0,E=w.length;v<E;++v)Rze(x,w[v],y,m,f);else Rze(x,w,y,m,f)}function Pze(o,A,f,m,C){let y=lf(A.interval);O(f)&&(O(y)?y=el.intersect(y,f,BO):y=f);let x=o.nodeTransformations,v=Object.keys(A);for(let E=0,I=v.length;E<I;++E){let w=v[E];if(w==="interval")continue;let Q=A[w];if(!O(Q))continue;O(x)||(o.nodeTransformations=x=new LD),x.hasProperty(w)||x.addProperty(w);let M=x[w];O(M)||(x[w]=M=new yre),zi(ee,M,"translation",Q.translation,y,m,C),zi(jr,M,"rotation",Q.rotation,y,m,C),zi(ee,M,"scale",Q.scale,y,m,C)}}function Rze(o,A,f,m,C){let y=lf(A.interval);O(f)&&(O(y)?y=el.intersect(y,f,BO):y=f);let x=o.articulations,v=Object.keys(A);for(let E=0,I=v.length;E<I;++E){let w=v[E];if(w==="interval")continue;let Q=A[w];!O(Q)||(O(x)||(o.articulations=x=new LD),x.hasProperty(w)||x.addProperty(w),zi(Number,x,w,Q,y,m,C))}}function Gwi(o,A,f,m){let C=A.path;if(!O(C))return;let y=lf(C.interval),x=o.path;O(x)||(o.path=x=new IY),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"leadTime",C.leadTime,y,m,f),zi(Number,x,"trailTime",C.trailTime,y,m,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"resolution",C.resolution,y,m,f),nB(x,"material",C.material,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function Hwi(o,A,f,m){let C=A.point;if(!O(C))return;let y=lf(C.interval),x=o.point;O(x)||(o.point=x=new vre),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"pixelSize",C.pixelSize,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"color",C.color,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(To,x,"scaleByDistance",C.scaleByDistance,y,m,f),zi(To,x,"translucencyByDistance",C.translucencyByDistance,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Number,x,"disableDepthTestDistance",C.disableDepthTestDistance,y,m,f)}function YK(o){this.polygon=o,this._definitionChanged=new br}Object.defineProperties(YK.prototype,{isConstant:{get:function(){let o=this.polygon._positions,A=this.polygon._holes;return(!O(o)||o.isConstant)&&(!O(A)||A.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}});YK.prototype.getValue=function(o,A){let f;O(this.polygon._positions)&&(f=this.polygon._positions.getValue(o));let m;return O(this.polygon._holes)&&(m=this.polygon._holes.getValue(o),O(m)&&(m=m.map(function(C){return new Un(C)}))),O(A)?(A.positions=f,A.holes=m,A):new Un(f,m)};YK.prototype.equals=function(o){return this===o||o instanceof YK&&Nt.equals(this.polygon._positions,o.polygon._positions)&&Nt.equals(this.polygon._holes,o.polygon._holes)};function Vwi(o,A,f,m){let C=A.polygon;if(!O(C))return;let y=lf(C.interval),x=o.polygon;O(x)||(o.polygon=x=new yl),zi(Boolean,x,"show",C.show,y,m,f),tW(x,"_positions",C.positions,f),Qwi(x,"_holes",C.holes,f),(O(x._positions)||O(x._holes))&&(x.hierarchy=new YK(x)),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(YD,x,"stRotation",C.stRotation,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Boolean,x,"perPositionHeight",C.perPositionHeight,y,m,f),zi(Boolean,x,"closeTop",C.closeTop,y,m,f),zi(Boolean,x,"closeBottom",C.closeBottom,y,m,f),zi(Pa,x,"arcType",C.arcType,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function zwi(o){return o?Pa.GEODESIC:Pa.NONE}function Kwi(o,A,f,m){let C=A.polyline;if(!O(C))return;let y=lf(C.interval),x=o.polyline;if(O(x)||(o.polyline=x=new FD),zi(Boolean,x,"show",C.show,y,m,f),tW(x,"positions",C.positions,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),nB(x,"material",C.material,y,m,f),nB(x,"depthFailMaterial",C.depthFailMaterial,y,m,f),zi(Pa,x,"arcType",C.arcType,y,m,f),zi(Boolean,x,"clampToGround",C.clampToGround,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f),O(C.followSurface)&&!O(C.arcType)){let v={};zi(Boolean,v,"followSurface",C.followSurface,y,m,f),x.arcType=lwi(v.followSurface,zwi)}}function Ywi(o,A,f,m){let C=A.polylineVolume;if(!O(C))return;let y=lf(C.interval),x=o.polylineVolume;O(x)||(o.polylineVolume=x=new Ere),tW(x,"positions",C.positions,f),Swi(x,"shape",C.shape,f),zi(Boolean,x,"show",C.show,y,m,f),zi(ZA,x,"cornerType",C.cornerType,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function Jwi(o,A,f,m){let C=A.rectangle;if(!O(C))return;let y=lf(C.interval),x=o.rectangle;O(x)||(o.rectangle=x=new A6),zi(Boolean,x,"show",C.show,y,m,f),zi(Si,x,"coordinates",C.coordinates,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(YD,x,"rotation",C.rotation,y,m,f),zi(YD,x,"stRotation",C.stRotation,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function Wwi(o,A,f,m){let C=A.tileset;if(!O(C))return;let y=lf(C.interval),x=o.tileset;O(x)||(o.tileset=x=new xre),zi(Boolean,x,"show",C.show,y,m,f),zi(sae.default,x,"uri",C.uri,y,m,f),zi(Number,x,"maximumScreenSpaceError",C.maximumScreenSpaceError,y,m,f)}function jwi(o,A,f,m){let C=A.wall;if(!O(C))return;let y=lf(C.interval),x=o.wall;O(x)||(o.wall=x=new _Y),zi(Boolean,x,"show",C.show,y,m,f),tW(x,"positions",C.positions,f),Dze(x,"minimumHeights",C.minimumHeights,f),Dze(x,"maximumHeights",C.maximumHeights,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function Lze(o,A,f,m,C){let y=o.id;if(O(y)||(y=Vu()),SCe=y,!O(C._version)&&y!=="document")throw new nr("The first CZML packet is required to be the document object.");if(o.delete===!0)A.removeById(y);else if(y==="document")Fwi(o,C);else{let x=A.getOrCreateEntity(y),v=o.parent;O(v)&&(x.parent=A.getOrCreateEntity(v));for(let E=f.length-1;E>-1;E--)f[E](x,o,A,m)}SCe=void 0}function qwi(o){let A,f=o._documentPacket.clock;if(!O(f)){if(!O(o._clock)){let C=o._entityCollection.computeAvailability();if(!C.start.equals(Cn.MINIMUM_VALUE)){let y=C.start,x=C.stop,v=fi.secondsDifference(x,y),E=Math.round(v/120);return A=new A5,A.startTime=fi.clone(y),A.stopTime=fi.clone(x),A.clockRange=aC.LOOP_STOP,A.multiplier=E,A.currentTime=fi.clone(y),A.clockStep=jh.SYSTEM_CLOCK_MULTIPLIER,o._clock=A,!0}}return!1}O(o._clock)?A=o._clock.clone():(A=new A5,A.startTime=Cn.MINIMUM_VALUE.clone(),A.stopTime=Cn.MAXIMUM_VALUE.clone(),A.currentTime=Cn.MINIMUM_VALUE.clone(),A.clockRange=aC.LOOP_STOP,A.clockStep=jh.SYSTEM_CLOCK_MULTIPLIER,A.multiplier=1);let m=lf(f.interval);return O(m)&&(A.startTime=m.start,A.stopTime=m.stop),O(f.currentTime)&&(A.currentTime=fi.fromIso8601(f.currentTime)),O(f.range)&&(A.clockRange=Ae(aC[f.range],aC.LOOP_STOP)),O(f.step)&&(A.clockStep=Ae(jh[f.step],jh.SYSTEM_CLOCK_MULTIPLIER)),O(f.multiplier)&&(A.multiplier=f.multiplier),A.equals(o._clock)?!1:(o._clock=A.clone(o._clock),!0)}function tat(o,A,f,m){f=Ae(f,Ae.EMPTY_OBJECT);let C=A,y=f.sourceUri,x=f.credit;if(typeof x=="string"&&(x=new tl(x)),o._credit=x,typeof A=="string"||A instanceof An){A=An.createIfNeeded(A),C=A.fetchJson(),y=Ae(y,A.clone());let v=o._resourceCredits,E=A.credits;if(O(E)){let I=E.length;for(let w=0;w<I;w++)v.push(E[w])}}return y=An.createIfNeeded(y),cy.setLoading(o,!0),Promise.resolve(C).then(function(v){return Xwi(o,v,y,m)}).catch(function(v){return cy.setLoading(o,!1),o._error.raiseEvent(o,v),console.log(v),Promise.reject(v)})}function Xwi(o,A,f,m){cy.setLoading(o,!0);let C=o._entityCollection;m&&(o._version=void 0,o._documentPacket=new iat,C.removeAll()),aI._processCzml(A,C,f,void 0,o);let y=qwi(o),x=o._documentPacket;return O(x.name)&&o._name!==x.name?(o._name=x.name,y=!0):!O(o._name)&&O(f)&&(o._name=wY(f.getUrlComponent()),y=!0),cy.setLoading(o,!1),y&&o._changed.raiseEvent(o),o}function iat(){this.name=void 0,this.clock=void 0}function aI(o){this._name=o,this._changed=new br,this._error=new br,this._isLoading=!1,this._loading=new br,this._clock=void 0,this._documentPacket=new iat,this._version=void 0,this._entityCollection=new iw(this),this._entityCluster=new eN,this._credit=void 0,this._resourceCredits=[]}aI.load=function(o,A){return new aI().load(o,A)};Object.defineProperties(aI.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(o){this._entityCollection.show=o}},clustering:{get:function(){return this._entityCluster},set:function(o){this._entityCluster=o}},credit:{get:function(){return this._credit}}});aI.updaters=[Mwi,Pwi,Rwi,Lwi,Nwi,kwi,Owi,Uwi,ywi,xwi,Gwi,Hwi,Vwi,Kwi,Ywi,_wi,Jwi,vwi,Wwi,Ewi,jwi,Iwi,Dwi];aI.prototype.process=function(o,A){return tat(this,o,A,!1)};aI.prototype.load=function(o,A){return tat(this,o,A,!0)};aI.prototype.update=function(o){return!0};aI.processPacketData=zi;aI.processPositionPacketData=eat;aI.processMaterialPacketData=nB;aI._processCzml=function(o,A,f,m,C){if(m=Ae(m,aI.updaters),Array.isArray(o))for(let y=0,x=o.length;y<x;++y)Lze(o[y],A,m,f,C);else Lze(o,A,m,f,C)};var iW=aI,DCe=32,Zwi="http://www.opengis.net/kml/2.2",Gb="http://www.google.com/kml/ext/2.2",$wi="http://www.w3.org/2000/xmlns/";function Aae(o){this._files={},this._promises=[],this._count=0,this._modelCallback=o}var ebi=/^data:image\/([^,;]+)/;Aae.prototype.texture=function(o){let A=this,f;if(typeof o=="string"||o instanceof An){if(o=An.createIfNeeded(o),!o.isDataUri)return o.url;let m=o.url.match(ebi);f=`texture_${++this._count}`,O(m)&&(f+=`.${m[1]}`);let C=o.fetchBlob().then(function(y){A._files[f]=y});return this._promises.push(C),f}if(o instanceof HTMLCanvasElement){f=`texture_${++this._count}.png`;let m=new Promise(C=>{o.toBlob(function(y){A._files[f]=y,C()})});return this._promises.push(m),f}return""};function tbi(o,A){return function(f){o._files[A]=f}}Aae.prototype.model=function(o,A){let f=this._modelCallback;if(!O(f))throw new nr("Encountered a model entity while exporting to KML, but no model callback was supplied.");let m={},C=f(o,A,m);for(let y in m)if(m.hasOwnProperty(y)){let x=Promise.resolve(m[y]);this._promises.push(x),x.then(tbi(this,y))}return C};Object.defineProperties(Aae.prototype,{promise:{get:function(){return Promise.all(this._promises)}},files:{get:function(){return this._files}}});function hae(o){this._time=o}hae.prototype.get=function(o,A,f){let m;return O(o)&&(m=O(o.getValue)?o.getValue(this._time,f):o),Ae(m,A)};hae.prototype.getColor=function(o,A){let f=this.get(o,A);if(O(f))return Dk(f)};hae.prototype.getMaterialType=function(o){if(O(o))return o.getType(this._time)};function CDe(){this._ids={},this._styles={},this._count=0}CDe.prototype.get=function(o){let A=this._ids,f=o.innerHTML;if(O(A[f]))return A[f];let m=`style-${++this._count}`;return o.setAttribute("id",m),m=`#${m}`,A[f]=m,this._styles[f]=o,m};CDe.prototype.save=function(o){let A=this._styles,f=o.childNodes[0];for(let m in A)A.hasOwnProperty(m)&&o.insertBefore(A[m],f)};function rat(){this._ids={}}rat.prototype.get=function(o){if(!O(o))return this.get(Vu());let A=this._ids;return O(A[o])?`${o.toString()}-${++A[o]}`:(A[o]=0,o)};function yDe(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.entities,f=Ae(o.kmz,!1),m=yDe._createState(o),C=A.values.filter(function(I){return!O(I.parent)}),y=m.kmlDoc,x=y.documentElement;x.setAttributeNS($wi,"xmlns:gx",Gb);let v=y.createElement("Document");x.appendChild(v),oat(m,v,C),m.styleCache.save(v);let E=m.externalFileHandler;return E.promise.then(function(){let I=new XMLSerializer().serializeToString(m.kmlDoc);return f?ibi(I,E.files):{kml:I,externalFiles:E.files}})}function ibi(o,A){let f=xs("ThirdParty/Workers/z-worker-pako.js");ZEe({workerScripts:{deflate:[f,"./pako_deflate.min.js"],inflate:[f,"./pako_inflate.min.js"]}});let m=new Gje,C=new bGt(m);return C.add("doc.kml",new qUt(o)).then(function(){let y=Object.keys(A);return nat(C,y,A,0)}).then(function(){return C.close()}).then(function(y){return{kmz:y}})}function nat(o,A,f,m){if(A.length===m)return;let C=A[m];return o.add(C,new rIe(f[C])).then(function(){return nat(o,A,f,m+1)})}yDe._createState=function(o){let A=o.entities,f=new CDe,m=A.computeAvailability(),C=O(o.time)?o.time:m.start,y=Ae(o.defaultAvailability,m),x=Ae(o.sampleDuration,60);y.start===Cn.MINIMUM_VALUE?y.stop===Cn.MAXIMUM_VALUE?y=new el:fi.addSeconds(y.stop,-10*x,y.start):y.stop===Cn.MAXIMUM_VALUE&&fi.addSeconds(y.start,10*x,y.stop);let v=new Aae(o.modelCallback);return{kmlDoc:document.implementation.createDocument(Zwi,"kml"),ellipsoid:Ae(o.ellipsoid,Di.WGS84),idManager:new rat,styleCache:f,externalFileHandler:v,time:C,valueGetter:new hae(C),sampleDuration:x,defaultAvailability:new mx([y])}};function oat(o,A,f){let m=o.kmlDoc,C=o.styleCache,y=o.valueGetter,x=o.idManager,v=f.length,E,I,w;for(let Q=0;Q<v;++Q){let M=f[Q];E=[],I=[],w=[],rbi(o,M,I,w),nbi(o,M.polyline,I,w),Nze(o,M.rectangle,I,w,E),Nze(o,M.polygon,I,w,E),lbi(o,M,M.model,I,w);let B,T=M.availability;O(T)&&(B=m.createElement("TimeSpan"),fi.equals(T.start,Cn.MINIMUM_VALUE)||B.appendChild(xa(m,"begin",fi.toIso8601(T.start))),fi.equals(T.stop,Cn.MAXIMUM_VALUE)||B.appendChild(xa(m,"end",fi.toIso8601(T.stop))));for(let L=0;L<E.length;++L){let R=E[L];R.setAttribute("id",x.get(M.id)),R.appendChild(xa(m,"name",M.name)),R.appendChild(xa(m,"visibility",M.show)),R.appendChild(xa(m,"description",M.description)),O(B)&&R.appendChild(B),A.appendChild(R)}let D=I.length;if(D>0){let L=m.createElement("Placemark");L.setAttribute("id",x.get(M.id));let R=M.name,k=M.label;if(O(k)){let V=m.createElement("LabelStyle"),H=y.get(k.text);R=O(H)&&H.length>0?H:R;let q=y.getColor(k.fillColor);O(q)&&(V.appendChild(xa(m,"color",q)),V.appendChild(xa(m,"colorMode","normal")));let ie=y.get(k.scale);O(ie)&&V.appendChild(xa(m,"scale",ie)),w.push(V)}L.appendChild(xa(m,"name",R)),L.appendChild(xa(m,"visibility",M.show)),L.appendChild(xa(m,"description",M.description)),O(B)&&L.appendChild(B),A.appendChild(L);let U=w.length;if(U>0){let V=m.createElement("Style");for(let H=0;H<U;++H)V.appendChild(w[H]);L.appendChild(xa(m,"styleUrl",C.get(V)))}if(I.length===1)L.appendChild(I[0]);else if(I.length>1){let V=m.createElement("MultiGeometry");for(let H=0;H<D;++H)V.appendChild(I[H]);L.appendChild(V)}}let F=M._children;if(F.length>0){let L=m.createElement("Folder");L.setAttribute("id",x.get(M.id)),L.appendChild(xa(m,"name",M.name)),L.appendChild(xa(m,"visibility",M.show)),L.appendChild(xa(m,"description",M.description)),A.appendChild(L),oat(o,L,F)}}}var GE=new ee,Tv=new Kt,Sb=new fi;function rbi(o,A,f,m){let C=o.kmlDoc,y=o.ellipsoid,x=o.valueGetter,v=Ae(A.billboard,A.point);if(!O(v)&&!O(A.path))return;let E=A.position;if(!E.isConstant){aat(o,A,v,f,m);return}x.get(E,void 0,GE);let I=xa(C,"coordinates",Sk(GE,y)),w=C.createElement("Point"),Q=C.createElement("altitudeMode");Q.appendChild(Zk(o,v.heightReference)),w.appendChild(Q),w.appendChild(I),f.push(w);let M=v instanceof eP?lat(o,v):sat(o,v);m.push(M)}function aat(o,A,f,m,C){let y=o.kmlDoc,x=o.ellipsoid,v=o.valueGetter,E,I=A.position,w=!0;I instanceof U_?(E=I.intervals,w=!1):E=Ae(A.availability,o.defaultAvailability);let Q=f instanceof EY,M,B,T,D=[];for(M=0;M<E.length;++M){let L=E.get(M),R=w?I:L.data,k=y.createElement("altitudeMode");R instanceof g6?(R=R._value,k.appendChild(Zk(o,xn.CLAMP_TO_GROUND))):O(f)?k.appendChild(Zk(o,f.heightReference)):k.appendChild(Zk(o,xn.NONE));let U=[],V=[];if(R.isConstant){v.get(R,void 0,GE);let q=xa(y,"coordinates",Sk(GE,x));U.push(fi.toIso8601(L.start)),V.push(q),U.push(fi.toIso8601(L.stop)),V.push(q)}else if(R instanceof R1)for(T=R._property._times,B=0;B<T.length;++B)U.push(fi.toIso8601(T[B])),R.getValueInReferenceFrame(T[B],s0.FIXED,GE),V.push(Sk(GE,x));else if(R instanceof uM){T=R._times;let q=R._values;for(B=0;B<T.length;++B)U.push(fi.toIso8601(T[B])),ee.fromArray(q,B*3,GE),V.push(Sk(GE,x))}else{let q=o.sampleDuration;L.start.clone(Sb),L.isStartIncluded||fi.addSeconds(Sb,q,Sb);let ie=L.stop;for(;fi.lessThan(Sb,ie);)R.getValue(Sb,GE),U.push(fi.toIso8601(Sb)),V.push(Sk(GE,x)),fi.addSeconds(Sb,q,Sb);L.isStopIncluded&&fi.equals(Sb,ie)&&(R.getValue(Sb,GE),U.push(fi.toIso8601(Sb)),V.push(Sk(GE,x)))}let H=y.createElementNS(Gb,"Track");H.appendChild(k);for(let q=0;q<U.length;++q){let ie=xa(y,"when",U[q]),Z=xa(y,"coord",V[q],Gb);H.appendChild(ie),H.appendChild(Z)}Q&&H.appendChild(uat(o,f)),D.push(H)}if(D.length===1)m.push(D[0]);else if(D.length>1){let L=y.createElementNS(Gb,"MultiTrack");for(M=0;M<D.length;++M)L.appendChild(D[M]);m.push(L)}if(O(f)&&!Q){let L=f instanceof eP?lat(o,f):sat(o,f);C.push(L)}let F=A.path;if(O(F)){let L=v.get(F.width),R=F.material;if(O(R)||O(L)){let k=y.createElement("LineStyle");O(L)&&k.appendChild(xa(y,"width",L)),xDe(o,R,k),C.push(k)}}}function sat(o,A){let f=o.kmlDoc,m=o.valueGetter,C=f.createElement("IconStyle"),y=m.getColor(A.color);O(y)&&(C.appendChild(xa(f,"color",y)),C.appendChild(xa(f,"colorMode","normal")));let x=m.get(A.pixelSize);return O(x)&&C.appendChild(xa(f,"scale",x/DCe)),C}function lat(o,A){let f=o.kmlDoc,m=o.valueGetter,C=o.externalFileHandler,y=f.createElement("IconStyle"),x=m.get(A.image);if(O(x)){x=C.texture(x);let M=f.createElement("Icon");M.appendChild(xa(f,"href",x));let B=m.get(A.imageSubRegion);O(B)&&(M.appendChild(xa(f,"x",B.x,Gb)),M.appendChild(xa(f,"y",B.y,Gb)),M.appendChild(xa(f,"w",B.width,Gb)),M.appendChild(xa(f,"h",B.height,Gb))),y.appendChild(M)}let v=m.getColor(A.color);O(v)&&(y.appendChild(xa(f,"color",v)),y.appendChild(xa(f,"colorMode","normal")));let E=m.get(A.scale);O(E)&&y.appendChild(xa(f,"scale",E));let I=m.get(A.pixelOffset);if(O(I)){E=Ae(E,1),It.divideByScalar(I,E,I);let M=m.get(A.width,DCe),B=m.get(A.height,DCe),T=m.get(A.horizontalOrigin,tA.CENTER);T===tA.CENTER?I.x-=M*.5:T===tA.RIGHT&&(I.x-=M);let D=m.get(A.verticalOrigin,bn.CENTER);D===bn.TOP?I.y+=B:D===bn.CENTER&&(I.y+=B*.5);let F=f.createElement("hotSpot");F.setAttribute("x",-I.x),F.setAttribute("y",I.y),F.setAttribute("xunits","pixels"),F.setAttribute("yunits","pixels"),y.appendChild(F)}let w=m.get(A.rotation),Q=m.get(A.alignedAxis);return O(w)&&ee.equals(ee.UNIT_Z,Q)&&(w=je.toDegrees(-w),w===0&&(w=360),y.appendChild(xa(f,"heading",w))),y}function nbi(o,A,f,m){let C=o.kmlDoc,y=o.ellipsoid,x=o.valueGetter;if(!O(A))return;let v=C.createElement("LineString"),E=C.createElement("altitudeMode"),I=x.get(A.clampToGround,!1),w;I?(v.appendChild(xa(C,"tessellate",!0)),w=C.createTextNode("clampToGround")):w=C.createTextNode("absolute"),E.appendChild(w),v.appendChild(E);let Q=A.positions,M=x.get(Q),B=xa(C,"coordinates",Sk(M,y));v.appendChild(B);let T=x.get(A.zIndex);I&&O(T)&&v.appendChild(xa(C,"drawOrder",T,Gb)),f.push(v);let D=C.createElement("LineStyle"),F=x.get(A.width);O(F)&&D.appendChild(xa(C,"width",F)),xDe(o,A.material,D),m.push(D)}function obi(o,A,f){let m=o.kmlDoc,C=o.valueGetter,y=C.get(A.height,0);f>0&&(y=f);let x=A.coordinates,v=C.get(x),E=[],I=[Si.northeast,Si.southeast,Si.southwest,Si.northwest];for(let B=0;B<4;++B)I[B](v,Tv),E.push(`${je.toDegrees(Tv.longitude)},${je.toDegrees(Tv.latitude)},${y}`);let w=xa(m,"coordinates",E.join(" ")),Q=m.createElement("outerBoundaryIs"),M=m.createElement("LinearRing");return M.appendChild(w),Q.appendChild(M),[Q]}function Fze(o,A,f,m){let C=o.kmlDoc,y=o.ellipsoid,x=[],v=A.length;for(let w=0;w<v;++w)Kt.fromCartesian(A[w],y,Tv),x.push(`${je.toDegrees(Tv.longitude)},${je.toDegrees(Tv.latitude)},${m?Tv.height:f}`);let E=xa(C,"coordinates",x.join(" ")),I=C.createElement("LinearRing");return I.appendChild(E),I}function abi(o,A,f){let m=o.kmlDoc,C=o.valueGetter,y=C.get(A.height,0),x=C.get(A.perPositionHeight,!1);!x&&f>0&&(y=f);let v=[],E=A.hierarchy,I=C.get(E),w=Array.isArray(I)?I:I.positions,Q=m.createElement("outerBoundaryIs");Q.appendChild(Fze(o,w,y,x)),v.push(Q);let M=I.holes;if(O(M)){let B=M.length;for(let T=0;T<B;++T){let D=m.createElement("innerBoundaryIs");D.appendChild(Fze(o,M[T].positions,y,x)),v.push(D)}}return v}function Nze(o,A,f,m,C){let y=o.kmlDoc,x=o.valueGetter;if(!O(A))return;let v=A instanceof A6;if(v&&x.getMaterialType(A.material)==="Image"){sbi(o,A,C);return}let E=y.createElement("Polygon"),I=x.get(A.extrudedHeight,0);I>0&&E.appendChild(xa(y,"extrude",!0));let w=v?obi(o,A,I):abi(o,A,I),Q=w.length;for(let F=0;F<Q;++F)E.appendChild(w[F]);let M=y.createElement("altitudeMode");M.appendChild(Zk(o,A.heightReference)),E.appendChild(M),f.push(E);let B=y.createElement("PolyStyle"),T=x.get(A.fill,!1);T&&B.appendChild(xa(y,"fill",T)),xDe(o,A.material,B);let D=x.get(A.outline,!1);if(D){B.appendChild(xa(y,"outline",D));let F=y.createElement("LineStyle"),L=x.get(A.outlineWidth,1);F.appendChild(xa(y,"width",L));let R=x.getColor(A.outlineColor,At.BLACK);F.appendChild(xa(y,"color",R)),F.appendChild(xa(y,"colorMode","normal")),m.push(F)}m.push(B)}function sbi(o,A,f){let m=o.kmlDoc,C=o.valueGetter,y=o.externalFileHandler,x=m.createElement("GroundOverlay"),v=m.createElement("altitudeMode");v.appendChild(Zk(o,A.heightReference)),x.appendChild(v);let E=C.get(A.height);O(E)&&x.appendChild(xa(m,"altitude",E));let I=C.get(A.coordinates),w=m.createElement("LatLonBox");w.appendChild(xa(m,"north",je.toDegrees(I.north))),w.appendChild(xa(m,"south",je.toDegrees(I.south))),w.appendChild(xa(m,"east",je.toDegrees(I.east))),w.appendChild(xa(m,"west",je.toDegrees(I.west))),x.appendChild(w);let Q=C.get(A.material),M=y.texture(Q.image),B=m.createElement("Icon");B.appendChild(xa(m,"href",M)),x.appendChild(B);let T=Q.color;O(T)&&x.appendChild(xa(m,"color",Dk(Q.color))),f.push(x)}function uat(o,A){let f=o.kmlDoc,m=o.valueGetter,C=o.externalFileHandler,y=f.createElement("Model"),x=m.get(A.scale);if(O(x)){let I=f.createElement("scale");I.appendChild(xa(f,"x",x)),I.appendChild(xa(f,"y",x)),I.appendChild(xa(f,"z",x)),y.appendChild(I)}let v=f.createElement("Link"),E=C.model(A,o.time);return v.appendChild(xa(f,"href",E)),y.appendChild(v),y}function lbi(o,A,f,m,C){let y=o.kmlDoc,x=o.ellipsoid,v=o.valueGetter;if(!O(f))return;let E=A.position;if(!E.isConstant){aat(o,A,f,m,C);return}let I=uat(o,f),w=y.createElement("altitudeMode");w.appendChild(Zk(o,f.heightReference)),I.appendChild(w),v.get(E,void 0,GE),Kt.fromCartesian(GE,x,Tv);let Q=y.createElement("Location");Q.appendChild(xa(y,"longitude",je.toDegrees(Tv.longitude))),Q.appendChild(xa(y,"latitude",je.toDegrees(Tv.latitude))),Q.appendChild(xa(y,"altitude",Tv.height)),I.appendChild(Q),m.push(I)}function xDe(o,A,f){let m=o.kmlDoc,C=o.valueGetter;if(!O(A))return;let y=C.get(A);if(!O(y))return;let x,v=C.getMaterialType(A),E,I;switch(v){case"Image":x=Dk(At.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":x=Dk(y.color);break;case"PolylineOutline":x=Dk(y.color),E=Dk(y.outlineColor),I=y.outlineWidth,f.appendChild(xa(m,"outerColor",E,Gb)),f.appendChild(xa(m,"outerWidth",I,Gb));break;case"Stripe":x=Dk(y.oddColor);break}O(x)&&(f.appendChild(xa(m,"color",x)),f.appendChild(xa(m,"colorMode","normal")))}function Zk(o,A){let f=o.kmlDoc,m=o.valueGetter.get(A,xn.NONE),C;switch(m){case xn.NONE:C=f.createTextNode("absolute");break;case xn.CLAMP_TO_GROUND:C=f.createTextNode("clampToGround");break;case xn.RELATIVE_TO_GROUND:C=f.createTextNode("relativeToGround");break}return C}function Sk(o,A){Array.isArray(o)||(o=[o]);let f=o.length,m=[];for(let C=0;C<f;++C)Kt.fromCartesian(o[C],A,Tv),m.push(`${je.toDegrees(Tv.longitude)},${je.toDegrees(Tv.latitude)},${Tv.height}`);return m.join(" ")}function xa(o,A,f,m){f=Ae(f,""),typeof f=="boolean"&&(f=f?"1":"0");let C=O(m)?o.createElementNS(m,A):o.createElement(A),y=f==="string"&&f.indexOf("<")!==-1?o.createCDATASection(f):o.createTextNode(f);return C.appendChild(y),C}function Dk(o){let A="",f=o.toBytes();for(let m=3;m>=0;--m)A+=f[m]<16?`0${f[m].toString(16)}`:f[m].toString(16);return A}var cat=yDe,Aat;typeof DOMParser<"u"&&(Aat=new DOMParser);var ubi=new dje({stripPrefix:!1,email:!1,replaceFn:function(o,A){if(!A.protocolUrlMatch)return!1}}),pie=32,kze=2414016,Oze=1,Uze=16093e3,Gze=.1,cbi=[null,void 0,"http://www.topografix.com/GPX/1/1"],$A={gpx:cbi};function Abi(o){return new Promise((A,f)=>{let m=new FileReader;m.addEventListener("load",function(){A(m.result)}),m.addEventListener("error",function(){f(m.error)}),m.readAsText(o)})}function vDe(o,A){let f=JK(o,"id");return f=O(f)?f:Vu(),A.getOrCreateEntity(f)}function EDe(o){let A=Hze(o,"lon"),f=Hze(o,"lat"),m=n7(o,"ele",$A.gpx);return ee.fromDegrees(A,f,m)}function Hze(o,A){if(!O(o))return;let f=o.getAttribute(A);if(f!==null){let m=parseFloat(f);return isNaN(m)?void 0:m}}function JK(o,A){if(!O(o))return;let f=o.getAttribute(A);return f!==null?f:void 0}function yN(o,A,f){if(!O(o))return;let m=o.childNodes,C=m.length;for(let y=0;y<C;y++){let x=m[y];if(x.localName===A&&f.indexOf(x.namespaceURI)!==-1)return x}}function IDe(o,A,f){if(!O(o))return;let m=[],C=o.getElementsByTagName(A),y=C.length;for(let x=0;x<y;x++){let v=C[x];v.localName===A&&f.indexOf(v.namespaceURI)!==-1&&m.push(v)}return m}function n7(o,A,f){let m=yN(o,A,f);if(O(m)){let C=parseFloat(m.textContent);return isNaN(C)?void 0:C}}function XE(o,A,f){let m=yN(o,A,f);if(O(m))return m.textContent.trim()}function hat(o){let A=new eP;return A.width=pie,A.height=pie,A.scaleByDistance=new To(kze,Oze,Uze,Gze),A.pixelOffsetScaleByDistance=new To(kze,Oze,Uze,Gze),A.verticalOrigin=new bc(bn.BOTTOM),A.image=o,A}function hbi(){let o=new c6;return o.translucencyByDistance=new To(3e6,1,5e6,0),o.pixelOffset=new It(17,0),o.horizontalOrigin=tA.LEFT,o.font="16px sans-serif",o.style=mA.FILL_AND_OUTLINE,o}function dat(o){let A=new FD;return A.width=4,A.material=new JM,A.material.color=O(o)?o:At.RED,A.material.outlineWidth=2,A.material.outlineColor=At.BLACK,A}var Vze={time:{text:"Time",tag:"time"},comment:{text:"Comment",tag:"cmt"},description:{text:"Description",tag:"desc"},source:{text:"Source",tag:"src"},number:{text:"GPS track/route number",tag:"number"},type:{text:"Type",tag:"type"}},o7;typeof document<"u"&&(o7=document.createElement("div"));function _De(o,A){let f,m="",C=Object.keys(Vze),y=C.length;for(f=0;f<y;f++){let w=C[f],Q=Vze[w];Q.value=Ae(XE(o,Q.tag,$A.gpx),""),O(Q.value)&&Q.value!==""&&(m=`${m}<p>${Q.text}: ${Q.value}</p>`)}if(!O(m)||m==="")return;m=ubi.link(m),o7.innerHTML=m;let x=o7.querySelectorAll("a");for(f=0;f<x.length;f++)x[f].setAttribute("target","_blank");let v=At.WHITE,E=At.BLACK,I='<div class="cesium-infoBox-description-lighter" style="';return I+="overflow:auto;",I+="word-wrap:break-word;",I+=`background-color:${v.toCssColorString()};`,I+=`color:${E.toCssColorString()};`,I+='">',I+=`${o7.innerHTML}</div>`,o7.innerHTML="",I}function fat(o,A,f,m){let C=EDe(A),y=vDe(A,f);y.position=C;let x=O(m.waypointImage)?m.waypointImage:o._pinBuilder.fromMakiIconId("marker",At.RED,pie);y.billboard=hat(x);let v=XE(A,"name",$A.gpx);y.name=v,y.label=hbi(),y.label.text=v,y.description=_De(A,y),m.clampToGround&&(y.billboard.heightReference=xn.CLAMP_TO_GROUND,y.label.heightReference=xn.CLAMP_TO_GROUND)}function dbi(o,A,f,m){let C=vDe(A,f);C.description=_De(A,C);let y=IDe(A,"rtept",$A.gpx),x=new Array(y.length);for(let v=0;v<y.length;v++)fat(o,y[v],f,m),x[v]=EDe(y[v]);C.polyline=dat(m.routeColor),m.clampToGround&&(C.polyline.clampToGround=!0),C.polyline.positions=x}function fbi(o,A,f,m){let C=vDe(A,f);C.description=_De(A,C);let y=IDe(A,"trkseg",$A.gpx),x=[],v=[],E,I=!0,w=new R1;for(let Q=0;Q<y.length;Q++)E=gbi(y[Q]),x=x.concat(E.positions),E.times.length>0?(v=v.concat(E.times),w.addSamples(v,x),I=I&&!0):I=!1;if(I){let Q=O(m.waypointImage)?m.waypointImage:o._pinBuilder.fromMakiIconId("marker",At.RED,pie);C.billboard=hat(Q),C.position=w,m.clampToGround&&(C.billboard.heightReference=xn.CLAMP_TO_GROUND),C.availability=new mx,C.availability.addInterval(new el({start:v[0],stop:v[v.length-1]}))}C.polyline=dat(m.trackColor),C.polyline.positions=x,m.clampToGround&&(C.polyline.clampToGround=!0)}function gbi(o){let A={positions:[],times:[]},f=IDe(o,"trkpt",$A.gpx),m;for(let C=0;C<f.length;C++){let y=EDe(f[C]);A.positions.push(y),m=XE(f[C],"time",$A.gpx),O(m)&&A.times.push(fi.fromIso8601(m))}return A}function pbi(o){let A=yN(o,"metadata",$A.gpx);if(O(A)){let f={name:XE(A,"name",$A.gpx),desc:XE(A,"desc",$A.gpx),author:mbi(A),copyright:ybi(A),link:gat(A),time:XE(A,"time",$A.gpx),keywords:XE(A,"keywords",$A.gpx),bounds:xbi(A)};if(O(f.name)||O(f.desc)||O(f.author)||O(f.copyright)||O(f.link)||O(f.time)||O(f.keywords)||O(f.bounds))return f}}function mbi(o){let A=yN(o,"author",$A.gpx);if(O(A)){let f={name:XE(A,"name",$A.gpx),email:Cbi(A),link:gat(A)};if(O(f.name)||O(f.email)||O(f.link))return f}}function Cbi(o){let A=yN(o,"email",$A.gpx);if(O(A)){let f=XE(A,"id",$A.gpx),m=XE(A,"domain",$A.gpx);return`${f}@${m}`}}function gat(o){let A=yN(o,"link",$A.gpx);if(O(A)){let f={href:JK(A,"href"),text:XE(A,"text",$A.gpx),mimeType:XE(A,"type",$A.gpx)};if(O(f.href)||O(f.text)||O(f.mimeType))return f}}function ybi(o){let A=yN(o,"copyright",$A.gpx);if(O(A)){let f={author:JK(A,"author"),year:XE(A,"year",$A.gpx),license:XE(A,"license",$A.gpx)};if(O(f.author)||O(f.year)||O(f.license))return f}}function xbi(o){let A=yN(o,"bounds",$A.gpx);if(O(A)){let f={minLat:n7(A,"minlat",$A.gpx),maxLat:n7(A,"maxlat",$A.gpx),minLon:n7(A,"minlon",$A.gpx),maxLon:n7(A,"maxlon",$A.gpx)};if(O(f.minLat)||O(f.maxLat)||O(f.minLon)||O(f.maxLon))return f}}var zze={wpt:fat,rte:dbi,trk:fbi};function vbi(o,A,f,m){let C=Object.keys(zze),y=C.length;for(let x=0;x<y;x++){let v=C[x],E=zze[v],I=A.childNodes,w=I.length;for(let Q=0;Q<w;Q++){let M=I[Q];M.localName===v&&$A.gpx.indexOf(M.namespaceURI)!==-1&&E(o,M,f,m)}}}function Kze(o,A,f){let m=o._entityCollection;m.removeAll();let C=A.documentElement,y=JK(C,"version"),x=JK(C,"creator"),v,E=pbi(C);O(E)&&(v=E.name),C.localName==="gpx"?vbi(o,C,m,f):console.log(`GPX - Unsupported node: ${C.localName}`);let I,w=m.computeAvailability(),Q=w.start,M=w.stop,B=fi.equals(Q,Cn.MINIMUM_VALUE),T=fi.equals(M,Cn.MAXIMUM_VALUE);if(!B||!T){let F;B&&(F=new Date,F.setHours(0,0,0,0),Q=fi.fromDate(F)),T&&(F=new Date,F.setHours(24,0,0,0),M=fi.fromDate(F)),I=new A5,I.startTime=Q,I.stopTime=M,I.currentTime=fi.clone(Q),I.clockRange=aC.LOOP_STOP,I.clockStep=jh.SYSTEM_CLOCK_MULTIPLIER,I.multiplier=Math.round(Math.min(Math.max(fi.secondsDifference(M,Q)/60,1),31556900))}let D=!1;return o._name!==v&&(o._name=v,D=!0),o._creator!==x&&(o._creator=x,D=!0),Ebi(o._metadata,E)&&(o._metadata=E,D=!0),o._version!==y&&(o._version=y,D=!0),I!==o._clock&&(D=!0,o._clock=I),D&&o._changed.raiseEvent(o),cy.setLoading(o,!1),o}function Ebi(o,A){return!O(o)&&!O(A)?!1:O(o)&&O(A)?o.name!==A.name||o.dec!==A.desc||o.src!==A.src||o.author!==A.author||o.copyright!==A.copyright||o.link!==A.link||o.time!==A.time||o.bounds!==A.bounds:!0}function Ibi(o,A,f,m){m=Ae(m,Ae.EMPTY_OBJECT);let C=f;if(typeof f=="string"||f instanceof An){f=An.createIfNeeded(f),C=f.fetchBlob();let y=o._resourceCredits,x=f.credits;if(O(x)){let v=x.length;for(let E=0;E<v;E++)y.push(x[E])}}return Promise.resolve(C).then(function(y){return y instanceof Blob?Abi(y).then(function(x){let v,E;try{v=Aat.parseFromString(x,"application/xml")}catch(I){E=I.toString()}if(O(E)||v.body||v.documentElement.tagName==="parsererror"){let I=O(E)?E:v.documentElement.firstChild.nodeValue;throw I||(I=v.body.innerText),new nr(I)}return Kze(o,v,m)}):Kze(o,y,m)}).catch(function(y){return o._error.raiseEvent(o,y),console.log(y),Promise.reject(y)})}function z8(){this._changed=new br,this._error=new br,this._loading=new br,this._clock=void 0,this._entityCollection=new iw,this._entityCluster=new eN,this._name=void 0,this._version=void 0,this._creator=void 0,this._metadata=void 0,this._isLoading=!1,this._pinBuilder=new bY}z8.load=function(o,A){return new z8().load(o,A)};Object.defineProperties(z8.prototype,{name:{get:function(){return this._name}},version:{get:function(){return this._version}},creator:{get:function(){return this._creator}},metadata:{get:function(){return this._metadata}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(o){this._entityCollection.show=o}},clustering:{get:function(){return this._entityCluster},set:function(o){this._entityCluster=o}}});z8.prototype.update=function(o){return!0};z8.prototype.load=function(o,A){if(!O(o))throw new Ui("data is required.");A=Ae(A,Ae.EMPTY_OBJECT),cy.setLoading(this,!0);let f=this._name,m=this;return Ibi(this,this._entityCollection,o,A).then(function(){let C,y=m._entityCollection.computeAvailability(),x=y.start,v=y.stop,E=fi.equals(x,Cn.MINIMUM_VALUE),I=fi.equals(v,Cn.MAXIMUM_VALUE);if(!E||!I){let Q;E&&(Q=new Date,Q.setHours(0,0,0,0),x=fi.fromDate(Q)),I&&(Q=new Date,Q.setHours(24,0,0,0),v=fi.fromDate(Q)),C=new A5,C.startTime=x,C.stopTime=v,C.currentTime=fi.clone(x),C.clockRange=aC.LOOP_STOP,C.clockStep=jh.SYSTEM_CLOCK_MULTIPLIER,C.multiplier=Math.round(Math.min(Math.max(fi.secondsDifference(v,x)/60,1),31556900))}let w=!1;return C!==m._clock&&(m._clock=C,w=!0),f!==m._name&&(w=!0),w&&m._changed.raiseEvent(m),cy.setLoading(m,!1),m}).catch(function(C){return cy.setLoading(m,!1),m._error.raiseEvent(m,C),console.log(C),Promise.reject(C)})};var BDe=z8;function rW(){Ui.throwInstantiationError()}rW.prototype.update=Ui.throwInstantiationError;rW.prototype.getBoundingSphere=Ui.throwInstantiationError;rW.prototype.isDestroyed=Ui.throwInstantiationError;rW.prototype.destroy=Ui.throwInstantiationError;var pat=rW,mat={};(function(o,A){o.CryptoJS=A()})(mat,function(){var o=o||function(A,f){var m;if(typeof window<"u"&&window.crypto&&(m=window.crypto),typeof self<"u"&&self.crypto&&(m=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(m=globalThis.crypto),!m&&typeof window<"u"&&window.msCrypto&&(m=window.msCrypto),!m&&typeof global<"u"&&global.crypto&&(m=global.crypto),!m&&typeof sM=="function")try{m=sM("crypto")}catch{}var C=function(){if(m){if(typeof m.getRandomValues=="function")try{return m.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof m.randomBytes=="function")try{return m.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},y=Object.create||function(){function L(){}return function(R){var k;return L.prototype=R,k=new L,L.prototype=null,k}}(),x={},v=x.lib={},E=v.Base=function(){return{extend:function(L){var R=y(this);return L&&R.mixIn(L),(!R.hasOwnProperty("init")||this.init===R.init)&&(R.init=function(){R.$super.init.apply(this,arguments)}),R.init.prototype=R,R.$super=this,R},create:function(){var L=this.extend();return L.init.apply(L,arguments),L},init:function(){},mixIn:function(L){for(var R in L)L.hasOwnProperty(R)&&(this[R]=L[R]);L.hasOwnProperty("toString")&&(this.toString=L.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),I=v.WordArray=E.extend({init:function(L,R){L=this.words=L||[],R!=f?this.sigBytes=R:this.sigBytes=L.length*4},toString:function(L){return(L||Q).stringify(this)},concat:function(L){var R=this.words,k=L.words,U=this.sigBytes,V=L.sigBytes;if(this.clamp(),U%4)for(var H=0;H<V;H++){var q=k[H>>>2]>>>24-H%4*8&255;R[U+H>>>2]|=q<<24-(U+H)%4*8}else for(var ie=0;ie<V;ie+=4)R[U+ie>>>2]=k[ie>>>2];return this.sigBytes+=V,this},clamp:function(){var L=this.words,R=this.sigBytes;L[R>>>2]&=4294967295<<32-R%4*8,L.length=A.ceil(R/4)},clone:function(){var L=E.clone.call(this);return L.words=this.words.slice(0),L},random:function(L){for(var R=[],k=0;k<L;k+=4)R.push(C());return new I.init(R,L)}}),w=x.enc={},Q=w.Hex={stringify:function(L){for(var R=L.words,k=L.sigBytes,U=[],V=0;V<k;V++){var H=R[V>>>2]>>>24-V%4*8&255;U.push((H>>>4).toString(16)),U.push((H&15).toString(16))}return U.join("")},parse:function(L){for(var R=L.length,k=[],U=0;U<R;U+=2)k[U>>>3]|=parseInt(L.substr(U,2),16)<<24-U%8*4;return new I.init(k,R/2)}},M=w.Latin1={stringify:function(L){for(var R=L.words,k=L.sigBytes,U=[],V=0;V<k;V++){var H=R[V>>>2]>>>24-V%4*8&255;U.push(String.fromCharCode(H))}return U.join("")},parse:function(L){for(var R=L.length,k=[],U=0;U<R;U++)k[U>>>2]|=(L.charCodeAt(U)&255)<<24-U%4*8;return new I.init(k,R)}},B=w.Utf8={stringify:function(L){try{return decodeURIComponent(escape(M.stringify(L)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(L){return M.parse(unescape(encodeURIComponent(L)))}},T=v.BufferedBlockAlgorithm=E.extend({reset:function(){this._data=new I.init,this._nDataBytes=0},_append:function(L){typeof L=="string"&&(L=B.parse(L)),this._data.concat(L),this._nDataBytes+=L.sigBytes},_process:function(L){var R,k=this._data,U=k.words,V=k.sigBytes,H=this.blockSize,q=H*4,ie=V/q;L?ie=A.ceil(ie):ie=A.max((ie|0)-this._minBufferSize,0);var Z=ie*H,oe=A.min(Z*4,V);if(Z){for(var ne=0;ne<Z;ne+=H)this._doProcessBlock(U,ne);R=U.splice(0,Z),k.sigBytes-=oe}return new I.init(R,oe)},clone:function(){var L=E.clone.call(this);return L._data=this._data.clone(),L},_minBufferSize:0}),D=v.Hasher=T.extend({cfg:E.extend(),init:function(L){this.cfg=this.cfg.extend(L),this.reset()},reset:function(){T.reset.call(this),this._doReset()},update:function(L){return this._append(L),this._process(),this},finalize:function(L){L&&this._append(L);var R=this._doFinalize();return R},blockSize:512/32,_createHelper:function(L){return function(R,k){return new L.init(k).finalize(R)}},_createHmacHelper:function(L){return function(R,k){return new F.HMAC.init(L,k).finalize(R)}}}),F=x.algo={};return x}(Math);(function(A){var f=o,m=f.lib,C=m.Base,y=m.WordArray,x=f.x64={},v=x.Word=C.extend({init:function(I,w){this.high=I,this.low=w}}),E=x.WordArray=C.extend({init:function(I,w){I=this.words=I||[],w!=A?this.sigBytes=w:this.sigBytes=I.length*8},toX32:function(){for(var I=this.words,w=I.length,Q=[],M=0;M<w;M++){var B=I[M];Q.push(B.high),Q.push(B.low)}return y.create(Q,this.sigBytes)},clone:function(){for(var I=C.clone.call(this),w=I.words=this.words.slice(0),Q=w.length,M=0;M<Q;M++)w[M]=w[M].clone();return I}})})(),function(){if(typeof ArrayBuffer=="function"){var A=o,f=A.lib,m=f.WordArray,C=m.init,y=m.init=function(x){if(x instanceof ArrayBuffer&&(x=new Uint8Array(x)),(x instanceof Int8Array||typeof Uint8ClampedArray<"u"&&x instanceof Uint8ClampedArray||x instanceof Int16Array||x instanceof Uint16Array||x instanceof Int32Array||x instanceof Uint32Array||x instanceof Float32Array||x instanceof Float64Array)&&(x=new Uint8Array(x.buffer,x.byteOffset,x.byteLength)),x instanceof Uint8Array){for(var v=x.byteLength,E=[],I=0;I<v;I++)E[I>>>2]|=x[I]<<24-I%4*8;C.call(this,E,v)}else C.apply(this,arguments)};y.prototype=m}}(),function(){var A=o,f=A.lib,m=f.WordArray,C=A.enc,y=C.Utf16=C.Utf16BE={stringify:function(v){for(var E=v.words,I=v.sigBytes,w=[],Q=0;Q<I;Q+=2){var M=E[Q>>>2]>>>16-Q%4*8&65535;w.push(String.fromCharCode(M))}return w.join("")},parse:function(v){for(var E=v.length,I=[],w=0;w<E;w++)I[w>>>1]|=v.charCodeAt(w)<<16-w%2*16;return m.create(I,E*2)}};C.Utf16LE={stringify:function(v){for(var E=v.words,I=v.sigBytes,w=[],Q=0;Q<I;Q+=2){var M=x(E[Q>>>2]>>>16-Q%4*8&65535);w.push(String.fromCharCode(M))}return w.join("")},parse:function(v){for(var E=v.length,I=[],w=0;w<E;w++)I[w>>>1]|=x(v.charCodeAt(w)<<16-w%2*16);return m.create(I,E*2)}};function x(v){return v<<8&4278255360|v>>>8&16711935}}(),function(){var A=o,f=A.lib,m=f.WordArray,C=A.enc,y=C.Base64={stringify:function(v){var E=v.words,I=v.sigBytes,w=this._map;v.clamp();for(var Q=[],M=0;M<I;M+=3)for(var B=E[M>>>2]>>>24-M%4*8&255,T=E[M+1>>>2]>>>24-(M+1)%4*8&255,D=E[M+2>>>2]>>>24-(M+2)%4*8&255,F=B<<16|T<<8|D,L=0;L<4&&M+L*.75<I;L++)Q.push(w.charAt(F>>>6*(3-L)&63));var R=w.charAt(64);if(R)for(;Q.length%4;)Q.push(R);return Q.join("")},parse:function(v){var E=v.length,I=this._map,w=this._reverseMap;if(!w){w=this._reverseMap=[];for(var Q=0;Q<I.length;Q++)w[I.charCodeAt(Q)]=Q}var M=I.charAt(64);if(M){var B=v.indexOf(M);B!==-1&&(E=B)}return x(v,E,w)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function x(v,E,I){for(var w=[],Q=0,M=0;M<E;M++)if(M%4){var B=I[v.charCodeAt(M-1)]<<M%4*2,T=I[v.charCodeAt(M)]>>>6-M%4*2,D=B|T;w[Q>>>2]|=D<<24-Q%4*8,Q++}return m.create(w,Q)}}(),function(){var A=o,f=A.lib,m=f.WordArray,C=A.enc,y=C.Base64url={stringify:function(v,E=!0){var I=v.words,w=v.sigBytes,Q=E?this._safe_map:this._map;v.clamp();for(var M=[],B=0;B<w;B+=3)for(var T=I[B>>>2]>>>24-B%4*8&255,D=I[B+1>>>2]>>>24-(B+1)%4*8&255,F=I[B+2>>>2]>>>24-(B+2)%4*8&255,L=T<<16|D<<8|F,R=0;R<4&&B+R*.75<w;R++)M.push(Q.charAt(L>>>6*(3-R)&63));var k=Q.charAt(64);if(k)for(;M.length%4;)M.push(k);return M.join("")},parse:function(v,E=!0){var I=v.length,w=E?this._safe_map:this._map,Q=this._reverseMap;if(!Q){Q=this._reverseMap=[];for(var M=0;M<w.length;M++)Q[w.charCodeAt(M)]=M}var B=w.charAt(64);if(B){var T=v.indexOf(B);T!==-1&&(I=T)}return x(v,I,Q)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function x(v,E,I){for(var w=[],Q=0,M=0;M<E;M++)if(M%4){var B=I[v.charCodeAt(M-1)]<<M%4*2,T=I[v.charCodeAt(M)]>>>6-M%4*2,D=B|T;w[Q>>>2]|=D<<24-Q%4*8,Q++}return m.create(w,Q)}}(),function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.algo,v=[];(function(){for(var B=0;B<64;B++)v[B]=A.abs(A.sin(B+1))*4294967296|0})();var E=x.MD5=y.extend({_doReset:function(){this._hash=new C.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(B,T){for(var D=0;D<16;D++){var F=T+D,L=B[F];B[F]=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360}var R=this._hash.words,k=B[T+0],U=B[T+1],V=B[T+2],H=B[T+3],q=B[T+4],ie=B[T+5],Z=B[T+6],oe=B[T+7],ne=B[T+8],se=B[T+9],ce=B[T+10],j=B[T+11],de=B[T+12],me=B[T+13],_e=B[T+14],Be=B[T+15],Qe=R[0],Ie=R[1],ve=R[2],K=R[3];Qe=I(Qe,Ie,ve,K,k,7,v[0]),K=I(K,Qe,Ie,ve,U,12,v[1]),ve=I(ve,K,Qe,Ie,V,17,v[2]),Ie=I(Ie,ve,K,Qe,H,22,v[3]),Qe=I(Qe,Ie,ve,K,q,7,v[4]),K=I(K,Qe,Ie,ve,ie,12,v[5]),ve=I(ve,K,Qe,Ie,Z,17,v[6]),Ie=I(Ie,ve,K,Qe,oe,22,v[7]),Qe=I(Qe,Ie,ve,K,ne,7,v[8]),K=I(K,Qe,Ie,ve,se,12,v[9]),ve=I(ve,K,Qe,Ie,ce,17,v[10]),Ie=I(Ie,ve,K,Qe,j,22,v[11]),Qe=I(Qe,Ie,ve,K,de,7,v[12]),K=I(K,Qe,Ie,ve,me,12,v[13]),ve=I(ve,K,Qe,Ie,_e,17,v[14]),Ie=I(Ie,ve,K,Qe,Be,22,v[15]),Qe=w(Qe,Ie,ve,K,U,5,v[16]),K=w(K,Qe,Ie,ve,Z,9,v[17]),ve=w(ve,K,Qe,Ie,j,14,v[18]),Ie=w(Ie,ve,K,Qe,k,20,v[19]),Qe=w(Qe,Ie,ve,K,ie,5,v[20]),K=w(K,Qe,Ie,ve,ce,9,v[21]),ve=w(ve,K,Qe,Ie,Be,14,v[22]),Ie=w(Ie,ve,K,Qe,q,20,v[23]),Qe=w(Qe,Ie,ve,K,se,5,v[24]),K=w(K,Qe,Ie,ve,_e,9,v[25]),ve=w(ve,K,Qe,Ie,H,14,v[26]),Ie=w(Ie,ve,K,Qe,ne,20,v[27]),Qe=w(Qe,Ie,ve,K,me,5,v[28]),K=w(K,Qe,Ie,ve,V,9,v[29]),ve=w(ve,K,Qe,Ie,oe,14,v[30]),Ie=w(Ie,ve,K,Qe,de,20,v[31]),Qe=Q(Qe,Ie,ve,K,ie,4,v[32]),K=Q(K,Qe,Ie,ve,ne,11,v[33]),ve=Q(ve,K,Qe,Ie,j,16,v[34]),Ie=Q(Ie,ve,K,Qe,_e,23,v[35]),Qe=Q(Qe,Ie,ve,K,U,4,v[36]),K=Q(K,Qe,Ie,ve,q,11,v[37]),ve=Q(ve,K,Qe,Ie,oe,16,v[38]),Ie=Q(Ie,ve,K,Qe,ce,23,v[39]),Qe=Q(Qe,Ie,ve,K,me,4,v[40]),K=Q(K,Qe,Ie,ve,k,11,v[41]),ve=Q(ve,K,Qe,Ie,H,16,v[42]),Ie=Q(Ie,ve,K,Qe,Z,23,v[43]),Qe=Q(Qe,Ie,ve,K,se,4,v[44]),K=Q(K,Qe,Ie,ve,de,11,v[45]),ve=Q(ve,K,Qe,Ie,Be,16,v[46]),Ie=Q(Ie,ve,K,Qe,V,23,v[47]),Qe=M(Qe,Ie,ve,K,k,6,v[48]),K=M(K,Qe,Ie,ve,oe,10,v[49]),ve=M(ve,K,Qe,Ie,_e,15,v[50]),Ie=M(Ie,ve,K,Qe,ie,21,v[51]),Qe=M(Qe,Ie,ve,K,de,6,v[52]),K=M(K,Qe,Ie,ve,H,10,v[53]),ve=M(ve,K,Qe,Ie,ce,15,v[54]),Ie=M(Ie,ve,K,Qe,U,21,v[55]),Qe=M(Qe,Ie,ve,K,ne,6,v[56]),K=M(K,Qe,Ie,ve,Be,10,v[57]),ve=M(ve,K,Qe,Ie,Z,15,v[58]),Ie=M(Ie,ve,K,Qe,me,21,v[59]),Qe=M(Qe,Ie,ve,K,q,6,v[60]),K=M(K,Qe,Ie,ve,j,10,v[61]),ve=M(ve,K,Qe,Ie,V,15,v[62]),Ie=M(Ie,ve,K,Qe,se,21,v[63]),R[0]=R[0]+Qe|0,R[1]=R[1]+Ie|0,R[2]=R[2]+ve|0,R[3]=R[3]+K|0},_doFinalize:function(){var B=this._data,T=B.words,D=this._nDataBytes*8,F=B.sigBytes*8;T[F>>>5]|=128<<24-F%32;var L=A.floor(D/4294967296),R=D;T[(F+64>>>9<<4)+15]=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,T[(F+64>>>9<<4)+14]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360,B.sigBytes=(T.length+1)*4,this._process();for(var k=this._hash,U=k.words,V=0;V<4;V++){var H=U[V];U[V]=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360}return k},clone:function(){var B=y.clone.call(this);return B._hash=this._hash.clone(),B}});function I(B,T,D,F,L,R,k){var U=B+(T&D|~T&F)+L+k;return(U<<R|U>>>32-R)+T}function w(B,T,D,F,L,R,k){var U=B+(T&F|D&~F)+L+k;return(U<<R|U>>>32-R)+T}function Q(B,T,D,F,L,R,k){var U=B+(T^D^F)+L+k;return(U<<R|U>>>32-R)+T}function M(B,T,D,F,L,R,k){var U=B+(D^(T|~F))+L+k;return(U<<R|U>>>32-R)+T}f.MD5=y._createHelper(E),f.HmacMD5=y._createHmacHelper(E)}(Math),function(){var A=o,f=A.lib,m=f.WordArray,C=f.Hasher,y=A.algo,x=[],v=y.SHA1=C.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(E,I){for(var w=this._hash.words,Q=w[0],M=w[1],B=w[2],T=w[3],D=w[4],F=0;F<80;F++){if(F<16)x[F]=E[I+F]|0;else{var L=x[F-3]^x[F-8]^x[F-14]^x[F-16];x[F]=L<<1|L>>>31}var R=(Q<<5|Q>>>27)+D+x[F];F<20?R+=(M&B|~M&T)+1518500249:F<40?R+=(M^B^T)+1859775393:F<60?R+=(M&B|M&T|B&T)-1894007588:R+=(M^B^T)-899497514,D=T,T=B,B=M<<30|M>>>2,M=Q,Q=R}w[0]=w[0]+Q|0,w[1]=w[1]+M|0,w[2]=w[2]+B|0,w[3]=w[3]+T|0,w[4]=w[4]+D|0},_doFinalize:function(){var E=this._data,I=E.words,w=this._nDataBytes*8,Q=E.sigBytes*8;return I[Q>>>5]|=128<<24-Q%32,I[(Q+64>>>9<<4)+14]=Math.floor(w/4294967296),I[(Q+64>>>9<<4)+15]=w,E.sigBytes=I.length*4,this._process(),this._hash},clone:function(){var E=C.clone.call(this);return E._hash=this._hash.clone(),E}});A.SHA1=C._createHelper(v),A.HmacSHA1=C._createHmacHelper(v)}(),function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.algo,v=[],E=[];(function(){function Q(D){for(var F=A.sqrt(D),L=2;L<=F;L++)if(!(D%L))return!1;return!0}function M(D){return(D-(D|0))*4294967296|0}for(var B=2,T=0;T<64;)Q(B)&&(T<8&&(v[T]=M(A.pow(B,1/2))),E[T]=M(A.pow(B,1/3)),T++),B++})();var I=[],w=x.SHA256=y.extend({_doReset:function(){this._hash=new C.init(v.slice(0))},_doProcessBlock:function(Q,M){for(var B=this._hash.words,T=B[0],D=B[1],F=B[2],L=B[3],R=B[4],k=B[5],U=B[6],V=B[7],H=0;H<64;H++){if(H<16)I[H]=Q[M+H]|0;else{var q=I[H-15],ie=(q<<25|q>>>7)^(q<<14|q>>>18)^q>>>3,Z=I[H-2],oe=(Z<<15|Z>>>17)^(Z<<13|Z>>>19)^Z>>>10;I[H]=ie+I[H-7]+oe+I[H-16]}var ne=R&k^~R&U,se=T&D^T&F^D&F,ce=(T<<30|T>>>2)^(T<<19|T>>>13)^(T<<10|T>>>22),j=(R<<26|R>>>6)^(R<<21|R>>>11)^(R<<7|R>>>25),de=V+j+ne+E[H]+I[H],me=ce+se;V=U,U=k,k=R,R=L+de|0,L=F,F=D,D=T,T=de+me|0}B[0]=B[0]+T|0,B[1]=B[1]+D|0,B[2]=B[2]+F|0,B[3]=B[3]+L|0,B[4]=B[4]+R|0,B[5]=B[5]+k|0,B[6]=B[6]+U|0,B[7]=B[7]+V|0},_doFinalize:function(){var Q=this._data,M=Q.words,B=this._nDataBytes*8,T=Q.sigBytes*8;return M[T>>>5]|=128<<24-T%32,M[(T+64>>>9<<4)+14]=A.floor(B/4294967296),M[(T+64>>>9<<4)+15]=B,Q.sigBytes=M.length*4,this._process(),this._hash},clone:function(){var Q=y.clone.call(this);return Q._hash=this._hash.clone(),Q}});f.SHA256=y._createHelper(w),f.HmacSHA256=y._createHmacHelper(w)}(Math),function(){var A=o,f=A.lib,m=f.WordArray,C=A.algo,y=C.SHA256,x=C.SHA224=y.extend({_doReset:function(){this._hash=new m.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var v=y._doFinalize.call(this);return v.sigBytes-=4,v}});A.SHA224=y._createHelper(x),A.HmacSHA224=y._createHmacHelper(x)}(),function(){var A=o,f=A.lib,m=f.Hasher,C=A.x64,y=C.Word,x=C.WordArray,v=A.algo;function E(){return y.create.apply(y,arguments)}var I=[E(1116352408,3609767458),E(1899447441,602891725),E(3049323471,3964484399),E(3921009573,2173295548),E(961987163,4081628472),E(1508970993,3053834265),E(2453635748,2937671579),E(2870763221,3664609560),E(3624381080,2734883394),E(310598401,1164996542),E(607225278,1323610764),E(1426881987,3590304994),E(1925078388,4068182383),E(2162078206,991336113),E(2614888103,633803317),E(3248222580,3479774868),E(3835390401,2666613458),E(4022224774,944711139),E(264347078,2341262773),E(604807628,2007800933),E(770255983,1495990901),E(1249150122,1856431235),E(1555081692,3175218132),E(1996064986,2198950837),E(2554220882,3999719339),E(2821834349,766784016),E(2952996808,2566594879),E(3210313671,3203337956),E(3336571891,1034457026),E(3584528711,2466948901),E(113926993,3758326383),E(338241895,168717936),E(666307205,1188179964),E(773529912,1546045734),E(1294757372,1522805485),E(1396182291,2643833823),E(1695183700,2343527390),E(1986661051,1014477480),E(2177026350,1206759142),E(2456956037,344077627),E(2730485921,1290863460),E(2820302411,3158454273),E(3259730800,3505952657),E(3345764771,106217008),E(3516065817,3606008344),E(3600352804,1432725776),E(4094571909,1467031594),E(275423344,851169720),E(430227734,3100823752),E(506948616,1363258195),E(659060556,3750685593),E(883997877,3785050280),E(958139571,3318307427),E(1322822218,3812723403),E(1537002063,2003034995),E(1747873779,3602036899),E(1955562222,1575990012),E(2024104815,1125592928),E(2227730452,2716904306),E(2361852424,442776044),E(2428436474,593698344),E(2756734187,3733110249),E(3204031479,2999351573),E(3329325298,3815920427),E(3391569614,3928383900),E(3515267271,566280711),E(3940187606,3454069534),E(4118630271,4000239992),E(116418474,1914138554),E(174292421,2731055270),E(289380356,3203993006),E(460393269,320620315),E(685471733,587496836),E(852142971,1086792851),E(1017036298,365543100),E(1126000580,2618297676),E(1288033470,3409855158),E(1501505948,4234509866),E(1607167915,987167468),E(1816402316,1246189591)],w=[];(function(){for(var M=0;M<80;M++)w[M]=E()})();var Q=v.SHA512=m.extend({_doReset:function(){this._hash=new x.init([new y.init(1779033703,4089235720),new y.init(3144134277,2227873595),new y.init(1013904242,4271175723),new y.init(2773480762,1595750129),new y.init(1359893119,2917565137),new y.init(2600822924,725511199),new y.init(528734635,4215389547),new y.init(1541459225,327033209)])},_doProcessBlock:function(M,B){for(var T=this._hash.words,D=T[0],F=T[1],L=T[2],R=T[3],k=T[4],U=T[5],V=T[6],H=T[7],q=D.high,ie=D.low,Z=F.high,oe=F.low,ne=L.high,se=L.low,ce=R.high,j=R.low,de=k.high,me=k.low,_e=U.high,Be=U.low,Qe=V.high,Ie=V.low,ve=H.high,K=H.low,W=q,te=ie,Y=Z,he=oe,fe=ne,Ce=se,Ee=ce,be=j,Re=de,Ne=me,Je=_e,ot=Be,nt=Qe,$e=Ie,ht=ve,ze=K,Ze=0;Ze<80;Ze++){var ct,We,Oe=w[Ze];if(Ze<16)We=Oe.high=M[B+Ze*2]|0,ct=Oe.low=M[B+Ze*2+1]|0;else{var Ye=w[Ze-15],rt=Ye.high,gt=Ye.low,Et=(rt>>>1|gt<<31)^(rt>>>8|gt<<24)^rt>>>7,yt=(gt>>>1|rt<<31)^(gt>>>8|rt<<24)^(gt>>>7|rt<<25),vt=w[Ze-2],Rt=vt.high,qt=vt.low,wt=(Rt>>>19|qt<<13)^(Rt<<3|qt>>>29)^Rt>>>6,Lt=(qt>>>19|Rt<<13)^(qt<<3|Rt>>>29)^(qt>>>6|Rt<<26),pi=w[Ze-7],Ut=pi.high,ri=pi.low,ni=w[Ze-16],kt=ni.high,qe=ni.low;ct=yt+ri,We=Et+Ut+(ct>>>0<yt>>>0?1:0),ct=ct+Lt,We=We+wt+(ct>>>0<Lt>>>0?1:0),ct=ct+qe,We=We+kt+(ct>>>0<qe>>>0?1:0),Oe.high=We,Oe.low=ct}var Fe=Re&Je^~Re&nt,it=Ne&ot^~Ne&$e,Ht=W&Y^W&fe^Y&fe,Jt=te&he^te&Ce^he&Ce,jt=(W>>>28|te<<4)^(W<<30|te>>>2)^(W<<25|te>>>7),or=(te>>>28|W<<4)^(te<<30|W>>>2)^(te<<25|W>>>7),Pr=(Re>>>14|Ne<<18)^(Re>>>18|Ne<<14)^(Re<<23|Ne>>>9),Mi=(Ne>>>14|Re<<18)^(Ne>>>18|Re<<14)^(Ne<<23|Re>>>9),Zi=I[Ze],lr=Zi.high,Gi=Zi.low,li=ze+Mi,hi=ht+Pr+(li>>>0<ze>>>0?1:0),li=li+it,hi=hi+Fe+(li>>>0<it>>>0?1:0),li=li+Gi,hi=hi+lr+(li>>>0<Gi>>>0?1:0),li=li+ct,hi=hi+We+(li>>>0<ct>>>0?1:0),Ni=or+Jt,ki=jt+Ht+(Ni>>>0<or>>>0?1:0);ht=nt,ze=$e,nt=Je,$e=ot,Je=Re,ot=Ne,Ne=be+li|0,Re=Ee+hi+(Ne>>>0<be>>>0?1:0)|0,Ee=fe,be=Ce,fe=Y,Ce=he,Y=W,he=te,te=li+Ni|0,W=hi+ki+(te>>>0<li>>>0?1:0)|0}ie=D.low=ie+te,D.high=q+W+(ie>>>0<te>>>0?1:0),oe=F.low=oe+he,F.high=Z+Y+(oe>>>0<he>>>0?1:0),se=L.low=se+Ce,L.high=ne+fe+(se>>>0<Ce>>>0?1:0),j=R.low=j+be,R.high=ce+Ee+(j>>>0<be>>>0?1:0),me=k.low=me+Ne,k.high=de+Re+(me>>>0<Ne>>>0?1:0),Be=U.low=Be+ot,U.high=_e+Je+(Be>>>0<ot>>>0?1:0),Ie=V.low=Ie+$e,V.high=Qe+nt+(Ie>>>0<$e>>>0?1:0),K=H.low=K+ze,H.high=ve+ht+(K>>>0<ze>>>0?1:0)},_doFinalize:function(){var M=this._data,B=M.words,T=this._nDataBytes*8,D=M.sigBytes*8;B[D>>>5]|=128<<24-D%32,B[(D+128>>>10<<5)+30]=Math.floor(T/4294967296),B[(D+128>>>10<<5)+31]=T,M.sigBytes=B.length*4,this._process();var F=this._hash.toX32();return F},clone:function(){var M=m.clone.call(this);return M._hash=this._hash.clone(),M},blockSize:1024/32});A.SHA512=m._createHelper(Q),A.HmacSHA512=m._createHmacHelper(Q)}(),function(){var A=o,f=A.x64,m=f.Word,C=f.WordArray,y=A.algo,x=y.SHA512,v=y.SHA384=x.extend({_doReset:function(){this._hash=new C.init([new m.init(3418070365,3238371032),new m.init(1654270250,914150663),new m.init(2438529370,812702999),new m.init(355462360,4144912697),new m.init(1731405415,4290775857),new m.init(2394180231,1750603025),new m.init(3675008525,1694076839),new m.init(1203062813,3204075428)])},_doFinalize:function(){var E=x._doFinalize.call(this);return E.sigBytes-=16,E}});A.SHA384=x._createHelper(v),A.HmacSHA384=x._createHmacHelper(v)}(),function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.x64,v=x.Word,E=f.algo,I=[],w=[],Q=[];(function(){for(var T=1,D=0,F=0;F<24;F++){I[T+5*D]=(F+1)*(F+2)/2%64;var L=D%5,R=(2*T+3*D)%5;T=L,D=R}for(var T=0;T<5;T++)for(var D=0;D<5;D++)w[T+5*D]=D+(2*T+3*D)%5*5;for(var k=1,U=0;U<24;U++){for(var V=0,H=0,q=0;q<7;q++){if(k&1){var ie=(1<<q)-1;ie<32?H^=1<<ie:V^=1<<ie-32}k&128?k=k<<1^113:k<<=1}Q[U]=v.create(V,H)}})();var M=[];(function(){for(var T=0;T<25;T++)M[T]=v.create()})();var B=E.SHA3=y.extend({cfg:y.cfg.extend({outputLength:512}),_doReset:function(){for(var T=this._state=[],D=0;D<25;D++)T[D]=new v.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(T,D){for(var F=this._state,L=this.blockSize/2,R=0;R<L;R++){var k=T[D+2*R],U=T[D+2*R+1];k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,U=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360;var V=F[R];V.high^=U,V.low^=k}for(var H=0;H<24;H++){for(var q=0;q<5;q++){for(var ie=0,Z=0,oe=0;oe<5;oe++){var V=F[q+5*oe];ie^=V.high,Z^=V.low}var ne=M[q];ne.high=ie,ne.low=Z}for(var q=0;q<5;q++)for(var se=M[(q+4)%5],ce=M[(q+1)%5],j=ce.high,de=ce.low,ie=se.high^(j<<1|de>>>31),Z=se.low^(de<<1|j>>>31),oe=0;oe<5;oe++){var V=F[q+5*oe];V.high^=ie,V.low^=Z}for(var me=1;me<25;me++){var ie,Z,V=F[me],_e=V.high,Be=V.low,Qe=I[me];Qe<32?(ie=_e<<Qe|Be>>>32-Qe,Z=Be<<Qe|_e>>>32-Qe):(ie=Be<<Qe-32|_e>>>64-Qe,Z=_e<<Qe-32|Be>>>64-Qe);var Ie=M[w[me]];Ie.high=ie,Ie.low=Z}var ve=M[0],K=F[0];ve.high=K.high,ve.low=K.low;for(var q=0;q<5;q++)for(var oe=0;oe<5;oe++){var me=q+5*oe,V=F[me],W=M[me],te=M[(q+1)%5+5*oe],Y=M[(q+2)%5+5*oe];V.high=W.high^~te.high&Y.high,V.low=W.low^~te.low&Y.low}var V=F[0],he=Q[H];V.high^=he.high,V.low^=he.low}},_doFinalize:function(){var T=this._data,D=T.words,F=this._nDataBytes*8,L=T.sigBytes*8,R=this.blockSize*32;D[L>>>5]|=1<<24-L%32,D[(A.ceil((L+1)/R)*R>>>5)-1]|=128,T.sigBytes=D.length*4,this._process();for(var k=this._state,U=this.cfg.outputLength/8,V=U/8,H=[],q=0;q<V;q++){var ie=k[q],Z=ie.high,oe=ie.low;Z=(Z<<8|Z>>>24)&16711935|(Z<<24|Z>>>8)&4278255360,oe=(oe<<8|oe>>>24)&16711935|(oe<<24|oe>>>8)&4278255360,H.push(oe),H.push(Z)}return new C.init(H,U)},clone:function(){for(var T=y.clone.call(this),D=T._state=this._state.slice(0),F=0;F<25;F++)D[F]=D[F].clone();return T}});f.SHA3=y._createHelper(B),f.HmacSHA3=y._createHmacHelper(B)}(Math);/** @preserve
    (c) 2012 by Cédric Mesnil. All rights reserved.
    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
        - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */(function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.algo,v=C.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),E=C.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),I=C.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),w=C.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),Q=C.create([0,1518500249,1859775393,2400959708,2840853838]),M=C.create([1352829926,1548603684,1836072691,2053994217,0]),B=x.RIPEMD160=y.extend({_doReset:function(){this._hash=C.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(U,V){for(var H=0;H<16;H++){var q=V+H,ie=U[q];U[q]=(ie<<8|ie>>>24)&16711935|(ie<<24|ie>>>8)&4278255360}var Z=this._hash.words,oe=Q.words,ne=M.words,se=v.words,ce=E.words,j=I.words,de=w.words,me,_e,Be,Qe,Ie,ve,K,W,te,Y;ve=me=Z[0],K=_e=Z[1],W=Be=Z[2],te=Qe=Z[3],Y=Ie=Z[4];for(var he,H=0;H<80;H+=1)he=me+U[V+se[H]]|0,H<16?he+=T(_e,Be,Qe)+oe[0]:H<32?he+=D(_e,Be,Qe)+oe[1]:H<48?he+=F(_e,Be,Qe)+oe[2]:H<64?he+=L(_e,Be,Qe)+oe[3]:he+=R(_e,Be,Qe)+oe[4],he=he|0,he=k(he,j[H]),he=he+Ie|0,me=Ie,Ie=Qe,Qe=k(Be,10),Be=_e,_e=he,he=ve+U[V+ce[H]]|0,H<16?he+=R(K,W,te)+ne[0]:H<32?he+=L(K,W,te)+ne[1]:H<48?he+=F(K,W,te)+ne[2]:H<64?he+=D(K,W,te)+ne[3]:he+=T(K,W,te)+ne[4],he=he|0,he=k(he,de[H]),he=he+Y|0,ve=Y,Y=te,te=k(W,10),W=K,K=he;he=Z[1]+Be+te|0,Z[1]=Z[2]+Qe+Y|0,Z[2]=Z[3]+Ie+ve|0,Z[3]=Z[4]+me+K|0,Z[4]=Z[0]+_e+W|0,Z[0]=he},_doFinalize:function(){var U=this._data,V=U.words,H=this._nDataBytes*8,q=U.sigBytes*8;V[q>>>5]|=128<<24-q%32,V[(q+64>>>9<<4)+14]=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360,U.sigBytes=(V.length+1)*4,this._process();for(var ie=this._hash,Z=ie.words,oe=0;oe<5;oe++){var ne=Z[oe];Z[oe]=(ne<<8|ne>>>24)&16711935|(ne<<24|ne>>>8)&4278255360}return ie},clone:function(){var U=y.clone.call(this);return U._hash=this._hash.clone(),U}});function T(U,V,H){return U^V^H}function D(U,V,H){return U&V|~U&H}function F(U,V,H){return(U|~V)^H}function L(U,V,H){return U&H|V&~H}function R(U,V,H){return U^(V|~H)}function k(U,V){return U<<V|U>>>32-V}f.RIPEMD160=y._createHelper(B),f.HmacRIPEMD160=y._createHmacHelper(B)})(Math),function(){var A=o,f=A.lib,m=f.Base,C=A.enc,y=C.Utf8,x=A.algo,v=x.HMAC=m.extend({init:function(E,I){E=this._hasher=new E.init,typeof I=="string"&&(I=y.parse(I));var w=E.blockSize,Q=w*4;I.sigBytes>Q&&(I=E.finalize(I)),I.clamp();for(var M=this._oKey=I.clone(),B=this._iKey=I.clone(),T=M.words,D=B.words,F=0;F<w;F++)T[F]^=1549556828,D[F]^=909522486;M.sigBytes=B.sigBytes=Q,this.reset()},reset:function(){var E=this._hasher;E.reset(),E.update(this._iKey)},update:function(E){return this._hasher.update(E),this},finalize:function(E){var I=this._hasher,w=I.finalize(E);I.reset();var Q=I.finalize(this._oKey.clone().concat(w));return Q}})}(),function(){var A=o,f=A.lib,m=f.Base,C=f.WordArray,y=A.algo,x=y.SHA1,v=y.HMAC,E=y.PBKDF2=m.extend({cfg:m.extend({keySize:128/32,hasher:x,iterations:1}),init:function(I){this.cfg=this.cfg.extend(I)},compute:function(I,w){for(var Q=this.cfg,M=v.create(Q.hasher,I),B=C.create(),T=C.create([1]),D=B.words,F=T.words,L=Q.keySize,R=Q.iterations;D.length<L;){var k=M.update(w).finalize(T);M.reset();for(var U=k.words,V=U.length,H=k,q=1;q<R;q++){H=M.finalize(H),M.reset();for(var ie=H.words,Z=0;Z<V;Z++)U[Z]^=ie[Z]}B.concat(k),F[0]++}return B.sigBytes=L*4,B}});A.PBKDF2=function(I,w,Q){return E.create(Q).compute(I,w)}}(),function(){var A=o,f=A.lib,m=f.Base,C=f.WordArray,y=A.algo,x=y.MD5,v=y.EvpKDF=m.extend({cfg:m.extend({keySize:128/32,hasher:x,iterations:1}),init:function(E){this.cfg=this.cfg.extend(E)},compute:function(E,I){for(var w,Q=this.cfg,M=Q.hasher.create(),B=C.create(),T=B.words,D=Q.keySize,F=Q.iterations;T.length<D;){w&&M.update(w),w=M.update(E).finalize(I),M.reset();for(var L=1;L<F;L++)w=M.finalize(w),M.reset();B.concat(w)}return B.sigBytes=D*4,B}});A.EvpKDF=function(E,I,w){return v.create(w).compute(E,I)}}(),o.lib.Cipher||function(A){var f=o,m=f.lib,C=m.Base,y=m.WordArray,x=m.BufferedBlockAlgorithm,v=f.enc,E=v.Utf8,I=v.Base64,w=f.algo,Q=w.EvpKDF,M=m.Cipher=x.extend({cfg:C.extend(),createEncryptor:function(ne,se){return this.create(this._ENC_XFORM_MODE,ne,se)},createDecryptor:function(ne,se){return this.create(this._DEC_XFORM_MODE,ne,se)},init:function(ne,se,ce){this.cfg=this.cfg.extend(ce),this._xformMode=ne,this._key=se,this.reset()},reset:function(){x.reset.call(this),this._doReset()},process:function(ne){return this._append(ne),this._process()},finalize:function(ne){ne&&this._append(ne);var se=this._doFinalize();return se},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function ne(se){return typeof se=="string"?oe:q}return function(se){return{encrypt:function(ce,j,de){return ne(j).encrypt(se,ce,j,de)},decrypt:function(ce,j,de){return ne(j).decrypt(se,ce,j,de)}}}}()}),B=m.StreamCipher=M.extend({_doFinalize:function(){var ne=this._process(!0);return ne},blockSize:1}),T=f.mode={},D=m.BlockCipherMode=C.extend({createEncryptor:function(ne,se){return this.Encryptor.create(ne,se)},createDecryptor:function(ne,se){return this.Decryptor.create(ne,se)},init:function(ne,se){this._cipher=ne,this._iv=se}}),F=T.CBC=function(){var ne=D.extend();ne.Encryptor=ne.extend({processBlock:function(ce,j){var de=this._cipher,me=de.blockSize;se.call(this,ce,j,me),de.encryptBlock(ce,j),this._prevBlock=ce.slice(j,j+me)}}),ne.Decryptor=ne.extend({processBlock:function(ce,j){var de=this._cipher,me=de.blockSize,_e=ce.slice(j,j+me);de.decryptBlock(ce,j),se.call(this,ce,j,me),this._prevBlock=_e}});function se(ce,j,de){var me,_e=this._iv;_e?(me=_e,this._iv=A):me=this._prevBlock;for(var Be=0;Be<de;Be++)ce[j+Be]^=me[Be]}return ne}(),L=f.pad={},R=L.Pkcs7={pad:function(ne,se){for(var ce=se*4,j=ce-ne.sigBytes%ce,de=j<<24|j<<16|j<<8|j,me=[],_e=0;_e<j;_e+=4)me.push(de);var Be=y.create(me,j);ne.concat(Be)},unpad:function(ne){var se=ne.words[ne.sigBytes-1>>>2]&255;ne.sigBytes-=se}},k=m.BlockCipher=M.extend({cfg:M.cfg.extend({mode:F,padding:R}),reset:function(){var ne;M.reset.call(this);var se=this.cfg,ce=se.iv,j=se.mode;this._xformMode==this._ENC_XFORM_MODE?ne=j.createEncryptor:(ne=j.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==ne?this._mode.init(this,ce&&ce.words):(this._mode=ne.call(j,this,ce&&ce.words),this._mode.__creator=ne)},_doProcessBlock:function(ne,se){this._mode.processBlock(ne,se)},_doFinalize:function(){var ne,se=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(se.pad(this._data,this.blockSize),ne=this._process(!0)):(ne=this._process(!0),se.unpad(ne)),ne},blockSize:128/32}),U=m.CipherParams=C.extend({init:function(ne){this.mixIn(ne)},toString:function(ne){return(ne||this.formatter).stringify(this)}}),V=f.format={},H=V.OpenSSL={stringify:function(ne){var se,ce=ne.ciphertext,j=ne.salt;return j?se=y.create([1398893684,1701076831]).concat(j).concat(ce):se=ce,se.toString(I)},parse:function(ne){var se,ce=I.parse(ne),j=ce.words;return j[0]==1398893684&&j[1]==1701076831&&(se=y.create(j.slice(2,4)),j.splice(0,4),ce.sigBytes-=16),U.create({ciphertext:ce,salt:se})}},q=m.SerializableCipher=C.extend({cfg:C.extend({format:H}),encrypt:function(ne,se,ce,j){j=this.cfg.extend(j);var de=ne.createEncryptor(ce,j),me=de.finalize(se),_e=de.cfg;return U.create({ciphertext:me,key:ce,iv:_e.iv,algorithm:ne,mode:_e.mode,padding:_e.padding,blockSize:ne.blockSize,formatter:j.format})},decrypt:function(ne,se,ce,j){j=this.cfg.extend(j),se=this._parse(se,j.format);var de=ne.createDecryptor(ce,j).finalize(se.ciphertext);return de},_parse:function(ne,se){return typeof ne=="string"?se.parse(ne,this):ne}}),ie=f.kdf={},Z=ie.OpenSSL={execute:function(ne,se,ce,j){j||(j=y.random(64/8));var de=Q.create({keySize:se+ce}).compute(ne,j),me=y.create(de.words.slice(se),ce*4);return de.sigBytes=se*4,U.create({key:de,iv:me,salt:j})}},oe=m.PasswordBasedCipher=q.extend({cfg:q.cfg.extend({kdf:Z}),encrypt:function(ne,se,ce,j){j=this.cfg.extend(j);var de=j.kdf.execute(ce,ne.keySize,ne.ivSize);j.iv=de.iv;var me=q.encrypt.call(this,ne,se,de.key,j);return me.mixIn(de),me},decrypt:function(ne,se,ce,j){j=this.cfg.extend(j),se=this._parse(se,j.format);var de=j.kdf.execute(ce,ne.keySize,ne.ivSize,se.salt);j.iv=de.iv;var me=q.decrypt.call(this,ne,se,de.key,j);return me}})}(),o.mode.CFB=function(){var A=o.lib.BlockCipherMode.extend();A.Encryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize;f.call(this,m,C,x,y),this._prevBlock=m.slice(C,C+x)}}),A.Decryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize,v=m.slice(C,C+x);f.call(this,m,C,x,y),this._prevBlock=v}});function f(m,C,y,x){var v,E=this._iv;E?(v=E.slice(0),this._iv=void 0):v=this._prevBlock,x.encryptBlock(v,0);for(var I=0;I<y;I++)m[C+I]^=v[I]}return A}(),o.mode.CTR=function(){var A=o.lib.BlockCipherMode.extend(),f=A.Encryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize,v=this._iv,E=this._counter;v&&(E=this._counter=v.slice(0),this._iv=void 0);var I=E.slice(0);y.encryptBlock(I,0),E[x-1]=E[x-1]+1|0;for(var w=0;w<x;w++)m[C+w]^=I[w]}});return A.Decryptor=f,A}();/** @preserve
* Counter block mode compatible with  Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return o.mode.CTRGladman=function(){var A=o.lib.BlockCipherMode.extend();function f(y){if((y>>24&255)===255){var x=y>>16&255,v=y>>8&255,E=y&255;x===255?(x=0,v===255?(v=0,E===255?E=0:++E):++v):++x,y=0,y+=x<<16,y+=v<<8,y+=E}else y+=1<<24;return y}function m(y){return(y[0]=f(y[0]))===0&&(y[1]=f(y[1])),y}var C=A.Encryptor=A.extend({processBlock:function(y,x){var v=this._cipher,E=v.blockSize,I=this._iv,w=this._counter;I&&(w=this._counter=I.slice(0),this._iv=void 0),m(w);var Q=w.slice(0);v.encryptBlock(Q,0);for(var M=0;M<E;M++)y[x+M]^=Q[M]}});return A.Decryptor=C,A}(),o.mode.OFB=function(){var A=o.lib.BlockCipherMode.extend(),f=A.Encryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize,v=this._iv,E=this._keystream;v&&(E=this._keystream=v.slice(0),this._iv=void 0),y.encryptBlock(E,0);for(var I=0;I<x;I++)m[C+I]^=E[I]}});return A.Decryptor=f,A}(),o.mode.ECB=function(){var A=o.lib.BlockCipherMode.extend();return A.Encryptor=A.extend({processBlock:function(f,m){this._cipher.encryptBlock(f,m)}}),A.Decryptor=A.extend({processBlock:function(f,m){this._cipher.decryptBlock(f,m)}}),A}(),o.pad.AnsiX923={pad:function(A,f){var m=A.sigBytes,C=f*4,y=C-m%C,x=m+y-1;A.clamp(),A.words[x>>>2]|=y<<24-x%4*8,A.sigBytes+=y},unpad:function(A){var f=A.words[A.sigBytes-1>>>2]&255;A.sigBytes-=f}},o.pad.Iso10126={pad:function(A,f){var m=f*4,C=m-A.sigBytes%m;A.concat(o.lib.WordArray.random(C-1)).concat(o.lib.WordArray.create([C<<24],1))},unpad:function(A){var f=A.words[A.sigBytes-1>>>2]&255;A.sigBytes-=f}},o.pad.Iso97971={pad:function(A,f){A.concat(o.lib.WordArray.create([2147483648],1)),o.pad.ZeroPadding.pad(A,f)},unpad:function(A){o.pad.ZeroPadding.unpad(A),A.sigBytes--}},o.pad.ZeroPadding={pad:function(A,f){var m=f*4;A.clamp(),A.sigBytes+=m-(A.sigBytes%m||m)},unpad:function(A){for(var f=A.words,m=A.sigBytes-1,m=A.sigBytes-1;m>=0;m--)if(f[m>>>2]>>>24-m%4*8&255){A.sigBytes=m+1;break}}},o.pad.NoPadding={pad:function(){},unpad:function(){}},function(A){var f=o,m=f.lib,C=m.CipherParams,y=f.enc,x=y.Hex,v=f.format,E=v.Hex={stringify:function(I){return I.ciphertext.toString(x)},parse:function(I){var w=x.parse(I);return C.create({ciphertext:w})}}}(),function(){var A=o,f=A.lib,m=f.BlockCipher,C=A.algo,y=[],x=[],v=[],E=[],I=[],w=[],Q=[],M=[],B=[],T=[];(function(){for(var L=[],R=0;R<256;R++)R<128?L[R]=R<<1:L[R]=R<<1^283;for(var k=0,U=0,R=0;R<256;R++){var V=U^U<<1^U<<2^U<<3^U<<4;V=V>>>8^V&255^99,y[k]=V,x[V]=k;var H=L[k],q=L[H],ie=L[q],Z=L[V]*257^V*16843008;v[k]=Z<<24|Z>>>8,E[k]=Z<<16|Z>>>16,I[k]=Z<<8|Z>>>24,w[k]=Z;var Z=ie*16843009^q*65537^H*257^k*16843008;Q[V]=Z<<24|Z>>>8,M[V]=Z<<16|Z>>>16,B[V]=Z<<8|Z>>>24,T[V]=Z,k?(k=H^L[L[L[ie^H]]],U^=L[L[U]]):k=U=1}})();var D=[0,1,2,4,8,16,32,64,128,27,54],F=C.AES=m.extend({_doReset:function(){var L;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var R=this._keyPriorReset=this._key,k=R.words,U=R.sigBytes/4,V=this._nRounds=U+6,H=(V+1)*4,q=this._keySchedule=[],ie=0;ie<H;ie++)ie<U?q[ie]=k[ie]:(L=q[ie-1],ie%U?U>6&&ie%U==4&&(L=y[L>>>24]<<24|y[L>>>16&255]<<16|y[L>>>8&255]<<8|y[L&255]):(L=L<<8|L>>>24,L=y[L>>>24]<<24|y[L>>>16&255]<<16|y[L>>>8&255]<<8|y[L&255],L^=D[ie/U|0]<<24),q[ie]=q[ie-U]^L);for(var Z=this._invKeySchedule=[],oe=0;oe<H;oe++){var ie=H-oe;if(oe%4)var L=q[ie];else var L=q[ie-4];oe<4||ie<=4?Z[oe]=L:Z[oe]=Q[y[L>>>24]]^M[y[L>>>16&255]]^B[y[L>>>8&255]]^T[y[L&255]]}}},encryptBlock:function(L,R){this._doCryptBlock(L,R,this._keySchedule,v,E,I,w,y)},decryptBlock:function(L,R){var k=L[R+1];L[R+1]=L[R+3],L[R+3]=k,this._doCryptBlock(L,R,this._invKeySchedule,Q,M,B,T,x);var k=L[R+1];L[R+1]=L[R+3],L[R+3]=k},_doCryptBlock:function(L,R,k,U,V,H,q,ie){for(var Z=this._nRounds,oe=L[R]^k[0],ne=L[R+1]^k[1],se=L[R+2]^k[2],ce=L[R+3]^k[3],j=4,de=1;de<Z;de++){var me=U[oe>>>24]^V[ne>>>16&255]^H[se>>>8&255]^q[ce&255]^k[j++],_e=U[ne>>>24]^V[se>>>16&255]^H[ce>>>8&255]^q[oe&255]^k[j++],Be=U[se>>>24]^V[ce>>>16&255]^H[oe>>>8&255]^q[ne&255]^k[j++],Qe=U[ce>>>24]^V[oe>>>16&255]^H[ne>>>8&255]^q[se&255]^k[j++];oe=me,ne=_e,se=Be,ce=Qe}var me=(ie[oe>>>24]<<24|ie[ne>>>16&255]<<16|ie[se>>>8&255]<<8|ie[ce&255])^k[j++],_e=(ie[ne>>>24]<<24|ie[se>>>16&255]<<16|ie[ce>>>8&255]<<8|ie[oe&255])^k[j++],Be=(ie[se>>>24]<<24|ie[ce>>>16&255]<<16|ie[oe>>>8&255]<<8|ie[ne&255])^k[j++],Qe=(ie[ce>>>24]<<24|ie[oe>>>16&255]<<16|ie[ne>>>8&255]<<8|ie[se&255])^k[j++];L[R]=me,L[R+1]=_e,L[R+2]=Be,L[R+3]=Qe},keySize:256/32});A.AES=m._createHelper(F)}(),function(){var A=o,f=A.lib,m=f.WordArray,C=f.BlockCipher,y=A.algo,x=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],v=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],E=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],I=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],w=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],Q=y.DES=C.extend({_doReset:function(){for(var D=this._key,F=D.words,L=[],R=0;R<56;R++){var k=x[R]-1;L[R]=F[k>>>5]>>>31-k%32&1}for(var U=this._subKeys=[],V=0;V<16;V++){for(var H=U[V]=[],q=E[V],R=0;R<24;R++)H[R/6|0]|=L[(v[R]-1+q)%28]<<31-R%6,H[4+(R/6|0)]|=L[28+(v[R+24]-1+q)%28]<<31-R%6;H[0]=H[0]<<1|H[0]>>>31;for(var R=1;R<7;R++)H[R]=H[R]>>>(R-1)*4+3;H[7]=H[7]<<5|H[7]>>>27}for(var ie=this._invSubKeys=[],R=0;R<16;R++)ie[R]=U[15-R]},encryptBlock:function(D,F){this._doCryptBlock(D,F,this._subKeys)},decryptBlock:function(D,F){this._doCryptBlock(D,F,this._invSubKeys)},_doCryptBlock:function(D,F,L){this._lBlock=D[F],this._rBlock=D[F+1],M.call(this,4,252645135),M.call(this,16,65535),B.call(this,2,858993459),B.call(this,8,16711935),M.call(this,1,1431655765);for(var R=0;R<16;R++){for(var k=L[R],U=this._lBlock,V=this._rBlock,H=0,q=0;q<8;q++)H|=I[q][((V^k[q])&w[q])>>>0];this._lBlock=V,this._rBlock=U^H}var ie=this._lBlock;this._lBlock=this._rBlock,this._rBlock=ie,M.call(this,1,1431655765),B.call(this,8,16711935),B.call(this,2,858993459),M.call(this,16,65535),M.call(this,4,252645135),D[F]=this._lBlock,D[F+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function M(D,F){var L=(this._lBlock>>>D^this._rBlock)&F;this._rBlock^=L,this._lBlock^=L<<D}function B(D,F){var L=(this._rBlock>>>D^this._lBlock)&F;this._lBlock^=L,this._rBlock^=L<<D}A.DES=C._createHelper(Q);var T=y.TripleDES=C.extend({_doReset:function(){var D=this._key,F=D.words;if(F.length!==2&&F.length!==4&&F.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var L=F.slice(0,2),R=F.length<4?F.slice(0,2):F.slice(2,4),k=F.length<6?F.slice(0,2):F.slice(4,6);this._des1=Q.createEncryptor(m.create(L)),this._des2=Q.createEncryptor(m.create(R)),this._des3=Q.createEncryptor(m.create(k))},encryptBlock:function(D,F){this._des1.encryptBlock(D,F),this._des2.decryptBlock(D,F),this._des3.encryptBlock(D,F)},decryptBlock:function(D,F){this._des3.decryptBlock(D,F),this._des2.encryptBlock(D,F),this._des1.decryptBlock(D,F)},keySize:192/32,ivSize:64/32,blockSize:64/32});A.TripleDES=C._createHelper(T)}(),function(){var A=o,f=A.lib,m=f.StreamCipher,C=A.algo,y=C.RC4=m.extend({_doReset:function(){for(var E=this._key,I=E.words,w=E.sigBytes,Q=this._S=[],M=0;M<256;M++)Q[M]=M;for(var M=0,B=0;M<256;M++){var T=M%w,D=I[T>>>2]>>>24-T%4*8&255;B=(B+Q[M]+D)%256;var F=Q[M];Q[M]=Q[B],Q[B]=F}this._i=this._j=0},_doProcessBlock:function(E,I){E[I]^=x.call(this)},keySize:256/32,ivSize:0});function x(){for(var E=this._S,I=this._i,w=this._j,Q=0,M=0;M<4;M++){I=(I+1)%256,w=(w+E[I])%256;var B=E[I];E[I]=E[w],E[w]=B,Q|=E[(E[I]+E[w])%256]<<24-M*8}return this._i=I,this._j=w,Q}A.RC4=m._createHelper(y);var v=C.RC4Drop=y.extend({cfg:y.cfg.extend({drop:192}),_doReset:function(){y._doReset.call(this);for(var E=this.cfg.drop;E>0;E--)x.call(this)}});A.RC4Drop=m._createHelper(v)}(),function(){var A=o,f=A.lib,m=f.StreamCipher,C=A.algo,y=[],x=[],v=[],E=C.Rabbit=m.extend({_doReset:function(){for(var w=this._key.words,Q=this.cfg.iv,M=0;M<4;M++)w[M]=(w[M]<<8|w[M]>>>24)&16711935|(w[M]<<24|w[M]>>>8)&4278255360;var B=this._X=[w[0],w[3]<<16|w[2]>>>16,w[1],w[0]<<16|w[3]>>>16,w[2],w[1]<<16|w[0]>>>16,w[3],w[2]<<16|w[1]>>>16],T=this._C=[w[2]<<16|w[2]>>>16,w[0]&4294901760|w[1]&65535,w[3]<<16|w[3]>>>16,w[1]&4294901760|w[2]&65535,w[0]<<16|w[0]>>>16,w[2]&4294901760|w[3]&65535,w[1]<<16|w[1]>>>16,w[3]&4294901760|w[0]&65535];this._b=0;for(var M=0;M<4;M++)I.call(this);for(var M=0;M<8;M++)T[M]^=B[M+4&7];if(Q){var D=Q.words,F=D[0],L=D[1],R=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,k=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,U=R>>>16|k&4294901760,V=k<<16|R&65535;T[0]^=R,T[1]^=U,T[2]^=k,T[3]^=V,T[4]^=R,T[5]^=U,T[6]^=k,T[7]^=V;for(var M=0;M<4;M++)I.call(this)}},_doProcessBlock:function(w,Q){var M=this._X;I.call(this),y[0]=M[0]^M[5]>>>16^M[3]<<16,y[1]=M[2]^M[7]>>>16^M[5]<<16,y[2]=M[4]^M[1]>>>16^M[7]<<16,y[3]=M[6]^M[3]>>>16^M[1]<<16;for(var B=0;B<4;B++)y[B]=(y[B]<<8|y[B]>>>24)&16711935|(y[B]<<24|y[B]>>>8)&4278255360,w[Q+B]^=y[B]},blockSize:128/32,ivSize:64/32});function I(){for(var w=this._X,Q=this._C,M=0;M<8;M++)x[M]=Q[M];Q[0]=Q[0]+1295307597+this._b|0,Q[1]=Q[1]+3545052371+(Q[0]>>>0<x[0]>>>0?1:0)|0,Q[2]=Q[2]+886263092+(Q[1]>>>0<x[1]>>>0?1:0)|0,Q[3]=Q[3]+1295307597+(Q[2]>>>0<x[2]>>>0?1:0)|0,Q[4]=Q[4]+3545052371+(Q[3]>>>0<x[3]>>>0?1:0)|0,Q[5]=Q[5]+886263092+(Q[4]>>>0<x[4]>>>0?1:0)|0,Q[6]=Q[6]+1295307597+(Q[5]>>>0<x[5]>>>0?1:0)|0,Q[7]=Q[7]+3545052371+(Q[6]>>>0<x[6]>>>0?1:0)|0,this._b=Q[7]>>>0<x[7]>>>0?1:0;for(var M=0;M<8;M++){var B=w[M]+Q[M],T=B&65535,D=B>>>16,F=((T*T>>>17)+T*D>>>15)+D*D,L=((B&4294901760)*B|0)+((B&65535)*B|0);v[M]=F^L}w[0]=v[0]+(v[7]<<16|v[7]>>>16)+(v[6]<<16|v[6]>>>16)|0,w[1]=v[1]+(v[0]<<8|v[0]>>>24)+v[7]|0,w[2]=v[2]+(v[1]<<16|v[1]>>>16)+(v[0]<<16|v[0]>>>16)|0,w[3]=v[3]+(v[2]<<8|v[2]>>>24)+v[1]|0,w[4]=v[4]+(v[3]<<16|v[3]>>>16)+(v[2]<<16|v[2]>>>16)|0,w[5]=v[5]+(v[4]<<8|v[4]>>>24)+v[3]|0,w[6]=v[6]+(v[5]<<16|v[5]>>>16)+(v[4]<<16|v[4]>>>16)|0,w[7]=v[7]+(v[6]<<8|v[6]>>>24)+v[5]|0}A.Rabbit=m._createHelper(E)}(),function(){var A=o,f=A.lib,m=f.StreamCipher,C=A.algo,y=[],x=[],v=[],E=C.RabbitLegacy=m.extend({_doReset:function(){var w=this._key.words,Q=this.cfg.iv,M=this._X=[w[0],w[3]<<16|w[2]>>>16,w[1],w[0]<<16|w[3]>>>16,w[2],w[1]<<16|w[0]>>>16,w[3],w[2]<<16|w[1]>>>16],B=this._C=[w[2]<<16|w[2]>>>16,w[0]&4294901760|w[1]&65535,w[3]<<16|w[3]>>>16,w[1]&4294901760|w[2]&65535,w[0]<<16|w[0]>>>16,w[2]&4294901760|w[3]&65535,w[1]<<16|w[1]>>>16,w[3]&4294901760|w[0]&65535];this._b=0;for(var T=0;T<4;T++)I.call(this);for(var T=0;T<8;T++)B[T]^=M[T+4&7];if(Q){var D=Q.words,F=D[0],L=D[1],R=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,k=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,U=R>>>16|k&4294901760,V=k<<16|R&65535;B[0]^=R,B[1]^=U,B[2]^=k,B[3]^=V,B[4]^=R,B[5]^=U,B[6]^=k,B[7]^=V;for(var T=0;T<4;T++)I.call(this)}},_doProcessBlock:function(w,Q){var M=this._X;I.call(this),y[0]=M[0]^M[5]>>>16^M[3]<<16,y[1]=M[2]^M[7]>>>16^M[5]<<16,y[2]=M[4]^M[1]>>>16^M[7]<<16,y[3]=M[6]^M[3]>>>16^M[1]<<16;for(var B=0;B<4;B++)y[B]=(y[B]<<8|y[B]>>>24)&16711935|(y[B]<<24|y[B]>>>8)&4278255360,w[Q+B]^=y[B]},blockSize:128/32,ivSize:64/32});function I(){for(var w=this._X,Q=this._C,M=0;M<8;M++)x[M]=Q[M];Q[0]=Q[0]+1295307597+this._b|0,Q[1]=Q[1]+3545052371+(Q[0]>>>0<x[0]>>>0?1:0)|0,Q[2]=Q[2]+886263092+(Q[1]>>>0<x[1]>>>0?1:0)|0,Q[3]=Q[3]+1295307597+(Q[2]>>>0<x[2]>>>0?1:0)|0,Q[4]=Q[4]+3545052371+(Q[3]>>>0<x[3]>>>0?1:0)|0,Q[5]=Q[5]+886263092+(Q[4]>>>0<x[4]>>>0?1:0)|0,Q[6]=Q[6]+1295307597+(Q[5]>>>0<x[5]>>>0?1:0)|0,Q[7]=Q[7]+3545052371+(Q[6]>>>0<x[6]>>>0?1:0)|0,this._b=Q[7]>>>0<x[7]>>>0?1:0;for(var M=0;M<8;M++){var B=w[M]+Q[M],T=B&65535,D=B>>>16,F=((T*T>>>17)+T*D>>>15)+D*D,L=((B&4294901760)*B|0)+((B&65535)*B|0);v[M]=F^L}w[0]=v[0]+(v[7]<<16|v[7]>>>16)+(v[6]<<16|v[6]>>>16)|0,w[1]=v[1]+(v[0]<<8|v[0]>>>24)+v[7]|0,w[2]=v[2]+(v[1]<<16|v[1]>>>16)+(v[0]<<16|v[0]>>>16)|0,w[3]=v[3]+(v[2]<<8|v[2]>>>24)+v[1]|0,w[4]=v[4]+(v[3]<<16|v[3]>>>16)+(v[2]<<16|v[2]>>>16)|0,w[5]=v[5]+(v[4]<<8|v[4]>>>24)+v[3]|0,w[6]=v[6]+(v[5]<<16|v[5]>>>16)+(v[4]<<16|v[4]>>>16)|0,w[7]=v[7]+(v[6]<<8|v[6]>>>24)+v[5]|0}A.RabbitLegacy=m._createHelper(E)}(),o});var nD=mat.CryptoJS,Cat={};(function(o,A){o.FlowEcharts=A(Nb,o.Geoworld)})(Cat,function(o,A){return function(f){var m={};function C(y){if(m[y])return m[y].exports;var x=m[y]={i:y,l:!1,exports:{}};return f[y].call(x.exports,x,x.exports,C),x.l=!0,x.exports}return C.m=f,C.c=m,C.d=function(y,x,v){C.o(y,x)||Object.defineProperty(y,x,{enumerable:!0,get:v})},C.r=function(y){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},C.t=function(y,x){if(x&1&&(y=C(y)),x&8||x&4&&typeof y=="object"&&y&&y.__esModule)return y;var v=Object.create(null);if(C.r(v),Object.defineProperty(v,"default",{enumerable:!0,value:y}),x&2&&typeof y!="string")for(var E in y)C.d(v,E,function(I){return y[I]}.bind(null,E));return v},C.n=function(y){var x=y&&y.__esModule?function(){return y.default}:function(){return y};return C.d(x,"a",x),x},C.o=function(y,x){return Object.prototype.hasOwnProperty.call(y,x)},C.p="",C(C.s=0)}([function(f,m,C){C(1);var y=C(7);f.exports=y},function(f,m,C){var y;y=function(x){return C(2).registerCoordinateSystem("GLMap",C(3)),C(5),C(6),C(2).registerAction({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(v,E){}),{version:"1.0.0"}}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m){f.exports=o},function(f,m,C){var y;y=function(x){var v=C(2);function E(I,w){this._GLMap=I,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=w}return E.prototype.dimensions=["lng","lat"],E.prototype.setMapOffset=function(I){this._mapOffset=I},E.prototype.getBMap=function(){return this._GLMap},E.prototype.dataToPoint=function(I){var w=je.toRadians(80),Q=[99999,99999],M=ee.fromDegrees(I[0],I[1]);if(!M)return Q;var B=this._GLMap.cartesianToCanvasCoordinates(M);if(!B)return Q;var T=this._GLMap;return T.mode===xi.SCENE3D&&ee.angleBetween(T.camera.position,M)>w?!1:[B.x-this._mapOffset[0],B.y-this._mapOffset[1]]},E.prototype.pointToData=function(Q){var w=this._mapOffset,Q=this._bmap.project([Q[0]+w[0],Q[1]+w[1]]);return[Q.lng,Q.lat]},E.prototype.getViewRect=function(){var I=this._api;return new v.graphic.BoundingRect(0,0,I.getWidth(),I.getHeight())},E.prototype.getRoamTransform=function(){return v.matrix.create()},E.dimensions=E.prototype.dimensions,E.create=function(I,w){var Q;I.eachComponent("GLMap",function(M){var B=w.getZr().painter.getViewportRoot(),T=v.glMap;Q=new E(T,w),Q.setMapOffset(M.__mapOffset||[0,0]),M.coordinateSystem=Q}),I.eachSeries(function(M){M.get("coordinateSystem")==="GLMap"&&(M.coordinateSystem=Q)})},E}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m){f.exports=A},function(f,m,C){var y;y=function(x){return C(2).extendComponentModel({type:"GLMap",getBMap:function(){return this.__GLMap},defaultOption:{roam:!1}})}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m,C){var y;y=function(x){return C(2).extendComponentView({type:"GLMap",init:function(v,E){this.api=E,Nb.glMap.postRender.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.dispatchAction({type:"GLMapRoam"})},render:function(v,E,I){},dispose:function(v,E){Nb.glMap.postRender.removeEventListener(this.moveHandler,this)}})}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m){function C(y,x){this._mapContainer=y,this._overlay=this._createChartOverlay(),this._overlay.setOption(x)}C.prototype._createChartOverlay=function(){var y=this._mapContainer.scene;y.canvas.setAttribute("tabIndex",0);var x=document.createElement("div");return x.style.position="absolute",x.style.top="0px",x.style.left="0px",x.style.width=y.canvas.width+"px",x.style.height=y.canvas.height+"px",x.style.pointerEvents="none",x.setAttribute("id","echarts"),x.setAttribute("class","echartMap"),this._mapContainer.container.appendChild(x),this._echartsContainer=x,Nb.glMap=y,Nb.init(x)},C.prototype.dispose=function(){this._echartsContainer&&(this._mapContainer.container.removeChild(this._echartsContainer),this._echartsContainer=null),this._overlay&&(this._overlay.dispose(),this._overlay=null)},C.prototype.destroy=function(){this.dispose()},C.prototype.updateOverlay=function(y){this._overlay&&this._overlay.setOption(y)},C.prototype.getMap=function(){return this._mapContainer},C.prototype.getOverlay=function(){return this._overlay},f.exports=C}])});var dae=Cat.FlowEcharts,Yze=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"],Jze=["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"],Wze=["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"],jze=["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"],qze=["#text"],Xze=["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"],epe=["accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"],Zze=["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"],R$=["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"];function Yh(o,A){for(var f=A.length;f--;)typeof A[f]=="string"&&(A[f]=A[f].toLowerCase()),o[A[f]]=!0;return o}function $ze(o){var A={},f=void 0;for(f in o)Object.prototype.hasOwnProperty.call(o,f)&&(A[f]=o[f]);return A}var _bi=/\{\{[\s\S]*|[\s\S]*\}\}/gm,Bbi=/<%[\s\S]*|[\s\S]*%>/gm,wbi=/^data-[\-\w.\u00B7-\uFFFF]/,bbi=/^aria-[\-\w]+$/,Qbi=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,Sbi=/^(?:\w+script|data):/i,Dbi=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,L$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function eD(o){if(Array.isArray(o)){for(var A=0,f=Array(o.length);A<o.length;A++)f[A]=o[A];return f}else return Array.from(o)}var Tbi=function(){return typeof window>"u"?null:window};function yat(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tbi(),A=function(Lt){return yat(Lt)};if(A.version="1.0.8",A.removed=[],!o||!o.document||o.document.nodeType!==9)return A.isSupported=!1,A;var f=o.document,m=!1,C=!1,y=o.document,x=o.DocumentFragment,v=o.HTMLTemplateElement,E=o.Node,I=o.NodeFilter,w=o.NamedNodeMap,Q=w===void 0?o.NamedNodeMap||o.MozNamedAttrMap:w,M=o.Text,B=o.Comment,T=o.DOMParser;if(typeof v=="function"){var D=y.createElement("template");D.content&&D.content.ownerDocument&&(y=D.content.ownerDocument)}var F=y,L=F.implementation,R=F.createNodeIterator,k=F.getElementsByTagName,U=F.createDocumentFragment,V=f.importNode,H={};A.isSupported=L&&typeof L.createHTMLDocument<"u"&&y.documentMode!==9;var q=_bi,ie=Bbi,Z=wbi,oe=bbi,ne=Sbi,se=Dbi,ce=Qbi,j=null,de=Yh({},[].concat(eD(Yze),eD(Jze),eD(Wze),eD(jze),eD(qze))),me=null,_e=Yh({},[].concat(eD(Xze),eD(epe),eD(Zze),eD(R$))),Be=null,Qe=null,Ie=!0,ve=!0,K=!1,W=!1,te=!1,Y=!1,he=!1,fe=!1,Ce=!1,Ee=!1,be=!1,Re=!0,Ne=!0,Je=!1,ot={},nt=Yh({},["audio","head","math","script","style","template","svg","video"]),$e=Yh({},["audio","video","img","source","image"]),ht=Yh({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ze=null,Ze=y.createElement("form"),ct=function(Lt){(typeof Lt>"u"?"undefined":L$(Lt))!=="object"&&(Lt={}),j="ALLOWED_TAGS"in Lt?Yh({},Lt.ALLOWED_TAGS):de,me="ALLOWED_ATTR"in Lt?Yh({},Lt.ALLOWED_ATTR):_e,Be="FORBID_TAGS"in Lt?Yh({},Lt.FORBID_TAGS):{},Qe="FORBID_ATTR"in Lt?Yh({},Lt.FORBID_ATTR):{},ot="USE_PROFILES"in Lt?Lt.USE_PROFILES:!1,Ie=Lt.ALLOW_ARIA_ATTR!==!1,ve=Lt.ALLOW_DATA_ATTR!==!1,K=Lt.ALLOW_UNKNOWN_PROTOCOLS||!1,W=Lt.SAFE_FOR_JQUERY||!1,te=Lt.SAFE_FOR_TEMPLATES||!1,Y=Lt.WHOLE_DOCUMENT||!1,Ce=Lt.RETURN_DOM||!1,Ee=Lt.RETURN_DOM_FRAGMENT||!1,be=Lt.RETURN_DOM_IMPORT||!1,fe=Lt.FORCE_BODY||!1,Re=Lt.SANITIZE_DOM!==!1,Ne=Lt.KEEP_CONTENT!==!1,Je=Lt.IN_PLACE||!1,ce=Lt.ALLOWED_URI_REGEXP||ce,te&&(ve=!1),Ee&&(Ce=!0),ot&&(j=Yh({},[].concat(eD(qze))),me=[],ot.html===!0&&(Yh(j,Yze),Yh(me,Xze)),ot.svg===!0&&(Yh(j,Jze),Yh(me,epe),Yh(me,R$)),ot.svgFilters===!0&&(Yh(j,Wze),Yh(me,epe),Yh(me,R$)),ot.mathMl===!0&&(Yh(j,jze),Yh(me,Zze),Yh(me,R$))),Lt.ADD_TAGS&&(j===de&&(j=$ze(j)),Yh(j,Lt.ADD_TAGS)),Lt.ADD_ATTR&&(me===_e&&(me=$ze(me)),Yh(me,Lt.ADD_ATTR)),Lt.ADD_URI_SAFE_ATTR&&Yh(ht,Lt.ADD_URI_SAFE_ATTR),Ne&&(j["#text"]=!0),Y&&Yh(j,["html","head","body"]),j.table&&Yh(j,["tbody"]),Object&&"freeze"in Object&&Object.freeze(Lt),ze=Lt},We=function(Lt){A.removed.push({element:Lt});try{Lt.parentNode.removeChild(Lt)}catch{Lt.outerHTML=""}},Oe=function(Lt,pi){try{A.removed.push({attribute:pi.getAttributeNode(Lt),from:pi})}catch{A.removed.push({attribute:null,from:pi})}pi.removeAttribute(Lt)},Ye=function(Lt){var pi=void 0,Ut=void 0;if(fe)Lt="<remove></remove>"+Lt;else{var ri=Lt.match(/^[\s]+/);Ut=ri&&ri[0],Ut&&(Lt=Lt.slice(Ut.length))}if(m)try{pi=new T().parseFromString(Lt,"text/html")}catch{}if(C&&Yh(Be,["title"]),!pi||!pi.documentElement){pi=L.createHTMLDocument("");var ni=pi,kt=ni.body;kt.parentNode.removeChild(kt.parentNode.firstElementChild),kt.outerHTML=Lt}return Ut&&pi.body.insertBefore(y.createTextNode(Ut),pi.body.childNodes[0]||null),k.call(pi,Y?"html":"body")[0]};A.isSupported&&(function(){try{var Lt=Ye('<svg><p><style><img src="</style><img src=x onerror=alert(1)//">');Lt.querySelector("svg img")&&(m=!0)}catch{}}(),function(){try{var Lt=Ye("<x/><title>&lt;/title&gt;&lt;img&gt;");Lt.querySelector("title").textContent.match(/<\/title/)&&(C=!0)}catch{}}());var rt=function(Lt){return R.call(Lt.ownerDocument||Lt,Lt,I.SHOW_ELEMENT|I.SHOW_COMMENT|I.SHOW_TEXT,function(){return I.FILTER_ACCEPT},!1)},gt=function(Lt){return Lt instanceof M||Lt instanceof B?!1:typeof Lt.nodeName!="string"||typeof Lt.textContent!="string"||typeof Lt.removeChild!="function"||!(Lt.attributes instanceof Q)||typeof Lt.removeAttribute!="function"||typeof Lt.setAttribute!="function"},Et=function(Lt){return(typeof E>"u"?"undefined":L$(E))==="object"?Lt instanceof E:Lt&&(typeof Lt>"u"?"undefined":L$(Lt))==="object"&&typeof Lt.nodeType=="number"&&typeof Lt.nodeName=="string"},yt=function(Lt,pi,Ut){!H[Lt]||H[Lt].forEach(function(ri){ri.call(A,pi,Ut,ze)})},vt=function(Lt){var pi=void 0;if(yt("beforeSanitizeElements",Lt,null),gt(Lt))return We(Lt),!0;var Ut=Lt.nodeName.toLowerCase();if(yt("uponSanitizeElement",Lt,{tagName:Ut,allowedTags:j}),!j[Ut]||Be[Ut]){if(Ne&&!nt[Ut]&&typeof Lt.insertAdjacentHTML=="function")try{Lt.insertAdjacentHTML("AfterEnd",Lt.innerHTML)}catch{}return We(Lt),!0}return W&&!Lt.firstElementChild&&(!Lt.content||!Lt.content.firstElementChild)&&/</g.test(Lt.textContent)&&(A.removed.push({element:Lt.cloneNode()}),Lt.innerHTML?Lt.innerHTML=Lt.innerHTML.replace(/</g,"&lt;"):Lt.innerHTML=Lt.textContent.replace(/</g,"&lt;")),te&&Lt.nodeType===3&&(pi=Lt.textContent,pi=pi.replace(q," "),pi=pi.replace(ie," "),Lt.textContent!==pi&&(A.removed.push({element:Lt.cloneNode()}),Lt.textContent=pi)),yt("afterSanitizeElements",Lt,null),!1},Rt=function(Lt,pi,Ut){return!(Re&&(pi==="id"||pi==="name")&&(Ut in y||Ut in Ze)||(te&&(Ut=Ut.replace(q," "),Ut=Ut.replace(ie," ")),!(ve&&Z.test(pi))&&!(Ie&&oe.test(pi))&&(!me[pi]||Qe[pi]||!ht[pi]&&!ce.test(Ut.replace(se,""))&&!((pi==="src"||pi==="xlink:href")&&Lt!=="script"&&Ut.indexOf("data:")===0&&$e[Lt])&&!(K&&!ne.test(Ut.replace(se,"")))&&Ut)))},qt=function(Lt){var pi=void 0,Ut=void 0,ri=void 0,ni=void 0,kt=void 0;yt("beforeSanitizeAttributes",Lt,null);var qe=Lt.attributes;if(qe){var Fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:me};for(kt=qe.length;kt--;){pi=qe[kt];var it=pi,Ht=it.name,Jt=it.namespaceURI;if(Ut=pi.value.trim(),ri=Ht.toLowerCase(),Fe.attrName=ri,Fe.attrValue=Ut,Fe.keepAttr=!0,yt("uponSanitizeAttribute",Lt,Fe),Ut=Fe.attrValue,ri==="name"&&Lt.nodeName==="IMG"&&qe.id)ni=qe.id,qe=Array.prototype.slice.apply(qe),Oe("id",Lt),Oe(Ht,Lt),qe.indexOf(ni)>kt&&Lt.setAttribute("id",ni.value);else{if(Lt.nodeName==="INPUT"&&ri==="type"&&Ut==="file"&&(me[ri]||!Qe[ri]))continue;Ht==="id"&&Lt.setAttribute(Ht,""),Oe(Ht,Lt)}if(Fe.keepAttr){var jt=Lt.nodeName.toLowerCase();if(Rt(jt,ri,Ut))try{Jt?Lt.setAttributeNS(Jt,Ht,Ut):Lt.setAttribute(Ht,Ut),A.removed.pop()}catch{}}}yt("afterSanitizeAttributes",Lt,null)}},wt=function Lt(pi){var Ut=void 0,ri=rt(pi);for(yt("beforeSanitizeShadowDOM",pi,null);Ut=ri.nextNode();)yt("uponSanitizeShadowNode",Ut,null),!vt(Ut)&&(Ut.content instanceof x&&Lt(Ut.content),qt(Ut));yt("afterSanitizeShadowDOM",pi,null)};return A.sanitize=function(Lt,pi){var Ut=void 0,ri=void 0,ni=void 0,kt=void 0,qe=void 0;if(Lt||(Lt="<!-->"),typeof Lt!="string"&&!Et(Lt)){if(typeof Lt.toString!="function")throw new TypeError("toString is not a function");if(Lt=Lt.toString(),typeof Lt!="string")throw new TypeError("dirty is not a string, aborting")}if(!A.isSupported){if(L$(o.toStaticHTML)==="object"||typeof o.toStaticHTML=="function"){if(typeof Lt=="string")return o.toStaticHTML(Lt);if(Et(Lt))return o.toStaticHTML(Lt.outerHTML)}return Lt}if(he||ct(pi),A.removed=[],!Je)if(Lt instanceof E)Ut=Ye("<!-->"),ri=Ut.ownerDocument.importNode(Lt,!0),ri.nodeType===1&&ri.nodeName==="BODY"?Ut=ri:Ut.appendChild(ri);else{if(!Ce&&!Y&&Lt.indexOf("<")===-1)return Lt;if(Ut=Ye(Lt),!Ut)return Ce?null:""}Ut&&fe&&We(Ut.firstChild);for(var Fe=rt(Je?Lt:Ut);ni=Fe.nextNode();)ni.nodeType===3&&ni===kt||vt(ni)||(ni.content instanceof x&&wt(ni.content),qt(ni),kt=ni);if(Je)return Lt;if(Ce){if(Ee)for(qe=U.call(Ut.ownerDocument);Ut.firstChild;)qe.appendChild(Ut.firstChild);else qe=Ut;return be&&(qe=V.call(f,qe,!0)),qe}return Y?Ut.outerHTML:Ut.innerHTML},A.setConfig=function(Lt){ct(Lt),he=!0},A.clearConfig=function(){ze=null,he=!1},A.isValidAttribute=function(Lt,pi,Ut){ze||ct({});var ri=Lt.toLowerCase(),ni=pi.toLowerCase();return Rt(ri,ni,Ut)},A.addHook=function(Lt,pi){typeof pi=="function"&&(H[Lt]=H[Lt]||[],H[Lt].push(pi))},A.removeHook=function(Lt){H[Lt]&&H[Lt].pop()},A.removeHooks=function(Lt){H[Lt]&&(H[Lt]=[])},A.removeAllHooks=function(){H={}},A}var Mbi=yat(),xat=Mbi,vat=`uniform sampler2D u_floatTexture;
        }`})}function t1i(o,A,f,m,C,y,x){let v=$Bi(A,f,y,x);o.spotMaterial=v,m.preUpdate.addEventListener(function(){let E=m.camera.viewMatrix,I=new Xe;Xe.multiply(E,C,I),Xe.toArray(I,oie),v&&(v.uniforms.u_spotmodelViewMatrix=oie)})}function i1i(o,A,f,m,C,y,x,v){let E=Hot(A,f,y,x,v);o.customShader=E,m.preUpdate.addEventListener(function(){let I=m.camera.viewMatrix,w=new Xe;Xe.multiply(I,C,w),E.setUniform("u_spotmodelViewMatrix",w)})}function r1i(o,A,f,m,C,y,x){let v=Hot(A,f,y,x);o.customShader=v,m.preUpdate.addEventListener(function(){let E=m.camera.viewMatrix,I=new Xe;Xe.multiply(E,C,I),v.setUniform("u_spotmodelViewMatrix",I)})}function tae(o,A={},f=[]){!O(o)||(this._viewer=o,this._texture=void 0,!(!O(A)&&!(O(A.globe)&&O(A.tileset)&&O(A.gltf)))&&this.initialize(o,A,f))}tae.prototype.reSet=function(o={},A=[]){this._texture&&(this._texture.destroy(),this._texture=void 0),this.initialize(this._viewer,o,A)};tae.prototype.destroy=function(o){!O(o)&&!(O(o.globe)&&O(o.tileset)&&O(o.gltf))||(O(o.globe)&&o.globe.spotMaterial&&(o.globe.spotMaterial=void 0),O(o.tileset)&&o.tileset.customShader&&(o.tileset.customShader=null),O(o.gltf)&&o.gltf.customShader&&(o.gltf.customShader=null),this._texture&&(this._texture.destroy(),this._texture=void 0))};tae.prototype.initialize=function(o,A,f){if(!O(A)&&!(O(A.globe)&&O(A.tileset)&&O(A.gltf)))return;let m=Ae(A.globeBrightness,.2),C=Ae(A.gltfBrightness,.2),y=Ae(A.tilesetBrightness,.2),x=Ae(A.gltfLightModel,rI.PBR),v=Ae(A.tilesetLightModel,rI.PBR);if(!Array.isArray(f)||f.length===0)return;let E=o.scene,I=Vn.eastNorthUpToFixedFrame(f[0].position),w=new Xe;Xe.inverseTransformation(I,w);let Q=[],M=new ee;for(let D=0;D<f.length;D++){let F=f[D];Xe.multiplyByPoint(w,F.position,M),Q.push(M.x,M.y,M.z),Q.push(F.direction.x,F.direction.y,F.direction.z),Q.push(F.spotColor.red,F.spotColor.green,F.spotColor.blue),Q.push(F.distance,Math.cos(F.cutOff/180*3.1415),Math.cos(F.outerCutOff/180*3.1415))}let B=!1,T=ZBi(Q,E.context,B);this._texture=T,A.globe&&t1i(A.globe,T,Q,E,I,B,m),A.tileset&&i1i(A.tileset,T,Q,E,I,B,y,v),A.gltf&&r1i(A.gltf,T,Q,E,I,B,C,x)};var Vot=tae,zot=/{[^}]+}/g,Kot={x:s1i,y:u1i,z:h1i,s:d1i,reverseX:l1i,reverseY:c1i,reverseZ:A1i,westDegrees:f1i,southDegrees:g1i,eastDegrees:p1i,northDegrees:m1i,westProjected:C1i,southProjected:y1i,eastProjected:x1i,northProjected:v1i,width:E1i,height:I1i},n1i=ia(Kot,{i:_1i,j:B1i,reverseI:w1i,reverseJ:b1i,longitudeDegrees:S1i,latitudeDegrees:D1i,longitudeProjected:T1i,latitudeProjected:M1i,format:R1i});function _O(o){this._errorEvent=new Event,this._resource=void 0,this._urlSchemeZeroPadding=void 0,this._pickFeaturesResource=void 0,this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._minimumLevel=void 0,this._tilingScheme=void 0,this._rectangle=void 0,this._tileDiscardPolicy=void 0,this._credit=void 0,this._hasAlphaChannel=void 0,this._readyPromise=void 0,this._tags=void 0,this._pickFeaturesTags=void 0,this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this.enablePickFeatures=!0,this.reinitialize(o)}Object.defineProperties(_O.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return O(this._resource)}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return this._hasAlphaChannel}}});_O.prototype.reinitialize=function(o){let A=this;A._readyPromise=Promise.resolve(o).then(function(f){let m=f.customTags,C=ia(Kot,m),y=ia(n1i,m),x=An.createIfNeeded(f.url),v=An.createIfNeeded(f.pickFeaturesUrl);A.enablePickFeatures=Ae(f.enablePickFeatures,A.enablePickFeatures),A._urlSchemeZeroPadding=Ae(f.urlSchemeZeroPadding,A.urlSchemeZeroPadding),A._tileDiscardPolicy=f.tileDiscardPolicy,A._getFeatureInfoFormats=f.getFeatureInfoFormats,A._subdomains=f.subdomains,Array.isArray(A._subdomains)?A._subdomains=A._subdomains.slice():O(A._subdomains)&&A._subdomains.length>0?A._subdomains=A._subdomains.split(""):A._subdomains=["a","b","c"],A._tileWidth=Ae(f.tileWidth,256),A._tileHeight=Ae(f.tileHeight,256),A._minimumLevel=Ae(f.minimumLevel,0),A._maximumLevel=f.maximumLevel,A._tilingScheme=Ae(f.tilingScheme,new Am({ellipsoid:f.ellipsoid})),A._rectangle=Ae(f.rectangle,A._tilingScheme.rectangle),A._rectangle=Si.intersection(A._rectangle,A._tilingScheme.rectangle),A._hasAlphaChannel=Ae(f.hasAlphaChannel,!0);let E=f.credit;return typeof E=="string"&&(E=new tl(E)),A._credit=E,A._resource=x,A._tags=C,A._pickFeaturesResource=v,A._pickFeaturesTags=y,!0})};_O.prototype.getTileCredits=function(o,A,f){};_O.prototype.requestImage=function(o,A,f,m){let C=o1i(this,o,A,f,m),y=a2.loadImage(this,C);return typeof this.loadtitle=="function"&&this.loadtitle(C),y};_O.prototype.loadtitle=function(o){};_O.prototype.pickFeatures=function(o,A,f,m,C){if(!this.enablePickFeatures||!O(this._pickFeaturesResource)||this._getFeatureInfoFormats.length===0)return;let y=0,x=this;function v(I,w){return I.callback(w)}function E(){if(y>=x._getFeatureInfoFormats.length)return Promise.resolve([]);let I=x._getFeatureInfoFormats[y],w=a1i(x,o,A,f,m,C,I.format);return++y,I.type==="json"?w.fetchJson().then(I.callback).otherwise(E):I.type==="xml"?w.fetchXML().then(I.callback).otherwise(E):I.type==="text"||I.type==="html"?w.fetchText().then(I.callback).otherwise(E):w.fetch({responseType:I.format}).then(v.bind(void 0,I)).otherwise(E)}return E()};var aie=!1,D_=new Si,sie=!1,eW=new Si;function o1i(o,A,f,m,C){aie=!1,sie=!1;let y=o._resource,x=y.getUrlComponent(!0),v=o._tags,E={},I=x.match(zot);return O(I)&&I.forEach(function(w){let Q=w.substring(1,w.length-1);O(v[Q])&&(E[Q]=v[Q](o,A,f,m))}),y.getDerivedResource({request:C,templateValues:E})}var wCe=!1,N8=new It,bCe=!1;function a1i(o,A,f,m,C,y,x){aie=!1,sie=!1,wCe=!1,bCe=!1;let v=o._pickFeaturesResource,E=v.getUrlComponent(!0),I=o._pickFeaturesTags,w={},Q=E.match(zot);return O(Q)&&Q.forEach(function(M){let B=M.substring(1,M.length-1);O(I[B])&&(w[B]=I[B](o,A,f,m,C,y,x))}),v.getDerivedResource({templateValues:w})}function cH(o,A,f){if(o&&o.urlSchemeZeroPadding&&o.urlSchemeZeroPadding.hasOwnProperty(A)){let m=o.urlSchemeZeroPadding[A];if(typeof m=="string"){let C=m.length;C>1&&(f=f.length>=C?f:new Array(C-f.toString().length+1).join("0")+f)}}return f}function s1i(o,A,f,m){return cH(o,"{x}",A)}function l1i(o,A,f,m){let C=o.tilingScheme.getNumberOfXTilesAtLevel(m)-A-1;return cH(o,"{reverseX}",C)}function u1i(o,A,f,m){return cH(o,"{y}",f)}function c1i(o,A,f,m){let C=o.tilingScheme.getNumberOfYTilesAtLevel(m)-f-1;return cH(o,"{reverseY}",C)}function A1i(o,A,f,m){let C=o.maximumLevel,y=O(C)&&m<C?C-m-1:m;return cH(o,"{reverseZ}",y)}function h1i(o,A,f,m){return cH(o,"{z}",m)}function d1i(o,A,f,m){let C=(A+f+m)%o._subdomains.length;return o._subdomains[C]}function iae(o,A,f,m){aie||(o.tilingScheme.tileXYToRectangle(A,f,m,D_),D_.west=je.toDegrees(D_.west),D_.south=je.toDegrees(D_.south),D_.east=je.toDegrees(D_.east),D_.north=je.toDegrees(D_.north),aie=!0)}function f1i(o,A,f,m){return iae(o,A,f,m),D_.west}function g1i(o,A,f,m){return iae(o,A,f,m),D_.south}function p1i(o,A,f,m){return iae(o,A,f,m),D_.east}function m1i(o,A,f,m){return iae(o,A,f,m),D_.north}function rae(o,A,f,m){sie||(o.tilingScheme.tileXYToNativeRectangle(A,f,m,eW),sie=!0)}function C1i(o,A,f,m){return rae(o,A,f,m),eW.west}function y1i(o,A,f,m){return rae(o,A,f,m),eW.south}function x1i(o,A,f,m){return rae(o,A,f,m),eW.east}function v1i(o,A,f,m){return rae(o,A,f,m),eW.north}function E1i(o,A,f,m){return o.tileWidth}function I1i(o,A,f,m){return o.tileHeight}function _1i(o,A,f,m,C,y,x){return nae(o,A,f,m,C,y),N8.x}function B1i(o,A,f,m,C,y,x){return nae(o,A,f,m,C,y),N8.y}function w1i(o,A,f,m,C,y,x){return nae(o,A,f,m,C,y),o.tileWidth-N8.x-1}function b1i(o,A,f,m,C,y,x){return nae(o,A,f,m,C,y),o.tileHeight-N8.y-1}var Q1i=new Si,$G=new ee;function nae(o,A,f,m,C,y,x){if(wCe)return;uDe(o,A,f,m,C,y);let v=$G,E=o.tilingScheme.tileXYToNativeRectangle(A,f,m,Q1i);N8.x=o.tileWidth*(v.x-E.west)/E.width|0,N8.y=o.tileHeight*(E.north-v.y)/E.height|0,wCe=!0}function S1i(o,A,f,m,C,y,x){return je.toDegrees(C)}function D1i(o,A,f,m,C,y,x){return je.toDegrees(y)}function T1i(o,A,f,m,C,y,x){return uDe(o,A,f,m,C,y),$G.x}function M1i(o,A,f,m,C,y,x){return uDe(o,A,f,m,C,y),$G.y}var P1i=new Kt;function uDe(o,A,f,m,C,y,x){if(!bCe){if(o.tilingScheme.projection instanceof Dg)$G.x=je.toDegrees(C),$G.y=je.toDegrees(y);else{let v=P1i;v.longitude=C,v.latitude=y,o.tilingScheme.projection.project(v,$G)}bCe=!0}}function R1i(o,A,f,m,C,y,x){return x}var Yot=_O;function YF(o){this._definitionChanged=new br,this.baseWaterColor=Ae(o.baseWaterColor,new At(.2,.3,.6,.5)),this.waterFrequency=Ae(o.waterFrequency,1e3),this.animationSpeed=Ae(o.animationSpeed,.01),this.amplitude=Ae(o.amplitude,10),this._translucnet=Ae(o.translucent,!0),this._time=new Date().getTime()}Object.defineProperties(YF.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}});YF.prototype.getType=function(o){return ss.WaterType};YF.prototype.getValue=function(o,A){return O(A)||(A={}),A.normalMap=xs("Assets/Images/waterNormals.jpg"),A.baseWaterColor=this.baseWaterColor,A.frequency=this.waterFrequency,A.animationSpeed=this.animationSpeed,A.amplitude=this.amplitude,A};YF.prototype.update=function(){let o=fi.now();return this.getValue(o)};YF.prototype.isTranslucent=function(){return this._translucnet};YF.prototype.equals=function(o){return this===o||o instanceof YF&&Nt.equals(this.baseWaterColor,o.baseWaterColor)};var Jot=YF,Wot=`uniform sampler2D u_floatTexture;
void main()
{
float actual = texture2D(u_floatTexture, vec2(0.5, 0.5)).r;
float expected = 123456.0;
gl_FragColor = vec4(abs(actual - expected), 0.0, 0.0, 1.0);
}
`,wDe=`uniform sampler2D u_noiseTexture;
`,cDe=`uniform sampler2D u_noiseTexture;
uniform vec3 u_noiseTextureDimensions;
uniform float u_noiseDetail;
varying vec2 v_offset;
@@ -14280,7 +14267,7 @@
#endif
#endif
}
`,bDe=`#ifdef INSTANCED
`,ADe=`#ifdef INSTANCED
attribute vec2 direction;
#endif
attribute vec4 positionHighAndScaleX;
@@ -14320,7 +14307,7 @@
v_slice = slice;
v_brightness = brightness;
}
`,QDe=`uniform vec3 u_noiseTextureDimensions;
`,hDe=`uniform vec3 u_noiseTextureDimensions;
uniform float u_noiseDetail;
uniform vec3 u_noiseOffset;
varying vec2 v_position;
@@ -14396,7 +14383,7 @@
float worley2 = clamp(worleyFBMNoise(position, 3.0, 3.0), 0.0, 1.0);
gl_FragColor = vec4(worley0, worley1, worley2, 1.0);
}
`,SDe=`uniform vec3 u_noiseTextureDimensions;
`,dDe=`uniform vec3 u_noiseTextureDimensions;
attribute vec2 position;
varying vec2 v_position;
void main()
@@ -14411,7 +14398,7 @@
transformedPos.y *= noiseTextureRows;
v_position = transformedPos;
}
`,Eat=`uniform float u_radiusTS;
`,jot=`uniform float u_radiusTS;
varying vec2 v_textureCoordinates;
vec2 rotate(vec2 p, vec2 direction)
{
@@ -14443,7 +14430,7 @@
color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;
gl_FragColor = clamp(color, vec4(0.0), vec4(1.0));
}
`,DDe=`varying vec2 v_textureCoordinates;
`,fDe=`varying vec2 v_textureCoordinates;
void main()
{
czm_materialInput materialInput;
@@ -14454,34 +14441,20 @@
czm_material material = czm_getMaterial(materialInput);
gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);
}
`;function Pbi(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,Ui.throwInstantiationError()}var Iat=Pbi,TDe={};TDe.createCheckbox=function(o,A,f){let m=document.createElement("div"),C=document.createElement("label"),y=document.createElement("input");y.type="checkbox";let x=`checked: ${A}`;return O(f)&&(x+=`, enable: ${f}`),y.setAttribute("data-bind",x),C.appendChild(y),C.appendChild(document.createTextNode(o)),m.appendChild(C),m};TDe.createSection=function(o,A,f,m){let C=document.createElement("div");C.className="cesium-cesiumInspector-section",C.setAttribute("data-bind",`css: { "cesium-cesiumInspector-section-collapsed": !${f} }`),o.appendChild(C);let y=document.createElement("h3");y.className="cesium-cesiumInspector-sectionHeader",y.appendChild(document.createTextNode(A)),y.setAttribute("data-bind",`click: ${m}`),C.appendChild(y);let x=document.createElement("div");return x.className="cesium-cesiumInspector-sectionContent",C.appendChild(x),x};var K8=TDe,Rbi=15;function AH(o){this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;let A=o.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};let f=this,m=Ae(o.ellipsoid,Di.WGS84);this._readyPromise=Promise.resolve(o.url).then(function(C){let y=An.createIfNeeded(C);return y.appendForwardSlash(),O(A)&&(y=y.getDerivedResource({queryParameters:{token:A}})),f._resource=y,y.getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()}).then(function(C){let y=C.copyrightText;O(y)&&(f._credit=new tl(y));let x=C.spatialReference,v=Ae(x.latestWkid,x.wkid),E=C.extent,I={ellipsoid:m};if(v===4326)I.rectangle=Si.fromDegrees(E.xmin,E.ymin,E.xmax,E.ymax),f._tilingScheme=new af(I);else if(v===3857){let Q=Math.PI*m.maximumRadius;C.extent.xmax>Q&&(C.extent.xmax=Q),C.extent.ymax>Q&&(C.extent.ymax=Q),C.extent.xmin<-Q&&(C.extent.xmin=-Q),C.extent.ymin<-Q&&(C.extent.ymin=-Q),I.rectangleSouthwestInMeters=new It(E.xmin,E.ymin),I.rectangleNortheastInMeters=new It(E.xmax,E.ymax),f._tilingScheme=new Am(I)}else return Promise.reject(new nr("Invalid spatial reference"));let w=C.tileInfo;return O(w)?(f._width=w.rows+1,f._height=w.cols+1,f._encoding=w.format==="LERC"?HF.LERC:HF.NONE,f._lodCount=w.lods.length-1,(f._hasAvailability=C.capabilities.indexOf("Tilemap")!==-1)&&(f._tilesAvailable=new ZL(f._tilingScheme,f._lodCount),f._tilesAvailable.addAvailableTileRange(0,0,0,f._tilingScheme.getNumberOfXTilesAtLevel(0),f._tilingScheme.getNumberOfYTilesAtLevel(0)),f._tilesAvailablityLoaded=new ZL(f._tilingScheme,f._lodCount)),f._levelZeroMaximumGeometricError=Cx.getEstimatedLevelZeroGeometricErrorForAHeightmap(f._tilingScheme.ellipsoid,f._width,f._tilingScheme.getNumberOfXTilesAtLevel(0)),C.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),O(C.minValues)&&O(C.maxValues)?f._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:C.minValues[0],highestEncodedHeight:C.maxValues[0]}:f._terrainDataStructure={elementMultiplier:1},f._ready=!0,!0):Promise.reject(new nr("tileInfo is required"))}).catch(function(C){let y=`An error occurred while accessing ${f._resource.url}.`;return wc.reportError(void 0,f,f._errorEvent,y),Promise.reject(C)}),this._errorEvent=new br}Object.defineProperties(AH.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){return this._tilesAvailable}}});AH.prototype.requestTileGeometry=function(o,A,f,m){let C=this._resource.getDerivedResource({url:`tile/${f}/${A}/${o}`,request:m}),y=this._hasAvailability,x=Promise.resolve(!0),v;if(y&&!O(MDe(this,f+1,o*2,A*2))){let Q=_at(this,f+1,o*2,A*2);x=Q.promise,v=Q.request}let E=C.fetchArrayBuffer();if(!O(E)||!O(x))return;let I=this,w=this._tilesAvailable;return Promise.all([E,x]).then(function(Q){return new wQ({buffer:Q[0],width:I._width,height:I._height,childTileMask:y?w.computeChildMaskForTile(f,o,A):Rbi,structure:I._terrainDataStructure,encoding:I._encoding})}).catch(function(Q){return O(v)&&v.state===yA.CANCELLED?(m.cancel(),m.deferred.promise.finally(function(){return m.state=yA.CANCELLED,Promise.reject(Q)})):Promise.reject(Q)})};function MDe(o,A,f,m){if(!o._hasAvailability)return;let C=o._tilesAvailablityLoaded,y=o._tilesAvailable;if(A>o._lodCount)return!1;if(y.isTileAvailable(A,f,m))return!0;if(C.isTileAvailable(A,f,m))return!1}AH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};AH.prototype.getTileDataAvailable=function(o,A,f){if(!this._hasAvailability)return;let m=MDe(this,f,o,A);if(O(m))return m;_at(this,f,o,A)};AH.prototype.loadTileDataAvailability=function(o,A,f){};function Lbi(o,A,f,m){let C=A-1,y=f-1,x=m[o.y*A+o.x],v=[],E={startX:o.x,startY:o.y,endX:0,endY:0},I=new It(o.x+1,o.y+1),w=!1,Q=!1;for(;!(w&&Q);){let M=I.x,B=Q?I.y+1:I.y;if(!w){for(let T=o.y;T<B;++T)if(m[T*A+I.x]!==x){w=!0;break}w?(v.push(new It(I.x,o.y)),--I.x,--M,E.endX=I.x):I.x===C?(E.endX=I.x,w=!0):++I.x}if(!Q){let T=I.y*A;for(let D=o.x;D<=M;++D)if(m[T+D]!==x){Q=!0;break}Q?(v.push(new It(o.x,I.y)),--I.y,E.endY=I.y):I.y===y?(E.endY=I.y,Q=!0):++I.y}}return{endingIndices:v,range:E,value:x}}function Fbi(o,A,f,m,C){let y=[];if(C.every(function(v){return v===C[0]}))return C[0]===1&&y.push({startX:o,startY:A,endX:o+f-1,endY:A+m-1}),y;let x=[new It(0,0)];for(;x.length>0;){let v=x.pop(),E=Lbi(v,f,m,C);if(E.value===1){let w=E.range;w.startX+=o,w.endX+=o,w.startY+=A,w.endY+=A,y.push(w)}let I=E.endingIndices;I.length>0&&(x=x.concat(I))}return y}function _at(o,A,f,m){if(!o._hasAvailability)return{};let C=Math.floor(f/128)*128,y=Math.floor(m/128)*128,x=Math.min(1<<A,128),v=`tilemap/${A}/${y}/${C}/${x}/${x}`,E=o._availableCache;if(O(E[v]))return E[v];let I=new cC({throttle:!1,throttleByServer:!0,type:oB.TERRAIN}),w=o._resource.getDerivedResource({url:v,request:I}).fetchJson();return O(w)?(w=w.then(function(Q){let M=Fbi(C,y,x,x,Q.data);o._tilesAvailablityLoaded.addAvailableTileRange(A,C,y,C+x,y+x);let B=o._tilesAvailable;for(let T=0;T<M.length;++T){let D=M[T];B.addAvailableTileRange(A,D.startX,D.startY,D.endX,D.endY)}return MDe(o,A,f,m)}),E[v]={promise:w,request:I},w=w.finally(function(Q){return delete E[v],Q}),{promise:w,request:I}):{}}var Bat=AH,mie={};mie.defaultKey=void 0;mie.getKey=function(o){return O(o)?o:mie.defaultKey};var wat=mie,bat="https://dev.virtualearth.net/REST/v1/Locations";function PDe(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.key;this._key=A;let f={key:A};O(o.culture)&&(f.culture=o.culture),this._resource=new An({url:bat,queryParameters:f})}Object.defineProperties(PDe.prototype,{url:{get:function(){return bat}},key:{get:function(){return this._key}}});PDe.prototype.geocode=function(o){return this._resource.getDerivedResource({queryParameters:{query:o}}).fetchJsonp("jsonp").then(function(A){return A.resourceSets.length===0?[]:A.resourceSets[0].resources.map(function(f){let m=f.bbox,C=m[0],y=m[1],x=m[2],v=m[3];return{displayName:f.name,destination:Si.fromDegrees(y,C,v,x)}})})};var Qat=PDe,Nbi=new ai,e7e=new ee,KU=new ee;function kbi(o){let A=o.points,f=o.times;if(A.length<3){let m=f[0],C=1/(f[1]-m),y=A[0],x=A[1];return function(v,E){O(E)||(E=new ee);let I=(v-m)*C;return ee.lerp(y,x,I,E)}}return function(m,C){O(C)||(C=new ee);let y=o._lastTimeIndex=o.findTimeInterval(m,o._lastTimeIndex),x=(m-f[y])/(f[y+1]-f[y]),v=Nbi;v.z=x,v.y=x*x,v.x=v.y*x,v.w=1;let E,I,w,Q,M;return y===0?(E=A[0],I=A[1],w=o.firstTangent,Q=ee.subtract(A[2],E,e7e),ee.multiplyByScalar(Q,.5,Q),M=Xe.multiplyByVector(DK.hermiteCoefficientMatrix,v,v)):y===A.length-2?(E=A[y],I=A[y+1],Q=o.lastTangent,w=ee.subtract(I,A[y-1],e7e),ee.multiplyByScalar(w,.5,w),M=Xe.multiplyByVector(DK.hermiteCoefficientMatrix,v,v)):(E=A[y-1],I=A[y],w=A[y+1],Q=A[y+2],M=Xe.multiplyByVector(xN.catmullRomCoefficientMatrix,v,v)),C=ee.multiplyByScalar(E,M.x,C),ee.multiplyByScalar(I,M.y,KU),ee.add(C,KU,C),ee.multiplyByScalar(w,M.z,KU),ee.add(C,KU,C),ee.multiplyByScalar(Q,M.w,KU),ee.add(C,KU,C)}}var Obi=new ee,Ubi=new ee;function xN(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.points,f=o.times,m=o.firstTangent,C=o.lastTangent;if(A.length>2&&(O(m)||(m=Obi,ee.multiplyByScalar(A[1],2,m),ee.subtract(m,A[2],m),ee.subtract(m,A[0],m),ee.multiplyByScalar(m,.5,m)),!O(C))){let y=A.length-1;C=Ubi,ee.multiplyByScalar(A[y-1],2,C),ee.subtract(A[y],C,C),ee.add(C,A[y-2],C),ee.multiplyByScalar(C,.5,C)}this._times=f,this._points=A,this._firstTangent=ee.clone(m),this._lastTangent=ee.clone(C),this._evaluateFunction=kbi(this),this._lastTimeIndex=0}Object.defineProperties(xN.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}});xN.catmullRomCoefficientMatrix=new Xe(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);xN.prototype.findTimeInterval=uf.prototype.findTimeInterval;xN.prototype.wrapTime=uf.prototype.wrapTime;xN.prototype.clampTime=uf.prototype.clampTime;xN.prototype.evaluate=function(o,A){return this._evaluateFunction(o,A)};var Sat=xN;function WM(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.radius,f={center:o.center,semiMajorAxis:A,semiMinorAxis:A,ellipsoid:o.ellipsoid,height:o.height,extrudedHeight:o.extrudedHeight,granularity:o.granularity,vertexFormat:o.vertexFormat,stRotation:o.stRotation,shadowVolume:o.shadowVolume};this._ellipseGeometry=new W1(f),this._workerName="createCircleGeometry"}WM.packedLength=W1.packedLength;WM.pack=function(o,A,f){return W1.pack(o._ellipseGeometry,A,f)};var Gbi=new W1({center:new ee,semiMajorAxis:1,semiMinorAxis:1}),ix={center:new ee,radius:void 0,ellipsoid:Di.clone(Di.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Wr,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};WM.unpack=function(o,A,f){let m=W1.unpack(o,A,Gbi);return ix.center=ee.clone(m._center,ix.center),ix.ellipsoid=Di.clone(m._ellipsoid,ix.ellipsoid),ix.height=m._height,ix.extrudedHeight=m._extrudedHeight,ix.granularity=m._granularity,ix.vertexFormat=Wr.clone(m._vertexFormat,ix.vertexFormat),ix.stRotation=m._stRotation,ix.shadowVolume=m._shadowVolume,O(f)?(ix.semiMajorAxis=m._semiMajorAxis,ix.semiMinorAxis=m._semiMinorAxis,f._ellipseGeometry=new W1(ix),f):(ix.radius=m._semiMajorAxis,new WM(ix))};WM.createGeometry=function(o){return W1.createGeometry(o._ellipseGeometry)};WM.createShadowVolume=function(o,A,f){let m=o._ellipseGeometry._granularity,C=o._ellipseGeometry._ellipsoid,y=A(m,C),x=f(m,C);return new WM({center:o._ellipseGeometry._center,radius:o._ellipseGeometry._semiMajorAxis,ellipsoid:C,stRotation:o._ellipseGeometry._stRotation,granularity:m,extrudedHeight:y,height:x,vertexFormat:Wr.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(WM.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var Dat=WM;function Y8(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.radius,f={center:o.center,semiMajorAxis:A,semiMinorAxis:A,ellipsoid:o.ellipsoid,height:o.height,extrudedHeight:o.extrudedHeight,granularity:o.granularity,numberOfVerticalLines:o.numberOfVerticalLines};this._ellipseGeometry=new UD(f),this._workerName="createCircleOutlineGeometry"}Y8.packedLength=UD.packedLength;Y8.pack=function(o,A,f){return UD.pack(o._ellipseGeometry,A,f)};var Hbi=new UD({center:new ee,semiMajorAxis:1,semiMinorAxis:1}),B_={center:new ee,radius:void 0,ellipsoid:Di.clone(Di.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};Y8.unpack=function(o,A,f){let m=UD.unpack(o,A,Hbi);return B_.center=ee.clone(m._center,B_.center),B_.ellipsoid=Di.clone(m._ellipsoid,B_.ellipsoid),B_.height=m._height,B_.extrudedHeight=m._extrudedHeight,B_.granularity=m._granularity,B_.numberOfVerticalLines=m._numberOfVerticalLines,O(f)?(B_.semiMajorAxis=m._semiMajorAxis,B_.semiMinorAxis=m._semiMinorAxis,f._ellipseGeometry=new UD(B_),f):(B_.radius=m._semiMajorAxis,new Y8(B_))};Y8.createGeometry=function(o){return UD.createGeometry(o._ellipseGeometry)};var Tat=Y8;function hH(o){o=Ae(o,Ae.EMPTY_OBJECT),this._callback=o.callback,this._tilingScheme=o.tilingScheme,O(this._tilingScheme)||(this._tilingScheme=new af({ellipsoid:Ae(o.ellipsoid,Di.WGS84)})),this._width=o.width,this._height=o.height;let A=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=Cx.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,A,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new br;let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._readyPromise=Promise.resolve(!0)}Object.defineProperties(hH.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});hH.prototype.requestTileGeometry=function(o,A,f,m){let C=this._callback(o,A,f);if(!O(C))return;let y=this._width,x=this._height;return Promise.resolve(C).then(function(v){let E=v;return Array.isArray(E)&&(E=new Float64Array(E)),new wQ({buffer:E,width:y,height:x})})};hH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};hH.prototype.getTileDataAvailable=function(o,A,f){};hH.prototype.loadTileDataAvailability=function(o,A,f){};var Mat=hH,Vbi=1953029805,zbi=2917034100;function RDe(o,A){if(RDe.passThroughDataForTesting)return A;let f=o.byteLength;if(f===0||f%4!==0)throw new nr("The length of key must be greater than 0 and a multiple of 4.");let m=new DataView(A),C=m.getUint32(0,!0);if(C===Vbi||C===zbi)return A;let y=new DataView(o),x=0,v=A.byteLength,E=v-v%8,I=f,w,Q=8;for(;x<E;)for(Q=(Q+8)%24,w=Q;x<E&&w<I;)m.setUint32(x,m.getUint32(x,!0)^y.getUint32(w,!0),!0),m.setUint32(x+4,m.getUint32(x+4,!0)^y.getUint32(w+4,!0),!0),x+=8,w+=24;if(x<v)for(w>=I&&(Q=(Q+8)%24,w=Q);x<v;)m.setUint8(x,m.getUint8(x)^y.getUint8(w)),x++,w++}RDe.passThroughDataForTesting=!1;var LDe=RDe;function oQ(o){this._comparator=o.comparator,this._maximumLength=o.maximumLength,this._array=O(o.maximumLength)?new Array(o.maximumLength):[],this._length=0}Object.defineProperties(oQ.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(o){if(O(o)){for(;this._length>o;)this.removeMinimum();this._array.length=o}this._maximumLength=o}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}});oQ.prototype.clone=function(){let o=this._maximumLength,A=this._comparator,f=this._array,m=this._length,C=new oQ({comparator:A,maximumLength:o});C._length=m;for(let y=0;y<m;y++)C._array[y]=f[y];return C};oQ.prototype.reset=function(){this._length=0;let o=this._maximumLength;if(O(o))for(let A=0;A<o;A++)this._array[A]=void 0;else this._array.length=0};oQ.prototype.resort=function(){let o=this._length;for(let A=0;A<o;A++)Pat(this,A)};oQ.prototype.insert=function(o){let A,f=this._maximumLength;if(O(f)){if(f===0)return;if(this._length===f){let C=this._array[0];if(this._comparator(o,C)<=0)return o;A=this.removeMinimum()}}let m=this._length;return this._array[m]=o,this._length++,Pat(this,m),A};oQ.prototype.removeMinimum=function(){let o=this._length;if(o===0)return;this._length--;let A=this._array[0];return o>=2&&(this._array[0]=this._array[o-1],Rat(this,0)),this._array[o-1]=void 0,A};oQ.prototype.removeMaximum=function(){let o=this._length;if(o===0)return;this._length--;let A;if(o<=2)A=this._array[o-1];else{let f=FDe(this,1,2)?1:2;A=this._array[f],this._array[f]=this._array[o-1],o>=4&&Rat(this,f)}return this._array[o-1]=void 0,A};oQ.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};oQ.prototype.getMaximum=function(){let o=this._length;if(o!==0)return o<=2?this._array[o-1]:this._array[FDe(this,1,2)?1:2]};function Cie(o,A,f){let m=o._array,C=m[A];m[A]=m[f],m[f]=C}function F7(o,A,f){return o._comparator(o._array[A],o._array[f])<0}function FDe(o,A,f){return o._comparator(o._array[A],o._array[f])>0}function Pat(o,A){if(A===0)return;let f=Math.floor(je.log2(A+1))%2===0,m=Math.floor((A-1)/2),C=F7(o,A,m);for(C!==f&&(Cie(o,A,m),A=m);A>=3;){let y=Math.floor((A-3)/4);if(F7(o,A,y)!==C)break;Cie(o,A,y),A=y}}function Rat(o,A){let f=o._length,m=Math.floor(je.log2(A+1))%2===0,C;for(;(C=2*A+1)<f;){let y=C,x=C+1;if(x<f){F7(o,x,y)===m&&(y=x);let v=2*C+1,E=Math.max(Math.min(f-v,4),0);for(let I=0;I<E;I++){let w=v+I;F7(o,w,y)===m&&(y=w)}}if(F7(o,y,A)===m&&(Cie(o,y,A),y!==C&&y!==x)){let v=Math.floor((y-1)/2);FDe(o,y,v)===m&&Cie(o,y,v)}A=y}}var Lat=oQ;function Fat(){}Fat.prototype.geocode=Ui.throwInstantiationError;var Nat=Fat;function kat(){Ui.throwInstantiationError()}kat.createGeometry=function(o){Ui.throwInstantiationError()};var Oat=kat,Kbi=Eh(T7e(),1);function Ybi(o,A){return(o&A)!==0}var q_=Ybi,Jbi=[1,2,4,8],Uat=15,Wbi=16,jbi=64,qbi=128;function JD(o,A,f,m,C,y){this._bits=o,this.cnodeVersion=A,this.imageryVersion=f,this.terrainVersion=m,this.imageryProvider=C,this.terrainProvider=y,this.ancestorHasTerrain=!1,this.terrainState=void 0}JD.clone=function(o,A){return O(A)?(A._bits=o._bits,A.cnodeVersion=o.cnodeVersion,A.imageryVersion=o.imageryVersion,A.terrainVersion=o.terrainVersion,A.imageryProvider=o.imageryProvider,A.terrainProvider=o.terrainProvider):A=new JD(o._bits,o.cnodeVersion,o.imageryVersion,o.terrainVersion,o.imageryProvider,o.terrainProvider),A.ancestorHasTerrain=o.ancestorHasTerrain,A.terrainState=o.terrainState,A};JD.prototype.setParent=function(o){this.ancestorHasTerrain=o.ancestorHasTerrain||this.hasTerrain()};JD.prototype.hasSubtree=function(){return q_(this._bits,Wbi)};JD.prototype.hasImagery=function(){return q_(this._bits,jbi)};JD.prototype.hasTerrain=function(){return q_(this._bits,qbi)};JD.prototype.hasChildren=function(){return q_(this._bits,Uat)};JD.prototype.hasChild=function(o){return q_(this._bits,Jbi[o])};JD.prototype.getChildBitmask=function(){return this._bits&Uat};var NDe=JD;function Xbi(o){let A=o.length,f=new ArrayBuffer(A),m=new Uint8Array(f);for(let C=0;C<A;++C)m[C]=o.charCodeAt(C);return f}var Zbi=Xbi(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y
wmi\xD6\xF0\x9Ck\x93\xA1\xBDNu\xE0A[\xDF@V\f\xD9\xBBr\x9B\x81|3S\xEEOl\xD4q\xB0{\xC0\x7FEVZ\xADwUe\v3\x92*\xACl5\xC50s\xF83>mF8J\xB4\xDD\xF0.\xDDu\xDA\x8CDt"\xFAa"\f3"So\xAF9D\v\x8C9\xD99L\xB9\xBF\x7F\xAB\\\x8CP_\x9F"ux\xE9\x07q\x91h;\xC1\xC4\x9B\x7F\xF0<VqH\x82'UfYNe\x98u\xA3aF}a?A\0\x9F\xD7\xB44M\xCE\x87F\xB0\xD5\xB8\x8A'{\x8B\xDC+\xBBMg0\xC8\xD1\xF6\\\x8FP\xFA[/F\x9Bn5/'C.\xEB
\f^\xA5s\x1Be4\xE5l.jC'c#U\xA9?q{gC}:\xAF\xCD\xE2TU\x9C\xFDK\xC6\xE2\x9F/(\xED\xCB\\\xC6-f\x07\x88\xA7;/*"N\xB0k.\xDD\r\x95}}G\xBAC\xB2\xB2+>M\xAA>}\xE6\xCEI\x89\xC6\xE6x\fa1-\xA4O\xA5~q \x88\xEC\r1\xE8N\v\0nPh}=\b\r\x95\xA6n\xA3h\x97$[k\xF3#\xF3\xB6s\xB3\r\v@\xC0\x9F\xD8Q]\xFA".j\xDFI\0\xB9\xA0wU\xC6\xEFj\xBF{GL\x7F\x83\xEE\xDC\xDCF\x85\xA9\xADS\x07+S4\x07\xFF\x94Y\xE48\xE81\x83N\xB9XFk\xCB-#\x86\x92p\x005\x88"\xCF1\xB2&/\xE7\xC3u-6,rt\xB0#G\xB7\xD3\xD1&\x857r\xE2\0\x8CD\xCF\xDA3-\xDE\`\x86i#i*|\xCDKQ\r\x95T9w.)\xEA\x1B\xA6P\xA2j\x8FoP\x99\\>T\xFB\xEFP[\v\x07E\x89m(w7\xDB\x8EJfJo\x99 \xE5p\xE2\xB9q~\fmI-z\xFEr\xC7\xF2Y0\x8F\xBB]s\xE5\xC9 \xEAx\xEC \x90\xF0\x8A\x7FB|G\`\xB0\xBD&\xB7q\xB6\xC7\x9F\xD13\x82=\xD3\xAB\xEEc\x99\xC8+S\xA0D\\q\xC6\xCCD2O<\xCA\xC0)=R\xD3aX\xA9}e\xB4\xDC\xCF\r\xF4=\xF1\b\xA9B\xDA#   \xD8\xBF^PI\xF8M\xC0\xCBGLO\xF7{+\xD8\xC51\x92;\xB5o\xDCl\r\x92\x88\xD1\x9E\xDB?\xE2\xE9\xDA_\xD4\x84\xE2FaZ\xDEU\xCF\xA4\0\xBE\xFD\xCEg\xF1Ji\x97\xE6 H\xD8]\x7F~\xAEq N\xAE\xC0V\xA9\x91<\x82r\xE7v\xEC)I\xD6]-\x83\xE3\xDB6\xA9;f\x97\x87j\xD5\xB6=P^R\xB9K\xC7sWx\xC9\xF4.Y\x07\x95\x93o\xD0KW>''\xC7\`\xDB;\xED\x9ASD>?\x8D\x92mw\xA2
\xEB?R\xA8\xC6U^1I7\x85\xF4\xC5&-\xA9\xBF\x8B'T\xDA\xC3j \xE5*x\xB0\xD6\x90pr\xAA\x8Bh\xBD\x88\xF7_H\xB1~\xC0XL?f\xF9>\xE1e\xC0p\xA7\xCF8i\xAF\xF0VldI\x9C'\xADxtO\xC2\x87\xDEV9\0\xDAw\v\xCB-\x1B\x89\xFB5O\xF5\bQ\`\xC1
ZGM&30x\xDA\xC0\x9CFG\xE2[y\`In7gS
>\xE9\xECF9\xB2\xF14\r\xC6\x84Sun\xE1\fY\xD9\xDE)\x85{II\xA5wy\xBEIV.6\xE7\v:\xBBOb{\xD2M1\x95/\xBD8{\xA8O!\xE1\xECFpv\x95})"x\x88
\x90\xDD\x9D\\\xDA\xDEQ\xCF\xF0\xFCYRe|3\xDF\xF3H\xDA\xBB*u\xDB\`\xB2\xD4\xFC\xED\x1B\xEC\x7F5\xA8\xFF(1\x07-\xC8\xDC\x88F|\x8A["`);function aQ(o){let A=o;typeof A!="string"&&!(A instanceof An)&&(A=o.url);let f=An.createIfNeeded(A);f.appendForwardSlash(),this._resource=f,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=je.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};let m=this;this._readyPromise=$bi(this).then(function(){return m.getQuadTreePacket("",m._quadPacketVersion)}).then(function(){return!0}).catch(function(C){let y=`An error occurred while accessing ${Hat(m,"",1).url}.`;return Promise.reject(new nr(y))})}Object.defineProperties(aQ.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}},readyPromise:{get:function(){return this._readyPromise}}});aQ.tileXYToQuadKey=function(o,A,f){let m="";for(let C=f;C>=0;--C){let y=1<<C,x=0;q_(A,y)?q_(o,y)&&(x|=1):(x|=2,q_(o,y)||(x|=1)),m+=x}return m};aQ.quadKeyToTileXY=function(o){let A=0,f=0,m=o.length-1;for(let C=m;C>=0;--C){let y=1<<C,x=+o[m-C];q_(x,2)?q_(x,1)||(A|=y):(f|=y,q_(x,1)&&(A|=y))}return{x:A,y:f,level:m}};aQ.prototype.isValid=function(o){let A=this.getTileInformationFromQuadKey(o);if(O(A))return A!==null;let f=!0,m=o,C;for(;m.length>1;)if(C=m.substring(m.length-1),m=m.substring(0,m.length-1),A=this.getTileInformationFromQuadKey(m),O(A)){!A.hasSubtree()&&!A.hasChild(parseInt(C))&&(f=!1);break}else if(A===null){f=!1;break}return f};var Gat=new Vf("decodeGoogleEarthEnterprisePacket");aQ.prototype.getQuadTreePacket=function(o,A,f){A=Ae(A,1),o=Ae(o,"");let m=Hat(this,o,A,f).fetchArrayBuffer();if(!O(m))return;let C=this._tileInfo,y=this.key;return m.then(function(x){return Gat.scheduleTask({buffer:x,quadKey:o,type:"Metadata",key:y},[x]).then(function(v){let E,I=-1;if(o!==""){I=o.length+1;let M=v[o];E=C[o],E._bits|=M._bits,delete v[o]}let w=Object.keys(v);w.sort(function(M,B){return M.length-B.length});let Q=w.length;for(let M=0;M<Q;++M){let B=w[M];if(v[B]!==null){let T=NDe.clone(v[B]),D=B.length;if(D===I)T.setParent(E);else if(D>1){let F=C[B.substring(0,B.length-1)];T.setParent(F)}C[B]=T}else C[B]=null}})})};aQ.prototype.populateSubtree=function(o,A,f,m){let C=aQ.tileXYToQuadKey(o,A,f);return TCe(this,C,m)};function TCe(o,A,f){let m=o._tileInfo,C=A,y=m[C];if(O(y)&&(!y.hasSubtree()||y.hasChildren()))return y;for(;y===void 0&&C.length>1;)C=C.substring(0,C.length-1),y=m[C];let x,v=o._subtreePromises,E=v[C];if(O(E))return E.then(function(){return x=new cC({throttle:f.throttle,throttleByServer:f.throttleByServer,type:f.type,priorityFunction:f.priorityFunction}),TCe(o,A,x)});if(!O(y)||!y.hasSubtree())return Promise.reject(new nr(`Couldn't load metadata for tile ${A}`));if(E=o.getQuadTreePacket(C,y.cnodeVersion,f),!!O(E))return v[C]=E,E.then(function(){return x=new cC({throttle:f.throttle,throttleByServer:f.throttleByServer,type:f.type,priorityFunction:f.priorityFunction}),TCe(o,A,x)}).finally(function(){delete v[C]})}aQ.prototype.getTileInformation=function(o,A,f){let m=aQ.tileXYToQuadKey(o,A,f);return this._tileInfo[m]};aQ.prototype.getTileInformationFromQuadKey=function(o){return this._tileInfo[o]};function Hat(o,A,f,m){return o._resource.getDerivedResource({url:`flatfile?q2-0${A}-q.${f.toString()}`,request:m})}var tpe,ipe;function $bi(o){let A=o._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!O(ipe)){let f=xs("ThirdParty/google-earth-dbroot-parser.js"),m=window.cesiumGoogleEarthDbRootParser;ipe=Uie(f).then(function(){tpe=window.cesiumGoogleEarthDbRootParser(Kbi),O(m)?window.cesiumGoogleEarthDbRootParser=m:delete window.cesiumGoogleEarthDbRootParser})}return ipe.then(function(){return A.fetchArrayBuffer()}).then(function(f){let m=tpe.EncryptedDbRootProto.decode(new Uint8Array(f)),C=m.encryptionData,y=C.byteOffset,x=y+C.byteLength,v=o.key=C.buffer.slice(y,x);C=m.dbrootData,y=C.byteOffset,x=y+C.byteLength;let E=C.buffer.slice(y,x);return Gat.scheduleTask({buffer:E,type:"DbRoot",key:v},[E])}).then(function(f){let m=tpe.DbRootProto.decode(new Uint8Array(f.buffer));if(o.imageryPresent=Ae(m.imageryPresent,o.imageryPresent),o.protoImagery=m.protoImagery,o.terrainPresent=Ae(m.terrainPresent,o.terrainPresent),O(m.endSnippet)&&O(m.endSnippet.model)){let v=m.endSnippet.model;o.negativeAltitudeExponentBias=Ae(v.negativeAltitudeExponentBias,o.negativeAltitudeExponentBias),o.negativeAltitudeThreshold=Ae(v.compressedNegativeAltitudeThreshold,o.negativeAltitudeThreshold)}O(m.databaseVersion)&&(o._quadPacketVersion=Ae(m.databaseVersion.quadtreeVersion,o._quadPacketVersion));let C=o.providers,y=Ae(m.providerInfo,[]),x=y.length;for(let v=0;v<x;++v){let E=y[v],I=E.copyrightString;O(I)&&(C[E.providerId]=new tl(I.value))}}).catch(function(){console.log(`Failed to retrieve ${A.url}. Using defaults.`),o.key=Zbi})}var vN=aQ;function wO(o){o=Ae(o,Ae.EMPTY_OBJECT),this._buffer=o.buffer,this._credits=o.credits,this._negativeAltitudeExponentBias=o.negativeAltitudeExponentBias,this._negativeElevationThreshold=o.negativeElevationThreshold;let A=Ae(o.childTileMask,15),f=A&3;f|=A&4?8:0,f|=A&8?4:0,this._childTileMask=f,this._createdByUpsampling=Ae(o.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}Object.defineProperties(wO.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var Vat="createVerticesFromGoogleEarthEnterpriseBuffer",eQi=new Vf(Vat),tQi=new Vf(Vat,AO.maximumAsynchronousTasks),t7e=new Si,rpe=new Si;wO.prototype.createMesh=function(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.tilingScheme,f=o.x,m=o.y,C=o.level,y=Ae(o.exaggeration,1),x=Ae(o.exaggerationRelativeHeight,0),v=Ae(o.throttle,!0),E=A.ellipsoid;A.tileXYToNativeRectangle(f,m,C,t7e),A.tileXYToRectangle(f,m,C,rpe);let I=E.cartographicToCartesian(Si.center(rpe)),w=40075.16/(1<<C);this._skirtHeight=Math.min(w*8,1e3);let Q=(v?tQi:eQi).scheduleTask({buffer:this._buffer,nativeRectangle:t7e,rectangle:rpe,relativeToCenter:I,ellipsoid:E,skirtHeight:this._skirtHeight,exaggeration:y,exaggerationRelativeHeight:x,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(!O(Q))return;let M=this;return Q.then(function(B){return M._mesh=new hO(I,new Float32Array(B.vertices),new Uint16Array(B.indices),B.indexCountWithoutSkirts,B.vertexCountWithoutSkirts,B.minimumHeight,B.maximumHeight,wi.clone(B.boundingSphere3D),ee.clone(B.occludeePointInScaledSpace),B.numberOfAttributes,Hf.clone(B.orientedBoundingBox),HM.clone(B.encoding),B.westIndicesSouthToNorth,B.southIndicesEastToWest,B.eastIndicesNorthToSouth,B.northIndicesWestToEast),M._minimumHeight=B.minimumHeight,M._maximumHeight=B.maximumHeight,M._buffer=void 0,M._mesh})};wO.prototype.interpolateHeight=function(o,A,f){let m=je.clamp((A-o.west)/o.width,0,1),C=je.clamp((f-o.south)/o.height,0,1);return O(this._mesh)?aQi(this,m,C):uQi(this,m,C,o)};var iQi=new Vf("upsampleQuantizedTerrainMesh",AO.maximumAsynchronousTasks);wO.prototype.upsample=function(o,A,f,m,C,y,x){let v=this._mesh;if(!O(this._mesh))return;let E=A*2!==C,I=f*2===y,w=o.ellipsoid,Q=o.tileXYToRectangle(C,y,x),M=iQi.scheduleTask({vertices:v.vertices,indices:v.indices,indexCountWithoutSkirts:v.indexCountWithoutSkirts,vertexCountWithoutSkirts:v.vertexCountWithoutSkirts,encoding:v.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:E,isNorthChild:I,childRectangle:Q,ellipsoid:w});if(!O(M))return;let B=this;return M.then(function(T){let D=new Uint16Array(T.vertices),F=Nn.createTypedArray(D.length/3,T.indices),L=B._skirtHeight;return new doe({quantizedVertices:D,indices:F,minimumHeight:T.minimumHeight,maximumHeight:T.maximumHeight,boundingSphere:wi.clone(T.boundingSphere),orientedBoundingBox:Hf.clone(T.orientedBoundingBox),horizonOcclusionPoint:ee.clone(T.horizonOcclusionPoint),westIndices:T.westIndices,southIndices:T.southIndices,eastIndices:T.eastIndices,northIndices:T.northIndices,westSkirtHeight:L,southSkirtHeight:L,eastSkirtHeight:L,northSkirtHeight:L,childTileMask:0,createdByUpsampling:!0,credits:B._credits})})};wO.prototype.isChildAvailable=function(o,A,f,m){let C=2;return f!==o*2&&++C,m!==A*2&&(C-=2),(this._childTileMask&1<<C)!==0};wO.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var rQi=new It,nQi=new It,oQi=new It,zat=new ee;function aQi(o,A,f){let m=o._mesh,C=m.vertices,y=m.encoding,x=m.indices;for(let v=0,E=x.length;v<E;v+=3){let I=x[v],w=x[v+1],Q=x[v+2],M=y.decodeTextureCoordinates(C,I,rQi),B=y.decodeTextureCoordinates(C,w,nQi),T=y.decodeTextureCoordinates(C,Q,oQi),D=$6.computeBarycentricCoordinates(A,f,M.x,M.y,B.x,B.y,T.x,T.y,zat);if(D.x>=-1e-15&&D.y>=-1e-15&&D.z>=-1e-15){let F=y.decodeHeight(C,I),L=y.decodeHeight(C,w),R=y.decodeHeight(C,Q);return D.x*F+D.y*L+D.z*R}}}var sQi=Uint16Array.BYTES_PER_ELEMENT,i7e=Uint32Array.BYTES_PER_ELEMENT,npe=Int32Array.BYTES_PER_ELEMENT,lQi=Float32Array.BYTES_PER_ELEMENT,ope=Float64Array.BYTES_PER_ELEMENT;function uQi(o,A,f,m){let C=o._buffer,y=0,x=0,v=0;f>.5?(A>.5?(y=2,x=.5):y=3,v=.5):A>.5&&(y=1,x=.5);let E=new DataView(C),I=0;for(let V=0;V<y;++V)I+=E.getUint32(I,!0),I+=i7e;I+=i7e,I+=2*ope;let w=je.toRadians(E.getFloat64(I,!0)*180);I+=ope;let Q=je.toRadians(E.getFloat64(I,!0)*180);I+=ope;let M=m.width/w/2,B=m.height/Q/2,T=E.getInt32(I,!0);I+=npe;let D=E.getInt32(I,!0)*3;I+=npe,I+=npe;let F=new Array(T),L=new Array(T),R=new Array(T),k;for(k=0;k<T;++k)F[k]=x+E.getUint8(I++)*M,L[k]=v+E.getUint8(I++)*B,R[k]=E.getFloat32(I,!0)*6371010,I+=lQi;let U=new Array(D);for(k=0;k<D;++k)U[k]=E.getUint16(I,!0),I+=sQi;for(k=0;k<D;k+=3){let V=U[k],H=U[k+1],q=U[k+2],ie=F[V],Z=F[H],oe=F[q],ne=L[V],se=L[H],ce=L[q],j=$6.computeBarycentricCoordinates(A,f,ie,ne,Z,se,oe,ce,zat);if(j.x>=-1e-15&&j.y>=-1e-15&&j.z>=-1e-15)return j.x*R[V]+j.y*R[H]+j.z*R[q]}}var yie=wO,I1={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},F$=new fi;function fae(){this._terrainCache={},this._lastTidy=fi.now()}fae.prototype.add=function(o,A){this._terrainCache[o]={buffer:A,timestamp:fi.now()}};fae.prototype.get=function(o){let A=this._terrainCache[o];if(O(A))return delete this._terrainCache[o],A.buffer};fae.prototype.tidy=function(){if(fi.now(F$),fi.secondsDifference(F$,this._lastTidy)>10){let o=this._terrainCache,A=Object.keys(o),f=A.length;for(let m=0;m<f;++m){let C=A[m],y=o[C];fi.secondsDifference(F$,y.timestamp)>10&&delete o[C]}fi.clone(F$,this._lastTidy)}};function dH(o){o=Ae(o,Ae.EMPTY_OBJECT);let A;if(O(o.metadata))A=o.metadata;else{let y=An.createIfNeeded(o.url);A=new vN(y)}this._metadata=A,this._tilingScheme=new af({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Si(-je.PI,-je.PI,je.PI,je.PI),ellipsoid:o.ellipsoid});let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new fae,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new br,this._ready=!1;let m=this,C;this._readyPromise=A.readyPromise.then(function(y){if(!A.terrainPresent){let x=new nr(`The server ${A.url} doesn't have terrain`);return C=wc.reportError(C,m,m._errorEvent,x.message,void 0,void 0,void 0,x),Promise.reject(x)}return wc.reportSuccess(C),m._ready=y,y}).catch(function(y){return C=wc.reportError(C,m,m._errorEvent,y.message,void 0,void 0,void 0,y),Promise.reject(y)})}Object.defineProperties(dH.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var cQi=new Vf("decodeGoogleEarthEnterprisePacket");function r7e(o,A,f){let m=A.getChildBitmask();if(A.terrainState===I1.PARENT){m=0;for(let C=0;C<4;++C){let y=f.getTileInformationFromQuadKey(o+C.toString());O(y)&&y.hasTerrain()&&(m|=1<<C)}}return m}dH.prototype.requestTileGeometry=function(o,A,f,m){let C=vN.tileXYToQuadKey(o,A,f),y=this._terrainCache,x=this._metadata,v=x.getTileInformationFromQuadKey(C);if(!O(v))return Promise.reject(new nr("Terrain tile doesn't exist"));let E=v.terrainState;O(E)||(E=v.terrainState=I1.UNKNOWN);let I=y.get(C);if(O(I)){let L=x.providers[v.terrainProvider];return Promise.resolve(new yie({buffer:I,childTileMask:r7e(C,v,x),credits:O(L)?[L]:void 0,negativeAltitudeExponentBias:x.negativeAltitudeExponentBias,negativeElevationThreshold:x.negativeAltitudeThreshold}))}if(y.tidy(),v.ancestorHasTerrain){if(E===I1.NONE)return Promise.reject(new nr("Terrain tile doesn't exist"))}else return Promise.resolve(new wQ({buffer:new Uint8Array(16*16),width:16,height:16}));let w,Q=C,M=-1;switch(E){case I1.SELF:M=v.terrainVersion;break;case I1.PARENT:Q=Q.substring(0,Q.length-1),w=x.getTileInformationFromQuadKey(Q),M=w.terrainVersion;break;case I1.UNKNOWN:v.hasTerrain()?M=v.terrainVersion:(Q=Q.substring(0,Q.length-1),w=x.getTileInformationFromQuadKey(Q),O(w)&&w.hasTerrain()&&(M=w.terrainVersion));break}if(M<0)return Promise.reject(new nr("Terrain tile doesn't exist"));let B=this._terrainPromises,T=this._terrainRequests,D,F;if(O(B[Q]))D=B[Q],F=T[Q];else{F=m;let L=AQi(this,Q,M,F).fetchArrayBuffer();if(!O(L))return;D=L.then(function(R){return O(R)?cQi.scheduleTask({buffer:R,type:"Terrain",key:x.key},[R]).then(function(k){let U=x.getTileInformationFromQuadKey(Q);U.terrainState=I1.SELF,y.add(Q,k[0]);let V=U.terrainProvider,H=k.length-1;for(let q=0;q<H;++q){let ie=Q+q.toString(),Z=x.getTileInformationFromQuadKey(ie);O(Z)&&(y.add(ie,k[q+1]),Z.terrainState=I1.PARENT,Z.terrainProvider===0&&(Z.terrainProvider=V))}}):Promise.reject(new nr("Failed to load terrain."))}),B[Q]=D,T[Q]=F,D=D.finally(function(){delete B[Q],delete T[Q]})}return D.then(function(){let L=y.get(C);if(O(L)){let R=x.providers[v.terrainProvider];return new yie({buffer:L,childTileMask:r7e(C,v,x),credits:O(R)?[R]:void 0,negativeAltitudeExponentBias:x.negativeAltitudeExponentBias,negativeElevationThreshold:x.negativeAltitudeThreshold})}return Promise.reject(new nr("Failed to load terrain."))}).catch(function(L){return F.state===yA.CANCELLED?(m.state=F.state,Promise.reject(L)):(v.terrainState=I1.NONE,Promise.reject(L))})};dH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};dH.prototype.getTileDataAvailable=function(o,A,f){let m=this._metadata,C=vN.tileXYToQuadKey(o,A,f),y=m.getTileInformation(o,A,f);if(y===null)return!1;if(O(y)){if(!y.ancestorHasTerrain)return!0;let x=y.terrainState;if(x===I1.NONE)return!1;if((!O(x)||x===I1.UNKNOWN)&&(y.terrainState=I1.UNKNOWN,!y.hasTerrain())){C=C.substring(0,C.length-1);let v=m.getTileInformationFromQuadKey(C);if(!O(v)||!v.hasTerrain())return!1}return!0}if(m.isValid(C)){let x=new cC({throttle:!1,throttleByServer:!0,type:oB.TERRAIN});m.populateSubtree(o,A,f,x)}return!1};dH.prototype.loadTileDataAvailability=function(o,A,f){};function AQi(o,A,f,m){return f=O(f)&&f>0?f:1,o._metadata.resource.getDerivedResource({url:`flatfile?f1c-0${A}-t.${f.toString()}`,request:m})}var Kat=dH,nW={};nW.type=void 0;nW.getRequiredDataPoints=Ui.throwInstantiationError;nW.interpolateOrderZero=Ui.throwInstantiationError;nW.interpolate=Ui.throwInstantiationError;var Yat=nW,hQi=new Vf("transcodeCRNToDXT",Number.POSITIVE_INFINITY);function dQi(o){let A;if(o instanceof ArrayBuffer||ArrayBuffer.isView(o)?A=Promise.resolve(o):A=An.createIfNeeded(o).fetchArrayBuffer(),!!O(A))return A.then(function(f){if(!O(f))return;let m=[];return f instanceof ArrayBuffer?m.push(f):(f.byteOffset===0&&f.byteLength===f.buffer.byteLength||(f=f.slice(0,f.length)),m.push(f.buffer)),hQi.scheduleTask(f,m)}).then(function(f){return oY.clone(f)})}var Jat=dQi,$k={};$k.defaultAccessToken=void 0;var n7e=!1,ape,Wat="<b>This application is using Cesium's default Mapbox access token.  Please create a new access token for the application as soon as possible and prior to deployment by visiting <a href=https://www.mapbox.com/account/apps/>https://www.mapbox.com/account/apps/</a>, and provide your token to Cesium by setting the Cesium.MapboxApi.defaultAccessToken property before constructing the CesiumWidget or any other object that uses the Mapbox API.</b>";$k.getAccessToken=function(o){return O(o)?o:O($k.defaultAccessToken)?$k.defaultAccessToken:(n7e||(console.log(Wat),n7e=!0),"pk.eyJ1IjoiYW5hbHl0aWNhbGdyYXBoaWNzIiwiYSI6ImNpd204Zm4wejAwNzYyeW5uNjYyZmFwdWEifQ.7i-VIZZWX8pd1bTfxIVj9g")};$k.getErrorCredit=function(o){if(!(O(o)||O($k.defaultAccessToken)))return O(ape)||(ape=new tl(Wat,!0)),ape};var jat=$k;function gae(){Ui.throwInstantiationError()}Object.defineProperties(gae.prototype,{ellipsoid:{get:Ui.throwInstantiationError}});gae.prototype.project=Ui.throwInstantiationError;gae.prototype.unproject=Ui.throwInstantiationError;var qat=gae;function fH(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.weights,f=o.times;this._times=f,this._weights=A,this._count=A.length/f.length,this._lastTimeIndex=0}Object.defineProperties(fH.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});fH.prototype.findTimeInterval=uf.prototype.findTimeInterval;fH.prototype.wrapTime=uf.prototype.wrapTime;fH.prototype.clampTime=uf.prototype.clampTime;fH.prototype.evaluate=function(o,A){let f=this.weights,m=this.times,C=this._lastTimeIndex=this.findTimeInterval(o,this._lastTimeIndex),y=(o-m[C])/(m[C+1]-m[C]);O(A)||(A=new Array(this._count));for(let x=0;x<this._count;x++){let v=C*this._count+x;A[x]=f[v]*(1-y)+f[v+this._count]*y}return A};var Xat=fH;function kDe(o,A,f){o=An.createIfNeeded(o),o.appendForwardSlash(),o.setQueryParameters({key:A}),this._url=o,this._params=Ae(f,{})}Object.defineProperties(kDe.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}}});kDe.prototype.geocode=function(o){return this._url.getDerivedResource({url:"json",queryParameters:ia(this._params,{q:o})}).fetchJson().then(function(A){return A.results.map(function(f){let m,C=f.bounds;if(O(C))m=Si.fromDegrees(C.southwest.lng,C.southwest.lat,C.northeast.lng,C.northeast.lat);else{let y=f.geometry.lat,x=f.geometry.lng;m=ee.fromDegrees(y,x)}return{displayName:f.formatted,destination:m}})})};var Zat=kDe,fQi={packedLength:void 0,pack:Ui.throwInstantiationError,unpack:Ui.throwInstantiationError},$at=fQi,gQi={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:Ui.throwInstantiationError,unpackInterpolationResult:Ui.throwInstantiationError},est=gQi,pQi=new ee;function mQi(o,A,f,m){let C=dre(o,A,f,m,pQi);return O(C)?C.x>0&&C.y>0&&C.z>0:!1}var tst=mQi;function ist(){Ui.throwInstantiationError()}ist.prototype.getURL=Ui.throwInstantiationError;var rst=ist;function CQi(o,A,f,m,C,y,x){let v=XA.numberOfPoints(o,A,C),E,I=f.red,w=f.green,Q=f.blue,M=f.alpha,B=m.red,T=m.green,D=m.blue,F=m.alpha;if(At.equals(f,m)){for(E=0;E<v;E++)y[x++]=At.floatToByte(I),y[x++]=At.floatToByte(w),y[x++]=At.floatToByte(Q),y[x++]=At.floatToByte(M);return x}let L=(B-I)/v,R=(T-w)/v,k=(D-Q)/v,U=(F-M)/v,V=x;for(E=0;E<v;E++)y[V++]=At.floatToByte(I+E*L),y[V++]=At.floatToByte(w+E*R),y[V++]=At.floatToByte(Q+E*k),y[V++]=At.floatToByte(M+E*U);return V}function WK(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.positions,f=o.colors,m=Ae(o.colorsPerVertex,!1);this._positions=A,this._colors=f,this._colorsPerVertex=m,this._arcType=Ae(o.arcType,Pa.GEODESIC),this._granularity=Ae(o.granularity,je.RADIANS_PER_DEGREE),this._ellipsoid=Ae(o.ellipsoid,Di.WGS84),this._workerName="createSimplePolylineGeometry";let C=1+A.length*ee.packedLength;C+=O(f)?1+f.length*At.packedLength:1,this.packedLength=C+Di.packedLength+3}WK.pack=function(o,A,f){f=Ae(f,0);let m,C=o._positions,y=C.length;for(A[f++]=y,m=0;m<y;++m,f+=ee.packedLength)ee.pack(C[m],A,f);let x=o._colors;for(y=O(x)?x.length:0,A[f++]=y,m=0;m<y;++m,f+=At.packedLength)At.pack(x[m],A,f);return Di.pack(o._ellipsoid,A,f),f+=Di.packedLength,A[f++]=o._colorsPerVertex?1:0,A[f++]=o._arcType,A[f]=o._granularity,A};WK.unpack=function(o,A,f){A=Ae(A,0);let m,C=o[A++],y=new Array(C);for(m=0;m<C;++m,A+=ee.packedLength)y[m]=ee.unpack(o,A);C=o[A++];let x=C>0?new Array(C):void 0;for(m=0;m<C;++m,A+=At.packedLength)x[m]=At.unpack(o,A);let v=Di.unpack(o,A);A+=Di.packedLength;let E=o[A++]===1,I=o[A++],w=o[A];return O(f)?(f._positions=y,f._colors=x,f._ellipsoid=v,f._colorsPerVertex=E,f._arcType=I,f._granularity=w,f):new WK({positions:y,colors:x,ellipsoid:v,colorsPerVertex:E,arcType:I,granularity:w})};var Ree=new Array(2),Lee=new Array(2),yQi={positions:Ree,height:Lee,ellipsoid:void 0,minDistance:void 0,granularity:void 0};WK.createGeometry=function(o){let A=o._positions,f=o._colors,m=o._colorsPerVertex,C=o._arcType,y=o._granularity,x=o._ellipsoid,v=je.chordLength(y,x.maximumRadius),E=O(f)&&!m,I,w=A.length,Q,M,B,T,D=0;if(C===Pa.GEODESIC||C===Pa.RHUMB){let U,V,H;C===Pa.GEODESIC?(U=je.chordLength(y,x.maximumRadius),V=XA.numberOfPoints,H=XA.generateArc):(U=y,V=XA.numberOfPointsRhumbLine,H=XA.generateRhumbArc);let q=XA.extractHeights(A,x),ie=yQi;if(C===Pa.GEODESIC?ie.minDistance=v:ie.granularity=y,ie.ellipsoid=x,E){let Z=0;for(I=0;I<w-1;I++)Z+=V(A[I],A[I+1],U)+1;Q=new Float64Array(Z*3),B=new Uint8Array(Z*4),ie.positions=Ree,ie.height=Lee;let oe=0;for(I=0;I<w-1;++I){Ree[0]=A[I],Ree[1]=A[I+1],Lee[0]=q[I],Lee[1]=q[I+1];let ne=H(ie);if(O(f)){let se=ne.length/3;T=f[I];for(let ce=0;ce<se;++ce)B[oe++]=At.floatToByte(T.red),B[oe++]=At.floatToByte(T.green),B[oe++]=At.floatToByte(T.blue),B[oe++]=At.floatToByte(T.alpha)}Q.set(ne,D),D+=ne.length}}else if(ie.positions=A,ie.height=q,Q=new Float64Array(H(ie)),O(f)){for(B=new Uint8Array(Q.length/3*4),I=0;I<w-1;++I){let oe=A[I],ne=A[I+1],se=f[I],ce=f[I+1];D=CQi(oe,ne,se,ce,v,B,D)}let Z=f[w-1];B[D++]=At.floatToByte(Z.red),B[D++]=At.floatToByte(Z.green),B[D++]=At.floatToByte(Z.blue),B[D++]=At.floatToByte(Z.alpha)}}else{M=E?w*2-2:w,Q=new Float64Array(M*3),B=O(f)?new Uint8Array(M*4):void 0;let U=0,V=0;for(I=0;I<w;++I){let H=A[I];if(E&&I>0&&(ee.pack(H,Q,U),U+=3,T=f[I-1],B[V++]=At.floatToByte(T.red),B[V++]=At.floatToByte(T.green),B[V++]=At.floatToByte(T.blue),B[V++]=At.floatToByte(T.alpha)),E&&I===w-1)break;ee.pack(H,Q,U),U+=3,O(f)&&(T=f[I],B[V++]=At.floatToByte(T.red),B[V++]=At.floatToByte(T.green),B[V++]=At.floatToByte(T.blue),B[V++]=At.floatToByte(T.alpha))}}let F=new yc;F.position=new Yr({componentDatatype:ei.DOUBLE,componentsPerAttribute:3,values:Q}),O(f)&&(F.color=new Yr({componentDatatype:ei.UNSIGNED_BYTE,componentsPerAttribute:4,values:B,normalize:!0})),M=Q.length/3;let L=(M-1)*2,R=Nn.createTypedArray(M,L),k=0;for(I=0;I<M-1;++I)R[k++]=I,R[k++]=I+1;return new Zo({attributes:F,indices:R,primitiveType:yn.LINES,boundingSphere:wi.fromPoints(A)})};var nst=WK;function J8(o){let A=Ae(o.radius,1),f={radii:new ee(A,A,A),stackPartitions:o.stackPartitions,slicePartitions:o.slicePartitions,vertexFormat:o.vertexFormat};this._ellipsoidGeometry=new gC(f),this._workerName="createSphereGeometry"}J8.packedLength=gC.packedLength;J8.pack=function(o,A,f){return gC.pack(o._ellipsoidGeometry,A,f)};var xQi=new gC,_L={radius:void 0,radii:new ee,vertexFormat:new Wr,stackPartitions:void 0,slicePartitions:void 0};J8.unpack=function(o,A,f){let m=gC.unpack(o,A,xQi);return _L.vertexFormat=Wr.clone(m._vertexFormat,_L.vertexFormat),_L.stackPartitions=m._stackPartitions,_L.slicePartitions=m._slicePartitions,O(f)?(ee.clone(m._radii,_L.radii),f._ellipsoidGeometry=new gC(_L),f):(_L.radius=m._radii.x,new J8(_L))};J8.createGeometry=function(o){return gC.createGeometry(o._ellipsoidGeometry)};var ost=J8;function EN(o){}Object.defineProperties(EN.prototype,{ellipsoid:{get:Ui.throwInstantiationError},rectangle:{get:Ui.throwInstantiationError},projection:{get:Ui.throwInstantiationError}});EN.prototype.getNumberOfXTilesAtLevel=Ui.throwInstantiationError;EN.prototype.getNumberOfYTilesAtLevel=Ui.throwInstantiationError;EN.prototype.rectangleToNativeRectangle=Ui.throwInstantiationError;EN.prototype.tileXYToNativeRectangle=Ui.throwInstantiationError;EN.prototype.tileXYToRectangle=Ui.throwInstantiationError;EN.prototype.positionToTileXY=Ui.throwInstantiationError;var ast=EN;function M5(o){o=Ae(o,Ae.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=o.clock,this.element=o.element,this.epoch=Ae(o.epoch,Cn.MINIMUM_VALUE),this.tolerance=Ae(o.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}Object.defineProperties(M5.prototype,{clock:{get:function(){return this._clock},set:function(o){let A=this._clock;A!==o&&(O(A)&&(this._clockSubscription(),this._clockSubscription=void 0),O(o)&&(this._clockSubscription=o.onTick.addEventListener(M5.prototype._onTick,this)),this._clock=o)}},element:{get:function(){return this._element},set:function(o){let A=this._element;A!==o&&(O(A)&&A.removeEventListener("seeked",this._seekFunction,!1),O(o)&&(this._seeking=!1,this._seekFunction=vQi(this),o.addEventListener("seeked",this._seekFunction,!1)),this._element=o,this._seeking=!1,this._firstTickAfterSeek=!1)}}});M5.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,Qr(this)};M5.prototype.isDestroyed=function(){return!1};M5.prototype._trySetPlaybackRate=function(o){if(this._lastPlaybackRate===o.multiplier)return;let A=this._element;try{A.playbackRate=o.multiplier}catch{A.playbackRate=0}this._lastPlaybackRate=o.multiplier};M5.prototype._onTick=function(o){let A=this._element;if(!O(A)||A.readyState<2)return;let f=A.paused,m=o.shouldAnimate;if(m===f&&(m?A.play():A.pause()),this._seeking||this._firstTickAfterSeek){this._firstTickAfterSeek=!1;return}this._trySetPlaybackRate(o);let C=o.currentTime,y=Ae(this.epoch,Cn.MINIMUM_VALUE),x=fi.secondsDifference(C,y),v=A.duration,E,I=A.currentTime;A.loop?(x=x%v,x<0&&(x=v-x),E=x):x>v?E=v:x<0?E=0:E=x;let w=m?Ae(this.tolerance,1):.001;Math.abs(E-I)>w&&(this._seeking=!0,A.currentTime=E)};function vQi(o){return function(){o._seeking=!1,o._firstTickAfterSeek=!0}}var sst=M5;function EQi(o,A){this.rectangle=o,this.maxLevel=A}function gH(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=An.createIfNeeded(o.url);this._resource=A,this._errorEvent=new br,this._ready=!1,this._terrainDataStructure={heightScale:1/1e3,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:256*256*256-1};let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._tilingScheme=void 0,this._rectangles=[];let m=this,C,y=Ae(o.ellipsoid,Di.WGS84);function x(I){let w=I.getElementsByTagName("SRS")[0].textContent;if(w==="EPSG:4326")m._tilingScheme=new af({ellipsoid:y});else return Promise.reject(new nr(`SRS ${w} is not supported.`));let Q=I.getElementsByTagName("TileFormat")[0];m._heightmapWidth=parseInt(Q.getAttribute("width"),10),m._heightmapHeight=parseInt(Q.getAttribute("height"),10),m._levelZeroMaximumGeometricError=Cx.getEstimatedLevelZeroGeometricErrorForAHeightmap(y,Math.min(m._heightmapWidth,m._heightmapHeight),m._tilingScheme.getNumberOfXTilesAtLevel(0));let M=I.getElementsByTagName("DataExtent");for(let B=0;B<M.length;++B){let T=M[B],D=je.toRadians(parseFloat(T.getAttribute("minx"))),F=je.toRadians(parseFloat(T.getAttribute("miny"))),L=je.toRadians(parseFloat(T.getAttribute("maxx"))),R=je.toRadians(parseFloat(T.getAttribute("maxy"))),k=parseInt(T.getAttribute("maxlevel"),10);m._rectangles.push(new EQi(new Si(D,F,L,R),k))}return m._ready=!0,Promise.resolve(!0)}function v(I){let w=Ae(O(I)?I.message:void 0,`An error occurred while accessing ${m._resource.url}.`);return C=wc.reportError(C,m,m._errorEvent,w),C.retry?E():Promise.reject(new nr(w))}function E(){return m._resource.fetchXML().then(x).catch(v)}this._readyPromise=E()}Object.defineProperties(gH.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});gH.prototype.requestTileGeometry=function(o,A,f,m){let C=this._tilingScheme.getNumberOfYTilesAtLevel(f),y=this._resource.getDerivedResource({url:`${f}/${o}/${C-A-1}.tif`,queryParameters:{cesium:!0},request:m}).fetchImage({preferImageBitmap:!0});if(!O(y))return;let x=this;return Promise.resolve(y).then(function(v){return new wQ({buffer:i5(v),width:x._heightmapWidth,height:x._heightmapHeight,childTileMask:IQi(x,o,A,f),structure:x._terrainDataStructure})})};gH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};var lst=new Si;function IQi(o,A,f,m){let C=o._tilingScheme,y=o._rectangles,x=C.tileXYToRectangle(A,f,m),v=0;for(let E=0;E<y.length&&v!==15;++E){let I=y[E];if(I.maxLevel<=m)continue;let w=I.rectangle,Q=Si.intersection(w,x,lst);O(Q)&&(N$(C,w,A*2,f*2,m+1)&&(v|=4),N$(C,w,A*2+1,f*2,m+1)&&(v|=8),N$(C,w,A*2,f*2+1,m+1)&&(v|=1),N$(C,w,A*2+1,f*2+1,m+1)&&(v|=2))}return v}function N$(o,A,f,m,C){let y=o.tileXYToRectangle(f,m,C);return O(Si.intersection(y,A,lst))}gH.prototype.getTileDataAvailable=function(o,A,f){};gH.prototype.loadTileDataAvailability=function(o,A,f){};var ust=gH,_Qi={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},cst=Object.freeze(_Qi);function BQi(o){switch(o){case Ii.FLOAT:return"float";case Ii.FLOAT_VEC2:return"vec2";case Ii.FLOAT_VEC3:return"vec3";case Ii.FLOAT_VEC4:return"vec4";case Ii.FLOAT_MAT2:return"mat2";case Ii.FLOAT_MAT3:return"mat3";case Ii.FLOAT_MAT4:return"mat4";case Ii.SAMPLER_2D:return"sampler2D";case Ii.BOOL:return"bool"}}var Ast=BQi;function wQi(o,A,f){return function(){f.apply(o,arguments),A.apply(o,arguments)}}var ODe=wQi;function TP(){this._flattenPolygons=[],this._needUpdateFlatten=!1,this._updateFlattenInternal=!1,this._defautTexture=void 0,this._flattenBounds=new ai,this._polygonDepth=void 0,this._matMW=Xe.IDENTITY,this._flattenOriginPoint=void 0}Object.defineProperties(TP.prototype,{needUpdateFlatten:{get:function(){return this._needUpdateFlatten},set:function(o){this._needUpdateFlatten=o}},flattenPolygons:{get:function(){return this._flattenPolygons},set:function(o){!O(o)||!O(o.length)?this._flattenPolygons=[]:this._flattenPolygons=o,this._updateFlattenInternal=!0}},localViewMatrix:{get:function(){return this._matMW},set:function(o){this._matMW=o}}});TP.prototype.initailize=function(o){if(this._flattenPolygons.length>0){O(this._polygonDepth)||(this._polygonDepth=new Q8),this._polygonDepth._flattenPolygonDrawCommands=[];let A={position:0},f=new Xe;Xe.inverse(this._matMW,f);let m=new Kr,C=[];for(let y=0;y<this._flattenPolygons.length;y++){let x=o.context,v=this._flattenPolygons[y],E=rh.createGeometry(v),I=E.attributes.position.values;for(let F=0;F<I.length/3;F++){let L=new ee(0,0,0);L.x=I[3*F],L.y=I[3*F+1],L.z=I[3*F+2],Xe.multiplyByPoint(f,L,L),C.push(L),E.attributes.position.values[3*F]=L.x,E.attributes.position.values[3*F+1]=L.y,E.attributes.position.values[3*F+2]=L.z}let w=wi.transform(E.boundingSphere,f);E.boundingSphere=w;let Q=Vc.fromGeometry({context:x,geometry:E,attributeLocations:A,bufferUsage:ln.STATIC_DRAW,interleave:!0}),M=_s.fromCache({context:x,vertexShaderSource:Pne,fragmentShaderSource:Mne}),B=new fn;B.depthTest.enabled=!0,B.cull.enabled=!0,B.cull.face=Ii.BACK;let T={},D=new On({boundingVolume:w,modelMatrix:new Xe,primitiveType:yn.TRIANGLES,vertexArray:Q,shaderProgram:M,uniformMap:T,renderState:B,pass:hr.GLOBE});this._polygonDepth._flattenPolygonDrawCommands.push(D)}Kr.fromPoints(C,m),this._flattenBounds.x=m.x,this._flattenBounds.y=m.y+m.height,this._flattenBounds.z=m.x+m.width,this._flattenBounds.w=m.y,this._polygonDepth.updateFrustum(this._flattenBounds.x,this._flattenBounds.y,this._flattenBounds.z,this._flattenBounds.w)}};TP.prototype.addFlattenPolygon=function(o){this._flattenPolygons.push(o),this._updateFlattenInternal=!0,this._needUpdateFlatten=!0};TP.prototype.removeFlattenPolygon=function(o){for(let A=0;A<this._flattenPolygons.length;A++)if(this._flattenPolygons[A]===o){this._flattenPolygons.splice(A,1),this._updateFlattenInternal=!0,O(this._polygonDepth)||(this._polygonDepth=new Q8),this._polygonDepth.destroy(),this._polygonDepth=void 0;break}};TP.prototype.clearFlattenPolygon=function(){O(this._polygonDepth)&&(this._polygonDepth._flattenPolygonDrawCommands=[],this._polygonDepth.destroy(),this._polygonDepth=void 0),this._flattenPolygons=[],this._needUpdateFlatten=!1,this._updateFlattenInternal=!1};TP.prototype.update=function(o,A,f){this._frameState=o,O(this._defautTexture)||(this._defautTexture=new mo({context:this._frameState.context,width:2,height:2})),this._needUpdateFlatten===!0&&O(this._flattenPolygons)&&this._flattenPolygons.length>0&&(this._updateFlattenInternal===!0&&(O(this._polygonDepth)?(this._polygonDepth.destroy(),this._polygonDepth=void 0,this.initailize(o)):this.initailize(o)),O(this._polygonDepth)&&this._polygonDepth.update(o),this._updateFlattenInternal=!1)};TP.getShader=function(o){};TP.prototype.getUniformMap=function(){let o=this,A={};return A.u_polygonTexture=function(){return O(o._polygonDepth)?o._polygonDepth._colorTexture:o._defautTexture},A.u_polygonBounds=function(){return o._flattenBounds},A.u_bFlatten=function(){return!!(o._needUpdateFlatten===!0&&O(o._polygonDepth))},A.u_eastNorthUpToFixedFrame=function(){return o.localViewMatrix},A.u_r_eastNorthUpToFixedFrame=function(){let f=new Xe;return Xe.inverse(o.localViewMatrix,f),f},A};var bQi=TP,UDe=bQi;function pH(o){this._scene=o,this._flattenPolygons=[],this._polygonTexture=new UDe,this._clipPlaneOfFlatten=!1}Object.defineProperties(pH.prototype,{clipPlaneOfFlatten:{get:function(){return this._clipPlaneOfFlatten},set:function(o){this._clipPlaneOfFlatten=o}}});pH.prototype.addPolygon=function(o){this._flattenPolygons.push(o)};pH.prototype.clearPolygon=function(){this._flattenPolygons=[];let o=this._polygonTexture,A=this._scene,f={flattenBounds:[],flattenPolygons:[],flattenPolygonHeights:[]};A.globe.flattenPolygonRegion=f,A.globe.flattenUniforms=void 0,o.clearFlattenPolygon()};pH.prototype.generatePolygonTexture=function(){let o=this._scene,A=this._polygonTexture,f=this._flattenPolygons;if(f.length<1)return;for(let v=0;v<f.length;v++){let E=f[v],I=[];for(let Q=0;Q<E.length;Q+=3){let M=E[Q],B=E[Q+1],T=E[Q+2];I.push(M,B,T)}let w=rh.fromPositions({positions:ee.fromDegreesArrayHeights(I),extrudedHeight:0,perPositionHeight:!0});A.addFlattenPolygon(w)}let m=f[0][0],C=f[0][1],y=new ee.fromDegrees(m,C,-2e3),x=Vn.eastNorthUpToFixedFrame(y);A.localViewMatrix=x,A.update(o._frameState)};pH.prototype.update=function(){let o=this._scene,A=this._polygonTexture,f=this._flattenPolygons;if(f.length<1)return;this.generatePolygonTexture();let m={flattenBounds:[],flattenPolygons:[],flattenPolygonHeights:[],enableFlatten:!1},C=-100;for(let v=0;v<f.length;v++){let E=f[v],I=new Kr,w=[],Q=[],M=0,B=0;for(let D=0;D<E.length/3;D++){let F=E[3*D],L=E[3*D+1],R=new ee(F,L,0);w.push(R),Q.push([je.toRadians(F),je.toRadians(L)]),M=Math.max(E[3*D+2],M),B=Math.min(E[3*D+2],B),C=Math.min(C,B)}Kr.fromPoints(w,I);let T=new ai(I.x,I.y+I.height,I.x+I.width,I.y);m.flattenBounds.push(T),m.flattenPolygons.push(Q),m.flattenPolygonHeights.push({maxHeight:M+2,minHeight:B-2}),m.enableFlatten=!0}o.globe.flattenPolygonRegion=m;let y=A.getUniformMap();y.u_minFlattenHeight=function(){return C};let x=this;y.u_clipPlaneOfFlatten=function(){return x.clipPlaneOfFlatten},o.globe.flattenUniforms=y,o.requestRender()};var IN=pH,QQi=new ee(1,1,1);function GDe(o){o=Ae(o,QQi),this._dimensions=ee.clone(o)}Object.defineProperties(GDe.prototype,{dimensions:{get:function(){return this._dimensions},set:function(o){ee.clone(o,this._dimensions)}}});var SQi=new ee;GDe.prototype.emit=function(o){let A=this._dimensions,f=ee.multiplyByScalar(A,.5,SQi),m=je.randomBetween(-f.x,f.x),C=je.randomBetween(-f.y,f.y),y=je.randomBetween(-f.z,f.z);o.position=ee.fromElements(m,C,y,o.position),o.velocity=ee.normalize(o.position,o.velocity)};var hst=GDe;function MP(){this.featurePropertiesDirty=!1}Object.defineProperties(MP.prototype,{featuresLength:{get:function(){Ui.throwInstantiationError()}},pointsLength:{get:function(){Ui.throwInstantiationError()}},trianglesLength:{get:function(){Ui.throwInstantiationError()}},geometryByteLength:{get:function(){Ui.throwInstantiationError()}},texturesByteLength:{get:function(){Ui.throwInstantiationError()}},batchTableByteLength:{get:function(){Ui.throwInstantiationError()}},innerContents:{get:function(){Ui.throwInstantiationError()}},readyPromise:{get:function(){Ui.throwInstantiationError()}},tileset:{get:function(){Ui.throwInstantiationError()}},tile:{get:function(){Ui.throwInstantiationError()}},url:{get:function(){Ui.throwInstantiationError()}},batchTable:{get:function(){Ui.throwInstantiationError()}},metadata:{get:function(){Ui.throwInstantiationError()},set:function(o){Ui.throwInstantiationError()}},group:{get:function(){Ui.throwInstantiationError()},set:function(o){Ui.throwInstantiationError()}}});MP.prototype.hasProperty=function(o,A){Ui.throwInstantiationError()};MP.prototype.getFeature=function(o){Ui.throwInstantiationError()};MP.prototype.applyDebugSettings=function(o,A){Ui.throwInstantiationError()};MP.prototype.applyStyle=function(o){Ui.throwInstantiationError()};MP.prototype.update=function(o,A){Ui.throwInstantiationError()};MP.prototype.isDestroyed=function(){Ui.throwInstantiationError()};MP.prototype.destroy=function(){Ui.throwInstantiationError()};var dst=MP;function HDe(o){o=Ae(o,1),this._radius=Ae(o,1)}Object.defineProperties(HDe.prototype,{radius:{get:function(){return this._radius},set:function(o){this._radius=o}}});HDe.prototype.emit=function(o){let A=je.randomBetween(0,je.TWO_PI),f=je.randomBetween(0,this._radius),m=f*Math.cos(A),C=f*Math.sin(A),y=0;o.position=ee.fromElements(m,C,y,o.position),o.velocity=ee.clone(ee.UNIT_Z,o.velocity)};var VDe=HDe,MCe={CUMULUS:0};MCe.validate=function(o){return o===MCe.CUMULUS};var xie=Object.freeze(MCe);function DQ(o,A){if(o=Ae(o,Ae.EMPTY_OBJECT),this._show=Ae(o.show,!0),this._position=ee.clone(Ae(o.position,ee.ZERO)),!O(o.scale)&&O(o.maximumSize))this._maximumSize=ee.clone(o.maximumSize),this._scale=new It(this._maximumSize.x,this._maximumSize.y);else{this._scale=It.clone(Ae(o.scale,new It(20,12)));let f=new ee(this._scale.x,this._scale.y,Math.min(this._scale.x,this._scale.y)/1.5);this._maximumSize=ee.clone(Ae(o.maximumSize,f))}this._slice=Ae(o.slice,-1),this._color=At.clone(Ae(o.color,At.WHITE)),this._brightness=Ae(o.brightness,1),this._cloudCollection=A,this._index=-1}var DQi=DQ.SHOW_INDEX=0,TQi=DQ.POSITION_INDEX=1,MQi=DQ.SCALE_INDEX=2,PQi=DQ.MAXIMUM_SIZE_INDEX=3,RQi=DQ.SLICE_INDEX=4,LQi=DQ.BRIGHTNESS_INDEX=5,FQi=DQ.COLOR_INDEX=6;DQ.NUMBER_OF_PROPERTIES=7;function mk(o,A){let f=o._cloudCollection;O(f)&&(f._updateCloud(o,A),o._dirty=!0)}Object.defineProperties(DQ.prototype,{show:{get:function(){return this._show},set:function(o){this._show!==o&&(this._show=o,mk(this,DQi))}},position:{get:function(){return this._position},set:function(o){let A=this._position;ee.equals(A,o)||(ee.clone(o,A),mk(this,TQi))}},scale:{get:function(){return this._scale},set:function(o){let A=this._scale;It.equals(A,o)||(It.clone(o,A),mk(this,MQi))}},maximumSize:{get:function(){return this._maximumSize},set:function(o){let A=this._maximumSize;ee.equals(A,o)||(ee.clone(o,A),mk(this,PQi))}},color:{get:function(){return this._color},set:function(o){let A=this._color;At.equals(A,o)||(At.clone(o,A),mk(this,FQi))}},slice:{get:function(){return this._slice},set:function(o){this._slice!==o&&(this._slice=o,mk(this,RQi))}},brightness:{get:function(){return this._brightness},set:function(o){this._brightness!==o&&(this._brightness=o,mk(this,LQi))}}});DQ.prototype._destroy=function(){this._cloudCollection=void 0};var TQ=DQ,R_,k$=new ee,NQi={positionHighAndScaleX:0,positionLowAndScaleY:1,packedAttribute0:2,packedAttribute1:3,color:4},kQi={direction:0,positionHighAndScaleX:1,positionLowAndScaleY:2,packedAttribute0:3,packedAttribute1:4,color:5},OQi=TQ.SHOW_INDEX,UQi=TQ.POSITION_INDEX,GQi=TQ.SCALE_INDEX,HQi=TQ.MAXIMUM_SIZE_INDEX,VQi=TQ.SLICE_INDEX,zQi=TQ.BRIGHTNESS_INDEX,KQi=TQ.NUMBER_OF_PROPERTIES,YQi=TQ.COLOR_INDEX;function MQ(o){o=Ae(o,Ae.EMPTY_OBJECT),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(KQi),this._noiseTexture=void 0,this._textureSliceWidth=128,this._noiseTextureRows=4,this.noiseDetail=Ae(o.noiseDetail,16),this.noiseOffset=ee.clone(Ae(o.noiseOffset,ee.ZERO)),this._loading=!1,this._ready=!1;let A=this;this._uniforms={u_noiseTexture:function(){return A._noiseTexture},u_noiseTextureDimensions:fst(A),u_noiseDetail:function(){return A.noiseDetail}},this._vaNoise=void 0,this._spNoise=void 0,this._spCreated=!1,this._sp=void 0,this._rs=void 0,this.show=Ae(o.show,!0),this._colorCommands=[],this.debugBillboards=Ae(o.debugBillboards,!1),this._compiledDebugBillboards=!1,this.debugEllipsoids=Ae(o.debugEllipsoids,!1),this._compiledDebugEllipsoids=!1}function fst(o){return function(){return k$.x=o._textureSliceWidth,k$.y=o._noiseTextureRows,k$.z=1/o._noiseTextureRows,k$}}Object.defineProperties(MQ.prototype,{length:{get:function(){return zDe(this),this._clouds.length}}});function gst(o){let A=o.length;for(let f=0;f<A;++f)o[f]&&o[f]._destroy()}MQ.prototype.add=function(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=Ae(o.cloudType,xie.CUMULUS),f;return A===xie.CUMULUS&&(f=new TQ(o,this),f._index=this._clouds.length,this._clouds.push(f),this._createVertexArray=!0),f};MQ.prototype.remove=function(o){return this.contains(o)?(this._clouds[o._index]=void 0,this._cloudsRemoved=!0,this._createVertexArray=!0,o._destroy(),!0):!1};MQ.prototype.removeAll=function(){gst(this._clouds),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!0};function zDe(o){if(o._cloudsRemoved){o._cloudsRemoved=!1;let A=[],f=o._clouds,m=f.length;for(let C=0,y=0;C<m;++C){let x=f[C];O(x)&&(f._index=y++,A.push(x))}o._clouds=A}}MQ.prototype._updateCloud=function(o,A){o._dirty||(this._cloudsToUpdate[this._cloudsToUpdateIndex++]=o),++this._propertiesChanged[A]};MQ.prototype.contains=function(o){return O(o)&&o._cloudCollection===this};MQ.prototype.get=function(o){return zDe(this),this._clouds[o]};var JQi=new Float32Array([-1,-1,1,-1,1,1,-1,1]),WQi=new Uint16Array([0,1,2,0,2,3]);function jQi(o){let A=vo.createVertexBuffer({context:o,typedArray:JQi,usage:ln.STATIC_DRAW}),f=vo.createIndexBuffer({context:o,typedArray:WQi,usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT}),m=[{index:0,vertexBuffer:A,componentsPerAttribute:2,componentDatatype:ei.FLOAT}];return new Vc({context:o,attributes:m,indexBuffer:f})}var KDe;function qQi(o){let A=o.cache.cloudCollection_indexBufferBatched;if(O(A))return A;let f=16384*6-6,m=new Uint16Array(f);for(let C=0,y=0;C<f;C+=6,y+=4)m[C]=y,m[C+1]=y+1,m[C+2]=y+2,m[C+3]=y,m[C+4]=y+2,m[C+5]=y+3;return A=vo.createIndexBuffer({context:o,typedArray:m,usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT}),A.vertexArrayDestroyable=!1,o.cache.cloudCollection_indexBufferBatched=A,A}function XQi(o){let A=o.cache.cloudCollection_indexBufferInstanced;return O(A)||(A=vo.createIndexBuffer({context:o,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT}),A.vertexArrayDestroyable=!1,o.cache.cloudCollection_indexBufferInstanced=A),A}function ZQi(o){let A=o.cache.cloudCollection_vertexBufferInstanced;return O(A)||(A=vo.createVertexBuffer({context:o,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:ln.STATIC_DRAW}),A.vertexArrayDestroyable=!1,o.cache.cloudCollection_vertexBufferInstanced=A),A}function $Qi(o,A,f){let m=[{index:R_.positionHighAndScaleX,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.positionLowAndScaleY,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.packedAttribute0,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.packedAttribute1,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.color,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,usage:ln.STATIC_DRAW}];f&&m.push({index:R_.direction,componentsPerAttribute:2,componentDatatype:ei.FLOAT,vertexBuffer:ZQi(o)});let C=f?A:4*A;return new lY(o,m,C,f)}var spe=new Pu;function pst(o,A,f,m){let C,y=f[R_.positionHighAndScaleX],x=f[R_.positionLowAndScaleY],v=m.position;Pu.fromCartesian(v,spe);let E=m.scale,I=spe.high,w=spe.low;o._instanced?(C=m._index,y(C,I.x,I.y,I.z,E.x),x(C,w.x,w.y,w.z,E.y)):(C=m._index*4,y(C+0,I.x,I.y,I.z,E.x),y(C+1,I.x,I.y,I.z,E.x),y(C+2,I.x,I.y,I.z,E.x),y(C+3,I.x,I.y,I.z,E.x),x(C+0,w.x,w.y,w.z,E.y),x(C+1,w.x,w.y,w.z,E.y),x(C+2,w.x,w.y,w.z,E.y),x(C+3,w.x,w.y,w.z,E.y))}function mst(o,A,f,m){let C,y=f[R_.packedAttribute0],x=m.show,v=m.brightness;o._instanced?(C=m._index,y(C,x,v,0,0)):(C=m._index*4,y(C+0,x,v,0,0),y(C+1,x,v,1,0),y(C+2,x,v,1,1),y(C+3,x,v,0,1))}function Cst(o,A,f,m){let C,y=f[R_.packedAttribute1],x=m.maximumSize,v=m.slice;o._instanced?(C=m._index,y(C,x.x,x.y,x.z,v)):(C=m._index*4,y(C+0,x.x,x.y,x.z,v),y(C+1,x.x,x.y,x.z,v),y(C+2,x.x,x.y,x.z,v),y(C+3,x.x,x.y,x.z,v))}function yst(o,A,f,m){let C,y=f[R_.color],x=m.color,v=At.floatToByte(x.red),E=At.floatToByte(x.green),I=At.floatToByte(x.blue),w=At.floatToByte(x.alpha);o._instanced?(C=m._index,y(C,v,E,I,w)):(C=m._index*4,y(C+0,v,E,I,w),y(C+1,v,E,I,w),y(C+2,v,E,I,w),y(C+3,v,E,I,w))}function eSi(o,A,f,m){pst(o,A,f,m),mst(o,A,f,m),Cst(o,A,f,m),yst(o,A,f,m)}function tSi(o,A,f,m){let C=o,y=C._textureSliceWidth,x=C._noiseTextureRows,v=A.context;C._vaNoise=jQi(v),C._spNoise=_s.fromCache({context:v,vertexShaderSource:f,fragmentShaderSource:m,attributeLocations:{position:0}});let E=C.noiseDetail,I=C.noiseOffset;C._noiseTexture=new mo({context:v,width:y*y/x,height:y*x,pixelDatatype:wn.UNSIGNED_BYTE,pixelFormat:Gn.RGBA,sampler:new Qs({wrapS:Va.REPEAT,wrapT:Va.REPEAT,minificationFilter:as.NEAREST,magnificationFilter:th.NEAREST})});let w=new B5({vertexArray:C._vaNoise,shaderProgram:C._spNoise,outputTexture:C._noiseTexture,uniformMap:{u_noiseTextureDimensions:fst(C),u_noiseDetail:function(){return E},u_noiseOffset:function(){return I}},persists:!1,owner:o,postExecute:function(Q){C._ready=!0,C._loading=!1}});A.commandList.push(w),C._loading=!0}function iSi(o,A){let f=o,m=A.context;f._createVertexArray=!1,f._vaf=f._vaf&&f._vaf.destroy();let C=o._clouds,y=C.length;if(y>0){f._vaf=$Qi(m,y,f._instanced);let x=f._vaf.writers,v;for(v=0;v<y;++v){let E=C[v];eSi(o,A,x,E)}f._vaf.commit(KDe(m))}}var rSi=[];function nSi(o,A){let f=A.context,m=o,C=m._clouds.length,y=m._cloudsToUpdate,x=m._cloudsToUpdateIndex,v=m._propertiesChanged,E=rSi;E.length=0,(v[UQi]||v[GQi])&&E.push(pst),(v[OQi]||v[zQi])&&E.push(mst),(v[HQi]||v[VQi])&&E.push(Cst),v[YQi]&&E.push(yst);let I=E.length,w=m._vaf.writers,Q,M,B;if(x/C>.1){for(Q=0;Q<x;++Q)for(M=y[Q],M._dirty=!1,B=0;B<I;++B)E[B](o,A,w,M);m._vaf.commit(KDe(f))}else{for(Q=0;Q<x;++Q){for(M=y[Q],M._dirty=!1,B=0;B<I;++B)E[B](o,A,w,M);m._instanced?m._vaf.subCommit(M._index,1):m._vaf.subCommit(M._index*4,4)}m._vaf.endSubCommits()}m._cloudsToUpdateIndex=0}function oSi(o,A,f,m){let C=A.context,y=o,x=new Fr({defines:[],sources:[f]});y._instanced&&x.defines.push("INSTANCED");let v=new Fr({defines:[],sources:[m]});y.debugBillboards&&v.defines.push("DEBUG_BILLBOARDS"),y.debugEllipsoids&&v.defines.push("DEBUG_ELLIPSOIDS"),y._sp=_s.replaceCache({context:C,shaderProgram:y._sp,vertexShaderSource:x,fragmentShaderSource:v,attributeLocations:R_}),y._rs=fn.fromCache({depthTest:{enabled:!0,func:Ii.LESS},depthMask:!1,blending:Bu.ALPHA_BLEND}),y._spCreated=!0,y._compiledDebugBillboards=y.debugBillboards,y._compiledDebugEllipsoids=y.debugEllipsoids}function aSi(o,A){let f=o,m=A.passes,C=f._uniforms,y=A.commandList;if(m.render){let x=f._colorCommands,v=f._vaf.va,E=v.length;x.length=E;for(let I=0;I<E;I++){let w=x[I];O(w)||(w=x[I]=new On),w.pass=hr.TRANSLUCENT,w.owner=o,w.uniformMap=C,w.count=v[I].indicesCount,w.vertexArray=v[I].va,w.shaderProgram=f._sp,w.renderState=f._rs,f._instanced&&(w.count=6,w.instanceCount=f._clouds.length),y.push(w)}}}MQ.prototype.update=function(o){if(zDe(this),!this.show)return;let A=this.debugBillboards||this.debugEllipsoids;this._ready=A?!0:O(this._noiseTexture),!this._ready&&!this._loading&&!A&&tSi(this,o,SDe,QDe),this._instanced=o.context.instancedArrays,R_=this._instanced?kQi:NQi,KDe=this._instanced?XQi:qQi;let f=this._clouds.length,m=this._cloudsToUpdate,C=this._cloudsToUpdateIndex;this._createVertexArray?iSi(this,o):C>0&&nSi(this,o),C>f*1.5&&(m.length=f),!(!O(this._vaf)||!O(this._vaf.va)||!this._ready&!A)&&((!this._spCreated||this.debugBillboards!==this._compiledDebugBillboards||this.debugEllipsoids!==this._compiledDebugEllipsoids)&&oSi(this,o,bDe,wDe),aSi(this,o))};MQ.prototype.isDestroyed=function(){return!1};MQ.prototype.destroy=function(){return this._noiseTexture=this._noiseTexture&&this._noiseTexture.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),gst(this._clouds),Qr(this)};var xst=MQ,sSi=je.toRadians(30);function YDe(o){this._angle=Ae(o,sSi)}Object.defineProperties(YDe.prototype,{angle:{get:function(){return this._angle},set:function(o){this._angle=o}}});YDe.prototype.emit=function(o){let A=Math.tan(this._angle),f=je.randomBetween(0,je.TWO_PI),m=je.randomBetween(0,A),C=m*Math.cos(f),y=m*Math.sin(f),x=1;o.velocity=ee.fromElements(C,y,x,o.velocity),ee.normalize(o.velocity,o.velocity),o.position=ee.clone(ee.ZERO,o.position)};var mH=YDe,lSi=new At,uSi=new At,cSi=new At,ASi=new At,o7e=new ai,Mz=new Uint8Array(4);function a7e(o,A,f,m){let C=A.height===f.height?0:(o-A.height)/(f.height-A.height);return At.lerp(A.color,f.color,C,m)}function Fee(o,A){return{height:o,color:At.clone(A)}}function vst(o){return o=o.filter(function(A,f,m){let C=f>0,y=f<m.length-1,x=C?A.height===m[f-1].height:!0,v=y?A.height===m[f+1].height:!0;return!x||!v}),o=o.filter(function(A,f,m){let C=f>0,y=f<m.length-1,x=C?At.equals(A.color,m[f-1].color):!1,v=y?At.equals(A.color,m[f+1].color):!1;return!x||!v}),o=o.filter(function(A,f,m){let C=f>0,y=C?At.equals(A.color,m[f-1].color):!1,x=C?A.height===m[f-1].height:!0;return!y||!x}),o}function hSi(o){let A,f,m=[],C=o.length;for(A=0;A<C;A++){let y=o[A],x=y.entries,v=x.length,E=[];for(f=0;f<v;f++){let B=x[f],T=je.clamp(B.height,ZE._minimumHeight,ZE._maximumHeight),D=At.clone(B.color,lSi);D.red*=D.alpha,D.green*=D.alpha,D.blue*=D.alpha,E.push(Fee(T,D))}let I=!0,w=!0;for(f=0;f<v-1;f++){let B=E[f+0],T=E[f+1];I=I&&B.height<=T.height,w=w&&B.height>=T.height}w?E=E.reverse():I||NJ(E,function(B,T){return je.sign(B.height-T.height)});let Q=Ae(y.extendDownwards,!1),M=Ae(y.extendUpwards,!1);E.length===1&&!Q&&!M&&(Q=!0,M=!0),Q&&E.splice(0,0,Fee(ZE._minimumHeight,E[0].color)),M&&E.splice(E.length,0,Fee(ZE._maximumHeight,E[E.length-1].color)),E=vst(E),m.push(E)}return m}function dSi(o){let A=hSi(o),f=[],m=[],C;function y(E,I){f.push(Fee(E,I))}function x(E,I,w){let Q=At.multiplyByScalar(w,1-I.alpha,ASi);Q=At.add(Q,I,Q),y(E,Q)}let v=A.length;for(C=0;C<v;C++){let E=A[C],I=0,w=0;m=f,f=[];let Q=E.length,M=m.length;for(;I<Q||w<M;){let B=I<Q?E[I]:void 0,T=I>0?E[I-1]:void 0,D=I<Q-1?E[I+1]:void 0,F=w<M?m[w]:void 0,L=w>0?m[w-1]:void 0,R=w<M-1?m[w+1]:void 0;if(O(B)&&O(F)&&B.height===F.height){let k=O(R)&&F.height===R.height,U=!O(L),V=!O(R),H=O(D)&&B.height===D.height,q=!O(T),ie=!O(D);k?H?(x(B.height,B.color,F.color),x(B.height,D.color,R.color)):q?(y(B.height,F.color),x(B.height,B.color,R.color)):ie?(x(B.height,B.color,F.color),y(B.height,R.color)):(x(B.height,B.color,F.color),x(B.height,B.color,R.color)):U?H?(y(B.height,B.color),x(B.height,D.color,F.color)):ie?(y(B.height,B.color),y(B.height,F.color)):(q||y(B.height,B.color),x(B.height,B.color,F.color)):V?H?(x(B.height,B.color,F.color),y(B.height,D.color)):q?(y(B.height,F.color),y(B.height,B.color)):ie?x(B.height,B.color,F.color):(x(B.height,B.color,F.color),y(B.height,B.color)):H?(x(B.height,B.color,F.color),x(B.height,D.color,F.color)):q?(y(B.height,F.color),x(B.height,B.color,F.color)):ie?(x(B.height,B.color,F.color),y(B.height,F.color)):x(B.height,B.color,F.color),I+=H?2:1,w+=k?2:1}else if(O(B)&&O(F)&&O(L)&&B.height<F.height){let k=a7e(B.height,L,F,cSi);O(T)?O(D)?x(B.height,B.color,k):(x(B.height,B.color,k),y(B.height,k)):(y(B.height,k),x(B.height,B.color,k)),I++}else if(O(F)&&O(B)&&O(T)&&F.height<B.height){let k=a7e(F.height,T,B,uSi);O(L)?O(R)?x(F.height,k,F.color):(x(F.height,k,F.color),y(F.height,k)):(y(F.height,k),x(F.height,k,F.color)),w++}else O(B)&&(!O(F)||B.height<F.height)?(O(F)&&!O(L)&&!O(D)?(y(B.height,B.color),y(B.height,ZE._emptyColor),y(F.height,ZE._emptyColor)):(!O(F)&&O(L)&&!O(T)&&(y(L.height,ZE._emptyColor),y(B.height,ZE._emptyColor)),y(B.height,B.color)),I++):O(F)&&(!O(B)||F.height<B.height)&&(y(F.height,F.color),w++)}}return vst(f)}function ZE(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.scene,f=o.layers,m=dSi(f),C=m.length,y,x,v,E;if(ZE._useFloatTexture(A.context))for(v=wn.FLOAT,E=Gn.LUMINANCE,x=new Float32Array(C),y=0;y<C;y++)x[y]=m[y].height;else for(v=wn.UNSIGNED_BYTE,E=Gn.RGBA,x=new Uint8Array(C*4),y=0;y<C;y++)ai.packFloat(m[y].height,o7e),ai.pack(o7e,x,y*4);let I=mo.create({context:A.context,pixelFormat:E,pixelDatatype:v,source:{arrayBufferView:x,width:C,height:1},sampler:new Qs({wrapS:Va.CLAMP_TO_EDGE,wrapT:Va.CLAMP_TO_EDGE,minificationFilter:as.NEAREST,magnificationFilter:th.NEAREST})}),w=new Uint8Array(C*4);for(y=0;y<C;y++)m[y].color.toBytes(Mz),w[y*4+0]=Mz[0],w[y*4+1]=Mz[1],w[y*4+2]=Mz[2],w[y*4+3]=Mz[3];let Q=mo.create({context:A.context,pixelFormat:Gn.RGBA,pixelDatatype:wn.UNSIGNED_BYTE,source:{arrayBufferView:w,width:C,height:1},sampler:new Qs({wrapS:Va.CLAMP_TO_EDGE,wrapT:Va.CLAMP_TO_EDGE,minificationFilter:as.LINEAR,magnificationFilter:th.LINEAR})});return ss.fromType("ElevationBand",{heights:I,colors:Q})}ZE._useFloatTexture=function(o){return o.floatingPointTexture};ZE._maximumHeight=5906376425472;ZE._minimumHeight=-5906376425472;ZE._emptyColor=new At(0,0,0,0);var Est=ZE;function fSi(o){o=ia(o,{url:jk.fromAssetId(96188)});let A=new Fx(o),f=o.style;if(!O(f)){let m=Ae(o.defaultColor,At.WHITE).toCssColorString();f=new mY({color:`Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}) : ${m}`})}return A.style=f,A}var Ist=fSi;function gSi(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=[],f=o.geometry;(!O(f.attributes)||!O(f.primitiveType))&&(f=f.constructor.createGeometry(f));let m=f.attributes,C=Xe.clone(Ae(o.modelMatrix,Xe.IDENTITY)),y=Ae(o.length,1e4);if(O(m.normal)&&A.push(new co({geometry:rc.createLineSegmentsForVectors(f,"normal",y),attributes:{color:new Yo(1,0,0,1)},modelMatrix:C})),O(m.tangent)&&A.push(new co({geometry:rc.createLineSegmentsForVectors(f,"tangent",y),attributes:{color:new Yo(0,1,0,1)},modelMatrix:C})),O(m.bitangent)&&A.push(new co({geometry:rc.createLineSegmentsForVectors(f,"bitangent",y),attributes:{color:new Yo(0,0,1,1)},modelMatrix:C})),A.length>0)return new $a({asynchronous:!1,geometryInstances:A,appearance:new za({flat:!0,translucent:!1})})}var _st=gSi;function oW(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.attributeName,f=o.perInstanceAttribute;O(f)||(f=!1);let m=Ae(o.glslDatatype,"vec3"),C=`v_${A}`,y;if(A==="normal"||A==="tangent"||A==="bitangent")y=`vec4 getColor() { return vec4((${C} + vec3(1.0)) * 0.5, 1.0); }
`;else switch(A==="st"&&(m="vec2"),m){case"float":y=`vec4 getColor() { return vec4(vec3(${C}), 1.0); }
`;break;case"vec2":y=`vec4 getColor() { return vec4(${C}, 0.0, 1.0); }
`;break;case"vec3":y=`vec4 getColor() { return vec4(${C}, 1.0); }
`;break;case"vec4":y=`vec4 getColor() { return ${C}; }
`;break}let x=`attribute vec3 position3DHigh;
attribute vec3 position3DLow;
attribute float batchId;
${f?"":`attribute ${m} ${A};
`}varying ${m} ${C};
void main()
{
vec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);
${f?`${C} = czm_batchTable_${A}(batchId);
`:`${C} = ${A};
`}gl_Position = czm_modelViewProjectionRelativeToEye * p;
}`,v=`varying ${m} ${C};
${y}
void main()
{
gl_FragColor = getColor();
}`;this.material=void 0,this.translucent=Ae(o.translucent,!1),this._vertexShaderSource=Ae(o.vertexShaderSource,x),this._fragmentShaderSource=Ae(o.fragmentShaderSource,v),this._renderState=Sd.getDefaultRenderState(!1,!1,o.renderState),this._closed=Ae(o.closed,!1),this._attributeName=A,this._glslDatatype=m}Object.defineProperties(oW.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}});oW.prototype.getFragmentShaderSource=Sd.prototype.getFragmentShaderSource;oW.prototype.isTranslucent=Sd.prototype.isTranslucent;oW.prototype.getRenderState=Sd.prototype.getRenderState;var Bst=oW;function pae(o){o=Ae(o,Ae.EMPTY_OBJECT),this.length=Ae(o.length,1e7),this._length=void 0,this.width=Ae(o.width,2),this._width=void 0,this.show=Ae(o.show,!0),this.modelMatrix=Xe.clone(Ae(o.modelMatrix,Xe.IDENTITY)),this._modelMatrix=new Xe,this.id=o.id,this._id=void 0,this._primitive=void 0}pae.prototype.update=function(o){if(this.show){if(!O(this._primitive)||!Xe.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=Xe.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,O(this._primitive)&&this._primitive.destroy(),this.modelMatrix[12]===0&&this.modelMatrix[13]===0&&this.modelMatrix[14]===0&&(this.modelMatrix[14]=.01);let A=new co({geometry:new Vk({positions:[ee.ZERO,ee.UNIT_X],width:this.width,vertexFormat:ly.VERTEX_FORMAT,colors:[At.RED,At.RED],arcType:Pa.NONE}),modelMatrix:Xe.multiplyByUniformScale(this.modelMatrix,this.length,new Xe),id:this.id,pickPrimitive:this}),f=new co({geometry:new Vk({positions:[ee.ZERO,ee.UNIT_Y],width:this.width,vertexFormat:ly.VERTEX_FORMAT,colors:[At.GREEN,At.GREEN],arcType:Pa.NONE}),modelMatrix:Xe.multiplyByUniformScale(this.modelMatrix,this.length,new Xe),id:this.id,pickPrimitive:this}),m=new co({geometry:new Vk({positions:[ee.ZERO,ee.UNIT_Z],width:this.width,vertexFormat:ly.VERTEX_FORMAT,colors:[At.BLUE,At.BLUE],arcType:Pa.NONE}),modelMatrix:Xe.multiplyByUniformScale(this.modelMatrix,this.length,new Xe),id:this.id,pickPrimitive:this});this._primitive=new $a({geometryInstances:[A,f,m],appearance:new ly,asynchronous:!1})}this._primitive.update(o)}};pae.prototype.isDestroyed=function(){return!1};pae.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),Qr(this)};var JDe=pae;function pSi(o){this.direction=ee.clone(o.direction),this.color=At.clone(Ae(o.color,At.WHITE)),this.intensity=Ae(o.intensity,1)}var mae=pSi;function jE(o){this._scene=o.scene,this.samplingWindow=Ae(o.samplingWindow,jE.defaultSettings.samplingWindow),this.quietPeriod=Ae(o.quietPeriod,jE.defaultSettings.quietPeriod),this.warmupPeriod=Ae(o.warmupPeriod,jE.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=Ae(o.minimumFrameRateDuringWarmup,jE.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=Ae(o.minimumFrameRateAfterWarmup,jE.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new br,this._nominalFrameRate=new br,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;let A=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener(function(C,y){mSi(A,y)}),this._hiddenPropertyName=document.hidden!==void 0?"hidden":document.mozHidden!==void 0?"mozHidden":document.msHidden!==void 0?"msHidden":document.webkitHidden!==void 0?"webkitHidden":void 0;let f=document.hidden!==void 0?"visibilitychange":document.mozHidden!==void 0?"mozvisibilitychange":document.msHidden!==void 0?"msvisibilitychange":document.webkitHidden!==void 0?"webkitvisibilitychange":void 0;function m(){CSi(A)}this._visibilityChangeRemoveListener=void 0,O(f)&&(document.addEventListener(f,m,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(f,m,!1)})}jE.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8};jE.fromScene=function(o){return(!O(o._frameRateMonitor)||o._frameRateMonitor.isDestroyed())&&(o._frameRateMonitor=new jE({scene:o})),o._frameRateMonitor};Object.defineProperties(jE.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}});jE.prototype.pause=function(){++this._pauseCount,this._pauseCount===1&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)};jE.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)};jE.prototype.isDestroyed=function(){return!1};jE.prototype.destroy=function(){return this._preUpdateRemoveListener(),O(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),Qr(this)};function mSi(o,A){if(o._pauseCount>0)return;let f=GA();if(o._needsQuietPeriod)o._needsQuietPeriod=!1,o._frameTimes.length=0,o._quietPeriodEndTime=f+o.quietPeriod/Uu.SECONDS_PER_MILLISECOND,o._warmupPeriodEndTime=o._quietPeriodEndTime+(o.warmupPeriod+o.samplingWindow)/Uu.SECONDS_PER_MILLISECOND;else if(f>=o._quietPeriodEndTime){o._frameTimes.push(f);let m=f-o.samplingWindow/Uu.SECONDS_PER_MILLISECOND;if(o._frameTimes.length>=2&&o._frameTimes[0]<=m){for(;o._frameTimes.length>=2&&o._frameTimes[1]<m;)o._frameTimes.shift();let C=(f-o._frameTimes[0])/(o._frameTimes.length-1);o._lastFramesPerSecond=1e3/C;let y=1e3/(f>o._warmupPeriodEndTime?o.minimumFrameRateAfterWarmup:o.minimumFrameRateDuringWarmup);C>y?o._frameRateIsLow||(o._frameRateIsLow=!0,o._needsQuietPeriod=!0,o.lowFrameRate.raiseEvent(o.scene,o._lastFramesPerSecond)):o._frameRateIsLow&&(o._frameRateIsLow=!1,o._needsQuietPeriod=!0,o.nominalFrameRate.raiseEvent(o.scene,o._lastFramesPerSecond))}}}function CSi(o){document[o._hiddenPropertyName]?o.pause():o.unpause()}var WDe=jE,ySi=Eh(T7e(),1);function jDe(){this._image=new Image}jDe.prototype.isReady=function(){return!0};jDe.prototype.shouldDiscardImage=function(o){return o===this._image};function aW(o){o=Ae(o,Ae.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;let A;if(O(o.metadata))A=o.metadata;else{let y=An.createIfNeeded(o.url);A=new vN(y)}this._metadata=A,this._tileDiscardPolicy=o.tileDiscardPolicy,this._tilingScheme=new af({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Si(-je.PI,-je.PI,je.PI,je.PI),ellipsoid:o.ellipsoid});let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,O(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new jDe),this._errorEvent=new br,this._ready=!1;let m=this,C;this._readyPromise=A.readyPromise.then(function(y){if(!A.imageryPresent){let x=new nr(`The server ${A.url} doesn't have imagery`);return C=wc.reportError(C,m,m._errorEvent,x.message,void 0,void 0,void 0,x),Promise.reject(x)}return wc.reportSuccess(C),m._ready=y,y}).catch(function(y){return C=wc.reportError(C,m,m._errorEvent,y.message,void 0,void 0,void 0,y),Promise.reject(y)})}Object.defineProperties(aW.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});aW.prototype.getTileCredits=function(o,A,f){let m=this._metadata,C=m.getTileInformation(o,A,f);if(O(C)){let y=m.providers[C.imageryProvider];if(O(y))return[y]}};aW.prototype.requestImage=function(o,A,f,m){let C=this._tileDiscardPolicy._image,y=this._metadata,x=vN.tileXYToQuadKey(o,A,f),v=y.getTileInformation(o,A,f);if(!O(v)){if(y.isValid(x)){let I=new cC({throttle:m.throttle,throttleByServer:m.throttleByServer,type:m.type,priorityFunction:m.priorityFunction});y.populateSubtree(o,A,f,I);return}return Promise.resolve(C)}if(!v.hasImagery())return Promise.resolve(C);let E=xSi(this,v,o,A,f,m).fetchArrayBuffer();if(O(E))return E.then(function(I){LDe(y.key,I);let w=new Uint8Array(I),Q,M=y.protoImagery;if((!O(M)||!M)&&(Q=vSi(w)),!O(Q)&&(!O(M)||M)){let B=ESi(w);Q=B.imageType,w=B.imageData}return!O(Q)||!O(w)?C:fne({uint8Array:w,format:Q,flipY:!0})})};aW.prototype.pickFeatures=function(o,A,f,m,C){};function xSi(o,A,f,m,C,y){let x=vN.tileXYToQuadKey(f,m,C),v=A.imageryVersion;return v=O(v)&&v>0?v:1,o._metadata.resource.getDerivedResource({url:`flatfile?f1-0${x}-i.${v.toString()}`,request:y})}function vSi(o){let A="JFIF";if(o[6]===A.charCodeAt(0)&&o[7]===A.charCodeAt(1)&&o[8]===A.charCodeAt(2)&&o[9]===A.charCodeAt(3))return"image/jpeg";let f="PNG";if(o[1]===f.charCodeAt(0)&&o[2]===f.charCodeAt(1)&&o[3]===f.charCodeAt(2))return"image/png"}function ESi(o){let A=ySi.Reader.create(o),f=A.len,m={};for(;A.pos<f;){let x=A.uint32(),v;switch(x>>>3){case 1:m.imageType=A.uint32();break;case 2:m.imageData=A.bytes();break;case 3:m.alphaType=A.uint32();break;case 4:m.imageAlpha=A.bytes();break;case 5:if(v=m.copyrightIds,O(v)||(v=m.copyrightIds=[]),(x&7)===2){let E=A.uint32()+A.pos;for(;A.pos<E;)v.push(A.uint32())}else v.push(A.uint32());break;default:A.skipType(x&7);break}}let C=m.imageType;if(O(C))switch(C){case 0:m.imageType="image/jpeg";break;case 4:m.imageType="image/png";break;default:throw new nr("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}let y=m.alphaType;return O(y)&&y!==0&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete m.alphaType,delete m.imageAlpha),m}var wst=aW,ISi=new At(1,1,1,.4),_Si=new At(0,1,0,.05),BSi=new At(0,.5,0,.2);function bO(o){o=Ae(o,Ae.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._tilingScheme=O(o.tilingScheme)?o.tilingScheme:new af({ellipsoid:o.ellipsoid}),this._cells=Ae(o.cells,8),this._color=Ae(o.color,ISi),this._glowColor=Ae(o.glowColor,_Si),this._glowWidth=Ae(o.glowWidth,6),this._backgroundColor=Ae(o.backgroundColor,BSi),this._errorEvent=new br,this._tileWidth=Ae(o.tileWidth,256),this._tileHeight=Ae(o.tileHeight,256),this._canvasSize=Ae(o.canvasSize,256),this._canvas=this._createGridCanvas(),this._readyPromise=Promise.resolve(!0)}Object.defineProperties(bO.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});bO.prototype._drawGrid=function(o){let A=this._canvasSize;for(let f=0;f<=this._cells;++f){let m=1+f/this._cells*(A-1);o.moveTo(m,0),o.lineTo(m,A),o.moveTo(0,m),o.lineTo(A,m)}o.stroke()};bO.prototype._createGridCanvas=function(){let o=document.createElement("canvas");o.width=this._canvasSize,o.height=this._canvasSize;let A=0,f=this._canvasSize,m=o.getContext("2d"),C=this._backgroundColor.toCssColorString();m.fillStyle=C,m.fillRect(A,A,f,f);let y=this._glowColor.toCssColorString();m.strokeStyle=y,m.lineWidth=this._glowWidth,m.strokeRect(A,A,f,f),this._drawGrid(m),m.lineWidth=this._glowWidth*.5,m.strokeRect(A,A,f,f),this._drawGrid(m);let x=this._color.toCssColorString();return m.strokeStyle=x,m.lineWidth=2,m.strokeRect(A,A,f,f),m.lineWidth=1,this._drawGrid(m),o};bO.prototype.getTileCredits=function(o,A,f){};bO.prototype.requestImage=function(o,A,f,m){return Promise.resolve(this._canvas)};bO.prototype.pickFeatures=function(o,A,f,m,C){};var bst=bO;function qDe(o,A){this._parent=o,this._dataProvider=o._dataProvider,this._layer=o._layer,O(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${A}`}):this._resource=this._parent.resource.getDerivedResource({url:A})}Object.defineProperties(qDe.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}}});qDe.prototype.load=function(){let o=this;return this._dataProvider._loadJson(this._resource).then(function(A){return o._data=A,A})};var XDe=qDe;function CH(o,A){this._storageInfo=A,this._parent=o,this._dataProvider=o._dataProvider;let f=`attributes/${A.key}/0`;O(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${f}`}):this._resource=this._parent.resource.getDerivedResource({url:f})}Object.defineProperties(CH.prototype,{resource:{get:function(){return this._resource}},header:{get:function(){return this._header}},values:{get:function(){return O(this._values)&&O(this._values.attributeValues)?this._values.attributeValues:[]}},name:{get:function(){return this._storageInfo.name}}});function wSi(o){return o==="UInt8"||o==="Int8"?1:o==="UInt16"||o==="Int16"?2:o==="UInt32"||o==="Int32"||o==="Oid32"||o==="Float32"?4:o==="UInt64"||o==="Int64"||o==="Float64"?8:0}CH.prototype.load=function(){let o=this;return this._dataProvider._loadBinary(this._resource).then(function(A){let f=new DataView(A),m=!0;if(f.getUint8(0)==="{".charCodeAt(0)&&new TextDecoder().decode(A).includes("404")&&(m=!1,console.error(`Failed to load: ${o.resource.url}`)),m){o._data=A;let C=o._parseHeader(f),y=wSi(o._storageInfo.attributeValues.valueType);y>0&&(C=Math.ceil(C/y)*y),o._parseBody(f,C)}})};CH.prototype._parseValue=function(o,A,f){let m;if(A==="UInt8")m=o.getUint8(f),f+=1;else if(A==="Int8")m=o.getInt8(f),f+=1;else if(A==="UInt16")m=o.getUint16(f,!0),f+=2;else if(A==="Int16")m=o.getInt16(f,!0),f+=2;else if(A==="UInt32")m=o.getUint32(f,!0),f+=4;else if(A==="Oid32")m=o.getUint32(f,!0),f+=4;else if(A==="Int32")m=o.getInt32(f,!0),f+=4;else if(A==="UInt64"){let C=o.getUint32(f,!0),y=o.getUint32(f+4,!0);m=C+Math.pow(2,32)*y,f+=8}else if(A==="Int64"){let C=o.getUint32(f,!0),y=o.getUint32(f+4,!0);y<Math.pow(2,31)?m=C+Math.pow(2,32)*y:m=C+Math.pow(2,32)*(y-Math.pow(2,32)),f+=8}else A==="Float32"?(m=o.getFloat32(f,!0),f+=4):A==="Float64"?(m=o.getFloat64(f,!0),f+=8):A==="String"&&(m=String.fromCharCode(o.getUint8(f)),f+=1);return{value:m,offset:f}};CH.prototype._parseHeader=function(o){let A=0;this._header={};for(let f=0;f<this._storageInfo.header.length;f++){let m=this._storageInfo.header[f],C=this._parseValue(o,m.valueType,A);this._header[m.property]=C.value,A=C.offset}return A};CH.prototype._parseBody=function(o,A){this._values={};for(let f=0;f<this._storageInfo.ordering.length;f++){let m=this._storageInfo.ordering[f],C=this._storageInfo[m];if(O(C)){this._values[m]=[];for(let y=0;y<this._header.count;++y)if(C.valueType!=="String"){let x=this._parseValue(o,C.valueType,A);this._values[m].push(x.value),A=x.offset}else{let x=this._values.attributeByteCounts[y],v="";for(let E=0;E<x;++E){let I=this._parseValue(o,C.valueType,A);I.value.charCodeAt(0)!==0&&(v+=I.value),A=I.offset}this._values[m].push(v)}}}};var ZDe=CH;function sW(o,A){let f=o._dataProvider,m=o._layer,C;O(o._nodeIndex)?C=m.resource.getDerivedResource({url:`nodes/${o._data.mesh.geometry.resource}/${A}`}):C=o.resource.getDerivedResource({url:A}),this._parent=o,this._dataProvider=f,this._layer=m,this._resource=C,this._customAttributes=void 0}Object.defineProperties(sW.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},customAttributes:{get:function(){return this._customAttributes}}});sW.prototype.load=function(){let o=this;return this._dataProvider._loadBinary(this._resource).then(function(A){return o._data=A,A})};var bSi=new ee,QSi=new ee,SSi=new ee,DSi=new ee,TSi=new ee;function lpe(o,A,f,m){let C=ee.subtract(m,f,bSi),y=ee.cross(C,ee.subtract(o,f,QSi),DSi),x=ee.cross(C,ee.subtract(A,f,SSi),TSi);return ee.dot(y,x)>=0}var MSi=new ee,PSi=new ee,RSi=new ee,LSi=new ee,FSi=new ee,NSi=new ee,kSi=new ee,OSi=new ee,USi=new ee,GSi=new ee;sW.prototype.getClosestPointIndexOnTriangle=function(o,A,f){if(O(this._customAttributes)&&O(this._customAttributes.positions)){let m=new ee(o,A,f);m.x-=this._customAttributes.cartesianCenter.x,m.y-=this._customAttributes.cartesianCenter.y,m.z-=this._customAttributes.cartesianCenter.z,ci.multiplyByVector(this._customAttributes.parentRotation,m,m);let C=Number.MAX_VALUE,y,x,v,E,I=this._customAttributes.positions,w=this._customAttributes.indices,Q;O(w)?Q=w.length:Q=I.length/3;for(let M=0;M<Q;M++){let B,T,D;O(w)?(B=w[M],T=w[M+1],D=w[M+2]):(B=M*3,T=M*3+1,D=M*3+2);let F=ee.fromElements(I[B*3],I[B*3+1],I[B*3+2],MSi),L=ee.fromElements(I[T*3],I[T*3+1],I[T*3+2],PSi),R=new ee(I[D*3],I[D*3+1],I[D*3+2],RSi);if(!lpe(m,F,L,R)||!lpe(m,L,F,R)||!lpe(m,R,F,L))continue;let k=ee.subtract(L,F,LSi),U=ee.subtract(R,F,FSi),V=ee.cross(k,U,NSi);if(ee.magnitude(V)===0)continue;let H=ee.normalize(V,kSi),q=ee.subtract(m,F,OSi),ie=Math.abs(ee.dot(q,H));if(ie<C){C=ie,y=M;let Z=ee.magnitudeSquared(ee.subtract(m,F,q)),oe=ee.magnitudeSquared(ee.subtract(m,L,USi)),ne=ee.magnitudeSquared(ee.subtract(m,R,GSi));Z<oe&&Z<ne?(v=B,E=F,x=Z):oe<ne?(v=T,E=L,x=oe):(v=D,E=R,x=ne)}}if(O(y))return{index:v,distanceSquared:x,distance:Math.sqrt(x),queriedPosition:m,closestPosition:ee.clone(E)}}return{index:-1,distanceSquared:Number.Infinity,distance:Number.Infinity}};sW.prototype._generateGltf=function(o,A,f,m,C,y){let x={pbrMetallicRoughness:{metallicFactor:0},doubleSided:!0,name:"Material"},v=!1,E,I="";if(O(this._parent._data.mesh)&&O(this._layer._data.materialDefinitions)){let B=this._parent._data.mesh.material.definition;if(B>=0&&B<this._layer._data.materialDefinitions.length&&(E=this._layer._data.materialDefinitions[B],x=E,O(x.pbrMetallicRoughness)&&O(x.pbrMetallicRoughness.baseColorTexture))){v=!0,x.pbrMetallicRoughness.baseColorTexture.index=0;let T="0";if(O(this._layer._data.textureSetDefinitions))for(let D=0;D<this._layer._data.textureSetDefinitions.length;D++){let F=this._layer._data.textureSetDefinitions[D];for(let L=0;L<F.formats.length;L++){let R=F.formats[L];if(R.format==="jpg"){T=R.name;break}}}O(this._parent._data.mesh)&&this._parent._data.mesh.material.resource>=0&&(I=this._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.material.resource}/textures/${T}`}).url)}}else O(this._parent._data.textureData)&&(v=!0,I=this._parent.resource.getDerivedResource({url:`${this._parent._data.textureData[0].href}`}).url,x.pbrMetallicRoughness.baseColorTexture={index:0});let w=[],Q=[],M=[];return v&&(w=[{sampler:0,source:0}],Q=[{uri:I}],M=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]),{scene:0,scenes:[{nodes:o}],nodes:A,meshes:f,buffers:m,bufferViews:C,accessors:y,materials:[x],textures:w,images:Q,samplers:M,asset:{version:"2.0"}}};var vie=sW;function sI(o,A,f){let m,C,y,x;f?(m=0,C=o):(m=o._level+1,C=o._layer),typeof A=="number"?y=A:x=o.resource.getDerivedResource({url:`${A}/`}),this._parent=o,this._dataProvider=o._dataProvider,this._isRoot=f,this._level=m,this._layer=C,this._nodeIndex=y,this._resource=x,this._tile=void 0,this._data=void 0,this._geometryData=[],this._featureData=[],this._fields={},this._children=[],this._childrenReadyPromise=void 0,this._globalTransform=void 0,this._inverseGlobalTransform=void 0,this._inverseRotationMatrix=void 0}Object.defineProperties(sI.prototype,{resource:{get:function(){return this._resource}},layer:{get:function(){return this._layer}},parent:{get:function(){return this._parent}},children:{get:function(){return this._children}},geometryData:{get:function(){return this._geometryData}},featureData:{get:function(){return this._featureData}},fields:{get:function(){return this._fields}},tile:{get:function(){return this._tile}},data:{get:function(){return this._data}}});sI.prototype.load=function(){let o=this;function A(){if(!o._isRoot){let f=o._create3DTileDefinition();o._tile=new Ov(o._layer._tileset,o._dataProvider.resource,f,o._parent._tile),o._tile._i3sNode=o}}return O(this._nodeIndex)?this._layer._getNodeInNodePages(this._nodeIndex).then(function(f){o._data=f;let m;o._isRoot?m="nodes/root/":O(f.mesh)&&(m=`../${f.mesh.geometry.resource}/`),O(m)&&(o._resource=o._parent.resource.getDerivedResource({url:m})),A()}):this._dataProvider._loadJson(this._resource).then(function(f){o._data=f,A()})};sI.prototype.loadFields=function(){let o=this._layer._data.attributeStorageInfo,A=this;function f(C,y){let x=new ZDe(A,C[y]);return A._fields[x._storageInfo.name]=x,x.load()}let m=[];if(O(o))for(let C=0;C<o.length;C++)m.push(f(o,C));return Promise.all(m)};sI.prototype.getFieldsForPickedPosition=function(o){let A=this.geometryData[0];if(!O(A.customAttributes.featureIndex))return{};let f=A.getClosestPointIndexOnTriangle(o.x,o.y,o.z);if(f.index===-1||f.index>A.customAttributes.featureIndex.length)return{};let m=A.customAttributes.featureIndex[f.index];return this.getFieldsForFeature(m)};sI.prototype.getFieldsForFeature=function(o){let A={};for(let f in this.fields)if(this.fields.hasOwnProperty(f)){let m=this.fields[f];o>=0&&o<m.values.length&&(A[m.name]=m.values[o])}return A};sI.prototype._loadChildren=function(){let o=this;if(O(this._childrenReadyPromise))return this._childrenReadyPromise;let A=[];if(O(o._data.children))for(let f=0;f<o._data.children.length;f++){let m=o._data.children[f],C=new sI(o,Ae(m.href,m),!1);o._children.push(C),A.push(C.load())}return this._childrenReadyPromise=Promise.all(A).then(function(){for(let f=0;f<o._children.length;f++)o._tile.children.push(o._children[f]._tile)}),this._childrenReadyPromise};sI.prototype._loadGeometryData=function(){let o=[];if(O(this._data.geometryData))for(let A=0;A<this._data.geometryData.length;A++){let f=new vie(this,this._data.geometryData[A].href);this._geometryData.push(f),o.push(f.load())}else if(O(this._data.mesh)){let A=this._layer._findBestGeometryBuffers(this._data.mesh.geometry.definition,["position","uv0"]),f=`./geometries/${A.bufferIndex}/`,m=new vie(this,f);m._geometryDefinitions=A.definition,m._geometryBufferInfo=A.geometryBufferInfo,this._geometryData.push(m),o.push(m.load())}return Promise.all(o)};sI.prototype._loadFeatureData=function(){let o=[];if(O(this._data.featureData))for(let A=0;A<this._data.featureData.length;A++){let f=new XDe(this,this._data.featureData[A].href);this._featureData.push(f),o.push(f.load())}return Promise.all(o)};sI.prototype._clearGeometryData=function(){this._geometryData=[]};sI.prototype._create3DTileDefinition=function(){let o=this._data.obb,A=this._data.mbs;if(!O(o)&&!O(A)){console.error("Failed to load I3S node. Bounding volume is required.");return}let f;if(O(o)?f=Kt.fromDegrees(o.center[0],o.center[1],o.center[2]):f=Kt.fromDegrees(A[0],A[1],A[2]),O(this._dataProvider._geoidDataList)&&O(f))for(let F=0;F<this._dataProvider._geoidDataList.length;F++){let L=this._dataProvider._geoidDataList[F],R=L.projection.project(f);if(R.x>L.nativeExtent.west&&R.x<L.nativeExtent.east&&R.y>L.nativeExtent.south&&R.y<L.nativeExtent.north){f.height+=VSi(R.x,R.y,L);break}}let m={},C,y=0;O(o)?(m={box:[0,0,0,o.halfSize[0],0,0,0,o.halfSize[1],0,0,0,o.halfSize[2]]},y=Math.max(Math.max(this._data.obb.halfSize[0],this._data.obb.halfSize[1]),this._data.obb.halfSize[2]),C=Di.WGS84.cartographicToCartesian(f)):(m={sphere:[0,0,0,A[3]]},C=Di.WGS84.cartographicToCartesian(f),y=this._data.mbs[3]),y*=2;let x=1/0;if(O(this._data.lodThreshold))if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThresholdSQ"){let F=Math.sqrt(this._data.lodThreshold/(Math.PI*.25));x=y/F}else if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThreshold"){let F=this._data.lodThreshold;x=y/F}else console.error("Invalid lodSelectionMetricType in Layer");else if(O(this._data.lodSelection))for(let F=0;F<this._data.lodSelection.length;F++)this._data.lodSelection[F].metricType==="maxScreenThreshold"&&(x=y/this._data.lodSelection[F].maxError);x===1/0&&(x=1e5);let v=x*16,E=new dC(0,0,0),I=Vn.headingPitchRollQuaternion(C,E);O(this._data.obb)&&(I=new jr(this._data.obb.quaternion[0],this._data.obb.quaternion[1],this._data.obb.quaternion[2],this._data.obb.quaternion[3]));let w=ci.fromQuaternion(I),Q=ci.inverse(w,new ci),M=new Xe(w[0],w[1],w[2],0,w[3],w[4],w[5],0,w[6],w[7],w[8],0,C.x,C.y,C.z,1),B=Xe.inverse(M,new Xe),T=Xe.clone(M);O(this._parent._globalTransform)&&Xe.multiply(M,this._parent._inverseGlobalTransform,T),this._globalTransform=M,this._inverseGlobalTransform=B,this._inverseRotationMatrix=Q;let D=[];for(let F=0;F<this._children.length;F++)D.push(this._children[F]._create3DTileDefinition());return{children:D,refine:"REPLACE",boundingVolume:m,transform:[T[0],T[4],T[8],T[12],T[1],T[5],T[9],T[13],T[2],T[6],T[10],T[14],T[3],T[7],T[11],T[15]],content:{uri:O(this._resource)?this._resource.url:void 0},geometricError:v}};sI.prototype._createI3SDecoderTask=function(o,A){let f=A.geometryData._parent._data,m=A.geometryData._parent._inverseRotationMatrix,C=0,y=0,x=0;O(f.obb)?(C=f.obb.center[0],y=f.obb.center[1],x=f.obb.center[2]):O(f.mbs)&&(C=f.mbs[0],y=f.mbs[1],x=f.mbs[2]);let v=ci.fromRotationX(-je.PI_OVER_TWO),E=new ci;ci.multiply(v,m,E);let I=Kt.fromDegrees(C,y,x),w=Di.WGS84.cartographicToCartesian(I),Q={binaryData:A.geometryData._data,featureData:O(A.featureData)&&O(A.featureData[0])?A.featureData[0].data:void 0,schema:A.defaultGeometrySchema,bufferInfo:A.geometryData._geometryBufferInfo,ellipsoidRadiiSquare:Di.WGS84.radiiSquared,url:A.url,geoidDataList:A.geometryData._dataProvider._geoidDataList,cartographicCenter:I,cartesianCenter:w,parentRotation:E},M=o._getDecoderTaskProcessor(),B=[];return o._taskProcessorReadyPromise.then(function(){return M.scheduleTask(Q,B)})};sI.prototype._createContentURL=function(){let o={scene:0,scenes:[{nodes:[0]}],nodes:[{name:"singleNode"}],meshes:[],buffers:[],bufferViews:[],accessors:[],materials:[],textures:[],images:[],samplers:[],asset:{version:"2.0"}},A=[this._loadGeometryData()];this._dataProvider.legacyVersion16&&A.push(this._loadFeatureData());let f=this;return Promise.all(A).then(function(){let m=Promise.resolve();if(O(f._geometryData)&&f._geometryData.length>0){let C={geometryData:f._geometryData[0],featureData:f._featureData,defaultGeometrySchema:f._layer._data.store.defaultGeometrySchema,url:f._geometryData[0].resource.url,tile:f._tile},y=f._createI3SDecoderTask(f._dataProvider,C);if(!O(y))return;m=y.then(function(x){o=C.geometryData._generateGltf(x.meshData.nodesInScene,x.meshData.nodes,x.meshData.meshes,x.meshData.buffers,x.meshData.bufferViews,x.meshData.accessors),f._geometryData[0]._customAttributes=x.meshData._customAttributes})}return m.then(function(){let C=f._dataProvider._binarizeGltf(o),y=new Blob([C],{type:"application/binary"});f._glbURL=URL.createObjectURL(y)})})};Ov.prototype._hookedRequestContent=Ov.prototype.requestContent;Ov.prototype._resolveHookedObject=function(){let o=this;this._hookedRequestContent(),this._contentReadyToProcessPromise.then(function(){o._contentReadyToProcessDefer.resolve()}),this._contentReadyPromise.then(function(A){o._isLoading=!1,o._contentReadyDefer.resolve(A)})};Ov.prototype.requestContent=function(){let o=this;return this.tileset._isI3STileSet?this._isLoading?1:(this._isLoading=!0,this._contentReadyToProcessDefer=rA(),this._contentReadyDefer=rA(),this._contentReadyToProcessPromise=this._contentReadyToProcessDefer.promise,this._contentReadyPromise=this._contentReadyDefer.promise,this._i3sNode._createContentURL().then(function(){o._contentResource=new An({url:o._i3sNode._glbURL}),o._resolveHookedObject()}),0):this._hookedRequestContent()};function HSi(o,A,f,m,C,y){let x=f*(1-o)+m*o,v=C*(1-o)+y*o;return x*(1-A)+v*A}function O$(o,A,f,m){let C=o+A*f;return m[C]}function VSi(o,A,f){let m=f.nativeExtent,C=(o-m.west)/(m.east-m.west)*(f.width-1),y=(A-m.south)/(m.north-m.south)*(f.height-1),x=Math.floor(C),v=Math.floor(y);C-=x,y-=v;let E=x<f.width?x+1:x,I=v<f.height?v+1:v;v=f.height-1-v,I=f.height-1-I;let w=O$(x,v,f.width,f.buffer),Q=O$(E,v,f.width,f.buffer),M=O$(x,I,f.width,f.buffer),B=O$(E,I,f.width,f.buffer),T=HSi(C,y,w,Q,M,B);return T=T*f.scale+f.offset,T}Object.defineProperties(Ov.prototype,{i3sNode:{get:function(){return this._i3sNode}}});var Eie=sI;function X1(o,A,f){this._dataProvider=o,O(A.href)||(A.href=`./layers/${f}`);let m=this._dataProvider.resource.getUrlComponent(),C="";m.match(/layers\/\d/)?C=`${m}`.replace(/\/+$/,""):C=`${m}`.replace(/\/?$/,"/").concat(`${A.href}`),this._version=A.store.version;let y=this._version.split(".");this._majorVersion=parseInt(y[0]),this._minorVersion=y.length>1?parseInt(y[1]):0,this._resource=new An({url:C}),this._resource.setQueryParameters(this._dataProvider.resource.queryParameters),this._resource.appendForwardSlash(),this._data=A,this._rootNode=void 0,this._nodePages={},this._nodePageFetches={},this._extent=void 0,this._tileset=void 0,this._geometryDefinitions=void 0,this._computeGeometryDefinitions(!0),this._computeExtent()}Object.defineProperties(X1.prototype,{resource:{get:function(){return this._resource}},rootNode:{get:function(){return this._rootNode}},tileset:{get:function(){return this._tileset}},data:{get:function(){return this._data}},version:{get:function(){return this._version}},majorVersion:{get:function(){return this._majorVersion}},minorVersion:{get:function(){return this._minorVersion}},legacyVersion16:{get:function(){if(O(this.version))return this.majorVersion<1||this.majorVersion===1&&this.minorVersion<=6}}});X1.prototype.load=function(){let o=this;return this._data.spatialReference.wkid!==4326?(console.log(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`),Promise.reject()):this._dataProvider._geoidDataIsReadyPromise.then(function(){return o._loadRootNode().then(function(){return o._create3DTileset(),o._tileset.readyPromise.then(function(){if(o._rootNode._tile=o._tileset._root,o._tileset._root._i3sNode=o._rootNode,o.legacyVersion16)return o._rootNode._loadChildren()})})})};X1.prototype._computeGeometryDefinitions=function(o){if(this._geometryDefinitions=[],O(this._data.geometryDefinitions))for(let A=0;A<this._data.geometryDefinitions.length;A++){let f=[],m=this._data.geometryDefinitions[A].geometryBuffers;for(let C=0;C<m.length;C++){let y=m[C],x=[],v=!1;if(O(y.compressedAttributes)&&o){v=!0;let E=y.compressedAttributes.attributes;for(let I=0;I<E.length;I++)x.push(E[I])}else for(let E in y)E!=="offset"&&x.push(E);f.push({compressed:v,attributes:x,index:m.indexOf(y)})}f.sort(function(C,y){return C.compressed&&!y.compressed?-1:!C.compressed&&y.compressed?1:C.attributes.length-y.attributes.length}),this._geometryDefinitions.push(f)}};X1.prototype._findBestGeometryBuffers=function(o,A){let f=this._geometryDefinitions[o];if(O(f))for(let m=0;m<f.length;++m){let C=f[m],y=!1,x=C.attributes;for(let v=0;v<A.length;v++)if(!x.includes(A[v])){y=!0;break}if(!y)return{bufferIndex:C.index,definition:f,geometryBufferInfo:C}}return 0};X1.prototype._loadRootNode=function(){if(O(this._data.nodePages)){let o=0;O(this._data.nodePages.rootIndex)&&(o=this._data.nodePages.rootIndex),this._rootNode=new Eie(this,o,!0)}else this._rootNode=new Eie(this,this._data.store.rootNode,!0);return this._rootNode.load()};X1.prototype._getNodeInNodePages=function(o){let A=Math.floor(o/this._data.nodePages.nodesPerPage),f=o%this._data.nodePages.nodesPerPage,m=this;return this._loadNodePage(A).then(function(){return m._nodePages[A][f]})};X1._fetchJson=function(o){return o.fetchJson()};X1.prototype._loadNodePage=function(o){let A=this;if(!O(this._nodePageFetches[o])){let f=this.resource.getDerivedResource({url:`nodepages/${o}/`}),m=X1._fetchJson(f).then(function(C){return O(C.error)&&C.error.code!==200?Promise.reject(C.error):(A._nodePages[o]=C.nodes,C)});this._nodePageFetches[o]=m}return this._nodePageFetches[o]};X1.prototype._computeExtent=function(){O(this._data.fullExtent)?this._extent=Si.fromDegrees(this._data.fullExtent.xmin,this._data.fullExtent.ymin,this._data.fullExtent.xmax,this._data.fullExtent.ymax):O(this._data.store.extent)&&(this._extent=Si.fromDegrees(this._data.store.extent[0],this._data.store.extent[1],this._data.store.extent[2],this._data.store.extent[3]))};X1.prototype._create3DTileset=function(){let o={asset:{version:"1.0"},geometricError:Number.MAX_VALUE,root:this._rootNode._create3DTileDefinition()},A=new Blob([JSON.stringify(o)],{type:"application/json"}),f=URL.createObjectURL(A),m={};if(O(this._dataProvider._cesium3dTilesetOptions))for(let y in this._dataProvider._cesium3dTilesetOptions)this._dataProvider._cesium3dTilesetOptions.hasOwnProperty(y)&&(m[y]=this._dataProvider._cesium3dTilesetOptions[y]);m.url=f,m.show=this._dataProvider.show,this._tileset=new Fx(m),this._tileset._isI3STileSet=!0;let C=this;this._tileset.readyPromise.then(function(){C._tileset.tileUnload.addEventListener(function(y){y._i3sNode._clearGeometryData(),URL.revokeObjectURL(y._contentResource._url),y._contentResource=y._i3sNode.resource}),C._tileset.tileVisible.addEventListener(function(y){O(y._i3sNode)&&y._i3sNode._loadChildren()})})};var Iie=X1,zSi=Eh(TBt(),1);function dy(o){o=Ae(o,Ae.EMPTY_OBJECT),this._resource=An.createIfNeeded(o.url),this._name=o.name,this._show=Ae(o.show,!0),this._geoidTiledTerrainProvider=o.geoidTiledTerrainProvider,this._traceFetches=Ae(o.traceFetches,!1),this._cesium3dTilesetOptions=Ae(o.cesium3dTilesetOptions,Ae.EMPTY_OBJECT),this._layers=[],this._data=void 0,this._extent=void 0,this._geoidDataIsReadyPromise=void 0,this._geoidDataList=void 0,this._decoderTaskProcessor=void 0,this._readyPromise=void 0,this._ready=!1,this._load()}Object.defineProperties(dy.prototype,{name:{get:function(){return this._name}},show:{get:function(){return this._show},set:function(o){this._show=o;for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&(this._layers[A]._tileset.show=this._show)}},traceFetches:{get:function(){return this._traceFetches},set:function(o){this._traceFetches=o}},geoidTiledTerrainProvider:{get:function(){return this._geoidTiledTerrainProvider}},layers:{get:function(){return this._layers}},data:{get:function(){return this._data}},extent:{get:function(){return this._extent}},readyPromise:{get:function(){return this._readyPromise}},ready:{get:function(){return this._ready}},resource:{get:function(){return this._resource}}});dy.prototype.destroy=function(){for(let o=0;o<this._layers.length;o++)O(this._layers[o]._tileset)&&this._layers[o]._tileset.destroy();return Qr(this)};dy.prototype.isDestroyed=function(){return!1};dy.prototype.update=function(o){for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&this._layers[A]._tileset.ready&&this._layers[A]._tileset.update(o)};dy.prototype.prePassesUpdate=function(o){for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&this._layers[A]._tileset.ready&&this._layers[A]._tileset.prePassesUpdate(o)};dy.prototype.postPassesUpdate=function(o){for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&this._layers[A]._tileset.ready&&this._layers[A]._tileset.postPassesUpdate(o)};dy.prototype.updateForPass=function(o,A){for(let f=0;f<this._layers.length;f++)O(this._layers[f]._tileset)&&this._layers[f]._tileset.ready&&this._layers[f]._tileset.updateForPass(o,A)};dy.prototype._load=function(){let o=this;return this._readyPromise=this._loadJson(this._resource).then(function(A){if(o._data=A,O(o._data.layers))for(let m=0;m<o._data.layers.length;m++){let C=new Iie(o,o._data.layers[m],m);o._layers.push(C)}else{let m=new Iie(o,o._data,o._data.id);o._layers.push(m)}o._computeExtent(),o._loadGeoidData();let f=[];for(let m=0;m<o._layers.length;m++)f.push(o._layers[m].load());return Promise.all(f).then(function(){return o._ready=!0,o})}),this._readyPromise};dy._fetchJson=function(o){return o.fetchJson()};dy.prototype._loadJson=function(o){return this._traceFetches&&console.log("I3S FETCH:",o.url),dy._fetchJson(o).then(function(A){if(O(A.error)){if(console.error("Failed to fetch I3S ",o.url),O(A.error.message)&&console.error(A.error.message),O(A.error.details))for(let f=0;f<A.error.details.length;f++)console.log(A.error.details[f]);return Promise.reject(A.error)}return A})};dy.prototype._loadBinary=function(o){return this._traceFetches&&console.log("I3S FETCH:",o.url),o.fetchArrayBuffer()};dy.prototype._binarizeGltf=function(o){let A=new TextEncoder().encode(JSON.stringify(o)),f=new Uint8Array(A.byteLength+20),m={magic:new Uint8Array(f.buffer,0,4),version:new Uint32Array(f.buffer,4,1),length:new Uint32Array(f.buffer,8,1),chunkLength:new Uint32Array(f.buffer,12,1),chunkType:new Uint32Array(f.buffer,16,1),chunkData:new Uint8Array(f.buffer,20,A.byteLength)};return m.magic[0]="g".charCodeAt(),m.magic[1]="l".charCodeAt(),m.magic[2]="T".charCodeAt(),m.magic[3]="F".charCodeAt(),m.version[0]=2,m.length[0]=f.byteLength,m.chunkLength[0]=A.byteLength,m.chunkType[0]=1313821514,m.chunkData.set(A),f};dy.prototype._getDecoderTaskProcessor=function(){if(!O(this._decoderTaskProcessor)){let o=new Vf("decodeI3S");this._taskProcessorReadyPromise=o.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_decoder_nodejs.js",wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}),this._decoderTaskProcessor=o}return this._decoderTaskProcessor};function KSi(o,A){return o.readyPromise.then(function(){return JSi(o,A)})}var YSi=new It;function JSi(o,A){let f=o.tilingScheme,m=[],C={},y=o._lodCount,x=Kt.fromRadians(A.west,A.north),v=Kt.fromRadians(A.east,A.south),E=f.positionToTileXY(x,y),I=f.positionToTileXY(v,y);for(let Q=E.x;Q<=I.x;Q++)for(let M=E.y;M<=I.y;M++){let B=It.fromElements(Q,M,YSi),T=B.toString();if(!C.hasOwnProperty(T)){let D={x:B.x,y:B.y,level:y,tilingScheme:f,terrainProvider:o,positions:[]};C[T]=D,m.push(D)}}let w=[];for(let Q=0;Q<m.length;++Q){let M=m[Q],B=M.terrainProvider.requestTileGeometry(M.x,M.y,M.level);w.push(B)}return Promise.all(w).then(function(Q){let M=[];for(let B=0;B<Q.length;B++){let T={tilingScheme:f,x:m[B].x,y:m[B].y,level:m[B].level},D=Q[B],F="Geographic";f._projection instanceof OA&&(F="WebMercator");let L={projectionType:F,projection:f._projection,nativeExtent:f.tileXYToNativeRectangle(T.x,T.y,T.level),height:D._height,width:D._width,scale:D._structure.heightScale,offset:D._structure.heightOffset};if(D._encoding===HF.LERC){let R=zSi.default.decode(D._buffer);L.buffer=R.pixels[0]}else L.buffer=D._buffer;M.push(L)}return M})}dy.prototype._loadGeoidData=function(){let o=this,A=this._geoidTiledTerrainProvider;return O(A)?(this._geoidDataIsReadyPromise=A.readyPromise.then(function(){return KSi(A,o._extent).then(function(f){o._geoidDataList=f})}),this._geoidDataIsReadyPromise):(console.log("No Geoid Terrain service provided - no geoid conversion will be performed."),this._geoidDataIsReadyPromise=Promise.resolve(),this._geoidDataIsReadyPromise)};dy.prototype._computeExtent=function(){let o;for(let A=0;A<this._layers.length;A++)if(O(this._layers[A]._extent)){let f=this._layers[A]._extent;O(o)?Si.union(o,f,o):o=Si.clone(f)}this._extent=o};var Qst=dy;function Sst(){}Object.defineProperties(Sst.prototype,{color:{get:Ui.throwInstantiationError},intensity:{get:Ui.throwInstantiationError}});var Dst=Sst,WSi=/\/$/,Tst=new tl('&copy; <a href="https://www.mapbox.com/about/maps/">Mapbox</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function yH(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.styleId,f=o.accessToken;this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;let m=An.createIfNeeded(Ae(o.url,"https://api.mapbox.com/styles/v1/"));this._styleId=A,this._accessToken=f;let C=Ae(o.tilesize,512);this._tilesize=C;let y=Ae(o.username,"mapbox");this._username=y;let x=O(o.scaleFactor)?"@2x":"",v=m.getUrlComponent();WSi.test(v)||(v+="/"),v+=`${this._username}/${A}/tiles/${this._tilesize}/{z}/{x}/{y}${x}`,m.url=v,m.setQueryParameters({access_token:f});let E;O(o.credit)?(E=o.credit,typeof E=="string"&&(E=new tl(E))):E=Tst,this._resource=m,this._imageryProvider=new sw({url:m,credit:E,ellipsoid:o.ellipsoid,minimumLevel:o.minimumLevel,maximumLevel:o.maximumLevel,rectangle:o.rectangle})}Object.defineProperties(yH.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});yH.prototype.getTileCredits=function(o,A,f){};yH.prototype.requestImage=function(o,A,f,m){return this._imageryProvider.requestImage(o,A,f,m)};yH.prototype.pickFeatures=function(o,A,f,m,C){return this._imageryProvider.pickFeatures(o,A,f,m,C)};yH._defaultCredit=Tst;var Mst=yH;function $De(o){}$De.prototype.isReady=function(){return!0};$De.prototype.shouldDiscardImage=function(o){return!1};var Pst=$De,jSi=new It(1,1);function e2e(o){o=Ae(o,Ae.EMPTY_OBJECT),this.mass=Ae(o.mass,1),this.position=ee.clone(Ae(o.position,ee.ZERO)),this.velocity=ee.clone(Ae(o.velocity,ee.ZERO)),this.life=Ae(o.life,Number.MAX_VALUE),this.image=o.image,this.startColor=At.clone(Ae(o.startColor,At.WHITE)),this.endColor=At.clone(Ae(o.endColor,At.WHITE)),this.startScale=Ae(o.startScale,1),this.endScale=Ae(o.endScale,1),this.imageSize=It.clone(Ae(o.imageSize,jSi)),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(e2e.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var s7e=new ee;e2e.prototype.update=function(o,A){return ee.multiplyByScalar(this.velocity,o,s7e),ee.add(this.position,s7e,this.position),O(A)&&A(this,o),this._age+=o,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life};var Cae=e2e;function Rst(o){o=Ae(o,Ae.EMPTY_OBJECT),this.time=Ae(o.time,0),this.minimum=Ae(o.minimum,0),this.maximum=Ae(o.maximum,50),this._complete=!1}Object.defineProperties(Rst.prototype,{complete:{get:function(){return this._complete}}});var xH=Rst;function Lst(o){}Lst.prototype.emit=function(o){Ui.throwInstantiationError()};var Fst=Lst,l7e=new It(1,1);function lW(o){o=Ae(o,Ae.EMPTY_OBJECT),this.show=Ae(o.show,!0),this.updateCallback=o.updateCallback,this.loop=Ae(o.loop,!0),this.image=Ae(o.image,void 0);let A=o.emitter;O(A)||(A=new VDe(.5)),this._emitter=A,this._bursts=o.bursts,this._modelMatrix=Xe.clone(Ae(o.modelMatrix,Xe.IDENTITY)),this._emitterModelMatrix=Xe.clone(Ae(o.emitterModelMatrix,Xe.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new Xe,this._startColor=At.clone(Ae(o.color,Ae(o.startColor,At.WHITE))),this._endColor=At.clone(Ae(o.color,Ae(o.endColor,At.WHITE))),this._startScale=Ae(o.scale,Ae(o.startScale,1)),this._endScale=Ae(o.scale,Ae(o.endScale,1)),this._emissionRate=Ae(o.emissionRate,5),this._minimumSpeed=Ae(o.speed,Ae(o.minimumSpeed,1)),this._maximumSpeed=Ae(o.speed,Ae(o.maximumSpeed,1)),this._minimumParticleLife=Ae(o.particleLife,Ae(o.minimumParticleLife,5)),this._maximumParticleLife=Ae(o.particleLife,Ae(o.maximumParticleLife,5)),this._minimumMass=Ae(o.mass,Ae(o.minimumMass,1)),this._maximumMass=Ae(o.mass,Ae(o.maximumMass,1)),this._minimumImageSize=It.clone(Ae(o.imageSize,Ae(o.minimumImageSize,l7e))),this._maximumImageSize=It.clone(Ae(o.imageSize,Ae(o.maximumImageSize,l7e))),this._sizeInMeters=Ae(o.sizeInMeters,!1),this._lifetime=Ae(o.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new br,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0}Object.defineProperties(lW.prototype,{emitter:{get:function(){return this._emitter},set:function(o){this._emitter=o}},bursts:{get:function(){return this._bursts},set:function(o){this._bursts=o,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(o){this._matrixDirty=this._matrixDirty||!Xe.equals(this._modelMatrix,o),Xe.clone(o,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(o){this._matrixDirty=this._matrixDirty||!Xe.equals(this._emitterModelMatrix,o),Xe.clone(o,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(o){At.clone(o,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(o){At.clone(o,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(o){this._startScale=o}},endScale:{get:function(){return this._endScale},set:function(o){this._endScale=o}},emissionRate:{get:function(){return this._emissionRate},set:function(o){this._emissionRate=o,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(o){this._minimumSpeed=o}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(o){this._maximumSpeed=o}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(o){this._minimumParticleLife=o}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(o){this._maximumParticleLife=o,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(o){this._minimumMass=o}},maximumMass:{get:function(){return this._maximumMass},set:function(o){this._maximumMass=o}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(o){this._minimumImageSize=o}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(o){this._maximumImageSize=o}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(o){this._sizeInMeters=o}},lifetime:{get:function(){return this._lifetime},set:function(o){this._lifetime=o}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});function qSi(o){let A=o._emissionRate,f=o._maximumParticleLife,m=0,C=o._bursts;if(O(C)){let Q=C.length;for(let M=0;M<Q;++M)m+=C[M].maximum}let y=o._billboardCollection,x=o.image,v=Math.ceil(A*f+m),E=o._particles,I=o._particlePool,w=Math.max(v-E.length-I.length,0);for(let Q=0;Q<w;++Q){let M=new Cae;M._billboard=y.add({image:x}),I.push(M)}o._particleEstimate=v}function XSi(o){let A=o._particlePool.pop();return O(A)||(A=new Cae),A}function ZSi(o,A){o._particlePool.push(A)}function $Si(o){let A=o._particles,f=o._particlePool,m=o._billboardCollection,C=A.length,y=f.length,x=o._particleEstimate,v=y-Math.max(x-C-y,0);for(let E=v;E<y;++E){let I=f[E];m.remove(I._billboard)}f.length=v}function eDi(o){O(o._billboard)&&(o._billboard.show=!1)}function u7e(o,A){let f=A._billboard;O(f)||(f=A._billboard=o._billboardCollection.add({image:A.image})),f.width=A.imageSize.x,f.height=A.imageSize.y,f.position=A.position,f.sizeInMeters=o.sizeInMeters,f.show=!0;let m=je.lerp(A.startColor.red,A.endColor.red,A.normalizedAge),C=je.lerp(A.startColor.green,A.endColor.green,A.normalizedAge),y=je.lerp(A.startColor.blue,A.endColor.blue,A.normalizedAge),x=je.lerp(A.startColor.alpha,A.endColor.alpha,A.normalizedAge);f.color=new At(m,C,y,x),f.scale=je.lerp(A.startScale,A.endScale,A.normalizedAge)}function tDi(o,A){A.startColor=At.clone(o._startColor,A.startColor),A.endColor=At.clone(o._endColor,A.endColor),A.startScale=o._startScale,A.endScale=o._endScale,A.image=o.image,A.life=je.randomBetween(o._minimumParticleLife,o._maximumParticleLife),A.mass=je.randomBetween(o._minimumMass,o._maximumMass),A.imageSize.x=je.randomBetween(o._minimumImageSize.x,o._maximumImageSize.x),A.imageSize.y=je.randomBetween(o._minimumImageSize.y,o._maximumImageSize.y),A._normalizedAge=0,A._age=0;let f=je.randomBetween(o._minimumSpeed,o._maximumSpeed);ee.multiplyByScalar(A.velocity,f,A.velocity),o._particles.push(A)}function iDi(o,A){if(o._isComplete)return 0;A=je.mod(A,o._lifetime);let f=A*o._emissionRate,m=Math.floor(f);if(o._carryOver+=f-m,o._carryOver>1&&(m++,o._carryOver-=1),O(o.bursts)){let C=o.bursts.length;for(let y=0;y<C;y++){let x=o.bursts[y],v=o._currentTime;O(x)&&!x._complete&&v>x.time&&(m+=je.randomBetween(x.minimum,x.maximum),x._complete=!0)}}return m}var U$=new ee;lW.prototype.update=function(o){if(!this.show)return;O(this._billboardCollection)||(this._billboardCollection=new iI),this._updateParticlePool&&(qSi(this),this._updateParticlePool=!1);let A=0;this._previousTime&&(A=fi.secondsDifference(o.time,this._previousTime)),A<0&&(A=0);let f=this._particles,m=this._emitter,C=this.updateCallback,y,x,v=f.length;for(y=0;y<v;++y)x=f[y],x.update(A,C)?u7e(this,x):(eDi(x),ZSi(this,x),f[y]=f[v-1],--y,--v);f.length=v;let E=iDi(this,A);if(E>0&&O(m)){this._matrixDirty&&(this._combinedMatrix=Xe.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);let I=this._combinedMatrix;for(y=0;y<E;y++)x=XSi(this),this._emitter.emit(x),ee.add(x.position,x.velocity,U$),Xe.multiplyByPoint(I,U$,U$),x.position=Xe.multiplyByPoint(I,x.position,x.position),ee.subtract(U$,x.position,x.velocity),ee.normalize(x.velocity,x.velocity),tDi(this,x),u7e(this,x)}if(this._billboardCollection.update(o),this._previousTime=fi.clone(o.time,this._previousTime),this._currentTime+=A,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=je.mod(this._currentTime,this._lifetime),this.bursts){let I=this.bursts.length;for(y=0;y<I;y++)this.bursts[y]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);o.frameNumber%120===0&&$Si(this)};lW.prototype.isDestroyed=function(){return!1};lW.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),Qr(this)};var _2=lW;function hB(){Ui.throwInstantiationError()}hB.computeDefaultLevelZeroMaximumGeometricError=function(o){return o.ellipsoid.maximumRadius*2*Math.PI*.25/(65*o.getNumberOfXTilesAtLevel(0))};Object.defineProperties(hB.prototype,{quadtree:{get:Ui.throwInstantiationError,set:Ui.throwInstantiationError},ready:{get:Ui.throwInstantiationError},tilingScheme:{get:Ui.throwInstantiationError},errorEvent:{get:Ui.throwInstantiationError}});hB.prototype.update=Ui.throwInstantiationError;hB.prototype.beginUpdate=Ui.throwInstantiationError;hB.prototype.endUpdate=Ui.throwInstantiationError;hB.prototype.getLevelMaximumGeometricError=Ui.throwInstantiationError;hB.prototype.loadTile=Ui.throwInstantiationError;hB.prototype.computeTileVisibility=Ui.throwInstantiationError;hB.prototype.showTileThisFrame=Ui.throwInstantiationError;hB.prototype.computeDistanceToTile=Ui.throwInstantiationError;hB.prototype.isDestroyed=Ui.throwInstantiationError;hB.prototype.destroy=Ui.throwInstantiationError;var Nst=hB;function t2e(o){o=Ae(o,1),this._radius=Ae(o,1)}Object.defineProperties(t2e.prototype,{radius:{get:function(){return this._radius},set:function(o){this._radius=o}}});t2e.prototype.emit=function(o){let A=je.randomBetween(0,je.TWO_PI),f=je.randomBetween(0,je.PI),m=je.randomBetween(0,this._radius),C=m*Math.cos(A)*Math.sin(f),y=m*Math.sin(A)*Math.sin(f),x=m*Math.cos(f);o.position=ee.fromElements(C,y,x,o.position),o.velocity=ee.normalize(o.position,o.velocity)};var vH=t2e;function uW(){}uW.prototype.evaluate=function(o,A){Ui.throwInstantiationError()};uW.prototype.evaluateColor=function(o,A){Ui.throwInstantiationError()};uW.prototype.getShaderFunction=function(o,A,f,m){Ui.throwInstantiationError()};uW.prototype.getVariables=function(){Ui.throwInstantiationError()};var kst=uW;function EH(){}EH.prototype.boundingVolume=void 0;EH.prototype.boundingSphere=void 0;EH.prototype.distanceToCamera=function(o){Ui.throwInstantiationError()};EH.prototype.intersectPlane=function(o){Ui.throwInstantiationError()};EH.prototype.createDebugVolume=function(o){Ui.throwInstantiationError()};var Ost=EH;function cW(o){o=Ae(o,Ae.EMPTY_OBJECT),this._tilingScheme=O(o.tilingScheme)?o.tilingScheme:new af({ellipsoid:o.ellipsoid}),this._color=Ae(o.color,At.YELLOW),this._errorEvent=new br,this._tileWidth=Ae(o.tileWidth,256),this._tileHeight=Ae(o.tileHeight,256),this._readyPromise=Promise.resolve(!0),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0}Object.defineProperties(cW.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});cW.prototype.getTileCredits=function(o,A,f){};cW.prototype.requestImage=function(o,A,f,m){let C=document.createElement("canvas");C.width=256,C.height=256;let y=C.getContext("2d"),x=this._color.toCssColorString();return y.strokeStyle=x,y.lineWidth=2,y.strokeRect(1,1,255,255),y.font="bold 25px Arial",y.textAlign="center",y.fillStyle=x,y.fillText(`L: ${f}`,124,86),y.fillText(`X: ${o}`,124,136),y.fillText(`Y: ${A}`,124,186),Promise.resolve(C)};cW.prototype.pickFeatures=function(o,A,f,m,C){};var i2e=cW;function r2e(o){Ui.throwInstantiationError()}r2e.prototype.isReady=Ui.throwInstantiationError;r2e.prototype.shouldDiscardImage=Ui.throwInstantiationError;var Ust=r2e,rDi={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},Gst=Object.freeze(rDi);function yae(o,A){this.show=!0,O(o)||(o=new Kr),this.rectangle=Kr.clone(o),O(A)||(A=ss.fromType(ss.ColorType,{color:new At(1,1,1,1)})),this.material=A,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}yae.prototype.update=function(o){if(!this.show)return;let A=this._rs;if((!O(A)||!Kr.equals(A.viewport,this.rectangle))&&(this._rs=fn.fromCache({blending:Bu.ALPHA_BLEND,viewport:this.rectangle})),o.passes.render){let f=o.context;if(this._material!==this.material||!O(this._overlayCommand)){this._material=this.material,O(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();let m=new Fr({sources:[this._material.shaderSource,DDe]});this._overlayCommand=f.createViewportQuadCommand(m,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=hr.OVERLAY}this._material.update(f),this._overlayCommand.renderState=this._rs,this._overlayCommand.uniformMap=this._material._uniforms,o.commandList.push(this._overlayCommand)}};yae.prototype.isDestroyed=function(){return!1};yae.prototype.destroy=function(){return O(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),Qr(this)};var Hst=yae,Vst={};(function(o,A){A(o.JSEncrypt={})})(Vst,function(o){"use strict";var A="0123456789abcdefghijklmnopqrstuvwxyz";function f(We){return A.charAt(We)}function m(We,Oe){return We&Oe}function C(We,Oe){return We|Oe}function y(We,Oe){return We^Oe}function x(We,Oe){return We&~Oe}function v(We){if(We==0)return-1;var Oe=0;return(65535&We)==0&&(We>>=16,Oe+=16),(255&We)==0&&(We>>=8,Oe+=8),(15&We)==0&&(We>>=4,Oe+=4),(3&We)==0&&(We>>=2,Oe+=2),(1&We)==0&&++Oe,Oe}function E(We){for(var Oe=0;We!=0;)We&=We-1,++Oe;return Oe}var I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w="=";function Q(We){var Oe,Ye,rt="";for(Oe=0;Oe+3<=We.length;Oe+=3)Ye=parseInt(We.substring(Oe,Oe+3),16),rt+=I.charAt(Ye>>6)+I.charAt(63&Ye);for(Oe+1==We.length?(Ye=parseInt(We.substring(Oe,Oe+1),16),rt+=I.charAt(Ye<<2)):Oe+2==We.length&&(Ye=parseInt(We.substring(Oe,Oe+2),16),rt+=I.charAt(Ye>>2)+I.charAt((3&Ye)<<4));(3&rt.length)>0;)rt+=w;return rt}var M,B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(We,Oe){We.__proto__=Oe}||function(We,Oe){for(var Ye in Oe)Oe.hasOwnProperty(Ye)&&(We[Ye]=Oe[Ye])},T,D=function(We){var Oe;if(M===void 0){var Ye="0123456789ABCDEF",rt=` \f
`,L1i=At.WHITE,F1i=At.BLACK,N1i=new It(2,2);function k8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=o.evenColor,this.oddColor=o.oddColor,this.repeat=o.repeat}Object.defineProperties(k8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._evenColor)&&Nt.isConstant(this._oddColor)&&Nt.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:Bi("evenColor"),oddColor:Bi("oddColor"),repeat:Bi("repeat")});k8.prototype.getType=function(o){return"Checkerboard"};k8.prototype.getValue=function(o,A){return O(A)||(A={}),A.lightColor=Nt.getValueOrClonedDefault(this._evenColor,o,L1i,A.lightColor),A.darkColor=Nt.getValueOrClonedDefault(this._oddColor,o,F1i,A.darkColor),A.repeat=Nt.getValueOrDefault(this._repeat,o,N1i),A};k8.prototype.equals=function(o){return this===o||o instanceof k8&&Nt.equals(this._evenColor,o._evenColor)&&Nt.equals(this._oddColor,o._oddColor)&&Nt.equals(this._repeat,o._repeat)};var lie=k8,uie={id:void 0},e8=new Array(2);function QCe(o){let A=o.propertyNames,f=A.length;for(let m=0;m<f;m++)o[A[m]]=void 0;o._name=void 0,o._availability=void 0}function qot(o,A,f,m){e8[0]=f,e8[1]=m.id,A[JSON.stringify(e8)]=m.definitionChanged.addEventListener(Sg.prototype._onDefinitionChanged,o)}function Xot(o,A,f,m){e8[0]=f,e8[1]=m.id;let C=JSON.stringify(e8);A[C](),A[C]=void 0}function CN(o){if(o._shouldRecomposite=!0,o._suspendCount!==0)return;let A=o._collections,f=A.length,m=o._collectionsCopy,C=m.length,y,x,v,E,I,w=o._composite,Q=new iw(o),M=o._eventHash,B;for(y=0;y<C;y++)for(I=m[y],I.collectionChanged.removeEventListener(Sg.prototype._onCollectionChanged,o),v=I.values,B=I.id,E=v.length-1;E>-1;E--)x=v[E],Xot(o,M,B,x);for(y=f-1;y>=0;y--)for(I=A[y],I.collectionChanged.addEventListener(Sg.prototype._onCollectionChanged,o),v=I.values,B=I.id,E=v.length-1;E>-1;E--){x=v[E],qot(o,M,B,x);let D=Q.getById(x.id);O(D)||(D=w.getById(x.id),O(D)?QCe(D):(uie.id=x.id,D=new UA(uie)),Q.add(D)),D.merge(x)}o._collectionsCopy=A.slice(0),w.suspendEvents(),w.removeAll();let T=Q.values;for(y=0;y<T.length;y++)w.add(T[y]);w.resumeEvents()}function Sg(o,A){this._owner=A,this._composite=new iw(this),this._suspendCount=0,this._collections=O(o)?o.slice():[],this._collectionsCopy=[],this._id=Vu(),this._eventHash={},CN(this),this._shouldRecomposite=!1}Object.defineProperties(Sg.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}});Sg.prototype.addCollection=function(o,A){O(A)?this._collections.splice(A,0,o):(A=this._collections.length,this._collections.push(o)),CN(this)};Sg.prototype.removeCollection=function(o){let A=this._collections.indexOf(o);return A!==-1?(this._collections.splice(A,1),CN(this),!0):!1};Sg.prototype.removeAllCollections=function(){this._collections.length=0,CN(this)};Sg.prototype.containsCollection=function(o){return this._collections.indexOf(o)!==-1};Sg.prototype.contains=function(o){return this._composite.contains(o)};Sg.prototype.indexOfCollection=function(o){return this._collections.indexOf(o)};Sg.prototype.getCollection=function(o){return this._collections[o]};Sg.prototype.getCollectionsLength=function(){return this._collections.length};function oae(o,A){return o.indexOf(A)}function Zot(o,A,f){let m=o._collections;if(A=je.clamp(A,0,m.length-1),f=je.clamp(f,0,m.length-1),A===f)return;let C=m[A];m[A]=m[f],m[f]=C,CN(o)}Sg.prototype.raiseCollection=function(o){let A=oae(this._collections,o);Zot(this,A,A+1)};Sg.prototype.lowerCollection=function(o){let A=oae(this._collections,o);Zot(this,A,A-1)};Sg.prototype.raiseCollectionToTop=function(o){let A=oae(this._collections,o);A!==this._collections.length-1&&(this._collections.splice(A,1),this._collections.push(o),CN(this))};Sg.prototype.lowerCollectionToBottom=function(o){let A=oae(this._collections,o);A!==0&&(this._collections.splice(A,1),this._collections.splice(0,0,o),CN(this))};Sg.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()};Sg.prototype.resumeEvents=function(){this._suspendCount--,this._shouldRecomposite&&this._suspendCount===0&&(CN(this),this._shouldRecomposite=!1),this._composite.resumeEvents()};Sg.prototype.computeAvailability=function(){return this._composite.computeAvailability()};Sg.prototype.getById=function(o){return this._composite.getById(o)};Sg.prototype._onCollectionChanged=function(o,A,f){let m=this._collectionsCopy,C=m.length,y=this._composite;y.suspendEvents();let x,v,E,I,w=f.length,Q=this._eventHash,M=o.id;for(x=0;x<w;x++){let T=f[x];Xot(this,Q,M,T);let D=T.id;for(v=C-1;v>=0;v--)E=m[v].getById(D),O(E)&&(O(I)||(I=y.getById(D),QCe(I)),I.merge(E));O(I)||y.removeById(D),I=void 0}let B=A.length;for(x=0;x<B;x++){let T=A[x];qot(this,Q,M,T);let D=T.id;for(v=C-1;v>=0;v--)E=m[v].getById(D),O(E)&&(O(I)||(I=y.getById(D),O(I)?QCe(I):(uie.id=D,I=new UA(uie),y.add(I))),I.merge(E));I=void 0}y.resumeEvents()};Sg.prototype._onDefinitionChanged=function(o,A,f,m){let C=this._collections,y=this._composite,x=C.length,v=o.id,E=y.getById(v),I=E[A],w=!O(I),Q=!0;for(let M=x-1;M>=0;M--){let B=C[M].getById(o.id);if(O(B)){let T=B[A];if(O(T)){if(Q)if(Q=!1,O(T.merge)&&O(T.clone))I=T.clone(I);else{I=T;break}I.merge(T)}}}w&&E.propertyNames.indexOf(A)===-1&&E.addProperty(A),E[A]=I};var $ot=Sg;function JF(){this._definitionChanged=new br,this._composite=new P1,this._composite.definitionChanged.addEventListener(JF.prototype._raiseDefinitionChanged,this)}Object.defineProperties(JF.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}});JF.prototype.getType=function(o){let A=this._composite._intervals.findDataForIntervalContainingDate(o);if(O(A))return A.getType(o)};JF.prototype.getValue=function(o,A){let f=this._composite._intervals.findDataForIntervalContainingDate(o);if(O(f))return f.getValue(o,A)};JF.prototype.equals=function(o){return this===o||o instanceof JF&&this._composite.equals(o._composite,Nt.equals)};JF.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var cie=JF,k1i=je.factorial;function gDe(o,A,f,m,C,y){let x=0,v,E,I;if(m>0){for(E=0;E<C;E++){for(v=!1,I=0;I<y.length&&!v;I++)E===y[I]&&(v=!0);v||(y.push(E),x+=gDe(o,A,f,m-1,C,y),y.splice(y.length-1,1))}return x}for(x=1,E=0;E<C;E++){for(v=!1,I=0;I<y.length&&!v;I++)E===y[I]&&(v=!0);v||(x*=o-f[A[E]])}return x}var aae={type:"Hermite"};aae.getRequiredDataPoints=function(o,A){return A=Ae(A,0),Math.max(Math.floor((o+1)/(A+1)),2)};aae.interpolateOrderZero=function(o,A,f,m,C){O(C)||(C=new Array(m));let y,x,v,E,I,w,Q=A.length,M=new Array(m);for(y=0;y<m;y++){C[y]=0;let F=new Array(Q);for(M[y]=F,x=0;x<Q;x++)F[x]=[]}let B=Q,T=new Array(B);for(y=0;y<B;y++)T[y]=y;let D=Q-1;for(E=0;E<m;E++){for(x=0;x<B;x++)w=T[x]*m+E,M[E][0].push(f[w]);for(y=1;y<B;y++){let F=!1;for(x=0;x<B-y;x++){let L=A[T[x]],R=A[T[x+y]],k;R-L<=0?(w=T[x]*m+m*y+E,k=f[w],M[E][y].push(k/k1i(y))):(k=M[E][y-1][x+1]-M[E][y-1][x],M[E][y].push(k/(R-L))),F=F||k!==0}F||(D=y-1)}}for(v=0,I=0;v<=I;v++)for(y=v;y<=D;y++){let F=gDe(o,T,A,v,y,[]);for(E=0;E<m;E++){let L=M[E][y][0];C[E+v*m]+=L*F}}return C};var O1i=[];aae.interpolate=function(o,A,f,m,C,y,x){let v=m*(y+1);O(x)||(x=new Array(v));for(let L=0;L<v;L++)x[L]=0;let E=A.length,I=new Array(E*(C+1)),w;for(w=0;w<E;w++)for(let L=0;L<C+1;L++)I[w*(C+1)+L]=w;let Q=I.length,M=O1i,B=U1i(M,I,A,f,m,C),T=[],D=Q*(Q+1)/2,F=Math.min(B,y);for(let L=0;L<=F;L++)for(w=L;w<=B;w++){T.length=0;let R=gDe(o,I,A,L,w,T),k=Math.floor(w*(1-w)/2)+Q*w;for(let U=0;U<m;U++){let V=Math.floor(U*D),H=M[V+k];x[U+L*m]+=H*R}}return x};function U1i(o,A,f,m,C,y){let x,v,E=-1,I=A.length,w=I*(I+1)/2;for(let Q=0;Q<C;Q++){let M=Math.floor(Q*w);for(x=0;x<I;x++)v=A[x]*C*(y+1)+Q,o[M+x]=m[v];for(let B=1;B<I;B++){let T=0,D=Math.floor(B*(1-B)/2)+I*B,F=!1;for(x=0;x<I-B;x++){let L=f[A[x]],R=f[A[x+B]],k,U;if(R-L<=0)v=A[x]*C*(y+1)+C*B+Q,k=m[v],U=k/je.factorial(B),o[M+D+T]=U,T++;else{let V=Math.floor((B-1)*(2-B)/2)+I*(B-1);k=o[M+V+x+1]-o[M+V+x],U=k/(R-L),o[M+D+T]=U,T++}F=F||k!==0}F&&(E=Math.max(E,B))}}return E}var pDe=aae,mDe={type:"Lagrange"};mDe.getRequiredDataPoints=function(o){return Math.max(o+1,2)};mDe.interpolateOrderZero=function(o,A,f,m,C){O(C)||(C=new Array(m));let y,x,v=A.length;for(y=0;y<m;y++)C[y]=0;for(y=0;y<v;y++){let E=1;for(x=0;x<v;x++)if(x!==y){let I=A[y]-A[x];E*=(o-A[x])/I}for(x=0;x<m;x++)C[x]+=E*f[y*m+x]}return C};var CDe=mDe;function Dx(o,A,f){this.clock=Ae(o,0),this.cone=Ae(A,0),this.magnitude=Ae(f,1)}Dx.fromCartesian3=function(o,A){let f=o.x,m=o.y,C=o.z,y=f*f+m*m;return O(A)||(A=new Dx),A.clock=Math.atan2(m,f),A.cone=Math.atan2(Math.sqrt(y),C),A.magnitude=Math.sqrt(y+C*C),A};Dx.clone=function(o,A){if(O(o))return O(A)?(A.clock=o.clock,A.cone=o.cone,A.magnitude=o.magnitude,A):new Dx(o.clock,o.cone,o.magnitude)};Dx.normalize=function(o,A){return O(A)?(A.clock=o.clock,A.cone=o.cone,A.magnitude=1,A):new Dx(o.clock,o.cone,1)};Dx.equals=function(o,A){return o===A||O(o)&&O(A)&&o.clock===A.clock&&o.cone===A.cone&&o.magnitude===A.magnitude};Dx.equalsEpsilon=function(o,A,f){return f=Ae(f,0),o===A||O(o)&&O(A)&&Math.abs(o.clock-A.clock)<=f&&Math.abs(o.cone-A.cone)<=f&&Math.abs(o.magnitude-A.magnitude)<=f};Dx.prototype.equals=function(o){return Dx.equals(this,o)};Dx.prototype.clone=function(o){return Dx.clone(this,o)};Dx.prototype.equalsEpsilon=function(o,A){return Dx.equalsEpsilon(this,o,A)};Dx.prototype.toString=function(){return`(${this.clock}, ${this.cone}, ${this.magnitude})`};var yDe=Dx,sae=Eh(Z1(),1),G1i=At.WHITE,H1i=.1,V1i=new It(8,8),z1i=new It(0,0),K1i=new It(1,1);function O8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=o.color,this.cellAlpha=o.cellAlpha,this.lineCount=o.lineCount,this.lineThickness=o.lineThickness,this.lineOffset=o.lineOffset}Object.defineProperties(O8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._color)&&Nt.isConstant(this._cellAlpha)&&Nt.isConstant(this._lineCount)&&Nt.isConstant(this._lineThickness)&&Nt.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color"),cellAlpha:Bi("cellAlpha"),lineCount:Bi("lineCount"),lineThickness:Bi("lineThickness"),lineOffset:Bi("lineOffset")});O8.prototype.getType=function(o){return"Grid"};O8.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this._color,o,G1i,A.color),A.cellAlpha=Nt.getValueOrDefault(this._cellAlpha,o,H1i),A.lineCount=Nt.getValueOrClonedDefault(this._lineCount,o,V1i,A.lineCount),A.lineThickness=Nt.getValueOrClonedDefault(this._lineThickness,o,K1i,A.lineThickness),A.lineOffset=Nt.getValueOrClonedDefault(this._lineOffset,o,z1i,A.lineOffset),A};O8.prototype.equals=function(o){return this===o||o instanceof O8&&Nt.equals(this._color,o._color)&&Nt.equals(this._cellAlpha,o._cellAlpha)&&Nt.equals(this._lineCount,o._lineCount)&&Nt.equals(this._lineThickness,o._lineThickness)&&Nt.equals(this._lineOffset,o._lineOffset)};var Aie=O8,Y1i=At.WHITE,J1i=At.TRANSPARENT,W1i=16,j1i=255;function U8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=o.color,this.gapColor=o.gapColor,this.dashLength=o.dashLength,this.dashPattern=o.dashPattern}Object.defineProperties(U8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._color)&&Nt.isConstant(this._gapColor)&&Nt.isConstant(this._dashLength)&&Nt.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color"),gapColor:Bi("gapColor"),dashLength:Bi("dashLength"),dashPattern:Bi("dashPattern")});U8.prototype.getType=function(o){return"PolylineDash"};U8.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this._color,o,Y1i,A.color),A.gapColor=Nt.getValueOrClonedDefault(this._gapColor,o,J1i,A.gapColor),A.dashLength=Nt.getValueOrDefault(this._dashLength,o,W1i,A.dashLength),A.dashPattern=Nt.getValueOrDefault(this._dashPattern,o,j1i,A.dashPattern),A};U8.prototype.equals=function(o){return this===o||o instanceof U8&&Nt.equals(this._color,o._color)&&Nt.equals(this._gapColor,o._gapColor)&&Nt.equals(this._dashLength,o._dashLength)&&Nt.equals(this._dashPattern,o._dashPattern)};var Vl=U8,q1i=At.WHITE,X1i=.25,Z1i=1;function G8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=o.color,this.glowPower=o.glowPower,this.taperPower=o.taperPower}Object.defineProperties(G8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._color)&&Nt.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Bi("color"),glowPower:Bi("glowPower"),taperPower:Bi("taperPower")});G8.prototype.getType=function(o){return"PolylineGlow"};G8.prototype.getValue=function(o,A){return O(A)||(A={}),A.color=Nt.getValueOrClonedDefault(this._color,o,q1i,A.color),A.glowPower=Nt.getValueOrDefault(this._glowPower,o,X1i,A.glowPower),A.taperPower=Nt.getValueOrDefault(this._taperPower,o,Z1i,A.taperPower),A};G8.prototype.equals=function(o){return this===o||o instanceof G8&&Nt.equals(this._color,o._color)&&Nt.equals(this._glowPower,o._glowPower)&&Nt.equals(this._taperPower,o._taperPower)};var hie=G8;function WF(o){this._value=void 0,this._definitionChanged=new br,this._eventHelper=new Mx,this.setValue(o)}Object.defineProperties(WF.prototype,{isConstant:{get:function(){let o=this._value;if(!O(o))return!0;let A=o.length;for(let f=0;f<A;f++)if(!Nt.isConstant(o[f]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}});WF.prototype.getValue=function(o,A){let f=this._value;if(!O(f))return;let m=f.length;O(A)||(A=new Array(m));let C=0,y=0;for(;C<m;){let x=this._value[C].getValue(o,A[C]);O(x)&&(A[y]=x,y++),C++}return A.length=y,A};WF.prototype.setValue=function(o){let A=this._eventHelper;if(A.removeAll(),O(o)){this._value=o.slice();let f=o.length;for(let m=0;m<f;m++){let C=o[m];O(C)&&A.add(C.definitionChanged,WF.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};WF.prototype.equals=function(o){return this===o||o instanceof WF&&Nt.arrayEquals(this._value,o._value)};WF.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var lae=WF,$1i={packedLength:1,pack:function(o,A,f){return f=Ae(f,0),A[f]=o,A},unpack:function(o,A,f){return A=Ae(A,0),o[A]},convertPackedArrayForInterpolation:function(o,A,f,m){O(m)||(m=[]),A=Ae(A,0),f=Ae(f,o.length);let C;for(let y=0,x=f-A+1;y<x;y++){let v=o[A+y];y===0||Math.abs(C-v)<Math.PI?m[y]=v:m[y]=v-je.TWO_PI,C=v}},unpackInterpolationResult:function(o,A,f,m,C){return C=o[0],C<0?C+je.TWO_PI:C}},YD=$1i,ewi={HORIZONTAL:0,VERTICAL:1},jF=Object.freeze(ewi),twi=jF.HORIZONTAL,iwi=At.WHITE,rwi=At.BLACK,nwi=0,owi=1;function H8(o){o=Ae(o,Ae.EMPTY_OBJECT),this._definitionChanged=new br,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=o.orientation,this.evenColor=o.evenColor,this.oddColor=o.oddColor,this.offset=o.offset,this.repeat=o.repeat}Object.defineProperties(H8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._orientation)&&Nt.isConstant(this._evenColor)&&Nt.isConstant(this._oddColor)&&Nt.isConstant(this._offset)&&Nt.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:Bi("orientation"),evenColor:Bi("evenColor"),oddColor:Bi("oddColor"),offset:Bi("offset"),repeat:Bi("repeat")});H8.prototype.getType=function(o){return"Stripe"};H8.prototype.getValue=function(o,A){return O(A)||(A={}),A.horizontal=Nt.getValueOrDefault(this._orientation,o,twi)===jF.HORIZONTAL,A.evenColor=Nt.getValueOrClonedDefault(this._evenColor,o,iwi,A.evenColor),A.oddColor=Nt.getValueOrClonedDefault(this._oddColor,o,rwi,A.oddColor),A.offset=Nt.getValueOrDefault(this._offset,o,nwi),A.repeat=Nt.getValueOrDefault(this._repeat,o,owi),A};H8.prototype.equals=function(o){return this===o||o instanceof H8&&Nt.equals(this._orientation,o._orientation)&&Nt.equals(this._evenColor,o._evenColor)&&Nt.equals(this._oddColor,o._oddColor)&&Nt.equals(this._offset,o._offset)&&Nt.equals(this._repeat,o._repeat)};var die=H8;function V8(o,A){this._position=void 0,this._subscription=void 0,this._definitionChanged=new br,this._normalize=Ae(A,!0),this.position=o}Object.defineProperties(V8.prototype,{isConstant:{get:function(){return Nt.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(o){let A=this._position;A!==o&&(O(A)&&this._subscription(),this._position=o,O(o)&&(this._subscription=o._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(o){this._normalize!==o&&(this._normalize=o,this._definitionChanged.raiseEvent(this))}}});var awi=new ee,fze=new ee,gze=new fi,$0e=1/60;V8.prototype.getValue=function(o,A){return this._getValue(o,A)};V8.prototype._getValue=function(o,A,f){O(A)||(A=new ee);let m=this._position;if(Nt.isConstant(m))return this._normalize?void 0:ee.clone(ee.ZERO,A);let C=m.getValue(o,awi),y=m.getValue(fi.addSeconds(o,$0e,gze),fze);if(!O(C)||!O(y)&&(y=C,C=m.getValue(fi.addSeconds(o,-$0e,gze),fze),!O(C)))return;if(ee.equals(C,y))return this._normalize?void 0:ee.clone(ee.ZERO,A);O(f)&&C.clone(f);let x=ee.subtract(y,C,A);return this._normalize?ee.normalize(x,A):ee.divideByScalar(x,$0e,A)};V8.prototype.equals=function(o){return this===o||o instanceof V8&&Nt.equals(this._position,o._position)};var uae=V8;function zK(o,A){this._velocityVectorProperty=new uae(o,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new br,this.ellipsoid=Ae(A,Di.WGS84);let f=this;this._velocityVectorProperty.definitionChanged.addEventListener(function(){f._definitionChanged.raiseEvent(f)})}Object.defineProperties(zK.prototype,{isConstant:{get:function(){return Nt.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(o){this._velocityVectorProperty.position=o}},ellipsoid:{get:function(){return this._ellipsoid},set:function(o){this._ellipsoid!==o&&(this._ellipsoid=o,this._definitionChanged.raiseEvent(this))}}});var pze=new ee,swi=new ee,mze=new ci;zK.prototype.getValue=function(o,A){let f=this._velocityVectorProperty._getValue(o,swi,pze);if(O(f))return Vn.rotationMatrixFromPositionVelocity(pze,f,this._ellipsoid,mze),jr.fromRotationMatrix(mze,A)};zK.prototype.equals=function(o){return this===o||o instanceof zK&&Nt.equals(this._velocityVectorProperty,o._velocityVectorProperty)&&(this._ellipsoid===o._ellipsoid||this._ellipsoid.equals(o._ellipsoid))};var xDe=zK;function qF(){}qF.packedLength=ee.packedLength;qF.unpack=ee.unpack;qF.pack=ee.pack;var SCe;function KK(o,A){return A[0]==="#"&&(A=SCe+A),DY.fromString(o,A)}function Cze(o,A,f){if(O(f.reference))return KK(A,f.reference);if(O(f.velocityReference)){let m=KK(A,f.velocityReference);switch(o){case ee:case qF:return new uae(m,o===qF);case jr:return new xDe(m)}}throw new nr(`${JSON.stringify(f)} is not valid CZML.`)}function lwi(o,A){return new Bn(function(f,m){return A(o.getValue(f,m))},o.isConstant)}var ac=new ee,vv=new yDe,ax=new Kt,BO=new el,P$=new jr;function uwi(o){let A=o.rgbaf;if(O(A))return A;let f=o.rgba;if(!O(f))return;let m=f.length;if(m===At.packedLength)return[At.byteToFloat(f[0]),At.byteToFloat(f[1]),At.byteToFloat(f[2]),At.byteToFloat(f[3])];A=new Array(m);for(let C=0;C<m;C+=5)A[C]=f[C],A[C+1]=At.byteToFloat(f[C+1]),A[C+2]=At.byteToFloat(f[C+2]),A[C+3]=At.byteToFloat(f[C+3]),A[C+4]=At.byteToFloat(f[C+4]);return A}function yze(o,A){let f=Ae(o.uri,o);return O(A)?A.getDerivedResource({url:f}):An.createIfNeeded(f)}function cwi(o){let A=o.wsen;if(O(A))return A;let f=o.wsenDegrees;if(!O(f))return;let m=f.length;if(m===Si.packedLength)return[je.toRadians(f[0]),je.toRadians(f[1]),je.toRadians(f[2]),je.toRadians(f[3])];A=new Array(m);for(let C=0;C<m;C+=5)A[C]=f[C],A[C+1]=je.toRadians(f[C+1]),A[C+2]=je.toRadians(f[C+2]),A[C+3]=je.toRadians(f[C+3]),A[C+4]=je.toRadians(f[C+4]);return A}function Awi(o){let A=o.length;if(vv.magnitude=1,A===2)return vv.clock=o[0],vv.cone=o[1],ee.fromSpherical(vv,ac),[ac.x,ac.y,ac.z];let f=new Array(A/3*4);for(let m=0,C=0;m<A;m+=3,C+=4)f[C]=o[m],vv.clock=o[m+1],vv.cone=o[m+2],ee.fromSpherical(vv,ac),f[C+1]=ac.x,f[C+2]=ac.y,f[C+3]=ac.z;return f}function hwi(o){let A=o.length;if(A===3)return vv.clock=o[0],vv.cone=o[1],vv.magnitude=o[2],ee.fromSpherical(vv,ac),[ac.x,ac.y,ac.z];let f=new Array(A);for(let m=0;m<A;m+=4)f[m]=o[m],vv.clock=o[m+1],vv.cone=o[m+2],vv.magnitude=o[m+3],ee.fromSpherical(vv,ac),f[m+1]=ac.x,f[m+2]=ac.y,f[m+3]=ac.z;return f}function dwi(o){let A=o.length;if(A===3)return ax.longitude=o[0],ax.latitude=o[1],ax.height=o[2],Di.WGS84.cartographicToCartesian(ax,ac),[ac.x,ac.y,ac.z];let f=new Array(A);for(let m=0;m<A;m+=4)f[m]=o[m],ax.longitude=o[m+1],ax.latitude=o[m+2],ax.height=o[m+3],Di.WGS84.cartographicToCartesian(ax,ac),f[m+1]=ac.x,f[m+2]=ac.y,f[m+3]=ac.z;return f}function fwi(o){let A=o.length;if(A===3)return ax.longitude=je.toRadians(o[0]),ax.latitude=je.toRadians(o[1]),ax.height=o[2],Di.WGS84.cartographicToCartesian(ax,ac),[ac.x,ac.y,ac.z];let f=new Array(A);for(let m=0;m<A;m+=4)f[m]=o[m],ax.longitude=je.toRadians(o[m+1]),ax.latitude=je.toRadians(o[m+2]),ax.height=o[m+3],Di.WGS84.cartographicToCartesian(ax,ac),f[m+1]=ac.x,f[m+2]=ac.y,f[m+3]=ac.z;return f}function vDe(o){let A=o.cartesian;if(O(A))return A;let f=o.cartesianVelocity;if(O(f))return f;let m=o.unitCartesian;if(O(m))return m;let C=o.unitSpherical;if(O(C))return Awi(C);let y=o.spherical;if(O(y))return hwi(y);let x=o.cartographicRadians;if(O(x))return dwi(x);let v=o.cartographicDegrees;if(O(v))return fwi(v);throw new nr(`${JSON.stringify(o)} is not a valid CZML interval.`)}function xze(o,A){ee.unpack(o,A,ac),ee.normalize(ac,ac),ee.pack(ac,o,A)}function gwi(o){let A=vDe(o);if(A.length===3)return xze(A,0),A;for(let f=1;f<A.length;f+=4)xze(A,f);return A}function vze(o,A){jr.unpack(o,A,P$),jr.normalize(P$,P$),jr.pack(P$,o,A)}function pwi(o){let A=o.unitQuaternion;if(O(A)){if(A.length===4)return vze(A,0),A;for(let f=1;f<A.length;f+=5)vze(A,f)}return A}function Eze(o){return typeof o=="boolean"?Boolean:typeof o=="number"?Number:typeof o=="string"?String:o.hasOwnProperty("array")?Array:o.hasOwnProperty("boolean")?Boolean:o.hasOwnProperty("boundingRectangle")?Kr:o.hasOwnProperty("cartesian2")?It:o.hasOwnProperty("cartesian")||o.hasOwnProperty("spherical")||o.hasOwnProperty("cartographicRadians")||o.hasOwnProperty("cartographicDegrees")?ee:o.hasOwnProperty("unitCartesian")||o.hasOwnProperty("unitSpherical")?qF:o.hasOwnProperty("rgba")||o.hasOwnProperty("rgbaf")?At:o.hasOwnProperty("arcType")?Pa:o.hasOwnProperty("classificationType")?Gu:o.hasOwnProperty("colorBlendMode")?HD:o.hasOwnProperty("cornerType")?ZA:o.hasOwnProperty("heightReference")?xn:o.hasOwnProperty("horizontalOrigin")?tA:o.hasOwnProperty("date")?fi:o.hasOwnProperty("labelStyle")?mA:o.hasOwnProperty("number")?Number:o.hasOwnProperty("nearFarScalar")?To:o.hasOwnProperty("distanceDisplayCondition")?$o:o.hasOwnProperty("object")||o.hasOwnProperty("value")?Object:o.hasOwnProperty("unitQuaternion")?jr:o.hasOwnProperty("shadowMode")?Al:o.hasOwnProperty("string")?String:o.hasOwnProperty("stripeOrientation")?jF:o.hasOwnProperty("wsen")||o.hasOwnProperty("wsenDegrees")?Si:o.hasOwnProperty("uri")?sae.default:o.hasOwnProperty("verticalOrigin")?bn:Object}function mwi(o,A,f){switch(o){case Pa:return Pa[Ae(A.arcType,A)];case Array:return A.array;case Boolean:return Ae(A.boolean,A);case Kr:return A.boundingRectangle;case It:return A.cartesian2;case ee:return vDe(A);case qF:return gwi(A);case At:return uwi(A);case Gu:return Gu[Ae(A.classificationType,A)];case HD:return HD[Ae(A.colorBlendMode,A)];case ZA:return ZA[Ae(A.cornerType,A)];case xn:return xn[Ae(A.heightReference,A)];case tA:return tA[Ae(A.horizontalOrigin,A)];case Image:return yze(A,f);case fi:return fi.fromIso8601(Ae(A.date,A));case mA:return mA[Ae(A.labelStyle,A)];case Number:return Ae(A.number,A);case To:return A.nearFarScalar;case $o:return A.distanceDisplayCondition;case Object:return Ae(Ae(A.object,A.value),A);case jr:return pwi(A);case YD:return Ae(A.number,A);case Al:return Al[Ae(Ae(A.shadowMode,A.shadows),A)];case String:return Ae(A.string,A);case jF:return jF[Ae(A.stripeOrientation,A)];case Si:return cwi(A);case sae.default:return yze(A,f);case bn:return bn[Ae(A.verticalOrigin,A)];default:throw new nr(o)}}var Cwi={HERMITE:pDe,LAGRANGE:CDe,LINEAR:Tre};function fie(o,A){let f=o.interpolationAlgorithm,m=o.interpolationDegree;(O(f)||O(m))&&A.setInterpolationOptions({interpolationAlgorithm:Cwi[f],interpolationDegree:m});let C=o.forwardExtrapolationType;O(C)&&(A.forwardExtrapolationType=mD[C]);let y=o.forwardExtrapolationDuration;O(y)&&(A.forwardExtrapolationDuration=y);let x=o.backwardExtrapolationType;O(x)&&(A.backwardExtrapolationType=mD[x]);let v=o.backwardExtrapolationDuration;O(v)&&(A.backwardExtrapolationDuration=v)}var Ize={iso8601:void 0};function lf(o){if(O(o))return Ize.iso8601=o,el.fromIso8601(Ize)}function EDe(o){let A=Cn.MAXIMUM_INTERVAL.clone();return A.data=o,A}function _ze(o){let A=new P1;return A.intervals.addInterval(EDe(o)),A}function Bze(o){let A=new U_(o.referenceFrame);return A.intervals.addInterval(EDe(o)),A}function gie(o,A,f,m,C,y,x){let v=lf(m.interval);O(C)&&(O(v)?v=el.intersect(v,C,BO):v=C);let E,I,w,Q=!O(m.reference)&&!O(m.velocityReference),M=O(v)&&!v.equals(Cn.MAXIMUM_INTERVAL);if(m.delete===!0){if(!M){A[f]=void 0;return}return eat(A[f],v)}let B=!1;if(Q){if(I=mwi(o,m,y),!O(I))return;E=Ae(o.packedLength,1),w=Ae(I.length,1),B=!O(m.array)&&typeof I!="string"&&w>E&&o!==Object}let T=typeof o.unpack=="function"&&o!==YD;if(!B&&!M){Q?A[f]=new bc(T?o.unpack(I,0):I):A[f]=Cze(o,x,m);return}let D=A[f],F,L=m.epoch;if(O(L)&&(F=fi.fromIso8601(L)),B&&!M){D instanceof uM||(A[f]=D=new uM(o)),D.addSamplesPackedArray(I,F),fie(m,D);return}let R;if(!B&&M){v=v.clone(),Q?v.data=T?o.unpack(I,0):I:v.data=Cze(o,x,m),O(D)||(A[f]=D=Q?new g8:new P1),Q&&D instanceof g8?D.intervals.addInterval(v):D instanceof P1?(Q&&(v.data=new bc(v.data)),D.intervals.addInterval(v)):(A[f]=D=_ze(D),Q&&(v.data=new bc(v.data)),D.intervals.addInterval(v));return}O(D)||(A[f]=D=new P1),D instanceof P1||(A[f]=D=_ze(D));let k=D.intervals;R=k.findInterval(v),(!O(R)||!(R.data instanceof uM))&&(R=v.clone(),R.data=new uM(o),k.addInterval(R)),R.data.addSamplesPackedArray(I,F),fie(m,R.data)}function eat(o,A){if(o instanceof uM){o.removeSamples(A);return}else if(o instanceof g8){o.intervals.removeInterval(A);return}else if(o instanceof P1){let f=o.intervals;for(let m=0;m<f.length;++m){let C=el.intersect(f.get(m),A,BO);C.isEmpty||eat(C.data,A)}f.removeInterval(A);return}}function zi(o,A,f,m,C,y,x){if(O(m))if(Array.isArray(m))for(let v=0,E=m.length;v<E;++v)gie(o,A,f,m[v],C,y,x);else gie(o,A,f,m,C,y,x)}function wze(o,A,f,m,C,y){let x=lf(f.interval);O(m)&&(O(x)?x=el.intersect(x,m,BO):x=m);let v=O(f.cartesianVelocity)?1:0,E=ee.packedLength*(v+1),I,w,Q=!O(f.reference),M=O(x)&&!x.equals(Cn.MAXIMUM_INTERVAL);if(f.delete===!0){if(!M){o[A]=void 0;return}return tat(o[A],x)}let B,T=!1;if(Q&&(O(f.referenceFrame)&&(B=s0[f.referenceFrame]),B=Ae(B,s0.FIXED),I=vDe(f),w=Ae(I.length,1),T=w>E),!T&&!M){Q?o[A]=new _D(ee.unpack(I),B):o[A]=KK(y,f.reference);return}let D=o[A],F,L=f.epoch;if(O(L)&&(F=fi.fromIso8601(L)),T&&!M){(!(D instanceof R1)||O(B)&&D.referenceFrame!==B)&&(o[A]=D=new R1(B,v)),D.addSamplesPackedArray(I,F),fie(f,D);return}let R;if(!T&&M){x=x.clone(),Q?x.data=ee.unpack(I):x.data=KK(y,f.reference),O(D)||(Q?D=new T8(B):D=new U_(B),o[A]=D),Q&&D instanceof T8&&O(B)&&D.referenceFrame===B?D.intervals.addInterval(x):D instanceof U_?(Q&&(x.data=new _D(x.data,B)),D.intervals.addInterval(x)):(o[A]=D=Bze(D),Q&&(x.data=new _D(x.data,B)),D.intervals.addInterval(x));return}O(D)?D instanceof U_||(o[A]=D=Bze(D)):o[A]=D=new U_(B);let k=D.intervals;R=k.findInterval(x),(!O(R)||!(R.data instanceof R1)||O(B)&&R.data.referenceFrame!==B)&&(R=x.clone(),R.data=new R1(B,v),k.addInterval(R)),R.data.addSamplesPackedArray(I,F),fie(f,R.data)}function tat(o,A){if(o instanceof R1){o.removeSamples(A);return}else if(o instanceof T8){o.intervals.removeInterval(A);return}else if(o instanceof U_){let f=o.intervals;for(let m=0;m<f.length;++m){let C=el.intersect(f.get(m),A,BO);C.isEmpty||tat(C.data,A)}f.removeInterval(A);return}}function iat(o,A,f,m,C,y){if(O(f))if(Array.isArray(f))for(let x=0,v=f.length;x<v;++x)wze(o,A,f[x],m,C,y);else wze(o,A,f,m,C,y)}function bze(o,A,f,m){O(f.references)?cae(o,A,f.references,f.interval,m,lae,P1):(O(f.cartesian2)?f.array=It.unpackArray(f.cartesian2):O(f.cartesian)&&(f.array=It.unpackArray(f.cartesian)),O(f.array)&&zi(Array,o,A,f,void 0,void 0,m))}function Qze(o,A,f,m,C,y){let x=lf(f.interval);O(m)&&(O(x)?x=el.intersect(x,m,BO):x=m);let v=o[A],E,I;if(O(x)){v instanceof cie||(v=new cie,o[A]=v);let Q=v.intervals;I=Q.findInterval({start:x.start,stop:x.stop}),O(I)?E=I.data:(I=x.clone(),Q.addInterval(I))}else E=v;let w;O(f.solidColor)?(E instanceof Fa||(E=new Fa),w=f.solidColor,zi(At,E,"color",w.color,void 0,void 0,y)):O(f.grid)?(E instanceof Aie||(E=new Aie),w=f.grid,zi(At,E,"color",w.color,void 0,C,y),zi(Number,E,"cellAlpha",w.cellAlpha,void 0,C,y),zi(It,E,"lineCount",w.lineCount,void 0,C,y),zi(It,E,"lineThickness",w.lineThickness,void 0,C,y),zi(It,E,"lineOffset",w.lineOffset,void 0,C,y)):O(f.image)?(E instanceof z0||(E=new z0),w=f.image,zi(Image,E,"image",w.image,void 0,C,y),zi(It,E,"repeat",w.repeat,void 0,C,y),zi(At,E,"color",w.color,void 0,C,y),zi(Boolean,E,"transparent",w.transparent,void 0,C,y)):O(f.stripe)?(E instanceof die||(E=new die),w=f.stripe,zi(jF,E,"orientation",w.orientation,void 0,C,y),zi(At,E,"evenColor",w.evenColor,void 0,C,y),zi(At,E,"oddColor",w.oddColor,void 0,C,y),zi(Number,E,"offset",w.offset,void 0,C,y),zi(Number,E,"repeat",w.repeat,void 0,C,y)):O(f.polylineOutline)?(E instanceof JM||(E=new JM),w=f.polylineOutline,zi(At,E,"color",w.color,void 0,C,y),zi(At,E,"outlineColor",w.outlineColor,void 0,C,y),zi(Number,E,"outlineWidth",w.outlineWidth,void 0,C,y)):O(f.polylineGlow)?(E instanceof hie||(E=new hie),w=f.polylineGlow,zi(At,E,"color",w.color,void 0,C,y),zi(Number,E,"glowPower",w.glowPower,void 0,C,y),zi(Number,E,"taperPower",w.taperPower,void 0,C,y)):O(f.polylineArrow)?(E instanceof IK||(E=new IK),w=f.polylineArrow,zi(At,E,"color",w.color,void 0,void 0,y)):O(f.polylineDash)?(E instanceof Vl||(E=new Vl),w=f.polylineDash,zi(At,E,"color",w.color,void 0,void 0,y),zi(At,E,"gapColor",w.gapColor,void 0,void 0,y),zi(Number,E,"dashLength",w.dashLength,void 0,C,y),zi(Number,E,"dashPattern",w.dashPattern,void 0,C,y)):O(f.checkerboard)&&(E instanceof lie||(E=new lie),w=f.checkerboard,zi(At,E,"evenColor",w.evenColor,void 0,C,y),zi(At,E,"oddColor",w.oddColor,void 0,C,y),zi(It,E,"repeat",w.repeat,void 0,C,y)),O(I)?I.data=E:o[A]=E}function nB(o,A,f,m,C,y){if(O(f))if(Array.isArray(f))for(let x=0,v=f.length;x<v;++x)Qze(o,A,f[x],m,C,y);else Qze(o,A,f,m,C,y)}function ywi(o,A,f,m){let C=A.name;O(C)&&(o.name=A.name)}function xwi(o,A,f,m){let C=A.description;O(C)&&zi(String,o,"description",C,void 0,m,f)}function vwi(o,A,f,m){let C=A.position;O(C)&&iat(o,"position",C,void 0,m,f)}function Ewi(o,A,f,m){let C=A.viewFrom;O(C)&&zi(ee,o,"viewFrom",C,void 0,m,f)}function Iwi(o,A,f,m){let C=A.orientation;O(C)&&zi(jr,o,"orientation",C,void 0,m,f)}function _wi(o,A,f,m){let C=A.properties;if(O(C)){O(o.properties)||(o.properties=new LD);for(let y in C)if(C.hasOwnProperty(y)){o.properties.hasProperty(y)||o.properties.addProperty(y);let x=C[y];if(Array.isArray(x))for(let v=0,E=x.length;v<E;++v)gie(Eze(x[v]),o.properties,y,x[v],void 0,m,f);else gie(Eze(x),o.properties,y,x,void 0,m,f)}}}function cae(o,A,f,m,C,y,x){let v=f.map(function(E){return KK(C,E)});if(O(m)){m=lf(m);let E=o[A];if(!(E instanceof x)){let I=new x;I.intervals.addInterval(EDe(E)),o[A]=E=I}m.data=new y(v),E.intervals.addInterval(m)}else o[A]=new y(v)}function Sze(o,A,f,m){let C=f.references;O(C)?cae(o,A,C,f.interval,m,lae,P1):zi(Array,o,A,f,void 0,void 0,m)}function Dze(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;++C)Sze(o,A,f[C],m);else Sze(o,A,f,m)}function Tze(o,A,f,m){let C=f.references;O(C)?cae(o,A,C,f.interval,m,f8,U_):(O(f.cartesian)?f.array=ee.unpackArray(f.cartesian):O(f.cartographicRadians)?f.array=ee.fromRadiansArrayHeights(f.cartographicRadians):O(f.cartographicDegrees)&&(f.array=ee.fromDegreesArrayHeights(f.cartographicDegrees)),O(f.array)&&zi(Array,o,A,f,void 0,void 0,m))}function tW(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;++C)Tze(o,A,f[C],m);else Tze(o,A,f,m)}function Bwi(o){return ee.unpackArray(o)}function wwi(o){return ee.fromRadiansArrayHeights(o)}function bwi(o){return ee.fromDegreesArrayHeights(o)}function Mze(o,A,f,m){let C=f.references;if(O(C)){let y=C.map(function(x){let v={};return cae(v,"positions",x,f.interval,m,f8,U_),v.positions});o[A]=new f8(y)}else O(f.cartesian)?f.array=f.cartesian.map(Bwi):O(f.cartographicRadians)?f.array=f.cartographicRadians.map(wwi):O(f.cartographicDegrees)&&(f.array=f.cartographicDegrees.map(bwi)),O(f.array)&&zi(Array,o,A,f,void 0,void 0,m)}function Qwi(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;++C)Mze(o,A,f[C],m);else Mze(o,A,f,m)}function Swi(o,A,f,m){if(O(f))if(Array.isArray(f))for(let C=0,y=f.length;C<y;C++)bze(o,A,f[C],m);else bze(o,A,f,m)}function Dwi(o,A,f,m){let C=A.availability;if(!O(C))return;let y;if(Array.isArray(C))for(let x=0,v=C.length;x<v;++x)O(y)||(y=new mx),y.addInterval(lf(C[x]));else y=new mx,y.addInterval(lf(C));o.availability=y}function Twi(o,A,f,m,C){!O(A)||zi(qF,o,"alignedAxis",A,f,m,C)}function Mwi(o,A,f,m){let C=A.billboard;if(!O(C))return;let y=lf(C.interval),x=o.billboard;O(x)||(o.billboard=x=new eP),zi(Boolean,x,"show",C.show,y,m,f),zi(Image,x,"image",C.image,y,m,f),zi(Number,x,"scale",C.scale,y,m,f),zi(It,x,"pixelOffset",C.pixelOffset,y,m,f),zi(ee,x,"eyeOffset",C.eyeOffset,y,m,f),zi(tA,x,"horizontalOrigin",C.horizontalOrigin,y,m,f),zi(bn,x,"verticalOrigin",C.verticalOrigin,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"color",C.color,y,m,f),zi(YD,x,"rotation",C.rotation,y,m,f),Twi(x,C.alignedAxis,y,m,f),zi(Boolean,x,"sizeInMeters",C.sizeInMeters,y,m,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(To,x,"scaleByDistance",C.scaleByDistance,y,m,f),zi(To,x,"translucencyByDistance",C.translucencyByDistance,y,m,f),zi(To,x,"pixelOffsetScaleByDistance",C.pixelOffsetScaleByDistance,y,m,f),zi(Kr,x,"imageSubRegion",C.imageSubRegion,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Number,x,"disableDepthTestDistance",C.disableDepthTestDistance,y,m,f)}function Pwi(o,A,f,m){let C=A.box;if(!O(C))return;let y=lf(C.interval),x=o.box;O(x)||(o.box=x=new gre),zi(Boolean,x,"show",C.show,y,m,f),zi(ee,x,"dimensions",C.dimensions,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function Rwi(o,A,f,m){let C=A.corridor;if(!O(C))return;let y=lf(C.interval),x=o.corridor;O(x)||(o.corridor=x=new pre),zi(Boolean,x,"show",C.show,y,m,f),tW(x,"positions",C.positions,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(ZA,x,"cornerType",C.cornerType,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function Lwi(o,A,f,m){let C=A.cylinder;if(!O(C))return;let y=lf(C.interval),x=o.cylinder;O(x)||(o.cylinder=x=new mre),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"length",C.length,y,m,f),zi(Number,x,"topRadius",C.topRadius,y,m,f),zi(Number,x,"bottomRadius",C.bottomRadius,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"numberOfVerticalLines",C.numberOfVerticalLines,y,m,f),zi(Number,x,"slices",C.slices,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function Fwi(o,A){let f=o.version;if(O(f)&&typeof f=="string"){let y=f.split(".");if(y.length===2){if(y[0]!=="1")throw new nr("Cesium only supports CZML version 1.");A._version=f}}if(!O(A._version))throw new nr("CZML version information invalid.  It is expected to be a property on the document object in the <Major>.<Minor> version format.");let m=A._documentPacket;O(o.name)&&(m.name=o.name);let C=o.clock;if(O(C)){let y=m.clock;O(y)?(y.interval=Ae(C.interval,y.interval),y.currentTime=Ae(C.currentTime,y.currentTime),y.range=Ae(C.range,y.range),y.step=Ae(C.step,y.step),y.multiplier=Ae(C.multiplier,y.multiplier)):m.clock={interval:C.interval,currentTime:C.currentTime,range:C.range,step:C.step,multiplier:C.multiplier}}}function Nwi(o,A,f,m){let C=A.ellipse;if(!O(C))return;let y=lf(C.interval),x=o.ellipse;O(x)||(o.ellipse=x=new Cre),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"semiMajorAxis",C.semiMajorAxis,y,m,f),zi(Number,x,"semiMinorAxis",C.semiMinorAxis,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(YD,x,"rotation",C.rotation,y,m,f),zi(YD,x,"stRotation",C.stRotation,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"numberOfVerticalLines",C.numberOfVerticalLines,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function kwi(o,A,f,m){let C=A.ellipsoid;if(!O(C))return;let y=lf(C.interval),x=o.ellipsoid;O(x)||(o.ellipsoid=x=new u6),zi(Boolean,x,"show",C.show,y,m,f),zi(ee,x,"radii",C.radii,y,m,f),zi(ee,x,"innerRadii",C.innerRadii,y,m,f),zi(Number,x,"minimumClock",C.minimumClock,y,m,f),zi(Number,x,"maximumClock",C.maximumClock,y,m,f),zi(Number,x,"minimumCone",C.minimumCone,y,m,f),zi(Number,x,"maximumCone",C.maximumCone,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"stackPartitions",C.stackPartitions,y,m,f),zi(Number,x,"slicePartitions",C.slicePartitions,y,m,f),zi(Number,x,"subdivisions",C.subdivisions,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function Owi(o,A,f,m){let C=A.label;if(!O(C))return;let y=lf(C.interval),x=o.label;O(x)||(o.label=x=new c6),zi(Boolean,x,"show",C.show,y,m,f),zi(String,x,"text",C.text,y,m,f),zi(String,x,"font",C.font,y,m,f),zi(mA,x,"style",C.style,y,m,f),zi(Number,x,"scale",C.scale,y,m,f),zi(Boolean,x,"showBackground",C.showBackground,y,m,f),zi(At,x,"backgroundColor",C.backgroundColor,y,m,f),zi(It,x,"backgroundPadding",C.backgroundPadding,y,m,f),zi(It,x,"pixelOffset",C.pixelOffset,y,m,f),zi(ee,x,"eyeOffset",C.eyeOffset,y,m,f),zi(tA,x,"horizontalOrigin",C.horizontalOrigin,y,m,f),zi(bn,x,"verticalOrigin",C.verticalOrigin,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"fillColor",C.fillColor,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(To,x,"translucencyByDistance",C.translucencyByDistance,y,m,f),zi(To,x,"pixelOffsetScaleByDistance",C.pixelOffsetScaleByDistance,y,m,f),zi(To,x,"scaleByDistance",C.scaleByDistance,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Number,x,"disableDepthTestDistance",C.disableDepthTestDistance,y,m,f)}function Uwi(o,A,f,m){let C=A.model;if(!O(C))return;let y=lf(C.interval),x=o.model;O(x)||(o.model=x=new EY),zi(Boolean,x,"show",C.show,y,m,f),zi(sae.default,x,"uri",C.gltf,y,m,f),zi(Number,x,"scale",C.scale,y,m,f),zi(Number,x,"minimumPixelSize",C.minimumPixelSize,y,m,f),zi(Number,x,"maximumScale",C.maximumScale,y,m,f),zi(Boolean,x,"incrementallyLoadTextures",C.incrementallyLoadTextures,y,m,f),zi(Boolean,x,"runAnimations",C.runAnimations,y,m,f),zi(Boolean,x,"clampAnimations",C.clampAnimations,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"silhouetteColor",C.silhouetteColor,y,m,f),zi(Number,x,"silhouetteSize",C.silhouetteSize,y,m,f),zi(At,x,"color",C.color,y,m,f),zi(HD,x,"colorBlendMode",C.colorBlendMode,y,m,f),zi(Number,x,"colorBlendAmount",C.colorBlendAmount,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f);let v,E,I=C.nodeTransformations;if(O(I))if(Array.isArray(I))for(v=0,E=I.length;v<E;++v)Pze(x,I[v],y,m,f);else Pze(x,I,y,m,f);let w=C.articulations;if(O(w))if(Array.isArray(w))for(v=0,E=w.length;v<E;++v)Rze(x,w[v],y,m,f);else Rze(x,w,y,m,f)}function Pze(o,A,f,m,C){let y=lf(A.interval);O(f)&&(O(y)?y=el.intersect(y,f,BO):y=f);let x=o.nodeTransformations,v=Object.keys(A);for(let E=0,I=v.length;E<I;++E){let w=v[E];if(w==="interval")continue;let Q=A[w];if(!O(Q))continue;O(x)||(o.nodeTransformations=x=new LD),x.hasProperty(w)||x.addProperty(w);let M=x[w];O(M)||(x[w]=M=new yre),zi(ee,M,"translation",Q.translation,y,m,C),zi(jr,M,"rotation",Q.rotation,y,m,C),zi(ee,M,"scale",Q.scale,y,m,C)}}function Rze(o,A,f,m,C){let y=lf(A.interval);O(f)&&(O(y)?y=el.intersect(y,f,BO):y=f);let x=o.articulations,v=Object.keys(A);for(let E=0,I=v.length;E<I;++E){let w=v[E];if(w==="interval")continue;let Q=A[w];!O(Q)||(O(x)||(o.articulations=x=new LD),x.hasProperty(w)||x.addProperty(w),zi(Number,x,w,Q,y,m,C))}}function Gwi(o,A,f,m){let C=A.path;if(!O(C))return;let y=lf(C.interval),x=o.path;O(x)||(o.path=x=new IY),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"leadTime",C.leadTime,y,m,f),zi(Number,x,"trailTime",C.trailTime,y,m,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"resolution",C.resolution,y,m,f),nB(x,"material",C.material,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function Hwi(o,A,f,m){let C=A.point;if(!O(C))return;let y=lf(C.interval),x=o.point;O(x)||(o.point=x=new vre),zi(Boolean,x,"show",C.show,y,m,f),zi(Number,x,"pixelSize",C.pixelSize,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(At,x,"color",C.color,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(To,x,"scaleByDistance",C.scaleByDistance,y,m,f),zi(To,x,"translucencyByDistance",C.translucencyByDistance,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Number,x,"disableDepthTestDistance",C.disableDepthTestDistance,y,m,f)}function YK(o){this.polygon=o,this._definitionChanged=new br}Object.defineProperties(YK.prototype,{isConstant:{get:function(){let o=this.polygon._positions,A=this.polygon._holes;return(!O(o)||o.isConstant)&&(!O(A)||A.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}});YK.prototype.getValue=function(o,A){let f;O(this.polygon._positions)&&(f=this.polygon._positions.getValue(o));let m;return O(this.polygon._holes)&&(m=this.polygon._holes.getValue(o),O(m)&&(m=m.map(function(C){return new Un(C)}))),O(A)?(A.positions=f,A.holes=m,A):new Un(f,m)};YK.prototype.equals=function(o){return this===o||o instanceof YK&&Nt.equals(this.polygon._positions,o.polygon._positions)&&Nt.equals(this.polygon._holes,o.polygon._holes)};function Vwi(o,A,f,m){let C=A.polygon;if(!O(C))return;let y=lf(C.interval),x=o.polygon;O(x)||(o.polygon=x=new yl),zi(Boolean,x,"show",C.show,y,m,f),tW(x,"_positions",C.positions,f),Qwi(x,"_holes",C.holes,f),(O(x._positions)||O(x._holes))&&(x.hierarchy=new YK(x)),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(YD,x,"stRotation",C.stRotation,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Boolean,x,"perPositionHeight",C.perPositionHeight,y,m,f),zi(Boolean,x,"closeTop",C.closeTop,y,m,f),zi(Boolean,x,"closeBottom",C.closeBottom,y,m,f),zi(Pa,x,"arcType",C.arcType,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function zwi(o){return o?Pa.GEODESIC:Pa.NONE}function Kwi(o,A,f,m){let C=A.polyline;if(!O(C))return;let y=lf(C.interval),x=o.polyline;if(O(x)||(o.polyline=x=new FD),zi(Boolean,x,"show",C.show,y,m,f),tW(x,"positions",C.positions,f),zi(Number,x,"width",C.width,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),nB(x,"material",C.material,y,m,f),nB(x,"depthFailMaterial",C.depthFailMaterial,y,m,f),zi(Pa,x,"arcType",C.arcType,y,m,f),zi(Boolean,x,"clampToGround",C.clampToGround,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f),O(C.followSurface)&&!O(C.arcType)){let v={};zi(Boolean,v,"followSurface",C.followSurface,y,m,f),x.arcType=lwi(v.followSurface,zwi)}}function Ywi(o,A,f,m){let C=A.polylineVolume;if(!O(C))return;let y=lf(C.interval),x=o.polylineVolume;O(x)||(o.polylineVolume=x=new Ere),tW(x,"positions",C.positions,f),Swi(x,"shape",C.shape,f),zi(Boolean,x,"show",C.show,y,m,f),zi(ZA,x,"cornerType",C.cornerType,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function Jwi(o,A,f,m){let C=A.rectangle;if(!O(C))return;let y=lf(C.interval),x=o.rectangle;O(x)||(o.rectangle=x=new A6),zi(Boolean,x,"show",C.show,y,m,f),zi(Si,x,"coordinates",C.coordinates,y,m,f),zi(Number,x,"height",C.height,y,m,f),zi(xn,x,"heightReference",C.heightReference,y,m,f),zi(Number,x,"extrudedHeight",C.extrudedHeight,y,m,f),zi(xn,x,"extrudedHeightReference",C.extrudedHeightReference,y,m,f),zi(YD,x,"rotation",C.rotation,y,m,f),zi(YD,x,"stRotation",C.stRotation,y,m,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f),zi(Gu,x,"classificationType",C.classificationType,y,m,f),zi(Number,x,"zIndex",C.zIndex,y,m,f)}function Wwi(o,A,f,m){let C=A.tileset;if(!O(C))return;let y=lf(C.interval),x=o.tileset;O(x)||(o.tileset=x=new xre),zi(Boolean,x,"show",C.show,y,m,f),zi(sae.default,x,"uri",C.uri,y,m,f),zi(Number,x,"maximumScreenSpaceError",C.maximumScreenSpaceError,y,m,f)}function jwi(o,A,f,m){let C=A.wall;if(!O(C))return;let y=lf(C.interval),x=o.wall;O(x)||(o.wall=x=new _Y),zi(Boolean,x,"show",C.show,y,m,f),tW(x,"positions",C.positions,f),Dze(x,"minimumHeights",C.minimumHeights,f),Dze(x,"maximumHeights",C.maximumHeights,f),zi(Number,x,"granularity",C.granularity,y,m,f),zi(Boolean,x,"fill",C.fill,y,m,f),nB(x,"material",C.material,y,m,f),zi(Boolean,x,"outline",C.outline,y,m,f),zi(At,x,"outlineColor",C.outlineColor,y,m,f),zi(Number,x,"outlineWidth",C.outlineWidth,y,m,f),zi(Al,x,"shadows",C.shadows,y,m,f),zi($o,x,"distanceDisplayCondition",C.distanceDisplayCondition,y,m,f)}function Lze(o,A,f,m,C){let y=o.id;if(O(y)||(y=Vu()),SCe=y,!O(C._version)&&y!=="document")throw new nr("The first CZML packet is required to be the document object.");if(o.delete===!0)A.removeById(y);else if(y==="document")Fwi(o,C);else{let x=A.getOrCreateEntity(y),v=o.parent;O(v)&&(x.parent=A.getOrCreateEntity(v));for(let E=f.length-1;E>-1;E--)f[E](x,o,A,m)}SCe=void 0}function qwi(o){let A,f=o._documentPacket.clock;if(!O(f)){if(!O(o._clock)){let C=o._entityCollection.computeAvailability();if(!C.start.equals(Cn.MINIMUM_VALUE)){let y=C.start,x=C.stop,v=fi.secondsDifference(x,y),E=Math.round(v/120);return A=new A5,A.startTime=fi.clone(y),A.stopTime=fi.clone(x),A.clockRange=aC.LOOP_STOP,A.multiplier=E,A.currentTime=fi.clone(y),A.clockStep=jh.SYSTEM_CLOCK_MULTIPLIER,o._clock=A,!0}}return!1}O(o._clock)?A=o._clock.clone():(A=new A5,A.startTime=Cn.MINIMUM_VALUE.clone(),A.stopTime=Cn.MAXIMUM_VALUE.clone(),A.currentTime=Cn.MINIMUM_VALUE.clone(),A.clockRange=aC.LOOP_STOP,A.clockStep=jh.SYSTEM_CLOCK_MULTIPLIER,A.multiplier=1);let m=lf(f.interval);return O(m)&&(A.startTime=m.start,A.stopTime=m.stop),O(f.currentTime)&&(A.currentTime=fi.fromIso8601(f.currentTime)),O(f.range)&&(A.clockRange=Ae(aC[f.range],aC.LOOP_STOP)),O(f.step)&&(A.clockStep=Ae(jh[f.step],jh.SYSTEM_CLOCK_MULTIPLIER)),O(f.multiplier)&&(A.multiplier=f.multiplier),A.equals(o._clock)?!1:(o._clock=A.clone(o._clock),!0)}function rat(o,A,f,m){f=Ae(f,Ae.EMPTY_OBJECT);let C=A,y=f.sourceUri,x=f.credit;if(typeof x=="string"&&(x=new tl(x)),o._credit=x,typeof A=="string"||A instanceof An){A=An.createIfNeeded(A),C=A.fetchJson(),y=Ae(y,A.clone());let v=o._resourceCredits,E=A.credits;if(O(E)){let I=E.length;for(let w=0;w<I;w++)v.push(E[w])}}return y=An.createIfNeeded(y),cy.setLoading(o,!0),Promise.resolve(C).then(function(v){return Xwi(o,v,y,m)}).catch(function(v){return cy.setLoading(o,!1),o._error.raiseEvent(o,v),console.log(v),Promise.reject(v)})}function Xwi(o,A,f,m){cy.setLoading(o,!0);let C=o._entityCollection;m&&(o._version=void 0,o._documentPacket=new nat,C.removeAll()),aI._processCzml(A,C,f,void 0,o);let y=qwi(o),x=o._documentPacket;return O(x.name)&&o._name!==x.name?(o._name=x.name,y=!0):!O(o._name)&&O(f)&&(o._name=wY(f.getUrlComponent()),y=!0),cy.setLoading(o,!1),y&&o._changed.raiseEvent(o),o}function nat(){this.name=void 0,this.clock=void 0}function aI(o){this._name=o,this._changed=new br,this._error=new br,this._isLoading=!1,this._loading=new br,this._clock=void 0,this._documentPacket=new nat,this._version=void 0,this._entityCollection=new iw(this),this._entityCluster=new eN,this._credit=void 0,this._resourceCredits=[]}aI.load=function(o,A){return new aI().load(o,A)};Object.defineProperties(aI.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(o){this._entityCollection.show=o}},clustering:{get:function(){return this._entityCluster},set:function(o){this._entityCluster=o}},credit:{get:function(){return this._credit}}});aI.updaters=[Mwi,Pwi,Rwi,Lwi,Nwi,kwi,Owi,Uwi,ywi,xwi,Gwi,Hwi,Vwi,Kwi,Ywi,_wi,Jwi,vwi,Wwi,Ewi,jwi,Iwi,Dwi];aI.prototype.process=function(o,A){return rat(this,o,A,!1)};aI.prototype.load=function(o,A){return rat(this,o,A,!0)};aI.prototype.update=function(o){return!0};aI.processPacketData=zi;aI.processPositionPacketData=iat;aI.processMaterialPacketData=nB;aI._processCzml=function(o,A,f,m,C){if(m=Ae(m,aI.updaters),Array.isArray(o))for(let y=0,x=o.length;y<x;++y)Lze(o[y],A,m,f,C);else Lze(o,A,m,f,C)};var iW=aI,DCe=32,Zwi="http://www.opengis.net/kml/2.2",Gb="http://www.google.com/kml/ext/2.2",$wi="http://www.w3.org/2000/xmlns/";function Aae(o){this._files={},this._promises=[],this._count=0,this._modelCallback=o}var ebi=/^data:image\/([^,;]+)/;Aae.prototype.texture=function(o){let A=this,f;if(typeof o=="string"||o instanceof An){if(o=An.createIfNeeded(o),!o.isDataUri)return o.url;let m=o.url.match(ebi);f=`texture_${++this._count}`,O(m)&&(f+=`.${m[1]}`);let C=o.fetchBlob().then(function(y){A._files[f]=y});return this._promises.push(C),f}if(o instanceof HTMLCanvasElement){f=`texture_${++this._count}.png`;let m=new Promise(C=>{o.toBlob(function(y){A._files[f]=y,C()})});return this._promises.push(m),f}return""};function tbi(o,A){return function(f){o._files[A]=f}}Aae.prototype.model=function(o,A){let f=this._modelCallback;if(!O(f))throw new nr("Encountered a model entity while exporting to KML, but no model callback was supplied.");let m={},C=f(o,A,m);for(let y in m)if(m.hasOwnProperty(y)){let x=Promise.resolve(m[y]);this._promises.push(x),x.then(tbi(this,y))}return C};Object.defineProperties(Aae.prototype,{promise:{get:function(){return Promise.all(this._promises)}},files:{get:function(){return this._files}}});function hae(o){this._time=o}hae.prototype.get=function(o,A,f){let m;return O(o)&&(m=O(o.getValue)?o.getValue(this._time,f):o),Ae(m,A)};hae.prototype.getColor=function(o,A){let f=this.get(o,A);if(O(f))return Dk(f)};hae.prototype.getMaterialType=function(o){if(O(o))return o.getType(this._time)};function IDe(){this._ids={},this._styles={},this._count=0}IDe.prototype.get=function(o){let A=this._ids,f=o.innerHTML;if(O(A[f]))return A[f];let m=`style-${++this._count}`;return o.setAttribute("id",m),m=`#${m}`,A[f]=m,this._styles[f]=o,m};IDe.prototype.save=function(o){let A=this._styles,f=o.childNodes[0];for(let m in A)A.hasOwnProperty(m)&&o.insertBefore(A[m],f)};function oat(){this._ids={}}oat.prototype.get=function(o){if(!O(o))return this.get(Vu());let A=this._ids;return O(A[o])?`${o.toString()}-${++A[o]}`:(A[o]=0,o)};function _De(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.entities,f=Ae(o.kmz,!1),m=_De._createState(o),C=A.values.filter(function(I){return!O(I.parent)}),y=m.kmlDoc,x=y.documentElement;x.setAttributeNS($wi,"xmlns:gx",Gb);let v=y.createElement("Document");x.appendChild(v),sat(m,v,C),m.styleCache.save(v);let E=m.externalFileHandler;return E.promise.then(function(){let I=new XMLSerializer().serializeToString(m.kmlDoc);return f?ibi(I,E.files):{kml:I,externalFiles:E.files}})}function ibi(o,A){let f=xs("ThirdParty/Workers/z-worker-pako.js");ZEe({workerScripts:{deflate:[f,"./pako_deflate.min.js"],inflate:[f,"./pako_inflate.min.js"]}});let m=new Gje,C=new bGt(m);return C.add("doc.kml",new qUt(o)).then(function(){let y=Object.keys(A);return aat(C,y,A,0)}).then(function(){return C.close()}).then(function(y){return{kmz:y}})}function aat(o,A,f,m){if(A.length===m)return;let C=A[m];return o.add(C,new rIe(f[C])).then(function(){return aat(o,A,f,m+1)})}_De._createState=function(o){let A=o.entities,f=new IDe,m=A.computeAvailability(),C=O(o.time)?o.time:m.start,y=Ae(o.defaultAvailability,m),x=Ae(o.sampleDuration,60);y.start===Cn.MINIMUM_VALUE?y.stop===Cn.MAXIMUM_VALUE?y=new el:fi.addSeconds(y.stop,-10*x,y.start):y.stop===Cn.MAXIMUM_VALUE&&fi.addSeconds(y.start,10*x,y.stop);let v=new Aae(o.modelCallback);return{kmlDoc:document.implementation.createDocument(Zwi,"kml"),ellipsoid:Ae(o.ellipsoid,Di.WGS84),idManager:new oat,styleCache:f,externalFileHandler:v,time:C,valueGetter:new hae(C),sampleDuration:x,defaultAvailability:new mx([y])}};function sat(o,A,f){let m=o.kmlDoc,C=o.styleCache,y=o.valueGetter,x=o.idManager,v=f.length,E,I,w;for(let Q=0;Q<v;++Q){let M=f[Q];E=[],I=[],w=[],rbi(o,M,I,w),nbi(o,M.polyline,I,w),Nze(o,M.rectangle,I,w,E),Nze(o,M.polygon,I,w,E),lbi(o,M,M.model,I,w);let B,T=M.availability;O(T)&&(B=m.createElement("TimeSpan"),fi.equals(T.start,Cn.MINIMUM_VALUE)||B.appendChild(xa(m,"begin",fi.toIso8601(T.start))),fi.equals(T.stop,Cn.MAXIMUM_VALUE)||B.appendChild(xa(m,"end",fi.toIso8601(T.stop))));for(let L=0;L<E.length;++L){let R=E[L];R.setAttribute("id",x.get(M.id)),R.appendChild(xa(m,"name",M.name)),R.appendChild(xa(m,"visibility",M.show)),R.appendChild(xa(m,"description",M.description)),O(B)&&R.appendChild(B),A.appendChild(R)}let D=I.length;if(D>0){let L=m.createElement("Placemark");L.setAttribute("id",x.get(M.id));let R=M.name,k=M.label;if(O(k)){let V=m.createElement("LabelStyle"),H=y.get(k.text);R=O(H)&&H.length>0?H:R;let q=y.getColor(k.fillColor);O(q)&&(V.appendChild(xa(m,"color",q)),V.appendChild(xa(m,"colorMode","normal")));let ie=y.get(k.scale);O(ie)&&V.appendChild(xa(m,"scale",ie)),w.push(V)}L.appendChild(xa(m,"name",R)),L.appendChild(xa(m,"visibility",M.show)),L.appendChild(xa(m,"description",M.description)),O(B)&&L.appendChild(B),A.appendChild(L);let U=w.length;if(U>0){let V=m.createElement("Style");for(let H=0;H<U;++H)V.appendChild(w[H]);L.appendChild(xa(m,"styleUrl",C.get(V)))}if(I.length===1)L.appendChild(I[0]);else if(I.length>1){let V=m.createElement("MultiGeometry");for(let H=0;H<D;++H)V.appendChild(I[H]);L.appendChild(V)}}let F=M._children;if(F.length>0){let L=m.createElement("Folder");L.setAttribute("id",x.get(M.id)),L.appendChild(xa(m,"name",M.name)),L.appendChild(xa(m,"visibility",M.show)),L.appendChild(xa(m,"description",M.description)),A.appendChild(L),sat(o,L,F)}}}var GE=new ee,Tv=new Kt,Sb=new fi;function rbi(o,A,f,m){let C=o.kmlDoc,y=o.ellipsoid,x=o.valueGetter,v=Ae(A.billboard,A.point);if(!O(v)&&!O(A.path))return;let E=A.position;if(!E.isConstant){lat(o,A,v,f,m);return}x.get(E,void 0,GE);let I=xa(C,"coordinates",Sk(GE,y)),w=C.createElement("Point"),Q=C.createElement("altitudeMode");Q.appendChild(Zk(o,v.heightReference)),w.appendChild(Q),w.appendChild(I),f.push(w);let M=v instanceof eP?cat(o,v):uat(o,v);m.push(M)}function lat(o,A,f,m,C){let y=o.kmlDoc,x=o.ellipsoid,v=o.valueGetter,E,I=A.position,w=!0;I instanceof U_?(E=I.intervals,w=!1):E=Ae(A.availability,o.defaultAvailability);let Q=f instanceof EY,M,B,T,D=[];for(M=0;M<E.length;++M){let L=E.get(M),R=w?I:L.data,k=y.createElement("altitudeMode");R instanceof g6?(R=R._value,k.appendChild(Zk(o,xn.CLAMP_TO_GROUND))):O(f)?k.appendChild(Zk(o,f.heightReference)):k.appendChild(Zk(o,xn.NONE));let U=[],V=[];if(R.isConstant){v.get(R,void 0,GE);let q=xa(y,"coordinates",Sk(GE,x));U.push(fi.toIso8601(L.start)),V.push(q),U.push(fi.toIso8601(L.stop)),V.push(q)}else if(R instanceof R1)for(T=R._property._times,B=0;B<T.length;++B)U.push(fi.toIso8601(T[B])),R.getValueInReferenceFrame(T[B],s0.FIXED,GE),V.push(Sk(GE,x));else if(R instanceof uM){T=R._times;let q=R._values;for(B=0;B<T.length;++B)U.push(fi.toIso8601(T[B])),ee.fromArray(q,B*3,GE),V.push(Sk(GE,x))}else{let q=o.sampleDuration;L.start.clone(Sb),L.isStartIncluded||fi.addSeconds(Sb,q,Sb);let ie=L.stop;for(;fi.lessThan(Sb,ie);)R.getValue(Sb,GE),U.push(fi.toIso8601(Sb)),V.push(Sk(GE,x)),fi.addSeconds(Sb,q,Sb);L.isStopIncluded&&fi.equals(Sb,ie)&&(R.getValue(Sb,GE),U.push(fi.toIso8601(Sb)),V.push(Sk(GE,x)))}let H=y.createElementNS(Gb,"Track");H.appendChild(k);for(let q=0;q<U.length;++q){let ie=xa(y,"when",U[q]),Z=xa(y,"coord",V[q],Gb);H.appendChild(ie),H.appendChild(Z)}Q&&H.appendChild(Aat(o,f)),D.push(H)}if(D.length===1)m.push(D[0]);else if(D.length>1){let L=y.createElementNS(Gb,"MultiTrack");for(M=0;M<D.length;++M)L.appendChild(D[M]);m.push(L)}if(O(f)&&!Q){let L=f instanceof eP?cat(o,f):uat(o,f);C.push(L)}let F=A.path;if(O(F)){let L=v.get(F.width),R=F.material;if(O(R)||O(L)){let k=y.createElement("LineStyle");O(L)&&k.appendChild(xa(y,"width",L)),BDe(o,R,k),C.push(k)}}}function uat(o,A){let f=o.kmlDoc,m=o.valueGetter,C=f.createElement("IconStyle"),y=m.getColor(A.color);O(y)&&(C.appendChild(xa(f,"color",y)),C.appendChild(xa(f,"colorMode","normal")));let x=m.get(A.pixelSize);return O(x)&&C.appendChild(xa(f,"scale",x/DCe)),C}function cat(o,A){let f=o.kmlDoc,m=o.valueGetter,C=o.externalFileHandler,y=f.createElement("IconStyle"),x=m.get(A.image);if(O(x)){x=C.texture(x);let M=f.createElement("Icon");M.appendChild(xa(f,"href",x));let B=m.get(A.imageSubRegion);O(B)&&(M.appendChild(xa(f,"x",B.x,Gb)),M.appendChild(xa(f,"y",B.y,Gb)),M.appendChild(xa(f,"w",B.width,Gb)),M.appendChild(xa(f,"h",B.height,Gb))),y.appendChild(M)}let v=m.getColor(A.color);O(v)&&(y.appendChild(xa(f,"color",v)),y.appendChild(xa(f,"colorMode","normal")));let E=m.get(A.scale);O(E)&&y.appendChild(xa(f,"scale",E));let I=m.get(A.pixelOffset);if(O(I)){E=Ae(E,1),It.divideByScalar(I,E,I);let M=m.get(A.width,DCe),B=m.get(A.height,DCe),T=m.get(A.horizontalOrigin,tA.CENTER);T===tA.CENTER?I.x-=M*.5:T===tA.RIGHT&&(I.x-=M);let D=m.get(A.verticalOrigin,bn.CENTER);D===bn.TOP?I.y+=B:D===bn.CENTER&&(I.y+=B*.5);let F=f.createElement("hotSpot");F.setAttribute("x",-I.x),F.setAttribute("y",I.y),F.setAttribute("xunits","pixels"),F.setAttribute("yunits","pixels"),y.appendChild(F)}let w=m.get(A.rotation),Q=m.get(A.alignedAxis);return O(w)&&ee.equals(ee.UNIT_Z,Q)&&(w=je.toDegrees(-w),w===0&&(w=360),y.appendChild(xa(f,"heading",w))),y}function nbi(o,A,f,m){let C=o.kmlDoc,y=o.ellipsoid,x=o.valueGetter;if(!O(A))return;let v=C.createElement("LineString"),E=C.createElement("altitudeMode"),I=x.get(A.clampToGround,!1),w;I?(v.appendChild(xa(C,"tessellate",!0)),w=C.createTextNode("clampToGround")):w=C.createTextNode("absolute"),E.appendChild(w),v.appendChild(E);let Q=A.positions,M=x.get(Q),B=xa(C,"coordinates",Sk(M,y));v.appendChild(B);let T=x.get(A.zIndex);I&&O(T)&&v.appendChild(xa(C,"drawOrder",T,Gb)),f.push(v);let D=C.createElement("LineStyle"),F=x.get(A.width);O(F)&&D.appendChild(xa(C,"width",F)),BDe(o,A.material,D),m.push(D)}function obi(o,A,f){let m=o.kmlDoc,C=o.valueGetter,y=C.get(A.height,0);f>0&&(y=f);let x=A.coordinates,v=C.get(x),E=[],I=[Si.northeast,Si.southeast,Si.southwest,Si.northwest];for(let B=0;B<4;++B)I[B](v,Tv),E.push(`${je.toDegrees(Tv.longitude)},${je.toDegrees(Tv.latitude)},${y}`);let w=xa(m,"coordinates",E.join(" ")),Q=m.createElement("outerBoundaryIs"),M=m.createElement("LinearRing");return M.appendChild(w),Q.appendChild(M),[Q]}function Fze(o,A,f,m){let C=o.kmlDoc,y=o.ellipsoid,x=[],v=A.length;for(let w=0;w<v;++w)Kt.fromCartesian(A[w],y,Tv),x.push(`${je.toDegrees(Tv.longitude)},${je.toDegrees(Tv.latitude)},${m?Tv.height:f}`);let E=xa(C,"coordinates",x.join(" ")),I=C.createElement("LinearRing");return I.appendChild(E),I}function abi(o,A,f){let m=o.kmlDoc,C=o.valueGetter,y=C.get(A.height,0),x=C.get(A.perPositionHeight,!1);!x&&f>0&&(y=f);let v=[],E=A.hierarchy,I=C.get(E),w=Array.isArray(I)?I:I.positions,Q=m.createElement("outerBoundaryIs");Q.appendChild(Fze(o,w,y,x)),v.push(Q);let M=I.holes;if(O(M)){let B=M.length;for(let T=0;T<B;++T){let D=m.createElement("innerBoundaryIs");D.appendChild(Fze(o,M[T].positions,y,x)),v.push(D)}}return v}function Nze(o,A,f,m,C){let y=o.kmlDoc,x=o.valueGetter;if(!O(A))return;let v=A instanceof A6;if(v&&x.getMaterialType(A.material)==="Image"){sbi(o,A,C);return}let E=y.createElement("Polygon"),I=x.get(A.extrudedHeight,0);I>0&&E.appendChild(xa(y,"extrude",!0));let w=v?obi(o,A,I):abi(o,A,I),Q=w.length;for(let F=0;F<Q;++F)E.appendChild(w[F]);let M=y.createElement("altitudeMode");M.appendChild(Zk(o,A.heightReference)),E.appendChild(M),f.push(E);let B=y.createElement("PolyStyle"),T=x.get(A.fill,!1);T&&B.appendChild(xa(y,"fill",T)),BDe(o,A.material,B);let D=x.get(A.outline,!1);if(D){B.appendChild(xa(y,"outline",D));let F=y.createElement("LineStyle"),L=x.get(A.outlineWidth,1);F.appendChild(xa(y,"width",L));let R=x.getColor(A.outlineColor,At.BLACK);F.appendChild(xa(y,"color",R)),F.appendChild(xa(y,"colorMode","normal")),m.push(F)}m.push(B)}function sbi(o,A,f){let m=o.kmlDoc,C=o.valueGetter,y=o.externalFileHandler,x=m.createElement("GroundOverlay"),v=m.createElement("altitudeMode");v.appendChild(Zk(o,A.heightReference)),x.appendChild(v);let E=C.get(A.height);O(E)&&x.appendChild(xa(m,"altitude",E));let I=C.get(A.coordinates),w=m.createElement("LatLonBox");w.appendChild(xa(m,"north",je.toDegrees(I.north))),w.appendChild(xa(m,"south",je.toDegrees(I.south))),w.appendChild(xa(m,"east",je.toDegrees(I.east))),w.appendChild(xa(m,"west",je.toDegrees(I.west))),x.appendChild(w);let Q=C.get(A.material),M=y.texture(Q.image),B=m.createElement("Icon");B.appendChild(xa(m,"href",M)),x.appendChild(B);let T=Q.color;O(T)&&x.appendChild(xa(m,"color",Dk(Q.color))),f.push(x)}function Aat(o,A){let f=o.kmlDoc,m=o.valueGetter,C=o.externalFileHandler,y=f.createElement("Model"),x=m.get(A.scale);if(O(x)){let I=f.createElement("scale");I.appendChild(xa(f,"x",x)),I.appendChild(xa(f,"y",x)),I.appendChild(xa(f,"z",x)),y.appendChild(I)}let v=f.createElement("Link"),E=C.model(A,o.time);return v.appendChild(xa(f,"href",E)),y.appendChild(v),y}function lbi(o,A,f,m,C){let y=o.kmlDoc,x=o.ellipsoid,v=o.valueGetter;if(!O(f))return;let E=A.position;if(!E.isConstant){lat(o,A,f,m,C);return}let I=Aat(o,f),w=y.createElement("altitudeMode");w.appendChild(Zk(o,f.heightReference)),I.appendChild(w),v.get(E,void 0,GE),Kt.fromCartesian(GE,x,Tv);let Q=y.createElement("Location");Q.appendChild(xa(y,"longitude",je.toDegrees(Tv.longitude))),Q.appendChild(xa(y,"latitude",je.toDegrees(Tv.latitude))),Q.appendChild(xa(y,"altitude",Tv.height)),I.appendChild(Q),m.push(I)}function BDe(o,A,f){let m=o.kmlDoc,C=o.valueGetter;if(!O(A))return;let y=C.get(A);if(!O(y))return;let x,v=C.getMaterialType(A),E,I;switch(v){case"Image":x=Dk(At.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":x=Dk(y.color);break;case"PolylineOutline":x=Dk(y.color),E=Dk(y.outlineColor),I=y.outlineWidth,f.appendChild(xa(m,"outerColor",E,Gb)),f.appendChild(xa(m,"outerWidth",I,Gb));break;case"Stripe":x=Dk(y.oddColor);break}O(x)&&(f.appendChild(xa(m,"color",x)),f.appendChild(xa(m,"colorMode","normal")))}function Zk(o,A){let f=o.kmlDoc,m=o.valueGetter.get(A,xn.NONE),C;switch(m){case xn.NONE:C=f.createTextNode("absolute");break;case xn.CLAMP_TO_GROUND:C=f.createTextNode("clampToGround");break;case xn.RELATIVE_TO_GROUND:C=f.createTextNode("relativeToGround");break}return C}function Sk(o,A){Array.isArray(o)||(o=[o]);let f=o.length,m=[];for(let C=0;C<f;++C)Kt.fromCartesian(o[C],A,Tv),m.push(`${je.toDegrees(Tv.longitude)},${je.toDegrees(Tv.latitude)},${Tv.height}`);return m.join(" ")}function xa(o,A,f,m){f=Ae(f,""),typeof f=="boolean"&&(f=f?"1":"0");let C=O(m)?o.createElementNS(m,A):o.createElement(A),y=f==="string"&&f.indexOf("<")!==-1?o.createCDATASection(f):o.createTextNode(f);return C.appendChild(y),C}function Dk(o){let A="",f=o.toBytes();for(let m=3;m>=0;--m)A+=f[m]<16?`0${f[m].toString(16)}`:f[m].toString(16);return A}var hat=_De,dat;typeof DOMParser<"u"&&(dat=new DOMParser);var ubi=new dje({stripPrefix:!1,email:!1,replaceFn:function(o,A){if(!A.protocolUrlMatch)return!1}}),pie=32,kze=2414016,Oze=1,Uze=16093e3,Gze=.1,cbi=[null,void 0,"http://www.topografix.com/GPX/1/1"],$A={gpx:cbi};function Abi(o){return new Promise((A,f)=>{let m=new FileReader;m.addEventListener("load",function(){A(m.result)}),m.addEventListener("error",function(){f(m.error)}),m.readAsText(o)})}function wDe(o,A){let f=JK(o,"id");return f=O(f)?f:Vu(),A.getOrCreateEntity(f)}function bDe(o){let A=Hze(o,"lon"),f=Hze(o,"lat"),m=n7(o,"ele",$A.gpx);return ee.fromDegrees(A,f,m)}function Hze(o,A){if(!O(o))return;let f=o.getAttribute(A);if(f!==null){let m=parseFloat(f);return isNaN(m)?void 0:m}}function JK(o,A){if(!O(o))return;let f=o.getAttribute(A);return f!==null?f:void 0}function yN(o,A,f){if(!O(o))return;let m=o.childNodes,C=m.length;for(let y=0;y<C;y++){let x=m[y];if(x.localName===A&&f.indexOf(x.namespaceURI)!==-1)return x}}function QDe(o,A,f){if(!O(o))return;let m=[],C=o.getElementsByTagName(A),y=C.length;for(let x=0;x<y;x++){let v=C[x];v.localName===A&&f.indexOf(v.namespaceURI)!==-1&&m.push(v)}return m}function n7(o,A,f){let m=yN(o,A,f);if(O(m)){let C=parseFloat(m.textContent);return isNaN(C)?void 0:C}}function XE(o,A,f){let m=yN(o,A,f);if(O(m))return m.textContent.trim()}function fat(o){let A=new eP;return A.width=pie,A.height=pie,A.scaleByDistance=new To(kze,Oze,Uze,Gze),A.pixelOffsetScaleByDistance=new To(kze,Oze,Uze,Gze),A.verticalOrigin=new bc(bn.BOTTOM),A.image=o,A}function hbi(){let o=new c6;return o.translucencyByDistance=new To(3e6,1,5e6,0),o.pixelOffset=new It(17,0),o.horizontalOrigin=tA.LEFT,o.font="16px sans-serif",o.style=mA.FILL_AND_OUTLINE,o}function gat(o){let A=new FD;return A.width=4,A.material=new JM,A.material.color=O(o)?o:At.RED,A.material.outlineWidth=2,A.material.outlineColor=At.BLACK,A}var Vze={time:{text:"Time",tag:"time"},comment:{text:"Comment",tag:"cmt"},description:{text:"Description",tag:"desc"},source:{text:"Source",tag:"src"},number:{text:"GPS track/route number",tag:"number"},type:{text:"Type",tag:"type"}},o7;typeof document<"u"&&(o7=document.createElement("div"));function SDe(o,A){let f,m="",C=Object.keys(Vze),y=C.length;for(f=0;f<y;f++){let w=C[f],Q=Vze[w];Q.value=Ae(XE(o,Q.tag,$A.gpx),""),O(Q.value)&&Q.value!==""&&(m=`${m}<p>${Q.text}: ${Q.value}</p>`)}if(!O(m)||m==="")return;m=ubi.link(m),o7.innerHTML=m;let x=o7.querySelectorAll("a");for(f=0;f<x.length;f++)x[f].setAttribute("target","_blank");let v=At.WHITE,E=At.BLACK,I='<div class="cesium-infoBox-description-lighter" style="';return I+="overflow:auto;",I+="word-wrap:break-word;",I+=`background-color:${v.toCssColorString()};`,I+=`color:${E.toCssColorString()};`,I+='">',I+=`${o7.innerHTML}</div>`,o7.innerHTML="",I}function pat(o,A,f,m){let C=bDe(A),y=wDe(A,f);y.position=C;let x=O(m.waypointImage)?m.waypointImage:o._pinBuilder.fromMakiIconId("marker",At.RED,pie);y.billboard=fat(x);let v=XE(A,"name",$A.gpx);y.name=v,y.label=hbi(),y.label.text=v,y.description=SDe(A,y),m.clampToGround&&(y.billboard.heightReference=xn.CLAMP_TO_GROUND,y.label.heightReference=xn.CLAMP_TO_GROUND)}function dbi(o,A,f,m){let C=wDe(A,f);C.description=SDe(A,C);let y=QDe(A,"rtept",$A.gpx),x=new Array(y.length);for(let v=0;v<y.length;v++)pat(o,y[v],f,m),x[v]=bDe(y[v]);C.polyline=gat(m.routeColor),m.clampToGround&&(C.polyline.clampToGround=!0),C.polyline.positions=x}function fbi(o,A,f,m){let C=wDe(A,f);C.description=SDe(A,C);let y=QDe(A,"trkseg",$A.gpx),x=[],v=[],E,I=!0,w=new R1;for(let Q=0;Q<y.length;Q++)E=gbi(y[Q]),x=x.concat(E.positions),E.times.length>0?(v=v.concat(E.times),w.addSamples(v,x),I=I&&!0):I=!1;if(I){let Q=O(m.waypointImage)?m.waypointImage:o._pinBuilder.fromMakiIconId("marker",At.RED,pie);C.billboard=fat(Q),C.position=w,m.clampToGround&&(C.billboard.heightReference=xn.CLAMP_TO_GROUND),C.availability=new mx,C.availability.addInterval(new el({start:v[0],stop:v[v.length-1]}))}C.polyline=gat(m.trackColor),C.polyline.positions=x,m.clampToGround&&(C.polyline.clampToGround=!0)}function gbi(o){let A={positions:[],times:[]},f=QDe(o,"trkpt",$A.gpx),m;for(let C=0;C<f.length;C++){let y=bDe(f[C]);A.positions.push(y),m=XE(f[C],"time",$A.gpx),O(m)&&A.times.push(fi.fromIso8601(m))}return A}function pbi(o){let A=yN(o,"metadata",$A.gpx);if(O(A)){let f={name:XE(A,"name",$A.gpx),desc:XE(A,"desc",$A.gpx),author:mbi(A),copyright:ybi(A),link:mat(A),time:XE(A,"time",$A.gpx),keywords:XE(A,"keywords",$A.gpx),bounds:xbi(A)};if(O(f.name)||O(f.desc)||O(f.author)||O(f.copyright)||O(f.link)||O(f.time)||O(f.keywords)||O(f.bounds))return f}}function mbi(o){let A=yN(o,"author",$A.gpx);if(O(A)){let f={name:XE(A,"name",$A.gpx),email:Cbi(A),link:mat(A)};if(O(f.name)||O(f.email)||O(f.link))return f}}function Cbi(o){let A=yN(o,"email",$A.gpx);if(O(A)){let f=XE(A,"id",$A.gpx),m=XE(A,"domain",$A.gpx);return`${f}@${m}`}}function mat(o){let A=yN(o,"link",$A.gpx);if(O(A)){let f={href:JK(A,"href"),text:XE(A,"text",$A.gpx),mimeType:XE(A,"type",$A.gpx)};if(O(f.href)||O(f.text)||O(f.mimeType))return f}}function ybi(o){let A=yN(o,"copyright",$A.gpx);if(O(A)){let f={author:JK(A,"author"),year:XE(A,"year",$A.gpx),license:XE(A,"license",$A.gpx)};if(O(f.author)||O(f.year)||O(f.license))return f}}function xbi(o){let A=yN(o,"bounds",$A.gpx);if(O(A)){let f={minLat:n7(A,"minlat",$A.gpx),maxLat:n7(A,"maxlat",$A.gpx),minLon:n7(A,"minlon",$A.gpx),maxLon:n7(A,"maxlon",$A.gpx)};if(O(f.minLat)||O(f.maxLat)||O(f.minLon)||O(f.maxLon))return f}}var zze={wpt:pat,rte:dbi,trk:fbi};function vbi(o,A,f,m){let C=Object.keys(zze),y=C.length;for(let x=0;x<y;x++){let v=C[x],E=zze[v],I=A.childNodes,w=I.length;for(let Q=0;Q<w;Q++){let M=I[Q];M.localName===v&&$A.gpx.indexOf(M.namespaceURI)!==-1&&E(o,M,f,m)}}}function Kze(o,A,f){let m=o._entityCollection;m.removeAll();let C=A.documentElement,y=JK(C,"version"),x=JK(C,"creator"),v,E=pbi(C);O(E)&&(v=E.name),C.localName==="gpx"?vbi(o,C,m,f):console.log(`GPX - Unsupported node: ${C.localName}`);let I,w=m.computeAvailability(),Q=w.start,M=w.stop,B=fi.equals(Q,Cn.MINIMUM_VALUE),T=fi.equals(M,Cn.MAXIMUM_VALUE);if(!B||!T){let F;B&&(F=new Date,F.setHours(0,0,0,0),Q=fi.fromDate(F)),T&&(F=new Date,F.setHours(24,0,0,0),M=fi.fromDate(F)),I=new A5,I.startTime=Q,I.stopTime=M,I.currentTime=fi.clone(Q),I.clockRange=aC.LOOP_STOP,I.clockStep=jh.SYSTEM_CLOCK_MULTIPLIER,I.multiplier=Math.round(Math.min(Math.max(fi.secondsDifference(M,Q)/60,1),31556900))}let D=!1;return o._name!==v&&(o._name=v,D=!0),o._creator!==x&&(o._creator=x,D=!0),Ebi(o._metadata,E)&&(o._metadata=E,D=!0),o._version!==y&&(o._version=y,D=!0),I!==o._clock&&(D=!0,o._clock=I),D&&o._changed.raiseEvent(o),cy.setLoading(o,!1),o}function Ebi(o,A){return!O(o)&&!O(A)?!1:O(o)&&O(A)?o.name!==A.name||o.dec!==A.desc||o.src!==A.src||o.author!==A.author||o.copyright!==A.copyright||o.link!==A.link||o.time!==A.time||o.bounds!==A.bounds:!0}function Ibi(o,A,f,m){m=Ae(m,Ae.EMPTY_OBJECT);let C=f;if(typeof f=="string"||f instanceof An){f=An.createIfNeeded(f),C=f.fetchBlob();let y=o._resourceCredits,x=f.credits;if(O(x)){let v=x.length;for(let E=0;E<v;E++)y.push(x[E])}}return Promise.resolve(C).then(function(y){return y instanceof Blob?Abi(y).then(function(x){let v,E;try{v=dat.parseFromString(x,"application/xml")}catch(I){E=I.toString()}if(O(E)||v.body||v.documentElement.tagName==="parsererror"){let I=O(E)?E:v.documentElement.firstChild.nodeValue;throw I||(I=v.body.innerText),new nr(I)}return Kze(o,v,m)}):Kze(o,y,m)}).catch(function(y){return o._error.raiseEvent(o,y),console.log(y),Promise.reject(y)})}function z8(){this._changed=new br,this._error=new br,this._loading=new br,this._clock=void 0,this._entityCollection=new iw,this._entityCluster=new eN,this._name=void 0,this._version=void 0,this._creator=void 0,this._metadata=void 0,this._isLoading=!1,this._pinBuilder=new bY}z8.load=function(o,A){return new z8().load(o,A)};Object.defineProperties(z8.prototype,{name:{get:function(){return this._name}},version:{get:function(){return this._version}},creator:{get:function(){return this._creator}},metadata:{get:function(){return this._metadata}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(o){this._entityCollection.show=o}},clustering:{get:function(){return this._entityCluster},set:function(o){this._entityCluster=o}}});z8.prototype.update=function(o){return!0};z8.prototype.load=function(o,A){if(!O(o))throw new Ui("data is required.");A=Ae(A,Ae.EMPTY_OBJECT),cy.setLoading(this,!0);let f=this._name,m=this;return Ibi(this,this._entityCollection,o,A).then(function(){let C,y=m._entityCollection.computeAvailability(),x=y.start,v=y.stop,E=fi.equals(x,Cn.MINIMUM_VALUE),I=fi.equals(v,Cn.MAXIMUM_VALUE);if(!E||!I){let Q;E&&(Q=new Date,Q.setHours(0,0,0,0),x=fi.fromDate(Q)),I&&(Q=new Date,Q.setHours(24,0,0,0),v=fi.fromDate(Q)),C=new A5,C.startTime=x,C.stopTime=v,C.currentTime=fi.clone(x),C.clockRange=aC.LOOP_STOP,C.clockStep=jh.SYSTEM_CLOCK_MULTIPLIER,C.multiplier=Math.round(Math.min(Math.max(fi.secondsDifference(v,x)/60,1),31556900))}let w=!1;return C!==m._clock&&(m._clock=C,w=!0),f!==m._name&&(w=!0),w&&m._changed.raiseEvent(m),cy.setLoading(m,!1),m}).catch(function(C){return cy.setLoading(m,!1),m._error.raiseEvent(m,C),console.log(C),Promise.reject(C)})};var DDe=z8;function rW(){Ui.throwInstantiationError()}rW.prototype.update=Ui.throwInstantiationError;rW.prototype.getBoundingSphere=Ui.throwInstantiationError;rW.prototype.isDestroyed=Ui.throwInstantiationError;rW.prototype.destroy=Ui.throwInstantiationError;var Cat=rW,yat={};(function(o,A){o.CryptoJS=A()})(yat,function(){var o=o||function(A,f){var m;if(typeof window<"u"&&window.crypto&&(m=window.crypto),typeof self<"u"&&self.crypto&&(m=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(m=globalThis.crypto),!m&&typeof window<"u"&&window.msCrypto&&(m=window.msCrypto),!m&&typeof global<"u"&&global.crypto&&(m=global.crypto),!m&&typeof sM=="function")try{m=sM("crypto")}catch{}var C=function(){if(m){if(typeof m.getRandomValues=="function")try{return m.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof m.randomBytes=="function")try{return m.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},y=Object.create||function(){function L(){}return function(R){var k;return L.prototype=R,k=new L,L.prototype=null,k}}(),x={},v=x.lib={},E=v.Base=function(){return{extend:function(L){var R=y(this);return L&&R.mixIn(L),(!R.hasOwnProperty("init")||this.init===R.init)&&(R.init=function(){R.$super.init.apply(this,arguments)}),R.init.prototype=R,R.$super=this,R},create:function(){var L=this.extend();return L.init.apply(L,arguments),L},init:function(){},mixIn:function(L){for(var R in L)L.hasOwnProperty(R)&&(this[R]=L[R]);L.hasOwnProperty("toString")&&(this.toString=L.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),I=v.WordArray=E.extend({init:function(L,R){L=this.words=L||[],R!=f?this.sigBytes=R:this.sigBytes=L.length*4},toString:function(L){return(L||Q).stringify(this)},concat:function(L){var R=this.words,k=L.words,U=this.sigBytes,V=L.sigBytes;if(this.clamp(),U%4)for(var H=0;H<V;H++){var q=k[H>>>2]>>>24-H%4*8&255;R[U+H>>>2]|=q<<24-(U+H)%4*8}else for(var ie=0;ie<V;ie+=4)R[U+ie>>>2]=k[ie>>>2];return this.sigBytes+=V,this},clamp:function(){var L=this.words,R=this.sigBytes;L[R>>>2]&=4294967295<<32-R%4*8,L.length=A.ceil(R/4)},clone:function(){var L=E.clone.call(this);return L.words=this.words.slice(0),L},random:function(L){for(var R=[],k=0;k<L;k+=4)R.push(C());return new I.init(R,L)}}),w=x.enc={},Q=w.Hex={stringify:function(L){for(var R=L.words,k=L.sigBytes,U=[],V=0;V<k;V++){var H=R[V>>>2]>>>24-V%4*8&255;U.push((H>>>4).toString(16)),U.push((H&15).toString(16))}return U.join("")},parse:function(L){for(var R=L.length,k=[],U=0;U<R;U+=2)k[U>>>3]|=parseInt(L.substr(U,2),16)<<24-U%8*4;return new I.init(k,R/2)}},M=w.Latin1={stringify:function(L){for(var R=L.words,k=L.sigBytes,U=[],V=0;V<k;V++){var H=R[V>>>2]>>>24-V%4*8&255;U.push(String.fromCharCode(H))}return U.join("")},parse:function(L){for(var R=L.length,k=[],U=0;U<R;U++)k[U>>>2]|=(L.charCodeAt(U)&255)<<24-U%4*8;return new I.init(k,R)}},B=w.Utf8={stringify:function(L){try{return decodeURIComponent(escape(M.stringify(L)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(L){return M.parse(unescape(encodeURIComponent(L)))}},T=v.BufferedBlockAlgorithm=E.extend({reset:function(){this._data=new I.init,this._nDataBytes=0},_append:function(L){typeof L=="string"&&(L=B.parse(L)),this._data.concat(L),this._nDataBytes+=L.sigBytes},_process:function(L){var R,k=this._data,U=k.words,V=k.sigBytes,H=this.blockSize,q=H*4,ie=V/q;L?ie=A.ceil(ie):ie=A.max((ie|0)-this._minBufferSize,0);var Z=ie*H,oe=A.min(Z*4,V);if(Z){for(var ne=0;ne<Z;ne+=H)this._doProcessBlock(U,ne);R=U.splice(0,Z),k.sigBytes-=oe}return new I.init(R,oe)},clone:function(){var L=E.clone.call(this);return L._data=this._data.clone(),L},_minBufferSize:0}),D=v.Hasher=T.extend({cfg:E.extend(),init:function(L){this.cfg=this.cfg.extend(L),this.reset()},reset:function(){T.reset.call(this),this._doReset()},update:function(L){return this._append(L),this._process(),this},finalize:function(L){L&&this._append(L);var R=this._doFinalize();return R},blockSize:512/32,_createHelper:function(L){return function(R,k){return new L.init(k).finalize(R)}},_createHmacHelper:function(L){return function(R,k){return new F.HMAC.init(L,k).finalize(R)}}}),F=x.algo={};return x}(Math);(function(A){var f=o,m=f.lib,C=m.Base,y=m.WordArray,x=f.x64={},v=x.Word=C.extend({init:function(I,w){this.high=I,this.low=w}}),E=x.WordArray=C.extend({init:function(I,w){I=this.words=I||[],w!=A?this.sigBytes=w:this.sigBytes=I.length*8},toX32:function(){for(var I=this.words,w=I.length,Q=[],M=0;M<w;M++){var B=I[M];Q.push(B.high),Q.push(B.low)}return y.create(Q,this.sigBytes)},clone:function(){for(var I=C.clone.call(this),w=I.words=this.words.slice(0),Q=w.length,M=0;M<Q;M++)w[M]=w[M].clone();return I}})})(),function(){if(typeof ArrayBuffer=="function"){var A=o,f=A.lib,m=f.WordArray,C=m.init,y=m.init=function(x){if(x instanceof ArrayBuffer&&(x=new Uint8Array(x)),(x instanceof Int8Array||typeof Uint8ClampedArray<"u"&&x instanceof Uint8ClampedArray||x instanceof Int16Array||x instanceof Uint16Array||x instanceof Int32Array||x instanceof Uint32Array||x instanceof Float32Array||x instanceof Float64Array)&&(x=new Uint8Array(x.buffer,x.byteOffset,x.byteLength)),x instanceof Uint8Array){for(var v=x.byteLength,E=[],I=0;I<v;I++)E[I>>>2]|=x[I]<<24-I%4*8;C.call(this,E,v)}else C.apply(this,arguments)};y.prototype=m}}(),function(){var A=o,f=A.lib,m=f.WordArray,C=A.enc,y=C.Utf16=C.Utf16BE={stringify:function(v){for(var E=v.words,I=v.sigBytes,w=[],Q=0;Q<I;Q+=2){var M=E[Q>>>2]>>>16-Q%4*8&65535;w.push(String.fromCharCode(M))}return w.join("")},parse:function(v){for(var E=v.length,I=[],w=0;w<E;w++)I[w>>>1]|=v.charCodeAt(w)<<16-w%2*16;return m.create(I,E*2)}};C.Utf16LE={stringify:function(v){for(var E=v.words,I=v.sigBytes,w=[],Q=0;Q<I;Q+=2){var M=x(E[Q>>>2]>>>16-Q%4*8&65535);w.push(String.fromCharCode(M))}return w.join("")},parse:function(v){for(var E=v.length,I=[],w=0;w<E;w++)I[w>>>1]|=x(v.charCodeAt(w)<<16-w%2*16);return m.create(I,E*2)}};function x(v){return v<<8&4278255360|v>>>8&16711935}}(),function(){var A=o,f=A.lib,m=f.WordArray,C=A.enc,y=C.Base64={stringify:function(v){var E=v.words,I=v.sigBytes,w=this._map;v.clamp();for(var Q=[],M=0;M<I;M+=3)for(var B=E[M>>>2]>>>24-M%4*8&255,T=E[M+1>>>2]>>>24-(M+1)%4*8&255,D=E[M+2>>>2]>>>24-(M+2)%4*8&255,F=B<<16|T<<8|D,L=0;L<4&&M+L*.75<I;L++)Q.push(w.charAt(F>>>6*(3-L)&63));var R=w.charAt(64);if(R)for(;Q.length%4;)Q.push(R);return Q.join("")},parse:function(v){var E=v.length,I=this._map,w=this._reverseMap;if(!w){w=this._reverseMap=[];for(var Q=0;Q<I.length;Q++)w[I.charCodeAt(Q)]=Q}var M=I.charAt(64);if(M){var B=v.indexOf(M);B!==-1&&(E=B)}return x(v,E,w)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function x(v,E,I){for(var w=[],Q=0,M=0;M<E;M++)if(M%4){var B=I[v.charCodeAt(M-1)]<<M%4*2,T=I[v.charCodeAt(M)]>>>6-M%4*2,D=B|T;w[Q>>>2]|=D<<24-Q%4*8,Q++}return m.create(w,Q)}}(),function(){var A=o,f=A.lib,m=f.WordArray,C=A.enc,y=C.Base64url={stringify:function(v,E=!0){var I=v.words,w=v.sigBytes,Q=E?this._safe_map:this._map;v.clamp();for(var M=[],B=0;B<w;B+=3)for(var T=I[B>>>2]>>>24-B%4*8&255,D=I[B+1>>>2]>>>24-(B+1)%4*8&255,F=I[B+2>>>2]>>>24-(B+2)%4*8&255,L=T<<16|D<<8|F,R=0;R<4&&B+R*.75<w;R++)M.push(Q.charAt(L>>>6*(3-R)&63));var k=Q.charAt(64);if(k)for(;M.length%4;)M.push(k);return M.join("")},parse:function(v,E=!0){var I=v.length,w=E?this._safe_map:this._map,Q=this._reverseMap;if(!Q){Q=this._reverseMap=[];for(var M=0;M<w.length;M++)Q[w.charCodeAt(M)]=M}var B=w.charAt(64);if(B){var T=v.indexOf(B);T!==-1&&(I=T)}return x(v,I,Q)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function x(v,E,I){for(var w=[],Q=0,M=0;M<E;M++)if(M%4){var B=I[v.charCodeAt(M-1)]<<M%4*2,T=I[v.charCodeAt(M)]>>>6-M%4*2,D=B|T;w[Q>>>2]|=D<<24-Q%4*8,Q++}return m.create(w,Q)}}(),function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.algo,v=[];(function(){for(var B=0;B<64;B++)v[B]=A.abs(A.sin(B+1))*4294967296|0})();var E=x.MD5=y.extend({_doReset:function(){this._hash=new C.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(B,T){for(var D=0;D<16;D++){var F=T+D,L=B[F];B[F]=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360}var R=this._hash.words,k=B[T+0],U=B[T+1],V=B[T+2],H=B[T+3],q=B[T+4],ie=B[T+5],Z=B[T+6],oe=B[T+7],ne=B[T+8],se=B[T+9],ce=B[T+10],j=B[T+11],de=B[T+12],me=B[T+13],_e=B[T+14],Be=B[T+15],Qe=R[0],Ie=R[1],ve=R[2],K=R[3];Qe=I(Qe,Ie,ve,K,k,7,v[0]),K=I(K,Qe,Ie,ve,U,12,v[1]),ve=I(ve,K,Qe,Ie,V,17,v[2]),Ie=I(Ie,ve,K,Qe,H,22,v[3]),Qe=I(Qe,Ie,ve,K,q,7,v[4]),K=I(K,Qe,Ie,ve,ie,12,v[5]),ve=I(ve,K,Qe,Ie,Z,17,v[6]),Ie=I(Ie,ve,K,Qe,oe,22,v[7]),Qe=I(Qe,Ie,ve,K,ne,7,v[8]),K=I(K,Qe,Ie,ve,se,12,v[9]),ve=I(ve,K,Qe,Ie,ce,17,v[10]),Ie=I(Ie,ve,K,Qe,j,22,v[11]),Qe=I(Qe,Ie,ve,K,de,7,v[12]),K=I(K,Qe,Ie,ve,me,12,v[13]),ve=I(ve,K,Qe,Ie,_e,17,v[14]),Ie=I(Ie,ve,K,Qe,Be,22,v[15]),Qe=w(Qe,Ie,ve,K,U,5,v[16]),K=w(K,Qe,Ie,ve,Z,9,v[17]),ve=w(ve,K,Qe,Ie,j,14,v[18]),Ie=w(Ie,ve,K,Qe,k,20,v[19]),Qe=w(Qe,Ie,ve,K,ie,5,v[20]),K=w(K,Qe,Ie,ve,ce,9,v[21]),ve=w(ve,K,Qe,Ie,Be,14,v[22]),Ie=w(Ie,ve,K,Qe,q,20,v[23]),Qe=w(Qe,Ie,ve,K,se,5,v[24]),K=w(K,Qe,Ie,ve,_e,9,v[25]),ve=w(ve,K,Qe,Ie,H,14,v[26]),Ie=w(Ie,ve,K,Qe,ne,20,v[27]),Qe=w(Qe,Ie,ve,K,me,5,v[28]),K=w(K,Qe,Ie,ve,V,9,v[29]),ve=w(ve,K,Qe,Ie,oe,14,v[30]),Ie=w(Ie,ve,K,Qe,de,20,v[31]),Qe=Q(Qe,Ie,ve,K,ie,4,v[32]),K=Q(K,Qe,Ie,ve,ne,11,v[33]),ve=Q(ve,K,Qe,Ie,j,16,v[34]),Ie=Q(Ie,ve,K,Qe,_e,23,v[35]),Qe=Q(Qe,Ie,ve,K,U,4,v[36]),K=Q(K,Qe,Ie,ve,q,11,v[37]),ve=Q(ve,K,Qe,Ie,oe,16,v[38]),Ie=Q(Ie,ve,K,Qe,ce,23,v[39]),Qe=Q(Qe,Ie,ve,K,me,4,v[40]),K=Q(K,Qe,Ie,ve,k,11,v[41]),ve=Q(ve,K,Qe,Ie,H,16,v[42]),Ie=Q(Ie,ve,K,Qe,Z,23,v[43]),Qe=Q(Qe,Ie,ve,K,se,4,v[44]),K=Q(K,Qe,Ie,ve,de,11,v[45]),ve=Q(ve,K,Qe,Ie,Be,16,v[46]),Ie=Q(Ie,ve,K,Qe,V,23,v[47]),Qe=M(Qe,Ie,ve,K,k,6,v[48]),K=M(K,Qe,Ie,ve,oe,10,v[49]),ve=M(ve,K,Qe,Ie,_e,15,v[50]),Ie=M(Ie,ve,K,Qe,ie,21,v[51]),Qe=M(Qe,Ie,ve,K,de,6,v[52]),K=M(K,Qe,Ie,ve,H,10,v[53]),ve=M(ve,K,Qe,Ie,ce,15,v[54]),Ie=M(Ie,ve,K,Qe,U,21,v[55]),Qe=M(Qe,Ie,ve,K,ne,6,v[56]),K=M(K,Qe,Ie,ve,Be,10,v[57]),ve=M(ve,K,Qe,Ie,Z,15,v[58]),Ie=M(Ie,ve,K,Qe,me,21,v[59]),Qe=M(Qe,Ie,ve,K,q,6,v[60]),K=M(K,Qe,Ie,ve,j,10,v[61]),ve=M(ve,K,Qe,Ie,V,15,v[62]),Ie=M(Ie,ve,K,Qe,se,21,v[63]),R[0]=R[0]+Qe|0,R[1]=R[1]+Ie|0,R[2]=R[2]+ve|0,R[3]=R[3]+K|0},_doFinalize:function(){var B=this._data,T=B.words,D=this._nDataBytes*8,F=B.sigBytes*8;T[F>>>5]|=128<<24-F%32;var L=A.floor(D/4294967296),R=D;T[(F+64>>>9<<4)+15]=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,T[(F+64>>>9<<4)+14]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360,B.sigBytes=(T.length+1)*4,this._process();for(var k=this._hash,U=k.words,V=0;V<4;V++){var H=U[V];U[V]=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360}return k},clone:function(){var B=y.clone.call(this);return B._hash=this._hash.clone(),B}});function I(B,T,D,F,L,R,k){var U=B+(T&D|~T&F)+L+k;return(U<<R|U>>>32-R)+T}function w(B,T,D,F,L,R,k){var U=B+(T&F|D&~F)+L+k;return(U<<R|U>>>32-R)+T}function Q(B,T,D,F,L,R,k){var U=B+(T^D^F)+L+k;return(U<<R|U>>>32-R)+T}function M(B,T,D,F,L,R,k){var U=B+(D^(T|~F))+L+k;return(U<<R|U>>>32-R)+T}f.MD5=y._createHelper(E),f.HmacMD5=y._createHmacHelper(E)}(Math),function(){var A=o,f=A.lib,m=f.WordArray,C=f.Hasher,y=A.algo,x=[],v=y.SHA1=C.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(E,I){for(var w=this._hash.words,Q=w[0],M=w[1],B=w[2],T=w[3],D=w[4],F=0;F<80;F++){if(F<16)x[F]=E[I+F]|0;else{var L=x[F-3]^x[F-8]^x[F-14]^x[F-16];x[F]=L<<1|L>>>31}var R=(Q<<5|Q>>>27)+D+x[F];F<20?R+=(M&B|~M&T)+1518500249:F<40?R+=(M^B^T)+1859775393:F<60?R+=(M&B|M&T|B&T)-1894007588:R+=(M^B^T)-899497514,D=T,T=B,B=M<<30|M>>>2,M=Q,Q=R}w[0]=w[0]+Q|0,w[1]=w[1]+M|0,w[2]=w[2]+B|0,w[3]=w[3]+T|0,w[4]=w[4]+D|0},_doFinalize:function(){var E=this._data,I=E.words,w=this._nDataBytes*8,Q=E.sigBytes*8;return I[Q>>>5]|=128<<24-Q%32,I[(Q+64>>>9<<4)+14]=Math.floor(w/4294967296),I[(Q+64>>>9<<4)+15]=w,E.sigBytes=I.length*4,this._process(),this._hash},clone:function(){var E=C.clone.call(this);return E._hash=this._hash.clone(),E}});A.SHA1=C._createHelper(v),A.HmacSHA1=C._createHmacHelper(v)}(),function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.algo,v=[],E=[];(function(){function Q(D){for(var F=A.sqrt(D),L=2;L<=F;L++)if(!(D%L))return!1;return!0}function M(D){return(D-(D|0))*4294967296|0}for(var B=2,T=0;T<64;)Q(B)&&(T<8&&(v[T]=M(A.pow(B,1/2))),E[T]=M(A.pow(B,1/3)),T++),B++})();var I=[],w=x.SHA256=y.extend({_doReset:function(){this._hash=new C.init(v.slice(0))},_doProcessBlock:function(Q,M){for(var B=this._hash.words,T=B[0],D=B[1],F=B[2],L=B[3],R=B[4],k=B[5],U=B[6],V=B[7],H=0;H<64;H++){if(H<16)I[H]=Q[M+H]|0;else{var q=I[H-15],ie=(q<<25|q>>>7)^(q<<14|q>>>18)^q>>>3,Z=I[H-2],oe=(Z<<15|Z>>>17)^(Z<<13|Z>>>19)^Z>>>10;I[H]=ie+I[H-7]+oe+I[H-16]}var ne=R&k^~R&U,se=T&D^T&F^D&F,ce=(T<<30|T>>>2)^(T<<19|T>>>13)^(T<<10|T>>>22),j=(R<<26|R>>>6)^(R<<21|R>>>11)^(R<<7|R>>>25),de=V+j+ne+E[H]+I[H],me=ce+se;V=U,U=k,k=R,R=L+de|0,L=F,F=D,D=T,T=de+me|0}B[0]=B[0]+T|0,B[1]=B[1]+D|0,B[2]=B[2]+F|0,B[3]=B[3]+L|0,B[4]=B[4]+R|0,B[5]=B[5]+k|0,B[6]=B[6]+U|0,B[7]=B[7]+V|0},_doFinalize:function(){var Q=this._data,M=Q.words,B=this._nDataBytes*8,T=Q.sigBytes*8;return M[T>>>5]|=128<<24-T%32,M[(T+64>>>9<<4)+14]=A.floor(B/4294967296),M[(T+64>>>9<<4)+15]=B,Q.sigBytes=M.length*4,this._process(),this._hash},clone:function(){var Q=y.clone.call(this);return Q._hash=this._hash.clone(),Q}});f.SHA256=y._createHelper(w),f.HmacSHA256=y._createHmacHelper(w)}(Math),function(){var A=o,f=A.lib,m=f.WordArray,C=A.algo,y=C.SHA256,x=C.SHA224=y.extend({_doReset:function(){this._hash=new m.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var v=y._doFinalize.call(this);return v.sigBytes-=4,v}});A.SHA224=y._createHelper(x),A.HmacSHA224=y._createHmacHelper(x)}(),function(){var A=o,f=A.lib,m=f.Hasher,C=A.x64,y=C.Word,x=C.WordArray,v=A.algo;function E(){return y.create.apply(y,arguments)}var I=[E(1116352408,3609767458),E(1899447441,602891725),E(3049323471,3964484399),E(3921009573,2173295548),E(961987163,4081628472),E(1508970993,3053834265),E(2453635748,2937671579),E(2870763221,3664609560),E(3624381080,2734883394),E(310598401,1164996542),E(607225278,1323610764),E(1426881987,3590304994),E(1925078388,4068182383),E(2162078206,991336113),E(2614888103,633803317),E(3248222580,3479774868),E(3835390401,2666613458),E(4022224774,944711139),E(264347078,2341262773),E(604807628,2007800933),E(770255983,1495990901),E(1249150122,1856431235),E(1555081692,3175218132),E(1996064986,2198950837),E(2554220882,3999719339),E(2821834349,766784016),E(2952996808,2566594879),E(3210313671,3203337956),E(3336571891,1034457026),E(3584528711,2466948901),E(113926993,3758326383),E(338241895,168717936),E(666307205,1188179964),E(773529912,1546045734),E(1294757372,1522805485),E(1396182291,2643833823),E(1695183700,2343527390),E(1986661051,1014477480),E(2177026350,1206759142),E(2456956037,344077627),E(2730485921,1290863460),E(2820302411,3158454273),E(3259730800,3505952657),E(3345764771,106217008),E(3516065817,3606008344),E(3600352804,1432725776),E(4094571909,1467031594),E(275423344,851169720),E(430227734,3100823752),E(506948616,1363258195),E(659060556,3750685593),E(883997877,3785050280),E(958139571,3318307427),E(1322822218,3812723403),E(1537002063,2003034995),E(1747873779,3602036899),E(1955562222,1575990012),E(2024104815,1125592928),E(2227730452,2716904306),E(2361852424,442776044),E(2428436474,593698344),E(2756734187,3733110249),E(3204031479,2999351573),E(3329325298,3815920427),E(3391569614,3928383900),E(3515267271,566280711),E(3940187606,3454069534),E(4118630271,4000239992),E(116418474,1914138554),E(174292421,2731055270),E(289380356,3203993006),E(460393269,320620315),E(685471733,587496836),E(852142971,1086792851),E(1017036298,365543100),E(1126000580,2618297676),E(1288033470,3409855158),E(1501505948,4234509866),E(1607167915,987167468),E(1816402316,1246189591)],w=[];(function(){for(var M=0;M<80;M++)w[M]=E()})();var Q=v.SHA512=m.extend({_doReset:function(){this._hash=new x.init([new y.init(1779033703,4089235720),new y.init(3144134277,2227873595),new y.init(1013904242,4271175723),new y.init(2773480762,1595750129),new y.init(1359893119,2917565137),new y.init(2600822924,725511199),new y.init(528734635,4215389547),new y.init(1541459225,327033209)])},_doProcessBlock:function(M,B){for(var T=this._hash.words,D=T[0],F=T[1],L=T[2],R=T[3],k=T[4],U=T[5],V=T[6],H=T[7],q=D.high,ie=D.low,Z=F.high,oe=F.low,ne=L.high,se=L.low,ce=R.high,j=R.low,de=k.high,me=k.low,_e=U.high,Be=U.low,Qe=V.high,Ie=V.low,ve=H.high,K=H.low,W=q,te=ie,Y=Z,he=oe,fe=ne,Ce=se,Ee=ce,be=j,Re=de,Ne=me,Je=_e,ot=Be,nt=Qe,$e=Ie,ht=ve,ze=K,Ze=0;Ze<80;Ze++){var ct,We,Oe=w[Ze];if(Ze<16)We=Oe.high=M[B+Ze*2]|0,ct=Oe.low=M[B+Ze*2+1]|0;else{var Ye=w[Ze-15],rt=Ye.high,gt=Ye.low,Et=(rt>>>1|gt<<31)^(rt>>>8|gt<<24)^rt>>>7,yt=(gt>>>1|rt<<31)^(gt>>>8|rt<<24)^(gt>>>7|rt<<25),vt=w[Ze-2],Rt=vt.high,qt=vt.low,wt=(Rt>>>19|qt<<13)^(Rt<<3|qt>>>29)^Rt>>>6,Lt=(qt>>>19|Rt<<13)^(qt<<3|Rt>>>29)^(qt>>>6|Rt<<26),pi=w[Ze-7],Ut=pi.high,ri=pi.low,ni=w[Ze-16],kt=ni.high,qe=ni.low;ct=yt+ri,We=Et+Ut+(ct>>>0<yt>>>0?1:0),ct=ct+Lt,We=We+wt+(ct>>>0<Lt>>>0?1:0),ct=ct+qe,We=We+kt+(ct>>>0<qe>>>0?1:0),Oe.high=We,Oe.low=ct}var Fe=Re&Je^~Re&nt,it=Ne&ot^~Ne&$e,Ht=W&Y^W&fe^Y&fe,Jt=te&he^te&Ce^he&Ce,jt=(W>>>28|te<<4)^(W<<30|te>>>2)^(W<<25|te>>>7),or=(te>>>28|W<<4)^(te<<30|W>>>2)^(te<<25|W>>>7),Pr=(Re>>>14|Ne<<18)^(Re>>>18|Ne<<14)^(Re<<23|Ne>>>9),Mi=(Ne>>>14|Re<<18)^(Ne>>>18|Re<<14)^(Ne<<23|Re>>>9),Zi=I[Ze],lr=Zi.high,Gi=Zi.low,li=ze+Mi,hi=ht+Pr+(li>>>0<ze>>>0?1:0),li=li+it,hi=hi+Fe+(li>>>0<it>>>0?1:0),li=li+Gi,hi=hi+lr+(li>>>0<Gi>>>0?1:0),li=li+ct,hi=hi+We+(li>>>0<ct>>>0?1:0),Ni=or+Jt,ki=jt+Ht+(Ni>>>0<or>>>0?1:0);ht=nt,ze=$e,nt=Je,$e=ot,Je=Re,ot=Ne,Ne=be+li|0,Re=Ee+hi+(Ne>>>0<be>>>0?1:0)|0,Ee=fe,be=Ce,fe=Y,Ce=he,Y=W,he=te,te=li+Ni|0,W=hi+ki+(te>>>0<li>>>0?1:0)|0}ie=D.low=ie+te,D.high=q+W+(ie>>>0<te>>>0?1:0),oe=F.low=oe+he,F.high=Z+Y+(oe>>>0<he>>>0?1:0),se=L.low=se+Ce,L.high=ne+fe+(se>>>0<Ce>>>0?1:0),j=R.low=j+be,R.high=ce+Ee+(j>>>0<be>>>0?1:0),me=k.low=me+Ne,k.high=de+Re+(me>>>0<Ne>>>0?1:0),Be=U.low=Be+ot,U.high=_e+Je+(Be>>>0<ot>>>0?1:0),Ie=V.low=Ie+$e,V.high=Qe+nt+(Ie>>>0<$e>>>0?1:0),K=H.low=K+ze,H.high=ve+ht+(K>>>0<ze>>>0?1:0)},_doFinalize:function(){var M=this._data,B=M.words,T=this._nDataBytes*8,D=M.sigBytes*8;B[D>>>5]|=128<<24-D%32,B[(D+128>>>10<<5)+30]=Math.floor(T/4294967296),B[(D+128>>>10<<5)+31]=T,M.sigBytes=B.length*4,this._process();var F=this._hash.toX32();return F},clone:function(){var M=m.clone.call(this);return M._hash=this._hash.clone(),M},blockSize:1024/32});A.SHA512=m._createHelper(Q),A.HmacSHA512=m._createHmacHelper(Q)}(),function(){var A=o,f=A.x64,m=f.Word,C=f.WordArray,y=A.algo,x=y.SHA512,v=y.SHA384=x.extend({_doReset:function(){this._hash=new C.init([new m.init(3418070365,3238371032),new m.init(1654270250,914150663),new m.init(2438529370,812702999),new m.init(355462360,4144912697),new m.init(1731405415,4290775857),new m.init(2394180231,1750603025),new m.init(3675008525,1694076839),new m.init(1203062813,3204075428)])},_doFinalize:function(){var E=x._doFinalize.call(this);return E.sigBytes-=16,E}});A.SHA384=x._createHelper(v),A.HmacSHA384=x._createHmacHelper(v)}(),function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.x64,v=x.Word,E=f.algo,I=[],w=[],Q=[];(function(){for(var T=1,D=0,F=0;F<24;F++){I[T+5*D]=(F+1)*(F+2)/2%64;var L=D%5,R=(2*T+3*D)%5;T=L,D=R}for(var T=0;T<5;T++)for(var D=0;D<5;D++)w[T+5*D]=D+(2*T+3*D)%5*5;for(var k=1,U=0;U<24;U++){for(var V=0,H=0,q=0;q<7;q++){if(k&1){var ie=(1<<q)-1;ie<32?H^=1<<ie:V^=1<<ie-32}k&128?k=k<<1^113:k<<=1}Q[U]=v.create(V,H)}})();var M=[];(function(){for(var T=0;T<25;T++)M[T]=v.create()})();var B=E.SHA3=y.extend({cfg:y.cfg.extend({outputLength:512}),_doReset:function(){for(var T=this._state=[],D=0;D<25;D++)T[D]=new v.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(T,D){for(var F=this._state,L=this.blockSize/2,R=0;R<L;R++){var k=T[D+2*R],U=T[D+2*R+1];k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,U=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360;var V=F[R];V.high^=U,V.low^=k}for(var H=0;H<24;H++){for(var q=0;q<5;q++){for(var ie=0,Z=0,oe=0;oe<5;oe++){var V=F[q+5*oe];ie^=V.high,Z^=V.low}var ne=M[q];ne.high=ie,ne.low=Z}for(var q=0;q<5;q++)for(var se=M[(q+4)%5],ce=M[(q+1)%5],j=ce.high,de=ce.low,ie=se.high^(j<<1|de>>>31),Z=se.low^(de<<1|j>>>31),oe=0;oe<5;oe++){var V=F[q+5*oe];V.high^=ie,V.low^=Z}for(var me=1;me<25;me++){var ie,Z,V=F[me],_e=V.high,Be=V.low,Qe=I[me];Qe<32?(ie=_e<<Qe|Be>>>32-Qe,Z=Be<<Qe|_e>>>32-Qe):(ie=Be<<Qe-32|_e>>>64-Qe,Z=_e<<Qe-32|Be>>>64-Qe);var Ie=M[w[me]];Ie.high=ie,Ie.low=Z}var ve=M[0],K=F[0];ve.high=K.high,ve.low=K.low;for(var q=0;q<5;q++)for(var oe=0;oe<5;oe++){var me=q+5*oe,V=F[me],W=M[me],te=M[(q+1)%5+5*oe],Y=M[(q+2)%5+5*oe];V.high=W.high^~te.high&Y.high,V.low=W.low^~te.low&Y.low}var V=F[0],he=Q[H];V.high^=he.high,V.low^=he.low}},_doFinalize:function(){var T=this._data,D=T.words,F=this._nDataBytes*8,L=T.sigBytes*8,R=this.blockSize*32;D[L>>>5]|=1<<24-L%32,D[(A.ceil((L+1)/R)*R>>>5)-1]|=128,T.sigBytes=D.length*4,this._process();for(var k=this._state,U=this.cfg.outputLength/8,V=U/8,H=[],q=0;q<V;q++){var ie=k[q],Z=ie.high,oe=ie.low;Z=(Z<<8|Z>>>24)&16711935|(Z<<24|Z>>>8)&4278255360,oe=(oe<<8|oe>>>24)&16711935|(oe<<24|oe>>>8)&4278255360,H.push(oe),H.push(Z)}return new C.init(H,U)},clone:function(){for(var T=y.clone.call(this),D=T._state=this._state.slice(0),F=0;F<25;F++)D[F]=D[F].clone();return T}});f.SHA3=y._createHelper(B),f.HmacSHA3=y._createHmacHelper(B)}(Math);/** @preserve
    (c) 2012 by Cédric Mesnil. All rights reserved.
    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
        - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */(function(A){var f=o,m=f.lib,C=m.WordArray,y=m.Hasher,x=f.algo,v=C.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),E=C.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),I=C.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),w=C.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),Q=C.create([0,1518500249,1859775393,2400959708,2840853838]),M=C.create([1352829926,1548603684,1836072691,2053994217,0]),B=x.RIPEMD160=y.extend({_doReset:function(){this._hash=C.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(U,V){for(var H=0;H<16;H++){var q=V+H,ie=U[q];U[q]=(ie<<8|ie>>>24)&16711935|(ie<<24|ie>>>8)&4278255360}var Z=this._hash.words,oe=Q.words,ne=M.words,se=v.words,ce=E.words,j=I.words,de=w.words,me,_e,Be,Qe,Ie,ve,K,W,te,Y;ve=me=Z[0],K=_e=Z[1],W=Be=Z[2],te=Qe=Z[3],Y=Ie=Z[4];for(var he,H=0;H<80;H+=1)he=me+U[V+se[H]]|0,H<16?he+=T(_e,Be,Qe)+oe[0]:H<32?he+=D(_e,Be,Qe)+oe[1]:H<48?he+=F(_e,Be,Qe)+oe[2]:H<64?he+=L(_e,Be,Qe)+oe[3]:he+=R(_e,Be,Qe)+oe[4],he=he|0,he=k(he,j[H]),he=he+Ie|0,me=Ie,Ie=Qe,Qe=k(Be,10),Be=_e,_e=he,he=ve+U[V+ce[H]]|0,H<16?he+=R(K,W,te)+ne[0]:H<32?he+=L(K,W,te)+ne[1]:H<48?he+=F(K,W,te)+ne[2]:H<64?he+=D(K,W,te)+ne[3]:he+=T(K,W,te)+ne[4],he=he|0,he=k(he,de[H]),he=he+Y|0,ve=Y,Y=te,te=k(W,10),W=K,K=he;he=Z[1]+Be+te|0,Z[1]=Z[2]+Qe+Y|0,Z[2]=Z[3]+Ie+ve|0,Z[3]=Z[4]+me+K|0,Z[4]=Z[0]+_e+W|0,Z[0]=he},_doFinalize:function(){var U=this._data,V=U.words,H=this._nDataBytes*8,q=U.sigBytes*8;V[q>>>5]|=128<<24-q%32,V[(q+64>>>9<<4)+14]=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360,U.sigBytes=(V.length+1)*4,this._process();for(var ie=this._hash,Z=ie.words,oe=0;oe<5;oe++){var ne=Z[oe];Z[oe]=(ne<<8|ne>>>24)&16711935|(ne<<24|ne>>>8)&4278255360}return ie},clone:function(){var U=y.clone.call(this);return U._hash=this._hash.clone(),U}});function T(U,V,H){return U^V^H}function D(U,V,H){return U&V|~U&H}function F(U,V,H){return(U|~V)^H}function L(U,V,H){return U&H|V&~H}function R(U,V,H){return U^(V|~H)}function k(U,V){return U<<V|U>>>32-V}f.RIPEMD160=y._createHelper(B),f.HmacRIPEMD160=y._createHmacHelper(B)})(Math),function(){var A=o,f=A.lib,m=f.Base,C=A.enc,y=C.Utf8,x=A.algo,v=x.HMAC=m.extend({init:function(E,I){E=this._hasher=new E.init,typeof I=="string"&&(I=y.parse(I));var w=E.blockSize,Q=w*4;I.sigBytes>Q&&(I=E.finalize(I)),I.clamp();for(var M=this._oKey=I.clone(),B=this._iKey=I.clone(),T=M.words,D=B.words,F=0;F<w;F++)T[F]^=1549556828,D[F]^=909522486;M.sigBytes=B.sigBytes=Q,this.reset()},reset:function(){var E=this._hasher;E.reset(),E.update(this._iKey)},update:function(E){return this._hasher.update(E),this},finalize:function(E){var I=this._hasher,w=I.finalize(E);I.reset();var Q=I.finalize(this._oKey.clone().concat(w));return Q}})}(),function(){var A=o,f=A.lib,m=f.Base,C=f.WordArray,y=A.algo,x=y.SHA1,v=y.HMAC,E=y.PBKDF2=m.extend({cfg:m.extend({keySize:128/32,hasher:x,iterations:1}),init:function(I){this.cfg=this.cfg.extend(I)},compute:function(I,w){for(var Q=this.cfg,M=v.create(Q.hasher,I),B=C.create(),T=C.create([1]),D=B.words,F=T.words,L=Q.keySize,R=Q.iterations;D.length<L;){var k=M.update(w).finalize(T);M.reset();for(var U=k.words,V=U.length,H=k,q=1;q<R;q++){H=M.finalize(H),M.reset();for(var ie=H.words,Z=0;Z<V;Z++)U[Z]^=ie[Z]}B.concat(k),F[0]++}return B.sigBytes=L*4,B}});A.PBKDF2=function(I,w,Q){return E.create(Q).compute(I,w)}}(),function(){var A=o,f=A.lib,m=f.Base,C=f.WordArray,y=A.algo,x=y.MD5,v=y.EvpKDF=m.extend({cfg:m.extend({keySize:128/32,hasher:x,iterations:1}),init:function(E){this.cfg=this.cfg.extend(E)},compute:function(E,I){for(var w,Q=this.cfg,M=Q.hasher.create(),B=C.create(),T=B.words,D=Q.keySize,F=Q.iterations;T.length<D;){w&&M.update(w),w=M.update(E).finalize(I),M.reset();for(var L=1;L<F;L++)w=M.finalize(w),M.reset();B.concat(w)}return B.sigBytes=D*4,B}});A.EvpKDF=function(E,I,w){return v.create(w).compute(E,I)}}(),o.lib.Cipher||function(A){var f=o,m=f.lib,C=m.Base,y=m.WordArray,x=m.BufferedBlockAlgorithm,v=f.enc,E=v.Utf8,I=v.Base64,w=f.algo,Q=w.EvpKDF,M=m.Cipher=x.extend({cfg:C.extend(),createEncryptor:function(ne,se){return this.create(this._ENC_XFORM_MODE,ne,se)},createDecryptor:function(ne,se){return this.create(this._DEC_XFORM_MODE,ne,se)},init:function(ne,se,ce){this.cfg=this.cfg.extend(ce),this._xformMode=ne,this._key=se,this.reset()},reset:function(){x.reset.call(this),this._doReset()},process:function(ne){return this._append(ne),this._process()},finalize:function(ne){ne&&this._append(ne);var se=this._doFinalize();return se},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function ne(se){return typeof se=="string"?oe:q}return function(se){return{encrypt:function(ce,j,de){return ne(j).encrypt(se,ce,j,de)},decrypt:function(ce,j,de){return ne(j).decrypt(se,ce,j,de)}}}}()}),B=m.StreamCipher=M.extend({_doFinalize:function(){var ne=this._process(!0);return ne},blockSize:1}),T=f.mode={},D=m.BlockCipherMode=C.extend({createEncryptor:function(ne,se){return this.Encryptor.create(ne,se)},createDecryptor:function(ne,se){return this.Decryptor.create(ne,se)},init:function(ne,se){this._cipher=ne,this._iv=se}}),F=T.CBC=function(){var ne=D.extend();ne.Encryptor=ne.extend({processBlock:function(ce,j){var de=this._cipher,me=de.blockSize;se.call(this,ce,j,me),de.encryptBlock(ce,j),this._prevBlock=ce.slice(j,j+me)}}),ne.Decryptor=ne.extend({processBlock:function(ce,j){var de=this._cipher,me=de.blockSize,_e=ce.slice(j,j+me);de.decryptBlock(ce,j),se.call(this,ce,j,me),this._prevBlock=_e}});function se(ce,j,de){var me,_e=this._iv;_e?(me=_e,this._iv=A):me=this._prevBlock;for(var Be=0;Be<de;Be++)ce[j+Be]^=me[Be]}return ne}(),L=f.pad={},R=L.Pkcs7={pad:function(ne,se){for(var ce=se*4,j=ce-ne.sigBytes%ce,de=j<<24|j<<16|j<<8|j,me=[],_e=0;_e<j;_e+=4)me.push(de);var Be=y.create(me,j);ne.concat(Be)},unpad:function(ne){var se=ne.words[ne.sigBytes-1>>>2]&255;ne.sigBytes-=se}},k=m.BlockCipher=M.extend({cfg:M.cfg.extend({mode:F,padding:R}),reset:function(){var ne;M.reset.call(this);var se=this.cfg,ce=se.iv,j=se.mode;this._xformMode==this._ENC_XFORM_MODE?ne=j.createEncryptor:(ne=j.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==ne?this._mode.init(this,ce&&ce.words):(this._mode=ne.call(j,this,ce&&ce.words),this._mode.__creator=ne)},_doProcessBlock:function(ne,se){this._mode.processBlock(ne,se)},_doFinalize:function(){var ne,se=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(se.pad(this._data,this.blockSize),ne=this._process(!0)):(ne=this._process(!0),se.unpad(ne)),ne},blockSize:128/32}),U=m.CipherParams=C.extend({init:function(ne){this.mixIn(ne)},toString:function(ne){return(ne||this.formatter).stringify(this)}}),V=f.format={},H=V.OpenSSL={stringify:function(ne){var se,ce=ne.ciphertext,j=ne.salt;return j?se=y.create([1398893684,1701076831]).concat(j).concat(ce):se=ce,se.toString(I)},parse:function(ne){var se,ce=I.parse(ne),j=ce.words;return j[0]==1398893684&&j[1]==1701076831&&(se=y.create(j.slice(2,4)),j.splice(0,4),ce.sigBytes-=16),U.create({ciphertext:ce,salt:se})}},q=m.SerializableCipher=C.extend({cfg:C.extend({format:H}),encrypt:function(ne,se,ce,j){j=this.cfg.extend(j);var de=ne.createEncryptor(ce,j),me=de.finalize(se),_e=de.cfg;return U.create({ciphertext:me,key:ce,iv:_e.iv,algorithm:ne,mode:_e.mode,padding:_e.padding,blockSize:ne.blockSize,formatter:j.format})},decrypt:function(ne,se,ce,j){j=this.cfg.extend(j),se=this._parse(se,j.format);var de=ne.createDecryptor(ce,j).finalize(se.ciphertext);return de},_parse:function(ne,se){return typeof ne=="string"?se.parse(ne,this):ne}}),ie=f.kdf={},Z=ie.OpenSSL={execute:function(ne,se,ce,j){j||(j=y.random(64/8));var de=Q.create({keySize:se+ce}).compute(ne,j),me=y.create(de.words.slice(se),ce*4);return de.sigBytes=se*4,U.create({key:de,iv:me,salt:j})}},oe=m.PasswordBasedCipher=q.extend({cfg:q.cfg.extend({kdf:Z}),encrypt:function(ne,se,ce,j){j=this.cfg.extend(j);var de=j.kdf.execute(ce,ne.keySize,ne.ivSize);j.iv=de.iv;var me=q.encrypt.call(this,ne,se,de.key,j);return me.mixIn(de),me},decrypt:function(ne,se,ce,j){j=this.cfg.extend(j),se=this._parse(se,j.format);var de=j.kdf.execute(ce,ne.keySize,ne.ivSize,se.salt);j.iv=de.iv;var me=q.decrypt.call(this,ne,se,de.key,j);return me}})}(),o.mode.CFB=function(){var A=o.lib.BlockCipherMode.extend();A.Encryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize;f.call(this,m,C,x,y),this._prevBlock=m.slice(C,C+x)}}),A.Decryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize,v=m.slice(C,C+x);f.call(this,m,C,x,y),this._prevBlock=v}});function f(m,C,y,x){var v,E=this._iv;E?(v=E.slice(0),this._iv=void 0):v=this._prevBlock,x.encryptBlock(v,0);for(var I=0;I<y;I++)m[C+I]^=v[I]}return A}(),o.mode.CTR=function(){var A=o.lib.BlockCipherMode.extend(),f=A.Encryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize,v=this._iv,E=this._counter;v&&(E=this._counter=v.slice(0),this._iv=void 0);var I=E.slice(0);y.encryptBlock(I,0),E[x-1]=E[x-1]+1|0;for(var w=0;w<x;w++)m[C+w]^=I[w]}});return A.Decryptor=f,A}();/** @preserve
* Counter block mode compatible with  Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return o.mode.CTRGladman=function(){var A=o.lib.BlockCipherMode.extend();function f(y){if((y>>24&255)===255){var x=y>>16&255,v=y>>8&255,E=y&255;x===255?(x=0,v===255?(v=0,E===255?E=0:++E):++v):++x,y=0,y+=x<<16,y+=v<<8,y+=E}else y+=1<<24;return y}function m(y){return(y[0]=f(y[0]))===0&&(y[1]=f(y[1])),y}var C=A.Encryptor=A.extend({processBlock:function(y,x){var v=this._cipher,E=v.blockSize,I=this._iv,w=this._counter;I&&(w=this._counter=I.slice(0),this._iv=void 0),m(w);var Q=w.slice(0);v.encryptBlock(Q,0);for(var M=0;M<E;M++)y[x+M]^=Q[M]}});return A.Decryptor=C,A}(),o.mode.OFB=function(){var A=o.lib.BlockCipherMode.extend(),f=A.Encryptor=A.extend({processBlock:function(m,C){var y=this._cipher,x=y.blockSize,v=this._iv,E=this._keystream;v&&(E=this._keystream=v.slice(0),this._iv=void 0),y.encryptBlock(E,0);for(var I=0;I<x;I++)m[C+I]^=E[I]}});return A.Decryptor=f,A}(),o.mode.ECB=function(){var A=o.lib.BlockCipherMode.extend();return A.Encryptor=A.extend({processBlock:function(f,m){this._cipher.encryptBlock(f,m)}}),A.Decryptor=A.extend({processBlock:function(f,m){this._cipher.decryptBlock(f,m)}}),A}(),o.pad.AnsiX923={pad:function(A,f){var m=A.sigBytes,C=f*4,y=C-m%C,x=m+y-1;A.clamp(),A.words[x>>>2]|=y<<24-x%4*8,A.sigBytes+=y},unpad:function(A){var f=A.words[A.sigBytes-1>>>2]&255;A.sigBytes-=f}},o.pad.Iso10126={pad:function(A,f){var m=f*4,C=m-A.sigBytes%m;A.concat(o.lib.WordArray.random(C-1)).concat(o.lib.WordArray.create([C<<24],1))},unpad:function(A){var f=A.words[A.sigBytes-1>>>2]&255;A.sigBytes-=f}},o.pad.Iso97971={pad:function(A,f){A.concat(o.lib.WordArray.create([2147483648],1)),o.pad.ZeroPadding.pad(A,f)},unpad:function(A){o.pad.ZeroPadding.unpad(A),A.sigBytes--}},o.pad.ZeroPadding={pad:function(A,f){var m=f*4;A.clamp(),A.sigBytes+=m-(A.sigBytes%m||m)},unpad:function(A){for(var f=A.words,m=A.sigBytes-1,m=A.sigBytes-1;m>=0;m--)if(f[m>>>2]>>>24-m%4*8&255){A.sigBytes=m+1;break}}},o.pad.NoPadding={pad:function(){},unpad:function(){}},function(A){var f=o,m=f.lib,C=m.CipherParams,y=f.enc,x=y.Hex,v=f.format,E=v.Hex={stringify:function(I){return I.ciphertext.toString(x)},parse:function(I){var w=x.parse(I);return C.create({ciphertext:w})}}}(),function(){var A=o,f=A.lib,m=f.BlockCipher,C=A.algo,y=[],x=[],v=[],E=[],I=[],w=[],Q=[],M=[],B=[],T=[];(function(){for(var L=[],R=0;R<256;R++)R<128?L[R]=R<<1:L[R]=R<<1^283;for(var k=0,U=0,R=0;R<256;R++){var V=U^U<<1^U<<2^U<<3^U<<4;V=V>>>8^V&255^99,y[k]=V,x[V]=k;var H=L[k],q=L[H],ie=L[q],Z=L[V]*257^V*16843008;v[k]=Z<<24|Z>>>8,E[k]=Z<<16|Z>>>16,I[k]=Z<<8|Z>>>24,w[k]=Z;var Z=ie*16843009^q*65537^H*257^k*16843008;Q[V]=Z<<24|Z>>>8,M[V]=Z<<16|Z>>>16,B[V]=Z<<8|Z>>>24,T[V]=Z,k?(k=H^L[L[L[ie^H]]],U^=L[L[U]]):k=U=1}})();var D=[0,1,2,4,8,16,32,64,128,27,54],F=C.AES=m.extend({_doReset:function(){var L;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var R=this._keyPriorReset=this._key,k=R.words,U=R.sigBytes/4,V=this._nRounds=U+6,H=(V+1)*4,q=this._keySchedule=[],ie=0;ie<H;ie++)ie<U?q[ie]=k[ie]:(L=q[ie-1],ie%U?U>6&&ie%U==4&&(L=y[L>>>24]<<24|y[L>>>16&255]<<16|y[L>>>8&255]<<8|y[L&255]):(L=L<<8|L>>>24,L=y[L>>>24]<<24|y[L>>>16&255]<<16|y[L>>>8&255]<<8|y[L&255],L^=D[ie/U|0]<<24),q[ie]=q[ie-U]^L);for(var Z=this._invKeySchedule=[],oe=0;oe<H;oe++){var ie=H-oe;if(oe%4)var L=q[ie];else var L=q[ie-4];oe<4||ie<=4?Z[oe]=L:Z[oe]=Q[y[L>>>24]]^M[y[L>>>16&255]]^B[y[L>>>8&255]]^T[y[L&255]]}}},encryptBlock:function(L,R){this._doCryptBlock(L,R,this._keySchedule,v,E,I,w,y)},decryptBlock:function(L,R){var k=L[R+1];L[R+1]=L[R+3],L[R+3]=k,this._doCryptBlock(L,R,this._invKeySchedule,Q,M,B,T,x);var k=L[R+1];L[R+1]=L[R+3],L[R+3]=k},_doCryptBlock:function(L,R,k,U,V,H,q,ie){for(var Z=this._nRounds,oe=L[R]^k[0],ne=L[R+1]^k[1],se=L[R+2]^k[2],ce=L[R+3]^k[3],j=4,de=1;de<Z;de++){var me=U[oe>>>24]^V[ne>>>16&255]^H[se>>>8&255]^q[ce&255]^k[j++],_e=U[ne>>>24]^V[se>>>16&255]^H[ce>>>8&255]^q[oe&255]^k[j++],Be=U[se>>>24]^V[ce>>>16&255]^H[oe>>>8&255]^q[ne&255]^k[j++],Qe=U[ce>>>24]^V[oe>>>16&255]^H[ne>>>8&255]^q[se&255]^k[j++];oe=me,ne=_e,se=Be,ce=Qe}var me=(ie[oe>>>24]<<24|ie[ne>>>16&255]<<16|ie[se>>>8&255]<<8|ie[ce&255])^k[j++],_e=(ie[ne>>>24]<<24|ie[se>>>16&255]<<16|ie[ce>>>8&255]<<8|ie[oe&255])^k[j++],Be=(ie[se>>>24]<<24|ie[ce>>>16&255]<<16|ie[oe>>>8&255]<<8|ie[ne&255])^k[j++],Qe=(ie[ce>>>24]<<24|ie[oe>>>16&255]<<16|ie[ne>>>8&255]<<8|ie[se&255])^k[j++];L[R]=me,L[R+1]=_e,L[R+2]=Be,L[R+3]=Qe},keySize:256/32});A.AES=m._createHelper(F)}(),function(){var A=o,f=A.lib,m=f.WordArray,C=f.BlockCipher,y=A.algo,x=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],v=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],E=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],I=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],w=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],Q=y.DES=C.extend({_doReset:function(){for(var D=this._key,F=D.words,L=[],R=0;R<56;R++){var k=x[R]-1;L[R]=F[k>>>5]>>>31-k%32&1}for(var U=this._subKeys=[],V=0;V<16;V++){for(var H=U[V]=[],q=E[V],R=0;R<24;R++)H[R/6|0]|=L[(v[R]-1+q)%28]<<31-R%6,H[4+(R/6|0)]|=L[28+(v[R+24]-1+q)%28]<<31-R%6;H[0]=H[0]<<1|H[0]>>>31;for(var R=1;R<7;R++)H[R]=H[R]>>>(R-1)*4+3;H[7]=H[7]<<5|H[7]>>>27}for(var ie=this._invSubKeys=[],R=0;R<16;R++)ie[R]=U[15-R]},encryptBlock:function(D,F){this._doCryptBlock(D,F,this._subKeys)},decryptBlock:function(D,F){this._doCryptBlock(D,F,this._invSubKeys)},_doCryptBlock:function(D,F,L){this._lBlock=D[F],this._rBlock=D[F+1],M.call(this,4,252645135),M.call(this,16,65535),B.call(this,2,858993459),B.call(this,8,16711935),M.call(this,1,1431655765);for(var R=0;R<16;R++){for(var k=L[R],U=this._lBlock,V=this._rBlock,H=0,q=0;q<8;q++)H|=I[q][((V^k[q])&w[q])>>>0];this._lBlock=V,this._rBlock=U^H}var ie=this._lBlock;this._lBlock=this._rBlock,this._rBlock=ie,M.call(this,1,1431655765),B.call(this,8,16711935),B.call(this,2,858993459),M.call(this,16,65535),M.call(this,4,252645135),D[F]=this._lBlock,D[F+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function M(D,F){var L=(this._lBlock>>>D^this._rBlock)&F;this._rBlock^=L,this._lBlock^=L<<D}function B(D,F){var L=(this._rBlock>>>D^this._lBlock)&F;this._lBlock^=L,this._rBlock^=L<<D}A.DES=C._createHelper(Q);var T=y.TripleDES=C.extend({_doReset:function(){var D=this._key,F=D.words;if(F.length!==2&&F.length!==4&&F.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var L=F.slice(0,2),R=F.length<4?F.slice(0,2):F.slice(2,4),k=F.length<6?F.slice(0,2):F.slice(4,6);this._des1=Q.createEncryptor(m.create(L)),this._des2=Q.createEncryptor(m.create(R)),this._des3=Q.createEncryptor(m.create(k))},encryptBlock:function(D,F){this._des1.encryptBlock(D,F),this._des2.decryptBlock(D,F),this._des3.encryptBlock(D,F)},decryptBlock:function(D,F){this._des3.decryptBlock(D,F),this._des2.encryptBlock(D,F),this._des1.decryptBlock(D,F)},keySize:192/32,ivSize:64/32,blockSize:64/32});A.TripleDES=C._createHelper(T)}(),function(){var A=o,f=A.lib,m=f.StreamCipher,C=A.algo,y=C.RC4=m.extend({_doReset:function(){for(var E=this._key,I=E.words,w=E.sigBytes,Q=this._S=[],M=0;M<256;M++)Q[M]=M;for(var M=0,B=0;M<256;M++){var T=M%w,D=I[T>>>2]>>>24-T%4*8&255;B=(B+Q[M]+D)%256;var F=Q[M];Q[M]=Q[B],Q[B]=F}this._i=this._j=0},_doProcessBlock:function(E,I){E[I]^=x.call(this)},keySize:256/32,ivSize:0});function x(){for(var E=this._S,I=this._i,w=this._j,Q=0,M=0;M<4;M++){I=(I+1)%256,w=(w+E[I])%256;var B=E[I];E[I]=E[w],E[w]=B,Q|=E[(E[I]+E[w])%256]<<24-M*8}return this._i=I,this._j=w,Q}A.RC4=m._createHelper(y);var v=C.RC4Drop=y.extend({cfg:y.cfg.extend({drop:192}),_doReset:function(){y._doReset.call(this);for(var E=this.cfg.drop;E>0;E--)x.call(this)}});A.RC4Drop=m._createHelper(v)}(),function(){var A=o,f=A.lib,m=f.StreamCipher,C=A.algo,y=[],x=[],v=[],E=C.Rabbit=m.extend({_doReset:function(){for(var w=this._key.words,Q=this.cfg.iv,M=0;M<4;M++)w[M]=(w[M]<<8|w[M]>>>24)&16711935|(w[M]<<24|w[M]>>>8)&4278255360;var B=this._X=[w[0],w[3]<<16|w[2]>>>16,w[1],w[0]<<16|w[3]>>>16,w[2],w[1]<<16|w[0]>>>16,w[3],w[2]<<16|w[1]>>>16],T=this._C=[w[2]<<16|w[2]>>>16,w[0]&4294901760|w[1]&65535,w[3]<<16|w[3]>>>16,w[1]&4294901760|w[2]&65535,w[0]<<16|w[0]>>>16,w[2]&4294901760|w[3]&65535,w[1]<<16|w[1]>>>16,w[3]&4294901760|w[0]&65535];this._b=0;for(var M=0;M<4;M++)I.call(this);for(var M=0;M<8;M++)T[M]^=B[M+4&7];if(Q){var D=Q.words,F=D[0],L=D[1],R=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,k=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,U=R>>>16|k&4294901760,V=k<<16|R&65535;T[0]^=R,T[1]^=U,T[2]^=k,T[3]^=V,T[4]^=R,T[5]^=U,T[6]^=k,T[7]^=V;for(var M=0;M<4;M++)I.call(this)}},_doProcessBlock:function(w,Q){var M=this._X;I.call(this),y[0]=M[0]^M[5]>>>16^M[3]<<16,y[1]=M[2]^M[7]>>>16^M[5]<<16,y[2]=M[4]^M[1]>>>16^M[7]<<16,y[3]=M[6]^M[3]>>>16^M[1]<<16;for(var B=0;B<4;B++)y[B]=(y[B]<<8|y[B]>>>24)&16711935|(y[B]<<24|y[B]>>>8)&4278255360,w[Q+B]^=y[B]},blockSize:128/32,ivSize:64/32});function I(){for(var w=this._X,Q=this._C,M=0;M<8;M++)x[M]=Q[M];Q[0]=Q[0]+1295307597+this._b|0,Q[1]=Q[1]+3545052371+(Q[0]>>>0<x[0]>>>0?1:0)|0,Q[2]=Q[2]+886263092+(Q[1]>>>0<x[1]>>>0?1:0)|0,Q[3]=Q[3]+1295307597+(Q[2]>>>0<x[2]>>>0?1:0)|0,Q[4]=Q[4]+3545052371+(Q[3]>>>0<x[3]>>>0?1:0)|0,Q[5]=Q[5]+886263092+(Q[4]>>>0<x[4]>>>0?1:0)|0,Q[6]=Q[6]+1295307597+(Q[5]>>>0<x[5]>>>0?1:0)|0,Q[7]=Q[7]+3545052371+(Q[6]>>>0<x[6]>>>0?1:0)|0,this._b=Q[7]>>>0<x[7]>>>0?1:0;for(var M=0;M<8;M++){var B=w[M]+Q[M],T=B&65535,D=B>>>16,F=((T*T>>>17)+T*D>>>15)+D*D,L=((B&4294901760)*B|0)+((B&65535)*B|0);v[M]=F^L}w[0]=v[0]+(v[7]<<16|v[7]>>>16)+(v[6]<<16|v[6]>>>16)|0,w[1]=v[1]+(v[0]<<8|v[0]>>>24)+v[7]|0,w[2]=v[2]+(v[1]<<16|v[1]>>>16)+(v[0]<<16|v[0]>>>16)|0,w[3]=v[3]+(v[2]<<8|v[2]>>>24)+v[1]|0,w[4]=v[4]+(v[3]<<16|v[3]>>>16)+(v[2]<<16|v[2]>>>16)|0,w[5]=v[5]+(v[4]<<8|v[4]>>>24)+v[3]|0,w[6]=v[6]+(v[5]<<16|v[5]>>>16)+(v[4]<<16|v[4]>>>16)|0,w[7]=v[7]+(v[6]<<8|v[6]>>>24)+v[5]|0}A.Rabbit=m._createHelper(E)}(),function(){var A=o,f=A.lib,m=f.StreamCipher,C=A.algo,y=[],x=[],v=[],E=C.RabbitLegacy=m.extend({_doReset:function(){var w=this._key.words,Q=this.cfg.iv,M=this._X=[w[0],w[3]<<16|w[2]>>>16,w[1],w[0]<<16|w[3]>>>16,w[2],w[1]<<16|w[0]>>>16,w[3],w[2]<<16|w[1]>>>16],B=this._C=[w[2]<<16|w[2]>>>16,w[0]&4294901760|w[1]&65535,w[3]<<16|w[3]>>>16,w[1]&4294901760|w[2]&65535,w[0]<<16|w[0]>>>16,w[2]&4294901760|w[3]&65535,w[1]<<16|w[1]>>>16,w[3]&4294901760|w[0]&65535];this._b=0;for(var T=0;T<4;T++)I.call(this);for(var T=0;T<8;T++)B[T]^=M[T+4&7];if(Q){var D=Q.words,F=D[0],L=D[1],R=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,k=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,U=R>>>16|k&4294901760,V=k<<16|R&65535;B[0]^=R,B[1]^=U,B[2]^=k,B[3]^=V,B[4]^=R,B[5]^=U,B[6]^=k,B[7]^=V;for(var T=0;T<4;T++)I.call(this)}},_doProcessBlock:function(w,Q){var M=this._X;I.call(this),y[0]=M[0]^M[5]>>>16^M[3]<<16,y[1]=M[2]^M[7]>>>16^M[5]<<16,y[2]=M[4]^M[1]>>>16^M[7]<<16,y[3]=M[6]^M[3]>>>16^M[1]<<16;for(var B=0;B<4;B++)y[B]=(y[B]<<8|y[B]>>>24)&16711935|(y[B]<<24|y[B]>>>8)&4278255360,w[Q+B]^=y[B]},blockSize:128/32,ivSize:64/32});function I(){for(var w=this._X,Q=this._C,M=0;M<8;M++)x[M]=Q[M];Q[0]=Q[0]+1295307597+this._b|0,Q[1]=Q[1]+3545052371+(Q[0]>>>0<x[0]>>>0?1:0)|0,Q[2]=Q[2]+886263092+(Q[1]>>>0<x[1]>>>0?1:0)|0,Q[3]=Q[3]+1295307597+(Q[2]>>>0<x[2]>>>0?1:0)|0,Q[4]=Q[4]+3545052371+(Q[3]>>>0<x[3]>>>0?1:0)|0,Q[5]=Q[5]+886263092+(Q[4]>>>0<x[4]>>>0?1:0)|0,Q[6]=Q[6]+1295307597+(Q[5]>>>0<x[5]>>>0?1:0)|0,Q[7]=Q[7]+3545052371+(Q[6]>>>0<x[6]>>>0?1:0)|0,this._b=Q[7]>>>0<x[7]>>>0?1:0;for(var M=0;M<8;M++){var B=w[M]+Q[M],T=B&65535,D=B>>>16,F=((T*T>>>17)+T*D>>>15)+D*D,L=((B&4294901760)*B|0)+((B&65535)*B|0);v[M]=F^L}w[0]=v[0]+(v[7]<<16|v[7]>>>16)+(v[6]<<16|v[6]>>>16)|0,w[1]=v[1]+(v[0]<<8|v[0]>>>24)+v[7]|0,w[2]=v[2]+(v[1]<<16|v[1]>>>16)+(v[0]<<16|v[0]>>>16)|0,w[3]=v[3]+(v[2]<<8|v[2]>>>24)+v[1]|0,w[4]=v[4]+(v[3]<<16|v[3]>>>16)+(v[2]<<16|v[2]>>>16)|0,w[5]=v[5]+(v[4]<<8|v[4]>>>24)+v[3]|0,w[6]=v[6]+(v[5]<<16|v[5]>>>16)+(v[4]<<16|v[4]>>>16)|0,w[7]=v[7]+(v[6]<<8|v[6]>>>24)+v[5]|0}A.RabbitLegacy=m._createHelper(E)}(),o});var nD=yat.CryptoJS,xat={};(function(o,A){o.FlowEcharts=A(Nb,o.Geoworld)})(xat,function(o,A){return function(f){var m={};function C(y){if(m[y])return m[y].exports;var x=m[y]={i:y,l:!1,exports:{}};return f[y].call(x.exports,x,x.exports,C),x.l=!0,x.exports}return C.m=f,C.c=m,C.d=function(y,x,v){C.o(y,x)||Object.defineProperty(y,x,{enumerable:!0,get:v})},C.r=function(y){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},C.t=function(y,x){if(x&1&&(y=C(y)),x&8||x&4&&typeof y=="object"&&y&&y.__esModule)return y;var v=Object.create(null);if(C.r(v),Object.defineProperty(v,"default",{enumerable:!0,value:y}),x&2&&typeof y!="string")for(var E in y)C.d(v,E,function(I){return y[I]}.bind(null,E));return v},C.n=function(y){var x=y&&y.__esModule?function(){return y.default}:function(){return y};return C.d(x,"a",x),x},C.o=function(y,x){return Object.prototype.hasOwnProperty.call(y,x)},C.p="",C(C.s=0)}([function(f,m,C){C(1);var y=C(7);f.exports=y},function(f,m,C){var y;y=function(x){return C(2).registerCoordinateSystem("GLMap",C(3)),C(5),C(6),C(2).registerAction({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(v,E){}),{version:"1.0.0"}}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m){f.exports=o},function(f,m,C){var y;y=function(x){var v=C(2);function E(I,w){this._GLMap=I,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=w}return E.prototype.dimensions=["lng","lat"],E.prototype.setMapOffset=function(I){this._mapOffset=I},E.prototype.getBMap=function(){return this._GLMap},E.prototype.dataToPoint=function(I){var w=je.toRadians(80),Q=[99999,99999],M=ee.fromDegrees(I[0],I[1]);if(!M)return Q;var B=this._GLMap.cartesianToCanvasCoordinates(M);if(!B)return Q;var T=this._GLMap;return T.mode===xi.SCENE3D&&ee.angleBetween(T.camera.position,M)>w?!1:[B.x-this._mapOffset[0],B.y-this._mapOffset[1]]},E.prototype.pointToData=function(Q){var w=this._mapOffset,Q=this._bmap.project([Q[0]+w[0],Q[1]+w[1]]);return[Q.lng,Q.lat]},E.prototype.getViewRect=function(){var I=this._api;return new v.graphic.BoundingRect(0,0,I.getWidth(),I.getHeight())},E.prototype.getRoamTransform=function(){return v.matrix.create()},E.dimensions=E.prototype.dimensions,E.create=function(I,w){var Q;I.eachComponent("GLMap",function(M){var B=w.getZr().painter.getViewportRoot(),T=v.glMap;Q=new E(T,w),Q.setMapOffset(M.__mapOffset||[0,0]),M.coordinateSystem=Q}),I.eachSeries(function(M){M.get("coordinateSystem")==="GLMap"&&(M.coordinateSystem=Q)})},E}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m){f.exports=A},function(f,m,C){var y;y=function(x){return C(2).extendComponentModel({type:"GLMap",getBMap:function(){return this.__GLMap},defaultOption:{roam:!1}})}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m,C){var y;y=function(x){return C(2).extendComponentView({type:"GLMap",init:function(v,E){this.api=E,Nb.glMap.postRender.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.dispatchAction({type:"GLMapRoam"})},render:function(v,E,I){},dispose:function(v,E){Nb.glMap.postRender.removeEventListener(this.moveHandler,this)}})}.call(m,C,m,f),y!==void 0&&(f.exports=y)},function(f,m){function C(y,x){this._mapContainer=y,this._overlay=this._createChartOverlay(),this._overlay.setOption(x)}C.prototype._createChartOverlay=function(){var y=this._mapContainer.scene;y.canvas.setAttribute("tabIndex",0);var x=document.createElement("div");return x.style.position="absolute",x.style.top="0px",x.style.left="0px",x.style.width=y.canvas.width+"px",x.style.height=y.canvas.height+"px",x.style.pointerEvents="none",x.setAttribute("id","echarts"),x.setAttribute("class","echartMap"),this._mapContainer.container.appendChild(x),this._echartsContainer=x,Nb.glMap=y,Nb.init(x)},C.prototype.dispose=function(){this._echartsContainer&&(this._mapContainer.container.removeChild(this._echartsContainer),this._echartsContainer=null),this._overlay&&(this._overlay.dispose(),this._overlay=null)},C.prototype.destroy=function(){this.dispose()},C.prototype.updateOverlay=function(y){this._overlay&&this._overlay.setOption(y)},C.prototype.getMap=function(){return this._mapContainer},C.prototype.getOverlay=function(){return this._overlay},f.exports=C}])});var dae=xat.FlowEcharts,Yze=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"],Jze=["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"],Wze=["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"],jze=["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"],qze=["#text"],Xze=["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"],epe=["accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"],Zze=["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"],R$=["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"];function Yh(o,A){for(var f=A.length;f--;)typeof A[f]=="string"&&(A[f]=A[f].toLowerCase()),o[A[f]]=!0;return o}function $ze(o){var A={},f=void 0;for(f in o)Object.prototype.hasOwnProperty.call(o,f)&&(A[f]=o[f]);return A}var _bi=/\{\{[\s\S]*|[\s\S]*\}\}/gm,Bbi=/<%[\s\S]*|[\s\S]*%>/gm,wbi=/^data-[\-\w.\u00B7-\uFFFF]/,bbi=/^aria-[\-\w]+$/,Qbi=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,Sbi=/^(?:\w+script|data):/i,Dbi=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,L$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function eD(o){if(Array.isArray(o)){for(var A=0,f=Array(o.length);A<o.length;A++)f[A]=o[A];return f}else return Array.from(o)}var Tbi=function(){return typeof window>"u"?null:window};function vat(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tbi(),A=function(Lt){return vat(Lt)};if(A.version="1.0.8",A.removed=[],!o||!o.document||o.document.nodeType!==9)return A.isSupported=!1,A;var f=o.document,m=!1,C=!1,y=o.document,x=o.DocumentFragment,v=o.HTMLTemplateElement,E=o.Node,I=o.NodeFilter,w=o.NamedNodeMap,Q=w===void 0?o.NamedNodeMap||o.MozNamedAttrMap:w,M=o.Text,B=o.Comment,T=o.DOMParser;if(typeof v=="function"){var D=y.createElement("template");D.content&&D.content.ownerDocument&&(y=D.content.ownerDocument)}var F=y,L=F.implementation,R=F.createNodeIterator,k=F.getElementsByTagName,U=F.createDocumentFragment,V=f.importNode,H={};A.isSupported=L&&typeof L.createHTMLDocument<"u"&&y.documentMode!==9;var q=_bi,ie=Bbi,Z=wbi,oe=bbi,ne=Sbi,se=Dbi,ce=Qbi,j=null,de=Yh({},[].concat(eD(Yze),eD(Jze),eD(Wze),eD(jze),eD(qze))),me=null,_e=Yh({},[].concat(eD(Xze),eD(epe),eD(Zze),eD(R$))),Be=null,Qe=null,Ie=!0,ve=!0,K=!1,W=!1,te=!1,Y=!1,he=!1,fe=!1,Ce=!1,Ee=!1,be=!1,Re=!0,Ne=!0,Je=!1,ot={},nt=Yh({},["audio","head","math","script","style","template","svg","video"]),$e=Yh({},["audio","video","img","source","image"]),ht=Yh({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ze=null,Ze=y.createElement("form"),ct=function(Lt){(typeof Lt>"u"?"undefined":L$(Lt))!=="object"&&(Lt={}),j="ALLOWED_TAGS"in Lt?Yh({},Lt.ALLOWED_TAGS):de,me="ALLOWED_ATTR"in Lt?Yh({},Lt.ALLOWED_ATTR):_e,Be="FORBID_TAGS"in Lt?Yh({},Lt.FORBID_TAGS):{},Qe="FORBID_ATTR"in Lt?Yh({},Lt.FORBID_ATTR):{},ot="USE_PROFILES"in Lt?Lt.USE_PROFILES:!1,Ie=Lt.ALLOW_ARIA_ATTR!==!1,ve=Lt.ALLOW_DATA_ATTR!==!1,K=Lt.ALLOW_UNKNOWN_PROTOCOLS||!1,W=Lt.SAFE_FOR_JQUERY||!1,te=Lt.SAFE_FOR_TEMPLATES||!1,Y=Lt.WHOLE_DOCUMENT||!1,Ce=Lt.RETURN_DOM||!1,Ee=Lt.RETURN_DOM_FRAGMENT||!1,be=Lt.RETURN_DOM_IMPORT||!1,fe=Lt.FORCE_BODY||!1,Re=Lt.SANITIZE_DOM!==!1,Ne=Lt.KEEP_CONTENT!==!1,Je=Lt.IN_PLACE||!1,ce=Lt.ALLOWED_URI_REGEXP||ce,te&&(ve=!1),Ee&&(Ce=!0),ot&&(j=Yh({},[].concat(eD(qze))),me=[],ot.html===!0&&(Yh(j,Yze),Yh(me,Xze)),ot.svg===!0&&(Yh(j,Jze),Yh(me,epe),Yh(me,R$)),ot.svgFilters===!0&&(Yh(j,Wze),Yh(me,epe),Yh(me,R$)),ot.mathMl===!0&&(Yh(j,jze),Yh(me,Zze),Yh(me,R$))),Lt.ADD_TAGS&&(j===de&&(j=$ze(j)),Yh(j,Lt.ADD_TAGS)),Lt.ADD_ATTR&&(me===_e&&(me=$ze(me)),Yh(me,Lt.ADD_ATTR)),Lt.ADD_URI_SAFE_ATTR&&Yh(ht,Lt.ADD_URI_SAFE_ATTR),Ne&&(j["#text"]=!0),Y&&Yh(j,["html","head","body"]),j.table&&Yh(j,["tbody"]),Object&&"freeze"in Object&&Object.freeze(Lt),ze=Lt},We=function(Lt){A.removed.push({element:Lt});try{Lt.parentNode.removeChild(Lt)}catch{Lt.outerHTML=""}},Oe=function(Lt,pi){try{A.removed.push({attribute:pi.getAttributeNode(Lt),from:pi})}catch{A.removed.push({attribute:null,from:pi})}pi.removeAttribute(Lt)},Ye=function(Lt){var pi=void 0,Ut=void 0;if(fe)Lt="<remove></remove>"+Lt;else{var ri=Lt.match(/^[\s]+/);Ut=ri&&ri[0],Ut&&(Lt=Lt.slice(Ut.length))}if(m)try{pi=new T().parseFromString(Lt,"text/html")}catch{}if(C&&Yh(Be,["title"]),!pi||!pi.documentElement){pi=L.createHTMLDocument("");var ni=pi,kt=ni.body;kt.parentNode.removeChild(kt.parentNode.firstElementChild),kt.outerHTML=Lt}return Ut&&pi.body.insertBefore(y.createTextNode(Ut),pi.body.childNodes[0]||null),k.call(pi,Y?"html":"body")[0]};A.isSupported&&(function(){try{var Lt=Ye('<svg><p><style><img src="</style><img src=x onerror=alert(1)//">');Lt.querySelector("svg img")&&(m=!0)}catch{}}(),function(){try{var Lt=Ye("<x/><title>&lt;/title&gt;&lt;img&gt;");Lt.querySelector("title").textContent.match(/<\/title/)&&(C=!0)}catch{}}());var rt=function(Lt){return R.call(Lt.ownerDocument||Lt,Lt,I.SHOW_ELEMENT|I.SHOW_COMMENT|I.SHOW_TEXT,function(){return I.FILTER_ACCEPT},!1)},gt=function(Lt){return Lt instanceof M||Lt instanceof B?!1:typeof Lt.nodeName!="string"||typeof Lt.textContent!="string"||typeof Lt.removeChild!="function"||!(Lt.attributes instanceof Q)||typeof Lt.removeAttribute!="function"||typeof Lt.setAttribute!="function"},Et=function(Lt){return(typeof E>"u"?"undefined":L$(E))==="object"?Lt instanceof E:Lt&&(typeof Lt>"u"?"undefined":L$(Lt))==="object"&&typeof Lt.nodeType=="number"&&typeof Lt.nodeName=="string"},yt=function(Lt,pi,Ut){!H[Lt]||H[Lt].forEach(function(ri){ri.call(A,pi,Ut,ze)})},vt=function(Lt){var pi=void 0;if(yt("beforeSanitizeElements",Lt,null),gt(Lt))return We(Lt),!0;var Ut=Lt.nodeName.toLowerCase();if(yt("uponSanitizeElement",Lt,{tagName:Ut,allowedTags:j}),!j[Ut]||Be[Ut]){if(Ne&&!nt[Ut]&&typeof Lt.insertAdjacentHTML=="function")try{Lt.insertAdjacentHTML("AfterEnd",Lt.innerHTML)}catch{}return We(Lt),!0}return W&&!Lt.firstElementChild&&(!Lt.content||!Lt.content.firstElementChild)&&/</g.test(Lt.textContent)&&(A.removed.push({element:Lt.cloneNode()}),Lt.innerHTML?Lt.innerHTML=Lt.innerHTML.replace(/</g,"&lt;"):Lt.innerHTML=Lt.textContent.replace(/</g,"&lt;")),te&&Lt.nodeType===3&&(pi=Lt.textContent,pi=pi.replace(q," "),pi=pi.replace(ie," "),Lt.textContent!==pi&&(A.removed.push({element:Lt.cloneNode()}),Lt.textContent=pi)),yt("afterSanitizeElements",Lt,null),!1},Rt=function(Lt,pi,Ut){return!(Re&&(pi==="id"||pi==="name")&&(Ut in y||Ut in Ze)||(te&&(Ut=Ut.replace(q," "),Ut=Ut.replace(ie," ")),!(ve&&Z.test(pi))&&!(Ie&&oe.test(pi))&&(!me[pi]||Qe[pi]||!ht[pi]&&!ce.test(Ut.replace(se,""))&&!((pi==="src"||pi==="xlink:href")&&Lt!=="script"&&Ut.indexOf("data:")===0&&$e[Lt])&&!(K&&!ne.test(Ut.replace(se,"")))&&Ut)))},qt=function(Lt){var pi=void 0,Ut=void 0,ri=void 0,ni=void 0,kt=void 0;yt("beforeSanitizeAttributes",Lt,null);var qe=Lt.attributes;if(qe){var Fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:me};for(kt=qe.length;kt--;){pi=qe[kt];var it=pi,Ht=it.name,Jt=it.namespaceURI;if(Ut=pi.value.trim(),ri=Ht.toLowerCase(),Fe.attrName=ri,Fe.attrValue=Ut,Fe.keepAttr=!0,yt("uponSanitizeAttribute",Lt,Fe),Ut=Fe.attrValue,ri==="name"&&Lt.nodeName==="IMG"&&qe.id)ni=qe.id,qe=Array.prototype.slice.apply(qe),Oe("id",Lt),Oe(Ht,Lt),qe.indexOf(ni)>kt&&Lt.setAttribute("id",ni.value);else{if(Lt.nodeName==="INPUT"&&ri==="type"&&Ut==="file"&&(me[ri]||!Qe[ri]))continue;Ht==="id"&&Lt.setAttribute(Ht,""),Oe(Ht,Lt)}if(Fe.keepAttr){var jt=Lt.nodeName.toLowerCase();if(Rt(jt,ri,Ut))try{Jt?Lt.setAttributeNS(Jt,Ht,Ut):Lt.setAttribute(Ht,Ut),A.removed.pop()}catch{}}}yt("afterSanitizeAttributes",Lt,null)}},wt=function Lt(pi){var Ut=void 0,ri=rt(pi);for(yt("beforeSanitizeShadowDOM",pi,null);Ut=ri.nextNode();)yt("uponSanitizeShadowNode",Ut,null),!vt(Ut)&&(Ut.content instanceof x&&Lt(Ut.content),qt(Ut));yt("afterSanitizeShadowDOM",pi,null)};return A.sanitize=function(Lt,pi){var Ut=void 0,ri=void 0,ni=void 0,kt=void 0,qe=void 0;if(Lt||(Lt="<!-->"),typeof Lt!="string"&&!Et(Lt)){if(typeof Lt.toString!="function")throw new TypeError("toString is not a function");if(Lt=Lt.toString(),typeof Lt!="string")throw new TypeError("dirty is not a string, aborting")}if(!A.isSupported){if(L$(o.toStaticHTML)==="object"||typeof o.toStaticHTML=="function"){if(typeof Lt=="string")return o.toStaticHTML(Lt);if(Et(Lt))return o.toStaticHTML(Lt.outerHTML)}return Lt}if(he||ct(pi),A.removed=[],!Je)if(Lt instanceof E)Ut=Ye("<!-->"),ri=Ut.ownerDocument.importNode(Lt,!0),ri.nodeType===1&&ri.nodeName==="BODY"?Ut=ri:Ut.appendChild(ri);else{if(!Ce&&!Y&&Lt.indexOf("<")===-1)return Lt;if(Ut=Ye(Lt),!Ut)return Ce?null:""}Ut&&fe&&We(Ut.firstChild);for(var Fe=rt(Je?Lt:Ut);ni=Fe.nextNode();)ni.nodeType===3&&ni===kt||vt(ni)||(ni.content instanceof x&&wt(ni.content),qt(ni),kt=ni);if(Je)return Lt;if(Ce){if(Ee)for(qe=U.call(Ut.ownerDocument);Ut.firstChild;)qe.appendChild(Ut.firstChild);else qe=Ut;return be&&(qe=V.call(f,qe,!0)),qe}return Y?Ut.outerHTML:Ut.innerHTML},A.setConfig=function(Lt){ct(Lt),he=!0},A.clearConfig=function(){ze=null,he=!1},A.isValidAttribute=function(Lt,pi,Ut){ze||ct({});var ri=Lt.toLowerCase(),ni=pi.toLowerCase();return Rt(ri,ni,Ut)},A.addHook=function(Lt,pi){typeof pi=="function"&&(H[Lt]=H[Lt]||[],H[Lt].push(pi))},A.removeHook=function(Lt){H[Lt]&&H[Lt].pop()},A.removeHooks=function(Lt){H[Lt]&&(H[Lt]=[])},A.removeAllHooks=function(){H={}},A}var Mbi=vat(),Eat=Mbi;function Pbi(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,Ui.throwInstantiationError()}var Iat=Pbi,TDe={};TDe.createCheckbox=function(o,A,f){let m=document.createElement("div"),C=document.createElement("label"),y=document.createElement("input");y.type="checkbox";let x=`checked: ${A}`;return O(f)&&(x+=`, enable: ${f}`),y.setAttribute("data-bind",x),C.appendChild(y),C.appendChild(document.createTextNode(o)),m.appendChild(C),m};TDe.createSection=function(o,A,f,m){let C=document.createElement("div");C.className="cesium-cesiumInspector-section",C.setAttribute("data-bind",`css: { "cesium-cesiumInspector-section-collapsed": !${f} }`),o.appendChild(C);let y=document.createElement("h3");y.className="cesium-cesiumInspector-sectionHeader",y.appendChild(document.createTextNode(A)),y.setAttribute("data-bind",`click: ${m}`),C.appendChild(y);let x=document.createElement("div");return x.className="cesium-cesiumInspector-sectionContent",C.appendChild(x),x};var K8=TDe;function TP(){this._flattenPolygons=[],this._needUpdateFlatten=!1,this._updateFlattenInternal=!1,this._defautTexture=void 0,this._flattenBounds=new ai,this._polygonDepth=void 0,this._matMW=Xe.IDENTITY,this._flattenOriginPoint=void 0}Object.defineProperties(TP.prototype,{needUpdateFlatten:{get:function(){return this._needUpdateFlatten},set:function(o){this._needUpdateFlatten=o}},flattenPolygons:{get:function(){return this._flattenPolygons},set:function(o){!O(o)||!O(o.length)?this._flattenPolygons=[]:this._flattenPolygons=o,this._updateFlattenInternal=!0}},localViewMatrix:{get:function(){return this._matMW},set:function(o){this._matMW=o}}});TP.prototype.initailize=function(o){if(this._flattenPolygons.length>0){O(this._polygonDepth)||(this._polygonDepth=new Q8),this._polygonDepth._flattenPolygonDrawCommands=[];let A={position:0},f=new Xe;Xe.inverse(this._matMW,f);let m=new Kr,C=[];for(let y=0;y<this._flattenPolygons.length;y++){let x=o.context,v=this._flattenPolygons[y],E=rh.createGeometry(v),I=E.attributes.position.values;for(let F=0;F<I.length/3;F++){let L=new ee(0,0,0);L.x=I[3*F],L.y=I[3*F+1],L.z=I[3*F+2],Xe.multiplyByPoint(f,L,L),C.push(L),E.attributes.position.values[3*F]=L.x,E.attributes.position.values[3*F+1]=L.y,E.attributes.position.values[3*F+2]=L.z}let w=wi.transform(E.boundingSphere,f);E.boundingSphere=w;let Q=Vc.fromGeometry({context:x,geometry:E,attributeLocations:A,bufferUsage:ln.STATIC_DRAW,interleave:!0}),M=_s.fromCache({context:x,vertexShaderSource:Pne,fragmentShaderSource:Mne}),B=new fn;B.depthTest.enabled=!0,B.cull.enabled=!0,B.cull.face=Ii.BACK;let T={},D=new On({boundingVolume:w,modelMatrix:new Xe,primitiveType:yn.TRIANGLES,vertexArray:Q,shaderProgram:M,uniformMap:T,renderState:B,pass:hr.GLOBE});this._polygonDepth._flattenPolygonDrawCommands.push(D)}Kr.fromPoints(C,m),this._flattenBounds.x=m.x,this._flattenBounds.y=m.y+m.height,this._flattenBounds.z=m.x+m.width,this._flattenBounds.w=m.y,this._polygonDepth.updateFrustum(this._flattenBounds.x,this._flattenBounds.y,this._flattenBounds.z,this._flattenBounds.w)}};TP.prototype.addFlattenPolygon=function(o){this._flattenPolygons.push(o),this._updateFlattenInternal=!0,this._needUpdateFlatten=!0};TP.prototype.removeFlattenPolygon=function(o){for(let A=0;A<this._flattenPolygons.length;A++)if(this._flattenPolygons[A]===o){this._flattenPolygons.splice(A,1),this._updateFlattenInternal=!0,O(this._polygonDepth)||(this._polygonDepth=new Q8),this._polygonDepth.destroy(),this._polygonDepth=void 0;break}};TP.prototype.clearFlattenPolygon=function(){O(this._polygonDepth)&&(this._polygonDepth._flattenPolygonDrawCommands=[],this._polygonDepth.destroy(),this._polygonDepth=void 0),this._flattenPolygons=[],this._needUpdateFlatten=!1,this._updateFlattenInternal=!1};TP.prototype.update=function(o,A,f){this._frameState=o,O(this._defautTexture)||(this._defautTexture=new mo({context:this._frameState.context,width:2,height:2})),this._needUpdateFlatten===!0&&O(this._flattenPolygons)&&this._flattenPolygons.length>0&&(this._updateFlattenInternal===!0&&(O(this._polygonDepth)?(this._polygonDepth.destroy(),this._polygonDepth=void 0,this.initailize(o)):this.initailize(o)),O(this._polygonDepth)&&this._polygonDepth.update(o),this._updateFlattenInternal=!1)};TP.getShader=function(o){};TP.prototype.getUniformMap=function(){let o=this,A={};return A.u_polygonTexture=function(){return O(o._polygonDepth)?o._polygonDepth._colorTexture:o._defautTexture},A.u_polygonBounds=function(){return o._flattenBounds},A.u_bFlatten=function(){return!!(o._needUpdateFlatten===!0&&O(o._polygonDepth))},A.u_eastNorthUpToFixedFrame=function(){return o.localViewMatrix},A.u_r_eastNorthUpToFixedFrame=function(){let f=new Xe;return Xe.inverse(o.localViewMatrix,f),f},A};var Rbi=TP,MDe=Rbi;function AH(o){this._scene=o,this._flattenPolygons=[],this._polygonTexture=new MDe,this._clipPlaneOfFlatten=!1}Object.defineProperties(AH.prototype,{clipPlaneOfFlatten:{get:function(){return this._clipPlaneOfFlatten},set:function(o){this._clipPlaneOfFlatten=o}}});AH.prototype.addPolygon=function(o){this._flattenPolygons.push(o)};AH.prototype.clearPolygon=function(){this._flattenPolygons=[];let o=this._polygonTexture,A=this._scene,f={flattenBounds:[],flattenPolygons:[],flattenPolygonHeights:[]};A.globe.flattenPolygonRegion=f,A.globe.flattenUniforms=void 0,o.clearFlattenPolygon()};AH.prototype.generatePolygonTexture=function(){let o=this._scene,A=this._polygonTexture,f=this._flattenPolygons;if(f.length<1)return;for(let v=0;v<f.length;v++){let E=f[v],I=[];for(let Q=0;Q<E.length;Q+=3){let M=E[Q],B=E[Q+1],T=E[Q+2];I.push(M,B,T)}let w=rh.fromPositions({positions:ee.fromDegreesArrayHeights(I),extrudedHeight:0,perPositionHeight:!0});A.addFlattenPolygon(w)}let m=f[0][0],C=f[0][1],y=new ee.fromDegrees(m,C,-2e3),x=Vn.eastNorthUpToFixedFrame(y);A.localViewMatrix=x,A.update(o._frameState)};AH.prototype.update=function(){let o=this._scene,A=this._polygonTexture,f=this._flattenPolygons;if(f.length<1)return;this.generatePolygonTexture();let m={flattenBounds:[],flattenPolygons:[],flattenPolygonHeights:[],enableFlatten:!1},C=-100;for(let v=0;v<f.length;v++){let E=f[v],I=new Kr,w=[],Q=[],M=0,B=0;for(let D=0;D<E.length/3;D++){let F=E[3*D],L=E[3*D+1],R=new ee(F,L,0);w.push(R),Q.push([je.toRadians(F),je.toRadians(L)]),M=Math.max(E[3*D+2],M),B=Math.min(E[3*D+2],B),C=Math.min(C,B)}Kr.fromPoints(w,I);let T=new ai(I.x,I.y+I.height,I.x+I.width,I.y);m.flattenBounds.push(T),m.flattenPolygons.push(Q),m.flattenPolygonHeights.push({maxHeight:M+2,minHeight:B-2}),m.enableFlatten=!0}o.globe.flattenPolygonRegion=m;let y=A.getUniformMap();y.u_minFlattenHeight=function(){return C};let x=this;y.u_clipPlaneOfFlatten=function(){return x.clipPlaneOfFlatten},o.globe.flattenUniforms=y,o.requestRender()};var xN=AH,_at={};(function(o,A){A(o.JSEncrypt={})})(_at,function(o){"use strict";var A="0123456789abcdefghijklmnopqrstuvwxyz";function f(We){return A.charAt(We)}function m(We,Oe){return We&Oe}function C(We,Oe){return We|Oe}function y(We,Oe){return We^Oe}function x(We,Oe){return We&~Oe}function v(We){if(We==0)return-1;var Oe=0;return(65535&We)==0&&(We>>=16,Oe+=16),(255&We)==0&&(We>>=8,Oe+=8),(15&We)==0&&(We>>=4,Oe+=4),(3&We)==0&&(We>>=2,Oe+=2),(1&We)==0&&++Oe,Oe}function E(We){for(var Oe=0;We!=0;)We&=We-1,++Oe;return Oe}var I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w="=";function Q(We){var Oe,Ye,rt="";for(Oe=0;Oe+3<=We.length;Oe+=3)Ye=parseInt(We.substring(Oe,Oe+3),16),rt+=I.charAt(Ye>>6)+I.charAt(63&Ye);for(Oe+1==We.length?(Ye=parseInt(We.substring(Oe,Oe+1),16),rt+=I.charAt(Ye<<2)):Oe+2==We.length&&(Ye=parseInt(We.substring(Oe,Oe+2),16),rt+=I.charAt(Ye>>2)+I.charAt((3&Ye)<<4));(3&rt.length)>0;)rt+=w;return rt}var M,B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(We,Oe){We.__proto__=Oe}||function(We,Oe){for(var Ye in Oe)Oe.hasOwnProperty(Ye)&&(We[Ye]=Oe[Ye])},T,D=function(We){var Oe;if(M===void 0){var Ye="0123456789ABCDEF",rt=` \f
\r   \xA0\u2028\u2029`;for(M={},Oe=0;Oe<16;++Oe)M[Ye.charAt(Oe)]=Oe;for(Ye=Ye.toLowerCase(),Oe=10;Oe<16;++Oe)M[Ye.charAt(Oe)]=Oe;for(Oe=0;Oe<rt.length;++Oe)M[rt.charAt(Oe)]=-1}var gt=[],Et=0,yt=0;for(Oe=0;Oe<We.length;++Oe){var vt=We.charAt(Oe);if(vt=="=")break;if((vt=M[vt])!=-1){if(vt===void 0)throw new Error("Illegal character at offset "+Oe);Et|=vt,++yt>=2?(gt[gt.length]=Et,Et=0,yt=0):Et<<=4}}if(yt)throw new Error("Hex encoding incomplete: 4 bits missing");return gt},F={decode:function(We){var Oe;if(T===void 0){var Ye=`= \f
\r   \xA0\u2028\u2029`;for(T=Object.create(null),Oe=0;Oe<64;++Oe)T["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Oe)]=Oe;for(Oe=0;Oe<Ye.length;++Oe)T[Ye.charAt(Oe)]=-1}var rt=[],gt=0,Et=0;for(Oe=0;Oe<We.length;++Oe){var yt=We.charAt(Oe);if(yt=="=")break;if((yt=T[yt])!=-1){if(yt===void 0)throw new Error("Illegal character at offset "+Oe);gt|=yt,++Et>=4?(rt[rt.length]=gt>>16,rt[rt.length]=gt>>8&255,rt[rt.length]=255&gt,gt=0,Et=0):gt<<=6}}switch(Et){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:rt[rt.length]=gt>>10;break;case 3:rt[rt.length]=gt>>16,rt[rt.length]=gt>>8&255}return rt},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(We){var Oe=F.re.exec(We);if(Oe)if(Oe[1])We=Oe[1];else{if(!Oe[2])throw new Error("RegExp out of sync");We=Oe[2]}return F.decode(We)}},L=1e13,R=function(){function We(Oe){this.buf=[+Oe||0]}return We.prototype.mulAdd=function(Oe,Ye){var rt,gt,Et=this.buf,yt=Et.length;for(rt=0;rt<yt;++rt)(gt=Et[rt]*Oe+Ye)<L?Ye=0:gt-=(Ye=0|gt/L)*L,Et[rt]=gt;Ye>0&&(Et[rt]=Ye)},We.prototype.sub=function(Oe){var Ye,rt,gt=this.buf,Et=gt.length;for(Ye=0;Ye<Et;++Ye)(rt=gt[Ye]-Oe)<0?(rt+=L,Oe=1):Oe=0,gt[Ye]=rt;for(;gt[gt.length-1]===0;)gt.pop()},We.prototype.toString=function(Oe){if((Oe||10)!=10)throw new Error("only base 10 is supported");for(var Ye=this.buf,rt=Ye[Ye.length-1].toString(),gt=Ye.length-2;gt>=0;--gt)rt+=(L+Ye[gt]).toString().substring(1);return rt},We.prototype.valueOf=function(){for(var Oe=this.buf,Ye=0,rt=Oe.length-1;rt>=0;--rt)Ye=Ye*L+Oe[rt];return Ye},We.prototype.simplify=function(){var Oe=this.buf;return Oe.length==1?Oe[0]:this},We}(),k="\u2026",U=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,V=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function H(We,Oe){return We.length>Oe&&(We=We.substring(0,Oe)+k),We}var q,ie=function(){function We(Oe,Ye){this.hexDigits="0123456789ABCDEF",Oe instanceof We?(this.enc=Oe.enc,this.pos=Oe.pos):(this.enc=Oe,this.pos=Ye)}return We.prototype.get=function(Oe){if(Oe===void 0&&(Oe=this.pos++),Oe>=this.enc.length)throw new Error("Requesting byte offset "+Oe+" on a stream of length "+this.enc.length);return typeof this.enc=="string"?this.enc.charCodeAt(Oe):this.enc[Oe]},We.prototype.hexByte=function(Oe){return this.hexDigits.charAt(Oe>>4&15)+this.hexDigits.charAt(15&Oe)},We.prototype.hexDump=function(Oe,Ye,rt){for(var gt="",Et=Oe;Et<Ye;++Et)if(gt+=this.hexByte(this.get(Et)),rt!==!0)switch(15&Et){case 7:gt+="  ";break;case 15:gt+=`
`;break;default:gt+=" "}return gt},We.prototype.isASCII=function(Oe,Ye){for(var rt=Oe;rt<Ye;++rt){var gt=this.get(rt);if(gt<32||gt>176)return!1}return!0},We.prototype.parseStringISO=function(Oe,Ye){for(var rt="",gt=Oe;gt<Ye;++gt)rt+=String.fromCharCode(this.get(gt));return rt},We.prototype.parseStringUTF=function(Oe,Ye){for(var rt="",gt=Oe;gt<Ye;){var Et=this.get(gt++);rt+=Et<128?String.fromCharCode(Et):Et>191&&Et<224?String.fromCharCode((31&Et)<<6|63&this.get(gt++)):String.fromCharCode((15&Et)<<12|(63&this.get(gt++))<<6|63&this.get(gt++))}return rt},We.prototype.parseStringBMP=function(Oe,Ye){for(var rt,gt,Et="",yt=Oe;yt<Ye;)rt=this.get(yt++),gt=this.get(yt++),Et+=String.fromCharCode(rt<<8|gt);return Et},We.prototype.parseTime=function(Oe,Ye,rt){var gt=this.parseStringISO(Oe,Ye),Et=(rt?U:V).exec(gt);return Et?(rt&&(Et[1]=+Et[1],Et[1]+=+Et[1]<70?2e3:1900),gt=Et[1]+"-"+Et[2]+"-"+Et[3]+" "+Et[4],Et[5]&&(gt+=":"+Et[5],Et[6]&&(gt+=":"+Et[6],Et[7]&&(gt+="."+Et[7]))),Et[8]&&(gt+=" UTC",Et[8]!="Z"&&(gt+=Et[8],Et[9]&&(gt+=":"+Et[9]))),gt):"Unrecognized time: "+gt},We.prototype.parseInteger=function(Oe,Ye){for(var rt,gt=this.get(Oe),Et=gt>127,yt=Et?255:0,vt="";gt==yt&&++Oe<Ye;)gt=this.get(Oe);if((rt=Ye-Oe)===0)return Et?-1:0;if(rt>4){for(vt=gt,rt<<=3;(128&(+vt^yt))==0;)vt=+vt<<1,--rt;vt="("+rt+` bit)
@@ -14494,7 +14467,7 @@
`;return Ye+=Oe.wordwrap(this.getPrivateBaseKeyB64())+`
`,Ye+="-----END RSA PRIVATE KEY-----"},Oe.prototype.getPublicKey=function(){var Ye=`-----BEGIN PUBLIC KEY-----
`;return Ye+=Oe.wordwrap(this.getPublicBaseKeyB64())+`
`,Ye+="-----END PUBLIC KEY-----"},Oe.hasPublicKeyProperty=function(Ye){return(Ye=Ye||{}).hasOwnProperty("n")&&Ye.hasOwnProperty("e")},Oe.hasPrivateKeyProperty=function(Ye){return(Ye=Ye||{}).hasOwnProperty("n")&&Ye.hasOwnProperty("e")&&Ye.hasOwnProperty("d")&&Ye.hasOwnProperty("p")&&Ye.hasOwnProperty("q")&&Ye.hasOwnProperty("dmp1")&&Ye.hasOwnProperty("dmq1")&&Ye.hasOwnProperty("coeff")},Oe.prototype.parsePropertiesFrom=function(Ye){this.n=Ye.n,this.e=Ye.e,Ye.hasOwnProperty("d")&&(this.d=Ye.d,this.p=Ye.p,this.q=Ye.q,this.dmp1=Ye.dmp1,this.dmq1=Ye.dmq1,this.coeff=Ye.coeff)},Oe}($e),ct=function(){function We(Oe){Oe=Oe||{},this.default_key_size=parseInt(Oe.default_key_size,10)||1024,this.default_public_exponent=Oe.default_public_exponent||"010001",this.log=Oe.log||!1,this.key=null}return We.prototype.setKey=function(Oe){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new Ze(Oe)},We.prototype.setPrivateKey=function(Oe){this.setKey(Oe)},We.prototype.setPublicKey=function(Oe){this.setKey(Oe)},We.prototype.decrypt=function(Oe){try{return this.getKey().decrypt(function(Ye){var rt,gt="",Et=0,yt=0;for(rt=0;rt<Ye.length&&Ye.charAt(rt)!=w;++rt){var vt=I.indexOf(Ye.charAt(rt));vt<0||(Et==0?(gt+=f(vt>>2),yt=3&vt,Et=1):Et==1?(gt+=f(yt<<2|vt>>4),yt=15&vt,Et=2):Et==2?(gt+=f(yt),gt+=f(vt>>2),yt=3&vt,Et=3):(gt+=f(yt<<2|vt>>4),gt+=f(15&vt),Et=0))}return Et==1&&(gt+=f(yt<<2)),gt}(Oe))}catch{return!1}},We.prototype.encrypt=function(Oe){try{return Q(this.getKey().encrypt(Oe))}catch{return!1}},We.prototype.getKey=function(Oe){if(!this.key){if(this.key=new Ze,Oe&&{}.toString.call(Oe)==="[object Function]")return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,Oe);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},We.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},We.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},We.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},We.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},We.version="3.0.0-beta.1",We}();window.JSEncrypt=ct,o.JSEncrypt=ct,o.default=ct,Object.defineProperty(o,"__esModule",{value:!0})});var n2e=Vst.JSEncrypt.JSEncrypt;function nDi(o,A){let f=!1,m=new n2e,C=x=>{let v=nD.enc.Utf8.parse("*ya;p7291zclfleoqc20161v$DSP&%3+"),E=nD.enc.Utf8.parse("&kdaow$IEW.##%5-"),I=nD.enc.Hex.parse(x),w=nD.enc.Base64.stringify(I);return nD.AES.decrypt(w,v,{iv:E,mode:nD.mode.CBC,padding:nD.pad.Pkcs7}).toString(nD.enc.Utf8).toString()},y=async(x,v)=>{let E={cmdType:"getRegisterIds",time:new Date().getTime()},I=m.encrypt(JSON.stringify(E)),w=await An.post({url:`${x}/licensemanager/client?sid=${window.rsaPublicId}`,data:I,retryAttempts:3,headers:{"Content-Type":"application/json",dataType:"text"}});if(!w){f=!1,v&&v(f);return}return f=JSON.parse(C(w)).registeredModules.filter(Q=>Q===37).length>0,v&&v(f),f};f=(async(x,v)=>{let E=new Date().getTime();await An.fetchJson({url:`${x}/licensemanager/client?cmdType=getRsaKey&${E}`}).then(I=>{let w=I;if(!w)return f=!1;if(w.code!==200){f=!1,v&&v(f);return}return m.setPublicKey(w.data.key),window.rsaPublicKey=w.data.key,window.rsaPublicId=w.data.sid,y(x,v)}).catch(I=>{f=!1,v&&v(f)})})(o,A)}var zst=nDi;function oDi(o,A,f,m,C,y){let x=m._frameState,v=o.derivedCommands;!O(v)||(x.useLogDepth&&O(v.logDepth)&&(o=v.logDepth.command),v=o.derivedCommands,O(v[A])&&(o=v[A][f],o.execute(C,y)))}var upe,cpe,Ape,hpe;function c7e(o,A,f,m,C,y){upe=upe||new Yu,cpe=cpe||new n2,Ape=Ape||new Ds,hpe=hpe||new Y0;let x=o._us,v=x._frameState,E=v.camera,I=E._scene,w=I._view,Q=w.frustumCommandsList,M=Q.length,B=I._globeTranslucencyState,T=B.translucent,D;O(E.frustum.fov)?D=E.frustum.clone(upe):O(E.frustum.infiniteProjectionMatrix)?D=E.frustum.clone(cpe):O(E.frustum.width)?D=E.frustum.clone(Ape):D=E.frustum.clone(hpe);function F(U,V,H,q){(!y||y(U,V))&&(m&&C?oDi(U,m,C,V,H,q):U.execute(H,q))}let L,R,k;for(let U=0;U<M;++U){let V=M-U-1,H=Q[V],q=f.framebuffer;f.framebuffer=A,D.near=V!==0?H.near*I.opaqueFrustumNearOffset:H.near,D.far=H.far,x.updateFrustum(D),x.updatePass(hr.GLOBE),k=H.commands[hr.GLOBE],R=H.indices[hr.GLOBE];let ie=I._view.globeTranslucencyFramebuffer;if(T)B.executeGlobeCommands(H,F,ie,I,f);else for(L=0;L<R;++L)F(k[L],I,o,f);for(x.updatePass(hr.CESIUM_3D_TILE),k=H.commands[hr.CESIUM_3D_TILE],R=H.indices[hr.CESIUM_3D_TILE],L=0;L<R;++L)F(k[L],I,o,f);for(x.updatePass(hr.OPAQUE),k=H.commands[hr.OPAQUE],R=H.indices[hr.OPAQUE],L=0;L<R;++L)F(k[L],I,o,f);for(x.updatePass(hr.TRANSLUCENT),k=H.commands[hr.TRANSLUCENT],R=H.indices[hr.TRANSLUCENT],L=0;L<R;++L)F(k[L],I,o,f);f.framebuffer=q}}var A7e=`
`,Ye+="-----END PUBLIC KEY-----"},Oe.hasPublicKeyProperty=function(Ye){return(Ye=Ye||{}).hasOwnProperty("n")&&Ye.hasOwnProperty("e")},Oe.hasPrivateKeyProperty=function(Ye){return(Ye=Ye||{}).hasOwnProperty("n")&&Ye.hasOwnProperty("e")&&Ye.hasOwnProperty("d")&&Ye.hasOwnProperty("p")&&Ye.hasOwnProperty("q")&&Ye.hasOwnProperty("dmp1")&&Ye.hasOwnProperty("dmq1")&&Ye.hasOwnProperty("coeff")},Oe.prototype.parsePropertiesFrom=function(Ye){this.n=Ye.n,this.e=Ye.e,Ye.hasOwnProperty("d")&&(this.d=Ye.d,this.p=Ye.p,this.q=Ye.q,this.dmp1=Ye.dmp1,this.dmq1=Ye.dmq1,this.coeff=Ye.coeff)},Oe}($e),ct=function(){function We(Oe){Oe=Oe||{},this.default_key_size=parseInt(Oe.default_key_size,10)||1024,this.default_public_exponent=Oe.default_public_exponent||"010001",this.log=Oe.log||!1,this.key=null}return We.prototype.setKey=function(Oe){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new Ze(Oe)},We.prototype.setPrivateKey=function(Oe){this.setKey(Oe)},We.prototype.setPublicKey=function(Oe){this.setKey(Oe)},We.prototype.decrypt=function(Oe){try{return this.getKey().decrypt(function(Ye){var rt,gt="",Et=0,yt=0;for(rt=0;rt<Ye.length&&Ye.charAt(rt)!=w;++rt){var vt=I.indexOf(Ye.charAt(rt));vt<0||(Et==0?(gt+=f(vt>>2),yt=3&vt,Et=1):Et==1?(gt+=f(yt<<2|vt>>4),yt=15&vt,Et=2):Et==2?(gt+=f(yt),gt+=f(vt>>2),yt=3&vt,Et=3):(gt+=f(yt<<2|vt>>4),gt+=f(15&vt),Et=0))}return Et==1&&(gt+=f(yt<<2)),gt}(Oe))}catch{return!1}},We.prototype.encrypt=function(Oe){try{return Q(this.getKey().encrypt(Oe))}catch{return!1}},We.prototype.getKey=function(Oe){if(!this.key){if(this.key=new Ze,Oe&&{}.toString.call(Oe)==="[object Function]")return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,Oe);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},We.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},We.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},We.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},We.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},We.version="3.0.0-beta.1",We}();window.JSEncrypt=ct,o.JSEncrypt=ct,o.default=ct,Object.defineProperty(o,"__esModule",{value:!0})});var PDe=_at.JSEncrypt.JSEncrypt;function Lbi(o,A){let f=!1,m=new PDe,C=x=>{let v=nD.enc.Utf8.parse("*ya;p7291zclfleoqc20161v$DSP&%3+"),E=nD.enc.Utf8.parse("&kdaow$IEW.##%5-"),I=nD.enc.Hex.parse(x),w=nD.enc.Base64.stringify(I);return nD.AES.decrypt(w,v,{iv:E,mode:nD.mode.CBC,padding:nD.pad.Pkcs7}).toString(nD.enc.Utf8).toString()},y=async(x,v)=>{let E={cmdType:"getRegisterIds",time:new Date().getTime()},I=m.encrypt(JSON.stringify(E)),w=await An.post({url:`${x}/licensemanager/client?sid=${window.rsaPublicId}`,data:I,retryAttempts:3,headers:{"Content-Type":"application/json",dataType:"text"}});if(!w){f=!1,v&&v(f);return}return f=JSON.parse(C(w)).registeredModules.filter(Q=>Q===37).length>0,v&&v(f),f};f=(async(x,v)=>{let E=new Date().getTime();await An.fetchJson({url:`${x}/licensemanager/client?cmdType=getRsaKey&${E}`}).then(I=>{let w=I;if(!w)return f=!1;if(w.code!==200){f=!1,v&&v(f);return}return m.setPublicKey(w.data.key),window.rsaPublicKey=w.data.key,window.rsaPublicId=w.data.sid,y(x,v)}).catch(I=>{f=!1,v&&v(f)})})(o,A)}var Bat=Lbi,Fbi=function(o){let A=document.createElement("div");A.innerHTML=o;let f=document.createDocumentFragment();for(;A.firstChild;)f.appendChild(A.firstChild);return f},RDe=Fbi,Nbi=EP,kbi=function(o,A,f){A=iA(A);let m=RDe(o),C=[],y;for(y=0;y<m.childNodes.length;++y)C.push(m.childNodes[y]);for(A.appendChild(m),y=0;y<C.length;++y){let x=C[y];(x.nodeType===1||x.nodeType===8)&&Nbi.applyBindings(f,x)}return C},fae=kbi,Obi=EP,WK=function(o){if(!O(o)||!O(o.terria))throw new Ui("options.terria is required.");this.terria=o.terria,this._removeSubscription=void 0,this._lastLegendUpdate=void 0,this.eventHelper=new Mx,this.distanceLabel=void 0,this.barWidth=void 0,this.enableDistanceLegend=O(o.enableDistanceLegend)?o.enableDistanceLegend:!0,Obi.track(this,["distanceLabel","barWidth"]),this.eventHelper.add(this.terria.afterWidgetChanged,function(){O(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0)},this);let A=this;function f(){if(O(A.terria)){let m=A.terria.scene;A._removeSubscription=m.postRender.addEventListener(function(){Ubi(this,m)},A)}}f(),this.eventHelper.add(this.terria.afterWidgetChanged,function(){f()},this)};WK.prototype.destroy=function(){this.eventHelper.removeAll()};WK.prototype.show=function(o){let A;this.enableDistanceLegend?A=`<div class="distance-legend" data-bind="visible: distanceLabel && barWidth"><div class="distance-legend-label" data-bind="text: distanceLabel"></div><div class="distance-legend-scale-bar" data-bind="style: { width: barWidth + 'px', left: (5 + (125 - barWidth) / 2) + 'px' }"></div></div>`:A=`<div class="distance-legend"  style="display: none;" data-bind="visible: distanceLabel && barWidth"><div class="distance-legend-label"  data-bind="text: distanceLabel"></div><div class="distance-legend-scale-bar"  data-bind="style: { width: barWidth + 'px', left: (5 + (125 - barWidth) / 2) + 'px' }"></div></div>`,fae(A,o,this)};WK.create=function(o){let A=new WK(o);return A.show(o.container),A};var TCe=Di.MOON2000,e7e=new l0(null,null,TCe),tpe=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7];function Ubi(o,A){if(!o.enableDistanceLegend){o.barWidth=void 0,o.distanceLabel=void 0;return}let f=GA();if(f<o._lastLegendUpdate+250)return;o._lastLegendUpdate=f;let m=A.canvas.clientWidth,C=A.canvas.clientHeight,y=A.camera.getPickRay(new It(m/2|0,C-1)),x=A.camera.getPickRay(new It(1+m/2|0,C-1)),v=A.globe,E=v.pick(y,A),I=v.pick(x,A);if(!O(E)||!O(I)){o.barWidth=void 0,o.distanceLabel=void 0;return}let w=TCe.cartesianToCartographic(E),Q=TCe.cartesianToCartographic(I);e7e.setEndPoints(w,Q);let M=e7e.surfaceDistance,B=100,T;for(let D=tpe.length-1;!O(T)&&D>=0;--D)tpe[D]/M<B&&(T=tpe[D]);if(O(T)){let D;T>=1e3?D=(T/1e3).toString()+" km":D=T.toString()+" m",o.barWidth=T/M|0,o.distanceLabel=D}else o.barWidth=void 0,o.distanceLabel=void 0}var LDe=WK,Gbi="M 7.5,0 C 3.375,0 0,3.375 0,7.5 0,11.625 3.375,15 7.5,15 c 3.46875,0 6.375,-2.4375 7.21875,-5.625 l -1.96875,0 C 12,11.53125 9.9375,13.125 7.5,13.125 4.40625,13.125 1.875,10.59375 1.875,7.5 1.875,4.40625 4.40625,1.875 7.5,1.875 c 1.59375,0 2.90625,0.65625 3.9375,1.6875 l -3,3 6.5625,0 L 15,0 12.75,2.25 C 11.4375,0.84375 9.5625,0 7.5,0 z",FDe=Gbi,Hbi=EP,NDe=function(o){if(!O(o))throw new Ui("terria is required");this._terria=o,this.name="Unnamed Control",this.text=void 0,this.svgIcon=void 0,this.svgHeight=void 0,this.svgWidth=void 0,this.cssClass=void 0,this.isActive=!1,Hbi.track(this,["name","svgIcon","svgHeight","svgWidth","cssClass","isActive"])};Object.defineProperties(NDe.prototype,{terria:{get:function(){return this._terria}},hasText:{get:function(){return O(this.text)&&typeof this.text=="string"}}});NDe.prototype.activate=function(){throw new Ui("activate must be implemented in the derived class.")};var gae=NDe,wat=function(o){gae.apply(this,arguments)};wat.prototype=Object.create(gae.prototype);var hH=wat,nW=function(o){hH.apply(this,arguments),this.name="\u91CD\u7F6E\u89C6\u56FE",this.navigationLocked=!1,this.svgIcon=FDe,this.svgHeight=15,this.svgWidth=15,this.cssClass="navigation-control-icon-reset"};nW.prototype=Object.create(hH.prototype);nW.prototype.setNavigationLocked=function(o){this.navigationLocked=o};nW.prototype.resetView=function(){if(this.navigationLocked)return;let o=this.terria.scene;if(!o.screenSpaceCameraController.enableInputs)return;this.isActive=!0;let A=o.camera;if(O(this.terria.trackedEntity)){let f=this.terria.trackedEntity;this.terria.trackedEntity=void 0,this.terria.trackedEntity=f}else if(this.terria.options.defaultResetView){if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof Kt)A.flyTo({destination:o.globe.ellipsoid.cartographicToCartesian(this.terria.options.defaultResetView)});else if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof Si)try{Si.validate(this.terria.options.defaultResetView),A.flyTo({destination:this.terria.options.defaultResetView})}catch{console.log("Cesium-navigation/ResetViewNavigationControl:   options.defaultResetView Cesium rectangle is  invalid!")}}else typeof A.flyHome=="function"?A.flyHome(1):A.flyTo({destination:Ml.DEFAULT_VIEW_RECTANGLE,duration:1});this.isActive=!1};nW.prototype.activate=function(){this.resetView()};var kDe=nW,bat={},Vbi=new Kt,ipe=new ls;bat.getCameraFocus=function(o,A,f){let m=o.scene,C=m.camera;if(m.mode!==xi.MORPHING&&(O(f)||(f=new ee),O(o.trackedEntity)?f=o.trackedEntity.position.getValue(o.clock.currentTime,f):(ipe.origin=C.positionWC,ipe.direction=C.directionWC,f=m.globe.pick(ipe,m,f)),!!O(f)))return m.mode===xi.SCENE2D||m.mode===xi.COLUMBUS_VIEW?(f=C.worldToCameraCoordinatesPoint(f,f),A&&(f=m.globe.ellipsoid.cartographicToCartesian(m.mapProjection.unproject(f,Vbi),f))):A||(f=C.worldToCameraCoordinatesPoint(f,f)),f};var dH=bat,oW=function(o,A){hH.apply(this,arguments),this.name="Zoom "+(A?"In":"Out"),this.text=A?"+":"-",this.cssClass="navigation-control-icon-zoom-"+(A?"in":"out"),this.relativeAmount=2,A&&(this.relativeAmount=1/this.relativeAmount)};oW.prototype.relativeAmount=1;oW.prototype=Object.create(hH.prototype);oW.prototype.activate=function(){this.zoom(this.relativeAmount)};var zbi=new ee;oW.prototype.zoom=function(o){if(this.isActive=!0,O(this.terria)){let A=this.terria.scene,f=A.screenSpaceCameraController;if(!f.enableInputs||!f.enableZoom)return;let m=A.camera,C;switch(A.mode){case xi.MORPHING:break;case xi.SCENE2D:m.zoomIn(m.positionCartographic.height*(1-this.relativeAmount));break;default:let y;if(O(this.terria.trackedEntity)?y=new ee:y=dH.getCameraFocus(this.terria,!1),O(y))C={direction:m.direction,up:m.up};else{let I=new ls(m.worldToCameraCoordinatesPoint(A.globe.ellipsoid.cartographicToCartesian(m.positionCartographic)),m.directionWC);y=kA.grazingAltitudeLocation(I,A.globe.ellipsoid),C={heading:m.heading,pitch:m.pitch,roll:m.roll}}let x=ee.subtract(m.position,y,zbi),v=ee.multiplyByScalar(x,o,x),E=ee.add(y,v,y);if(O(this.terria.trackedEntity)||A.mode===xi.COLUMBUS_VIEW)m.position=E;else{if(o===.5&&Ae(m.undergroundMode,!1)===!1&&m.positionCartographic.height<1)return;m.flyTo({destination:E,orientation:C,duration:.5,convert:!1})}}}this.isActive=!1};var mie=oW,Kbi="m 66.5625,0 0,15.15625 3.71875,0 0,-10.40625 5.5,10.40625 4.375,0 0,-15.15625 -3.71875,0 0,10.40625 L 70.9375,0 66.5625,0 z M 72.5,20.21875 c -28.867432,0 -52.28125,23.407738 -52.28125,52.28125 0,28.87351 23.413818,52.3125 52.28125,52.3125 28.86743,0 52.28125,-23.43899 52.28125,-52.3125 0,-28.873512 -23.41382,-52.28125 -52.28125,-52.28125 z m 0,1.75 c 13.842515,0 26.368948,5.558092 35.5,14.5625 l -11.03125,11 0.625,0.625 11.03125,-11 c 8.9199,9.108762 14.4375,21.579143 14.4375,35.34375 0,13.764606 -5.5176,26.22729 -14.4375,35.34375 l -11.03125,-11 -0.625,0.625 11.03125,11 c -9.130866,9.01087 -21.658601,14.59375 -35.5,14.59375 -13.801622,0 -26.321058,-5.53481 -35.4375,-14.5 l 11.125,-11.09375 c 6.277989,6.12179 14.857796,9.90625 24.3125,9.90625 19.241896,0 34.875,-15.629154 34.875,-34.875 0,-19.245847 -15.633104,-34.84375 -34.875,-34.84375 -9.454704,0 -18.034511,3.760884 -24.3125,9.875 L 37.0625,36.4375 C 46.179178,27.478444 58.696991,21.96875 72.5,21.96875 z m -0.875,0.84375 0,13.9375 1.75,0 0,-13.9375 -1.75,0 z M 36.46875,37.0625 47.5625,48.15625 C 41.429794,54.436565 37.65625,63.027539 37.65625,72.5 c 0,9.472461 3.773544,18.055746 9.90625,24.34375 L 36.46875,107.9375 c -8.96721,-9.1247 -14.5,-21.624886 -14.5,-35.4375 0,-13.812615 5.53279,-26.320526 14.5,-35.4375 z M 72.5,39.40625 c 18.297686,0 33.125,14.791695 33.125,33.09375 0,18.302054 -14.827314,33.125 -33.125,33.125 -18.297687,0 -33.09375,-14.822946 -33.09375,-33.125 0,-18.302056 14.796063,-33.09375 33.09375,-33.09375 z M 22.84375,71.625 l 0,1.75 13.96875,0 0,-1.75 -13.96875,0 z m 85.5625,0 0,1.75 14,0 0,-1.75 -14,0 z M 71.75,108.25 l 0,13.9375 1.71875,0 0,-13.9375 -1.71875,0 z",ODe=Kbi,Ybi="m 72.71875,54.375 c -0.476702,0 -0.908208,0.245402 -1.21875,0.5625 -0.310542,0.317098 -0.551189,0.701933 -0.78125,1.1875 -0.172018,0.363062 -0.319101,0.791709 -0.46875,1.25 -6.91615,1.075544 -12.313231,6.656514 -13,13.625 -0.327516,0.117495 -0.661877,0.244642 -0.9375,0.375 -0.485434,0.22959 -0.901634,0.471239 -1.21875,0.78125 -0.317116,0.310011 -0.5625,0.742111 -0.5625,1.21875 l 0.03125,0 c 0,0.476639 0.245384,0.877489 0.5625,1.1875 0.317116,0.310011 0.702066,0.58291 1.1875,0.8125 0.35554,0.168155 0.771616,0.32165 1.21875,0.46875 1.370803,6.10004 6.420817,10.834127 12.71875,11.8125 0.146999,0.447079 0.30025,0.863113 0.46875,1.21875 0.230061,0.485567 0.470708,0.870402 0.78125,1.1875 0.310542,0.317098 0.742048,0.5625 1.21875,0.5625 0.476702,0 0.876958,-0.245402 1.1875,-0.5625 0.310542,-0.317098 0.582439,-0.701933 0.8125,-1.1875 0.172018,-0.363062 0.319101,-0.791709 0.46875,-1.25 6.249045,-1.017063 11.256351,-5.7184 12.625,-11.78125 0.447134,-0.1471 0.86321,-0.300595 1.21875,-0.46875 0.485434,-0.22959 0.901633,-0.502489 1.21875,-0.8125 0.317117,-0.310011 0.5625,-0.710861 0.5625,-1.1875 l -0.03125,0 c 0,-0.476639 -0.245383,-0.908739 -0.5625,-1.21875 C 89.901633,71.846239 89.516684,71.60459 89.03125,71.375 88.755626,71.244642 88.456123,71.117495 88.125,71 87.439949,64.078341 82.072807,58.503735 75.21875,57.375 c -0.15044,-0.461669 -0.326927,-0.884711 -0.5,-1.25 -0.230061,-0.485567 -0.501958,-0.870402 -0.8125,-1.1875 -0.310542,-0.317098 -0.710798,-0.5625 -1.1875,-0.5625 z m -0.0625,1.40625 c 0.03595,-0.01283 0.05968,0 0.0625,0 0.0056,0 0.04321,-0.02233 0.1875,0.125 0.144288,0.147334 0.34336,0.447188 0.53125,0.84375 0.06385,0.134761 0.123901,0.309578 0.1875,0.46875 -0.320353,-0.01957 -0.643524,-0.0625 -0.96875,-0.0625 -0.289073,0 -0.558569,0.04702 -0.84375,0.0625 C 71.8761,57.059578 71.936151,56.884761 72,56.75 c 0.18789,-0.396562 0.355712,-0.696416 0.5,-0.84375 0.07214,-0.07367 0.120304,-0.112167 0.15625,-0.125 z m 0,2.40625 c 0.448007,0 0.906196,0.05436 1.34375,0.09375 0.177011,0.592256 0.347655,1.271044 0.5,2.03125 0.475097,2.370753 0.807525,5.463852 0.9375,8.9375 -0.906869,-0.02852 -1.834463,-0.0625 -2.78125,-0.0625 -0.92298,0 -1.802327,0.03537 -2.6875,0.0625 0.138529,-3.473648 0.493653,-6.566747 0.96875,-8.9375 0.154684,-0.771878 0.320019,-1.463985 0.5,-2.0625 0.405568,-0.03377 0.804291,-0.0625 1.21875,-0.0625 z m -2.71875,0.28125 c -0.129732,0.498888 -0.259782,0.987558 -0.375,1.5625 -0.498513,2.487595 -0.838088,5.693299 -0.96875,9.25 -3.21363,0.15162 -6.119596,0.480068 -8.40625,0.9375 -0.682394,0.136509 -1.275579,0.279657 -1.84375,0.4375 0.799068,-6.135482 5.504716,-11.036454 11.59375,-12.1875 z M 75.5,58.5 c 6.043169,1.18408 10.705093,6.052712 11.5,12.15625 -0.569435,-0.155806 -1.200273,-0.302525 -1.875,-0.4375 -2.262525,-0.452605 -5.108535,-0.783809 -8.28125,-0.9375 -0.130662,-3.556701 -0.470237,-6.762405 -0.96875,-9.25 C 75.761959,59.467174 75.626981,58.990925 75.5,58.5 z m -2.84375,12.09375 c 0.959338,0 1.895843,0.03282 2.8125,0.0625 C 75.48165,71.267751 75.5,71.871028 75.5,72.5 c 0,1.228616 -0.01449,2.438313 -0.0625,3.59375 -0.897358,0.0284 -1.811972,0.0625 -2.75,0.0625 -0.927373,0 -1.831062,-0.03473 -2.71875,-0.0625 -0.05109,-1.155437 -0.0625,-2.365134 -0.0625,-3.59375 0,-0.628972 0.01741,-1.232249 0.03125,-1.84375 0.895269,-0.02827 1.783025,-0.0625 2.71875,-0.0625 z M 68.5625,70.6875 c -0.01243,0.60601 -0.03125,1.189946 -0.03125,1.8125 0,1.22431 0.01541,2.407837 0.0625,3.5625 -3.125243,-0.150329 -5.92077,-0.471558 -8.09375,-0.90625 -0.784983,-0.157031 -1.511491,-0.316471 -2.125,-0.5 -0.107878,-0.704096 -0.1875,-1.422089 -0.1875,-2.15625 0,-0.115714 0.02849,-0.228688 0.03125,-0.34375 0.643106,-0.20284 1.389577,-0.390377 2.25,-0.5625 2.166953,-0.433487 4.97905,-0.75541 8.09375,-0.90625 z m 8.3125,0.03125 c 3.075121,0.15271 5.824455,0.446046 7.96875,0.875 0.857478,0.171534 1.630962,0.360416 2.28125,0.5625 0.0027,0.114659 0,0.228443 0,0.34375 0,0.735827 -0.07914,1.450633 -0.1875,2.15625 -0.598568,0.180148 -1.29077,0.34562 -2.0625,0.5 -2.158064,0.431708 -4.932088,0.754666 -8.03125,0.90625 0.04709,-1.154663 0.0625,-2.33819 0.0625,-3.5625 0,-0.611824 -0.01924,-1.185379 -0.03125,-1.78125 z M 57.15625,72.5625 c 0.0023,0.572772 0.06082,1.131112 0.125,1.6875 -0.125327,-0.05123 -0.266577,-0.10497 -0.375,-0.15625 -0.396499,-0.187528 -0.665288,-0.387337 -0.8125,-0.53125 -0.147212,-0.143913 -0.15625,-0.182756 -0.15625,-0.1875 0,-0.0047 -0.02221,-0.07484 0.125,-0.21875 0.147212,-0.143913 0.447251,-0.312472 0.84375,-0.5 0.07123,-0.03369 0.171867,-0.06006 0.25,-0.09375 z m 31.03125,0 c 0.08201,0.03503 0.175941,0.05872 0.25,0.09375 0.396499,0.187528 0.665288,0.356087 0.8125,0.5 0.14725,0.14391 0.15625,0.21405 0.15625,0.21875 0,0.0047 -0.009,0.04359 -0.15625,0.1875 -0.147212,0.143913 -0.416001,0.343722 -0.8125,0.53125 -0.09755,0.04613 -0.233314,0.07889 -0.34375,0.125 0.06214,-0.546289 0.09144,-1.094215 0.09375,-1.65625 z m -29.5,3.625 c 0.479308,0.123125 0.983064,0.234089 1.53125,0.34375 2.301781,0.460458 5.229421,0.787224 8.46875,0.9375 0.167006,2.84339 0.46081,5.433176 0.875,7.5 0.115218,0.574942 0.245268,1.063612 0.375,1.5625 -5.463677,-1.028179 -9.833074,-5.091831 -11.25,-10.34375 z m 27.96875,0 C 85.247546,81.408945 80.919274,85.442932 75.5,86.5 c 0.126981,-0.490925 0.261959,-0.967174 0.375,-1.53125 0.41419,-2.066824 0.707994,-4.65661 0.875,-7.5 3.204493,-0.15162 6.088346,-0.480068 8.375,-0.9375 0.548186,-0.109661 1.051942,-0.220625 1.53125,-0.34375 z M 70.0625,77.53125 c 0.865391,0.02589 1.723666,0.03125 2.625,0.03125 0.912062,0 1.782843,-0.0048 2.65625,-0.03125 -0.165173,2.736408 -0.453252,5.207651 -0.84375,7.15625 -0.152345,0.760206 -0.322989,1.438994 -0.5,2.03125 -0.437447,0.03919 -0.895856,0.0625 -1.34375,0.0625 -0.414943,0 -0.812719,-0.02881 -1.21875,-0.0625 -0.177011,-0.592256 -0.347655,-1.271044 -0.5,-2.03125 -0.390498,-1.948599 -0.700644,-4.419842 -0.875,-7.15625 z m 1.75,10.28125 c 0.284911,0.01545 0.554954,0.03125 0.84375,0.03125 0.325029,0 0.648588,-0.01171 0.96875,-0.03125 -0.05999,0.148763 -0.127309,0.31046 -0.1875,0.4375 -0.18789,0.396562 -0.386962,0.696416 -0.53125,0.84375 -0.144288,0.147334 -0.181857,0.125 -0.1875,0.125 -0.0056,0 -0.07446,0.02233 -0.21875,-0.125 C 72.355712,88.946416 72.18789,88.646562 72,88.25 71.939809,88.12296 71.872486,87.961263 71.8125,87.8125 z",UDe=Ybi,Jbi="M 72.46875,22.03125 C 59.505873,22.050338 46.521615,27.004287 36.6875,36.875 L 47.84375,47.96875 C 61.521556,34.240041 83.442603,34.227389 97.125,47.90625 l 11.125,-11.125 C 98.401629,26.935424 85.431627,22.012162 72.46875,22.03125 z",GDe=Jbi,Wbi=EP,oQ=function(o){this.terria=o.terria,this.eventHelper=new Mx,this.enableZoomControls=O(o.enableZoomControls)?o.enableZoomControls:!0,this.enableCompass=O(o.enableCompass)?o.enableCompass:!0,this.navigationLocked=!1,this.controls=o.controls,O(this.controls)||(this.controls=[new mie(this.terria,!0),new kDe(this.terria),new mie(this.terria,!1)]),this.svgCompassOuterRing=ODe,this.svgCompassGyro=UDe,this.svgCompassRotationMarker=GDe,this.showCompass=O(this.terria)&&this.enableCompass,this.heading=this.showCompass?this.terria.scene.camera.heading:0,this.isOrbiting=!1,this.orbitCursorAngle=0,this.orbitCursorOpacity=0,this.orbitLastTimestamp=0,this.orbitFrame=void 0,this.orbitIsLook=!1,this.orbitMouseMoveFunction=void 0,this.orbitMouseUpFunction=void 0,this.isRotating=!1,this.rotateInitialCursorAngle=void 0,this.rotateFrame=void 0,this.rotateIsLook=!1,this.rotateMouseMoveFunction=void 0,this.rotateMouseUpFunction=void 0,this._unsubcribeFromPostRender=void 0,Wbi.track(this,["controls","showCompass","heading","isOrbiting","orbitCursorAngle","isRotating"]);let A=this;oQ.prototype.setNavigationLocked=function(m){this.navigationLocked=m,this.controls&&this.controls.length>1&&this.controls[1].setNavigationLocked(this.navigationLocked)};function f(){O(A.terria)?(A._unsubcribeFromPostRender&&(A._unsubcribeFromPostRender(),A._unsubcribeFromPostRender=void 0),A.showCompass=A.enableCompass,A._unsubcribeFromPostRender=A.terria.scene.postRender.addEventListener(function(){A.heading=A.terria.scene.camera.heading})):(A._unsubcribeFromPostRender&&(A._unsubcribeFromPostRender(),A._unsubcribeFromPostRender=void 0),A.showCompass=!1)}this.eventHelper.add(this.terria.afterWidgetChanged,f,this),f()};oQ.prototype.destroy=function(){this.eventHelper.removeAll()};oQ.prototype.show=function(o){let A;this.enableZoomControls&&this.enableCompass?A=`<div class="compass" title=""  data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`:!this.enableZoomControls&&this.enableCompass?A=`<div class="compass" title="" data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"  style="display: none;" ><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`:this.enableZoomControls&&!this.enableCompass?A=`<div class="compass"  style="display: none;" title="" data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"    ><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`:!this.enableZoomControls&&!this.enableCompass&&(A=`<div class="compass"  style="display: none;" title="" data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"   style="display: none;" ><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`),fae(A,o,this)};oQ.prototype.add=function(o){this.controls.push(o)};oQ.prototype.remove=function(o){this.controls.remove(o)};oQ.prototype.isLastControl=function(o){return o===this.controls[this.controls.length-1]};var HDe=new It;oQ.prototype.handleMouseDown=function(o,A){if(this.terria.scene.mode===xi.MORPHING||o.navigationLocked)return!0;let f=A.currentTarget,m=A.currentTarget.getBoundingClientRect(),C=m.width/2,y=new It((m.right-m.left)/2,(m.bottom-m.top)/2),x=new It(A.clientX-m.left,A.clientY-m.top),v=It.subtract(x,y,HDe),E=It.magnitude(v)/C;if(E<50/145)jbi(this,f,v);else if(E<1)qbi(this,f,v);else return!0};var MCe=new Xe,Cie=new Xe,VDe=new ee;oQ.prototype.handleDoubleClick=function(o,A){let f=o.terria.scene,m=f.camera,C=f.screenSpaceCameraController;if(f.mode===xi.MORPHING||!C.enableInputs||o.navigationLocked)return!0;if(f.mode===xi.COLUMBUS_VIEW&&!C.enableTranslate||(f.mode===xi.SCENE3D||f.mode===xi.COLUMBUS_VIEW)&&(!C.enableLook||f.mode===xi.SCENE3D&&!C.enableRotate))return;let y=dH.getCameraFocus(o.terria,!0,VDe);if(!O(y)){this.controls[1].resetView();return}let x=f.globe.ellipsoid.cartographicToCartesian(m.positionCartographic,new ee),v=f.globe.ellipsoid.geodeticSurfaceNormal(y),E=new wi(y,0);m.flyToBoundingSphere(E,{offset:new Ex(0,je.PI_OVER_TWO-ee.angleBetween(v,m.directionWC),ee.distance(x,y)),duration:1.5})};oQ.create=function(o){let A=new oQ(o);return A.show(o.container),A};function jbi(o,A,f){let m=o.terria.scene,C=m.screenSpaceCameraController;if(m.mode===xi.MORPHING||!C.enableInputs)return;if(o.navigationLocked)return!0;switch(m.mode){case xi.COLUMBUS_VIEW:if(C.enableLook)break;if(!C.enableTranslate||!C.enableTilt)return;break;case xi.SCENE3D:if(C.enableLook)break;if(!C.enableTilt||!C.enableRotate)return;break;case xi.SCENE2D:if(!C.enableTranslate)return;break}document.removeEventListener("mousemove",o.orbitMouseMoveFunction,!1),document.removeEventListener("mouseup",o.orbitMouseUpFunction,!1),O(o.orbitTickFunction)&&o.terria.clock.onTick.removeEventListener(o.orbitTickFunction),o.orbitMouseMoveFunction=void 0,o.orbitMouseUpFunction=void 0,o.orbitTickFunction=void 0,o.isOrbiting=!0,o.orbitLastTimestamp=GA();let y=m.camera;if(O(o.terria.trackedEntity))o.orbitFrame=void 0,o.orbitIsLook=!1;else{let v=dH.getCameraFocus(o.terria,!0,VDe);O(v)?(o.orbitFrame=Vn.eastNorthUpToFixedFrame(v,m.globe.ellipsoid,Cie),o.orbitIsLook=!1):(o.orbitFrame=Vn.eastNorthUpToFixedFrame(y.positionWC,m.globe.ellipsoid,Cie),o.orbitIsLook=!0)}o.orbitTickFunction=function(v){let E=GA(),I=E-o.orbitLastTimestamp,w=(o.orbitCursorOpacity-.5)*2.5/1e3,Q=I*w,M=o.orbitCursorAngle+je.PI_OVER_TWO,B=Math.cos(M)*Q,T=Math.sin(M)*Q,D;if(o.navigationLocked)return!0;O(o.orbitFrame)&&(D=Xe.clone(y.transform,MCe),y.lookAtTransform(o.orbitFrame)),m.mode===xi.SCENE2D?y.move(new ee(B,T,0),Math.max(m.canvas.clientWidth,m.canvas.clientHeight)/100*y.positionCartographic.height*Q):o.orbitIsLook?(y.look(ee.UNIT_Z,-B),y.look(y.right,-T)):(y.rotateLeft(B),y.rotateUp(T)),O(o.orbitFrame)&&y.lookAtTransform(D),o.orbitLastTimestamp=E};function x(v,E){let I=Math.atan2(-v.y,v.x);o.orbitCursorAngle=je.zeroToTwoPi(I-je.PI_OVER_TWO);let w=It.magnitude(v),Q=E/2,M=Math.min(w/Q,1),B=.5*M*M+.5;o.orbitCursorOpacity=B}o.orbitMouseMoveFunction=function(v){let E=A.getBoundingClientRect(),I=new It((E.right-E.left)/2,(E.bottom-E.top)/2),w=new It(v.clientX-E.left,v.clientY-E.top),Q=It.subtract(w,I,HDe);x(Q,E.width)},o.orbitMouseUpFunction=function(v){o.isOrbiting=!1,document.removeEventListener("mousemove",o.orbitMouseMoveFunction,!1),document.removeEventListener("mouseup",o.orbitMouseUpFunction,!1),O(o.orbitTickFunction)&&o.terria.clock.onTick.removeEventListener(o.orbitTickFunction),o.orbitMouseMoveFunction=void 0,o.orbitMouseUpFunction=void 0,o.orbitTickFunction=void 0},document.addEventListener("mousemove",o.orbitMouseMoveFunction,!1),document.addEventListener("mouseup",o.orbitMouseUpFunction,!1),o.terria.clock.onTick.addEventListener(o.orbitTickFunction),x(f,A.getBoundingClientRect().width)}function qbi(o,A,f){let m=o.terria.scene,C=m.camera,y=m.screenSpaceCameraController;if(m.mode===xi.MORPHING||m.mode===xi.SCENE2D||!y.enableInputs)return;if(o.navigationLocked)return!0;if(!y.enableLook&&(m.mode===xi.COLUMBUS_VIEW||m.mode===xi.SCENE3D&&!y.enableRotate))return;if(document.removeEventListener("mousemove",o.rotateMouseMoveFunction,!1),document.removeEventListener("mouseup",o.rotateMouseUpFunction,!1),o.rotateMouseMoveFunction=void 0,o.rotateMouseUpFunction=void 0,o.isRotating=!0,o.rotateInitialCursorAngle=Math.atan2(-f.y,f.x),O(o.terria.trackedEntity))o.rotateFrame=void 0,o.rotateIsLook=!1;else{let v=dH.getCameraFocus(o.terria,!0,VDe);!O(v)||m.mode===xi.COLUMBUS_VIEW&&!y.enableLook&&!y.enableTranslate?(o.rotateFrame=Vn.eastNorthUpToFixedFrame(C.positionWC,m.globe.ellipsoid,Cie),o.rotateIsLook=!0):(o.rotateFrame=Vn.eastNorthUpToFixedFrame(v,m.globe.ellipsoid,Cie),o.rotateIsLook=!1)}let x;O(o.rotateFrame)&&(x=Xe.clone(C.transform,MCe),C.lookAtTransform(o.rotateFrame)),o.rotateInitialCameraAngle=-C.heading,O(o.rotateFrame)&&C.lookAtTransform(x),o.rotateMouseMoveFunction=function(v){let E=A.getBoundingClientRect(),I=new It((E.right-E.left)/2,(E.bottom-E.top)/2),w=new It(v.clientX-E.left,v.clientY-E.top),Q=It.subtract(w,I,HDe),M=Math.atan2(-Q.y,Q.x)-o.rotateInitialCursorAngle,B=je.zeroToTwoPi(o.rotateInitialCameraAngle-M),T=o.terria.scene.camera,D;O(o.rotateFrame)&&(D=Xe.clone(T.transform,MCe),T.lookAtTransform(o.rotateFrame));let F=-T.heading;T.rotateRight(B-F),O(o.rotateFrame)&&T.lookAtTransform(D)},o.rotateMouseUpFunction=function(v){o.isRotating=!1,document.removeEventListener("mousemove",o.rotateMouseMoveFunction,!1),document.removeEventListener("mouseup",o.rotateMouseUpFunction,!1),o.rotateMouseMoveFunction=void 0,o.rotateMouseUpFunction=void 0},document.addEventListener("mousemove",o.rotateMouseMoveFunction,!1),document.addEventListener("mouseup",o.rotateMouseUpFunction,!1)}var F7=oQ,t7e=br,hB=function(o){Xbi.apply(this,arguments),this._onDestroyListeners=[]};hB.prototype.distanceLegendViewModel=void 0;hB.prototype.navigationViewModel=void 0;hB.prototype.navigationDiv=void 0;hB.prototype.distanceLegendDiv=void 0;hB.prototype.terria=void 0;hB.prototype.container=void 0;hB.prototype._onDestroyListeners=void 0;hB.prototype._navigationLocked=!1;hB.prototype.setNavigationLocked=function(o){this._navigationLocked=o,this.navigationViewModel.setNavigationLocked(this._navigationLocked)};hB.prototype.getNavigationLocked=function(){return this._navigationLocked};hB.prototype.destroy=function(){O(this.navigationViewModel)&&this.navigationViewModel.destroy(),O(this.distanceLegendViewModel)&&this.distanceLegendViewModel.destroy(),O(this.navigationDiv)&&this.navigationDiv.parentNode.removeChild(this.navigationDiv),delete this.navigationDiv,O(this.distanceLegendDiv)&&this.distanceLegendDiv.parentNode.removeChild(this.distanceLegendDiv),delete this.distanceLegendDiv,O(this.container)&&this.container.parentNode.removeChild(this.container),delete this.container;for(let o=0;o<this._onDestroyListeners.length;o++)this._onDestroyListeners[o]()};hB.prototype.addOnDestroyListener=function(o){typeof o=="function"&&this._onDestroyListeners.push(o)};function Xbi(o,A){if(!O(o))throw new Ui("CesiumWidget or Viewer is required.");let f=O(o.cesiumWidget)?o.cesiumWidget:o,m=document.createElement("div");m.className="Geoworld-widget-GeoworldNavigationContainer",f.container.appendChild(m),this.terria=o,this.terria.options=O(A)?A:{},this.terria.afterWidgetChanged=new t7e,this.terria.beforeWidgetChanged=new t7e,this.container=m,(!O(this.terria.options.enableDistanceLegend)||this.terria.options.enableDistanceLegend)&&(this.distanceLegendDiv=document.createElement("div"),m.appendChild(this.distanceLegendDiv),this.distanceLegendDiv.setAttribute("id","distanceLegendDiv"),this.distanceLegendViewModel=LDe.create({container:this.distanceLegendDiv,terria:this.terria,mapElement:m,enableDistanceLegend:!0})),(!O(this.terria.options.enableZoomControls)||this.terria.options.enableZoomControls)&&(!O(this.terria.options.enableCompass)||this.terria.options.enableCompass)?(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),m.appendChild(this.navigationDiv),this.navigationViewModel=F7.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!0,enableCompass:!0})):O(this.terria.options.enableZoomControls)&&!this.terria.options.enableZoomControls&&(!O(this.terria.options.enableCompass)||this.terria.options.enableCompass)?(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),m.appendChild(this.navigationDiv),this.navigationViewModel=F7.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!1,enableCompass:!0})):(!O(this.terria.options.enableZoomControls)||this.terria.options.enableZoomControls)&&O(this.terria.options.enableCompass)&&!this.terria.options.enableCompass?(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),m.appendChild(this.navigationDiv),this.navigationViewModel=F7.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!0,enableCompass:!1})):O(this.terria.options.enableZoomControls)&&!this.terria.options.enableZoomControls&&O(this.terria.options.enableCompass)&&this.terria.options.enableCompass}var zDe=hB;function Qat(o,A){if(!O(o))throw new Ui("viewer is required.");Sat(o,A).addOnDestroyListener(function(f){return function(){delete f.cesiumNavigation}}(o)),Object.defineProperties(o,{cesiumNavigation:{configurable:!0,get:function(){return o.cesiumWidget.cesiumNavigation}}})}Qat.mixinWidget=function(o,A){return Sat.apply(void 0,arguments)};var Sat=function(o,A){let f=new zDe(o,A),m=O(o.cesiumWidget)?o.cesiumWidget:o;return Object.defineProperties(m,{cesiumNavigation:{configurable:!0,get:function(){return f}}}),f.addOnDestroyListener(function(C){return function(){delete C.cesiumNavigation}}(m)),f},Dat=Qat;function Zbi(o,A,f,m,C,y){let x=m._frameState,v=o.derivedCommands;!O(v)||(x.useLogDepth&&O(v.logDepth)&&(o=v.logDepth.command),v=o.derivedCommands,O(v[A])&&(o=v[A][f],o.execute(C,y)))}var rpe,npe,ope,ape;function i7e(o,A,f,m,C,y){rpe=rpe||new Yu,npe=npe||new n2,ope=ope||new Ds,ape=ape||new Y0;let x=o._us,v=x._frameState,E=v.camera,I=E._scene,w=I._view,Q=w.frustumCommandsList,M=Q.length,B=I._globeTranslucencyState,T=B.translucent,D;O(E.frustum.fov)?D=E.frustum.clone(rpe):O(E.frustum.infiniteProjectionMatrix)?D=E.frustum.clone(npe):O(E.frustum.width)?D=E.frustum.clone(ope):D=E.frustum.clone(ape);function F(U,V,H,q){(!y||y(U,V))&&(m&&C?Zbi(U,m,C,V,H,q):U.execute(H,q))}let L,R,k;for(let U=0;U<M;++U){let V=M-U-1,H=Q[V],q=f.framebuffer;f.framebuffer=A,D.near=V!==0?H.near*I.opaqueFrustumNearOffset:H.near,D.far=H.far,x.updateFrustum(D),x.updatePass(hr.GLOBE),k=H.commands[hr.GLOBE],R=H.indices[hr.GLOBE];let ie=I._view.globeTranslucencyFramebuffer;if(T)B.executeGlobeCommands(H,F,ie,I,f);else for(L=0;L<R;++L)F(k[L],I,o,f);for(x.updatePass(hr.CESIUM_3D_TILE),k=H.commands[hr.CESIUM_3D_TILE],R=H.indices[hr.CESIUM_3D_TILE],L=0;L<R;++L)F(k[L],I,o,f);for(x.updatePass(hr.OPAQUE),k=H.commands[hr.OPAQUE],R=H.indices[hr.OPAQUE],L=0;L<R;++L)F(k[L],I,o,f);for(x.updatePass(hr.TRANSLUCENT),k=H.commands[hr.TRANSLUCENT],R=H.indices[hr.TRANSLUCENT],L=0;L<R;++L)F(k[L],I,o,f);f.framebuffer=q}}var r7e=`
vec3 packNormalToRGB( const in vec3 normal ) {
   return normalize( normal ) * 0.5 + 0.5;
}
@@ -14546,7 +14519,7 @@
float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {
   return ( near * far ) / ( ( far - near ) * invClipZ - far );
}
`,h7e=`uniform sampler2D czm_selectedIdTexture;
`,n7e=`uniform sampler2D czm_selectedIdTexture;
uniform float czm_selectedIdTextureStep; 
uniform float czm_selectedIdTextureWidth; 
bool czm_selected(vec4 id) 
@@ -14564,7 +14537,7 @@
    return false; 
`;function o2e(o){this._selectedIdTexture=null;let{name:A,vertexShader:f,fragmentShader:m,uniforms:C,renderStateProcess:y,beforeUpdate:x,viewportScale:v,overrideViewport:E,enableEntitySelect:I}=o,{renderType:w,textureScale:Q,shaderRedefine:M}=o,B=`renderPass_${A.replace(/[\.\\\/\-]/g,"_")}`,T=`czm_non_${B}_main`,D=`czm_${B}_main`,F=`_cache_${B}`,L=`${B}Command`,R=null,k=null,U=null,V=null,H=null,q,ie=new eA({color:At.TRANSPARENT,depth:1}),Z=new Kr,oe=this;if(E&&Kr.clone(E,Z),M=M||"add",w=w||"all",Q=Q||1,Q<0||Q>8)throw new Ui("CesiumRenderPass\uFF1AtextureScale\u5FC5\u987B\u5927\u4E8E0\u5C0F\u4E8E\u7B49\u4E8E8");function ne(he,fe,Ce,Ee){let be=he.shaderCache.getDerivedShaderProgram(fe,B);if(!O(be)){let Re=fe._attributeLocations,Ne=fe.fragmentShaderSource,Je=fe.vertexShaderSource,ot=fe._vertexShaderText,nt=Ne.sources,$e=nt.length,ht=!!H&&K(),ze=h7e,Ze=/texture2D\s?\(\s?tile_pickTexture\s?,\s?tile_featureSt\s?\)/.test(Ce);Ee==="varying"&&!Ze?ze+=`
`;function KDe(o){this._selectedIdTexture=null;let{name:A,vertexShader:f,fragmentShader:m,uniforms:C,renderStateProcess:y,beforeUpdate:x,viewportScale:v,overrideViewport:E,enableEntitySelect:I}=o,{renderType:w,textureScale:Q,shaderRedefine:M}=o,B=`renderPass_${A.replace(/[\.\\\/\-]/g,"_")}`,T=`czm_non_${B}_main`,D=`czm_${B}_main`,F=`_cache_${B}`,L=`${B}Command`,R=null,k=null,U=null,V=null,H=null,q,ie=new eA({color:At.TRANSPARENT,depth:1}),Z=new Kr,oe=this;if(E&&Kr.clone(E,Z),M=M||"add",w=w||"all",Q=Q||1,Q<0||Q>8)throw new Ui("CesiumRenderPass\uFF1AtextureScale\u5FC5\u987B\u5927\u4E8E0\u5C0F\u4E8E\u7B49\u4E8E8");function ne(he,fe,Ce,Ee){let be=he.shaderCache.getDerivedShaderProgram(fe,B);if(!O(be)){let Re=fe._attributeLocations,Ne=fe.fragmentShaderSource,Je=fe.vertexShaderSource,ot=fe._vertexShaderText,nt=Ne.sources,$e=nt.length,ht=!!H&&K(),ze=n7e,Ze=/texture2D\s?\(\s?tile_pickTexture\s?,\s?tile_featureSt\s?\)/.test(Ce);Ee==="varying"&&!Ze?ze+=`
varying float me_isSelected;
bool czm_selected(){
    bool isSelected= me_isSelected>0.0000001;
@@ -14577,7 +14550,7 @@
bool czm_selected(){
    return czm_selected(${Ce});
}`;let ct=`
        ${h7e}
        ${n7e}
        varying float me_isSelected;
        bool czm_selected(){
          SelectedFeature selectedFeature = feature;
@@ -14586,7 +14559,7 @@
          }
          return true;
        }
        `,We=!1,Oe=!1;if(/attribute\s?vec3\s?normal\s?;/.test(ot)||/\n\s?vec3\s?normal\s?;/.test(ot)?We=!0:/varying\s?vec3\s?v_normal\s?;/.test(ot)&&(Oe=!0),m){let Ye=!1;for(let yt=0;yt<$e;++yt)if(/vec4\s?packDepthToRGBA\s?\(/.test(nt[yt])){Ye=!0;break}let rt=Ye?"":A7e;rt+=ht?ze:"",rt+=Fr.replaceMain(m,D);let gt=`${T}();`;rt+=`void main()
        `,We=!1,Oe=!1;if(/attribute\s?vec3\s?normal\s?;/.test(ot)||/\n\s?vec3\s?normal\s?;/.test(ot)?We=!0:/varying\s?vec3\s?v_normal\s?;/.test(ot)&&(Oe=!0),m){let Ye=!1;for(let yt=0;yt<$e;++yt)if(/vec4\s?packDepthToRGBA\s?\(/.test(nt[yt])){Ye=!0;break}let rt=Ye?"":r7e;rt+=ht?ze:"",rt+=Fr.replaceMain(m,D);let gt=`${T}();`;rt+=`void main()
           { 
@@ -14595,7 +14568,7 @@
               ${D}(); 
           } 
`;let Et=new Array($e+1);for(let yt=0;yt<$e;++yt)Et[yt]=Fr.replaceMain(nt[yt],T),Et[yt]=Et[yt].replace(/gl_FragColor/g,"gl_FragData[0]");Et[$e]=rt,We?Ne.defines.push("HAS_NORMAL"):Oe&&Ne.defines.push("HAS_V_NORMAL"),Ne=new Fr({sources:Et,defines:Ne.defines})}if(f||m){nt=Je.sources,$e=nt.length;let Ye=!1;for(let Et=0;Et<$e;++Et)if(/vec4\s?packDepthToRGBA\s?\(/.test(nt[Et])){Ye=!0;break}ht=ht&&Ee==="varying"&&!Ze,We?Je.defines.push("HAS_NORMAL"):Oe&&Je.defines.push("HAS_V_NORMAL");let rt=`${Ye?"":A7e}
`;let Et=new Array($e+1);for(let yt=0;yt<$e;++yt)Et[yt]=Fr.replaceMain(nt[yt],T),Et[yt]=Et[yt].replace(/gl_FragColor/g,"gl_FragData[0]");Et[$e]=rt,We?Ne.defines.push("HAS_NORMAL"):Oe&&Ne.defines.push("HAS_V_NORMAL"),Ne=new Fr({sources:Et,defines:Ne.defines})}if(f||m){nt=Je.sources,$e=nt.length;let Ye=!1;for(let Et=0;Et<$e;++Et)if(/vec4\s?packDepthToRGBA\s?\(/.test(nt[Et])){Ye=!0;break}ht=ht&&Ee==="varying"&&!Ze,We?Je.defines.push("HAS_NORMAL"):Oe&&Je.defines.push("HAS_V_NORMAL");let rt=`${Ye?"":r7e}
          ${ht?ct:""}
          ${Fr.replaceMain(f||"void main(){}",D)}
          void main()
@@ -14603,9 +14576,9 @@
          ${M!=="replace"?`    ${T}();`:""}
          ${ht?"    me_isSelected=czm_selected()?1.:0.;":""}
              ${D}();
          }`,gt=new Array($e+1);for(let Et=0;Et<$e;++Et)gt[Et]=Fr.replaceMain(nt[Et],T);gt[$e]=rt,Je=new Fr({sources:gt,defines:Je.defines})}be=he.shaderCache.createDerivedShaderProgram(fe,B,{vertexShaderSource:Je,fragmentShaderSource:Ne,attributeLocations:Re})}return be}function se(he,fe){he._renderPassCache=he._renderPassCache||{},he._renderPassCache[F]=he._renderPassCache[F]||{};let Ce=he._renderPassCache[F],Ee=Ce[fe.id];if(!O(Ee)){let be=fn.getState(fe);typeof y=="function"&&y.call(oe,be),Ee=fn.fromCache(be),Ce[fe.id]=Ee}return Ee}function ce(he,fe,Ce){let Ee=he,be=fe._frameState,Re=he.derivedCommands;if(!O(Re))return;be.useLogDepth&&O(Re.logDepth)&&(he=Re.logDepth.command),Re=he.derivedCommands;let Ne=Re.renderPass;O(Re.renderPass)||(Ne=Re.renderPass={});let Je,ot;if(O(Ne[L])&&(Je=Ne[L].shaderProgram,ot=Ne[L].renderState),Ne[L]=On.shallowClone(he,Ne[L]),!O(Je)||Ne.shaderProgramId!==he.shaderProgram.id){let $e=he.shaderProgram,ht=Ee._pickIdQualifier=new RegExp(`uniform\\s?vec4\\s?${he.pickId}`,"g").test($e._fragmentShaderText)?"uniform":"varying";Ne[L].shaderProgram=ne(Ce,$e,he.pickId,ht),Ne[L].renderState=se(fe,he.renderState),Ne.shaderProgramId=he.shaderProgram.id}else Ne[L].shaderProgram=Je,Ne[L].renderState=ot;let nt=Ne[L].uniformMap;me(nt)}function j(he){return function(){let fe=C[he];return typeof fe=="function"?fe():fe}}function de(he,fe){return function(){let Ce=he[fe]();if(O(Ce))return Ce.dimensions}}function me(he){if(!he.__created&&(he.czm_selectedIdTexture=function(){return H._selectedIdTexture},he.czm_selectedIdTextureWidth=function(){return H._selectedIdTexture?H._selectedIdTexture.width:0},he.czm_selectedIdTextureStep=function(){return H._selectedIdTexture?1/H._selectedIdTexture.width:-1},!!C)){he.__created=!0;for(let fe in C)if(C.hasOwnProperty(fe)){typeof C[fe]!="function"?he[fe]=j(fe):he[fe]=C[fe];let Ce=he[fe]();(typeof Ce=="string"||Ce instanceof mo||Ce instanceof HTMLImageElement||Ce instanceof HTMLCanvasElement||Ce instanceof HTMLVideoElement)&&(he[`${fe}Dimensions`]=de(he,fe))}}}function _e(he){let fe=he._view,Ce=fe.frustumCommandsList,Ee=Ce.length,be,Re,Ne;for(let Je=0;Je<Ee;++Je){let ot=Ee-Je-1,nt=Ce[ot];for(Re=0;Re<nt.commands.length;Re++){let $e=nt.commands[Re];if(Ne=nt.indices[Re],!(H&&Re===hr.GLOBE))for(be=0;be<Ne;++be){let ht=$e[be];ce(ht,he,he._context)}}}}function Be(){U&&(U.destroy(),U=void 0),k&&(k.destroy(),k=void 0),V&&(V.destroy(),V=void 0),R&&(R.destroy(),R=void 0)}function Qe(he,fe,Ce,Ee){let be=fe.width,Re=fe.height;U&&U.width===be&&U.height===Re&&Ce===q||(q=Ce,Be(),U=new mo({context:he,width:be,height:Re,pixelFormat:Gn.RGBA,pixelDatatype:wn.UNSIGNED_BYTE}),k=new mo({context:he,width:be,height:Re,pixelFormat:Gn.RGBA,pixelDatatype:wn.UNSIGNED_BYTE}),V=new mo({context:he,width:be,height:Re,pixelFormat:Gn.DEPTH_COMPONENT,pixelDatatype:wn.UNSIGNED_SHORT,sampler:Qs.NEAREST}),R=new Bp({colorTextures:[U,k],context:he,destroyAttachments:!1,depthTexture:V}))}function Ie(he){E||(Z=Kr.clone(he.viewport,Z),v?(Z.x=Z.width*v.x,Z.y=Z.height*v.y,Z.width*=v.width,Z.height*=v.height):(Z.width*=Q,Z.height*=Q));let fe=Object.assign({},he.passState);return fe.viewport=Z,fe}function ve(he,fe){let Ce=he._us._frameState,Ee=Ce.camera,be=Ee._scene,Re=be._view;try{if(!f&&!m){let Ne=Ie(Re);typeof x=="function"&&x.call(oe,be,fe),Qe(he,Z,be.hdr,Re.sceneFramebuffer),c7e(he,R,Ne)}else{let Ne=Ie(Re);typeof x=="function"&&x.call(oe,be,fe),Qe(he,Z,be.hdr,Re.sceneFramebuffer),_e(be),c7e(he,R,Ne,"renderPass",L,w==="all"||!H||!H._selectedIdTexture?null:W)}}catch(Ne){console.error(Ne)}}function K(){if(!H)return;let he=H.selected||H.parentSelected;if(he.length)return he}function W(he,fe){let Ce=H&&(H.selected||H.parentSelected);if(!H||!Ce||!Ce.length)return!1;if(!he.pickId||he._pickIdQualifier!=="uniform")return!0;let Ee=!0,be=he.owner,Re=w==="selected";if(be&&be.isObject3D){for(let Je=0;Je<Ce.length;Je++)if(Ce[Je]===be)return Re;return!Re}let Ne=he.uniformMap;if(Ne[he.pickId]){let Je=Ne[he.pickId]();Ee=!Re;for(let ot=0;ot<Ce.length;ot++){let nt=Ce[ot],$e=nt.pickId?[nt.pickId]:nt.pickIds||nt._pickIds;for(let ht=0;ht<$e.length;ht++){let ze=$e[ht];if(ze.color===Je||At.equals(ze.color,Je))return Re}}}return Ee}function te(he){if(R){let fe=he._us._frameState.camera._scene._view;ie.framebuffer=R,ie.execute(he,fe.passState),ie.framebuffer=void 0}}function Y(he){if(H&&oe.prevStageUpdate&&(H.update=oe.prevStageUpdate,oe.prevStageUpdate=null,oe.prevStageExecute=null),H=he,!H)return;let fe=H.update;oe.prevStageUpdate=fe,H.update=function(Ce,Ee){if(te(Ce),fe.call(H,Ce,Ee),!!H.enabled)if(!f&&!m)ve(Ce,Ee);else{let be=H.selected||H.parentSelected;be&&be.length&&ve(Ce,Ee)}}}this.update=ve,this.clear=te,Object.defineProperties(this,{texture:{get(){return U}},depthTexture:{get(){return V}},planeDepthTexture:{get(){return k}},stage:{get(){return H},set(he){H!==he&&Y(he)}}})}function a2e(o){let A=[];for(let f in o.defines)if(o.defines.hasOwnProperty(f)){let m=o.defines[f];A.push(`#define ${f}  ${m}`)}return A=`${A.join(`
          }`,gt=new Array($e+1);for(let Et=0;Et<$e;++Et)gt[Et]=Fr.replaceMain(nt[Et],T);gt[$e]=rt,Je=new Fr({sources:gt,defines:Je.defines})}be=he.shaderCache.createDerivedShaderProgram(fe,B,{vertexShaderSource:Je,fragmentShaderSource:Ne,attributeLocations:Re})}return be}function se(he,fe){he._renderPassCache=he._renderPassCache||{},he._renderPassCache[F]=he._renderPassCache[F]||{};let Ce=he._renderPassCache[F],Ee=Ce[fe.id];if(!O(Ee)){let be=fn.getState(fe);typeof y=="function"&&y.call(oe,be),Ee=fn.fromCache(be),Ce[fe.id]=Ee}return Ee}function ce(he,fe,Ce){let Ee=he,be=fe._frameState,Re=he.derivedCommands;if(!O(Re))return;be.useLogDepth&&O(Re.logDepth)&&(he=Re.logDepth.command),Re=he.derivedCommands;let Ne=Re.renderPass;O(Re.renderPass)||(Ne=Re.renderPass={});let Je,ot;if(O(Ne[L])&&(Je=Ne[L].shaderProgram,ot=Ne[L].renderState),Ne[L]=On.shallowClone(he,Ne[L]),!O(Je)||Ne.shaderProgramId!==he.shaderProgram.id){let $e=he.shaderProgram,ht=Ee._pickIdQualifier=new RegExp(`uniform\\s?vec4\\s?${he.pickId}`,"g").test($e._fragmentShaderText)?"uniform":"varying";Ne[L].shaderProgram=ne(Ce,$e,he.pickId,ht),Ne[L].renderState=se(fe,he.renderState),Ne.shaderProgramId=he.shaderProgram.id}else Ne[L].shaderProgram=Je,Ne[L].renderState=ot;let nt=Ne[L].uniformMap;me(nt)}function j(he){return function(){let fe=C[he];return typeof fe=="function"?fe():fe}}function de(he,fe){return function(){let Ce=he[fe]();if(O(Ce))return Ce.dimensions}}function me(he){if(!he.__created&&(he.czm_selectedIdTexture=function(){return H._selectedIdTexture},he.czm_selectedIdTextureWidth=function(){return H._selectedIdTexture?H._selectedIdTexture.width:0},he.czm_selectedIdTextureStep=function(){return H._selectedIdTexture?1/H._selectedIdTexture.width:-1},!!C)){he.__created=!0;for(let fe in C)if(C.hasOwnProperty(fe)){typeof C[fe]!="function"?he[fe]=j(fe):he[fe]=C[fe];let Ce=he[fe]();(typeof Ce=="string"||Ce instanceof mo||Ce instanceof HTMLImageElement||Ce instanceof HTMLCanvasElement||Ce instanceof HTMLVideoElement)&&(he[`${fe}Dimensions`]=de(he,fe))}}}function _e(he){let fe=he._view,Ce=fe.frustumCommandsList,Ee=Ce.length,be,Re,Ne;for(let Je=0;Je<Ee;++Je){let ot=Ee-Je-1,nt=Ce[ot];for(Re=0;Re<nt.commands.length;Re++){let $e=nt.commands[Re];if(Ne=nt.indices[Re],!(H&&Re===hr.GLOBE))for(be=0;be<Ne;++be){let ht=$e[be];ce(ht,he,he._context)}}}}function Be(){U&&(U.destroy(),U=void 0),k&&(k.destroy(),k=void 0),V&&(V.destroy(),V=void 0),R&&(R.destroy(),R=void 0)}function Qe(he,fe,Ce,Ee){let be=fe.width,Re=fe.height;U&&U.width===be&&U.height===Re&&Ce===q||(q=Ce,Be(),U=new mo({context:he,width:be,height:Re,pixelFormat:Gn.RGBA,pixelDatatype:wn.UNSIGNED_BYTE}),k=new mo({context:he,width:be,height:Re,pixelFormat:Gn.RGBA,pixelDatatype:wn.UNSIGNED_BYTE}),V=new mo({context:he,width:be,height:Re,pixelFormat:Gn.DEPTH_COMPONENT,pixelDatatype:wn.UNSIGNED_SHORT,sampler:Qs.NEAREST}),R=new Bp({colorTextures:[U,k],context:he,destroyAttachments:!1,depthTexture:V}))}function Ie(he){E||(Z=Kr.clone(he.viewport,Z),v?(Z.x=Z.width*v.x,Z.y=Z.height*v.y,Z.width*=v.width,Z.height*=v.height):(Z.width*=Q,Z.height*=Q));let fe=Object.assign({},he.passState);return fe.viewport=Z,fe}function ve(he,fe){let Ce=he._us._frameState,Ee=Ce.camera,be=Ee._scene,Re=be._view;try{if(!f&&!m){let Ne=Ie(Re);typeof x=="function"&&x.call(oe,be,fe),Qe(he,Z,be.hdr,Re.sceneFramebuffer),i7e(he,R,Ne)}else{let Ne=Ie(Re);typeof x=="function"&&x.call(oe,be,fe),Qe(he,Z,be.hdr,Re.sceneFramebuffer),_e(be),i7e(he,R,Ne,"renderPass",L,w==="all"||!H||!H._selectedIdTexture?null:W)}}catch(Ne){console.error(Ne)}}function K(){if(!H)return;let he=H.selected||H.parentSelected;if(he.length)return he}function W(he,fe){let Ce=H&&(H.selected||H.parentSelected);if(!H||!Ce||!Ce.length)return!1;if(!he.pickId||he._pickIdQualifier!=="uniform")return!0;let Ee=!0,be=he.owner,Re=w==="selected";if(be&&be.isObject3D){for(let Je=0;Je<Ce.length;Je++)if(Ce[Je]===be)return Re;return!Re}let Ne=he.uniformMap;if(Ne[he.pickId]){let Je=Ne[he.pickId]();Ee=!Re;for(let ot=0;ot<Ce.length;ot++){let nt=Ce[ot],$e=nt.pickId?[nt.pickId]:nt.pickIds||nt._pickIds;for(let ht=0;ht<$e.length;ht++){let ze=$e[ht];if(ze.color===Je||At.equals(ze.color,Je))return Re}}}return Ee}function te(he){if(R){let fe=he._us._frameState.camera._scene._view;ie.framebuffer=R,ie.execute(he,fe.passState),ie.framebuffer=void 0}}function Y(he){if(H&&oe.prevStageUpdate&&(H.update=oe.prevStageUpdate,oe.prevStageUpdate=null,oe.prevStageExecute=null),H=he,!H)return;let fe=H.update;oe.prevStageUpdate=fe,H.update=function(Ce,Ee){if(te(Ce),fe.call(H,Ce,Ee),!!H.enabled)if(!f&&!m)ve(Ce,Ee);else{let be=H.selected||H.parentSelected;be&&be.length&&ve(Ce,Ee)}}}this.update=ve,this.clear=te,Object.defineProperties(this,{texture:{get(){return U}},depthTexture:{get(){return V}},planeDepthTexture:{get(){return k}},stage:{get(){return H},set(he){H!==he&&Y(he)}}})}function YDe(o){let A=[];for(let f in o.defines)if(o.defines.hasOwnProperty(f)){let m=o.defines[f];A.push(`#define ${f}  ${m}`)}return A=`${A.join(`
`)}
`,o.fragmentShader&&(o.fragmentShader=A+o.fragmentShader),o.vertexShader&&(o.vertexShader=A+o.vertexShader),o}var aDi=`
`,o.fragmentShader&&(o.fragmentShader=A+o.fragmentShader),o.vertexShader&&(o.vertexShader=A+o.vertexShader),o}var $bi=`
varying vec2 v_textureCoordinates;
uniform sampler2D colorTexture;
uniform vec2 colorTextureDimensions;
@@ -14616,7 +14589,7 @@
    return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;
}
void main() {    vec2 vUv=v_textureCoordinates;
    vec2 invSize = 1.0 / colorTextureDimensions;    float weightSum = gaussianPdf(0.0, kernelRadius);    vec4 diffuseSum = texture2D( colorTexture, vUv) * weightSum;    vec2 delta = direction * invSize * kernelRadius/float(MAX_RADIUS);    vec2 uvOffset = delta;    for( int i = 1; i <= MAX_RADIUS; i ++ ) {        float w = gaussianPdf(uvOffset.x, kernelRadius);        vec4 sample1 = texture2D( colorTexture, vUv + uvOffset);        vec4 sample2 = texture2D( colorTexture, vUv - uvOffset);        diffuseSum += ((sample1 + sample2) * w);        weightSum += (2.0 * w);        uvOffset += delta;    }    gl_FragColor = diffuseSum/weightSum;}`;function _ie(o,A,f,m){let C=new It(1,0),y=new It(0,1),x={defines:{MAX_RADIUS:A},fragmentShader:aDi};a2e(x);let v=new va({name:`${o}_x_direction`,fragmentShader:x.fragmentShader,textureScale:m,forcePowerOfTwo:!0,uniforms:{kernelRadius:f,direction:C},sampleMode:Dv.LINEAR}),E=new va({name:`${o}_y_direction`,fragmentShader:x.fragmentShader,textureScale:m,forcePowerOfTwo:!0,uniforms:{kernelRadius:f,direction:y},sampleMode:Dv.LINEAR});return new CC({name:o,stages:[v,E],inputPreviousStageTexture:!0})}function IH(o,A){A=A||"OutlineEffect";let f=2,m=12*Math.PI/180,C=!1,y=!1,x=At.WHITE.clone(),v=At.RED.clone(),E=Ae(o,!1),I=!1,w=1,Q=3,M=!1,B=new o2e({name:`${A}Pass`,vertexShader:`
    vec2 invSize = 1.0 / colorTextureDimensions;    float weightSum = gaussianPdf(0.0, kernelRadius);    vec4 diffuseSum = texture2D( colorTexture, vUv) * weightSum;    vec2 delta = direction * invSize * kernelRadius/float(MAX_RADIUS);    vec2 uvOffset = delta;    for( int i = 1; i <= MAX_RADIUS; i ++ ) {        float w = gaussianPdf(uvOffset.x, kernelRadius);        vec4 sample1 = texture2D( colorTexture, vUv + uvOffset);        vec4 sample2 = texture2D( colorTexture, vUv - uvOffset);        diffuseSum += ((sample1 + sample2) * w);        weightSum += (2.0 * w);        uvOffset += delta;    }    gl_FragColor = diffuseSum/weightSum;}`;function yie(o,A,f,m){let C=new It(1,0),y=new It(0,1),x={defines:{MAX_RADIUS:A},fragmentShader:$bi};YDe(x);let v=new va({name:`${o}_x_direction`,fragmentShader:x.fragmentShader,textureScale:m,forcePowerOfTwo:!0,uniforms:{kernelRadius:f,direction:C},sampleMode:Dv.LINEAR}),E=new va({name:`${o}_y_direction`,fragmentShader:x.fragmentShader,textureScale:m,forcePowerOfTwo:!0,uniforms:{kernelRadius:f,direction:y},sampleMode:Dv.LINEAR});return new CC({name:o,stages:[v,E],inputPreviousStageTexture:!0})}function fH(o,A){A=A||"OutlineEffect";let f=2,m=12*Math.PI/180,C=!1,y=!1,x=At.WHITE.clone(),v=At.RED.clone(),E=Ae(o,!1),I=!1,w=1,Q=3,M=!1,B=new KDe({name:`${A}Pass`,vertexShader:`
        //varying vec3 vOutlineNormal;
        void main(){
            // #ifdef HAS_NORMALS
@@ -14811,7 +14784,7 @@
                gl_FragColor =  vec4( visibleEdgeColor + vec3(0.01) , 1. ) * vec4(d);
            }
        }
        `});B.stage=T;let D=_ie(`${A}Blur1`,4,1,.75),F=_ie(`${A}Blur2`,4,4,.5),L=new CC({name:`${A}BlurComposite`,stages:[T,D,F],inputPreviousStageTexture:!0}),R=new va({name:`${A}Additive`,uniforms:{showGlow:function(){return I},edgeGlow:function(){return w},edgeStrength:function(){return Q},edgeOnly(){return M},maskTexture(){return B.texture},lineTexture:T.name,edgeTexture1:D.name,edgeTexture2:L.name},fragmentShader:`
        `});B.stage=T;let D=yie(`${A}Blur1`,4,1,.75),F=yie(`${A}Blur2`,4,4,.5),L=new CC({name:`${A}BlurComposite`,stages:[T,D,F],inputPreviousStageTexture:!0}),R=new va({name:`${A}Additive`,uniforms:{showGlow:function(){return I},edgeGlow:function(){return w},edgeStrength:function(){return Q},edgeOnly(){return M},maskTexture(){return B.texture},lineTexture:T.name,edgeTexture1:D.name,edgeTexture2:L.name},fragmentShader:`
        uniform sampler2D colorTexture;
        uniform sampler2D edgeTexture1;
        uniform sampler2D edgeTexture2;
@@ -14852,40 +14825,7 @@
              }
            }
        }
        `}),k=new CC({name:`${A}Composite`,stages:[L,R],inputPreviousStageTexture:!1});function U(V){Object.defineProperties(V,{showGlow:{get(){return I},set(H){I=H}},edgeGlow:{get(){return w},set(H){w=H}},edgeStrength:{get(){return Q},set(H){Q=H}},thresholdAngle:{get(){return m},set(H){m=H}},showOutlineOnly:{get(){return y},set(H){y=H}},edgeOnly:{get(){return M},set(H){M=H}},useSingleColor:{get(){return C},set(H){C=H}},outlineWidth:{get(){return f},set(H){f=H}},visibleEdgeColor:{get(){return x},set(H){x=H}},hiddenEdgeColor:{get(){return v},set(H){v=H}}})}return U(k),k._uniforms=k._uniforms||{},U(k._uniforms),k}var sDi=function(o){let A=document.createElement("div");A.innerHTML=o;let f=document.createDocumentFragment();for(;A.firstChild;)f.appendChild(A.firstChild);return f},s2e=sDi,lDi=EP,uDi=function(o,A,f){A=iA(A);let m=s2e(o),C=[],y;for(y=0;y<m.childNodes.length;++y)C.push(m.childNodes[y]);for(A.appendChild(m),y=0;y<C.length;++y){let x=C[y];(x.nodeType===1||x.nodeType===8)&&lDi.applyBindings(f,x)}return C},xae=uDi,cDi=EP,jK=function(o){if(!O(o)||!O(o.terria))throw new Ui("options.terria is required.");this.terria=o.terria,this._removeSubscription=void 0,this._lastLegendUpdate=void 0,this.eventHelper=new Mx,this.distanceLabel=void 0,this.barWidth=void 0,this.enableDistanceLegend=O(o.enableDistanceLegend)?o.enableDistanceLegend:!0,cDi.track(this,["distanceLabel","barWidth"]),this.eventHelper.add(this.terria.afterWidgetChanged,function(){O(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0)},this);let A=this;function f(){if(O(A.terria)){let m=A.terria.scene;A._removeSubscription=m.postRender.addEventListener(function(){ADi(this,m)},A)}}f(),this.eventHelper.add(this.terria.afterWidgetChanged,function(){f()},this)};jK.prototype.destroy=function(){this.eventHelper.removeAll()};jK.prototype.show=function(o){let A;this.enableDistanceLegend?A=`<div class="distance-legend" data-bind="visible: distanceLabel && barWidth"><div class="distance-legend-label" data-bind="text: distanceLabel"></div><div class="distance-legend-scale-bar" data-bind="style: { width: barWidth + 'px', left: (5 + (125 - barWidth) / 2) + 'px' }"></div></div>`:A=`<div class="distance-legend"  style="display: none;" data-bind="visible: distanceLabel && barWidth"><div class="distance-legend-label"  data-bind="text: distanceLabel"></div><div class="distance-legend-scale-bar"  data-bind="style: { width: barWidth + 'px', left: (5 + (125 - barWidth) / 2) + 'px' }"></div></div>`,xae(A,o,this)};jK.create=function(o){let A=new jK(o);return A.show(o.container),A};var PCe=Di.MOON2000,d7e=new l0(null,null,PCe),dpe=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7];function ADi(o,A){if(!o.enableDistanceLegend){o.barWidth=void 0,o.distanceLabel=void 0;return}let f=GA();if(f<o._lastLegendUpdate+250)return;o._lastLegendUpdate=f;let m=A.canvas.clientWidth,C=A.canvas.clientHeight,y=A.camera.getPickRay(new It(m/2|0,C-1)),x=A.camera.getPickRay(new It(1+m/2|0,C-1)),v=A.globe,E=v.pick(y,A),I=v.pick(x,A);if(!O(E)||!O(I)){o.barWidth=void 0,o.distanceLabel=void 0;return}let w=PCe.cartesianToCartographic(E),Q=PCe.cartesianToCartographic(I);d7e.setEndPoints(w,Q);let M=d7e.surfaceDistance,B=100,T;for(let D=dpe.length-1;!O(T)&&D>=0;--D)dpe[D]/M<B&&(T=dpe[D]);if(O(T)){let D;T>=1e3?D=(T/1e3).toString()+" km":D=T.toString()+" m",o.barWidth=T/M|0,o.distanceLabel=D}else o.barWidth=void 0,o.distanceLabel=void 0}var l2e=jK,hDi="M 7.5,0 C 3.375,0 0,3.375 0,7.5 0,11.625 3.375,15 7.5,15 c 3.46875,0 6.375,-2.4375 7.21875,-5.625 l -1.96875,0 C 12,11.53125 9.9375,13.125 7.5,13.125 4.40625,13.125 1.875,10.59375 1.875,7.5 1.875,4.40625 4.40625,1.875 7.5,1.875 c 1.59375,0 2.90625,0.65625 3.9375,1.6875 l -3,3 6.5625,0 L 15,0 12.75,2.25 C 11.4375,0.84375 9.5625,0 7.5,0 z",u2e=hDi,dDi=EP,c2e=function(o){if(!O(o))throw new Ui("terria is required");this._terria=o,this.name="Unnamed Control",this.text=void 0,this.svgIcon=void 0,this.svgHeight=void 0,this.svgWidth=void 0,this.cssClass=void 0,this.isActive=!1,dDi.track(this,["name","svgIcon","svgHeight","svgWidth","cssClass","isActive"])};Object.defineProperties(c2e.prototype,{terria:{get:function(){return this._terria}},hasText:{get:function(){return O(this.text)&&typeof this.text=="string"}}});c2e.prototype.activate=function(){throw new Ui("activate must be implemented in the derived class.")};var vae=c2e,Kst=function(o){vae.apply(this,arguments)};Kst.prototype=Object.create(vae.prototype);var _H=Kst,AW=function(o){_H.apply(this,arguments),this.name="\u91CD\u7F6E\u89C6\u56FE",this.navigationLocked=!1,this.svgIcon=u2e,this.svgHeight=15,this.svgWidth=15,this.cssClass="navigation-control-icon-reset"};AW.prototype=Object.create(_H.prototype);AW.prototype.setNavigationLocked=function(o){this.navigationLocked=o};AW.prototype.resetView=function(){if(this.navigationLocked)return;let o=this.terria.scene;if(!o.screenSpaceCameraController.enableInputs)return;this.isActive=!0;let A=o.camera;if(O(this.terria.trackedEntity)){let f=this.terria.trackedEntity;this.terria.trackedEntity=void 0,this.terria.trackedEntity=f}else if(this.terria.options.defaultResetView){if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof Kt)A.flyTo({destination:o.globe.ellipsoid.cartographicToCartesian(this.terria.options.defaultResetView)});else if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof Si)try{Si.validate(this.terria.options.defaultResetView),A.flyTo({destination:this.terria.options.defaultResetView})}catch{console.log("Cesium-navigation/ResetViewNavigationControl:   options.defaultResetView Cesium rectangle is  invalid!")}}else typeof A.flyHome=="function"?A.flyHome(1):A.flyTo({destination:Ml.DEFAULT_VIEW_RECTANGLE,duration:1});this.isActive=!1};AW.prototype.activate=function(){this.resetView()};var A2e=AW,Yst={},fDi=new Kt,fpe=new ls;Yst.getCameraFocus=function(o,A,f){let m=o.scene,C=m.camera;if(m.mode!==xi.MORPHING&&(O(f)||(f=new ee),O(o.trackedEntity)?f=o.trackedEntity.position.getValue(o.clock.currentTime,f):(fpe.origin=C.positionWC,fpe.direction=C.directionWC,f=m.globe.pick(fpe,m,f)),!!O(f)))return m.mode===xi.SCENE2D||m.mode===xi.COLUMBUS_VIEW?(f=C.worldToCameraCoordinatesPoint(f,f),A&&(f=m.globe.ellipsoid.cartographicToCartesian(m.mapProjection.unproject(f,fDi),f))):A||(f=C.worldToCameraCoordinatesPoint(f,f)),f};var BH=Yst,hW=function(o,A){_H.apply(this,arguments),this.name="Zoom "+(A?"In":"Out"),this.text=A?"+":"-",this.cssClass="navigation-control-icon-zoom-"+(A?"in":"out"),this.relativeAmount=2,A&&(this.relativeAmount=1/this.relativeAmount)};hW.prototype.relativeAmount=1;hW.prototype=Object.create(_H.prototype);hW.prototype.activate=function(){this.zoom(this.relativeAmount)};var gDi=new ee;hW.prototype.zoom=function(o){if(this.isActive=!0,O(this.terria)){let A=this.terria.scene,f=A.screenSpaceCameraController;if(!f.enableInputs||!f.enableZoom)return;let m=A.camera,C;switch(A.mode){case xi.MORPHING:break;case xi.SCENE2D:m.zoomIn(m.positionCartographic.height*(1-this.relativeAmount));break;default:let y;if(O(this.terria.trackedEntity)?y=new ee:y=BH.getCameraFocus(this.terria,!1),O(y))C={direction:m.direction,up:m.up};else{let I=new ls(m.worldToCameraCoordinatesPoint(A.globe.ellipsoid.cartographicToCartesian(m.positionCartographic)),m.directionWC);y=kA.grazingAltitudeLocation(I,A.globe.ellipsoid),C={heading:m.heading,pitch:m.pitch,roll:m.roll}}let x=ee.subtract(m.position,y,gDi),v=ee.multiplyByScalar(x,o,x),E=ee.add(y,v,y);if(O(this.terria.trackedEntity)||A.mode===xi.COLUMBUS_VIEW)m.position=E;else{if(o===.5&&Ae(m.undergroundMode,!1)===!1&&m.positionCartographic.height<1)return;m.flyTo({destination:E,orientation:C,duration:.5,convert:!1})}}}this.isActive=!1};var Bie=hW,pDi="m 66.5625,0 0,15.15625 3.71875,0 0,-10.40625 5.5,10.40625 4.375,0 0,-15.15625 -3.71875,0 0,10.40625 L 70.9375,0 66.5625,0 z M 72.5,20.21875 c -28.867432,0 -52.28125,23.407738 -52.28125,52.28125 0,28.87351 23.413818,52.3125 52.28125,52.3125 28.86743,0 52.28125,-23.43899 52.28125,-52.3125 0,-28.873512 -23.41382,-52.28125 -52.28125,-52.28125 z m 0,1.75 c 13.842515,0 26.368948,5.558092 35.5,14.5625 l -11.03125,11 0.625,0.625 11.03125,-11 c 8.9199,9.108762 14.4375,21.579143 14.4375,35.34375 0,13.764606 -5.5176,26.22729 -14.4375,35.34375 l -11.03125,-11 -0.625,0.625 11.03125,11 c -9.130866,9.01087 -21.658601,14.59375 -35.5,14.59375 -13.801622,0 -26.321058,-5.53481 -35.4375,-14.5 l 11.125,-11.09375 c 6.277989,6.12179 14.857796,9.90625 24.3125,9.90625 19.241896,0 34.875,-15.629154 34.875,-34.875 0,-19.245847 -15.633104,-34.84375 -34.875,-34.84375 -9.454704,0 -18.034511,3.760884 -24.3125,9.875 L 37.0625,36.4375 C 46.179178,27.478444 58.696991,21.96875 72.5,21.96875 z m -0.875,0.84375 0,13.9375 1.75,0 0,-13.9375 -1.75,0 z M 36.46875,37.0625 47.5625,48.15625 C 41.429794,54.436565 37.65625,63.027539 37.65625,72.5 c 0,9.472461 3.773544,18.055746 9.90625,24.34375 L 36.46875,107.9375 c -8.96721,-9.1247 -14.5,-21.624886 -14.5,-35.4375 0,-13.812615 5.53279,-26.320526 14.5,-35.4375 z M 72.5,39.40625 c 18.297686,0 33.125,14.791695 33.125,33.09375 0,18.302054 -14.827314,33.125 -33.125,33.125 -18.297687,0 -33.09375,-14.822946 -33.09375,-33.125 0,-18.302056 14.796063,-33.09375 33.09375,-33.09375 z M 22.84375,71.625 l 0,1.75 13.96875,0 0,-1.75 -13.96875,0 z m 85.5625,0 0,1.75 14,0 0,-1.75 -14,0 z M 71.75,108.25 l 0,13.9375 1.71875,0 0,-13.9375 -1.71875,0 z",h2e=pDi,mDi="m 72.71875,54.375 c -0.476702,0 -0.908208,0.245402 -1.21875,0.5625 -0.310542,0.317098 -0.551189,0.701933 -0.78125,1.1875 -0.172018,0.363062 -0.319101,0.791709 -0.46875,1.25 -6.91615,1.075544 -12.313231,6.656514 -13,13.625 -0.327516,0.117495 -0.661877,0.244642 -0.9375,0.375 -0.485434,0.22959 -0.901634,0.471239 -1.21875,0.78125 -0.317116,0.310011 -0.5625,0.742111 -0.5625,1.21875 l 0.03125,0 c 0,0.476639 0.245384,0.877489 0.5625,1.1875 0.317116,0.310011 0.702066,0.58291 1.1875,0.8125 0.35554,0.168155 0.771616,0.32165 1.21875,0.46875 1.370803,6.10004 6.420817,10.834127 12.71875,11.8125 0.146999,0.447079 0.30025,0.863113 0.46875,1.21875 0.230061,0.485567 0.470708,0.870402 0.78125,1.1875 0.310542,0.317098 0.742048,0.5625 1.21875,0.5625 0.476702,0 0.876958,-0.245402 1.1875,-0.5625 0.310542,-0.317098 0.582439,-0.701933 0.8125,-1.1875 0.172018,-0.363062 0.319101,-0.791709 0.46875,-1.25 6.249045,-1.017063 11.256351,-5.7184 12.625,-11.78125 0.447134,-0.1471 0.86321,-0.300595 1.21875,-0.46875 0.485434,-0.22959 0.901633,-0.502489 1.21875,-0.8125 0.317117,-0.310011 0.5625,-0.710861 0.5625,-1.1875 l -0.03125,0 c 0,-0.476639 -0.245383,-0.908739 -0.5625,-1.21875 C 89.901633,71.846239 89.516684,71.60459 89.03125,71.375 88.755626,71.244642 88.456123,71.117495 88.125,71 87.439949,64.078341 82.072807,58.503735 75.21875,57.375 c -0.15044,-0.461669 -0.326927,-0.884711 -0.5,-1.25 -0.230061,-0.485567 -0.501958,-0.870402 -0.8125,-1.1875 -0.310542,-0.317098 -0.710798,-0.5625 -1.1875,-0.5625 z m -0.0625,1.40625 c 0.03595,-0.01283 0.05968,0 0.0625,0 0.0056,0 0.04321,-0.02233 0.1875,0.125 0.144288,0.147334 0.34336,0.447188 0.53125,0.84375 0.06385,0.134761 0.123901,0.309578 0.1875,0.46875 -0.320353,-0.01957 -0.643524,-0.0625 -0.96875,-0.0625 -0.289073,0 -0.558569,0.04702 -0.84375,0.0625 C 71.8761,57.059578 71.936151,56.884761 72,56.75 c 0.18789,-0.396562 0.355712,-0.696416 0.5,-0.84375 0.07214,-0.07367 0.120304,-0.112167 0.15625,-0.125 z m 0,2.40625 c 0.448007,0 0.906196,0.05436 1.34375,0.09375 0.177011,0.592256 0.347655,1.271044 0.5,2.03125 0.475097,2.370753 0.807525,5.463852 0.9375,8.9375 -0.906869,-0.02852 -1.834463,-0.0625 -2.78125,-0.0625 -0.92298,0 -1.802327,0.03537 -2.6875,0.0625 0.138529,-3.473648 0.493653,-6.566747 0.96875,-8.9375 0.154684,-0.771878 0.320019,-1.463985 0.5,-2.0625 0.405568,-0.03377 0.804291,-0.0625 1.21875,-0.0625 z m -2.71875,0.28125 c -0.129732,0.498888 -0.259782,0.987558 -0.375,1.5625 -0.498513,2.487595 -0.838088,5.693299 -0.96875,9.25 -3.21363,0.15162 -6.119596,0.480068 -8.40625,0.9375 -0.682394,0.136509 -1.275579,0.279657 -1.84375,0.4375 0.799068,-6.135482 5.504716,-11.036454 11.59375,-12.1875 z M 75.5,58.5 c 6.043169,1.18408 10.705093,6.052712 11.5,12.15625 -0.569435,-0.155806 -1.200273,-0.302525 -1.875,-0.4375 -2.262525,-0.452605 -5.108535,-0.783809 -8.28125,-0.9375 -0.130662,-3.556701 -0.470237,-6.762405 -0.96875,-9.25 C 75.761959,59.467174 75.626981,58.990925 75.5,58.5 z m -2.84375,12.09375 c 0.959338,0 1.895843,0.03282 2.8125,0.0625 C 75.48165,71.267751 75.5,71.871028 75.5,72.5 c 0,1.228616 -0.01449,2.438313 -0.0625,3.59375 -0.897358,0.0284 -1.811972,0.0625 -2.75,0.0625 -0.927373,0 -1.831062,-0.03473 -2.71875,-0.0625 -0.05109,-1.155437 -0.0625,-2.365134 -0.0625,-3.59375 0,-0.628972 0.01741,-1.232249 0.03125,-1.84375 0.895269,-0.02827 1.783025,-0.0625 2.71875,-0.0625 z M 68.5625,70.6875 c -0.01243,0.60601 -0.03125,1.189946 -0.03125,1.8125 0,1.22431 0.01541,2.407837 0.0625,3.5625 -3.125243,-0.150329 -5.92077,-0.471558 -8.09375,-0.90625 -0.784983,-0.157031 -1.511491,-0.316471 -2.125,-0.5 -0.107878,-0.704096 -0.1875,-1.422089 -0.1875,-2.15625 0,-0.115714 0.02849,-0.228688 0.03125,-0.34375 0.643106,-0.20284 1.389577,-0.390377 2.25,-0.5625 2.166953,-0.433487 4.97905,-0.75541 8.09375,-0.90625 z m 8.3125,0.03125 c 3.075121,0.15271 5.824455,0.446046 7.96875,0.875 0.857478,0.171534 1.630962,0.360416 2.28125,0.5625 0.0027,0.114659 0,0.228443 0,0.34375 0,0.735827 -0.07914,1.450633 -0.1875,2.15625 -0.598568,0.180148 -1.29077,0.34562 -2.0625,0.5 -2.158064,0.431708 -4.932088,0.754666 -8.03125,0.90625 0.04709,-1.154663 0.0625,-2.33819 0.0625,-3.5625 0,-0.611824 -0.01924,-1.185379 -0.03125,-1.78125 z M 57.15625,72.5625 c 0.0023,0.572772 0.06082,1.131112 0.125,1.6875 -0.125327,-0.05123 -0.266577,-0.10497 -0.375,-0.15625 -0.396499,-0.187528 -0.665288,-0.387337 -0.8125,-0.53125 -0.147212,-0.143913 -0.15625,-0.182756 -0.15625,-0.1875 0,-0.0047 -0.02221,-0.07484 0.125,-0.21875 0.147212,-0.143913 0.447251,-0.312472 0.84375,-0.5 0.07123,-0.03369 0.171867,-0.06006 0.25,-0.09375 z m 31.03125,0 c 0.08201,0.03503 0.175941,0.05872 0.25,0.09375 0.396499,0.187528 0.665288,0.356087 0.8125,0.5 0.14725,0.14391 0.15625,0.21405 0.15625,0.21875 0,0.0047 -0.009,0.04359 -0.15625,0.1875 -0.147212,0.143913 -0.416001,0.343722 -0.8125,0.53125 -0.09755,0.04613 -0.233314,0.07889 -0.34375,0.125 0.06214,-0.546289 0.09144,-1.094215 0.09375,-1.65625 z m -29.5,3.625 c 0.479308,0.123125 0.983064,0.234089 1.53125,0.34375 2.301781,0.460458 5.229421,0.787224 8.46875,0.9375 0.167006,2.84339 0.46081,5.433176 0.875,7.5 0.115218,0.574942 0.245268,1.063612 0.375,1.5625 -5.463677,-1.028179 -9.833074,-5.091831 -11.25,-10.34375 z m 27.96875,0 C 85.247546,81.408945 80.919274,85.442932 75.5,86.5 c 0.126981,-0.490925 0.261959,-0.967174 0.375,-1.53125 0.41419,-2.066824 0.707994,-4.65661 0.875,-7.5 3.204493,-0.15162 6.088346,-0.480068 8.375,-0.9375 0.548186,-0.109661 1.051942,-0.220625 1.53125,-0.34375 z M 70.0625,77.53125 c 0.865391,0.02589 1.723666,0.03125 2.625,0.03125 0.912062,0 1.782843,-0.0048 2.65625,-0.03125 -0.165173,2.736408 -0.453252,5.207651 -0.84375,7.15625 -0.152345,0.760206 -0.322989,1.438994 -0.5,2.03125 -0.437447,0.03919 -0.895856,0.0625 -1.34375,0.0625 -0.414943,0 -0.812719,-0.02881 -1.21875,-0.0625 -0.177011,-0.592256 -0.347655,-1.271044 -0.5,-2.03125 -0.390498,-1.948599 -0.700644,-4.419842 -0.875,-7.15625 z m 1.75,10.28125 c 0.284911,0.01545 0.554954,0.03125 0.84375,0.03125 0.325029,0 0.648588,-0.01171 0.96875,-0.03125 -0.05999,0.148763 -0.127309,0.31046 -0.1875,0.4375 -0.18789,0.396562 -0.386962,0.696416 -0.53125,0.84375 -0.144288,0.147334 -0.181857,0.125 -0.1875,0.125 -0.0056,0 -0.07446,0.02233 -0.21875,-0.125 C 72.355712,88.946416 72.18789,88.646562 72,88.25 71.939809,88.12296 71.872486,87.961263 71.8125,87.8125 z",d2e=mDi,CDi="M 72.46875,22.03125 C 59.505873,22.050338 46.521615,27.004287 36.6875,36.875 L 47.84375,47.96875 C 61.521556,34.240041 83.442603,34.227389 97.125,47.90625 l 11.125,-11.125 C 98.401629,26.935424 85.431627,22.012162 72.46875,22.03125 z",f2e=CDi,yDi=EP,sQ=function(o){this.terria=o.terria,this.eventHelper=new Mx,this.enableZoomControls=O(o.enableZoomControls)?o.enableZoomControls:!0,this.enableCompass=O(o.enableCompass)?o.enableCompass:!0,this.navigationLocked=!1,this.controls=o.controls,O(this.controls)||(this.controls=[new Bie(this.terria,!0),new A2e(this.terria),new Bie(this.terria,!1)]),this.svgCompassOuterRing=h2e,this.svgCompassGyro=d2e,this.svgCompassRotationMarker=f2e,this.showCompass=O(this.terria)&&this.enableCompass,this.heading=this.showCompass?this.terria.scene.camera.heading:0,this.isOrbiting=!1,this.orbitCursorAngle=0,this.orbitCursorOpacity=0,this.orbitLastTimestamp=0,this.orbitFrame=void 0,this.orbitIsLook=!1,this.orbitMouseMoveFunction=void 0,this.orbitMouseUpFunction=void 0,this.isRotating=!1,this.rotateInitialCursorAngle=void 0,this.rotateFrame=void 0,this.rotateIsLook=!1,this.rotateMouseMoveFunction=void 0,this.rotateMouseUpFunction=void 0,this._unsubcribeFromPostRender=void 0,yDi.track(this,["controls","showCompass","heading","isOrbiting","orbitCursorAngle","isRotating"]);let A=this;sQ.prototype.setNavigationLocked=function(m){this.navigationLocked=m,this.controls&&this.controls.length>1&&this.controls[1].setNavigationLocked(this.navigationLocked)};function f(){O(A.terria)?(A._unsubcribeFromPostRender&&(A._unsubcribeFromPostRender(),A._unsubcribeFromPostRender=void 0),A.showCompass=A.enableCompass,A._unsubcribeFromPostRender=A.terria.scene.postRender.addEventListener(function(){A.heading=A.terria.scene.camera.heading})):(A._unsubcribeFromPostRender&&(A._unsubcribeFromPostRender(),A._unsubcribeFromPostRender=void 0),A.showCompass=!1)}this.eventHelper.add(this.terria.afterWidgetChanged,f,this),f()};sQ.prototype.destroy=function(){this.eventHelper.removeAll()};sQ.prototype.show=function(o){let A;this.enableZoomControls&&this.enableCompass?A=`<div class="compass" title=""  data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`:!this.enableZoomControls&&this.enableCompass?A=`<div class="compass" title="" data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"  style="display: none;" ><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`:this.enableZoomControls&&!this.enableCompass?A=`<div class="compass"  style="display: none;" title="" data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"    ><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`:!this.enableZoomControls&&!this.enableCompass&&(A=`<div class="compass"  style="display: none;" title="" data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div> <div class="compass-rotation-marker" data-bind="visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }"></div> <div class="compass-outer-ring" title="" data-bind="style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }"></div> <div class="compass-gyro-background"></div> <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }"></div></div><div class="navigation-controls"   style="display: none;" ><!-- ko foreach: controls --><div data-bind="click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' ">   <!-- ko if: $data.hasText -->   <div data-bind="text: $data.text, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>   <!-- /ko -->  <!-- ko ifnot: $data.hasText -->  <div data-bind="cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ?  'navigation-control-icon-active ' + $data.cssClass : $data.cssClass"></div>  <!-- /ko --> </div> <!-- /ko --></div>`),xae(A,o,this)};sQ.prototype.add=function(o){this.controls.push(o)};sQ.prototype.remove=function(o){this.controls.remove(o)};sQ.prototype.isLastControl=function(o){return o===this.controls[this.controls.length-1]};var g2e=new It;sQ.prototype.handleMouseDown=function(o,A){if(this.terria.scene.mode===xi.MORPHING||o.navigationLocked)return!0;let f=A.currentTarget,m=A.currentTarget.getBoundingClientRect(),C=m.width/2,y=new It((m.right-m.left)/2,(m.bottom-m.top)/2),x=new It(A.clientX-m.left,A.clientY-m.top),v=It.subtract(x,y,g2e),E=It.magnitude(v)/C;if(E<50/145)xDi(this,f,v);else if(E<1)vDi(this,f,v);else return!0};var RCe=new Xe,wie=new Xe,p2e=new ee;sQ.prototype.handleDoubleClick=function(o,A){let f=o.terria.scene,m=f.camera,C=f.screenSpaceCameraController;if(f.mode===xi.MORPHING||!C.enableInputs||o.navigationLocked)return!0;if(f.mode===xi.COLUMBUS_VIEW&&!C.enableTranslate||(f.mode===xi.SCENE3D||f.mode===xi.COLUMBUS_VIEW)&&(!C.enableLook||f.mode===xi.SCENE3D&&!C.enableRotate))return;let y=BH.getCameraFocus(o.terria,!0,p2e);if(!O(y)){this.controls[1].resetView();return}let x=f.globe.ellipsoid.cartographicToCartesian(m.positionCartographic,new ee),v=f.globe.ellipsoid.geodeticSurfaceNormal(y),E=new wi(y,0);m.flyToBoundingSphere(E,{offset:new Ex(0,je.PI_OVER_TWO-ee.angleBetween(v,m.directionWC),ee.distance(x,y)),duration:1.5})};sQ.create=function(o){let A=new sQ(o);return A.show(o.container),A};function xDi(o,A,f){let m=o.terria.scene,C=m.screenSpaceCameraController;if(m.mode===xi.MORPHING||!C.enableInputs)return;if(o.navigationLocked)return!0;switch(m.mode){case xi.COLUMBUS_VIEW:if(C.enableLook)break;if(!C.enableTranslate||!C.enableTilt)return;break;case xi.SCENE3D:if(C.enableLook)break;if(!C.enableTilt||!C.enableRotate)return;break;case xi.SCENE2D:if(!C.enableTranslate)return;break}document.removeEventListener("mousemove",o.orbitMouseMoveFunction,!1),document.removeEventListener("mouseup",o.orbitMouseUpFunction,!1),O(o.orbitTickFunction)&&o.terria.clock.onTick.removeEventListener(o.orbitTickFunction),o.orbitMouseMoveFunction=void 0,o.orbitMouseUpFunction=void 0,o.orbitTickFunction=void 0,o.isOrbiting=!0,o.orbitLastTimestamp=GA();let y=m.camera;if(O(o.terria.trackedEntity))o.orbitFrame=void 0,o.orbitIsLook=!1;else{let v=BH.getCameraFocus(o.terria,!0,p2e);O(v)?(o.orbitFrame=Vn.eastNorthUpToFixedFrame(v,m.globe.ellipsoid,wie),o.orbitIsLook=!1):(o.orbitFrame=Vn.eastNorthUpToFixedFrame(y.positionWC,m.globe.ellipsoid,wie),o.orbitIsLook=!0)}o.orbitTickFunction=function(v){let E=GA(),I=E-o.orbitLastTimestamp,w=(o.orbitCursorOpacity-.5)*2.5/1e3,Q=I*w,M=o.orbitCursorAngle+je.PI_OVER_TWO,B=Math.cos(M)*Q,T=Math.sin(M)*Q,D;if(o.navigationLocked)return!0;O(o.orbitFrame)&&(D=Xe.clone(y.transform,RCe),y.lookAtTransform(o.orbitFrame)),m.mode===xi.SCENE2D?y.move(new ee(B,T,0),Math.max(m.canvas.clientWidth,m.canvas.clientHeight)/100*y.positionCartographic.height*Q):o.orbitIsLook?(y.look(ee.UNIT_Z,-B),y.look(y.right,-T)):(y.rotateLeft(B),y.rotateUp(T)),O(o.orbitFrame)&&y.lookAtTransform(D),o.orbitLastTimestamp=E};function x(v,E){let I=Math.atan2(-v.y,v.x);o.orbitCursorAngle=je.zeroToTwoPi(I-je.PI_OVER_TWO);let w=It.magnitude(v),Q=E/2,M=Math.min(w/Q,1),B=.5*M*M+.5;o.orbitCursorOpacity=B}o.orbitMouseMoveFunction=function(v){let E=A.getBoundingClientRect(),I=new It((E.right-E.left)/2,(E.bottom-E.top)/2),w=new It(v.clientX-E.left,v.clientY-E.top),Q=It.subtract(w,I,g2e);x(Q,E.width)},o.orbitMouseUpFunction=function(v){o.isOrbiting=!1,document.removeEventListener("mousemove",o.orbitMouseMoveFunction,!1),document.removeEventListener("mouseup",o.orbitMouseUpFunction,!1),O(o.orbitTickFunction)&&o.terria.clock.onTick.removeEventListener(o.orbitTickFunction),o.orbitMouseMoveFunction=void 0,o.orbitMouseUpFunction=void 0,o.orbitTickFunction=void 0},document.addEventListener("mousemove",o.orbitMouseMoveFunction,!1),document.addEventListener("mouseup",o.orbitMouseUpFunction,!1),o.terria.clock.onTick.addEventListener(o.orbitTickFunction),x(f,A.getBoundingClientRect().width)}function vDi(o,A,f){let m=o.terria.scene,C=m.camera,y=m.screenSpaceCameraController;if(m.mode===xi.MORPHING||m.mode===xi.SCENE2D||!y.enableInputs)return;if(o.navigationLocked)return!0;if(!y.enableLook&&(m.mode===xi.COLUMBUS_VIEW||m.mode===xi.SCENE3D&&!y.enableRotate))return;if(document.removeEventListener("mousemove",o.rotateMouseMoveFunction,!1),document.removeEventListener("mouseup",o.rotateMouseUpFunction,!1),o.rotateMouseMoveFunction=void 0,o.rotateMouseUpFunction=void 0,o.isRotating=!0,o.rotateInitialCursorAngle=Math.atan2(-f.y,f.x),O(o.terria.trackedEntity))o.rotateFrame=void 0,o.rotateIsLook=!1;else{let v=BH.getCameraFocus(o.terria,!0,p2e);!O(v)||m.mode===xi.COLUMBUS_VIEW&&!y.enableLook&&!y.enableTranslate?(o.rotateFrame=Vn.eastNorthUpToFixedFrame(C.positionWC,m.globe.ellipsoid,wie),o.rotateIsLook=!0):(o.rotateFrame=Vn.eastNorthUpToFixedFrame(v,m.globe.ellipsoid,wie),o.rotateIsLook=!1)}let x;O(o.rotateFrame)&&(x=Xe.clone(C.transform,RCe),C.lookAtTransform(o.rotateFrame)),o.rotateInitialCameraAngle=-C.heading,O(o.rotateFrame)&&C.lookAtTransform(x),o.rotateMouseMoveFunction=function(v){let E=A.getBoundingClientRect(),I=new It((E.right-E.left)/2,(E.bottom-E.top)/2),w=new It(v.clientX-E.left,v.clientY-E.top),Q=It.subtract(w,I,g2e),M=Math.atan2(-Q.y,Q.x)-o.rotateInitialCursorAngle,B=je.zeroToTwoPi(o.rotateInitialCameraAngle-M),T=o.terria.scene.camera,D;O(o.rotateFrame)&&(D=Xe.clone(T.transform,RCe),T.lookAtTransform(o.rotateFrame));let F=-T.heading;T.rotateRight(B-F),O(o.rotateFrame)&&T.lookAtTransform(D)},o.rotateMouseUpFunction=function(v){o.isRotating=!1,document.removeEventListener("mousemove",o.rotateMouseMoveFunction,!1),document.removeEventListener("mouseup",o.rotateMouseUpFunction,!1),o.rotateMouseMoveFunction=void 0,o.rotateMouseUpFunction=void 0},document.addEventListener("mousemove",o.rotateMouseMoveFunction,!1),document.addEventListener("mouseup",o.rotateMouseUpFunction,!1)}var N7=sQ,f7e=br,dB=function(o){EDi.apply(this,arguments),this._onDestroyListeners=[]};dB.prototype.distanceLegendViewModel=void 0;dB.prototype.navigationViewModel=void 0;dB.prototype.navigationDiv=void 0;dB.prototype.distanceLegendDiv=void 0;dB.prototype.terria=void 0;dB.prototype.container=void 0;dB.prototype._onDestroyListeners=void 0;dB.prototype._navigationLocked=!1;dB.prototype.setNavigationLocked=function(o){this._navigationLocked=o,this.navigationViewModel.setNavigationLocked(this._navigationLocked)};dB.prototype.getNavigationLocked=function(){return this._navigationLocked};dB.prototype.destroy=function(){O(this.navigationViewModel)&&this.navigationViewModel.destroy(),O(this.distanceLegendViewModel)&&this.distanceLegendViewModel.destroy(),O(this.navigationDiv)&&this.navigationDiv.parentNode.removeChild(this.navigationDiv),delete this.navigationDiv,O(this.distanceLegendDiv)&&this.distanceLegendDiv.parentNode.removeChild(this.distanceLegendDiv),delete this.distanceLegendDiv,O(this.container)&&this.container.parentNode.removeChild(this.container),delete this.container;for(let o=0;o<this._onDestroyListeners.length;o++)this._onDestroyListeners[o]()};dB.prototype.addOnDestroyListener=function(o){typeof o=="function"&&this._onDestroyListeners.push(o)};function EDi(o,A){if(!O(o))throw new Ui("CesiumWidget or Viewer is required.");let f=O(o.cesiumWidget)?o.cesiumWidget:o,m=document.createElement("div");m.className="Geoworld-widget-GeoworldNavigationContainer",f.container.appendChild(m),this.terria=o,this.terria.options=O(A)?A:{},this.terria.afterWidgetChanged=new f7e,this.terria.beforeWidgetChanged=new f7e,this.container=m,(!O(this.terria.options.enableDistanceLegend)||this.terria.options.enableDistanceLegend)&&(this.distanceLegendDiv=document.createElement("div"),m.appendChild(this.distanceLegendDiv),this.distanceLegendDiv.setAttribute("id","distanceLegendDiv"),this.distanceLegendViewModel=l2e.create({container:this.distanceLegendDiv,terria:this.terria,mapElement:m,enableDistanceLegend:!0})),(!O(this.terria.options.enableZoomControls)||this.terria.options.enableZoomControls)&&(!O(this.terria.options.enableCompass)||this.terria.options.enableCompass)?(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),m.appendChild(this.navigationDiv),this.navigationViewModel=N7.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!0,enableCompass:!0})):O(this.terria.options.enableZoomControls)&&!this.terria.options.enableZoomControls&&(!O(this.terria.options.enableCompass)||this.terria.options.enableCompass)?(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),m.appendChild(this.navigationDiv),this.navigationViewModel=N7.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!1,enableCompass:!0})):(!O(this.terria.options.enableZoomControls)||this.terria.options.enableZoomControls)&&O(this.terria.options.enableCompass)&&!this.terria.options.enableCompass?(this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),m.appendChild(this.navigationDiv),this.navigationViewModel=N7.create({container:this.navigationDiv,terria:this.terria,enableZoomControls:!0,enableCompass:!1})):O(this.terria.options.enableZoomControls)&&!this.terria.options.enableZoomControls&&O(this.terria.options.enableCompass)&&this.terria.options.enableCompass}var m2e=dB;function Jst(o,A){if(!O(o))throw new Ui("viewer is required.");Wst(o,A).addOnDestroyListener(function(f){return function(){delete f.cesiumNavigation}}(o)),Object.defineProperties(o,{cesiumNavigation:{configurable:!0,get:function(){return o.cesiumWidget.cesiumNavigation}}})}Jst.mixinWidget=function(o,A){return Wst.apply(void 0,arguments)};var Wst=function(o,A){let f=new m2e(o,A),m=O(o.cesiumWidget)?o.cesiumWidget:o;return Object.defineProperties(m,{cesiumNavigation:{configurable:!0,get:function(){return f}}}),f.addOnDestroyListener(function(C){return function(){delete C.cesiumNavigation}}(m)),f},jst=Jst;function dW(o,A,f){let m=o._gl;this.id=A,this._size=f.imageBuffer.length,this._context=o,this._width=f.width,this._height=f.height,this._texture=null,this._internalFormat=f.internalFormat,this._wrapS=Ae(f.wrapS,Va.CLAMP_TO_EDGE),this._wrapT=Ae(f.wrapT,Va.CLAMP_TO_EDGE),this.id=A,this._target=m.TEXTURE_2D,this._texture=m.createTexture(),m.bindTexture(m.TEXTURE_2D,this._texture);let C=0,y=0,x=IDi(f.imageBuffer,this._internalFormat,this._width,this._height),v=this._width,E=this._height;do{let I=Gn.compressedTextureSizeInBytes(this._internalFormat,v,E),w=new Uint8Array(f.imageBuffer.buffer,f.imageBuffer.byteOffset+C,I);m.compressedTexImage2D(m.TEXTURE_2D,y++,this._internalFormat,v,E,0,w),v=Math.max(v>>1,1),E=Math.max(E>>1,1),C+=I}while(C<f.imageBuffer.length&&x);y>1?(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR_MIPMAP_LINEAR)):(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR)),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,this._wrapS),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,this._wrapT),m.bindTexture(m.TEXTURE_2D,null)}function IDi(o,A,f,m){let C=o.length,y=f,x=m,v=0;for(;;){let E=Gn.compressedTextureSizeInBytes(A,y,x);if(v+=E,y=y>>1,x=x>>1,y===0&&x===0)break;y=Math.max(y,1),x=Math.max(x,1)}return v===C}dW.prototype.enable=function(){let o=this._context._gl;o.activeTexture(this._gl.TEXTURE0),o.bindTexture(this._target,this._texture)};dW.prototype.disable=function(){this._context._gl.bindTexture(this._target,null)};dW.prototype.isDestroyed=function(){return!1};dW.prototype.destroy=function(){this._context._gl.deleteTexture(this._texture),this._texture=null,this.id=0,Qr(this)};var C2e=dW;function y2e(){this.ambientColor=new At,this.diffuseColor=new At,this.specularColor=new At(0,0,0,0),this.shininess=50,this.bTransparentSorting=!1,this.textures=[]}y2e.prototype.isDestroyed=function(){return!1};y2e.prototype.destroy=function(){return Qr(this)};var x2e=y2e,v2e=`attribute vec4 aPosition;
        attribute vec4 aTexCoord0;
    #ifdef TexCoord2
        attribute vec4 aTexCoord1;
    #endif
        varying vec4 vTexCoord;
        attribute vec4 aColor;
        varying vec4 vColor;
        void main()
        {
            vTexCoord.xy = aTexCoord0.xy;
        #ifdef TexCoord2
            vTexCoord.zw = aTexCoord1.xy;
        #endif
            vColor = aColor;
            gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);
        }
    `,E2e=`uniform sampler2D uTexture;
    #ifdef TexCoord2
        uniform sampler2D uTexture2;
    #endif
        uniform vec4 uDiffuseColor;
        uniform vec4 uAmbientColor;
        varying vec4 vColor;
        varying vec4 vTexCoord;
        void main()
        {
            vec4 color = vColor * texture2D(uTexture, vTexCoord.xy);
        #ifdef TexCoord2
            color *= texture2D(uTexture2, vTexCoord.zw);
        #endif
            gl_FragColor = czm_gammaCorrect(color);
        }
    `;function I2e(){this.context=void 0,this.model=void 0,this.index=void 0}I2e.prototype.set=function(o,A,f){this.context=o,this.model=A,this.index=f};I2e.prototype.execute=function(){let o=this.context,A=this.index,f=this.model.vertexPackage,m=f.vertexAttributes[A];if(!O(m))throw new Ui("attribute is null");if(f.instanceIndex!==-1&&!O(this.model._instanceBuffer)){if(!O(f.instanceBuffer))throw new Ui("instance buffer is null");this.model.instanceBuffer=vo.createVertexBuffer({context:o,typedArray:f.instanceBuffer,usage:ln.STATIC_DRAW})}if(m.instanceDivisor===1){m.vertexBuffer=this.model.instanceBuffer;return}O(m.vertexBuffer)||(m.vertexBuffer=vo.createVertexBuffer({context:o,typedArray:m.typedArray,usage:ln.STATIC_DRAW}),m.typedArray=null,delete m.typedArray)};var _2e=I2e;function B2e(){this.model=void 0,this.context=void 0,this.index=0}B2e.prototype.set=function(o,A,f){this.model=A,this.context=o,this.index=f};B2e.prototype.execute=function(){let o=this.context,A=this.model.arrIndexPackage[this.index],f=this.model.vertexPackage.verticesCount;if(!O(A))throw new Ui("index package is null");if(O(A.indexBuffer))return;if(!O(A.indicesTypedArray))throw new Ui("index buffer is null");let m=Nn.UNSIGNED_SHORT;(A.indexType===1||f>=je.SIXTY_FOUR_KILOBYTES)&&o.elementIndexUint&&(m=Nn.UNSIGNED_INT),A.indexBuffer=vo.createIndexBuffer({context:o,typedArray:A.indicesTypedArray,usage:ln.STATIC_DRAW,indexDatatype:m}),A.indicesTypedArray=null,delete A.indicesTypedArray};var w2e=B2e;function wH(o){this.layer=o.layer,this.vertexPackage=o.vertexPackage,this.arrIndexPackage=o.arrIndexPackage,this.vertexBufferToCreate=new d5,this.indexBufferToCreate=new d5;let A,f;for(A=0,f=this.vertexPackage.vertexAttributes.length;A<f;A++)this.vertexBufferToCreate.enqueue(A);for(A=0,f=this.arrIndexPackage.length;A<f;A++)this.indexBufferToCreate.enqueue(A);this.boundingVolume=o.boundingVolume,this.material=o.material,this.modelMatrix=o.modelMatrix,this.shaderProgram=void 0,this.vertexArray=void 0,this.colorCommand=void 0,this.ready=!1}var g7e=new _2e,p7e=new w2e;function _Di(o,A){let f=o.layer.context,m=o.vertexBufferToCreate;for(;m.length;){let C=m.peek();if(g7e.set(f,o,C),!A.jobScheduler.execute(g7e,KE.BUFFER))break;m.dequeue()}}function BDi(o,A){let f=o.layer.context,m=o.indexBufferToCreate;for(;m.length;){let C=m.peek();if(p7e.set(f,o,C),!A.jobScheduler.execute(p7e,KE.BUFFER))break;m.dequeue()}}wH.prototype.createBuffers=function(o){_Di(this,o),BDi(this,o)};wH.prototype.createCommand=Ui.throwInstantiationError;wH.prototype.update=Ui.throwInstantiationError;wH.prototype.isDestroyed=Ui.throwInstantiationError;wH.prototype.destroy=Ui.throwInstantiationError;var fW=wH;function QO(o){fW.call(this,o)}QO.prototype=Object.create(fW.prototype);QO.prototype.constructor=fW;function wDi(o,A,f){let m=new Fr({sources:[v2e]}),C=new Fr({sources:[E2e]});return O(A.aNormal)&&(m.defines.push("VertexNormal"),C.defines.push("VertexNormal")),f.textures.length>0&&(m.defines.push("TexCoord"),C.defines.push("TexCoord")),f.textures.length===2&&(m.defines.push("TexCoord2"),C.defines.push("TexCoord2")),_s.fromCache({context:o,vertexShaderSource:m,fragmentShaderSource:C,attributeLocations:A})}function bDi(){return fn.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:nI.LESS_OR_EQUAL}})}function QDi(){return fn.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:nI.LESS_OR_EQUAL},blending:Bu.ALPHA_BLEND})}function SDi(o){return{uTexture:function(){return o.textures[0]},uTextureWidth:function(){return o.textures[0]._width},uTexture2:function(){return o.textures[1]},uTexture2Width:function(){return o.textures[1]._width},uDiffuseColor:function(){return o.diffuseColor},uAmbientColor:function(){return o.ambientColor}}}QO.prototype.createCommand=function(){if(O(this.colorCommand))return;let o=this.layer.context,A=this.vertexPackage,f=this.arrIndexPackage,m=A.vertexAttributes,C=A.attrLocation;if(f.length<1)return;let y=f[0],x=this.material;this.shaderProgram=wDi(o,C,x),this.vertexArray=new Vc({context:o,attributes:m,indexBuffer:y.indexBuffer}),this.colorCommand=new On({primitiveType:y.primitiveType,modelMatrix:this.modelMatrix,boundingVolume:wi.clone(this.boundingVolume),pickId:"vSecondColor",vertexArray:this.vertexArray,shaderProgram:this.shaderProgram,pass:x.bTransparentSorting?hr.TRANSLUCENT:hr.CESIUM_3D_TILE,renderState:x.bTransparentSorting?QDi():bDi()}),this.colorCommand.uniformMap=SDi(x),this.vertexPackage=null,this.arrIndexPackage=null,this.ready=!0};QO.prototype.update=function(o){if(!this.ready){this.createBuffers(o),this.createCommand(o);return}o.commandList.push(this.colorCommand)};QO.prototype.isDestroyed=function(){return!1};QO.prototype.destroy=function(){return this.shaderProgram=this.shaderProgram&&!this.shaderProgram.isDestroyed()&&this.shaderProgram.destroy(),this.vertexArray=this.vertexArray&&!this.vertexArray.isDestroyed()&&this.vertexArray.destroy(),this.colorCommand=void 0,this.vertexPackage=null,this.arrIndexPackage=null,Qr(this)};var bie=QO,DDi={OSGBFile:function(o){return new bie(o)},OSGBCacheFile:function(o){return new bie(o)}},b2e=DDi,TDi={SVC_Vertex:1,SVC_Normal:2,SVC_VertexColor:4,SVC_SecondColor:8,SVC_TexutreCoord:16,SVC_TexutreCoordIsW:32},_1=Object.freeze(TDi);function qst(){}function MDi(o,A){let f={},m=A.materials.material;for(let C=0,y=m.length;C<y;C++){let x=m[C].material,v=x.id,E=new x2e;f[v]=E;let I=x.ambient;E.ambientColor=new At(I.r,I.g,I.b,I.a);let w=x.diffuse;E.diffuseColor=new At(w.r,w.g,w.b,w.a);let Q=x.specular;E.specularColor=new At(Q.r,Q.g,Q.b,Q.a),E.shininess=x.shininess,E.bTransparentSorting=x.transparentsorting;let M=x.textureunitstates,B=M.length;for(let T=0;T<B;T++){let D=M[T].textureunitstate,F=D.id,L=D.addressmode.u===0?Va.REPEAT:Va.CLAMP_TO_EDGE,R=D.addressmode.v===0?Va.REPEAT:Va.CLAMP_TO_EDGE;E.texMatrix=Xe.unpack(D.texmodmatrix);let k=A.texturePackage[F];if(O(k)&&k.imageBuffer.byteLength>0){k.wrapS=L,k.wrapT=R;let U=new C2e(o,F,k);E.textures.push(U)}}}return f}function PDi(o,A){let f=new wi,m=new ee,C=o.vertexAttributes[0],y=C.componentsPerAttribute,x=O(o.nCompressOptions)&&(o.nCompressOptions&_1.SVC_Vertex)===_1.SVC_Vertex,v=1,E,I;x?(v=o.vertCompressConstant,E=new ee(o.minVerticesValue.x,o.minVerticesValue.y,o.minVerticesValue.z),I=new Uint16Array(C.typedArray.buffer,C.typedArray.byteOffset,C.typedArray.byteLength/2)):I=new Float32Array(C.typedArray.buffer,C.typedArray.byteOffset,C.typedArray.byteLength/4);let w=[];for(let Q=0;Q<o.verticesCount;Q++)ee.fromArray(I,y*Q,m),x&&(m=ee.multiplyByScalar(m,v,m),m=ee.add(m,E,m)),w.push(ee.clone(m));return wi.fromPoints(w,f),wi.transform(f,A,f),w.length=0,f}function RDi(o,A,f,m,C){let y={},x=m.geodes;for(let v=0,E=x.length;v<E;v++){let I=x[v],w=I.matrix,Q=Xe.multiply(o.modelMatrix,w,new Xe),M;O(C.boundingVolume)&&(M=new wi(C.boundingVolume.sphere.center,C.boundingVolume.sphere.radius),wi.transform(M,o.modelMatrix,M));let B=I.skeletonNames;for(let T=0,D=B.length;T<D;T++){let F=B[T],L=A.geoPackage[F],R=L.vertexPackage,k=L.arrIndexPackage,U=L.pickInfo,V;k.length>0&&(V=f[k[0].materialCode]);let H=O(M)?M:PDi(R,Q);y[F]=b2e[o.fileType]({layer:o,vertexPackage:R,arrIndexPackage:k,pickInfo:U,modelMatrix:Q,boundingVolume:H,material:V})}}if(!O(C.boundingVolume)){let v=[];for(let E in y)y.hasOwnProperty(E)&&v.push(y[E].boundingVolume);C.boundingVolume=wi.fromBoundingSpheres(v)}C.geoMap=y}function LDi(o,A,f){let m=A.groupNode,C=[];for(let y=0,x=m.pageLods.length;y<x;y++){let v={},E=m.pageLods[y];v.rangeMode=E.rangeMode,v.rangeDataList=E.childTile,v.rangeList=E.rangeList;let I=E.boundingSphere.center,w=E.boundingSphere.radius;v.rangeDataList!==""?v.boundingVolume={sphere:{center:new ee(I.x,I.y,I.z),radius:w}}:v.isLeafTile=!0,RDi(o,A,f,E,v),C.push(v)}return C}qst.parse=function(o,A){if(!O(A))return;let f=MDi(o.context,A);return LDi(o,A,f)};var Q2e=qst;function SO(){this._list=new qne,this._sentinel=this._list.add(),this._trimTiles=!1}SO.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)};SO.prototype.touch=function(o){let A=o.cacheNode;O(A)&&this._list.splice(this._sentinel,A)};SO.prototype.add=function(o){O(o.cacheNode)||(o.cacheNode=this._list.add(o))};SO.prototype.unloadTile=function(o,A,f){let m=A.cacheNode;!O(m)||(this._list.remove(m),A.cacheNode=void 0,f(o,A))};SO.prototype.unloadTiles=function(o,A){let f=this._trimTiles;this._trimTiles=!1;let m=this._list,C=o.maximumMemoryUsage*1024*1024,y=this._sentinel,x=m.head;for(;x!==y&&(o.totalMemoryUsageInBytes>C||f);){let v=x.item;x=x.next,v.isDestroyed()&&console.log(v),this.unloadTile(o,v,A)}};SO.prototype.trim=function(){this._trimTiles=!0};var S2e=SO,FDi={UNLOADED:0,LOADING:1,PARSING:2,READY:3,FAILED:4},yD=Object.freeze(FDi);function Xst(){this._stack=[]}function NDi(o,A,f){A.length=0;for(let m=0,C=o._rootTiles.length;m<C;m++){let y=o._rootTiles[m];y.updateVisibility(f),y.visible&&A.push(y)}}function kDi(o,A){return o.distanceToCamera-A.distanceToCamera}function ODi(o,A,f,m){let C,y=A.children,x=y.length;for(C=0;C<x;++C)y[C].updateVisibility(m);for(y.sort(kDi),C=0;C<x;++C){let v=y[C];v.visible&&f.push(v)}}function UDi(o,A,f){A.renderable&&(o._selectedTiles.push(A),A.selectedFrame=f.frameNumber)}function GDi(o,A,f){A.requestedFrame===f.frameNumber||A.contentState!==yD.UNLOADED||A.isLeafTile||(o._requestTiles.push(A),A.requestedFrame=f.frameNumber)}function HDi(o,A,f){A.touchedFrame!==f.frameNumber&&(o._cache.touch(A),A.touchedFrame=f.frameNumber)}function VDi(o,A,f){for(;A.length;){let m=A.pop();if(m.visible){if(HDi(o,m,f),m.canTraverse()){ODi(o,m,A,f);continue}UDi(o,m,f),GDi(o,m,f)}}}Xst.prototype.scheduler=function(o,A){o._requestTiles.length=0,o._selectedTiles.length=0;let f=this._stack;NDi(o,f,A),VDi(o,f,A)};var D2e=Xst,zDi=Eh(D7e(),1);function Zst(){}var m7e={SV_Unkown:0,SV_Standard:1,SV_Compressed:2};function KDi(o,A){let f=new Uint8Array(o,A);return zDi.default.inflate(f).buffer}function bH(o,A,f){let m=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let C=new Uint8Array(o,f,m),y=d2(C);return f+=m,{string:y,bytesOffset:f}}function YDi(o,A,f,m){let C={},y=[],x=new Array(16);for(let E=0;E<16;E++)x[E]=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT;C.matrix=x,C.skeletonNames=y;let v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let E=0;E<v;E++){let I=bH(o,A,f);y.push(I.string),f=I.bytesOffset}return m.push(C),f}function JDi(o,A,f,m){let C={};C.rangeList=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,C.rangeMode=A.getUint16(f,!0),f+=Uint16Array.BYTES_PER_ELEMENT;let y={};y.x=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT,y.y=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT,y.z=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT;let x=A.getFloat64(f,!0);f+=Float64Array.BYTES_PER_ELEMENT,C.boundingSphere={center:y,radius:x};let v=bH(o,A,f),E=v.string;f=v.bytesOffset;let I=E.indexOf("Geometry");if(I!==-1){let Q=E.substring(I);E=E.replace(Q,"")}C.childTile=E,C.geodes=[];let w=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let Q=0;Q<w;Q++)f=YDi(o,A,f,C.geodes);return m.push(C),f}function WDi(o,A,f,m){let C={},y=[],x=[],v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let E=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let w=0;w<E;w++)f=JDi(o,A,f,x);C.pageLods=x;let I=f%4;return I!==0&&(f+=4-I),m.groupNode=C,f}function $st(o,A,f,m){let C=A.getUint32(f,!0);if(m.verticesCount=C,f+=Uint32Array.BYTES_PER_ELEMENT,f<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);x=y*Float32Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;let v=C*y*Float32Array.BYTES_PER_ELEMENT,E=new Uint8Array(o,f,v);f+=v;let I=m.vertexAttributes,w=m.attrLocation;return w.aPosition=I.length,I.push({index:w.aPosition,typedArray:E,componentsPerAttribute:y,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function elt(o,A,f,m){let C=A.getUint32(f,!0);if(f+=Uint32Array.BYTES_PER_ELEMENT,C<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let v=C*y*Float32Array.BYTES_PER_ELEMENT,E=new Uint8Array(o,f,v);f+=v;let I=m.vertexAttributes,w=m.attrLocation;return w.aNormal=I.length,I.push({index:w.aNormal,typedArray:E,componentsPerAttribute:y,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function tlt(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=m.verticesCount,x;if(C>0){let I=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT*2;let w=C*Uint8Array.BYTES_PER_ELEMENT*4;x=new Uint8Array(o,f,w).slice(0,w),f+=w}else{x=new Uint8Array(4*y);for(let I=0;I<y;I++)x[I*4]=255,x[I*4+1]=255,x[I*4+2]=255,x[I*4+3]=255}let v=m.vertexAttributes,E=m.attrLocation;return E.aColor=v.length,v.push({index:E.aColor,typedArray:x,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:4,normalize:!0}),m.vertexColor=x,f}function ilt(o,A,f,m){let C=A.getUint32(f,!0);if(f+=Uint32Array.BYTES_PER_ELEMENT,C<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT*2;let x=C*Uint8Array.BYTES_PER_ELEMENT*4,v=new Uint8Array(o,f,x);f+=x;let E=m.vertexAttributes,I=m.attrLocation;return I.aSecondColor=E.length,E.push({index:I.aSecondColor,typedArray:v,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:4,normalize:!0}),f}function rlt(o,A,f,m){let C=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;for(let y=0;y<C;y++){let x=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let v=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let E=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let I=x*v*Float32Array.BYTES_PER_ELEMENT,w=new Uint8Array(o,f,I);f+=I;let Q="aTexCoord"+y,M=m.vertexAttributes,B=m.attrLocation;B[Q]=M.length,M.push({index:B[Q],typedArray:w,componentsPerAttribute:v,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:v*Float32Array.BYTES_PER_ELEMENT,normalize:!1})}return f}function nlt(o,A,f,m){let C=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;let y=m.vertexAttributes,x=m.attrLocation;for(let v=0;v<C;v++){let E=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let I=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let w=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let Q=E*I*Float32Array.BYTES_PER_ELEMENT;if(I===17||I===29){let M=new Uint8Array(o,f,Q);m.instanceCount=E,m.instanceMode=I,m.instanceBuffer=M,m.instanceIndex=1;let B=I*E*4,T=M.slice(0,B);m.vertexColorInstance=T;let D;I===17?(D=Float32Array.BYTES_PER_ELEMENT*17,x.uv2=y.length,y.push({index:x.uv2,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:D,instanceDivisor:1}),x.uv3=y.length,y.push({index:x.uv3,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv4=y.length,y.push({index:x.uv4,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv5=y.length,y.push({index:x.uv5,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv6=y.length,y.push({index:x.uv6,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1})):I===29&&(D=Float32Array.BYTES_PER_ELEMENT*29,x.uv1=y.length,y.push({index:x.uv1,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:D,instanceDivisor:1,byteLength:Q}),x.uv2=y.length,y.push({index:x.uv2,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv3=y.length,y.push({index:x.uv3,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv4=y.length,y.push({index:x.uv4,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv5=y.length,y.push({index:x.uv5,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv6=y.length,y.push({index:x.uv6,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:20*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv7=y.length,y.push({index:x.uv7,componentsPerAttribute:3,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:24*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv8=y.length,y.push({index:x.uv8,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,offsetInBytes:27*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv9=y.length,y.push({index:x.uv9,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,offsetInBytes:28*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}))}else{let M=E*I;m.instanceBounds=new Float32Array(M);for(let B=0;B<M;B++)m.instanceBounds[B]=A.getFloat32(f,!0)}f+=Q}return f}function jDi(o,A,f,m){let C=A.getUint32(f,!0);if(m.verticesCount=C,f+=Uint32Array.BYTES_PER_ELEMENT,f<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);x=y*Int16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;let v=A.getFloat32(f,!0);f+=Float32Array.BYTES_PER_ELEMENT;let E={};E.x=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,E.y=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,E.z=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,E.w=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,m.vertCompressConstant=v,m.minVerticesValue=E;let I=C*y*Int16Array.BYTES_PER_ELEMENT,w=new Uint8Array(o,f,I);f+=I;let Q=m.vertexAttributes,M=m.attrLocation;return M.aPosition=Q.length,Q.push({index:M.aPosition,typedArray:w,componentsPerAttribute:y,componentDatatype:ei.SHORT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function qDi(o,A,f,m){let C=A.getUint32(f,!0);if(f+=Uint32Array.BYTES_PER_ELEMENT,C<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let v=C*2*Int16Array.BYTES_PER_ELEMENT,E=new Uint8Array(o,f,v);f+=v;let I=m.vertexAttributes,w=m.attrLocation;return w.aNormal=I.length,I.push({index:w.aNormal,typedArray:E,componentsPerAttribute:2,componentDatatype:ei.SHORT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function XDi(o,A,f,m){m.texCoordCompressConstant=[],m.minTexCoordValue=[];let C=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;for(let y=0;y<C;y++){let x=A.getUint8(f,!0);f+=Uint8Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT*3;let v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let E=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let I=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let w=A.getFloat32(f,!0);f+=Float32Array.BYTES_PER_ELEMENT,m.texCoordCompressConstant.push(w);let Q={};Q.x=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,Q.y=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,Q.z=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,Q.w=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,m.minTexCoordValue.push(Q);let M=v*E*Int16Array.BYTES_PER_ELEMENT,B=new Uint8Array(o,f,M);f+=M;let T=f%4;T!==0&&(f+=4-T);let D="aTexCoord"+y,F=m.vertexAttributes,L=m.attrLocation;if(L[D]=F.length,F.push({index:L[D],typedArray:B,componentsPerAttribute:E,componentDatatype:ei.SHORT,offsetInBytes:0,strideInBytes:E*Int16Array.BYTES_PER_ELEMENT,normalize:!1}),x){M=v*Float32Array.BYTES_PER_ELEMENT;let R=new Uint8Array(o,f,M);f+=M,m.texCoordZMatrix=!0,D="aTexCoordZ"+y,L[D]=F.length,F.push({index:L[D],typedArray:R,componentsPerAttribute:1,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:Float32Array.BYTES_PER_ELEMENT,normalize:!1})}}return f}function ZDi(o,A,f,m){return f=$st(o,A,f,m),f=elt(o,A,f,m),f=tlt(o,A,f,m),f=ilt(o,A,f,m),f=rlt(o,A,f,m),f=nlt(o,A,f,m),f}function $Di(o,A,f,m){let C=A.getUint32(f,!0);return m.compressOptions=C,f+=Uint32Array.BYTES_PER_ELEMENT,(C&_1.SVC_Vertex)===_1.SVC_Vertex?f=jDi(o,A,f,m):f=$st(o,A,f,m),(C&_1.SVC_Normal)===_1.SVC_Normal?f=qDi(o,A,f,m):f=elt(o,A,f,m),f=tlt(o,A,f,m),f=ilt(o,A,f,m),(C&_1.SVC_TexutreCoord)===_1.SVC_TexutreCoord?f=XDi(o,A,f,m):f=rlt(o,A,f,m),(C&_1.SVC_TexutreCoordIsW)===_1.SVC_TexutreCoordIsW&&(m.textureCoordIsW=!0),f=nlt(o,A,f,m),f}function e2i(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let y=0;y<C;y++){let x={},v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let E=A.getUint8(f,!0);f+=Uint8Array.BYTES_PER_ELEMENT;let I=A.getUint8(f,!0);f+=Uint8Array.BYTES_PER_ELEMENT;let w=A.getUint8(f,!0);if(f+=Uint8Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT,v>0){let B=null,T;E===1||E===3?(T=v*Uint32Array.BYTES_PER_ELEMENT,B=new Uint8Array(o,f,T)):(T=v*Uint16Array.BYTES_PER_ELEMENT,B=new Uint8Array(o,f,T),v%2!==0&&(T+=2)),x.indicesTypedArray=B,f+=T}x.indicesCount=v,x.indexType=E,x.primitiveType=w;let Q=[],M=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let B=0;B<M;B++){let T=bH(o,A,f),D=T.string;f=T.bytesOffset,Q.push(D),x.materialCode=D}if(f%4!==0){let B=4-f%4;f+=B}m.push(x)}return f}function t2i(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let v=0;v<y;v++){let E=bH(o,A,f),I=E.string;f=E.bytesOffset;let w=f%4;w!==0&&(f+=4-w);let Q=A.getUint32(f,!0);f+=Int32Array.BYTES_PER_ELEMENT;let M={vertexAttributes:[],attrLocation:{},instanceCount:0,instanceMode:0,instanceIndex:-1};Q===m7e.SV_Standard?f=ZDi(o,A,f,M):Q===m7e.SV_Compressed&&(f=$Di(o,A,f,M));let B=[];f=e2i(o,A,f,B),m[I]={vertexPackage:M,arrIndexPackage:B}}let x=A.getUint32(f,!0);return f+=x,f+=Uint32Array.BYTES_PER_ELEMENT,f}function i2i(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let x=0;x<y;x++){let v=bH(o,A,f),E=v.string;f=v.bytesOffset;let I=f%4;I!==0&&(f+=4-I);let w=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let Q=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let M=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let B=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let T=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let D=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let F=new Uint8Array(o,f,T);f+=T,m[E]={id:E,width:Q,height:M,compressType:B,nFormat:D,internalFormat:Gn.RGBA_DXT5,imageBuffer:F}}return f}function r2i(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=new Uint8Array(o,f,C),x=d2(y);return f+=C,m.materials=JSON.parse(x),f}function n2i(o,A,f,m,C){if((m&1)===1){let y=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let x=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let v=0;v<x;v++){let E=bH(o,A,f),I=E.string;f=E.bytesOffset;let w=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let Q={};C[I].pickInfo=Q;let M=C[I].vertexPackage.instanceIndex;for(let B=0;B<w;B++){let T=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let D=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let F=[];for(let L=0;L<D;L++){let R=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let k=1;M===-1&&(k=A.getUint32(f,!0),f+=Uint32Array.BYTES_PER_ELEMENT),F.push({vertexColorOffset:R,vertexColorCount:k})}Q[T]=F}}}return f}Zst.parseBuffer=function(o){let A=0,f={version:void 0,groupNode:void 0,geoPackage:{},matrials:void 0,texturePackage:{}},m=new DataView(o);f.version=m.getFloat32(A,!0),A+=Float32Array.BYTES_PER_ELEMENT;let C=m.getUint32(A,!0);A+=Uint32Array.BYTES_PER_ELEMENT;let y=KDi(o,A);m=new DataView(y),A=0;let x=m.getUint32(A,!0);return A+=Uint32Array.BYTES_PER_ELEMENT,A=WDi(y,m,A,f),A=t2i(y,m,A,f.geoPackage),A=i2i(y,m,A,f.texturePackage),A=r2i(y,m,A,f),n2i(y,m,A,x,f.geoPackage),f};var T2e=Zst;function AI(o,A,f,m,C,y,x){this.layer=o,this.parent=A,this.fileName=m,this.isLeafTile=Ae(x,!1),this.boundingVolume=this.createBoundingVolume(f,o.modelMatrix);let v=An.createIfNeeded(o._baseResource);if(O(A))this.baseUri=A.baseUri;else{let E=new An(m);this.baseUri=E.getBaseUri()}this.contentResource=v.getDerivedResource({url:m}),this.serverKey=V1.getServerKey(this.contentResource.getUrlComponent()),this.request=void 0,this.cacheNode=void 0,this.distanceToCamera=0,this.pixel=0,this.visibilityPlaneMask=0,this.visible=!1,this.children=[],this.lodRangeData=C,this.renderEntityMap=y,this.contentState=yD.UNLOADED,this.readerable=!1,this.touchedFrame=0,this.requestedFrame=0,this.selectedFrame=0,this.priority=0}Object.defineProperties(AI.prototype,{renderable:{get:function(){return O(this.renderEntityMap)}}});var olt=new ee;function o2i(o,A){let f=ee.clone(o.center),m=o.radius;f=Xe.multiplyByPoint(A,f,f);let C=Xe.getScale(A,olt),y=ee.maximumComponent(C);return m*=y,new yP(f,m)}function a2i(o,A){let f=new ee(o.min.x,o.min.y,o.min.z);Xe.multiplyByPoint(A,f,f);let m=new ee(o.max.x,o.max.y,o.max.z);Xe.multiplyByPoint(A,m,m);let C=wi.fromCornerPoints(f,m,new wi),y=C.center,x=C.radius,v=Xe.getScale(A,olt),E=ee.maximumComponent(v);return x*=E,new yP(y,x)}AI.prototype.createBoundingVolume=function(o,A){if(this.isLeafTile)return new yP(o.center,o.radius);if(O(o.sphere))return o2i(o.sphere,A);if(O(o.box))return a2i(o.box,A)};AI.prototype.canTraverse=function(){return this.children.length===0||this.isLeafTile?!1:O(this.lodRangeData)?this.pixel>this.lodRangeData:!0};function alt(o,A){return o.boundingVolume}AI.prototype.getPixel=function(o){let A=this.boundingVolume,f=A.radius,m=A.center,C=ee.distance(o.camera.positionWC,m),y=o.context.drawingBufferHeight,x=o.camera.frustum._fovy*.5;return y*.5/Math.tan(x)*f/C};AI.prototype.distanceToTile=function(o){return alt(this,o).distanceToCamera(o)};AI.prototype.visibility=function(o,A){let f=alt(this,o);return o.cullingVolume.computeVisibilityWithPlaneMask(f,A)};AI.prototype.updateVisibility=function(o){let A=this.parent,f=O(A)?A.visibilityPlaneMask:AC.MASK_INDETERMINATE;this.distanceToCamera=this.distanceToTile(o),this.pixel=this.getPixel(o),this.visibilityPlaneMask=this.visibility(o,f),this.visible=this.visibilityPlaneMask!==AC.MASK_OUTSIDE};function s2i(o){return function(){return o.priority}}function l2i(o){return function(A){o.contentState=yD.FAILED,o.contentReadyPromise.reject(A)}}function u2i(o,A){let f=o.layer,m=A.length;for(let C=0;C<m;C++){let y=A[C],x=y.boundingVolume,v=y.rangeDataList;v=o.baseUri+v;let E=y.rangeList,I=y.geoMap,w=new AI(f,o,x,v,E,I,y.isLeafTile);o.children.push(w),o.layer._cache.add(w)}}AI.prototype.requestContent=function(){let o=this,A=this.layer,f=this.contentResource.clone(),m=new cC({throttle:!0,throttleByServer:!0,type:oB.TILES3D,priorityFunction:s2i(this),serverKey:this.serverKey});this.request=m,f.request=m;let C=f.fetchArrayBuffer();if(!O(C))return!1;this.contentState=yD.LOADING,this.contentReadyPromise=rA();let y=l2i(this);return C.then(function(x){if(o.isDestroyed()){y();return}let v=T2e.parseBuffer(x),E=Q2e.parse(o.layer,v);u2i(o,E),o.selectedFrame=0,o.contentState=yD.READY,o.contentReadyPromise.resolve(v)}).catch(function(x){if(m.state===yA.CANCELLED){o.contentState=yD.UNLOADED;return}o.contentState=yD.FAILED}),!0};AI.prototype.update=function(o){let A=this.renderEntityMap;for(let f in A)A.hasOwnProperty(f)&&A[f].update(o)};AI.prototype.free=function(){for(let o=0,A=this.children.length;o<A;o++)this.children[o].destroy();this.children.length=0,this.contentState=yD.UNLOADED};AI.prototype.isDestroyed=function(){return!1};AI.prototype.destroy=function(){for(let o in this.renderEntityMap)this.renderEntityMap.hasOwnProperty(o)&&this.renderEntityMap[o].destroy();this.renderEntityMap=void 0;for(let o=0,A=this.children.length;o<A;o++)this.children[o].destroy();return this.children.length=0,Qr(this)};var M2e=AI;function gW(o){o=Ae(o,Ae.EMPTY_OBJECT),of.defined("options.url",o.url),of.defined("options.context",o.context),this.context=o.context,this._url=void 0,this._basePath=void 0,this._baseResource=void 0,this.modelMatrix=void 0,this.fileType=void 0,this._position=void 0,this._rectangle=void 0,this._rootTiles=[],this._schuduler=new D2e,this._requestTiles=[],this._selectedTiles=[],this._cache=new S2e,this._maximumMemoryUsage=-1,this._totalMemoryUsageInBytes=0,this.loadConfig(o.url)}Object.defineProperties(gW.prototype,{ready:{get:function(){return this._rootTiles.length>0}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){return this._rectangle}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes},set:function(o){this._totalMemoryUsageInBytes=o}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(o){this._maximumMemoryUsage=o}}});gW.prototype.loadConfig=function(o){let A=this;this._readyPromise=Promise.resolve(o).then(function(f){let m,C=An.createIfNeeded(f);return m=C.getBaseUri(!0),A._url=C.url,A._basePath=m,A._baseResource=C,C.fetchJson()}).then(function(f){let m=f.extensions;A.fileType=m["s3m:FileType"];let C=f.position.x,y=f.position.y,x=f.position.z;A._position=ee.fromDegrees(C,y,x),A.modelMatrix=Vn.eastNorthUpToFixedFrame(A._position),A._rectangle=Si.fromDegrees(f.geoBounds.left,f.geoBounds.bottom,f.geoBounds.right,f.geoBounds.top);for(let v=0,E=f.tiles.length;v<E;v++){let I=f.tiles[v].url,w={box:f.tiles[v].boundingbox},Q=new M2e(A,void 0,w,I);A._cache.add(Q),A._rootTiles.push(Q)}return A}).catch(function(f){return f})};function c2i(o,A){return o.priority-A.priority}function A2i(o){let A=o._requestTiles,f=A.length;A.sort(c2i);for(let m=0;m<f;++m)A[m].requestContent()}function h2i(o,A){let f=o._selectedTiles,m=f.length;for(let C=0;C<m;C++)f[C].update(A)}function d2i(o,A){}function f2i(o){o._cache.unloadTiles(o,d2i)}gW.prototype.prePassesUpdate=function(o){!this.ready||o.newFrame&&this._cache.reset()};gW.prototype.update=function(o){!this.ready||(this._schuduler.scheduler(this,o),A2i(this),h2i(this,o),f2i(this))};var Eae=gW;function qK(o,A,f){let m=A[o.id];if(O(m)){let C=m.primitive;f.remove(C),C.isDestroyed()||C.destroy(),delete A[o.id]}}var Iae=`attribute vec4 position;
        `}),k=new CC({name:`${A}Composite`,stages:[L,R],inputPreviousStageTexture:!1});function U(V){Object.defineProperties(V,{showGlow:{get(){return I},set(H){I=H}},edgeGlow:{get(){return w},set(H){w=H}},edgeStrength:{get(){return Q},set(H){Q=H}},thresholdAngle:{get(){return m},set(H){m=H}},showOutlineOnly:{get(){return y},set(H){y=H}},edgeOnly:{get(){return M},set(H){M=H}},useSingleColor:{get(){return C},set(H){C=H}},outlineWidth:{get(){return f},set(H){f=H}},visibleEdgeColor:{get(){return x},set(H){x=H}},hiddenEdgeColor:{get(){return v},set(H){v=H}}})}return U(k),k._uniforms=k._uniforms||{},U(k._uniforms),k}function jK(o,A,f){let m=A[o.id];if(O(m)){let C=m.primitive;f.remove(C),C.isDestroyed()||C.destroy(),delete A[o.id]}}var pae=`attribute vec4 position;
attribute vec3 normal;
varying vec3 v_position;
varying vec3 v_positionWC;
@@ -14899,7 +14839,7 @@
    v_positionEC = (czm_modelView * position).xyz;
    v_normalEC = czm_normal * normal;
}
`,Qie=`#ifdef GL_OES_standard_derivatives
`,xie=`#ifdef GL_OES_standard_derivatives
    #extension GL_OES_standard_derivatives : enable
#endif
uniform bool u_showIntersection;
@@ -15010,7 +14950,7 @@
*/
    gl_FragColor = shade(isOnEllipsoid);
}
`,XK=`uniform vec4 u_intersectionColor;
`,qK=`uniform vec4 u_intersectionColor;
uniform float u_intersectionWidth;
uniform vec4 u_lineColor;
bool inSensorShadow(vec3 coneVertexWC, vec3 pointWC)
@@ -15048,7 +14988,7 @@
    s = s - floor(s);
    return vec2(s, t);
}
`,P2e=`#ifdef GL_OES_standard_derivatives
`,JDe=`#ifdef GL_OES_standard_derivatives
    #extension GL_OES_standard_derivatives : enable
#endif
uniform bool u_showIntersection;
@@ -15150,7 +15090,13 @@
    bool isOnEllipsoid = isOnBoundary(ellipsoidValue, czm_epsilon3);
    gl_FragColor = shade(isOnEllipsoid);
}
`,C7e=Math.sin,EG=Math.cos,Sie=Math.tan,Die=Math.atan,WD={position:0,normal:1};function slt(o){let A=this;o=Ae(o,Ae.EMPTY_OBJECT),this.show=Ae(o.show,!0),this.slice=Ae(o.slice,32),this.modelMatrix=Xe.clone(o.modelMatrix,new Xe),this._modelMatrix=new Xe,this._computedModelMatrix=new Xe,this._computedScanPlaneModelMatrix=new Xe,this.radius=Ae(o.radius,Number.POSITIVE_INFINITY),this._radius=void 0,this.xHalfAngle=Ae(o.xHalfAngle,0),this._xHalfAngle=void 0,this.yHalfAngle=Ae(o.yHalfAngle,0),this._yHalfAngle=void 0,this.lineColor=Ae(o.lineColor,At.WHITE),this.showSectorLines=Ae(o.showSectorLines,!0),this.showSectorSegmentLines=Ae(o.showSectorSegmentLines,!0),this.showLateralSurfaces=Ae(o.showLateralSurfaces,!0),this.material=O(o.material)?o.material:ss.fromType(ss.ColorType),this._material=void 0,this._translucent=void 0,this.lateralSurfaceMaterial=O(o.lateralSurfaceMaterial)?o.lateralSurfaceMaterial:ss.fromType(ss.ColorType),this._lateralSurfaceMaterial=void 0,this._lateralSurfaceTranslucent=void 0,this.showDomeSurfaces=Ae(o.showDomeSurfaces,!0),this.domeSurfaceMaterial=O(o.domeSurfaceMaterial)?o.domeSurfaceMaterial:ss.fromType(ss.ColorType),this._domeSurfaceMaterial=void 0,this.showDomeLines=Ae(o.showDomeLines,!0),this.showIntersection=Ae(o.showIntersection,!0),this.intersectionColor=Ae(o.intersectionColor,At.WHITE),this.intersectionWidth=Ae(o.intersectionWidth,5),this.showThroughEllipsoid=Ae(o.showThroughEllipsoid,!1),this._showThroughEllipsoid=void 0,this.showScanPlane=Ae(o.showScanPlane,!0),this.scanPlaneColor=Ae(o.scanPlaneColor,At.WHITE),this.scanPlaneMode=Ae(o.scanPlaneMode,"horizontal"),this.scanPlaneRate=Ae(o.scanPlaneRate,10),this._scanePlaneXHalfAngle=0,this._scanePlaneYHalfAngle=0,this._time=fi.now(),this._boundingSphere=new wi,this._boundingSphereWC=new wi,this._sectorFrontCommand=new On({owner:this,primitiveType:yn.TRIANGLES,boundingVolume:this._boundingSphereWC}),this._sectorBackCommand=new On({owner:this,primitiveType:yn.TRIANGLES,boundingVolume:this._boundingSphereWC}),this._sectorVA=void 0,this._sectorLineCommand=new On({owner:this,primitiveType:yn.LINES,boundingVolume:this._boundingSphereWC}),this._sectorLineVA=void 0,this._sectorSegmentLineCommand=new On({owner:this,primitiveType:yn.LINES,boundingVolume:this._boundingSphereWC}),this._sectorSegmentLineVA=void 0,this._domeFrontCommand=new On({owner:this,primitiveType:yn.TRIANGLES,boundingVolume:this._boundingSphereWC}),this._domeBackCommand=new On({owner:this,primitiveType:yn.TRIANGLES,boundingVolume:this._boundingSphereWC}),this._domeVA=void 0,this._domeLineCommand=new On({owner:this,primitiveType:yn.LINES,boundingVolume:this._boundingSphereWC}),this._domeLineVA=void 0,this._scanPlaneFrontCommand=new On({owner:this,primitiveType:yn.TRIANGLES,boundingVolume:this._boundingSphereWC}),this._scanPlaneBackCommand=new On({owner:this,primitiveType:yn.TRIANGLES,boundingVolume:this._boundingSphereWC}),this._scanRadialCommand=void 0,this._colorCommands=[],this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._uniforms={u_type:function(){return 0},u_xHalfAngle:function(){return A.xHalfAngle},u_yHalfAngle:function(){return A.yHalfAngle},u_radius:function(){return A.radius},u_showThroughEllipsoid:function(){return A.showThroughEllipsoid},u_showIntersection:function(){return A.showIntersection},u_intersectionColor:function(){return A.intersectionColor},u_intersectionWidth:function(){return A.intersectionWidth},u_normalDirection:function(){return 1},u_lineColor:function(){return A.lineColor}},this._scanUniforms={u_xHalfAngle:function(){return A._scanePlaneXHalfAngle},u_yHalfAngle:function(){return A._scanePlaneYHalfAngle},u_radius:function(){return A.radius},u_color:function(){return A.scanPlaneColor},u_showThroughEllipsoid:function(){return A.showThroughEllipsoid},u_showIntersection:function(){return A.showIntersection},u_intersectionColor:function(){return A.intersectionColor},u_intersectionWidth:function(){return A.intersectionWidth},u_normalDirection:function(){return 1},u_lineColor:function(){return A.lineColor}}}slt.prototype.update=function(o){let A=o.mode;if(!this.show||A!==xi.SCENE3D)return;let f=!1,m=!1,C=!1,y=this.xHalfAngle,x=this.yHalfAngle;if(y<0||x<0)throw new Ui("halfAngle must be greater than or equal to zero.");if(y===0||x===0)return;(this._xHalfAngle!==y||this._yHalfAngle!==x)&&(this._xHalfAngle=y,this._yHalfAngle=x,f=!0);let v=this.radius;if(v<0)throw new Ui("this.radius must be greater than or equal to zero.");let E=!1;this._radius!==v&&(E=!0,this._radius=v,this._boundingSphere=new wi(ee.ZERO,this.radius)),(!Xe.equals(this.modelMatrix,this._modelMatrix)||E)&&(Xe.clone(this.modelMatrix,this._modelMatrix),Xe.multiplyByUniformScale(this.modelMatrix,this.radius,this._computedModelMatrix),wi.transform(this._boundingSphere,this.modelMatrix,this._boundingSphereWC));let I=this.showThroughEllipsoid;this._showThroughEllipsoid!==this.showThroughEllipsoid&&(this._showThroughEllipsoid=I,m=!0);let w=this.material;this._material!==w&&(this._material=w,m=!0,C=!0);let Q=w.isTranslucent();if(this._translucent!==Q&&(this._translucent=Q,m=!0),this.showScanPlane){let D=o.time,F=fi.secondsDifference(D,this._time);F<0&&(this._time=fi.clone(D,this._time));let L=Math.max(F%this.scanPlaneRate/this.scanPlaneRate,0),R;if(this.scanPlaneMode==="horizontal"){R=2*x*L-x;let k=EG(R),U=Sie(y),V=Die(k*U);this._scanePlaneXHalfAngle=V,this._scanePlaneYHalfAngle=R,ci.fromRotationX(this._scanePlaneYHalfAngle,kk)}else{R=2*y*L-y;let k=Sie(x),U=EG(R),V=Die(U*k);this._scanePlaneXHalfAngle=R,this._scanePlaneYHalfAngle=V,ci.fromRotationY(this._scanePlaneXHalfAngle,kk)}Xe.multiplyByMatrix3(this.modelMatrix,kk,this._computedScanPlaneModelMatrix),Xe.multiplyByUniformScale(this._computedScanPlaneModelMatrix,this.radius,this._computedScanPlaneModelMatrix)}f&&v2i(this,o),m&&B2i(this,I,Q),C&&_2i(this,o,w),(m||C)&&w2i(this,Q);let M=o.commandList,B=o.passes,T=this._colorCommands;if(B.render)for(let D=0,F=T.length;D<F;D++){let L=T[D];M.push(L)}};var kk=new ci,y7e=new ee;function gpe(o,A,f){let m=o.slice,C=EG(f),y=Sie(f),x=EG(A),v=Sie(A),E=Die(x*y),I=Die(C*v),w=[];for(let M=0;M<m;M++){let B=2*E*M/(m-1)-E;w.push(new ee(0,C7e(B),EG(B)))}let Q=[];for(let M=0;M<m;M++){let B=2*I*M/(m-1)-I;Q.push(new ee(C7e(B),0,EG(B)))}return{zoy:w,zox:Q}}function g2i(o,A){let f=o.xHalfAngle,m=o.yHalfAngle,C=A.zoy,y=A.zox,x=[],v=ci.fromRotationY(f,kk);return x.push(C.map(function(E){return ci.multiplyByVector(v,E,new ee)})),v=ci.fromRotationX(-m,kk),x.push(y.map(function(E){return ci.multiplyByVector(v,E,new ee)}).reverse()),v=ci.fromRotationY(-f,kk),x.push(C.map(function(E){return ci.multiplyByVector(v,E,new ee)}).reverse()),v=ci.fromRotationX(m,kk),x.push(y.map(function(E){return ci.multiplyByVector(v,E,new ee)})),x}function p2i(o,A){let f=Array.prototype.concat.apply([],A).length-A.length,m=new Float32Array(2*3*3*f),C=0;for(let E=0,I=A.length;E<I;E++){let w=A[E],Q=ee.normalize(ee.cross(w[0],w[w.length-1],y7e),y7e);for(let M=0,B=w.length-1;M<B;M++)m[C++]=0,m[C++]=0,m[C++]=0,m[C++]=-Q.x,m[C++]=-Q.y,m[C++]=-Q.z,m[C++]=w[M].x,m[C++]=w[M].y,m[C++]=w[M].z,m[C++]=-Q.x,m[C++]=-Q.y,m[C++]=-Q.z,m[C++]=w[M+1].x,m[C++]=w[M+1].y,m[C++]=w[M+1].z,m[C++]=-Q.x,m[C++]=-Q.y,m[C++]=-Q.z}let y=vo.createVertexBuffer({context:o,typedArray:m,usage:ln.STATIC_DRAW}),x=2*3*Float32Array.BYTES_PER_ELEMENT,v=[{index:WD.position,vertexBuffer:y,componentsPerAttribute:3,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x},{index:WD.normal,vertexBuffer:y,componentsPerAttribute:3,componentDatatype:ei.FLOAT,offsetInBytes:3*Float32Array.BYTES_PER_ELEMENT,strideInBytes:x}];return new Vc({context:o,attributes:v})}function m2i(o,A){let f=A.length,m=new Float32Array(3*3*f),C=0;for(let E=0,I=A.length;E<I;E++){let w=A[E];m[C++]=0,m[C++]=0,m[C++]=0,m[C++]=w[0].x,m[C++]=w[0].y,m[C++]=w[0].z}let y=vo.createVertexBuffer({context:o,typedArray:m,usage:ln.STATIC_DRAW}),x=3*Float32Array.BYTES_PER_ELEMENT,v=[{index:WD.position,vertexBuffer:y,componentsPerAttribute:3,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x}];return new Vc({context:o,attributes:v})}function C2i(o,A){let f=Array.prototype.concat.apply([],A).length-A.length,m=new Float32Array(3*3*f),C=0;for(let E=0,I=A.length;E<I;E++){let w=A[E];for(let Q=0,M=w.length-1;Q<M;Q++)m[C++]=w[Q].x,m[C++]=w[Q].y,m[C++]=w[Q].z,m[C++]=w[Q+1].x,m[C++]=w[Q+1].y,m[C++]=w[Q+1].z}let y=vo.createVertexBuffer({context:o,typedArray:m,usage:ln.STATIC_DRAW}),x=3*Float32Array.BYTES_PER_ELEMENT,v=[{index:WD.position,vertexBuffer:y,componentsPerAttribute:3,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x}];return new Vc({context:o,attributes:v})}function y2i(o){let A=gC.createGeometry(new gC({vertexFormat:Wr.POSITION_ONLY,stackPartitions:32,slicePartitions:32}));return Vc.fromGeometry({context:o,geometry:A,attributeLocations:WD,bufferUsage:ln.STATIC_DRAW,interleave:!1})}function x2i(o){let A=J1.createGeometry(new J1({vertexFormat:Wr.POSITION_ONLY,stackPartitions:32,slicePartitions:32}));return Vc.fromGeometry({context:o,geometry:A,attributeLocations:WD,bufferUsage:ln.STATIC_DRAW,interleave:!1})}function x7e(o,A){let f=A.length-1,m=new Float32Array(3*3*f),C=0;for(let E=0;E<f;E++)m[C++]=0,m[C++]=0,m[C++]=0,m[C++]=A[E].x,m[C++]=A[E].y,m[C++]=A[E].z,m[C++]=A[E+1].x,m[C++]=A[E+1].y,m[C++]=A[E+1].z;let y=vo.createVertexBuffer({context:o,typedArray:m,usage:ln.STATIC_DRAW}),x=3*Float32Array.BYTES_PER_ELEMENT,v=[{index:WD.position,vertexBuffer:y,componentsPerAttribute:3,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x}];return new Vc({context:o,attributes:v})}function v2i(o,A){let f=A.context,m=gpe(o,o.xHalfAngle,o.yHalfAngle),C=g2i(o,m);if(o.showLateralSurfaces&&(o._sectorVA=p2i(f,C)),o.showSectorLines&&(o._sectorLineVA=m2i(f,C)),o.showSectorSegmentLines&&(o._sectorSegmentLineVA=C2i(f,C)),o.showDomeSurfaces&&(o._domeVA=y2i(f)),o.showDomeLines&&(o._domeLineVA=x2i(f)),o.showScanPlane)if(o.scanPlaneMode==="horizontal"){let y=gpe(o,je.PI_OVER_TWO,0);o._scanPlaneVA=x7e(f,y.zox)}else{let y=gpe(o,0,je.PI_OVER_TWO);o._scanPlaneVA=x7e(f,y.zoy)}}function E2i(o,A,f){let m=A.context,C=Iae,y=new Fr({sources:[XK,f.shaderSource,Qie]});o._sp=_s.replaceCache({context:m,shaderProgram:o._sp,vertexShaderSource:C,fragmentShaderSource:y,attributeLocations:WD});let x=new Fr({sources:[XK,f.shaderSource,Qie],pickColorQualifier:"uniform"});o._pickSP=_s.replaceCache({context:m,shaderProgram:o._pickSP,vertexShaderSource:C,fragmentShaderSource:x,attributeLocations:WD})}function I2i(o,A,f){let m=A.context,C=Iae,y=new Fr({sources:[XK,f.shaderSource,P2e]});o._scanePlaneSP=_s.replaceCache({context:m,shaderProgram:o._scanePlaneSP,vertexShaderSource:C,fragmentShaderSource:y,attributeLocations:WD})}function _2i(o,A,f){E2i(o,A,f),o.showScanPlane&&I2i(o,A,f)}function B2i(o,A,f){f?(o._frontFaceRS=fn.fromCache({depthTest:{enabled:!A},depthMask:!1,blending:Bu.ALPHA_BLEND,cull:{enabled:!0,face:CA.BACK}}),o._backFaceRS=fn.fromCache({depthTest:{enabled:!A},depthMask:!1,blending:Bu.ALPHA_BLEND,cull:{enabled:!0,face:CA.FRONT}}),o._pickRS=fn.fromCache({depthTest:{enabled:!A},depthMask:!1,blending:Bu.ALPHA_BLEND})):(o._frontFaceRS=fn.fromCache({depthTest:{enabled:!A},depthMask:!0}),o._pickRS=fn.fromCache({depthTest:{enabled:!0},depthMask:!0}))}function YU(o,A,f,m,C,y,x,v,E,I,w,Q){I&&f&&(f.vertexArray=x,f.renderState=C,f.shaderProgram=y,f.uniformMap=ia(v,o._material._uniforms),f.uniformMap.u_normalDirection=function(){return-1},f.pass=w,f.modelMatrix=E,o._colorCommands.push(f)),A.vertexArray=x,A.renderState=m,A.shaderProgram=y,A.uniformMap=ia(v,o._material._uniforms),Q&&(A.uniformMap.u_type=function(){return 1}),A.pass=w,A.modelMatrix=E,o._colorCommands.push(A)}function w2i(o,A){o._colorCommands.length=0;let f=A?hr.TRANSLUCENT:hr.OPAQUE;o.showLateralSurfaces&&YU(o,o._sectorFrontCommand,o._sectorBackCommand,o._frontFaceRS,o._backFaceRS,o._sp,o._sectorVA,o._uniforms,o._computedModelMatrix,A,f),o.showSectorLines&&YU(o,o._sectorLineCommand,void 0,o._frontFaceRS,o._backFaceRS,o._sp,o._sectorLineVA,o._uniforms,o._computedModelMatrix,A,f,!0),o.showSectorSegmentLines&&YU(o,o._sectorSegmentLineCommand,void 0,o._frontFaceRS,o._backFaceRS,o._sp,o._sectorSegmentLineVA,o._uniforms,o._computedModelMatrix,A,f,!0),o.showDomeSurfaces&&YU(o,o._domeFrontCommand,o._domeBackCommand,o._frontFaceRS,o._backFaceRS,o._sp,o._domeVA,o._uniforms,o._computedModelMatrix,A,f),o.showDomeLines&&YU(o,o._domeLineCommand,void 0,o._frontFaceRS,o._backFaceRS,o._sp,o._domeLineVA,o._uniforms,o._computedModelMatrix,A,f,!0),o.showScanPlane&&YU(o,o._scanPlaneFrontCommand,o._scanPlaneBackCommand,o._frontFaceRS,o._backFaceRS,o._scanePlaneSP,o._scanPlaneVA,o._scanUniforms,o._computedScanPlaneModelMatrix,A,f)}var R2e=slt,v7e=new ci,b2i=new ee,Q2i=new ee,S2i=new jr,E7e=new ee,D2i=new jr,QH=function(o,A){if(!O(o))throw new Ui("scene is required.");if(!O(A))throw new Ui("entityCollection is required.");A.collectionChanged.addEventListener(QH.prototype._onCollectionChanged,this),this._scene=o,this._primitives=o.primitives,this._entityCollection=A,this._hash={},this._entitiesToVisualize=new Vo,this._onCollectionChanged(A,A.values,[],[])};QH.prototype.update=function(o){if(!O(o))throw new Ui("time is required.");let A=this._entitiesToVisualize.values,f=this._hash,m=this._primitives;for(let C=0,y=A.length;C<y;C++){let x=A[C],v=x._rectangularSensor,E,I,w,Q,M,B=f[x.id],T=x.isShowing&&x.isAvailable(o)&&Nt.getValueOrDefault(v._show,o,!0);if(T&&(E=Nt.getValueOrUndefined(x._position,o,b2i),I=Nt.getValueOrUndefined(x._orientation,o,S2i),w=Nt.getValueOrUndefined(v._radius,o),Q=Nt.getValueOrUndefined(v._xHalfAngle,o),M=Nt.getValueOrUndefined(v._yHalfAngle,o),T=O(E)&&O(Q)&&O(M)),!T){O(B)&&(B.primitive.show=!1);continue}let D=O(B)?B.primitive:void 0;O(D)||(D=new R2e,D.id=x,m.add(D),B={primitive:D,position:void 0,orientation:void 0},f[x.id]=B);let F=Nt.getValueOrUndefined(v._gaze,o);if(O(F)){let L=Nt.getValueOrUndefined(F._position,o,Q2i);if(!O(E)||!O(L))continue;let R=ee.subtract(E,L,E7e),k=ee.angleBetween(ee.UNIT_Z,R),U=ee.cross(ee.UNIT_Z,R,E7e),V=jr.fromAxisAngle(U,k-Math.PI,D2i);w=ee.distance(E,L),D.modelMatrix=Xe.fromRotationTranslation(ci.fromQuaternion(V,v7e),E,D.modelMatrix)}else(!ee.equals(E,B.position)||!jr.equals(I,B.orientation))&&(O(I)?(D.modelMatrix=Xe.fromRotationTranslation(ci.fromQuaternion(I,v7e),E,D.modelMatrix),B.position=ee.clone(E,B.position),B.orientation=jr.clone(I,B.orientation)):(D.modelMatrix=Vn.eastNorthUpToFixedFrame(E),B.position=ee.clone(E,B.position)));D.show=!0,D.gaze=F,D.radius=w,D.xHalfAngle=Q,D.yHalfAngle=M,D.lineColor=Nt.getValueOrDefault(v._lineColor,o,At.WHITE),D.showSectorLines=Nt.getValueOrDefault(v._showSectorLines,o,!0),D.showSectorSegmentLines=Nt.getValueOrDefault(v._showSectorSegmentLines,o,!0),D.showLateralSurfaces=Nt.getValueOrDefault(v._showLateralSurfaces,o,!0),D.material=sC.getValue(o,v._material,D.material),D.showDomeSurfaces=Nt.getValueOrDefault(v._showDomeSurfaces,o,!0),D.showDomeLines=Nt.getValueOrDefault(v._showDomeLines,o,!0),D.showIntersection=Nt.getValueOrDefault(v._showIntersection,o,!0),D.intersectionColor=Nt.getValueOrDefault(v._intersectionColor,o,At.WHITE),D.intersectionWidth=Nt.getValueOrDefault(v._intersectionWidth,o,1),D.showThroughEllipsoid=Nt.getValueOrDefault(v._showThroughEllipsoid,o,!0),D.scanPlaneMode=Nt.getValueOrDefault(v._scanPlaneMode,o),D.scanPlaneColor=Nt.getValueOrDefault(v._scanPlaneColor,o,At.WHITE),D.showScanPlane=Nt.getValueOrDefault(v._showScanPlane,o,!0),D.scanPlaneRate=Nt.getValueOrDefault(v._scanPlaneRate,o,1)}return!0};QH.prototype.isDestroyed=function(){return!1};QH.prototype.destroy=function(){let o=this._entitiesToVisualize.values,A=this._hash,f=this._primitives;for(let m=o.length-1;m>-1;m--)qK(o[m],A,f);return Qr(this)};QH.prototype._onCollectionChanged=function(o,A,f,m){let C,y,x=this._entitiesToVisualize,v=this._hash,E=this._primitives;for(C=A.length-1;C>-1;C--)y=A[C],O(y._rectangularSensor)&&O(y._position)&&x.set(y.id,y);for(C=m.length-1;C>-1;C--)y=m[C],O(y._rectangularSensor)&&O(y._position)?x.set(y.id,y):(qK(y,v,E),x.remove(y.id));for(C=f.length-1;C>-1;C--)y=f[C],qK(y,v,E),x.remove(y.id)};var L2e=QH,T2i={},M2i=_J.defaultVisualizersCallback;_J.defaultVisualizersCallback=function(o,A,f){let m=f.entities;return M2i(o,A,f).concat([new L2e(o,m)])};var llt=T2i,ult=`uniform sampler2D u_depthTexture;
`,o7e=Math.sin,EG=Math.cos,vie=Math.tan,Eie=Math.atan,JD={position:0,normal:1};function Tat(o){let A=this;o=Ae(o,Ae.EMPTY_OBJECT),this.show=Ae(o.show,!0),this.slice=Ae(o.slice,32),this.modelMatrix=Xe.clone(o.modelMatrix,new Xe),this._modelMatrix=new Xe,this._computedModelMatrix=new Xe,this._computedScanPlaneModelMatrix=new Xe,this.radius=Ae(o.radius,Number.POSITIVE_INFINITY),this._radius=void 0,this.xHalfAngle=Ae(o.xHalfAngle,0),this._xHalfAngle=void 0,this.yHalfAngle=Ae(o.yHalfAngle,0),this._yHalfAngle=void 0,this.lineColor=Ae(o.lineColor,At.WHITE),this.showSectorLines=Ae(o.showSectorLines,!0),this.showSectorSegmentLines=Ae(o.showSectorSegmentLines,!0),this.showLateralSurfaces=Ae(o.showLateralSurfaces,!0),this.material=O(o.material)?o.material:ss.fromType(ss.ColorType),this._material=void 0,this._translucent=void 0,this.lateralSurfaceMaterial=O(o.lateralSurfaceMaterial)?o.lateralSurfaceMaterial:ss.fromType(ss.ColorType),this._lateralSurfaceMaterial=void 0,this._lateralSurfaceTranslucent=void 0,this.showDomeSurfaces=Ae(o.showDomeSurfaces,!0),this.domeSurfaceMaterial=O(o.domeSurfaceMaterial)?o.domeSurfaceMaterial:ss.fromType(ss.ColorType),this._domeSurfaceMaterial=void 0,this.showDomeLines=Ae(o.showDomeLines,!0),this.showIntersection=Ae(o.showIntersection,!0),this.intersectionColor=Ae(o.intersectionColor,At.WHITE),this.intersectionWidth=Ae(o.intersectionWidth,5),this.showThroughEllipsoid=Ae(o.showThroughEllipsoid,!1),this._showThroughEllipsoid=void 0,this.showScanPlane=Ae(o.showScanPlane,!0),this.scanPlaneColor=Ae(o.scanPlaneColor,At.WHITE),this.scanPlaneMode=Ae(o.scanPlaneMode,"horizontal"),this.scanPlaneRate=Ae(o.scanPlaneRate,10),this._scanePlaneXHalfAngle=0,this._scanePlaneYHalfAngle=0,this._time=fi.now(),this._boundingSphere=new wi,this._boundingSphereWC=new wi,this._sectorFrontCommand=new On({owner:this,primitiveType:yn.TRIANGLES,boundingVolume:this._boundingSphereWC}),this._sectorBackCommand=new On({owner:this,primitiveType:yn.TRIANGLES,boundingVolume:this._boundingSphereWC}),this._sectorVA=void 0,this._sectorLineCommand=new On({owner:this,primitiveType:yn.LINES,boundingVolume:this._boundingSphereWC}),this._sectorLineVA=void 0,this._sectorSegmentLineCommand=new On({owner:this,primitiveType:yn.LINES,boundingVolume:this._boundingSphereWC}),this._sectorSegmentLineVA=void 0,this._domeFrontCommand=new On({owner:this,primitiveType:yn.TRIANGLES,boundingVolume:this._boundingSphereWC}),this._domeBackCommand=new On({owner:this,primitiveType:yn.TRIANGLES,boundingVolume:this._boundingSphereWC}),this._domeVA=void 0,this._domeLineCommand=new On({owner:this,primitiveType:yn.LINES,boundingVolume:this._boundingSphereWC}),this._domeLineVA=void 0,this._scanPlaneFrontCommand=new On({owner:this,primitiveType:yn.TRIANGLES,boundingVolume:this._boundingSphereWC}),this._scanPlaneBackCommand=new On({owner:this,primitiveType:yn.TRIANGLES,boundingVolume:this._boundingSphereWC}),this._scanRadialCommand=void 0,this._colorCommands=[],this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._uniforms={u_type:function(){return 0},u_xHalfAngle:function(){return A.xHalfAngle},u_yHalfAngle:function(){return A.yHalfAngle},u_radius:function(){return A.radius},u_showThroughEllipsoid:function(){return A.showThroughEllipsoid},u_showIntersection:function(){return A.showIntersection},u_intersectionColor:function(){return A.intersectionColor},u_intersectionWidth:function(){return A.intersectionWidth},u_normalDirection:function(){return 1},u_lineColor:function(){return A.lineColor}},this._scanUniforms={u_xHalfAngle:function(){return A._scanePlaneXHalfAngle},u_yHalfAngle:function(){return A._scanePlaneYHalfAngle},u_radius:function(){return A.radius},u_color:function(){return A.scanPlaneColor},u_showThroughEllipsoid:function(){return A.showThroughEllipsoid},u_showIntersection:function(){return A.showIntersection},u_intersectionColor:function(){return A.intersectionColor},u_intersectionWidth:function(){return A.intersectionWidth},u_normalDirection:function(){return 1},u_lineColor:function(){return A.lineColor}}}Tat.prototype.update=function(o){let A=o.mode;if(!this.show||A!==xi.SCENE3D)return;let f=!1,m=!1,C=!1,y=this.xHalfAngle,x=this.yHalfAngle;if(y<0||x<0)throw new Ui("halfAngle must be greater than or equal to zero.");if(y===0||x===0)return;(this._xHalfAngle!==y||this._yHalfAngle!==x)&&(this._xHalfAngle=y,this._yHalfAngle=x,f=!0);let v=this.radius;if(v<0)throw new Ui("this.radius must be greater than or equal to zero.");let E=!1;this._radius!==v&&(E=!0,this._radius=v,this._boundingSphere=new wi(ee.ZERO,this.radius)),(!Xe.equals(this.modelMatrix,this._modelMatrix)||E)&&(Xe.clone(this.modelMatrix,this._modelMatrix),Xe.multiplyByUniformScale(this.modelMatrix,this.radius,this._computedModelMatrix),wi.transform(this._boundingSphere,this.modelMatrix,this._boundingSphereWC));let I=this.showThroughEllipsoid;this._showThroughEllipsoid!==this.showThroughEllipsoid&&(this._showThroughEllipsoid=I,m=!0);let w=this.material;this._material!==w&&(this._material=w,m=!0,C=!0);let Q=w.isTranslucent();if(this._translucent!==Q&&(this._translucent=Q,m=!0),this.showScanPlane){let D=o.time,F=fi.secondsDifference(D,this._time);F<0&&(this._time=fi.clone(D,this._time));let L=Math.max(F%this.scanPlaneRate/this.scanPlaneRate,0),R;if(this.scanPlaneMode==="horizontal"){R=2*x*L-x;let k=EG(R),U=vie(y),V=Eie(k*U);this._scanePlaneXHalfAngle=V,this._scanePlaneYHalfAngle=R,ci.fromRotationX(this._scanePlaneYHalfAngle,kk)}else{R=2*y*L-y;let k=vie(x),U=EG(R),V=Eie(U*k);this._scanePlaneXHalfAngle=R,this._scanePlaneYHalfAngle=V,ci.fromRotationY(this._scanePlaneXHalfAngle,kk)}Xe.multiplyByMatrix3(this.modelMatrix,kk,this._computedScanPlaneModelMatrix),Xe.multiplyByUniformScale(this._computedScanPlaneModelMatrix,this.radius,this._computedScanPlaneModelMatrix)}f&&aQi(this,o),m&&cQi(this,I,Q),C&&uQi(this,o,w),(m||C)&&AQi(this,Q);let M=o.commandList,B=o.passes,T=this._colorCommands;if(B.render)for(let D=0,F=T.length;D<F;D++){let L=T[D];M.push(L)}};var kk=new ci,a7e=new ee;function spe(o,A,f){let m=o.slice,C=EG(f),y=vie(f),x=EG(A),v=vie(A),E=Eie(x*y),I=Eie(C*v),w=[];for(let M=0;M<m;M++){let B=2*E*M/(m-1)-E;w.push(new ee(0,o7e(B),EG(B)))}let Q=[];for(let M=0;M<m;M++){let B=2*I*M/(m-1)-I;Q.push(new ee(o7e(B),0,EG(B)))}return{zoy:w,zox:Q}}function eQi(o,A){let f=o.xHalfAngle,m=o.yHalfAngle,C=A.zoy,y=A.zox,x=[],v=ci.fromRotationY(f,kk);return x.push(C.map(function(E){return ci.multiplyByVector(v,E,new ee)})),v=ci.fromRotationX(-m,kk),x.push(y.map(function(E){return ci.multiplyByVector(v,E,new ee)}).reverse()),v=ci.fromRotationY(-f,kk),x.push(C.map(function(E){return ci.multiplyByVector(v,E,new ee)}).reverse()),v=ci.fromRotationX(m,kk),x.push(y.map(function(E){return ci.multiplyByVector(v,E,new ee)})),x}function tQi(o,A){let f=Array.prototype.concat.apply([],A).length-A.length,m=new Float32Array(2*3*3*f),C=0;for(let E=0,I=A.length;E<I;E++){let w=A[E],Q=ee.normalize(ee.cross(w[0],w[w.length-1],a7e),a7e);for(let M=0,B=w.length-1;M<B;M++)m[C++]=0,m[C++]=0,m[C++]=0,m[C++]=-Q.x,m[C++]=-Q.y,m[C++]=-Q.z,m[C++]=w[M].x,m[C++]=w[M].y,m[C++]=w[M].z,m[C++]=-Q.x,m[C++]=-Q.y,m[C++]=-Q.z,m[C++]=w[M+1].x,m[C++]=w[M+1].y,m[C++]=w[M+1].z,m[C++]=-Q.x,m[C++]=-Q.y,m[C++]=-Q.z}let y=vo.createVertexBuffer({context:o,typedArray:m,usage:ln.STATIC_DRAW}),x=2*3*Float32Array.BYTES_PER_ELEMENT,v=[{index:JD.position,vertexBuffer:y,componentsPerAttribute:3,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x},{index:JD.normal,vertexBuffer:y,componentsPerAttribute:3,componentDatatype:ei.FLOAT,offsetInBytes:3*Float32Array.BYTES_PER_ELEMENT,strideInBytes:x}];return new Vc({context:o,attributes:v})}function iQi(o,A){let f=A.length,m=new Float32Array(3*3*f),C=0;for(let E=0,I=A.length;E<I;E++){let w=A[E];m[C++]=0,m[C++]=0,m[C++]=0,m[C++]=w[0].x,m[C++]=w[0].y,m[C++]=w[0].z}let y=vo.createVertexBuffer({context:o,typedArray:m,usage:ln.STATIC_DRAW}),x=3*Float32Array.BYTES_PER_ELEMENT,v=[{index:JD.position,vertexBuffer:y,componentsPerAttribute:3,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x}];return new Vc({context:o,attributes:v})}function rQi(o,A){let f=Array.prototype.concat.apply([],A).length-A.length,m=new Float32Array(3*3*f),C=0;for(let E=0,I=A.length;E<I;E++){let w=A[E];for(let Q=0,M=w.length-1;Q<M;Q++)m[C++]=w[Q].x,m[C++]=w[Q].y,m[C++]=w[Q].z,m[C++]=w[Q+1].x,m[C++]=w[Q+1].y,m[C++]=w[Q+1].z}let y=vo.createVertexBuffer({context:o,typedArray:m,usage:ln.STATIC_DRAW}),x=3*Float32Array.BYTES_PER_ELEMENT,v=[{index:JD.position,vertexBuffer:y,componentsPerAttribute:3,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x}];return new Vc({context:o,attributes:v})}function nQi(o){let A=gC.createGeometry(new gC({vertexFormat:Wr.POSITION_ONLY,stackPartitions:32,slicePartitions:32}));return Vc.fromGeometry({context:o,geometry:A,attributeLocations:JD,bufferUsage:ln.STATIC_DRAW,interleave:!1})}function oQi(o){let A=J1.createGeometry(new J1({vertexFormat:Wr.POSITION_ONLY,stackPartitions:32,slicePartitions:32}));return Vc.fromGeometry({context:o,geometry:A,attributeLocations:JD,bufferUsage:ln.STATIC_DRAW,interleave:!1})}function s7e(o,A){let f=A.length-1,m=new Float32Array(3*3*f),C=0;for(let E=0;E<f;E++)m[C++]=0,m[C++]=0,m[C++]=0,m[C++]=A[E].x,m[C++]=A[E].y,m[C++]=A[E].z,m[C++]=A[E+1].x,m[C++]=A[E+1].y,m[C++]=A[E+1].z;let y=vo.createVertexBuffer({context:o,typedArray:m,usage:ln.STATIC_DRAW}),x=3*Float32Array.BYTES_PER_ELEMENT,v=[{index:JD.position,vertexBuffer:y,componentsPerAttribute:3,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x}];return new Vc({context:o,attributes:v})}function aQi(o,A){let f=A.context,m=spe(o,o.xHalfAngle,o.yHalfAngle),C=eQi(o,m);if(o.showLateralSurfaces&&(o._sectorVA=tQi(f,C)),o.showSectorLines&&(o._sectorLineVA=iQi(f,C)),o.showSectorSegmentLines&&(o._sectorSegmentLineVA=rQi(f,C)),o.showDomeSurfaces&&(o._domeVA=nQi(f)),o.showDomeLines&&(o._domeLineVA=oQi(f)),o.showScanPlane)if(o.scanPlaneMode==="horizontal"){let y=spe(o,je.PI_OVER_TWO,0);o._scanPlaneVA=s7e(f,y.zox)}else{let y=spe(o,0,je.PI_OVER_TWO);o._scanPlaneVA=s7e(f,y.zoy)}}function sQi(o,A,f){let m=A.context,C=pae,y=new Fr({sources:[qK,f.shaderSource,xie]});o._sp=_s.replaceCache({context:m,shaderProgram:o._sp,vertexShaderSource:C,fragmentShaderSource:y,attributeLocations:JD});let x=new Fr({sources:[qK,f.shaderSource,xie],pickColorQualifier:"uniform"});o._pickSP=_s.replaceCache({context:m,shaderProgram:o._pickSP,vertexShaderSource:C,fragmentShaderSource:x,attributeLocations:JD})}function lQi(o,A,f){let m=A.context,C=pae,y=new Fr({sources:[qK,f.shaderSource,JDe]});o._scanePlaneSP=_s.replaceCache({context:m,shaderProgram:o._scanePlaneSP,vertexShaderSource:C,fragmentShaderSource:y,attributeLocations:JD})}function uQi(o,A,f){sQi(o,A,f),o.showScanPlane&&lQi(o,A,f)}function cQi(o,A,f){f?(o._frontFaceRS=fn.fromCache({depthTest:{enabled:!A},depthMask:!1,blending:Bu.ALPHA_BLEND,cull:{enabled:!0,face:CA.BACK}}),o._backFaceRS=fn.fromCache({depthTest:{enabled:!A},depthMask:!1,blending:Bu.ALPHA_BLEND,cull:{enabled:!0,face:CA.FRONT}}),o._pickRS=fn.fromCache({depthTest:{enabled:!A},depthMask:!1,blending:Bu.ALPHA_BLEND})):(o._frontFaceRS=fn.fromCache({depthTest:{enabled:!A},depthMask:!0}),o._pickRS=fn.fromCache({depthTest:{enabled:!0},depthMask:!0}))}function KU(o,A,f,m,C,y,x,v,E,I,w,Q){I&&f&&(f.vertexArray=x,f.renderState=C,f.shaderProgram=y,f.uniformMap=ia(v,o._material._uniforms),f.uniformMap.u_normalDirection=function(){return-1},f.pass=w,f.modelMatrix=E,o._colorCommands.push(f)),A.vertexArray=x,A.renderState=m,A.shaderProgram=y,A.uniformMap=ia(v,o._material._uniforms),Q&&(A.uniformMap.u_type=function(){return 1}),A.pass=w,A.modelMatrix=E,o._colorCommands.push(A)}function AQi(o,A){o._colorCommands.length=0;let f=A?hr.TRANSLUCENT:hr.OPAQUE;o.showLateralSurfaces&&KU(o,o._sectorFrontCommand,o._sectorBackCommand,o._frontFaceRS,o._backFaceRS,o._sp,o._sectorVA,o._uniforms,o._computedModelMatrix,A,f),o.showSectorLines&&KU(o,o._sectorLineCommand,void 0,o._frontFaceRS,o._backFaceRS,o._sp,o._sectorLineVA,o._uniforms,o._computedModelMatrix,A,f,!0),o.showSectorSegmentLines&&KU(o,o._sectorSegmentLineCommand,void 0,o._frontFaceRS,o._backFaceRS,o._sp,o._sectorSegmentLineVA,o._uniforms,o._computedModelMatrix,A,f,!0),o.showDomeSurfaces&&KU(o,o._domeFrontCommand,o._domeBackCommand,o._frontFaceRS,o._backFaceRS,o._sp,o._domeVA,o._uniforms,o._computedModelMatrix,A,f),o.showDomeLines&&KU(o,o._domeLineCommand,void 0,o._frontFaceRS,o._backFaceRS,o._sp,o._domeLineVA,o._uniforms,o._computedModelMatrix,A,f,!0),o.showScanPlane&&KU(o,o._scanPlaneFrontCommand,o._scanPlaneBackCommand,o._frontFaceRS,o._backFaceRS,o._scanePlaneSP,o._scanPlaneVA,o._scanUniforms,o._computedScanPlaneModelMatrix,A,f)}var WDe=Tat,l7e=new ci,hQi=new ee,dQi=new ee,fQi=new jr,u7e=new ee,gQi=new jr,gH=function(o,A){if(!O(o))throw new Ui("scene is required.");if(!O(A))throw new Ui("entityCollection is required.");A.collectionChanged.addEventListener(gH.prototype._onCollectionChanged,this),this._scene=o,this._primitives=o.primitives,this._entityCollection=A,this._hash={},this._entitiesToVisualize=new Vo,this._onCollectionChanged(A,A.values,[],[])};gH.prototype.update=function(o){if(!O(o))throw new Ui("time is required.");let A=this._entitiesToVisualize.values,f=this._hash,m=this._primitives;for(let C=0,y=A.length;C<y;C++){let x=A[C],v=x._rectangularSensor,E,I,w,Q,M,B=f[x.id],T=x.isShowing&&x.isAvailable(o)&&Nt.getValueOrDefault(v._show,o,!0);if(T&&(E=Nt.getValueOrUndefined(x._position,o,hQi),I=Nt.getValueOrUndefined(x._orientation,o,fQi),w=Nt.getValueOrUndefined(v._radius,o),Q=Nt.getValueOrUndefined(v._xHalfAngle,o),M=Nt.getValueOrUndefined(v._yHalfAngle,o),T=O(E)&&O(Q)&&O(M)),!T){O(B)&&(B.primitive.show=!1);continue}let D=O(B)?B.primitive:void 0;O(D)||(D=new WDe,D.id=x,m.add(D),B={primitive:D,position:void 0,orientation:void 0},f[x.id]=B);let F=Nt.getValueOrUndefined(v._gaze,o);if(O(F)){let L=Nt.getValueOrUndefined(F._position,o,dQi);if(!O(E)||!O(L))continue;let R=ee.subtract(E,L,u7e),k=ee.angleBetween(ee.UNIT_Z,R),U=ee.cross(ee.UNIT_Z,R,u7e),V=jr.fromAxisAngle(U,k-Math.PI,gQi);w=ee.distance(E,L),D.modelMatrix=Xe.fromRotationTranslation(ci.fromQuaternion(V,l7e),E,D.modelMatrix)}else(!ee.equals(E,B.position)||!jr.equals(I,B.orientation))&&(O(I)?(D.modelMatrix=Xe.fromRotationTranslation(ci.fromQuaternion(I,l7e),E,D.modelMatrix),B.position=ee.clone(E,B.position),B.orientation=jr.clone(I,B.orientation)):(D.modelMatrix=Vn.eastNorthUpToFixedFrame(E),B.position=ee.clone(E,B.position)));D.show=!0,D.gaze=F,D.radius=w,D.xHalfAngle=Q,D.yHalfAngle=M,D.lineColor=Nt.getValueOrDefault(v._lineColor,o,At.WHITE),D.showSectorLines=Nt.getValueOrDefault(v._showSectorLines,o,!0),D.showSectorSegmentLines=Nt.getValueOrDefault(v._showSectorSegmentLines,o,!0),D.showLateralSurfaces=Nt.getValueOrDefault(v._showLateralSurfaces,o,!0),D.material=sC.getValue(o,v._material,D.material),D.showDomeSurfaces=Nt.getValueOrDefault(v._showDomeSurfaces,o,!0),D.showDomeLines=Nt.getValueOrDefault(v._showDomeLines,o,!0),D.showIntersection=Nt.getValueOrDefault(v._showIntersection,o,!0),D.intersectionColor=Nt.getValueOrDefault(v._intersectionColor,o,At.WHITE),D.intersectionWidth=Nt.getValueOrDefault(v._intersectionWidth,o,1),D.showThroughEllipsoid=Nt.getValueOrDefault(v._showThroughEllipsoid,o,!0),D.scanPlaneMode=Nt.getValueOrDefault(v._scanPlaneMode,o),D.scanPlaneColor=Nt.getValueOrDefault(v._scanPlaneColor,o,At.WHITE),D.showScanPlane=Nt.getValueOrDefault(v._showScanPlane,o,!0),D.scanPlaneRate=Nt.getValueOrDefault(v._scanPlaneRate,o,1)}return!0};gH.prototype.isDestroyed=function(){return!1};gH.prototype.destroy=function(){let o=this._entitiesToVisualize.values,A=this._hash,f=this._primitives;for(let m=o.length-1;m>-1;m--)jK(o[m],A,f);return Qr(this)};gH.prototype._onCollectionChanged=function(o,A,f,m){let C,y,x=this._entitiesToVisualize,v=this._hash,E=this._primitives;for(C=A.length-1;C>-1;C--)y=A[C],O(y._rectangularSensor)&&O(y._position)&&x.set(y.id,y);for(C=m.length-1;C>-1;C--)y=m[C],O(y._rectangularSensor)&&O(y._position)?x.set(y.id,y):(jK(y,v,E),x.remove(y.id));for(C=f.length-1;C>-1;C--)y=f[C],jK(y,v,E),x.remove(y.id)};var jDe=gH,pQi={},mQi=_J.defaultVisualizersCallback;_J.defaultVisualizersCallback=function(o,A,f){let m=f.entities;return mQi(o,A,f).concat([new jDe(o,m)])};var Mat=pQi,CQi=15;function pH(o){this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;let A=o.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};let f=this,m=Ae(o.ellipsoid,Di.WGS84);this._readyPromise=Promise.resolve(o.url).then(function(C){let y=An.createIfNeeded(C);return y.appendForwardSlash(),O(A)&&(y=y.getDerivedResource({queryParameters:{token:A}})),f._resource=y,y.getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()}).then(function(C){let y=C.copyrightText;O(y)&&(f._credit=new tl(y));let x=C.spatialReference,v=Ae(x.latestWkid,x.wkid),E=C.extent,I={ellipsoid:m};if(v===4326)I.rectangle=Si.fromDegrees(E.xmin,E.ymin,E.xmax,E.ymax),f._tilingScheme=new af(I);else if(v===3857){let Q=Math.PI*m.maximumRadius;C.extent.xmax>Q&&(C.extent.xmax=Q),C.extent.ymax>Q&&(C.extent.ymax=Q),C.extent.xmin<-Q&&(C.extent.xmin=-Q),C.extent.ymin<-Q&&(C.extent.ymin=-Q),I.rectangleSouthwestInMeters=new It(E.xmin,E.ymin),I.rectangleNortheastInMeters=new It(E.xmax,E.ymax),f._tilingScheme=new Am(I)}else return Promise.reject(new nr("Invalid spatial reference"));let w=C.tileInfo;return O(w)?(f._width=w.rows+1,f._height=w.cols+1,f._encoding=w.format==="LERC"?HF.LERC:HF.NONE,f._lodCount=w.lods.length-1,(f._hasAvailability=C.capabilities.indexOf("Tilemap")!==-1)&&(f._tilesAvailable=new ZL(f._tilingScheme,f._lodCount),f._tilesAvailable.addAvailableTileRange(0,0,0,f._tilingScheme.getNumberOfXTilesAtLevel(0),f._tilingScheme.getNumberOfYTilesAtLevel(0)),f._tilesAvailablityLoaded=new ZL(f._tilingScheme,f._lodCount)),f._levelZeroMaximumGeometricError=Cx.getEstimatedLevelZeroGeometricErrorForAHeightmap(f._tilingScheme.ellipsoid,f._width,f._tilingScheme.getNumberOfXTilesAtLevel(0)),C.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),O(C.minValues)&&O(C.maxValues)?f._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:C.minValues[0],highestEncodedHeight:C.maxValues[0]}:f._terrainDataStructure={elementMultiplier:1},f._ready=!0,!0):Promise.reject(new nr("tileInfo is required"))}).catch(function(C){let y=`An error occurred while accessing ${f._resource.url}.`;return wc.reportError(void 0,f,f._errorEvent,y),Promise.reject(C)}),this._errorEvent=new br}Object.defineProperties(pH.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){return this._tilesAvailable}}});pH.prototype.requestTileGeometry=function(o,A,f,m){let C=this._resource.getDerivedResource({url:`tile/${f}/${A}/${o}`,request:m}),y=this._hasAvailability,x=Promise.resolve(!0),v;if(y&&!O(qDe(this,f+1,o*2,A*2))){let Q=Pat(this,f+1,o*2,A*2);x=Q.promise,v=Q.request}let E=C.fetchArrayBuffer();if(!O(E)||!O(x))return;let I=this,w=this._tilesAvailable;return Promise.all([E,x]).then(function(Q){return new wQ({buffer:Q[0],width:I._width,height:I._height,childTileMask:y?w.computeChildMaskForTile(f,o,A):CQi,structure:I._terrainDataStructure,encoding:I._encoding})}).catch(function(Q){return O(v)&&v.state===yA.CANCELLED?(m.cancel(),m.deferred.promise.finally(function(){return m.state=yA.CANCELLED,Promise.reject(Q)})):Promise.reject(Q)})};function qDe(o,A,f,m){if(!o._hasAvailability)return;let C=o._tilesAvailablityLoaded,y=o._tilesAvailable;if(A>o._lodCount)return!1;if(y.isTileAvailable(A,f,m))return!0;if(C.isTileAvailable(A,f,m))return!1}pH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};pH.prototype.getTileDataAvailable=function(o,A,f){if(!this._hasAvailability)return;let m=qDe(this,f,o,A);if(O(m))return m;Pat(this,f,o,A)};pH.prototype.loadTileDataAvailability=function(o,A,f){};function yQi(o,A,f,m){let C=A-1,y=f-1,x=m[o.y*A+o.x],v=[],E={startX:o.x,startY:o.y,endX:0,endY:0},I=new It(o.x+1,o.y+1),w=!1,Q=!1;for(;!(w&&Q);){let M=I.x,B=Q?I.y+1:I.y;if(!w){for(let T=o.y;T<B;++T)if(m[T*A+I.x]!==x){w=!0;break}w?(v.push(new It(I.x,o.y)),--I.x,--M,E.endX=I.x):I.x===C?(E.endX=I.x,w=!0):++I.x}if(!Q){let T=I.y*A;for(let D=o.x;D<=M;++D)if(m[T+D]!==x){Q=!0;break}Q?(v.push(new It(o.x,I.y)),--I.y,E.endY=I.y):I.y===y?(E.endY=I.y,Q=!0):++I.y}}return{endingIndices:v,range:E,value:x}}function xQi(o,A,f,m,C){let y=[];if(C.every(function(v){return v===C[0]}))return C[0]===1&&y.push({startX:o,startY:A,endX:o+f-1,endY:A+m-1}),y;let x=[new It(0,0)];for(;x.length>0;){let v=x.pop(),E=yQi(v,f,m,C);if(E.value===1){let w=E.range;w.startX+=o,w.endX+=o,w.startY+=A,w.endY+=A,y.push(w)}let I=E.endingIndices;I.length>0&&(x=x.concat(I))}return y}function Pat(o,A,f,m){if(!o._hasAvailability)return{};let C=Math.floor(f/128)*128,y=Math.floor(m/128)*128,x=Math.min(1<<A,128),v=`tilemap/${A}/${y}/${C}/${x}/${x}`,E=o._availableCache;if(O(E[v]))return E[v];let I=new cC({throttle:!1,throttleByServer:!0,type:oB.TERRAIN}),w=o._resource.getDerivedResource({url:v,request:I}).fetchJson();return O(w)?(w=w.then(function(Q){let M=xQi(C,y,x,x,Q.data);o._tilesAvailablityLoaded.addAvailableTileRange(A,C,y,C+x,y+x);let B=o._tilesAvailable;for(let T=0;T<M.length;++T){let D=M[T];B.addAvailableTileRange(A,D.startX,D.startY,D.endX,D.endY)}return qDe(o,A,f,m)}),E[v]={promise:w,request:I},w=w.finally(function(Q){return delete E[v],Q}),{promise:w,request:I}):{}}var Rat=pH,Iie={};Iie.defaultKey=void 0;Iie.getKey=function(o){return O(o)?o:Iie.defaultKey};var Lat=Iie,Fat="https://dev.virtualearth.net/REST/v1/Locations";function XDe(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.key;this._key=A;let f={key:A};O(o.culture)&&(f.culture=o.culture),this._resource=new An({url:Fat,queryParameters:f})}Object.defineProperties(XDe.prototype,{url:{get:function(){return Fat}},key:{get:function(){return this._key}}});XDe.prototype.geocode=function(o){return this._resource.getDerivedResource({queryParameters:{query:o}}).fetchJsonp("jsonp").then(function(A){return A.resourceSets.length===0?[]:A.resourceSets[0].resources.map(function(f){let m=f.bbox,C=m[0],y=m[1],x=m[2],v=m[3];return{displayName:f.name,destination:Si.fromDegrees(y,C,v,x)}})})};var Nat=XDe,vQi=new ai,c7e=new ee,YU=new ee;function EQi(o){let A=o.points,f=o.times;if(A.length<3){let m=f[0],C=1/(f[1]-m),y=A[0],x=A[1];return function(v,E){O(E)||(E=new ee);let I=(v-m)*C;return ee.lerp(y,x,I,E)}}return function(m,C){O(C)||(C=new ee);let y=o._lastTimeIndex=o.findTimeInterval(m,o._lastTimeIndex),x=(m-f[y])/(f[y+1]-f[y]),v=vQi;v.z=x,v.y=x*x,v.x=v.y*x,v.w=1;let E,I,w,Q,M;return y===0?(E=A[0],I=A[1],w=o.firstTangent,Q=ee.subtract(A[2],E,c7e),ee.multiplyByScalar(Q,.5,Q),M=Xe.multiplyByVector(DK.hermiteCoefficientMatrix,v,v)):y===A.length-2?(E=A[y],I=A[y+1],Q=o.lastTangent,w=ee.subtract(I,A[y-1],c7e),ee.multiplyByScalar(w,.5,w),M=Xe.multiplyByVector(DK.hermiteCoefficientMatrix,v,v)):(E=A[y-1],I=A[y],w=A[y+1],Q=A[y+2],M=Xe.multiplyByVector(vN.catmullRomCoefficientMatrix,v,v)),C=ee.multiplyByScalar(E,M.x,C),ee.multiplyByScalar(I,M.y,YU),ee.add(C,YU,C),ee.multiplyByScalar(w,M.z,YU),ee.add(C,YU,C),ee.multiplyByScalar(Q,M.w,YU),ee.add(C,YU,C)}}var IQi=new ee,_Qi=new ee;function vN(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.points,f=o.times,m=o.firstTangent,C=o.lastTangent;if(A.length>2&&(O(m)||(m=IQi,ee.multiplyByScalar(A[1],2,m),ee.subtract(m,A[2],m),ee.subtract(m,A[0],m),ee.multiplyByScalar(m,.5,m)),!O(C))){let y=A.length-1;C=_Qi,ee.multiplyByScalar(A[y-1],2,C),ee.subtract(A[y],C,C),ee.add(C,A[y-2],C),ee.multiplyByScalar(C,.5,C)}this._times=f,this._points=A,this._firstTangent=ee.clone(m),this._lastTangent=ee.clone(C),this._evaluateFunction=EQi(this),this._lastTimeIndex=0}Object.defineProperties(vN.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}});vN.catmullRomCoefficientMatrix=new Xe(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);vN.prototype.findTimeInterval=uf.prototype.findTimeInterval;vN.prototype.wrapTime=uf.prototype.wrapTime;vN.prototype.clampTime=uf.prototype.clampTime;vN.prototype.evaluate=function(o,A){return this._evaluateFunction(o,A)};var kat=vN;function WM(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.radius,f={center:o.center,semiMajorAxis:A,semiMinorAxis:A,ellipsoid:o.ellipsoid,height:o.height,extrudedHeight:o.extrudedHeight,granularity:o.granularity,vertexFormat:o.vertexFormat,stRotation:o.stRotation,shadowVolume:o.shadowVolume};this._ellipseGeometry=new W1(f),this._workerName="createCircleGeometry"}WM.packedLength=W1.packedLength;WM.pack=function(o,A,f){return W1.pack(o._ellipseGeometry,A,f)};var BQi=new W1({center:new ee,semiMajorAxis:1,semiMinorAxis:1}),ix={center:new ee,radius:void 0,ellipsoid:Di.clone(Di.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Wr,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};WM.unpack=function(o,A,f){let m=W1.unpack(o,A,BQi);return ix.center=ee.clone(m._center,ix.center),ix.ellipsoid=Di.clone(m._ellipsoid,ix.ellipsoid),ix.height=m._height,ix.extrudedHeight=m._extrudedHeight,ix.granularity=m._granularity,ix.vertexFormat=Wr.clone(m._vertexFormat,ix.vertexFormat),ix.stRotation=m._stRotation,ix.shadowVolume=m._shadowVolume,O(f)?(ix.semiMajorAxis=m._semiMajorAxis,ix.semiMinorAxis=m._semiMinorAxis,f._ellipseGeometry=new W1(ix),f):(ix.radius=m._semiMajorAxis,new WM(ix))};WM.createGeometry=function(o){return W1.createGeometry(o._ellipseGeometry)};WM.createShadowVolume=function(o,A,f){let m=o._ellipseGeometry._granularity,C=o._ellipseGeometry._ellipsoid,y=A(m,C),x=f(m,C);return new WM({center:o._ellipseGeometry._center,radius:o._ellipseGeometry._semiMajorAxis,ellipsoid:C,stRotation:o._ellipseGeometry._stRotation,granularity:m,extrudedHeight:y,height:x,vertexFormat:Wr.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(WM.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var Oat=WM;function Y8(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.radius,f={center:o.center,semiMajorAxis:A,semiMinorAxis:A,ellipsoid:o.ellipsoid,height:o.height,extrudedHeight:o.extrudedHeight,granularity:o.granularity,numberOfVerticalLines:o.numberOfVerticalLines};this._ellipseGeometry=new UD(f),this._workerName="createCircleOutlineGeometry"}Y8.packedLength=UD.packedLength;Y8.pack=function(o,A,f){return UD.pack(o._ellipseGeometry,A,f)};var wQi=new UD({center:new ee,semiMajorAxis:1,semiMinorAxis:1}),B_={center:new ee,radius:void 0,ellipsoid:Di.clone(Di.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};Y8.unpack=function(o,A,f){let m=UD.unpack(o,A,wQi);return B_.center=ee.clone(m._center,B_.center),B_.ellipsoid=Di.clone(m._ellipsoid,B_.ellipsoid),B_.height=m._height,B_.extrudedHeight=m._extrudedHeight,B_.granularity=m._granularity,B_.numberOfVerticalLines=m._numberOfVerticalLines,O(f)?(B_.semiMajorAxis=m._semiMajorAxis,B_.semiMinorAxis=m._semiMinorAxis,f._ellipseGeometry=new UD(B_),f):(B_.radius=m._semiMajorAxis,new Y8(B_))};Y8.createGeometry=function(o){return UD.createGeometry(o._ellipseGeometry)};var Uat=Y8;function mH(o){o=Ae(o,Ae.EMPTY_OBJECT),this._callback=o.callback,this._tilingScheme=o.tilingScheme,O(this._tilingScheme)||(this._tilingScheme=new af({ellipsoid:Ae(o.ellipsoid,Di.WGS84)})),this._width=o.width,this._height=o.height;let A=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=Cx.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,A,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new br;let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._readyPromise=Promise.resolve(!0)}Object.defineProperties(mH.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});mH.prototype.requestTileGeometry=function(o,A,f,m){let C=this._callback(o,A,f);if(!O(C))return;let y=this._width,x=this._height;return Promise.resolve(C).then(function(v){let E=v;return Array.isArray(E)&&(E=new Float64Array(E)),new wQ({buffer:E,width:y,height:x})})};mH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};mH.prototype.getTileDataAvailable=function(o,A,f){};mH.prototype.loadTileDataAvailability=function(o,A,f){};var Gat=mH,bQi=1953029805,QQi=2917034100;function ZDe(o,A){if(ZDe.passThroughDataForTesting)return A;let f=o.byteLength;if(f===0||f%4!==0)throw new nr("The length of key must be greater than 0 and a multiple of 4.");let m=new DataView(A),C=m.getUint32(0,!0);if(C===bQi||C===QQi)return A;let y=new DataView(o),x=0,v=A.byteLength,E=v-v%8,I=f,w,Q=8;for(;x<E;)for(Q=(Q+8)%24,w=Q;x<E&&w<I;)m.setUint32(x,m.getUint32(x,!0)^y.getUint32(w,!0),!0),m.setUint32(x+4,m.getUint32(x+4,!0)^y.getUint32(w+4,!0),!0),x+=8,w+=24;if(x<v)for(w>=I&&(Q=(Q+8)%24,w=Q);x<v;)m.setUint8(x,m.getUint8(x)^y.getUint8(w)),x++,w++}ZDe.passThroughDataForTesting=!1;var $De=ZDe;function aQ(o){this._comparator=o.comparator,this._maximumLength=o.maximumLength,this._array=O(o.maximumLength)?new Array(o.maximumLength):[],this._length=0}Object.defineProperties(aQ.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(o){if(O(o)){for(;this._length>o;)this.removeMinimum();this._array.length=o}this._maximumLength=o}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}});aQ.prototype.clone=function(){let o=this._maximumLength,A=this._comparator,f=this._array,m=this._length,C=new aQ({comparator:A,maximumLength:o});C._length=m;for(let y=0;y<m;y++)C._array[y]=f[y];return C};aQ.prototype.reset=function(){this._length=0;let o=this._maximumLength;if(O(o))for(let A=0;A<o;A++)this._array[A]=void 0;else this._array.length=0};aQ.prototype.resort=function(){let o=this._length;for(let A=0;A<o;A++)Hat(this,A)};aQ.prototype.insert=function(o){let A,f=this._maximumLength;if(O(f)){if(f===0)return;if(this._length===f){let C=this._array[0];if(this._comparator(o,C)<=0)return o;A=this.removeMinimum()}}let m=this._length;return this._array[m]=o,this._length++,Hat(this,m),A};aQ.prototype.removeMinimum=function(){let o=this._length;if(o===0)return;this._length--;let A=this._array[0];return o>=2&&(this._array[0]=this._array[o-1],Vat(this,0)),this._array[o-1]=void 0,A};aQ.prototype.removeMaximum=function(){let o=this._length;if(o===0)return;this._length--;let A;if(o<=2)A=this._array[o-1];else{let f=e2e(this,1,2)?1:2;A=this._array[f],this._array[f]=this._array[o-1],o>=4&&Vat(this,f)}return this._array[o-1]=void 0,A};aQ.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};aQ.prototype.getMaximum=function(){let o=this._length;if(o!==0)return o<=2?this._array[o-1]:this._array[e2e(this,1,2)?1:2]};function _ie(o,A,f){let m=o._array,C=m[A];m[A]=m[f],m[f]=C}function N7(o,A,f){return o._comparator(o._array[A],o._array[f])<0}function e2e(o,A,f){return o._comparator(o._array[A],o._array[f])>0}function Hat(o,A){if(A===0)return;let f=Math.floor(je.log2(A+1))%2===0,m=Math.floor((A-1)/2),C=N7(o,A,m);for(C!==f&&(_ie(o,A,m),A=m);A>=3;){let y=Math.floor((A-3)/4);if(N7(o,A,y)!==C)break;_ie(o,A,y),A=y}}function Vat(o,A){let f=o._length,m=Math.floor(je.log2(A+1))%2===0,C;for(;(C=2*A+1)<f;){let y=C,x=C+1;if(x<f){N7(o,x,y)===m&&(y=x);let v=2*C+1,E=Math.max(Math.min(f-v,4),0);for(let I=0;I<E;I++){let w=v+I;N7(o,w,y)===m&&(y=w)}}if(N7(o,y,A)===m&&(_ie(o,y,A),y!==C&&y!==x)){let v=Math.floor((y-1)/2);e2e(o,y,v)===m&&_ie(o,y,v)}A=y}}var zat=aQ;function Kat(){}Kat.prototype.geocode=Ui.throwInstantiationError;var Yat=Kat;function Jat(){Ui.throwInstantiationError()}Jat.createGeometry=function(o){Ui.throwInstantiationError()};var Wat=Jat,SQi=Eh(T7e(),1);function DQi(o,A){return(o&A)!==0}var q_=DQi,TQi=[1,2,4,8],jat=15,MQi=16,PQi=64,RQi=128;function WD(o,A,f,m,C,y){this._bits=o,this.cnodeVersion=A,this.imageryVersion=f,this.terrainVersion=m,this.imageryProvider=C,this.terrainProvider=y,this.ancestorHasTerrain=!1,this.terrainState=void 0}WD.clone=function(o,A){return O(A)?(A._bits=o._bits,A.cnodeVersion=o.cnodeVersion,A.imageryVersion=o.imageryVersion,A.terrainVersion=o.terrainVersion,A.imageryProvider=o.imageryProvider,A.terrainProvider=o.terrainProvider):A=new WD(o._bits,o.cnodeVersion,o.imageryVersion,o.terrainVersion,o.imageryProvider,o.terrainProvider),A.ancestorHasTerrain=o.ancestorHasTerrain,A.terrainState=o.terrainState,A};WD.prototype.setParent=function(o){this.ancestorHasTerrain=o.ancestorHasTerrain||this.hasTerrain()};WD.prototype.hasSubtree=function(){return q_(this._bits,MQi)};WD.prototype.hasImagery=function(){return q_(this._bits,PQi)};WD.prototype.hasTerrain=function(){return q_(this._bits,RQi)};WD.prototype.hasChildren=function(){return q_(this._bits,jat)};WD.prototype.hasChild=function(o){return q_(this._bits,TQi[o])};WD.prototype.getChildBitmask=function(){return this._bits&jat};var t2e=WD;function LQi(o){let A=o.length,f=new ArrayBuffer(A),m=new Uint8Array(f);for(let C=0;C<A;++C)m[C]=o.charCodeAt(C);return f}var FQi=LQi(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y
wmi\xD6\xF0\x9Ck\x93\xA1\xBDNu\xE0A[\xDF@V\f\xD9\xBBr\x9B\x81|3S\xEEOl\xD4q\xB0{\xC0\x7FEVZ\xADwUe\v3\x92*\xACl5\xC50s\xF83>mF8J\xB4\xDD\xF0.\xDDu\xDA\x8CDt"\xFAa"\f3"So\xAF9D\v\x8C9\xD99L\xB9\xBF\x7F\xAB\\\x8CP_\x9F"ux\xE9\x07q\x91h;\xC1\xC4\x9B\x7F\xF0<VqH\x82'UfYNe\x98u\xA3aF}a?A\0\x9F\xD7\xB44M\xCE\x87F\xB0\xD5\xB8\x8A'{\x8B\xDC+\xBBMg0\xC8\xD1\xF6\\\x8FP\xFA[/F\x9Bn5/'C.\xEB
\f^\xA5s\x1Be4\xE5l.jC'c#U\xA9?q{gC}:\xAF\xCD\xE2TU\x9C\xFDK\xC6\xE2\x9F/(\xED\xCB\\\xC6-f\x07\x88\xA7;/*"N\xB0k.\xDD\r\x95}}G\xBAC\xB2\xB2+>M\xAA>}\xE6\xCEI\x89\xC6\xE6x\fa1-\xA4O\xA5~q \x88\xEC\r1\xE8N\v\0nPh}=\b\r\x95\xA6n\xA3h\x97$[k\xF3#\xF3\xB6s\xB3\r\v@\xC0\x9F\xD8Q]\xFA".j\xDFI\0\xB9\xA0wU\xC6\xEFj\xBF{GL\x7F\x83\xEE\xDC\xDCF\x85\xA9\xADS\x07+S4\x07\xFF\x94Y\xE48\xE81\x83N\xB9XFk\xCB-#\x86\x92p\x005\x88"\xCF1\xB2&/\xE7\xC3u-6,rt\xB0#G\xB7\xD3\xD1&\x857r\xE2\0\x8CD\xCF\xDA3-\xDE\`\x86i#i*|\xCDKQ\r\x95T9w.)\xEA\x1B\xA6P\xA2j\x8FoP\x99\\>T\xFB\xEFP[\v\x07E\x89m(w7\xDB\x8EJfJo\x99 \xE5p\xE2\xB9q~\fmI-z\xFEr\xC7\xF2Y0\x8F\xBB]s\xE5\xC9 \xEAx\xEC \x90\xF0\x8A\x7FB|G\`\xB0\xBD&\xB7q\xB6\xC7\x9F\xD13\x82=\xD3\xAB\xEEc\x99\xC8+S\xA0D\\q\xC6\xCCD2O<\xCA\xC0)=R\xD3aX\xA9}e\xB4\xDC\xCF\r\xF4=\xF1\b\xA9B\xDA#   \xD8\xBF^PI\xF8M\xC0\xCBGLO\xF7{+\xD8\xC51\x92;\xB5o\xDCl\r\x92\x88\xD1\x9E\xDB?\xE2\xE9\xDA_\xD4\x84\xE2FaZ\xDEU\xCF\xA4\0\xBE\xFD\xCEg\xF1Ji\x97\xE6 H\xD8]\x7F~\xAEq N\xAE\xC0V\xA9\x91<\x82r\xE7v\xEC)I\xD6]-\x83\xE3\xDB6\xA9;f\x97\x87j\xD5\xB6=P^R\xB9K\xC7sWx\xC9\xF4.Y\x07\x95\x93o\xD0KW>''\xC7\`\xDB;\xED\x9ASD>?\x8D\x92mw\xA2
\xEB?R\xA8\xC6U^1I7\x85\xF4\xC5&-\xA9\xBF\x8B'T\xDA\xC3j \xE5*x\xB0\xD6\x90pr\xAA\x8Bh\xBD\x88\xF7_H\xB1~\xC0XL?f\xF9>\xE1e\xC0p\xA7\xCF8i\xAF\xF0VldI\x9C'\xADxtO\xC2\x87\xDEV9\0\xDAw\v\xCB-\x1B\x89\xFB5O\xF5\bQ\`\xC1
ZGM&30x\xDA\xC0\x9CFG\xE2[y\`In7gS
>\xE9\xECF9\xB2\xF14\r\xC6\x84Sun\xE1\fY\xD9\xDE)\x85{II\xA5wy\xBEIV.6\xE7\v:\xBBOb{\xD2M1\x95/\xBD8{\xA8O!\xE1\xECFpv\x95})"x\x88
\x90\xDD\x9D\\\xDA\xDEQ\xCF\xF0\xFCYRe|3\xDF\xF3H\xDA\xBB*u\xDB\`\xB2\xD4\xFC\xED\x1B\xEC\x7F5\xA8\xFF(1\x07-\xC8\xDC\x88F|\x8A["`);function sQ(o){let A=o;typeof A!="string"&&!(A instanceof An)&&(A=o.url);let f=An.createIfNeeded(A);f.appendForwardSlash(),this._resource=f,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=je.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};let m=this;this._readyPromise=NQi(this).then(function(){return m.getQuadTreePacket("",m._quadPacketVersion)}).then(function(){return!0}).catch(function(C){let y=`An error occurred while accessing ${Xat(m,"",1).url}.`;return Promise.reject(new nr(y))})}Object.defineProperties(sQ.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}},readyPromise:{get:function(){return this._readyPromise}}});sQ.tileXYToQuadKey=function(o,A,f){let m="";for(let C=f;C>=0;--C){let y=1<<C,x=0;q_(A,y)?q_(o,y)&&(x|=1):(x|=2,q_(o,y)||(x|=1)),m+=x}return m};sQ.quadKeyToTileXY=function(o){let A=0,f=0,m=o.length-1;for(let C=m;C>=0;--C){let y=1<<C,x=+o[m-C];q_(x,2)?q_(x,1)||(A|=y):(f|=y,q_(x,1)&&(A|=y))}return{x:A,y:f,level:m}};sQ.prototype.isValid=function(o){let A=this.getTileInformationFromQuadKey(o);if(O(A))return A!==null;let f=!0,m=o,C;for(;m.length>1;)if(C=m.substring(m.length-1),m=m.substring(0,m.length-1),A=this.getTileInformationFromQuadKey(m),O(A)){!A.hasSubtree()&&!A.hasChild(parseInt(C))&&(f=!1);break}else if(A===null){f=!1;break}return f};var qat=new Vf("decodeGoogleEarthEnterprisePacket");sQ.prototype.getQuadTreePacket=function(o,A,f){A=Ae(A,1),o=Ae(o,"");let m=Xat(this,o,A,f).fetchArrayBuffer();if(!O(m))return;let C=this._tileInfo,y=this.key;return m.then(function(x){return qat.scheduleTask({buffer:x,quadKey:o,type:"Metadata",key:y},[x]).then(function(v){let E,I=-1;if(o!==""){I=o.length+1;let M=v[o];E=C[o],E._bits|=M._bits,delete v[o]}let w=Object.keys(v);w.sort(function(M,B){return M.length-B.length});let Q=w.length;for(let M=0;M<Q;++M){let B=w[M];if(v[B]!==null){let T=t2e.clone(v[B]),D=B.length;if(D===I)T.setParent(E);else if(D>1){let F=C[B.substring(0,B.length-1)];T.setParent(F)}C[B]=T}else C[B]=null}})})};sQ.prototype.populateSubtree=function(o,A,f,m){let C=sQ.tileXYToQuadKey(o,A,f);return PCe(this,C,m)};function PCe(o,A,f){let m=o._tileInfo,C=A,y=m[C];if(O(y)&&(!y.hasSubtree()||y.hasChildren()))return y;for(;y===void 0&&C.length>1;)C=C.substring(0,C.length-1),y=m[C];let x,v=o._subtreePromises,E=v[C];if(O(E))return E.then(function(){return x=new cC({throttle:f.throttle,throttleByServer:f.throttleByServer,type:f.type,priorityFunction:f.priorityFunction}),PCe(o,A,x)});if(!O(y)||!y.hasSubtree())return Promise.reject(new nr(`Couldn't load metadata for tile ${A}`));if(E=o.getQuadTreePacket(C,y.cnodeVersion,f),!!O(E))return v[C]=E,E.then(function(){return x=new cC({throttle:f.throttle,throttleByServer:f.throttleByServer,type:f.type,priorityFunction:f.priorityFunction}),PCe(o,A,x)}).finally(function(){delete v[C]})}sQ.prototype.getTileInformation=function(o,A,f){let m=sQ.tileXYToQuadKey(o,A,f);return this._tileInfo[m]};sQ.prototype.getTileInformationFromQuadKey=function(o){return this._tileInfo[o]};function Xat(o,A,f,m){return o._resource.getDerivedResource({url:`flatfile?q2-0${A}-q.${f.toString()}`,request:m})}var lpe,upe;function NQi(o){let A=o._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!O(upe)){let f=xs("ThirdParty/google-earth-dbroot-parser.js"),m=window.cesiumGoogleEarthDbRootParser;upe=Uie(f).then(function(){lpe=window.cesiumGoogleEarthDbRootParser(SQi),O(m)?window.cesiumGoogleEarthDbRootParser=m:delete window.cesiumGoogleEarthDbRootParser})}return upe.then(function(){return A.fetchArrayBuffer()}).then(function(f){let m=lpe.EncryptedDbRootProto.decode(new Uint8Array(f)),C=m.encryptionData,y=C.byteOffset,x=y+C.byteLength,v=o.key=C.buffer.slice(y,x);C=m.dbrootData,y=C.byteOffset,x=y+C.byteLength;let E=C.buffer.slice(y,x);return qat.scheduleTask({buffer:E,type:"DbRoot",key:v},[E])}).then(function(f){let m=lpe.DbRootProto.decode(new Uint8Array(f.buffer));if(o.imageryPresent=Ae(m.imageryPresent,o.imageryPresent),o.protoImagery=m.protoImagery,o.terrainPresent=Ae(m.terrainPresent,o.terrainPresent),O(m.endSnippet)&&O(m.endSnippet.model)){let v=m.endSnippet.model;o.negativeAltitudeExponentBias=Ae(v.negativeAltitudeExponentBias,o.negativeAltitudeExponentBias),o.negativeAltitudeThreshold=Ae(v.compressedNegativeAltitudeThreshold,o.negativeAltitudeThreshold)}O(m.databaseVersion)&&(o._quadPacketVersion=Ae(m.databaseVersion.quadtreeVersion,o._quadPacketVersion));let C=o.providers,y=Ae(m.providerInfo,[]),x=y.length;for(let v=0;v<x;++v){let E=y[v],I=E.copyrightString;O(I)&&(C[E.providerId]=new tl(I.value))}}).catch(function(){console.log(`Failed to retrieve ${A.url}. Using defaults.`),o.key=FQi})}var EN=sQ;function wO(o){o=Ae(o,Ae.EMPTY_OBJECT),this._buffer=o.buffer,this._credits=o.credits,this._negativeAltitudeExponentBias=o.negativeAltitudeExponentBias,this._negativeElevationThreshold=o.negativeElevationThreshold;let A=Ae(o.childTileMask,15),f=A&3;f|=A&4?8:0,f|=A&8?4:0,this._childTileMask=f,this._createdByUpsampling=Ae(o.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}Object.defineProperties(wO.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var Zat="createVerticesFromGoogleEarthEnterpriseBuffer",kQi=new Vf(Zat),OQi=new Vf(Zat,AO.maximumAsynchronousTasks),A7e=new Si,cpe=new Si;wO.prototype.createMesh=function(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.tilingScheme,f=o.x,m=o.y,C=o.level,y=Ae(o.exaggeration,1),x=Ae(o.exaggerationRelativeHeight,0),v=Ae(o.throttle,!0),E=A.ellipsoid;A.tileXYToNativeRectangle(f,m,C,A7e),A.tileXYToRectangle(f,m,C,cpe);let I=E.cartographicToCartesian(Si.center(cpe)),w=40075.16/(1<<C);this._skirtHeight=Math.min(w*8,1e3);let Q=(v?OQi:kQi).scheduleTask({buffer:this._buffer,nativeRectangle:A7e,rectangle:cpe,relativeToCenter:I,ellipsoid:E,skirtHeight:this._skirtHeight,exaggeration:y,exaggerationRelativeHeight:x,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(!O(Q))return;let M=this;return Q.then(function(B){return M._mesh=new hO(I,new Float32Array(B.vertices),new Uint16Array(B.indices),B.indexCountWithoutSkirts,B.vertexCountWithoutSkirts,B.minimumHeight,B.maximumHeight,wi.clone(B.boundingSphere3D),ee.clone(B.occludeePointInScaledSpace),B.numberOfAttributes,Hf.clone(B.orientedBoundingBox),HM.clone(B.encoding),B.westIndicesSouthToNorth,B.southIndicesEastToWest,B.eastIndicesNorthToSouth,B.northIndicesWestToEast),M._minimumHeight=B.minimumHeight,M._maximumHeight=B.maximumHeight,M._buffer=void 0,M._mesh})};wO.prototype.interpolateHeight=function(o,A,f){let m=je.clamp((A-o.west)/o.width,0,1),C=je.clamp((f-o.south)/o.height,0,1);return O(this._mesh)?zQi(this,m,C):JQi(this,m,C,o)};var UQi=new Vf("upsampleQuantizedTerrainMesh",AO.maximumAsynchronousTasks);wO.prototype.upsample=function(o,A,f,m,C,y,x){let v=this._mesh;if(!O(this._mesh))return;let E=A*2!==C,I=f*2===y,w=o.ellipsoid,Q=o.tileXYToRectangle(C,y,x),M=UQi.scheduleTask({vertices:v.vertices,indices:v.indices,indexCountWithoutSkirts:v.indexCountWithoutSkirts,vertexCountWithoutSkirts:v.vertexCountWithoutSkirts,encoding:v.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:E,isNorthChild:I,childRectangle:Q,ellipsoid:w});if(!O(M))return;let B=this;return M.then(function(T){let D=new Uint16Array(T.vertices),F=Nn.createTypedArray(D.length/3,T.indices),L=B._skirtHeight;return new doe({quantizedVertices:D,indices:F,minimumHeight:T.minimumHeight,maximumHeight:T.maximumHeight,boundingSphere:wi.clone(T.boundingSphere),orientedBoundingBox:Hf.clone(T.orientedBoundingBox),horizonOcclusionPoint:ee.clone(T.horizonOcclusionPoint),westIndices:T.westIndices,southIndices:T.southIndices,eastIndices:T.eastIndices,northIndices:T.northIndices,westSkirtHeight:L,southSkirtHeight:L,eastSkirtHeight:L,northSkirtHeight:L,childTileMask:0,createdByUpsampling:!0,credits:B._credits})})};wO.prototype.isChildAvailable=function(o,A,f,m){let C=2;return f!==o*2&&++C,m!==A*2&&(C-=2),(this._childTileMask&1<<C)!==0};wO.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var GQi=new It,HQi=new It,VQi=new It,$at=new ee;function zQi(o,A,f){let m=o._mesh,C=m.vertices,y=m.encoding,x=m.indices;for(let v=0,E=x.length;v<E;v+=3){let I=x[v],w=x[v+1],Q=x[v+2],M=y.decodeTextureCoordinates(C,I,GQi),B=y.decodeTextureCoordinates(C,w,HQi),T=y.decodeTextureCoordinates(C,Q,VQi),D=$6.computeBarycentricCoordinates(A,f,M.x,M.y,B.x,B.y,T.x,T.y,$at);if(D.x>=-1e-15&&D.y>=-1e-15&&D.z>=-1e-15){let F=y.decodeHeight(C,I),L=y.decodeHeight(C,w),R=y.decodeHeight(C,Q);return D.x*F+D.y*L+D.z*R}}}var KQi=Uint16Array.BYTES_PER_ELEMENT,h7e=Uint32Array.BYTES_PER_ELEMENT,Ape=Int32Array.BYTES_PER_ELEMENT,YQi=Float32Array.BYTES_PER_ELEMENT,hpe=Float64Array.BYTES_PER_ELEMENT;function JQi(o,A,f,m){let C=o._buffer,y=0,x=0,v=0;f>.5?(A>.5?(y=2,x=.5):y=3,v=.5):A>.5&&(y=1,x=.5);let E=new DataView(C),I=0;for(let V=0;V<y;++V)I+=E.getUint32(I,!0),I+=h7e;I+=h7e,I+=2*hpe;let w=je.toRadians(E.getFloat64(I,!0)*180);I+=hpe;let Q=je.toRadians(E.getFloat64(I,!0)*180);I+=hpe;let M=m.width/w/2,B=m.height/Q/2,T=E.getInt32(I,!0);I+=Ape;let D=E.getInt32(I,!0)*3;I+=Ape,I+=Ape;let F=new Array(T),L=new Array(T),R=new Array(T),k;for(k=0;k<T;++k)F[k]=x+E.getUint8(I++)*M,L[k]=v+E.getUint8(I++)*B,R[k]=E.getFloat32(I,!0)*6371010,I+=YQi;let U=new Array(D);for(k=0;k<D;++k)U[k]=E.getUint16(I,!0),I+=KQi;for(k=0;k<D;k+=3){let V=U[k],H=U[k+1],q=U[k+2],ie=F[V],Z=F[H],oe=F[q],ne=L[V],se=L[H],ce=L[q],j=$6.computeBarycentricCoordinates(A,f,ie,ne,Z,se,oe,ce,$at);if(j.x>=-1e-15&&j.y>=-1e-15&&j.z>=-1e-15)return j.x*R[V]+j.y*R[H]+j.z*R[q]}}var Bie=wO,I1={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},F$=new fi;function mae(){this._terrainCache={},this._lastTidy=fi.now()}mae.prototype.add=function(o,A){this._terrainCache[o]={buffer:A,timestamp:fi.now()}};mae.prototype.get=function(o){let A=this._terrainCache[o];if(O(A))return delete this._terrainCache[o],A.buffer};mae.prototype.tidy=function(){if(fi.now(F$),fi.secondsDifference(F$,this._lastTidy)>10){let o=this._terrainCache,A=Object.keys(o),f=A.length;for(let m=0;m<f;++m){let C=A[m],y=o[C];fi.secondsDifference(F$,y.timestamp)>10&&delete o[C]}fi.clone(F$,this._lastTidy)}};function CH(o){o=Ae(o,Ae.EMPTY_OBJECT);let A;if(O(o.metadata))A=o.metadata;else{let y=An.createIfNeeded(o.url);A=new EN(y)}this._metadata=A,this._tilingScheme=new af({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Si(-je.PI,-je.PI,je.PI,je.PI),ellipsoid:o.ellipsoid});let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new mae,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new br,this._ready=!1;let m=this,C;this._readyPromise=A.readyPromise.then(function(y){if(!A.terrainPresent){let x=new nr(`The server ${A.url} doesn't have terrain`);return C=wc.reportError(C,m,m._errorEvent,x.message,void 0,void 0,void 0,x),Promise.reject(x)}return wc.reportSuccess(C),m._ready=y,y}).catch(function(y){return C=wc.reportError(C,m,m._errorEvent,y.message,void 0,void 0,void 0,y),Promise.reject(y)})}Object.defineProperties(CH.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var WQi=new Vf("decodeGoogleEarthEnterprisePacket");function d7e(o,A,f){let m=A.getChildBitmask();if(A.terrainState===I1.PARENT){m=0;for(let C=0;C<4;++C){let y=f.getTileInformationFromQuadKey(o+C.toString());O(y)&&y.hasTerrain()&&(m|=1<<C)}}return m}CH.prototype.requestTileGeometry=function(o,A,f,m){let C=EN.tileXYToQuadKey(o,A,f),y=this._terrainCache,x=this._metadata,v=x.getTileInformationFromQuadKey(C);if(!O(v))return Promise.reject(new nr("Terrain tile doesn't exist"));let E=v.terrainState;O(E)||(E=v.terrainState=I1.UNKNOWN);let I=y.get(C);if(O(I)){let L=x.providers[v.terrainProvider];return Promise.resolve(new Bie({buffer:I,childTileMask:d7e(C,v,x),credits:O(L)?[L]:void 0,negativeAltitudeExponentBias:x.negativeAltitudeExponentBias,negativeElevationThreshold:x.negativeAltitudeThreshold}))}if(y.tidy(),v.ancestorHasTerrain){if(E===I1.NONE)return Promise.reject(new nr("Terrain tile doesn't exist"))}else return Promise.resolve(new wQ({buffer:new Uint8Array(16*16),width:16,height:16}));let w,Q=C,M=-1;switch(E){case I1.SELF:M=v.terrainVersion;break;case I1.PARENT:Q=Q.substring(0,Q.length-1),w=x.getTileInformationFromQuadKey(Q),M=w.terrainVersion;break;case I1.UNKNOWN:v.hasTerrain()?M=v.terrainVersion:(Q=Q.substring(0,Q.length-1),w=x.getTileInformationFromQuadKey(Q),O(w)&&w.hasTerrain()&&(M=w.terrainVersion));break}if(M<0)return Promise.reject(new nr("Terrain tile doesn't exist"));let B=this._terrainPromises,T=this._terrainRequests,D,F;if(O(B[Q]))D=B[Q],F=T[Q];else{F=m;let L=jQi(this,Q,M,F).fetchArrayBuffer();if(!O(L))return;D=L.then(function(R){return O(R)?WQi.scheduleTask({buffer:R,type:"Terrain",key:x.key},[R]).then(function(k){let U=x.getTileInformationFromQuadKey(Q);U.terrainState=I1.SELF,y.add(Q,k[0]);let V=U.terrainProvider,H=k.length-1;for(let q=0;q<H;++q){let ie=Q+q.toString(),Z=x.getTileInformationFromQuadKey(ie);O(Z)&&(y.add(ie,k[q+1]),Z.terrainState=I1.PARENT,Z.terrainProvider===0&&(Z.terrainProvider=V))}}):Promise.reject(new nr("Failed to load terrain."))}),B[Q]=D,T[Q]=F,D=D.finally(function(){delete B[Q],delete T[Q]})}return D.then(function(){let L=y.get(C);if(O(L)){let R=x.providers[v.terrainProvider];return new Bie({buffer:L,childTileMask:d7e(C,v,x),credits:O(R)?[R]:void 0,negativeAltitudeExponentBias:x.negativeAltitudeExponentBias,negativeElevationThreshold:x.negativeAltitudeThreshold})}return Promise.reject(new nr("Failed to load terrain."))}).catch(function(L){return F.state===yA.CANCELLED?(m.state=F.state,Promise.reject(L)):(v.terrainState=I1.NONE,Promise.reject(L))})};CH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};CH.prototype.getTileDataAvailable=function(o,A,f){let m=this._metadata,C=EN.tileXYToQuadKey(o,A,f),y=m.getTileInformation(o,A,f);if(y===null)return!1;if(O(y)){if(!y.ancestorHasTerrain)return!0;let x=y.terrainState;if(x===I1.NONE)return!1;if((!O(x)||x===I1.UNKNOWN)&&(y.terrainState=I1.UNKNOWN,!y.hasTerrain())){C=C.substring(0,C.length-1);let v=m.getTileInformationFromQuadKey(C);if(!O(v)||!v.hasTerrain())return!1}return!0}if(m.isValid(C)){let x=new cC({throttle:!1,throttleByServer:!0,type:oB.TERRAIN});m.populateSubtree(o,A,f,x)}return!1};CH.prototype.loadTileDataAvailability=function(o,A,f){};function jQi(o,A,f,m){return f=O(f)&&f>0?f:1,o._metadata.resource.getDerivedResource({url:`flatfile?f1c-0${A}-t.${f.toString()}`,request:m})}var est=CH,aW={};aW.type=void 0;aW.getRequiredDataPoints=Ui.throwInstantiationError;aW.interpolateOrderZero=Ui.throwInstantiationError;aW.interpolate=Ui.throwInstantiationError;var tst=aW,qQi=new Vf("transcodeCRNToDXT",Number.POSITIVE_INFINITY);function XQi(o){let A;if(o instanceof ArrayBuffer||ArrayBuffer.isView(o)?A=Promise.resolve(o):A=An.createIfNeeded(o).fetchArrayBuffer(),!!O(A))return A.then(function(f){if(!O(f))return;let m=[];return f instanceof ArrayBuffer?m.push(f):(f.byteOffset===0&&f.byteLength===f.buffer.byteLength||(f=f.slice(0,f.length)),m.push(f.buffer)),qQi.scheduleTask(f,m)}).then(function(f){return oY.clone(f)})}var ist=XQi,$k={};$k.defaultAccessToken=void 0;var f7e=!1,dpe,rst="<b>This application is using Cesium's default Mapbox access token.  Please create a new access token for the application as soon as possible and prior to deployment by visiting <a href=https://www.mapbox.com/account/apps/>https://www.mapbox.com/account/apps/</a>, and provide your token to Cesium by setting the Cesium.MapboxApi.defaultAccessToken property before constructing the CesiumWidget or any other object that uses the Mapbox API.</b>";$k.getAccessToken=function(o){return O(o)?o:O($k.defaultAccessToken)?$k.defaultAccessToken:(f7e||(console.log(rst),f7e=!0),"pk.eyJ1IjoiYW5hbHl0aWNhbGdyYXBoaWNzIiwiYSI6ImNpd204Zm4wejAwNzYyeW5uNjYyZmFwdWEifQ.7i-VIZZWX8pd1bTfxIVj9g")};$k.getErrorCredit=function(o){if(!(O(o)||O($k.defaultAccessToken)))return O(dpe)||(dpe=new tl(rst,!0)),dpe};var nst=$k;function Cae(){Ui.throwInstantiationError()}Object.defineProperties(Cae.prototype,{ellipsoid:{get:Ui.throwInstantiationError}});Cae.prototype.project=Ui.throwInstantiationError;Cae.prototype.unproject=Ui.throwInstantiationError;var ost=Cae;function yH(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.weights,f=o.times;this._times=f,this._weights=A,this._count=A.length/f.length,this._lastTimeIndex=0}Object.defineProperties(yH.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});yH.prototype.findTimeInterval=uf.prototype.findTimeInterval;yH.prototype.wrapTime=uf.prototype.wrapTime;yH.prototype.clampTime=uf.prototype.clampTime;yH.prototype.evaluate=function(o,A){let f=this.weights,m=this.times,C=this._lastTimeIndex=this.findTimeInterval(o,this._lastTimeIndex),y=(o-m[C])/(m[C+1]-m[C]);O(A)||(A=new Array(this._count));for(let x=0;x<this._count;x++){let v=C*this._count+x;A[x]=f[v]*(1-y)+f[v+this._count]*y}return A};var ast=yH;function i2e(o,A,f){o=An.createIfNeeded(o),o.appendForwardSlash(),o.setQueryParameters({key:A}),this._url=o,this._params=Ae(f,{})}Object.defineProperties(i2e.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}}});i2e.prototype.geocode=function(o){return this._url.getDerivedResource({url:"json",queryParameters:ia(this._params,{q:o})}).fetchJson().then(function(A){return A.results.map(function(f){let m,C=f.bounds;if(O(C))m=Si.fromDegrees(C.southwest.lng,C.southwest.lat,C.northeast.lng,C.northeast.lat);else{let y=f.geometry.lat,x=f.geometry.lng;m=ee.fromDegrees(y,x)}return{displayName:f.formatted,destination:m}})})};var sst=i2e,ZQi={packedLength:void 0,pack:Ui.throwInstantiationError,unpack:Ui.throwInstantiationError},lst=ZQi,$Qi={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:Ui.throwInstantiationError,unpackInterpolationResult:Ui.throwInstantiationError},ust=$Qi,eSi=new ee;function tSi(o,A,f,m){let C=dre(o,A,f,m,eSi);return O(C)?C.x>0&&C.y>0&&C.z>0:!1}var cst=tSi;function Ast(){Ui.throwInstantiationError()}Ast.prototype.getURL=Ui.throwInstantiationError;var hst=Ast;function iSi(o,A,f,m,C,y,x){let v=XA.numberOfPoints(o,A,C),E,I=f.red,w=f.green,Q=f.blue,M=f.alpha,B=m.red,T=m.green,D=m.blue,F=m.alpha;if(At.equals(f,m)){for(E=0;E<v;E++)y[x++]=At.floatToByte(I),y[x++]=At.floatToByte(w),y[x++]=At.floatToByte(Q),y[x++]=At.floatToByte(M);return x}let L=(B-I)/v,R=(T-w)/v,k=(D-Q)/v,U=(F-M)/v,V=x;for(E=0;E<v;E++)y[V++]=At.floatToByte(I+E*L),y[V++]=At.floatToByte(w+E*R),y[V++]=At.floatToByte(Q+E*k),y[V++]=At.floatToByte(M+E*U);return V}function XK(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.positions,f=o.colors,m=Ae(o.colorsPerVertex,!1);this._positions=A,this._colors=f,this._colorsPerVertex=m,this._arcType=Ae(o.arcType,Pa.GEODESIC),this._granularity=Ae(o.granularity,je.RADIANS_PER_DEGREE),this._ellipsoid=Ae(o.ellipsoid,Di.WGS84),this._workerName="createSimplePolylineGeometry";let C=1+A.length*ee.packedLength;C+=O(f)?1+f.length*At.packedLength:1,this.packedLength=C+Di.packedLength+3}XK.pack=function(o,A,f){f=Ae(f,0);let m,C=o._positions,y=C.length;for(A[f++]=y,m=0;m<y;++m,f+=ee.packedLength)ee.pack(C[m],A,f);let x=o._colors;for(y=O(x)?x.length:0,A[f++]=y,m=0;m<y;++m,f+=At.packedLength)At.pack(x[m],A,f);return Di.pack(o._ellipsoid,A,f),f+=Di.packedLength,A[f++]=o._colorsPerVertex?1:0,A[f++]=o._arcType,A[f]=o._granularity,A};XK.unpack=function(o,A,f){A=Ae(A,0);let m,C=o[A++],y=new Array(C);for(m=0;m<C;++m,A+=ee.packedLength)y[m]=ee.unpack(o,A);C=o[A++];let x=C>0?new Array(C):void 0;for(m=0;m<C;++m,A+=At.packedLength)x[m]=At.unpack(o,A);let v=Di.unpack(o,A);A+=Di.packedLength;let E=o[A++]===1,I=o[A++],w=o[A];return O(f)?(f._positions=y,f._colors=x,f._ellipsoid=v,f._colorsPerVertex=E,f._arcType=I,f._granularity=w,f):new XK({positions:y,colors:x,ellipsoid:v,colorsPerVertex:E,arcType:I,granularity:w})};var Ree=new Array(2),Lee=new Array(2),rSi={positions:Ree,height:Lee,ellipsoid:void 0,minDistance:void 0,granularity:void 0};XK.createGeometry=function(o){let A=o._positions,f=o._colors,m=o._colorsPerVertex,C=o._arcType,y=o._granularity,x=o._ellipsoid,v=je.chordLength(y,x.maximumRadius),E=O(f)&&!m,I,w=A.length,Q,M,B,T,D=0;if(C===Pa.GEODESIC||C===Pa.RHUMB){let U,V,H;C===Pa.GEODESIC?(U=je.chordLength(y,x.maximumRadius),V=XA.numberOfPoints,H=XA.generateArc):(U=y,V=XA.numberOfPointsRhumbLine,H=XA.generateRhumbArc);let q=XA.extractHeights(A,x),ie=rSi;if(C===Pa.GEODESIC?ie.minDistance=v:ie.granularity=y,ie.ellipsoid=x,E){let Z=0;for(I=0;I<w-1;I++)Z+=V(A[I],A[I+1],U)+1;Q=new Float64Array(Z*3),B=new Uint8Array(Z*4),ie.positions=Ree,ie.height=Lee;let oe=0;for(I=0;I<w-1;++I){Ree[0]=A[I],Ree[1]=A[I+1],Lee[0]=q[I],Lee[1]=q[I+1];let ne=H(ie);if(O(f)){let se=ne.length/3;T=f[I];for(let ce=0;ce<se;++ce)B[oe++]=At.floatToByte(T.red),B[oe++]=At.floatToByte(T.green),B[oe++]=At.floatToByte(T.blue),B[oe++]=At.floatToByte(T.alpha)}Q.set(ne,D),D+=ne.length}}else if(ie.positions=A,ie.height=q,Q=new Float64Array(H(ie)),O(f)){for(B=new Uint8Array(Q.length/3*4),I=0;I<w-1;++I){let oe=A[I],ne=A[I+1],se=f[I],ce=f[I+1];D=iSi(oe,ne,se,ce,v,B,D)}let Z=f[w-1];B[D++]=At.floatToByte(Z.red),B[D++]=At.floatToByte(Z.green),B[D++]=At.floatToByte(Z.blue),B[D++]=At.floatToByte(Z.alpha)}}else{M=E?w*2-2:w,Q=new Float64Array(M*3),B=O(f)?new Uint8Array(M*4):void 0;let U=0,V=0;for(I=0;I<w;++I){let H=A[I];if(E&&I>0&&(ee.pack(H,Q,U),U+=3,T=f[I-1],B[V++]=At.floatToByte(T.red),B[V++]=At.floatToByte(T.green),B[V++]=At.floatToByte(T.blue),B[V++]=At.floatToByte(T.alpha)),E&&I===w-1)break;ee.pack(H,Q,U),U+=3,O(f)&&(T=f[I],B[V++]=At.floatToByte(T.red),B[V++]=At.floatToByte(T.green),B[V++]=At.floatToByte(T.blue),B[V++]=At.floatToByte(T.alpha))}}let F=new yc;F.position=new Yr({componentDatatype:ei.DOUBLE,componentsPerAttribute:3,values:Q}),O(f)&&(F.color=new Yr({componentDatatype:ei.UNSIGNED_BYTE,componentsPerAttribute:4,values:B,normalize:!0})),M=Q.length/3;let L=(M-1)*2,R=Nn.createTypedArray(M,L),k=0;for(I=0;I<M-1;++I)R[k++]=I,R[k++]=I+1;return new Zo({attributes:F,indices:R,primitiveType:yn.LINES,boundingSphere:wi.fromPoints(A)})};var dst=XK;function J8(o){let A=Ae(o.radius,1),f={radii:new ee(A,A,A),stackPartitions:o.stackPartitions,slicePartitions:o.slicePartitions,vertexFormat:o.vertexFormat};this._ellipsoidGeometry=new gC(f),this._workerName="createSphereGeometry"}J8.packedLength=gC.packedLength;J8.pack=function(o,A,f){return gC.pack(o._ellipsoidGeometry,A,f)};var nSi=new gC,_L={radius:void 0,radii:new ee,vertexFormat:new Wr,stackPartitions:void 0,slicePartitions:void 0};J8.unpack=function(o,A,f){let m=gC.unpack(o,A,nSi);return _L.vertexFormat=Wr.clone(m._vertexFormat,_L.vertexFormat),_L.stackPartitions=m._stackPartitions,_L.slicePartitions=m._slicePartitions,O(f)?(ee.clone(m._radii,_L.radii),f._ellipsoidGeometry=new gC(_L),f):(_L.radius=m._radii.x,new J8(_L))};J8.createGeometry=function(o){return gC.createGeometry(o._ellipsoidGeometry)};var fst=J8;function IN(o){}Object.defineProperties(IN.prototype,{ellipsoid:{get:Ui.throwInstantiationError},rectangle:{get:Ui.throwInstantiationError},projection:{get:Ui.throwInstantiationError}});IN.prototype.getNumberOfXTilesAtLevel=Ui.throwInstantiationError;IN.prototype.getNumberOfYTilesAtLevel=Ui.throwInstantiationError;IN.prototype.rectangleToNativeRectangle=Ui.throwInstantiationError;IN.prototype.tileXYToNativeRectangle=Ui.throwInstantiationError;IN.prototype.tileXYToRectangle=Ui.throwInstantiationError;IN.prototype.positionToTileXY=Ui.throwInstantiationError;var gst=IN;function M5(o){o=Ae(o,Ae.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=o.clock,this.element=o.element,this.epoch=Ae(o.epoch,Cn.MINIMUM_VALUE),this.tolerance=Ae(o.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}Object.defineProperties(M5.prototype,{clock:{get:function(){return this._clock},set:function(o){let A=this._clock;A!==o&&(O(A)&&(this._clockSubscription(),this._clockSubscription=void 0),O(o)&&(this._clockSubscription=o.onTick.addEventListener(M5.prototype._onTick,this)),this._clock=o)}},element:{get:function(){return this._element},set:function(o){let A=this._element;A!==o&&(O(A)&&A.removeEventListener("seeked",this._seekFunction,!1),O(o)&&(this._seeking=!1,this._seekFunction=oSi(this),o.addEventListener("seeked",this._seekFunction,!1)),this._element=o,this._seeking=!1,this._firstTickAfterSeek=!1)}}});M5.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,Qr(this)};M5.prototype.isDestroyed=function(){return!1};M5.prototype._trySetPlaybackRate=function(o){if(this._lastPlaybackRate===o.multiplier)return;let A=this._element;try{A.playbackRate=o.multiplier}catch{A.playbackRate=0}this._lastPlaybackRate=o.multiplier};M5.prototype._onTick=function(o){let A=this._element;if(!O(A)||A.readyState<2)return;let f=A.paused,m=o.shouldAnimate;if(m===f&&(m?A.play():A.pause()),this._seeking||this._firstTickAfterSeek){this._firstTickAfterSeek=!1;return}this._trySetPlaybackRate(o);let C=o.currentTime,y=Ae(this.epoch,Cn.MINIMUM_VALUE),x=fi.secondsDifference(C,y),v=A.duration,E,I=A.currentTime;A.loop?(x=x%v,x<0&&(x=v-x),E=x):x>v?E=v:x<0?E=0:E=x;let w=m?Ae(this.tolerance,1):.001;Math.abs(E-I)>w&&(this._seeking=!0,A.currentTime=E)};function oSi(o){return function(){o._seeking=!1,o._firstTickAfterSeek=!0}}var pst=M5;function aSi(o,A){this.rectangle=o,this.maxLevel=A}function xH(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=An.createIfNeeded(o.url);this._resource=A,this._errorEvent=new br,this._ready=!1,this._terrainDataStructure={heightScale:1/1e3,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:256*256*256-1};let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._tilingScheme=void 0,this._rectangles=[];let m=this,C,y=Ae(o.ellipsoid,Di.WGS84);function x(I){let w=I.getElementsByTagName("SRS")[0].textContent;if(w==="EPSG:4326")m._tilingScheme=new af({ellipsoid:y});else return Promise.reject(new nr(`SRS ${w} is not supported.`));let Q=I.getElementsByTagName("TileFormat")[0];m._heightmapWidth=parseInt(Q.getAttribute("width"),10),m._heightmapHeight=parseInt(Q.getAttribute("height"),10),m._levelZeroMaximumGeometricError=Cx.getEstimatedLevelZeroGeometricErrorForAHeightmap(y,Math.min(m._heightmapWidth,m._heightmapHeight),m._tilingScheme.getNumberOfXTilesAtLevel(0));let M=I.getElementsByTagName("DataExtent");for(let B=0;B<M.length;++B){let T=M[B],D=je.toRadians(parseFloat(T.getAttribute("minx"))),F=je.toRadians(parseFloat(T.getAttribute("miny"))),L=je.toRadians(parseFloat(T.getAttribute("maxx"))),R=je.toRadians(parseFloat(T.getAttribute("maxy"))),k=parseInt(T.getAttribute("maxlevel"),10);m._rectangles.push(new aSi(new Si(D,F,L,R),k))}return m._ready=!0,Promise.resolve(!0)}function v(I){let w=Ae(O(I)?I.message:void 0,`An error occurred while accessing ${m._resource.url}.`);return C=wc.reportError(C,m,m._errorEvent,w),C.retry?E():Promise.reject(new nr(w))}function E(){return m._resource.fetchXML().then(x).catch(v)}this._readyPromise=E()}Object.defineProperties(xH.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});xH.prototype.requestTileGeometry=function(o,A,f,m){let C=this._tilingScheme.getNumberOfYTilesAtLevel(f),y=this._resource.getDerivedResource({url:`${f}/${o}/${C-A-1}.tif`,queryParameters:{cesium:!0},request:m}).fetchImage({preferImageBitmap:!0});if(!O(y))return;let x=this;return Promise.resolve(y).then(function(v){return new wQ({buffer:i5(v),width:x._heightmapWidth,height:x._heightmapHeight,childTileMask:sSi(x,o,A,f),structure:x._terrainDataStructure})})};xH.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)};var mst=new Si;function sSi(o,A,f,m){let C=o._tilingScheme,y=o._rectangles,x=C.tileXYToRectangle(A,f,m),v=0;for(let E=0;E<y.length&&v!==15;++E){let I=y[E];if(I.maxLevel<=m)continue;let w=I.rectangle,Q=Si.intersection(w,x,mst);O(Q)&&(N$(C,w,A*2,f*2,m+1)&&(v|=4),N$(C,w,A*2+1,f*2,m+1)&&(v|=8),N$(C,w,A*2,f*2+1,m+1)&&(v|=1),N$(C,w,A*2+1,f*2+1,m+1)&&(v|=2))}return v}function N$(o,A,f,m,C){let y=o.tileXYToRectangle(f,m,C);return O(Si.intersection(y,A,mst))}xH.prototype.getTileDataAvailable=function(o,A,f){};xH.prototype.loadTileDataAvailability=function(o,A,f){};var Cst=xH,lSi={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},yst=Object.freeze(lSi);function uSi(o){switch(o){case Ii.FLOAT:return"float";case Ii.FLOAT_VEC2:return"vec2";case Ii.FLOAT_VEC3:return"vec3";case Ii.FLOAT_VEC4:return"vec4";case Ii.FLOAT_MAT2:return"mat2";case Ii.FLOAT_MAT3:return"mat3";case Ii.FLOAT_MAT4:return"mat4";case Ii.SAMPLER_2D:return"sampler2D";case Ii.BOOL:return"bool"}}var xst=uSi;function cSi(o,A,f){return function(){f.apply(o,arguments),A.apply(o,arguments)}}var r2e=cSi,vst=`uniform sampler2D u_depthTexture;
varying vec2 v_textureCoordinates;
void main()
{
@@ -15162,7 +15108,7 @@
float scale = pow(z_ndc * 0.5 + 0.5, 8.0);
gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);
}
`,clt=`uniform sampler2D colorTexture;
`,Est=`uniform sampler2D colorTexture;
varying vec2 v_textureCoordinates;
float hash(float x)
{
@@ -15183,7 +15129,7 @@
c*=v*b;
gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c,1), 0.5);
}
`,Alt=`uniform sampler2D colorTexture;
`,Ist=`uniform sampler2D colorTexture;
varying vec2 v_textureCoordinates;
float snow(vec2 uv,float scale)
{
@@ -15211,7 +15157,7 @@
finalColor=(vec3(c));
gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.5);
}
`,hlt=`varying vec2 v_textureCoordinates;
`,_st=`varying vec2 v_textureCoordinates;
uniform sampler2D colorTexture;
const float _BlurRadius = 5.0;
const int _Iteration = 30;
@@ -15240,7 +15186,7 @@
vec2 sunTexcoord = sunPos.xy * 0.5 + vec2(0.5);
gl_FragColor = getColor(v_textureCoordinates, sunTexcoord);
}
`,dlt=`varying vec2 v_textureCoordinates;
`,Bst=`varying vec2 v_textureCoordinates;
uniform sampler2D colorTexture;
const float threshold = 0.5;
void main()
@@ -15249,17 +15195,71 @@
float brightness = dot(fragColor.rgb, vec3(0.2126, 0.7152, 0.0722));
gl_FragColor = brightness > threshold ? vec4(fragColor.rgb, 1.0) : vec4(0.0, 0.0, 0.0, 1.0);
}
`;function P2i(o){return function(A){let f=o._scene.pick(A.position);O(f)&&f.primitive instanceof Fx&&(o.tileset=f.primitive),o.pickActive=!1}}function flt(o,A){A?o._eventHandler.setInputAction(function(f){let m=o._scene.pick(f.endPosition);O(m)&&m.primitive instanceof Fx&&(o.tileset=m.primitive)},Ki.MOUSE_MOVE):(o._eventHandler.removeInputAction(Ki.MOUSE_MOVE),o.picking=o.picking)}var R2i={maximumFractionDigits:3};function k7(o){let A=o/1048576;return A<1?A.toLocaleString(void 0,R2i):Math.round(A).toLocaleString()}function ZK(o,A){if(!O(o))return"";let f=A?o._statisticsPerPass[Ep.PICK]:o._statisticsPerPass[Ep.RENDER],m='<ul class="cesium-cesiumInspector-statistics">';return m+=`<li><strong>\u8BBF\u95EE: </strong>${f.visited.toLocaleString()}</li><li><strong>\u9009\u62E9: </strong>${f.selected.toLocaleString()}</li><li><strong>\u7ED8\u5236\u547D\u4EE4: </strong>${f.numberOfCommands.toLocaleString()}</li>`,m+="</ul>",A||(m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u8BF7\u6C42: </strong>${f.numberOfPendingRequests.toLocaleString()}</li><li><strong>\u5C1D\u8BD5: </strong>${f.numberOfAttemptedRequests.toLocaleString()}</li><li><strong>\u5904\u7406\u4E2D: </strong>${f.numberOfTilesProcessing.toLocaleString()}</li><li><strong>\u5185\u5BB9\u5C31\u7EEA: </strong>${f.numberOfTilesWithContentReady.toLocaleString()}</li><li><strong>\u603B\u5171: </strong>${f.numberOfTilesTotal.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u7279\u5F81\u9009\u62E9: </strong>${f.numberOfFeaturesSelected.toLocaleString()}</li><li><strong>\u7279\u5F81\u52A0\u8F7D: </strong>${f.numberOfFeaturesLoaded.toLocaleString()}</li><li><strong>\u70B9\u4E91\u9009\u62E9: </strong>${f.numberOfPointsSelected.toLocaleString()}</li><li><strong>\u70B9\u4E91\u52A0\u8F7D: </strong>${f.numberOfPointsLoaded.toLocaleString()}</li><li><strong>\u4E09\u89D2\u5F62\u6570: </strong>${f.numberOfTrianglesSelected.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u6837\u5F0F\u6E32\u67D3\u74E6\u7247\u6570: </strong>${f.numberOfTilesStyled.toLocaleString()}</li><li><strong>\u6837\u5F0F\u6E32\u67D3\u7279\u5F81\u6570: </strong>${f.numberOfFeaturesStyled.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u5B50\u8282\u70B9\u5254\u9664\u6570: </strong>${f.numberOfTilesCulledWithChildrenUnion.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u51E0\u4F55\u5360\u5185\u5B58 (MB): </strong>${k7(f.geometryByteLength)}</li><li><strong>\u7EB9\u7406\u5360\u5185\u5B58 (MB): </strong>${k7(f.texturesByteLength)}</li><li><strong>\u5C5E\u6027\u5360\u5185\u5B58 (MB): </strong>${k7(f.batchTableByteLength)}</li>`,m+="</ul>"),m}function glt(){let o=sf.statistics;return`
`,ASi=new ee(1,1,1);function n2e(o){o=Ae(o,ASi),this._dimensions=ee.clone(o)}Object.defineProperties(n2e.prototype,{dimensions:{get:function(){return this._dimensions},set:function(o){ee.clone(o,this._dimensions)}}});var hSi=new ee;n2e.prototype.emit=function(o){let A=this._dimensions,f=ee.multiplyByScalar(A,.5,hSi),m=je.randomBetween(-f.x,f.x),C=je.randomBetween(-f.y,f.y),y=je.randomBetween(-f.z,f.z);o.position=ee.fromElements(m,C,y,o.position),o.velocity=ee.normalize(o.position,o.velocity)};var wst=n2e;function MP(){this.featurePropertiesDirty=!1}Object.defineProperties(MP.prototype,{featuresLength:{get:function(){Ui.throwInstantiationError()}},pointsLength:{get:function(){Ui.throwInstantiationError()}},trianglesLength:{get:function(){Ui.throwInstantiationError()}},geometryByteLength:{get:function(){Ui.throwInstantiationError()}},texturesByteLength:{get:function(){Ui.throwInstantiationError()}},batchTableByteLength:{get:function(){Ui.throwInstantiationError()}},innerContents:{get:function(){Ui.throwInstantiationError()}},readyPromise:{get:function(){Ui.throwInstantiationError()}},tileset:{get:function(){Ui.throwInstantiationError()}},tile:{get:function(){Ui.throwInstantiationError()}},url:{get:function(){Ui.throwInstantiationError()}},batchTable:{get:function(){Ui.throwInstantiationError()}},metadata:{get:function(){Ui.throwInstantiationError()},set:function(o){Ui.throwInstantiationError()}},group:{get:function(){Ui.throwInstantiationError()},set:function(o){Ui.throwInstantiationError()}}});MP.prototype.hasProperty=function(o,A){Ui.throwInstantiationError()};MP.prototype.getFeature=function(o){Ui.throwInstantiationError()};MP.prototype.applyDebugSettings=function(o,A){Ui.throwInstantiationError()};MP.prototype.applyStyle=function(o){Ui.throwInstantiationError()};MP.prototype.update=function(o,A){Ui.throwInstantiationError()};MP.prototype.isDestroyed=function(){Ui.throwInstantiationError()};MP.prototype.destroy=function(){Ui.throwInstantiationError()};var bst=MP;function o2e(o){o=Ae(o,1),this._radius=Ae(o,1)}Object.defineProperties(o2e.prototype,{radius:{get:function(){return this._radius},set:function(o){this._radius=o}}});o2e.prototype.emit=function(o){let A=je.randomBetween(0,je.TWO_PI),f=je.randomBetween(0,this._radius),m=f*Math.cos(A),C=f*Math.sin(A),y=0;o.position=ee.fromElements(m,C,y,o.position),o.velocity=ee.clone(ee.UNIT_Z,o.velocity)};var a2e=o2e,RCe={CUMULUS:0};RCe.validate=function(o){return o===RCe.CUMULUS};var wie=Object.freeze(RCe);function DQ(o,A){if(o=Ae(o,Ae.EMPTY_OBJECT),this._show=Ae(o.show,!0),this._position=ee.clone(Ae(o.position,ee.ZERO)),!O(o.scale)&&O(o.maximumSize))this._maximumSize=ee.clone(o.maximumSize),this._scale=new It(this._maximumSize.x,this._maximumSize.y);else{this._scale=It.clone(Ae(o.scale,new It(20,12)));let f=new ee(this._scale.x,this._scale.y,Math.min(this._scale.x,this._scale.y)/1.5);this._maximumSize=ee.clone(Ae(o.maximumSize,f))}this._slice=Ae(o.slice,-1),this._color=At.clone(Ae(o.color,At.WHITE)),this._brightness=Ae(o.brightness,1),this._cloudCollection=A,this._index=-1}var dSi=DQ.SHOW_INDEX=0,fSi=DQ.POSITION_INDEX=1,gSi=DQ.SCALE_INDEX=2,pSi=DQ.MAXIMUM_SIZE_INDEX=3,mSi=DQ.SLICE_INDEX=4,CSi=DQ.BRIGHTNESS_INDEX=5,ySi=DQ.COLOR_INDEX=6;DQ.NUMBER_OF_PROPERTIES=7;function mk(o,A){let f=o._cloudCollection;O(f)&&(f._updateCloud(o,A),o._dirty=!0)}Object.defineProperties(DQ.prototype,{show:{get:function(){return this._show},set:function(o){this._show!==o&&(this._show=o,mk(this,dSi))}},position:{get:function(){return this._position},set:function(o){let A=this._position;ee.equals(A,o)||(ee.clone(o,A),mk(this,fSi))}},scale:{get:function(){return this._scale},set:function(o){let A=this._scale;It.equals(A,o)||(It.clone(o,A),mk(this,gSi))}},maximumSize:{get:function(){return this._maximumSize},set:function(o){let A=this._maximumSize;ee.equals(A,o)||(ee.clone(o,A),mk(this,pSi))}},color:{get:function(){return this._color},set:function(o){let A=this._color;At.equals(A,o)||(At.clone(o,A),mk(this,ySi))}},slice:{get:function(){return this._slice},set:function(o){this._slice!==o&&(this._slice=o,mk(this,mSi))}},brightness:{get:function(){return this._brightness},set:function(o){this._brightness!==o&&(this._brightness=o,mk(this,CSi))}}});DQ.prototype._destroy=function(){this._cloudCollection=void 0};var TQ=DQ,R_,k$=new ee,xSi={positionHighAndScaleX:0,positionLowAndScaleY:1,packedAttribute0:2,packedAttribute1:3,color:4},vSi={direction:0,positionHighAndScaleX:1,positionLowAndScaleY:2,packedAttribute0:3,packedAttribute1:4,color:5},ESi=TQ.SHOW_INDEX,ISi=TQ.POSITION_INDEX,_Si=TQ.SCALE_INDEX,BSi=TQ.MAXIMUM_SIZE_INDEX,wSi=TQ.SLICE_INDEX,bSi=TQ.BRIGHTNESS_INDEX,QSi=TQ.NUMBER_OF_PROPERTIES,SSi=TQ.COLOR_INDEX;function MQ(o){o=Ae(o,Ae.EMPTY_OBJECT),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(QSi),this._noiseTexture=void 0,this._textureSliceWidth=128,this._noiseTextureRows=4,this.noiseDetail=Ae(o.noiseDetail,16),this.noiseOffset=ee.clone(Ae(o.noiseOffset,ee.ZERO)),this._loading=!1,this._ready=!1;let A=this;this._uniforms={u_noiseTexture:function(){return A._noiseTexture},u_noiseTextureDimensions:Qst(A),u_noiseDetail:function(){return A.noiseDetail}},this._vaNoise=void 0,this._spNoise=void 0,this._spCreated=!1,this._sp=void 0,this._rs=void 0,this.show=Ae(o.show,!0),this._colorCommands=[],this.debugBillboards=Ae(o.debugBillboards,!1),this._compiledDebugBillboards=!1,this.debugEllipsoids=Ae(o.debugEllipsoids,!1),this._compiledDebugEllipsoids=!1}function Qst(o){return function(){return k$.x=o._textureSliceWidth,k$.y=o._noiseTextureRows,k$.z=1/o._noiseTextureRows,k$}}Object.defineProperties(MQ.prototype,{length:{get:function(){return s2e(this),this._clouds.length}}});function Sst(o){let A=o.length;for(let f=0;f<A;++f)o[f]&&o[f]._destroy()}MQ.prototype.add=function(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=Ae(o.cloudType,wie.CUMULUS),f;return A===wie.CUMULUS&&(f=new TQ(o,this),f._index=this._clouds.length,this._clouds.push(f),this._createVertexArray=!0),f};MQ.prototype.remove=function(o){return this.contains(o)?(this._clouds[o._index]=void 0,this._cloudsRemoved=!0,this._createVertexArray=!0,o._destroy(),!0):!1};MQ.prototype.removeAll=function(){Sst(this._clouds),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!0};function s2e(o){if(o._cloudsRemoved){o._cloudsRemoved=!1;let A=[],f=o._clouds,m=f.length;for(let C=0,y=0;C<m;++C){let x=f[C];O(x)&&(f._index=y++,A.push(x))}o._clouds=A}}MQ.prototype._updateCloud=function(o,A){o._dirty||(this._cloudsToUpdate[this._cloudsToUpdateIndex++]=o),++this._propertiesChanged[A]};MQ.prototype.contains=function(o){return O(o)&&o._cloudCollection===this};MQ.prototype.get=function(o){return s2e(this),this._clouds[o]};var DSi=new Float32Array([-1,-1,1,-1,1,1,-1,1]),TSi=new Uint16Array([0,1,2,0,2,3]);function MSi(o){let A=vo.createVertexBuffer({context:o,typedArray:DSi,usage:ln.STATIC_DRAW}),f=vo.createIndexBuffer({context:o,typedArray:TSi,usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT}),m=[{index:0,vertexBuffer:A,componentsPerAttribute:2,componentDatatype:ei.FLOAT}];return new Vc({context:o,attributes:m,indexBuffer:f})}var l2e;function PSi(o){let A=o.cache.cloudCollection_indexBufferBatched;if(O(A))return A;let f=16384*6-6,m=new Uint16Array(f);for(let C=0,y=0;C<f;C+=6,y+=4)m[C]=y,m[C+1]=y+1,m[C+2]=y+2,m[C+3]=y,m[C+4]=y+2,m[C+5]=y+3;return A=vo.createIndexBuffer({context:o,typedArray:m,usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT}),A.vertexArrayDestroyable=!1,o.cache.cloudCollection_indexBufferBatched=A,A}function RSi(o){let A=o.cache.cloudCollection_indexBufferInstanced;return O(A)||(A=vo.createIndexBuffer({context:o,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:ln.STATIC_DRAW,indexDatatype:Nn.UNSIGNED_SHORT}),A.vertexArrayDestroyable=!1,o.cache.cloudCollection_indexBufferInstanced=A),A}function LSi(o){let A=o.cache.cloudCollection_vertexBufferInstanced;return O(A)||(A=vo.createVertexBuffer({context:o,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:ln.STATIC_DRAW}),A.vertexArrayDestroyable=!1,o.cache.cloudCollection_vertexBufferInstanced=A),A}function FSi(o,A,f){let m=[{index:R_.positionHighAndScaleX,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.positionLowAndScaleY,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.packedAttribute0,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.packedAttribute1,componentsPerAttribute:4,componentDatatype:ei.FLOAT,usage:ln.STATIC_DRAW},{index:R_.color,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,usage:ln.STATIC_DRAW}];f&&m.push({index:R_.direction,componentsPerAttribute:2,componentDatatype:ei.FLOAT,vertexBuffer:LSi(o)});let C=f?A:4*A;return new lY(o,m,C,f)}var fpe=new Pu;function Dst(o,A,f,m){let C,y=f[R_.positionHighAndScaleX],x=f[R_.positionLowAndScaleY],v=m.position;Pu.fromCartesian(v,fpe);let E=m.scale,I=fpe.high,w=fpe.low;o._instanced?(C=m._index,y(C,I.x,I.y,I.z,E.x),x(C,w.x,w.y,w.z,E.y)):(C=m._index*4,y(C+0,I.x,I.y,I.z,E.x),y(C+1,I.x,I.y,I.z,E.x),y(C+2,I.x,I.y,I.z,E.x),y(C+3,I.x,I.y,I.z,E.x),x(C+0,w.x,w.y,w.z,E.y),x(C+1,w.x,w.y,w.z,E.y),x(C+2,w.x,w.y,w.z,E.y),x(C+3,w.x,w.y,w.z,E.y))}function Tst(o,A,f,m){let C,y=f[R_.packedAttribute0],x=m.show,v=m.brightness;o._instanced?(C=m._index,y(C,x,v,0,0)):(C=m._index*4,y(C+0,x,v,0,0),y(C+1,x,v,1,0),y(C+2,x,v,1,1),y(C+3,x,v,0,1))}function Mst(o,A,f,m){let C,y=f[R_.packedAttribute1],x=m.maximumSize,v=m.slice;o._instanced?(C=m._index,y(C,x.x,x.y,x.z,v)):(C=m._index*4,y(C+0,x.x,x.y,x.z,v),y(C+1,x.x,x.y,x.z,v),y(C+2,x.x,x.y,x.z,v),y(C+3,x.x,x.y,x.z,v))}function Pst(o,A,f,m){let C,y=f[R_.color],x=m.color,v=At.floatToByte(x.red),E=At.floatToByte(x.green),I=At.floatToByte(x.blue),w=At.floatToByte(x.alpha);o._instanced?(C=m._index,y(C,v,E,I,w)):(C=m._index*4,y(C+0,v,E,I,w),y(C+1,v,E,I,w),y(C+2,v,E,I,w),y(C+3,v,E,I,w))}function NSi(o,A,f,m){Dst(o,A,f,m),Tst(o,A,f,m),Mst(o,A,f,m),Pst(o,A,f,m)}function kSi(o,A,f,m){let C=o,y=C._textureSliceWidth,x=C._noiseTextureRows,v=A.context;C._vaNoise=MSi(v),C._spNoise=_s.fromCache({context:v,vertexShaderSource:f,fragmentShaderSource:m,attributeLocations:{position:0}});let E=C.noiseDetail,I=C.noiseOffset;C._noiseTexture=new mo({context:v,width:y*y/x,height:y*x,pixelDatatype:wn.UNSIGNED_BYTE,pixelFormat:Gn.RGBA,sampler:new Qs({wrapS:Va.REPEAT,wrapT:Va.REPEAT,minificationFilter:as.NEAREST,magnificationFilter:th.NEAREST})});let w=new B5({vertexArray:C._vaNoise,shaderProgram:C._spNoise,outputTexture:C._noiseTexture,uniformMap:{u_noiseTextureDimensions:Qst(C),u_noiseDetail:function(){return E},u_noiseOffset:function(){return I}},persists:!1,owner:o,postExecute:function(Q){C._ready=!0,C._loading=!1}});A.commandList.push(w),C._loading=!0}function OSi(o,A){let f=o,m=A.context;f._createVertexArray=!1,f._vaf=f._vaf&&f._vaf.destroy();let C=o._clouds,y=C.length;if(y>0){f._vaf=FSi(m,y,f._instanced);let x=f._vaf.writers,v;for(v=0;v<y;++v){let E=C[v];NSi(o,A,x,E)}f._vaf.commit(l2e(m))}}var USi=[];function GSi(o,A){let f=A.context,m=o,C=m._clouds.length,y=m._cloudsToUpdate,x=m._cloudsToUpdateIndex,v=m._propertiesChanged,E=USi;E.length=0,(v[ISi]||v[_Si])&&E.push(Dst),(v[ESi]||v[bSi])&&E.push(Tst),(v[BSi]||v[wSi])&&E.push(Mst),v[SSi]&&E.push(Pst);let I=E.length,w=m._vaf.writers,Q,M,B;if(x/C>.1){for(Q=0;Q<x;++Q)for(M=y[Q],M._dirty=!1,B=0;B<I;++B)E[B](o,A,w,M);m._vaf.commit(l2e(f))}else{for(Q=0;Q<x;++Q){for(M=y[Q],M._dirty=!1,B=0;B<I;++B)E[B](o,A,w,M);m._instanced?m._vaf.subCommit(M._index,1):m._vaf.subCommit(M._index*4,4)}m._vaf.endSubCommits()}m._cloudsToUpdateIndex=0}function HSi(o,A,f,m){let C=A.context,y=o,x=new Fr({defines:[],sources:[f]});y._instanced&&x.defines.push("INSTANCED");let v=new Fr({defines:[],sources:[m]});y.debugBillboards&&v.defines.push("DEBUG_BILLBOARDS"),y.debugEllipsoids&&v.defines.push("DEBUG_ELLIPSOIDS"),y._sp=_s.replaceCache({context:C,shaderProgram:y._sp,vertexShaderSource:x,fragmentShaderSource:v,attributeLocations:R_}),y._rs=fn.fromCache({depthTest:{enabled:!0,func:Ii.LESS},depthMask:!1,blending:Bu.ALPHA_BLEND}),y._spCreated=!0,y._compiledDebugBillboards=y.debugBillboards,y._compiledDebugEllipsoids=y.debugEllipsoids}function VSi(o,A){let f=o,m=A.passes,C=f._uniforms,y=A.commandList;if(m.render){let x=f._colorCommands,v=f._vaf.va,E=v.length;x.length=E;for(let I=0;I<E;I++){let w=x[I];O(w)||(w=x[I]=new On),w.pass=hr.TRANSLUCENT,w.owner=o,w.uniformMap=C,w.count=v[I].indicesCount,w.vertexArray=v[I].va,w.shaderProgram=f._sp,w.renderState=f._rs,f._instanced&&(w.count=6,w.instanceCount=f._clouds.length),y.push(w)}}}MQ.prototype.update=function(o){if(s2e(this),!this.show)return;let A=this.debugBillboards||this.debugEllipsoids;this._ready=A?!0:O(this._noiseTexture),!this._ready&&!this._loading&&!A&&kSi(this,o,dDe,hDe),this._instanced=o.context.instancedArrays,R_=this._instanced?vSi:xSi,l2e=this._instanced?RSi:PSi;let f=this._clouds.length,m=this._cloudsToUpdate,C=this._cloudsToUpdateIndex;this._createVertexArray?OSi(this,o):C>0&&GSi(this,o),C>f*1.5&&(m.length=f),!(!O(this._vaf)||!O(this._vaf.va)||!this._ready&!A)&&((!this._spCreated||this.debugBillboards!==this._compiledDebugBillboards||this.debugEllipsoids!==this._compiledDebugEllipsoids)&&HSi(this,o,ADe,cDe),VSi(this,o))};MQ.prototype.isDestroyed=function(){return!1};MQ.prototype.destroy=function(){return this._noiseTexture=this._noiseTexture&&this._noiseTexture.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),Sst(this._clouds),Qr(this)};var Rst=MQ,zSi=je.toRadians(30);function u2e(o){this._angle=Ae(o,zSi)}Object.defineProperties(u2e.prototype,{angle:{get:function(){return this._angle},set:function(o){this._angle=o}}});u2e.prototype.emit=function(o){let A=Math.tan(this._angle),f=je.randomBetween(0,je.TWO_PI),m=je.randomBetween(0,A),C=m*Math.cos(f),y=m*Math.sin(f),x=1;o.velocity=ee.fromElements(C,y,x,o.velocity),ee.normalize(o.velocity,o.velocity),o.position=ee.clone(ee.ZERO,o.position)};var vH=u2e,KSi=new At,YSi=new At,JSi=new At,WSi=new At,g7e=new ai,Mz=new Uint8Array(4);function p7e(o,A,f,m){let C=A.height===f.height?0:(o-A.height)/(f.height-A.height);return At.lerp(A.color,f.color,C,m)}function Fee(o,A){return{height:o,color:At.clone(A)}}function Lst(o){return o=o.filter(function(A,f,m){let C=f>0,y=f<m.length-1,x=C?A.height===m[f-1].height:!0,v=y?A.height===m[f+1].height:!0;return!x||!v}),o=o.filter(function(A,f,m){let C=f>0,y=f<m.length-1,x=C?At.equals(A.color,m[f-1].color):!1,v=y?At.equals(A.color,m[f+1].color):!1;return!x||!v}),o=o.filter(function(A,f,m){let C=f>0,y=C?At.equals(A.color,m[f-1].color):!1,x=C?A.height===m[f-1].height:!0;return!y||!x}),o}function jSi(o){let A,f,m=[],C=o.length;for(A=0;A<C;A++){let y=o[A],x=y.entries,v=x.length,E=[];for(f=0;f<v;f++){let B=x[f],T=je.clamp(B.height,ZE._minimumHeight,ZE._maximumHeight),D=At.clone(B.color,KSi);D.red*=D.alpha,D.green*=D.alpha,D.blue*=D.alpha,E.push(Fee(T,D))}let I=!0,w=!0;for(f=0;f<v-1;f++){let B=E[f+0],T=E[f+1];I=I&&B.height<=T.height,w=w&&B.height>=T.height}w?E=E.reverse():I||NJ(E,function(B,T){return je.sign(B.height-T.height)});let Q=Ae(y.extendDownwards,!1),M=Ae(y.extendUpwards,!1);E.length===1&&!Q&&!M&&(Q=!0,M=!0),Q&&E.splice(0,0,Fee(ZE._minimumHeight,E[0].color)),M&&E.splice(E.length,0,Fee(ZE._maximumHeight,E[E.length-1].color)),E=Lst(E),m.push(E)}return m}function qSi(o){let A=jSi(o),f=[],m=[],C;function y(E,I){f.push(Fee(E,I))}function x(E,I,w){let Q=At.multiplyByScalar(w,1-I.alpha,WSi);Q=At.add(Q,I,Q),y(E,Q)}let v=A.length;for(C=0;C<v;C++){let E=A[C],I=0,w=0;m=f,f=[];let Q=E.length,M=m.length;for(;I<Q||w<M;){let B=I<Q?E[I]:void 0,T=I>0?E[I-1]:void 0,D=I<Q-1?E[I+1]:void 0,F=w<M?m[w]:void 0,L=w>0?m[w-1]:void 0,R=w<M-1?m[w+1]:void 0;if(O(B)&&O(F)&&B.height===F.height){let k=O(R)&&F.height===R.height,U=!O(L),V=!O(R),H=O(D)&&B.height===D.height,q=!O(T),ie=!O(D);k?H?(x(B.height,B.color,F.color),x(B.height,D.color,R.color)):q?(y(B.height,F.color),x(B.height,B.color,R.color)):ie?(x(B.height,B.color,F.color),y(B.height,R.color)):(x(B.height,B.color,F.color),x(B.height,B.color,R.color)):U?H?(y(B.height,B.color),x(B.height,D.color,F.color)):ie?(y(B.height,B.color),y(B.height,F.color)):(q||y(B.height,B.color),x(B.height,B.color,F.color)):V?H?(x(B.height,B.color,F.color),y(B.height,D.color)):q?(y(B.height,F.color),y(B.height,B.color)):ie?x(B.height,B.color,F.color):(x(B.height,B.color,F.color),y(B.height,B.color)):H?(x(B.height,B.color,F.color),x(B.height,D.color,F.color)):q?(y(B.height,F.color),x(B.height,B.color,F.color)):ie?(x(B.height,B.color,F.color),y(B.height,F.color)):x(B.height,B.color,F.color),I+=H?2:1,w+=k?2:1}else if(O(B)&&O(F)&&O(L)&&B.height<F.height){let k=p7e(B.height,L,F,JSi);O(T)?O(D)?x(B.height,B.color,k):(x(B.height,B.color,k),y(B.height,k)):(y(B.height,k),x(B.height,B.color,k)),I++}else if(O(F)&&O(B)&&O(T)&&F.height<B.height){let k=p7e(F.height,T,B,YSi);O(L)?O(R)?x(F.height,k,F.color):(x(F.height,k,F.color),y(F.height,k)):(y(F.height,k),x(F.height,k,F.color)),w++}else O(B)&&(!O(F)||B.height<F.height)?(O(F)&&!O(L)&&!O(D)?(y(B.height,B.color),y(B.height,ZE._emptyColor),y(F.height,ZE._emptyColor)):(!O(F)&&O(L)&&!O(T)&&(y(L.height,ZE._emptyColor),y(B.height,ZE._emptyColor)),y(B.height,B.color)),I++):O(F)&&(!O(B)||F.height<B.height)&&(y(F.height,F.color),w++)}}return Lst(f)}function ZE(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.scene,f=o.layers,m=qSi(f),C=m.length,y,x,v,E;if(ZE._useFloatTexture(A.context))for(v=wn.FLOAT,E=Gn.LUMINANCE,x=new Float32Array(C),y=0;y<C;y++)x[y]=m[y].height;else for(v=wn.UNSIGNED_BYTE,E=Gn.RGBA,x=new Uint8Array(C*4),y=0;y<C;y++)ai.packFloat(m[y].height,g7e),ai.pack(g7e,x,y*4);let I=mo.create({context:A.context,pixelFormat:E,pixelDatatype:v,source:{arrayBufferView:x,width:C,height:1},sampler:new Qs({wrapS:Va.CLAMP_TO_EDGE,wrapT:Va.CLAMP_TO_EDGE,minificationFilter:as.NEAREST,magnificationFilter:th.NEAREST})}),w=new Uint8Array(C*4);for(y=0;y<C;y++)m[y].color.toBytes(Mz),w[y*4+0]=Mz[0],w[y*4+1]=Mz[1],w[y*4+2]=Mz[2],w[y*4+3]=Mz[3];let Q=mo.create({context:A.context,pixelFormat:Gn.RGBA,pixelDatatype:wn.UNSIGNED_BYTE,source:{arrayBufferView:w,width:C,height:1},sampler:new Qs({wrapS:Va.CLAMP_TO_EDGE,wrapT:Va.CLAMP_TO_EDGE,minificationFilter:as.LINEAR,magnificationFilter:th.LINEAR})});return ss.fromType("ElevationBand",{heights:I,colors:Q})}ZE._useFloatTexture=function(o){return o.floatingPointTexture};ZE._maximumHeight=5906376425472;ZE._minimumHeight=-5906376425472;ZE._emptyColor=new At(0,0,0,0);var Fst=ZE;function XSi(o){o=ia(o,{url:jk.fromAssetId(96188)});let A=new Fx(o),f=o.style;if(!O(f)){let m=Ae(o.defaultColor,At.WHITE).toCssColorString();f=new mY({color:`Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}) : ${m}`})}return A.style=f,A}var Nst=XSi;function ZSi(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=[],f=o.geometry;(!O(f.attributes)||!O(f.primitiveType))&&(f=f.constructor.createGeometry(f));let m=f.attributes,C=Xe.clone(Ae(o.modelMatrix,Xe.IDENTITY)),y=Ae(o.length,1e4);if(O(m.normal)&&A.push(new co({geometry:rc.createLineSegmentsForVectors(f,"normal",y),attributes:{color:new Yo(1,0,0,1)},modelMatrix:C})),O(m.tangent)&&A.push(new co({geometry:rc.createLineSegmentsForVectors(f,"tangent",y),attributes:{color:new Yo(0,1,0,1)},modelMatrix:C})),O(m.bitangent)&&A.push(new co({geometry:rc.createLineSegmentsForVectors(f,"bitangent",y),attributes:{color:new Yo(0,0,1,1)},modelMatrix:C})),A.length>0)return new $a({asynchronous:!1,geometryInstances:A,appearance:new za({flat:!0,translucent:!1})})}var kst=ZSi;function sW(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.attributeName,f=o.perInstanceAttribute;O(f)||(f=!1);let m=Ae(o.glslDatatype,"vec3"),C=`v_${A}`,y;if(A==="normal"||A==="tangent"||A==="bitangent")y=`vec4 getColor() { return vec4((${C} + vec3(1.0)) * 0.5, 1.0); }
`;else switch(A==="st"&&(m="vec2"),m){case"float":y=`vec4 getColor() { return vec4(vec3(${C}), 1.0); }
`;break;case"vec2":y=`vec4 getColor() { return vec4(${C}, 0.0, 1.0); }
`;break;case"vec3":y=`vec4 getColor() { return vec4(${C}, 1.0); }
`;break;case"vec4":y=`vec4 getColor() { return ${C}; }
`;break}let x=`attribute vec3 position3DHigh;
attribute vec3 position3DLow;
attribute float batchId;
${f?"":`attribute ${m} ${A};
`}varying ${m} ${C};
void main()
{
vec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);
${f?`${C} = czm_batchTable_${A}(batchId);
`:`${C} = ${A};
`}gl_Position = czm_modelViewProjectionRelativeToEye * p;
}`,v=`varying ${m} ${C};
${y}
void main()
{
gl_FragColor = getColor();
}`;this.material=void 0,this.translucent=Ae(o.translucent,!1),this._vertexShaderSource=Ae(o.vertexShaderSource,x),this._fragmentShaderSource=Ae(o.fragmentShaderSource,v),this._renderState=Sd.getDefaultRenderState(!1,!1,o.renderState),this._closed=Ae(o.closed,!1),this._attributeName=A,this._glslDatatype=m}Object.defineProperties(sW.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}});sW.prototype.getFragmentShaderSource=Sd.prototype.getFragmentShaderSource;sW.prototype.isTranslucent=Sd.prototype.isTranslucent;sW.prototype.getRenderState=Sd.prototype.getRenderState;var Ost=sW;function yae(o){o=Ae(o,Ae.EMPTY_OBJECT),this.length=Ae(o.length,1e7),this._length=void 0,this.width=Ae(o.width,2),this._width=void 0,this.show=Ae(o.show,!0),this.modelMatrix=Xe.clone(Ae(o.modelMatrix,Xe.IDENTITY)),this._modelMatrix=new Xe,this.id=o.id,this._id=void 0,this._primitive=void 0}yae.prototype.update=function(o){if(this.show){if(!O(this._primitive)||!Xe.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=Xe.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,O(this._primitive)&&this._primitive.destroy(),this.modelMatrix[12]===0&&this.modelMatrix[13]===0&&this.modelMatrix[14]===0&&(this.modelMatrix[14]=.01);let A=new co({geometry:new Vk({positions:[ee.ZERO,ee.UNIT_X],width:this.width,vertexFormat:ly.VERTEX_FORMAT,colors:[At.RED,At.RED],arcType:Pa.NONE}),modelMatrix:Xe.multiplyByUniformScale(this.modelMatrix,this.length,new Xe),id:this.id,pickPrimitive:this}),f=new co({geometry:new Vk({positions:[ee.ZERO,ee.UNIT_Y],width:this.width,vertexFormat:ly.VERTEX_FORMAT,colors:[At.GREEN,At.GREEN],arcType:Pa.NONE}),modelMatrix:Xe.multiplyByUniformScale(this.modelMatrix,this.length,new Xe),id:this.id,pickPrimitive:this}),m=new co({geometry:new Vk({positions:[ee.ZERO,ee.UNIT_Z],width:this.width,vertexFormat:ly.VERTEX_FORMAT,colors:[At.BLUE,At.BLUE],arcType:Pa.NONE}),modelMatrix:Xe.multiplyByUniformScale(this.modelMatrix,this.length,new Xe),id:this.id,pickPrimitive:this});this._primitive=new $a({geometryInstances:[A,f,m],appearance:new ly,asynchronous:!1})}this._primitive.update(o)}};yae.prototype.isDestroyed=function(){return!1};yae.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),Qr(this)};var c2e=yae;function $Si(o){this.direction=ee.clone(o.direction),this.color=At.clone(Ae(o.color,At.WHITE)),this.intensity=Ae(o.intensity,1)}var xae=$Si;function jE(o){this._scene=o.scene,this.samplingWindow=Ae(o.samplingWindow,jE.defaultSettings.samplingWindow),this.quietPeriod=Ae(o.quietPeriod,jE.defaultSettings.quietPeriod),this.warmupPeriod=Ae(o.warmupPeriod,jE.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=Ae(o.minimumFrameRateDuringWarmup,jE.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=Ae(o.minimumFrameRateAfterWarmup,jE.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new br,this._nominalFrameRate=new br,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;let A=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener(function(C,y){eDi(A,y)}),this._hiddenPropertyName=document.hidden!==void 0?"hidden":document.mozHidden!==void 0?"mozHidden":document.msHidden!==void 0?"msHidden":document.webkitHidden!==void 0?"webkitHidden":void 0;let f=document.hidden!==void 0?"visibilitychange":document.mozHidden!==void 0?"mozvisibilitychange":document.msHidden!==void 0?"msvisibilitychange":document.webkitHidden!==void 0?"webkitvisibilitychange":void 0;function m(){tDi(A)}this._visibilityChangeRemoveListener=void 0,O(f)&&(document.addEventListener(f,m,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(f,m,!1)})}jE.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8};jE.fromScene=function(o){return(!O(o._frameRateMonitor)||o._frameRateMonitor.isDestroyed())&&(o._frameRateMonitor=new jE({scene:o})),o._frameRateMonitor};Object.defineProperties(jE.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}});jE.prototype.pause=function(){++this._pauseCount,this._pauseCount===1&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)};jE.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)};jE.prototype.isDestroyed=function(){return!1};jE.prototype.destroy=function(){return this._preUpdateRemoveListener(),O(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),Qr(this)};function eDi(o,A){if(o._pauseCount>0)return;let f=GA();if(o._needsQuietPeriod)o._needsQuietPeriod=!1,o._frameTimes.length=0,o._quietPeriodEndTime=f+o.quietPeriod/Uu.SECONDS_PER_MILLISECOND,o._warmupPeriodEndTime=o._quietPeriodEndTime+(o.warmupPeriod+o.samplingWindow)/Uu.SECONDS_PER_MILLISECOND;else if(f>=o._quietPeriodEndTime){o._frameTimes.push(f);let m=f-o.samplingWindow/Uu.SECONDS_PER_MILLISECOND;if(o._frameTimes.length>=2&&o._frameTimes[0]<=m){for(;o._frameTimes.length>=2&&o._frameTimes[1]<m;)o._frameTimes.shift();let C=(f-o._frameTimes[0])/(o._frameTimes.length-1);o._lastFramesPerSecond=1e3/C;let y=1e3/(f>o._warmupPeriodEndTime?o.minimumFrameRateAfterWarmup:o.minimumFrameRateDuringWarmup);C>y?o._frameRateIsLow||(o._frameRateIsLow=!0,o._needsQuietPeriod=!0,o.lowFrameRate.raiseEvent(o.scene,o._lastFramesPerSecond)):o._frameRateIsLow&&(o._frameRateIsLow=!1,o._needsQuietPeriod=!0,o.nominalFrameRate.raiseEvent(o.scene,o._lastFramesPerSecond))}}}function tDi(o){document[o._hiddenPropertyName]?o.pause():o.unpause()}var A2e=jE,iDi=Eh(T7e(),1);function h2e(){this._image=new Image}h2e.prototype.isReady=function(){return!0};h2e.prototype.shouldDiscardImage=function(o){return o===this._image};function lW(o){o=Ae(o,Ae.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;let A;if(O(o.metadata))A=o.metadata;else{let y=An.createIfNeeded(o.url);A=new EN(y)}this._metadata=A,this._tileDiscardPolicy=o.tileDiscardPolicy,this._tilingScheme=new af({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Si(-je.PI,-je.PI,je.PI,je.PI),ellipsoid:o.ellipsoid});let f=o.credit;typeof f=="string"&&(f=new tl(f)),this._credit=f,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,O(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new h2e),this._errorEvent=new br,this._ready=!1;let m=this,C;this._readyPromise=A.readyPromise.then(function(y){if(!A.imageryPresent){let x=new nr(`The server ${A.url} doesn't have imagery`);return C=wc.reportError(C,m,m._errorEvent,x.message,void 0,void 0,void 0,x),Promise.reject(x)}return wc.reportSuccess(C),m._ready=y,y}).catch(function(y){return C=wc.reportError(C,m,m._errorEvent,y.message,void 0,void 0,void 0,y),Promise.reject(y)})}Object.defineProperties(lW.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});lW.prototype.getTileCredits=function(o,A,f){let m=this._metadata,C=m.getTileInformation(o,A,f);if(O(C)){let y=m.providers[C.imageryProvider];if(O(y))return[y]}};lW.prototype.requestImage=function(o,A,f,m){let C=this._tileDiscardPolicy._image,y=this._metadata,x=EN.tileXYToQuadKey(o,A,f),v=y.getTileInformation(o,A,f);if(!O(v)){if(y.isValid(x)){let I=new cC({throttle:m.throttle,throttleByServer:m.throttleByServer,type:m.type,priorityFunction:m.priorityFunction});y.populateSubtree(o,A,f,I);return}return Promise.resolve(C)}if(!v.hasImagery())return Promise.resolve(C);let E=rDi(this,v,o,A,f,m).fetchArrayBuffer();if(O(E))return E.then(function(I){$De(y.key,I);let w=new Uint8Array(I),Q,M=y.protoImagery;if((!O(M)||!M)&&(Q=nDi(w)),!O(Q)&&(!O(M)||M)){let B=oDi(w);Q=B.imageType,w=B.imageData}return!O(Q)||!O(w)?C:fne({uint8Array:w,format:Q,flipY:!0})})};lW.prototype.pickFeatures=function(o,A,f,m,C){};function rDi(o,A,f,m,C,y){let x=EN.tileXYToQuadKey(f,m,C),v=A.imageryVersion;return v=O(v)&&v>0?v:1,o._metadata.resource.getDerivedResource({url:`flatfile?f1-0${x}-i.${v.toString()}`,request:y})}function nDi(o){let A="JFIF";if(o[6]===A.charCodeAt(0)&&o[7]===A.charCodeAt(1)&&o[8]===A.charCodeAt(2)&&o[9]===A.charCodeAt(3))return"image/jpeg";let f="PNG";if(o[1]===f.charCodeAt(0)&&o[2]===f.charCodeAt(1)&&o[3]===f.charCodeAt(2))return"image/png"}function oDi(o){let A=iDi.Reader.create(o),f=A.len,m={};for(;A.pos<f;){let x=A.uint32(),v;switch(x>>>3){case 1:m.imageType=A.uint32();break;case 2:m.imageData=A.bytes();break;case 3:m.alphaType=A.uint32();break;case 4:m.imageAlpha=A.bytes();break;case 5:if(v=m.copyrightIds,O(v)||(v=m.copyrightIds=[]),(x&7)===2){let E=A.uint32()+A.pos;for(;A.pos<E;)v.push(A.uint32())}else v.push(A.uint32());break;default:A.skipType(x&7);break}}let C=m.imageType;if(O(C))switch(C){case 0:m.imageType="image/jpeg";break;case 4:m.imageType="image/png";break;default:throw new nr("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}let y=m.alphaType;return O(y)&&y!==0&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete m.alphaType,delete m.imageAlpha),m}var Ust=lW,aDi=new At(1,1,1,.4),sDi=new At(0,1,0,.05),lDi=new At(0,.5,0,.2);function bO(o){o=Ae(o,Ae.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._tilingScheme=O(o.tilingScheme)?o.tilingScheme:new af({ellipsoid:o.ellipsoid}),this._cells=Ae(o.cells,8),this._color=Ae(o.color,aDi),this._glowColor=Ae(o.glowColor,sDi),this._glowWidth=Ae(o.glowWidth,6),this._backgroundColor=Ae(o.backgroundColor,lDi),this._errorEvent=new br,this._tileWidth=Ae(o.tileWidth,256),this._tileHeight=Ae(o.tileHeight,256),this._canvasSize=Ae(o.canvasSize,256),this._canvas=this._createGridCanvas(),this._readyPromise=Promise.resolve(!0)}Object.defineProperties(bO.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});bO.prototype._drawGrid=function(o){let A=this._canvasSize;for(let f=0;f<=this._cells;++f){let m=1+f/this._cells*(A-1);o.moveTo(m,0),o.lineTo(m,A),o.moveTo(0,m),o.lineTo(A,m)}o.stroke()};bO.prototype._createGridCanvas=function(){let o=document.createElement("canvas");o.width=this._canvasSize,o.height=this._canvasSize;let A=0,f=this._canvasSize,m=o.getContext("2d"),C=this._backgroundColor.toCssColorString();m.fillStyle=C,m.fillRect(A,A,f,f);let y=this._glowColor.toCssColorString();m.strokeStyle=y,m.lineWidth=this._glowWidth,m.strokeRect(A,A,f,f),this._drawGrid(m),m.lineWidth=this._glowWidth*.5,m.strokeRect(A,A,f,f),this._drawGrid(m);let x=this._color.toCssColorString();return m.strokeStyle=x,m.lineWidth=2,m.strokeRect(A,A,f,f),m.lineWidth=1,this._drawGrid(m),o};bO.prototype.getTileCredits=function(o,A,f){};bO.prototype.requestImage=function(o,A,f,m){return Promise.resolve(this._canvas)};bO.prototype.pickFeatures=function(o,A,f,m,C){};var Gst=bO;function d2e(o,A){this._parent=o,this._dataProvider=o._dataProvider,this._layer=o._layer,O(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${A}`}):this._resource=this._parent.resource.getDerivedResource({url:A})}Object.defineProperties(d2e.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}}});d2e.prototype.load=function(){let o=this;return this._dataProvider._loadJson(this._resource).then(function(A){return o._data=A,A})};var f2e=d2e;function EH(o,A){this._storageInfo=A,this._parent=o,this._dataProvider=o._dataProvider;let f=`attributes/${A.key}/0`;O(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${f}`}):this._resource=this._parent.resource.getDerivedResource({url:f})}Object.defineProperties(EH.prototype,{resource:{get:function(){return this._resource}},header:{get:function(){return this._header}},values:{get:function(){return O(this._values)&&O(this._values.attributeValues)?this._values.attributeValues:[]}},name:{get:function(){return this._storageInfo.name}}});function uDi(o){return o==="UInt8"||o==="Int8"?1:o==="UInt16"||o==="Int16"?2:o==="UInt32"||o==="Int32"||o==="Oid32"||o==="Float32"?4:o==="UInt64"||o==="Int64"||o==="Float64"?8:0}EH.prototype.load=function(){let o=this;return this._dataProvider._loadBinary(this._resource).then(function(A){let f=new DataView(A),m=!0;if(f.getUint8(0)==="{".charCodeAt(0)&&new TextDecoder().decode(A).includes("404")&&(m=!1,console.error(`Failed to load: ${o.resource.url}`)),m){o._data=A;let C=o._parseHeader(f),y=uDi(o._storageInfo.attributeValues.valueType);y>0&&(C=Math.ceil(C/y)*y),o._parseBody(f,C)}})};EH.prototype._parseValue=function(o,A,f){let m;if(A==="UInt8")m=o.getUint8(f),f+=1;else if(A==="Int8")m=o.getInt8(f),f+=1;else if(A==="UInt16")m=o.getUint16(f,!0),f+=2;else if(A==="Int16")m=o.getInt16(f,!0),f+=2;else if(A==="UInt32")m=o.getUint32(f,!0),f+=4;else if(A==="Oid32")m=o.getUint32(f,!0),f+=4;else if(A==="Int32")m=o.getInt32(f,!0),f+=4;else if(A==="UInt64"){let C=o.getUint32(f,!0),y=o.getUint32(f+4,!0);m=C+Math.pow(2,32)*y,f+=8}else if(A==="Int64"){let C=o.getUint32(f,!0),y=o.getUint32(f+4,!0);y<Math.pow(2,31)?m=C+Math.pow(2,32)*y:m=C+Math.pow(2,32)*(y-Math.pow(2,32)),f+=8}else A==="Float32"?(m=o.getFloat32(f,!0),f+=4):A==="Float64"?(m=o.getFloat64(f,!0),f+=8):A==="String"&&(m=String.fromCharCode(o.getUint8(f)),f+=1);return{value:m,offset:f}};EH.prototype._parseHeader=function(o){let A=0;this._header={};for(let f=0;f<this._storageInfo.header.length;f++){let m=this._storageInfo.header[f],C=this._parseValue(o,m.valueType,A);this._header[m.property]=C.value,A=C.offset}return A};EH.prototype._parseBody=function(o,A){this._values={};for(let f=0;f<this._storageInfo.ordering.length;f++){let m=this._storageInfo.ordering[f],C=this._storageInfo[m];if(O(C)){this._values[m]=[];for(let y=0;y<this._header.count;++y)if(C.valueType!=="String"){let x=this._parseValue(o,C.valueType,A);this._values[m].push(x.value),A=x.offset}else{let x=this._values.attributeByteCounts[y],v="";for(let E=0;E<x;++E){let I=this._parseValue(o,C.valueType,A);I.value.charCodeAt(0)!==0&&(v+=I.value),A=I.offset}this._values[m].push(v)}}}};var g2e=EH;function uW(o,A){let f=o._dataProvider,m=o._layer,C;O(o._nodeIndex)?C=m.resource.getDerivedResource({url:`nodes/${o._data.mesh.geometry.resource}/${A}`}):C=o.resource.getDerivedResource({url:A}),this._parent=o,this._dataProvider=f,this._layer=m,this._resource=C,this._customAttributes=void 0}Object.defineProperties(uW.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},customAttributes:{get:function(){return this._customAttributes}}});uW.prototype.load=function(){let o=this;return this._dataProvider._loadBinary(this._resource).then(function(A){return o._data=A,A})};var cDi=new ee,ADi=new ee,hDi=new ee,dDi=new ee,fDi=new ee;function gpe(o,A,f,m){let C=ee.subtract(m,f,cDi),y=ee.cross(C,ee.subtract(o,f,ADi),dDi),x=ee.cross(C,ee.subtract(A,f,hDi),fDi);return ee.dot(y,x)>=0}var gDi=new ee,pDi=new ee,mDi=new ee,CDi=new ee,yDi=new ee,xDi=new ee,vDi=new ee,EDi=new ee,IDi=new ee,_Di=new ee;uW.prototype.getClosestPointIndexOnTriangle=function(o,A,f){if(O(this._customAttributes)&&O(this._customAttributes.positions)){let m=new ee(o,A,f);m.x-=this._customAttributes.cartesianCenter.x,m.y-=this._customAttributes.cartesianCenter.y,m.z-=this._customAttributes.cartesianCenter.z,ci.multiplyByVector(this._customAttributes.parentRotation,m,m);let C=Number.MAX_VALUE,y,x,v,E,I=this._customAttributes.positions,w=this._customAttributes.indices,Q;O(w)?Q=w.length:Q=I.length/3;for(let M=0;M<Q;M++){let B,T,D;O(w)?(B=w[M],T=w[M+1],D=w[M+2]):(B=M*3,T=M*3+1,D=M*3+2);let F=ee.fromElements(I[B*3],I[B*3+1],I[B*3+2],gDi),L=ee.fromElements(I[T*3],I[T*3+1],I[T*3+2],pDi),R=new ee(I[D*3],I[D*3+1],I[D*3+2],mDi);if(!gpe(m,F,L,R)||!gpe(m,L,F,R)||!gpe(m,R,F,L))continue;let k=ee.subtract(L,F,CDi),U=ee.subtract(R,F,yDi),V=ee.cross(k,U,xDi);if(ee.magnitude(V)===0)continue;let H=ee.normalize(V,vDi),q=ee.subtract(m,F,EDi),ie=Math.abs(ee.dot(q,H));if(ie<C){C=ie,y=M;let Z=ee.magnitudeSquared(ee.subtract(m,F,q)),oe=ee.magnitudeSquared(ee.subtract(m,L,IDi)),ne=ee.magnitudeSquared(ee.subtract(m,R,_Di));Z<oe&&Z<ne?(v=B,E=F,x=Z):oe<ne?(v=T,E=L,x=oe):(v=D,E=R,x=ne)}}if(O(y))return{index:v,distanceSquared:x,distance:Math.sqrt(x),queriedPosition:m,closestPosition:ee.clone(E)}}return{index:-1,distanceSquared:Number.Infinity,distance:Number.Infinity}};uW.prototype._generateGltf=function(o,A,f,m,C,y){let x={pbrMetallicRoughness:{metallicFactor:0},doubleSided:!0,name:"Material"},v=!1,E,I="";if(O(this._parent._data.mesh)&&O(this._layer._data.materialDefinitions)){let B=this._parent._data.mesh.material.definition;if(B>=0&&B<this._layer._data.materialDefinitions.length&&(E=this._layer._data.materialDefinitions[B],x=E,O(x.pbrMetallicRoughness)&&O(x.pbrMetallicRoughness.baseColorTexture))){v=!0,x.pbrMetallicRoughness.baseColorTexture.index=0;let T="0";if(O(this._layer._data.textureSetDefinitions))for(let D=0;D<this._layer._data.textureSetDefinitions.length;D++){let F=this._layer._data.textureSetDefinitions[D];for(let L=0;L<F.formats.length;L++){let R=F.formats[L];if(R.format==="jpg"){T=R.name;break}}}O(this._parent._data.mesh)&&this._parent._data.mesh.material.resource>=0&&(I=this._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.material.resource}/textures/${T}`}).url)}}else O(this._parent._data.textureData)&&(v=!0,I=this._parent.resource.getDerivedResource({url:`${this._parent._data.textureData[0].href}`}).url,x.pbrMetallicRoughness.baseColorTexture={index:0});let w=[],Q=[],M=[];return v&&(w=[{sampler:0,source:0}],Q=[{uri:I}],M=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]),{scene:0,scenes:[{nodes:o}],nodes:A,meshes:f,buffers:m,bufferViews:C,accessors:y,materials:[x],textures:w,images:Q,samplers:M,asset:{version:"2.0"}}};var bie=uW;function sI(o,A,f){let m,C,y,x;f?(m=0,C=o):(m=o._level+1,C=o._layer),typeof A=="number"?y=A:x=o.resource.getDerivedResource({url:`${A}/`}),this._parent=o,this._dataProvider=o._dataProvider,this._isRoot=f,this._level=m,this._layer=C,this._nodeIndex=y,this._resource=x,this._tile=void 0,this._data=void 0,this._geometryData=[],this._featureData=[],this._fields={},this._children=[],this._childrenReadyPromise=void 0,this._globalTransform=void 0,this._inverseGlobalTransform=void 0,this._inverseRotationMatrix=void 0}Object.defineProperties(sI.prototype,{resource:{get:function(){return this._resource}},layer:{get:function(){return this._layer}},parent:{get:function(){return this._parent}},children:{get:function(){return this._children}},geometryData:{get:function(){return this._geometryData}},featureData:{get:function(){return this._featureData}},fields:{get:function(){return this._fields}},tile:{get:function(){return this._tile}},data:{get:function(){return this._data}}});sI.prototype.load=function(){let o=this;function A(){if(!o._isRoot){let f=o._create3DTileDefinition();o._tile=new Ov(o._layer._tileset,o._dataProvider.resource,f,o._parent._tile),o._tile._i3sNode=o}}return O(this._nodeIndex)?this._layer._getNodeInNodePages(this._nodeIndex).then(function(f){o._data=f;let m;o._isRoot?m="nodes/root/":O(f.mesh)&&(m=`../${f.mesh.geometry.resource}/`),O(m)&&(o._resource=o._parent.resource.getDerivedResource({url:m})),A()}):this._dataProvider._loadJson(this._resource).then(function(f){o._data=f,A()})};sI.prototype.loadFields=function(){let o=this._layer._data.attributeStorageInfo,A=this;function f(C,y){let x=new g2e(A,C[y]);return A._fields[x._storageInfo.name]=x,x.load()}let m=[];if(O(o))for(let C=0;C<o.length;C++)m.push(f(o,C));return Promise.all(m)};sI.prototype.getFieldsForPickedPosition=function(o){let A=this.geometryData[0];if(!O(A.customAttributes.featureIndex))return{};let f=A.getClosestPointIndexOnTriangle(o.x,o.y,o.z);if(f.index===-1||f.index>A.customAttributes.featureIndex.length)return{};let m=A.customAttributes.featureIndex[f.index];return this.getFieldsForFeature(m)};sI.prototype.getFieldsForFeature=function(o){let A={};for(let f in this.fields)if(this.fields.hasOwnProperty(f)){let m=this.fields[f];o>=0&&o<m.values.length&&(A[m.name]=m.values[o])}return A};sI.prototype._loadChildren=function(){let o=this;if(O(this._childrenReadyPromise))return this._childrenReadyPromise;let A=[];if(O(o._data.children))for(let f=0;f<o._data.children.length;f++){let m=o._data.children[f],C=new sI(o,Ae(m.href,m),!1);o._children.push(C),A.push(C.load())}return this._childrenReadyPromise=Promise.all(A).then(function(){for(let f=0;f<o._children.length;f++)o._tile.children.push(o._children[f]._tile)}),this._childrenReadyPromise};sI.prototype._loadGeometryData=function(){let o=[];if(O(this._data.geometryData))for(let A=0;A<this._data.geometryData.length;A++){let f=new bie(this,this._data.geometryData[A].href);this._geometryData.push(f),o.push(f.load())}else if(O(this._data.mesh)){let A=this._layer._findBestGeometryBuffers(this._data.mesh.geometry.definition,["position","uv0"]),f=`./geometries/${A.bufferIndex}/`,m=new bie(this,f);m._geometryDefinitions=A.definition,m._geometryBufferInfo=A.geometryBufferInfo,this._geometryData.push(m),o.push(m.load())}return Promise.all(o)};sI.prototype._loadFeatureData=function(){let o=[];if(O(this._data.featureData))for(let A=0;A<this._data.featureData.length;A++){let f=new f2e(this,this._data.featureData[A].href);this._featureData.push(f),o.push(f.load())}return Promise.all(o)};sI.prototype._clearGeometryData=function(){this._geometryData=[]};sI.prototype._create3DTileDefinition=function(){let o=this._data.obb,A=this._data.mbs;if(!O(o)&&!O(A)){console.error("Failed to load I3S node. Bounding volume is required.");return}let f;if(O(o)?f=Kt.fromDegrees(o.center[0],o.center[1],o.center[2]):f=Kt.fromDegrees(A[0],A[1],A[2]),O(this._dataProvider._geoidDataList)&&O(f))for(let F=0;F<this._dataProvider._geoidDataList.length;F++){let L=this._dataProvider._geoidDataList[F],R=L.projection.project(f);if(R.x>L.nativeExtent.west&&R.x<L.nativeExtent.east&&R.y>L.nativeExtent.south&&R.y<L.nativeExtent.north){f.height+=wDi(R.x,R.y,L);break}}let m={},C,y=0;O(o)?(m={box:[0,0,0,o.halfSize[0],0,0,0,o.halfSize[1],0,0,0,o.halfSize[2]]},y=Math.max(Math.max(this._data.obb.halfSize[0],this._data.obb.halfSize[1]),this._data.obb.halfSize[2]),C=Di.WGS84.cartographicToCartesian(f)):(m={sphere:[0,0,0,A[3]]},C=Di.WGS84.cartographicToCartesian(f),y=this._data.mbs[3]),y*=2;let x=1/0;if(O(this._data.lodThreshold))if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThresholdSQ"){let F=Math.sqrt(this._data.lodThreshold/(Math.PI*.25));x=y/F}else if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThreshold"){let F=this._data.lodThreshold;x=y/F}else console.error("Invalid lodSelectionMetricType in Layer");else if(O(this._data.lodSelection))for(let F=0;F<this._data.lodSelection.length;F++)this._data.lodSelection[F].metricType==="maxScreenThreshold"&&(x=y/this._data.lodSelection[F].maxError);x===1/0&&(x=1e5);let v=x*16,E=new dC(0,0,0),I=Vn.headingPitchRollQuaternion(C,E);O(this._data.obb)&&(I=new jr(this._data.obb.quaternion[0],this._data.obb.quaternion[1],this._data.obb.quaternion[2],this._data.obb.quaternion[3]));let w=ci.fromQuaternion(I),Q=ci.inverse(w,new ci),M=new Xe(w[0],w[1],w[2],0,w[3],w[4],w[5],0,w[6],w[7],w[8],0,C.x,C.y,C.z,1),B=Xe.inverse(M,new Xe),T=Xe.clone(M);O(this._parent._globalTransform)&&Xe.multiply(M,this._parent._inverseGlobalTransform,T),this._globalTransform=M,this._inverseGlobalTransform=B,this._inverseRotationMatrix=Q;let D=[];for(let F=0;F<this._children.length;F++)D.push(this._children[F]._create3DTileDefinition());return{children:D,refine:"REPLACE",boundingVolume:m,transform:[T[0],T[4],T[8],T[12],T[1],T[5],T[9],T[13],T[2],T[6],T[10],T[14],T[3],T[7],T[11],T[15]],content:{uri:O(this._resource)?this._resource.url:void 0},geometricError:v}};sI.prototype._createI3SDecoderTask=function(o,A){let f=A.geometryData._parent._data,m=A.geometryData._parent._inverseRotationMatrix,C=0,y=0,x=0;O(f.obb)?(C=f.obb.center[0],y=f.obb.center[1],x=f.obb.center[2]):O(f.mbs)&&(C=f.mbs[0],y=f.mbs[1],x=f.mbs[2]);let v=ci.fromRotationX(-je.PI_OVER_TWO),E=new ci;ci.multiply(v,m,E);let I=Kt.fromDegrees(C,y,x),w=Di.WGS84.cartographicToCartesian(I),Q={binaryData:A.geometryData._data,featureData:O(A.featureData)&&O(A.featureData[0])?A.featureData[0].data:void 0,schema:A.defaultGeometrySchema,bufferInfo:A.geometryData._geometryBufferInfo,ellipsoidRadiiSquare:Di.WGS84.radiiSquared,url:A.url,geoidDataList:A.geometryData._dataProvider._geoidDataList,cartographicCenter:I,cartesianCenter:w,parentRotation:E},M=o._getDecoderTaskProcessor(),B=[];return o._taskProcessorReadyPromise.then(function(){return M.scheduleTask(Q,B)})};sI.prototype._createContentURL=function(){let o={scene:0,scenes:[{nodes:[0]}],nodes:[{name:"singleNode"}],meshes:[],buffers:[],bufferViews:[],accessors:[],materials:[],textures:[],images:[],samplers:[],asset:{version:"2.0"}},A=[this._loadGeometryData()];this._dataProvider.legacyVersion16&&A.push(this._loadFeatureData());let f=this;return Promise.all(A).then(function(){let m=Promise.resolve();if(O(f._geometryData)&&f._geometryData.length>0){let C={geometryData:f._geometryData[0],featureData:f._featureData,defaultGeometrySchema:f._layer._data.store.defaultGeometrySchema,url:f._geometryData[0].resource.url,tile:f._tile},y=f._createI3SDecoderTask(f._dataProvider,C);if(!O(y))return;m=y.then(function(x){o=C.geometryData._generateGltf(x.meshData.nodesInScene,x.meshData.nodes,x.meshData.meshes,x.meshData.buffers,x.meshData.bufferViews,x.meshData.accessors),f._geometryData[0]._customAttributes=x.meshData._customAttributes})}return m.then(function(){let C=f._dataProvider._binarizeGltf(o),y=new Blob([C],{type:"application/binary"});f._glbURL=URL.createObjectURL(y)})})};Ov.prototype._hookedRequestContent=Ov.prototype.requestContent;Ov.prototype._resolveHookedObject=function(){let o=this;this._hookedRequestContent(),this._contentReadyToProcessPromise.then(function(){o._contentReadyToProcessDefer.resolve()}),this._contentReadyPromise.then(function(A){o._isLoading=!1,o._contentReadyDefer.resolve(A)})};Ov.prototype.requestContent=function(){let o=this;return this.tileset._isI3STileSet?this._isLoading?1:(this._isLoading=!0,this._contentReadyToProcessDefer=rA(),this._contentReadyDefer=rA(),this._contentReadyToProcessPromise=this._contentReadyToProcessDefer.promise,this._contentReadyPromise=this._contentReadyDefer.promise,this._i3sNode._createContentURL().then(function(){o._contentResource=new An({url:o._i3sNode._glbURL}),o._resolveHookedObject()}),0):this._hookedRequestContent()};function BDi(o,A,f,m,C,y){let x=f*(1-o)+m*o,v=C*(1-o)+y*o;return x*(1-A)+v*A}function O$(o,A,f,m){let C=o+A*f;return m[C]}function wDi(o,A,f){let m=f.nativeExtent,C=(o-m.west)/(m.east-m.west)*(f.width-1),y=(A-m.south)/(m.north-m.south)*(f.height-1),x=Math.floor(C),v=Math.floor(y);C-=x,y-=v;let E=x<f.width?x+1:x,I=v<f.height?v+1:v;v=f.height-1-v,I=f.height-1-I;let w=O$(x,v,f.width,f.buffer),Q=O$(E,v,f.width,f.buffer),M=O$(x,I,f.width,f.buffer),B=O$(E,I,f.width,f.buffer),T=BDi(C,y,w,Q,M,B);return T=T*f.scale+f.offset,T}Object.defineProperties(Ov.prototype,{i3sNode:{get:function(){return this._i3sNode}}});var Qie=sI;function X1(o,A,f){this._dataProvider=o,O(A.href)||(A.href=`./layers/${f}`);let m=this._dataProvider.resource.getUrlComponent(),C="";m.match(/layers\/\d/)?C=`${m}`.replace(/\/+$/,""):C=`${m}`.replace(/\/?$/,"/").concat(`${A.href}`),this._version=A.store.version;let y=this._version.split(".");this._majorVersion=parseInt(y[0]),this._minorVersion=y.length>1?parseInt(y[1]):0,this._resource=new An({url:C}),this._resource.setQueryParameters(this._dataProvider.resource.queryParameters),this._resource.appendForwardSlash(),this._data=A,this._rootNode=void 0,this._nodePages={},this._nodePageFetches={},this._extent=void 0,this._tileset=void 0,this._geometryDefinitions=void 0,this._computeGeometryDefinitions(!0),this._computeExtent()}Object.defineProperties(X1.prototype,{resource:{get:function(){return this._resource}},rootNode:{get:function(){return this._rootNode}},tileset:{get:function(){return this._tileset}},data:{get:function(){return this._data}},version:{get:function(){return this._version}},majorVersion:{get:function(){return this._majorVersion}},minorVersion:{get:function(){return this._minorVersion}},legacyVersion16:{get:function(){if(O(this.version))return this.majorVersion<1||this.majorVersion===1&&this.minorVersion<=6}}});X1.prototype.load=function(){let o=this;return this._data.spatialReference.wkid!==4326?(console.log(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`),Promise.reject()):this._dataProvider._geoidDataIsReadyPromise.then(function(){return o._loadRootNode().then(function(){return o._create3DTileset(),o._tileset.readyPromise.then(function(){if(o._rootNode._tile=o._tileset._root,o._tileset._root._i3sNode=o._rootNode,o.legacyVersion16)return o._rootNode._loadChildren()})})})};X1.prototype._computeGeometryDefinitions=function(o){if(this._geometryDefinitions=[],O(this._data.geometryDefinitions))for(let A=0;A<this._data.geometryDefinitions.length;A++){let f=[],m=this._data.geometryDefinitions[A].geometryBuffers;for(let C=0;C<m.length;C++){let y=m[C],x=[],v=!1;if(O(y.compressedAttributes)&&o){v=!0;let E=y.compressedAttributes.attributes;for(let I=0;I<E.length;I++)x.push(E[I])}else for(let E in y)E!=="offset"&&x.push(E);f.push({compressed:v,attributes:x,index:m.indexOf(y)})}f.sort(function(C,y){return C.compressed&&!y.compressed?-1:!C.compressed&&y.compressed?1:C.attributes.length-y.attributes.length}),this._geometryDefinitions.push(f)}};X1.prototype._findBestGeometryBuffers=function(o,A){let f=this._geometryDefinitions[o];if(O(f))for(let m=0;m<f.length;++m){let C=f[m],y=!1,x=C.attributes;for(let v=0;v<A.length;v++)if(!x.includes(A[v])){y=!0;break}if(!y)return{bufferIndex:C.index,definition:f,geometryBufferInfo:C}}return 0};X1.prototype._loadRootNode=function(){if(O(this._data.nodePages)){let o=0;O(this._data.nodePages.rootIndex)&&(o=this._data.nodePages.rootIndex),this._rootNode=new Qie(this,o,!0)}else this._rootNode=new Qie(this,this._data.store.rootNode,!0);return this._rootNode.load()};X1.prototype._getNodeInNodePages=function(o){let A=Math.floor(o/this._data.nodePages.nodesPerPage),f=o%this._data.nodePages.nodesPerPage,m=this;return this._loadNodePage(A).then(function(){return m._nodePages[A][f]})};X1._fetchJson=function(o){return o.fetchJson()};X1.prototype._loadNodePage=function(o){let A=this;if(!O(this._nodePageFetches[o])){let f=this.resource.getDerivedResource({url:`nodepages/${o}/`}),m=X1._fetchJson(f).then(function(C){return O(C.error)&&C.error.code!==200?Promise.reject(C.error):(A._nodePages[o]=C.nodes,C)});this._nodePageFetches[o]=m}return this._nodePageFetches[o]};X1.prototype._computeExtent=function(){O(this._data.fullExtent)?this._extent=Si.fromDegrees(this._data.fullExtent.xmin,this._data.fullExtent.ymin,this._data.fullExtent.xmax,this._data.fullExtent.ymax):O(this._data.store.extent)&&(this._extent=Si.fromDegrees(this._data.store.extent[0],this._data.store.extent[1],this._data.store.extent[2],this._data.store.extent[3]))};X1.prototype._create3DTileset=function(){let o={asset:{version:"1.0"},geometricError:Number.MAX_VALUE,root:this._rootNode._create3DTileDefinition()},A=new Blob([JSON.stringify(o)],{type:"application/json"}),f=URL.createObjectURL(A),m={};if(O(this._dataProvider._cesium3dTilesetOptions))for(let y in this._dataProvider._cesium3dTilesetOptions)this._dataProvider._cesium3dTilesetOptions.hasOwnProperty(y)&&(m[y]=this._dataProvider._cesium3dTilesetOptions[y]);m.url=f,m.show=this._dataProvider.show,this._tileset=new Fx(m),this._tileset._isI3STileSet=!0;let C=this;this._tileset.readyPromise.then(function(){C._tileset.tileUnload.addEventListener(function(y){y._i3sNode._clearGeometryData(),URL.revokeObjectURL(y._contentResource._url),y._contentResource=y._i3sNode.resource}),C._tileset.tileVisible.addEventListener(function(y){O(y._i3sNode)&&y._i3sNode._loadChildren()})})};var Sie=X1,bDi=Eh(TBt(),1);function dy(o){o=Ae(o,Ae.EMPTY_OBJECT),this._resource=An.createIfNeeded(o.url),this._name=o.name,this._show=Ae(o.show,!0),this._geoidTiledTerrainProvider=o.geoidTiledTerrainProvider,this._traceFetches=Ae(o.traceFetches,!1),this._cesium3dTilesetOptions=Ae(o.cesium3dTilesetOptions,Ae.EMPTY_OBJECT),this._layers=[],this._data=void 0,this._extent=void 0,this._geoidDataIsReadyPromise=void 0,this._geoidDataList=void 0,this._decoderTaskProcessor=void 0,this._readyPromise=void 0,this._ready=!1,this._load()}Object.defineProperties(dy.prototype,{name:{get:function(){return this._name}},show:{get:function(){return this._show},set:function(o){this._show=o;for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&(this._layers[A]._tileset.show=this._show)}},traceFetches:{get:function(){return this._traceFetches},set:function(o){this._traceFetches=o}},geoidTiledTerrainProvider:{get:function(){return this._geoidTiledTerrainProvider}},layers:{get:function(){return this._layers}},data:{get:function(){return this._data}},extent:{get:function(){return this._extent}},readyPromise:{get:function(){return this._readyPromise}},ready:{get:function(){return this._ready}},resource:{get:function(){return this._resource}}});dy.prototype.destroy=function(){for(let o=0;o<this._layers.length;o++)O(this._layers[o]._tileset)&&this._layers[o]._tileset.destroy();return Qr(this)};dy.prototype.isDestroyed=function(){return!1};dy.prototype.update=function(o){for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&this._layers[A]._tileset.ready&&this._layers[A]._tileset.update(o)};dy.prototype.prePassesUpdate=function(o){for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&this._layers[A]._tileset.ready&&this._layers[A]._tileset.prePassesUpdate(o)};dy.prototype.postPassesUpdate=function(o){for(let A=0;A<this._layers.length;A++)O(this._layers[A]._tileset)&&this._layers[A]._tileset.ready&&this._layers[A]._tileset.postPassesUpdate(o)};dy.prototype.updateForPass=function(o,A){for(let f=0;f<this._layers.length;f++)O(this._layers[f]._tileset)&&this._layers[f]._tileset.ready&&this._layers[f]._tileset.updateForPass(o,A)};dy.prototype._load=function(){let o=this;return this._readyPromise=this._loadJson(this._resource).then(function(A){if(o._data=A,O(o._data.layers))for(let m=0;m<o._data.layers.length;m++){let C=new Sie(o,o._data.layers[m],m);o._layers.push(C)}else{let m=new Sie(o,o._data,o._data.id);o._layers.push(m)}o._computeExtent(),o._loadGeoidData();let f=[];for(let m=0;m<o._layers.length;m++)f.push(o._layers[m].load());return Promise.all(f).then(function(){return o._ready=!0,o})}),this._readyPromise};dy._fetchJson=function(o){return o.fetchJson()};dy.prototype._loadJson=function(o){return this._traceFetches&&console.log("I3S FETCH:",o.url),dy._fetchJson(o).then(function(A){if(O(A.error)){if(console.error("Failed to fetch I3S ",o.url),O(A.error.message)&&console.error(A.error.message),O(A.error.details))for(let f=0;f<A.error.details.length;f++)console.log(A.error.details[f]);return Promise.reject(A.error)}return A})};dy.prototype._loadBinary=function(o){return this._traceFetches&&console.log("I3S FETCH:",o.url),o.fetchArrayBuffer()};dy.prototype._binarizeGltf=function(o){let A=new TextEncoder().encode(JSON.stringify(o)),f=new Uint8Array(A.byteLength+20),m={magic:new Uint8Array(f.buffer,0,4),version:new Uint32Array(f.buffer,4,1),length:new Uint32Array(f.buffer,8,1),chunkLength:new Uint32Array(f.buffer,12,1),chunkType:new Uint32Array(f.buffer,16,1),chunkData:new Uint8Array(f.buffer,20,A.byteLength)};return m.magic[0]="g".charCodeAt(),m.magic[1]="l".charCodeAt(),m.magic[2]="T".charCodeAt(),m.magic[3]="F".charCodeAt(),m.version[0]=2,m.length[0]=f.byteLength,m.chunkLength[0]=A.byteLength,m.chunkType[0]=1313821514,m.chunkData.set(A),f};dy.prototype._getDecoderTaskProcessor=function(){if(!O(this._decoderTaskProcessor)){let o=new Vf("decodeI3S");this._taskProcessorReadyPromise=o.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_decoder_nodejs.js",wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}),this._decoderTaskProcessor=o}return this._decoderTaskProcessor};function QDi(o,A){return o.readyPromise.then(function(){return DDi(o,A)})}var SDi=new It;function DDi(o,A){let f=o.tilingScheme,m=[],C={},y=o._lodCount,x=Kt.fromRadians(A.west,A.north),v=Kt.fromRadians(A.east,A.south),E=f.positionToTileXY(x,y),I=f.positionToTileXY(v,y);for(let Q=E.x;Q<=I.x;Q++)for(let M=E.y;M<=I.y;M++){let B=It.fromElements(Q,M,SDi),T=B.toString();if(!C.hasOwnProperty(T)){let D={x:B.x,y:B.y,level:y,tilingScheme:f,terrainProvider:o,positions:[]};C[T]=D,m.push(D)}}let w=[];for(let Q=0;Q<m.length;++Q){let M=m[Q],B=M.terrainProvider.requestTileGeometry(M.x,M.y,M.level);w.push(B)}return Promise.all(w).then(function(Q){let M=[];for(let B=0;B<Q.length;B++){let T={tilingScheme:f,x:m[B].x,y:m[B].y,level:m[B].level},D=Q[B],F="Geographic";f._projection instanceof OA&&(F="WebMercator");let L={projectionType:F,projection:f._projection,nativeExtent:f.tileXYToNativeRectangle(T.x,T.y,T.level),height:D._height,width:D._width,scale:D._structure.heightScale,offset:D._structure.heightOffset};if(D._encoding===HF.LERC){let R=bDi.default.decode(D._buffer);L.buffer=R.pixels[0]}else L.buffer=D._buffer;M.push(L)}return M})}dy.prototype._loadGeoidData=function(){let o=this,A=this._geoidTiledTerrainProvider;return O(A)?(this._geoidDataIsReadyPromise=A.readyPromise.then(function(){return QDi(A,o._extent).then(function(f){o._geoidDataList=f})}),this._geoidDataIsReadyPromise):(console.log("No Geoid Terrain service provided - no geoid conversion will be performed."),this._geoidDataIsReadyPromise=Promise.resolve(),this._geoidDataIsReadyPromise)};dy.prototype._computeExtent=function(){let o;for(let A=0;A<this._layers.length;A++)if(O(this._layers[A]._extent)){let f=this._layers[A]._extent;O(o)?Si.union(o,f,o):o=Si.clone(f)}this._extent=o};var Hst=dy;function Vst(){}Object.defineProperties(Vst.prototype,{color:{get:Ui.throwInstantiationError},intensity:{get:Ui.throwInstantiationError}});var zst=Vst,TDi=/\/$/,Kst=new tl('&copy; <a href="https://www.mapbox.com/about/maps/">Mapbox</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function IH(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.styleId,f=o.accessToken;this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;let m=An.createIfNeeded(Ae(o.url,"https://api.mapbox.com/styles/v1/"));this._styleId=A,this._accessToken=f;let C=Ae(o.tilesize,512);this._tilesize=C;let y=Ae(o.username,"mapbox");this._username=y;let x=O(o.scaleFactor)?"@2x":"",v=m.getUrlComponent();TDi.test(v)||(v+="/"),v+=`${this._username}/${A}/tiles/${this._tilesize}/{z}/{x}/{y}${x}`,m.url=v,m.setQueryParameters({access_token:f});let E;O(o.credit)?(E=o.credit,typeof E=="string"&&(E=new tl(E))):E=Kst,this._resource=m,this._imageryProvider=new sw({url:m,credit:E,ellipsoid:o.ellipsoid,minimumLevel:o.minimumLevel,maximumLevel:o.maximumLevel,rectangle:o.rectangle})}Object.defineProperties(IH.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});IH.prototype.getTileCredits=function(o,A,f){};IH.prototype.requestImage=function(o,A,f,m){return this._imageryProvider.requestImage(o,A,f,m)};IH.prototype.pickFeatures=function(o,A,f,m,C){return this._imageryProvider.pickFeatures(o,A,f,m,C)};IH._defaultCredit=Kst;var Yst=IH;function p2e(o){}p2e.prototype.isReady=function(){return!0};p2e.prototype.shouldDiscardImage=function(o){return!1};var Jst=p2e,MDi=new It(1,1);function m2e(o){o=Ae(o,Ae.EMPTY_OBJECT),this.mass=Ae(o.mass,1),this.position=ee.clone(Ae(o.position,ee.ZERO)),this.velocity=ee.clone(Ae(o.velocity,ee.ZERO)),this.life=Ae(o.life,Number.MAX_VALUE),this.image=o.image,this.startColor=At.clone(Ae(o.startColor,At.WHITE)),this.endColor=At.clone(Ae(o.endColor,At.WHITE)),this.startScale=Ae(o.startScale,1),this.endScale=Ae(o.endScale,1),this.imageSize=It.clone(Ae(o.imageSize,MDi)),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(m2e.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var m7e=new ee;m2e.prototype.update=function(o,A){return ee.multiplyByScalar(this.velocity,o,m7e),ee.add(this.position,m7e,this.position),O(A)&&A(this,o),this._age+=o,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life};var vae=m2e;function Wst(o){o=Ae(o,Ae.EMPTY_OBJECT),this.time=Ae(o.time,0),this.minimum=Ae(o.minimum,0),this.maximum=Ae(o.maximum,50),this._complete=!1}Object.defineProperties(Wst.prototype,{complete:{get:function(){return this._complete}}});var _H=Wst;function jst(o){}jst.prototype.emit=function(o){Ui.throwInstantiationError()};var qst=jst,C7e=new It(1,1);function cW(o){o=Ae(o,Ae.EMPTY_OBJECT),this.show=Ae(o.show,!0),this.updateCallback=o.updateCallback,this.loop=Ae(o.loop,!0),this.image=Ae(o.image,void 0);let A=o.emitter;O(A)||(A=new a2e(.5)),this._emitter=A,this._bursts=o.bursts,this._modelMatrix=Xe.clone(Ae(o.modelMatrix,Xe.IDENTITY)),this._emitterModelMatrix=Xe.clone(Ae(o.emitterModelMatrix,Xe.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new Xe,this._startColor=At.clone(Ae(o.color,Ae(o.startColor,At.WHITE))),this._endColor=At.clone(Ae(o.color,Ae(o.endColor,At.WHITE))),this._startScale=Ae(o.scale,Ae(o.startScale,1)),this._endScale=Ae(o.scale,Ae(o.endScale,1)),this._emissionRate=Ae(o.emissionRate,5),this._minimumSpeed=Ae(o.speed,Ae(o.minimumSpeed,1)),this._maximumSpeed=Ae(o.speed,Ae(o.maximumSpeed,1)),this._minimumParticleLife=Ae(o.particleLife,Ae(o.minimumParticleLife,5)),this._maximumParticleLife=Ae(o.particleLife,Ae(o.maximumParticleLife,5)),this._minimumMass=Ae(o.mass,Ae(o.minimumMass,1)),this._maximumMass=Ae(o.mass,Ae(o.maximumMass,1)),this._minimumImageSize=It.clone(Ae(o.imageSize,Ae(o.minimumImageSize,C7e))),this._maximumImageSize=It.clone(Ae(o.imageSize,Ae(o.maximumImageSize,C7e))),this._sizeInMeters=Ae(o.sizeInMeters,!1),this._lifetime=Ae(o.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new br,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0}Object.defineProperties(cW.prototype,{emitter:{get:function(){return this._emitter},set:function(o){this._emitter=o}},bursts:{get:function(){return this._bursts},set:function(o){this._bursts=o,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(o){this._matrixDirty=this._matrixDirty||!Xe.equals(this._modelMatrix,o),Xe.clone(o,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(o){this._matrixDirty=this._matrixDirty||!Xe.equals(this._emitterModelMatrix,o),Xe.clone(o,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(o){At.clone(o,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(o){At.clone(o,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(o){this._startScale=o}},endScale:{get:function(){return this._endScale},set:function(o){this._endScale=o}},emissionRate:{get:function(){return this._emissionRate},set:function(o){this._emissionRate=o,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(o){this._minimumSpeed=o}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(o){this._maximumSpeed=o}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(o){this._minimumParticleLife=o}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(o){this._maximumParticleLife=o,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(o){this._minimumMass=o}},maximumMass:{get:function(){return this._maximumMass},set:function(o){this._maximumMass=o}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(o){this._minimumImageSize=o}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(o){this._maximumImageSize=o}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(o){this._sizeInMeters=o}},lifetime:{get:function(){return this._lifetime},set:function(o){this._lifetime=o}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});function PDi(o){let A=o._emissionRate,f=o._maximumParticleLife,m=0,C=o._bursts;if(O(C)){let Q=C.length;for(let M=0;M<Q;++M)m+=C[M].maximum}let y=o._billboardCollection,x=o.image,v=Math.ceil(A*f+m),E=o._particles,I=o._particlePool,w=Math.max(v-E.length-I.length,0);for(let Q=0;Q<w;++Q){let M=new vae;M._billboard=y.add({image:x}),I.push(M)}o._particleEstimate=v}function RDi(o){let A=o._particlePool.pop();return O(A)||(A=new vae),A}function LDi(o,A){o._particlePool.push(A)}function FDi(o){let A=o._particles,f=o._particlePool,m=o._billboardCollection,C=A.length,y=f.length,x=o._particleEstimate,v=y-Math.max(x-C-y,0);for(let E=v;E<y;++E){let I=f[E];m.remove(I._billboard)}f.length=v}function NDi(o){O(o._billboard)&&(o._billboard.show=!1)}function y7e(o,A){let f=A._billboard;O(f)||(f=A._billboard=o._billboardCollection.add({image:A.image})),f.width=A.imageSize.x,f.height=A.imageSize.y,f.position=A.position,f.sizeInMeters=o.sizeInMeters,f.show=!0;let m=je.lerp(A.startColor.red,A.endColor.red,A.normalizedAge),C=je.lerp(A.startColor.green,A.endColor.green,A.normalizedAge),y=je.lerp(A.startColor.blue,A.endColor.blue,A.normalizedAge),x=je.lerp(A.startColor.alpha,A.endColor.alpha,A.normalizedAge);f.color=new At(m,C,y,x),f.scale=je.lerp(A.startScale,A.endScale,A.normalizedAge)}function kDi(o,A){A.startColor=At.clone(o._startColor,A.startColor),A.endColor=At.clone(o._endColor,A.endColor),A.startScale=o._startScale,A.endScale=o._endScale,A.image=o.image,A.life=je.randomBetween(o._minimumParticleLife,o._maximumParticleLife),A.mass=je.randomBetween(o._minimumMass,o._maximumMass),A.imageSize.x=je.randomBetween(o._minimumImageSize.x,o._maximumImageSize.x),A.imageSize.y=je.randomBetween(o._minimumImageSize.y,o._maximumImageSize.y),A._normalizedAge=0,A._age=0;let f=je.randomBetween(o._minimumSpeed,o._maximumSpeed);ee.multiplyByScalar(A.velocity,f,A.velocity),o._particles.push(A)}function ODi(o,A){if(o._isComplete)return 0;A=je.mod(A,o._lifetime);let f=A*o._emissionRate,m=Math.floor(f);if(o._carryOver+=f-m,o._carryOver>1&&(m++,o._carryOver-=1),O(o.bursts)){let C=o.bursts.length;for(let y=0;y<C;y++){let x=o.bursts[y],v=o._currentTime;O(x)&&!x._complete&&v>x.time&&(m+=je.randomBetween(x.minimum,x.maximum),x._complete=!0)}}return m}var U$=new ee;cW.prototype.update=function(o){if(!this.show)return;O(this._billboardCollection)||(this._billboardCollection=new iI),this._updateParticlePool&&(PDi(this),this._updateParticlePool=!1);let A=0;this._previousTime&&(A=fi.secondsDifference(o.time,this._previousTime)),A<0&&(A=0);let f=this._particles,m=this._emitter,C=this.updateCallback,y,x,v=f.length;for(y=0;y<v;++y)x=f[y],x.update(A,C)?y7e(this,x):(NDi(x),LDi(this,x),f[y]=f[v-1],--y,--v);f.length=v;let E=ODi(this,A);if(E>0&&O(m)){this._matrixDirty&&(this._combinedMatrix=Xe.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);let I=this._combinedMatrix;for(y=0;y<E;y++)x=RDi(this),this._emitter.emit(x),ee.add(x.position,x.velocity,U$),Xe.multiplyByPoint(I,U$,U$),x.position=Xe.multiplyByPoint(I,x.position,x.position),ee.subtract(U$,x.position,x.velocity),ee.normalize(x.velocity,x.velocity),kDi(this,x),y7e(this,x)}if(this._billboardCollection.update(o),this._previousTime=fi.clone(o.time,this._previousTime),this._currentTime+=A,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=je.mod(this._currentTime,this._lifetime),this.bursts){let I=this.bursts.length;for(y=0;y<I;y++)this.bursts[y]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);o.frameNumber%120===0&&FDi(this)};cW.prototype.isDestroyed=function(){return!1};cW.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),Qr(this)};var _2=cW;function dB(){Ui.throwInstantiationError()}dB.computeDefaultLevelZeroMaximumGeometricError=function(o){return o.ellipsoid.maximumRadius*2*Math.PI*.25/(65*o.getNumberOfXTilesAtLevel(0))};Object.defineProperties(dB.prototype,{quadtree:{get:Ui.throwInstantiationError,set:Ui.throwInstantiationError},ready:{get:Ui.throwInstantiationError},tilingScheme:{get:Ui.throwInstantiationError},errorEvent:{get:Ui.throwInstantiationError}});dB.prototype.update=Ui.throwInstantiationError;dB.prototype.beginUpdate=Ui.throwInstantiationError;dB.prototype.endUpdate=Ui.throwInstantiationError;dB.prototype.getLevelMaximumGeometricError=Ui.throwInstantiationError;dB.prototype.loadTile=Ui.throwInstantiationError;dB.prototype.computeTileVisibility=Ui.throwInstantiationError;dB.prototype.showTileThisFrame=Ui.throwInstantiationError;dB.prototype.computeDistanceToTile=Ui.throwInstantiationError;dB.prototype.isDestroyed=Ui.throwInstantiationError;dB.prototype.destroy=Ui.throwInstantiationError;var Xst=dB;function C2e(o){o=Ae(o,1),this._radius=Ae(o,1)}Object.defineProperties(C2e.prototype,{radius:{get:function(){return this._radius},set:function(o){this._radius=o}}});C2e.prototype.emit=function(o){let A=je.randomBetween(0,je.TWO_PI),f=je.randomBetween(0,je.PI),m=je.randomBetween(0,this._radius),C=m*Math.cos(A)*Math.sin(f),y=m*Math.sin(A)*Math.sin(f),x=m*Math.cos(f);o.position=ee.fromElements(C,y,x,o.position),o.velocity=ee.normalize(o.position,o.velocity)};var BH=C2e;function AW(){}AW.prototype.evaluate=function(o,A){Ui.throwInstantiationError()};AW.prototype.evaluateColor=function(o,A){Ui.throwInstantiationError()};AW.prototype.getShaderFunction=function(o,A,f,m){Ui.throwInstantiationError()};AW.prototype.getVariables=function(){Ui.throwInstantiationError()};var Zst=AW;function wH(){}wH.prototype.boundingVolume=void 0;wH.prototype.boundingSphere=void 0;wH.prototype.distanceToCamera=function(o){Ui.throwInstantiationError()};wH.prototype.intersectPlane=function(o){Ui.throwInstantiationError()};wH.prototype.createDebugVolume=function(o){Ui.throwInstantiationError()};var $st=wH;function hW(o){o=Ae(o,Ae.EMPTY_OBJECT),this._tilingScheme=O(o.tilingScheme)?o.tilingScheme:new af({ellipsoid:o.ellipsoid}),this._color=Ae(o.color,At.YELLOW),this._errorEvent=new br,this._tileWidth=Ae(o.tileWidth,256),this._tileHeight=Ae(o.tileHeight,256),this._readyPromise=Promise.resolve(!0),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0}Object.defineProperties(hW.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});hW.prototype.getTileCredits=function(o,A,f){};hW.prototype.requestImage=function(o,A,f,m){let C=document.createElement("canvas");C.width=256,C.height=256;let y=C.getContext("2d"),x=this._color.toCssColorString();return y.strokeStyle=x,y.lineWidth=2,y.strokeRect(1,1,255,255),y.font="bold 25px Arial",y.textAlign="center",y.fillStyle=x,y.fillText(`L: ${f}`,124,86),y.fillText(`X: ${o}`,124,136),y.fillText(`Y: ${A}`,124,186),Promise.resolve(C)};hW.prototype.pickFeatures=function(o,A,f,m,C){};var y2e=hW;function x2e(o){Ui.throwInstantiationError()}x2e.prototype.isReady=Ui.throwInstantiationError;x2e.prototype.shouldDiscardImage=Ui.throwInstantiationError;var elt=x2e,UDi={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},tlt=Object.freeze(UDi);function Eae(o,A){this.show=!0,O(o)||(o=new Kr),this.rectangle=Kr.clone(o),O(A)||(A=ss.fromType(ss.ColorType,{color:new At(1,1,1,1)})),this.material=A,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}Eae.prototype.update=function(o){if(!this.show)return;let A=this._rs;if((!O(A)||!Kr.equals(A.viewport,this.rectangle))&&(this._rs=fn.fromCache({blending:Bu.ALPHA_BLEND,viewport:this.rectangle})),o.passes.render){let f=o.context;if(this._material!==this.material||!O(this._overlayCommand)){this._material=this.material,O(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();let m=new Fr({sources:[this._material.shaderSource,fDe]});this._overlayCommand=f.createViewportQuadCommand(m,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=hr.OVERLAY}this._material.update(f),this._overlayCommand.renderState=this._rs,this._overlayCommand.uniformMap=this._material._uniforms,o.commandList.push(this._overlayCommand)}};Eae.prototype.isDestroyed=function(){return!1};Eae.prototype.destroy=function(){return O(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),Qr(this)};var ilt=Eae;function GDi(o){return function(A){let f=o._scene.pick(A.position);O(f)&&f.primitive instanceof Fx&&(o.tileset=f.primitive),o.pickActive=!1}}function rlt(o,A){A?o._eventHandler.setInputAction(function(f){let m=o._scene.pick(f.endPosition);O(m)&&m.primitive instanceof Fx&&(o.tileset=m.primitive)},Ki.MOUSE_MOVE):(o._eventHandler.removeInputAction(Ki.MOUSE_MOVE),o.picking=o.picking)}var HDi={maximumFractionDigits:3};function k7(o){let A=o/1048576;return A<1?A.toLocaleString(void 0,HDi):Math.round(A).toLocaleString()}function ZK(o,A){if(!O(o))return"";let f=A?o._statisticsPerPass[Ep.PICK]:o._statisticsPerPass[Ep.RENDER],m='<ul class="cesium-cesiumInspector-statistics">';return m+=`<li><strong>\u8BBF\u95EE: </strong>${f.visited.toLocaleString()}</li><li><strong>\u9009\u62E9: </strong>${f.selected.toLocaleString()}</li><li><strong>\u7ED8\u5236\u547D\u4EE4: </strong>${f.numberOfCommands.toLocaleString()}</li>`,m+="</ul>",A||(m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u8BF7\u6C42: </strong>${f.numberOfPendingRequests.toLocaleString()}</li><li><strong>\u5C1D\u8BD5: </strong>${f.numberOfAttemptedRequests.toLocaleString()}</li><li><strong>\u5904\u7406\u4E2D: </strong>${f.numberOfTilesProcessing.toLocaleString()}</li><li><strong>\u5185\u5BB9\u5C31\u7EEA: </strong>${f.numberOfTilesWithContentReady.toLocaleString()}</li><li><strong>\u603B\u5171: </strong>${f.numberOfTilesTotal.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u7279\u5F81\u9009\u62E9: </strong>${f.numberOfFeaturesSelected.toLocaleString()}</li><li><strong>\u7279\u5F81\u52A0\u8F7D: </strong>${f.numberOfFeaturesLoaded.toLocaleString()}</li><li><strong>\u70B9\u4E91\u9009\u62E9: </strong>${f.numberOfPointsSelected.toLocaleString()}</li><li><strong>\u70B9\u4E91\u52A0\u8F7D: </strong>${f.numberOfPointsLoaded.toLocaleString()}</li><li><strong>\u4E09\u89D2\u5F62\u6570: </strong>${f.numberOfTrianglesSelected.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u6837\u5F0F\u6E32\u67D3\u74E6\u7247\u6570: </strong>${f.numberOfTilesStyled.toLocaleString()}</li><li><strong>\u6837\u5F0F\u6E32\u67D3\u7279\u5F81\u6570: </strong>${f.numberOfFeaturesStyled.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u5B50\u8282\u70B9\u5254\u9664\u6570: </strong>${f.numberOfTilesCulledWithChildrenUnion.toLocaleString()}</li>`,m+="</ul>",m+='<ul class="cesium-cesiumInspector-statistics">',m+=`<li><strong>\u51E0\u4F55\u5360\u5185\u5B58 (MB): </strong>${k7(f.geometryByteLength)}</li><li><strong>\u7EB9\u7406\u5360\u5185\u5B58 (MB): </strong>${k7(f.texturesByteLength)}</li><li><strong>\u5C5E\u6027\u5360\u5185\u5B58 (MB): </strong>${k7(f.batchTableByteLength)}</li>`,m+="</ul>"),m}function nlt(){let o=sf.statistics;return`
  <ul class="cesium-cesiumInspector-statistics">
    <li><strong>\u51E0\u4F55\u5360\u5185\u5B58 (MB): </strong>${k7(o.geometryByteLength)}</li>
    <li><strong>\u7EB9\u7406\u5360\u5185\u5B58 (MB): </strong>${k7(o.texturesByteLength)}</li>
  </ul>
  `}var L2i=[{text:"\u9AD8\u4EAE",value:bD.HIGHLIGHT},{text:"\u66FF\u6362",value:bD.REPLACE},{text:"\u6DF7\u5408",value:bD.MIX}],I7e=new At(1,1,0,.4),F2i=new At,G$=new At;function EC(o,A){let f=this,m=o.canvas;this._eventHandler=new Ur(m),this._scene=o,this._performanceContainer=A,this._canvas=m,this._performanceDisplay=new GJ({container:A}),this._statisticsText="",this._pickStatisticsText="",this._resourceCacheStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.showResourceCacheStatistics=!1,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this.hasEnabledWireframe=!1,this._tileset=void 0,this._feature=void 0,this._tile=void 0,gr.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_resourceCacheStatisticsText","_editorError","showPickStatistics","showStatistics","showResourceCacheStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile","_tileset","hasEnabledWireframe"]),this._properties=gr.observable({}),this.properties=[],gr.defineProperty(this,"properties",function(){let Ie=[],ve=f._properties();for(let K in ve)ve.hasOwnProperty(K)&&Ie.push(K);return Ie});let C=gr.observable();gr.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return C()},set:function(Ie){C(Ie),O(f._tileset)&&(f._tileset.dynamicScreenSpaceError=Ie)}}),this.dynamicScreenSpaceError=!1;let y=gr.observable();gr.defineProperty(this,"colorBlendMode",{get:function(){return y()},set:function(Ie){y(Ie),O(f._tileset)&&(f._tileset.colorBlendMode=Ie,f._scene.requestRender())}}),this.colorBlendMode=bD.HIGHLIGHT;let x=gr.observable(),v=gr.observable();gr.defineProperty(this,"picking",{get:function(){return v()},set:function(Ie){v(Ie),Ie?f._eventHandler.setInputAction(function(ve){let K=o.pick(ve.endPosition);if(K instanceof Ts?(f.feature=K,f.tile=K.content.tile):O(K)&&O(K.content)?(f.feature=void 0,f.tile=K.content.tile):(f.feature=void 0,f.tile=void 0),!!O(f._tileset)){if(x&&O(K)&&O(K.content)){let W;o.pickPositionSupported&&(W=o.pickPosition(ve.endPosition),O(W)&&(f._tileset.debugPickPosition=W)),f._tileset.debugPickedTile=K.content.tile}else f._tileset.debugPickedTile=void 0;f._scene.requestRender()}},Ki.MOUSE_MOVE):(f.feature=void 0,f.tile=void 0,f._eventHandler.removeInputAction(Ki.MOUSE_MOVE))}}),this.picking=!0;let E=gr.observable();gr.defineProperty(this,"colorize",{get:function(){return E()},set:function(Ie){E(Ie),O(f._tileset)&&(f._tileset.debugColorizeTiles=Ie,f._scene.requestRender())}}),this.colorize=!1;let I=gr.observable();gr.defineProperty(this,"wireframe",{get:function(){return I()},set:function(Ie){I(Ie),O(f._tileset)&&(f._tileset.debugWireframe=Ie,f._scene.requestRender())}}),this.wireframe=!1;let w=gr.observable();gr.defineProperty(this,"showBoundingVolumes",{get:function(){return w()},set:function(Ie){w(Ie),O(f._tileset)&&(f._tileset.debugShowBoundingVolume=Ie,f._scene.requestRender())}}),this.showBoundingVolumes=!1;let Q=gr.observable();gr.defineProperty(this,"showContentBoundingVolumes",{get:function(){return Q()},set:function(Ie){Q(Ie),O(f._tileset)&&(f._tileset.debugShowContentBoundingVolume=Ie,f._scene.requestRender())}}),this.showContentBoundingVolumes=!1;let M=gr.observable();gr.defineProperty(this,"showRequestVolumes",{get:function(){return M()},set:function(Ie){M(Ie),O(f._tileset)&&(f._tileset.debugShowViewerRequestVolume=Ie,f._scene.requestRender())}}),this.showRequestVolumes=!1;let B=gr.observable();gr.defineProperty(this,"freezeFrame",{get:function(){return B()},set:function(Ie){B(Ie),O(f._tileset)&&(f._tileset.debugFreezeFrame=Ie,f._scene.debugShowFrustumPlanes=Ie,f._scene.requestRender())}}),this.freezeFrame=!1,gr.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return x()},set:function(Ie){x(Ie),O(f._tileset)&&(f._tileset.debugPickedTileLabelOnly=Ie,f._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;let T=gr.observable();gr.defineProperty(this,"showGeometricError",{get:function(){return T()},set:function(Ie){T(Ie),O(f._tileset)&&(f._tileset.debugShowGeometricError=Ie,f._scene.requestRender())}}),this.showGeometricError=!1;let D=gr.observable();gr.defineProperty(this,"showRenderingStatistics",{get:function(){return D()},set:function(Ie){D(Ie),O(f._tileset)&&(f._tileset.debugShowRenderingStatistics=Ie,f._scene.requestRender())}}),this.showRenderingStatistics=!1;let F=gr.observable();gr.defineProperty(this,"showMemoryUsage",{get:function(){return F()},set:function(Ie){F(Ie),O(f._tileset)&&(f._tileset.debugShowMemoryUsage=Ie,f._scene.requestRender())}}),this.showMemoryUsage=!1;let L=gr.observable();gr.defineProperty(this,"showUrl",{get:function(){return L()},set:function(Ie){L(Ie),O(f._tileset)&&(f._tileset.debugShowUrl=Ie,f._scene.requestRender())}}),this.showUrl=!1;let R=gr.observable();gr.defineProperty(this,"maximumScreenSpaceError",{get:function(){return R()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(R(Ie),O(f._tileset)&&(f._tileset.maximumScreenSpaceError=Ie))}}),this.maximumScreenSpaceError=16;let k=gr.observable();gr.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return k()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(k(Ie),O(f._tileset)&&(f._tileset.dynamicScreenSpaceErrorDensity=Ie))}}),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,gr.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(k(),1/6)},set:function(Ie){k(Math.pow(Ie,6))}});let U=gr.observable();gr.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return U()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(U(Ie),O(f._tileset)&&(f._tileset.dynamicScreenSpaceErrorFactor=Ie))}}),this.dynamicScreenSpaceErrorFactor=4;let V=P2i(this),H=gr.observable();gr.defineProperty(this,"pickActive",{get:function(){return H()},set:function(Ie){H(Ie),Ie?f._eventHandler.setInputAction(V,Ki.LEFT_CLICK):f._eventHandler.removeInputAction(Ki.LEFT_CLICK)}});let q=gr.observable();gr.defineProperty(this,"pointCloudShading",{get:function(){return q()},set:function(Ie){q(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.attenuation=Ie)}}),this.pointCloudShading=!1;let ie=gr.observable();gr.defineProperty(this,"geometricErrorScale",{get:function(){return ie()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(ie(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.geometricErrorScale=Ie))}}),this.geometricErrorScale=1;let Z=gr.observable();gr.defineProperty(this,"maximumAttenuation",{get:function(){return Z()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(Z(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.maximumAttenuation=Ie===0?void 0:Ie))}}),this.maximumAttenuation=0;let oe=gr.observable();gr.defineProperty(this,"baseResolution",{get:function(){return oe()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(oe(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.baseResolution=Ie===0?void 0:Ie))}}),this.baseResolution=0;let ne=gr.observable();gr.defineProperty(this,"eyeDomeLighting",{get:function(){return ne()},set:function(Ie){ne(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.eyeDomeLighting=Ie)}}),this.eyeDomeLighting=!1;let se=gr.observable();gr.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return se()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(se(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.eyeDomeLightingStrength=Ie))}}),this.eyeDomeLightingStrength=1;let ce=gr.observable();gr.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return ce()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(ce(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.eyeDomeLightingRadius=Ie))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;let j=gr.observable();gr.defineProperty(this,"skipLevelOfDetail",{get:function(){return j()},set:function(Ie){j(Ie),O(f._tileset)&&(f._tileset.skipLevelOfDetail=Ie)}}),this.skipLevelOfDetail=!0;let de=gr.observable();gr.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return de()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(de(Ie),O(f._tileset)&&(f._tileset.skipScreenSpaceErrorFactor=Ie))}}),this.skipScreenSpaceErrorFactor=16;let me=gr.observable();gr.defineProperty(this,"baseScreenSpaceError",{get:function(){return me()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(me(Ie),O(f._tileset)&&(f._tileset.baseScreenSpaceError=Ie))}}),this.baseScreenSpaceError=1024;let _e=gr.observable();gr.defineProperty(this,"skipLevels",{get:function(){return _e()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(_e(Ie),O(f._tileset)&&(f._tileset.skipLevels=Ie))}}),this.skipLevels=1;let Be=gr.observable();gr.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return Be()},set:function(Ie){Be(Ie),O(f._tileset)&&(f._tileset.immediatelyLoadDesiredLevelOfDetail=Ie)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;let Qe=gr.observable();gr.defineProperty(this,"loadSiblings",{get:function(){return Qe()},set:function(Ie){Qe(Ie),O(f._tileset)&&(f._tileset.loadSiblings=Ie)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=o.postRender.addEventListener(function(){f._update()}),O(this._tileset)||flt(this,!0)}Object.defineProperties(EC.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},resourceCacheStatisticsText:{get:function(){return this._resourceCacheStatisticsText}},colorBlendModes:{get:function(){return L2i}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(o){if(this._tileset=o,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,O(o)){let A=this;o.readyPromise.then(function(y){A.isDestroyed()||A._properties(y.properties)});let f=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],m=f.length;for(let y=0;y<m;++y){let x=f[y];this[x]=this[x]}this.maximumScreenSpaceError=o.maximumScreenSpaceError,this.dynamicScreenSpaceError=o.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=o.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=o.dynamicScreenSpaceErrorFactor,this.colorBlendMode=o.colorBlendMode,this.skipLevelOfDetail=o.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=o.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=o.baseScreenSpaceError,this.skipLevels=o.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=o.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=o.loadSiblings,this.hasEnabledWireframe=o._enableDebugWireframe;let C=o.pointCloudShading;this.pointCloudShading=C.attenuation,this.geometricErrorScale=C.geometricErrorScale,this.maximumAttenuation=C.maximumAttenuation?C.maximumAttenuation:0,this.baseResolution=C.baseResolution?C.baseResolution:0,this.eyeDomeLighting=C.eyeDomeLighting,this.eyeDomeLightingStrength=C.eyeDomeLightingStrength,this.eyeDomeLightingRadius=C.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=ZK(o,!1),this._pickStatisticsText=ZK(o,!0),this._resourceCacheStatisticsText=glt(),flt(this,!1)}},feature:{get:function(){return this._feature},set:function(o){if(this._feature===o)return;let A=this._feature;O(A)&&!A.content.isDestroyed()&&(!this.colorize&&O(this._style)?A.color=O(this._style.color)?this._style.color.evaluateColor(A,F2i):At.WHITE:A.color=G$,this._scene.requestRender()),O(o)&&(At.clone(o.color,G$),o.color=I7e,this._scene.requestRender()),this._feature=o}},tile:{get:function(){return this._tile},set:function(o){if(this._tile===o)return;let A=this._tile;O(A)&&!A.isDestroyed()&&!LCe(A.content)&&(A.color=G$,this._scene.requestRender()),O(o)&&!LCe(o.content)&&(At.clone(o.color,G$),o.color=I7e,this._scene.requestRender()),this._tile=o}}});function LCe(o){if(!O(o))return!1;if(o.featuresLength>0)return!0;let A=o.innerContents;if(O(A)){let f=A.length;for(let m=0;m<f;++m)if(!LCe(A[m]))return!1;return!0}return!1}EC.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive};EC.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};EC.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible};EC.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};EC.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible};EC.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible};EC.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible};EC.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible};EC.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible};EC.prototype.trimTilesCache=function(){O(this._tileset)&&this._tileset.trimLoadedTiles()};EC.prototype.compileStyle=function(){let o=this._tileset;if(!(!O(o)||this.styleString===JSON.stringify(o.style))){this._editorError="";try{this.styleString.length===0&&(this.styleString="{}"),this._style=new mY(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(A){this._editorError=A.toString()}this.feature=this._feature,this.tile=this._tile}};EC.prototype.styleEditorKeyPress=function(o,A){if(A.keyCode===9){A.preventDefault();let f=A.target,m=f.selectionStart,C=f.selectionEnd,y=C,x=f.value.slice(m,C).split(`
  `}var VDi=[{text:"\u9AD8\u4EAE",value:bD.HIGHLIGHT},{text:"\u66FF\u6362",value:bD.REPLACE},{text:"\u6DF7\u5408",value:bD.MIX}],x7e=new At(1,1,0,.4),zDi=new At,G$=new At;function EC(o,A){let f=this,m=o.canvas;this._eventHandler=new Ur(m),this._scene=o,this._performanceContainer=A,this._canvas=m,this._performanceDisplay=new GJ({container:A}),this._statisticsText="",this._pickStatisticsText="",this._resourceCacheStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.showResourceCacheStatistics=!1,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this.hasEnabledWireframe=!1,this._tileset=void 0,this._feature=void 0,this._tile=void 0,gr.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_resourceCacheStatisticsText","_editorError","showPickStatistics","showStatistics","showResourceCacheStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile","_tileset","hasEnabledWireframe"]),this._properties=gr.observable({}),this.properties=[],gr.defineProperty(this,"properties",function(){let Ie=[],ve=f._properties();for(let K in ve)ve.hasOwnProperty(K)&&Ie.push(K);return Ie});let C=gr.observable();gr.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return C()},set:function(Ie){C(Ie),O(f._tileset)&&(f._tileset.dynamicScreenSpaceError=Ie)}}),this.dynamicScreenSpaceError=!1;let y=gr.observable();gr.defineProperty(this,"colorBlendMode",{get:function(){return y()},set:function(Ie){y(Ie),O(f._tileset)&&(f._tileset.colorBlendMode=Ie,f._scene.requestRender())}}),this.colorBlendMode=bD.HIGHLIGHT;let x=gr.observable(),v=gr.observable();gr.defineProperty(this,"picking",{get:function(){return v()},set:function(Ie){v(Ie),Ie?f._eventHandler.setInputAction(function(ve){let K=o.pick(ve.endPosition);if(K instanceof Ts?(f.feature=K,f.tile=K.content.tile):O(K)&&O(K.content)?(f.feature=void 0,f.tile=K.content.tile):(f.feature=void 0,f.tile=void 0),!!O(f._tileset)){if(x&&O(K)&&O(K.content)){let W;o.pickPositionSupported&&(W=o.pickPosition(ve.endPosition),O(W)&&(f._tileset.debugPickPosition=W)),f._tileset.debugPickedTile=K.content.tile}else f._tileset.debugPickedTile=void 0;f._scene.requestRender()}},Ki.MOUSE_MOVE):(f.feature=void 0,f.tile=void 0,f._eventHandler.removeInputAction(Ki.MOUSE_MOVE))}}),this.picking=!0;let E=gr.observable();gr.defineProperty(this,"colorize",{get:function(){return E()},set:function(Ie){E(Ie),O(f._tileset)&&(f._tileset.debugColorizeTiles=Ie,f._scene.requestRender())}}),this.colorize=!1;let I=gr.observable();gr.defineProperty(this,"wireframe",{get:function(){return I()},set:function(Ie){I(Ie),O(f._tileset)&&(f._tileset.debugWireframe=Ie,f._scene.requestRender())}}),this.wireframe=!1;let w=gr.observable();gr.defineProperty(this,"showBoundingVolumes",{get:function(){return w()},set:function(Ie){w(Ie),O(f._tileset)&&(f._tileset.debugShowBoundingVolume=Ie,f._scene.requestRender())}}),this.showBoundingVolumes=!1;let Q=gr.observable();gr.defineProperty(this,"showContentBoundingVolumes",{get:function(){return Q()},set:function(Ie){Q(Ie),O(f._tileset)&&(f._tileset.debugShowContentBoundingVolume=Ie,f._scene.requestRender())}}),this.showContentBoundingVolumes=!1;let M=gr.observable();gr.defineProperty(this,"showRequestVolumes",{get:function(){return M()},set:function(Ie){M(Ie),O(f._tileset)&&(f._tileset.debugShowViewerRequestVolume=Ie,f._scene.requestRender())}}),this.showRequestVolumes=!1;let B=gr.observable();gr.defineProperty(this,"freezeFrame",{get:function(){return B()},set:function(Ie){B(Ie),O(f._tileset)&&(f._tileset.debugFreezeFrame=Ie,f._scene.debugShowFrustumPlanes=Ie,f._scene.requestRender())}}),this.freezeFrame=!1,gr.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return x()},set:function(Ie){x(Ie),O(f._tileset)&&(f._tileset.debugPickedTileLabelOnly=Ie,f._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;let T=gr.observable();gr.defineProperty(this,"showGeometricError",{get:function(){return T()},set:function(Ie){T(Ie),O(f._tileset)&&(f._tileset.debugShowGeometricError=Ie,f._scene.requestRender())}}),this.showGeometricError=!1;let D=gr.observable();gr.defineProperty(this,"showRenderingStatistics",{get:function(){return D()},set:function(Ie){D(Ie),O(f._tileset)&&(f._tileset.debugShowRenderingStatistics=Ie,f._scene.requestRender())}}),this.showRenderingStatistics=!1;let F=gr.observable();gr.defineProperty(this,"showMemoryUsage",{get:function(){return F()},set:function(Ie){F(Ie),O(f._tileset)&&(f._tileset.debugShowMemoryUsage=Ie,f._scene.requestRender())}}),this.showMemoryUsage=!1;let L=gr.observable();gr.defineProperty(this,"showUrl",{get:function(){return L()},set:function(Ie){L(Ie),O(f._tileset)&&(f._tileset.debugShowUrl=Ie,f._scene.requestRender())}}),this.showUrl=!1;let R=gr.observable();gr.defineProperty(this,"maximumScreenSpaceError",{get:function(){return R()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(R(Ie),O(f._tileset)&&(f._tileset.maximumScreenSpaceError=Ie))}}),this.maximumScreenSpaceError=16;let k=gr.observable();gr.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return k()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(k(Ie),O(f._tileset)&&(f._tileset.dynamicScreenSpaceErrorDensity=Ie))}}),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,gr.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(k(),1/6)},set:function(Ie){k(Math.pow(Ie,6))}});let U=gr.observable();gr.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return U()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(U(Ie),O(f._tileset)&&(f._tileset.dynamicScreenSpaceErrorFactor=Ie))}}),this.dynamicScreenSpaceErrorFactor=4;let V=GDi(this),H=gr.observable();gr.defineProperty(this,"pickActive",{get:function(){return H()},set:function(Ie){H(Ie),Ie?f._eventHandler.setInputAction(V,Ki.LEFT_CLICK):f._eventHandler.removeInputAction(Ki.LEFT_CLICK)}});let q=gr.observable();gr.defineProperty(this,"pointCloudShading",{get:function(){return q()},set:function(Ie){q(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.attenuation=Ie)}}),this.pointCloudShading=!1;let ie=gr.observable();gr.defineProperty(this,"geometricErrorScale",{get:function(){return ie()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(ie(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.geometricErrorScale=Ie))}}),this.geometricErrorScale=1;let Z=gr.observable();gr.defineProperty(this,"maximumAttenuation",{get:function(){return Z()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(Z(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.maximumAttenuation=Ie===0?void 0:Ie))}}),this.maximumAttenuation=0;let oe=gr.observable();gr.defineProperty(this,"baseResolution",{get:function(){return oe()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(oe(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.baseResolution=Ie===0?void 0:Ie))}}),this.baseResolution=0;let ne=gr.observable();gr.defineProperty(this,"eyeDomeLighting",{get:function(){return ne()},set:function(Ie){ne(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.eyeDomeLighting=Ie)}}),this.eyeDomeLighting=!1;let se=gr.observable();gr.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return se()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(se(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.eyeDomeLightingStrength=Ie))}}),this.eyeDomeLightingStrength=1;let ce=gr.observable();gr.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return ce()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(ce(Ie),O(f._tileset)&&(f._tileset.pointCloudShading.eyeDomeLightingRadius=Ie))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;let j=gr.observable();gr.defineProperty(this,"skipLevelOfDetail",{get:function(){return j()},set:function(Ie){j(Ie),O(f._tileset)&&(f._tileset.skipLevelOfDetail=Ie)}}),this.skipLevelOfDetail=!0;let de=gr.observable();gr.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return de()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(de(Ie),O(f._tileset)&&(f._tileset.skipScreenSpaceErrorFactor=Ie))}}),this.skipScreenSpaceErrorFactor=16;let me=gr.observable();gr.defineProperty(this,"baseScreenSpaceError",{get:function(){return me()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(me(Ie),O(f._tileset)&&(f._tileset.baseScreenSpaceError=Ie))}}),this.baseScreenSpaceError=1024;let _e=gr.observable();gr.defineProperty(this,"skipLevels",{get:function(){return _e()},set:function(Ie){Ie=Number(Ie),isNaN(Ie)||(_e(Ie),O(f._tileset)&&(f._tileset.skipLevels=Ie))}}),this.skipLevels=1;let Be=gr.observable();gr.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return Be()},set:function(Ie){Be(Ie),O(f._tileset)&&(f._tileset.immediatelyLoadDesiredLevelOfDetail=Ie)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;let Qe=gr.observable();gr.defineProperty(this,"loadSiblings",{get:function(){return Qe()},set:function(Ie){Qe(Ie),O(f._tileset)&&(f._tileset.loadSiblings=Ie)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=o.postRender.addEventListener(function(){f._update()}),O(this._tileset)||rlt(this,!0)}Object.defineProperties(EC.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},resourceCacheStatisticsText:{get:function(){return this._resourceCacheStatisticsText}},colorBlendModes:{get:function(){return VDi}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(o){if(this._tileset=o,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,O(o)){let A=this;o.readyPromise.then(function(y){A.isDestroyed()||A._properties(y.properties)});let f=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],m=f.length;for(let y=0;y<m;++y){let x=f[y];this[x]=this[x]}this.maximumScreenSpaceError=o.maximumScreenSpaceError,this.dynamicScreenSpaceError=o.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=o.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=o.dynamicScreenSpaceErrorFactor,this.colorBlendMode=o.colorBlendMode,this.skipLevelOfDetail=o.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=o.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=o.baseScreenSpaceError,this.skipLevels=o.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=o.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=o.loadSiblings,this.hasEnabledWireframe=o._enableDebugWireframe;let C=o.pointCloudShading;this.pointCloudShading=C.attenuation,this.geometricErrorScale=C.geometricErrorScale,this.maximumAttenuation=C.maximumAttenuation?C.maximumAttenuation:0,this.baseResolution=C.baseResolution?C.baseResolution:0,this.eyeDomeLighting=C.eyeDomeLighting,this.eyeDomeLightingStrength=C.eyeDomeLightingStrength,this.eyeDomeLightingRadius=C.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=ZK(o,!1),this._pickStatisticsText=ZK(o,!0),this._resourceCacheStatisticsText=nlt(),rlt(this,!1)}},feature:{get:function(){return this._feature},set:function(o){if(this._feature===o)return;let A=this._feature;O(A)&&!A.content.isDestroyed()&&(!this.colorize&&O(this._style)?A.color=O(this._style.color)?this._style.color.evaluateColor(A,zDi):At.WHITE:A.color=G$,this._scene.requestRender()),O(o)&&(At.clone(o.color,G$),o.color=x7e,this._scene.requestRender()),this._feature=o}},tile:{get:function(){return this._tile},set:function(o){if(this._tile===o)return;let A=this._tile;O(A)&&!A.isDestroyed()&&!LCe(A.content)&&(A.color=G$,this._scene.requestRender()),O(o)&&!LCe(o.content)&&(At.clone(o.color,G$),o.color=x7e,this._scene.requestRender()),this._tile=o}}});function LCe(o){if(!O(o))return!1;if(o.featuresLength>0)return!0;let A=o.innerContents;if(O(A)){let f=A.length;for(let m=0;m<f;++m)if(!LCe(A[m]))return!1;return!0}return!1}EC.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive};EC.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};EC.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible};EC.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};EC.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible};EC.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible};EC.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible};EC.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible};EC.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible};EC.prototype.trimTilesCache=function(){O(this._tileset)&&this._tileset.trimLoadedTiles()};EC.prototype.compileStyle=function(){let o=this._tileset;if(!(!O(o)||this.styleString===JSON.stringify(o.style))){this._editorError="";try{this.styleString.length===0&&(this.styleString="{}"),this._style=new mY(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(A){this._editorError=A.toString()}this.feature=this._feature,this.tile=this._tile}};EC.prototype.styleEditorKeyPress=function(o,A){if(A.keyCode===9){A.preventDefault();let f=A.target,m=f.selectionStart,C=f.selectionEnd,y=C,x=f.value.slice(m,C).split(`
`),v=x.length,E;if(A.shiftKey)for(E=0;E<v;++E)x[E][0]===" "&&(x[E][1]===" "?(x[E]=x[E].substr(2),y-=2):(x[E]=x[E].substr(1),y-=1));else for(E=0;E<v;++E)x[E]=`  ${x[E]}`,y+=2;let I=x.join(`
`);f.value=f.value.slice(0,m)+I+f.value.slice(C),f.selectionStart=m!==C?m:y,f.selectionEnd=y}else A.ctrlKey&&(A.keyCode===10||A.keyCode===13)&&this.compileStyle();return!0};EC.prototype._update=function(){let o=this._tileset;if(this.performance&&this._performanceDisplay.update(),O(o)){if(o.isDestroyed()){this.tile=void 0,this.feature=void 0,this.tileset=void 0;return}let A=o.style;this._style!==o.style&&(this._shouldStyle?(o.style=this._style,this._shouldStyle=!1):(this._style=A,this.styleString=JSON.stringify(A.style,null,"  ")))}this.showStatistics&&(this._statisticsText=ZK(o,!1),this._pickStatisticsText=ZK(o,!0),this._resourceCacheStatisticsText=glt())};EC.prototype.isDestroyed=function(){return!1};EC.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();let o=this;return this._definedProperties.forEach(function(A){gr.getObservable(o,A).dispose()}),Qr(this)};EC.getStatistics=ZK;var F2e=EC;function _ae(o,A){o=iA(o);let f=document.createElement("div"),m=document.createElement("div");m.setAttribute("data-bind","visible: performance");let C=new F2e(A,m);this._viewModel=C,this._container=o,this._element=f;let y=document.createElement("div");y.textContent="3D Tiles \u68C0\u67E5\u5DE5\u5177",y.className="cesium-cesiumInspector-button",y.setAttribute("data-bind","click: toggleInspector"),f.appendChild(y),f.className="cesium-cesiumInspector cesium-3DTilesInspector",f.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),o.appendChild(f);let x=document.createElement("div");this._panel=x,x.className="cesium-cesiumInspector-dropDown",f.appendChild(x);let v=K8.createSection,E=K8.createCheckbox,I=v(x,"\u74E6\u7247","tilesetVisible","toggleTileset"),w=v(x,"\u663E\u793A","displayVisible","toggleDisplay"),Q=v(x,"\u66F4\u65B0","updateVisible","toggleUpdate"),M=v(x,"\u8BB0\u5F55","loggingVisible","toggleLogging"),B=v(x,"\u74E6\u7247\u8C03\u8BD5\u6807\u7B7E","tileDebugLabelsVisible","toggleTileDebugLabels"),T=v(x,"\u6837\u5F0F","styleVisible","toggleStyle"),D=v(x,"\u4F18\u5316","optimizationVisible","toggleOptimization"),F=document.createElement("div");F.className="field-group";let L=document.createElement("label");L.className="field-label",L.appendChild(document.createTextNode("\u5C5E\u6027: "));let R=document.createElement("div");R.setAttribute("data-bind","text: properties"),F.appendChild(L),F.appendChild(R),I.appendChild(F),I.appendChild(ppe("togglePickTileset","\u62FE\u53D6\u74E6\u7247","pickActive")),I.appendChild(ppe("trimTilesCache","\u6E05\u7406\u74E6\u7247\u7F13\u5B58")),I.appendChild(E("\u53EF\u62FE\u53D6","picking")),w.appendChild(E("\u7740\u8272","colorize")),w.appendChild(E("\u7EBF\u6846","wireframe","_tileset === undefined || hasEnabledWireframe"));let k=document.createElement("p");k.setAttribute("data-bind","visible: _tileset !== undefined && !hasEnabledWireframe"),k.setAttribute("class","cesium-3DTilesInspector-disabledElementsInfo"),k.innerText="Set enableDebugWireframe to true in the tileset constructor to enable this option.",w.lastChild.appendChild(k),w.appendChild(E("\u5305\u56F4\u76D2","showBoundingVolumes")),w.appendChild(E("\u5185\u90E8\u5305\u56F4\u76D2","showContentBoundingVolumes")),w.appendChild(E("\u8BF7\u6C42\u5305\u56F4\u76D2","showRequestVolumes")),w.appendChild(E("\u70B9\u4E91\u7740\u8272","pointCloudShading"));let U=document.createElement("div");U.setAttribute("data-bind","visible: pointCloudShading"),U.appendChild(Db("geometricErrorScale",0,2,.01,"\u51E0\u4F55\u8BEF\u5DEE\u5C3A\u5EA6")),U.appendChild(Db("maximumAttenuation",0,32,1,"\u6700\u5927\u8870\u51CF")),U.appendChild(Db("baseResolution",0,1,.01,"\u57FA\u672C\u5206\u8FA8\u7387")),U.appendChild(E("\u9E70\u773C\u7A79\u9876\u5149\u7167 (EDL)","eyeDomeLighting")),w.appendChild(U);let V=document.createElement("div");V.setAttribute("data-bind","visible: eyeDomeLighting"),V.appendChild(Db("eyeDomeLightingStrength",0,2,.1,"EDL \u5F3A\u5EA6")),V.appendChild(Db("eyeDomeLightingRadius",0,4,.1,"EDL \u534A\u5F84")),U.appendChild(V),Q.appendChild(E("\u51BB\u7ED3\u5E27","freezeFrame")),Q.appendChild(E("\u52A8\u6001\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE","dynamicScreenSpaceError"));let H=document.createElement("div");H.appendChild(Db("maximumScreenSpaceError",0,128,1,"\u6700\u5927\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE")),Q.appendChild(H);let q=document.createElement("div");q.setAttribute("data-bind","visible: dynamicScreenSpaceError"),q.appendChild(Db("dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE\u5BC6\u5EA6","dynamicScreenSpaceErrorDensity")),q.appendChild(Db("dynamicScreenSpaceErrorFactor",1,10,.1,"\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE\u56E0\u5B50")),Q.appendChild(q),M.appendChild(E("\u5E27\u7387","performance")),M.appendChild(m),M.appendChild(E("\u7EDF\u8BA1\u4FE1\u606F","showStatistics"));let ie=document.createElement("div");ie.className="cesium-3dTilesInspector-statistics",ie.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),M.appendChild(ie),M.appendChild(E("\u62FE\u53D6\u7EDF\u8BA1","showPickStatistics"));let Z=document.createElement("div");Z.className="cesium-3dTilesInspector-statistics",Z.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),M.appendChild(Z),M.appendChild(E("\u8D44\u6E90\u7F13\u5B58\u7EDF\u8BA1","showResourceCacheStatistics"));let oe=document.createElement("div");oe.className="cesium-3dTilesInspector-statistics",oe.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),M.appendChild(oe);let ne=document.createElement("div");T.appendChild(ne),ne.appendChild(document.createTextNode("\u989C\u8272\u6DF7\u5408\u6A21\u5F0F: "));let se=document.createElement("select");se.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),ne.appendChild(se);let ce=document.createElement("textarea");ce.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),ne.className="cesium-cesiumInspector-styleEditor",ne.appendChild(ce);let j=ppe("compileStyle","\u7F16\u8BD1 (Ctrl+Enter)");ne.appendChild(j);let de=document.createElement("div");de.className="cesium-cesiumInspector-error",de.setAttribute("data-bind","text: editorError"),ne.appendChild(de),B.appendChild(E("\u4EC5\u663E\u793A\u62FE\u53D6\u74E6\u7247","showOnlyPickedTileDebugLabel")),B.appendChild(E("\u51E0\u4F55\u8BEF\u5DEE","showGeometricError")),B.appendChild(E("\u6E32\u67D3\u7EDF\u8BA1","showRenderingStatistics")),B.appendChild(E("\u5185\u5B58\u4F7F\u7528 (MB)","showMemoryUsage")),B.appendChild(E("\u74E6\u7247\u8DEF\u5F84","showUrl")),D.appendChild(E("\u8DF3\u8FC7\u74E6\u7247\u5C42\u7EA7","skipLevelOfDetail"));let me=document.createElement("div");me.appendChild(Db("skipScreenSpaceErrorFactor",1,50,1,"\u8DF3\u8FC7\u5C4F\u5E55\u8BEF\u5DEE\u56E0\u5B50")),D.appendChild(me);let _e=document.createElement("div");_e.appendChild(Db("baseScreenSpaceError",0,4096,1,"\u57FA\u7840\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE")),D.appendChild(_e);let Be=document.createElement("div");Be.appendChild(Db("skipLevels",0,10,1,"\u8DF3\u8FC7\u5C42\u7EA7\u6570")),D.appendChild(Be),D.appendChild(E("\u4EC5\u52A0\u8F7D\u6EE1\u8DB3\u6700\u5927\u5C4F\u5E55\u8BEF\u5DEE\u7684\u74E6\u7247","immediatelyLoadDesiredLevelOfDetail")),D.appendChild(E("\u52A0\u8F7D\u53EF\u89C1\u74E6\u7247\u9644\u8FD1\u7684\u74E6\u7247","loadSiblings")),gr.applyBindings(C,f)}Object.defineProperties(_ae.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});_ae.prototype.isDestroyed=function(){return!1};_ae.prototype.destroy=function(){return gr.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),Qr(this)};function Db(o,A,f,m,C,y){y=Ae(y,o);let x=document.createElement("input");x.setAttribute("data-bind",`value: ${y}`),x.type="number";let v=document.createElement("input");v.type="range",v.min=A,v.max=f,v.step=m,v.setAttribute("data-bind",`valueUpdate: "input", value: ${o}`);let E=document.createElement("div");E.appendChild(v);let I=document.createElement("div");return I.className="cesium-cesiumInspector-slider",I.appendChild(document.createTextNode(C)),I.appendChild(x),I.appendChild(E),I}function ppe(o,A,f){let m=document.createElement("button");m.type="button",m.textContent=A,m.className="cesium-cesiumInspector-pickButton";let C=`click: ${o}`;return O(f)&&(C+=`, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${f}}`),m.setAttribute("data-bind",C),m}var N2e=_ae;function N2i(o){let A;if(O(o)){A="Command Statistics";let f=o.commandsInFrustums;for(let m in f)if(f.hasOwnProperty(m)){let C=parseInt(m,10),y;if(C===7)y="1, 2 and 3";else{let x=[];for(let v=2;v>=0;v--){let E=Math.pow(2,v);C>=E&&(x.push(v+1),C-=E)}y=x.reverse().join(" and ")}A+=`<br>&nbsp;&nbsp;&nbsp;&nbsp;${f[m]} in frustum ${y}`}A+=`<br>Total: ${o.totalCommands}`}return A}function FCe(o,A,f){let m=Math.min(f,A);return m=Math.max(m,o),m}var k2i=new ls,O2i=new ee;function pW(o,A){let f=this,m=o.canvas,C=new Ur(m);this._eventHandler=C,this._scene=o,this._canvas=m,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=A;let y=this._scene.globe;y.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",gr.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=Hl(function(){f.dropDownVisible=!f.dropDownVisible}),this._toggleGeneral=Hl(function(){f.generalVisible=!f.generalVisible}),this._togglePrimitives=Hl(function(){f.primitivesVisible=!f.primitivesVisible}),this._toggleTerrain=Hl(function(){f.terrainVisible=!f.terrainVisible}),this._frustumsSubscription=gr.getObservable(this,"frustums").subscribe(function(I){f._scene.debugShowFrustums=I,f._scene.requestRender()}),this._frustumPlanesSubscription=gr.getObservable(this,"frustumPlanes").subscribe(function(I){f._scene.debugShowFrustumPlanes=I,f._scene.requestRender()}),this._performanceSubscription=gr.getObservable(this,"performance").subscribe(function(I){I?f._performanceDisplay=new GJ({container:f._performanceContainer}):f._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=Hl(function(){return f._primitive.debugShowBoundingVolume=f.primitiveBoundingSphere,f._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=gr.getObservable(this,"primitiveBoundingSphere").subscribe(function(){f._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=Hl(function(){if(f.primitiveReferenceFrame){let I=f._primitive.modelMatrix;f._modelMatrixPrimitive=new JDe({modelMatrix:I}),f._scene.primitives.add(f._modelMatrixPrimitive)}else O(f._modelMatrixPrimitive)&&(f._scene.primitives.remove(f._modelMatrixPrimitive),f._modelMatrixPrimitive=void 0);return f._scene.requestRender(),!0}),this._primitiveReferenceFrameSubscription=gr.getObservable(this,"primitiveReferenceFrame").subscribe(function(){f._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=Hl(function(){return f.filterPrimitive?f._scene.debugCommandFilter=function(I){return O(f._modelMatrixPrimitive)&&I.owner===f._modelMatrixPrimitive._primitive?!0:O(f._primitive)?I.owner===f._primitive||I.owner===f._primitive._billboardCollection||I.owner.primitive===f._primitive:!1}:f._scene.debugCommandFilter=void 0,!0}),this._filterPrimitiveSubscription=gr.getObservable(this,"filterPrimitive").subscribe(function(){f._doFilterPrimitive(),f._scene.requestRender()}),this._wireframeSubscription=gr.getObservable(this,"wireframe").subscribe(function(I){y._surface.tileProvider._debug.wireframe=I,f._scene.requestRender()}),this._depthFrustumSubscription=gr.getObservable(this,"depthFrustum").subscribe(function(I){f._scene.debugShowDepthFrustum=I,f._scene.requestRender()}),this._incrementDepthFrustum=Hl(function(){let I=f.depthFrustum+1;return f.depthFrustum=FCe(1,f._numberOfFrustums,I),f._scene.requestRender(),!0}),this._decrementDepthFrustum=Hl(function(){let I=f.depthFrustum-1;return f.depthFrustum=FCe(1,f._numberOfFrustums,I),f._scene.requestRender(),!0}),this._suspendUpdatesSubscription=gr.getObservable(this,"suspendUpdates").subscribe(function(I){y._surface._debug.suspendLodUpdate=I,I||(f.filterTile=!1)});let x;this._showTileCoordinates=Hl(function(){return f.tileCoordinates&&!O(x)?x=o.imageryLayers.addImageryProvider(new i2e({tilingScheme:o.terrainProvider.tilingScheme})):!f.tileCoordinates&&O(x)&&(o.imageryLayers.remove(x),x=void 0),!0}),this._tileCoordinatesSubscription=gr.getObservable(this,"tileCoordinates").subscribe(function(){f._showTileCoordinates(),f._scene.requestRender()}),this._tileBoundingSphereSubscription=gr.getObservable(this,"tileBoundingSphere").subscribe(function(){f._showTileBoundingSphere(),f._scene.requestRender()}),this._showTileBoundingSphere=Hl(function(){return f.tileBoundingSphere?y._surface.tileProvider._debug.boundingSphereTile=f._tile:y._surface.tileProvider._debug.boundingSphereTile=void 0,f._scene.requestRender(),!0}),this._doFilterTile=Hl(function(){return f.filterTile?(f.suspendUpdates=!0,y._surface._tilesToRender=[],O(f._tile)&&f._tile.renderable&&y._surface._tilesToRender.push(f._tile)):f.suspendUpdates=!1,!0}),this._filterTileSubscription=gr.getObservable(this,"filterTile").subscribe(function(){f.doFilterTile(),f._scene.requestRender()});function v(I){let w=f._scene.pick({x:I.position.x,y:I.position.y});O(w)&&(f.primitive=O(w.collection)?w.collection:w.primitive),f._scene.requestRender(),f.pickPrimitiveActive=!1}this._pickPrimitive=Hl(function(){f.pickPrimitiveActive=!f.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=gr.getObservable(this,"pickPrimitiveActive").subscribe(function(I){I?C.setInputAction(v,Ki.LEFT_CLICK):C.removeInputAction(Ki.LEFT_CLICK)});function E(I){let w,Q=y.ellipsoid,M=f._scene.camera.getPickRay(I.position,k2i),B=y.pick(M,f._scene,O2i);if(O(B)){let T=Q.cartesianToCartographic(B),D=y._surface.tileProvider._tilesToRenderByTextureCount;for(let F=0;!w&&F<D.length;++F){let L=D[F];if(O(L))for(let R=0;!w&&R<L.length;++R){let k=L[R];Si.contains(k.rectangle,T)&&(w=k)}}}f.tile=w,f.pickTileActive=!1}this._pickTile=Hl(function(){f.pickTileActive=!f.pickTileActive}),this._pickTileActiveSubscription=gr.getObservable(this,"pickTileActive").subscribe(function(I){I?C.setInputAction(E,Ki.LEFT_CLICK):C.removeInputAction(Ki.LEFT_CLICK)}),this._removePostRenderEvent=o.postRender.addEventListener(function(){f._update()})}Object.defineProperties(pW.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.parent})}},selectNW:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.northwestChild})}},selectNE:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.northeastChild})}},selectSW:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.southwestChild})}},selectSE:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.southeastChild})}},primitive:{get:function(){return this._primitive},set:function(o){let A=this._primitive;o!==A&&(this.hasPickedPrimitive=!0,O(A)&&(A.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,O(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=o,o.show=!1,setTimeout(function(){o.show=!0},50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(o){if(O(o)){this.hasPickedTile=!0;let A=this._tile;if(o!==A){this.tileText=`L: ${o.level} X: ${o.x} Y: ${o.y}`,this.tileText+=`<br>SW corner: ${o.rectangle.west}, ${o.rectangle.south}`,this.tileText+=`<br>NE corner: ${o.rectangle.east}, ${o.rectangle.north}`;let f=o.data;O(f)&&O(f.tileBoundingRegion)?this.tileText+=`<br>Min: ${f.tileBoundingRegion.minimumHeight} Max: ${f.tileBoundingRegion.maximumHeight}`:this.tileText+="<br>(Tile is not loaded)"}this._tile=o,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}});pW.prototype._update=function(){this.frustums&&(this.frustumStatisticText=N2i(this._scene.debugFrustumStatistics));let o=this._scene.numberOfFrustums;this._numberOfFrustums=o,this.depthFrustum=FCe(1,o,this.depthFrustum),this.depthFrustumText=`${this.depthFrustum} of ${o}`,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText=`Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`};pW.prototype.isDestroyed=function(){return!1};pW.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),Qr(this)};var k2e=pW;function Bae(o,A){o=iA(o);let f=document.createElement("div"),m=new k2e(A,f);this._viewModel=m,this._container=o;let C=document.createElement("div");this._element=C;let y=document.createElement("div");y.textContent="Cesium Inspector",y.className="cesium-cesiumInspector-button",y.setAttribute("data-bind","click: toggleDropDown"),C.appendChild(y),C.className="cesium-cesiumInspector",C.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),o.appendChild(this._element);let x=document.createElement("div");this._panel=x,x.className="cesium-cesiumInspector-dropDown",C.appendChild(x);let v=K8.createSection,E=K8.createCheckbox,I=v(x,"General","generalVisible","toggleGeneral"),w=E("Show Frustums","frustums"),Q=document.createElement("div");Q.className="cesium-cesiumInspector-frustumStatistics",Q.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),w.appendChild(Q),I.appendChild(w),I.appendChild(E("Show Frustum Planes","frustumPlanes")),I.appendChild(E("Performance Display","performance")),f.className="cesium-cesiumInspector-performanceDisplay",I.appendChild(f);let M=document.createElement("div");M.className="cesium-cesiumInspector-shaderCache",M.setAttribute("data-bind","html: shaderCacheText"),I.appendChild(M);let B=document.createElement("div");I.appendChild(B);let T=document.createElement("span");T.setAttribute("data-bind",'html: "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Frustum:"'),B.appendChild(T);let D=document.createElement("span");D.setAttribute("data-bind","text: depthFrustumText"),B.appendChild(D);let F=document.createElement("input");F.type="button",F.value="-",F.className="cesium-cesiumInspector-pickButton",F.setAttribute("data-bind","click: decrementDepthFrustum"),B.appendChild(F);let L=document.createElement("input");L.type="button",L.value="+",L.className="cesium-cesiumInspector-pickButton",L.setAttribute("data-bind","click: incrementDepthFrustum"),B.appendChild(L);let R=v(x,"Primitives","primitivesVisible","togglePrimitives"),k=document.createElement("div");k.className="cesium-cesiumInspector-pickSection",R.appendChild(k);let U=document.createElement("input");U.type="button",U.value="Pick a primitive",U.className="cesium-cesiumInspector-pickButton",U.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let V=document.createElement("div");V.className="cesium-cesiumInspector-center",V.appendChild(U),k.appendChild(V),k.appendChild(E("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),k.appendChild(E("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=E("Show only selected","filterPrimitive","hasPickedPrimitive"),k.appendChild(this._primitiveOnly);let H=v(x,"Terrain","terrainVisible","toggleTerrain"),q=document.createElement("div");q.className="cesium-cesiumInspector-pickSection",H.appendChild(q);let ie=document.createElement("input");ie.type="button",ie.value="Pick a tile",ie.className="cesium-cesiumInspector-pickButton",ie.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),V=document.createElement("div"),V.appendChild(ie),V.className="cesium-cesiumInspector-center",q.appendChild(V);let Z=document.createElement("div");q.appendChild(Z);let oe=document.createElement("input");oe.type="button",oe.value="Parent",oe.className="cesium-cesiumInspector-pickButton",oe.setAttribute("data-bind","click: selectParent");let ne=document.createElement("input");ne.type="button",ne.value="NW",ne.className="cesium-cesiumInspector-pickButton",ne.setAttribute("data-bind","click: selectNW");let se=document.createElement("input");se.type="button",se.value="NE",se.className="cesium-cesiumInspector-pickButton",se.setAttribute("data-bind","click: selectNE");let ce=document.createElement("input");ce.type="button",ce.value="SW",ce.className="cesium-cesiumInspector-pickButton",ce.setAttribute("data-bind","click: selectSW");let j=document.createElement("input");j.type="button",j.value="SE",j.className="cesium-cesiumInspector-pickButton",j.setAttribute("data-bind","click: selectSE");let de=document.createElement("div");de.className="cesium-cesiumInspector-tileText",Z.className="cesium-cesiumInspector-frustumStatistics",Z.appendChild(de),Z.setAttribute("data-bind","visible: hasPickedTile"),de.setAttribute("data-bind","html: tileText");let me=document.createElement("div");me.className="cesium-cesiumInspector-relativeText",me.textContent="Select relative:",Z.appendChild(me);let _e=document.createElement("table"),Be=document.createElement("tr"),Qe=document.createElement("tr"),Ie=document.createElement("td");Ie.appendChild(oe);let ve=document.createElement("td");ve.appendChild(ne);let K=document.createElement("td");K.appendChild(se),Be.appendChild(Ie),Be.appendChild(ve),Be.appendChild(K);let W=document.createElement("td"),te=document.createElement("td");te.appendChild(ce);let Y=document.createElement("td");Y.appendChild(j),Qe.appendChild(W),Qe.appendChild(te),Qe.appendChild(Y),_e.appendChild(Be),_e.appendChild(Qe),Z.appendChild(_e),q.appendChild(E("Show bounding volume","tileBoundingSphere","hasPickedTile")),q.appendChild(E("Show only selected","filterTile","hasPickedTile")),H.appendChild(E("Wireframe","wireframe")),H.appendChild(E("Suspend LOD update","suspendUpdates")),H.appendChild(E("Show tile coordinates","tileCoordinates")),gr.applyBindings(m,this._element)}Object.defineProperties(Bae.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Bae.prototype.isDestroyed=function(){return!1};Bae.prototype.destroy=function(){return gr.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),Qr(this)};var O2e=Bae,W8=new wi;function JU(o){return xs(`./Assets/Textures/SkyBox/skyBox_${o}.jpg`)}function U2i(o){o._renderLoopRunning=!0;let A=0;function f(m){o.isDestroyed()||(o._useDefaultRenderLoop?(o.resize(),o.render(),requestAnimationFrame(f)):o._renderLoopRunning=!1)}requestAnimationFrame(f)}function plt(o){let A=o._canvas,f=A.clientWidth,m=A.clientHeight,C=o._resolutionScale;o._supportsImageRenderingPixelated||(C*=Ae(window.devicePixelRatio,1)),o._canvasWidth=f,o._canvasHeight=m,f*=C,m*=C,A.width=f,A.height=m,o._canRender=f!==0&&m!==0}function mlt(o){let A=o._canvas,f=A.width,m=A.height;if(f!==0&&m!==0){let C=o._scene.camera.frustum;O(C.aspectRatio)?C.aspectRatio=f/m:(C.top=C.right*(m/f),C.bottom=-C.top)}}function PQ(o,A){o=iA(o),A=Ae(A,{});let f=document.createElement("div");f.className="map-widget",o.appendChild(f);let m=document.createElement("canvas");m.setAttribute("id","mapRenderCanvas");let C=Mo.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=C,C&&(m.style.imageRendering=Mo.imageRenderingValue()),m.oncontextmenu=function(){return!1},m.onselectstart=function(){return!1},f.appendChild(m);let y=document.createElement("div");y.className="map-widget-message-pannel";let x=O(A.creditContainer)?iA(A.creditContainer):f;x.appendChild(y);let v=O(A.creditViewport)?iA(A.creditViewport):f,E=Ae(A.showRenderLoopErrors,!0);this._element=f,this._container=o,this._canvas=m,this._canvasWidth=0,this._canvasHeight=0,this._creditViewport=v,this._creditContainer=x,this._innerCreditContainer=y,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=E,this._resolutionScale=1,this._forceResize=!1,this._clock=O(A.clock)?A.clock:new z5,this._trackedEntityChanged=new br,plt(this);let I=new koe({canvas:m,contextOptions:A.contextOptions,creditContainer:y,creditViewport:v,mapProjection:A.mapProjection,orderIndependentTranslucency:A.orderIndependentTranslucency,scene3DOnly:Ae(A.scene3DOnly,!1),terrainExaggeration:A.terrainExaggeration,shadows:A.shadows,mapMode2D:A.mapMode2D,requestRenderMode:A.requestRenderMode,maximumRenderTimeChange:A.maximumRenderTimeChange});this._scene=I,I.camera.constrainedAxis=ee.UNIT_Z,mlt(this);let w=null;A.ellipsoidCoordinates==="CGCS2000"?w=Ae(I.mapProjection.ellipsoid,Di.CGCS2000):w=Ae(I.mapProjection.ellipsoid,Di.WGS84);let Q=A.globe;O(Q)||(Q=new voe(w)),Q!==!1&&(I.globe=Q,I.globe.shadows=Ae(A.terrainShadows,Al.RECEIVE_ONLY));let M=A.skyBox;O(M)||(M=new mN({sources:{positiveX:JU("px"),negativeX:JU("mx"),positiveY:JU("py"),negativeY:JU("my"),positiveZ:JU("pz"),negativeZ:JU("mz")}})),M!==!1&&(I.skyBox=M,I.sun=new Uoe,I.moon=new Ioe);let B=A.skyAtmosphere;O(B)||(B=new sH(w)),B!==!1&&(I.skyAtmosphere=B);let T=A.globe===!1?!1:A.imageryProvider;if(O(T)||(T=Xk()),T!==!1)for(let F=0;F<T.length;F++)I.imageryLayers.addImageryProvider(T[F]);O(A.terrainProvider)&&A.globe!==!1&&(I.terrainProvider=A.terrainProvider),this._screenSpaceEventHandler=new Ur(m,!1),O(A.sceneMode)&&(A.sceneMode===xi.SCENE2D&&this._scene.morphTo2D(0),A.sceneMode===xi.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=Ae(A.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=A.targetFrameRate;let D=this;I.renderError.addEventListener(function(F,L){if(D._useDefaultRenderLoop=!1,D._renderLoopRunning=!1,D._showRenderLoopErrors){let R="An error occurred while rendering.  Rendering has stopped.";D.showErrorPanel(R,void 0,L)}})}Object.defineProperties(PQ.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(o){this._scene.terrainProvider=o}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(o){this._targetFrameRate=o}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(o){this._useDefaultRenderLoop!==o&&(this._useDefaultRenderLoop=o,o&&!this._renderLoopRunning&&U2i(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(o){this._resolutionScale=o,this._forceResize=!0}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},trackedEntity:{get:function(){return this._trackedEntity},set:function(o){if(this._trackedEntity!==o){this._trackedEntity=o,U2e(this);let A=this.scene,f=A.mode;!O(o)||!O(o.position)?(this._needTrackedEntityUpdate=!1,(f===xi.COLUMBUS_VIEW||f===xi.SCENE2D)&&(A.screenSpaceCameraController.enableTranslate=!0),(f===xi.COLUMBUS_VIEW||f===xi.SCENE3D)&&(A.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(Xe.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(o),this.scene.requestRender()}}}});PQ.prototype.showErrorPanel=function(o,A,f){let m=this._element,C=document.createElement("div");C.className="map-widget-errorPanel";let y=document.createElement("div");y.className="map-widget-errorPanel-content",C.appendChild(y);let x=document.createElement("div");x.className="map-widget-errorPanel-header",x.appendChild(document.createTextNode(o)),y.appendChild(x);let v=document.createElement("div");v.className="map-widget-errorPanel-scroll",y.appendChild(v);function E(){v.style.maxHeight=`${Math.max(Math.round(m.clientHeight*.9-100),30)}px`}if(E(),O(window.addEventListener)&&window.addEventListener("resize",E,!1),O(A)){let B=document.createElement("div");B.className="map-widget-errorPanel-message",B.innerHTML=`<p>${A}</p>`,v.appendChild(B)}let I="(no error details available)";O(f)&&(I=D5(f));let w=document.createElement("div");w.className="map-widget-errorPanel-message",w.appendChild(document.createTextNode(I)),v.appendChild(w);let Q=document.createElement("div");Q.className="map-widget-errorPanel-buttonPanel",y.appendChild(Q);let M=document.createElement("button");M.setAttribute("type","button"),M.className="map-button",M.appendChild(document.createTextNode("OK")),M.onclick=function(){O(E)&&O(window.removeEventListener)&&window.removeEventListener("resize",E,!1),m.removeChild(C)},Q.appendChild(M),m.appendChild(C),typeof console<"u"&&console.error(`${o}
`);f.value=f.value.slice(0,m)+I+f.value.slice(C),f.selectionStart=m!==C?m:y,f.selectionEnd=y}else A.ctrlKey&&(A.keyCode===10||A.keyCode===13)&&this.compileStyle();return!0};EC.prototype._update=function(){let o=this._tileset;if(this.performance&&this._performanceDisplay.update(),O(o)){if(o.isDestroyed()){this.tile=void 0,this.feature=void 0,this.tileset=void 0;return}let A=o.style;this._style!==o.style&&(this._shouldStyle?(o.style=this._style,this._shouldStyle=!1):(this._style=A,this.styleString=JSON.stringify(A.style,null,"  ")))}this.showStatistics&&(this._statisticsText=ZK(o,!1),this._pickStatisticsText=ZK(o,!0),this._resourceCacheStatisticsText=nlt())};EC.prototype.isDestroyed=function(){return!1};EC.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();let o=this;return this._definedProperties.forEach(function(A){gr.getObservable(o,A).dispose()}),Qr(this)};EC.getStatistics=ZK;var v2e=EC;function Iae(o,A){o=iA(o);let f=document.createElement("div"),m=document.createElement("div");m.setAttribute("data-bind","visible: performance");let C=new v2e(A,m);this._viewModel=C,this._container=o,this._element=f;let y=document.createElement("div");y.textContent="3D Tiles \u68C0\u67E5\u5DE5\u5177",y.className="cesium-cesiumInspector-button",y.setAttribute("data-bind","click: toggleInspector"),f.appendChild(y),f.className="cesium-cesiumInspector cesium-3DTilesInspector",f.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),o.appendChild(f);let x=document.createElement("div");this._panel=x,x.className="cesium-cesiumInspector-dropDown",f.appendChild(x);let v=K8.createSection,E=K8.createCheckbox,I=v(x,"\u74E6\u7247","tilesetVisible","toggleTileset"),w=v(x,"\u663E\u793A","displayVisible","toggleDisplay"),Q=v(x,"\u66F4\u65B0","updateVisible","toggleUpdate"),M=v(x,"\u8BB0\u5F55","loggingVisible","toggleLogging"),B=v(x,"\u74E6\u7247\u8C03\u8BD5\u6807\u7B7E","tileDebugLabelsVisible","toggleTileDebugLabels"),T=v(x,"\u6837\u5F0F","styleVisible","toggleStyle"),D=v(x,"\u4F18\u5316","optimizationVisible","toggleOptimization"),F=document.createElement("div");F.className="field-group";let L=document.createElement("label");L.className="field-label",L.appendChild(document.createTextNode("\u5C5E\u6027: "));let R=document.createElement("div");R.setAttribute("data-bind","text: properties"),F.appendChild(L),F.appendChild(R),I.appendChild(F),I.appendChild(ppe("togglePickTileset","\u62FE\u53D6\u74E6\u7247","pickActive")),I.appendChild(ppe("trimTilesCache","\u6E05\u7406\u74E6\u7247\u7F13\u5B58")),I.appendChild(E("\u53EF\u62FE\u53D6","picking")),w.appendChild(E("\u7740\u8272","colorize")),w.appendChild(E("\u7EBF\u6846","wireframe","_tileset === undefined || hasEnabledWireframe"));let k=document.createElement("p");k.setAttribute("data-bind","visible: _tileset !== undefined && !hasEnabledWireframe"),k.setAttribute("class","cesium-3DTilesInspector-disabledElementsInfo"),k.innerText="Set enableDebugWireframe to true in the tileset constructor to enable this option.",w.lastChild.appendChild(k),w.appendChild(E("\u5305\u56F4\u76D2","showBoundingVolumes")),w.appendChild(E("\u5185\u90E8\u5305\u56F4\u76D2","showContentBoundingVolumes")),w.appendChild(E("\u8BF7\u6C42\u5305\u56F4\u76D2","showRequestVolumes")),w.appendChild(E("\u70B9\u4E91\u7740\u8272","pointCloudShading"));let U=document.createElement("div");U.setAttribute("data-bind","visible: pointCloudShading"),U.appendChild(Db("geometricErrorScale",0,2,.01,"\u51E0\u4F55\u8BEF\u5DEE\u5C3A\u5EA6")),U.appendChild(Db("maximumAttenuation",0,32,1,"\u6700\u5927\u8870\u51CF")),U.appendChild(Db("baseResolution",0,1,.01,"\u57FA\u672C\u5206\u8FA8\u7387")),U.appendChild(E("\u9E70\u773C\u7A79\u9876\u5149\u7167 (EDL)","eyeDomeLighting")),w.appendChild(U);let V=document.createElement("div");V.setAttribute("data-bind","visible: eyeDomeLighting"),V.appendChild(Db("eyeDomeLightingStrength",0,2,.1,"EDL \u5F3A\u5EA6")),V.appendChild(Db("eyeDomeLightingRadius",0,4,.1,"EDL \u534A\u5F84")),U.appendChild(V),Q.appendChild(E("\u51BB\u7ED3\u5E27","freezeFrame")),Q.appendChild(E("\u52A8\u6001\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE","dynamicScreenSpaceError"));let H=document.createElement("div");H.appendChild(Db("maximumScreenSpaceError",0,128,1,"\u6700\u5927\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE")),Q.appendChild(H);let q=document.createElement("div");q.setAttribute("data-bind","visible: dynamicScreenSpaceError"),q.appendChild(Db("dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE\u5BC6\u5EA6","dynamicScreenSpaceErrorDensity")),q.appendChild(Db("dynamicScreenSpaceErrorFactor",1,10,.1,"\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE\u56E0\u5B50")),Q.appendChild(q),M.appendChild(E("\u5E27\u7387","performance")),M.appendChild(m),M.appendChild(E("\u7EDF\u8BA1\u4FE1\u606F","showStatistics"));let ie=document.createElement("div");ie.className="cesium-3dTilesInspector-statistics",ie.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),M.appendChild(ie),M.appendChild(E("\u62FE\u53D6\u7EDF\u8BA1","showPickStatistics"));let Z=document.createElement("div");Z.className="cesium-3dTilesInspector-statistics",Z.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),M.appendChild(Z),M.appendChild(E("\u8D44\u6E90\u7F13\u5B58\u7EDF\u8BA1","showResourceCacheStatistics"));let oe=document.createElement("div");oe.className="cesium-3dTilesInspector-statistics",oe.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),M.appendChild(oe);let ne=document.createElement("div");T.appendChild(ne),ne.appendChild(document.createTextNode("\u989C\u8272\u6DF7\u5408\u6A21\u5F0F: "));let se=document.createElement("select");se.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),ne.appendChild(se);let ce=document.createElement("textarea");ce.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),ne.className="cesium-cesiumInspector-styleEditor",ne.appendChild(ce);let j=ppe("compileStyle","\u7F16\u8BD1 (Ctrl+Enter)");ne.appendChild(j);let de=document.createElement("div");de.className="cesium-cesiumInspector-error",de.setAttribute("data-bind","text: editorError"),ne.appendChild(de),B.appendChild(E("\u4EC5\u663E\u793A\u62FE\u53D6\u74E6\u7247","showOnlyPickedTileDebugLabel")),B.appendChild(E("\u51E0\u4F55\u8BEF\u5DEE","showGeometricError")),B.appendChild(E("\u6E32\u67D3\u7EDF\u8BA1","showRenderingStatistics")),B.appendChild(E("\u5185\u5B58\u4F7F\u7528 (MB)","showMemoryUsage")),B.appendChild(E("\u74E6\u7247\u8DEF\u5F84","showUrl")),D.appendChild(E("\u8DF3\u8FC7\u74E6\u7247\u5C42\u7EA7","skipLevelOfDetail"));let me=document.createElement("div");me.appendChild(Db("skipScreenSpaceErrorFactor",1,50,1,"\u8DF3\u8FC7\u5C4F\u5E55\u8BEF\u5DEE\u56E0\u5B50")),D.appendChild(me);let _e=document.createElement("div");_e.appendChild(Db("baseScreenSpaceError",0,4096,1,"\u57FA\u7840\u5C4F\u5E55\u7A7A\u95F4\u8BEF\u5DEE")),D.appendChild(_e);let Be=document.createElement("div");Be.appendChild(Db("skipLevels",0,10,1,"\u8DF3\u8FC7\u5C42\u7EA7\u6570")),D.appendChild(Be),D.appendChild(E("\u4EC5\u52A0\u8F7D\u6EE1\u8DB3\u6700\u5927\u5C4F\u5E55\u8BEF\u5DEE\u7684\u74E6\u7247","immediatelyLoadDesiredLevelOfDetail")),D.appendChild(E("\u52A0\u8F7D\u53EF\u89C1\u74E6\u7247\u9644\u8FD1\u7684\u74E6\u7247","loadSiblings")),gr.applyBindings(C,f)}Object.defineProperties(Iae.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Iae.prototype.isDestroyed=function(){return!1};Iae.prototype.destroy=function(){return gr.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),Qr(this)};function Db(o,A,f,m,C,y){y=Ae(y,o);let x=document.createElement("input");x.setAttribute("data-bind",`value: ${y}`),x.type="number";let v=document.createElement("input");v.type="range",v.min=A,v.max=f,v.step=m,v.setAttribute("data-bind",`valueUpdate: "input", value: ${o}`);let E=document.createElement("div");E.appendChild(v);let I=document.createElement("div");return I.className="cesium-cesiumInspector-slider",I.appendChild(document.createTextNode(C)),I.appendChild(x),I.appendChild(E),I}function ppe(o,A,f){let m=document.createElement("button");m.type="button",m.textContent=A,m.className="cesium-cesiumInspector-pickButton";let C=`click: ${o}`;return O(f)&&(C+=`, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${f}}`),m.setAttribute("data-bind",C),m}var E2e=Iae;function KDi(o){let A;if(O(o)){A="Command Statistics";let f=o.commandsInFrustums;for(let m in f)if(f.hasOwnProperty(m)){let C=parseInt(m,10),y;if(C===7)y="1, 2 and 3";else{let x=[];for(let v=2;v>=0;v--){let E=Math.pow(2,v);C>=E&&(x.push(v+1),C-=E)}y=x.reverse().join(" and ")}A+=`<br>&nbsp;&nbsp;&nbsp;&nbsp;${f[m]} in frustum ${y}`}A+=`<br>Total: ${o.totalCommands}`}return A}function FCe(o,A,f){let m=Math.min(f,A);return m=Math.max(m,o),m}var YDi=new ls,JDi=new ee;function dW(o,A){let f=this,m=o.canvas,C=new Ur(m);this._eventHandler=C,this._scene=o,this._canvas=m,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=A;let y=this._scene.globe;y.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",gr.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=Hl(function(){f.dropDownVisible=!f.dropDownVisible}),this._toggleGeneral=Hl(function(){f.generalVisible=!f.generalVisible}),this._togglePrimitives=Hl(function(){f.primitivesVisible=!f.primitivesVisible}),this._toggleTerrain=Hl(function(){f.terrainVisible=!f.terrainVisible}),this._frustumsSubscription=gr.getObservable(this,"frustums").subscribe(function(I){f._scene.debugShowFrustums=I,f._scene.requestRender()}),this._frustumPlanesSubscription=gr.getObservable(this,"frustumPlanes").subscribe(function(I){f._scene.debugShowFrustumPlanes=I,f._scene.requestRender()}),this._performanceSubscription=gr.getObservable(this,"performance").subscribe(function(I){I?f._performanceDisplay=new GJ({container:f._performanceContainer}):f._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=Hl(function(){return f._primitive.debugShowBoundingVolume=f.primitiveBoundingSphere,f._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=gr.getObservable(this,"primitiveBoundingSphere").subscribe(function(){f._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=Hl(function(){if(f.primitiveReferenceFrame){let I=f._primitive.modelMatrix;f._modelMatrixPrimitive=new c2e({modelMatrix:I}),f._scene.primitives.add(f._modelMatrixPrimitive)}else O(f._modelMatrixPrimitive)&&(f._scene.primitives.remove(f._modelMatrixPrimitive),f._modelMatrixPrimitive=void 0);return f._scene.requestRender(),!0}),this._primitiveReferenceFrameSubscription=gr.getObservable(this,"primitiveReferenceFrame").subscribe(function(){f._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=Hl(function(){return f.filterPrimitive?f._scene.debugCommandFilter=function(I){return O(f._modelMatrixPrimitive)&&I.owner===f._modelMatrixPrimitive._primitive?!0:O(f._primitive)?I.owner===f._primitive||I.owner===f._primitive._billboardCollection||I.owner.primitive===f._primitive:!1}:f._scene.debugCommandFilter=void 0,!0}),this._filterPrimitiveSubscription=gr.getObservable(this,"filterPrimitive").subscribe(function(){f._doFilterPrimitive(),f._scene.requestRender()}),this._wireframeSubscription=gr.getObservable(this,"wireframe").subscribe(function(I){y._surface.tileProvider._debug.wireframe=I,f._scene.requestRender()}),this._depthFrustumSubscription=gr.getObservable(this,"depthFrustum").subscribe(function(I){f._scene.debugShowDepthFrustum=I,f._scene.requestRender()}),this._incrementDepthFrustum=Hl(function(){let I=f.depthFrustum+1;return f.depthFrustum=FCe(1,f._numberOfFrustums,I),f._scene.requestRender(),!0}),this._decrementDepthFrustum=Hl(function(){let I=f.depthFrustum-1;return f.depthFrustum=FCe(1,f._numberOfFrustums,I),f._scene.requestRender(),!0}),this._suspendUpdatesSubscription=gr.getObservable(this,"suspendUpdates").subscribe(function(I){y._surface._debug.suspendLodUpdate=I,I||(f.filterTile=!1)});let x;this._showTileCoordinates=Hl(function(){return f.tileCoordinates&&!O(x)?x=o.imageryLayers.addImageryProvider(new y2e({tilingScheme:o.terrainProvider.tilingScheme})):!f.tileCoordinates&&O(x)&&(o.imageryLayers.remove(x),x=void 0),!0}),this._tileCoordinatesSubscription=gr.getObservable(this,"tileCoordinates").subscribe(function(){f._showTileCoordinates(),f._scene.requestRender()}),this._tileBoundingSphereSubscription=gr.getObservable(this,"tileBoundingSphere").subscribe(function(){f._showTileBoundingSphere(),f._scene.requestRender()}),this._showTileBoundingSphere=Hl(function(){return f.tileBoundingSphere?y._surface.tileProvider._debug.boundingSphereTile=f._tile:y._surface.tileProvider._debug.boundingSphereTile=void 0,f._scene.requestRender(),!0}),this._doFilterTile=Hl(function(){return f.filterTile?(f.suspendUpdates=!0,y._surface._tilesToRender=[],O(f._tile)&&f._tile.renderable&&y._surface._tilesToRender.push(f._tile)):f.suspendUpdates=!1,!0}),this._filterTileSubscription=gr.getObservable(this,"filterTile").subscribe(function(){f.doFilterTile(),f._scene.requestRender()});function v(I){let w=f._scene.pick({x:I.position.x,y:I.position.y});O(w)&&(f.primitive=O(w.collection)?w.collection:w.primitive),f._scene.requestRender(),f.pickPrimitiveActive=!1}this._pickPrimitive=Hl(function(){f.pickPrimitiveActive=!f.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=gr.getObservable(this,"pickPrimitiveActive").subscribe(function(I){I?C.setInputAction(v,Ki.LEFT_CLICK):C.removeInputAction(Ki.LEFT_CLICK)});function E(I){let w,Q=y.ellipsoid,M=f._scene.camera.getPickRay(I.position,YDi),B=y.pick(M,f._scene,JDi);if(O(B)){let T=Q.cartesianToCartographic(B),D=y._surface.tileProvider._tilesToRenderByTextureCount;for(let F=0;!w&&F<D.length;++F){let L=D[F];if(O(L))for(let R=0;!w&&R<L.length;++R){let k=L[R];Si.contains(k.rectangle,T)&&(w=k)}}}f.tile=w,f.pickTileActive=!1}this._pickTile=Hl(function(){f.pickTileActive=!f.pickTileActive}),this._pickTileActiveSubscription=gr.getObservable(this,"pickTileActive").subscribe(function(I){I?C.setInputAction(E,Ki.LEFT_CLICK):C.removeInputAction(Ki.LEFT_CLICK)}),this._removePostRenderEvent=o.postRender.addEventListener(function(){f._update()})}Object.defineProperties(dW.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.parent})}},selectNW:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.northwestChild})}},selectNE:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.northeastChild})}},selectSW:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.southwestChild})}},selectSE:{get:function(){let o=this;return Hl(function(){o.tile=o.tile.southeastChild})}},primitive:{get:function(){return this._primitive},set:function(o){let A=this._primitive;o!==A&&(this.hasPickedPrimitive=!0,O(A)&&(A.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,O(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=o,o.show=!1,setTimeout(function(){o.show=!0},50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(o){if(O(o)){this.hasPickedTile=!0;let A=this._tile;if(o!==A){this.tileText=`L: ${o.level} X: ${o.x} Y: ${o.y}`,this.tileText+=`<br>SW corner: ${o.rectangle.west}, ${o.rectangle.south}`,this.tileText+=`<br>NE corner: ${o.rectangle.east}, ${o.rectangle.north}`;let f=o.data;O(f)&&O(f.tileBoundingRegion)?this.tileText+=`<br>Min: ${f.tileBoundingRegion.minimumHeight} Max: ${f.tileBoundingRegion.maximumHeight}`:this.tileText+="<br>(Tile is not loaded)"}this._tile=o,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}});dW.prototype._update=function(){this.frustums&&(this.frustumStatisticText=KDi(this._scene.debugFrustumStatistics));let o=this._scene.numberOfFrustums;this._numberOfFrustums=o,this.depthFrustum=FCe(1,o,this.depthFrustum),this.depthFrustumText=`${this.depthFrustum} of ${o}`,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText=`Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`};dW.prototype.isDestroyed=function(){return!1};dW.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),Qr(this)};var I2e=dW;function _ae(o,A){o=iA(o);let f=document.createElement("div"),m=new I2e(A,f);this._viewModel=m,this._container=o;let C=document.createElement("div");this._element=C;let y=document.createElement("div");y.textContent="Cesium Inspector",y.className="cesium-cesiumInspector-button",y.setAttribute("data-bind","click: toggleDropDown"),C.appendChild(y),C.className="cesium-cesiumInspector",C.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),o.appendChild(this._element);let x=document.createElement("div");this._panel=x,x.className="cesium-cesiumInspector-dropDown",C.appendChild(x);let v=K8.createSection,E=K8.createCheckbox,I=v(x,"General","generalVisible","toggleGeneral"),w=E("Show Frustums","frustums"),Q=document.createElement("div");Q.className="cesium-cesiumInspector-frustumStatistics",Q.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),w.appendChild(Q),I.appendChild(w),I.appendChild(E("Show Frustum Planes","frustumPlanes")),I.appendChild(E("Performance Display","performance")),f.className="cesium-cesiumInspector-performanceDisplay",I.appendChild(f);let M=document.createElement("div");M.className="cesium-cesiumInspector-shaderCache",M.setAttribute("data-bind","html: shaderCacheText"),I.appendChild(M);let B=document.createElement("div");I.appendChild(B);let T=document.createElement("span");T.setAttribute("data-bind",'html: "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Frustum:"'),B.appendChild(T);let D=document.createElement("span");D.setAttribute("data-bind","text: depthFrustumText"),B.appendChild(D);let F=document.createElement("input");F.type="button",F.value="-",F.className="cesium-cesiumInspector-pickButton",F.setAttribute("data-bind","click: decrementDepthFrustum"),B.appendChild(F);let L=document.createElement("input");L.type="button",L.value="+",L.className="cesium-cesiumInspector-pickButton",L.setAttribute("data-bind","click: incrementDepthFrustum"),B.appendChild(L);let R=v(x,"Primitives","primitivesVisible","togglePrimitives"),k=document.createElement("div");k.className="cesium-cesiumInspector-pickSection",R.appendChild(k);let U=document.createElement("input");U.type="button",U.value="Pick a primitive",U.className="cesium-cesiumInspector-pickButton",U.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let V=document.createElement("div");V.className="cesium-cesiumInspector-center",V.appendChild(U),k.appendChild(V),k.appendChild(E("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),k.appendChild(E("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=E("Show only selected","filterPrimitive","hasPickedPrimitive"),k.appendChild(this._primitiveOnly);let H=v(x,"Terrain","terrainVisible","toggleTerrain"),q=document.createElement("div");q.className="cesium-cesiumInspector-pickSection",H.appendChild(q);let ie=document.createElement("input");ie.type="button",ie.value="Pick a tile",ie.className="cesium-cesiumInspector-pickButton",ie.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),V=document.createElement("div"),V.appendChild(ie),V.className="cesium-cesiumInspector-center",q.appendChild(V);let Z=document.createElement("div");q.appendChild(Z);let oe=document.createElement("input");oe.type="button",oe.value="Parent",oe.className="cesium-cesiumInspector-pickButton",oe.setAttribute("data-bind","click: selectParent");let ne=document.createElement("input");ne.type="button",ne.value="NW",ne.className="cesium-cesiumInspector-pickButton",ne.setAttribute("data-bind","click: selectNW");let se=document.createElement("input");se.type="button",se.value="NE",se.className="cesium-cesiumInspector-pickButton",se.setAttribute("data-bind","click: selectNE");let ce=document.createElement("input");ce.type="button",ce.value="SW",ce.className="cesium-cesiumInspector-pickButton",ce.setAttribute("data-bind","click: selectSW");let j=document.createElement("input");j.type="button",j.value="SE",j.className="cesium-cesiumInspector-pickButton",j.setAttribute("data-bind","click: selectSE");let de=document.createElement("div");de.className="cesium-cesiumInspector-tileText",Z.className="cesium-cesiumInspector-frustumStatistics",Z.appendChild(de),Z.setAttribute("data-bind","visible: hasPickedTile"),de.setAttribute("data-bind","html: tileText");let me=document.createElement("div");me.className="cesium-cesiumInspector-relativeText",me.textContent="Select relative:",Z.appendChild(me);let _e=document.createElement("table"),Be=document.createElement("tr"),Qe=document.createElement("tr"),Ie=document.createElement("td");Ie.appendChild(oe);let ve=document.createElement("td");ve.appendChild(ne);let K=document.createElement("td");K.appendChild(se),Be.appendChild(Ie),Be.appendChild(ve),Be.appendChild(K);let W=document.createElement("td"),te=document.createElement("td");te.appendChild(ce);let Y=document.createElement("td");Y.appendChild(j),Qe.appendChild(W),Qe.appendChild(te),Qe.appendChild(Y),_e.appendChild(Be),_e.appendChild(Qe),Z.appendChild(_e),q.appendChild(E("Show bounding volume","tileBoundingSphere","hasPickedTile")),q.appendChild(E("Show only selected","filterTile","hasPickedTile")),H.appendChild(E("Wireframe","wireframe")),H.appendChild(E("Suspend LOD update","suspendUpdates")),H.appendChild(E("Show tile coordinates","tileCoordinates")),gr.applyBindings(m,this._element)}Object.defineProperties(_ae.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});_ae.prototype.isDestroyed=function(){return!1};_ae.prototype.destroy=function(){return gr.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),Qr(this)};var _2e=_ae;function fW(o,A,f){let m=o._gl;this.id=A,this._size=f.imageBuffer.length,this._context=o,this._width=f.width,this._height=f.height,this._texture=null,this._internalFormat=f.internalFormat,this._wrapS=Ae(f.wrapS,Va.CLAMP_TO_EDGE),this._wrapT=Ae(f.wrapT,Va.CLAMP_TO_EDGE),this.id=A,this._target=m.TEXTURE_2D,this._texture=m.createTexture(),m.bindTexture(m.TEXTURE_2D,this._texture);let C=0,y=0,x=WDi(f.imageBuffer,this._internalFormat,this._width,this._height),v=this._width,E=this._height;do{let I=Gn.compressedTextureSizeInBytes(this._internalFormat,v,E),w=new Uint8Array(f.imageBuffer.buffer,f.imageBuffer.byteOffset+C,I);m.compressedTexImage2D(m.TEXTURE_2D,y++,this._internalFormat,v,E,0,w),v=Math.max(v>>1,1),E=Math.max(E>>1,1),C+=I}while(C<f.imageBuffer.length&&x);y>1?(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR_MIPMAP_LINEAR)):(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR)),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,this._wrapS),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,this._wrapT),m.bindTexture(m.TEXTURE_2D,null)}function WDi(o,A,f,m){let C=o.length,y=f,x=m,v=0;for(;;){let E=Gn.compressedTextureSizeInBytes(A,y,x);if(v+=E,y=y>>1,x=x>>1,y===0&&x===0)break;y=Math.max(y,1),x=Math.max(x,1)}return v===C}fW.prototype.enable=function(){let o=this._context._gl;o.activeTexture(this._gl.TEXTURE0),o.bindTexture(this._target,this._texture)};fW.prototype.disable=function(){this._context._gl.bindTexture(this._target,null)};fW.prototype.isDestroyed=function(){return!1};fW.prototype.destroy=function(){this._context._gl.deleteTexture(this._texture),this._texture=null,this.id=0,Qr(this)};var B2e=fW;function w2e(){this.ambientColor=new At,this.diffuseColor=new At,this.specularColor=new At(0,0,0,0),this.shininess=50,this.bTransparentSorting=!1,this.textures=[]}w2e.prototype.isDestroyed=function(){return!1};w2e.prototype.destroy=function(){return Qr(this)};var b2e=w2e,Q2e=`attribute vec4 aPosition;
        attribute vec4 aTexCoord0;
    #ifdef TexCoord2
        attribute vec4 aTexCoord1;
    #endif
        varying vec4 vTexCoord;
        attribute vec4 aColor;
        varying vec4 vColor;
        void main()
        {
            vTexCoord.xy = aTexCoord0.xy;
        #ifdef TexCoord2
            vTexCoord.zw = aTexCoord1.xy;
        #endif
            vColor = aColor;
            gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);
        }
    `,S2e=`uniform sampler2D uTexture;
    #ifdef TexCoord2
        uniform sampler2D uTexture2;
    #endif
        uniform vec4 uDiffuseColor;
        uniform vec4 uAmbientColor;
        varying vec4 vColor;
        varying vec4 vTexCoord;
        void main()
        {
            vec4 color = vColor * texture2D(uTexture, vTexCoord.xy);
        #ifdef TexCoord2
            color *= texture2D(uTexture2, vTexCoord.zw);
        #endif
            gl_FragColor = czm_gammaCorrect(color);
        }
    `;function D2e(){this.context=void 0,this.model=void 0,this.index=void 0}D2e.prototype.set=function(o,A,f){this.context=o,this.model=A,this.index=f};D2e.prototype.execute=function(){let o=this.context,A=this.index,f=this.model.vertexPackage,m=f.vertexAttributes[A];if(!O(m))throw new Ui("attribute is null");if(f.instanceIndex!==-1&&!O(this.model._instanceBuffer)){if(!O(f.instanceBuffer))throw new Ui("instance buffer is null");this.model.instanceBuffer=vo.createVertexBuffer({context:o,typedArray:f.instanceBuffer,usage:ln.STATIC_DRAW})}if(m.instanceDivisor===1){m.vertexBuffer=this.model.instanceBuffer;return}O(m.vertexBuffer)||(m.vertexBuffer=vo.createVertexBuffer({context:o,typedArray:m.typedArray,usage:ln.STATIC_DRAW}),m.typedArray=null,delete m.typedArray)};var T2e=D2e;function M2e(){this.model=void 0,this.context=void 0,this.index=0}M2e.prototype.set=function(o,A,f){this.model=A,this.context=o,this.index=f};M2e.prototype.execute=function(){let o=this.context,A=this.model.arrIndexPackage[this.index],f=this.model.vertexPackage.verticesCount;if(!O(A))throw new Ui("index package is null");if(O(A.indexBuffer))return;if(!O(A.indicesTypedArray))throw new Ui("index buffer is null");let m=Nn.UNSIGNED_SHORT;(A.indexType===1||f>=je.SIXTY_FOUR_KILOBYTES)&&o.elementIndexUint&&(m=Nn.UNSIGNED_INT),A.indexBuffer=vo.createIndexBuffer({context:o,typedArray:A.indicesTypedArray,usage:ln.STATIC_DRAW,indexDatatype:m}),A.indicesTypedArray=null,delete A.indicesTypedArray};var P2e=M2e;function bH(o){this.layer=o.layer,this.vertexPackage=o.vertexPackage,this.arrIndexPackage=o.arrIndexPackage,this.vertexBufferToCreate=new d5,this.indexBufferToCreate=new d5;let A,f;for(A=0,f=this.vertexPackage.vertexAttributes.length;A<f;A++)this.vertexBufferToCreate.enqueue(A);for(A=0,f=this.arrIndexPackage.length;A<f;A++)this.indexBufferToCreate.enqueue(A);this.boundingVolume=o.boundingVolume,this.material=o.material,this.modelMatrix=o.modelMatrix,this.shaderProgram=void 0,this.vertexArray=void 0,this.colorCommand=void 0,this.ready=!1}var v7e=new T2e,E7e=new P2e;function jDi(o,A){let f=o.layer.context,m=o.vertexBufferToCreate;for(;m.length;){let C=m.peek();if(v7e.set(f,o,C),!A.jobScheduler.execute(v7e,KE.BUFFER))break;m.dequeue()}}function qDi(o,A){let f=o.layer.context,m=o.indexBufferToCreate;for(;m.length;){let C=m.peek();if(E7e.set(f,o,C),!A.jobScheduler.execute(E7e,KE.BUFFER))break;m.dequeue()}}bH.prototype.createBuffers=function(o){jDi(this,o),qDi(this,o)};bH.prototype.createCommand=Ui.throwInstantiationError;bH.prototype.update=Ui.throwInstantiationError;bH.prototype.isDestroyed=Ui.throwInstantiationError;bH.prototype.destroy=Ui.throwInstantiationError;var gW=bH;function QO(o){gW.call(this,o)}QO.prototype=Object.create(gW.prototype);QO.prototype.constructor=gW;function XDi(o,A,f){let m=new Fr({sources:[Q2e]}),C=new Fr({sources:[S2e]});return O(A.aNormal)&&(m.defines.push("VertexNormal"),C.defines.push("VertexNormal")),f.textures.length>0&&(m.defines.push("TexCoord"),C.defines.push("TexCoord")),f.textures.length===2&&(m.defines.push("TexCoord2"),C.defines.push("TexCoord2")),_s.fromCache({context:o,vertexShaderSource:m,fragmentShaderSource:C,attributeLocations:A})}function ZDi(){return fn.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:nI.LESS_OR_EQUAL}})}function $Di(){return fn.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:nI.LESS_OR_EQUAL},blending:Bu.ALPHA_BLEND})}function e2i(o){return{uTexture:function(){return o.textures[0]},uTextureWidth:function(){return o.textures[0]._width},uTexture2:function(){return o.textures[1]},uTexture2Width:function(){return o.textures[1]._width},uDiffuseColor:function(){return o.diffuseColor},uAmbientColor:function(){return o.ambientColor}}}QO.prototype.createCommand=function(){if(O(this.colorCommand))return;let o=this.layer.context,A=this.vertexPackage,f=this.arrIndexPackage,m=A.vertexAttributes,C=A.attrLocation;if(f.length<1)return;let y=f[0],x=this.material;this.shaderProgram=XDi(o,C,x),this.vertexArray=new Vc({context:o,attributes:m,indexBuffer:y.indexBuffer}),this.colorCommand=new On({primitiveType:y.primitiveType,modelMatrix:this.modelMatrix,boundingVolume:wi.clone(this.boundingVolume),pickId:"vSecondColor",vertexArray:this.vertexArray,shaderProgram:this.shaderProgram,pass:x.bTransparentSorting?hr.TRANSLUCENT:hr.CESIUM_3D_TILE,renderState:x.bTransparentSorting?$Di():ZDi()}),this.colorCommand.uniformMap=e2i(x),this.vertexPackage=null,this.arrIndexPackage=null,this.ready=!0};QO.prototype.update=function(o){if(!this.ready){this.createBuffers(o),this.createCommand(o);return}o.commandList.push(this.colorCommand)};QO.prototype.isDestroyed=function(){return!1};QO.prototype.destroy=function(){return this.shaderProgram=this.shaderProgram&&!this.shaderProgram.isDestroyed()&&this.shaderProgram.destroy(),this.vertexArray=this.vertexArray&&!this.vertexArray.isDestroyed()&&this.vertexArray.destroy(),this.colorCommand=void 0,this.vertexPackage=null,this.arrIndexPackage=null,Qr(this)};var Die=QO,t2i={OSGBFile:function(o){return new Die(o)},OSGBCacheFile:function(o){return new Die(o)}},R2e=t2i,i2i={SVC_Vertex:1,SVC_Normal:2,SVC_VertexColor:4,SVC_SecondColor:8,SVC_TexutreCoord:16,SVC_TexutreCoordIsW:32},_1=Object.freeze(i2i);function olt(){}function r2i(o,A){let f={},m=A.materials.material;for(let C=0,y=m.length;C<y;C++){let x=m[C].material,v=x.id,E=new b2e;f[v]=E;let I=x.ambient;E.ambientColor=new At(I.r,I.g,I.b,I.a);let w=x.diffuse;E.diffuseColor=new At(w.r,w.g,w.b,w.a);let Q=x.specular;E.specularColor=new At(Q.r,Q.g,Q.b,Q.a),E.shininess=x.shininess,E.bTransparentSorting=x.transparentsorting;let M=x.textureunitstates,B=M.length;for(let T=0;T<B;T++){let D=M[T].textureunitstate,F=D.id,L=D.addressmode.u===0?Va.REPEAT:Va.CLAMP_TO_EDGE,R=D.addressmode.v===0?Va.REPEAT:Va.CLAMP_TO_EDGE;E.texMatrix=Xe.unpack(D.texmodmatrix);let k=A.texturePackage[F];if(O(k)&&k.imageBuffer.byteLength>0){k.wrapS=L,k.wrapT=R;let U=new B2e(o,F,k);E.textures.push(U)}}}return f}function n2i(o,A){let f=new wi,m=new ee,C=o.vertexAttributes[0],y=C.componentsPerAttribute,x=O(o.nCompressOptions)&&(o.nCompressOptions&_1.SVC_Vertex)===_1.SVC_Vertex,v=1,E,I;x?(v=o.vertCompressConstant,E=new ee(o.minVerticesValue.x,o.minVerticesValue.y,o.minVerticesValue.z),I=new Uint16Array(C.typedArray.buffer,C.typedArray.byteOffset,C.typedArray.byteLength/2)):I=new Float32Array(C.typedArray.buffer,C.typedArray.byteOffset,C.typedArray.byteLength/4);let w=[];for(let Q=0;Q<o.verticesCount;Q++)ee.fromArray(I,y*Q,m),x&&(m=ee.multiplyByScalar(m,v,m),m=ee.add(m,E,m)),w.push(ee.clone(m));return wi.fromPoints(w,f),wi.transform(f,A,f),w.length=0,f}function o2i(o,A,f,m,C){let y={},x=m.geodes;for(let v=0,E=x.length;v<E;v++){let I=x[v],w=I.matrix,Q=Xe.multiply(o.modelMatrix,w,new Xe),M;O(C.boundingVolume)&&(M=new wi(C.boundingVolume.sphere.center,C.boundingVolume.sphere.radius),wi.transform(M,o.modelMatrix,M));let B=I.skeletonNames;for(let T=0,D=B.length;T<D;T++){let F=B[T],L=A.geoPackage[F],R=L.vertexPackage,k=L.arrIndexPackage,U=L.pickInfo,V;k.length>0&&(V=f[k[0].materialCode]);let H=O(M)?M:n2i(R,Q);y[F]=R2e[o.fileType]({layer:o,vertexPackage:R,arrIndexPackage:k,pickInfo:U,modelMatrix:Q,boundingVolume:H,material:V})}}if(!O(C.boundingVolume)){let v=[];for(let E in y)y.hasOwnProperty(E)&&v.push(y[E].boundingVolume);C.boundingVolume=wi.fromBoundingSpheres(v)}C.geoMap=y}function a2i(o,A,f){let m=A.groupNode,C=[];for(let y=0,x=m.pageLods.length;y<x;y++){let v={},E=m.pageLods[y];v.rangeMode=E.rangeMode,v.rangeDataList=E.childTile,v.rangeList=E.rangeList;let I=E.boundingSphere.center,w=E.boundingSphere.radius;v.rangeDataList!==""?v.boundingVolume={sphere:{center:new ee(I.x,I.y,I.z),radius:w}}:v.isLeafTile=!0,o2i(o,A,f,E,v),C.push(v)}return C}olt.parse=function(o,A){if(!O(A))return;let f=r2i(o.context,A);return a2i(o,A,f)};var L2e=olt;function SO(){this._list=new qne,this._sentinel=this._list.add(),this._trimTiles=!1}SO.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)};SO.prototype.touch=function(o){let A=o.cacheNode;O(A)&&this._list.splice(this._sentinel,A)};SO.prototype.add=function(o){O(o.cacheNode)||(o.cacheNode=this._list.add(o))};SO.prototype.unloadTile=function(o,A,f){let m=A.cacheNode;!O(m)||(this._list.remove(m),A.cacheNode=void 0,f(o,A))};SO.prototype.unloadTiles=function(o,A){let f=this._trimTiles;this._trimTiles=!1;let m=this._list,C=o.maximumMemoryUsage*1024*1024,y=this._sentinel,x=m.head;for(;x!==y&&(o.totalMemoryUsageInBytes>C||f);){let v=x.item;x=x.next,v.isDestroyed()&&console.log(v),this.unloadTile(o,v,A)}};SO.prototype.trim=function(){this._trimTiles=!0};var F2e=SO,s2i={UNLOADED:0,LOADING:1,PARSING:2,READY:3,FAILED:4},yD=Object.freeze(s2i);function alt(){this._stack=[]}function l2i(o,A,f){A.length=0;for(let m=0,C=o._rootTiles.length;m<C;m++){let y=o._rootTiles[m];y.updateVisibility(f),y.visible&&A.push(y)}}function u2i(o,A){return o.distanceToCamera-A.distanceToCamera}function c2i(o,A,f,m){let C,y=A.children,x=y.length;for(C=0;C<x;++C)y[C].updateVisibility(m);for(y.sort(u2i),C=0;C<x;++C){let v=y[C];v.visible&&f.push(v)}}function A2i(o,A,f){A.renderable&&(o._selectedTiles.push(A),A.selectedFrame=f.frameNumber)}function h2i(o,A,f){A.requestedFrame===f.frameNumber||A.contentState!==yD.UNLOADED||A.isLeafTile||(o._requestTiles.push(A),A.requestedFrame=f.frameNumber)}function d2i(o,A,f){A.touchedFrame!==f.frameNumber&&(o._cache.touch(A),A.touchedFrame=f.frameNumber)}function f2i(o,A,f){for(;A.length;){let m=A.pop();if(m.visible){if(d2i(o,m,f),m.canTraverse()){c2i(o,m,A,f);continue}A2i(o,m,f),h2i(o,m,f)}}}alt.prototype.scheduler=function(o,A){o._requestTiles.length=0,o._selectedTiles.length=0;let f=this._stack;l2i(o,f,A),f2i(o,f,A)};var N2e=alt,g2i=Eh(D7e(),1);function slt(){}var I7e={SV_Unkown:0,SV_Standard:1,SV_Compressed:2};function p2i(o,A){let f=new Uint8Array(o,A);return g2i.default.inflate(f).buffer}function QH(o,A,f){let m=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let C=new Uint8Array(o,f,m),y=d2(C);return f+=m,{string:y,bytesOffset:f}}function m2i(o,A,f,m){let C={},y=[],x=new Array(16);for(let E=0;E<16;E++)x[E]=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT;C.matrix=x,C.skeletonNames=y;let v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let E=0;E<v;E++){let I=QH(o,A,f);y.push(I.string),f=I.bytesOffset}return m.push(C),f}function C2i(o,A,f,m){let C={};C.rangeList=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,C.rangeMode=A.getUint16(f,!0),f+=Uint16Array.BYTES_PER_ELEMENT;let y={};y.x=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT,y.y=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT,y.z=A.getFloat64(f,!0),f+=Float64Array.BYTES_PER_ELEMENT;let x=A.getFloat64(f,!0);f+=Float64Array.BYTES_PER_ELEMENT,C.boundingSphere={center:y,radius:x};let v=QH(o,A,f),E=v.string;f=v.bytesOffset;let I=E.indexOf("Geometry");if(I!==-1){let Q=E.substring(I);E=E.replace(Q,"")}C.childTile=E,C.geodes=[];let w=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let Q=0;Q<w;Q++)f=m2i(o,A,f,C.geodes);return m.push(C),f}function y2i(o,A,f,m){let C={},y=[],x=[],v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let E=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let w=0;w<E;w++)f=C2i(o,A,f,x);C.pageLods=x;let I=f%4;return I!==0&&(f+=4-I),m.groupNode=C,f}function llt(o,A,f,m){let C=A.getUint32(f,!0);if(m.verticesCount=C,f+=Uint32Array.BYTES_PER_ELEMENT,f<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);x=y*Float32Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;let v=C*y*Float32Array.BYTES_PER_ELEMENT,E=new Uint8Array(o,f,v);f+=v;let I=m.vertexAttributes,w=m.attrLocation;return w.aPosition=I.length,I.push({index:w.aPosition,typedArray:E,componentsPerAttribute:y,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function ult(o,A,f,m){let C=A.getUint32(f,!0);if(f+=Uint32Array.BYTES_PER_ELEMENT,C<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let v=C*y*Float32Array.BYTES_PER_ELEMENT,E=new Uint8Array(o,f,v);f+=v;let I=m.vertexAttributes,w=m.attrLocation;return w.aNormal=I.length,I.push({index:w.aNormal,typedArray:E,componentsPerAttribute:y,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function clt(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=m.verticesCount,x;if(C>0){let I=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT*2;let w=C*Uint8Array.BYTES_PER_ELEMENT*4;x=new Uint8Array(o,f,w).slice(0,w),f+=w}else{x=new Uint8Array(4*y);for(let I=0;I<y;I++)x[I*4]=255,x[I*4+1]=255,x[I*4+2]=255,x[I*4+3]=255}let v=m.vertexAttributes,E=m.attrLocation;return E.aColor=v.length,v.push({index:E.aColor,typedArray:x,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:4,normalize:!0}),m.vertexColor=x,f}function Alt(o,A,f,m){let C=A.getUint32(f,!0);if(f+=Uint32Array.BYTES_PER_ELEMENT,C<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT*2;let x=C*Uint8Array.BYTES_PER_ELEMENT*4,v=new Uint8Array(o,f,x);f+=x;let E=m.vertexAttributes,I=m.attrLocation;return I.aSecondColor=E.length,E.push({index:I.aSecondColor,typedArray:v,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:4,normalize:!0}),f}function hlt(o,A,f,m){let C=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;for(let y=0;y<C;y++){let x=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let v=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let E=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let I=x*v*Float32Array.BYTES_PER_ELEMENT,w=new Uint8Array(o,f,I);f+=I;let Q="aTexCoord"+y,M=m.vertexAttributes,B=m.attrLocation;B[Q]=M.length,M.push({index:B[Q],typedArray:w,componentsPerAttribute:v,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:v*Float32Array.BYTES_PER_ELEMENT,normalize:!1})}return f}function dlt(o,A,f,m){let C=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;let y=m.vertexAttributes,x=m.attrLocation;for(let v=0;v<C;v++){let E=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let I=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let w=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let Q=E*I*Float32Array.BYTES_PER_ELEMENT;if(I===17||I===29){let M=new Uint8Array(o,f,Q);m.instanceCount=E,m.instanceMode=I,m.instanceBuffer=M,m.instanceIndex=1;let B=I*E*4,T=M.slice(0,B);m.vertexColorInstance=T;let D;I===17?(D=Float32Array.BYTES_PER_ELEMENT*17,x.uv2=y.length,y.push({index:x.uv2,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:D,instanceDivisor:1}),x.uv3=y.length,y.push({index:x.uv3,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv4=y.length,y.push({index:x.uv4,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv5=y.length,y.push({index:x.uv5,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv6=y.length,y.push({index:x.uv6,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1})):I===29&&(D=Float32Array.BYTES_PER_ELEMENT*29,x.uv1=y.length,y.push({index:x.uv1,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:D,instanceDivisor:1,byteLength:Q}),x.uv2=y.length,y.push({index:x.uv2,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv3=y.length,y.push({index:x.uv3,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv4=y.length,y.push({index:x.uv4,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv5=y.length,y.push({index:x.uv5,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv6=y.length,y.push({index:x.uv6,componentsPerAttribute:4,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:20*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv7=y.length,y.push({index:x.uv7,componentsPerAttribute:3,componentDatatype:ei.FLOAT,normalize:!1,offsetInBytes:24*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv8=y.length,y.push({index:x.uv8,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,offsetInBytes:27*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}),x.uv9=y.length,y.push({index:x.uv9,componentsPerAttribute:4,componentDatatype:ei.UNSIGNED_BYTE,normalize:!0,offsetInBytes:28*Float32Array.BYTES_PER_ELEMENT,strideInBytes:D,instanceDivisor:1}))}else{let M=E*I;m.instanceBounds=new Float32Array(M);for(let B=0;B<M;B++)m.instanceBounds[B]=A.getFloat32(f,!0)}f+=Q}return f}function x2i(o,A,f,m){let C=A.getUint32(f,!0);if(m.verticesCount=C,f+=Uint32Array.BYTES_PER_ELEMENT,f<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);x=y*Int16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;let v=A.getFloat32(f,!0);f+=Float32Array.BYTES_PER_ELEMENT;let E={};E.x=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,E.y=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,E.z=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,E.w=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,m.vertCompressConstant=v,m.minVerticesValue=E;let I=C*y*Int16Array.BYTES_PER_ELEMENT,w=new Uint8Array(o,f,I);f+=I;let Q=m.vertexAttributes,M=m.attrLocation;return M.aPosition=Q.length,Q.push({index:M.aPosition,typedArray:w,componentsPerAttribute:y,componentDatatype:ei.SHORT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function v2i(o,A,f,m){let C=A.getUint32(f,!0);if(f+=Uint32Array.BYTES_PER_ELEMENT,C<=0)return f;let y=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let x=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let v=C*2*Int16Array.BYTES_PER_ELEMENT,E=new Uint8Array(o,f,v);f+=v;let I=m.vertexAttributes,w=m.attrLocation;return w.aNormal=I.length,I.push({index:w.aNormal,typedArray:E,componentsPerAttribute:2,componentDatatype:ei.SHORT,offsetInBytes:0,strideInBytes:x,normalize:!1}),f}function E2i(o,A,f,m){m.texCoordCompressConstant=[],m.minTexCoordValue=[];let C=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT,f+=Uint16Array.BYTES_PER_ELEMENT;for(let y=0;y<C;y++){let x=A.getUint8(f,!0);f+=Uint8Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT*3;let v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let E=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let I=A.getUint16(f,!0);f+=Uint16Array.BYTES_PER_ELEMENT;let w=A.getFloat32(f,!0);f+=Float32Array.BYTES_PER_ELEMENT,m.texCoordCompressConstant.push(w);let Q={};Q.x=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,Q.y=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,Q.z=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,Q.w=A.getFloat32(f,!0),f+=Float32Array.BYTES_PER_ELEMENT,m.minTexCoordValue.push(Q);let M=v*E*Int16Array.BYTES_PER_ELEMENT,B=new Uint8Array(o,f,M);f+=M;let T=f%4;T!==0&&(f+=4-T);let D="aTexCoord"+y,F=m.vertexAttributes,L=m.attrLocation;if(L[D]=F.length,F.push({index:L[D],typedArray:B,componentsPerAttribute:E,componentDatatype:ei.SHORT,offsetInBytes:0,strideInBytes:E*Int16Array.BYTES_PER_ELEMENT,normalize:!1}),x){M=v*Float32Array.BYTES_PER_ELEMENT;let R=new Uint8Array(o,f,M);f+=M,m.texCoordZMatrix=!0,D="aTexCoordZ"+y,L[D]=F.length,F.push({index:L[D],typedArray:R,componentsPerAttribute:1,componentDatatype:ei.FLOAT,offsetInBytes:0,strideInBytes:Float32Array.BYTES_PER_ELEMENT,normalize:!1})}}return f}function I2i(o,A,f,m){return f=llt(o,A,f,m),f=ult(o,A,f,m),f=clt(o,A,f,m),f=Alt(o,A,f,m),f=hlt(o,A,f,m),f=dlt(o,A,f,m),f}function _2i(o,A,f,m){let C=A.getUint32(f,!0);return m.compressOptions=C,f+=Uint32Array.BYTES_PER_ELEMENT,(C&_1.SVC_Vertex)===_1.SVC_Vertex?f=x2i(o,A,f,m):f=llt(o,A,f,m),(C&_1.SVC_Normal)===_1.SVC_Normal?f=v2i(o,A,f,m):f=ult(o,A,f,m),f=clt(o,A,f,m),f=Alt(o,A,f,m),(C&_1.SVC_TexutreCoord)===_1.SVC_TexutreCoord?f=E2i(o,A,f,m):f=hlt(o,A,f,m),(C&_1.SVC_TexutreCoordIsW)===_1.SVC_TexutreCoordIsW&&(m.textureCoordIsW=!0),f=dlt(o,A,f,m),f}function B2i(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let y=0;y<C;y++){let x={},v=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let E=A.getUint8(f,!0);f+=Uint8Array.BYTES_PER_ELEMENT;let I=A.getUint8(f,!0);f+=Uint8Array.BYTES_PER_ELEMENT;let w=A.getUint8(f,!0);if(f+=Uint8Array.BYTES_PER_ELEMENT,f+=Uint8Array.BYTES_PER_ELEMENT,v>0){let B=null,T;E===1||E===3?(T=v*Uint32Array.BYTES_PER_ELEMENT,B=new Uint8Array(o,f,T)):(T=v*Uint16Array.BYTES_PER_ELEMENT,B=new Uint8Array(o,f,T),v%2!==0&&(T+=2)),x.indicesTypedArray=B,f+=T}x.indicesCount=v,x.indexType=E,x.primitiveType=w;let Q=[],M=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let B=0;B<M;B++){let T=QH(o,A,f),D=T.string;f=T.bytesOffset,Q.push(D),x.materialCode=D}if(f%4!==0){let B=4-f%4;f+=B}m.push(x)}return f}function w2i(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let v=0;v<y;v++){let E=QH(o,A,f),I=E.string;f=E.bytesOffset;let w=f%4;w!==0&&(f+=4-w);let Q=A.getUint32(f,!0);f+=Int32Array.BYTES_PER_ELEMENT;let M={vertexAttributes:[],attrLocation:{},instanceCount:0,instanceMode:0,instanceIndex:-1};Q===I7e.SV_Standard?f=I2i(o,A,f,M):Q===I7e.SV_Compressed&&(f=_2i(o,A,f,M));let B=[];f=B2i(o,A,f,B),m[I]={vertexPackage:M,arrIndexPackage:B}}let x=A.getUint32(f,!0);return f+=x,f+=Uint32Array.BYTES_PER_ELEMENT,f}function b2i(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let x=0;x<y;x++){let v=QH(o,A,f),E=v.string;f=v.bytesOffset;let I=f%4;I!==0&&(f+=4-I);let w=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let Q=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let M=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let B=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let T=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let D=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let F=new Uint8Array(o,f,T);f+=T,m[E]={id:E,width:Q,height:M,compressType:B,nFormat:D,internalFormat:Gn.RGBA_DXT5,imageBuffer:F}}return f}function Q2i(o,A,f,m){let C=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let y=new Uint8Array(o,f,C),x=d2(y);return f+=C,m.materials=JSON.parse(x),f}function S2i(o,A,f,m,C){if((m&1)===1){let y=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let x=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;for(let v=0;v<x;v++){let E=QH(o,A,f),I=E.string;f=E.bytesOffset;let w=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let Q={};C[I].pickInfo=Q;let M=C[I].vertexPackage.instanceIndex;for(let B=0;B<w;B++){let T=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let D=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let F=[];for(let L=0;L<D;L++){let R=A.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT;let k=1;M===-1&&(k=A.getUint32(f,!0),f+=Uint32Array.BYTES_PER_ELEMENT),F.push({vertexColorOffset:R,vertexColorCount:k})}Q[T]=F}}}return f}slt.parseBuffer=function(o){let A=0,f={version:void 0,groupNode:void 0,geoPackage:{},matrials:void 0,texturePackage:{}},m=new DataView(o);f.version=m.getFloat32(A,!0),A+=Float32Array.BYTES_PER_ELEMENT;let C=m.getUint32(A,!0);A+=Uint32Array.BYTES_PER_ELEMENT;let y=p2i(o,A);m=new DataView(y),A=0;let x=m.getUint32(A,!0);return A+=Uint32Array.BYTES_PER_ELEMENT,A=y2i(y,m,A,f),A=w2i(y,m,A,f.geoPackage),A=b2i(y,m,A,f.texturePackage),A=Q2i(y,m,A,f),S2i(y,m,A,x,f.geoPackage),f};var k2e=slt;function AI(o,A,f,m,C,y,x){this.layer=o,this.parent=A,this.fileName=m,this.isLeafTile=Ae(x,!1),this.boundingVolume=this.createBoundingVolume(f,o.modelMatrix);let v=An.createIfNeeded(o._baseResource);if(O(A))this.baseUri=A.baseUri;else{let E=new An(m);this.baseUri=E.getBaseUri()}this.contentResource=v.getDerivedResource({url:m}),this.serverKey=V1.getServerKey(this.contentResource.getUrlComponent()),this.request=void 0,this.cacheNode=void 0,this.distanceToCamera=0,this.pixel=0,this.visibilityPlaneMask=0,this.visible=!1,this.children=[],this.lodRangeData=C,this.renderEntityMap=y,this.contentState=yD.UNLOADED,this.readerable=!1,this.touchedFrame=0,this.requestedFrame=0,this.selectedFrame=0,this.priority=0}Object.defineProperties(AI.prototype,{renderable:{get:function(){return O(this.renderEntityMap)}}});var flt=new ee;function D2i(o,A){let f=ee.clone(o.center),m=o.radius;f=Xe.multiplyByPoint(A,f,f);let C=Xe.getScale(A,flt),y=ee.maximumComponent(C);return m*=y,new yP(f,m)}function T2i(o,A){let f=new ee(o.min.x,o.min.y,o.min.z);Xe.multiplyByPoint(A,f,f);let m=new ee(o.max.x,o.max.y,o.max.z);Xe.multiplyByPoint(A,m,m);let C=wi.fromCornerPoints(f,m,new wi),y=C.center,x=C.radius,v=Xe.getScale(A,flt),E=ee.maximumComponent(v);return x*=E,new yP(y,x)}AI.prototype.createBoundingVolume=function(o,A){if(this.isLeafTile)return new yP(o.center,o.radius);if(O(o.sphere))return D2i(o.sphere,A);if(O(o.box))return T2i(o.box,A)};AI.prototype.canTraverse=function(){return this.children.length===0||this.isLeafTile?!1:O(this.lodRangeData)?this.pixel>this.lodRangeData:!0};function glt(o,A){return o.boundingVolume}AI.prototype.getPixel=function(o){let A=this.boundingVolume,f=A.radius,m=A.center,C=ee.distance(o.camera.positionWC,m),y=o.context.drawingBufferHeight,x=o.camera.frustum._fovy*.5;return y*.5/Math.tan(x)*f/C};AI.prototype.distanceToTile=function(o){return glt(this,o).distanceToCamera(o)};AI.prototype.visibility=function(o,A){let f=glt(this,o);return o.cullingVolume.computeVisibilityWithPlaneMask(f,A)};AI.prototype.updateVisibility=function(o){let A=this.parent,f=O(A)?A.visibilityPlaneMask:AC.MASK_INDETERMINATE;this.distanceToCamera=this.distanceToTile(o),this.pixel=this.getPixel(o),this.visibilityPlaneMask=this.visibility(o,f),this.visible=this.visibilityPlaneMask!==AC.MASK_OUTSIDE};function M2i(o){return function(){return o.priority}}function P2i(o){return function(A){o.contentState=yD.FAILED,o.contentReadyPromise.reject(A)}}function R2i(o,A){let f=o.layer,m=A.length;for(let C=0;C<m;C++){let y=A[C],x=y.boundingVolume,v=y.rangeDataList;v=o.baseUri+v;let E=y.rangeList,I=y.geoMap,w=new AI(f,o,x,v,E,I,y.isLeafTile);o.children.push(w),o.layer._cache.add(w)}}AI.prototype.requestContent=function(){let o=this,A=this.layer,f=this.contentResource.clone(),m=new cC({throttle:!0,throttleByServer:!0,type:oB.TILES3D,priorityFunction:M2i(this),serverKey:this.serverKey});this.request=m,f.request=m;let C=f.fetchArrayBuffer();if(!O(C))return!1;this.contentState=yD.LOADING,this.contentReadyPromise=rA();let y=P2i(this);return C.then(function(x){if(o.isDestroyed()){y();return}let v=k2e.parseBuffer(x),E=L2e.parse(o.layer,v);R2i(o,E),o.selectedFrame=0,o.contentState=yD.READY,o.contentReadyPromise.resolve(v)}).catch(function(x){if(m.state===yA.CANCELLED){o.contentState=yD.UNLOADED;return}o.contentState=yD.FAILED}),!0};AI.prototype.update=function(o){let A=this.renderEntityMap;for(let f in A)A.hasOwnProperty(f)&&A[f].update(o)};AI.prototype.free=function(){for(let o=0,A=this.children.length;o<A;o++)this.children[o].destroy();this.children.length=0,this.contentState=yD.UNLOADED};AI.prototype.isDestroyed=function(){return!1};AI.prototype.destroy=function(){for(let o in this.renderEntityMap)this.renderEntityMap.hasOwnProperty(o)&&this.renderEntityMap[o].destroy();this.renderEntityMap=void 0;for(let o=0,A=this.children.length;o<A;o++)this.children[o].destroy();return this.children.length=0,Qr(this)};var O2e=AI;function pW(o){o=Ae(o,Ae.EMPTY_OBJECT),of.defined("options.url",o.url),of.defined("options.context",o.context),this.context=o.context,this._url=void 0,this._basePath=void 0,this._baseResource=void 0,this.modelMatrix=void 0,this.fileType=void 0,this._position=void 0,this._rectangle=void 0,this._rootTiles=[],this._schuduler=new N2e,this._requestTiles=[],this._selectedTiles=[],this._cache=new F2e,this._maximumMemoryUsage=-1,this._totalMemoryUsageInBytes=0,this.loadConfig(o.url)}Object.defineProperties(pW.prototype,{ready:{get:function(){return this._rootTiles.length>0}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){return this._rectangle}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes},set:function(o){this._totalMemoryUsageInBytes=o}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(o){this._maximumMemoryUsage=o}}});pW.prototype.loadConfig=function(o){let A=this;this._readyPromise=Promise.resolve(o).then(function(f){let m,C=An.createIfNeeded(f);return m=C.getBaseUri(!0),A._url=C.url,A._basePath=m,A._baseResource=C,C.fetchJson()}).then(function(f){let m=f.extensions;A.fileType=m["s3m:FileType"];let C=f.position.x,y=f.position.y,x=f.position.z;A._position=ee.fromDegrees(C,y,x),A.modelMatrix=Vn.eastNorthUpToFixedFrame(A._position),A._rectangle=Si.fromDegrees(f.geoBounds.left,f.geoBounds.bottom,f.geoBounds.right,f.geoBounds.top);for(let v=0,E=f.tiles.length;v<E;v++){let I=f.tiles[v].url,w={box:f.tiles[v].boundingbox},Q=new O2e(A,void 0,w,I);A._cache.add(Q),A._rootTiles.push(Q)}return A}).catch(function(f){return f})};function L2i(o,A){return o.priority-A.priority}function F2i(o){let A=o._requestTiles,f=A.length;A.sort(L2i);for(let m=0;m<f;++m)A[m].requestContent()}function N2i(o,A){let f=o._selectedTiles,m=f.length;for(let C=0;C<m;C++)f[C].update(A)}function k2i(o,A){}function O2i(o){o._cache.unloadTiles(o,k2i)}pW.prototype.prePassesUpdate=function(o){!this.ready||o.newFrame&&this._cache.reset()};pW.prototype.update=function(o){!this.ready||(this._schuduler.scheduler(this,o),F2i(this),N2i(this,o),O2i(this))};var Bae=pW,W8=new wi;function JU(o){return xs(`./Assets/Textures/SkyBox/skyBox_${o}.jpg`)}function U2i(o){o._renderLoopRunning=!0;let A=0;function f(m){o.isDestroyed()||(o._useDefaultRenderLoop?(o.resize(),o.render(),requestAnimationFrame(f)):o._renderLoopRunning=!1)}requestAnimationFrame(f)}function plt(o){let A=o._canvas,f=A.clientWidth,m=A.clientHeight,C=o._resolutionScale;o._supportsImageRenderingPixelated||(C*=Ae(window.devicePixelRatio,1)),o._canvasWidth=f,o._canvasHeight=m,f*=C,m*=C,A.width=f,A.height=m,o._canRender=f!==0&&m!==0}function mlt(o){let A=o._canvas,f=A.width,m=A.height;if(f!==0&&m!==0){let C=o._scene.camera.frustum;O(C.aspectRatio)?C.aspectRatio=f/m:(C.top=C.right*(m/f),C.bottom=-C.top)}}function PQ(o,A){o=iA(o),A=Ae(A,{});let f=document.createElement("div");f.className="map-widget",o.appendChild(f);let m=document.createElement("canvas");m.setAttribute("id","mapRenderCanvas");let C=Mo.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=C,C&&(m.style.imageRendering=Mo.imageRenderingValue()),m.oncontextmenu=function(){return!1},m.onselectstart=function(){return!1},f.appendChild(m);let y=document.createElement("div");y.className="map-widget-message-pannel";let x=O(A.creditContainer)?iA(A.creditContainer):f;x.appendChild(y);let v=O(A.creditViewport)?iA(A.creditViewport):f,E=Ae(A.showRenderLoopErrors,!0);this._element=f,this._container=o,this._canvas=m,this._canvasWidth=0,this._canvasHeight=0,this._creditViewport=v,this._creditContainer=x,this._innerCreditContainer=y,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=E,this._resolutionScale=1,this._forceResize=!1,this._clock=O(A.clock)?A.clock:new z5,this._trackedEntityChanged=new br,plt(this);let I=new koe({canvas:m,contextOptions:A.contextOptions,creditContainer:y,creditViewport:v,mapProjection:A.mapProjection,orderIndependentTranslucency:A.orderIndependentTranslucency,scene3DOnly:Ae(A.scene3DOnly,!1),terrainExaggeration:A.terrainExaggeration,shadows:A.shadows,mapMode2D:A.mapMode2D,requestRenderMode:A.requestRenderMode,maximumRenderTimeChange:A.maximumRenderTimeChange});this._scene=I,I.camera.constrainedAxis=ee.UNIT_Z,mlt(this);let w=null;A.ellipsoidCoordinates==="CGCS2000"?w=Ae(I.mapProjection.ellipsoid,Di.CGCS2000):w=Ae(I.mapProjection.ellipsoid,Di.WGS84);let Q=A.globe;O(Q)||(Q=new voe(w)),Q!==!1&&(I.globe=Q,I.globe.shadows=Ae(A.terrainShadows,Al.RECEIVE_ONLY));let M=A.skyBox;O(M)||(M=new mN({sources:{positiveX:JU("px"),negativeX:JU("mx"),positiveY:JU("py"),negativeY:JU("my"),positiveZ:JU("pz"),negativeZ:JU("mz")}})),M!==!1&&(I.skyBox=M,I.sun=new Uoe,I.moon=new Ioe);let B=A.skyAtmosphere;O(B)||(B=new sH(w)),B!==!1&&(I.skyAtmosphere=B);let T=A.globe===!1?!1:A.imageryProvider;if(O(T)||(T=Xk()),T!==!1)for(let F=0;F<T.length;F++)I.imageryLayers.addImageryProvider(T[F]);O(A.terrainProvider)&&A.globe!==!1&&(I.terrainProvider=A.terrainProvider),this._screenSpaceEventHandler=new Ur(m,!1),O(A.sceneMode)&&(A.sceneMode===xi.SCENE2D&&this._scene.morphTo2D(0),A.sceneMode===xi.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=Ae(A.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=A.targetFrameRate;let D=this;I.renderError.addEventListener(function(F,L){if(D._useDefaultRenderLoop=!1,D._renderLoopRunning=!1,D._showRenderLoopErrors){let R="An error occurred while rendering.  Rendering has stopped.";D.showErrorPanel(R,void 0,L)}})}Object.defineProperties(PQ.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(o){this._scene.terrainProvider=o}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(o){this._targetFrameRate=o}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(o){this._useDefaultRenderLoop!==o&&(this._useDefaultRenderLoop=o,o&&!this._renderLoopRunning&&U2i(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(o){this._resolutionScale=o,this._forceResize=!0}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},trackedEntity:{get:function(){return this._trackedEntity},set:function(o){if(this._trackedEntity!==o){this._trackedEntity=o,U2e(this);let A=this.scene,f=A.mode;!O(o)||!O(o.position)?(this._needTrackedEntityUpdate=!1,(f===xi.COLUMBUS_VIEW||f===xi.SCENE2D)&&(A.screenSpaceCameraController.enableTranslate=!0),(f===xi.COLUMBUS_VIEW||f===xi.SCENE3D)&&(A.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(Xe.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(o),this.scene.requestRender()}}}});PQ.prototype.showErrorPanel=function(o,A,f){let m=this._element,C=document.createElement("div");C.className="map-widget-errorPanel";let y=document.createElement("div");y.className="map-widget-errorPanel-content",C.appendChild(y);let x=document.createElement("div");x.className="map-widget-errorPanel-header",x.appendChild(document.createTextNode(o)),y.appendChild(x);let v=document.createElement("div");v.className="map-widget-errorPanel-scroll",y.appendChild(v);function E(){v.style.maxHeight=`${Math.max(Math.round(m.clientHeight*.9-100),30)}px`}if(E(),O(window.addEventListener)&&window.addEventListener("resize",E,!1),O(A)){let B=document.createElement("div");B.className="map-widget-errorPanel-message",B.innerHTML=`<p>${A}</p>`,v.appendChild(B)}let I="(no error details available)";O(f)&&(I=D5(f));let w=document.createElement("div");w.className="map-widget-errorPanel-message",w.appendChild(document.createTextNode(I)),v.appendChild(w);let Q=document.createElement("div");Q.className="map-widget-errorPanel-buttonPanel",y.appendChild(Q);let M=document.createElement("button");M.setAttribute("type","button"),M.className="map-button",M.appendChild(document.createTextNode("OK")),M.onclick=function(){O(E)&&O(window.removeEventListener)&&window.removeEventListener("resize",E,!1),m.removeChild(C)},Q.appendChild(M),m.appendChild(C),typeof console<"u"&&console.error(`${o}
${A}
${I}`)};PQ.prototype.isDestroyed=function(){return!1};PQ.prototype.destroy=function(){this._scene=this._scene&&this._scene.destroy(),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),Qr(this)};PQ.prototype.resize=function(){let o=this._canvas,A=o.clientWidth,f=o.clientHeight;!this._forceResize&&this._canvasWidth===A&&this._canvasHeight===f||(this._forceResize=!1,plt(this),mlt(this),this._scene.requestRender())};PQ.prototype.render=function(){if(this._scene._frameState||console.log("\u6388\u6743\u9A8C\u8BC1\u9519\u8BEF\uFF01"),this._canRender){this._scene.initializeFrame();let o=this._clock.tick();this._scene.render(o)}else this._clock.tick()};PQ.prototype.flyTo=function(o,A){return G2i(this,o,A,!0)};function G2i(o,A,f,m){U2e(o);let C=Promise.resolve(!0);return o._zoomPromise=C,o._zoomIsFlight=m,o._zoomOptions=f,Promise.resolve(A,function(y){if(o._zoomPromise===C){if(y instanceof dD){y.getViewableRectangle().then(function(x){return BJ(x,o.scene)}).then(function(x){o._zoomPromise===C&&(o._zoomTarget=x)});return}if(y instanceof Fx){o._zoomTarget=y;return}if(y instanceof cI){o._zoomTarget=y;return}if(y instanceof Y6){o._zoomTarget=y;return}if(y.isLoading&&O(y.loadingEvent)){let x=y.loadingEvent.addEventListener(function(){x(),o._zoomPromise===C&&(o._zoomTarget=y.entities.values.slice(0))});return}if(Array.isArray(y)){o._zoomTarget=y.slice(0);return}y=Ae(y.values,y),O(y.entities)&&(y=y.entities.values),Array.isArray(y)?o._zoomTarget=y.slice(0):o._zoomTarget=[y]}}),o.scene.requestRender(),C.promise}function lG(o){o._zoomPromise=void 0,o._zoomTarget=void 0,o._zoomOptions=void 0}function U2e(o){let A=o._zoomPromise;O(A)&&(lG(o),A.resolve(!1))}PQ.prototype._postRender=function(){H2i(this),V2i(this)};PQ.prototype._onTick=function(){let o=this,A=o.coreMap,f=A.clock.currentTime,m=A._entityView;if(O(m)){let C=A._trackedEntity;o._dataSourceDisplay.getBoundingSphere(C,!1,W8)===ro.DONE&&m.update(f,W8)}};function H2i(o){let A=o.coreMap,f=A._zoomTarget;if(!O(f)||A.scene.mode===xi.MORPHING)return;let m=A.scene,C=m.camera,y=A._zoomPromise,x=Ae(A._zoomOptions,{}),v,E;if(f instanceof Fx||f instanceof cI)return f.readyPromise.then(function(){let Q=f.boundingSphere;O(x.offset)||(x.offset=new Ex(0,-.5,Q.radius)),v={offset:x.offset,duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)}},A._zoomIsFlight?C.flyToBoundingSphere(f.boundingSphere,v):(C.viewBoundingSphere(Q,x.offset),C.lookAtTransform(Xe.IDENTITY),y.resolve(!0)),lG(A)});if(f instanceof Y6)return f.readyPromise.then(function(){let Q=f.boundingSphere;O(x.offset)||(x.offset=new Ex(0,-.5,Q.radius)),v={offset:x.offset,duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)}},A._zoomIsFlight?C.flyToBoundingSphere(Q,v):(C.viewBoundingSphere(Q,x.offset),C.lookAtTransform(Xe.IDENTITY),y.resolve(!0)),lG(A)});if(f instanceof Kt){v={destination:m.mapProjection.ellipsoid.cartographicToCartesian(f),duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)}},A._zoomIsFlight?C.flyTo(v):(C.setView(v),y.resolve(!0)),lG(A);return}let I=f,w=[];for(let Q=0,M=I.length;Q<M;Q++){let B=o._dataSourceDisplay.getBoundingSphere(I[Q],!1,W8);if(B===ro.PENDING)return;B!==ro.FAILED&&w.push(wi.clone(W8))}if(w.length===0){U2e(A);return}A.trackedEntity=void 0,E=wi.fromBoundingSpheres(w),A._zoomIsFlight?(lG(A),C.flyToBoundingSphere(E,{duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)},offset:x.offset})):(C.viewBoundingSphere(E,x.offset),C.lookAtTransform(Xe.IDENTITY),lG(A),y.resolve(!0))}function V2i(o){let A=o.coreMap;if(!A._needTrackedEntityUpdate)return;let f=A.trackedEntity,m=A.clock.currentTime,C=Nt.getValueOrUndefined(f.position,m);if(!O(C))return;let y=A.scene,x=o._dataSourceDisplay.getBoundingSphere(f,!1,W8);if(x===ro.PENDING)return;let v=y.mode;(v===xi.COLUMBUS_VIEW||v===xi.SCENE2D)&&(y.screenSpaceCameraController.enableTranslate=!1),(v===xi.COLUMBUS_VIEW||v===xi.SCENE3D)&&(y.screenSpaceCameraController.enableTilt=!1);let E=x!==ro.FAILED?W8:void 0;console.info(E),A._entityView=new $ne(f,y,y.mapProjection.ellipsoid),A._entityView.update(m,E),A._needTrackedEntityUpdate=!1}PQ.prototype.extend=function(o,A){o(this,A)};var Clt=PQ;function G2e(o){this._scene=o.scene,this.lowFrameRateMessage=Ae(o.lowFrameRateMessage,"This application appears to be performing poorly on your system.  Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,gr.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);let A=this;this._dismissMessage=Hl(function(){A.showingLowFrameRateMessage=!1,A.lowFrameRateMessageDismissed=!0});let f=WDe.fromScene(o.scene);this._unsubscribeLowFrameRate=f.lowFrameRate.addEventListener(function(){A.lowFrameRateMessageDismissed||(A.showingLowFrameRateMessage=!0)}),this._unsubscribeNominalFrameRate=f.nominalFrameRate.addEventListener(function(){A.showingLowFrameRateMessage=!1})}Object.defineProperties(G2e.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}});G2e.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),Qr(this)};var H2e=G2e;function wae(o){let A=iA(o.container),f=new H2e(o),m=document.createElement("div");m.className="cesium-performance-watchdog-message-area",m.setAttribute("data-bind","visible: showingLowFrameRateMessage");let C=document.createElement("button");C.setAttribute("type","button"),C.className="cesium-performance-watchdog-message-dismiss",C.innerHTML="&times;",C.setAttribute("data-bind","click: dismissMessage"),m.appendChild(C);let y=document.createElement("div");y.className="cesium-performance-watchdog-message",y.setAttribute("data-bind","html: lowFrameRateMessage"),m.appendChild(y),A.appendChild(m),gr.applyBindings(f,m),this._container=A,this._viewModel=f,this._element=m}Object.defineProperties(wae.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});wae.prototype.isDestroyed=function(){return!1};wae.prototype.destroy=function(){return this._viewModel.destroy(),gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var V2e=wae;function z2i(o){let A=document.createElement("div");A.className="cesium-viewer-cesium3DTilesInspectorContainer",o.container.appendChild(A);let f=new N2e(A,o.scene);Object.defineProperties(o,{cesium3DTilesInspector:{get:function(){return f}}})}var ylt=z2i;function K2i(o){let A=document.createElement("div");A.className="cesium-viewer-cesiumInspectorContainer",o.container.appendChild(A);let f=new O2e(A,o.scene);Object.defineProperties(o,{cesiumInspector:{get:function(){return f}}})}var xlt=K2i;function Y2i(o,A){A=Ae(A,Ae.EMPTY_OBJECT);let f=!0,m=Ae(A.flyToOnDrop,!0),C=new br,y=Ae(A.clearOnDrop,!0),x=Ae(A.dropTarget,o.container),v=Ae(A.clampToGround,!0),E=A.proxy;x=iA(x),Object.defineProperties(o,{dropTarget:{get:function(){return x},set:function(w){_7e(x,I),x=w,mpe(x,I)}},dropEnabled:{get:function(){return f},set:function(w){w!==f&&(w?mpe(x,I):_7e(x,I),f=w)}},dropError:{get:function(){return C}},clearOnDrop:{get:function(){return y},set:function(w){y=w}},flyToOnDrop:{get:function(){return m},set:function(w){m=w}},proxy:{get:function(){return E},set:function(w){E=w}},clampToGround:{get:function(){return v},set:function(w){v=w}}});function I(w){e5(w),y&&(o.entities.removeAll(),o.dataSources.removeAll());let Q=w.dataTransfer.files,M=Q.length;for(let B=0;B<M;B++){let T=Q[B],D=new FileReader;D.onload=J2i(o,T,E,v),D.onerror=W2i(o,T),D.readAsText(T)}}mpe(x,I),o.destroy=ODe(o,o.destroy,function(){o.dropEnabled=!1}),o._handleDrop=I}function e5(o){o.stopPropagation(),o.preventDefault()}function _7e(o,A){let f=o;O(f)&&(f.removeEventListener("drop",A,!1),f.removeEventListener("dragenter",e5,!1),f.removeEventListener("dragover",e5,!1),f.removeEventListener("dragexit",e5,!1))}function mpe(o,A){o.addEventListener("drop",A,!1),o.addEventListener("dragenter",e5,!1),o.addEventListener("dragover",e5,!1),o.addEventListener("dragexit",e5,!1)}function J2i(o,A,f,m){let C=o.scene;return function(y){let x=A.name;try{let v;if(/\.czml$/i.test(x))v=iW.load(JSON.parse(y.target.result),{sourceUri:x});else if(/\.geojson$/i.test(x)||/\.json$/i.test(x)||/\.topojson$/i.test(x))v=mK.load(JSON.parse(y.target.result),{sourceUri:x,clampToGround:m});else if(/\.(kml|kmz)$/i.test(x))v=Fre.load(A,{sourceUri:x,proxy:f,camera:C.camera,canvas:C.canvas,clampToGround:m,screenOverlayContainer:o.container});else if(/\.gpx$/i.test(x))v=BDe.load(A,{sourceUri:x,proxy:f});else{o.dropError.raiseEvent(o,x,`Unrecognized file: ${x}`);return}O(v)&&o.dataSources.add(v).then(function(E){o.flyToOnDrop&&o.flyTo(E)}).catch(function(E){o.dropError.raiseEvent(o,x,E)})}catch(v){o.dropError.raiseEvent(o,x,v)}}}function W2i(o,A){return function(f){o.dropError.raiseEvent(o,A.name,f.target.error)}}var vlt=Y2i;function j2i(o,A){A=Ae(A,Ae.EMPTY_OBJECT);let f=new V2e({scene:o.scene,container:o.bottomContainer,lowFrameRateMessage:A.lowFrameRateMessage});Object.defineProperties(o,{performanceWatchdog:{get:function(){return f}}})}var Elt=j2i,q2i={encNONE:0,enrS3TCDXTN:14,enrPVRTPF_PVRTC2:19,enrPVRTPF_PVRTC:20,enrPVRTPF_PVRTC_4bpp:21,enrPVRTPF_ETC1:22},Ilt=Object.freeze(q2i),X2i={LUMINANCE_8:1,LUMINANCE_16:2,ALPHA:3,ALPHA_4_LUMINANCE_4:4,LUMINANCE_ALPHA:5,RGB_565:6,BGR565:7,RGB:10,BGR:11,ARGB:12,ABGR:13,BGRA:14,WEBP:25,RGBA:28,DXT1:17,DXT2:18,DXT3:19,DXT4:20,DXT5:21},_lt=Object.freeze(X2i);function $K(o){this._angle=void 0,this._angleSubscription=void 0,this._radius=void 0,this._radiusSubscription=void 0,this._stack=void 0,this._stackSubscription=void 0,this._slice=void 0,this._sliceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._show=void 0,this._showSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._definitionChanged=new br,this._gaze=void 0,this._gazeSubscription=void 0,this.merge(Ae(o,Ae.EMPTY_OBJECT))}Object.defineProperties($K.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:Bi("show"),material:hy("material"),fill:Bi("fill"),shadows:Bi("shadows"),distanceDisplayCondition:Bi("distanceDisplayCondition")});$K.prototype.clone=function(o){return O(o)?(o.angle=this.angle,o.radius=this.radius,o.stack=this.stack,o.slice=this.slice,o.show=this.show,o.material=this.material,o.color=this.color,o.fill=this.fill,o.outline=this.outline,o.outlineColor=this.outlineColor,o.outlineWidth=this.outlineWidth,o.shadows=this.shadows,o.distanceDisplayCondition=this.distanceDisplayCondition,o.gaze=this.gaze,o):new $K(this)};$K.prototype.merge=function(o){this.angle=Ae(this.angle,o.angle),this.radius=Ae(this.radius,o.radius),this.stack=Ae(this.stack,o.stack),this.slice=Ae(this.slice,o.slice),this.show=Ae(this.show,o.show),this.color=Ae(this.color,o.color),this.material=Ae(this.material,o.material),this.fill=Ae(this.fill,o.fill),this.outline=Ae(this.outline,o.outline),this.outlineColor=Ae(this.outlineColor,o.outlineColor),this.outlineWidth=Ae(this.outlineWidth,o.outlineWidth),this.shadows=Ae(this.shadows,o.shadows),this.distanceDisplayCondition=Ae(this.distanceDisplayCondition,o.distanceDisplayCondition),this.gaze=Ae(this.gaze,o.gaze)};var Tie=$K;function Z2i(o){return new _D(o)}function $2i(o){return Bi(o,void 0,Z2i)}function bae(o){o=o||{},this._position=void 0,this._orientation=void 0,this._show=void 0;let A=o.conicArcSensor;A instanceof Tie||(A=new Tie(A)),this._conicArcSensor=A,this._distanceDisplayCondition=new $o,this._geometry=void 0,this._outlineGeometry=void 0,this._definitionChanged=new br,this.merge(o)}Object.defineProperties(bae.prototype,{position:$2i("position"),orientation:Bi("orientation"),show:Bi("show")});bae.prototype.merge=function(o){this.position=o.position,this.orientation=o.orientation,this.show=o.show};bae.prototype.gazeAt=function(o){o instanceof UA&&(this._conicArcSensor.gaze=o)};var Mie=bae,B7e=Math.cos,w7e=Math.sin;function Pie(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.angle,f=o.radius,m=Math.round(Ae(o.stackPartitions,12)),C=Math.round(Ae(o.slicePartitions,64)),y=Ae(o.vertexFormat,Wr.DEFAULT);this._angle=A,this._radius=f,this._stackPartitions=m,this._slicePartitions=C,this._vertexFormat=y}Pie.fromDimensions=function(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.angle,f=o.radius,m=o.height,C=o.stackPartitions,y=o.slicePartitions;return new Pie({angle:A,radius:f,stackPartitions:C,slicePartitions:y,vertexFormat:o.vertexFormat})};Pie.createGeometry=function(o){console.time("createGeometry");let A=o._angle,f=o._radius,m=o._stackPartitions+1,C=o._slicePartitions+1,y=o._vertexFormat,x=new yc,v,E=3*(C-1)+6*(C-1)*(m-2)+(C-1)*1*3,I=m*C,w=Nn.createTypedArray(I,E),Q=new Float64Array(I*3+(C-1)*3*3);if(y.position){let F=0,L=new Array(C),R=new Array(C);for(let k=0;k<C;k++){let U=je.TWO_PI*k/(C-1);L[k]=B7e(U),R[k]=w7e(U),Q[F++]=0,Q[F++]=0,Q[F++]=-f}for(i=1;i<m;i++){let k=A*i/(m-1),U=w7e(k),V=f*U,H=f*U,q=f*B7e(k);for(let ie=0;ie<C;ie++)Q[F++]=L[ie]*V,Q[F++]=R[ie]*H,Q[F++]=-q}v=F;for(let k=0;k<C-1;k++)Q[F++]=0,Q[F++]=0,Q[F++]=0,Q[F++]=Q[v-(C-k-1)*3],Q[F++]=Q[v-(C-k-1)*3+1],Q[F++]=Q[v-(C-k-1)*3+2],Q[F++]=Q[v-(C-k)*3],Q[F++]=Q[v-(C-k)*3+1],Q[F++]=Q[v-(C-k)*3+2];x.position=new Yr({componentDatatype:ei.DOUBLE,componentsPerAttribute:3,values:Q})}let M=0;for(let F=0;F<C-1;F++)w[M++]=C+F,w[M++]=C+F+1,w[M++]=F+1;let B,T;for(let F=1;F<m-1;F++){B=F*C,T=(F+1)*C;for(let L=0;L<C-1;L++)w[M++]=T+L,w[M++]=T+L+1,w[M++]=B+L+1,w[M++]=T+L,w[M++]=B+L+1,w[M++]=B+L}for(let F=0,L=(C-1)*3;F<L;F++)w[M++]=F+v/3;let D=new Zo({attributes:x,indices:w,primitiveType:yn.TRIANGLES,boundingSphere:new wi(ee.ZERO,f)});return D=rc.computeNormal(D),console.timeEnd("createGeometry"),D};var Rie=Pie,H$=Math.cos,V$=Math.sin;function Blt(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.angle,f=o.radius,m=Math.round(Ae(o.stackPartitions,10)),C=Math.round(Ae(o.slicePartitions,8)),y=Math.round(Ae(o.subdivisions,128));this._angle=A,this._radius=f,this._stackPartitions=m,this._slicePartitions=C,this._subdivisions=y}Blt.createGeometry=function(o){let A=o._angle,f=o._radius;if(f<=0||A<=0)return;let m=o._stackPartitions,C=o._slicePartitions,y=o._subdivisions,x=y*(m+C-1),v=x-C+2,E=new Float64Array(v*3),I=Nn.createTypedArray(v,x*2),w,Q,M,B,T,D,F=0,L=new Array(y),R=new Array(y);for(w=0;w<y;w++)M=je.TWO_PI*w/y,L[w]=H$(M),R[w]=V$(M);for(w=1;w<m;w++)for(B=A*w/(m-1),T=H$(B),D=V$(B),Q=0;Q<y;Q++)E[F++]=f*L[Q]*D,E[F++]=f*R[Q]*D,E[F++]=-f*T;for(L.length=C,R.length=C,w=0;w<C;w++)M=je.TWO_PI*w/C,L[w]=H$(M),R[w]=V$(M);for(E[F++]=0,E[F++]=0,E[F++]=-f,w=1;w<y;w++)for(B=A*w/y,T=H$(B),D=V$(B),Q=0;Q<C;Q++)E[F++]=f*L[Q]*D,E[F++]=f*R[Q]*D,E[F++]=-f*T;for(F=0,w=0;w<m-1;++w){let V=w*y;for(Q=0;Q<y-1;++Q)I[F++]=V+Q,I[F++]=V+Q+1;I[F++]=V+y-1,I[F++]=V}let k=y*(m-1);for(Q=1;Q<C+1;++Q)I[F++]=k,I[F++]=k+Q;for(w=0;w<y-2;++w){let V=w*C+1+k,H=(w+1)*C+1+k;for(Q=0;Q<C-1;++Q)I[F++]=H+Q,I[F++]=V+Q;I[F++]=H+C-1,I[F++]=V+C-1}let U=new yc({position:new Yr({componentDatatype:ei.DOUBLE,componentsPerAttribute:3,values:E})});return new Zo({attributes:U,indices:I,primitiveType:yn.LINES,boundingSphere:new wi(ee.ZERO,f)})};var Lie=Blt;function mW(o){let A=this;if(!O(o))throw new Ui("viewer is required.");this._earthCtrl=o;let f=o.coreMap.scene;this._scene=f;let m=o.coreMap.clock;this._clock=m,this._primitives=f.primitives,this._primitive=void 0,this._outlinePrimitive=void 0,this._conicArcSensorCollection=[],m.onTick.addEventListener(function(){A.update()})}var Cpe=new ci,ype=new Xe,eTi=new ee,tTi=new ee,b7e=new ee,Q7e=new jr;mW.prototype.add=function(o){return o instanceof Mie||(o=new Mie(o)),this._conicArcSensorCollection.push(o),o};mW.prototype.remove=function(o){let A=this._conicArcSensorCollection.indexOf(o);A!==-1&&this._conicArcSensorCollection.splice(A,1)};mW.prototype.removeAll=function(){this._conicArcSensorCollection.length=0};mW.prototype.update=function(){let o=this._clock.currentTime,A=this._conicArcSensorCollection,f=this._primitives,m=this._primitive,C=this._outlinePrimitive,y=[],x=[];O(m)&&f.removeAndDestroy(m),O(C)&&f.removeAndDestroy(C);for(let v=0,E=A.length;v<E;v++){let I=A[v],w=I._conicArcSensor;if(!Nt.getValueOrDefault(w.show,o,!0))continue;let Q=w.angle,M=w.radius,B=w.stack,T=w.slice;if(!O(Q)||!Nt.getValueOrDefault(I.show,o,!0))continue;let D=Nt.getValueOrUndefined(I.position,o,eTi);if(!O(D))continue;let F,L=w.gaze;if(O(L)){let ie=Nt.getValueOrUndefined(L.position,o,tTi);if(!O(D)||!O(ie))continue;let Z=ee.subtract(D,ie,b7e),oe=ee.angleBetween(ee.UNIT_Z,Z),ne=ee.cross(ee.UNIT_Z,Z,b7e),se=jr.fromAxisAngle(ne,oe,Q7e),ce=ee.distance(D,ie);M=1,F=Xe.fromRotationTranslation(ci.multiplyByScalar(ci.fromQuaternion(se,Cpe),ce,Cpe),D,ype)}else{let ie=Nt.getValueOrUndefined(I.orientation,o,Q7e);O(ie)?F=Xe.fromRotationTranslation(ci.fromQuaternion(ie,Cpe),D,ype):F=Vn.eastNorthUpToFixedFrame(D,void 0,ype)}if(!O(F))continue;let R=I._geometry;if(!O(R)){let ie;ie=new Rie({vertexFormat:Wr.POSITION_AND_NORMAL,angle:Q,radius:M,stackPartitions:B,slicePartitions:T}),I._geometry=Rie.createGeometry(ie),R=I._geometry}let k=w.color,U=w.outline,V=w.outlineWidth;O(V)||(V=1);let H=w.outlineColor;O(H)||(H=At.WHITE);let q=new co({geometry:R,modelMatrix:F,attributes:{color:Yo.fromColor(k)}});if(y.push(q),U){let ie=I._outlineGeometry;if(!O(ie)){let oe;oe=new Lie({vertexFormat:Wr.POSITION_ONLY,angle:Q,radius:M}),I._outlineGeometry=Lie.createGeometry(oe),ie=I._outlineGeometry}let Z=new co({geometry:ie,modelMatrix:F,attributes:{color:Yo.fromColor(H)}});x.push(Z)}}y.length>0&&(this._primitive=this._primitives.add(new $a({asynchronous:!1,geometryInstances:y,appearance:new za({flat:!1,translucent:!0,closed:!0})}))),x.length>0&&(this._outlinePrimitive=this._primitives.add(new $a({asynchronous:!1,geometryInstances:x,appearance:new za({flat:!0,translucent:!0,renderState:{lineWidth:this._scene.clampLineWidth(outlineWidth)}})})))};var wlt=mW;function eY(o){this._show=void 0,this._radius=void 0,this._xHalfAngle=void 0,this._yHalfAngle=void 0,this._lineColor=void 0,this._showSectorLines=void 0,this._showSectorSegmentLines=void 0,this._showLateralSurfaces=void 0,this._material=void 0,this._showDomeSurfaces=void 0,this._showDomeLines=void 0,this._showIntersection=void 0,this._intersectionColor=void 0,this._intersectionWidth=void 0,this._showThroughEllipsoid=void 0,this._gaze=void 0,this._showScanPlane=void 0,this._scanPlaneColor=void 0,this._scanPlaneMode=void 0,this._scanPlaneRate=void 0,this._definitionChanged=new br,this.merge(Ae(o,Ae.EMPTY_OBJECT))}Object.defineProperties(eY.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:Bi("show"),radius:Bi("radius"),xHalfAngle:Bi("xHalfAngle"),yHalfAngle:Bi("yHalfAngle"),lineColor:Bi("lineColor"),showSectorLines:Bi("showSectorLines"),showSectorSegmentLines:Bi("showSectorSegmentLines"),showLateralSurfaces:Bi("showLateralSurfaces"),material:hy("material"),showDomeSurfaces:Bi("showDomeSurfaces"),showDomeLines:Bi("showDomeLines "),showIntersection:Bi("showIntersection"),intersectionColor:Bi("intersectionColor"),intersectionWidth:Bi("intersectionWidth"),showThroughEllipsoid:Bi("showThroughEllipsoid"),gaze:Bi("gaze"),showScanPlane:Bi("showScanPlane"),scanPlaneColor:Bi("scanPlaneColor"),scanPlaneMode:Bi("scanPlaneMode"),scanPlaneRate:Bi("scanPlaneRate")});eY.prototype.clone=function(o){return O(o)||(o=new eY),o.show=this.show,o.radius=this.radius,o.xHalfAngle=this.xHalfAngle,o.yHalfAngle=this.yHalfAngle,o.lineColor=this.lineColor,o.showSectorLines=this.showSectorLines,o.showSectorSegmentLines=this.showSectorSegmentLines,o.showLateralSurfaces=this.showLateralSurfaces,o.material=this.material,o.showDomeSurfaces=this.showDomeSurfaces,o.showDomeLines=this.showDomeLines,o.showIntersection=this.showIntersection,o.intersectionColor=this.intersectionColor,o.intersectionWidth=this.intersectionWidth,o.showThroughEllipsoid=this.showThroughEllipsoid,o.gaze=this.gaze,o.showScanPlane=this.showScanPlane,o.scanPlaneColor=this.scanPlaneColor,o.scanPlaneMode=this.scanPlaneMode,o.scanPlaneRate=this.scanPlaneRate,o};eY.prototype.merge=function(o){if(!O(o))throw new Ui("source is required.");this.show=Ae(this.show,o.show),this.radius=Ae(this.radius,o.radius),this.xHalfAngle=Ae(this.xHalfAngle,o.xHalfAngle),this.yHalfAngle=Ae(this.yHalfAngle,o.yHalfAngle),this.lineColor=Ae(this.lineColor,o.lineColor),this.showSectorLines=Ae(this.showSectorLines,o.showSectorLines),this.showSectorSegmentLines=Ae(this.showSectorSegmentLines,o.showSectorSegmentLines),this.showLateralSurfaces=Ae(this.showLateralSurfaces,o.showLateralSurfaces),this.material=Ae(this.material,o.material),this.showDomeSurfaces=Ae(this.showDomeSurfaces,o.showDomeSurfaces),this.showDomeLines=Ae(this.showDomeLines,o.showDomeLines),this.showIntersection=Ae(this.showIntersection,o.showIntersection),this.intersectionColor=Ae(this.intersectionColor,o.intersectionColor),this.intersectionWidth=Ae(this.intersectionWidth,o.intersectionWidth),this.showThroughEllipsoid=Ae(this.showThroughEllipsoid,o.showThroughEllipsoid),this.gaze=Ae(this.gaze,o.gaze),this.showScanPlane=Ae(this.showScanPlane,o.showScanPlane),this.scanPlaneColor=Ae(this.scanPlaneColor,o.scanPlaneColor),this.scanPlaneMode=Ae(this.scanPlaneMode,o.scanPlaneMode),this.scanPlaneRate=Ae(this.scanPlaneRate,o.scanPlaneRate)};var blt=eY;function iTi(o,A,f){let m;try{return m=o(A,f),m}catch(C){return Promise.reject(C)}}function rTi(o){let A;return function(f){let m=f.data,C=[],y={id:m.id,result:void 0,error:void 0};return Promise.resolve(iTi(o,m.parameters,C)).then(function(x){y.result=x}).catch(function(x){x instanceof Error?y.error={name:x.name,message:x.message,stack:x.stack}:y.error=x}).finally(function(){O(A)||(A=Ae(self.webkitPostMessage,self.postMessage)),m.canTransferArrayBuffer||(C.length=0);try{A(y,C)}catch(x){y.result=void 0,y.error=`postMessage failed with error: ${D5(x)}
  with responseMessage: ${JSON.stringify(y)}`,A(y)}})}}var Qlt=rTi,Slt="1.99";var _r={};sde(_r,{AlphaMode:()=>b8,AlphaPipelineStage:()=>E1e,Animation:()=>Ibe,AnimationViewModel:()=>_be,Appearance:()=>Sd,ApproximateTerrainHeights:()=>eh,ArcGISTiledElevationTerrainProvider:()=>Bat,ArcGisMapServerImageryProvider:()=>qb,ArcType:()=>Pa,ArticulationStageType:()=>b_,AssociativeArray:()=>Vo,AttributeCompression:()=>Mu,AttributeType:()=>Is,AutoExposure:()=>$Qe,AutomaticUniforms:()=>BG,Axis:()=>vp,AxisAlignedBoundingBox:()=>xY,B3dmLoader:()=>TBe,B3dmParser:()=>SBe,Base64Encoder:()=>Nee,BaseLayerPicker:()=>wbe,BaseLayerPickerViewModel:()=>Bbe,BatchTable:()=>hre,BatchTableHierarchy:()=>Qne,BatchTexture:()=>Q1,BatchTexturePipelineStage:()=>I1e,Billboard:()=>Zh,BillboardCollection:()=>iI,BillboardGraphics:()=>eP,BillboardVisualizer:()=>c_e,BingMapsApi:()=>wat,BingMapsGeocoderService:()=>Qat,BingMapsImageryProvider:()=>Tbe,BingMapsStyle:()=>Dbe,BlendEquation:()=>sx,BlendFunction:()=>LA,BlendOption:()=>tf,BlendTexture:()=>X8,BlendingState:()=>Bu,BoundingRectangle:()=>Kr,BoundingSphere:()=>wi,BoundingSphereState:()=>ro,BoxEmitter:()=>hst,BoxGeometry:()=>LM,BoxGeometryUpdater:()=>A_e,BoxGraphics:()=>gre,BoxOutlineGeometry:()=>r2,BrdfLutGenerator:()=>lQe,Buffer:()=>vo,BufferLoader:()=>ZY,BufferUsage:()=>ln,CPUStylingPipelineStage:()=>b1e,CallbackProperty:()=>Bn,Camera:()=>Ml,CameraEventAggregator:()=>cSe,CameraEventType:()=>Bc,CameraFlightPath:()=>UIe,Cartesian2:()=>It,Cartesian3:()=>ee,Cartesian4:()=>ai,Cartographic:()=>Kt,CartographicGeocoderService:()=>kSe,CatmullRomSpline:()=>Sat,Cesium3DContentGroup:()=>kne,Cesium3DTile:()=>Ov,Cesium3DTileBatchTable:()=>pJ,Cesium3DTileColorBlendMode:()=>bD,Cesium3DTileContent:()=>dst,Cesium3DTileContentFactory:()=>Vne,Cesium3DTileContentState:()=>NA,Cesium3DTileContentType:()=>Bv,Cesium3DTileFeature:()=>Ts,Cesium3DTileFeatureTable:()=>P6,Cesium3DTileOptimizationHint:()=>XL,Cesium3DTileOptimizations:()=>ibe,Cesium3DTilePass:()=>Ep,Cesium3DTilePassState:()=>wP,Cesium3DTilePointFeature:()=>Rk,Cesium3DTileRefine:()=>Ay,Cesium3DTileStyle:()=>mY,Cesium3DTileStyleEngine:()=>obe,Cesium3DTilesInspector:()=>N2e,Cesium3DTilesInspectorViewModel:()=>F2e,Cesium3DTileset:()=>Fx,Cesium3DTilesetCache:()=>rbe,Cesium3DTilesetGraphics:()=>xre,Cesium3DTilesetHeatmap:()=>nbe,Cesium3DTilesetMetadata:()=>tbe,Cesium3DTilesetMostDetailedTraversal:()=>zne,Cesium3DTilesetStatistics:()=>Wk,Cesium3DTilesetTraversal:()=>dN,Cesium3DTilesetVisualizer:()=>lbe,CesiumInspector:()=>O2e,CesiumInspectorViewModel:()=>k2e,CesiumNavigation:()=>m2e,CesiumRenderPass:()=>o2e,CesiumTerrainProvider:()=>RJ,CesiumWidget:()=>jJ,Check:()=>of,CheckerboardMaterialProperty:()=>lie,CircleEmitter:()=>VDe,CircleGeometry:()=>Dat,CircleOutlineGeometry:()=>Tat,CircleWaveMaterialProperty:()=>Z8,ClassificationModelDrawCommand:()=>qBe,ClassificationPipelineStage:()=>_1e,ClassificationPrimitive:()=>s6,ClassificationType:()=>Gu,ClearCommand:()=>eA,ClippingPlane:()=>kM,ClippingPlaneCollection:()=>rB,Clock:()=>z5,ClockRange:()=>aC,ClockStep:()=>jh,ClockViewModel:()=>LSe,CloudCollection:()=>xst,CloudType:()=>xie,CollectionSource:()=>hJe,Color:()=>At,ColorBlendMode:()=>HD,ColorGeometryInstanceAttribute:()=>Yo,ColorMaterialProperty:()=>Fa,Command:()=>Iat,ComponentDatatype:()=>ei,Composite3DTileContent:()=>Bwe,CompositeEntityCollection:()=>Xot,CompositeMaterialProperty:()=>cie,CompositePositionProperty:()=>U_,CompositeProperty:()=>P1,CompressedTextureBuffer:()=>oY,ComputeCommand:()=>B5,ComputeEngine:()=>$be,ConditionsExpression:()=>bEe,ConeEmitter:()=>mH,ConicArcSensor:()=>Mie,ConicArcSensorCollection:()=>wlt,ConicArcSensorGeometry:()=>Rie,ConicArcSensorGraphics:()=>Tie,ConicArcSensorOutlineGeometry:()=>Lie,ConstantPositionProperty:()=>_D,ConstantProperty:()=>bc,ConstantSpline:()=>NBe,ConstructionWorker:()=>fJe,ContentMetadata:()=>Ywe,ContentState:()=>yD,Context:()=>aQe,ContextLimits:()=>yo,CoplanarPolygonGeometry:()=>b_e,CoplanarPolygonGeometryLibrary:()=>UG,CoplanarPolygonOutlineGeometry:()=>tM,CornerType:()=>ZA,CorridorGeometry:()=>GY,CorridorGeometryLibrary:()=>Gc,CorridorGeometryUpdater:()=>f_e,CorridorGraphics:()=>pre,CorridorOutlineGeometry:()=>d_e,Credit:()=>tl,CreditDisplay:()=>uQe,CubeMap:()=>lQ,CubeMapFace:()=>DL,CubicRealPolynomial:()=>yY,CullFace:()=>CA,CullingVolume:()=>AC,CumulusCloud:()=>TQ,CustomDataSource:()=>Ire,CustomHeightmapTerrainProvider:()=>Mat,CustomMercatorProjection:()=>t6,CustomShader:()=>ZM,CustomShaderManagerEx:()=>sre,CustomShaderMode:()=>gY,CustomShaderPipelineStage:()=>R1e,CustomShaderTranslucencyMode:()=>BF,CustomTilingScheme:()=>jJe,CylinderGeometry:()=>g_e,CylinderGeometryLibrary:()=>ine,CylinderGeometryUpdater:()=>m_e,CylinderGraphics:()=>mre,CylinderOutlineGeometry:()=>p_e,CzmlDataSource:()=>iW,DDSTexture:()=>C2e,DataSource:()=>cy,DataSourceClock:()=>A5,DataSourceCollection:()=>l_e,DataSourceDisplay:()=>_J,DebugAppearance:()=>Bst,DebugCameraPrimitive:()=>_g,DebugInspector:()=>xSe,DebugModelMatrixPrimitive:()=>JDe,DefaultProxy:()=>ZIe,DepthFunction:()=>nI,DepthPlane:()=>hQe,DequantizationPipelineStage:()=>L1e,DerivedCommand:()=>fx,DeveloperError:()=>Ui,DeviceOrientationCameraController:()=>dQe,DirectionalLight:()=>mae,DiscardEmptyTileImagePolicy:()=>soe,DiscardMissingTileImagePolicy:()=>Qbe,DistanceDisplayCondition:()=>$o,DistanceDisplayConditionGeometryInstanceAttribute:()=>vA,DistanceLegendViewModel:()=>l2e,DoubleEndedPriorityQueue:()=>Lat,DoublyLinkedList:()=>qne,DracoLoader:()=>$Y,DrawCommand:()=>On,DynamicGeometryBatch:()=>rne,DynamicGeometryUpdater:()=>EA,ECharts:()=>XJe,EarthOrientationParameters:()=>Dye,EarthOrientationParametersSample:()=>sY,EasingFunction:()=>Ix,EllipseGeometry:()=>W1,EllipseGeometryLibrary:()=>iB,EllipseGeometryUpdater:()=>C_e,EllipseGraphics:()=>Cre,EllipseOutlineGeometry:()=>UD,Ellipsoid:()=>Di,EllipsoidGeodesic:()=>l0,EllipsoidGeometry:()=>gC,EllipsoidGeometryUpdater:()=>E_e,EllipsoidGraphics:()=>u6,EllipsoidOutlineGeometry:()=>J1,EllipsoidPrimitive:()=>Zbe,EllipsoidRhumbLine:()=>k1,EllipsoidSurfaceAppearance:()=>MY,EllipsoidTangentPlane:()=>eQ,EllipsoidTerrainProvider:()=>IP,EllipsoidalOccluder:()=>L5,Empty3DTileContent:()=>LK,EncodedCartesian3:()=>Pu,Entity:()=>UA,EntityCluster:()=>eN,EntityCollection:()=>iw,EntityView:()=>$ne,Event:()=>br,EventHelper:()=>Mx,ExpandBySmartEarth:()=>UE,ExpandByTerra:()=>ZJe,Expression:()=>wF,ExpressionNodeType:()=>jn,ExternalParameter:()=>px,ExtrapolationType:()=>mD,FeatureDataProvider:()=>Nre,FeatureDetection:()=>Mo,FeatureIdPipelineStage:()=>dJ,FeatureJsonData:()=>m6,FisheyeProjectionMap:()=>NY,FisheyeProjectionMapShader:()=>C7,FlattenVS:()=>i1e,FlowEcharts:()=>dae,Fog:()=>fQe,ForEach:()=>Vr,FrameRateMonitor:()=>WDe,FrameState:()=>gQe,Framebuffer:()=>Bp,FramebufferManager:()=>qh,FrustumCommands:()=>xQe,FrustumGeometry:()=>C6,FrustumOutlineGeometry:()=>FY,Fullscreen:()=>yp,FullscreenButton:()=>NSe,FullscreenButtonViewModel:()=>FSe,GWBaiduImageryProvider:()=>Kre,GeoJsonDataSource:()=>mK,GeoJsonLoader:()=>RBe,GeocodeType:()=>XJ,Geocoder:()=>VSe,GeocoderService:()=>Nat,GeocoderViewModel:()=>HSe,GeographicProjection:()=>Dg,GeographicTilingScheme:()=>af,Geometry:()=>Zo,Geometry3DTileContent:()=>wwe,GeometryAttribute:()=>Yr,GeometryAttributes:()=>yc,GeometryFactory:()=>Oat,GeometryInstance:()=>co,GeometryInstanceAttribute:()=>k_,GeometryOffsetAttribute:()=>Cl,GeometryPipeline:()=>rc,GeometryPipelineStage:()=>k1e,GeometryType:()=>GL,GeometryUpdater:()=>nh,GeometryVisualizer:()=>V_e,GetFeatureInfoFormat:()=>T7,GifImageProperty:()=>hXe,Globe:()=>voe,GlobeDepth:()=>vQe,GlobeSurfaceShaderSet:()=>Hbe,GlobeSurfaceTile:()=>zM,GlobeSurfaceTileProvider:()=>Kbe,GlobeTranslucency:()=>LJ,GlobeTranslucencyFramebuffer:()=>EQe,GlobeTranslucencyState:()=>mQe,GltfBufferViewLoader:()=>hne,GltfDracoLoader:()=>dne,GltfImageLoader:()=>gne,GltfIndexBufferLoader:()=>pne,GltfJsonLoader:()=>yne,GltfLoader:()=>aJ,GltfLoaderUtil:()=>OM,GltfStructuralMetadataLoader:()=>xBe,GltfTextureLoader:()=>xne,GltfVertexBufferLoader:()=>vne,GoogleEarthEnterpriseImageryProvider:()=>wst,GoogleEarthEnterpriseMapsProvider:()=>Pbe,GoogleEarthEnterpriseMetadata:()=>vN,GoogleEarthEnterpriseTerrainData:()=>yie,GoogleEarthEnterpriseTerrainProvider:()=>Kat,GoogleEarthEnterpriseTileInformation:()=>NDe,GpxDataSource:()=>BDe,Graticules:()=>fXe,GraticulesImageryProvider:()=>m5,GregorianDate:()=>$8,GridImageryProvider:()=>bst,GridMaterialProperty:()=>Aie,GroundGeometryUpdater:()=>Xl,GroundPolylineGeometry:()=>ure,GroundPolylinePrimitive:()=>a6,GroundPrimitive:()=>nN,GroupMetadata:()=>kte,GwBufferAnalysis:()=>Yre,HeadingPitchRange:()=>Ex,HeadingPitchRoll:()=>dC,Heap:()=>YCe,HeightReference:()=>xn,HeightmapEncoding:()=>HF,HeightmapTerrainData:()=>wQ,HeightmapTessellator:()=>noe,HermitePolynomialApproximation:()=>ADe,HermiteSpline:()=>DK,HilbertOrder:()=>Pte,HomeButton:()=>KSe,HomeButtonViewModel:()=>zSe,HorizontalOrigin:()=>tA,HugeAdapter:()=>O6,I3SDataProvider:()=>Qst,I3SFeature:()=>XDe,I3SField:()=>ZDe,I3SGeometry:()=>vie,I3SLayer:()=>Iie,I3SNode:()=>Eie,I3dmLoader:()=>FBe,I3dmParser:()=>LBe,Iau2000Orientation:()=>jbe,Iau2006XysData:()=>Mye,Iau2006XysSample:()=>qie,IauOrientationAxes:()=>qbe,IauOrientationParameters:()=>Wbe,ImageBasedLighting:()=>bne,ImageBasedLightingPipelineStage:()=>a1e,ImageCombine:()=>nre,ImageMaterialProperty:()=>z0,Imagery:()=>eoe,ImageryLayer:()=>dD,ImageryLayerCollection:()=>Ybe,ImageryLayerFeatureInfo:()=>gN,ImageryProvider:()=>a2,ImageryState:()=>sc,Implicit3DTileContent:()=>Nte,ImplicitAvailabilityBitstream:()=>Lte,ImplicitMetadataView:()=>Une,ImplicitSubdivisionScheme:()=>uC,ImplicitSubtree:()=>Twe,ImplicitSubtreeMetadata:()=>Dwe,ImplicitTileCoordinates:()=>sbe,ImplicitTileset:()=>abe,IndexDatatype:()=>Nn,InfoBox:()=>WSe,InfoBoxViewModel:()=>JSe,InspectorShared:()=>K8,InstanceAttributeSemantic:()=>nC,InstancingPipelineStage:()=>m1e,InterpolationAlgorithm:()=>Yat,InterpolationType:()=>nF,Intersect:()=>La,IntersectionTests:()=>kA,Intersections2D:()=>$6,Interval:()=>fD,InvertClassification:()=>boe,Ion:()=>yF,IonGeocoderService:()=>GSe,IonImageryProvider:()=>WG,IonResource:()=>jk,IonWorldImageryStyle:()=>jG,Iso8601:()=>Cn,JobScheduler:()=>CQe,JobType:()=>KE,JsonMetadataTable:()=>JY,JulianDate:()=>fi,KTX2Transcoder:()=>jCe,KeyboardEventModifier:()=>eI,KmlCamera:()=>sIe,KmlDataSource:()=>Fre,KmlLookAt:()=>lIe,KmlTour:()=>uIe,KmlTourFlyTo:()=>cIe,KmlTourWait:()=>hIe,Label:()=>K7,LabelCollection:()=>qM,LabelGraphics:()=>c6,LabelStyle:()=>mA,LabelVisualizer:()=>z_e,LagrangePolynomialApproximation:()=>dDe,LeapSecond:()=>$c,Light:()=>Dst,LightingModel:()=>rI,LightingPipelineStage:()=>U1e,LinearApproximation:()=>Tre,LinearSampler:()=>s2,LinearSpline:()=>hJ,MVTImageryProvider:()=>EXe,ManagedArray:()=>GM,MapMode2D:()=>rQ,MapProjection:()=>qat,MapWidget:()=>Clt,MapboxApi:()=>jat,MapboxImageryProvider:()=>SJ,MapboxStyleImageryProvider:()=>Mst,Material:()=>ss,MaterialAppearance:()=>Ig,MaterialPass:()=>x2e,MaterialPipelineStage:()=>H1e,MaterialProperty:()=>sC,Math:()=>je,Matrix2:()=>n0,Matrix3:()=>ci,Matrix4:()=>Xe,MetadataClass:()=>S6,MetadataClassProperty:()=>qY,MetadataComponentType:()=>$s,MetadataEntity:()=>su,MetadataEnum:()=>mBe,MetadataEnumValue:()=>pBe,MetadataPipelineStage:()=>IM,MetadataSchema:()=>rO,MetadataSchemaLoader:()=>Ene,MetadataSemantic:()=>Mwe,MetadataTable:()=>tO,MetadataTableProperty:()=>X_e,MetadataType:()=>Zs,MipmapHint:()=>q8,Model:()=>cI,Model3DTileContent:()=>FL,ModelAlphaOptions:()=>awe,ModelAnimation:()=>VBe,ModelAnimationChannel:()=>GBe,ModelAnimationCollection:()=>zBe,ModelAnimationLoop:()=>Ub,ModelAnimationState:()=>OL,ModelArticulation:()=>u1e,ModelArticulationStage:()=>l1e,ModelClippingPlanesPipelineStage:()=>h1e,ModelColorPipelineStage:()=>TK,ModelComponents:()=>ta,ModelDrawCommand:()=>XBe,ModelFeature:()=>KBe,ModelFeatureTable:()=>YBe,ModelGraphics:()=>EY,ModelLightingOptions:()=>ywe,ModelMatrixUpdateStage:()=>y1e,ModelNode:()=>d1e,ModelRenderResources:()=>hwe,ModelRuntimeNode:()=>v1e,ModelRuntimePrimitive:()=>rwe,ModelSceneGraph:()=>vwe,ModelSilhouettePipelineStage:()=>gwe,ModelSkin:()=>owe,ModelSplitterPipelineStage:()=>mwe,ModelStatistics:()=>Ewe,ModelType:()=>K0,ModelUtility:()=>au,ModelVisualizer:()=>_we,Moon:()=>Ioe,MorphTargetsPipelineStage:()=>z1e,MorphWeightSpline:()=>Xat,MortonOrder:()=>D8,MultiResourceImageryProvider:()=>Jre,MultiResourceTerrainProvider:()=>Wre,Multiple3DTileContent:()=>Xwe,MultisampleFramebuffer:()=>bBe,NavigationControl:()=>_H,NavigationHelpButton:()=>qSe,NavigationHelpButtonViewModel:()=>jSe,NavigationUtils:()=>BH,NavigationViewModel:()=>N7,NearFarScalar:()=>To,NeverTileDiscardPolicy:()=>Pst,NodeRenderResources:()=>Cwe,NodeStatisticsPipelineStage:()=>x1e,NodeTransformationProperty:()=>yre,OIT:()=>wQe,Occluder:()=>zre,OctahedralProjectedCubeMap:()=>b5,OffsetGeometryInstanceAttribute:()=>a0,OlMVTImageryProvider:()=>qre,OpenCageGeocoderService:()=>Zat,OpenStreetMapImageryProvider:()=>M7,OrderedGroundPrimitiveCollection:()=>u_e,OrientedBoundingBox:()=>Hf,OrthographicFrustum:()=>Ds,OrthographicOffCenterFrustum:()=>Y0,Packable:()=>$at,PackableForInterpolation:()=>est,Particle:()=>Cae,ParticleBurst:()=>xH,ParticleEmitter:()=>Fst,ParticleSystem:()=>_2,Pass:()=>hr,PassState:()=>cm,PathGraphics:()=>IY,PathVisualizer:()=>ube,PeliasGeocoderService:()=>USe,PerInstanceColorAppearance:()=>za,PerformanceDisplay:()=>GJ,PerformanceWatchdog:()=>V2e,PerformanceWatchdogViewModel:()=>H2e,PerspectiveFrustum:()=>Yu,PerspectiveOffCenterFrustum:()=>n2,PerspectiveProjectionMap:()=>kY,PerspectiveProjectionMapShader:()=>y7,PerspectiveProjectionMapWithDepth:()=>OY,PerspectiveProjectionMapWithDepthShader:()=>rF,PickDepth:()=>yQe,PickDepthFramebuffer:()=>bQe,PickFramebuffer:()=>QQe,PickGlobeSlope:()=>Pot,Picking:()=>RQe,PickingPipelineStage:()=>K1e,PinBuilder:()=>bY,PixelDatatype:()=>wn,PixelFormat:()=>Gn,Plane:()=>Wa,PlaneGeometry:()=>I_e,PlaneGeometryUpdater:()=>w_e,PlaneGraphics:()=>jEe,PlaneOutlineGeometry:()=>__e,PntsLoader:()=>Iwe,PntsParser:()=>Nne,PointCloud:()=>ybe,PointCloudEyeDomeLighting:()=>lJ,PointCloudShading:()=>M6,PointCloudStylingPipelineStage:()=>J1e,PointGraphics:()=>vre,PointPrimitive:()=>Tx,PointPrimitiveCollection:()=>uY,PointVisualizer:()=>cbe,PolygonDepth:()=>Q8,PolygonDepthFS:()=>Mne,PolygonDepthVS:()=>Pne,PolygonGeometry:()=>rh,PolygonGeometryLibrary:()=>ql,PolygonGeometryUpdater:()=>S_e,PolygonGraphics:()=>yl,PolygonHierarchy:()=>Un,PolygonOutlineGeometry:()=>Q_e,PolygonPipeline:()=>xA,Polyline:()=>t2,PolylineArrowMaterialProperty:()=>IK,PolylineCollection:()=>Y5,PolylineColorAppearance:()=>ly,PolylineDashMaterialProperty:()=>Vl,PolylineGeometry:()=>Vk,PolylineGeometryUpdater:()=>Abe,PolylineGlowMaterialProperty:()=>hie,PolylineGraphics:()=>FD,PolylineMaterialAppearance:()=>L_,PolylineOutlineMaterialProperty:()=>JM,PolylinePipeline:()=>XA,PolylineTrailLinkMaterialProperty:()=>Rot,PolylineVisualizer:()=>dbe,PolylineVolumeGeometry:()=>D_e,PolylineVolumeGeometryLibrary:()=>C5,PolylineVolumeGeometryUpdater:()=>M_e,PolylineVolumeGraphics:()=>Ere,PolylineVolumeOutlineGeometry:()=>T_e,PositionProperty:()=>vY,PositionPropertyArray:()=>f8,PostProcessStage:()=>va,PostProcessStageCollection:()=>aSe,PostProcessStageComposite:()=>CC,PostProcessStageLibrary:()=>bv,PostProcessStageSampleMode:()=>Dv,PostProcessStageTextureCache:()=>Roe,Primitive:()=>$a,PrimitiveCollection:()=>MD,PrimitiveLoadPlan:()=>oJ,PrimitiveOutlineGenerator:()=>Bne,PrimitiveOutlinePipelineStage:()=>q1e,PrimitivePipeline:()=>s5,PrimitiveRenderResources:()=>xwe,PrimitiveState:()=>i0,PrimitiveStatisticsPipelineStage:()=>X1e,PrimitiveType:()=>yn,ProjectionPicker:()=>ZSe,ProjectionPickerViewModel:()=>XSe,Property:()=>Nt,PropertyArray:()=>lae,PropertyAttribute:()=>Ane,PropertyAttributeProperty:()=>W_e,PropertyBag:()=>LD,PropertyTable:()=>cN,PropertyTexture:()=>cne,PropertyTextureProperty:()=>Y_e,ProviderViewModel:()=>fp,Proxy:()=>rst,QuadraticRealPolynomial:()=>Vb,QuadtreeOccluders:()=>moe,QuadtreePrimitive:()=>BP,QuadtreePrimitivezh:()=>Not,QuadtreeTile:()=>Coe,QuadtreeTileLoadState:()=>mC,QuadtreeTileProvider:()=>Nst,QuantizedMeshTerrainData:()=>doe,QuarticRealPolynomial:()=>MEe,Quaternion:()=>jr,QuaternionSpline:()=>OBe,Queue:()=>d5,RasterizeHtml:()=>lH,Ray:()=>ls,Rectangle:()=>Si,RectangleCollisionChecker:()=>sne,RectangleGeometry:()=>VY,RectangleGeometryLibrary:()=>uy,RectangleGeometryUpdater:()=>k_e,RectangleGraphics:()=>A6,RectangleOutlineGeometry:()=>one,RectangularSensor:()=>XK,RectangularSensorFS:()=>Qie,RectangularSensorGraphics:()=>blt,RectangularSensorPrimitive:()=>R2e,RectangularSensorScanPlaneFS:()=>P2e,RectangularSensorVS:()=>Iae,RectangularSensorVisualizer:()=>L2e,ReferenceFrame:()=>s0,ReferenceProperty:()=>DY,RenderEntity:()=>fW,RenderObjectFactory:()=>zc,RenderState:()=>fn,Renderbuffer:()=>G_,RenderbufferFormat:()=>qE,Request:()=>cC,RequestErrorEvent:()=>r5,RequestScheduler:()=>V1,RequestState:()=>yA,RequestType:()=>oB,ResetViewNavigationControl:()=>A2e,Resource:()=>An,ResourceCache:()=>sf,ResourceCacheKey:()=>nw,ResourceCacheStatistics:()=>yBe,ResourceLoader:()=>fy,ResourceLoaderState:()=>ha,Rotation:()=>YD,RuntimeError:()=>nr,S2Cell:()=>KG,S3MCacheFileRenderEntity:()=>bie,S3MCompressType:()=>Ilt,S3MContentFactory:()=>b2e,S3MContentParser:()=>Q2e,S3MCreateIndexJob:()=>w2e,S3MCreateVertexJob:()=>_2e,S3MDataSource:()=>Got,S3MLayerCache:()=>S2e,S3MLayerScheduler:()=>D2e,S3MPixelFormat:()=>_lt,S3MTile:()=>M2e,S3MTilesFS:()=>E2e,S3MTilesLayer:()=>Eae,S3MTilesVS:()=>v2e,S3ModelParser:()=>T2e,SDFSettings:()=>Qv,SampledPositionProperty:()=>R1,SampledProperty:()=>uM,Sampler:()=>Qs,ScaledPositionProperty:()=>g6,Scene:()=>koe,SceneFramebuffer:()=>Soe,SceneMode:()=>xi,SceneMode2DPipelineStage:()=>Z1e,SceneModePicker:()=>eDe,SceneModePickerViewModel:()=>$Se,SceneTransforms:()=>Ss,SceneTransitioner:()=>uSe,ScreenSpaceCameraController:()=>pSe,ScreenSpaceEventHandler:()=>Ur,ScreenSpaceEventType:()=>Ki,SelectedFeatureIdPipelineStage:()=>MK,SelectionIndicator:()=>iDe,SelectionIndicatorViewModel:()=>tDe,Sensor:()=>llt,ShaderBuilder:()=>Awe,ShaderCache:()=>tQe,ShaderDestination:()=>Sr,ShaderFunction:()=>cwe,ShaderProgram:()=>_s,ShaderSource:()=>Fr,ShaderStruct:()=>lwe,ShadowMap:()=>xQ,ShadowMapShader:()=>gF,ShadowMode:()=>Al,ShadowVolumeAppearance:()=>gM,ShowGeometryInstanceAttribute:()=>wu,Simon1994PlanetaryPositions:()=>UK,SimplePolylineGeometry:()=>nst,SingleTileImageryProvider:()=>bQ,SkinningPipelineStage:()=>ewe,SkyAtmosphere:()=>sH,SkyBox:()=>mN,SphereEmitter:()=>vH,SphereGeometry:()=>ost,SphereOutlineGeometry:()=>tP,Spherical:()=>fDe,Spline:()=>uf,SplitDirection:()=>uI,Splitter:()=>roe,SpotLight:()=>Vot,StaticGeometryColorBatch:()=>AM,StaticGeometryPerMaterialBatch:()=>hM,StaticGroundGeometryColorBatch:()=>_te,StaticGroundGeometryPerMaterialBatch:()=>O_e,StaticGroundPolylinePerMaterialBatch:()=>hbe,StaticOutlineGeometryBatch:()=>Bte,StencilConstants:()=>ca,StencilFunction:()=>Ku,StencilOperation:()=>lo,SteppedSpline:()=>kBe,StripeMaterialProperty:()=>die,StripeOrientation:()=>jF,StructuralMetadata:()=>nP,StyleCommandsNeeded:()=>Q5,StyleExpression:()=>kst,Sun:()=>Uoe,SunLight:()=>iH,SunPostProcess:()=>ySe,SupportedImageFormats:()=>vBe,SvgPathBindingHandler:()=>Ebe,TaskProcessor:()=>Vf,TerrainData:()=>AO,TerrainEncoding:()=>HM,TerrainExaggeration:()=>ID,TerrainFillMesh:()=>goe,TerrainFlatten:()=>IN,TerrainFlattenPolygonTexture:()=>UDe,TerrainMesh:()=>hO,TerrainOffsetProperty:()=>tne,TerrainProvider:()=>Cx,TerrainQuantization:()=>Pv,TerrainState:()=>xh,Texture:()=>mo,TextureAtlas:()=>z7,TextureCache:()=>iQe,TextureMagnificationFilter:()=>th,TextureManager:()=>BEe,TextureMinificationFilter:()=>as,TextureUniform:()=>IEe,TextureWrap:()=>Va,TileAvailability:()=>ZL,TileBoundingRegion:()=>S5,TileBoundingS2Cell:()=>Zwe,TileBoundingSphere:()=>yP,TileBoundingVolume:()=>Ost,TileCoordinatesImageryProvider:()=>i2e,TileDiscardPolicy:()=>Ust,TileEdge:()=>Ga,TileImagery:()=>toe,TileMapServiceImageryProvider:()=>_P,TileMetadata:()=>Wwe,TileOrientedBoundingBox:()=>NF,TileProviderError:()=>wc,TileReplacementQueue:()=>xoe,TileSelectionResult:()=>sa,TileState:()=>Gst,Tileset3DTileContent:()=>Rwe,TilesetMetadata:()=>ebe,TilesetPipelineStage:()=>n1e,TilingScheme:()=>ast,TimeConstants:()=>Uu,TimeDynamicImagery:()=>Aoe,TimeDynamicPointCloud:()=>Y6,TimeInterval:()=>el,TimeIntervalCollection:()=>mx,TimeIntervalCollectionPositionProperty:()=>T8,TimeIntervalCollectionProperty:()=>g8,TimeStandard:()=>nu,Timeline:()=>oDe,TimelineHighlightRange:()=>rDe,TimelineTrack:()=>nDe,Tipsify:()=>HEe,ToggleButtonViewModel:()=>vG,Tonemapper:()=>ZG,Transforms:()=>Vn,TranslationRotationScale:()=>aB,TranslucentTileClassification:()=>DQe,TridiagonalSystemSolver:()=>Sne,TrustedServers:()=>Vie,TweenCollection:()=>Foe,UniformState:()=>rQe,UniformType:()=>pa,UrlTemplateGeojsonProvider:()=>Yot,UrlTemplateImageryProvider:()=>sw,UserInterfaceControl:()=>vae,Utils:()=>dQ,VERSION:()=>Slt,VRButton:()=>sDe,VRButtonViewModel:()=>aDe,VRTheWorldTerrainProvider:()=>ust,VaryingType:()=>xx,Vector3DTileBatch:()=>S8,Vector3DTileClampedPolylines:()=>Uwe,Vector3DTileContent:()=>Vwe,Vector3DTileGeometry:()=>Bk,Vector3DTilePoints:()=>Lwe,Vector3DTilePolygons:()=>Fwe,Vector3DTilePolylines:()=>Hne,Vector3DTilePrimitive:()=>One,VelocityOrientationProperty:()=>gDe,VelocityVectorProperty:()=>uae,VertexArray:()=>Vc,VertexArrayFacade:()=>lY,VertexAttributeSemantic:()=>Fo,VertexCompressOption:()=>_1,VertexFormat:()=>Wr,VerticalOrigin:()=>bn,VideoSynchronizer:()=>sst,View:()=>Toe,ViewShed:()=>Xet,ViewShedMap:()=>oH,ViewShedMapShader:()=>vF,Viewer:()=>$J,ViewportQuad:()=>Hst,Visibility:()=>vg,Visualizer:()=>pat,VulkanConstants:()=>cst,WallGeometry:()=>U_e,WallGeometryLibrary:()=>lne,WallGeometryUpdater:()=>H_e,WallGraphics:()=>_Y,WallOutlineGeometry:()=>G_e,WaterFS:()=>PY,WaterMaterialProperty:()=>Jot,WebGLConstants:()=>Ii,WebMapServiceImageryProvider:()=>MJ,WebMapTileServiceImageryProvider:()=>Z6,WebMercatorProjection:()=>OA,WebMercatorTilingScheme:()=>Am,WindingOrder:()=>Z_,WireframeIndexGenerator:()=>Lne,WireframePipelineStage:()=>iwe,ZoomNavigationControl:()=>Bie,_shadersAcesTonemappingStage:()=>LQe,_shadersAdditiveBlend:()=>mSe,_shadersAdjustTranslucentFS:()=>Xte,_shadersAllMaterialAppearanceFS:()=>bIe,_shadersAllMaterialAppearanceVS:()=>QIe,_shadersAmbientOcclusionGenerate:()=>FQe,_shadersAmbientOcclusionModulate:()=>NQe,_shadersAspectRampMaterial:()=>XCe,_shadersAtmosphereCommon:()=>L8,_shadersBasicMaterialAppearanceFS:()=>SIe,_shadersBasicMaterialAppearanceVS:()=>DIe,_shadersBillboardCollectionFS:()=>sEe,_shadersBillboardCollectionVS:()=>lEe,_shadersBlackAndWhite:()=>kQe,_shadersBloomComposite:()=>OQe,_shadersBrdfLutGeneratorFS:()=>sQe,_shadersBrightPass:()=>CSe,_shadersBrightness:()=>UQe,_shadersBumpMapMaterial:()=>ZCe,_shadersCPUStylingStageFS:()=>w1e,_shadersCPUStylingStageVS:()=>B1e,_shadersCheckFloatTexturePrecisionFS:()=>vat,_shadersCheckerboardMaterial:()=>$Ce,_shadersCloudCollectionFS:()=>wDe,_shadersCloudCollectionVS:()=>bDe,_shadersCloudNoiseFS:()=>QDe,_shadersCloudNoiseVS:()=>SDe,_shadersCompareAndPackTranslucentDepth:()=>SQe,_shadersCompositeOITFS:()=>IQe,_shadersCompositeTranslucentClassification:()=>P7,_shadersContrastBias:()=>GQe,_shadersCustomShaderStageFS:()=>S1e,_shadersCustomShaderStageVS:()=>Q1e,_shadersCzmBuiltins:()=>l7,_shadersDepthOfField:()=>HQe,_shadersDepthPlaneFS:()=>cQe,_shadersDepthPlaneVS:()=>AQe,_shadersDepthView:()=>VQe,_shadersDepthViewPacked:()=>ult,_shadersDotMaterial:()=>eye,_shadersEdgeDetection:()=>zQe,_shadersElevationBandMaterial:()=>tye,_shadersElevationContourMaterial:()=>iye,_shadersElevationRampMaterial:()=>rye,_shadersEllipsoidFS:()=>jte,_shadersEllipsoidSurfaceAppearanceFS:()=>PIe,_shadersEllipsoidSurfaceAppearanceVS:()=>RIe,_shadersEllipsoidVS:()=>qte,_shadersFXAA:()=>YQe,_shadersFXAA3_11:()=>ZQe,_shadersFadeMaterial:()=>nye,_shadersFeatureIdStageFS:()=>D1e,_shadersFeatureIdStageVS:()=>T1e,_shadersFilmicTonemapping:()=>KQe,_shadersGaussianBlur1D:()=>VK,_shadersGaussianBlur1DSun:()=>tSe,_shadersGeometryStageFS:()=>F1e,_shadersGeometryStageVS:()=>N1e,_shadersGlobeFS:()=>Obe,_shadersGlobeVS:()=>Ube,_shadersGridMaterial:()=>oye,_shadersGroundAtmosphere:()=>Kte,_shadersHSBToRGB:()=>ave,_shadersHSLToRGB:()=>sve,_shadersImageBasedLightingStageFS:()=>o1e,_shadersInstancingStageCommon:()=>f1e,_shadersInstancingStageVS:()=>g1e,_shadersLegacyInstancingStageVS:()=>p1e,_shadersLensFlare:()=>JQe,_shadersLightingStageFS:()=>O1e,_shadersMaterialStageFS:()=>G1e,_shadersMetadataStageFS:()=>M1e,_shadersMetadataStageVS:()=>P1e,_shadersModelClippingPlanesStageFS:()=>A1e,_shadersModelColorStageFS:()=>c1e,_shadersModelFS:()=>JBe,_shadersModelSilhouetteStageFS:()=>dwe,_shadersModelSilhouetteStageVS:()=>fwe,_shadersModelSplitterStageFS:()=>pwe,_shadersModelVS:()=>WBe,_shadersModifiedReinhardTonemapping:()=>WQe,_shadersMorphTargetsStageVS:()=>V1e,_shadersNightVision:()=>jQe,_shadersNormalMapMaterial:()=>aye,_shadersOctahedralProjectionAtlasFS:()=>IBe,_shadersOctahedralProjectionFS:()=>_Be,_shadersOctahedralProjectionVS:()=>BBe,_shadersPassThrough:()=>KM,_shadersPassThroughDepth:()=>HK,_shadersPerInstanceColorAppearanceFS:()=>YEe,_shadersPerInstanceColorAppearanceVS:()=>JEe,_shadersPerInstanceFlatColorAppearanceFS:()=>cre,_shadersPerInstanceFlatColorAppearanceVS:()=>WEe,_shadersPointCloudEyeDomeLighting:()=>QBe,_shadersPointCloudStylingStageVS:()=>Y1e,_shadersPointPrimitiveCollectionFS:()=>cG,_shadersPointPrimitiveCollectionVS:()=>AEe,_shadersPolylineArrowMaterial:()=>sye,_shadersPolylineColorAppearanceVS:()=>kEe,_shadersPolylineCommon:()=>U5,_shadersPolylineDashMaterial:()=>lye,_shadersPolylineFS:()=>Are,_shadersPolylineGlowMaterial:()=>uye,_shadersPolylineMaterialAppearanceVS:()=>OEe,_shadersPolylineOutlineMaterial:()=>cye,_shadersPolylineShadowVolumeFS:()=>REe,_shadersPolylineShadowVolumeMorphFS:()=>LEe,_shadersPolylineShadowVolumeMorphVS:()=>FEe,_shadersPolylineShadowVolumeVS:()=>NEe,_shadersPolylineVS:()=>LIe,_shadersPostProcessRain:()=>clt,_shadersPostProcessSnow:()=>Alt,_shadersPrimitiveOutlineStageFS:()=>j1e,_shadersPrimitiveOutlineStageVS:()=>W1e,_shadersRGBToHSB:()=>Pve,_shadersRGBToHSL:()=>Rve,_shadersRGBToXYZ:()=>Lve,_shadersReinhardTonemapping:()=>qQe,_shadersReprojectWebMercatorFS:()=>gbe,_shadersReprojectWebMercatorVS:()=>pbe,_shadersRimLightingMaterial:()=>Aye,_shadersSelectedFeatureIdStageCommon:()=>Dte,_shadersShadowVolumeAppearanceFS:()=>fre,_shadersShadowVolumeAppearanceVS:()=>KEe,_shadersShadowVolumeFS:()=>Z7,_shadersSilhouette:()=>XQe,_shadersSkinningStageVS:()=>$1e,_shadersSkyAtmosphereCommon:()=>iie,_shadersSkyAtmosphereFS:()=>bSe,_shadersSkyAtmosphereVS:()=>QSe,_shadersSkyBoxFS:()=>DSe,_shadersSkyBoxVS:()=>TSe,_shadersSlopeRampMaterial:()=>hye,_shadersStripeMaterial:()=>dye,_shadersSunFS:()=>MSe,_shadersSunShaft:()=>hlt,_shadersSunShaftHdr:()=>dlt,_shadersSunShaftModulate:()=>eSe,_shadersSunTextureFS:()=>Eat,_shadersSunTextureFS_v2:()=>RSe,_shadersSunVS:()=>PSe,_shadersSunVisibleFS:()=>iSe,_shadersSunVisibleShaft:()=>rSe,_shadersSunVisibleVS:()=>t1e,_shadersTexturedMaterialAppearanceFS:()=>TIe,_shadersTexturedMaterialAppearanceVS:()=>MIe,_shadersVector3DTileClampedPolylinesFS:()=>Owe,_shadersVector3DTileClampedPolylinesVS:()=>kwe,_shadersVector3DTilePolylinesVS:()=>Nwe,_shadersVectorTileVS:()=>Mte,_shadersViewportQuadFS:()=>DDe,_shadersViewportQuadVS:()=>_oe,_shadersWater:()=>fye,_shadersXYZToRGB:()=>nEe,_shadersacesTonemapping:()=>Dxe,_shadersalphaWeight:()=>Txe,_shadersantialias:()=>Mxe,_shadersapproximateSphericalCoordinates:()=>Pxe,_shadersbackFacing:()=>Rxe,_shadersbranchFreeTernary:()=>Lxe,_shaderscascadeColor:()=>Fxe,_shaderscascadeDistance:()=>Nxe,_shaderscascadeMatrix:()=>kxe,_shaderscascadeWeights:()=>Oxe,_shaderscolumbusViewMorph:()=>Uxe,_shaderscomputePosition:()=>Gxe,_shaderscosineAndSine:()=>Hxe,_shadersdecompressTextureCoordinates:()=>Vxe,_shadersdefaultPbrMaterial:()=>zxe,_shadersdegreesPerRadian:()=>kye,_shadersdepthClamp:()=>Kxe,_shadersdepthRange:()=>Oye,_shadersdepthRangeStruct:()=>vxe,_shaderseastNorthUpToEyeCoordinates:()=>Yxe,_shadersellipsoidContainsPoint:()=>Jxe,_shadersellipsoidWgs84TextureCoordinates:()=>Wxe,_shadersepsilon1:()=>Uye,_shadersepsilon2:()=>Gye,_shadersepsilon3:()=>Hye,_shadersepsilon4:()=>Vye,_shadersepsilon5:()=>zye,_shadersepsilon6:()=>Kye,_shadersepsilon7:()=>Yye,_shadersequalsEpsilon:()=>jxe,_shaderseyeOffset:()=>qxe,_shaderseyeToWindowCoordinates:()=>Xxe,_shadersfastApproximateAtan:()=>Zxe,_shadersfog:()=>$xe,_shadersgammaCorrect:()=>eve,_shadersgeodeticSurfaceNormal:()=>tve,_shadersgetDefaultMaterial:()=>ive,_shadersgetLambertDiffuse:()=>rve,_shadersgetSpecular:()=>nve,_shadersgetWaterNoise:()=>ove,_shadershue:()=>lve,_shadersinfinity:()=>Jye,_shadersinverseGamma:()=>uve,_shadersisEmpty:()=>cve,_shadersisFull:()=>Ave,_shaderslatitudeToWebMercatorFraction:()=>hve,_shaderslineDistance:()=>fve,_shaderslinearToSrgb:()=>dve,_shadersluminance:()=>gve,_shadersmaterial:()=>Exe,_shadersmaterialInput:()=>Ixe,_shadersmetersPerPixel:()=>pve,_shadersmodelMaterial:()=>_xe,_shadersmodelToWindowCoordinates:()=>mve,_shadersmodelVertexOutput:()=>Bxe,_shadersmultiplyWithColorBalance:()=>Cve,_shadersnearFarScalar:()=>yve,_shadersoctDecode:()=>xve,_shadersoneOverPi:()=>Wye,_shadersoneOverTwoPi:()=>jye,_shaderspackDepth:()=>vve,_shaderspassCesium3DTile:()=>qye,_shaderspassCesium3DTileClassification:()=>Xye,_shaderspassCesium3DTileClassificationIgnoreShow:()=>Zye,_shaderspassClassification:()=>$ye,_shaderspassCompute:()=>exe,_shaderspassEnvironment:()=>txe,_shaderspassGlobe:()=>ixe,_shaderspassOpaque:()=>rxe,_shaderspassOverlay:()=>nxe,_shaderspassTerrainClassification:()=>oxe,_shaderspassTranslucent:()=>axe,_shaderspbrLighting:()=>Eve,_shaderspbrMetallicRoughnessMaterial:()=>Ive,_shaderspbrParameters:()=>wxe,_shaderspbrSpecularGlossinessMaterial:()=>_ve,_shadersphong:()=>Bve,_shaderspi:()=>sxe,_shaderspiOverFour:()=>lxe,_shaderspiOverSix:()=>uxe,_shaderspiOverThree:()=>cxe,_shaderspiOverTwo:()=>Axe,_shadersplaneDistance:()=>wve,_shaderspointAlongRay:()=>bve,_shadersradiansPerDegree:()=>hxe,_shadersray:()=>bxe,_shadersrayEllipsoidIntersectionInterval:()=>Qve,_shadersraySegment:()=>Qxe,_shadersraySphereIntersectionInterval:()=>Sve,_shadersreadDepth:()=>Dve,_shadersreadNonPerspective:()=>Tve,_shadersreverseLogDepth:()=>Mve,_shadersround:()=>Fve,_shaderssampleOctahedralProjection:()=>Nve,_shaderssaturation:()=>kve,_shaderssceneMode2D:()=>dxe,_shaderssceneMode3D:()=>fxe,_shaderssceneModeColumbusView:()=>gxe,_shaderssceneModeMorphing:()=>pxe,_shadersshadowDepthCompare:()=>Ove,_shadersshadowParameters:()=>Sxe,_shadersshadowVisibility:()=>Uve,_shaderssignNotZero:()=>Gve,_shaderssolarRadius:()=>mxe,_shaderssphericalHarmonics:()=>Hve,_shaderssrgbToLinear:()=>Vve,_shaderstangentToEyeSpaceMatrix:()=>zve,_shadersthreePiOver2:()=>Cxe,_shaderstransformPlane:()=>Kve,_shaderstranslateRelativeToEye:()=>Yve,_shaderstranslucentPhong:()=>Jve,_shaderstranspose:()=>Wve,_shaderstwoPi:()=>yxe,_shadersunpackDepth:()=>jve,_shadersunpackFloat:()=>qve,_shadersunpackUint:()=>Xve,_shadersvalueTransform:()=>Zve,_shadersvertexLogDepth:()=>$ve,_shaderswebMercatorMaxLatitude:()=>xxe,_shaderswindowToEyeCoordinates:()=>eEe,_shaderswriteDepthClamp:()=>tEe,_shaderswriteLogDepth:()=>iEe,_shaderswriteNonPerspective:()=>rEe,addBuffer:()=>uBe,addDefaults:()=>tBe,addExtensionsRequired:()=>aBe,addExtensionsUsed:()=>iO,addPipelineExtras:()=>eJ,addToArray:()=>H_,appendForwardSlash:()=>GCe,arrayRemoveDuplicates:()=>fC,barycentricCoordinates:()=>dre,binarySearch:()=>hC,buildDrawCommand:()=>r1e,buildModuleUrl:()=>xs,clone:()=>xo,combine:()=>ia,computeFlyToLocationForRectangle:()=>BJ,createBillboardPointCallback:()=>Gne,createBlurStage:()=>_ie,createCommand:()=>Hl,createDefaultImageryProviderViewModels:()=>Lbe,createDefaultTerrainProviderViewModels:()=>kbe,createEdgeStage:()=>IH,createElevationBandMaterial:()=>Est,createFragmentFromTemplate:()=>s2e,createGuid:()=>Vu,createMaterialPropertyDescriptor:()=>hy,createOsmBuildings:()=>Ist,createPropertyDescriptor:()=>Bi,createRawPropertyDescriptor:()=>M_,createTangentSpaceDebugPrimitive:()=>_st,createTaskProcessorWorker:()=>Qlt,createUniform:()=>Rye,createUniformArray:()=>Fye,createWorldImagery:()=>Xk,createWorldTerrain:()=>Nbe,crypto_js:()=>nD,decodeGoogleEarthEnterpriseData:()=>LDe,decodeVectorPolylinePositions:()=>Gwe,defaultValue:()=>Ae,defer:()=>rA,defined:()=>O,deprecationWarning:()=>$D,destroyObject:()=>Qr,echarts:()=>Nb,exportKml:()=>cat,findAccessorMinMax:()=>tJ,findContentMetadata:()=>Jne,findGroupMetadata:()=>Wne,findTileMetadata:()=>qwe,forEachTextureInMaterial:()=>Cne,formatError:()=>D5,fragment:()=>qet,freezeRenderState:()=>MKe,getAbsoluteUri:()=>iY,getAccessorByteStride:()=>uN,getBaseUri:()=>VCe,getBinaryAccessor:()=>vM,getClipAndStyleCode:()=>Cbe,getClippingFunction:()=>ioe,getComponentReader:()=>KY,getElement:()=>iA,getExtensionFromUri:()=>Nie,getFilenameFromUri:()=>wY,getImageFromTypedArray:()=>_Ee,getImagePixels:()=>i5,getJsonFromTypedArray:()=>Bx,getMagic:()=>Q6,getStringFromTypedArray:()=>d2,getTimestamp:()=>GA,hasExtension:()=>Qg,heightReferenceOnEntityPropertyChanged:()=>UY,isBitSet:()=>q_,isBlobUri:()=>kie,isCrossOriginUrl:()=>Oie,isDataUri:()=>rY,isLeapYear:()=>n8,jsencrypt:()=>n2e,knockout:()=>gr,knockout_3_5_1:()=>EP,knockout_es5:()=>vbe,libgif:()=>JIe,licensechack:()=>zst,loadAndExecuteScript:()=>Uie,loadCRN:()=>Jat,loadCubeMap:()=>SSe,loadDDS:()=>zie,loadImageFromTypedArray:()=>fne,loadKTX2:()=>XF,loadView:()=>xae,mapbox_gl:()=>$Ie,mergeSort:()=>NJ,modernizeShader:()=>Nye,moveTechniqueRenderStates:()=>oBe,moveTechniquesToExtension:()=>sBe,numberOfComponentsForType:()=>eO,objectToQuery:()=>Gie,oneTimeWarning:()=>ua,packer:()=>QEe,parseBatchTable:()=>AJ,parseBoundingVolumeSemantics:()=>Pwe,parseDefines:()=>a2e,parseFeatureMetadataLegacy:()=>$_e,parseGlb:()=>rBe,parseResponseHeaders:()=>zCe,parseStructuralMetadata:()=>Z_e,pointInsideTriangle:()=>tst,preprocess3DTileContent:()=>jne,purify:()=>xat,queryToObject:()=>xD,rasterizeHTML_allinone:()=>lDe,readAccessorPacked:()=>cBe,removeExtension:()=>SK,removeExtensionsRequired:()=>iBe,removeExtensionsUsed:()=>mne,removePipelineExtras:()=>nBe,removeUnusedElements:()=>lBe,remove_primitive:()=>qK,resizeImageToNextPowerOfTwo:()=>q7,sampleTerrain:()=>gJ,sampleTerrainMostDetailed:()=>vQ,scaleToGeodeticSurface:()=>Yie,subdivideArray:()=>UEe,subscribeAndEvaluate:()=>WE,svgCompassGyro:()=>d2e,svgCompassOuterRing:()=>h2e,svgCompassRotationMarker:()=>f2e,svgReset:()=>u2e,turf:()=>Zl,updateAccessorComponentTypes:()=>ABe,updateVersion:()=>hBe,usesExtension:()=>_p,vertex:()=>jet,viewerCesium3DTilesInspectorMixin:()=>ylt,viewerCesiumInspectorMixin:()=>xlt,viewerCesiumNavigationMixin:()=>jst,viewerDragDropMixin:()=>vlt,viewerPerformanceWatchdogMixin:()=>Elt,webGLConstantToGlslType:()=>Ast,wrapFunction:()=>ODe,writeTextToCanvas:()=>N5});function CW(o=!0){this.async=o}CW.prototype.getXmlHttpRequest=function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)return new ActiveXObject("MsXml2.XmlHttp")};CW.prototype.includeJsText=function(o,A){if(o!=null){var f=document.createElement("script");f.type="text/javascript",f.text=A,o.appendChild(f)}};CW.prototype.includeJsSrc=function(o,A){if(o!=null){var f=document.createElement("script");f.type="text/javascript",f.src=A,o.appendChild(f)}};CW.prototype.addJs=function(o,A){var f=this.getXmlHttpRequest(),m=this;f.onreadystatechange=function(){f.readyState===4&&(f.status===200||f.status===304?m.includeJsSrc(o,A):console.log("XML request error: "+f.statusText+" ("+f.status+")"))},f.open("GET",A,m.async),f.send(null),f.status===404?console.log(A+" is not found"):m.includeJsText(o,f.responseText)};var IC=CW;var nTi={testModel:"Workers/Model/xiaoche.glb",modelAxis:"Workers/Model/axis.gltf",flyModel:"Workers/Model/fly.glb",divpoint:"Workers/image/divpoint.png",divpoint1:"Workers/image/divpoint1.png",richtextpoint:"Workers/image/richtextpoint1.png",mark:"Workers/image/mark.png",mark1:"Workers/image/mark1.png",TrailLine:"Workers/image/TrailLine.png",road:"Workers/image/road.jpg",colors3:"Workers/image/colors3.png",loading:"Workers/image/loading.gif",smog:"Workers/image/smog.png",penquan:"Workers/image/penquan.png",fire:"Workers/image/fire.png",fire2:"Workers/image/fire2.png",bottomplane:"Workers/image/bottomplane.jpg",MTY0001:"Workers/image/MTY0001.jpg",MTY0002:"Workers/image/MTY0002.jpg",wall:"Workers/image/ggy.jpg",rotate:"Workers/image/rotate.png",move:"Workers/image/move.png",draw:"Workers/image/cursor/draw.cur",water:"Workers/image/waterNormals.jpg",movingRiver:"Workers/image/movingRiver.png",effectCircle:"Workers/image/circle.png",scanCircle:"Workers/image/scan.png",particles:"Workers/image/particles.png",trafficLight:{l_go:"Workers/image/trafficLights/l-go.png",l_wait:"Workers/image/trafficLights/l-wait.png",l_stop:"Workers/image/trafficLights/l-stop.png",l_null:"Workers/image/trafficLights/l-null.png",go:"Workers/image/trafficLights/go.png",wait:"Workers/image/trafficLights/wait.png",stop:"Workers/image/trafficLights/stop.png",null:"Workers/image/trafficLights/null.png",r_go:"Workers/image/trafficLights/r-go.png",r_wait:"Workers/image/trafficLights/r-wait.png",r_stop:"Workers/image/trafficLights/r-stop.png",r_null:"Workers/image/trafficLights/r-null.png",bg:"Workers/image/trafficLights/bg.png"}},cn=Object.freeze(nTi);function oTi(o,A){return o??A}var u0=oTi;var Dlt=`// author: \u5F20\u4E39\u948A
${I}`)};PQ.prototype.isDestroyed=function(){return!1};PQ.prototype.destroy=function(){this._scene=this._scene&&this._scene.destroy(),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),Qr(this)};PQ.prototype.resize=function(){let o=this._canvas,A=o.clientWidth,f=o.clientHeight;!this._forceResize&&this._canvasWidth===A&&this._canvasHeight===f||(this._forceResize=!1,plt(this),mlt(this),this._scene.requestRender())};PQ.prototype.render=function(){if(this._scene._frameState||console.log("\u6388\u6743\u9A8C\u8BC1\u9519\u8BEF\uFF01"),this._canRender){this._scene.initializeFrame();let o=this._clock.tick();this._scene.render(o)}else this._clock.tick()};PQ.prototype.flyTo=function(o,A){return G2i(this,o,A,!0)};function G2i(o,A,f,m){U2e(o);let C=Promise.resolve(!0);return o._zoomPromise=C,o._zoomIsFlight=m,o._zoomOptions=f,Promise.resolve(A,function(y){if(o._zoomPromise===C){if(y instanceof dD){y.getViewableRectangle().then(function(x){return BJ(x,o.scene)}).then(function(x){o._zoomPromise===C&&(o._zoomTarget=x)});return}if(y instanceof Fx){o._zoomTarget=y;return}if(y instanceof cI){o._zoomTarget=y;return}if(y instanceof Y6){o._zoomTarget=y;return}if(y.isLoading&&O(y.loadingEvent)){let x=y.loadingEvent.addEventListener(function(){x(),o._zoomPromise===C&&(o._zoomTarget=y.entities.values.slice(0))});return}if(Array.isArray(y)){o._zoomTarget=y.slice(0);return}y=Ae(y.values,y),O(y.entities)&&(y=y.entities.values),Array.isArray(y)?o._zoomTarget=y.slice(0):o._zoomTarget=[y]}}),o.scene.requestRender(),C.promise}function lG(o){o._zoomPromise=void 0,o._zoomTarget=void 0,o._zoomOptions=void 0}function U2e(o){let A=o._zoomPromise;O(A)&&(lG(o),A.resolve(!1))}PQ.prototype._postRender=function(){H2i(this),V2i(this)};PQ.prototype._onTick=function(){let o=this,A=o.coreMap,f=A.clock.currentTime,m=A._entityView;if(O(m)){let C=A._trackedEntity;o._dataSourceDisplay.getBoundingSphere(C,!1,W8)===ro.DONE&&m.update(f,W8)}};function H2i(o){let A=o.coreMap,f=A._zoomTarget;if(!O(f)||A.scene.mode===xi.MORPHING)return;let m=A.scene,C=m.camera,y=A._zoomPromise,x=Ae(A._zoomOptions,{}),v,E;if(f instanceof Fx||f instanceof cI)return f.readyPromise.then(function(){let Q=f.boundingSphere;O(x.offset)||(x.offset=new Ex(0,-.5,Q.radius)),v={offset:x.offset,duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)}},A._zoomIsFlight?C.flyToBoundingSphere(f.boundingSphere,v):(C.viewBoundingSphere(Q,x.offset),C.lookAtTransform(Xe.IDENTITY),y.resolve(!0)),lG(A)});if(f instanceof Y6)return f.readyPromise.then(function(){let Q=f.boundingSphere;O(x.offset)||(x.offset=new Ex(0,-.5,Q.radius)),v={offset:x.offset,duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)}},A._zoomIsFlight?C.flyToBoundingSphere(Q,v):(C.viewBoundingSphere(Q,x.offset),C.lookAtTransform(Xe.IDENTITY),y.resolve(!0)),lG(A)});if(f instanceof Kt){v={destination:m.mapProjection.ellipsoid.cartographicToCartesian(f),duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)}},A._zoomIsFlight?C.flyTo(v):(C.setView(v),y.resolve(!0)),lG(A);return}let I=f,w=[];for(let Q=0,M=I.length;Q<M;Q++){let B=o._dataSourceDisplay.getBoundingSphere(I[Q],!1,W8);if(B===ro.PENDING)return;B!==ro.FAILED&&w.push(wi.clone(W8))}if(w.length===0){U2e(A);return}A.trackedEntity=void 0,E=wi.fromBoundingSpheres(w),A._zoomIsFlight?(lG(A),C.flyToBoundingSphere(E,{duration:x.duration,maximumHeight:x.maximumHeight,complete:function(){y.resolve(!0)},cancel:function(){y.resolve(!1)},offset:x.offset})):(C.viewBoundingSphere(E,x.offset),C.lookAtTransform(Xe.IDENTITY),lG(A),y.resolve(!0))}function V2i(o){let A=o.coreMap;if(!A._needTrackedEntityUpdate)return;let f=A.trackedEntity,m=A.clock.currentTime,C=Nt.getValueOrUndefined(f.position,m);if(!O(C))return;let y=A.scene,x=o._dataSourceDisplay.getBoundingSphere(f,!1,W8);if(x===ro.PENDING)return;let v=y.mode;(v===xi.COLUMBUS_VIEW||v===xi.SCENE2D)&&(y.screenSpaceCameraController.enableTranslate=!1),(v===xi.COLUMBUS_VIEW||v===xi.SCENE3D)&&(y.screenSpaceCameraController.enableTilt=!1);let E=x!==ro.FAILED?W8:void 0;console.info(E),A._entityView=new $ne(f,y,y.mapProjection.ellipsoid),A._entityView.update(m,E),A._needTrackedEntityUpdate=!1}PQ.prototype.extend=function(o,A){o(this,A)};var Clt=PQ;function G2e(o){this._scene=o.scene,this.lowFrameRateMessage=Ae(o.lowFrameRateMessage,"This application appears to be performing poorly on your system.  Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,gr.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);let A=this;this._dismissMessage=Hl(function(){A.showingLowFrameRateMessage=!1,A.lowFrameRateMessageDismissed=!0});let f=A2e.fromScene(o.scene);this._unsubscribeLowFrameRate=f.lowFrameRate.addEventListener(function(){A.lowFrameRateMessageDismissed||(A.showingLowFrameRateMessage=!0)}),this._unsubscribeNominalFrameRate=f.nominalFrameRate.addEventListener(function(){A.showingLowFrameRateMessage=!1})}Object.defineProperties(G2e.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}});G2e.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),Qr(this)};var H2e=G2e;function wae(o){let A=iA(o.container),f=new H2e(o),m=document.createElement("div");m.className="cesium-performance-watchdog-message-area",m.setAttribute("data-bind","visible: showingLowFrameRateMessage");let C=document.createElement("button");C.setAttribute("type","button"),C.className="cesium-performance-watchdog-message-dismiss",C.innerHTML="&times;",C.setAttribute("data-bind","click: dismissMessage"),m.appendChild(C);let y=document.createElement("div");y.className="cesium-performance-watchdog-message",y.setAttribute("data-bind","html: lowFrameRateMessage"),m.appendChild(y),A.appendChild(m),gr.applyBindings(f,m),this._container=A,this._viewModel=f,this._element=m}Object.defineProperties(wae.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});wae.prototype.isDestroyed=function(){return!1};wae.prototype.destroy=function(){return this._viewModel.destroy(),gr.cleanNode(this._element),this._container.removeChild(this._element),Qr(this)};var V2e=wae;function z2i(o){let A=document.createElement("div");A.className="cesium-viewer-cesium3DTilesInspectorContainer",o.container.appendChild(A);let f=new E2e(A,o.scene);Object.defineProperties(o,{cesium3DTilesInspector:{get:function(){return f}}})}var ylt=z2i;function K2i(o){let A=document.createElement("div");A.className="cesium-viewer-cesiumInspectorContainer",o.container.appendChild(A);let f=new _2e(A,o.scene);Object.defineProperties(o,{cesiumInspector:{get:function(){return f}}})}var xlt=K2i;function Y2i(o,A){A=Ae(A,Ae.EMPTY_OBJECT);let f=!0,m=Ae(A.flyToOnDrop,!0),C=new br,y=Ae(A.clearOnDrop,!0),x=Ae(A.dropTarget,o.container),v=Ae(A.clampToGround,!0),E=A.proxy;x=iA(x),Object.defineProperties(o,{dropTarget:{get:function(){return x},set:function(w){_7e(x,I),x=w,mpe(x,I)}},dropEnabled:{get:function(){return f},set:function(w){w!==f&&(w?mpe(x,I):_7e(x,I),f=w)}},dropError:{get:function(){return C}},clearOnDrop:{get:function(){return y},set:function(w){y=w}},flyToOnDrop:{get:function(){return m},set:function(w){m=w}},proxy:{get:function(){return E},set:function(w){E=w}},clampToGround:{get:function(){return v},set:function(w){v=w}}});function I(w){e5(w),y&&(o.entities.removeAll(),o.dataSources.removeAll());let Q=w.dataTransfer.files,M=Q.length;for(let B=0;B<M;B++){let T=Q[B],D=new FileReader;D.onload=J2i(o,T,E,v),D.onerror=W2i(o,T),D.readAsText(T)}}mpe(x,I),o.destroy=r2e(o,o.destroy,function(){o.dropEnabled=!1}),o._handleDrop=I}function e5(o){o.stopPropagation(),o.preventDefault()}function _7e(o,A){let f=o;O(f)&&(f.removeEventListener("drop",A,!1),f.removeEventListener("dragenter",e5,!1),f.removeEventListener("dragover",e5,!1),f.removeEventListener("dragexit",e5,!1))}function mpe(o,A){o.addEventListener("drop",A,!1),o.addEventListener("dragenter",e5,!1),o.addEventListener("dragover",e5,!1),o.addEventListener("dragexit",e5,!1)}function J2i(o,A,f,m){let C=o.scene;return function(y){let x=A.name;try{let v;if(/\.czml$/i.test(x))v=iW.load(JSON.parse(y.target.result),{sourceUri:x});else if(/\.geojson$/i.test(x)||/\.json$/i.test(x)||/\.topojson$/i.test(x))v=mK.load(JSON.parse(y.target.result),{sourceUri:x,clampToGround:m});else if(/\.(kml|kmz)$/i.test(x))v=Fre.load(A,{sourceUri:x,proxy:f,camera:C.camera,canvas:C.canvas,clampToGround:m,screenOverlayContainer:o.container});else if(/\.gpx$/i.test(x))v=DDe.load(A,{sourceUri:x,proxy:f});else{o.dropError.raiseEvent(o,x,`Unrecognized file: ${x}`);return}O(v)&&o.dataSources.add(v).then(function(E){o.flyToOnDrop&&o.flyTo(E)}).catch(function(E){o.dropError.raiseEvent(o,x,E)})}catch(v){o.dropError.raiseEvent(o,x,v)}}}function W2i(o,A){return function(f){o.dropError.raiseEvent(o,A.name,f.target.error)}}var vlt=Y2i;function j2i(o,A){A=Ae(A,Ae.EMPTY_OBJECT);let f=new V2e({scene:o.scene,container:o.bottomContainer,lowFrameRateMessage:A.lowFrameRateMessage});Object.defineProperties(o,{performanceWatchdog:{get:function(){return f}}})}var Elt=j2i;function $K(o){this._angle=void 0,this._angleSubscription=void 0,this._radius=void 0,this._radiusSubscription=void 0,this._stack=void 0,this._stackSubscription=void 0,this._slice=void 0,this._sliceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._show=void 0,this._showSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._definitionChanged=new br,this._gaze=void 0,this._gazeSubscription=void 0,this.merge(Ae(o,Ae.EMPTY_OBJECT))}Object.defineProperties($K.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:Bi("show"),material:hy("material"),fill:Bi("fill"),shadows:Bi("shadows"),distanceDisplayCondition:Bi("distanceDisplayCondition")});$K.prototype.clone=function(o){return O(o)?(o.angle=this.angle,o.radius=this.radius,o.stack=this.stack,o.slice=this.slice,o.show=this.show,o.material=this.material,o.color=this.color,o.fill=this.fill,o.outline=this.outline,o.outlineColor=this.outlineColor,o.outlineWidth=this.outlineWidth,o.shadows=this.shadows,o.distanceDisplayCondition=this.distanceDisplayCondition,o.gaze=this.gaze,o):new $K(this)};$K.prototype.merge=function(o){this.angle=Ae(this.angle,o.angle),this.radius=Ae(this.radius,o.radius),this.stack=Ae(this.stack,o.stack),this.slice=Ae(this.slice,o.slice),this.show=Ae(this.show,o.show),this.color=Ae(this.color,o.color),this.material=Ae(this.material,o.material),this.fill=Ae(this.fill,o.fill),this.outline=Ae(this.outline,o.outline),this.outlineColor=Ae(this.outlineColor,o.outlineColor),this.outlineWidth=Ae(this.outlineWidth,o.outlineWidth),this.shadows=Ae(this.shadows,o.shadows),this.distanceDisplayCondition=Ae(this.distanceDisplayCondition,o.distanceDisplayCondition),this.gaze=Ae(this.gaze,o.gaze)};var Tie=$K;function q2i(o){return new _D(o)}function X2i(o){return Bi(o,void 0,q2i)}function bae(o){o=o||{},this._position=void 0,this._orientation=void 0,this._show=void 0;let A=o.conicArcSensor;A instanceof Tie||(A=new Tie(A)),this._conicArcSensor=A,this._distanceDisplayCondition=new $o,this._geometry=void 0,this._outlineGeometry=void 0,this._definitionChanged=new br,this.merge(o)}Object.defineProperties(bae.prototype,{position:X2i("position"),orientation:Bi("orientation"),show:Bi("show")});bae.prototype.merge=function(o){this.position=o.position,this.orientation=o.orientation,this.show=o.show};bae.prototype.gazeAt=function(o){o instanceof UA&&(this._conicArcSensor.gaze=o)};var Mie=bae,B7e=Math.cos,w7e=Math.sin;function Pie(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.angle,f=o.radius,m=Math.round(Ae(o.stackPartitions,12)),C=Math.round(Ae(o.slicePartitions,64)),y=Ae(o.vertexFormat,Wr.DEFAULT);this._angle=A,this._radius=f,this._stackPartitions=m,this._slicePartitions=C,this._vertexFormat=y}Pie.fromDimensions=function(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.angle,f=o.radius,m=o.height,C=o.stackPartitions,y=o.slicePartitions;return new Pie({angle:A,radius:f,stackPartitions:C,slicePartitions:y,vertexFormat:o.vertexFormat})};Pie.createGeometry=function(o){console.time("createGeometry");let A=o._angle,f=o._radius,m=o._stackPartitions+1,C=o._slicePartitions+1,y=o._vertexFormat,x=new yc,v,E=3*(C-1)+6*(C-1)*(m-2)+(C-1)*1*3,I=m*C,w=Nn.createTypedArray(I,E),Q=new Float64Array(I*3+(C-1)*3*3);if(y.position){let F=0,L=new Array(C),R=new Array(C);for(let k=0;k<C;k++){let U=je.TWO_PI*k/(C-1);L[k]=B7e(U),R[k]=w7e(U),Q[F++]=0,Q[F++]=0,Q[F++]=-f}for(i=1;i<m;i++){let k=A*i/(m-1),U=w7e(k),V=f*U,H=f*U,q=f*B7e(k);for(let ie=0;ie<C;ie++)Q[F++]=L[ie]*V,Q[F++]=R[ie]*H,Q[F++]=-q}v=F;for(let k=0;k<C-1;k++)Q[F++]=0,Q[F++]=0,Q[F++]=0,Q[F++]=Q[v-(C-k-1)*3],Q[F++]=Q[v-(C-k-1)*3+1],Q[F++]=Q[v-(C-k-1)*3+2],Q[F++]=Q[v-(C-k)*3],Q[F++]=Q[v-(C-k)*3+1],Q[F++]=Q[v-(C-k)*3+2];x.position=new Yr({componentDatatype:ei.DOUBLE,componentsPerAttribute:3,values:Q})}let M=0;for(let F=0;F<C-1;F++)w[M++]=C+F,w[M++]=C+F+1,w[M++]=F+1;let B,T;for(let F=1;F<m-1;F++){B=F*C,T=(F+1)*C;for(let L=0;L<C-1;L++)w[M++]=T+L,w[M++]=T+L+1,w[M++]=B+L+1,w[M++]=T+L,w[M++]=B+L+1,w[M++]=B+L}for(let F=0,L=(C-1)*3;F<L;F++)w[M++]=F+v/3;let D=new Zo({attributes:x,indices:w,primitiveType:yn.TRIANGLES,boundingSphere:new wi(ee.ZERO,f)});return D=rc.computeNormal(D),console.timeEnd("createGeometry"),D};var Rie=Pie,H$=Math.cos,V$=Math.sin;function Ilt(o){o=Ae(o,Ae.EMPTY_OBJECT);let A=o.angle,f=o.radius,m=Math.round(Ae(o.stackPartitions,10)),C=Math.round(Ae(o.slicePartitions,8)),y=Math.round(Ae(o.subdivisions,128));this._angle=A,this._radius=f,this._stackPartitions=m,this._slicePartitions=C,this._subdivisions=y}Ilt.createGeometry=function(o){let A=o._angle,f=o._radius;if(f<=0||A<=0)return;let m=o._stackPartitions,C=o._slicePartitions,y=o._subdivisions,x=y*(m+C-1),v=x-C+2,E=new Float64Array(v*3),I=Nn.createTypedArray(v,x*2),w,Q,M,B,T,D,F=0,L=new Array(y),R=new Array(y);for(w=0;w<y;w++)M=je.TWO_PI*w/y,L[w]=H$(M),R[w]=V$(M);for(w=1;w<m;w++)for(B=A*w/(m-1),T=H$(B),D=V$(B),Q=0;Q<y;Q++)E[F++]=f*L[Q]*D,E[F++]=f*R[Q]*D,E[F++]=-f*T;for(L.length=C,R.length=C,w=0;w<C;w++)M=je.TWO_PI*w/C,L[w]=H$(M),R[w]=V$(M);for(E[F++]=0,E[F++]=0,E[F++]=-f,w=1;w<y;w++)for(B=A*w/y,T=H$(B),D=V$(B),Q=0;Q<C;Q++)E[F++]=f*L[Q]*D,E[F++]=f*R[Q]*D,E[F++]=-f*T;for(F=0,w=0;w<m-1;++w){let V=w*y;for(Q=0;Q<y-1;++Q)I[F++]=V+Q,I[F++]=V+Q+1;I[F++]=V+y-1,I[F++]=V}let k=y*(m-1);for(Q=1;Q<C+1;++Q)I[F++]=k,I[F++]=k+Q;for(w=0;w<y-2;++w){let V=w*C+1+k,H=(w+1)*C+1+k;for(Q=0;Q<C-1;++Q)I[F++]=H+Q,I[F++]=V+Q;I[F++]=H+C-1,I[F++]=V+C-1}let U=new yc({position:new Yr({componentDatatype:ei.DOUBLE,componentsPerAttribute:3,values:E})});return new Zo({attributes:U,indices:I,primitiveType:yn.LINES,boundingSphere:new wi(ee.ZERO,f)})};var Lie=Ilt;function mW(o){let A=this;if(!O(o))throw new Ui("viewer is required.");this._earthCtrl=o;let f=o.coreMap.scene;this._scene=f;let m=o.coreMap.clock;this._clock=m,this._primitives=f.primitives,this._primitive=void 0,this._outlinePrimitive=void 0,this._conicArcSensorCollection=[],m.onTick.addEventListener(function(){A.update()})}var Cpe=new ci,ype=new Xe,Z2i=new ee,$2i=new ee,b7e=new ee,Q7e=new jr;mW.prototype.add=function(o){return o instanceof Mie||(o=new Mie(o)),this._conicArcSensorCollection.push(o),o};mW.prototype.remove=function(o){let A=this._conicArcSensorCollection.indexOf(o);A!==-1&&this._conicArcSensorCollection.splice(A,1)};mW.prototype.removeAll=function(){this._conicArcSensorCollection.length=0};mW.prototype.update=function(){let o=this._clock.currentTime,A=this._conicArcSensorCollection,f=this._primitives,m=this._primitive,C=this._outlinePrimitive,y=[],x=[];O(m)&&f.removeAndDestroy(m),O(C)&&f.removeAndDestroy(C);for(let v=0,E=A.length;v<E;v++){let I=A[v],w=I._conicArcSensor;if(!Nt.getValueOrDefault(w.show,o,!0))continue;let Q=w.angle,M=w.radius,B=w.stack,T=w.slice;if(!O(Q)||!Nt.getValueOrDefault(I.show,o,!0))continue;let D=Nt.getValueOrUndefined(I.position,o,Z2i);if(!O(D))continue;let F,L=w.gaze;if(O(L)){let ie=Nt.getValueOrUndefined(L.position,o,$2i);if(!O(D)||!O(ie))continue;let Z=ee.subtract(D,ie,b7e),oe=ee.angleBetween(ee.UNIT_Z,Z),ne=ee.cross(ee.UNIT_Z,Z,b7e),se=jr.fromAxisAngle(ne,oe,Q7e),ce=ee.distance(D,ie);M=1,F=Xe.fromRotationTranslation(ci.multiplyByScalar(ci.fromQuaternion(se,Cpe),ce,Cpe),D,ype)}else{let ie=Nt.getValueOrUndefined(I.orientation,o,Q7e);O(ie)?F=Xe.fromRotationTranslation(ci.fromQuaternion(ie,Cpe),D,ype):F=Vn.eastNorthUpToFixedFrame(D,void 0,ype)}if(!O(F))continue;let R=I._geometry;if(!O(R)){let ie;ie=new Rie({vertexFormat:Wr.POSITION_AND_NORMAL,angle:Q,radius:M,stackPartitions:B,slicePartitions:T}),I._geometry=Rie.createGeometry(ie),R=I._geometry}let k=w.color,U=w.outline,V=w.outlineWidth;O(V)||(V=1);let H=w.outlineColor;O(H)||(H=At.WHITE);let q=new co({geometry:R,modelMatrix:F,attributes:{color:Yo.fromColor(k)}});if(y.push(q),U){let ie=I._outlineGeometry;if(!O(ie)){let oe;oe=new Lie({vertexFormat:Wr.POSITION_ONLY,angle:Q,radius:M}),I._outlineGeometry=Lie.createGeometry(oe),ie=I._outlineGeometry}let Z=new co({geometry:ie,modelMatrix:F,attributes:{color:Yo.fromColor(H)}});x.push(Z)}}y.length>0&&(this._primitive=this._primitives.add(new $a({asynchronous:!1,geometryInstances:y,appearance:new za({flat:!1,translucent:!0,closed:!0})}))),x.length>0&&(this._outlinePrimitive=this._primitives.add(new $a({asynchronous:!1,geometryInstances:x,appearance:new za({flat:!0,translucent:!0,renderState:{lineWidth:this._scene.clampLineWidth(outlineWidth)}})})))};var _lt=mW,eTi={encNONE:0,enrS3TCDXTN:14,enrPVRTPF_PVRTC2:19,enrPVRTPF_PVRTC:20,enrPVRTPF_PVRTC_4bpp:21,enrPVRTPF_ETC1:22},Blt=Object.freeze(eTi),tTi={LUMINANCE_8:1,LUMINANCE_16:2,ALPHA:3,ALPHA_4_LUMINANCE_4:4,LUMINANCE_ALPHA:5,RGB_565:6,BGR565:7,RGB:10,BGR:11,ARGB:12,ABGR:13,BGRA:14,WEBP:25,RGBA:28,DXT1:17,DXT2:18,DXT3:19,DXT4:20,DXT5:21},wlt=Object.freeze(tTi);function eY(o){this._show=void 0,this._radius=void 0,this._xHalfAngle=void 0,this._yHalfAngle=void 0,this._lineColor=void 0,this._showSectorLines=void 0,this._showSectorSegmentLines=void 0,this._showLateralSurfaces=void 0,this._material=void 0,this._showDomeSurfaces=void 0,this._showDomeLines=void 0,this._showIntersection=void 0,this._intersectionColor=void 0,this._intersectionWidth=void 0,this._showThroughEllipsoid=void 0,this._gaze=void 0,this._showScanPlane=void 0,this._scanPlaneColor=void 0,this._scanPlaneMode=void 0,this._scanPlaneRate=void 0,this._definitionChanged=new br,this.merge(Ae(o,Ae.EMPTY_OBJECT))}Object.defineProperties(eY.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:Bi("show"),radius:Bi("radius"),xHalfAngle:Bi("xHalfAngle"),yHalfAngle:Bi("yHalfAngle"),lineColor:Bi("lineColor"),showSectorLines:Bi("showSectorLines"),showSectorSegmentLines:Bi("showSectorSegmentLines"),showLateralSurfaces:Bi("showLateralSurfaces"),material:hy("material"),showDomeSurfaces:Bi("showDomeSurfaces"),showDomeLines:Bi("showDomeLines "),showIntersection:Bi("showIntersection"),intersectionColor:Bi("intersectionColor"),intersectionWidth:Bi("intersectionWidth"),showThroughEllipsoid:Bi("showThroughEllipsoid"),gaze:Bi("gaze"),showScanPlane:Bi("showScanPlane"),scanPlaneColor:Bi("scanPlaneColor"),scanPlaneMode:Bi("scanPlaneMode"),scanPlaneRate:Bi("scanPlaneRate")});eY.prototype.clone=function(o){return O(o)||(o=new eY),o.show=this.show,o.radius=this.radius,o.xHalfAngle=this.xHalfAngle,o.yHalfAngle=this.yHalfAngle,o.lineColor=this.lineColor,o.showSectorLines=this.showSectorLines,o.showSectorSegmentLines=this.showSectorSegmentLines,o.showLateralSurfaces=this.showLateralSurfaces,o.material=this.material,o.showDomeSurfaces=this.showDomeSurfaces,o.showDomeLines=this.showDomeLines,o.showIntersection=this.showIntersection,o.intersectionColor=this.intersectionColor,o.intersectionWidth=this.intersectionWidth,o.showThroughEllipsoid=this.showThroughEllipsoid,o.gaze=this.gaze,o.showScanPlane=this.showScanPlane,o.scanPlaneColor=this.scanPlaneColor,o.scanPlaneMode=this.scanPlaneMode,o.scanPlaneRate=this.scanPlaneRate,o};eY.prototype.merge=function(o){if(!O(o))throw new Ui("source is required.");this.show=Ae(this.show,o.show),this.radius=Ae(this.radius,o.radius),this.xHalfAngle=Ae(this.xHalfAngle,o.xHalfAngle),this.yHalfAngle=Ae(this.yHalfAngle,o.yHalfAngle),this.lineColor=Ae(this.lineColor,o.lineColor),this.showSectorLines=Ae(this.showSectorLines,o.showSectorLines),this.showSectorSegmentLines=Ae(this.showSectorSegmentLines,o.showSectorSegmentLines),this.showLateralSurfaces=Ae(this.showLateralSurfaces,o.showLateralSurfaces),this.material=Ae(this.material,o.material),this.showDomeSurfaces=Ae(this.showDomeSurfaces,o.showDomeSurfaces),this.showDomeLines=Ae(this.showDomeLines,o.showDomeLines),this.showIntersection=Ae(this.showIntersection,o.showIntersection),this.intersectionColor=Ae(this.intersectionColor,o.intersectionColor),this.intersectionWidth=Ae(this.intersectionWidth,o.intersectionWidth),this.showThroughEllipsoid=Ae(this.showThroughEllipsoid,o.showThroughEllipsoid),this.gaze=Ae(this.gaze,o.gaze),this.showScanPlane=Ae(this.showScanPlane,o.showScanPlane),this.scanPlaneColor=Ae(this.scanPlaneColor,o.scanPlaneColor),this.scanPlaneMode=Ae(this.scanPlaneMode,o.scanPlaneMode),this.scanPlaneRate=Ae(this.scanPlaneRate,o.scanPlaneRate)};var blt=eY;function iTi(o,A,f){let m;try{return m=o(A,f),m}catch(C){return Promise.reject(C)}}function rTi(o){let A;return function(f){let m=f.data,C=[],y={id:m.id,result:void 0,error:void 0};return Promise.resolve(iTi(o,m.parameters,C)).then(function(x){y.result=x}).catch(function(x){x instanceof Error?y.error={name:x.name,message:x.message,stack:x.stack}:y.error=x}).finally(function(){O(A)||(A=Ae(self.webkitPostMessage,self.postMessage)),m.canTransferArrayBuffer||(C.length=0);try{A(y,C)}catch(x){y.result=void 0,y.error=`postMessage failed with error: ${D5(x)}
  with responseMessage: ${JSON.stringify(y)}`,A(y)}})}}var Qlt=rTi,Slt="1.99";var _r={};sde(_r,{AlphaMode:()=>b8,AlphaPipelineStage:()=>E1e,Animation:()=>Ibe,AnimationViewModel:()=>_be,Appearance:()=>Sd,ApproximateTerrainHeights:()=>eh,ArcGISTiledElevationTerrainProvider:()=>Rat,ArcGisMapServerImageryProvider:()=>qb,ArcType:()=>Pa,ArticulationStageType:()=>b_,AssociativeArray:()=>Vo,AttributeCompression:()=>Mu,AttributeType:()=>Is,AutoExposure:()=>$Qe,AutomaticUniforms:()=>BG,Axis:()=>vp,AxisAlignedBoundingBox:()=>xY,B3dmLoader:()=>TBe,B3dmParser:()=>SBe,Base64Encoder:()=>Nee,BaseLayerPicker:()=>wbe,BaseLayerPickerViewModel:()=>Bbe,BatchTable:()=>hre,BatchTableHierarchy:()=>Qne,BatchTexture:()=>Q1,BatchTexturePipelineStage:()=>I1e,Billboard:()=>Zh,BillboardCollection:()=>iI,BillboardGraphics:()=>eP,BillboardVisualizer:()=>c_e,BingMapsApi:()=>Lat,BingMapsGeocoderService:()=>Nat,BingMapsImageryProvider:()=>Tbe,BingMapsStyle:()=>Dbe,BlendEquation:()=>sx,BlendFunction:()=>LA,BlendOption:()=>tf,BlendTexture:()=>X8,BlendingState:()=>Bu,BoundingRectangle:()=>Kr,BoundingSphere:()=>wi,BoundingSphereState:()=>ro,BoxEmitter:()=>wst,BoxGeometry:()=>LM,BoxGeometryUpdater:()=>A_e,BoxGraphics:()=>gre,BoxOutlineGeometry:()=>r2,BrdfLutGenerator:()=>lQe,Buffer:()=>vo,BufferLoader:()=>ZY,BufferUsage:()=>ln,CPUStylingPipelineStage:()=>b1e,CallbackProperty:()=>Bn,Camera:()=>Ml,CameraEventAggregator:()=>cSe,CameraEventType:()=>Bc,CameraFlightPath:()=>UIe,Cartesian2:()=>It,Cartesian3:()=>ee,Cartesian4:()=>ai,Cartographic:()=>Kt,CartographicGeocoderService:()=>kSe,CatmullRomSpline:()=>kat,Cesium3DContentGroup:()=>kne,Cesium3DTile:()=>Ov,Cesium3DTileBatchTable:()=>pJ,Cesium3DTileColorBlendMode:()=>bD,Cesium3DTileContent:()=>bst,Cesium3DTileContentFactory:()=>Vne,Cesium3DTileContentState:()=>NA,Cesium3DTileContentType:()=>Bv,Cesium3DTileFeature:()=>Ts,Cesium3DTileFeatureTable:()=>P6,Cesium3DTileOptimizationHint:()=>XL,Cesium3DTileOptimizations:()=>ibe,Cesium3DTilePass:()=>Ep,Cesium3DTilePassState:()=>wP,Cesium3DTilePointFeature:()=>Rk,Cesium3DTileRefine:()=>Ay,Cesium3DTileStyle:()=>mY,Cesium3DTileStyleEngine:()=>obe,Cesium3DTilesInspector:()=>E2e,Cesium3DTilesInspectorViewModel:()=>v2e,Cesium3DTileset:()=>Fx,Cesium3DTilesetCache:()=>rbe,Cesium3DTilesetGraphics:()=>xre,Cesium3DTilesetHeatmap:()=>nbe,Cesium3DTilesetMetadata:()=>tbe,Cesium3DTilesetMostDetailedTraversal:()=>zne,Cesium3DTilesetStatistics:()=>Wk,Cesium3DTilesetTraversal:()=>dN,Cesium3DTilesetVisualizer:()=>lbe,CesiumInspector:()=>_2e,CesiumInspectorViewModel:()=>I2e,CesiumNavigation:()=>zDe,CesiumRenderPass:()=>KDe,CesiumTerrainProvider:()=>RJ,CesiumWidget:()=>jJ,Check:()=>of,CheckerboardMaterialProperty:()=>lie,CircleEmitter:()=>a2e,CircleGeometry:()=>Oat,CircleOutlineGeometry:()=>Uat,CircleWaveMaterialProperty:()=>Z8,ClassificationModelDrawCommand:()=>qBe,ClassificationPipelineStage:()=>_1e,ClassificationPrimitive:()=>s6,ClassificationType:()=>Gu,ClearCommand:()=>eA,ClippingPlane:()=>kM,ClippingPlaneCollection:()=>rB,Clock:()=>z5,ClockRange:()=>aC,ClockStep:()=>jh,ClockViewModel:()=>LSe,CloudCollection:()=>Rst,CloudType:()=>wie,CollectionSource:()=>hJe,Color:()=>At,ColorBlendMode:()=>HD,ColorGeometryInstanceAttribute:()=>Yo,ColorMaterialProperty:()=>Fa,Command:()=>Iat,ComponentDatatype:()=>ei,Composite3DTileContent:()=>Bwe,CompositeEntityCollection:()=>$ot,CompositeMaterialProperty:()=>cie,CompositePositionProperty:()=>U_,CompositeProperty:()=>P1,CompressedTextureBuffer:()=>oY,ComputeCommand:()=>B5,ComputeEngine:()=>$be,ConditionsExpression:()=>bEe,ConeEmitter:()=>vH,ConicArcSensor:()=>Mie,ConicArcSensorCollection:()=>_lt,ConicArcSensorGeometry:()=>Rie,ConicArcSensorGraphics:()=>Tie,ConicArcSensorOutlineGeometry:()=>Lie,ConstantPositionProperty:()=>_D,ConstantProperty:()=>bc,ConstantSpline:()=>NBe,ConstructionWorker:()=>fJe,ContentMetadata:()=>Ywe,ContentState:()=>yD,Context:()=>aQe,ContextLimits:()=>yo,CoplanarPolygonGeometry:()=>b_e,CoplanarPolygonGeometryLibrary:()=>UG,CoplanarPolygonOutlineGeometry:()=>tM,CornerType:()=>ZA,CorridorGeometry:()=>GY,CorridorGeometryLibrary:()=>Gc,CorridorGeometryUpdater:()=>f_e,CorridorGraphics:()=>pre,CorridorOutlineGeometry:()=>d_e,Credit:()=>tl,CreditDisplay:()=>uQe,CubeMap:()=>lQ,CubeMapFace:()=>DL,CubicRealPolynomial:()=>yY,CullFace:()=>CA,CullingVolume:()=>AC,CumulusCloud:()=>TQ,CustomDataSource:()=>Ire,CustomHeightmapTerrainProvider:()=>Gat,CustomMercatorProjection:()=>t6,CustomShader:()=>ZM,CustomShaderManagerEx:()=>sre,CustomShaderMode:()=>gY,CustomShaderPipelineStage:()=>R1e,CustomShaderTranslucencyMode:()=>BF,CustomTilingScheme:()=>jJe,CylinderGeometry:()=>g_e,CylinderGeometryLibrary:()=>ine,CylinderGeometryUpdater:()=>m_e,CylinderGraphics:()=>mre,CylinderOutlineGeometry:()=>p_e,CzmlDataSource:()=>iW,DDSTexture:()=>B2e,DataSource:()=>cy,DataSourceClock:()=>A5,DataSourceCollection:()=>l_e,DataSourceDisplay:()=>_J,DebugAppearance:()=>Ost,DebugCameraPrimitive:()=>_g,DebugInspector:()=>xSe,DebugModelMatrixPrimitive:()=>c2e,DefaultProxy:()=>ZIe,DepthFunction:()=>nI,DepthPlane:()=>hQe,DequantizationPipelineStage:()=>L1e,DerivedCommand:()=>fx,DeveloperError:()=>Ui,DeviceOrientationCameraController:()=>dQe,DirectionalLight:()=>xae,DiscardEmptyTileImagePolicy:()=>soe,DiscardMissingTileImagePolicy:()=>Qbe,DistanceDisplayCondition:()=>$o,DistanceDisplayConditionGeometryInstanceAttribute:()=>vA,DistanceLegendViewModel:()=>LDe,DoubleEndedPriorityQueue:()=>zat,DoublyLinkedList:()=>qne,DracoLoader:()=>$Y,DrawCommand:()=>On,DynamicGeometryBatch:()=>rne,DynamicGeometryUpdater:()=>EA,ECharts:()=>XJe,EarthOrientationParameters:()=>Dye,EarthOrientationParametersSample:()=>sY,EasingFunction:()=>Ix,EllipseGeometry:()=>W1,EllipseGeometryLibrary:()=>iB,EllipseGeometryUpdater:()=>C_e,EllipseGraphics:()=>Cre,EllipseOutlineGeometry:()=>UD,Ellipsoid:()=>Di,EllipsoidGeodesic:()=>l0,EllipsoidGeometry:()=>gC,EllipsoidGeometryUpdater:()=>E_e,EllipsoidGraphics:()=>u6,EllipsoidOutlineGeometry:()=>J1,EllipsoidPrimitive:()=>Zbe,EllipsoidRhumbLine:()=>k1,EllipsoidSurfaceAppearance:()=>MY,EllipsoidTangentPlane:()=>eQ,EllipsoidTerrainProvider:()=>IP,EllipsoidalOccluder:()=>L5,Empty3DTileContent:()=>LK,EncodedCartesian3:()=>Pu,Entity:()=>UA,EntityCluster:()=>eN,EntityCollection:()=>iw,EntityView:()=>$ne,Event:()=>br,EventHelper:()=>Mx,ExpandBySmartEarth:()=>UE,ExpandByTerra:()=>ZJe,Expression:()=>wF,ExpressionNodeType:()=>jn,ExternalParameter:()=>px,ExtrapolationType:()=>mD,FeatureDataProvider:()=>Nre,FeatureDetection:()=>Mo,FeatureIdPipelineStage:()=>dJ,FeatureJsonData:()=>m6,FisheyeProjectionMap:()=>NY,FisheyeProjectionMapShader:()=>C7,FlattenVS:()=>i1e,FlowEcharts:()=>dae,Fog:()=>fQe,ForEach:()=>Vr,FrameRateMonitor:()=>A2e,FrameState:()=>gQe,Framebuffer:()=>Bp,FramebufferManager:()=>qh,FrustumCommands:()=>xQe,FrustumGeometry:()=>C6,FrustumOutlineGeometry:()=>FY,Fullscreen:()=>yp,FullscreenButton:()=>NSe,FullscreenButtonViewModel:()=>FSe,GWBaiduImageryProvider:()=>Kre,GeoJsonDataSource:()=>mK,GeoJsonLoader:()=>RBe,GeocodeType:()=>XJ,Geocoder:()=>VSe,GeocoderService:()=>Yat,GeocoderViewModel:()=>HSe,GeographicProjection:()=>Dg,GeographicTilingScheme:()=>af,Geometry:()=>Zo,Geometry3DTileContent:()=>wwe,GeometryAttribute:()=>Yr,GeometryAttributes:()=>yc,GeometryFactory:()=>Wat,GeometryInstance:()=>co,GeometryInstanceAttribute:()=>k_,GeometryOffsetAttribute:()=>Cl,GeometryPipeline:()=>rc,GeometryPipelineStage:()=>k1e,GeometryType:()=>GL,GeometryUpdater:()=>nh,GeometryVisualizer:()=>V_e,GetFeatureInfoFormat:()=>T7,GifImageProperty:()=>hXe,Globe:()=>voe,GlobeDepth:()=>vQe,GlobeSurfaceShaderSet:()=>Hbe,GlobeSurfaceTile:()=>zM,GlobeSurfaceTileProvider:()=>Kbe,GlobeTranslucency:()=>LJ,GlobeTranslucencyFramebuffer:()=>EQe,GlobeTranslucencyState:()=>mQe,GltfBufferViewLoader:()=>hne,GltfDracoLoader:()=>dne,GltfImageLoader:()=>gne,GltfIndexBufferLoader:()=>pne,GltfJsonLoader:()=>yne,GltfLoader:()=>aJ,GltfLoaderUtil:()=>OM,GltfStructuralMetadataLoader:()=>xBe,GltfTextureLoader:()=>xne,GltfVertexBufferLoader:()=>vne,GoogleEarthEnterpriseImageryProvider:()=>Ust,GoogleEarthEnterpriseMapsProvider:()=>Pbe,GoogleEarthEnterpriseMetadata:()=>EN,GoogleEarthEnterpriseTerrainData:()=>Bie,GoogleEarthEnterpriseTerrainProvider:()=>est,GoogleEarthEnterpriseTileInformation:()=>t2e,GpxDataSource:()=>DDe,Graticules:()=>fXe,GraticulesImageryProvider:()=>m5,GregorianDate:()=>$8,GridImageryProvider:()=>Gst,GridMaterialProperty:()=>Aie,GroundGeometryUpdater:()=>Xl,GroundPolylineGeometry:()=>ure,GroundPolylinePrimitive:()=>a6,GroundPrimitive:()=>nN,GroupMetadata:()=>kte,GwBufferAnalysis:()=>Yre,HeadingPitchRange:()=>Ex,HeadingPitchRoll:()=>dC,Heap:()=>YCe,HeightReference:()=>xn,HeightmapEncoding:()=>HF,HeightmapTerrainData:()=>wQ,HeightmapTessellator:()=>noe,HermitePolynomialApproximation:()=>pDe,HermiteSpline:()=>DK,HilbertOrder:()=>Pte,HomeButton:()=>KSe,HomeButtonViewModel:()=>zSe,HorizontalOrigin:()=>tA,HugeAdapter:()=>O6,I3SDataProvider:()=>Hst,I3SFeature:()=>f2e,I3SField:()=>g2e,I3SGeometry:()=>bie,I3SLayer:()=>Sie,I3SNode:()=>Qie,I3dmLoader:()=>FBe,I3dmParser:()=>LBe,Iau2000Orientation:()=>jbe,Iau2006XysData:()=>Mye,Iau2006XysSample:()=>qie,IauOrientationAxes:()=>qbe,IauOrientationParameters:()=>Wbe,ImageBasedLighting:()=>bne,ImageBasedLightingPipelineStage:()=>a1e,ImageCombine:()=>nre,ImageMaterialProperty:()=>z0,Imagery:()=>eoe,ImageryLayer:()=>dD,ImageryLayerCollection:()=>Ybe,ImageryLayerFeatureInfo:()=>gN,ImageryProvider:()=>a2,ImageryState:()=>sc,Implicit3DTileContent:()=>Nte,ImplicitAvailabilityBitstream:()=>Lte,ImplicitMetadataView:()=>Une,ImplicitSubdivisionScheme:()=>uC,ImplicitSubtree:()=>Twe,ImplicitSubtreeMetadata:()=>Dwe,ImplicitTileCoordinates:()=>sbe,ImplicitTileset:()=>abe,IndexDatatype:()=>Nn,InfoBox:()=>WSe,InfoBoxViewModel:()=>JSe,InspectorShared:()=>K8,InstanceAttributeSemantic:()=>nC,InstancingPipelineStage:()=>m1e,InterpolationAlgorithm:()=>tst,InterpolationType:()=>nF,Intersect:()=>La,IntersectionTests:()=>kA,Intersections2D:()=>$6,Interval:()=>fD,InvertClassification:()=>boe,Ion:()=>yF,IonGeocoderService:()=>GSe,IonImageryProvider:()=>WG,IonResource:()=>jk,IonWorldImageryStyle:()=>jG,Iso8601:()=>Cn,JobScheduler:()=>CQe,JobType:()=>KE,JsonMetadataTable:()=>JY,JulianDate:()=>fi,KTX2Transcoder:()=>jCe,KeyboardEventModifier:()=>eI,KmlCamera:()=>sIe,KmlDataSource:()=>Fre,KmlLookAt:()=>lIe,KmlTour:()=>uIe,KmlTourFlyTo:()=>cIe,KmlTourWait:()=>hIe,Label:()=>K7,LabelCollection:()=>qM,LabelGraphics:()=>c6,LabelStyle:()=>mA,LabelVisualizer:()=>z_e,LagrangePolynomialApproximation:()=>CDe,LeapSecond:()=>$c,Light:()=>zst,LightingModel:()=>rI,LightingPipelineStage:()=>U1e,LinearApproximation:()=>Tre,LinearSampler:()=>s2,LinearSpline:()=>hJ,MVTImageryProvider:()=>EXe,ManagedArray:()=>GM,MapMode2D:()=>rQ,MapProjection:()=>ost,MapWidget:()=>Clt,MapboxApi:()=>nst,MapboxImageryProvider:()=>SJ,MapboxStyleImageryProvider:()=>Yst,Material:()=>ss,MaterialAppearance:()=>Ig,MaterialPass:()=>b2e,MaterialPipelineStage:()=>H1e,MaterialProperty:()=>sC,Math:()=>je,Matrix2:()=>n0,Matrix3:()=>ci,Matrix4:()=>Xe,MetadataClass:()=>S6,MetadataClassProperty:()=>qY,MetadataComponentType:()=>$s,MetadataEntity:()=>su,MetadataEnum:()=>mBe,MetadataEnumValue:()=>pBe,MetadataPipelineStage:()=>IM,MetadataSchema:()=>rO,MetadataSchemaLoader:()=>Ene,MetadataSemantic:()=>Mwe,MetadataTable:()=>tO,MetadataTableProperty:()=>X_e,MetadataType:()=>Zs,MipmapHint:()=>q8,Model:()=>cI,Model3DTileContent:()=>FL,ModelAlphaOptions:()=>awe,ModelAnimation:()=>VBe,ModelAnimationChannel:()=>GBe,ModelAnimationCollection:()=>zBe,ModelAnimationLoop:()=>Ub,ModelAnimationState:()=>OL,ModelArticulation:()=>u1e,ModelArticulationStage:()=>l1e,ModelClippingPlanesPipelineStage:()=>h1e,ModelColorPipelineStage:()=>TK,ModelComponents:()=>ta,ModelDrawCommand:()=>XBe,ModelFeature:()=>KBe,ModelFeatureTable:()=>YBe,ModelGraphics:()=>EY,ModelLightingOptions:()=>ywe,ModelMatrixUpdateStage:()=>y1e,ModelNode:()=>d1e,ModelRenderResources:()=>hwe,ModelRuntimeNode:()=>v1e,ModelRuntimePrimitive:()=>rwe,ModelSceneGraph:()=>vwe,ModelSilhouettePipelineStage:()=>gwe,ModelSkin:()=>owe,ModelSplitterPipelineStage:()=>mwe,ModelStatistics:()=>Ewe,ModelType:()=>K0,ModelUtility:()=>au,ModelVisualizer:()=>_we,Moon:()=>Ioe,MorphTargetsPipelineStage:()=>z1e,MorphWeightSpline:()=>ast,MortonOrder:()=>D8,MultiResourceImageryProvider:()=>Jre,MultiResourceTerrainProvider:()=>Wre,Multiple3DTileContent:()=>Xwe,MultisampleFramebuffer:()=>bBe,NavigationControl:()=>hH,NavigationHelpButton:()=>qSe,NavigationHelpButtonViewModel:()=>jSe,NavigationUtils:()=>dH,NavigationViewModel:()=>F7,NearFarScalar:()=>To,NeverTileDiscardPolicy:()=>Jst,NodeRenderResources:()=>Cwe,NodeStatisticsPipelineStage:()=>x1e,NodeTransformationProperty:()=>yre,OIT:()=>wQe,Occluder:()=>zre,OctahedralProjectedCubeMap:()=>b5,OffsetGeometryInstanceAttribute:()=>a0,OlMVTImageryProvider:()=>qre,OpenCageGeocoderService:()=>sst,OpenStreetMapImageryProvider:()=>M7,OrderedGroundPrimitiveCollection:()=>u_e,OrientedBoundingBox:()=>Hf,OrthographicFrustum:()=>Ds,OrthographicOffCenterFrustum:()=>Y0,Packable:()=>lst,PackableForInterpolation:()=>ust,Particle:()=>vae,ParticleBurst:()=>_H,ParticleEmitter:()=>qst,ParticleSystem:()=>_2,Pass:()=>hr,PassState:()=>cm,PathGraphics:()=>IY,PathVisualizer:()=>ube,PeliasGeocoderService:()=>USe,PerInstanceColorAppearance:()=>za,PerformanceDisplay:()=>GJ,PerformanceWatchdog:()=>V2e,PerformanceWatchdogViewModel:()=>H2e,PerspectiveFrustum:()=>Yu,PerspectiveOffCenterFrustum:()=>n2,PerspectiveProjectionMap:()=>kY,PerspectiveProjectionMapShader:()=>y7,PerspectiveProjectionMapWithDepth:()=>OY,PerspectiveProjectionMapWithDepthShader:()=>rF,PickDepth:()=>yQe,PickDepthFramebuffer:()=>bQe,PickFramebuffer:()=>QQe,PickGlobeSlope:()=>Pot,Picking:()=>RQe,PickingPipelineStage:()=>K1e,PinBuilder:()=>bY,PixelDatatype:()=>wn,PixelFormat:()=>Gn,Plane:()=>Wa,PlaneGeometry:()=>I_e,PlaneGeometryUpdater:()=>w_e,PlaneGraphics:()=>jEe,PlaneOutlineGeometry:()=>__e,PntsLoader:()=>Iwe,PntsParser:()=>Nne,PointCloud:()=>ybe,PointCloudEyeDomeLighting:()=>lJ,PointCloudShading:()=>M6,PointCloudStylingPipelineStage:()=>J1e,PointGraphics:()=>vre,PointPrimitive:()=>Tx,PointPrimitiveCollection:()=>uY,PointVisualizer:()=>cbe,PolygonDepth:()=>Q8,PolygonDepthFS:()=>Mne,PolygonDepthVS:()=>Pne,PolygonGeometry:()=>rh,PolygonGeometryLibrary:()=>ql,PolygonGeometryUpdater:()=>S_e,PolygonGraphics:()=>yl,PolygonHierarchy:()=>Un,PolygonOutlineGeometry:()=>Q_e,PolygonPipeline:()=>xA,Polyline:()=>t2,PolylineArrowMaterialProperty:()=>IK,PolylineCollection:()=>Y5,PolylineColorAppearance:()=>ly,PolylineDashMaterialProperty:()=>Vl,PolylineGeometry:()=>Vk,PolylineGeometryUpdater:()=>Abe,PolylineGlowMaterialProperty:()=>hie,PolylineGraphics:()=>FD,PolylineMaterialAppearance:()=>L_,PolylineOutlineMaterialProperty:()=>JM,PolylinePipeline:()=>XA,PolylineTrailLinkMaterialProperty:()=>Rot,PolylineVisualizer:()=>dbe,PolylineVolumeGeometry:()=>D_e,PolylineVolumeGeometryLibrary:()=>C5,PolylineVolumeGeometryUpdater:()=>M_e,PolylineVolumeGraphics:()=>Ere,PolylineVolumeOutlineGeometry:()=>T_e,PositionProperty:()=>vY,PositionPropertyArray:()=>f8,PostProcessStage:()=>va,PostProcessStageCollection:()=>aSe,PostProcessStageComposite:()=>CC,PostProcessStageLibrary:()=>bv,PostProcessStageSampleMode:()=>Dv,PostProcessStageTextureCache:()=>Roe,Primitive:()=>$a,PrimitiveCollection:()=>MD,PrimitiveLoadPlan:()=>oJ,PrimitiveOutlineGenerator:()=>Bne,PrimitiveOutlinePipelineStage:()=>q1e,PrimitivePipeline:()=>s5,PrimitiveRenderResources:()=>xwe,PrimitiveState:()=>i0,PrimitiveStatisticsPipelineStage:()=>X1e,PrimitiveType:()=>yn,ProjectionPicker:()=>ZSe,ProjectionPickerViewModel:()=>XSe,Property:()=>Nt,PropertyArray:()=>lae,PropertyAttribute:()=>Ane,PropertyAttributeProperty:()=>W_e,PropertyBag:()=>LD,PropertyTable:()=>cN,PropertyTexture:()=>cne,PropertyTextureProperty:()=>Y_e,ProviderViewModel:()=>fp,Proxy:()=>hst,QuadraticRealPolynomial:()=>Vb,QuadtreeOccluders:()=>moe,QuadtreePrimitive:()=>BP,QuadtreePrimitivezh:()=>Not,QuadtreeTile:()=>Coe,QuadtreeTileLoadState:()=>mC,QuadtreeTileProvider:()=>Xst,QuantizedMeshTerrainData:()=>doe,QuarticRealPolynomial:()=>MEe,Quaternion:()=>jr,QuaternionSpline:()=>OBe,Queue:()=>d5,RasterizeHtml:()=>lH,Ray:()=>ls,Rectangle:()=>Si,RectangleCollisionChecker:()=>sne,RectangleGeometry:()=>VY,RectangleGeometryLibrary:()=>uy,RectangleGeometryUpdater:()=>k_e,RectangleGraphics:()=>A6,RectangleOutlineGeometry:()=>one,RectangularSensor:()=>qK,RectangularSensorFS:()=>xie,RectangularSensorGraphics:()=>blt,RectangularSensorPrimitive:()=>WDe,RectangularSensorScanPlaneFS:()=>JDe,RectangularSensorVS:()=>pae,RectangularSensorVisualizer:()=>jDe,ReferenceFrame:()=>s0,ReferenceProperty:()=>DY,RenderEntity:()=>gW,RenderObjectFactory:()=>zc,RenderState:()=>fn,Renderbuffer:()=>G_,RenderbufferFormat:()=>qE,Request:()=>cC,RequestErrorEvent:()=>r5,RequestScheduler:()=>V1,RequestState:()=>yA,RequestType:()=>oB,ResetViewNavigationControl:()=>kDe,Resource:()=>An,ResourceCache:()=>sf,ResourceCacheKey:()=>nw,ResourceCacheStatistics:()=>yBe,ResourceLoader:()=>fy,ResourceLoaderState:()=>ha,Rotation:()=>YD,RuntimeError:()=>nr,S2Cell:()=>KG,S3MCacheFileRenderEntity:()=>Die,S3MCompressType:()=>Blt,S3MContentFactory:()=>R2e,S3MContentParser:()=>L2e,S3MCreateIndexJob:()=>P2e,S3MCreateVertexJob:()=>T2e,S3MDataSource:()=>Got,S3MLayerCache:()=>F2e,S3MLayerScheduler:()=>N2e,S3MPixelFormat:()=>wlt,S3MTile:()=>O2e,S3MTilesFS:()=>S2e,S3MTilesLayer:()=>Bae,S3MTilesVS:()=>Q2e,S3ModelParser:()=>k2e,SDFSettings:()=>Qv,SampledPositionProperty:()=>R1,SampledProperty:()=>uM,Sampler:()=>Qs,ScaledPositionProperty:()=>g6,Scene:()=>koe,SceneFramebuffer:()=>Soe,SceneMode:()=>xi,SceneMode2DPipelineStage:()=>Z1e,SceneModePicker:()=>eDe,SceneModePickerViewModel:()=>$Se,SceneTransforms:()=>Ss,SceneTransitioner:()=>uSe,ScreenSpaceCameraController:()=>pSe,ScreenSpaceEventHandler:()=>Ur,ScreenSpaceEventType:()=>Ki,SelectedFeatureIdPipelineStage:()=>MK,SelectionIndicator:()=>iDe,SelectionIndicatorViewModel:()=>tDe,Sensor:()=>Mat,ShaderBuilder:()=>Awe,ShaderCache:()=>tQe,ShaderDestination:()=>Sr,ShaderFunction:()=>cwe,ShaderProgram:()=>_s,ShaderSource:()=>Fr,ShaderStruct:()=>lwe,ShadowMap:()=>xQ,ShadowMapShader:()=>gF,ShadowMode:()=>Al,ShadowVolumeAppearance:()=>gM,ShowGeometryInstanceAttribute:()=>wu,Simon1994PlanetaryPositions:()=>UK,SimplePolylineGeometry:()=>dst,SingleTileImageryProvider:()=>bQ,SkinningPipelineStage:()=>ewe,SkyAtmosphere:()=>sH,SkyBox:()=>mN,SphereEmitter:()=>BH,SphereGeometry:()=>fst,SphereOutlineGeometry:()=>tP,Spherical:()=>yDe,Spline:()=>uf,SplitDirection:()=>uI,Splitter:()=>roe,SpotLight:()=>Vot,StaticGeometryColorBatch:()=>AM,StaticGeometryPerMaterialBatch:()=>hM,StaticGroundGeometryColorBatch:()=>_te,StaticGroundGeometryPerMaterialBatch:()=>O_e,StaticGroundPolylinePerMaterialBatch:()=>hbe,StaticOutlineGeometryBatch:()=>Bte,StencilConstants:()=>ca,StencilFunction:()=>Ku,StencilOperation:()=>lo,SteppedSpline:()=>kBe,StripeMaterialProperty:()=>die,StripeOrientation:()=>jF,StructuralMetadata:()=>nP,StyleCommandsNeeded:()=>Q5,StyleExpression:()=>Zst,Sun:()=>Uoe,SunLight:()=>iH,SunPostProcess:()=>ySe,SupportedImageFormats:()=>vBe,SvgPathBindingHandler:()=>Ebe,TaskProcessor:()=>Vf,TerrainData:()=>AO,TerrainEncoding:()=>HM,TerrainExaggeration:()=>ID,TerrainFillMesh:()=>goe,TerrainFlatten:()=>xN,TerrainFlattenPolygonTexture:()=>MDe,TerrainMesh:()=>hO,TerrainOffsetProperty:()=>tne,TerrainProvider:()=>Cx,TerrainQuantization:()=>Pv,TerrainState:()=>xh,Texture:()=>mo,TextureAtlas:()=>z7,TextureCache:()=>iQe,TextureMagnificationFilter:()=>th,TextureManager:()=>BEe,TextureMinificationFilter:()=>as,TextureUniform:()=>IEe,TextureWrap:()=>Va,TileAvailability:()=>ZL,TileBoundingRegion:()=>S5,TileBoundingS2Cell:()=>Zwe,TileBoundingSphere:()=>yP,TileBoundingVolume:()=>$st,TileCoordinatesImageryProvider:()=>y2e,TileDiscardPolicy:()=>elt,TileEdge:()=>Ga,TileImagery:()=>toe,TileMapServiceImageryProvider:()=>_P,TileMetadata:()=>Wwe,TileOrientedBoundingBox:()=>NF,TileProviderError:()=>wc,TileReplacementQueue:()=>xoe,TileSelectionResult:()=>sa,TileState:()=>tlt,Tileset3DTileContent:()=>Rwe,TilesetMetadata:()=>ebe,TilesetPipelineStage:()=>n1e,TilingScheme:()=>gst,TimeConstants:()=>Uu,TimeDynamicImagery:()=>Aoe,TimeDynamicPointCloud:()=>Y6,TimeInterval:()=>el,TimeIntervalCollection:()=>mx,TimeIntervalCollectionPositionProperty:()=>T8,TimeIntervalCollectionProperty:()=>g8,TimeStandard:()=>nu,Timeline:()=>oDe,TimelineHighlightRange:()=>rDe,TimelineTrack:()=>nDe,Tipsify:()=>HEe,ToggleButtonViewModel:()=>vG,Tonemapper:()=>ZG,Transforms:()=>Vn,TranslationRotationScale:()=>aB,TranslucentTileClassification:()=>DQe,TridiagonalSystemSolver:()=>Sne,TrustedServers:()=>Vie,TweenCollection:()=>Foe,UniformState:()=>rQe,UniformType:()=>pa,UrlTemplateGeojsonProvider:()=>Yot,UrlTemplateImageryProvider:()=>sw,UserInterfaceControl:()=>gae,Utils:()=>dQ,VERSION:()=>Slt,VRButton:()=>sDe,VRButtonViewModel:()=>aDe,VRTheWorldTerrainProvider:()=>Cst,VaryingType:()=>xx,Vector3DTileBatch:()=>S8,Vector3DTileClampedPolylines:()=>Uwe,Vector3DTileContent:()=>Vwe,Vector3DTileGeometry:()=>Bk,Vector3DTilePoints:()=>Lwe,Vector3DTilePolygons:()=>Fwe,Vector3DTilePolylines:()=>Hne,Vector3DTilePrimitive:()=>One,VelocityOrientationProperty:()=>xDe,VelocityVectorProperty:()=>uae,VertexArray:()=>Vc,VertexArrayFacade:()=>lY,VertexAttributeSemantic:()=>Fo,VertexCompressOption:()=>_1,VertexFormat:()=>Wr,VerticalOrigin:()=>bn,VideoSynchronizer:()=>pst,View:()=>Toe,ViewShed:()=>Xet,ViewShedMap:()=>oH,ViewShedMapShader:()=>vF,Viewer:()=>$J,ViewportQuad:()=>ilt,Visibility:()=>vg,Visualizer:()=>Cat,VulkanConstants:()=>yst,WallGeometry:()=>U_e,WallGeometryLibrary:()=>lne,WallGeometryUpdater:()=>H_e,WallGraphics:()=>_Y,WallOutlineGeometry:()=>G_e,WaterFS:()=>PY,WaterMaterialProperty:()=>Jot,WebGLConstants:()=>Ii,WebMapServiceImageryProvider:()=>MJ,WebMapTileServiceImageryProvider:()=>Z6,WebMercatorProjection:()=>OA,WebMercatorTilingScheme:()=>Am,WindingOrder:()=>Z_,WireframeIndexGenerator:()=>Lne,WireframePipelineStage:()=>iwe,ZoomNavigationControl:()=>mie,_shadersAcesTonemappingStage:()=>LQe,_shadersAdditiveBlend:()=>mSe,_shadersAdjustTranslucentFS:()=>Xte,_shadersAllMaterialAppearanceFS:()=>bIe,_shadersAllMaterialAppearanceVS:()=>QIe,_shadersAmbientOcclusionGenerate:()=>FQe,_shadersAmbientOcclusionModulate:()=>NQe,_shadersAspectRampMaterial:()=>XCe,_shadersAtmosphereCommon:()=>L8,_shadersBasicMaterialAppearanceFS:()=>SIe,_shadersBasicMaterialAppearanceVS:()=>DIe,_shadersBillboardCollectionFS:()=>sEe,_shadersBillboardCollectionVS:()=>lEe,_shadersBlackAndWhite:()=>kQe,_shadersBloomComposite:()=>OQe,_shadersBrdfLutGeneratorFS:()=>sQe,_shadersBrightPass:()=>CSe,_shadersBrightness:()=>UQe,_shadersBumpMapMaterial:()=>ZCe,_shadersCPUStylingStageFS:()=>w1e,_shadersCPUStylingStageVS:()=>B1e,_shadersCheckFloatTexturePrecisionFS:()=>Wot,_shadersCheckerboardMaterial:()=>$Ce,_shadersCloudCollectionFS:()=>cDe,_shadersCloudCollectionVS:()=>ADe,_shadersCloudNoiseFS:()=>hDe,_shadersCloudNoiseVS:()=>dDe,_shadersCompareAndPackTranslucentDepth:()=>SQe,_shadersCompositeOITFS:()=>IQe,_shadersCompositeTranslucentClassification:()=>P7,_shadersContrastBias:()=>GQe,_shadersCustomShaderStageFS:()=>S1e,_shadersCustomShaderStageVS:()=>Q1e,_shadersCzmBuiltins:()=>l7,_shadersDepthOfField:()=>HQe,_shadersDepthPlaneFS:()=>cQe,_shadersDepthPlaneVS:()=>AQe,_shadersDepthView:()=>VQe,_shadersDepthViewPacked:()=>vst,_shadersDotMaterial:()=>eye,_shadersEdgeDetection:()=>zQe,_shadersElevationBandMaterial:()=>tye,_shadersElevationContourMaterial:()=>iye,_shadersElevationRampMaterial:()=>rye,_shadersEllipsoidFS:()=>jte,_shadersEllipsoidSurfaceAppearanceFS:()=>PIe,_shadersEllipsoidSurfaceAppearanceVS:()=>RIe,_shadersEllipsoidVS:()=>qte,_shadersFXAA:()=>YQe,_shadersFXAA3_11:()=>ZQe,_shadersFadeMaterial:()=>nye,_shadersFeatureIdStageFS:()=>D1e,_shadersFeatureIdStageVS:()=>T1e,_shadersFilmicTonemapping:()=>KQe,_shadersGaussianBlur1D:()=>VK,_shadersGaussianBlur1DSun:()=>tSe,_shadersGeometryStageFS:()=>F1e,_shadersGeometryStageVS:()=>N1e,_shadersGlobeFS:()=>Obe,_shadersGlobeVS:()=>Ube,_shadersGridMaterial:()=>oye,_shadersGroundAtmosphere:()=>Kte,_shadersHSBToRGB:()=>ave,_shadersHSLToRGB:()=>sve,_shadersImageBasedLightingStageFS:()=>o1e,_shadersInstancingStageCommon:()=>f1e,_shadersInstancingStageVS:()=>g1e,_shadersLegacyInstancingStageVS:()=>p1e,_shadersLensFlare:()=>JQe,_shadersLightingStageFS:()=>O1e,_shadersMaterialStageFS:()=>G1e,_shadersMetadataStageFS:()=>M1e,_shadersMetadataStageVS:()=>P1e,_shadersModelClippingPlanesStageFS:()=>A1e,_shadersModelColorStageFS:()=>c1e,_shadersModelFS:()=>JBe,_shadersModelSilhouetteStageFS:()=>dwe,_shadersModelSilhouetteStageVS:()=>fwe,_shadersModelSplitterStageFS:()=>pwe,_shadersModelVS:()=>WBe,_shadersModifiedReinhardTonemapping:()=>WQe,_shadersMorphTargetsStageVS:()=>V1e,_shadersNightVision:()=>jQe,_shadersNormalMapMaterial:()=>aye,_shadersOctahedralProjectionAtlasFS:()=>IBe,_shadersOctahedralProjectionFS:()=>_Be,_shadersOctahedralProjectionVS:()=>BBe,_shadersPassThrough:()=>KM,_shadersPassThroughDepth:()=>HK,_shadersPerInstanceColorAppearanceFS:()=>YEe,_shadersPerInstanceColorAppearanceVS:()=>JEe,_shadersPerInstanceFlatColorAppearanceFS:()=>cre,_shadersPerInstanceFlatColorAppearanceVS:()=>WEe,_shadersPointCloudEyeDomeLighting:()=>QBe,_shadersPointCloudStylingStageVS:()=>Y1e,_shadersPointPrimitiveCollectionFS:()=>cG,_shadersPointPrimitiveCollectionVS:()=>AEe,_shadersPolylineArrowMaterial:()=>sye,_shadersPolylineColorAppearanceVS:()=>kEe,_shadersPolylineCommon:()=>U5,_shadersPolylineDashMaterial:()=>lye,_shadersPolylineFS:()=>Are,_shadersPolylineGlowMaterial:()=>uye,_shadersPolylineMaterialAppearanceVS:()=>OEe,_shadersPolylineOutlineMaterial:()=>cye,_shadersPolylineShadowVolumeFS:()=>REe,_shadersPolylineShadowVolumeMorphFS:()=>LEe,_shadersPolylineShadowVolumeMorphVS:()=>FEe,_shadersPolylineShadowVolumeVS:()=>NEe,_shadersPolylineVS:()=>LIe,_shadersPostProcessRain:()=>Est,_shadersPostProcessSnow:()=>Ist,_shadersPrimitiveOutlineStageFS:()=>j1e,_shadersPrimitiveOutlineStageVS:()=>W1e,_shadersRGBToHSB:()=>Pve,_shadersRGBToHSL:()=>Rve,_shadersRGBToXYZ:()=>Lve,_shadersReinhardTonemapping:()=>qQe,_shadersReprojectWebMercatorFS:()=>gbe,_shadersReprojectWebMercatorVS:()=>pbe,_shadersRimLightingMaterial:()=>Aye,_shadersSelectedFeatureIdStageCommon:()=>Dte,_shadersShadowVolumeAppearanceFS:()=>fre,_shadersShadowVolumeAppearanceVS:()=>KEe,_shadersShadowVolumeFS:()=>Z7,_shadersSilhouette:()=>XQe,_shadersSkinningStageVS:()=>$1e,_shadersSkyAtmosphereCommon:()=>iie,_shadersSkyAtmosphereFS:()=>bSe,_shadersSkyAtmosphereVS:()=>QSe,_shadersSkyBoxFS:()=>DSe,_shadersSkyBoxVS:()=>TSe,_shadersSlopeRampMaterial:()=>hye,_shadersStripeMaterial:()=>dye,_shadersSunFS:()=>MSe,_shadersSunShaft:()=>_st,_shadersSunShaftHdr:()=>Bst,_shadersSunShaftModulate:()=>eSe,_shadersSunTextureFS:()=>jot,_shadersSunTextureFS_v2:()=>RSe,_shadersSunVS:()=>PSe,_shadersSunVisibleFS:()=>iSe,_shadersSunVisibleShaft:()=>rSe,_shadersSunVisibleVS:()=>t1e,_shadersTexturedMaterialAppearanceFS:()=>TIe,_shadersTexturedMaterialAppearanceVS:()=>MIe,_shadersVector3DTileClampedPolylinesFS:()=>Owe,_shadersVector3DTileClampedPolylinesVS:()=>kwe,_shadersVector3DTilePolylinesVS:()=>Nwe,_shadersVectorTileVS:()=>Mte,_shadersViewportQuadFS:()=>fDe,_shadersViewportQuadVS:()=>_oe,_shadersWater:()=>fye,_shadersXYZToRGB:()=>nEe,_shadersacesTonemapping:()=>Dxe,_shadersalphaWeight:()=>Txe,_shadersantialias:()=>Mxe,_shadersapproximateSphericalCoordinates:()=>Pxe,_shadersbackFacing:()=>Rxe,_shadersbranchFreeTernary:()=>Lxe,_shaderscascadeColor:()=>Fxe,_shaderscascadeDistance:()=>Nxe,_shaderscascadeMatrix:()=>kxe,_shaderscascadeWeights:()=>Oxe,_shaderscolumbusViewMorph:()=>Uxe,_shaderscomputePosition:()=>Gxe,_shaderscosineAndSine:()=>Hxe,_shadersdecompressTextureCoordinates:()=>Vxe,_shadersdefaultPbrMaterial:()=>zxe,_shadersdegreesPerRadian:()=>kye,_shadersdepthClamp:()=>Kxe,_shadersdepthRange:()=>Oye,_shadersdepthRangeStruct:()=>vxe,_shaderseastNorthUpToEyeCoordinates:()=>Yxe,_shadersellipsoidContainsPoint:()=>Jxe,_shadersellipsoidWgs84TextureCoordinates:()=>Wxe,_shadersepsilon1:()=>Uye,_shadersepsilon2:()=>Gye,_shadersepsilon3:()=>Hye,_shadersepsilon4:()=>Vye,_shadersepsilon5:()=>zye,_shadersepsilon6:()=>Kye,_shadersepsilon7:()=>Yye,_shadersequalsEpsilon:()=>jxe,_shaderseyeOffset:()=>qxe,_shaderseyeToWindowCoordinates:()=>Xxe,_shadersfastApproximateAtan:()=>Zxe,_shadersfog:()=>$xe,_shadersgammaCorrect:()=>eve,_shadersgeodeticSurfaceNormal:()=>tve,_shadersgetDefaultMaterial:()=>ive,_shadersgetLambertDiffuse:()=>rve,_shadersgetSpecular:()=>nve,_shadersgetWaterNoise:()=>ove,_shadershue:()=>lve,_shadersinfinity:()=>Jye,_shadersinverseGamma:()=>uve,_shadersisEmpty:()=>cve,_shadersisFull:()=>Ave,_shaderslatitudeToWebMercatorFraction:()=>hve,_shaderslineDistance:()=>fve,_shaderslinearToSrgb:()=>dve,_shadersluminance:()=>gve,_shadersmaterial:()=>Exe,_shadersmaterialInput:()=>Ixe,_shadersmetersPerPixel:()=>pve,_shadersmodelMaterial:()=>_xe,_shadersmodelToWindowCoordinates:()=>mve,_shadersmodelVertexOutput:()=>Bxe,_shadersmultiplyWithColorBalance:()=>Cve,_shadersnearFarScalar:()=>yve,_shadersoctDecode:()=>xve,_shadersoneOverPi:()=>Wye,_shadersoneOverTwoPi:()=>jye,_shaderspackDepth:()=>vve,_shaderspassCesium3DTile:()=>qye,_shaderspassCesium3DTileClassification:()=>Xye,_shaderspassCesium3DTileClassificationIgnoreShow:()=>Zye,_shaderspassClassification:()=>$ye,_shaderspassCompute:()=>exe,_shaderspassEnvironment:()=>txe,_shaderspassGlobe:()=>ixe,_shaderspassOpaque:()=>rxe,_shaderspassOverlay:()=>nxe,_shaderspassTerrainClassification:()=>oxe,_shaderspassTranslucent:()=>axe,_shaderspbrLighting:()=>Eve,_shaderspbrMetallicRoughnessMaterial:()=>Ive,_shaderspbrParameters:()=>wxe,_shaderspbrSpecularGlossinessMaterial:()=>_ve,_shadersphong:()=>Bve,_shaderspi:()=>sxe,_shaderspiOverFour:()=>lxe,_shaderspiOverSix:()=>uxe,_shaderspiOverThree:()=>cxe,_shaderspiOverTwo:()=>Axe,_shadersplaneDistance:()=>wve,_shaderspointAlongRay:()=>bve,_shadersradiansPerDegree:()=>hxe,_shadersray:()=>bxe,_shadersrayEllipsoidIntersectionInterval:()=>Qve,_shadersraySegment:()=>Qxe,_shadersraySphereIntersectionInterval:()=>Sve,_shadersreadDepth:()=>Dve,_shadersreadNonPerspective:()=>Tve,_shadersreverseLogDepth:()=>Mve,_shadersround:()=>Fve,_shaderssampleOctahedralProjection:()=>Nve,_shaderssaturation:()=>kve,_shaderssceneMode2D:()=>dxe,_shaderssceneMode3D:()=>fxe,_shaderssceneModeColumbusView:()=>gxe,_shaderssceneModeMorphing:()=>pxe,_shadersshadowDepthCompare:()=>Ove,_shadersshadowParameters:()=>Sxe,_shadersshadowVisibility:()=>Uve,_shaderssignNotZero:()=>Gve,_shaderssolarRadius:()=>mxe,_shaderssphericalHarmonics:()=>Hve,_shaderssrgbToLinear:()=>Vve,_shaderstangentToEyeSpaceMatrix:()=>zve,_shadersthreePiOver2:()=>Cxe,_shaderstransformPlane:()=>Kve,_shaderstranslateRelativeToEye:()=>Yve,_shaderstranslucentPhong:()=>Jve,_shaderstranspose:()=>Wve,_shaderstwoPi:()=>yxe,_shadersunpackDepth:()=>jve,_shadersunpackFloat:()=>qve,_shadersunpackUint:()=>Xve,_shadersvalueTransform:()=>Zve,_shadersvertexLogDepth:()=>$ve,_shaderswebMercatorMaxLatitude:()=>xxe,_shaderswindowToEyeCoordinates:()=>eEe,_shaderswriteDepthClamp:()=>tEe,_shaderswriteLogDepth:()=>iEe,_shaderswriteNonPerspective:()=>rEe,addBuffer:()=>uBe,addDefaults:()=>tBe,addExtensionsRequired:()=>aBe,addExtensionsUsed:()=>iO,addPipelineExtras:()=>eJ,addToArray:()=>H_,appendForwardSlash:()=>GCe,arrayRemoveDuplicates:()=>fC,barycentricCoordinates:()=>dre,binarySearch:()=>hC,buildDrawCommand:()=>r1e,buildModuleUrl:()=>xs,clone:()=>xo,combine:()=>ia,computeFlyToLocationForRectangle:()=>BJ,createBillboardPointCallback:()=>Gne,createBlurStage:()=>yie,createCommand:()=>Hl,createDefaultImageryProviderViewModels:()=>Lbe,createDefaultTerrainProviderViewModels:()=>kbe,createEdgeStage:()=>fH,createElevationBandMaterial:()=>Fst,createFragmentFromTemplate:()=>RDe,createGuid:()=>Vu,createMaterialPropertyDescriptor:()=>hy,createOsmBuildings:()=>Nst,createPropertyDescriptor:()=>Bi,createRawPropertyDescriptor:()=>M_,createTangentSpaceDebugPrimitive:()=>kst,createTaskProcessorWorker:()=>Qlt,createUniform:()=>Rye,createUniformArray:()=>Fye,createWorldImagery:()=>Xk,createWorldTerrain:()=>Nbe,crypto_js:()=>nD,decodeGoogleEarthEnterpriseData:()=>$De,decodeVectorPolylinePositions:()=>Gwe,defaultValue:()=>Ae,defer:()=>rA,defined:()=>O,deprecationWarning:()=>$D,destroyObject:()=>Qr,echarts:()=>Nb,exportKml:()=>hat,findAccessorMinMax:()=>tJ,findContentMetadata:()=>Jne,findGroupMetadata:()=>Wne,findTileMetadata:()=>qwe,forEachTextureInMaterial:()=>Cne,formatError:()=>D5,fragment:()=>qet,freezeRenderState:()=>MKe,getAbsoluteUri:()=>iY,getAccessorByteStride:()=>uN,getBaseUri:()=>VCe,getBinaryAccessor:()=>vM,getClipAndStyleCode:()=>Cbe,getClippingFunction:()=>ioe,getComponentReader:()=>KY,getElement:()=>iA,getExtensionFromUri:()=>Nie,getFilenameFromUri:()=>wY,getImageFromTypedArray:()=>_Ee,getImagePixels:()=>i5,getJsonFromTypedArray:()=>Bx,getMagic:()=>Q6,getStringFromTypedArray:()=>d2,getTimestamp:()=>GA,hasExtension:()=>Qg,heightReferenceOnEntityPropertyChanged:()=>UY,isBitSet:()=>q_,isBlobUri:()=>kie,isCrossOriginUrl:()=>Oie,isDataUri:()=>rY,isLeapYear:()=>n8,jsencrypt:()=>PDe,knockout:()=>gr,knockout_3_5_1:()=>EP,knockout_es5:()=>vbe,libgif:()=>JIe,licensechack:()=>Bat,loadAndExecuteScript:()=>Uie,loadCRN:()=>ist,loadCubeMap:()=>SSe,loadDDS:()=>zie,loadImageFromTypedArray:()=>fne,loadKTX2:()=>XF,loadView:()=>fae,mapbox_gl:()=>$Ie,mergeSort:()=>NJ,modernizeShader:()=>Nye,moveTechniqueRenderStates:()=>oBe,moveTechniquesToExtension:()=>sBe,numberOfComponentsForType:()=>eO,objectToQuery:()=>Gie,oneTimeWarning:()=>ua,packer:()=>QEe,parseBatchTable:()=>AJ,parseBoundingVolumeSemantics:()=>Pwe,parseDefines:()=>YDe,parseFeatureMetadataLegacy:()=>$_e,parseGlb:()=>rBe,parseResponseHeaders:()=>zCe,parseStructuralMetadata:()=>Z_e,pointInsideTriangle:()=>cst,preprocess3DTileContent:()=>jne,purify:()=>Eat,queryToObject:()=>xD,rasterizeHTML_allinone:()=>lDe,readAccessorPacked:()=>cBe,removeExtension:()=>SK,removeExtensionsRequired:()=>iBe,removeExtensionsUsed:()=>mne,removePipelineExtras:()=>nBe,removeUnusedElements:()=>lBe,remove_primitive:()=>jK,resizeImageToNextPowerOfTwo:()=>q7,sampleTerrain:()=>gJ,sampleTerrainMostDetailed:()=>vQ,scaleToGeodeticSurface:()=>Yie,subdivideArray:()=>UEe,subscribeAndEvaluate:()=>WE,svgCompassGyro:()=>UDe,svgCompassOuterRing:()=>ODe,svgCompassRotationMarker:()=>GDe,svgReset:()=>FDe,turf:()=>Zl,updateAccessorComponentTypes:()=>ABe,updateVersion:()=>hBe,usesExtension:()=>_p,vertex:()=>jet,viewerCesium3DTilesInspectorMixin:()=>ylt,viewerCesiumInspectorMixin:()=>xlt,viewerCesiumNavigationMixin:()=>Dat,viewerDragDropMixin:()=>vlt,viewerPerformanceWatchdogMixin:()=>Elt,webGLConstantToGlslType:()=>xst,wrapFunction:()=>r2e,writeTextToCanvas:()=>N5});function CW(o=!0){this.async=o}CW.prototype.getXmlHttpRequest=function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)return new ActiveXObject("MsXml2.XmlHttp")};CW.prototype.includeJsText=function(o,A){if(o!=null){var f=document.createElement("script");f.type="text/javascript",f.text=A,o.appendChild(f)}};CW.prototype.includeJsSrc=function(o,A){if(o!=null){var f=document.createElement("script");f.type="text/javascript",f.src=A,o.appendChild(f)}};CW.prototype.addJs=function(o,A){var f=this.getXmlHttpRequest(),m=this;f.onreadystatechange=function(){f.readyState===4&&(f.status===200||f.status===304?m.includeJsSrc(o,A):console.log("XML request error: "+f.statusText+" ("+f.status+")"))},f.open("GET",A,m.async),f.send(null),f.status===404?console.log(A+" is not found"):m.includeJsText(o,f.responseText)};var IC=CW;var nTi={testModel:"Workers/Model/xiaoche.glb",modelAxis:"Workers/Model/axis.gltf",flyModel:"Workers/Model/fly.glb",divpoint:"Workers/image/divpoint.png",divpoint1:"Workers/image/divpoint1.png",richtextpoint:"Workers/image/richtextpoint1.png",mark:"Workers/image/mark.png",mark1:"Workers/image/mark1.png",TrailLine:"Workers/image/TrailLine.png",road:"Workers/image/road.jpg",colors3:"Workers/image/colors3.png",loading:"Workers/image/loading.gif",smog:"Workers/image/smog.png",penquan:"Workers/image/penquan.png",fire:"Workers/image/fire.png",fire2:"Workers/image/fire2.png",bottomplane:"Workers/image/bottomplane.jpg",MTY0001:"Workers/image/MTY0001.jpg",MTY0002:"Workers/image/MTY0002.jpg",wall:"Workers/image/ggy.jpg",rotate:"Workers/image/rotate.png",move:"Workers/image/move.png",draw:"Workers/image/cursor/draw.cur",water:"Workers/image/waterNormals.jpg",movingRiver:"Workers/image/movingRiver.png",effectCircle:"Workers/image/circle.png",scanCircle:"Workers/image/scan.png",particles:"Workers/image/particles.png",trafficLight:{l_go:"Workers/image/trafficLights/l-go.png",l_wait:"Workers/image/trafficLights/l-wait.png",l_stop:"Workers/image/trafficLights/l-stop.png",l_null:"Workers/image/trafficLights/l-null.png",go:"Workers/image/trafficLights/go.png",wait:"Workers/image/trafficLights/wait.png",stop:"Workers/image/trafficLights/stop.png",null:"Workers/image/trafficLights/null.png",r_go:"Workers/image/trafficLights/r-go.png",r_wait:"Workers/image/trafficLights/r-wait.png",r_stop:"Workers/image/trafficLights/r-stop.png",r_null:"Workers/image/trafficLights/r-null.png",bg:"Workers/image/trafficLights/bg.png"}},cn=Object.freeze(nTi);function oTi(o,A){return o??A}var u0=oTi;var Dlt=`// author: \u5F20\u4E39\u948A
czm_material czm_getMaterial(czm_materialInput materialInput)
{
    czm_material material = czm_getDefaultMaterial(materialInput);
@@ -16382,7 +16382,7 @@
                    {
                        gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(0.1, 0.1, 0.1,1), 0.7); 
                    }
                    `}Object.defineProperties(Bct.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._pps!==null},set:function(o){o===!0?PPi(this):RPi(this)}}});var gse=Bct;function RW(o){this.mEarthCtrl=o,this.coreMap=o.coreMap,this._fog=new cse(o),this._rain=new Ase(o),this._snow=new hse(o),this._colorAdjustment=new dse(o),this._bwMode=new fse(o),this._nightMode=new gse(o)}RW.prototype.disableAllEffect=function(){this._fog.show=!1,this._rain.show=!1,this._snow.show=!1,this._colorAdjustment.show=!1,this._bwMode.show=!1,this._nightMode.show=!1};RW.prototype.showEffect=function(o){this.disableAllEffect(),o==="fog"?this._fog.show=!0:o==="rain"?this._rain.show=!0:o==="snow"?this._snow.show=!0:o==="colorAdjustment"?this._colorAdjustment.show=!0:o==="bwMode"?this._bwMode.show=!0:o==="nightMode"&&(this._nightMode.show=!0)};RW.prototype.disableEffect=function(o){o==="fog"?this._fog.show=!1:o==="rain"?this._rain.show=!1:o==="snow"?this._snow.show=!1:o==="colorAdjustment"?this._colorAdjustment.show=!1:o==="bwMode"?this._bwMode.show=!1:o==="nightMode"&&(this._nightMode.show=!1)};Object.defineProperties(RW.prototype,{SkyBoxSource:{get:function(){return this.coreMap.scene.skyBox?this.coreMap.scene.skyBox.sources:{}},set:function(o){O(o)&&(this.coreMap.scene.skyBox&&this.coreMap.scene.skyBox.destroy(),this.coreMap.scene.skyBox=new mN({sources:o}))}},fog:{get:function(){return this._fog}},rain:{get:function(){return this._rain}},snow:{get:function(){return this._snow}},colorAdjustment:{get:function(){return this._colorAdjustment}},bwMode:{get:function(){return this._bwMode}},nightMode:{get:function(){return this._nightMode}}});var pse=RW;function FPi(o,A){let f=o.length;for(;f--;)if(o[f]===A)return!0;return!1}function NPi(o,A){let f=o.indexOf(A);f>-1&&o.splice(f,1)}var mse=class extends c0{constructor(A){super(A),this._objectMap=[],this._isBenchUpdate=!1,this._EventSelectSetChanged=new SN("EventSelectSetChanged")}finalize(){this._objectArray=[]}addObject(A){if(FPi(this._objectArray,A))return!1;this._objectArray.push(A),this._isBenchUpdate||this.commitChanged()}removeObject(A){NPi(this._objectArray,A),this._isBenchUpdate||this.commitChanged()}getObject(A){return A<0||A>=this._objectArray.length?null:this._objectArray[A]}removeAll(A){this._objectArray=[],this._isBenchUpdate||this.commitChanged()}beginUpdate(){this._isBenchUpdate=!0}endUpdate(){this._isBenchUpdate&&(this.commitChanged(),this._isBenchUpdate=!1)}commitChanged(){this._EventSelectSetChanged.notifyEvent(this)}};Object.defineProperties(mse.prototype,{count:{get:function(){return this._objectArray.length}},EventSelectSetChanged:{get:function(){return this._EventSelectSetChanged}}});var Cse=mse;var kPi={GWIMAGERYLAYER:"GwImageryLayer",GWTERRAINLAYER:"GwTerrainLayer",GWMODELLAYER:"GwModelLayer",GWFEATURELAYER:"GwFeatureLayer",GWMODEL:"GwModel",GWWATERS:"GwWaters",GWEXPLOSION:"GwExplosion",GWFIREWORK:"GwFireworks",GWFIRE:"GwFire",GWSMOKE:"GwSmoke",GWRADARSCAN:"GwRadarScan",GWCIRCLESCAN:"GwCircleScan",GWPOINT:"GwPoint",GWLABEL:"GwLabel",GWBILLBOARD:"GwBillboard",GWPOLYLINE:"GwPolyline",GWPOLYGON:"GwPolygon",GWRECTANGLE:"GwRectangle",GWBOX:"GwBox",GWCYLINDER:"GwCylinder",GWELLIPSOID:"GwEllipsoid",GWVIDEOPROJECTION:"GwVideoProjection"},Mg=Object.freeze(kPi);var OPi={NODE:"NODE",IMAGERY_LAYER:"IMAGERY_LAYER",TERRAIN_LAYER:"TERRAIN_LAYER",MODEL_LAYER:"MODEL_LAYER",FEATURE_LAYER:"FEATURE_LAYER",SKYBOX:"SKYBOX",ENVIRONMENT:"ENVIRONMENT",VIEWPOINT:"VIEWPOINT",MODEL:"MODEL",WATERS:"WATERS",EXPLOSION:"EXPLOSION",FIREWORK:"FIREWORK",SMOKE:"SMOKE",FIRE:"FIRE",RADARSCAN:"RADARSCAN",CIRCLESCAN:"CIRCLESCAN",POINT:"POINT",LABEL:"LABEL",BILLBOARD:"BILLBOARD",POLYLINE:"POLYLINE",POLYGON:"POLYGON",RECTANGLE:"RECTANGLE",ELLIPSE:"ELLIPSE",BOX:"BOX",ELLIPSOID:"ELLIPSOID",CYLINDER:"CYLINDER",POLYLINEVOLUME:"POLYLINEVOLUME",PERSPECTIVE_VIDEO_PROJECTION:"PERSPECTIVE_VIDEO_PROJECTION",FISHEYE_VIDEO_PROJECTION:"FISHEYE_VIDEO_PROJECTION",TRACK:"TRACK",HEATMAP:"HEATMAP",ECHARTLAYER:"ECHARTLAYER"},Eo=Object.freeze(OPi);function UPi(o){return o!=null?o._value:o}var fu=UPi;function Td(){}Td.export=function(o){let A=null,f=Td.ExportObjectMap[o._rtti];return f!==void 0&&(A=f(o)),A};function GPi(o){let A=null,f=Ae(o.sourceType,"wmts");if(f==="tms"){let m=o._primitive.imageryProvider._rectangle;O(m)?m={west:je.toDegrees(m.west),south:je.toDegrees(m.south),east:je.toDegrees(m.east),north:je.toDegrees(m.north)}:m={west:"",south:"",east:"",north:""},A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,""),west:m.west,south:m.south,east:m.east,north:m.north}}if(f==="wms"){let m=o._primitive.imageryProvider._resource._queryParameters;A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,layers:Ae(o._primitive.imageryProvider._layers,""),maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,""),parameters:{transparent:m.transparent,format:m.format,crs:m.crs,version:m.version,layers:m.layers}}}return f==="wmts"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,layer:Ae(o._primitive.imageryProvider._layer,""),format:Ae(o._primitive.imageryProvider._format,""),tileMatrixSetID:Ae(o._primitive.imageryProvider._tileMatrixSetID,""),maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),f==="mapbox"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,mapId:"",show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),f==="arcgis"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),f==="multi"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),f==="single"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),f==="baidu"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),f==="gaode"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),f==="mapworld"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),A}function HPi(o){let A=null,f=Ae(o.sourceType,"ctb");return f==="ude"&&(A={class:Ae(o._parameter.class,Eo.TERRAIN_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._parameter.zIndex,url:o.dataUrl,show:o.show}),f==="ctb"&&(A={class:Ae(o._parameter.class,Eo.TERRAIN_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._parameter.zIndex,url:o.dataUrl,show:o.show}),f==="multi"&&(A={class:Ae(o._parameter.class,Eo.TERRAIN_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._parameter.zIndex,url:o.dataUrl,show:o.show}),A}function VPi(o){let A=null,f=Ae(o.sourceType,"b3dm");return(f==="b3dm"||f==="3DTiles")&&(A={class:Ae(o._parameter.class,Eo.MODEL_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,zIndex:o._parameter.zIndex,url:o.dataUrl,options:o._parameter.options,transform:o._parameter.transform}),f==="osgb"&&(A={class:Ae(o._parameter.class,Eo.MODEL_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),f==="s3m"&&(A={class:Ae(o._parameter.class,Eo.MODEL_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),(f==="ude_block"||f==="ude_model")&&(A={class:Ae(o._parameter.class,Eo.MODEL_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),A}function zPi(o){console.log("\u5F53\u524D\u64CD\u4F5C\u8282\u70B9>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>",o);let A=null,f=Ae(o.sourceType,"geojson");return f==="geojson"&&(A={class:Ae(o._parameter.class,Eo.FEATURE_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),f==="feature"&&(A={class:Ae(o._parameter.class,Eo.FEATURE_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),f==="custom"&&(A={class:Ae(o._parameter.class,Eo.FEATURE_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),f==="kml"&&(A={class:Ae(o._parameter.class,Eo.FEATURE_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),f==="arcgis_json"&&(A={class:Ae(o._parameter.class,Eo.FEATURE_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),f==="raster"&&(A={class:Ae(o._parameter.class,Eo.FEATURE_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),A}function KPi(o){let A=null,f=Ae(o.sourceType,"gltf");return f==="gltf"&&(A={class:Ae(o._parameter.class,Eo.MODEL),name:o.name,id:o.id,sourceType:f,show:o.show,url:o.dataUrl,lon:o.lon,lat:o.lat,alt:o.alt,heading:o.heading,pitch:o.pitch,roll:o.roll,scale:o._primitive.scale,minimumPixelSize:o._primitive.minimumPixelSize}),f==="glb"&&(A={class:Ae(o._parameter.class,Eo.MODEL),name:o.name,id:o.id,sourceType:f,show:o.show,url:o.dataUrl,lon:o.lon,lat:o.lat,alt:o.alt,heading:o.heading,pitch:o.pitch,roll:o.roll,scale:o._primitive.scale,minimumPixelSize:o._primitive.minimumPixelSize}),A}function YPi(o){let A=null;return A={class:Ae(o._parameter.class,Eo.EXPLOSION),name:o.name,id:o.id,show:o.show,lon:o.parameter.lon,lat:o.parameter.lat,alt:o.parameter.alt},A}function JPi(o){let A=null;return A={class:Ae(o._parameter.class,Eo.WATERS),name:o.name,id:o.id,show:o.show,params:o.params,url:o.url,color:o.color,waterFrequency:o.waterFrequency,animationSpeed:o.animationSpeed,amplitude:o.amplitude},A}function WPi(o){let A=null;return A={class:Ae(o._parameter.class,Eo.FIREWORK),name:o.name,id:o.id,show:o.show,lon:o.parameter.lon,lat:o.parameter.lat,alt:o.parameter.alt,emitHeight:o.parameter.emitHeight},A}function jPi(o){let A=null;return A={class:Ae(o._parameter.class,Eo.FIRE),name:o.name,id:o.id,show:o.show,lon:o.parameter.lon,lat:o.parameter.lat,alt:o.parameter.alt,particleSize:o.parameter.particleSize},A}function qPi(o){let A=null;return A={class:Ae(o._parameter.class,Eo.SMOKE),name:o.name,id:o.id,show:o.show,lon:o.parameter.lon,lat:o.parameter.lat,alt:o.parameter.alt,particleSize:o.parameter.particleSize},A}function XPi(o){let A=null;return A={class:Eo.RADARSCAN,name:o.name,id:o.id,show:o.show,lon:o._lon,lat:o._lat,height:o._height,maxRadius:o._maxRadius,duration:o._duration,color:o._color},A}function ZPi(o){let A=null;return A={class:Eo.CIRCLESCAN,name:o.name,id:o.id,show:o.show,lon:o._lon,lat:o._lat,height:o._height,maxRadius:o._maxRadius,duration:o._duration,color:o._color},A}function $Pi(o){let A=null,f=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(o._primitive.position._value);return A={class:Ae(o._parameter.class,Eo.POINT),name:o.name,id:o.id,show:o.show,lon:je.toDegrees(f.longitude),lat:je.toDegrees(f.latitude),alt:parseInt(f.height.toFixed(2)),pixelSize:fu(o._primitive.point.pixelSize),color:fu(o._primitive.point.color),outlineColor:fu(o._primitive.point.outlineColor),outlineWidth:fu(o._primitive.point.outlineWidth)},A}function eRi(o){let A=null,f=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(o._primitive.position._value);return A={class:Ae(o._parameter.class,Eo.LABEL),id:o.id,show:o.show,name:o.name,lon:je.toDegrees(f.longitude),lat:je.toDegrees(f.latitude),alt:parseInt(f.height.toFixed(2)),text:fu(o._primitive.label.text),font:fu(o._primitive.label.font),fillColor:fu(o._primitive.label.fillColor),outlineWidth:fu(o._primitive.label.outlineWidth),verticalOrigin:fu(o._primitive.label.verticalOrigin)},A}function tRi(o){let A=null,f=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(o._primitive.position._value);return A={class:Ae(o._parameter.class,Eo.BILLBOARD),name:o.name,id:o.id,show:o.show,lon:je.toDegrees(f.longitude),lat:je.toDegrees(f.latitude),alt:parseInt(f.height.toFixed(2)),image:fu(o._primitive.billboard.image),scale:fu(o._primitive.billboard.scale)},A}function iRi(o){let A=null,f=[];return o._primitive.polyline.positions._value.forEach(function(C){let y=[],x=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(C);y.push(je.toDegrees(x.longitude)),y.push(je.toDegrees(x.latitude)),y.push(x.height),f.push(y)}),A={class:Ae(o._parameter.class,Eo.POLYLINE),name:o.name,id:o.id,show:o.show,positions:f,lineColor:o._parameter.lineColor,lineWidth:fu(o._primitive.polyline.width),clampToGround:fu(o._primitive.polyline.clampToGround),outlineColor:o._parameter.outlineColor},A}function rRi(o){let A=null,f=[];return o.positions.positions.forEach(function(C){let y=[],x=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(C);y.push(je.toDegrees(x.longitude)),y.push(je.toDegrees(x.latitude)),y.push(x.height),f.push(y)}),A={class:Ae(o._parameter.class,Eo.POLYGON),name:o.name,id:o.id,show:o.show,positions:f,material:o.material?fu(o._primitive.polygon.material.color):void 0,outline:fu(o.outline),outlineColor:fu(o.outlineColor)},A}function nRi(o){let A=null,f=o.coordinates,m=je.toDegrees(f.east),C=je.toDegrees(f.north),y=je.toDegrees(f.south),v=[je.toDegrees(f.west),y,m,C];return A={class:Ae(o._parameter.class,Eo.RECTANGLE),name:o.name,id:o.id,show:o.show,coordinates:v,height:fu(o.height),fillColor:o.fillColor?fu(o.fillColor.color):void 0,outline:fu(o.outline),outlineColor:fu(o.outlineColor)},A}function oRi(o){let A=null,f=[],m=fu(o.position),C=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(m);return f.push(je.toDegrees(C.longitude)),f.push(je.toDegrees(C.latitude)),f.push(C.height),A={class:Ae(o._parameter.class,Eo.BOX),name:o.name,id:o.id,show:o.show,position:f,dimensions:o.dimensions._value,material:o.material?fu(o._primitive.box.material.color):void 0,fill:fu(o.fill),outline:fu(o.outline),outlineColor:fu(o.outlineColor)},A}function aRi(o){let A=null,f=[],m=fu(o.position),C=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(m);return f.push(je.toDegrees(C.longitude)),f.push(je.toDegrees(C.latitude)),f.push(C.height),A={class:Ae(o._parameter.class,Eo.CYLINDER),name:o.name,id:o.id,show:o.show,position:f,topRadius:fu(o.topRadius),bottomRadius:fu(o.bottomRadius),length:fu(o.length),fill:fu(o.fill),material:o.material?fu(o._primitive.cylinder.material.color):void 0,outline:fu(o.outline),outlineColor:fu(o.outlineColor)},A}function sRi(o){let A=null,f=[],m=fu(o.position),C=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(m);f.push(je.toDegrees(C.longitude)),f.push(je.toDegrees(C.latitude)),f.push(C.height);let y=[],x=fu(o.radii);return y.push(x.x),y.push(x.y),y.push(x.z),A={class:Ae(o._parameter.class,Eo.ELLIPSOID),name:o.name,id:o.id,show:o.show,position:f,radii:y,fill:fu(o.fill),material:o.material?fu(o._primitive.ellipsoid.material.color):void 0,outline:fu(o.outline),outlineColor:fu(o.outlineColor)},A}function lRi(o){let A=null,f=Ae(o._parameter.sourceType,"perspective");return(f==="perspective"||f==="panorama")&&(A={class:Ae(o._parameter.class,Eo.PERSPECTIVE_VIDEO_PROJECTION),name:o.name,id:o.id,sourceType:o._parameter.sourceType,matchMaterials:o._parameter.matchMaterials,lon:o._parameter.lon,lat:o._parameter.lat,height:o._parameter.height,heading:o._parameter.heading,pitch:o._parameter.pitch,roll:o._parameter.roll,fov:o._parameter.fov,far:o._parameter.far,near:o._parameter.near,opacity:o._parameter.opacity,maxDiffAngle:o._parameter.maxDiffAngle,videoLink:o._parameter.videoLink,aspect:o._parameter.aspect,addToMap:o._parameter.addToMap,preview:o._parameter.preview,playVideo:o._parameter.playVideo,showMesh:o.showMesh,show:o.show,enable:o._parameter.enable,videoFrameInterval:o._parameter.videoFrameInterval,useDepth:o._parameter.useDepth}),f==="fisheye"&&(A={class:Ae(o._parameter.class,Eo.FISHEYE_VIDEO_PROJECTION),name:o.name,id:o.id,sourceType:o._parameter.sourceType,matchMaterials:o._parameter.matchMaterials,lon:o._parameter.lon,lat:o._parameter.lat,height:o._parameter.height,heading:o._parameter.heading,pitch:o._parameter.pitch,roll:o._parameter.roll,fov:o._parameter.fov,far:o._parameter.far,near:o._parameter.near,opacity:o._parameter.opacity,maxDiffAngle:o._parameter.maxDiffAngle,videoLink:o._parameter.videoLink,aspect:o._parameter.aspect,addToMap:o._parameter.addToMap,preview:o._parameter.preview,playVideo:o._parameter.playVideo,showMesh:o.showMesh,show:o.show,enable:o._parameter.enable,videoFrameInterval:o._parameter.videoFrameInterval,useDepth:o._parameter.useDepth}),A}Td.ExportObjectMap={};Td.ExportObjectMap[Mg.GWEXPLOSION]=YPi;Td.ExportObjectMap[Mg.GWWATERS]=JPi;Td.ExportObjectMap[Mg.GWFIREWORK]=WPi;Td.ExportObjectMap[Mg.GWSMOKE]=qPi;Td.ExportObjectMap[Mg.GWFIRE]=jPi;Td.ExportObjectMap[Mg.GWRADARSCAN]=XPi;Td.ExportObjectMap[Mg.GWCIRCLESCAN]=ZPi;Td.ExportObjectMap[Mg.GWPOINT]=$Pi;Td.ExportObjectMap[Mg.GWLABEL]=eRi;Td.ExportObjectMap[Mg.GWBILLBOARD]=tRi;Td.ExportObjectMap[Mg.GWPOLYLINE]=iRi;Td.ExportObjectMap[Mg.GWPOLYGON]=rRi;Td.ExportObjectMap[Mg.GWRECTANGLE]=nRi;Td.ExportObjectMap[Mg.GWBOX]=oRi;Td.ExportObjectMap[Mg.GWCYLINDER]=aRi;Td.ExportObjectMap[Mg.GWELLIPSOID]=sRi;Td.ExportObjectMap[Mg.GWVIDEOPROJECTION]=lRi;Td.ExportObjectMap[Mg.GWIMAGERYLAYER]=GPi;Td.ExportObjectMap[Mg.GWTERRAINLAYER]=HPi;Td.ExportObjectMap[Mg.GWMODELLAYER]=VPi;Td.ExportObjectMap[Mg.GWFEATURELAYER]=zPi;Td.ExportObjectMap[Mg.GWMODEL]=KPi;var il=Td;function Q2(o){this.mEarthCtrl=o,this.coreMap=o.coreMap,this.videoProjection=null,this._parameter=null,this._showMesh=!1,this._auxMeshArray=[],this._highlightState=0,this._colorStyle=[new At(.3,1,.3),At.YELLOW],this._rtti="GwVideoProjection"}Object.defineProperties(Q2.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this.videoProjection!==null?this.videoProjection.enabled:!1},set:function(o){this.videoProjection!==null&&(this.videoProjection.enabled=o)}},showMesh:{get:function(){return this._showMesh},set:function(o){this._showMesh=o,this.updateAuxMesh()}},highlightState:{get:function(){return this._highlightState},set:function(o){this._highlightState=o,this.updateAuxMesh()}},id:{get:function(){return this.videoProjection._id}}});Q2.prototype.setParameter=function(o){if(!!O(o)&&(O(o.lon)||O(o.lat)||O(o.height)||O(o.heading)||O(o.pitch)||O(o.roll)||O(o.near)||O(o.far)||O(o.aspect))){let A=this._parameter;for(let m in o)o.hasOwnProperty(m)&&O(A[m])&&(A[m]=o[m]);let f=this.videoProjection._lightCamera;f.setView({destination:ee.fromDegrees(A.lon,A.lat,A.height),orientation:{heading:je.toRadians(A.heading),pitch:je.toRadians(A.pitch),roll:je.toRadians(A.roll)}}),f.frustum.fov=A.fov/180*Math.PI,f.frustum.near=A.near||1,f.frustum.far=A.far||1e5,f.frustum.aspectRatio=A.aspect||1,this.updateAuxMesh()}};Q2.prototype.initialize=function(o){this._parameter=o;let A=this._parameter,f=new Ml(this.coreMap.scene);A.fov=A.fov||60,f.setView({destination:ee.fromDegrees(A.lon,A.lat,A.height),orientation:{heading:je.toRadians(A.heading),pitch:je.toRadians(A.pitch),roll:je.toRadians(A.roll)}}),f.frustum.fov=A.fov/180*Math.PI,f.frustum.near=A.near||1,f.frustum.far=A.far||1e5,f.frustum.aspectRatio=A.aspect||1;let m;A.useDepth?m=new OY({name:A.name,matchMaterials:A.matchMaterials,context:this.coreMap.scene.context,lightCamera:f,enabled:A.show===!0,isPointLight:!1,cascadesEnabled:!1,numberOfCascades:1,frustum:{fov:A.fov/180*Math.PI,near:A.near||1,far:A.far||1e5,aspectRatio:A.aspect||1},depthBias:A.depthBias,videoFrameInterval:A.videoFrameInterval,playVideo:A.playVideo,opacity:A.opacity,calibrateParam:A.calibrateParam,maxDiffAngle:A.maxDiffAngle/180*Math.PI,useDepth:A.useDepth,blendTop:A.blendTop,blendRight:A.blendRight,blendBottom:A.blendBottom,blendLeft:A.blendLeft,maximumDistance:A.maximumDistance||1e3}):m=new kY({name:A.name,matchMaterials:A.matchMaterials,context:this.coreMap.scene.context,lightCamera:f,enabled:A.show===!0,isPointLight:!1,cascadesEnabled:!1,numberOfCascades:1,frustum:{fov:A.fov/180*Math.PI,near:A.near||1,far:A.far||1e5,aspectRatio:A.aspect||1},depthBias:A.depthBias,videoFrameInterval:A.videoFrameInterval,playVideo:A.playVideo,opacity:A.opacity,calibrateParam:A.calibrateParam,maxDiffAngle:A.maxDiffAngle/180*Math.PI,useDepth:!1,blendTop:A.blendTop,blendRight:A.blendRight,blendBottom:A.blendBottom,blendLeft:A.blendLeft,maximumDistance:A.maximumDistance}),m.castTexture=A.castTexture,this.videoProjection=m,this._showMesh=A.showMesh,A.addToMap===!0&&this.addToMap()};var VTe=new jr;Q2.prototype.updateAuxMesh=function(){let o=this;if(o._auxMeshArray.length>0){for(let f=0;f<o._auxMeshArray.length;f++){let m=o._auxMeshArray[f];this.mEarthCtrl.coreMap.scene.primitives.remove(m)}this._auxMeshArray=[]}let A=Al;if(o._showMesh===!0){let f=o._colorStyle[o._highlightState],m=o.parameter;{let C=ee.fromDegrees(m.lon,m.lat,m.height),y={heading:je.toRadians(m.heading+90),pitch:je.toRadians(90-m.pitch),roll:je.toRadians(m.roll)},x=Vn.headingPitchRollQuaternion(C,y);VTe=jr.fromAxisAngle(o.videoProjection._lightCamera.direction,je.toRadians(90),VTe),jr.multiply(VTe,x,x);{let v=new co({geometry:new C6({frustum:this.videoProjection._lightCamera.frustum,origin:C,orientation:x,vertexFormat:Wr.ALL}),id:"ellipsoid",attributes:{color:Yo.fromColor(f.withAlpha(.1))}}),E=new $a({shadows:A.DISABLED,geometryInstances:v,appearance:new za});this.mEarthCtrl.coreMap.scene.primitives.add(E),o._auxMeshArray.push(E)}{let v=new co({geometry:new FY({frustum:this.videoProjection._lightCamera.frustum,origin:C,orientation:x,vertexFormat:Wr.ALL}),id:"outlines",shadows:A.DISABLED,attributes:{color:Yo.fromColor(f.withAlpha(.8))}}),E=new $a({geometryInstances:v,appearance:new za({translucent:!0,flat:!0}),shadows:A.DISABLED,asynchronous:!1});this.mEarthCtrl.coreMap.scene.primitives.add(E),o._auxMeshArray.push(E)}{let v=new co({geometry:new gC({radii:new ee(.1,.1,.1),vertexFormat:Wr.POSITION_AND_NORMAL}),modelMatrix:Xe.multiplyByTranslation(Vn.eastNorthUpToFixedFrame(ee.fromDegrees(m.lon,m.lat,m.height)),new ee(0,0,0),new Xe),id:"ellipsoid",shadows:A.DISABLED,attributes:{color:Yo.fromColor(f.withAlpha(.5))}}),E=new $a({geometryInstances:v,appearance:new za});this.mEarthCtrl.coreMap.scene.primitives.add(E),o._auxMeshArray.push(E)}}}};Q2.prototype.addToMap=function(){this.videoProjection!==null&&(this.mEarthCtrl.textureProjectionMapList.push(this.videoProjection),this.updateAuxMesh())};Q2.prototype.setEnable=function(o){this.videoProjection!==null&&(this.videoProjection.enabled=o)};Q2.prototype.remove=function(){let o=this;if(o.videoProjection!==null){let A=o.mEarthCtrl.textureProjectionMapList;for(let f=0;f<A.length;f++){let m=A[f];o.videoProjection===m&&A.splice(f,1)}}if(o._auxMeshArray.length>0){for(let A=0;A<o._auxMeshArray.length;A++){let f=o._auxMeshArray[A];o.mEarthCtrl.coreMap.scene.primitives.remove(f)}o._auxMeshArray=[]}};Q2.prototype.toJSON=function(){return il.export(this)};Q2.prototype.updateBlend=function(o,A,f,m){this.videoProjection&&this.videoProjection.updateBlend(this.coreMap.scene.context,o,A,f,m)};var yse=Q2;function GH(o){this.mEarthCtrl=o,this.coreMap=o.coreMap,this.shadowMap=null,this._rtti="GwVideoProjection"}GH.prototype.initialize=function(o){let A=new Ml(this.coreMap.scene);A.setView({destination:o.destination,orientation:o.orientation}),A.frustum.fov=o.fov||Math.PI/3,A.frustum.near=o.near||1,A.frustum.far=o.far||1e5,A.frustum.aspectRatio=o.aspect||1;let f=new xQ({name:o.name,context:this.coreMap.scene.context,lightCamera:A,enabled:o.enabled||!0,isPointLight:!1,cascadesEnabled:!1,numberOfCascades:1,frustum:{fov:o.fov||Math.PI/3,near:o.near||1,far:o.far||1e5,aspectRatio:o.aspect||1},depthBias:o.depthBias,playVideo:o.playVideo});f.castTexture=o.castTexture,this.shadowMap=f,o.addToMap===!0&&this.addToMap()};GH.prototype.addToMap=function(){this.shadowMap!==null&&this.mEarthCtrl.shadowMapList.push(this.shadowMap)};GH.prototype.setEnable=function(o){this.shadowMap!==null&&(this.shadowMap.enabled=o)};GH.prototype.remove=function(){if(this.shadowMap!==null){let o=this.mEarthCtrl.shadowMapList;for(let A=0;A<o.length;A++){let f=o[A];this.shadowMap===f&&o.splice(A,1)}}};GH.prototype.toJSON=function(){return il.export(this)};var wct=GH;function GP(o){this.mEarthCtrl=o,this.coreMap=o.coreMap,this.videoProjection=null,this._parameter=null,this._showMesh=!1,this._auxMesh=null,this._rtti="GwVideoProjection"}Object.defineProperties(GP.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this.videoProjection!==null?this.videoProjection.enabled:!1},set:function(o){this.videoProjection!==null&&(this.videoProjection.enabled=o)}},showMesh:{get:function(){return this._showMesh},set:function(o){this._showMesh=o,this.updateAuxMesh()}}});GP.prototype.setParameter=function(o){if(!!O(o)){if(O(o.lon)||O(o.lat)||O(o.height)||O(o.heading)||O(o.pitch)||O(o.roll)||O(o.near)||O(o.far)||O(o.aspect)){let A=this._parameter;for(let m in o)o.hasOwnProperty(m)&&O(A[m])&&(A[m]=o[m]);let f=this.videoProjection._lightCamera;f.setView({destination:ee.fromDegrees(A.lon,A.lat,A.height),orientation:{heading:je.toRadians(A.heading),pitch:je.toRadians(A.pitch),roll:je.toRadians(A.roll)}}),f.frustum.fov=170/180*Math.PI,f.frustum.near=A.near||1,f.frustum.far=A.far||1e5,f.frustum.aspectRatio=A.aspect||1}this.updateAuxMesh()}};GP.prototype.initialize=function(o){this._parameter=o;let A=this._parameter,f=new Ml(this.coreMap.scene);f.setView({destination:ee.fromDegrees(A.lon,A.lat,A.height),orientation:{heading:je.toRadians(A.heading),pitch:je.toRadians(A.pitch),roll:je.toRadians(A.roll)}}),f.frustum.fov=170/180*Math.PI,f.frustum.near=A.near||1,f.frustum.far=A.far||1e5,f.frustum.aspectRatio=A.aspect||1;let m=new NY({name:A.name,matchMaterials:A.matchMaterials,context:this.coreMap.scene.context,lightCamera:f,enabled:A.enabled||!0,isPointLight:!1,cascadesEnabled:!1,numberOfCascades:1,frustum:{fov:170/180*Math.PI,near:A.near||1,far:A.far||1e5,aspectRatio:A.aspect||1},depthBias:A.depthBias,videoFrameInterval:A.videoFrameInterval,playVideo:A.playVideo,opacity:A.opacity,maxDiffAngle:A.maxDiffAngle,maximumDistance:A.maximumDistance||1e3});m.castTexture=A.castTexture,this.videoProjection=m,this._showMesh=A.showMesh,A.addToMap===!0&&this.addToMap()};GP.prototype.updateAuxMesh=function(){let o=this;if(o._auxMesh&&(o.mEarthCtrl.factory.removeElement(o._auxMesh),o._auxMesh=null),o._showMesh===!0){let A=o.parameter,f=A.far||2;o._auxMesh=this.mEarthCtrl.factory.createElement({name:"sphere1",type:"ellipsoid",position:ee.fromDegrees(A.lon,A.lat,A.height),parameters:{radii:new ee(f,f,f),material:At.RED.withAlpha(.1),outline:!0,outlineColor:At.GREEN}})}};GP.prototype.addToMap=function(){this.videoProjection!==null&&(this.mEarthCtrl.textureProjectionMapList.push(this.videoProjection),this.updateAuxMesh())};GP.prototype.setEnable=function(o){this.videoProjection!==null&&(this.videoProjection.enabled=o)};GP.prototype.remove=function(){if(this.videoProjection!==null){let o=this.mEarthCtrl.textureProjectionMapList;for(let A=0;A<o.length;A++){let f=o[A];this.videoProjection===f&&o.splice(A,1)}}};GP.prototype.toJSON=function(){return il.export(this)};var xse=GP;var MN=function(){let o=this;o.timer=null,o.interval=.05,o.isPause=!1,o.callbackList=new SN("callback")};MN.prototype.init=function(o){this.interval=o};MN.prototype.fini=function(){this.stop()};MN.prototype.start=function(){let o=this,A=function(){o.isPause===!1&&o.callbackList.notifyEvent(this,0)};o.timer=window.setInterval(A,this.interval*1e3)};MN.prototype.stop=function(){this.timer&&(window.clearInterval(this.timer),this.timer=null)};MN.prototype.setPause=function(o){this.isPause=o};MN.prototype.addListener=function(o){this.callbackList.addEventHandler(this,o)};MN.prototype.clearListeners=function(){this.callbackList.clearEventHandler()};var vse=MN;function LW(o){this.mEarthCtrl=o,this.coreMap=o.coreMap,this.trackInfos=[],this.timer=null,this.animationController=new vse,this.currIndex=-1,this.startTime=0,this.currentTrackInfo=null}function uRi(o,A){if(o.length===0)return null;let f=null;for(let m=0;m<o.length&&o[m].timeStamp<A;m++)f=o[m];return f}function cRi(o,A){A.class==="LOOKAT"&&(A.duration===void 0&&(A.duration=4e3),O(A.position)||(A.position=ee.fromDegrees(A.lon,A.lat,A.alt)),O(A.orientation)||(A.orientation={heading:je.toRadians(A.heading),pitch:je.toRadians(A.pitch),roll:je.toRadians(A.roll)}),o.coreMap.camera.flyTo({destination:A.position,orientation:A.orientation,duration:A.duration/1e3}))}LW.prototype.initialize=function(o){let A=0,f=this;for(let m=0;m<o.stations.length;m++){let C=o.stations[m];C.class==="LOOKAT"&&(C.timeStamp=A,A+=C.stopTime,f.trackInfos.push(C))}f.animationController.addListener(function(m){let C=new Date().getTime()-f.startTime,y=uRi(f.trackInfos,C);y!==f.currentTrackInfo&&(cRi(f.mEarthCtrl,y),f.currentTrackInfo=y)})};LW.prototype.finalize=function(){this.animationController.finalize(),this.currentTrackInfo=null};LW.prototype.play=function(){let o=this;o.currentTrackInfo=null,o.startTime=new Date().getTime(),o.animationController.start()};LW.prototype.stop=function(){this.animationController.stop(),this.currentTrackInfo=null};var bct=LW;var Ese=class extends Qc{constructor(A,f){super(A,f),this._rtti="Fire",this._primitive=null,this._parameter=f,this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll)}addToMap(){let A=this._parameter,f=this._coreMap;function m(){let x=dC.fromDegrees(0,0,0),v=new aB;return v.translation=ee.fromElements(2.5,4,1),v.rotation=jr.fromHeadingPitchRoll(x),Xe.fromTranslationRotationScale(v)}let C=Ae(A.particleSize,30),y=f.scene.primitives.add(new _2({image:Ae(A.image,`${globalThis.GEOWORLD_BASE_URL}Assets/Images/fire.png`),startColor:Ae(A.startColor,At.RED.withAlpha(.7)),endColor:Ae(A.endColor,At.YELLOW.withAlpha(.3)),startScale:Ae(A.startScale,1),endScale:Ae(A.endScale,4),minimumParticleLife:Ae(A.minimumParticleLife,1),maximumParticleLife:Ae(A.maximumParticleLife,6),minimumSpeed:Ae(A.minimumSpeed,5),maximumSpeed:Ae(A.maximumSpeed,10),imageSize:new It(C,C),emissionRate:Ae(A.emissionRate,5),bursts:[],lifetime:Ae(A.lifeTime,16),emitter:new mH(je.toRadians(30)),modelMatrix:this._spatialTransform.modelMatrix,emitterModelMatrix:m()}));this._primitive=y}removeFromMap(){this._primitive!==null&&this._coreMap.scene.primitives.remove(this._primitive)}toJSON(){let A=this;return il.export(A)}};Object.defineProperties(Ese.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var Ise=Ese;var _se=class extends Qc{constructor(A,f){super(A,f),this._rtti="Smoke",this._primitive=null,this._parameter=f,this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll),this._coreMap=A.coreMap}addToMap(){let A=this._parameter,f=this._coreMap;function m(){let x=dC.fromDegrees(0,0,0),v=new aB;return v.translation=ee.fromElements(2.5,4,1),v.rotation=jr.fromHeadingPitchRoll(x),Xe.fromTranslationRotationScale(v)}let C=Ae(A.particleSize,30),y=f.scene.primitives.add(new _2({image:Ae(A.image,`${globalThis.GEOWORLD_BASE_URL}Assets/Images/smoke.png`),startColor:Ae(A.startColor,At.fromRgba(3425907507)),endColor:Ae(A.endColor,At.fromRgba(1154272460)),startScale:Ae(A.startScale,1),endScale:Ae(A.endScale,4),minimumParticleLife:Ae(A.minimumParticleLife,1),maximumParticleLife:Ae(A.maximumParticleLife,6),minimumSpeed:Ae(A.minimumSpeed,5),maximumSpeed:Ae(A.maximumSpeed,20),imageSize:new It(C,C),emissionRate:Ae(A.emissionRate,10),bursts:[],lifetime:Ae(A.lifeTime,16),emitter:new mH(je.toRadians(30)),modelMatrix:this._spatialTransform.modelMatrix,emitterModelMatrix:m()}));this._primitive=y}removeFromMap(){this._primitive!==null&&this._coreMap.scene.primitives.remove(this._primitive)}toJSON(){let A=this;return il.export(A)}};Object.defineProperties(_se.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}},lon:{get:function(){if(this._parameter!==null)return this._lon},set:function(o){if(this._parameter!==null){if(this._lon===o)return;this._parameter.lon=o,this._spatialTransform.createFromWgs84(this._parameter.lon,this._parameter.lat,this._parameter.alt,this._parameter.heading,this._parameter.pitch,this._parameter.roll),this._primitive.modelMatrix=this._spatialTransform.modelMatrix}}},lat:{get:function(){if(this._parameter!==null)return this._lat},set:function(o){if(this._parameter!==null){if(this._lat===o)return;this._parameter.lat=o,this._spatialTransform.createFromWgs84(this._parameter.lon,this._parameter.lat,this._parameter.alt,this._parameter.heading,this._parameter.pitch,this._parameter.roll),this._primitive.modelMatrix=this._spatialTransform.modelMatrix}}},particleSize:{get:function(){if(this._primitive!==null)return this._primitive.particleSize},set:function(o){if(this._parameter!==null){if(this._parameter.particleSize===o)return;this._parameter.particleSize=o,this._primitive.imageSize=new It(this._parameter.particleSize,this._parameter.particleSize)}}}});var Bse=_se;var wse=class extends Qc{constructor(A,f){super(A,f),this._rtti="Explosion",this._primitive=null,this._parameter=f,this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll),this._coreMap=A.Viewer}finalize(){}addToMap(){let A=this._parameter,f=this._coreMap;function m(){let F=dC.fromDegrees(0,0,0),L=new aB;return L.translation=ee.fromElements(2.5,4,1),L.rotation=jr.fromHeadingPitchRoll(F),Xe.fromTranslationRotationScale(L)}let C=this._spatialTransform.modelMatrix,y=new ee(0,0,0),x=30,v=100,E=new It(30,30),I=400,w=10,Q=new Xe;function M(F,L,R){let k=ee.add(y,F,new ee),U=Xe.fromTranslation(k,Q),V=Xe.multiply(C,U,new Xe),H=Xe.inverseTransformation(V,V),q=je.randomBetween(x,v),ie=new ee,Z=function(de){let me=Xe.multiplyByPoint(H,de.position,ie);ee.magnitudeSquared(me)>=q*q&&ee.clone(ee.ZERO,de.velocity)},oe=(q-x)/(v-x),ne=.3,ce=oe*(1-ne)+ne;return f.scene.primitives.add(new _2({image:Ae(A.image,`${globalThis.GEOWORLD_BASE_URL}Assets/Images/fire.png`),startColor:L,endColor:L.withAlpha(0),particleLife:ce,speed:100,imageSize:E,emissionRate:0,emitter:new vH(.1),bursts:R,lifetime:w,updateCallback:Z,modelMatrix:C,emitterModelMatrix:U}))}let B=[];for(let F=0;F<3;++F)B.push(new xH({time:je.nextRandomNumber()*w,minimum:I,maximum:I}));let T=new ee(0,0,0),D=At.WHITE.withAlpha(.7);this._primitive=M(T,D,B)}removeFromMap(){this._primitive!==null&&this._coreMap.scene.primitives.remove(this._primitive)}toJSON(){let A=this;return il.export(A)}};Object.defineProperties(wse.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var bse=wse;var Qse=class extends Qc{constructor(A,f){super(A,f),this._rtti="Fireworks",this._primitives=[],this._parameter=f,this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll)}addToMap(){let A=this._parameter,f=this._coreMap,m=Ae(A.emitHeight,100);function C(){let Z=dC.fromDegrees(0,0,0),oe=new aB;return oe.translation=ee.fromElements(2.5,4,1),oe.rotation=jr.fromHeadingPitchRoll(Z),Xe.fromTranslationRotationScale(oe)}je.setRandomNumberSeed(315);let y=this._spatialTransform.modelMatrix,x=new ee(0,0,m),v;function E(){if(!O(v)){v=document.createElement("canvas"),v.width=20,v.height=20;let Z=v.getContext("2d");Z.beginPath(),Z.arc(8,8,8,0,je.TWO_PI,!0),Z.closePath(),Z.fillStyle="rgb(255, 255, 255)",Z.fill()}return v}let I=30,w=100,Q=new It(7,7),M=400,B=10,T=20,D=new Xe,F=this;function L(Z,oe,ne){let se=ee.add(x,Z,new ee),ce=Xe.fromTranslation(se,D),j=Xe.multiply(y,ce,new Xe),de=Xe.inverseTransformation(j,j),me=je.randomBetween(I,w),_e=new ee,Be=function(te){let Y=Xe.multiplyByPoint(de,te.position,_e);ee.magnitudeSquared(Y)>=me*me&&ee.clone(ee.ZERO,te.velocity)},Qe=(me-I)/(w-I),Ie=.3,K=Qe*(1-Ie)+Ie,W=f.scene.primitives.add(new _2({image:E(),startColor:oe,endColor:oe.withAlpha(0),particleLife:K,speed:100,imageSize:Q,emissionRate:0,emitter:new vH(.1),bursts:ne,lifetime:B,updateCallback:Be,modelMatrix:y,emitterModelMatrix:ce}));F._primitives.push(W)}let R=-100,k=100,U=-80,V=100,H=-50,q=50,ie=[{minimumRed:.75,green:0,minimumBlue:.8,alpha:1},{red:0,minimumGreen:.75,minimumBlue:.8,alpha:1},{red:0,green:0,minimumBlue:.8,alpha:1},{minimumRed:.75,minimumGreen:.75,blue:0,alpha:1}];for(let Z=0;Z<T;++Z){let oe=je.randomBetween(R,k),ne=je.randomBetween(U,V),se=je.randomBetween(H,q),ce=new ee(oe,ne,se),j=At.fromRandom(ie[Z%ie.length]),de=[];for(let me=0;me<3;++me)de.push(new xH({time:je.nextRandomNumber()*B,minimum:M,maximum:M}));L(ce,j,de)}}removeFromMap(){for(let A in this._primitives)this._coreMap.scene.primitives.remove(this._primitives[A]);this._primitives=[]}toJSON(){console.log("\u70DF\u82B1=========================>>>>>",this);let A=this;return il.export(A)}};Object.defineProperties(Qse.prototype,{parameter:{get:function(){return this._parameter}},emitHeight:{get:function(){return this._parameter!==null?this._parameter.emitHeight:0},set:function(o){this._parameter!==null&&(this._parameter.emitHeight=o)}},show:{get:function(){return this._primitives.length>0?this._primitives[0].show:!1},set:function(o){for(let A in this._primitives)this._primitives[A].show=o}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var Sse=Qse;var Dct=S9(Sct(),1),zl={defaults:{useEntitiesIfAvailable:!0,minCanvasSize:700,maxCanvasSize:2e3,radiusFactor:60,spacingFactor:1.5,maxOpacity:.8,minOpacity:.1,blur:.85,gradient:{0:"#00AEFF",".58":"#A8FF00",".70":"#FFF000",".85":"#FE9B1A",1:"#FE411B"},mode3D:!1,scaleHeight:1}};zl.create=function(o,A,f){return new mB(o,A,f)};zl._getContainer=function(o,A,f){let m=document.createElement("div");return f&&m.setAttribute("id",f),m.setAttribute("style",`width: ${o}px; height: ${A}px; margin: 0px; display: none;`),document.body.appendChild(m),m};zl._getImageryProvider=function(o){let A=o._heatmap.getDataURL(),f=new bQ({url:A,rectangle:o._rectangle});return f._tilingScheme=new Am({rectangleSouthwestInMeters:new It(o._mbounds.west,o._mbounds.south),rectangleNortheastInMeters:new It(o._mbounds.east,o._mbounds.north)}),f};zl._getID=function(o){let A="",f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let m=0;m<(o||8);m++)A+=f.charAt(Math.floor(je.nextRandomNumber()*f.length));return A};var HH=new OA;zl.wgs84ToMercator=function(o){let A=HH.project(Kt.fromDegrees(o.x,o.y));return{x:A.x,y:A.y}};zl.wgs84ToMercatorBB=function(o){let A=HH.project(Kt.fromDegrees(o.west,o.south)),f=HH.project(Kt.fromDegrees(o.east,o.north));return{north:f.y,east:f.x,south:A.y,west:A.x}};zl.mercatorToWgs84=function(o){let A=HH.unproject(new ee(o.x,o.y));return{x:A.longitude,y:A.latitude}};zl.mercatorToWgs84BB=function(o){let A=HH.unproject(new ee(o.west,o.south)),f=HH.unproject(new ee(o.east,o.north));return{north:this.rad2deg(f.latitude),east:this.rad2deg(f.longitude),south:this.rad2deg(A.latitude),west:this.rad2deg(A.longitude)}};zl.deg2rad=function(o){return o*(Math.PI/180)};zl.rad2deg=function(o){return o/(Math.PI/180)};function mB(o,A,f){if(!A)return null;f||(f={}),this._earthCtrl=o,this._options=f,this._id=zl._getID(),this._options.gradient=this._options.gradient?this._options.gradient:zl.defaults.gradient,this._options.maxOpacity=this._options.maxOpacity?this._options.maxOpacity:zl.defaults.maxOpacity,this._options.minOpacity=this._options.minOpacity?this._options.minOpacity:zl.defaults.minOpacity,this._options.blur=this._options.blur?this._options.blur:zl.defaults.blur,this._mbounds=zl.wgs84ToMercatorBB(A),this._setWidthAndHeight(this._mbounds),this._options.radius=Math.round(this._options.radius?this._options.radius:this.width>this.height?this.width/zl.defaults.radiusFactor:this.height/zl.defaults.radiusFactor),this._spacing=this._options.radius*zl.defaults.spacingFactor,this._xoffset=this._mbounds.west,this._yoffset=this._mbounds.south,this.width=Math.round(this.width+this._spacing*2),this.height=Math.round(this.height+this._spacing*2),this._mbounds.west-=this._spacing*this._factor,this._mbounds.east+=this._spacing*this._factor,this._mbounds.south-=this._spacing*this._factor,this._mbounds.north+=this._spacing*this._factor,this.bounds=zl.mercatorToWgs84BB(this._mbounds),this._rectangle=Si.fromDegrees(this.bounds.west,this.bounds.south,this.bounds.east,this.bounds.north),this._container=zl._getContainer(this.width,this.height,this._id),this._options.container=this._container,this._heatmap=Dct.default.create(this._options),this._container.children[0].setAttribute("id",`${this._id}-hm`),this._mode3D=this._options.mode3D?this._options.mode3D:zl.defaults.mode3D,this._scaleHeight=this._options.scaleHeight?this._options.scaleHeight:zl.defaults.scaleHeight,this._scaleHeight<=0&&(this._scaleHeight=1),this._granularity=this._options.granularity?this._options.granularity:je.RADIANS_PER_DEGREE,this._useEntitiesIfAvailable=this._options.useEntitiesIfAvailable!==void 0?this._options.useEntitiesIfAvailable:zl.defaults.useEntitiesIfAvailable,this._lineCount=Ae(this._options.lineCount,new It(1e3,1e3)),this._lineWidth=Ae(this._options.lineWidth,1),console.info(this._lineCount)}mB.prototype.wgs84PointToHeatmapPoint=function(o){return this.mercatorPointToHeatmapPoint(zl.wgs84ToMercator(o))};mB.prototype.mercatorPointToHeatmapPoint=function(o){let A={};return A.x=Math.round((o.x-this._xoffset)/this._factor+this._spacing),A.y=Math.round((o.y-this._yoffset)/this._factor+this._spacing),A.y=this.height-A.y,A};mB.prototype.getValueAt=function(o,A){let f=this.wgs84PointToHeatmapPoint({x:o,y:A});return this._heatmap.getValueAt({x:f.x,y:f.y})};mB.prototype.setMode3D=function(o){o!==this._mode3D&&(this._mode3D=o,this.updateLayer())};mB.prototype._setWidthAndHeight=function(o){this.width=o.east>0&&o.west<0?o.east+Math.abs(o.west):Math.abs(o.east-o.west),this.height=o.north>0&&o.south<0?o.north+Math.abs(o.south):Math.abs(o.north-o.south),this._factor=1,this.width>this.height&&this.width>zl.defaults.maxCanvasSize?(this._factor=this.width/zl.defaults.maxCanvasSize,this.height/this._factor<zl.defaults.minCanvasSize&&(this._factor=this.height/zl.defaults.minCanvasSize)):this.height>this.width&&this.height>zl.defaults.maxCanvasSize?(this._factor=this.height/zl.defaults.maxCanvasSize,this.width/this._factor<zl.defaults.minCanvasSize&&(this._factor=this.width/zl.defaults.minCanvasSize)):this.width<this.height&&this.width<zl.defaults.minCanvasSize?(this._factor=this.width/zl.defaults.minCanvasSize,this.height/this._factor>zl.defaults.maxCanvasSize&&(this._factor=this.height/zl.defaults.maxCanvasSize)):this.height<this.width&&this.height<zl.defaults.minCanvasSize&&(this._factor=this.height/zl.defaults.minCanvasSize,this.width/this._factor>zl.defaults.maxCanvasSize&&(this._factor=this.width/zl.defaults.maxCanvasSize)),this.width=this.width/this._factor,this.height=this.height/this._factor};mB.prototype.setData=function(o,A,f){return f&&f.length>0&&o!==null&&o!==!1&&A!==null&&A!==!1?(this._heatmap.setData({min:o,max:A,data:f}),this.updateLayer(),!0):!1};mB.prototype.addWGS84Data=function(o){if(o){let A=Array.isArray(o)?o:[o],f=[];for(let m=0;m<A.length;m++){let C=A[m],y=this.wgs84PointToHeatmapPoint(C);(C.value||C.value===0)&&(y.value=C.value),f.push(y)}return this._heatmap.addData(f),this.updateLayer(),!0}return!1};mB.prototype.setWGS84Data=function(o,A,f){if(f&&f.length>0&&o!==null&&o!==!1&&A!==null&&A!==!1){let m=[];for(let C=0;C<f.length;C++){let y=f[C],x=this.wgs84PointToHeatmapPoint(y);(y.value||y.value===0)&&(x.value=y.value),m.push(x)}return this.setData(o,A,m)}return!1};mB.prototype.show=function(o){this._layer&&(this._layer.show=o)};mB.prototype.remove=function(){zl.defaults.useEntitiesIfAvailable&&this._earthCtrl.entities?this._layer&&this._earthCtrl.primitives.remove(this._layer):this._layer&&this._earthCtrl.coreMap.scene.imageryLayers.remove(this._layer)};Object.defineProperties(mB.prototype,{readyPromise:{get:function(){return this._layer.readyPromise}}});function ARi(o){return new ss({fabric:{type:"HeatMapMaterial",materials:{imageMaterial:{type:"Image",uniforms:{image:o}},gridMaterial:{type:"Grid"}},components:{emission:" imageMaterial.diffuse * gridMaterial.diffuse",diffuse:" imageMaterial.diffuse * gridMaterial.diffuse",alpha:"imageMaterial.alpha * gridMaterial.alpha*2.0"}},translucent:!1})}mB.prototype.updateLayer=function(){if(this._useEntitiesIfAvailable&&this._earthCtrl.entities){this._layer&&this._earthCtrl.primitives.remove(this._layer);let o=this,A=this._rectangle,f=ee.fromRadiansArray([A.west,A.north,A.east,A.north,A.east,A.south,A.west,A.south]),m=ARi(this._heatmap._renderer.canvas);m.materials.gridMaterial.uniforms.color=At.WHITE,m.materials.gridMaterial.uniforms.cellAlpha=.1,m.materials.gridMaterial.uniforms.lineCount=this._lineCount,m.materials.gridMaterial.uniforms.lineThickness=new It(this._lineWidth,this._lineWidth),m.update(o._earthCtrl.coreMap.scene.context),this._layer=this._earthCtrl.primitives.add(new $a({geometryInstances:new co({geometry:new rh({polygonHierarchy:new Un(f),granularity:o._granularity})}),appearance:new Ig({material:m}),heatMap:o._mode3D?o:void 0,scaleHeight:o._scaleHeight}))}else this._layer&&this._earthCtrl.coreMap.scene.imageryLayers.remove(this._layer),this._layer=this._earthCtrl.coreMap.scene.imageryLayers.addImageryProvider(zl._getImageryProvider(this))};var Tct=zl;function Mct(o,A){this.mEarthCtrl=o,this.coreMap=o.coreMap,this._color=Ae(A.color,At.YELLOW.withAlpha(1)),this._maxRadius=Ae(A.maxRadius,1500),this._duration=Ae(A.duration,4e3),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,500),this._cartoCenter=Kt.fromDegrees(this._lon,this._lat),this._pps=null,this._rtti="RadarScan",this._parameter=A,this.toJSON=function(){return il.export(this)},this.removeFromMap=function(){Pct(this)}}function hRi(o){if(O(o._pps))return;let A=o._cartoCenter,f=Kt.toCartesian(A),m=new ai(f.x,f.y,f.z,1),C=new Kt(A.longitude,A.latitude,A.height+o._height),y=Kt.toCartesian(C),x=new ai(y.x,y.y,y.z,1),v=new Kt(A.longitude+je.toRadians(.001),A.latitude,A.height),E=Kt.toCartesian(v),I=new ai(E.x,E.y,E.z,1),w=new jr,Q=new ci,M=new Date().getTime(),B=new ai,T=new ai,D=new ai,F=new ee,L=new ee,R=o.mEarthCtrl.coreMap.scene.camera;o._pps=new va({fragmentShader:dRi(),uniforms:{u_scanCenterEC:function(){return Xe.multiplyByVector(R._viewMatrix,m,B)},u_scanPlaneNormalEC:function(){let U=Xe.multiplyByVector(R._viewMatrix,m,B),V=Xe.multiplyByVector(R._viewMatrix,x,T);return F.x=V.x-U.x,F.y=V.y-U.y,F.z=V.z-U.z,ee.normalize(F,F),F},u_radius:o._maxRadius,u_scanLineNormalEC:function(){let U=Xe.multiplyByVector(R._viewMatrix,m,B),V=Xe.multiplyByVector(R._viewMatrix,x,T),H=Xe.multiplyByVector(R._viewMatrix,I,D);F.x=V.x-U.x,F.y=V.y-U.y,F.z=V.z-U.z,ee.normalize(F,F),L.x=H.x-U.x,L.y=H.y-U.y,L.z=H.z-U.z;let q=(new Date().getTime()-M)%o._duration/o._duration;return jr.fromAxisAngle(F,q*je.PI*2,w),ci.fromQuaternion(w,Q),ci.multiplyByVector(Q,L,L),ee.normalize(L,L),L},u_scanColor:o._color}}),o.mEarthCtrl.coreMap.scene.postProcessStages.add(o._pps)}function Pct(o){O(o._pps)&&(o.mEarthCtrl.coreMap.scene.postProcessStages.remove(o._pps),o._pps=null)}function dRi(){return`uniform sampler2D colorTexture;
                    `}Object.defineProperties(Bct.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._pps!==null},set:function(o){o===!0?PPi(this):RPi(this)}}});var gse=Bct;function RW(o){this.mEarthCtrl=o,this.coreMap=o.coreMap,this._fog=new cse(o),this._rain=new Ase(o),this._snow=new hse(o),this._colorAdjustment=new dse(o),this._bwMode=new fse(o),this._nightMode=new gse(o)}RW.prototype.disableAllEffect=function(){this._fog.show=!1,this._rain.show=!1,this._snow.show=!1,this._colorAdjustment.show=!1,this._bwMode.show=!1,this._nightMode.show=!1};RW.prototype.showEffect=function(o){this.disableAllEffect(),o==="fog"?this._fog.show=!0:o==="rain"?this._rain.show=!0:o==="snow"?this._snow.show=!0:o==="colorAdjustment"?this._colorAdjustment.show=!0:o==="bwMode"?this._bwMode.show=!0:o==="nightMode"&&(this._nightMode.show=!0)};RW.prototype.disableEffect=function(o){o==="fog"?this._fog.show=!1:o==="rain"?this._rain.show=!1:o==="snow"?this._snow.show=!1:o==="colorAdjustment"?this._colorAdjustment.show=!1:o==="bwMode"?this._bwMode.show=!1:o==="nightMode"&&(this._nightMode.show=!1)};Object.defineProperties(RW.prototype,{SkyBoxSource:{get:function(){return this.coreMap.scene.skyBox?this.coreMap.scene.skyBox.sources:{}},set:function(o){O(o)&&(this.coreMap.scene.skyBox&&this.coreMap.scene.skyBox.destroy(),this.coreMap.scene.skyBox=new mN({sources:o}))}},fog:{get:function(){return this._fog}},rain:{get:function(){return this._rain}},snow:{get:function(){return this._snow}},colorAdjustment:{get:function(){return this._colorAdjustment}},bwMode:{get:function(){return this._bwMode}},nightMode:{get:function(){return this._nightMode}}});var pse=RW;function FPi(o,A){let f=o.length;for(;f--;)if(o[f]===A)return!0;return!1}function NPi(o,A){let f=o.indexOf(A);f>-1&&o.splice(f,1)}var mse=class extends c0{constructor(A){super(A),this._objectMap=[],this._isBenchUpdate=!1,this._EventSelectSetChanged=new SN("EventSelectSetChanged")}finalize(){this._objectArray=[]}addObject(A){if(FPi(this._objectArray,A))return!1;this._objectArray.push(A),this._isBenchUpdate||this.commitChanged()}removeObject(A){NPi(this._objectArray,A),this._isBenchUpdate||this.commitChanged()}getObject(A){return A<0||A>=this._objectArray.length?null:this._objectArray[A]}removeAll(A){this._objectArray=[],this._isBenchUpdate||this.commitChanged()}beginUpdate(){this._isBenchUpdate=!0}endUpdate(){this._isBenchUpdate&&(this.commitChanged(),this._isBenchUpdate=!1)}commitChanged(){this._EventSelectSetChanged.notifyEvent(this)}};Object.defineProperties(mse.prototype,{count:{get:function(){return this._objectArray.length}},EventSelectSetChanged:{get:function(){return this._EventSelectSetChanged}}});var Cse=mse;var kPi={GWIMAGERYLAYER:"GwImageryLayer",GWTERRAINLAYER:"GwTerrainLayer",GWMODELLAYER:"GwModelLayer",GWFEATURELAYER:"GwFeatureLayer",GWMODEL:"GwModel",GWWATERS:"GwWaters",GWEXPLOSION:"GwExplosion",GWFIREWORK:"GwFireworks",GWFIRE:"GwFire",GWSMOKE:"GwSmoke",GWRADARSCAN:"GwRadarScan",GWCIRCLESCAN:"GwCircleScan",GWPOINT:"GwPoint",GWLABEL:"GwLabel",GWBILLBOARD:"GwBillboard",GWPOLYLINE:"GwPolyline",GWPOLYGON:"GwPolygon",GWRECTANGLE:"GwRectangle",GWBOX:"GwBox",GWCYLINDER:"GwCylinder",GWELLIPSOID:"GwEllipsoid",GWVIDEOPROJECTION:"GwVideoProjection"},Mg=Object.freeze(kPi);var OPi={NODE:"NODE",IMAGERY_LAYER:"IMAGERY_LAYER",TERRAIN_LAYER:"TERRAIN_LAYER",MODEL_LAYER:"MODEL_LAYER",FEATURE_LAYER:"FEATURE_LAYER",SKYBOX:"SKYBOX",ENVIRONMENT:"ENVIRONMENT",VIEWPOINT:"VIEWPOINT",MODEL:"MODEL",WATERS:"WATERS",EXPLOSION:"EXPLOSION",FIREWORK:"FIREWORK",SMOKE:"SMOKE",FIRE:"FIRE",RADARSCAN:"RADARSCAN",CIRCLESCAN:"CIRCLESCAN",POINT:"POINT",LABEL:"LABEL",BILLBOARD:"BILLBOARD",POLYLINE:"POLYLINE",POLYGON:"POLYGON",RECTANGLE:"RECTANGLE",ELLIPSE:"ELLIPSE",BOX:"BOX",ELLIPSOID:"ELLIPSOID",CYLINDER:"CYLINDER",POLYLINEVOLUME:"POLYLINEVOLUME",PERSPECTIVE_VIDEO_PROJECTION:"PERSPECTIVE_VIDEO_PROJECTION",FISHEYE_VIDEO_PROJECTION:"FISHEYE_VIDEO_PROJECTION",TRACK:"TRACK",HEATMAP:"HEATMAP",ECHARTLAYER:"ECHARTLAYER"},Eo=Object.freeze(OPi);function UPi(o){return o!=null?o._value:o}var fu=UPi;function Td(){}Td.export=function(o){let A=null,f=Td.ExportObjectMap[o._rtti];return f!==void 0&&(A=f(o)),A};function GPi(o){let A=null,f=Ae(o.sourceType,"wmts");if(f==="tms"){let m=o._primitive.imageryProvider._rectangle;O(m)?m={west:je.toDegrees(m.west),south:je.toDegrees(m.south),east:je.toDegrees(m.east),north:je.toDegrees(m.north)}:m={west:"",south:"",east:"",north:""},A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,""),west:m.west,south:m.south,east:m.east,north:m.north}}if(f==="wms"){let m=o._primitive.imageryProvider._resource._queryParameters;A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,layers:Ae(o._primitive.imageryProvider._layers,""),maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,""),parameters:{transparent:m.transparent,format:m.format,crs:m.crs,version:m.version,layers:m.layers}}}return f==="wmts"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,layer:Ae(o._primitive.imageryProvider._layer,""),format:Ae(o._primitive.imageryProvider._format,""),tileMatrixSetID:Ae(o._primitive.imageryProvider._tileMatrixSetID,""),maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),f==="mapbox"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,mapId:"",show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),f==="arcgis"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),f==="multi"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),f==="single"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),f==="baidu"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),f==="gaode"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),f==="mapworld"&&(A={class:Ae(o._parameter.class,Eo.IMAGERY_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._primitive._layerIndex,url:o.dataUrl,show:o.show,maximumLevel:Ae(o._primitive.imageryProvider.maximumLevel,""),minimumLevel:Ae(o._primitive.imageryProvider.minimumLevel,"")}),A}function HPi(o){let A=null,f=Ae(o.sourceType,"ctb");return f==="ude"&&(A={class:Ae(o._parameter.class,Eo.TERRAIN_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._parameter.zIndex,url:o.dataUrl,show:o.show}),f==="ctb"&&(A={class:Ae(o._parameter.class,Eo.TERRAIN_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._parameter.zIndex,url:o.dataUrl,show:o.show}),f==="multi"&&(A={class:Ae(o._parameter.class,Eo.TERRAIN_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,zIndex:o._parameter.zIndex,url:o.dataUrl,show:o.show}),A}function VPi(o){let A=null,f=Ae(o.sourceType,"b3dm");return(f==="b3dm"||f==="3DTiles")&&(A={class:Ae(o._parameter.class,Eo.MODEL_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,zIndex:o._parameter.zIndex,url:o.dataUrl,options:o._parameter.options,transform:o._parameter.transform}),f==="osgb"&&(A={class:Ae(o._parameter.class,Eo.MODEL_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),f==="s3m"&&(A={class:Ae(o._parameter.class,Eo.MODEL_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),(f==="ude_block"||f==="ude_model")&&(A={class:Ae(o._parameter.class,Eo.MODEL_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),A}function zPi(o){console.log("\u5F53\u524D\u64CD\u4F5C\u8282\u70B9>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>",o);let A=null,f=Ae(o.sourceType,"geojson");return f==="geojson"&&(A={class:Ae(o._parameter.class,Eo.FEATURE_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),f==="feature"&&(A={class:Ae(o._parameter.class,Eo.FEATURE_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),f==="custom"&&(A={class:Ae(o._parameter.class,Eo.FEATURE_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),f==="kml"&&(A={class:Ae(o._parameter.class,Eo.FEATURE_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),f==="arcgis_json"&&(A={class:Ae(o._parameter.class,Eo.FEATURE_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),f==="raster"&&(A={class:Ae(o._parameter.class,Eo.FEATURE_LAYER),name:o.name,id:o.id,sourceType:o.sourceType,show:o.show,url:o.dataUrl}),A}function KPi(o){let A=null,f=Ae(o.sourceType,"gltf");return f==="gltf"&&(A={class:Ae(o._parameter.class,Eo.MODEL),name:o.name,id:o.id,sourceType:f,show:o.show,url:o.dataUrl,lon:o.lon,lat:o.lat,alt:o.alt,heading:o.heading,pitch:o.pitch,roll:o.roll,scale:o._primitive.scale,minimumPixelSize:o._primitive.minimumPixelSize}),f==="glb"&&(A={class:Ae(o._parameter.class,Eo.MODEL),name:o.name,id:o.id,sourceType:f,show:o.show,url:o.dataUrl,lon:o.lon,lat:o.lat,alt:o.alt,heading:o.heading,pitch:o.pitch,roll:o.roll,scale:o._primitive.scale,minimumPixelSize:o._primitive.minimumPixelSize}),A}function YPi(o){let A=null;return A={class:Ae(o._parameter.class,Eo.EXPLOSION),name:o.name,id:o.id,show:o.show,lon:o.parameter.lon,lat:o.parameter.lat,alt:o.parameter.alt},A}function JPi(o){let A=null;return A={class:Ae(o._parameter.class,Eo.WATERS),name:o.name,id:o.id,show:o.show,params:o.params,url:o.url,color:o.color,waterFrequency:o.waterFrequency,animationSpeed:o.animationSpeed,amplitude:o.amplitude},A}function WPi(o){let A=null;return A={class:Ae(o._parameter.class,Eo.FIREWORK),name:o.name,id:o.id,show:o.show,lon:o.parameter.lon,lat:o.parameter.lat,alt:o.parameter.alt,emitHeight:o.parameter.emitHeight},A}function jPi(o){let A=null;return A={class:Ae(o._parameter.class,Eo.FIRE),name:o.name,id:o.id,show:o.show,lon:o.parameter.lon,lat:o.parameter.lat,alt:o.parameter.alt,particleSize:o.parameter.particleSize},A}function qPi(o){let A=null;return A={class:Ae(o._parameter.class,Eo.SMOKE),name:o.name,id:o.id,show:o.show,lon:o.parameter.lon,lat:o.parameter.lat,alt:o.parameter.alt,particleSize:o.parameter.particleSize},A}function XPi(o){let A=null;return A={class:Eo.RADARSCAN,name:o.name,id:o.id,show:o.show,lon:o._lon,lat:o._lat,height:o._height,maxRadius:o._maxRadius,duration:o._duration,color:o._color},A}function ZPi(o){let A=null;return A={class:Eo.CIRCLESCAN,name:o.name,id:o.id,show:o.show,lon:o._lon,lat:o._lat,height:o._height,maxRadius:o._maxRadius,duration:o._duration,color:o._color},A}function $Pi(o){let A=null,f=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(o._primitive.position._value);return A={class:Ae(o._parameter.class,Eo.POINT),name:o.name,id:o.id,show:o.show,lon:je.toDegrees(f.longitude),lat:je.toDegrees(f.latitude),alt:parseInt(f.height.toFixed(2)),pixelSize:fu(o._primitive.point.pixelSize),color:fu(o._primitive.point.color),outlineColor:fu(o._primitive.point.outlineColor),outlineWidth:fu(o._primitive.point.outlineWidth)},A}function eRi(o){let A=null,f=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(o._primitive.position._value);return A={class:Ae(o._parameter.class,Eo.LABEL),id:o.id,show:o.show,name:o.name,lon:je.toDegrees(f.longitude),lat:je.toDegrees(f.latitude),alt:parseInt(f.height.toFixed(2)),text:fu(o._primitive.label.text),font:fu(o._primitive.label.font),fillColor:fu(o._primitive.label.fillColor),outlineWidth:fu(o._primitive.label.outlineWidth),verticalOrigin:fu(o._primitive.label.verticalOrigin)},A}function tRi(o){let A=null,f=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(o._primitive.position._value);return A={class:Ae(o._parameter.class,Eo.BILLBOARD),name:o.name,id:o.id,show:o.show,lon:je.toDegrees(f.longitude),lat:je.toDegrees(f.latitude),alt:parseInt(f.height.toFixed(2)),image:fu(o._primitive.billboard.image),scale:fu(o._primitive.billboard.scale)},A}function iRi(o){let A=null,f=[];return o._primitive.polyline.positions._value.forEach(function(C){let y=[],x=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(C);y.push(je.toDegrees(x.longitude)),y.push(je.toDegrees(x.latitude)),y.push(x.height),f.push(y)}),A={class:Ae(o._parameter.class,Eo.POLYLINE),name:o.name,id:o.id,show:o.show,positions:f,lineColor:o._parameter.lineColor,lineWidth:fu(o._primitive.polyline.width),clampToGround:fu(o._primitive.polyline.clampToGround),outlineColor:o._parameter.outlineColor},A}function rRi(o){let A=null,f=[];return o.positions.positions.forEach(function(C){let y=[],x=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(C);y.push(je.toDegrees(x.longitude)),y.push(je.toDegrees(x.latitude)),y.push(x.height),f.push(y)}),A={class:Ae(o._parameter.class,Eo.POLYGON),name:o.name,id:o.id,show:o.show,positions:f,material:o.material?fu(o._primitive.polygon.material.color):void 0,outline:fu(o.outline),outlineColor:fu(o.outlineColor)},A}function nRi(o){let A=null,f=o.coordinates,m=je.toDegrees(f.east),C=je.toDegrees(f.north),y=je.toDegrees(f.south),v=[je.toDegrees(f.west),y,m,C];return A={class:Ae(o._parameter.class,Eo.RECTANGLE),name:o.name,id:o.id,show:o.show,coordinates:v,height:fu(o.height),fillColor:o.fillColor?fu(o.fillColor.color):void 0,outline:fu(o.outline),outlineColor:fu(o.outlineColor)},A}function oRi(o){let A=null,f=[],m=fu(o.position),C=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(m);return f.push(je.toDegrees(C.longitude)),f.push(je.toDegrees(C.latitude)),f.push(C.height),A={class:Ae(o._parameter.class,Eo.BOX),name:o.name,id:o.id,show:o.show,position:f,dimensions:o.dimensions._value,material:o.material?fu(o._primitive.box.material.color):void 0,fill:fu(o.fill),outline:fu(o.outline),outlineColor:fu(o.outlineColor)},A}function aRi(o){let A=null,f=[],m=fu(o.position),C=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(m);return f.push(je.toDegrees(C.longitude)),f.push(je.toDegrees(C.latitude)),f.push(C.height),A={class:Ae(o._parameter.class,Eo.CYLINDER),name:o.name,id:o.id,show:o.show,position:f,topRadius:fu(o.topRadius),bottomRadius:fu(o.bottomRadius),length:fu(o.length),fill:fu(o.fill),material:o.material?fu(o._primitive.cylinder.material.color):void 0,outline:fu(o.outline),outlineColor:fu(o.outlineColor)},A}function sRi(o){let A=null,f=[],m=fu(o.position),C=o._coreMap.scene.globe.ellipsoid.cartesianToCartographic(m);f.push(je.toDegrees(C.longitude)),f.push(je.toDegrees(C.latitude)),f.push(C.height);let y=[],x=fu(o.radii);return y.push(x.x),y.push(x.y),y.push(x.z),A={class:Ae(o._parameter.class,Eo.ELLIPSOID),name:o.name,id:o.id,show:o.show,position:f,radii:y,fill:fu(o.fill),material:o.material?fu(o._primitive.ellipsoid.material.color):void 0,outline:fu(o.outline),outlineColor:fu(o.outlineColor)},A}function lRi(o){let A=null,f=Ae(o._parameter.sourceType,"perspective");return(f==="perspective"||f==="panorama")&&(A={class:Ae(o._parameter.class,Eo.PERSPECTIVE_VIDEO_PROJECTION),name:o.name,id:o.id,sourceType:o._parameter.sourceType,matchMaterials:o._parameter.matchMaterials,lon:o._parameter.lon,lat:o._parameter.lat,height:o._parameter.height,heading:o._parameter.heading,pitch:o._parameter.pitch,roll:o._parameter.roll,fov:o._parameter.fov,far:o._parameter.far,near:o._parameter.near,opacity:o._parameter.opacity,maxDiffAngle:o._parameter.maxDiffAngle,videoLink:o._parameter.videoLink,aspect:o._parameter.aspect,addToMap:o._parameter.addToMap,preview:o._parameter.preview,playVideo:o._parameter.playVideo,showMesh:o.showMesh,show:o.show,enable:o._parameter.enable,videoFrameInterval:o._parameter.videoFrameInterval,useDepth:o._parameter.useDepth}),f==="fisheye"&&(A={class:Ae(o._parameter.class,Eo.FISHEYE_VIDEO_PROJECTION),name:o.name,id:o.id,sourceType:o._parameter.sourceType,matchMaterials:o._parameter.matchMaterials,lon:o._parameter.lon,lat:o._parameter.lat,height:o._parameter.height,heading:o._parameter.heading,pitch:o._parameter.pitch,roll:o._parameter.roll,fov:o._parameter.fov,far:o._parameter.far,near:o._parameter.near,opacity:o._parameter.opacity,maxDiffAngle:o._parameter.maxDiffAngle,videoLink:o._parameter.videoLink,aspect:o._parameter.aspect,addToMap:o._parameter.addToMap,preview:o._parameter.preview,playVideo:o._parameter.playVideo,showMesh:o.showMesh,show:o.show,enable:o._parameter.enable,videoFrameInterval:o._parameter.videoFrameInterval,useDepth:o._parameter.useDepth}),A}Td.ExportObjectMap={};Td.ExportObjectMap[Mg.GWEXPLOSION]=YPi;Td.ExportObjectMap[Mg.GWWATERS]=JPi;Td.ExportObjectMap[Mg.GWFIREWORK]=WPi;Td.ExportObjectMap[Mg.GWSMOKE]=qPi;Td.ExportObjectMap[Mg.GWFIRE]=jPi;Td.ExportObjectMap[Mg.GWRADARSCAN]=XPi;Td.ExportObjectMap[Mg.GWCIRCLESCAN]=ZPi;Td.ExportObjectMap[Mg.GWPOINT]=$Pi;Td.ExportObjectMap[Mg.GWLABEL]=eRi;Td.ExportObjectMap[Mg.GWBILLBOARD]=tRi;Td.ExportObjectMap[Mg.GWPOLYLINE]=iRi;Td.ExportObjectMap[Mg.GWPOLYGON]=rRi;Td.ExportObjectMap[Mg.GWRECTANGLE]=nRi;Td.ExportObjectMap[Mg.GWBOX]=oRi;Td.ExportObjectMap[Mg.GWCYLINDER]=aRi;Td.ExportObjectMap[Mg.GWELLIPSOID]=sRi;Td.ExportObjectMap[Mg.GWVIDEOPROJECTION]=lRi;Td.ExportObjectMap[Mg.GWIMAGERYLAYER]=GPi;Td.ExportObjectMap[Mg.GWTERRAINLAYER]=HPi;Td.ExportObjectMap[Mg.GWMODELLAYER]=VPi;Td.ExportObjectMap[Mg.GWFEATURELAYER]=zPi;Td.ExportObjectMap[Mg.GWMODEL]=KPi;var il=Td;function Q2(o){this.mEarthCtrl=o,this.coreMap=o.coreMap,this.videoProjection=null,this._parameter=null,this._showMesh=!1,this._auxMeshArray=[],this._highlightState=0,this._colorStyle=[new At(.3,1,.3),At.YELLOW],this._rtti="GwVideoProjection"}Object.defineProperties(Q2.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this.videoProjection!==null?this.videoProjection.enabled:!1},set:function(o){this.videoProjection!==null&&(this.videoProjection.enabled=o)}},showMesh:{get:function(){return this._showMesh},set:function(o){this._showMesh=o,this.updateAuxMesh()}},highlightState:{get:function(){return this._highlightState},set:function(o){this._highlightState=o,this.updateAuxMesh()}},id:{get:function(){return this.videoProjection._id}}});Q2.prototype.setParameter=function(o){if(!!O(o)&&(O(o.lon)||O(o.lat)||O(o.height)||O(o.heading)||O(o.pitch)||O(o.roll)||O(o.near)||O(o.far)||O(o.aspect))){let A=this._parameter;for(let m in o)o.hasOwnProperty(m)&&O(A[m])&&(A[m]=o[m]);let f=this.videoProjection._lightCamera;f.setView({destination:ee.fromDegrees(A.lon,A.lat,A.height),orientation:{heading:je.toRadians(A.heading),pitch:je.toRadians(A.pitch),roll:je.toRadians(A.roll)}}),f.frustum.fov=A.fov/180*Math.PI,f.frustum.near=A.near||1,f.frustum.far=A.far||1e5,f.frustum.aspectRatio=A.aspect||1,this.updateAuxMesh()}};Q2.prototype.initialize=function(o){this._parameter=o;let A=this._parameter,f=new Ml(this.coreMap.scene);A.fov=A.fov||60,f.setView({destination:ee.fromDegrees(A.lon,A.lat,A.height),orientation:{heading:je.toRadians(A.heading),pitch:je.toRadians(A.pitch),roll:je.toRadians(A.roll)}}),f.frustum.fov=A.fov/180*Math.PI,f.frustum.near=A.near||1,f.frustum.far=A.far||1e5,f.frustum.aspectRatio=A.aspect||1;let m;A.useDepth?m=new OY({name:A.name,matchMaterials:A.matchMaterials,context:this.coreMap.scene.context,lightCamera:f,enabled:A.show===!0,isPointLight:!1,cascadesEnabled:!1,numberOfCascades:1,frustum:{fov:A.fov/180*Math.PI,near:A.near||1,far:A.far||1e5,aspectRatio:A.aspect||1},depthBias:A.depthBias,videoFrameInterval:A.videoFrameInterval,playVideo:A.playVideo,opacity:A.opacity,calibrateParam:A.calibrateParam,maxDiffAngle:A.maxDiffAngle/180*Math.PI,useDepth:A.useDepth,blendTop:A.blendTop,blendRight:A.blendRight,blendBottom:A.blendBottom,blendLeft:A.blendLeft,maximumDistance:A.maximumDistance||1e3}):m=new kY({name:A.name,matchMaterials:A.matchMaterials,context:this.coreMap.scene.context,lightCamera:f,enabled:A.show===!0,isPointLight:!1,cascadesEnabled:!1,numberOfCascades:1,frustum:{fov:A.fov/180*Math.PI,near:A.near||1,far:A.far||1e5,aspectRatio:A.aspect||1},depthBias:A.depthBias,videoFrameInterval:A.videoFrameInterval,playVideo:A.playVideo,opacity:A.opacity,calibrateParam:A.calibrateParam,maxDiffAngle:A.maxDiffAngle/180*Math.PI,useDepth:!1,blendTop:A.blendTop,blendRight:A.blendRight,blendBottom:A.blendBottom,blendLeft:A.blendLeft,maximumDistance:A.maximumDistance}),m.castTexture=A.castTexture,this.videoProjection=m,this._showMesh=A.showMesh,A.addToMap===!0&&this.addToMap()};var VTe=new jr;Q2.prototype.updateAuxMesh=function(){let o=this;if(o._auxMeshArray.length>0){for(let f=0;f<o._auxMeshArray.length;f++){let m=o._auxMeshArray[f];this.mEarthCtrl.coreMap.scene.primitives.remove(m)}this._auxMeshArray=[]}let A=Al;if(o._showMesh===!0){let f=o._colorStyle[o._highlightState],m=o.parameter;{let C=ee.fromDegrees(m.lon,m.lat,m.height),y={heading:je.toRadians(m.heading+90),pitch:je.toRadians(90-m.pitch),roll:je.toRadians(m.roll)},x=Vn.headingPitchRollQuaternion(C,y);VTe=jr.fromAxisAngle(o.videoProjection._lightCamera.direction,je.toRadians(90),VTe),jr.multiply(VTe,x,x);{let v=new co({geometry:new C6({frustum:this.videoProjection._lightCamera.frustum,origin:C,orientation:x,vertexFormat:Wr.ALL}),id:"ellipsoid",attributes:{color:Yo.fromColor(f.withAlpha(.1))}}),E=new $a({shadows:A.DISABLED,geometryInstances:v,appearance:new za});this.mEarthCtrl.coreMap.scene.primitives.add(E),o._auxMeshArray.push(E)}{let v=new co({geometry:new FY({frustum:this.videoProjection._lightCamera.frustum,origin:C,orientation:x,vertexFormat:Wr.ALL}),id:"outlines",shadows:A.DISABLED,attributes:{color:Yo.fromColor(f.withAlpha(.8))}}),E=new $a({geometryInstances:v,appearance:new za({translucent:!0,flat:!0}),shadows:A.DISABLED,asynchronous:!1});this.mEarthCtrl.coreMap.scene.primitives.add(E),o._auxMeshArray.push(E)}{let v=new co({geometry:new gC({radii:new ee(.1,.1,.1),vertexFormat:Wr.POSITION_AND_NORMAL}),modelMatrix:Xe.multiplyByTranslation(Vn.eastNorthUpToFixedFrame(ee.fromDegrees(m.lon,m.lat,m.height)),new ee(0,0,0),new Xe),id:"ellipsoid",shadows:A.DISABLED,attributes:{color:Yo.fromColor(f.withAlpha(.5))}}),E=new $a({geometryInstances:v,appearance:new za});this.mEarthCtrl.coreMap.scene.primitives.add(E),o._auxMeshArray.push(E)}}}};Q2.prototype.addToMap=function(){this.videoProjection!==null&&(this.mEarthCtrl.textureProjectionMapList.push(this.videoProjection),this.updateAuxMesh())};Q2.prototype.setEnable=function(o){this.videoProjection!==null&&(this.videoProjection.enabled=o)};Q2.prototype.remove=function(){let o=this;if(o.videoProjection!==null){let A=o.mEarthCtrl.textureProjectionMapList;for(let f=0;f<A.length;f++){let m=A[f];o.videoProjection===m&&A.splice(f,1)}}if(o._auxMeshArray.length>0){for(let A=0;A<o._auxMeshArray.length;A++){let f=o._auxMeshArray[A];o.mEarthCtrl.coreMap.scene.primitives.remove(f)}o._auxMeshArray=[]}};Q2.prototype.toJSON=function(){return il.export(this)};Q2.prototype.updateBlend=function(o,A,f,m){this.videoProjection&&this.videoProjection.updateBlend(this.coreMap.scene.context,o,A,f,m)};var yse=Q2;function GH(o){this.mEarthCtrl=o,this.coreMap=o.coreMap,this.shadowMap=null,this._rtti="GwVideoProjection"}GH.prototype.initialize=function(o){let A=new Ml(this.coreMap.scene);A.setView({destination:o.destination,orientation:o.orientation}),A.frustum.fov=o.fov||Math.PI/3,A.frustum.near=o.near||1,A.frustum.far=o.far||1e5,A.frustum.aspectRatio=o.aspect||1;let f=new xQ({name:o.name,context:this.coreMap.scene.context,lightCamera:A,enabled:o.enabled||!0,isPointLight:!1,cascadesEnabled:!1,numberOfCascades:1,frustum:{fov:o.fov||Math.PI/3,near:o.near||1,far:o.far||1e5,aspectRatio:o.aspect||1},depthBias:o.depthBias,playVideo:o.playVideo});f.castTexture=o.castTexture,this.shadowMap=f,o.addToMap===!0&&this.addToMap()};GH.prototype.addToMap=function(){this.shadowMap!==null&&this.mEarthCtrl.shadowMapList.push(this.shadowMap)};GH.prototype.setEnable=function(o){this.shadowMap!==null&&(this.shadowMap.enabled=o)};GH.prototype.remove=function(){if(this.shadowMap!==null){let o=this.mEarthCtrl.shadowMapList;for(let A=0;A<o.length;A++){let f=o[A];this.shadowMap===f&&o.splice(A,1)}}};GH.prototype.toJSON=function(){return il.export(this)};var wct=GH;function GP(o){this.mEarthCtrl=o,this.coreMap=o.coreMap,this.videoProjection=null,this._parameter=null,this._showMesh=!1,this._auxMesh=null,this._rtti="GwVideoProjection"}Object.defineProperties(GP.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this.videoProjection!==null?this.videoProjection.enabled:!1},set:function(o){this.videoProjection!==null&&(this.videoProjection.enabled=o)}},showMesh:{get:function(){return this._showMesh},set:function(o){this._showMesh=o,this.updateAuxMesh()}}});GP.prototype.setParameter=function(o){if(!!O(o)){if(O(o.lon)||O(o.lat)||O(o.height)||O(o.heading)||O(o.pitch)||O(o.roll)||O(o.near)||O(o.far)||O(o.aspect)){let A=this._parameter;for(let m in o)o.hasOwnProperty(m)&&O(A[m])&&(A[m]=o[m]);let f=this.videoProjection._lightCamera;f.setView({destination:ee.fromDegrees(A.lon,A.lat,A.height),orientation:{heading:je.toRadians(A.heading),pitch:je.toRadians(A.pitch),roll:je.toRadians(A.roll)}}),f.frustum.fov=170/180*Math.PI,f.frustum.near=A.near||1,f.frustum.far=A.far||1e5,f.frustum.aspectRatio=A.aspect||1}this.updateAuxMesh()}};GP.prototype.initialize=function(o){this._parameter=o;let A=this._parameter,f=new Ml(this.coreMap.scene);f.setView({destination:ee.fromDegrees(A.lon,A.lat,A.height),orientation:{heading:je.toRadians(A.heading),pitch:je.toRadians(A.pitch),roll:je.toRadians(A.roll)}}),f.frustum.fov=170/180*Math.PI,f.frustum.near=A.near||1,f.frustum.far=A.far||1e5,f.frustum.aspectRatio=A.aspect||1;let m=new NY({name:A.name,matchMaterials:A.matchMaterials,context:this.coreMap.scene.context,lightCamera:f,enabled:A.enabled||!0,isPointLight:!1,cascadesEnabled:!1,numberOfCascades:1,frustum:{fov:170/180*Math.PI,near:A.near||1,far:A.far||1e5,aspectRatio:A.aspect||1},depthBias:A.depthBias,videoFrameInterval:A.videoFrameInterval,playVideo:A.playVideo,opacity:A.opacity,maxDiffAngle:A.maxDiffAngle,maximumDistance:A.maximumDistance||1e3});m.castTexture=A.castTexture,this.videoProjection=m,this._showMesh=A.showMesh,A.addToMap===!0&&this.addToMap()};GP.prototype.updateAuxMesh=function(){let o=this;if(o._auxMesh&&(o.mEarthCtrl.factory.removeElement(o._auxMesh),o._auxMesh=null),o._showMesh===!0){let A=o.parameter,f=A.far||2;o._auxMesh=this.mEarthCtrl.factory.createElement({name:"sphere1",type:"ellipsoid",position:ee.fromDegrees(A.lon,A.lat,A.height),parameters:{radii:new ee(f,f,f),material:At.RED.withAlpha(.1),outline:!0,outlineColor:At.GREEN}})}};GP.prototype.addToMap=function(){this.videoProjection!==null&&(this.mEarthCtrl.textureProjectionMapList.push(this.videoProjection),this.updateAuxMesh())};GP.prototype.setEnable=function(o){this.videoProjection!==null&&(this.videoProjection.enabled=o)};GP.prototype.remove=function(){if(this.videoProjection!==null){let o=this.mEarthCtrl.textureProjectionMapList;for(let A=0;A<o.length;A++){let f=o[A];this.videoProjection===f&&o.splice(A,1)}}};GP.prototype.toJSON=function(){return il.export(this)};var xse=GP;var MN=function(){let o=this;o.timer=null,o.interval=.05,o.isPause=!1,o.callbackList=new SN("callback")};MN.prototype.init=function(o){this.interval=o};MN.prototype.fini=function(){this.stop()};MN.prototype.start=function(){let o=this,A=function(){o.isPause===!1&&o.callbackList.notifyEvent(this,0)};o.timer=window.setInterval(A,this.interval*1e3)};MN.prototype.stop=function(){this.timer&&(window.clearInterval(this.timer),this.timer=null)};MN.prototype.setPause=function(o){this.isPause=o};MN.prototype.addListener=function(o){this.callbackList.addEventHandler(this,o)};MN.prototype.clearListeners=function(){this.callbackList.clearEventHandler()};var vse=MN;function LW(o){this.mEarthCtrl=o,this.coreMap=o.coreMap,this.trackInfos=[],this.timer=null,this.animationController=new vse,this.currIndex=-1,this.startTime=0,this.currentTrackInfo=null}function uRi(o,A){if(o.length===0)return null;let f=null;for(let m=0;m<o.length&&o[m].timeStamp<A;m++)f=o[m];return f}function cRi(o,A){A.class==="LOOKAT"&&(A.duration===void 0&&(A.duration=4e3),O(A.position)||(A.position=ee.fromDegrees(A.lon,A.lat,A.alt)),O(A.orientation)||(A.orientation={heading:je.toRadians(A.heading),pitch:je.toRadians(A.pitch),roll:je.toRadians(A.roll)}),o.coreMap.camera.flyTo({destination:A.position,orientation:A.orientation,duration:A.duration/1e3}))}LW.prototype.initialize=function(o){let A=0,f=this;for(let m=0;m<o.stations.length;m++){let C=o.stations[m];C.class==="LOOKAT"&&(C.timeStamp=A,A+=C.stopTime,f.trackInfos.push(C))}f.animationController.addListener(function(m){let C=new Date().getTime()-f.startTime,y=uRi(f.trackInfos,C);y!==f.currentTrackInfo&&(cRi(f.mEarthCtrl,y),f.currentTrackInfo=y)})};LW.prototype.finalize=function(){this.animationController.finalize(),this.currentTrackInfo=null};LW.prototype.play=function(){let o=this;o.currentTrackInfo=null,o.startTime=new Date().getTime(),o.animationController.start()};LW.prototype.stop=function(){this.animationController.stop(),this.currentTrackInfo=null};var bct=LW;var Ese=class extends Qc{constructor(A,f){super(A,f),this._rtti="Fire",this._primitive=null,this._parameter=f,this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll)}addToMap(){let A=this._parameter,f=this._coreMap;function m(){let x=dC.fromDegrees(0,0,0),v=new aB;return v.translation=ee.fromElements(2.5,4,1),v.rotation=jr.fromHeadingPitchRoll(x),Xe.fromTranslationRotationScale(v)}let C=Ae(A.particleSize,30),y=f.scene.primitives.add(new _2({image:Ae(A.image,`${globalThis.GEOWORLD_BASE_URL}Assets/Images/fire.png`),startColor:Ae(A.startColor,At.RED.withAlpha(.7)),endColor:Ae(A.endColor,At.YELLOW.withAlpha(.3)),startScale:Ae(A.startScale,1),endScale:Ae(A.endScale,4),minimumParticleLife:Ae(A.minimumParticleLife,1),maximumParticleLife:Ae(A.maximumParticleLife,6),minimumSpeed:Ae(A.minimumSpeed,5),maximumSpeed:Ae(A.maximumSpeed,10),imageSize:new It(C,C),emissionRate:Ae(A.emissionRate,5),bursts:[],lifetime:Ae(A.lifeTime,16),emitter:new vH(je.toRadians(30)),modelMatrix:this._spatialTransform.modelMatrix,emitterModelMatrix:m()}));this._primitive=y}removeFromMap(){this._primitive!==null&&this._coreMap.scene.primitives.remove(this._primitive)}toJSON(){let A=this;return il.export(A)}};Object.defineProperties(Ese.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var Ise=Ese;var _se=class extends Qc{constructor(A,f){super(A,f),this._rtti="Smoke",this._primitive=null,this._parameter=f,this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll),this._coreMap=A.coreMap}addToMap(){let A=this._parameter,f=this._coreMap;function m(){let x=dC.fromDegrees(0,0,0),v=new aB;return v.translation=ee.fromElements(2.5,4,1),v.rotation=jr.fromHeadingPitchRoll(x),Xe.fromTranslationRotationScale(v)}let C=Ae(A.particleSize,30),y=f.scene.primitives.add(new _2({image:Ae(A.image,`${globalThis.GEOWORLD_BASE_URL}Assets/Images/smoke.png`),startColor:Ae(A.startColor,At.fromRgba(3425907507)),endColor:Ae(A.endColor,At.fromRgba(1154272460)),startScale:Ae(A.startScale,1),endScale:Ae(A.endScale,4),minimumParticleLife:Ae(A.minimumParticleLife,1),maximumParticleLife:Ae(A.maximumParticleLife,6),minimumSpeed:Ae(A.minimumSpeed,5),maximumSpeed:Ae(A.maximumSpeed,20),imageSize:new It(C,C),emissionRate:Ae(A.emissionRate,10),bursts:[],lifetime:Ae(A.lifeTime,16),emitter:new vH(je.toRadians(30)),modelMatrix:this._spatialTransform.modelMatrix,emitterModelMatrix:m()}));this._primitive=y}removeFromMap(){this._primitive!==null&&this._coreMap.scene.primitives.remove(this._primitive)}toJSON(){let A=this;return il.export(A)}};Object.defineProperties(_se.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}},lon:{get:function(){if(this._parameter!==null)return this._lon},set:function(o){if(this._parameter!==null){if(this._lon===o)return;this._parameter.lon=o,this._spatialTransform.createFromWgs84(this._parameter.lon,this._parameter.lat,this._parameter.alt,this._parameter.heading,this._parameter.pitch,this._parameter.roll),this._primitive.modelMatrix=this._spatialTransform.modelMatrix}}},lat:{get:function(){if(this._parameter!==null)return this._lat},set:function(o){if(this._parameter!==null){if(this._lat===o)return;this._parameter.lat=o,this._spatialTransform.createFromWgs84(this._parameter.lon,this._parameter.lat,this._parameter.alt,this._parameter.heading,this._parameter.pitch,this._parameter.roll),this._primitive.modelMatrix=this._spatialTransform.modelMatrix}}},particleSize:{get:function(){if(this._primitive!==null)return this._primitive.particleSize},set:function(o){if(this._parameter!==null){if(this._parameter.particleSize===o)return;this._parameter.particleSize=o,this._primitive.imageSize=new It(this._parameter.particleSize,this._parameter.particleSize)}}}});var Bse=_se;var wse=class extends Qc{constructor(A,f){super(A,f),this._rtti="Explosion",this._primitive=null,this._parameter=f,this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll),this._coreMap=A.Viewer}finalize(){}addToMap(){let A=this._parameter,f=this._coreMap;function m(){let F=dC.fromDegrees(0,0,0),L=new aB;return L.translation=ee.fromElements(2.5,4,1),L.rotation=jr.fromHeadingPitchRoll(F),Xe.fromTranslationRotationScale(L)}let C=this._spatialTransform.modelMatrix,y=new ee(0,0,0),x=30,v=100,E=new It(30,30),I=400,w=10,Q=new Xe;function M(F,L,R){let k=ee.add(y,F,new ee),U=Xe.fromTranslation(k,Q),V=Xe.multiply(C,U,new Xe),H=Xe.inverseTransformation(V,V),q=je.randomBetween(x,v),ie=new ee,Z=function(de){let me=Xe.multiplyByPoint(H,de.position,ie);ee.magnitudeSquared(me)>=q*q&&ee.clone(ee.ZERO,de.velocity)},oe=(q-x)/(v-x),ne=.3,ce=oe*(1-ne)+ne;return f.scene.primitives.add(new _2({image:Ae(A.image,`${globalThis.GEOWORLD_BASE_URL}Assets/Images/fire.png`),startColor:L,endColor:L.withAlpha(0),particleLife:ce,speed:100,imageSize:E,emissionRate:0,emitter:new BH(.1),bursts:R,lifetime:w,updateCallback:Z,modelMatrix:C,emitterModelMatrix:U}))}let B=[];for(let F=0;F<3;++F)B.push(new _H({time:je.nextRandomNumber()*w,minimum:I,maximum:I}));let T=new ee(0,0,0),D=At.WHITE.withAlpha(.7);this._primitive=M(T,D,B)}removeFromMap(){this._primitive!==null&&this._coreMap.scene.primitives.remove(this._primitive)}toJSON(){let A=this;return il.export(A)}};Object.defineProperties(wse.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var bse=wse;var Qse=class extends Qc{constructor(A,f){super(A,f),this._rtti="Fireworks",this._primitives=[],this._parameter=f,this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll)}addToMap(){let A=this._parameter,f=this._coreMap,m=Ae(A.emitHeight,100);function C(){let Z=dC.fromDegrees(0,0,0),oe=new aB;return oe.translation=ee.fromElements(2.5,4,1),oe.rotation=jr.fromHeadingPitchRoll(Z),Xe.fromTranslationRotationScale(oe)}je.setRandomNumberSeed(315);let y=this._spatialTransform.modelMatrix,x=new ee(0,0,m),v;function E(){if(!O(v)){v=document.createElement("canvas"),v.width=20,v.height=20;let Z=v.getContext("2d");Z.beginPath(),Z.arc(8,8,8,0,je.TWO_PI,!0),Z.closePath(),Z.fillStyle="rgb(255, 255, 255)",Z.fill()}return v}let I=30,w=100,Q=new It(7,7),M=400,B=10,T=20,D=new Xe,F=this;function L(Z,oe,ne){let se=ee.add(x,Z,new ee),ce=Xe.fromTranslation(se,D),j=Xe.multiply(y,ce,new Xe),de=Xe.inverseTransformation(j,j),me=je.randomBetween(I,w),_e=new ee,Be=function(te){let Y=Xe.multiplyByPoint(de,te.position,_e);ee.magnitudeSquared(Y)>=me*me&&ee.clone(ee.ZERO,te.velocity)},Qe=(me-I)/(w-I),Ie=.3,K=Qe*(1-Ie)+Ie,W=f.scene.primitives.add(new _2({image:E(),startColor:oe,endColor:oe.withAlpha(0),particleLife:K,speed:100,imageSize:Q,emissionRate:0,emitter:new BH(.1),bursts:ne,lifetime:B,updateCallback:Be,modelMatrix:y,emitterModelMatrix:ce}));F._primitives.push(W)}let R=-100,k=100,U=-80,V=100,H=-50,q=50,ie=[{minimumRed:.75,green:0,minimumBlue:.8,alpha:1},{red:0,minimumGreen:.75,minimumBlue:.8,alpha:1},{red:0,green:0,minimumBlue:.8,alpha:1},{minimumRed:.75,minimumGreen:.75,blue:0,alpha:1}];for(let Z=0;Z<T;++Z){let oe=je.randomBetween(R,k),ne=je.randomBetween(U,V),se=je.randomBetween(H,q),ce=new ee(oe,ne,se),j=At.fromRandom(ie[Z%ie.length]),de=[];for(let me=0;me<3;++me)de.push(new _H({time:je.nextRandomNumber()*B,minimum:M,maximum:M}));L(ce,j,de)}}removeFromMap(){for(let A in this._primitives)this._coreMap.scene.primitives.remove(this._primitives[A]);this._primitives=[]}toJSON(){console.log("\u70DF\u82B1=========================>>>>>",this);let A=this;return il.export(A)}};Object.defineProperties(Qse.prototype,{parameter:{get:function(){return this._parameter}},emitHeight:{get:function(){return this._parameter!==null?this._parameter.emitHeight:0},set:function(o){this._parameter!==null&&(this._parameter.emitHeight=o)}},show:{get:function(){return this._primitives.length>0?this._primitives[0].show:!1},set:function(o){for(let A in this._primitives)this._primitives[A].show=o}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var Sse=Qse;var Dct=S9(Sct(),1),zl={defaults:{useEntitiesIfAvailable:!0,minCanvasSize:700,maxCanvasSize:2e3,radiusFactor:60,spacingFactor:1.5,maxOpacity:.8,minOpacity:.1,blur:.85,gradient:{0:"#00AEFF",".58":"#A8FF00",".70":"#FFF000",".85":"#FE9B1A",1:"#FE411B"},mode3D:!1,scaleHeight:1}};zl.create=function(o,A,f){return new mB(o,A,f)};zl._getContainer=function(o,A,f){let m=document.createElement("div");return f&&m.setAttribute("id",f),m.setAttribute("style",`width: ${o}px; height: ${A}px; margin: 0px; display: none;`),document.body.appendChild(m),m};zl._getImageryProvider=function(o){let A=o._heatmap.getDataURL(),f=new bQ({url:A,rectangle:o._rectangle});return f._tilingScheme=new Am({rectangleSouthwestInMeters:new It(o._mbounds.west,o._mbounds.south),rectangleNortheastInMeters:new It(o._mbounds.east,o._mbounds.north)}),f};zl._getID=function(o){let A="",f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let m=0;m<(o||8);m++)A+=f.charAt(Math.floor(je.nextRandomNumber()*f.length));return A};var HH=new OA;zl.wgs84ToMercator=function(o){let A=HH.project(Kt.fromDegrees(o.x,o.y));return{x:A.x,y:A.y}};zl.wgs84ToMercatorBB=function(o){let A=HH.project(Kt.fromDegrees(o.west,o.south)),f=HH.project(Kt.fromDegrees(o.east,o.north));return{north:f.y,east:f.x,south:A.y,west:A.x}};zl.mercatorToWgs84=function(o){let A=HH.unproject(new ee(o.x,o.y));return{x:A.longitude,y:A.latitude}};zl.mercatorToWgs84BB=function(o){let A=HH.unproject(new ee(o.west,o.south)),f=HH.unproject(new ee(o.east,o.north));return{north:this.rad2deg(f.latitude),east:this.rad2deg(f.longitude),south:this.rad2deg(A.latitude),west:this.rad2deg(A.longitude)}};zl.deg2rad=function(o){return o*(Math.PI/180)};zl.rad2deg=function(o){return o/(Math.PI/180)};function mB(o,A,f){if(!A)return null;f||(f={}),this._earthCtrl=o,this._options=f,this._id=zl._getID(),this._options.gradient=this._options.gradient?this._options.gradient:zl.defaults.gradient,this._options.maxOpacity=this._options.maxOpacity?this._options.maxOpacity:zl.defaults.maxOpacity,this._options.minOpacity=this._options.minOpacity?this._options.minOpacity:zl.defaults.minOpacity,this._options.blur=this._options.blur?this._options.blur:zl.defaults.blur,this._mbounds=zl.wgs84ToMercatorBB(A),this._setWidthAndHeight(this._mbounds),this._options.radius=Math.round(this._options.radius?this._options.radius:this.width>this.height?this.width/zl.defaults.radiusFactor:this.height/zl.defaults.radiusFactor),this._spacing=this._options.radius*zl.defaults.spacingFactor,this._xoffset=this._mbounds.west,this._yoffset=this._mbounds.south,this.width=Math.round(this.width+this._spacing*2),this.height=Math.round(this.height+this._spacing*2),this._mbounds.west-=this._spacing*this._factor,this._mbounds.east+=this._spacing*this._factor,this._mbounds.south-=this._spacing*this._factor,this._mbounds.north+=this._spacing*this._factor,this.bounds=zl.mercatorToWgs84BB(this._mbounds),this._rectangle=Si.fromDegrees(this.bounds.west,this.bounds.south,this.bounds.east,this.bounds.north),this._container=zl._getContainer(this.width,this.height,this._id),this._options.container=this._container,this._heatmap=Dct.default.create(this._options),this._container.children[0].setAttribute("id",`${this._id}-hm`),this._mode3D=this._options.mode3D?this._options.mode3D:zl.defaults.mode3D,this._scaleHeight=this._options.scaleHeight?this._options.scaleHeight:zl.defaults.scaleHeight,this._scaleHeight<=0&&(this._scaleHeight=1),this._granularity=this._options.granularity?this._options.granularity:je.RADIANS_PER_DEGREE,this._useEntitiesIfAvailable=this._options.useEntitiesIfAvailable!==void 0?this._options.useEntitiesIfAvailable:zl.defaults.useEntitiesIfAvailable,this._lineCount=Ae(this._options.lineCount,new It(1e3,1e3)),this._lineWidth=Ae(this._options.lineWidth,1),console.info(this._lineCount)}mB.prototype.wgs84PointToHeatmapPoint=function(o){return this.mercatorPointToHeatmapPoint(zl.wgs84ToMercator(o))};mB.prototype.mercatorPointToHeatmapPoint=function(o){let A={};return A.x=Math.round((o.x-this._xoffset)/this._factor+this._spacing),A.y=Math.round((o.y-this._yoffset)/this._factor+this._spacing),A.y=this.height-A.y,A};mB.prototype.getValueAt=function(o,A){let f=this.wgs84PointToHeatmapPoint({x:o,y:A});return this._heatmap.getValueAt({x:f.x,y:f.y})};mB.prototype.setMode3D=function(o){o!==this._mode3D&&(this._mode3D=o,this.updateLayer())};mB.prototype._setWidthAndHeight=function(o){this.width=o.east>0&&o.west<0?o.east+Math.abs(o.west):Math.abs(o.east-o.west),this.height=o.north>0&&o.south<0?o.north+Math.abs(o.south):Math.abs(o.north-o.south),this._factor=1,this.width>this.height&&this.width>zl.defaults.maxCanvasSize?(this._factor=this.width/zl.defaults.maxCanvasSize,this.height/this._factor<zl.defaults.minCanvasSize&&(this._factor=this.height/zl.defaults.minCanvasSize)):this.height>this.width&&this.height>zl.defaults.maxCanvasSize?(this._factor=this.height/zl.defaults.maxCanvasSize,this.width/this._factor<zl.defaults.minCanvasSize&&(this._factor=this.width/zl.defaults.minCanvasSize)):this.width<this.height&&this.width<zl.defaults.minCanvasSize?(this._factor=this.width/zl.defaults.minCanvasSize,this.height/this._factor>zl.defaults.maxCanvasSize&&(this._factor=this.height/zl.defaults.maxCanvasSize)):this.height<this.width&&this.height<zl.defaults.minCanvasSize&&(this._factor=this.height/zl.defaults.minCanvasSize,this.width/this._factor>zl.defaults.maxCanvasSize&&(this._factor=this.width/zl.defaults.maxCanvasSize)),this.width=this.width/this._factor,this.height=this.height/this._factor};mB.prototype.setData=function(o,A,f){return f&&f.length>0&&o!==null&&o!==!1&&A!==null&&A!==!1?(this._heatmap.setData({min:o,max:A,data:f}),this.updateLayer(),!0):!1};mB.prototype.addWGS84Data=function(o){if(o){let A=Array.isArray(o)?o:[o],f=[];for(let m=0;m<A.length;m++){let C=A[m],y=this.wgs84PointToHeatmapPoint(C);(C.value||C.value===0)&&(y.value=C.value),f.push(y)}return this._heatmap.addData(f),this.updateLayer(),!0}return!1};mB.prototype.setWGS84Data=function(o,A,f){if(f&&f.length>0&&o!==null&&o!==!1&&A!==null&&A!==!1){let m=[];for(let C=0;C<f.length;C++){let y=f[C],x=this.wgs84PointToHeatmapPoint(y);(y.value||y.value===0)&&(x.value=y.value),m.push(x)}return this.setData(o,A,m)}return!1};mB.prototype.show=function(o){this._layer&&(this._layer.show=o)};mB.prototype.remove=function(){zl.defaults.useEntitiesIfAvailable&&this._earthCtrl.entities?this._layer&&this._earthCtrl.primitives.remove(this._layer):this._layer&&this._earthCtrl.coreMap.scene.imageryLayers.remove(this._layer)};Object.defineProperties(mB.prototype,{readyPromise:{get:function(){return this._layer.readyPromise}}});function ARi(o){return new ss({fabric:{type:"HeatMapMaterial",materials:{imageMaterial:{type:"Image",uniforms:{image:o}},gridMaterial:{type:"Grid"}},components:{emission:" imageMaterial.diffuse * gridMaterial.diffuse",diffuse:" imageMaterial.diffuse * gridMaterial.diffuse",alpha:"imageMaterial.alpha * gridMaterial.alpha*2.0"}},translucent:!1})}mB.prototype.updateLayer=function(){if(this._useEntitiesIfAvailable&&this._earthCtrl.entities){this._layer&&this._earthCtrl.primitives.remove(this._layer);let o=this,A=this._rectangle,f=ee.fromRadiansArray([A.west,A.north,A.east,A.north,A.east,A.south,A.west,A.south]),m=ARi(this._heatmap._renderer.canvas);m.materials.gridMaterial.uniforms.color=At.WHITE,m.materials.gridMaterial.uniforms.cellAlpha=.1,m.materials.gridMaterial.uniforms.lineCount=this._lineCount,m.materials.gridMaterial.uniforms.lineThickness=new It(this._lineWidth,this._lineWidth),m.update(o._earthCtrl.coreMap.scene.context),this._layer=this._earthCtrl.primitives.add(new $a({geometryInstances:new co({geometry:new rh({polygonHierarchy:new Un(f),granularity:o._granularity})}),appearance:new Ig({material:m}),heatMap:o._mode3D?o:void 0,scaleHeight:o._scaleHeight}))}else this._layer&&this._earthCtrl.coreMap.scene.imageryLayers.remove(this._layer),this._layer=this._earthCtrl.coreMap.scene.imageryLayers.addImageryProvider(zl._getImageryProvider(this))};var Tct=zl;function Mct(o,A){this.mEarthCtrl=o,this.coreMap=o.coreMap,this._color=Ae(A.color,At.YELLOW.withAlpha(1)),this._maxRadius=Ae(A.maxRadius,1500),this._duration=Ae(A.duration,4e3),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,500),this._cartoCenter=Kt.fromDegrees(this._lon,this._lat),this._pps=null,this._rtti="RadarScan",this._parameter=A,this.toJSON=function(){return il.export(this)},this.removeFromMap=function(){Pct(this)}}function hRi(o){if(O(o._pps))return;let A=o._cartoCenter,f=Kt.toCartesian(A),m=new ai(f.x,f.y,f.z,1),C=new Kt(A.longitude,A.latitude,A.height+o._height),y=Kt.toCartesian(C),x=new ai(y.x,y.y,y.z,1),v=new Kt(A.longitude+je.toRadians(.001),A.latitude,A.height),E=Kt.toCartesian(v),I=new ai(E.x,E.y,E.z,1),w=new jr,Q=new ci,M=new Date().getTime(),B=new ai,T=new ai,D=new ai,F=new ee,L=new ee,R=o.mEarthCtrl.coreMap.scene.camera;o._pps=new va({fragmentShader:dRi(),uniforms:{u_scanCenterEC:function(){return Xe.multiplyByVector(R._viewMatrix,m,B)},u_scanPlaneNormalEC:function(){let U=Xe.multiplyByVector(R._viewMatrix,m,B),V=Xe.multiplyByVector(R._viewMatrix,x,T);return F.x=V.x-U.x,F.y=V.y-U.y,F.z=V.z-U.z,ee.normalize(F,F),F},u_radius:o._maxRadius,u_scanLineNormalEC:function(){let U=Xe.multiplyByVector(R._viewMatrix,m,B),V=Xe.multiplyByVector(R._viewMatrix,x,T),H=Xe.multiplyByVector(R._viewMatrix,I,D);F.x=V.x-U.x,F.y=V.y-U.y,F.z=V.z-U.z,ee.normalize(F,F),L.x=H.x-U.x,L.y=H.y-U.y,L.z=H.z-U.z;let q=(new Date().getTime()-M)%o._duration/o._duration;return jr.fromAxisAngle(F,q*je.PI*2,w),ci.fromQuaternion(w,Q),ci.multiplyByVector(Q,L,L),ee.normalize(L,L),L},u_scanColor:o._color}}),o.mEarthCtrl.coreMap.scene.postProcessStages.add(o._pps)}function Pct(o){O(o._pps)&&(o.mEarthCtrl.coreMap.scene.postProcessStages.remove(o._pps),o._pps=null)}function dRi(){return`uniform sampler2D colorTexture;
uniform sampler2D depthTexture;
varying vec2 v_textureCoordinates;
uniform vec4 u_scanCenterEC;
@@ -16586,7 +16586,7 @@
}
}
`}Object.defineProperties(Oct.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._pps!==null},set:function(o){o?yRi(this):xRi(this)}}});var Uct=Oct;var Mse=class extends Qc{constructor(A,f){super(A,f),this._rtti="Billboard",this._primitive=null,this._parameter=f,this._earthCtrl=A,this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll)}addToMap(){let A=this._parameter,f={position:ee.fromDegrees(A.lon,A.lat,A.alt),name:A.name};A.image=Ae(A.image,""),A.width=Ae(A.iconWidth,16),A.height=Ae(A.iconHeight,16),f.billboard=A,this._primitive=this._earthCtrl.entities.add(f)}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(Mse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},lon:{get:function(){return this._parameter!==null?this._parameter.lon:!1},set:function(o){this._parameter!==null&&(this._primitive.position=ee.fromDegrees(o,this._parameter.lat,this._parameter.alt),this._parameter.lon=o)}},lat:{get:function(){return this._parameter!==null?this._parameter.lat:!1},set:function(o){this._parameter!==null&&(this._primitive.position=ee.fromDegrees(this._parameter.lon,o,this._parameter.alt),this._parameter.lat=o)}},alt:{get:function(){return this._parameter!==null?this._parameter.alt:!1},set:function(o){this._primitive!==null&&(this._primitive.position=ee.fromDegrees(this._parameter.lon,this._parameter.lat,o),this._parameter.alt=o)}},image:{get:function(){return this._parameter!==null?this._parameter.image:!1},set:function(o){this._primitive!==null&&(this._primitive.billboard.image=o,this._parameter.image=o)}},scale:{get:function(){return this._parameter!==null?this._parameter.scale:!1},set:function(o){this._primitive!==null&&(this._primitive.billboard.scale=o,this._parameter.scale=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var Pse=Mse;var Rse=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll),f.scale=Ae(f.scale,1),f.minimumPixelSize=Ae(f.minimumPixelSize,10)}addToMap(){let A=this._parameter,f=null,m=Ae(A.sourceType,"gltf");(m==="gltf"||m==="glb")&&(f=cI.fromGltf(A),f.modelMatrix=this._spatialTransform.modelMatrix),this._primitive=this._coreMap.scene.primitives.add(f)}removeFromMap(){this._primitive!==null&&this._coreMap.scene.primitives.remove(this._primitive)}toJSON(){let A=this;return new Promise(function(f,m){(void 0).all([A._primitive.readyPromise]).then(function(C){let y=il.export(A);console.log("modelObj",y),f(y)})})}};Object.defineProperties(Rse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},lon:{get:function(){return this._spatialTransform.longitude},set:function(o){this._spatialTransform.longitude=o}},lat:{get:function(){return this._spatialTransform.latitude},set:function(o){this._spatialTransform.latitude=o}},alt:{get:function(){return this._spatialTransform.altitude},set:function(o){this._spatialTransform.altitude=o}},heading:{get:function(){return this._spatialTransform.heading},set:function(o){this._spatialTransform.heading=o}},pitch:{get:function(){return this._spatialTransform.pitch},set:function(o){this._spatialTransform.pitch=o}},roll:{get:function(){return this._spatialTransform.roll},set:function(o){this._spatialTransform.roll=o}},parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},sourceType:{get:function(){return this._parameter!==null?this._parameter.sourceType:!1}},dataUrl:{get:function(){return this._parameter!==null?this._parameter.url:!1}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var Lse=Rse;var Fse=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll)}addToMap(){let A=this._parameter,f={position:ee.fromDegrees(A.lon,A.lat,A.alt),name:A.name};A.text=Ae(A.text,""),A.font=Ae(A.font,"12pt monospace"),A.style=Ae(A.style,mA.FILL_AND_OUTLINE),A.outlineWidth=Ae(A.outlineWidth,2),A.verticalOrigin=Ae(A.verticalOrigin,bn.BOTTOM),A.pixelOffset=new It(0,-9),f.label=A,this._primitive=this._earthCtrl.entities.add(f)}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(Fse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},parameter:{get:function(){return this._parameter}},text:{get:function(){return this._primitive!==null?this._primitive.label.text:!1},set:function(o){this._parameter!==null&&(this._primitive.label.text=o,this._parameter.text=o)}},icon:{get:function(){return this._parameter!==null?this._parameter.icon:""}},font:{get:function(){return this._parameter!==null?this._parameter.font:!1},set:function(o){this._parameter!==null&&(this._parameter.font=o)}},outlineWidth:{get:function(){return this._parameter!==null?this._parameter.outlineWidth:!1},set:function(o){this._parameter!==null&&(this._parameter.outlineWidth=o)}},verticalOrigin:{get:function(){return this._parameter!==null?this._parameter.verticalOrigin:!1},set:function(o){this._parameter!==null&&(this._parameter.verticalOrigin=o)}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}},fillColor:{get:function(){return this._primitive!==null?this._primitive.label.fillColor:!1},set:function(o){this._parameter!==null&&(this._primitive.label.fillColor=o,this._parameter.fillColor=o)}},lon:{get:function(){return this._parameter!==null?this._parameter.lon:!1},set:function(o){this._primitive!==null&&(this._primitive.position=ee.fromDegrees(o,this._parameter.lat,this._parameter.alt),this._parameter.lon=o)}},lat:{get:function(){return this._parameter!==null?this._parameter.lat:!1},set:function(o){this._primitive!==null&&(this._primitive.position=ee.fromDegrees(this._parameter.lon,o,this._parameter.alt),this._parameter.lat=o)}},alt:{get:function(){return this._parameter!==null?this._parameter.alt:!1},set:function(o){this._primitive!==null&&(this._primitive.position=ee.fromDegrees(this._parameter.lon,this._parameter.lat,o),this._parameter.alt=o)}}});var Nse=Fse;var kse=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,1)}addToMap(){let A=this._parameter,f=this._earthCtrl.entities.add({name:A.name,polyline:{positions:A.positions,width:A.lineWidth,material:A.lineColor,clampToGround:A.clampToGround,shadows:A.shadows,distanceDisplayCondition:A.distanceDisplayCondition}});this._primitive=f}updateMaterial(){let A,f=this._parameter;return O(f.outlineColor)?A=new JM({color:f.lineColor,outlineColor:f.outlineColor}):A=f.lineColor,A}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(kse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},positions:{get:function(){return this._primitive.polyline.positions},set:function(o){this._primitive.polyline.positions=o,this._parameter.positions=o}},lineColor:{get:function(){return this._parameter.lineColor},set:function(o){this._parameter.lineColor=o,this._primitive.polyline.material=this.updateMaterial()}},outlineColor:{get:function(){return this._parameter.outlineColor},set:function(o){this._parameter.outlineColor=o,this._primitive.polyline.material=this.updateMaterial()}},lineWidth:{get:function(){return this._primitive.polyline.width},set:function(o){this._primitive.polyline.width=o,this._parameter.lineWidth=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}},clampToGround:{get:function(){return this._primitive!==null?this._primitive.polyline.clampToGround:!1},set:function(o){this._primitive!==null&&(this._primitive.polyline.clampToGround=o,this._parameter.clampToGround=o)}}});var Ose=kse;var Use=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,2)}addToMap(){let A=this._parameter,f=Ae(A.outline,!0),m=A.material,C=Ae(A.outlineColor,m),y=null;O(A.hierarchy)?y=A.hierarchy:y={positions:A.positions};let x=this._earthCtrl.entities.add({name:A.name,polygon:{hierarchy:{positions:A.positions},height:A.height,heightReference:A.heightReference,extrudedHeight:A.extrudedHeight,extrudedHeightReference:A.extrudedHeightReference,stRotation:A.stRotation,fill:A.fill,outlineWidth:A.lineWidth,material:m,outline:f,outlineColor:C,perPositionHeight:A.perPositionHeight,closeTop:A.closeTop,closeBottom:A.closeBottom,shadows:A.shadows,distanceDisplayCondition:A.distanceDisplayCondition}});this._primitive=x}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(Use.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},positions:{get:function(){return this._primitive.polygon.hierarchy._value},set:function(o){this._primitive.polygon.hierarchy._value=o}},fillColor:{get:function(){return this._primitive.polygon.material},set:function(o){this._primitive.polygon.material=o}},outline:{get:function(){return this._primitive.polygon.outline},set:function(o){this._primitive.polygon.outline=o}},outlineColor:{get:function(){return this._primitive.polygon.outlineColor},set:function(o){this._primitive.polygon.outlineColor=o}},lineWidth:{get:function(){return this._primitive.polygon.outlineWidth},set:function(o){this._primitive.polygon.outlineWidth=o}},height:{get:function(){return this._primitive.polygon.height._value},set:function(o){this._primitive.polygon.height._value=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var Gse=Use;var Hse=class extends Qc{constructor(A,f){super(A),this._parameter=f}addToMap(){let A=this._parameter,f=ee.fromDegrees(A.lon,A.lat,A.alt),m=this._earthCtrl.entities.add({position:f,name:A.name,show:Ae(A.show,!0),point:{pixelSize:Ae(A.pixelSize,1),color:A.color,outlineColor:A.outlineColor,outlineWidth:A.outlineWidth,distanceDisplayCondition:A.distanceDisplayCondition,heightReference:A.heightReference}});this._primitive=m}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(Hse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},point:{get:function(){return this._primitive.position},set:function(o){this._primitive.position=o}},pixelSize:{get:function(){return this._primitive.point.pixelSize},set:function(o){this._primitive.point.pixelSize=o,this._parameter.pixelSize=o}},color:{get:function(){return this._primitive.point.color},set:function(o){this._primitive!==null&&(this._primitive.point.color=o,this._parameter.color=o)}},outlineColor:{get:function(){return this._primitive.point.outlineColor},set:function(o){this._primitive.point.outlineColor=o}},outlineWidth:{get:function(){return this._primitive.point.lineWidth},set:function(o){this._primitive.point.lineWidth=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}},lon:{get:function(){return this._parameter!==null?this._parameter.lon:!1},set:function(o){this._parameter!==null&&(this._primitive.position=ee.fromDegrees(o,this._parameter.lat,this._parameter.alt),this._parameter.lon=o)}},lat:{get:function(){return this._parameter!==null?this._parameter.lat:!1},set:function(o){this._parameter!==null&&(this._primitive.position=ee.fromDegrees(this._parameter.lon,o,this._parameter.alt),this._parameter.lat=o)}},alt:{get:function(){return this._parameter!==null?this._parameter.alt:!1},set:function(o){this._parameter!==null&&(this._primitive.position=ee.fromDegrees(this._parameter.lon,this._parameter.lat,o),this._parameter.alt=o)}}});var Vse=Hse;var zse=class extends Qc{constructor(A,f){super(A,f),this._rtti="Box",this._parameter=null,this._primitive=null,this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,2),this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll)}addToMap(){let A=this._parameter,f=A.material,m=void 0,C=Ae(A.outline,!0),y=A.fillColor,x=Ae(A.outlineColor,y),v=this._earthCtrl.entities.add({position:A.position,name:A.name,box:{outlineWidth:A.lineWidth,material:f,fill:A.fill,outline:C,dimensions:A.dimensions,outlineColor:x,shadows:A.shadows,distanceDisplayCondition:A.distanceDisplayCondition,depthFailMaterial:m}});this._primitive=v}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(zse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},position:{get:function(){return this._primitive.position},set:function(o){this._primitive.position=o,this._parameter.position=o}},fill:{get:function(){return this._primitive.box.fill},set:function(o){this._primitive.box.fill=o,this._parameter.fill=o}},material:{get:function(){return this._primitive.box.material},set:function(o){this._primitive.box.material=o,this._parameter.material=o}},outline:{get:function(){return this._primitive.box.outline},set:function(o){this._primitive.box.outline=o,this._parameter.outline=o}},outlineColor:{get:function(){return this._primitive.box.outlineColor},set:function(o){this._primitive.box.outlineColor=o,this._parameter.outlineColor=o}},dimensions:{get:function(){return this._primitive.box.dimensions},set:function(o){this._primitive.box.dimensions=o,this._parameter.dimensions=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var Kse=zse;var Yse=class extends Qc{constructor(A,f){super(A,f),this._rtti="Cylinder",this._parameter=null,this._primitive=null,this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,2)}addToMap(){let A=this._parameter,f=this._earthCtrl.entities.add({position:A.position,name:A.name,cylinder:{length:A.length,topRadius:A.topRadius,bottomRadius:A.bottomRadius,fill:A.fill,material:A.material,outline:A.outline,outlineColor:A.outlineColor,outlineWidth:A.outlineWidth,numberOfVerticalLines:A.numberOfVerticalLines,slices:A.slices,shadows:A.shadows,distanceDisplayCondition:A.distanceDisplayCondition}});this._primitive=f}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(Yse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},position:{get:function(){return this._primitive.position},set:function(o){this._primitive.position=o,this._parameter.position=o}},length:{get:function(){return this._primitive.cylinder.length},set:function(o){this._primitive.cylinder.length=o,this._parameter.length=o}},topRadius:{get:function(){return this._primitive.cylinder.topRadius},set:function(o){this._primitive.cylinder.topRadius=o,this._parameter.topRadius=o}},bottomRadius:{get:function(){return this._primitive.cylinder.bottomRadius},set:function(o){this._primitive.cylinder.bottomRadius=o,this._parameter.bottomRadius=o}},fill:{get:function(){return this._primitive.cylinder.fill},set:function(o){this._primitive.cylinder.fill=o,this._parameter.fill=o}},material:{get:function(){return this._primitive.cylinder.material},set:function(o){this._primitive.cylinder.material=o,this._parameter.material=o}},outline:{get:function(){return this._primitive.cylinder.outline},set:function(o){this._primitive.cylinder.outline=o}},outlineColor:{get:function(){return this._primitive.cylinder.outlineColor},set:function(o){this._primitive.cylinder.outlineColor=o,this._parameter.outlineColor=o}},outlineWidth:{get:function(){return this._primitive.cylinder.outlineWidth},set:function(o){this._primitive.cylinder.outlineWidth=o,this._parameter.outlineWidth=o}},numberOfVerticalLines:{get:function(){return this._primitive.cylinder.numberOfVerticalLines},set:function(o){this._primitive.cylinder.numberOfVerticalLines=o,this._parameter.numberOfVerticalLines=o}},slices:{get:function(){return this._primitive.cylinder.slices},set:function(o){this._primitive.cylinder.slices=o,this._parameter.slices=o}},shadows:{get:function(){return this._primitive.cylinder.shadows},set:function(o){this._primitive.cylinder.shadows=o,this._parameter.shadows=o}},distanceDisplayCondition:{get:function(){return this._primitive.cylinder.distanceDisplayCondition},set:function(o){this._primitive.cylinder.distanceDisplayCondition=o,this._parameter.distanceDisplayCondition=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var Jse=Yse;var Wse=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,2)}addToMap(){let A=this._parameter,f=this._earthCtrl.entities.add({position:A.position,name:A.name,ellipsoid:{radii:A.radii,fill:A.fill,outlineWidth:A.lineWidth,material:A.material,outline:A.outline,outlineColor:A.outlineColor,stackPartitions:A.stackPartitions,slicePartitions:A.slicePartitions,subdivisions:A.subdivisions,shadows:A.shadows,distanceDisplayCondition:A.distanceDisplayCondition}});this._primitive=f}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(Wse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},position:{get:function(){return this._primitive.position},set:function(o){this._primitive.position=o,this._parameter.position=o}},radii:{get:function(){return this._primitive.ellipsoid.radii},set:function(o){this._primitive.ellipsoid.radii=o,this._parameter.radii=o}},material:{get:function(){return this._primitive.ellipsoid.material},set:function(o){this._primitive.ellipsoid.material=o,this._parameter.material=o}},fill:{get:function(){return this._primitive.ellipsoid.fill},set:function(o){this._primitive.ellipsoid.fill=o,this._parameter.fill=o}},outline:{get:function(){return this._primitive.ellipsoid.outline},set:function(o){this._primitive.ellipsoid.outline=o,this._parameter.outline=o}},outlineColor:{get:function(){return this._primitive.ellipsoid.outlineColor},set:function(o){this._primitive.ellipsoid.outlineColor=o,this._parameter.outlineColor=o}},outlineWidth:{get:function(){return this._primitive.ellipsoid.outlineWidth},set:function(o){this._primitive.ellipsoid.outlineWidth=o,this._parameter.outlineWidth=o}},stackPartitions:{get:function(){return this._primitive.ellipsoid.stackPartitions},set:function(o){this._primitive.ellipsoid.stackPartitions=o,this._parameter.stackPartitions=o}},slicePartitions:{get:function(){return this._primitive.ellipsoid.slicePartitions},set:function(o){this._primitive.ellipsoid.slicePartitions=o,this._parameter.slicePartitions=o}},subdivisions:{get:function(){return this._primitive.ellipsoid.subdivisions},set:function(o){this._primitive.ellipsoid.subdivisions=o,this._parameter.subdivisions=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var jse=Wse;var qse=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,2)}addToMap(){let A=this._parameter,f=Ae(A.outline,!0),m=A.fillColor,C=Ae(A.outlineColor,m),y=this._earthCtrl.entities.add({name:A.name,rectangle:{show:!0,coordinates:A.coordinates,height:A.height,heightReference:A.heightReference,extrudedHeight:A.extrudedHeight,extrudedHeightReference:A.extrudedHeightReference,rotation:A.rotation,stRotation:A.stRotation,fill:A.fill,material:m,outline:f,outlineColor:C,outlineWidth:A.lineWidth,shadows:A.shadows,distanceDisplayCondition:A.distanceDisplayCondition}});this._primitive=y}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(qse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},positions:{get:function(){return this._parameter!==null?this._primitive.rectangle.hierarchy._value:!1},set:function(o){this._primitive!==null&&(this._primitive.rectangle.hierarchy._value=o)}},fillColor:{get:function(){return this._primitive!==null?this._primitive.rectangle.material:!1},set:function(o){this._primitive!==null&&(this._primitive.rectangle.material=o,this._parameter.fillColor=o)}},outline:{get:function(){return this._primitive!==null?this._primitive.rectangle.outline:!1},set:function(o){this._primitive!==null&&(this._primitive.rectangle.outline=o,this._parameter.outline=o)}},outlineColor:{get:function(){return this._primitive!==null?this._primitive.rectangle.outlineColor:!1},set:function(o){this._primitive!==null&&(this._primitive.rectangle.outlineColor=o,this._parameter.outlineColor=o)}},lineWidth:{get:function(){return this._primitive!==null?this._primitive.rectangle.outlineWidth:!1},set:function(o){this._primitive!==null&&(this._primitive.rectangle.outlineWidth=o,this._parameter.outlineWidth=o)}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}},height:{get:function(){return this._primitive!==null?this._primitive.rectangle.height:!1},set:function(o){this._primitive!==null&&(this._primitive.rectangle.height=o,this._parameter.height=o)}},coordinates:{get:function(){return this._primitive!==null?this._parameter.coordinates:!1},set:function(o){this._primitive!==null&&(this._primitive.rectangle.coordinates=o,this._parameter.coordinates=o)}}});var Xse=qse;var Zse=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,2)}addToMap(){let A=this._parameter,f=this._earthCtrl.entities.add({position:A.position,name:A.name,ellipse:{show:A.show,semiMajorAxis:A.semiMajorAxis,semiMinorAxis:A.semiMinorAxis,height:A.height,rotation:A.rotation,stRotation:A.stRotation,fill:A.fill,outlineWidth:A.lineWidth,material:A.material,outline:A.outline,outlineColor:A.outlineColor,shadows:A.shadows,numberOfVerticalLines:A.numberOfVerticalLines,distanceDisplayCondition:A.distanceDisplayCondition}});this._primitive=f}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}};Object.defineProperties(Zse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},position:{get:function(){return this._primitive.position},set:function(o){this._primitive.position=o}},radii:{get:function(){return this._primitive.ellipsoid.radii},set:function(o){this._primitive.ellipsoid.radii=o}},material:{get:function(){return this._primitive.ellipsoid.material},set:function(o){this._primitive.ellipsoid.material=o}},fill:{get:function(){return this._primitive.ellipsoid.fill},set:function(o){this._primitive.ellipsoid.fill=o}},outline:{get:function(){return this._primitive.ellipsoid.outline},set:function(o){this._primitive.ellipsoid.outline=o}},outlineColor:{get:function(){return this._primitive.ellipsoid.outlineColor},set:function(o){this._primitive.ellipsoid.outlineColor=o}},outlineWidth:{get:function(){return this._primitive.ellipsoid.outlineWidth},set:function(o){this._primitive.ellipsoid.outlineWidth=o}},stackPartitions:{get:function(){return this._primitive.ellipsoid.stackPartitions},set:function(o){this._primitive.ellipsoid.stackPartitions=o}},slicePartitions:{get:function(){return this._primitive.ellipsoid.slicePartitions},set:function(o){this._primitive.ellipsoid.slicePartitions=o}},subdivisions:{get:function(){return this._primitive.ellipsoid.subdivisions},set:function(o){this._primitive.ellipsoid.subdivisions=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var $se=Zse;var ele=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,1)}addToMap(){let A=this._parameter,f=this._earthCtrl.entities.add({name:A.name,polylineVolume:A});this._primitive=f}updateMaterial(){let A,f=this._parameter;return O(f.outlineColor)?A=new JM({color:f.lineColor,outlineColor:f.outlineColor}):A=f.lineColor,A}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}};Object.defineProperties(ele.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},positions:{get:function(){return this._primitive.polyline.positions},set:function(o){this._primitive.polyline.positions=o,this._parameter.positions=o}},lineColor:{get:function(){return this._parameter.lineColor},set:function(o){this._parameter.lineColor=o,this.updateMaterial()}},outlineColor:{get:function(){return this._parameter.outlineColor},set:function(o){this._parameter.outlineColor=o,this.updateMaterial()}},lineWidth:{get:function(){return this._primitive.polyline.width},set:function(o){this._primitive.polyline.eidth=o,this._parameter.lineWidth=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}},shape:{get:function(){return this._parameter!==null?this._parameter.shape:!1},set:function(o){this._parameter!==null&&(this._parameter.shape=o)}}});var tle=ele;var ile=class extends c0{constructor(A,f){super(A),this._primitive=null,this._parameter=null,this._wModels=[],this._instance=[],this.instanceId=new Map,this._parameter=f}addToMap(){let A=this._parameter,f=Ae(A.sourceType,"wmts"),m=null;if(f==="wmts")m=new Z6(A);else if(f==="mapbox")m=new SJ(A);else if(f==="arcgis")m=new qb(A);else if(f==="wms")m=new MJ(A);else if(f==="multi")m=new Jre(A);else if(f==="single")m=new bQ(A);else if(f==="tms"){let C=Ae(A.west,void 0),y=Ae(A.south,void 0),x=Ae(A.east,void 0),v=Ae(A.north,void 0);O(C)&&O(y)&&O(x)&&O(v)&&(A.rectangle=new Si(je.toRadians(C),je.toRadians(y),je.toRadians(x),je.toRadians(v))),O(A.fileExtension)&&A.fileExtension==="json"&&(A.callback=this.processGeoJson()),m=new _P(A)}else f==="baidu"?m=new Kre(A):f==="gaode"?m=new sw(A):f==="mapworld"?m=new Z6(A):f==="mvt"&&(O(A.coreMap)||(A.coreMap=this._earthCtrl.coreMap),m=new qre(A,A.ol));m!==null&&(this._primitive=this._earthCtrl.imageryLayers.addImageryProvider(m),this._primitive._layerIndex=A.zIndex)}checkWModels(A){return O(this._wModels[A])}removeInstance(A,f){let C=this._wModels[A];if(O(C)){let y=C.geometryInstances;if(O(y))for(let x=0;x<y.length;x++)y[x].id}}removeWModels(A){if(O(this._parameter.retain)&&this._parameter.retain)return;let f=this,m=f._wModels[A];if(O(m)){for(let C=0;C<f._instance[A].length;C++)f.instanceId.has(f._instance[A][C])&&f.instanceId.delete(f._instance[A][C]);f._instance[A]=[],f._wModels[A]=void 0}}convertCoordinates(A){let f=[];for(let m=0;m<A.length;m++){let C=A[m];for(let y=0;y<C.length;y++)Array.prototype.push.apply(f,C[y])}return f}processGeoJson(){let A=this,f=Ae(A._parameter.modelHeightKey,"\u5C42\u9AD8"),m=Ae(A._parameter.modelColor,At.BLUE);function C(x){A.removeWModels(x)}function y(x,v){if(!O(v)||A.checkWModels(v))return;let E=[],I=Yo.fromColor(m);A._instance[v]||(A._instance[v]=[]);let w;for(let Q=0;Q<x.features.length;Q++){let M=x.features[Q];if(M.geometry.type==="Polygon"){let B=M.id;if(!A.instanceId.has(B)){let T=A.convertCoordinates(M.geometry.coordinates),D=ee.fromDegreesArray(T);w=M.properties[f],O(w)||(w=0),E.push(new co({geometry:new rh({polygonHierarchy:new Un(D),extrudedHeight:w}),id:B,releaseGeometryInstances:!1,attributes:{color:I}})),A.instanceId.set(B,v),A._instance[v].push(B)}}else if(M.geometry.type==="MultiPolygon"){let B=M.geometry.coordinates;for(let T=0;T<B.length;T++){let D=M.id+Q;if(!A.instanceId.has(D)){let F=B[T],L=A.convertCoordinates(F),R=ee.fromDegreesArray(L);w=M.properties[f],O(w)||(w=0),E.push(new co({geometry:new rh({polygonHierarchy:new Un(R),extrudedHeight:w}),id:D,releaseGeometryInstances:!1,attributes:{color:I}})),A.instanceId.set(D,v),A._instance[v].push(D)}}}else console.info(M.geometry.type)}if(E.length>0){let Q=A._earthCtrl.primitives.add(new $a({geometryInstances:E,allowPicking:!1,appearance:new za({flat:!1,faceForward:!1,translucent:!1})}));A._wModels[v]=Q}}return{callback:y,removePrimitive:C}}removeFromMap(){this._primitive!==null&&this._earthCtrl.imageryLayers.remove(this._primitive)}toJSON(){let A=this;return new Promise(function(f,m){(void 0).all([A._primitive.imageryProvider.readyPromise]).then(function(C){let y=il.export(A);console.log("imageobj",y),f(y)})})}};Object.defineProperties(ile.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o),console.info(o);let A=this;for(let f=0;f<A._wModels.length;f++){let m=A._wModels[f],C=A.mEarthCtrl.entities.getById(m);C.show=o}}},sourceType:{get:function(){return this._parameter!==null?this._parameter.sourceType:!1}},dataUrl:{get:function(){return this._parameter!==null?this._parameter.url:!1}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var rle=ile;function ERi(o,A){for(var f=0;f<o.length;f++)if(A(o[f]))return f}function VH(o){if(o=o||[],!O(o.workerPath))throw new Ui("workerPath is required.");this._workerPath=o.workerPath,this._poolSize=Ae(o.poolSize,16),this._workers=[],this._defered=[]}Object.defineProperties(VH.prototype,{errorEvent:{get:function(){return this.errorEvent}},poolSize:{get:function(){return this._poolSize}}}),VH.prototype.queueWorkItem=function(o,A){for(var f=rA(),m=null,C=999999,y=0;y<this._workers.length;y++){var m=this._workers[y];this._workers[y].jobQueueSize<C&&(m=this._workers[y],C=this._workers[y].jobQueueSize)}if(C>0&&this._workers.length<this.poolSize){m=new Worker(this._workerPath);var x=this;m.addEventListener("message",function(E){x.onWorkerMessage(E)},!1),m.addEventListener("error",function(E){x.onWorkerError(E)},!1),m.jobQueueSize=0,this._workers.push(m),m.id=Vu()}o.workerId=m.id;var v=Vu();return o.deferedId=v,this._defered[v]=f,m.jobQueueSize++,m.postMessage(o,A),f.promise};VH.prototype.trimPool=function(o){var A=this;if(o==null){this.timerId!=null&&clearTimeout(this.timerId),this.timerId=setTimeout(function(){A.trimPool(!0)},5e3);return}for(var f=0;f<this._workers.length;f++)this._workers[f].jobQueueSize==0&&(this._workers[f].terminate(),this._workers.splice(f,1),f--);this._workers.length?this.timerId=setTimeout(function(){A.trimPool(!0)},5e3):this.timerId=null};VH.prototype.onWorkerMessage=function(o){var A=o.data,f=ERi(this._workers,function(y){return y.id===A.workerId});if(f!=null){var m=this._workers[f];m.jobQueueSize--,this.trimPool()}var C=this._defered[A.deferedId];delete this._defered[A.deferedId],C.resolve(A)};VH.prototype.onWorkerError=function(o){console.log(o)};var Gct=VH;var IRi=function(o,A,f,m){let C=f,y=m;var x=A.west,v=A.east,E=A.south,I=A.north,w=v-x,Q=I-E,M=o.longitude*180/Math.PI,B=o.latitude*180/Math.PI;return o.normalizedLongitude=(M-x)/w*f,o.normalizedLatitude=(B-E)/Q*m,o},_Ri=function(o,A,f,m){var C=[],y=o[0].longitude!==void 0;return o.forEach(function(x){var v=[],E=y?x:PN.scene.globe.ellipsoid.cartesianToCartographic(x);E=IRi(E,A,f,m),v.push(E.normalizedLongitude),v.push(E.normalizedLatitude),C.push(v)}),C},BRi=function(o,A,f){var m=32,C=A.west*je.DEGREES_PER_RADIAN,y=A.east*je.DEGREES_PER_RADIAN,x=A.south*je.DEGREES_PER_RADIAN,v=A.north*je.DEGREES_PER_RADIAN,E=new Si(C,x,y,v),I=_Ri(o,E,m,m),w=wRi(I,"#FF0000",m,m);return w},wRi=function(o,A,f,m,C){if(C===void 0){var C=document.createElement("canvas");C.width=f,C.height=m}var y=C.getContext("2d");if(!(o.length<=0)){y.moveTo(o[0][0],o[0][1]);for(var x=0;x<o.length;x++)y.lineTo(o[x][0],o[x][1]);return A!=null&&A!=null&&(y.fillStyle=A,y.fill()),C}};function S2(o,A){return Math.floor(Math.random()*(A-o+1))+o}function bRi(){return globalThis.GEOWORLD_BASE_URL+"Workers/ParseElevationWorker.js"}function QRi(o,A){var f=rA();return S2=BRi(o.vertices,A,o.heights[0]),S2.timeStamp=o.timeStamp,S2.mtHeight=o.heights,S2.mtType=o.mtType,S2.fromKML=o.fromKML,S2.rect=o.rectangle,S2.level=o.level,f.resolve(S2),f.promise}function SRi(o,A){return Math.floor(Math.random()*(A-o+1))+o}function DRi(o,A){var f=rA(),m=[];return o.forEach(function(C){m.push(QRi(C,A))}),Promise.all(m).then(function(C){var y=C[0].lenght,x=function(I,w){return w.timeStamp-I.timeStamp};if(C.length===1)f.resolve(C[0]);else{var v=C.sort(x),E=v.shift();v.forEach(function(I){E.forEach(function(w,Q){w===S2&&I[Q]!==S2&&(E[Q]=I[Q])})}),f.resolve(E)}}),f.promise}var PN,Hct=!1;function td(o,A){if(PN=o,!O(A))throw new Ui("options is required.");this._errorEvent=new br,this._modelFloorMasks={},this._credit=A.credit,typeof this._credit=="string"&&(this._credit=new tl(this._credit)),A.heightMapWidth=Ae(A.heightMapWidth,32),A.heightMapHeight=Ae(A.heightMapHeight,32),this._options=A,this.readyPromise=Promise.resolve(!0),this._subdomains=A.subdomains,A.firstRequestUrl=A.url.replace("{s}",this.sTag(0,0,0)),this._firstRequest=A.firstRequestUrl+"?request=GetMap&Version=1.3.0&Service=WMS&CRS=EPSG:4326&bbox=-90,-180,90,180&height=32&width=32&optimizedOnly=0&v=1&layers="+A.layerName+"&Styles=&Format=image/mpt";var f=this,m=A.pngOnly;A.maxTerrainLevel!==void 0&&isNaN(A.maxTerrainLevel)&&(A.maxTerrainLevel=void 0),this._maxTerrainLevel=Ae(A.maxTerrainLevel,30),m?f.setFormatMPT(!1):$.ajax({url:A.cacheUrl?A.cacheUrl+"/0/0/0.mpt":this._firstRequest,success:function(y){var x=!!(O(y.childNodes)&&y.childNodes.length>0);if(!!x)return f.setFormatMPT(!1),null;f.setFormatMPT(!0)},error:function(){return f.setFormatMPT(!1),null},async:!1}),A.cacheUrl&&(this.isCache=!0,this.cacheLevel=A.cacheLevel||16,this._cacheUrl=A.cacheUrl+"/{z}/{x}/{y}.mpt");let C=this._maxTerrainLevel;this._availability={computeMaximumLevelAtPosition:function(y){return Math.min(C,16)}},this._urlTemplate=A.url+"?request=GetMap&Version=1.3.0&Service=WMS&v=1&CRS=EPSG:4326&bbox={south},{west},{north},{east}&height={height}&width={width}&optimizedOnly={optimizedOnly}&layers="+A.layerName+"&Styles=&Format=image/"+this._format,this._allElevationLayers=null,this._tilingScheme=new af,this._levelZeroMaximumGeometricError=Cx.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,A.heightMapWidth*4,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._workerPool=new Gct({workerPath:bRi()}),this._pendingRequests=0,this._requestGridSize=8,this._requestsCache={},this._requestsCacheKeys=[],this.errorEvent.addEventListener(function(y){},this)}td._geometricErrorFactor=2;Object.defineProperties(td.prototype,{errorEvent:{get:function(){return this._errorEvent}},availability:{get:function(){return this._availability}},credit:{get:function(){return this._credit}},hasVertexNormals:{get:function(){return!1}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},hasWaterMask:{get:function(){return!1}},heightMapHeight:{get:function(){return this._options.heightMapHeight}},heightMapWidth:{get:function(){return this._options.heightMapWidth}},pendingRequests:{get:function(){return this._pendingRequests}}});td.prototype.setFormatMPT=function(o){if(!(o&&this.pngOnly)){var A=this._format;this._format=o?"mpt":"png",A!==this._format&&(this._isMPT=o,this._urlTemplate!==void 0&&(this._urlTemplate=this._urlTemplate.replace("image/"+A,"image/"+this._format)))}};td.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)*td._geometricErrorFactor};td.prototype.createKeyFromTile=function(o,A,f){return o+"_"+A+"_"+f};td.prototype.getTileDataAvailable=function(o,A,f){var m=Math.min(this._maxTerrainLevel,25);return this._isMPT?!0:f<m};td.prototype.requestFactorForLevel=function(o){var A=Math.log(this._requestGridSize)/Math.log(2);return A=Math.min(A,o),Math.pow(2,A)};td.prototype.getRequestBaseTerrainUrl=function(o,A,f,m){return this.getRequestUrl(o,A,f,m)};td.prototype.getRequestElevationLayer=function(o,A,f){return this.getRequestUrl(o,A,f,!1,!0)};td.prototype.getRequestUrl=function(v,E,I,m,C){var y=I,x=m!=null?this.requestFactorForLevel(I):1,v=m!=null?(v-v%x)/x:v,E=m!=null?(E-E%x)/x:E,I=m!=null?I-Math.log(x)/Math.log(2):I;if(this.isCache&&I!==0&&I<=this.cacheLevel)return this._cacheUrl.replace("{x}",v).replace("{y}",E).replace("{z}",I);var w=this.tilingScheme.tileXYToNativeRectangle(v,E,I),Q=this.heightMapWidth*x===256&&m?1:0;C&&(Q=0);var M=this._urlTemplate.replace("{south}",w.south).replace("{north}",w.north).replace("{west}",w.west).replace("{east}",w.east).replace("{optimizedOnly}",Q).replace("{width}",this.heightMapWidth*x).replace("{height}",this.heightMapHeight*x).replace("{s}",this.sTag(v,E,I));return M+"&level="+I+"&origLevel="+y};td.prototype.isT_Inside_E=function(o,A){return o.west>=A.west*je.DEGREES_PER_RADIAN&&o.east<=A.east*je.DEGREES_PER_RADIAN&&o.south>=A.south*je.DEGREES_PER_RADIAN&&o.north<=A.north*je.DEGREES_PER_RADIAN};td.prototype.isT_Intersects_E=function(o,A){var f=o.west*je.RADIANS_PER_DEGREE,m=o.east*je.RADIANS_PER_DEGREE,C=o.south*je.RADIANS_PER_DEGREE,y=o.north*je.RADIANS_PER_DEGREE,x=new Si(f,C,m,y),v=Si.intersection(x,A,new Si);return v};td.prototype.sTag=function(o,A,f){if(this._subdomains==null)return"";var m=(o+A+f)%this._subdomains.length;return this._subdomains[m]};td.prototype.refreshElevationLayer=function(o){if(o.rectangle&&PN.scene.globe._surface._levelZeroTiles!==void 0){var A=this.findDirectParent(o.rectangle,!0);A.freeResources()}};td.prototype.findDirectParent=function(o,A){var f=function(y,x,v){var E=v?4.1:2.1;if(y._rectangle.width<=x.width*E&&Si.contains(y._rectangle,Si.center(x)))return y;for(var I=y.children.length,w=0;w<I;w++){var Q=y.children[w];if(Si.contains(Q._rectangle,Si.center(x)))return f(Q,x,v)}return null};if(o.width==Math.PI)return null;for(var m=0;m<PN.scene.globe._surface._levelZeroTiles.length;m++){var C=f(PN.scene.globe._surface._levelZeroTiles[m],o,A);if(C)return C}return null};td.prototype.isTileAvailable=function(o,A,f){var m=this._tilingScheme.tileXYToRectangle(o,A,f,new Si),C=this.findDirectParent(m);if(C&&C.data&&C.data.terrainData){if(!(C.data.terrainData._childTileMask>0))return!1;for(var y=C.children.length,x=0;x<y;x++){var v=C.children[x];if(Si.equals(v._rectangle,m))return C.data.terrainData._childTileMask&1<<x}}return!0};td.prototype.markTileAsUnavailable=function(o,A,f){var m=this._tilingScheme.tileXYToRectangle(o,A,f,new Si),C=this.findDirectParent(m);C&&C.data&&C.data.terrainData&&C.data.terrainData._childTileMask>0&&$.each(C.children,function(y,x){if(Si.equals(x._rectangle,m)){switch(y){case 0:C.data.terrainData._childTileMask&=-5;break;case 1:C.data.terrainData._childTileMask&=-9;break;case 2:C.data.terrainData._childTileMask&=-2;break;case 3:C.data.terrainData._childTileMask&=-3;break;default:}return!1}return!0})};td.prototype.requestBaseTerrainTileGeometry=function(o,A,f,m){return this.requestTileGeometryBuffers(o,A,f,m)};td.prototype.requestElevationLayerTileGeometry=function(o,A,f,m,C){return this.requestTileGeometryBuffers(o,A,f,m,C)};td.prototype.requestTileGeometryBuffers=function(o,A,f,m,C){var y=this,x=15,v={};v.requestedRectangle=this.tilingScheme.tileXYToNativeRectangle(o,A,f),v.layer=C;var M,E,I,w,Q=rA(),M=this.requestTileHeightBuffer(o,A,f,m,void 0,C);return M===void 0?void 0:(E=this.requestTileHeightBuffer(o+1,A,f,m,!0,C),I=this.requestTileHeightBuffer(o,A+1,f,m,!0,C),w=this.requestTileHeightBuffer(o+1,A+1,f,m,!0,C),Promise.all([M,E,I,w]).then(function(B){if(Hct==0){if(B[0].myReject!=null&&B[0].myReject){Q.reject();return}for(var T=y.heightMapWidth+1,D=y.heightMapHeight+1,F=new Float32Array(T*D),L=B[0].isFloor,R=0;R<T;R++)for(var k=0;k<D;k++){var U=R,V=k,H=0;k===T-1&&(V=0,H=1,L&&(H=0,V=T-2)),R===D-1&&(U=0,H=2);var q=R*T+k,ie=U*y.heightMapWidth+V;B[H]!==null&&(B[H].myReject==null||!B[H].myReject)&&(F[q]=B[H][ie])}(B[3].myReject==null||!B[3].myReject)&&(F[T*D-1]=B[3][0]);var Z=y.arrayToHeightmapTerrainData(F,T,D,x);v.buffer=Z,Q.resolve(v)}else{var Z=y.arrayToHeightmapTerrainData(B[0],y.heightMapWidth,y.heightMapHeight);v.buffer=Z,Q.resolve(v)}}).catch(function(){Q.reject()}),Q.promise)};td.prototype.requestTileGeometry=function(o,A,f,m){var C=this,y=[],x=C.tilingScheme.tileXYToNativeRectangle(o,A,f);this._allElevationLayers!=null&&this._allElevationLayers.length>0&&f>7?$(this._allElevationLayers).each(function(E,I){var w=I.show;if(w){var Q=I.rectangle;C.isT_Inside_E(x,Q)?(C.setFormatMPT(!1),y.push(C.requestElevationLayerTileGeometry(o,A,f,m,I))):C.isT_Intersects_E(x,Q)!=null?(C.setFormatMPT(!1),y.push(C.requestElevationLayerTileGeometry(o,A,f,m,I)),y.push(C.requestBaseTerrainTileGeometry(o,A,f,m))):(C.setFormatMPT(!0),y.push(C.requestBaseTerrainTileGeometry(o,A,f,m)))}else C.setFormatMPT(!0),y.push(C.requestBaseTerrainTileGeometry(o,A,f,m))}):(C.setFormatMPT(!0),y.push(C.requestBaseTerrainTileGeometry(o,A,f,m)));var v=rA();return Promise.all(y).then(function(E){if(E.length===1)E.layer!==void 0&&console.log("missing scale and offset"),v.resolve(E[0].buffer);else if(E.length>1){var I=$.grep(E,function(T){return T.layer!==void 0}),w=$.grep(E,function(T){return T.layer===void 0});if(I.length===0)v.resolve(E[0].buffer);else{var Q=I[I.length-1],M=w[w.length-1],B={tolerance:Q.layer.nullTolerance,nullValueNumber:Q.layer.nullValueNumber,verticesX:Q.layer.polygonVerticesX,verticesY:Q.layer.polygonVerticesY,scale:Ae(Q.layer.scale,1),offset:Ae(Q.layer.offset,0)};v.resolve(C.mergeBuffers(M.buffer,Q.buffer,B,M.requestedRectangle))}}else v.reject()}).catch(function(){v.reject()}),v.promise};td.prototype.mergeBuffers=function(o,A,f,m){var C,y,x,v,E,I=33,w=33,Q=m.west,M=m.north,B=m.east,T=m.south,D=m.width/I,F=m.height/w,L=f.scale,R=f.offset,k=f.nullValueNumber,U=f.tolerance,V=k!==void 0&&U!==void 0;if(V)var H=Ae(f.nullValueNumber,0),q=Ae(Number(f.tolerance),0);var ie=new Float32Array(I*w);for(C=0,E=M;C<w;C++,E+=F)for(y=0,v=Q;y<I;y++,v+=D)x=C*I+y,V?ie[x]=!A._buffer[x]||A._buffer[x]>=H-q&&A._buffer[x]<=H+q?o._buffer[x]:A._buffer[x]*L+R:ie[x]=A._buffer[x]?A._buffer[x]*L+R:o._buffer[x];return this.arrayToHeightmapTerrainData(ie,I,w,15)};td.prototype.requestTileHeightBuffer=function(o,A,f,m,C,y){var x=this;if(!isNaN(o+A+f)){(!O(m)||m===!1)&&(m=new cC({defer:!0}));var v=m.defer==0;C=Ae(v,!1);var E=rA();if(Hct==0){var I;if(y!==void 0)y.getUrlFromSTag=function(se,ce,j){return y.subdomains===void 0?y.url:y.subdomains[0]+"/SG"},I=this.getRequestElevationLayer(o,A,f).replace(this._options.url,y.getUrlFromSTag(o,A,f)+"/Elevation").replace(this._options.layerName,y.name),y.format==="mpt"&&(I=I.replace("image/png","image/mpt"));else{I=this.getRequestBaseTerrainUrl(o,A,f,v||C);var w=PN.terrainProvider.tilingScheme.tileXYToRectangle(o,A,f),Q=PN.terrainProvider._modifyTerrainObjects,M=rA();if(Q!==void 0){var B=[];if(Q.forEach(function(se){se.show&&Si.intersection(w,se.rectangle,new Si)!=null&&B.push(se)}),B.length>0)if(B.length===1&&B[0].modelFloorBestLevel&&f>B[0].modelFloorBestLevel)M.resolve("NoMerge");else{var T=DRi(B,w,f);Promise.resolve(T).then(function(se){M.resolve(se)}).catch(function(se){console.log(se)})}else M.resolve("NoMerge")}else M.resolve("NoMerge");var D=rA(),F=$.grep([],function(se){return se._selectedTiles.length>0});if(F.length===1&&F[0].level&&f>F[0].level)D.resolve("NoFloor");else{var L=!1,R=32,k=65535;F.forEach(function(se){if(se.ready&&se.show&&se.rootFloorRectangle!==void 0&&Si.intersection(w,se.rootFloorRectangle)!==void 0){for(var ce=new Uint16Array(R*R),j=w.west,de=w.south,me=(w.east-w.west)/32,_e=(w.north-w.south)/32,Be,Qe=0;Qe<R;Qe++)for(var Ie=0;Ie<R;Ie++){var ve=j+me*Ie+me/2,K=w.north-_e*Qe-_e/2,W=new Kt(ve,K);Be=k;var te=se.getHRMTFP(se,W,!0);te!=null&&te.content&&te.content._model&&te.content._model.floor&&(Be=te.content._model.floor.getHeight(W.longitude,W.latitude)),Be!==k&&(Be+=1.5),ce[Qe*R+Ie]=Be}L=!0,D.resolve(ce)}}),L||D.resolve("NoFloor")}var U=PN.scene.globe.ellipsoid}if(this._requestsCache.hasOwnProperty(I)===!1){if(this._requestsCache[I]={},this._requestsCacheKeys.push(I),this._requestsCacheKeys.length>100){for(var V=0;V<50;V++)delete this._requestsCache[this._requestsCacheKeys[V]];this._requestsCacheKeys.splice(0,50)}}else{var H=this._requestsCacheKeys.indexOf(I);this._requestsCacheKeys.splice(H,1),this._requestsCacheKeys.push(I)}var q=this._requestsCache[I];if(q.dataLoaded===void 0&&(v?q.dataLoaded=An.fetchArrayBuffer(I):q.dataLoaded=An.fetchArrayBuffer(I),!O(q.dataLoaded)))return;var ie=this;this._pendingRequests++,Promise.resolve(q.dataLoaded).then(function(se){q.workerFinished===void 0&&(q.workerFinished=ie._workerPool.queueWorkItem({buffer:se,isElevation:y!==void 0,level:f})),Promise.all([q.workerFinished,M.promise,D.promise]).then(function(ce){var j=ce[1]!==void 0&&ce[1]!=="NoMerge",de=ce[2]!==void 0&&ce[2]!=="NoFloor";if(ce[0].rejected){for(var me=ie.heightMapWidth*ie.heightMapHeight,_e=new Int16Array(me),Be=0,Qe=0;Qe<me;Qe++)_e[Qe]=300;return f>2&&(_e.myReject=!0),E.resolve(_e),E.promise}var Ie=ie.extractTileHeightBuffer(ce[0].buffer,o,A,f);if(ie._pendingRequests--,j)for(var Qe=0;Qe<32;Qe++)for(var ve=0;ve<32;ve++){var K=Qe*32+ve;Ie[K]=ce[1].mtHeight[0]}if(de){for(var Qe=0;Qe<32;Qe++)for(var ve=0;ve<32;ve++){var K=Qe*32+ve;Ie[K]=ce[2][K]===65535||ce[2][K]>10500?Ie[K]:ce[2][K]}Ie.isFloor=!0}E.resolve(Ie)}).catch(function(){for(var ce=ie.heightMapWidth*ie.heightMapHeight,j=new Int16Array(ce),de=0,me=0;me<ce;me++)j[me]=300;return f>2&&(j.myReject=!0),E.resolve(j),E.promise})}).catch(function(){ie._pendingRequests--,E.reject()})}else{for(var Z=this.heightMapWidth*this.heightMapHeight,oe=new Int16Array(Z),ne=SRi(0,1500),V=0;V<Z;V++)oe[V]=ne;E.resolve(oe)}return E.promise}};td.prototype.extractTileHeightBuffer=function(o,A,f,m){try{for(var C=this.requestFactorForLevel(m),y=A%C,x=f%C,v=new Float32Array(this.heightMapWidth*this.heightMapHeight),E=1e6,I=-1e5,w=0;w<this.heightMapHeight;w++)for(var Q=0;Q<this.heightMapWidth;Q++){var M=w+x*this.heightMapHeight,B=Q+y*this.heightMapWidth,T=w*this.heightMapWidth+Q,D=M*this.heightMapWidth*C+B;o[D]>I&&(I=o[D]),o[D]<E&&(E=o[D]),v[T]=o[D]}}catch(F){console.log(F.message)}return v};td.prototype.arrayToHeightmapTerrainData=function(o,A,f,m){O(o)===!1&&(o=new Int16Array(A*f));var C={buffer:o,width:A,height:f,childTileMask:m};return new wQ(C)};var Vct=td;var nle=class extends c0{constructor(A,f){super(A),this._primitive=null,this._parameter=f}addToMap(){let A=this._parameter,f=null,m=Ae(A.sourceType,"ctb");m==="ude"||(m==="ctb"?f=new RJ(A):m==="multi"?f=new Wre(this._earthCtrl):m==="sgs"&&(f=new Vct(this._earthCtrl.coreMap,A))),f!==null&&(this._primitive=f,this._coreMap.terrainProvider=f)}removeFromMap(){this._primitive!==null&&(this._coreMap.terrainProvider=new IP)}toJSON(){let A=this;return new Promise(function(f,m){(void 0).all([this._primitive.readyPromise]).then(function(C){let y=il.export(A);console.log("terraobj",y),f(y)})})}};Object.defineProperties(nle.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},sourceType:{get:function(){return this._parameter!==null?this._parameter.sourceType:!1}},dataUrl:{get:function(){return this._parameter!==null?this._parameter.url:!1}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var ole=nle;var ale=class extends c0{constructor(A,f){super(A),this._parameter=f}addToMap(){let A=this._parameter,f=null;A.sourceType==="b3dm"||A.sourceType==="3DTiles"?(f=new Fx(A),O(A.transform)&&this.transform(A.transform,f)):A.sourceType==="osgb"?f=new Fx(A):A.sourceType==="s3m"?f=new Eae(A):(A.sourceType==="ude_block"||A.sourceType==="ude_model")&&(A.skipLevelOfDetail=!0,f=new Fx(A)),this._primitive=this._coreMap.scene.primitives.add(f)}removeFromMap(){this._primitive!==null&&this._coreMap.scene.primitives.remove(this._primitive)}toJSON(){let A=this;return new Promise(function(f,m){(void 0).all([A._primitive.readyPromise]).then(function(C){let y=il.export(A);console.log("modellayerobj",y),f(y)})})}transform(A,f){f.readyPromise.then(function(m){let C=ci.fromRotationX(je.toRadians(A.heading)),y=ci.fromRotationY(je.toRadians(A.pitch)),x=ci.fromRotationZ(je.toRadians(A.roll)),v=Xe.fromRotationTranslation(C),E=Xe.fromRotationTranslation(y),I=Xe.fromRotationTranslation(x),w=ee.fromDegrees(A.lon,A.lat,A.alt),Q=Vn.eastNorthUpToFixedFrame(w);Xe.multiply(Q,v,Q),Xe.multiply(Q,E,Q),Xe.multiply(Q,I,Q),m._root.transform=Q})}};Object.defineProperties(ale.prototype,{parameter:{get:function(){return this._parameter}},readyPromise:{get:function(){return this._primitive.readyPromise}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},sourceType:{get:function(){return this._parameter!==null?this._parameter.sourceType:!1}},dataUrl:{get:function(){return this._parameter!==null?this._parameter.url:!1}},boundingSphere:{get:function(){return this._primitive!==null&&this._primitive.boundingSphere?this._primitive.boundingSphere:null}},modelMatrix:{get:function(){return this._primitive!==null?this._primitive.modelMatrix:!1},set:function(o){this._primitive!==null&&(this._primitive.modelMatrix=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var sle=ale;var lle=class extends c0{constructor(A,f){super(A),this._rtti="FeatureLayer",this._primitive=null,this._parameter=f}finalize(){}addToMap(){let A=this._parameter;this._primitive=new Nre(this._earthCtrl,A)}removeFromMap(){this._primitive!==null&&this._primitive.destory()}toJSON(){let A=this;return new Promise(function(f,m){(void 0).all([A._primitive]).then(function(C){let y=il.export(A);console.log("fireObj",y),f(y)})})}};Object.defineProperties(lle.prototype,{entities:{get:function(){return this._primitive.entities}},dataSource:{get:function(){return this._primitive.dataSource}},parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},sourceType:{get:function(){return this._parameter!==null?this._parameter.sourceType:!1}},dataUrl:{get:function(){return this._parameter!==null?this._parameter.url:!1}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var ule=lle;function cle(o){this._earthCtrl=o,this._path="",this._layerWork=null}Object.defineProperties(cle.prototype,{});cle.prototype.addToMap=function(o){O(this._layerWork)?this._layerWork.updateOverlay(o):this._layerWork=new dae(this._earthCtrl.coreMap,o)};cle.prototype.removeFromMap=function(){this._layerWork.dispose()};var Ale=cle;var TRi={IMAGERYPROVIDERS:"imageryProviders",TERRAINPROVIDERS:"terrainProviders",MODELLAYERS:"modelLayers",FEATURELAYERS:"featureLayers",USERSCENE:"userScene"},rl=Object.freeze(TRi);var hle=class extends c0{constructor(A,f){super(A),this._parameter=f,this._parameter.type=Ae(f.type,"water"),this._parameter.version=Ae(f.version,"1.3.0"),this._parameter.baseWaterColor=Ae(f.color,At.fromCssColorString("#0374ff")),this._parameter.waterFrequency=Ae(f.waterFrequency,3e3),this._parameter.animationSpeed=Ae(f.animationSpeed,.01),this._parameter.amplitude=Ae(f.amplitude,5e3)}addToMap(){let A=this._parameter;this._primitive=new m6(this._earthCtrl,A),this._primitive&&(this._parameter.color=this._primitive.baseWaterColor,this._parameter.params=this._primitive._params)}removeFromMap(){this._primitive!==null&&this._primitive.destory()}toJSON(){let A=this;return new Promise(function(f,m){(void 0).all([A._primitive]).then(function(C){let y=il.export(A);console.log("waterObj",y),f(y)})})}};Object.defineProperties(hle.prototype,{type:{get:function(){return this._primitive.type}},version:{get:function(){return this._primitive._version}},params:{get:function(){return this._primitive._params},set:function(o){this._primitive!==null&&(this._primitive._params=o)}},show:{get:function(){return this._parameter!==null?this._parameter.show:!1},set:function(o){if(this._primitive!==null&&this._primitive._primitive&&this._primitive._primitive.length!==0){for(let A=0;A<this._primitive._primitive.length;A++)this._primitive._primitive[A].show=o;this._parameter.show=o}}},url:{get:function(){return this._primitive!==null?this._primitive.url:!1},set:function(o){this._primitive!==null&&(this._primitive.url=o)}},color:{get:function(){return this._primitive!==null?this._primitive.baseWaterColor:!1},set:function(o){this._primitive!==null&&(this._primitive.baseWaterColor=o)}},waterFrequency:{get:function(){return this._primitive!==null?this._primitive.waterFrequency:!1},set:function(o){this._primitive!==null&&(this._primitive.waterFrequency=o)}},animationSpeed:{get:function(){return this._primitive!==null?this._primitive.animationSpeed:!1},set:function(o){this._primitive!==null&&(this._primitive.animationSpeed=o)}},amplitude:{get:function(){return this._primitive!==null?this._primitive.amplitude:!1},set:function(o){this._primitive!==null&&(this._primitive.amplitude=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var dle=hle;var zTe=class extends c0{constructor(A,f){super(A),this._parameter=f,this._viewer=A.coreMap,this._cesium=_r}addToMap(){let A=this._parameter,f,m;Ae(A.div)?(f=document.getElementById(A.div),m=A.div):(f=document.createElement("div"),f.id="Hawkeye",f.style.position="absolute",f.style.width="15%",f.style.height="20%",f.style.bottom="20px",f.style.right="0",f.style.pointerEvents="none",this._viewer.container.appendChild(f),m="Hawkeye"),A.style&&(A.style.width&&(f.style.width=A.style.width),A.style.height&&(f.style.height=A.style.height),A.style.bottom&&(f.style.bottom=A.style.bottom),A.style.right&&(f.style.right=A.style.right),A.style.top&&(f.style.top=A.style.top,f.style.bottom="unset"),A.style.left&&(f.style.left=A.style.left,f.style.right="unset"));let C;A.url?C=new this._cesium.SingleTileImageryProvider({url:A.url}):A.imageryProvider?C=A.imageryProvider:C=new _P({url:"http://103.25.37.71:4020/gisserver/tmsserver/earth_tms"});let y=new jJ(m,{imageryProvider:C,baseLayerPicker:!1,shadows:!1,shouldAnimate:!0,animation:!0,scene3DOnly:!0,fullscreenButton:!1,geocoder:!1,homeButton:!1,infoBox:!1,selectionIndicator:!1,timeline:!1,navigationHelpButton:!1,contextOptions:{requestWebgl2:!0,licenseServer:window.licenseServer}});y._innerCreditContainer.style.display="none",y.scene.screenSpaceCameraController.enableRotate=!1,y.scene.screenSpaceCameraController.enableZoom=!1,y.scene.screenSpaceCameraController.enableTilt=!1;let x=this;function v(){let E=x._viewer.camera.position,I=Kt.fromCartesian(E);y.camera.setView({destination:Kt.toCartesian(I),orientation:{heading:x._viewer.camera.heading,pitch:x._viewer.camera.pitch,roll:x._viewer.camera.roll}})}return x._viewer.scene.preRender.addEventListener(v),this.close=function(){x._viewer.scene.preRender.removeEventListener(v),y.destroy(),f.remove(),x.close=void 0},this}removeFromMap(){this.close&&this.close()}},fle=zTe;var zct=new ai;function MRi(o,A,f){let m=o.length,C,y,x;if(f){C=Gn.LUMINANCE,y=wn.FLOAT,x=new Float32Array(m);for(let v=0;v<m;v++)x[v]=o[v]}else{C=Gn.RGBA,y=wn.UNSIGNED_BYTE,x=new Uint8Array(m*4);for(let v=0;v<m;v++)ai.packFloat(o[v],zct),ai.pack(zct,x,v*4)}return new mo.create({context:A,pixelFormat:C,pixelDatatype:y,source:{width:m,height:1,arrayBufferView:x},flipY:!1,sampler:new Qs({wrapS:Va.CLAMP_TO_EDGE,wrapT:Va.CLAMP_TO_EDGE,minificationFilter:as.NEAREST,magnificationFilter:th.NEAREST})})}var gle=[];function PRi(o,A,f,m){Xe.toArray(Xe.IDENTITY,gle);let C=new ss({fabric:{type:"spotMaterial",source:`
`}Object.defineProperties(Oct.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._pps!==null},set:function(o){o?yRi(this):xRi(this)}}});var Uct=Oct;var Mse=class extends Qc{constructor(A,f){super(A,f),this._rtti="Billboard",this._primitive=null,this._parameter=f,this._earthCtrl=A,this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll)}addToMap(){let A=this._parameter,f={position:ee.fromDegrees(A.lon,A.lat,A.alt),name:A.name};A.image=Ae(A.image,""),A.width=Ae(A.iconWidth,16),A.height=Ae(A.iconHeight,16),f.billboard=A,this._primitive=this._earthCtrl.entities.add(f)}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(Mse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},lon:{get:function(){return this._parameter!==null?this._parameter.lon:!1},set:function(o){this._parameter!==null&&(this._primitive.position=ee.fromDegrees(o,this._parameter.lat,this._parameter.alt),this._parameter.lon=o)}},lat:{get:function(){return this._parameter!==null?this._parameter.lat:!1},set:function(o){this._parameter!==null&&(this._primitive.position=ee.fromDegrees(this._parameter.lon,o,this._parameter.alt),this._parameter.lat=o)}},alt:{get:function(){return this._parameter!==null?this._parameter.alt:!1},set:function(o){this._primitive!==null&&(this._primitive.position=ee.fromDegrees(this._parameter.lon,this._parameter.lat,o),this._parameter.alt=o)}},image:{get:function(){return this._parameter!==null?this._parameter.image:!1},set:function(o){this._primitive!==null&&(this._primitive.billboard.image=o,this._parameter.image=o)}},scale:{get:function(){return this._parameter!==null?this._parameter.scale:!1},set:function(o){this._primitive!==null&&(this._primitive.billboard.scale=o,this._parameter.scale=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var Pse=Mse;var Rse=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll),f.scale=Ae(f.scale,1),f.minimumPixelSize=Ae(f.minimumPixelSize,10)}addToMap(){let A=this._parameter,f=null,m=Ae(A.sourceType,"gltf");(m==="gltf"||m==="glb")&&(f=cI.fromGltf(A),f.modelMatrix=this._spatialTransform.modelMatrix),this._primitive=this._coreMap.scene.primitives.add(f)}removeFromMap(){this._primitive!==null&&this._coreMap.scene.primitives.remove(this._primitive)}toJSON(){let A=this;return new Promise(function(f,m){(void 0).all([A._primitive.readyPromise]).then(function(C){let y=il.export(A);console.log("modelObj",y),f(y)})})}};Object.defineProperties(Rse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},lon:{get:function(){return this._spatialTransform.longitude},set:function(o){this._spatialTransform.longitude=o}},lat:{get:function(){return this._spatialTransform.latitude},set:function(o){this._spatialTransform.latitude=o}},alt:{get:function(){return this._spatialTransform.altitude},set:function(o){this._spatialTransform.altitude=o}},heading:{get:function(){return this._spatialTransform.heading},set:function(o){this._spatialTransform.heading=o}},pitch:{get:function(){return this._spatialTransform.pitch},set:function(o){this._spatialTransform.pitch=o}},roll:{get:function(){return this._spatialTransform.roll},set:function(o){this._spatialTransform.roll=o}},parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},sourceType:{get:function(){return this._parameter!==null?this._parameter.sourceType:!1}},dataUrl:{get:function(){return this._parameter!==null?this._parameter.url:!1}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var Lse=Rse;var Fse=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll)}addToMap(){let A=this._parameter,f={position:ee.fromDegrees(A.lon,A.lat,A.alt),name:A.name};A.text=Ae(A.text,""),A.font=Ae(A.font,"12pt monospace"),A.style=Ae(A.style,mA.FILL_AND_OUTLINE),A.outlineWidth=Ae(A.outlineWidth,2),A.verticalOrigin=Ae(A.verticalOrigin,bn.BOTTOM),A.pixelOffset=new It(0,-9),f.label=A,this._primitive=this._earthCtrl.entities.add(f)}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(Fse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},parameter:{get:function(){return this._parameter}},text:{get:function(){return this._primitive!==null?this._primitive.label.text:!1},set:function(o){this._parameter!==null&&(this._primitive.label.text=o,this._parameter.text=o)}},icon:{get:function(){return this._parameter!==null?this._parameter.icon:""}},font:{get:function(){return this._parameter!==null?this._parameter.font:!1},set:function(o){this._parameter!==null&&(this._parameter.font=o)}},outlineWidth:{get:function(){return this._parameter!==null?this._parameter.outlineWidth:!1},set:function(o){this._parameter!==null&&(this._parameter.outlineWidth=o)}},verticalOrigin:{get:function(){return this._parameter!==null?this._parameter.verticalOrigin:!1},set:function(o){this._parameter!==null&&(this._parameter.verticalOrigin=o)}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}},fillColor:{get:function(){return this._primitive!==null?this._primitive.label.fillColor:!1},set:function(o){this._parameter!==null&&(this._primitive.label.fillColor=o,this._parameter.fillColor=o)}},lon:{get:function(){return this._parameter!==null?this._parameter.lon:!1},set:function(o){this._primitive!==null&&(this._primitive.position=ee.fromDegrees(o,this._parameter.lat,this._parameter.alt),this._parameter.lon=o)}},lat:{get:function(){return this._parameter!==null?this._parameter.lat:!1},set:function(o){this._primitive!==null&&(this._primitive.position=ee.fromDegrees(this._parameter.lon,o,this._parameter.alt),this._parameter.lat=o)}},alt:{get:function(){return this._parameter!==null?this._parameter.alt:!1},set:function(o){this._primitive!==null&&(this._primitive.position=ee.fromDegrees(this._parameter.lon,this._parameter.lat,o),this._parameter.alt=o)}}});var Nse=Fse;var kse=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,1)}addToMap(){let A=this._parameter,f=this._earthCtrl.entities.add({name:A.name,polyline:{positions:A.positions,width:A.lineWidth,material:A.lineColor,clampToGround:A.clampToGround,shadows:A.shadows,distanceDisplayCondition:A.distanceDisplayCondition}});this._primitive=f}updateMaterial(){let A,f=this._parameter;return O(f.outlineColor)?A=new JM({color:f.lineColor,outlineColor:f.outlineColor}):A=f.lineColor,A}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(kse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},positions:{get:function(){return this._primitive.polyline.positions},set:function(o){this._primitive.polyline.positions=o,this._parameter.positions=o}},lineColor:{get:function(){return this._parameter.lineColor},set:function(o){this._parameter.lineColor=o,this._primitive.polyline.material=this.updateMaterial()}},outlineColor:{get:function(){return this._parameter.outlineColor},set:function(o){this._parameter.outlineColor=o,this._primitive.polyline.material=this.updateMaterial()}},lineWidth:{get:function(){return this._primitive.polyline.width},set:function(o){this._primitive.polyline.width=o,this._parameter.lineWidth=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}},clampToGround:{get:function(){return this._primitive!==null?this._primitive.polyline.clampToGround:!1},set:function(o){this._primitive!==null&&(this._primitive.polyline.clampToGround=o,this._parameter.clampToGround=o)}}});var Ose=kse;var Use=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,2)}addToMap(){let A=this._parameter,f=Ae(A.outline,!0),m=A.material,C=Ae(A.outlineColor,m),y=null;O(A.hierarchy)?y=A.hierarchy:y={positions:A.positions};let x=this._earthCtrl.entities.add({name:A.name,polygon:{hierarchy:{positions:A.positions},height:A.height,heightReference:A.heightReference,extrudedHeight:A.extrudedHeight,extrudedHeightReference:A.extrudedHeightReference,stRotation:A.stRotation,fill:A.fill,outlineWidth:A.lineWidth,material:m,outline:f,outlineColor:C,perPositionHeight:A.perPositionHeight,closeTop:A.closeTop,closeBottom:A.closeBottom,shadows:A.shadows,distanceDisplayCondition:A.distanceDisplayCondition}});this._primitive=x}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(Use.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},positions:{get:function(){return this._primitive.polygon.hierarchy._value},set:function(o){this._primitive.polygon.hierarchy._value=o}},fillColor:{get:function(){return this._primitive.polygon.material},set:function(o){this._primitive.polygon.material=o}},outline:{get:function(){return this._primitive.polygon.outline},set:function(o){this._primitive.polygon.outline=o}},outlineColor:{get:function(){return this._primitive.polygon.outlineColor},set:function(o){this._primitive.polygon.outlineColor=o}},lineWidth:{get:function(){return this._primitive.polygon.outlineWidth},set:function(o){this._primitive.polygon.outlineWidth=o}},height:{get:function(){return this._primitive.polygon.height._value},set:function(o){this._primitive.polygon.height._value=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var Gse=Use;var Hse=class extends Qc{constructor(A,f){super(A),this._parameter=f}addToMap(){let A=this._parameter,f=ee.fromDegrees(A.lon,A.lat,A.alt),m=this._earthCtrl.entities.add({position:f,name:A.name,show:Ae(A.show,!0),point:{pixelSize:Ae(A.pixelSize,1),color:A.color,outlineColor:A.outlineColor,outlineWidth:A.outlineWidth,distanceDisplayCondition:A.distanceDisplayCondition,heightReference:A.heightReference}});this._primitive=m}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(Hse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},point:{get:function(){return this._primitive.position},set:function(o){this._primitive.position=o}},pixelSize:{get:function(){return this._primitive.point.pixelSize},set:function(o){this._primitive.point.pixelSize=o,this._parameter.pixelSize=o}},color:{get:function(){return this._primitive.point.color},set:function(o){this._primitive!==null&&(this._primitive.point.color=o,this._parameter.color=o)}},outlineColor:{get:function(){return this._primitive.point.outlineColor},set:function(o){this._primitive.point.outlineColor=o}},outlineWidth:{get:function(){return this._primitive.point.lineWidth},set:function(o){this._primitive.point.lineWidth=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}},lon:{get:function(){return this._parameter!==null?this._parameter.lon:!1},set:function(o){this._parameter!==null&&(this._primitive.position=ee.fromDegrees(o,this._parameter.lat,this._parameter.alt),this._parameter.lon=o)}},lat:{get:function(){return this._parameter!==null?this._parameter.lat:!1},set:function(o){this._parameter!==null&&(this._primitive.position=ee.fromDegrees(this._parameter.lon,o,this._parameter.alt),this._parameter.lat=o)}},alt:{get:function(){return this._parameter!==null?this._parameter.alt:!1},set:function(o){this._parameter!==null&&(this._primitive.position=ee.fromDegrees(this._parameter.lon,this._parameter.lat,o),this._parameter.alt=o)}}});var Vse=Hse;var zse=class extends Qc{constructor(A,f){super(A,f),this._rtti="Box",this._parameter=null,this._primitive=null,this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,2),this._spatialTransform.createFromWgs84(f.lon,f.lat,f.alt,f.heading,f.pitch,f.roll)}addToMap(){let A=this._parameter,f=A.material,m=void 0,C=Ae(A.outline,!0),y=A.fillColor,x=Ae(A.outlineColor,y),v=this._earthCtrl.entities.add({position:A.position,name:A.name,box:{outlineWidth:A.lineWidth,material:f,fill:A.fill,outline:C,dimensions:A.dimensions,outlineColor:x,shadows:A.shadows,distanceDisplayCondition:A.distanceDisplayCondition,depthFailMaterial:m}});this._primitive=v}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(zse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},position:{get:function(){return this._primitive.position},set:function(o){this._primitive.position=o,this._parameter.position=o}},fill:{get:function(){return this._primitive.box.fill},set:function(o){this._primitive.box.fill=o,this._parameter.fill=o}},material:{get:function(){return this._primitive.box.material},set:function(o){this._primitive.box.material=o,this._parameter.material=o}},outline:{get:function(){return this._primitive.box.outline},set:function(o){this._primitive.box.outline=o,this._parameter.outline=o}},outlineColor:{get:function(){return this._primitive.box.outlineColor},set:function(o){this._primitive.box.outlineColor=o,this._parameter.outlineColor=o}},dimensions:{get:function(){return this._primitive.box.dimensions},set:function(o){this._primitive.box.dimensions=o,this._parameter.dimensions=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var Kse=zse;var Yse=class extends Qc{constructor(A,f){super(A,f),this._rtti="Cylinder",this._parameter=null,this._primitive=null,this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,2)}addToMap(){let A=this._parameter,f=this._earthCtrl.entities.add({position:A.position,name:A.name,cylinder:{length:A.length,topRadius:A.topRadius,bottomRadius:A.bottomRadius,fill:A.fill,material:A.material,outline:A.outline,outlineColor:A.outlineColor,outlineWidth:A.outlineWidth,numberOfVerticalLines:A.numberOfVerticalLines,slices:A.slices,shadows:A.shadows,distanceDisplayCondition:A.distanceDisplayCondition}});this._primitive=f}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(Yse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},position:{get:function(){return this._primitive.position},set:function(o){this._primitive.position=o,this._parameter.position=o}},length:{get:function(){return this._primitive.cylinder.length},set:function(o){this._primitive.cylinder.length=o,this._parameter.length=o}},topRadius:{get:function(){return this._primitive.cylinder.topRadius},set:function(o){this._primitive.cylinder.topRadius=o,this._parameter.topRadius=o}},bottomRadius:{get:function(){return this._primitive.cylinder.bottomRadius},set:function(o){this._primitive.cylinder.bottomRadius=o,this._parameter.bottomRadius=o}},fill:{get:function(){return this._primitive.cylinder.fill},set:function(o){this._primitive.cylinder.fill=o,this._parameter.fill=o}},material:{get:function(){return this._primitive.cylinder.material},set:function(o){this._primitive.cylinder.material=o,this._parameter.material=o}},outline:{get:function(){return this._primitive.cylinder.outline},set:function(o){this._primitive.cylinder.outline=o}},outlineColor:{get:function(){return this._primitive.cylinder.outlineColor},set:function(o){this._primitive.cylinder.outlineColor=o,this._parameter.outlineColor=o}},outlineWidth:{get:function(){return this._primitive.cylinder.outlineWidth},set:function(o){this._primitive.cylinder.outlineWidth=o,this._parameter.outlineWidth=o}},numberOfVerticalLines:{get:function(){return this._primitive.cylinder.numberOfVerticalLines},set:function(o){this._primitive.cylinder.numberOfVerticalLines=o,this._parameter.numberOfVerticalLines=o}},slices:{get:function(){return this._primitive.cylinder.slices},set:function(o){this._primitive.cylinder.slices=o,this._parameter.slices=o}},shadows:{get:function(){return this._primitive.cylinder.shadows},set:function(o){this._primitive.cylinder.shadows=o,this._parameter.shadows=o}},distanceDisplayCondition:{get:function(){return this._primitive.cylinder.distanceDisplayCondition},set:function(o){this._primitive.cylinder.distanceDisplayCondition=o,this._parameter.distanceDisplayCondition=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var Jse=Yse;var Wse=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,2)}addToMap(){let A=this._parameter,f=this._earthCtrl.entities.add({position:A.position,name:A.name,ellipsoid:{radii:A.radii,fill:A.fill,outlineWidth:A.lineWidth,material:A.material,outline:A.outline,outlineColor:A.outlineColor,stackPartitions:A.stackPartitions,slicePartitions:A.slicePartitions,subdivisions:A.subdivisions,shadows:A.shadows,distanceDisplayCondition:A.distanceDisplayCondition}});this._primitive=f}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(Wse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},position:{get:function(){return this._primitive.position},set:function(o){this._primitive.position=o,this._parameter.position=o}},radii:{get:function(){return this._primitive.ellipsoid.radii},set:function(o){this._primitive.ellipsoid.radii=o,this._parameter.radii=o}},material:{get:function(){return this._primitive.ellipsoid.material},set:function(o){this._primitive.ellipsoid.material=o,this._parameter.material=o}},fill:{get:function(){return this._primitive.ellipsoid.fill},set:function(o){this._primitive.ellipsoid.fill=o,this._parameter.fill=o}},outline:{get:function(){return this._primitive.ellipsoid.outline},set:function(o){this._primitive.ellipsoid.outline=o,this._parameter.outline=o}},outlineColor:{get:function(){return this._primitive.ellipsoid.outlineColor},set:function(o){this._primitive.ellipsoid.outlineColor=o,this._parameter.outlineColor=o}},outlineWidth:{get:function(){return this._primitive.ellipsoid.outlineWidth},set:function(o){this._primitive.ellipsoid.outlineWidth=o,this._parameter.outlineWidth=o}},stackPartitions:{get:function(){return this._primitive.ellipsoid.stackPartitions},set:function(o){this._primitive.ellipsoid.stackPartitions=o,this._parameter.stackPartitions=o}},slicePartitions:{get:function(){return this._primitive.ellipsoid.slicePartitions},set:function(o){this._primitive.ellipsoid.slicePartitions=o,this._parameter.slicePartitions=o}},subdivisions:{get:function(){return this._primitive.ellipsoid.subdivisions},set:function(o){this._primitive.ellipsoid.subdivisions=o,this._parameter.subdivisions=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var jse=Wse;var qse=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,2)}addToMap(){let A=this._parameter,f=Ae(A.outline,!0),m=A.fillColor,C=Ae(A.outlineColor,m),y=this._earthCtrl.entities.add({name:A.name,rectangle:{show:!0,coordinates:A.coordinates,height:A.height,heightReference:A.heightReference,extrudedHeight:A.extrudedHeight,extrudedHeightReference:A.extrudedHeightReference,rotation:A.rotation,stRotation:A.stRotation,fill:A.fill,material:m,outline:f,outlineColor:C,outlineWidth:A.lineWidth,shadows:A.shadows,distanceDisplayCondition:A.distanceDisplayCondition}});this._primitive=y}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}toJSON(){return il.export(this)}};Object.defineProperties(qse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},positions:{get:function(){return this._parameter!==null?this._primitive.rectangle.hierarchy._value:!1},set:function(o){this._primitive!==null&&(this._primitive.rectangle.hierarchy._value=o)}},fillColor:{get:function(){return this._primitive!==null?this._primitive.rectangle.material:!1},set:function(o){this._primitive!==null&&(this._primitive.rectangle.material=o,this._parameter.fillColor=o)}},outline:{get:function(){return this._primitive!==null?this._primitive.rectangle.outline:!1},set:function(o){this._primitive!==null&&(this._primitive.rectangle.outline=o,this._parameter.outline=o)}},outlineColor:{get:function(){return this._primitive!==null?this._primitive.rectangle.outlineColor:!1},set:function(o){this._primitive!==null&&(this._primitive.rectangle.outlineColor=o,this._parameter.outlineColor=o)}},lineWidth:{get:function(){return this._primitive!==null?this._primitive.rectangle.outlineWidth:!1},set:function(o){this._primitive!==null&&(this._primitive.rectangle.outlineWidth=o,this._parameter.outlineWidth=o)}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}},height:{get:function(){return this._primitive!==null?this._primitive.rectangle.height:!1},set:function(o){this._primitive!==null&&(this._primitive.rectangle.height=o,this._parameter.height=o)}},coordinates:{get:function(){return this._primitive!==null?this._parameter.coordinates:!1},set:function(o){this._primitive!==null&&(this._primitive.rectangle.coordinates=o,this._parameter.coordinates=o)}}});var Xse=qse;var Zse=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,2)}addToMap(){let A=this._parameter,f=this._earthCtrl.entities.add({position:A.position,name:A.name,ellipse:{show:A.show,semiMajorAxis:A.semiMajorAxis,semiMinorAxis:A.semiMinorAxis,height:A.height,rotation:A.rotation,stRotation:A.stRotation,fill:A.fill,outlineWidth:A.lineWidth,material:A.material,outline:A.outline,outlineColor:A.outlineColor,shadows:A.shadows,numberOfVerticalLines:A.numberOfVerticalLines,distanceDisplayCondition:A.distanceDisplayCondition}});this._primitive=f}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}};Object.defineProperties(Zse.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},position:{get:function(){return this._primitive.position},set:function(o){this._primitive.position=o}},radii:{get:function(){return this._primitive.ellipsoid.radii},set:function(o){this._primitive.ellipsoid.radii=o}},material:{get:function(){return this._primitive.ellipsoid.material},set:function(o){this._primitive.ellipsoid.material=o}},fill:{get:function(){return this._primitive.ellipsoid.fill},set:function(o){this._primitive.ellipsoid.fill=o}},outline:{get:function(){return this._primitive.ellipsoid.outline},set:function(o){this._primitive.ellipsoid.outline=o}},outlineColor:{get:function(){return this._primitive.ellipsoid.outlineColor},set:function(o){this._primitive.ellipsoid.outlineColor=o}},outlineWidth:{get:function(){return this._primitive.ellipsoid.outlineWidth},set:function(o){this._primitive.ellipsoid.outlineWidth=o}},stackPartitions:{get:function(){return this._primitive.ellipsoid.stackPartitions},set:function(o){this._primitive.ellipsoid.stackPartitions=o}},slicePartitions:{get:function(){return this._primitive.ellipsoid.slicePartitions},set:function(o){this._primitive.ellipsoid.slicePartitions=o}},subdivisions:{get:function(){return this._primitive.ellipsoid.subdivisions},set:function(o){this._primitive.ellipsoid.subdivisions=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var $se=Zse;var ele=class extends Qc{constructor(A,f){super(A),this._parameter=f,this._parameter.lineWidth=Ae(f.lineWidth,1)}addToMap(){let A=this._parameter,f=this._earthCtrl.entities.add({name:A.name,polylineVolume:A});this._primitive=f}updateMaterial(){let A,f=this._parameter;return O(f.outlineColor)?A=new JM({color:f.lineColor,outlineColor:f.outlineColor}):A=f.lineColor,A}removeFromMap(){this._primitive!==null&&this._earthCtrl.entities.remove(this._primitive)}};Object.defineProperties(ele.prototype,{entity:{get:function(){return this._primitive},set:function(o){this._primitive=o}},positions:{get:function(){return this._primitive.polyline.positions},set:function(o){this._primitive.polyline.positions=o,this._parameter.positions=o}},lineColor:{get:function(){return this._parameter.lineColor},set:function(o){this._parameter.lineColor=o,this.updateMaterial()}},outlineColor:{get:function(){return this._parameter.outlineColor},set:function(o){this._parameter.outlineColor=o,this.updateMaterial()}},lineWidth:{get:function(){return this._primitive.polyline.width},set:function(o){this._primitive.polyline.eidth=o,this._parameter.lineWidth=o}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o,this._parameter.show=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}},shape:{get:function(){return this._parameter!==null?this._parameter.shape:!1},set:function(o){this._parameter!==null&&(this._parameter.shape=o)}}});var tle=ele;var ile=class extends c0{constructor(A,f){super(A),this._primitive=null,this._parameter=null,this._wModels=[],this._instance=[],this.instanceId=new Map,this._parameter=f}addToMap(){let A=this._parameter,f=Ae(A.sourceType,"wmts"),m=null;if(f==="wmts")m=new Z6(A);else if(f==="mapbox")m=new SJ(A);else if(f==="arcgis")m=new qb(A);else if(f==="wms")m=new MJ(A);else if(f==="multi")m=new Jre(A);else if(f==="single")m=new bQ(A);else if(f==="tms"){let C=Ae(A.west,void 0),y=Ae(A.south,void 0),x=Ae(A.east,void 0),v=Ae(A.north,void 0);O(C)&&O(y)&&O(x)&&O(v)&&(A.rectangle=new Si(je.toRadians(C),je.toRadians(y),je.toRadians(x),je.toRadians(v))),O(A.fileExtension)&&A.fileExtension==="json"&&(A.callback=this.processGeoJson()),m=new _P(A)}else f==="baidu"?m=new Kre(A):f==="gaode"?m=new sw(A):f==="mapworld"?m=new Z6(A):f==="mvt"&&(O(A.coreMap)||(A.coreMap=this._earthCtrl.coreMap),m=new qre(A,A.ol));m!==null&&(this._primitive=this._earthCtrl.imageryLayers.addImageryProvider(m),this._primitive._layerIndex=A.zIndex)}checkWModels(A){return O(this._wModels[A])}removeInstance(A,f){let C=this._wModels[A];if(O(C)){let y=C.geometryInstances;if(O(y))for(let x=0;x<y.length;x++)y[x].id}}removeWModels(A){if(O(this._parameter.retain)&&this._parameter.retain)return;let f=this,m=f._wModels[A];if(O(m)){for(let C=0;C<f._instance[A].length;C++)f.instanceId.has(f._instance[A][C])&&f.instanceId.delete(f._instance[A][C]);f._instance[A]=[],f._wModels[A]=void 0}}convertCoordinates(A){let f=[];for(let m=0;m<A.length;m++){let C=A[m];for(let y=0;y<C.length;y++)Array.prototype.push.apply(f,C[y])}return f}processGeoJson(){let A=this,f=Ae(A._parameter.modelHeightKey,"\u5C42\u9AD8"),m=Ae(A._parameter.modelColor,At.BLUE);function C(x){A.removeWModels(x)}function y(x,v){if(!O(v)||A.checkWModels(v))return;let E=[],I=Yo.fromColor(m);A._instance[v]||(A._instance[v]=[]);let w;for(let Q=0;Q<x.features.length;Q++){let M=x.features[Q];if(M.geometry.type==="Polygon"){let B=M.id;if(!A.instanceId.has(B)){let T=A.convertCoordinates(M.geometry.coordinates),D=ee.fromDegreesArray(T);w=M.properties[f],O(w)||(w=0),E.push(new co({geometry:new rh({polygonHierarchy:new Un(D),extrudedHeight:w}),id:B,releaseGeometryInstances:!1,attributes:{color:I}})),A.instanceId.set(B,v),A._instance[v].push(B)}}else if(M.geometry.type==="MultiPolygon"){let B=M.geometry.coordinates;for(let T=0;T<B.length;T++){let D=M.id+Q;if(!A.instanceId.has(D)){let F=B[T],L=A.convertCoordinates(F),R=ee.fromDegreesArray(L);w=M.properties[f],O(w)||(w=0),E.push(new co({geometry:new rh({polygonHierarchy:new Un(R),extrudedHeight:w}),id:D,releaseGeometryInstances:!1,attributes:{color:I}})),A.instanceId.set(D,v),A._instance[v].push(D)}}}else console.info(M.geometry.type)}if(E.length>0){let Q=A._earthCtrl.primitives.add(new $a({geometryInstances:E,allowPicking:!1,appearance:new za({flat:!1,faceForward:!1,translucent:!1})}));A._wModels[v]=Q}}return{callback:y,removePrimitive:C}}removeFromMap(){this._primitive!==null&&this._earthCtrl.imageryLayers.remove(this._primitive)}toJSON(){let A=this;return new Promise(function(f,m){(void 0).all([A._primitive.imageryProvider.readyPromise]).then(function(C){let y=il.export(A);console.log("imageobj",y),f(y)})})}};Object.defineProperties(ile.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o),console.info(o);let A=this;for(let f=0;f<A._wModels.length;f++){let m=A._wModels[f],C=A.mEarthCtrl.entities.getById(m);C.show=o}}},sourceType:{get:function(){return this._parameter!==null?this._parameter.sourceType:!1}},dataUrl:{get:function(){return this._parameter!==null?this._parameter.url:!1}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var rle=ile;function ERi(o,A){for(var f=0;f<o.length;f++)if(A(o[f]))return f}function VH(o){if(o=o||[],!O(o.workerPath))throw new Ui("workerPath is required.");this._workerPath=o.workerPath,this._poolSize=Ae(o.poolSize,16),this._workers=[],this._defered=[]}Object.defineProperties(VH.prototype,{errorEvent:{get:function(){return this.errorEvent}},poolSize:{get:function(){return this._poolSize}}}),VH.prototype.queueWorkItem=function(o,A){for(var f=rA(),m=null,C=999999,y=0;y<this._workers.length;y++){var m=this._workers[y];this._workers[y].jobQueueSize<C&&(m=this._workers[y],C=this._workers[y].jobQueueSize)}if(C>0&&this._workers.length<this.poolSize){m=new Worker(this._workerPath);var x=this;m.addEventListener("message",function(E){x.onWorkerMessage(E)},!1),m.addEventListener("error",function(E){x.onWorkerError(E)},!1),m.jobQueueSize=0,this._workers.push(m),m.id=Vu()}o.workerId=m.id;var v=Vu();return o.deferedId=v,this._defered[v]=f,m.jobQueueSize++,m.postMessage(o,A),f.promise};VH.prototype.trimPool=function(o){var A=this;if(o==null){this.timerId!=null&&clearTimeout(this.timerId),this.timerId=setTimeout(function(){A.trimPool(!0)},5e3);return}for(var f=0;f<this._workers.length;f++)this._workers[f].jobQueueSize==0&&(this._workers[f].terminate(),this._workers.splice(f,1),f--);this._workers.length?this.timerId=setTimeout(function(){A.trimPool(!0)},5e3):this.timerId=null};VH.prototype.onWorkerMessage=function(o){var A=o.data,f=ERi(this._workers,function(y){return y.id===A.workerId});if(f!=null){var m=this._workers[f];m.jobQueueSize--,this.trimPool()}var C=this._defered[A.deferedId];delete this._defered[A.deferedId],C.resolve(A)};VH.prototype.onWorkerError=function(o){console.log(o)};var Gct=VH;var IRi=function(o,A,f,m){let C=f,y=m;var x=A.west,v=A.east,E=A.south,I=A.north,w=v-x,Q=I-E,M=o.longitude*180/Math.PI,B=o.latitude*180/Math.PI;return o.normalizedLongitude=(M-x)/w*f,o.normalizedLatitude=(B-E)/Q*m,o},_Ri=function(o,A,f,m){var C=[],y=o[0].longitude!==void 0;return o.forEach(function(x){var v=[],E=y?x:PN.scene.globe.ellipsoid.cartesianToCartographic(x);E=IRi(E,A,f,m),v.push(E.normalizedLongitude),v.push(E.normalizedLatitude),C.push(v)}),C},BRi=function(o,A,f){var m=32,C=A.west*je.DEGREES_PER_RADIAN,y=A.east*je.DEGREES_PER_RADIAN,x=A.south*je.DEGREES_PER_RADIAN,v=A.north*je.DEGREES_PER_RADIAN,E=new Si(C,x,y,v),I=_Ri(o,E,m,m),w=wRi(I,"#FF0000",m,m);return w},wRi=function(o,A,f,m,C){if(C===void 0){var C=document.createElement("canvas");C.width=f,C.height=m}var y=C.getContext("2d");if(!(o.length<=0)){y.moveTo(o[0][0],o[0][1]);for(var x=0;x<o.length;x++)y.lineTo(o[x][0],o[x][1]);return A!=null&&A!=null&&(y.fillStyle=A,y.fill()),C}};function S2(o,A){return Math.floor(Math.random()*(A-o+1))+o}function bRi(){return globalThis.GEOWORLD_BASE_URL+"Workers/ParseElevationWorker.js"}function QRi(o,A){var f=rA();return S2=BRi(o.vertices,A,o.heights[0]),S2.timeStamp=o.timeStamp,S2.mtHeight=o.heights,S2.mtType=o.mtType,S2.fromKML=o.fromKML,S2.rect=o.rectangle,S2.level=o.level,f.resolve(S2),f.promise}function SRi(o,A){return Math.floor(Math.random()*(A-o+1))+o}function DRi(o,A){var f=rA(),m=[];return o.forEach(function(C){m.push(QRi(C,A))}),Promise.all(m).then(function(C){var y=C[0].lenght,x=function(I,w){return w.timeStamp-I.timeStamp};if(C.length===1)f.resolve(C[0]);else{var v=C.sort(x),E=v.shift();v.forEach(function(I){E.forEach(function(w,Q){w===S2&&I[Q]!==S2&&(E[Q]=I[Q])})}),f.resolve(E)}}),f.promise}var PN,Hct=!1;function td(o,A){if(PN=o,!O(A))throw new Ui("options is required.");this._errorEvent=new br,this._modelFloorMasks={},this._credit=A.credit,typeof this._credit=="string"&&(this._credit=new tl(this._credit)),A.heightMapWidth=Ae(A.heightMapWidth,32),A.heightMapHeight=Ae(A.heightMapHeight,32),this._options=A,this.readyPromise=Promise.resolve(!0),this._subdomains=A.subdomains,A.firstRequestUrl=A.url.replace("{s}",this.sTag(0,0,0)),this._firstRequest=A.firstRequestUrl+"?request=GetMap&Version=1.3.0&Service=WMS&CRS=EPSG:4326&bbox=-90,-180,90,180&height=32&width=32&optimizedOnly=0&v=1&layers="+A.layerName+"&Styles=&Format=image/mpt";var f=this,m=A.pngOnly;A.maxTerrainLevel!==void 0&&isNaN(A.maxTerrainLevel)&&(A.maxTerrainLevel=void 0),this._maxTerrainLevel=Ae(A.maxTerrainLevel,30),m?f.setFormatMPT(!1):$.ajax({url:A.cacheUrl?A.cacheUrl+"/0/0/0.mpt":this._firstRequest,success:function(y){var x=!!(O(y.childNodes)&&y.childNodes.length>0);if(!!x)return f.setFormatMPT(!1),null;f.setFormatMPT(!0)},error:function(){return f.setFormatMPT(!1),null},async:!1}),A.cacheUrl&&(this.isCache=!0,this.cacheLevel=A.cacheLevel||16,this._cacheUrl=A.cacheUrl+"/{z}/{x}/{y}.mpt");let C=this._maxTerrainLevel;this._availability={computeMaximumLevelAtPosition:function(y){return Math.min(C,16)}},this._urlTemplate=A.url+"?request=GetMap&Version=1.3.0&Service=WMS&v=1&CRS=EPSG:4326&bbox={south},{west},{north},{east}&height={height}&width={width}&optimizedOnly={optimizedOnly}&layers="+A.layerName+"&Styles=&Format=image/"+this._format,this._allElevationLayers=null,this._tilingScheme=new af,this._levelZeroMaximumGeometricError=Cx.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,A.heightMapWidth*4,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._workerPool=new Gct({workerPath:bRi()}),this._pendingRequests=0,this._requestGridSize=8,this._requestsCache={},this._requestsCacheKeys=[],this.errorEvent.addEventListener(function(y){},this)}td._geometricErrorFactor=2;Object.defineProperties(td.prototype,{errorEvent:{get:function(){return this._errorEvent}},availability:{get:function(){return this._availability}},credit:{get:function(){return this._credit}},hasVertexNormals:{get:function(){return!1}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},hasWaterMask:{get:function(){return!1}},heightMapHeight:{get:function(){return this._options.heightMapHeight}},heightMapWidth:{get:function(){return this._options.heightMapWidth}},pendingRequests:{get:function(){return this._pendingRequests}}});td.prototype.setFormatMPT=function(o){if(!(o&&this.pngOnly)){var A=this._format;this._format=o?"mpt":"png",A!==this._format&&(this._isMPT=o,this._urlTemplate!==void 0&&(this._urlTemplate=this._urlTemplate.replace("image/"+A,"image/"+this._format)))}};td.prototype.getLevelMaximumGeometricError=function(o){return this._levelZeroMaximumGeometricError/(1<<o)*td._geometricErrorFactor};td.prototype.createKeyFromTile=function(o,A,f){return o+"_"+A+"_"+f};td.prototype.getTileDataAvailable=function(o,A,f){var m=Math.min(this._maxTerrainLevel,25);return this._isMPT?!0:f<m};td.prototype.requestFactorForLevel=function(o){var A=Math.log(this._requestGridSize)/Math.log(2);return A=Math.min(A,o),Math.pow(2,A)};td.prototype.getRequestBaseTerrainUrl=function(o,A,f,m){return this.getRequestUrl(o,A,f,m)};td.prototype.getRequestElevationLayer=function(o,A,f){return this.getRequestUrl(o,A,f,!1,!0)};td.prototype.getRequestUrl=function(v,E,I,m,C){var y=I,x=m!=null?this.requestFactorForLevel(I):1,v=m!=null?(v-v%x)/x:v,E=m!=null?(E-E%x)/x:E,I=m!=null?I-Math.log(x)/Math.log(2):I;if(this.isCache&&I!==0&&I<=this.cacheLevel)return this._cacheUrl.replace("{x}",v).replace("{y}",E).replace("{z}",I);var w=this.tilingScheme.tileXYToNativeRectangle(v,E,I),Q=this.heightMapWidth*x===256&&m?1:0;C&&(Q=0);var M=this._urlTemplate.replace("{south}",w.south).replace("{north}",w.north).replace("{west}",w.west).replace("{east}",w.east).replace("{optimizedOnly}",Q).replace("{width}",this.heightMapWidth*x).replace("{height}",this.heightMapHeight*x).replace("{s}",this.sTag(v,E,I));return M+"&level="+I+"&origLevel="+y};td.prototype.isT_Inside_E=function(o,A){return o.west>=A.west*je.DEGREES_PER_RADIAN&&o.east<=A.east*je.DEGREES_PER_RADIAN&&o.south>=A.south*je.DEGREES_PER_RADIAN&&o.north<=A.north*je.DEGREES_PER_RADIAN};td.prototype.isT_Intersects_E=function(o,A){var f=o.west*je.RADIANS_PER_DEGREE,m=o.east*je.RADIANS_PER_DEGREE,C=o.south*je.RADIANS_PER_DEGREE,y=o.north*je.RADIANS_PER_DEGREE,x=new Si(f,C,m,y),v=Si.intersection(x,A,new Si);return v};td.prototype.sTag=function(o,A,f){if(this._subdomains==null)return"";var m=(o+A+f)%this._subdomains.length;return this._subdomains[m]};td.prototype.refreshElevationLayer=function(o){if(o.rectangle&&PN.scene.globe._surface._levelZeroTiles!==void 0){var A=this.findDirectParent(o.rectangle,!0);A.freeResources()}};td.prototype.findDirectParent=function(o,A){var f=function(y,x,v){var E=v?4.1:2.1;if(y._rectangle.width<=x.width*E&&Si.contains(y._rectangle,Si.center(x)))return y;for(var I=y.children.length,w=0;w<I;w++){var Q=y.children[w];if(Si.contains(Q._rectangle,Si.center(x)))return f(Q,x,v)}return null};if(o.width==Math.PI)return null;for(var m=0;m<PN.scene.globe._surface._levelZeroTiles.length;m++){var C=f(PN.scene.globe._surface._levelZeroTiles[m],o,A);if(C)return C}return null};td.prototype.isTileAvailable=function(o,A,f){var m=this._tilingScheme.tileXYToRectangle(o,A,f,new Si),C=this.findDirectParent(m);if(C&&C.data&&C.data.terrainData){if(!(C.data.terrainData._childTileMask>0))return!1;for(var y=C.children.length,x=0;x<y;x++){var v=C.children[x];if(Si.equals(v._rectangle,m))return C.data.terrainData._childTileMask&1<<x}}return!0};td.prototype.markTileAsUnavailable=function(o,A,f){var m=this._tilingScheme.tileXYToRectangle(o,A,f,new Si),C=this.findDirectParent(m);C&&C.data&&C.data.terrainData&&C.data.terrainData._childTileMask>0&&$.each(C.children,function(y,x){if(Si.equals(x._rectangle,m)){switch(y){case 0:C.data.terrainData._childTileMask&=-5;break;case 1:C.data.terrainData._childTileMask&=-9;break;case 2:C.data.terrainData._childTileMask&=-2;break;case 3:C.data.terrainData._childTileMask&=-3;break;default:}return!1}return!0})};td.prototype.requestBaseTerrainTileGeometry=function(o,A,f,m){return this.requestTileGeometryBuffers(o,A,f,m)};td.prototype.requestElevationLayerTileGeometry=function(o,A,f,m,C){return this.requestTileGeometryBuffers(o,A,f,m,C)};td.prototype.requestTileGeometryBuffers=function(o,A,f,m,C){var y=this,x=15,v={};v.requestedRectangle=this.tilingScheme.tileXYToNativeRectangle(o,A,f),v.layer=C;var M,E,I,w,Q=rA(),M=this.requestTileHeightBuffer(o,A,f,m,void 0,C);return M===void 0?void 0:(E=this.requestTileHeightBuffer(o+1,A,f,m,!0,C),I=this.requestTileHeightBuffer(o,A+1,f,m,!0,C),w=this.requestTileHeightBuffer(o+1,A+1,f,m,!0,C),Promise.all([M,E,I,w]).then(function(B){if(Hct==0){if(B[0].myReject!=null&&B[0].myReject){Q.reject();return}for(var T=y.heightMapWidth+1,D=y.heightMapHeight+1,F=new Float32Array(T*D),L=B[0].isFloor,R=0;R<T;R++)for(var k=0;k<D;k++){var U=R,V=k,H=0;k===T-1&&(V=0,H=1,L&&(H=0,V=T-2)),R===D-1&&(U=0,H=2);var q=R*T+k,ie=U*y.heightMapWidth+V;B[H]!==null&&(B[H].myReject==null||!B[H].myReject)&&(F[q]=B[H][ie])}(B[3].myReject==null||!B[3].myReject)&&(F[T*D-1]=B[3][0]);var Z=y.arrayToHeightmapTerrainData(F,T,D,x);v.buffer=Z,Q.resolve(v)}else{var Z=y.arrayToHeightmapTerrainData(B[0],y.heightMapWidth,y.heightMapHeight);v.buffer=Z,Q.resolve(v)}}).catch(function(){Q.reject()}),Q.promise)};td.prototype.requestTileGeometry=function(o,A,f,m){var C=this,y=[],x=C.tilingScheme.tileXYToNativeRectangle(o,A,f);this._allElevationLayers!=null&&this._allElevationLayers.length>0&&f>7?$(this._allElevationLayers).each(function(E,I){var w=I.show;if(w){var Q=I.rectangle;C.isT_Inside_E(x,Q)?(C.setFormatMPT(!1),y.push(C.requestElevationLayerTileGeometry(o,A,f,m,I))):C.isT_Intersects_E(x,Q)!=null?(C.setFormatMPT(!1),y.push(C.requestElevationLayerTileGeometry(o,A,f,m,I)),y.push(C.requestBaseTerrainTileGeometry(o,A,f,m))):(C.setFormatMPT(!0),y.push(C.requestBaseTerrainTileGeometry(o,A,f,m)))}else C.setFormatMPT(!0),y.push(C.requestBaseTerrainTileGeometry(o,A,f,m))}):(C.setFormatMPT(!0),y.push(C.requestBaseTerrainTileGeometry(o,A,f,m)));var v=rA();return Promise.all(y).then(function(E){if(E.length===1)E.layer!==void 0&&console.log("missing scale and offset"),v.resolve(E[0].buffer);else if(E.length>1){var I=$.grep(E,function(T){return T.layer!==void 0}),w=$.grep(E,function(T){return T.layer===void 0});if(I.length===0)v.resolve(E[0].buffer);else{var Q=I[I.length-1],M=w[w.length-1],B={tolerance:Q.layer.nullTolerance,nullValueNumber:Q.layer.nullValueNumber,verticesX:Q.layer.polygonVerticesX,verticesY:Q.layer.polygonVerticesY,scale:Ae(Q.layer.scale,1),offset:Ae(Q.layer.offset,0)};v.resolve(C.mergeBuffers(M.buffer,Q.buffer,B,M.requestedRectangle))}}else v.reject()}).catch(function(){v.reject()}),v.promise};td.prototype.mergeBuffers=function(o,A,f,m){var C,y,x,v,E,I=33,w=33,Q=m.west,M=m.north,B=m.east,T=m.south,D=m.width/I,F=m.height/w,L=f.scale,R=f.offset,k=f.nullValueNumber,U=f.tolerance,V=k!==void 0&&U!==void 0;if(V)var H=Ae(f.nullValueNumber,0),q=Ae(Number(f.tolerance),0);var ie=new Float32Array(I*w);for(C=0,E=M;C<w;C++,E+=F)for(y=0,v=Q;y<I;y++,v+=D)x=C*I+y,V?ie[x]=!A._buffer[x]||A._buffer[x]>=H-q&&A._buffer[x]<=H+q?o._buffer[x]:A._buffer[x]*L+R:ie[x]=A._buffer[x]?A._buffer[x]*L+R:o._buffer[x];return this.arrayToHeightmapTerrainData(ie,I,w,15)};td.prototype.requestTileHeightBuffer=function(o,A,f,m,C,y){var x=this;if(!isNaN(o+A+f)){(!O(m)||m===!1)&&(m=new cC({defer:!0}));var v=m.defer==0;C=Ae(v,!1);var E=rA();if(Hct==0){var I;if(y!==void 0)y.getUrlFromSTag=function(se,ce,j){return y.subdomains===void 0?y.url:y.subdomains[0]+"/SG"},I=this.getRequestElevationLayer(o,A,f).replace(this._options.url,y.getUrlFromSTag(o,A,f)+"/Elevation").replace(this._options.layerName,y.name),y.format==="mpt"&&(I=I.replace("image/png","image/mpt"));else{I=this.getRequestBaseTerrainUrl(o,A,f,v||C);var w=PN.terrainProvider.tilingScheme.tileXYToRectangle(o,A,f),Q=PN.terrainProvider._modifyTerrainObjects,M=rA();if(Q!==void 0){var B=[];if(Q.forEach(function(se){se.show&&Si.intersection(w,se.rectangle,new Si)!=null&&B.push(se)}),B.length>0)if(B.length===1&&B[0].modelFloorBestLevel&&f>B[0].modelFloorBestLevel)M.resolve("NoMerge");else{var T=DRi(B,w,f);Promise.resolve(T).then(function(se){M.resolve(se)}).catch(function(se){console.log(se)})}else M.resolve("NoMerge")}else M.resolve("NoMerge");var D=rA(),F=$.grep([],function(se){return se._selectedTiles.length>0});if(F.length===1&&F[0].level&&f>F[0].level)D.resolve("NoFloor");else{var L=!1,R=32,k=65535;F.forEach(function(se){if(se.ready&&se.show&&se.rootFloorRectangle!==void 0&&Si.intersection(w,se.rootFloorRectangle)!==void 0){for(var ce=new Uint16Array(R*R),j=w.west,de=w.south,me=(w.east-w.west)/32,_e=(w.north-w.south)/32,Be,Qe=0;Qe<R;Qe++)for(var Ie=0;Ie<R;Ie++){var ve=j+me*Ie+me/2,K=w.north-_e*Qe-_e/2,W=new Kt(ve,K);Be=k;var te=se.getHRMTFP(se,W,!0);te!=null&&te.content&&te.content._model&&te.content._model.floor&&(Be=te.content._model.floor.getHeight(W.longitude,W.latitude)),Be!==k&&(Be+=1.5),ce[Qe*R+Ie]=Be}L=!0,D.resolve(ce)}}),L||D.resolve("NoFloor")}var U=PN.scene.globe.ellipsoid}if(this._requestsCache.hasOwnProperty(I)===!1){if(this._requestsCache[I]={},this._requestsCacheKeys.push(I),this._requestsCacheKeys.length>100){for(var V=0;V<50;V++)delete this._requestsCache[this._requestsCacheKeys[V]];this._requestsCacheKeys.splice(0,50)}}else{var H=this._requestsCacheKeys.indexOf(I);this._requestsCacheKeys.splice(H,1),this._requestsCacheKeys.push(I)}var q=this._requestsCache[I];if(q.dataLoaded===void 0&&(v?q.dataLoaded=An.fetchArrayBuffer(I):q.dataLoaded=An.fetchArrayBuffer(I),!O(q.dataLoaded)))return;var ie=this;this._pendingRequests++,Promise.resolve(q.dataLoaded).then(function(se){q.workerFinished===void 0&&(q.workerFinished=ie._workerPool.queueWorkItem({buffer:se,isElevation:y!==void 0,level:f})),Promise.all([q.workerFinished,M.promise,D.promise]).then(function(ce){var j=ce[1]!==void 0&&ce[1]!=="NoMerge",de=ce[2]!==void 0&&ce[2]!=="NoFloor";if(ce[0].rejected){for(var me=ie.heightMapWidth*ie.heightMapHeight,_e=new Int16Array(me),Be=0,Qe=0;Qe<me;Qe++)_e[Qe]=300;return f>2&&(_e.myReject=!0),E.resolve(_e),E.promise}var Ie=ie.extractTileHeightBuffer(ce[0].buffer,o,A,f);if(ie._pendingRequests--,j)for(var Qe=0;Qe<32;Qe++)for(var ve=0;ve<32;ve++){var K=Qe*32+ve;Ie[K]=ce[1].mtHeight[0]}if(de){for(var Qe=0;Qe<32;Qe++)for(var ve=0;ve<32;ve++){var K=Qe*32+ve;Ie[K]=ce[2][K]===65535||ce[2][K]>10500?Ie[K]:ce[2][K]}Ie.isFloor=!0}E.resolve(Ie)}).catch(function(){for(var ce=ie.heightMapWidth*ie.heightMapHeight,j=new Int16Array(ce),de=0,me=0;me<ce;me++)j[me]=300;return f>2&&(j.myReject=!0),E.resolve(j),E.promise})}).catch(function(){ie._pendingRequests--,E.reject()})}else{for(var Z=this.heightMapWidth*this.heightMapHeight,oe=new Int16Array(Z),ne=SRi(0,1500),V=0;V<Z;V++)oe[V]=ne;E.resolve(oe)}return E.promise}};td.prototype.extractTileHeightBuffer=function(o,A,f,m){try{for(var C=this.requestFactorForLevel(m),y=A%C,x=f%C,v=new Float32Array(this.heightMapWidth*this.heightMapHeight),E=1e6,I=-1e5,w=0;w<this.heightMapHeight;w++)for(var Q=0;Q<this.heightMapWidth;Q++){var M=w+x*this.heightMapHeight,B=Q+y*this.heightMapWidth,T=w*this.heightMapWidth+Q,D=M*this.heightMapWidth*C+B;o[D]>I&&(I=o[D]),o[D]<E&&(E=o[D]),v[T]=o[D]}}catch(F){console.log(F.message)}return v};td.prototype.arrayToHeightmapTerrainData=function(o,A,f,m){O(o)===!1&&(o=new Int16Array(A*f));var C={buffer:o,width:A,height:f,childTileMask:m};return new wQ(C)};var Vct=td;var nle=class extends c0{constructor(A,f){super(A),this._primitive=null,this._parameter=f}addToMap(){let A=this._parameter,f=null,m=Ae(A.sourceType,"ctb");m==="ude"||(m==="ctb"?f=new RJ(A):m==="multi"?f=new Wre(this._earthCtrl):m==="sgs"&&(f=new Vct(this._earthCtrl.coreMap,A))),f!==null&&(this._primitive=f,this._coreMap.terrainProvider=f)}removeFromMap(){this._primitive!==null&&(this._coreMap.terrainProvider=new IP)}toJSON(){let A=this;return new Promise(function(f,m){(void 0).all([this._primitive.readyPromise]).then(function(C){let y=il.export(A);console.log("terraobj",y),f(y)})})}};Object.defineProperties(nle.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},sourceType:{get:function(){return this._parameter!==null?this._parameter.sourceType:!1}},dataUrl:{get:function(){return this._parameter!==null?this._parameter.url:!1}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var ole=nle;var ale=class extends c0{constructor(A,f){super(A),this._parameter=f}addToMap(){let A=this._parameter,f=null;A.sourceType==="b3dm"||A.sourceType==="3DTiles"?(f=new Fx(A),O(A.transform)&&this.transform(A.transform,f)):A.sourceType==="osgb"?f=new Fx(A):A.sourceType==="s3m"?f=new Bae(A):(A.sourceType==="ude_block"||A.sourceType==="ude_model")&&(A.skipLevelOfDetail=!0,f=new Fx(A)),this._primitive=this._coreMap.scene.primitives.add(f)}removeFromMap(){this._primitive!==null&&this._coreMap.scene.primitives.remove(this._primitive)}toJSON(){let A=this;return new Promise(function(f,m){(void 0).all([A._primitive.readyPromise]).then(function(C){let y=il.export(A);console.log("modellayerobj",y),f(y)})})}transform(A,f){f.readyPromise.then(function(m){let C=ci.fromRotationX(je.toRadians(A.heading)),y=ci.fromRotationY(je.toRadians(A.pitch)),x=ci.fromRotationZ(je.toRadians(A.roll)),v=Xe.fromRotationTranslation(C),E=Xe.fromRotationTranslation(y),I=Xe.fromRotationTranslation(x),w=ee.fromDegrees(A.lon,A.lat,A.alt),Q=Vn.eastNorthUpToFixedFrame(w);Xe.multiply(Q,v,Q),Xe.multiply(Q,E,Q),Xe.multiply(Q,I,Q),m._root.transform=Q})}};Object.defineProperties(ale.prototype,{parameter:{get:function(){return this._parameter}},readyPromise:{get:function(){return this._primitive.readyPromise}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},sourceType:{get:function(){return this._parameter!==null?this._parameter.sourceType:!1}},dataUrl:{get:function(){return this._parameter!==null?this._parameter.url:!1}},boundingSphere:{get:function(){return this._primitive!==null&&this._primitive.boundingSphere?this._primitive.boundingSphere:null}},modelMatrix:{get:function(){return this._primitive!==null?this._primitive.modelMatrix:!1},set:function(o){this._primitive!==null&&(this._primitive.modelMatrix=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var sle=ale;var lle=class extends c0{constructor(A,f){super(A),this._rtti="FeatureLayer",this._primitive=null,this._parameter=f}finalize(){}addToMap(){let A=this._parameter;this._primitive=new Nre(this._earthCtrl,A)}removeFromMap(){this._primitive!==null&&this._primitive.destory()}toJSON(){let A=this;return new Promise(function(f,m){(void 0).all([A._primitive]).then(function(C){let y=il.export(A);console.log("fireObj",y),f(y)})})}};Object.defineProperties(lle.prototype,{entities:{get:function(){return this._primitive.entities}},dataSource:{get:function(){return this._primitive.dataSource}},parameter:{get:function(){return this._parameter}},show:{get:function(){return this._primitive!==null?this._primitive.show:!1},set:function(o){this._primitive!==null&&(this._primitive.show=o)}},sourceType:{get:function(){return this._parameter!==null?this._parameter.sourceType:!1}},dataUrl:{get:function(){return this._parameter!==null?this._parameter.url:!1}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var ule=lle;function cle(o){this._earthCtrl=o,this._path="",this._layerWork=null}Object.defineProperties(cle.prototype,{});cle.prototype.addToMap=function(o){O(this._layerWork)?this._layerWork.updateOverlay(o):this._layerWork=new dae(this._earthCtrl.coreMap,o)};cle.prototype.removeFromMap=function(){this._layerWork.dispose()};var Ale=cle;var TRi={IMAGERYPROVIDERS:"imageryProviders",TERRAINPROVIDERS:"terrainProviders",MODELLAYERS:"modelLayers",FEATURELAYERS:"featureLayers",USERSCENE:"userScene"},rl=Object.freeze(TRi);var hle=class extends c0{constructor(A,f){super(A),this._parameter=f,this._parameter.type=Ae(f.type,"water"),this._parameter.version=Ae(f.version,"1.3.0"),this._parameter.baseWaterColor=Ae(f.color,At.fromCssColorString("#0374ff")),this._parameter.waterFrequency=Ae(f.waterFrequency,3e3),this._parameter.animationSpeed=Ae(f.animationSpeed,.01),this._parameter.amplitude=Ae(f.amplitude,5e3)}addToMap(){let A=this._parameter;this._primitive=new m6(this._earthCtrl,A),this._primitive&&(this._parameter.color=this._primitive.baseWaterColor,this._parameter.params=this._primitive._params)}removeFromMap(){this._primitive!==null&&this._primitive.destory()}toJSON(){let A=this;return new Promise(function(f,m){(void 0).all([A._primitive]).then(function(C){let y=il.export(A);console.log("waterObj",y),f(y)})})}};Object.defineProperties(hle.prototype,{type:{get:function(){return this._primitive.type}},version:{get:function(){return this._primitive._version}},params:{get:function(){return this._primitive._params},set:function(o){this._primitive!==null&&(this._primitive._params=o)}},show:{get:function(){return this._parameter!==null?this._parameter.show:!1},set:function(o){if(this._primitive!==null&&this._primitive._primitive&&this._primitive._primitive.length!==0){for(let A=0;A<this._primitive._primitive.length;A++)this._primitive._primitive[A].show=o;this._parameter.show=o}}},url:{get:function(){return this._primitive!==null?this._primitive.url:!1},set:function(o){this._primitive!==null&&(this._primitive.url=o)}},color:{get:function(){return this._primitive!==null?this._primitive.baseWaterColor:!1},set:function(o){this._primitive!==null&&(this._primitive.baseWaterColor=o)}},waterFrequency:{get:function(){return this._primitive!==null?this._primitive.waterFrequency:!1},set:function(o){this._primitive!==null&&(this._primitive.waterFrequency=o)}},animationSpeed:{get:function(){return this._primitive!==null?this._primitive.animationSpeed:!1},set:function(o){this._primitive!==null&&(this._primitive.animationSpeed=o)}},amplitude:{get:function(){return this._primitive!==null?this._primitive.amplitude:!1},set:function(o){this._primitive!==null&&(this._primitive.amplitude=o)}},name:{get:function(){return this._parameter!==null?this._parameter.name:!1},set:function(o){this._parameter!==null&&(this._parameter.name=o)}}});var dle=hle;var zTe=class extends c0{constructor(A,f){super(A),this._parameter=f,this._viewer=A.coreMap,this._cesium=_r}addToMap(){let A=this._parameter,f,m;Ae(A.div)?(f=document.getElementById(A.div),m=A.div):(f=document.createElement("div"),f.id="Hawkeye",f.style.position="absolute",f.style.width="15%",f.style.height="20%",f.style.bottom="20px",f.style.right="0",f.style.pointerEvents="none",this._viewer.container.appendChild(f),m="Hawkeye"),A.style&&(A.style.width&&(f.style.width=A.style.width),A.style.height&&(f.style.height=A.style.height),A.style.bottom&&(f.style.bottom=A.style.bottom),A.style.right&&(f.style.right=A.style.right),A.style.top&&(f.style.top=A.style.top,f.style.bottom="unset"),A.style.left&&(f.style.left=A.style.left,f.style.right="unset"));let C;A.url?C=new this._cesium.SingleTileImageryProvider({url:A.url}):A.imageryProvider?C=A.imageryProvider:C=new _P({url:"http://103.25.37.71:4020/gisserver/tmsserver/earth_tms"});let y=new jJ(m,{imageryProvider:C,baseLayerPicker:!1,shadows:!1,shouldAnimate:!0,animation:!0,scene3DOnly:!0,fullscreenButton:!1,geocoder:!1,homeButton:!1,infoBox:!1,selectionIndicator:!1,timeline:!1,navigationHelpButton:!1,contextOptions:{requestWebgl2:!0,licenseServer:window.licenseServer}});y._innerCreditContainer.style.display="none",y.scene.screenSpaceCameraController.enableRotate=!1,y.scene.screenSpaceCameraController.enableZoom=!1,y.scene.screenSpaceCameraController.enableTilt=!1;let x=this;function v(){let E=x._viewer.camera.position,I=Kt.fromCartesian(E);y.camera.setView({destination:Kt.toCartesian(I),orientation:{heading:x._viewer.camera.heading,pitch:x._viewer.camera.pitch,roll:x._viewer.camera.roll}})}return x._viewer.scene.preRender.addEventListener(v),this.close=function(){x._viewer.scene.preRender.removeEventListener(v),y.destroy(),f.remove(),x.close=void 0},this}removeFromMap(){this.close&&this.close()}},fle=zTe;var zct=new ai;function MRi(o,A,f){let m=o.length,C,y,x;if(f){C=Gn.LUMINANCE,y=wn.FLOAT,x=new Float32Array(m);for(let v=0;v<m;v++)x[v]=o[v]}else{C=Gn.RGBA,y=wn.UNSIGNED_BYTE,x=new Uint8Array(m*4);for(let v=0;v<m;v++)ai.packFloat(o[v],zct),ai.pack(zct,x,v*4)}return new mo.create({context:A,pixelFormat:C,pixelDatatype:y,source:{width:m,height:1,arrayBufferView:x},flipY:!1,sampler:new Qs({wrapS:Va.CLAMP_TO_EDGE,wrapT:Va.CLAMP_TO_EDGE,minificationFilter:as.NEAREST,magnificationFilter:th.NEAREST})})}var gle=[];function PRi(o,A,f,m){Xe.toArray(Xe.IDENTITY,gle);let C=new ss({fabric:{type:"spotMaterial",source:`
            # define Spot_Texture_Width ${A.length}
            ${f?"#define use_texture_float":""}
            float getPointComponent(int idx, float invTexSize)
@@ -16764,7 +16764,7 @@
                }
                material.alpha = u_alpha;
            }
            `})};VO.prototype.destroy=function(){this._tileset.customShader===this._customShader&&(this._customShader=void 0,this._tileset.customShader=void 0),this._scene.preUpdate.removeEventListener(this._preUpdate)};function kRi(){this.customShaders={},this.customShaders.lightLine=VO}var Yct=kRi;function zH(o,A){this.options=Ae(A,{}),this.earthCtrl=o,this.viewer=o.coreMap,this.CSME=sre,this.Cust=new this.CSME.CustomShaderStage(this.options.primitive,A),this.stageArr=[],this.eventListener=null,this.eventListener=this.viewer.scene.preUpdate.addEventListener(()=>{this.Cust.update()}),this.create()}zH.prototype.create=function(o){let A=this,f=null;o?f=o:f=A.options,f.lineMaterialStage&&(A.LineMaterialStage=new A.CSME.LineMaterialStage(Ae(f.lineMaterialStage,{weight:.5})),A.Cust.addStage(A.LineMaterialStage),A.stageArr.push(A.LineMaterialStage)),f.gradientMaterialStage&&(A.GradientMaterialStage=new A.CSME.GradientMaterialStage(Ae(f.gradientMaterialStage,{weight:.5})),A.Cust.addStage(A.GradientMaterialStage),A.stageArr.push(A.GradientMaterialStage)),f.normalizeMaterialStage&&(A.NormalizeMaterialStage=new A.CSME.NormalizeMaterialStage(Ae(f.normalizeMaterialStage,{weight:.5})),A.Cust.addStage(A.NormalizeMaterialStage),A.stageArr.push(A.NormalizeMaterialStage)),f.dynamicColorMaterialStage&&(A.DynamicColorMaterialStage=new A.CSME.DynamicColorMaterialStage(Ae(f.dynamicColorMaterialStage,{weight:.5})),A.Cust.addStage(A.DynamicColorMaterialStage),A.stageArr.push(A.DynamicColorMaterialStage)),f.reflectMaterialStage&&(A.ReflectMaterialStage=new A.CSME.ReflectMaterialStage(Ae(f.reflectMaterialStage,{weight:.5})),A.Cust.addStage(A.ReflectMaterialStage),A.stageArr.push(A.ReflectMaterialStage)),f.textureMaterialStage&&(A.TextureMaterialStage=new A.CSME.TextureMaterialStage(Ae(f.textureMaterialStage,{weight:.5,url:`${globalThis.GEOWORLD_BASE_URL}Assets/Textures/window.png`})),A.Cust.addStage(A.TextureMaterialStage),A.stageArr.push(A.TextureMaterialStage))};zH.prototype.addStage=function(o){let A=this;A.Cust.addStage(o),A.stageArr.push(o)};zH.prototype.removeStage=function(o){this.Cust.removeStage(o.name)};zH.prototype.update=function(){let o=this;o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=o.viewer.scene.preUpdate.addEventListener(()=>{o.Cust.update()})};zH.prototype.removeFromMap=function(){let o=this;for(let A=0;A<o.stageArr.length;A++)o.removeStage(o.stageArr[A]);o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=null};var Jct=zH;function mle(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._options.visibleEdgeColor=Ae(A.visibleEdgeColor,At.fromCssColorString("#101010")),this._options.outlineWidth=Ae(A.outlineWidth,1),this._options.thresholdAngle=Ae(A.thresholdAngle,12*Math.PI/180),this.add()}mle.prototype.add=function(){this._edgeStage=IH();let o=this._edgeStage;o.visibleEdgeColor=this._options.visibleEdgeColor,o.outlineWidth=this._options.outlineWidth,o.thresholdAngle=this._options.thresholdAngle,o.selected=[{},{}],o.enabled=!0,this._earthCtrl.Viewer.postProcessStages.add(o)};mle.prototype.removeFromMap=function(){this._edgeStage&&(this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage),this.__edgeStage=null)};Object.defineProperties(mle.prototype,{show:{get:function(){return this._edgeStage.show},set:function(o){this._edgeStage.show=o}},outlineWidth:{get:function(){return this._edgeStage.outlineWidth},set:function(o){this._edgeStage.outlineWidth=o}},thresholdAngle:{get:function(){return this._edgeStage.thresholdAngle},set:function(o){!o||(this._edgeStage.thresholdAngle=o)}},visibleEdgeColor:{get:function(){return this._edgeStage.visibleEdgeColor},set:function(o){!o||(this._edgeStage.visibleEdgeColor=o)}},hiddenEdgeColor:{get:function(){return this._edgeStage.hiddenEdgeColor},set:function(o){!o||(this._edgeStage.hiddenEdgeColor=o)}},showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var Wct=mle;function Cle(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._visibleEdgeColor=Ae(A.visibleEdgeColor,At.fromCssColorString("#ff0000")),this._hiddenEdgeColor=Ae(A.hiddenEdgeColor,At.fromCssColorString("#4d4d4d")),this.handler=null,this.key=Ae(A.key,"id"),this.model=Ae(A.model,null),this.add()}Cle.prototype.add=function(){let o=this,A="";this._edgeStage=IH(!0);let f=this._edgeStage;f.visibleEdgeColor=this._visibleEdgeColor,f.hiddenEdgeColor=this._hiddenEdgeColor,f.selected=[],f.enabled=!1,this._earthCtrl.Viewer.postProcessStages.add(f);function m(C,y){function x(E,I){let w=E.featuresLength;for(let Q=0;Q<w;++Q){let M=E.getFeature(Q);if(M.getProperty(o.key)===A){let T={pickId:M.pickId};y.selected=[T],y.enabled=!0}}}function v(E,I){let w=E.content,Q=w.innerContents;if(O(Q)){let M=Q.length;for(let B=0;B<M;++B)x(Q[B],I)}else x(w,I)}C.tileVisible.addEventListener(function(E){A!==""&&v(E,null)})}m(this.model,f),this.handler=new Ur(this._earthCtrl.coreMap.scene.canvas),this.handler.setInputAction(function(C){let y=o._earthCtrl.coreMap.scene.pick(C.position);if(f.selected=[],A="",!y||!y.primitive)return;let v=y.primitive._pickIds,I={pickId:y.pickId};f.selected=[I],f.enabled=!0,A=y.getProperty(o.key)},Ki.LEFT_CLICK)};Cle.prototype.removeFromMap=function(){this.handler&&(this.handler.destroy(),this.handler=void 0),this._edgeStage&&this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage)};Object.defineProperties(Cle.prototype,{showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var jct=Cle;function zs(o){this._earthCtrl=o,this._coreMap=o.coreMap}function Ox(){return((1+je.nextRandomNumber())*65536|0).toString(16).substring(1)}zs.createUUID=function(){return`${Ox()+Ox()}-${Ox()}-${Ox()}-${Ox()}-${Ox()}${Ox()}${Ox()}`};zs.createUUIDWithoutDash=function(){return Ox()+Ox()+Ox()+Ox()+Ox()+Ox()+Ox()+Ox()};zs.prototype.createUUID=function(){return zs.createUUID()};zs.prototype.createGroup=function(o){let A=new UO;return A.id=o.id||zs.createUUID(),A.name=o.name||"\u672A\u547D\u540D\u7EC4",A};zs.prototype.createImageryLayer=function(o,A){let f=new rle(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.IMAGERYPROVIDERS),f),f};zs.prototype.createTerrainLayer=function(o,A){let f=new ole(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.TERRAINPROVIDERS),f),f};zs.prototype.removeTerrainLayer=function(o){this._coreMap.terrainProvider=new IP({})};zs.prototype.createFeatureLayer=function(o,A){let f=new ule(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.FEATURELAYERS),f),f};zs.prototype.createModelLayer=function(o,A){let f=new sle(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.MODELLAYERS),f),f};zs.prototype.createWfsModel=function(o,A){let f=new m6(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.MODELLAYERS),f),f};zs.prototype.createModel=function(o,A){let f=new Lse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.removeModel=function(o){O(o)&&o.removeFromMap()};zs.prototype.createCZMLObject=function(o,A){let f=this,m=Ae(o.addToMap,!0),C=new iW(o.name);return C.load(o.url),m&&f._earthCtrl.dataSources.add(C),C.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,C):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),C),C};zs.prototype.createElement=function(o){let A={};return A[o.type]=o.parameters,O(o.name)&&(A.name=o.name),O(o.position)&&(A.position=o.position),this._earthCtrl.entities.add(A)};zs.prototype.removeElement=function(o){O(o)?this._earthCtrl.entities.remove(o):this._earthCtrl.entities.removeAll()};zs.prototype.createVideoProjection=function(o,A){o.addToMap=Ae(o.addToMap,!0);let f=Ae(o.sourceType,"perspective"),m=null;return f==="perspective"?(m=new yse(this._earthCtrl,o),m.initialize(o),m.name=o.name,A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),m)):f==="panorama"?(m=new wct(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),m)):f==="fisheye"&&(m=new xse(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),m)),m};zs.prototype.createTrack=function(o,A){let f=new bct(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.initialize(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createSceneNode=function(o,A,f){let m=new UO(this._earthCtrl);return m.id=o,m.name=A,m.label=f,m};zs.prototype.createFire=function(o,A){let f=new Ise(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createSmoke=function(o,A){let f=new Bse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createExplosion=function(o,A){let f=new bse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createFireworks=function(o,A){let f=new Sse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createRadarScan=function(o,A){let f=new Tse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createCircleScan=function(o,A){let f=new Fct(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createUpDownScan=function(o){let A=new kct(this._earthCtrl,o);return A.show=!0,A};zs.prototype.createWaters=function(o,A){let f=new dle(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createHeatmap=function(o,A){let f=Tct.create(this._earthCtrl,o.bbox,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createLabel=function(o,A){let f=new Nse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createBillboard=function(o,A){let f=new Pse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPolyline=function(o,A){let f=new Ose(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPolygon=function(o,A){let f=new Gse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPoint=function(o,A){let f=new Vse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createBox=function(o,A){let f=new Kse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createEllipsoid=function(o,A){let f=new jse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createCylinder=function(o,A){let f=new Jse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createRectangle=function(o,A){let f=new Xse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createEllipse=function(o,A){let f=new $se(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPolylineVolume=function(o,A){let f=new tle(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createEChartLayer=function(o,A){let f=new Ale(this._earthCtrl);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPointLight=function(o){return new Uct(this._earthCtrl,o)};zs.prototype.createHawkeye=function(o){let A=new fle(this._earthCtrl,o);A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&A.addToMap(o)};zs.prototype.createSpotLight=function(o){let A=new ple(this._earthCtrl.coreMap,o.entities,o.lights);return A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.createCustomShaderManager=function(o){let A=new Yct;return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.createCustomShaderStage=function(o){let A=new Jct(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.createModelOutline=function(o={}){let A=new Wct(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.modelClick=function(o={}){let A=new jct(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};var D2=zs;var yle=class extends c0{constructor(A,f){super(A),this._objectMap={},this._rootNode=null,this._isBenchUpdate=!1,this._selectSet=new Cse(A);let m=new UO(A);m.id=D2.createUUID(),m.name=Ae(f.ProjectName,"root"),m.version=Ae(f.version,null),m.desc=Ae(f.desc,null),m.createTime=Ae(f.createTime,new Date().toISOString()),m.lastUpdate=Ae(f.lastUpdate,null),m.show=!0,this._rootNode=m,this._editNode=m,this._objectMap[m.id]=m,this._EventDocumentChanged=new SN("EventDocumentChanged")}finalize(){this._rootNode=null,this._objectMap={}}getChildById(A){return this._objectMap.hasOwnProperty(A)?this._objectMap[A]:null}addChild(A,f){A.addChild(f),this._objectMap[f.id]=f,this._isBenchUpdate||this.commitChanged()}removeChildById(A){let f=this._objectMap[A];O(f)&&this.removeChild(f)}removeChild(A){O(A)&&O(A.parentNode)&&(A.removeFromMap(),A.parentNode.removeChild(A)),delete this._objectMap[A.id],this._isBenchUpdate||this.commitChanged()}removeAll(){}beginUpdate(){this._isBenchUpdate=!0}endUpdate(){this._isBenchUpdate&&(this.commitChanged(),this._isBenchUpdate=!1)}commitChanged(){this._EventDocumentChanged.notifyEvent(this)}flyTo(A,f){O(A)&&O(A._primitive)&&(A=A._primitive),this._earthCtrl.coreMap.flyTo(A,f)}findLocationByID(A,f){if(!A)return;let m=this.getChildById(A);O(m)&&O(m._primitive)&&(m=m._primitive),this._earthCtrl.coreMap.flyTo(m,f)}moveLayer(A,f){let m=this.getChildById(A),C=null;for(let y=0;y<m.parentNode.childNodes.length;y++)m.parentNode.childNodes[y].id===m.id&&(C=y);f==="up"?(this._earthCtrl.coreMap.scene.imageryLayers.raise(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C+1)):f==="down"&&(this._earthCtrl.coreMap.scene.imageryLayers.lower(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C-1))}changeLayer(A,f,m){if(f=je.clamp(f,0,A.length-1),m=je.clamp(m,0,A.length-1),f===m)return;let C=A[f];A[f]=A[m],A[m]=C}outputJson(A){let f=this;new Promise(function(C,y){let x={IMAGERYPROVIDERS:"imageryProviders",TERRAINPROVIDERS:"terrainProviders",MODELLAYERS:"modelLayers",FEATURELAYERS:"featureLayers",USERSCENE:"userScene"},v=0,E=[];for(let I in x){let w=x[I],Q=f.rootNode.getChildByName(w);if(!Q)continue;let M=[];if(Q.childNodes.length===0)M=[];else for(let B=0;B<Q.childNodes.length;B++){let T=Q.childNodes[B].toJSON();M.push(T)}Promise.all(M).then(function(B){let T=[];if(B.length!==0){for(let L=0;L<B.length;L++)T.push(B[L]);let D=T[0].class;D!=="IMAGERY_LAYER"&&D!=="TERRAIN_LAYER"&&D!=="MODEL_LAYER"&&D!=="FEATURE_LAYER"&&(D="USER_SCENE");let F={item:D,objJson:T};E.push(F)}v++,v===5&&(C(E),v=0)})}}).then(function(C){let y={version:f.rootNode.version,projectName:f.rootNode.name,desc:f.rootNode.desc,createTime:f.rootNode.createTime,lastUpdate:new Date().toISOString(),imageryProviders:[],terrainProviders:[],modelLayers:[],featureLayers:[],userScene:[]};for(let w=0;w<C.length;w++)C[w].item==="IMAGERY_LAYER"&&(y.imageryProviders=C[w].objJson),C[w].item==="TERRAIN_LAYER"&&(y.terrainProviders=C[w].objJson),C[w].item==="MODEL_LAYER"&&(y.modelLayers=C[w].objJson),C[w].item==="FEATURE_LAYER"&&(y.featureLayers=C[w].objJson),C[w].item==="USER_SCENE"&&(y.userScene=C[w].objJson);let x={class:"ENVIRONMENT",underGround:Ae(f._earthCtrl.camera.undergroundMode,null),shadow:Ae(f._earthCtrl.shadows,null),depthTest:Ae(f._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain,null),rain:Ae(f._earthCtrl.environment.rain.show,null),snow:Ae(f._earthCtrl.environment.snow.show,null),fog:Ae(f._earthCtrl.environment.fog.show,null),bwMode:Ae(f._earthCtrl.environment.bwMode.show,null),nightMode:Ae(f._earthCtrl.environment.nightMode.show,null),colorAdjustment:{show:Ae(f._earthCtrl.environment.colorAdjustment.show,null),contrast:Ae(f._earthCtrl.environment.colorAdjustment.contrast,null),saturation:Ae(f._earthCtrl.environment.colorAdjustment.saturation,null),brightness:Ae(f._earthCtrl.environment.colorAdjustment.brightness,null)}},v={class:"SKYBOX",positiveX:Ae(f._earthCtrl.environment.SkyBoxSource.positiveX,null),negativeX:Ae(f._earthCtrl.environment.SkyBoxSource.negativeX,null),positiveY:Ae(f._earthCtrl.environment.SkyBoxSource.positiveY,null),negativeY:Ae(f._earthCtrl.environment.SkyBoxSource.negativeY,null),positiveZ:Ae(f._earthCtrl.environment.SkyBoxSource.positiveZ,null),negativeZ:Ae(f._earthCtrl.environment.SkyBoxSource.negativeZ,null)},E={class:"VIEWPOINT",lon:f._earthCtrl.camera.viewPoint.lon,lat:f._earthCtrl.camera.viewPoint.lat,alt:f._earthCtrl.camera.viewPoint.alt,heading:f._earthCtrl.camera.viewPoint.heading,pitch:f._earthCtrl.camera.viewPoint.pitch,roll:f._earthCtrl.camera.viewPoint.roll,duration:f._earthCtrl.camera.viewPoint.duration};y.userScene.push(x),y.userScene.push(v),y.userScene.push(E);let I=JSON.stringify(y);A&&A(I)})}};Object.defineProperties(yle.prototype,{rootNode:{get:function(){return this._rootNode},set:function(o){this._rootNode=o}},editNode:{get:function(){return this._editNode},set:function(o){this._editNode=o}},selectSet:{get:function(){return this._selectSet}},EventDocumentChanged:{get:function(){return this._EventDocumentChanged}},EventObjectPropertyChanged:{get:function(){return this._EventObjectPropertyChanged}}});var xle=yle;function qct(o){this._earthCtrl=o,this._coreMap=o.coreMap,this.initialize()}var VHi=new ls,zHi=new ee,KHi=new ee;qct.prototype.initialize=function(){let o=document.createElement("div");o.className="map-info-bar",o.style="position: absolute;left: 0px;bottom:0px;width: 100%;background:rgba(0,0,0,0.4); color:#e9e9e9; text-shadow:2px 2px 2px #000";let A=this._coreMap;A.container.appendChild(o);let f="float: right; min-width: 100px;margin-right: 20px;",m=document.createElement("div");m.style=f,o.appendChild(m);let C=document.createElement("div");C.style=f,o.appendChild(C);let y=document.createElement("div");y.style=f,o.appendChild(y);let x=A.scene.canvas,v=A.scene.globe.ellipsoid;new Ur(x).setInputAction(function(I){let w=A.camera.pickEllipsoid(I.endPosition,v);if(w){let Q=A.scene.globe.ellipsoid.cartesianToCartographic(w),M=je.toDegrees(Q.latitude).toFixed(6),B=je.toDegrees(Q.longitude).toFixed(6),T=A.camera.positionCartographic.height.toFixed(1);y.innerHTML=`\u7ECF\u5EA6\uFF1A${B}`,C.innerHTML=`\u7EAC\u5EA6\uFF1A${M}`,m.innerHTML=`\u89C6\u70B9\u9AD8\uFF1A${T}\u7C73`}},Ki.MOUSE_MOVE)};var Xct=qct;function cu(){}cu.parseBaseData=function(o,A){let f=[];if(O(A)&&O(A.imageryProviders))for(let C=0;C<A.imageryProviders.length;C++){let y=A.imageryProviders[C];if(y.enable===!1||y.show===!1)continue;if(O(y.tilingScheme)){let v=y.tilingScheme;v.type==="GeographicTilingScheme"&&(y.tilingScheme=new af(v))}let x=D2.createImageryLayer(y);f.push(x)}let m=[];if(O(A)&&O(A.terrainProviders))for(let C=0;C<A.terrainProviders.length;C++){let y=A.terrainProviders[C];if(y.enable===!1||y.show===!1)continue;let x=D2.createTerrainLayer(y);m.push(x)}return{imageryProvider:f,terrainProvider:m}};cu.parse=function(o,A){if(!O(A))return;let f=[rl.IMAGERYPROVIDERS,rl.TERRAINPROVIDERS,rl.MODELLAYERS,rl.FEATURELAYERS,rl.USERSCENE];for(let m=0;m<f.length;m++){let C=o.factory.createSceneNode(D2.createUUID(),f[m]);C.show=!0,o.userScene.addChild(o.userScene.rootNode,C)}O(A[rl.IMAGERYPROVIDERS])&&KH(o,A[rl.IMAGERYPROVIDERS],o.userScene.rootNode.getChildByIndex(0),0),O(A[rl.TERRAINPROVIDERS])&&KH(o,A[rl.TERRAINPROVIDERS],o.userScene.rootNode.getChildByIndex(1),1),O(A[rl.MODELLAYERS])&&KH(o,A[rl.MODELLAYERS],o.userScene.rootNode.getChildByIndex(2)),O(A[rl.FEATURELAYERS])&&KH(o,A[rl.FEATURELAYERS],o.userScene.rootNode.getChildByIndex(3)),O(A[rl.USERSCENE])&&KH(o,A[rl.USERSCENE],o.userScene.rootNode.getChildByIndex(4))};function KH(o,A,f,m){for(let C=0;C<A.length;C++){let y=A[C],x=null;if(y.enable===!1)continue;O(y.class)?(y.class==="IMAGERY"&&(y.class=Eo.IMAGERY_LAYER),y.class==="TERRAIN"&&(y.class=Eo.TERRAIN_LAYER),x=y.class):(m===0?y.class=Eo.IMAGERY_LAYER:m===1&&(y.class=Eo.TERRAIN_LAYER),x=y.class);let v=cu.parserMap[x];v!==void 0&&v(o,y,f)}}function ORi(o,A,f){let m=o.factory.createSceneNode(A.id,A.name);m.show=Ae(A.show,!0),o.userScene.addChild(f,m),O(A.childNodes)&&KH(o,A.childNodes,m)}function URi(o,A,f){let m=A;if(O(m.tilingScheme)){let C=m.tilingScheme;C.type==="GeographicTilingScheme"&&(m.tilingScheme=new af(C))}o.factory.createImageryLayer(m,f)}function GRi(o,A,f){let m=A;o.factory.createTerrainLayer(m,f)}function HRi(o,A,f){let m=A;m.addToMap=!0;let C=m.sourceType;C==="3DTiles"||C==="b3dm"||C==="osgb"||C==="s3m"||C==="ude_block"||C==="ude_model"?o.factory.createModelLayer(m,f):C==="czml"?o.factory.createCZMLObject(m,f):C==="wfsModel"&&o.factory.createWfsModel(m,f)}function VRi(o,A,f){let m=o.factory.createFeatureLayer(A,f)}function zRi(o,A,f){o.coreMap.scene.skyBox=new mN({sources:{positiveX:A.positiveX,negativeX:A.negativeX,positiveY:A.positiveY,negativeY:A.negativeY,positiveZ:A.positiveZ,negativeZ:A.negativeZ}})}function KRi(o,A,f){o.camera.undergroundMode=Ae(A.underGround,!1),o.shadows=Ae(A.shadow,!1),A.rain===!0&&o.environment.showEffect("rain"),A.snow===!0&&o.environment.showEffect("snow"),A.fog===!0&&o.environment.showEffect("fog"),o.coreMap.scene.globe.depthTestAgainstTerrain=Ae(A.depthTest,!1),A.bwMode===!0&&o.environment.showEffect("bwMode"),A.nightMode===!0&&o.environment.showEffect("nightMode"),A.colorAdjustment.show===!0&&(o.environment.showEffect("colorAdjustment"),o.environment.colorAdjustment.contrast=A.colorAdjustment.contrast,o.environment.colorAdjustment.saturation=A.colorAdjustment.saturation,o.environment.colorAdjustment.brightness=A.colorAdjustment.brightness)}function YRi(o,A,f){o.camera.viewPoint=A,o.camera.flyTo(A.lon,A.lat,A.alt,A.heading,A.pitch,A.roll,A.duration)}function JRi(o,A,f){o.factory.createModel(A,f)}function WRi(o,A,f){o.factory.createWaters(A,f)}function jRi(o,A,f){o.factory.createExplosion(A,f)}function qRi(o,A,f){o.factory.createFireworks(A,f)}function XRi(o,A,f){o.factory.createSmoke(A,f)}function ZRi(o,A,f){o.factory.createFire(A,f)}function $Ri(o,A,f){A.color&&(A.color=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createRadarScan(A,f)}function eLi(o,A,f){A.color&&(A.color=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createCircleScan(A,f)}function tLi(o,A,f){A.color&&(A.color=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),A.outlineColor&&(A.outlineColor=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createPoint(A,f)}function iLi(o,A,f){A.fillColor&&(A.fillColor=new At(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),o.factory.createLabel(A,f)}function rLi(o,A,f){o.factory.createBillboard(A,f)}function nLi(o,A,f){A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),A.lineColor&&(A.lineColor=new At(A.lineColor.red,A.lineColor.green,A.lineColor.blue,A.lineColor.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createPolyline(A,f)}function oLi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),o.factory.createPolygon(A,f)}function aLi(o,A,f){A.coordinates&&(A.coordinates=Si.fromDegrees(A.coordinates[0],A.coordinates[1],A.coordinates[2],A.coordinates[3])),A.fillColor&&(A.fillColor=new At(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createRectangle(A,f)}function sLi(o,A,f){o.factory.createEllipse(A,f)}function lLi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=ee.fromDegrees(A.position[0],A.position[1],A.position[2])),A.dimensions&&(A.dimensions=new ee(A.dimensions.x,A.dimensions.y,A.dimensions.z)),o.factory.createBox(A,f)}function uLi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=ee.fromDegrees(A.position[0],A.position[1],A.position[2])),A.radii&&(A.radii=new ee(A.radii[0],A.radii[1],A.radii[2])),o.factory.createEllipsoid(A,f)}function cLi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=ee.fromDegrees(A.position[0],A.position[1],A.position[2])),o.factory.createCylinder(A,f)}function ALi(o,A,f){o.factory.createPolylineVolume(A,f)}function hLi(o,A,f){o.factory.createVideoProjection(A,f)}function dLi(o,A,f){o.factory.createVideoProjection(A,f)}function fLi(o,A,f){o.factory.createTrack(A,f)}function gLi(o,A,f){o.factory.createHeatmap(A,f)}function pLi(o,A,f){o.factory.createEChartLayer(A,f)}function mLi(o,A,f){let m=o.factory.createElement(A);o.userScene.addChild(f,m)}cu.array2DtoMercator=function(o){let A=[];return o.forEach(function(f){let m=ee.fromDegrees(f[0],f[1],f[2]);A.push(m)}),A};cu.parserMap={};cu.parserMap[Eo.NODE]=ORi;cu.parserMap[Eo.IMAGERY_LAYER]=URi;cu.parserMap[Eo.TERRAIN_LAYER]=GRi;cu.parserMap[Eo.MODEL_LAYER]=HRi;cu.parserMap[Eo.FEATURE_LAYER]=VRi;cu.parserMap[Eo.SKYBOX]=zRi;cu.parserMap[Eo.ENVIRONMENT]=KRi;cu.parserMap[Eo.VIEWPOINT]=YRi;cu.parserMap[Eo.MODEL]=JRi;cu.parserMap[Eo.WATERS]=WRi;cu.parserMap[Eo.EXPLOSION]=jRi;cu.parserMap[Eo.FIREWORK]=qRi;cu.parserMap[Eo.SMOKE]=XRi;cu.parserMap[Eo.FIRE]=ZRi;cu.parserMap[Eo.RADARSCAN]=$Ri;cu.parserMap[Eo.CIRCLESCAN]=eLi;cu.parserMap[Eo.POINT]=tLi;cu.parserMap[Eo.LABEL]=iLi;cu.parserMap[Eo.BILLBOARD]=rLi;cu.parserMap[Eo.POLYLINE]=nLi;cu.parserMap[Eo.POLYGON]=oLi;cu.parserMap[Eo.RECTANGLE]=aLi;cu.parserMap[Eo.ELLIPSE]=sLi;cu.parserMap[Eo.BOX]=lLi;cu.parserMap[Eo.ELLIPSOID]=uLi;cu.parserMap[Eo.CYLINDER]=cLi;cu.parserMap[Eo.POLYLINEVOLUME]=ALi;cu.parserMap[Eo.PERSPECTIVE_VIDEO_PROJECTION]=hLi;cu.parserMap[Eo.FISHEYE_VIDEO_PROJECTION]=dLi;cu.parserMap[Eo.TRACK]=fLi;cu.parserMap[Eo.HEATMAP]=gLi;cu.parserMap[Eo.ECHARTLAYER]=pLi;cu.parserMap.ELEMENT=mLi;var Zct=cu;var KTe=class extends ja{constructor(A,f,m,C){super(A,m,C),this.editBillboard=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editBillboard=f,O(this.editBillboard)&&O(this.editBillboard.entity.billboard)?console.info(this.editBillboard.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Billboard entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBillboard.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBillboard.entity)||this.pickObject(A,this.editBillboard.entity))&&this.mCallback&&this.mCallback(this.editBillboard),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editBillboard.entity.position=m}return this.mCallback&&this.mCallback(this.editBillboard),!0}updateBillboard(A){if(O(A)&&O(this.editBillboard)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBillboard.entity.position=A[C]:O(A[C])&&(this.editBillboard.entity.billboard[C]=A[C])}}}endEditEntity(){}},$ct=KTe;var YTe=class extends ja{constructor(A,f,m,C){super(A,m,C),this.editPoint=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editPoint=f,O(this.editPoint)&&O(this.editPoint.entity.point)?console.info(this.editPoint.entity.point):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Point entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPoint.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPoint.entity)||this.pickObject(A,this.editPoint.entity))&&this.mCallback&&this.mCallback(this.editPoint),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editPoint.entity.position=m}return this.mCallback&&this.mCallback(this.editPoint),!0}updatePoint(A){if(O(A)&&O(this.editPoint)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPoint.entity.position=A[C]:O(A[C])&&(this.editPoint.entity.point[C]=A[C])}}}endEditEntity(){}},eAt=YTe;var JTe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editBox=void 0,this.pickedEntity=void 0,this.editHeightPoint=void 0,this.editWHPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.dragPosition=void 0,this.editBox=f,O(this.editBox)&&O(this.editBox.entity.box)){let y=this.editBox.entity.position._value,x=Kt.fromCartesian(y);this.height=x.height;let v=new ee,E=new ee;this.getNorthPointByDistance(v,E),this.editHeightPoint=this.mEarthCtrl.entities.add({name:"box_edit_height_point",position:v,point:{heightReference:this.editBox.entity.box.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.editHeightPoint.id),this.editWHPoint=this.mEarthCtrl.entities.add({name:"box_edit_long_width_point",position:E,point:{heightReference:this.editBox.entity.box.heightReference,color:At.RED,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.editWHPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Box entity is need!"})}addHeight(A){let f=this.editBox.entity.position._value,m=Kt.fromCartesian(f);return this.height=m.height+A,ee.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C;console.info(this.editBox.entity.position),O(m)?C=this.editBox.entity.position.getValue(m):C=this.editBox.entity.position._value;let y=Vn.eastNorthUpToFixedFrame(C),x=new ee,v=this.editBox.entity.box.dimensions._value;v||(v=this.editBox.entity.box.dimensions.getValue(m)),ee.divideByScalar(v,2,x),ee.clone(x,A),ee.clone(x,f),A.y*=-1,Xe.multiplyByPoint(y,A,A),f.y*=-1,f.z*=-1,Xe.multiplyByPoint(y,f,f)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBox.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0):f.name==="box_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=f,this.pickEditWHPoint=void 0):f.name==="box_edit_long_width_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBox)||this.pickObject(A,this.editBox.entity))&&this.mCallback&&this.mCallback(this.editBox),this.currentPoint=void 0,this.isEditing=!1,this.dragPosition=void 0,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;let f=new Date,m=fi.fromDate(f);if(O(this.currentPoint)||O(this.pickEditHeightPoint)||O(this.pickEditWHPoint)){let C=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,y=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,C);if(!y)return;let x=Kt.fromCartesian(y),v=ee.fromRadians(x.longitude,x.latitude,x.height+this.height);if(O(this.currentPoint))this.currentPoint.position=v,this.editBox.entity.position=new Bn(function(){return v},!1);else if(O(this.dragPosition)){if(O(this.pickEditWHPoint)){let w=ee.subtract(y,this.dragPosition,new ee),Q=ee.normalize(w,new ee);ee.dot(w,Q,w);let M=this.editBox.entity.box.dimensions._value;M||(M=this.editBox.entity.box.dimensions.getValue(m));let B=ee.clone(M);B.x-=w.x,B.y+=w.y,ee.abs(B,B),this.editBox.entity.box.dimensions=new Bn(function(){return B},!1)}else if(O(this.pickEditHeightPoint)){let w=ee.subtract(y,this.dragPosition,new ee),Q=this.editBox.entity.box.dimensions._value;Q||(Q=this.editBox.entity.box.dimensions.getValue(m));let M=ee.clone(Q);M.z+=w.z,ee.abs(M,M),this.editBox.entity.box.dimensions=M,this.editBox.entity.position=this.addHeight(w.z/2)}}this.dragPosition=y;let E=new ee,I=new ee;this.getNorthPointByDistance(E,I,m),this.editHeightPoint.position=E,this.editWHPoint.position=I}return this.mCallback&&this.mCallback(this.editBox),!0}updateBox(A){if(O(A)&&O(this.editBox)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBox.entity.position=A[C]:O(A[C])&&(this.editBox.entity.box[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},tAt=JTe;var WTe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editCylinder=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.topRadiusPoint=void 0,this.pickTopRadiusPoint=void 0,this.bottomRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0,this.heightPoint=void 0,this.pickHeightPoint=void 0,this.dragPosition=void 0,this.editCylinder=f,O(this.editCylinder)&&O(this.editCylinder.entity.cylinder)){let y=this.editCylinder.entity.position._value,x=Kt.fromCartesian(y);this.height=x.height;let v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value,I=new ee,w=new ee,Q=new ee;this.getNorthPointByDistance(I,w,Q),this.heightPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_height_point",position:Q,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.heightPoint.id),v>0&&(this.topRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_top_radius_point",position:I,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:At.RED,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.topRadiusPoint.id)),E>0&&(this.bottomRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_bottom_radius_point",position:w,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:At.RED,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.bottomRadiusPoint.id))}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Cylinder entity is need!"})}addHeight(A){let f=this.editCylinder.entity.position._value,m=Kt.fromCartesian(f);return this.height=m.height+A,ee.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editCylinder.entity.position._value,y=Vn.eastNorthUpToFixedFrame(C),x=this.editCylinder.entity.cylinder.length._value,v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value;v>0&&(A.z+=x/2,A.x+=v,Xe.multiplyByPoint(y,A,A)),E>0&&(f.x+=E,f.z-=x/2,Xe.multiplyByPoint(y,f,f)),m.z+=x/2,Xe.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editCylinder.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=f,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_top_radius_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=f,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_bottom_radius_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editCylinder)||this.pickObject(A,this.editCylinder.entity))&&this.mCallback&&this.mCallback(this.editCylinder),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.heightPoint)||O(this.topRadiusPoint)||O(this.bottomRadiusPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=ee.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editCylinder.entity.position=y;else if(O(this.dragPosition)){if(O(this.pickHeightPoint)){let Q=ee.subtract(m,this.dragPosition,new ee),M=this.editCylinder.entity.cylinder.length._value;M+=Q.z,M=Math.abs(M),this.editCylinder.entity.position=this.addHeight(Q.z/2),this.editCylinder.entity.cylinder.length=M}else if(O(this.pickTopRadiusPoint)){let Q=ee.subtract(m,this.dragPosition,new ee),M=this.editCylinder.entity.cylinder.topRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.topRadius=M}else if(O(this.pickBottomRadiusPoint)){let Q=ee.subtract(m,this.dragPosition,new ee),M=this.editCylinder.entity.cylinder.bottomRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.bottomRadius=M}}this.dragPosition=m;let x=this.editCylinder.entity.cylinder.topRadius._value,v=this.editCylinder.entity.cylinder.bottomRadius._value,E=new ee,I=new ee,w=new ee;this.getNorthPointByDistance(E,I,w),x>0&&(this.topRadiusPoint.position=E),v>0&&(this.bottomRadiusPoint.position=I),this.heightPoint.position=w}return this.mCallback&&this.mCallback(this.editCylinder),!0}updateCylinder(A){if(O(A)&&O(this.editCylinder)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editCylinder.entity.position=A[C]:O(A[C])&&(this.editCylinder.entity.cylinder[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},iAt=WTe;var jTe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editEllipse=void 0,this.pickedEntity=void 0,this.semiMajorAxisPoint=void 0,this.semiMinorAxisPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0,this.pointsId=[],this.isEditing=!1,this.circle=!1,this.editEllipse=f,O(this.editEllipse)&&O(this.editEllipse.entity.ellipse)){let y=je.PI_OVER_TWO,x=this.updatePoint(y);this.semiMajorAxisPoint=this.mEarthCtrl.entities.add({name:"semi_major_axis_point",position:x,point:{heightReference:this.editEllipse.entity.ellipse.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.semiMajorAxisPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipse entity is need!"})}updatePoint(A){let f=new ee,m=new ee,C=new ee,y=this.editEllipse.entity.ellipse;this.semiMinorAxis=y.semiMinorAxis._value,this.semiMajorAxis=y.semiMajorAxis._value,this.circle=this.semiMajorAxis===this.semiMinorAxis;let x=Ae(y.rotation,0);this.center=this.editEllipse.entity.position._value;let v=this.semiMinorAxis*this.semiMinorAxis,E=this.semiMajorAxis*this.semiMajorAxis,I=this.semiMajorAxis*this.semiMinorAxis,w=ee.magnitude(this.center),Q=ee.normalize(this.center,f),M=ee.cross(ee.UNIT_Z,this.center,m);M=ee.normalize(M,M);let B=ee.cross(Q,M,C),T=new ee;return iB.pointOnEllipsoid(A,x,B,M,v,I,E,w,Q,T)}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipse.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0):f.name==="semi_minor_axis_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=f):f.name==="semi_major_axis_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=f,this.pickSemiMinorAxisPoint=void 0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipse)||this.pickObject(A,this.editEllipse.entity))&&this.mCallback&&this.mCallback(this.editEllipse),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickSemiMajorAxisPoint)||O(this.pickSemiMinorAxisPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;if(O(this.currentPoint))this.currentPoint.position=m,this.editEllipse.entity.position=m;else if(O(this.pickSemiMajorAxisPoint)){let C=ee.distance(this.center,m);this.editEllipse.entity.ellipse.semiMajorAxis=C;let y=C*this.semiMinorAxis/this.semiMajorAxis;y>C&&(y=C),this.editEllipse.entity.ellipse.semiMinorAxis=y}else if(O(this.pickSemiMinorAxisPoint)){let C=ee.distance(this.center,m);this.editEllipse.entity.ellipse.semiMinorAxis=C}this.semiMajorAxisPoint.position=this.updatePoint(je.PI_OVER_TWO)}return this.mCallback&&this.mCallback(this.editEllipse),!0}updateEllipse(A){if(O(A)&&O(this.editEllipse)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipse.entity.position=A[C]:O(A[C])&&(this.editEllipse.entity.ellipse[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},rAt=jTe;var qTe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editEllipsoid=void 0,this.pickedEntity=void 0,this.height=0,this.isEditing=!1,this.pointsId=[],this.radiiXPoint=void 0,this.pickRadiiXPoint=void 0,this.radiiYPoint=void 0,this.pickRadiiYPoint=void 0,this.radiiZPoint=void 0,this.pickRadiiZPoint=void 0,this.dragPosition=void 0,this.editEllipsoid=f,O(this.editEllipsoid)&&O(this.editEllipsoid.entity.ellipsoid)){console.info(this.editEllipsoid.ellipsoid);let y=this.editEllipsoid.entity.position._value,x=Kt.fromCartesian(y);this.height=x.height;let v=new ee,E=new ee,I=new ee;this.getNorthPointByDistance(v,E,I),this.radiiXPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_x_point",position:v,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiXPoint.id),this.radiiYPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_y_point",position:E,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiYPoint.id),this.radiiZPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_z_point",position:I,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiZPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipsoid entity is need!"})}addHeight(A){let f=this.editEllipsoid.entity.position._value,m=Kt.fromCartesian(f);return this.height=m.height+A,ee.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editEllipsoid.entity.position._value,y=Vn.eastNorthUpToFixedFrame(C),x=this.editEllipsoid.entity.ellipsoid.radii._value;A.x=x.x,Xe.multiplyByPoint(y,A,A),f.y=-x.y,Xe.multiplyByPoint(y,f,f),m.z=x.z,Xe.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipsoid.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_x_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=f,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_y_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=f,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_z_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipsoid)||this.pickObject(A,this.editEllipsoid.entity))&&this.mCallback&&this.mCallback(this.editEllipsoid),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickRadiiXPoint)||O(this.pickRadiiYPoint)||O(this.pickRadiiZPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=ee.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editEllipsoid.entity.position=y;else{if(O(this.dragPosition)){let I=ee.subtract(m,this.dragPosition,new ee),w=ee.normalize(I,new ee);ee.dot(I,w,I);let Q=this.editEllipsoid.entity.ellipsoid.radii._value,M=ee.clone(Q);O(this.pickRadiiXPoint)?M.x-=I.x:O(this.pickRadiiYPoint)?M.y+=I.y:O(this.pickRadiiZPoint)&&(M.z+=I.z,this.editEllipsoid.entity.position=this.addHeight(I.z)),ee.abs(M,M),this.editEllipsoid.entity.ellipsoid.radii=M}this.dragPosition=m}let x=new ee,v=new ee,E=new ee;this.getNorthPointByDistance(x,v,E),this.radiiXPoint.position=x,this.radiiYPoint.position=v,this.radiiZPoint.position=E}return this.mCallback&&this.mCallback(this.editEllipsoid),!0}updateEllipsoid(A){if(O(A)&&O(this.editEllipsoid)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipsoid.entity.position=A[C]:O(A[C])&&(this.editEllipsoid.entity.ellipsoid[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},nAt=qTe;var XTe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolygon=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolygon=f,O(this.editPolygon)&&O(this.editPolygon.entity.polygon))for(let y=0;y<this.editPolygon.entity.polygon.hierarchy._value.positions.length;y++){let x=this.editPolygon.entity.polygon.hierarchy._value.positions[y],v=this.mEarthCtrl.entities.add({name:"polygon_point",position:x,point:{color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polygon entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolygon.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polygon_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolygon)||this.pickObject(A,this.editPolygon.entity))&&this.mCallback&&this.mCallback(this.editPolygon),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolygon.entity.polygon.hierarchy=C}return this.mCallback&&this.mCallback(this.editPolygon),!0}updatePolygon(A){if(O(A)&&O(this.editPolygon)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolygon.entity.polygon[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},oAt=XTe;var ZTe=class extends ja{constructor(A,f,m,C){super(A,m,C),this.editModel=void 0,this.pickedEntity=void 0,this.editColor=At.RED.withAlpha(.8),this.isEditing=!1,this.editModel=f,this.oldColor=this.editModel.entity.color,this.editModel.entity.color=this.editColor,O(this.editModel)&&O(this.editModel.entity)?console.info(this.editModel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"gltf Model is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f===this.editModel.parameter.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editModel)||this.pickObject(A,this.editModel.entity))&&this.mCallback&&this.mCallback(this.editModel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=Kt.clone(C);y.longitude=je.toDegrees(y.longitude),y.latitude=je.toDegrees(y.latitude),this.editModel.lon=y.longitude,this.editModel.lat=y.latitude}return this.mCallback&&this.mCallback(this.editModel),!0}updateModel(A){if(O(A)&&O(this.editModel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];if(O(A[C]))switch(C){case"lon":case"lat":case"alt":case"heading":case"pitch":case"roll":this.editModel[C]=A[C];break;default:this.editModel.entity[C]=A[C];break}}}}endEditEntity(){this.editModel.entity.color=this.oldColor}},aAt=ZTe;var $Te=class extends ja{constructor(A,f,m,C){super(A,m,C),this.editLabel=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editLabel=f,O(this.editLabel)&&O(this.editLabel.entity.label)?console.info(this.editLabel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Label entity is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editLabel.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editLabel.entity)||this.pickObject(A,this.editLabel.entity))&&this.mCallback&&this.mCallback(this.editLabel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editLabel.entity.position=m}return this.mCallback&&this.mCallback(this.editLabel),!0}updateLabel(A){if(O(A)&&O(this.editLabel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editLabel.entity.position=A[C]:O(A[C])&&(this.editLabel.entity.label[C]=A[C])}}}endEditEntity(){}},sAt=$Te;var eMe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolyline=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolyline=f,O(this.editPolyline)&&O(this.editPolyline.polyline))for(let y=0;y<this.editPolyline.polyline.positions._value.length;y++){let x=this.editPolyline.polyline.positions._value[y],v=this.mEarthCtrl.entities.add({name:"polyline_point",position:x,point:{color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polyline entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolyline.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polyline_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolyline)||this.pickObject(A,this.editPolyline.entity))&&this.mCallback&&this.mCallback(this.editPolyline),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolyline.polyline.positions=C}return this.mCallback&&this.mCallback(this.editPolyline),!0}updatePolyline(A){if(O(A)&&O(this.editPolyline)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolyline.polyline[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},lAt=eMe;var tMe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolylineVolume=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolylineVolume=f,O(this.editPolylineVolume)&&O(this.editPolylineVolume.entity.polylineVolume))for(let y=0;y<this.editPolylineVolume.entity.polylineVolume.positions._value.length;y++){let x=this.editPolylineVolume.entity.polylineVolume.positions._value[y],v=this.mEarthCtrl.entities.add({name:"edit_polylineVolume_point",position:x,point:{color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"PolylineVolume entity is need!"})}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolylineVolume.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="edit_polylineVolume_point"&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolylineVolume)||this.pickObject(A,this.editPolylineVolume.entity))&&this.mCallback&&this.mCallback(this.editPolylineVolume),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolylineVolume.entity.polylineVolume.positions=C}return this.mCallback&&this.mCallback(this.editPolylineVolume),!0}updatePolylineVolume(A){if(O(A)&&O(this.editPolylineVolume)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPolylineVolume.entity.position=A[C]:O(A[C])&&(this.editPolylineVolume.entity.polylineVolume[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},uAt=tMe;var iMe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editRectangle=void 0,this.pickedEntity=void 0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editRectangle=f,O(this.editRectangle)&&O(this.editRectangle.entity.rectangle)){let y=this.editRectangle.entity.rectangle.coordinates._value,x=this.editRectangle.entity.rectangle.height._value,v=Si.northwest(y),E=ee.fromRadians(v.longitude,v.latitude,x),I=this.mEarthCtrl.entities.add({name:"rect_left_top_point",position:E,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(I.id),v=Si.southeast(y);let w=ee.fromRadians(v.longitude,v.latitude,x),Q=this.mEarthCtrl.entities.add({name:"rect_right_bottom_point",position:w,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(Q.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Rectangle entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editRectangle.entity.id?(this.isEditing=!0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0):f.name==="rect_left_top_point"?(this.leftTopPoint=f,this.rightBottomPoint=void 0,this.isEditing=!0):f.name==="rect_right_bottom_point"&&(this.rightBottomPoint=f,this.leftTopPoint=void 0,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editRectangle)||this.pickObject(A,this.editRectangle.entity))&&this.mCallback&&this.mCallback(this.editRectangle),this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.leftTopPoint)||O(this.rightBottomPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=this.editRectangle.entity.rectangle.coordinates._value;O(this.leftTopPoint)?(this.leftTopPoint.position=m,y.west=C.longitude,y.north=C.latitude):O(this.rightBottomPoint)&&(this.rightBottomPoint.position=m,y.south=C.latitude,y.east=C.longitude),this.editRectangle.entity.rectangle.coordinates=y}return this.mCallback&&this.mCallback(this.editRectangle),!0}updateRectangle(A){if(O(A)&&O(this.editRectangle)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editRectangle.entity.position=A[C]:O(A[C])&&(this.editRectangle.entity.rectangle[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},cAt=iMe;function Md(o){this._earthCtrl=o,this._coreMap=o.coreMap}Md.prototype.editPoint=function(o,A){this._earthCtrl.tools.clearTool();let f=new eAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("point_edit_tool",f),f};Md.prototype.updatePoint=function(o,A){o.updatePoint(A)};Md.prototype.editPolyline=function(o,A){this._earthCtrl.tools.clearTool();let f=new lAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polyline_edit_tool",f),f};Md.prototype.updatePolyline=function(o,A){o.updatePolyline(A)};Md.prototype.editPolygon=function(o,A){this._earthCtrl.tools.clearTool();let f=new oAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polygon_edit_tool",f),f};Md.prototype.updatePolygon=function(o,A){o.updatePolygon(A)};Md.prototype.editBox=function(o,A){this._earthCtrl.tools.clearTool();let f=new tAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("box_edit_tool",f),f};Md.prototype.updateBox=function(o,A){o.updateBox(A)};Md.prototype.editEllipsoid=function(o,A){this._earthCtrl.tools.clearTool();let f=new nAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipsoid_edit_tool",f),f};Md.prototype.updateEllipsoid=function(o,A){o.updateEllipsoid(A)};Md.prototype.editCylinder=function(o,A){this._earthCtrl.tools.clearTool();let f=new iAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("cylinder_edit_tool",f),f};Md.prototype.updateCylinder=function(o,A){o.updateCylinder(A)};Md.prototype.editModel=function(o,A){this._earthCtrl.tools.clearTool();let f=new aAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("model_edit_tool",f),f};Md.prototype.updateModel=function(o,A){o.updateModel(A)};Md.prototype.editBillboard=function(o,A){this._earthCtrl.tools.clearTool();let f=new $ct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("billboard_edit_tool",f),f};Md.prototype.updateBillboard=function(o,A){o.updateBillboard(A)};Md.prototype.editLabel=function(o,A){this._earthCtrl.tools.clearTool();let f=new sAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("label_edit_tool",f),f};Md.prototype.updateLabel=function(o,A){o.updateLabel(A)};Md.prototype.editRectangle=function(o,A){this._earthCtrl.tools.clearTool();let f=new cAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("rectangle_edit_tool",f),f};Md.prototype.updateRectangle=function(o,A){o.updateRectangle(A)};Md.prototype.editEllipse=function(o,A){this._earthCtrl.tools.clearTool();let f=new rAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipse_edit_tool",f),f};Md.prototype.updateEllipse=function(o,A){o.updateEllipse(A)};Md.prototype.editPolylineVolume=function(o,A){this._earthCtrl.tools.clearTool();let f=new uAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polylinevolume_edit_tool",f),f};Md.prototype.updatePolylineVolume=function(o,A){o.updatePolylineVolume(A)};Md.prototype.endEditEntity=function(o){this._earthCtrl.tools.clearTool(),o.endEditEntity(),this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!0,this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!0};var vle=Md;function yy(o){this.mEarthCtrl=o,this.scene=this.mEarthCtrl.coreMap.scene,this.entities=this.mEarthCtrl.entities,this.camera=this.mEarthCtrl.coreMap.camera,this._points=[],this.item=void 0}yy.prototype.horizontalDistance=function(o,A){let f=this,m=!1,C=[],y="",x=[],v,E=this.scene.globe.ellipsoid,I={spot:[],distance:[],label:[],polyline:[]},w={point:At.RED,polyline:At.fromRgba(4286644096)};O(A)&&(O(A.point)&&(w.point=A.point),O(A.polyline)&&(w.polyline=A.polyline));let Q=new iI;this.scene.primitives.add(Q);let M=new OA,B=new Ur(f.scene.canvas),T=document.createElement("div");nA(".map-widget",T),nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let F=document.getElementById("toolTip");F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let L;m=!0;let R=function(V){let H=0,q=`${0}\u7C73`,ie,Z,oe,ne,se,ce;for(let j=0;j<V.length-1;j+=1)ie=E.cartesianToCartographic(V[j]),Z=M.project(ie),oe=Z.x,ne=Z.y,ie=E.cartesianToCartographic(V[j+1]),Z=M.project(ie),se=Z.x,ce=Z.y,H=H+Math.sqrt((oe-se)*(oe-se)+(ne-ce)*(ne-ce));return H>0&&(q=`${H.toFixed(2)}\u7C73`),H/1e3>=1&&(q=`${(H/1e3).toFixed(2)}\u5343\u7C73`),q},k=function(){function V(H){if(!O(H))throw new Ui("positions is required!");if(H.length<2)throw new Ui("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E2");let q=ss.fromType(ss.ColorType);q.uniforms.color=new At(1,1,0,.5),this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:w.polyline,width:3,clampToGround:!0}},this.path=H,this._init()}return V.prototype._init=function(){let H=this,q=function(){return H.path};this.options.polyline.positions=new Bn(q,!1),this.lineEntity=f.entities.add(this.options),f.item=this.lineEntity,I.polyline.push(this.lineEntity)},V}();B.setInputAction(function(V){let H,q;F.style.left=`${V.endPosition.x+10}px`,F.style.top=`${V.endPosition.y+20}px`,F.style.display="block",F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ie=!1,Z=f.camera.getPickRay(V.endPosition);Z&&(H=f.scene.globe.pick(Z,f.scene));let oe=f.scene.pick(V.endPosition);if(oe){console.log("feature",oe);let ne=f.scene.pickPosition(V.endPosition);ne&&(H=ne),ie=!0}if(!!H&&(q=Di.WGS84.cartesianToCartographic(H),q)){let ne;ie?ne=f.scene.sampleHeight(q):ne=f.scene.globe.getHeight(q);let se=ee.fromDegrees(q.longitude/Math.PI*180,q.latitude/Math.PI*180,ne);if(m){if(C.length<1)return;O(v)?(v.path.pop(),v.path.push(se)):(C.push(se),v=new k(C));let ce=R(v.path);f.entities.remove(L),L=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:v.path[v.path.length-1],label:{text:`\u603B\u957F\uFF1A${ce}`,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}})}}},Ki.MOUSE_MOVE);let U=function(V){x.push(V);let H=[];if(x.length>1){let q=x[x.length-2],ie=x[x.length-1],Z=Math.abs(q.longitude-ie.longitude)*1e7,oe=Math.abs(q.latitude-ie.latitude)*1e7;Z>oe&&(oe=Z);let ne=parseInt(oe/10);ne>1e3&&(ne=1e3),ne<2&&(ne=2);for(let se=0;se<ne;++se)H.push(new Kt(je.lerp(q.longitude,ie.longitude,se/(ne-1)),je.lerp(q.latitude,ie.latitude,se/(ne-1))));H.push(ie.clone())}else H=x;if(H.length>0)for(let q=0;q<H.length;q++){V=H[q];let ie=f.scene.globe.getHeight(V),Z=ee.fromDegrees(V.longitude/Math.PI*180,V.latitude/Math.PI*180,ie);C.push(Z)}};return B.setInputAction(function(V){let H,q,ie=!1,Z=f.camera.getPickRay(V.position);if(Z&&(H=f.scene.globe.pick(Z,f.scene)),f.scene.pick(V.position)){let ne=f.scene.pickPosition(V.position);ne&&(H=ne),ie=!0}if(H&&(q=Di.WGS84.cartesianToCartographic(H)),q){let ne;ie?ne=f.scene.sampleHeight(q):ne=f.scene.globe.getHeight(q);let se=ee.fromDegrees(q.longitude/Math.PI*180,q.latitude/Math.PI*180,ne);if(m){v&&v.path.pop(),U(q);let ce="0\u7C73";v&&(ce=R(v.path)),y=ce,I.spot.push(se),I.distance.push(ce);let j=f.entities.add({position:se,point:{pixelSize:5,color:w.point,outlineColor:At.WHITE,outlineWidth:1,clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:ce,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-20),clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}});I.label.push(j),f._points.push(j)}}},Ki.LEFT_CLICK),B.setInputAction(function(){f.entities.remove(L),f._points[f._points.length-1].label.text=y,B.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(I),F.style.display="none"},Ki.RIGHT_CLICK),this};yy.prototype.spaceDistance=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=new Ur(f.scene.canvas),C=[],y=null,x="0\u7C73",v=null,E,I="",w,Q=document.createElement("div");nA(".map-widget",Q),nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let B=document.getElementById("toolTip");B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let T={name:"",spot:[],distance:[],label:[],ployline:[]},D={point:At.RED,polyline:At.fromRgba(4286644096)};O(A)&&(O(A.point)&&(D.point=A.point),O(A.polyline)&&(D.polyline=A.polyline));let F=function(){function L(R){this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:D.polyline,width:3,clampToGround:!1}},this.positions=R,this._init()}return L.prototype._init=function(){let R=this,k=function(){return R.positions};this.options.polyline.positions=new Bn(k,!1);let U=f.entities.add(this.options);f.item=U,T.ployline.push(U);let V=f.getuid();T.name=`\u65B0\u5EFA\u7A7A\u95F4\u8DDD\u79BB${V}`},L}();return m.setInputAction(function(L){if(f.scene.bim){let R=f.scene.bim.PickWorldPositionSync(L.endPosition.x,L.endPosition.y);R[0]===0?v=f.scene.pickPosition(L.endPosition):v=new ee(R[0],R[1],R[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.endPosition);!v||(B.style.left=`${L.endPosition.x+10}px`,B.style.top=`${L.endPosition.y+20}px`,B.style.display="block",C.length>=2&&(O(y)?(C.pop(),C.push(v)):y=new F(C),B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>',x=f.getSpaceDistance(C)),f.entities.remove(w),w=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],label:{text:`\u603B\u957F\uFF1A${x}`,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}}))},Ki.MOUSE_MOVE),m.setInputAction(function(L){if(f.scene.bim){let k=f.scene.bim.PickWorldPositionSync(L.position.x,L.position.y);k[0]===0?v=f.scene.pickPosition(L.position):v=new ee(k[0],k[1],k[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.position);if(!v)return;C.length===0&&C.push(v.clone()),C.push(v);let R=x;I=`\u603B\u957F\uFF1A${x}`,E=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],point:{pixelSize:5,color:D.point,outlineColor:At.WHITE,outlineWidth:2,clampToGround:!1,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:R,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-20),heightReference:xn.NONE,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(E),T.spot.push(v),T.distance.push(x),T.label.push(E)},Ki.LEFT_CLICK),m.setInputAction(function(L){B.style.display="none",f.entities.remove(w),f._points.length>0&&(f._points[f._points.length-1].label.text=I),m.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(T)},Ki.RIGHT_CLICK),this};yy.prototype.getSpaceDistance=function(o){let A=0,f="";for(let m=0;m<o.length-1;m++){let C=Kt.fromCartesian(o[m]),y=Kt.fromCartesian(o[m+1]),x=new l0;x.setEndPoints(C,y);let v=x.surfaceDistance;v=Math.sqrt(Math.pow(v,2)+Math.pow(y.height-C.height,2)),A=A+v}return A>=1e3?f=`${(A/1e3).toFixed(2)}\u5343\u7C73`:f=`${A.toFixed(2)}\u7C73`,f};yy.prototype.getPlaneArea=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=0,C=new Ur(f.scene._imageryLayerCollection),y=document.getElementById("toolTip");y||(nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>'),y=document.getElementById("toolTip")),y.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB\uFF0C\u53F3\u952E\u7ED3\u675F\uFF01</span>';let x=[],v={},E=[],I=[],w=null,Q=null,M,B={point:At.RED,polyline:At.fromRgba(4286644096),polygon:At.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(B.point=A.point),O(A.polyline)&&(B.polyline=A.polyline),O(A.polygon)&&(B.polygon=A.polygon));let T={mj:0,label:[],polygon:[]};y.style.display="block";let D=function(){function F(L){this.options={name:"\u591A\u8FB9\u5F62",polygon:{hierarchy:[],perPositionHeight:!0,material:B.polygon,clampToGround:!1}},this.hierarchy=L,this._init()}return F.prototype._init=function(){let L=this,R=function(){return L.hierarchy};this.options.polygon.hierarchy=new Bn(R,!1),this.polygon=f.entities.add(this.options),f.item=this.polygon,f._entity=this.polygon,T.polygon=this.polygon},F}();return C.setInputAction(function(F){if(y.style.left=`${F.endPosition.x+10}px`,y.style.top=`${F.endPosition.y+20}px`,f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.endPosition.x,F.endPosition.y);V[0]===0?Q=f.scene.pickPosition(F.endPosition):Q=new ee(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.endPosition);if(!Q)return;let L=Kt.fromCartesian(Q),R=je.toDegrees(L.longitude),k=je.toDegrees(L.latitude),U=L.height;if(x.length>=2){O(w)?(x.pop(),x.push(Q),v=new Un(x),I.pop(),I.push({lon:R,lat:k,hei:U})):(v=new Un(x),w=new D(v));let V=f.getArea(I,x);f.entities.remove(M),M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:V,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),T.label=M}},Ki.MOUSE_MOVE),C.setInputAction(function(F){if(f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.position.x,F.position.y);V[0]===0?Q=f.scene.pickPosition(F.position):Q=new ee(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.position);if(!Q)return;let L=Kt.fromCartesian(Q);console.log("\u5DE6\u952E\u70B9",L);let R=je.toDegrees(L.longitude),k=je.toDegrees(L.latitude),U=L.height;x.length===0&&(x.push(Q.clone()),v=new Un(x),I.push({lon:R,lat:k,hei:U}),x.push(Q.clone()),v=new Un(x),I.push({lon:R,lat:k,hei:U})),x.push(Q),v=new Un(x),E.push({lon:R,lat:k,hei:U}),I.push({lon:R,lat:k,hei:U})},Ki.LEFT_CLICK),C.setInputAction(function(F){y.style.display="none",f.entities.remove(M),C.destroy();let L=f.getArea(I,x);m=L;let R=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:L,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}});f._points.push(R),f._lable=R,T.mj=m,T.label=R,O(o)&&typeof o=="function"&&o(T)},Ki.RIGHT_CLICK),this};yy.prototype.getSurfaceArea3d=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m={mj:0,label:[],polygon:[]},C=!0,y=[],x={},v,E=f.scene,I=E.globe.ellipsoid,w=new iI;E.primitives.add(w);let Q,M,B=0,T={point:At.RED,polyline:At.fromRgba(4286644096),polygon:At.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(T.point=A.point),O(A.polyline)&&(T.polyline=A.polyline),O(A.polygon)&&(T.polygon=A.polygon));let D=document.createElement("div");nA(".map-widget",D),nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let L=document.getElementById("toolTip");L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let R=new Ur(E.canvas),k=function(){function V(H){if(!O(H))throw new Ui("positions is required!");if(H.length<3)throw new Ui("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E3");this.options={polygon:{show:!0,hierarchy:void 0,material:T.polygon,clampToGround:!1}},this.path=H,this._init()}return V.prototype._init=function(){let H=this,q=function(){return H.path};this.options.polygon.hierarchy=new Bn(q,!1),this.polygonEntity=f.entities.add(this.options),f.item=this.polygonEntity,m.polygon=this.polygonEntity,f._entity=this.polygonEntity},V}();R.setInputAction(function(V){let H=0;f.entities.remove(M);let q,ie,Z=f.scene.camera.getPickRay(V.endPosition);Z&&(q=f.scene.globe.pick(Z,f.scene));let oe=f.scene.pick(V.endPosition),ne=!1;if(oe){let ce=f.scene.pickPosition(V.endPosition);ce&&(q=ce),ne=!0}if(!q)return;let se=function(ce){let j=new Array(ce.length),de=function(Be){return Be.longitude=Be.longitude/Math.PI*180,Be.latitude=Be.latitude/Math.PI*180,Be},me=function(Be){let Qe=0;for(let Ie=0;Ie<Be.length;Ie++){let ve=Be[Ie],K;Ie<Be.length-1?K=Be[Ie+1]:K=Be[0],Qe+=ve.x*K.y-K.x*ve.y}return Qe/2};for(let Be=0;Be<ce.length;Be++)j[Be]=de(I.cartesianToCartographic(ce[Be]));let _e=0;for(let Be=0;Be<j.length;Be++)_e+=j[Be].longitude;_e=_e/j.length;for(let Be=0;Be<j.length;Be++)j[Be]=f.Gauss_to_XY(j[Be].longitude,j[Be].latitude,_e);return Math.abs(me(j))};if(ie=Di.WGS84.cartesianToCartographic(q),ie&&C){if(L.style.left=`${V.endPosition.x+10}px`,L.style.top=`${V.endPosition.y+20}px`,L.style.display="block",y.length<2){B===1&&(M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:q,label:{text:`${H}\u5E73\u65B9\u5343\u7C73`,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M);return}if(O(v)?(v.path.positions.pop(),v.path.positions.push(q)):(y.push(q),x=new Un(y),v=new k(x)),y.length>=2){L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ce=String(se(v.path.positions));ce=ce.substr(0,ce.indexOf(".",0)),ce.length<6?H=`${ce}\u5E73\u65B9\u7C73`:(ce=String(ce/1e6),ce=ce.substr(0,ce.indexOf(".",0)+3),H=`${ce}\u5E73\u65B9\u5343\u7C73`),m.mj=H,M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:q,label:{text:H,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M}}},Ki.MOUSE_MOVE),R.setInputAction(function(V){let H;B=1;let q=f.scene.camera.getPickRay(V.position);q&&(H=f.scene.globe.pick(q,f.scene));let ie=f.scene.pick(V.position),Z=!1;if(ie){let oe=f.scene.pickPosition(V.position);oe&&(H=oe),Z=!0}H&&C&&(y.push(H),x=new Un(y))},Ki.LEFT_CLICK),R.setInputAction(function(){R.removeInputAction(Ki.LEFT_CLICK),R.removeInputAction(Ki.LEFT_DOUBLE_CLICK),f.trackedEntity=void 0,C=!1,Q=w.add({show:!0,id:"measureTool",position:y[y.length-1],pixelOffset:new It(0,20),eyeOffset:new ee(0,0,0),horizontalOrigin:tA.CENTER,verticalOrigin:bn.CENTER,scale:1,color:new At(1,1,1,1)}),L.style.display="none",R.destroy(),O(o)&&typeof o=="function"&&o(m)},Ki.RIGHT_CLICK);let U=function(V){let H=0,q=0,ie=0;for(let oe=0;oe<V.length;oe++)H+=V[oe].x,q+=V[oe].y,ie+=V[oe].z;return new ee(H/V.length,q/V.length,ie/V.length)};return this};yy.prototype.to_N=function(o){let m=Math.sqrt(0)/1737400;return 1737400/Math.sqrt(1-m*m*Math.sin(o)*Math.sin(o))};yy.prototype.to_Sm=function(o){let m=Math.sqrt(0)/1737400,C,y,x,v,E;return C=1+m*m*3/4+Math.pow(m,4)*45/64+Math.pow(m,6)*175/256+Math.pow(m,8)*11025/16384,y=Math.pow(m,2)*3/4+Math.pow(m,4)*15/16+Math.pow(m,6)*525/512+Math.pow(m,8)*2205/2048,x=Math.pow(m,4)*15/64+Math.pow(m,6)*105/256+Math.pow(m,8)*2205/4096,v=Math.pow(m,6)*35/512+Math.pow(m,8)*315/2048,E=Math.pow(m,8)*315/16384,1737400*(1-m*m)*(C*o-y/2*Math.sin(2*o)+x/4*Math.sin(4*o)-v/6*Math.sin(6*o)+E/8*Math.sin(8*o))};yy.prototype.to_Radian=function(o){return o*Math.PI/180};yy.prototype.Gauss_to_XY=function(o,A,f){let y=Math.sqrt(0)/1737400,x=0,v=0,E=0,I=0,w=this.to_Radian(f);A=this.to_Radian(A),o=this.to_Radian(o);let Q=o-w,M=Math.cos(A);I=this.to_N(A),E=I*Math.cos(A),x=Math.tan(A),v=y*M;let B=Math.pow(x,2),T=Math.pow(x,4),D=Math.pow(v,2),F=Math.pow(v,4),L=Math.pow(M,3),R=Math.pow(M,5),k=this.to_Sm(A)+Math.pow(Q,2)/2*E*M*x+Math.pow(Q,4)/24*x*E*L*(5-B+9*D+4*F)+Math.pow(Q,6)/720*x*E*R*(61-58*x*x+T+270*D-330*x*x*D),U=Q*I*M+Math.pow(Q,3)/6*I*L*(1-x*x+v*v)+Math.pow(Q,5)/120*I*R*(5-18*x*x+T+14*D-58*D*B);return new It(U,k)};yy.prototype.getArea=function(o,A){let f=0;for(let m=0;m<o.length-2;m++){let C=(m+1)%o.length,y=(m+2)%o.length,x=this.Angle(o[m],o[C],o[y]),v=this.getdistance(A[m],A[C]),E=this.getdistance(A[C],A[y]);f+=v*E*Math.abs(Math.sin(x))}return f<1e6?f=`${f.toFixed(4)}\u5E73\u65B9\u7C73`:f=`${(f/1e6).toFixed(4)}\u5E73\u65B9\u5343\u7C73`,f};yy.prototype.getdistance=function(o,A){let f=Kt.fromCartesian(o),m=Kt.fromCartesian(A),C=new l0;C.setEndPoints(f,m);let y=C.surfaceDistance;return y=Math.sqrt(Math.pow(y,2)+Math.pow(m.height-f.height,2)),y};yy.prototype.Bearing=function(o,A){let f=Math.PI/180,m=180/Math.PI,C=o.lat*f,y=o.lon*f,x=A.lat*f,v=A.lon*f,E=-Math.atan2(Math.sin(y-v)*Math.cos(x),Math.cos(C)*Math.sin(x)-Math.sin(C)*Math.cos(x)*Math.cos(y-v));return E<0&&(E+=Math.PI*2),E=E*m,E};yy.prototype.Angle=function(o,A,f){let m=this.Bearing(A,o),C=this.Bearing(A,f),y=m-C;return y<0&&(y+=360),y};yy.prototype.getuid=function(){return this.uuid(8,16)};yy.prototype.uuid=function(o,A){let f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),m=[],C;if(A=A||f.length,o)for(C=0;C<o;C++)m[C]=f[0|je.nextRandomNumber()*A];else{let y;for(m[8]=m[13]=m[18]=m[23]="-",m[14]="4",C=0;C<36;C++)m[C]||(y=0|je.nextRandomNumber()*16,m[C]=f[C===19?y&3|8:y])}return m.join("")};yy.prototype.deleteObject=function(){if(this.entities.remove(this.item),this._points.length>0){for(let o=0;o<this._points.length;o++)this.entities.remove(this._points[o]);this._points=[]}try{this.scene.primitives.remove(this.item)}catch(o){console.log(o)}this.item=void 0};var NW=yy;function fw(o,A){this._earthCtrl=o,this._coreMap=this._earthCtrl.coreMap,this._show=Ae(A.show,!0),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,10),this._heading=Ae(A.heading,0),this._pitch=Ae(A.pitch,0),this._distance=Ae(A.distance,300),this._position=ee.fromDegrees(A.lon,A.lat,A.height),this._horizontalViewAngle=Ae(A.horizontalViewAngle,90),this._verticalViewAngle=Ae(A.verticalViewAngle,60),this._horizontalViewAngle=this.adjustViewRange(this._horizontalViewAngle),this._verticalViewAngle=this.adjustViewRange(this._verticalViewAngle),this._visibleAreaColor=Ae(A.visibleAreaColor,At.GREEN.withAlpha(.4)),this._invisibleAreaColor=Ae(A.invisibleAreaColor,At.RED.withAlpha(.4)),this._size=Ae(A.size,10240),this._softShadows=Ae(A.softShadows,!0),this._colorStyle=Ae(A.colorStyle,At.YELLOW),this._parameter=A,this._lineArray=[],this._visualCone=!0,this.pyramid=void 0,this.updateViewShed()}Object.defineProperties(fw.prototype,{show:{get:function(){return this._show},set:function(o){o!==this._show&&(this._show=o,this.updateViewShed())}},distance:{get:function(){return this._distance}},heading:{get:function(){return this._heading}},pitch:{get:function(){return this._pitch}},horizontalViewAngle:{get:function(){return this._horizontalViewAngle}},verticalViewAngle:{get:function(){return this._verticalViewAngle}},colorStyle:{get:function(){return this._colorStyle},set:function(o){this._colorStyle=o}},invisibleAreaColor:{get:function(){return this._invisibleAreaColor},set:function(o){this._invisibleAreaColor=o}},visibleAreaColor:{get:function(){return this._visibleAreaColor},set:function(o){this._visibleAreaColor=o}},visualCone:{get:function(){return this._visualCone},set:function(o){this._visualCone=o,this.visualConeShow(o)}}});fw.prototype.adjustViewRange=function(o){return o<=0?o=1:o>=180&&(o=179),o};fw.prototype.removeFromMap=function(){let o=this;O(o.viewShedMap)&&(o.viewShedMap.enabled=!1),O(o.pyramid)&&(o._earthCtrl.entities.removeById(o.pyramid.id),o.pyramid=null);for(let A=0;A<o._lineArray.length;A++){let f=o._lineArray[A];o._earthCtrl.entities.remove(f)}o._lineArray=[]};fw.prototype.visualConeShow=function(o){let A=this;O(A.pyramid)&&(A.pyramid.show=o);for(let f=0;f<A._lineArray.length;f++){let m=A._lineArray[f];m.show=o}};fw.prototype.addVisualPyramid=function(){let o=this,A=new u6({radii:new Bn(function(){return new ee(o._distance,o._distance,o._distance)},!1),minimumClock:new Bn(function(){return je.toRadians(90-o._heading-o._horizontalViewAngle/2)},!1),maximumClock:new Bn(function(){return je.toRadians(90-o._heading+o._horizontalViewAngle/2)},!1),minimumCone:new Bn(function(){return je.toRadians(90-o._verticalViewAngle/2)},!1),maximumCone:new Bn(function(){return je.toRadians(90+o._verticalViewAngle/2)},!1),fill:!1,outline:!0,subdivisions:128,slicePartitions:32,stackPartitions:16,outlineColor:new Bn(function(){return o._colorStyle},!1)}),f=new UA({position:new Bn(function(){return o._position},!1),ellipsoid:A});this.pyramid=o._earthCtrl.entities.add(f)};fw.prototype.createLightCamera=function(){O(this.viewShedMap)?this._lightCamera=this.viewShedMap._lightCamera:this._lightCamera=new Ml(this._coreMap.scene),this._lightCamera.position=this._position};fw.prototype.updateParameters=function(o){let A=this,f=A._lightCamera;if(!!O(o)&&(O(o.lon)||O(o.lat)||O(o.height)||O(o.heading)||O(o.pitch)||O(o.roll)||O(o.far)||O(o.distance)||O(o.verticalViewAngle)||O(o.horizontalViewAngle))){let m=this._parameter;for(let v in o)o.hasOwnProperty(v)&&O(m[v])&&(m[v]=o[v]);m.distance>=A.viewShedMap.maximumDistance&&(m.distance=A.viewShedMap.maximumDistance),A._heading=m.heading,A._pitch=m.pitch,A._distance=m.distance,A.viewShedMap._pointLightRadius=m.distance,m.verticalViewAngle=A.adjustViewRange(m.verticalViewAngle),A._verticalViewAngle=m.verticalViewAngle,m.horizontalViewAngle=A.adjustViewRange(m.horizontalViewAngle),A._horizontalViewAngle=m.horizontalViewAngle,A._position=ee.fromDegrees(m.lon,m.lat,m.height);let C=je.toRadians(m.heading);f.setView({destination:A._position,orientation:{heading:C,pitch:0,roll:0}}),f.frustum.far=m.far||1e5;let y=je.toRadians(A._horizontalViewAngle),x=je.toRadians(A._verticalViewAngle);f.frustum.aspectRatio=Math.tan(y/2)/Math.tan(x/2),y>x?f.frustum.fov=y:f.frustum.fov=x}};fw.prototype.createShadowMap=function(){if(O(this.viewShedMap)){this.viewShedMap.enabled=!0;return}this.viewShedMap=new oH({context:this._coreMap.scene.context,lightCamera:this._lightCamera,enabled:!0,isPointLight:!0,pointLightRadius:this._distance,cascadesEnabled:!1,size:this._size,softShadows:!0,normalOffset:!1,fromLightSource:!1,visibleAreaColor:this._visibleAreaColor,invisibleAreaColor:this._invisibleAreaColor}),this._earthCtrl.viewShedMapList.push(this.viewShedMap)};var Ux=new ee;fw.prototype.drawViewCentrum=function(){let o=this;function A(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=new dQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let f=this._earthCtrl.entities.add({polyline:{positions:new Bn(A,!1),material:this._colorStyle}});this._lineArray.push(f);function m(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=new dQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let C=this._earthCtrl.entities.add({polyline:{positions:new Bn(m,!1),material:this._colorStyle}});this._lineArray.push(C);function y(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=new dQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let x=this._earthCtrl.entities.add({polyline:{positions:new Bn(y,!1),material:this._colorStyle}});this._lineArray.push(x);function v(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=dQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let E=this._earthCtrl.entities.add({polyline:{positions:new Bn(v,!1),material:this._colorStyle}});this._lineArray.push(E)};fw.prototype.updateViewShed=function(){this.show?(this.createLightCamera(),this.setCameraParams(),this.createShadowMap(),this.addVisualPyramid(),this.drawViewCentrum()):this.removeFromMap()};fw.prototype.setCameraParams=function(){this._lightCamera.frustum.near=.1,this._lightCamera.frustum.far=this._distance;let o=je.toRadians(this._horizontalViewAngle),A=je.toRadians(this._verticalViewAngle);this._lightCamera.frustum.aspectRatio=Math.tan(o/2)/Math.tan(A/2),o>A?this._lightCamera.frustum.fov=o:this._lightCamera.frustum.fov=A,this._lightCamera.setView({destination:this._position,orientation:{heading:je.toRadians(this._heading),pitch:je.toRadians(this._pitch),roll:0}})};var Ele=fw;var rMe=Di.WGS84;function Kf(o){this._cesiumViewer=o,this.coreMap=o.coreMap,this._scene=this.coreMap.scene,this.loading||this.addLoading(),this._tooltip=CLi(this.coreMap.container)}function nMe(o,A){if(o===null||typeof o!="object"||o.constructor!==Object&&o.constructor!==Array)return o;if(o.constructor===Date||o.constructor===RegExp||o.constructor===Function||o.constructor===String||o.constructor===Number||o.constructor===Boolean)return new o.constructor(o);A=A||new o.constructor;for(let f in o)A[f]=typeof A[f]>"u"?nMe(o[f],null):A[f];return A}function AAt(o,A){let f=nMe(o),m;for(m in A)f[m]===void 0&&(f[m]=nMe(A[m]));return f}function CLi(o){let A=function(f){let m=document.createElement("DIV");m.className="twipsy right";let C=document.createElement("DIV");C.className="twipsy-arrow",m.appendChild(C);let y=document.createElement("DIV");y.className="twipsy-inner",m.appendChild(y),this._div=m,this._title=y,f.appendChild(m)};return A.prototype.setVisible=function(f){this._div.style.display=f?"block":"none"},A.prototype.showAt=function(f,m){f&&m&&(this.setVisible(!0),this._title.innerHTML=m,this._div.style.left=`${f.x+30}px`,this._div.style.top=`${f.y-this._div.clientHeight/2-15}px`)},new A(o)}Kf.prototype.addToolbar=function(o,A){return A=AAt(A,{container:o}),new Kf.Toolbar(this,A)};var hAt={shiftX:0,shiftY:0};Kf.prototype.createBillboardGroup=function(o,A,f){let m=new Kf.BillboardGroup(this,A);return m.addBillboards(o,f),m};Kf.BillboardGroup=function(o,A){this._drawHelper=o,this._scene=o._scene,this._options=AAt(A,hAt);let f=new iI;this._scene.primitives.add(f),this._billboards=f,this._orderedBillboards=[]};Kf.BillboardGroup.prototype.createBillboard=function(o,A){let f=this._billboards.add({show:!0,position:o,pixelOffset:new It(this._options.shiftX,this._options.shiftY),eyeOffset:new ee(0,0,-1e3),horizontalOrigin:tA.CENTER,verticalOrigin:bn.CENTER,scale:.3,image:Ae(this._options.iconUrl,`${globalThis.GEOWORLD_BASE_URL}Assets/Images/point.png`),color:new At(1,1,1,1)});if(A){let y=function(v){C.enableRotate=v},x=function(){let v=0;for(let E=m._orderedBillboards.length;v<E&&m._orderedBillboards[v]!==f;++v);return v},m=this,C=this._scene.screenSpaceCameraController;if(A.dragHandlers){let v=this,E=new Ur(v._scene.canvas);setListener(f,"leftDown",function(I){function w(M){f.position=M;for(let B=0,T=v._orderedBillboards.length;B<T&&v._orderedBillboards[B]!==f;++B);A.dragHandlers.onDrag&&A.dragHandlers.onDrag(x(),M)}function Q(M){E.destroy(),y(!0),A.dragHandlers.onDragEnd&&A.dragHandlers.onDragEnd(x(),M)}E.setInputAction(function(M){let B=v._scene.camera.pickEllipsoid(M.endPosition,rMe);B?w(B):Q(B)},Ki.MOUSE_MOVE),E.setInputAction(function(M){Q(v._scene.camera.pickEllipsoid(M.position,rMe))},Ki.LEFT_UP),y(!1),A.dragHandlers.onDragStart&&A.dragHandlers.onDragStart(x(),v._scene.camera.pickEllipsoid(I,rMe))})}A.onDoubleClick&&setListener(f,"leftDoubleClick",function(v){A.onDoubleClick(x())}),A.onClick&&setListener(f,"leftClick",function(v){A.onClick(x())}),A.tooltip&&(setListener(f,"mouseMove",function(v){m._drawHelper._tooltip.showAt(v,A.tooltip())}),setListener(f,"mouseOut",function(v){m._drawHelper._tooltip.setVisible(!1)}))}return f};Kf.BillboardGroup.prototype.insertBillboard=function(o,A,f){this._orderedBillboards.splice(o,0,this.createBillboard(A,f))};Kf.BillboardGroup.prototype.addBillboard=function(o,A){this._orderedBillboards.push(this.createBillboard(o,A))};Kf.BillboardGroup.prototype.addBillboards=function(o,A){let f=0;for(;f<o.length;f++)this.addBillboard(o[f],A)};Kf.BillboardGroup.prototype.updateBillboardsPositions=function(o){let A=0;for(;A<o.length;A++)this.getBillboard(A).position=o[A]};Kf.BillboardGroup.prototype.countBillboards=function(){return this._orderedBillboards.length};Kf.BillboardGroup.prototype.getBillboard=function(o){return this._orderedBillboards[o]};Kf.BillboardGroup.prototype.removeBillboard=function(o){this._billboards.remove(this.getBillboard(o)),this._orderedBillboards.splice(o,1)};Kf.BillboardGroup.prototype.remove=function(){this._billboards=this._billboards&&this._billboards.removeAll()&&this._billboards.destroy()};Kf.BillboardGroup.prototype.setOnTop=function(){this._scene.primitives.raiseToTop(this._billboards)};Kf.prototype.cleanUp=function(){this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1)};Kf.prototype.startDrawing=function(o){let A=this,f=this._scene;f.globe.depthTestAgainstTerrain=!0;let m=this._tooltip,C=3,y=[],x=[],v;this._positions=x;let E=new Ur(f.canvas);this._mouseHandler=E;let I=new Kf.BillboardGroup(this,hAt);this._markers=I,this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),E.setInputAction(function(Q){if(Q.position!==null){let M=f.camera.getPickRay(Q.position),B=f.globe.pick(M,f),T=Kt.fromCartesian(B),D=je.toDegrees(T.longitude),F=je.toDegrees(T.latitude);if(B){if(y.length===0&&(y.push(D,F),x.push(B),v=B,I.addBillboard(v)),x.length>=4){let L=Ss.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(L!==void 0){let R=L.x-Q.position.x,k=L.y-Q.position.y;if(R*R+k*k<16){y.splice(y.length-2,2),x.pop(),this.isLoading(!0),this.stopDrawing(o);return}}}y.push(D,F),x.push(B),I.addBillboard(B),x.length===C&&(A._prevEntity=A._cesiumViewer.factory.createElement({type:"polygon",parameters:{hierarchy:ee.fromDegreesArray(y),material:At.RED.withAlpha(.6),fill:!0}}),A._prevEntity.polygon.hierarchy=w())}}}.bind(this),Ki.LEFT_CLICK),E.setInputAction(function(Q){let M=Q.endPosition;if(M!==null)if(x.length===0)m.showAt(M,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let B=f.camera.getPickRay(M),T=f.globe.pick(B,f),D=Kt.fromCartesian(T),F=je.toDegrees(D.longitude),L=je.toDegrees(D.latitude);if(T&&(y.splice(y.length-2,2),x.pop(),y.push(F,L),x.push(T),I.getBillboard(x.length-1).position=T,m.showAt(M,"\u53CC\u51FB\u7ED3\u675F\u7ED8\u5236"),x.length>=3&&x.length>=4)){let R=Ss.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(R!==void 0){let k=R.x-M.x,U=R.y-M.y;k*k+U*U<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}.bind(this),Ki.MOUSE_MOVE),E.setInputAction(function(Q){x.length<C+2||(this.isLoading(!0),setTimeout(()=>{this.stopDrawing(o)},100))}.bind(this),Ki.LEFT_DOUBLE_CLICK);function w(){return ee.fromDegreesArray(y)}};Kf.prototype.stopDrawing=function(o){this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1),document.body.style.cursor="wait";let A=this.computeCutVolume(),f=A.maxHeight;document.body.style.cursor="default",typeof o=="function"&&o(A.volume);let m={polygon:{hierarchy:{positions:this._positions},extrudedHeight:f,closeTop:!1,closeBottom:!1,material:At.RED.withAlpha(.5),outline:!0,outlineColor:At.WHITE,outlineWidth:2}};this._prevEntity=this._cesiumViewer.entities.add(m),this.isLoading(!1)};Kf.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,o.appendChild(A),this.loading=o,this.coreMap.container.appendChild(o)};Kf.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};Kf.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};function yLi(o){let A=[],f=[];for(let Q=0;Q<o.length;Q++){let M=Kt.fromCartesian(o[Q]);A.push(M.longitude),f.push(M.latitude)}let m=0,C=0,y=0,x=0,v=0,E=0,I=0,w=0;for(let Q=0;Q<o.length;Q++)m=A[Q],C=f[Q],Q===o.length-1?(y=A[0],x=f[0]):(y=A[Q+1],x=f[Q+1]),E=m*x-y*C,v+=E,I+=(m+y)*E,w+=(C+x)*E;return v*=.5,I/=6*v,w/=6*v,new Kt(I,w)}function xLi(o,A,f){let m=ee.distance(o,A),C=ee.distance(A,f),y=ee.distance(f,o),x=(m+C+y)/2;return Math.sqrt(x*(x-m)*(x-C)*(x-y))}Kf.prototype.computeCutVolume=function(){let o=15e3;for(let k=0;k<this._positions.length;k++){let U=Kt.fromCartesian(this._positions[k]),V=this._scene.globe.getHeight(U);o>V&&(o=V)}let A=Math.PI/Math.pow(2,11);A=A/64;let f=new rh.fromPositions({positions:this._positions,vertexFormat:za.FLAT_VERTEX_FORMAT,granularity:A}),m=new rh.createGeometry(f),C=0,y=0,x,v,E,I,w,Q,M,B,T,D,F,L;for(let k=0;k<m.indices.length;k+=3)x=m.indices[k],v=m.indices[k+1],E=m.indices[k+2],D=new ee(m.attributes.position.values[x*3],m.attributes.position.values[x*3+1],m.attributes.position.values[x*3+2]),F=Kt.fromCartesian(D),I=this._scene.globe.getHeight(F),M=ee.fromRadians(F.longitude,F.latitude,0),y<I&&(y=I),D=new ee(m.attributes.position.values[v*3],m.attributes.position.values[v*3+1],m.attributes.position.values[v*3+2]),F=Kt.fromCartesian(D),w=this._scene.globe.getHeight(F),B=ee.fromRadians(F.longitude,F.latitude,0),y<w&&(y=w),D=new ee(m.attributes.position.values[E*3],m.attributes.position.values[E*3+1],m.attributes.position.values[E*3+2]),F=Kt.fromCartesian(D),Q=this._scene.globe.getHeight(F),T=ee.fromRadians(F.longitude,F.latitude,0),y<Q&&(y=Q),L=xLi(M,B,T),C=C+L*(I-o+w-o+Q-o)/3;let R=yLi(this._positions);return this._volumeLabel=this._cesiumViewer.entities.add({position:ee.fromRadians(R.longitude,R.latitude,y+1e3),label:{text:`${C.toFixed(4)}\u7ACB\u65B9\u7C73`}}),{maxHeight:y,volume:C}};var Ile=Kf;function dAt(o,A){if(this.mEarthCtrl=o,this._parameter=A,this.coreMap=o.coreMap,this._color=Ae(A.color,new At(1,0,0,.7)),this._positions=A.positions,this._positions.length<3)throw new Ui("invalid positions length!");this._duration=Ae(A.duration,4e3),this._minHeight=Ae(A.minHeight,0),this._maxHeight=Ae(A.maxHeight,100),this._image=A.image,this._pps=null}function vLi(o,A){let f=Kt.fromCartesian(o[0]),m=f.longitude,C=f.latitude,y=m,x=C,v=A;for(let E=1;E<o.length;E++){let I=Kt.fromCartesian(o[E]);m>I.longitude?m=I.longitude:y<I.longitude&&(y=I.longitude),C>I.latitude?C=I.latitude:x<I.latitude&&(x=I.latitude)}return new ee.fromRadians((m+y)/2,(C+x)/2,v)}function ELi(o){if(O(o._pps))return;let A=vLi(o._positions,o._minHeight),f=Kt.fromCartesian(A),m=new ai(A.x,A.y,A.z,1),C=new Kt(f.longitude,f.latitude,o.maxHeight+100),y=Kt.toCartesian(C),x=new ai(y.x,y.y,y.z,1),v=new ai,E=new ai,I=new ee,w=o.mEarthCtrl.coreMap.scene.camera,Q=o._positions.length;o._pps=new va({fragmentShader:_Li(Q),uniforms:{u_floodCenterEC:function(){return Xe.multiplyByVector(w._viewMatrix,m,v)},u_floodPlaneNormalEC:function(){let B=Xe.multiplyByVector(w._viewMatrix,m,v),T=Xe.multiplyByVector(w._viewMatrix,x,E);return I.x=T.x-B.x,I.y=T.y-B.y,I.z=T.z-B.z,ee.normalize(I,I),I},u_floodRange:function(){return o._positions},u_minHeight:function(){return o._minHeight},u_maxHeight:function(){return o._maxHeight},u_image:function(){return o.image},u_floodColor:function(){return o._color},u_positionsLength:function(){return o._positions.length}}}),o.mEarthCtrl.coreMap.scene.postProcessStages.add(o._pps)}function ILi(o){O(o._pps)&&(o.mEarthCtrl.coreMap.scene.postProcessStages.remove(o._pps),o._pps=null)}function _Li(o){return`uniform sampler2D colorTexture;
            `})};VO.prototype.destroy=function(){this._tileset.customShader===this._customShader&&(this._customShader=void 0,this._tileset.customShader=void 0),this._scene.preUpdate.removeEventListener(this._preUpdate)};function kRi(){this.customShaders={},this.customShaders.lightLine=VO}var Yct=kRi;function zH(o,A){this.options=Ae(A,{}),this.earthCtrl=o,this.viewer=o.coreMap,this.CSME=sre,this.Cust=new this.CSME.CustomShaderStage(this.options.primitive,A),this.stageArr=[],this.eventListener=null,this.eventListener=this.viewer.scene.preUpdate.addEventListener(()=>{this.Cust.update()}),this.create()}zH.prototype.create=function(o){let A=this,f=null;o?f=o:f=A.options,f.lineMaterialStage&&(A.LineMaterialStage=new A.CSME.LineMaterialStage(Ae(f.lineMaterialStage,{weight:.5})),A.Cust.addStage(A.LineMaterialStage),A.stageArr.push(A.LineMaterialStage)),f.gradientMaterialStage&&(A.GradientMaterialStage=new A.CSME.GradientMaterialStage(Ae(f.gradientMaterialStage,{weight:.5})),A.Cust.addStage(A.GradientMaterialStage),A.stageArr.push(A.GradientMaterialStage)),f.normalizeMaterialStage&&(A.NormalizeMaterialStage=new A.CSME.NormalizeMaterialStage(Ae(f.normalizeMaterialStage,{weight:.5})),A.Cust.addStage(A.NormalizeMaterialStage),A.stageArr.push(A.NormalizeMaterialStage)),f.dynamicColorMaterialStage&&(A.DynamicColorMaterialStage=new A.CSME.DynamicColorMaterialStage(Ae(f.dynamicColorMaterialStage,{weight:.5})),A.Cust.addStage(A.DynamicColorMaterialStage),A.stageArr.push(A.DynamicColorMaterialStage)),f.reflectMaterialStage&&(A.ReflectMaterialStage=new A.CSME.ReflectMaterialStage(Ae(f.reflectMaterialStage,{weight:.5})),A.Cust.addStage(A.ReflectMaterialStage),A.stageArr.push(A.ReflectMaterialStage)),f.textureMaterialStage&&(A.TextureMaterialStage=new A.CSME.TextureMaterialStage(Ae(f.textureMaterialStage,{weight:.5,url:`${globalThis.GEOWORLD_BASE_URL}Assets/Textures/window.png`})),A.Cust.addStage(A.TextureMaterialStage),A.stageArr.push(A.TextureMaterialStage))};zH.prototype.addStage=function(o){let A=this;A.Cust.addStage(o),A.stageArr.push(o)};zH.prototype.removeStage=function(o){this.Cust.removeStage(o.name)};zH.prototype.update=function(){let o=this;o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=o.viewer.scene.preUpdate.addEventListener(()=>{o.Cust.update()})};zH.prototype.removeFromMap=function(){let o=this;for(let A=0;A<o.stageArr.length;A++)o.removeStage(o.stageArr[A]);o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=null};var Jct=zH;function mle(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._options.visibleEdgeColor=Ae(A.visibleEdgeColor,At.fromCssColorString("#101010")),this._options.outlineWidth=Ae(A.outlineWidth,1),this._options.thresholdAngle=Ae(A.thresholdAngle,12*Math.PI/180),this.add()}mle.prototype.add=function(){this._edgeStage=fH();let o=this._edgeStage;o.visibleEdgeColor=this._options.visibleEdgeColor,o.outlineWidth=this._options.outlineWidth,o.thresholdAngle=this._options.thresholdAngle,o.selected=[{},{}],o.enabled=!0,this._earthCtrl.Viewer.postProcessStages.add(o)};mle.prototype.removeFromMap=function(){this._edgeStage&&(this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage),this.__edgeStage=null)};Object.defineProperties(mle.prototype,{show:{get:function(){return this._edgeStage.show},set:function(o){this._edgeStage.show=o}},outlineWidth:{get:function(){return this._edgeStage.outlineWidth},set:function(o){this._edgeStage.outlineWidth=o}},thresholdAngle:{get:function(){return this._edgeStage.thresholdAngle},set:function(o){!o||(this._edgeStage.thresholdAngle=o)}},visibleEdgeColor:{get:function(){return this._edgeStage.visibleEdgeColor},set:function(o){!o||(this._edgeStage.visibleEdgeColor=o)}},hiddenEdgeColor:{get:function(){return this._edgeStage.hiddenEdgeColor},set:function(o){!o||(this._edgeStage.hiddenEdgeColor=o)}},showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var Wct=mle;function Cle(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._visibleEdgeColor=Ae(A.visibleEdgeColor,At.fromCssColorString("#ff0000")),this._hiddenEdgeColor=Ae(A.hiddenEdgeColor,At.fromCssColorString("#4d4d4d")),this.handler=null,this.key=Ae(A.key,"id"),this.model=Ae(A.model,null),this.add()}Cle.prototype.add=function(){let o=this,A="";this._edgeStage=fH(!0);let f=this._edgeStage;f.visibleEdgeColor=this._visibleEdgeColor,f.hiddenEdgeColor=this._hiddenEdgeColor,f.selected=[],f.enabled=!1,this._earthCtrl.Viewer.postProcessStages.add(f);function m(C,y){function x(E,I){let w=E.featuresLength;for(let Q=0;Q<w;++Q){let M=E.getFeature(Q);if(M.getProperty(o.key)===A){let T={pickId:M.pickId};y.selected=[T],y.enabled=!0}}}function v(E,I){let w=E.content,Q=w.innerContents;if(O(Q)){let M=Q.length;for(let B=0;B<M;++B)x(Q[B],I)}else x(w,I)}C.tileVisible.addEventListener(function(E){A!==""&&v(E,null)})}m(this.model,f),this.handler=new Ur(this._earthCtrl.coreMap.scene.canvas),this.handler.setInputAction(function(C){let y=o._earthCtrl.coreMap.scene.pick(C.position);if(f.selected=[],A="",!y||!y.primitive)return;let v=y.primitive._pickIds,I={pickId:y.pickId};f.selected=[I],f.enabled=!0,A=y.getProperty(o.key)},Ki.LEFT_CLICK)};Cle.prototype.removeFromMap=function(){this.handler&&(this.handler.destroy(),this.handler=void 0),this._edgeStage&&this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage)};Object.defineProperties(Cle.prototype,{showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var jct=Cle;function zs(o){this._earthCtrl=o,this._coreMap=o.coreMap}function Ox(){return((1+je.nextRandomNumber())*65536|0).toString(16).substring(1)}zs.createUUID=function(){return`${Ox()+Ox()}-${Ox()}-${Ox()}-${Ox()}-${Ox()}${Ox()}${Ox()}`};zs.createUUIDWithoutDash=function(){return Ox()+Ox()+Ox()+Ox()+Ox()+Ox()+Ox()+Ox()};zs.prototype.createUUID=function(){return zs.createUUID()};zs.prototype.createGroup=function(o){let A=new UO;return A.id=o.id||zs.createUUID(),A.name=o.name||"\u672A\u547D\u540D\u7EC4",A};zs.prototype.createImageryLayer=function(o,A){let f=new rle(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.IMAGERYPROVIDERS),f),f};zs.prototype.createTerrainLayer=function(o,A){let f=new ole(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.TERRAINPROVIDERS),f),f};zs.prototype.removeTerrainLayer=function(o){this._coreMap.terrainProvider=new IP({})};zs.prototype.createFeatureLayer=function(o,A){let f=new ule(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.FEATURELAYERS),f),f};zs.prototype.createModelLayer=function(o,A){let f=new sle(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.MODELLAYERS),f),f};zs.prototype.createWfsModel=function(o,A){let f=new m6(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.MODELLAYERS),f),f};zs.prototype.createModel=function(o,A){let f=new Lse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.removeModel=function(o){O(o)&&o.removeFromMap()};zs.prototype.createCZMLObject=function(o,A){let f=this,m=Ae(o.addToMap,!0),C=new iW(o.name);return C.load(o.url),m&&f._earthCtrl.dataSources.add(C),C.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,C):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),C),C};zs.prototype.createElement=function(o){let A={};return A[o.type]=o.parameters,O(o.name)&&(A.name=o.name),O(o.position)&&(A.position=o.position),this._earthCtrl.entities.add(A)};zs.prototype.removeElement=function(o){O(o)?this._earthCtrl.entities.remove(o):this._earthCtrl.entities.removeAll()};zs.prototype.createVideoProjection=function(o,A){o.addToMap=Ae(o.addToMap,!0);let f=Ae(o.sourceType,"perspective"),m=null;return f==="perspective"?(m=new yse(this._earthCtrl,o),m.initialize(o),m.name=o.name,A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),m)):f==="panorama"?(m=new wct(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),m)):f==="fisheye"&&(m=new xse(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),m)),m};zs.prototype.createTrack=function(o,A){let f=new bct(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.initialize(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createSceneNode=function(o,A,f){let m=new UO(this._earthCtrl);return m.id=o,m.name=A,m.label=f,m};zs.prototype.createFire=function(o,A){let f=new Ise(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createSmoke=function(o,A){let f=new Bse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createExplosion=function(o,A){let f=new bse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createFireworks=function(o,A){let f=new Sse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createRadarScan=function(o,A){let f=new Tse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createCircleScan=function(o,A){let f=new Fct(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createUpDownScan=function(o){let A=new kct(this._earthCtrl,o);return A.show=!0,A};zs.prototype.createWaters=function(o,A){let f=new dle(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createHeatmap=function(o,A){let f=Tct.create(this._earthCtrl,o.bbox,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createLabel=function(o,A){let f=new Nse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createBillboard=function(o,A){let f=new Pse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPolyline=function(o,A){let f=new Ose(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPolygon=function(o,A){let f=new Gse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPoint=function(o,A){let f=new Vse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createBox=function(o,A){let f=new Kse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createEllipsoid=function(o,A){let f=new jse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createCylinder=function(o,A){let f=new Jse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createRectangle=function(o,A){let f=new Xse(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createEllipse=function(o,A){let f=new $se(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPolylineVolume=function(o,A){let f=new tle(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createEChartLayer=function(o,A){let f=new Ale(this._earthCtrl);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(rl.USERSCENE),f),f};zs.prototype.createPointLight=function(o){return new Uct(this._earthCtrl,o)};zs.prototype.createHawkeye=function(o){let A=new fle(this._earthCtrl,o);A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&A.addToMap(o)};zs.prototype.createSpotLight=function(o){let A=new ple(this._earthCtrl.coreMap,o.entities,o.lights);return A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.createCustomShaderManager=function(o){let A=new Yct;return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.createCustomShaderStage=function(o){let A=new Jct(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.createModelOutline=function(o={}){let A=new Wct(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};zs.prototype.modelClick=function(o={}){let A=new jct(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};var D2=zs;var yle=class extends c0{constructor(A,f){super(A),this._objectMap={},this._rootNode=null,this._isBenchUpdate=!1,this._selectSet=new Cse(A);let m=new UO(A);m.id=D2.createUUID(),m.name=Ae(f.ProjectName,"root"),m.version=Ae(f.version,null),m.desc=Ae(f.desc,null),m.createTime=Ae(f.createTime,new Date().toISOString()),m.lastUpdate=Ae(f.lastUpdate,null),m.show=!0,this._rootNode=m,this._editNode=m,this._objectMap[m.id]=m,this._EventDocumentChanged=new SN("EventDocumentChanged")}finalize(){this._rootNode=null,this._objectMap={}}getChildById(A){return this._objectMap.hasOwnProperty(A)?this._objectMap[A]:null}addChild(A,f){A.addChild(f),this._objectMap[f.id]=f,this._isBenchUpdate||this.commitChanged()}removeChildById(A){let f=this._objectMap[A];O(f)&&this.removeChild(f)}removeChild(A){O(A)&&O(A.parentNode)&&(A.removeFromMap(),A.parentNode.removeChild(A)),delete this._objectMap[A.id],this._isBenchUpdate||this.commitChanged()}removeAll(){}beginUpdate(){this._isBenchUpdate=!0}endUpdate(){this._isBenchUpdate&&(this.commitChanged(),this._isBenchUpdate=!1)}commitChanged(){this._EventDocumentChanged.notifyEvent(this)}flyTo(A,f){O(A)&&O(A._primitive)&&(A=A._primitive),this._earthCtrl.coreMap.flyTo(A,f)}findLocationByID(A,f){if(!A)return;let m=this.getChildById(A);O(m)&&O(m._primitive)&&(m=m._primitive),this._earthCtrl.coreMap.flyTo(m,f)}moveLayer(A,f){let m=this.getChildById(A),C=null;for(let y=0;y<m.parentNode.childNodes.length;y++)m.parentNode.childNodes[y].id===m.id&&(C=y);f==="up"?(this._earthCtrl.coreMap.scene.imageryLayers.raise(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C+1)):f==="down"&&(this._earthCtrl.coreMap.scene.imageryLayers.lower(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C-1))}changeLayer(A,f,m){if(f=je.clamp(f,0,A.length-1),m=je.clamp(m,0,A.length-1),f===m)return;let C=A[f];A[f]=A[m],A[m]=C}outputJson(A){let f=this;new Promise(function(C,y){let x={IMAGERYPROVIDERS:"imageryProviders",TERRAINPROVIDERS:"terrainProviders",MODELLAYERS:"modelLayers",FEATURELAYERS:"featureLayers",USERSCENE:"userScene"},v=0,E=[];for(let I in x){let w=x[I],Q=f.rootNode.getChildByName(w);if(!Q)continue;let M=[];if(Q.childNodes.length===0)M=[];else for(let B=0;B<Q.childNodes.length;B++){let T=Q.childNodes[B].toJSON();M.push(T)}Promise.all(M).then(function(B){let T=[];if(B.length!==0){for(let L=0;L<B.length;L++)T.push(B[L]);let D=T[0].class;D!=="IMAGERY_LAYER"&&D!=="TERRAIN_LAYER"&&D!=="MODEL_LAYER"&&D!=="FEATURE_LAYER"&&(D="USER_SCENE");let F={item:D,objJson:T};E.push(F)}v++,v===5&&(C(E),v=0)})}}).then(function(C){let y={version:f.rootNode.version,projectName:f.rootNode.name,desc:f.rootNode.desc,createTime:f.rootNode.createTime,lastUpdate:new Date().toISOString(),imageryProviders:[],terrainProviders:[],modelLayers:[],featureLayers:[],userScene:[]};for(let w=0;w<C.length;w++)C[w].item==="IMAGERY_LAYER"&&(y.imageryProviders=C[w].objJson),C[w].item==="TERRAIN_LAYER"&&(y.terrainProviders=C[w].objJson),C[w].item==="MODEL_LAYER"&&(y.modelLayers=C[w].objJson),C[w].item==="FEATURE_LAYER"&&(y.featureLayers=C[w].objJson),C[w].item==="USER_SCENE"&&(y.userScene=C[w].objJson);let x={class:"ENVIRONMENT",underGround:Ae(f._earthCtrl.camera.undergroundMode,null),shadow:Ae(f._earthCtrl.shadows,null),depthTest:Ae(f._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain,null),rain:Ae(f._earthCtrl.environment.rain.show,null),snow:Ae(f._earthCtrl.environment.snow.show,null),fog:Ae(f._earthCtrl.environment.fog.show,null),bwMode:Ae(f._earthCtrl.environment.bwMode.show,null),nightMode:Ae(f._earthCtrl.environment.nightMode.show,null),colorAdjustment:{show:Ae(f._earthCtrl.environment.colorAdjustment.show,null),contrast:Ae(f._earthCtrl.environment.colorAdjustment.contrast,null),saturation:Ae(f._earthCtrl.environment.colorAdjustment.saturation,null),brightness:Ae(f._earthCtrl.environment.colorAdjustment.brightness,null)}},v={class:"SKYBOX",positiveX:Ae(f._earthCtrl.environment.SkyBoxSource.positiveX,null),negativeX:Ae(f._earthCtrl.environment.SkyBoxSource.negativeX,null),positiveY:Ae(f._earthCtrl.environment.SkyBoxSource.positiveY,null),negativeY:Ae(f._earthCtrl.environment.SkyBoxSource.negativeY,null),positiveZ:Ae(f._earthCtrl.environment.SkyBoxSource.positiveZ,null),negativeZ:Ae(f._earthCtrl.environment.SkyBoxSource.negativeZ,null)},E={class:"VIEWPOINT",lon:f._earthCtrl.camera.viewPoint.lon,lat:f._earthCtrl.camera.viewPoint.lat,alt:f._earthCtrl.camera.viewPoint.alt,heading:f._earthCtrl.camera.viewPoint.heading,pitch:f._earthCtrl.camera.viewPoint.pitch,roll:f._earthCtrl.camera.viewPoint.roll,duration:f._earthCtrl.camera.viewPoint.duration};y.userScene.push(x),y.userScene.push(v),y.userScene.push(E);let I=JSON.stringify(y);A&&A(I)})}};Object.defineProperties(yle.prototype,{rootNode:{get:function(){return this._rootNode},set:function(o){this._rootNode=o}},editNode:{get:function(){return this._editNode},set:function(o){this._editNode=o}},selectSet:{get:function(){return this._selectSet}},EventDocumentChanged:{get:function(){return this._EventDocumentChanged}},EventObjectPropertyChanged:{get:function(){return this._EventObjectPropertyChanged}}});var xle=yle;function qct(o){this._earthCtrl=o,this._coreMap=o.coreMap,this.initialize()}var VHi=new ls,zHi=new ee,KHi=new ee;qct.prototype.initialize=function(){let o=document.createElement("div");o.className="map-info-bar",o.style="position: absolute;left: 0px;bottom:0px;width: 100%;background:rgba(0,0,0,0.4); color:#e9e9e9; text-shadow:2px 2px 2px #000";let A=this._coreMap;A.container.appendChild(o);let f="float: right; min-width: 100px;margin-right: 20px;",m=document.createElement("div");m.style=f,o.appendChild(m);let C=document.createElement("div");C.style=f,o.appendChild(C);let y=document.createElement("div");y.style=f,o.appendChild(y);let x=A.scene.canvas,v=A.scene.globe.ellipsoid;new Ur(x).setInputAction(function(I){let w=A.camera.pickEllipsoid(I.endPosition,v);if(w){let Q=A.scene.globe.ellipsoid.cartesianToCartographic(w),M=je.toDegrees(Q.latitude).toFixed(6),B=je.toDegrees(Q.longitude).toFixed(6),T=A.camera.positionCartographic.height.toFixed(1);y.innerHTML=`\u7ECF\u5EA6\uFF1A${B}`,C.innerHTML=`\u7EAC\u5EA6\uFF1A${M}`,m.innerHTML=`\u89C6\u70B9\u9AD8\uFF1A${T}\u7C73`}},Ki.MOUSE_MOVE)};var Xct=qct;function cu(){}cu.parseBaseData=function(o,A){let f=[];if(O(A)&&O(A.imageryProviders))for(let C=0;C<A.imageryProviders.length;C++){let y=A.imageryProviders[C];if(y.enable===!1||y.show===!1)continue;if(O(y.tilingScheme)){let v=y.tilingScheme;v.type==="GeographicTilingScheme"&&(y.tilingScheme=new af(v))}let x=D2.createImageryLayer(y);f.push(x)}let m=[];if(O(A)&&O(A.terrainProviders))for(let C=0;C<A.terrainProviders.length;C++){let y=A.terrainProviders[C];if(y.enable===!1||y.show===!1)continue;let x=D2.createTerrainLayer(y);m.push(x)}return{imageryProvider:f,terrainProvider:m}};cu.parse=function(o,A){if(!O(A))return;let f=[rl.IMAGERYPROVIDERS,rl.TERRAINPROVIDERS,rl.MODELLAYERS,rl.FEATURELAYERS,rl.USERSCENE];for(let m=0;m<f.length;m++){let C=o.factory.createSceneNode(D2.createUUID(),f[m]);C.show=!0,o.userScene.addChild(o.userScene.rootNode,C)}O(A[rl.IMAGERYPROVIDERS])&&KH(o,A[rl.IMAGERYPROVIDERS],o.userScene.rootNode.getChildByIndex(0),0),O(A[rl.TERRAINPROVIDERS])&&KH(o,A[rl.TERRAINPROVIDERS],o.userScene.rootNode.getChildByIndex(1),1),O(A[rl.MODELLAYERS])&&KH(o,A[rl.MODELLAYERS],o.userScene.rootNode.getChildByIndex(2)),O(A[rl.FEATURELAYERS])&&KH(o,A[rl.FEATURELAYERS],o.userScene.rootNode.getChildByIndex(3)),O(A[rl.USERSCENE])&&KH(o,A[rl.USERSCENE],o.userScene.rootNode.getChildByIndex(4))};function KH(o,A,f,m){for(let C=0;C<A.length;C++){let y=A[C],x=null;if(y.enable===!1)continue;O(y.class)?(y.class==="IMAGERY"&&(y.class=Eo.IMAGERY_LAYER),y.class==="TERRAIN"&&(y.class=Eo.TERRAIN_LAYER),x=y.class):(m===0?y.class=Eo.IMAGERY_LAYER:m===1&&(y.class=Eo.TERRAIN_LAYER),x=y.class);let v=cu.parserMap[x];v!==void 0&&v(o,y,f)}}function ORi(o,A,f){let m=o.factory.createSceneNode(A.id,A.name);m.show=Ae(A.show,!0),o.userScene.addChild(f,m),O(A.childNodes)&&KH(o,A.childNodes,m)}function URi(o,A,f){let m=A;if(O(m.tilingScheme)){let C=m.tilingScheme;C.type==="GeographicTilingScheme"&&(m.tilingScheme=new af(C))}o.factory.createImageryLayer(m,f)}function GRi(o,A,f){let m=A;o.factory.createTerrainLayer(m,f)}function HRi(o,A,f){let m=A;m.addToMap=!0;let C=m.sourceType;C==="3DTiles"||C==="b3dm"||C==="osgb"||C==="s3m"||C==="ude_block"||C==="ude_model"?o.factory.createModelLayer(m,f):C==="czml"?o.factory.createCZMLObject(m,f):C==="wfsModel"&&o.factory.createWfsModel(m,f)}function VRi(o,A,f){let m=o.factory.createFeatureLayer(A,f)}function zRi(o,A,f){o.coreMap.scene.skyBox=new mN({sources:{positiveX:A.positiveX,negativeX:A.negativeX,positiveY:A.positiveY,negativeY:A.negativeY,positiveZ:A.positiveZ,negativeZ:A.negativeZ}})}function KRi(o,A,f){o.camera.undergroundMode=Ae(A.underGround,!1),o.shadows=Ae(A.shadow,!1),A.rain===!0&&o.environment.showEffect("rain"),A.snow===!0&&o.environment.showEffect("snow"),A.fog===!0&&o.environment.showEffect("fog"),o.coreMap.scene.globe.depthTestAgainstTerrain=Ae(A.depthTest,!1),A.bwMode===!0&&o.environment.showEffect("bwMode"),A.nightMode===!0&&o.environment.showEffect("nightMode"),A.colorAdjustment.show===!0&&(o.environment.showEffect("colorAdjustment"),o.environment.colorAdjustment.contrast=A.colorAdjustment.contrast,o.environment.colorAdjustment.saturation=A.colorAdjustment.saturation,o.environment.colorAdjustment.brightness=A.colorAdjustment.brightness)}function YRi(o,A,f){o.camera.viewPoint=A,o.camera.flyTo(A.lon,A.lat,A.alt,A.heading,A.pitch,A.roll,A.duration)}function JRi(o,A,f){o.factory.createModel(A,f)}function WRi(o,A,f){o.factory.createWaters(A,f)}function jRi(o,A,f){o.factory.createExplosion(A,f)}function qRi(o,A,f){o.factory.createFireworks(A,f)}function XRi(o,A,f){o.factory.createSmoke(A,f)}function ZRi(o,A,f){o.factory.createFire(A,f)}function $Ri(o,A,f){A.color&&(A.color=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createRadarScan(A,f)}function eLi(o,A,f){A.color&&(A.color=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createCircleScan(A,f)}function tLi(o,A,f){A.color&&(A.color=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),A.outlineColor&&(A.outlineColor=new At(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createPoint(A,f)}function iLi(o,A,f){A.fillColor&&(A.fillColor=new At(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),o.factory.createLabel(A,f)}function rLi(o,A,f){o.factory.createBillboard(A,f)}function nLi(o,A,f){A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),A.lineColor&&(A.lineColor=new At(A.lineColor.red,A.lineColor.green,A.lineColor.blue,A.lineColor.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createPolyline(A,f)}function oLi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),o.factory.createPolygon(A,f)}function aLi(o,A,f){A.coordinates&&(A.coordinates=Si.fromDegrees(A.coordinates[0],A.coordinates[1],A.coordinates[2],A.coordinates[3])),A.fillColor&&(A.fillColor=new At(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createRectangle(A,f)}function sLi(o,A,f){o.factory.createEllipse(A,f)}function lLi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=ee.fromDegrees(A.position[0],A.position[1],A.position[2])),A.dimensions&&(A.dimensions=new ee(A.dimensions.x,A.dimensions.y,A.dimensions.z)),o.factory.createBox(A,f)}function uLi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=ee.fromDegrees(A.position[0],A.position[1],A.position[2])),A.radii&&(A.radii=new ee(A.radii[0],A.radii[1],A.radii[2])),o.factory.createEllipsoid(A,f)}function cLi(o,A,f){A.material&&(A.material=new At(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new At(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=ee.fromDegrees(A.position[0],A.position[1],A.position[2])),o.factory.createCylinder(A,f)}function ALi(o,A,f){o.factory.createPolylineVolume(A,f)}function hLi(o,A,f){o.factory.createVideoProjection(A,f)}function dLi(o,A,f){o.factory.createVideoProjection(A,f)}function fLi(o,A,f){o.factory.createTrack(A,f)}function gLi(o,A,f){o.factory.createHeatmap(A,f)}function pLi(o,A,f){o.factory.createEChartLayer(A,f)}function mLi(o,A,f){let m=o.factory.createElement(A);o.userScene.addChild(f,m)}cu.array2DtoMercator=function(o){let A=[];return o.forEach(function(f){let m=ee.fromDegrees(f[0],f[1],f[2]);A.push(m)}),A};cu.parserMap={};cu.parserMap[Eo.NODE]=ORi;cu.parserMap[Eo.IMAGERY_LAYER]=URi;cu.parserMap[Eo.TERRAIN_LAYER]=GRi;cu.parserMap[Eo.MODEL_LAYER]=HRi;cu.parserMap[Eo.FEATURE_LAYER]=VRi;cu.parserMap[Eo.SKYBOX]=zRi;cu.parserMap[Eo.ENVIRONMENT]=KRi;cu.parserMap[Eo.VIEWPOINT]=YRi;cu.parserMap[Eo.MODEL]=JRi;cu.parserMap[Eo.WATERS]=WRi;cu.parserMap[Eo.EXPLOSION]=jRi;cu.parserMap[Eo.FIREWORK]=qRi;cu.parserMap[Eo.SMOKE]=XRi;cu.parserMap[Eo.FIRE]=ZRi;cu.parserMap[Eo.RADARSCAN]=$Ri;cu.parserMap[Eo.CIRCLESCAN]=eLi;cu.parserMap[Eo.POINT]=tLi;cu.parserMap[Eo.LABEL]=iLi;cu.parserMap[Eo.BILLBOARD]=rLi;cu.parserMap[Eo.POLYLINE]=nLi;cu.parserMap[Eo.POLYGON]=oLi;cu.parserMap[Eo.RECTANGLE]=aLi;cu.parserMap[Eo.ELLIPSE]=sLi;cu.parserMap[Eo.BOX]=lLi;cu.parserMap[Eo.ELLIPSOID]=uLi;cu.parserMap[Eo.CYLINDER]=cLi;cu.parserMap[Eo.POLYLINEVOLUME]=ALi;cu.parserMap[Eo.PERSPECTIVE_VIDEO_PROJECTION]=hLi;cu.parserMap[Eo.FISHEYE_VIDEO_PROJECTION]=dLi;cu.parserMap[Eo.TRACK]=fLi;cu.parserMap[Eo.HEATMAP]=gLi;cu.parserMap[Eo.ECHARTLAYER]=pLi;cu.parserMap.ELEMENT=mLi;var Zct=cu;var KTe=class extends ja{constructor(A,f,m,C){super(A,m,C),this.editBillboard=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editBillboard=f,O(this.editBillboard)&&O(this.editBillboard.entity.billboard)?console.info(this.editBillboard.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Billboard entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBillboard.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBillboard.entity)||this.pickObject(A,this.editBillboard.entity))&&this.mCallback&&this.mCallback(this.editBillboard),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editBillboard.entity.position=m}return this.mCallback&&this.mCallback(this.editBillboard),!0}updateBillboard(A){if(O(A)&&O(this.editBillboard)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBillboard.entity.position=A[C]:O(A[C])&&(this.editBillboard.entity.billboard[C]=A[C])}}}endEditEntity(){}},$ct=KTe;var YTe=class extends ja{constructor(A,f,m,C){super(A,m,C),this.editPoint=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editPoint=f,O(this.editPoint)&&O(this.editPoint.entity.point)?console.info(this.editPoint.entity.point):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Point entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPoint.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPoint.entity)||this.pickObject(A,this.editPoint.entity))&&this.mCallback&&this.mCallback(this.editPoint),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editPoint.entity.position=m}return this.mCallback&&this.mCallback(this.editPoint),!0}updatePoint(A){if(O(A)&&O(this.editPoint)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPoint.entity.position=A[C]:O(A[C])&&(this.editPoint.entity.point[C]=A[C])}}}endEditEntity(){}},eAt=YTe;var JTe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editBox=void 0,this.pickedEntity=void 0,this.editHeightPoint=void 0,this.editWHPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.dragPosition=void 0,this.editBox=f,O(this.editBox)&&O(this.editBox.entity.box)){let y=this.editBox.entity.position._value,x=Kt.fromCartesian(y);this.height=x.height;let v=new ee,E=new ee;this.getNorthPointByDistance(v,E),this.editHeightPoint=this.mEarthCtrl.entities.add({name:"box_edit_height_point",position:v,point:{heightReference:this.editBox.entity.box.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.editHeightPoint.id),this.editWHPoint=this.mEarthCtrl.entities.add({name:"box_edit_long_width_point",position:E,point:{heightReference:this.editBox.entity.box.heightReference,color:At.RED,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.editWHPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Box entity is need!"})}addHeight(A){let f=this.editBox.entity.position._value,m=Kt.fromCartesian(f);return this.height=m.height+A,ee.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C;console.info(this.editBox.entity.position),O(m)?C=this.editBox.entity.position.getValue(m):C=this.editBox.entity.position._value;let y=Vn.eastNorthUpToFixedFrame(C),x=new ee,v=this.editBox.entity.box.dimensions._value;v||(v=this.editBox.entity.box.dimensions.getValue(m)),ee.divideByScalar(v,2,x),ee.clone(x,A),ee.clone(x,f),A.y*=-1,Xe.multiplyByPoint(y,A,A),f.y*=-1,f.z*=-1,Xe.multiplyByPoint(y,f,f)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBox.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0):f.name==="box_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=f,this.pickEditWHPoint=void 0):f.name==="box_edit_long_width_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBox)||this.pickObject(A,this.editBox.entity))&&this.mCallback&&this.mCallback(this.editBox),this.currentPoint=void 0,this.isEditing=!1,this.dragPosition=void 0,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;let f=new Date,m=fi.fromDate(f);if(O(this.currentPoint)||O(this.pickEditHeightPoint)||O(this.pickEditWHPoint)){let C=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,y=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,C);if(!y)return;let x=Kt.fromCartesian(y),v=ee.fromRadians(x.longitude,x.latitude,x.height+this.height);if(O(this.currentPoint))this.currentPoint.position=v,this.editBox.entity.position=new Bn(function(){return v},!1);else if(O(this.dragPosition)){if(O(this.pickEditWHPoint)){let w=ee.subtract(y,this.dragPosition,new ee),Q=ee.normalize(w,new ee);ee.dot(w,Q,w);let M=this.editBox.entity.box.dimensions._value;M||(M=this.editBox.entity.box.dimensions.getValue(m));let B=ee.clone(M);B.x-=w.x,B.y+=w.y,ee.abs(B,B),this.editBox.entity.box.dimensions=new Bn(function(){return B},!1)}else if(O(this.pickEditHeightPoint)){let w=ee.subtract(y,this.dragPosition,new ee),Q=this.editBox.entity.box.dimensions._value;Q||(Q=this.editBox.entity.box.dimensions.getValue(m));let M=ee.clone(Q);M.z+=w.z,ee.abs(M,M),this.editBox.entity.box.dimensions=M,this.editBox.entity.position=this.addHeight(w.z/2)}}this.dragPosition=y;let E=new ee,I=new ee;this.getNorthPointByDistance(E,I,m),this.editHeightPoint.position=E,this.editWHPoint.position=I}return this.mCallback&&this.mCallback(this.editBox),!0}updateBox(A){if(O(A)&&O(this.editBox)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBox.entity.position=A[C]:O(A[C])&&(this.editBox.entity.box[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},tAt=JTe;var WTe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editCylinder=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.topRadiusPoint=void 0,this.pickTopRadiusPoint=void 0,this.bottomRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0,this.heightPoint=void 0,this.pickHeightPoint=void 0,this.dragPosition=void 0,this.editCylinder=f,O(this.editCylinder)&&O(this.editCylinder.entity.cylinder)){let y=this.editCylinder.entity.position._value,x=Kt.fromCartesian(y);this.height=x.height;let v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value,I=new ee,w=new ee,Q=new ee;this.getNorthPointByDistance(I,w,Q),this.heightPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_height_point",position:Q,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.heightPoint.id),v>0&&(this.topRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_top_radius_point",position:I,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:At.RED,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.topRadiusPoint.id)),E>0&&(this.bottomRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_bottom_radius_point",position:w,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:At.RED,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.bottomRadiusPoint.id))}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Cylinder entity is need!"})}addHeight(A){let f=this.editCylinder.entity.position._value,m=Kt.fromCartesian(f);return this.height=m.height+A,ee.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editCylinder.entity.position._value,y=Vn.eastNorthUpToFixedFrame(C),x=this.editCylinder.entity.cylinder.length._value,v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value;v>0&&(A.z+=x/2,A.x+=v,Xe.multiplyByPoint(y,A,A)),E>0&&(f.x+=E,f.z-=x/2,Xe.multiplyByPoint(y,f,f)),m.z+=x/2,Xe.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editCylinder.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=f,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_top_radius_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=f,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_bottom_radius_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editCylinder)||this.pickObject(A,this.editCylinder.entity))&&this.mCallback&&this.mCallback(this.editCylinder),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.heightPoint)||O(this.topRadiusPoint)||O(this.bottomRadiusPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=ee.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editCylinder.entity.position=y;else if(O(this.dragPosition)){if(O(this.pickHeightPoint)){let Q=ee.subtract(m,this.dragPosition,new ee),M=this.editCylinder.entity.cylinder.length._value;M+=Q.z,M=Math.abs(M),this.editCylinder.entity.position=this.addHeight(Q.z/2),this.editCylinder.entity.cylinder.length=M}else if(O(this.pickTopRadiusPoint)){let Q=ee.subtract(m,this.dragPosition,new ee),M=this.editCylinder.entity.cylinder.topRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.topRadius=M}else if(O(this.pickBottomRadiusPoint)){let Q=ee.subtract(m,this.dragPosition,new ee),M=this.editCylinder.entity.cylinder.bottomRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.bottomRadius=M}}this.dragPosition=m;let x=this.editCylinder.entity.cylinder.topRadius._value,v=this.editCylinder.entity.cylinder.bottomRadius._value,E=new ee,I=new ee,w=new ee;this.getNorthPointByDistance(E,I,w),x>0&&(this.topRadiusPoint.position=E),v>0&&(this.bottomRadiusPoint.position=I),this.heightPoint.position=w}return this.mCallback&&this.mCallback(this.editCylinder),!0}updateCylinder(A){if(O(A)&&O(this.editCylinder)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editCylinder.entity.position=A[C]:O(A[C])&&(this.editCylinder.entity.cylinder[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},iAt=WTe;var jTe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editEllipse=void 0,this.pickedEntity=void 0,this.semiMajorAxisPoint=void 0,this.semiMinorAxisPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0,this.pointsId=[],this.isEditing=!1,this.circle=!1,this.editEllipse=f,O(this.editEllipse)&&O(this.editEllipse.entity.ellipse)){let y=je.PI_OVER_TWO,x=this.updatePoint(y);this.semiMajorAxisPoint=this.mEarthCtrl.entities.add({name:"semi_major_axis_point",position:x,point:{heightReference:this.editEllipse.entity.ellipse.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.semiMajorAxisPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipse entity is need!"})}updatePoint(A){let f=new ee,m=new ee,C=new ee,y=this.editEllipse.entity.ellipse;this.semiMinorAxis=y.semiMinorAxis._value,this.semiMajorAxis=y.semiMajorAxis._value,this.circle=this.semiMajorAxis===this.semiMinorAxis;let x=Ae(y.rotation,0);this.center=this.editEllipse.entity.position._value;let v=this.semiMinorAxis*this.semiMinorAxis,E=this.semiMajorAxis*this.semiMajorAxis,I=this.semiMajorAxis*this.semiMinorAxis,w=ee.magnitude(this.center),Q=ee.normalize(this.center,f),M=ee.cross(ee.UNIT_Z,this.center,m);M=ee.normalize(M,M);let B=ee.cross(Q,M,C),T=new ee;return iB.pointOnEllipsoid(A,x,B,M,v,I,E,w,Q,T)}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipse.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0):f.name==="semi_minor_axis_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=f):f.name==="semi_major_axis_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=f,this.pickSemiMinorAxisPoint=void 0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipse)||this.pickObject(A,this.editEllipse.entity))&&this.mCallback&&this.mCallback(this.editEllipse),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickSemiMajorAxisPoint)||O(this.pickSemiMinorAxisPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;if(O(this.currentPoint))this.currentPoint.position=m,this.editEllipse.entity.position=m;else if(O(this.pickSemiMajorAxisPoint)){let C=ee.distance(this.center,m);this.editEllipse.entity.ellipse.semiMajorAxis=C;let y=C*this.semiMinorAxis/this.semiMajorAxis;y>C&&(y=C),this.editEllipse.entity.ellipse.semiMinorAxis=y}else if(O(this.pickSemiMinorAxisPoint)){let C=ee.distance(this.center,m);this.editEllipse.entity.ellipse.semiMinorAxis=C}this.semiMajorAxisPoint.position=this.updatePoint(je.PI_OVER_TWO)}return this.mCallback&&this.mCallback(this.editEllipse),!0}updateEllipse(A){if(O(A)&&O(this.editEllipse)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipse.entity.position=A[C]:O(A[C])&&(this.editEllipse.entity.ellipse[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},rAt=jTe;var qTe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editEllipsoid=void 0,this.pickedEntity=void 0,this.height=0,this.isEditing=!1,this.pointsId=[],this.radiiXPoint=void 0,this.pickRadiiXPoint=void 0,this.radiiYPoint=void 0,this.pickRadiiYPoint=void 0,this.radiiZPoint=void 0,this.pickRadiiZPoint=void 0,this.dragPosition=void 0,this.editEllipsoid=f,O(this.editEllipsoid)&&O(this.editEllipsoid.entity.ellipsoid)){console.info(this.editEllipsoid.ellipsoid);let y=this.editEllipsoid.entity.position._value,x=Kt.fromCartesian(y);this.height=x.height;let v=new ee,E=new ee,I=new ee;this.getNorthPointByDistance(v,E,I),this.radiiXPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_x_point",position:v,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiXPoint.id),this.radiiYPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_y_point",position:E,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiYPoint.id),this.radiiZPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_z_point",position:I,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiZPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipsoid entity is need!"})}addHeight(A){let f=this.editEllipsoid.entity.position._value,m=Kt.fromCartesian(f);return this.height=m.height+A,ee.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editEllipsoid.entity.position._value,y=Vn.eastNorthUpToFixedFrame(C),x=this.editEllipsoid.entity.ellipsoid.radii._value;A.x=x.x,Xe.multiplyByPoint(y,A,A),f.y=-x.y,Xe.multiplyByPoint(y,f,f),m.z=x.z,Xe.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipsoid.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_x_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=f,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_y_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=f,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_z_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipsoid)||this.pickObject(A,this.editEllipsoid.entity))&&this.mCallback&&this.mCallback(this.editEllipsoid),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickRadiiXPoint)||O(this.pickRadiiYPoint)||O(this.pickRadiiZPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=ee.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editEllipsoid.entity.position=y;else{if(O(this.dragPosition)){let I=ee.subtract(m,this.dragPosition,new ee),w=ee.normalize(I,new ee);ee.dot(I,w,I);let Q=this.editEllipsoid.entity.ellipsoid.radii._value,M=ee.clone(Q);O(this.pickRadiiXPoint)?M.x-=I.x:O(this.pickRadiiYPoint)?M.y+=I.y:O(this.pickRadiiZPoint)&&(M.z+=I.z,this.editEllipsoid.entity.position=this.addHeight(I.z)),ee.abs(M,M),this.editEllipsoid.entity.ellipsoid.radii=M}this.dragPosition=m}let x=new ee,v=new ee,E=new ee;this.getNorthPointByDistance(x,v,E),this.radiiXPoint.position=x,this.radiiYPoint.position=v,this.radiiZPoint.position=E}return this.mCallback&&this.mCallback(this.editEllipsoid),!0}updateEllipsoid(A){if(O(A)&&O(this.editEllipsoid)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipsoid.entity.position=A[C]:O(A[C])&&(this.editEllipsoid.entity.ellipsoid[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},nAt=qTe;var XTe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolygon=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolygon=f,O(this.editPolygon)&&O(this.editPolygon.entity.polygon))for(let y=0;y<this.editPolygon.entity.polygon.hierarchy._value.positions.length;y++){let x=this.editPolygon.entity.polygon.hierarchy._value.positions[y],v=this.mEarthCtrl.entities.add({name:"polygon_point",position:x,point:{color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polygon entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolygon.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polygon_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolygon)||this.pickObject(A,this.editPolygon.entity))&&this.mCallback&&this.mCallback(this.editPolygon),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolygon.entity.polygon.hierarchy=C}return this.mCallback&&this.mCallback(this.editPolygon),!0}updatePolygon(A){if(O(A)&&O(this.editPolygon)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolygon.entity.polygon[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},oAt=XTe;var ZTe=class extends ja{constructor(A,f,m,C){super(A,m,C),this.editModel=void 0,this.pickedEntity=void 0,this.editColor=At.RED.withAlpha(.8),this.isEditing=!1,this.editModel=f,this.oldColor=this.editModel.entity.color,this.editModel.entity.color=this.editColor,O(this.editModel)&&O(this.editModel.entity)?console.info(this.editModel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"gltf Model is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f===this.editModel.parameter.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editModel)||this.pickObject(A,this.editModel.entity))&&this.mCallback&&this.mCallback(this.editModel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=Kt.clone(C);y.longitude=je.toDegrees(y.longitude),y.latitude=je.toDegrees(y.latitude),this.editModel.lon=y.longitude,this.editModel.lat=y.latitude}return this.mCallback&&this.mCallback(this.editModel),!0}updateModel(A){if(O(A)&&O(this.editModel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];if(O(A[C]))switch(C){case"lon":case"lat":case"alt":case"heading":case"pitch":case"roll":this.editModel[C]=A[C];break;default:this.editModel.entity[C]=A[C];break}}}}endEditEntity(){this.editModel.entity.color=this.oldColor}},aAt=ZTe;var $Te=class extends ja{constructor(A,f,m,C){super(A,m,C),this.editLabel=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editLabel=f,O(this.editLabel)&&O(this.editLabel.entity.label)?console.info(this.editLabel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Label entity is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editLabel.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editLabel.entity)||this.pickObject(A,this.editLabel.entity))&&this.mCallback&&this.mCallback(this.editLabel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editLabel.entity.position=m}return this.mCallback&&this.mCallback(this.editLabel),!0}updateLabel(A){if(O(A)&&O(this.editLabel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editLabel.entity.position=A[C]:O(A[C])&&(this.editLabel.entity.label[C]=A[C])}}}endEditEntity(){}},sAt=$Te;var eMe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolyline=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolyline=f,O(this.editPolyline)&&O(this.editPolyline.polyline))for(let y=0;y<this.editPolyline.polyline.positions._value.length;y++){let x=this.editPolyline.polyline.positions._value[y],v=this.mEarthCtrl.entities.add({name:"polyline_point",position:x,point:{color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polyline entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolyline.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polyline_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolyline)||this.pickObject(A,this.editPolyline.entity))&&this.mCallback&&this.mCallback(this.editPolyline),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolyline.polyline.positions=C}return this.mCallback&&this.mCallback(this.editPolyline),!0}updatePolyline(A){if(O(A)&&O(this.editPolyline)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolyline.polyline[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},lAt=eMe;var tMe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolylineVolume=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolylineVolume=f,O(this.editPolylineVolume)&&O(this.editPolylineVolume.entity.polylineVolume))for(let y=0;y<this.editPolylineVolume.entity.polylineVolume.positions._value.length;y++){let x=this.editPolylineVolume.entity.polylineVolume.positions._value[y],v=this.mEarthCtrl.entities.add({name:"edit_polylineVolume_point",position:x,point:{color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"PolylineVolume entity is need!"})}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolylineVolume.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="edit_polylineVolume_point"&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolylineVolume)||this.pickObject(A,this.editPolylineVolume.entity))&&this.mCallback&&this.mCallback(this.editPolylineVolume),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolylineVolume.entity.polylineVolume.positions=C}return this.mCallback&&this.mCallback(this.editPolylineVolume),!0}updatePolylineVolume(A){if(O(A)&&O(this.editPolylineVolume)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPolylineVolume.entity.position=A[C]:O(A[C])&&(this.editPolylineVolume.entity.polylineVolume[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},uAt=tMe;var iMe=class extends ja{constructor(A,f,m,C){if(super(A,m,C),this.editRectangle=void 0,this.pickedEntity=void 0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editRectangle=f,O(this.editRectangle)&&O(this.editRectangle.entity.rectangle)){let y=this.editRectangle.entity.rectangle.coordinates._value,x=this.editRectangle.entity.rectangle.height._value,v=Si.northwest(y),E=ee.fromRadians(v.longitude,v.latitude,x),I=this.mEarthCtrl.entities.add({name:"rect_left_top_point",position:E,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(I.id),v=Si.southeast(y);let w=ee.fromRadians(v.longitude,v.latitude,x),Q=this.mEarthCtrl.entities.add({name:"rect_right_bottom_point",position:w,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:At.WHITE,pixelSize:8,outlineColor:At.BLACK,outlineWidth:1}});this.pointsId.push(Q.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Rectangle entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editRectangle.entity.id?(this.isEditing=!0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0):f.name==="rect_left_top_point"?(this.leftTopPoint=f,this.rightBottomPoint=void 0,this.isEditing=!0):f.name==="rect_right_bottom_point"&&(this.rightBottomPoint=f,this.leftTopPoint=void 0,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editRectangle)||this.pickObject(A,this.editRectangle.entity))&&this.mCallback&&this.mCallback(this.editRectangle),this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.leftTopPoint)||O(this.rightBottomPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=Kt.fromCartesian(m),y=this.editRectangle.entity.rectangle.coordinates._value;O(this.leftTopPoint)?(this.leftTopPoint.position=m,y.west=C.longitude,y.north=C.latitude):O(this.rightBottomPoint)&&(this.rightBottomPoint.position=m,y.south=C.latitude,y.east=C.longitude),this.editRectangle.entity.rectangle.coordinates=y}return this.mCallback&&this.mCallback(this.editRectangle),!0}updateRectangle(A){if(O(A)&&O(this.editRectangle)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editRectangle.entity.position=A[C]:O(A[C])&&(this.editRectangle.entity.rectangle[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},cAt=iMe;function Md(o){this._earthCtrl=o,this._coreMap=o.coreMap}Md.prototype.editPoint=function(o,A){this._earthCtrl.tools.clearTool();let f=new eAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("point_edit_tool",f),f};Md.prototype.updatePoint=function(o,A){o.updatePoint(A)};Md.prototype.editPolyline=function(o,A){this._earthCtrl.tools.clearTool();let f=new lAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polyline_edit_tool",f),f};Md.prototype.updatePolyline=function(o,A){o.updatePolyline(A)};Md.prototype.editPolygon=function(o,A){this._earthCtrl.tools.clearTool();let f=new oAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polygon_edit_tool",f),f};Md.prototype.updatePolygon=function(o,A){o.updatePolygon(A)};Md.prototype.editBox=function(o,A){this._earthCtrl.tools.clearTool();let f=new tAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("box_edit_tool",f),f};Md.prototype.updateBox=function(o,A){o.updateBox(A)};Md.prototype.editEllipsoid=function(o,A){this._earthCtrl.tools.clearTool();let f=new nAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipsoid_edit_tool",f),f};Md.prototype.updateEllipsoid=function(o,A){o.updateEllipsoid(A)};Md.prototype.editCylinder=function(o,A){this._earthCtrl.tools.clearTool();let f=new iAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("cylinder_edit_tool",f),f};Md.prototype.updateCylinder=function(o,A){o.updateCylinder(A)};Md.prototype.editModel=function(o,A){this._earthCtrl.tools.clearTool();let f=new aAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("model_edit_tool",f),f};Md.prototype.updateModel=function(o,A){o.updateModel(A)};Md.prototype.editBillboard=function(o,A){this._earthCtrl.tools.clearTool();let f=new $ct(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("billboard_edit_tool",f),f};Md.prototype.updateBillboard=function(o,A){o.updateBillboard(A)};Md.prototype.editLabel=function(o,A){this._earthCtrl.tools.clearTool();let f=new sAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("label_edit_tool",f),f};Md.prototype.updateLabel=function(o,A){o.updateLabel(A)};Md.prototype.editRectangle=function(o,A){this._earthCtrl.tools.clearTool();let f=new cAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("rectangle_edit_tool",f),f};Md.prototype.updateRectangle=function(o,A){o.updateRectangle(A)};Md.prototype.editEllipse=function(o,A){this._earthCtrl.tools.clearTool();let f=new rAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipse_edit_tool",f),f};Md.prototype.updateEllipse=function(o,A){o.updateEllipse(A)};Md.prototype.editPolylineVolume=function(o,A){this._earthCtrl.tools.clearTool();let f=new uAt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polylinevolume_edit_tool",f),f};Md.prototype.updatePolylineVolume=function(o,A){o.updatePolylineVolume(A)};Md.prototype.endEditEntity=function(o){this._earthCtrl.tools.clearTool(),o.endEditEntity(),this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!0,this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!0};var vle=Md;function yy(o){this.mEarthCtrl=o,this.scene=this.mEarthCtrl.coreMap.scene,this.entities=this.mEarthCtrl.entities,this.camera=this.mEarthCtrl.coreMap.camera,this._points=[],this.item=void 0}yy.prototype.horizontalDistance=function(o,A){let f=this,m=!1,C=[],y="",x=[],v,E=this.scene.globe.ellipsoid,I={spot:[],distance:[],label:[],polyline:[]},w={point:At.RED,polyline:At.fromRgba(4286644096)};O(A)&&(O(A.point)&&(w.point=A.point),O(A.polyline)&&(w.polyline=A.polyline));let Q=new iI;this.scene.primitives.add(Q);let M=new OA,B=new Ur(f.scene.canvas),T=document.createElement("div");nA(".map-widget",T),nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let F=document.getElementById("toolTip");F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let L;m=!0;let R=function(V){let H=0,q=`${0}\u7C73`,ie,Z,oe,ne,se,ce;for(let j=0;j<V.length-1;j+=1)ie=E.cartesianToCartographic(V[j]),Z=M.project(ie),oe=Z.x,ne=Z.y,ie=E.cartesianToCartographic(V[j+1]),Z=M.project(ie),se=Z.x,ce=Z.y,H=H+Math.sqrt((oe-se)*(oe-se)+(ne-ce)*(ne-ce));return H>0&&(q=`${H.toFixed(2)}\u7C73`),H/1e3>=1&&(q=`${(H/1e3).toFixed(2)}\u5343\u7C73`),q},k=function(){function V(H){if(!O(H))throw new Ui("positions is required!");if(H.length<2)throw new Ui("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E2");let q=ss.fromType(ss.ColorType);q.uniforms.color=new At(1,1,0,.5),this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:w.polyline,width:3,clampToGround:!0}},this.path=H,this._init()}return V.prototype._init=function(){let H=this,q=function(){return H.path};this.options.polyline.positions=new Bn(q,!1),this.lineEntity=f.entities.add(this.options),f.item=this.lineEntity,I.polyline.push(this.lineEntity)},V}();B.setInputAction(function(V){let H,q;F.style.left=`${V.endPosition.x+10}px`,F.style.top=`${V.endPosition.y+20}px`,F.style.display="block",F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ie=!1,Z=f.camera.getPickRay(V.endPosition);Z&&(H=f.scene.globe.pick(Z,f.scene));let oe=f.scene.pick(V.endPosition);if(oe){console.log("feature",oe);let ne=f.scene.pickPosition(V.endPosition);ne&&(H=ne),ie=!0}if(!!H&&(q=Di.WGS84.cartesianToCartographic(H),q)){let ne;ie?ne=f.scene.sampleHeight(q):ne=f.scene.globe.getHeight(q);let se=ee.fromDegrees(q.longitude/Math.PI*180,q.latitude/Math.PI*180,ne);if(m){if(C.length<1)return;O(v)?(v.path.pop(),v.path.push(se)):(C.push(se),v=new k(C));let ce=R(v.path);f.entities.remove(L),L=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:v.path[v.path.length-1],label:{text:`\u603B\u957F\uFF1A${ce}`,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}})}}},Ki.MOUSE_MOVE);let U=function(V){x.push(V);let H=[];if(x.length>1){let q=x[x.length-2],ie=x[x.length-1],Z=Math.abs(q.longitude-ie.longitude)*1e7,oe=Math.abs(q.latitude-ie.latitude)*1e7;Z>oe&&(oe=Z);let ne=parseInt(oe/10);ne>1e3&&(ne=1e3),ne<2&&(ne=2);for(let se=0;se<ne;++se)H.push(new Kt(je.lerp(q.longitude,ie.longitude,se/(ne-1)),je.lerp(q.latitude,ie.latitude,se/(ne-1))));H.push(ie.clone())}else H=x;if(H.length>0)for(let q=0;q<H.length;q++){V=H[q];let ie=f.scene.globe.getHeight(V),Z=ee.fromDegrees(V.longitude/Math.PI*180,V.latitude/Math.PI*180,ie);C.push(Z)}};return B.setInputAction(function(V){let H,q,ie=!1,Z=f.camera.getPickRay(V.position);if(Z&&(H=f.scene.globe.pick(Z,f.scene)),f.scene.pick(V.position)){let ne=f.scene.pickPosition(V.position);ne&&(H=ne),ie=!0}if(H&&(q=Di.WGS84.cartesianToCartographic(H)),q){let ne;ie?ne=f.scene.sampleHeight(q):ne=f.scene.globe.getHeight(q);let se=ee.fromDegrees(q.longitude/Math.PI*180,q.latitude/Math.PI*180,ne);if(m){v&&v.path.pop(),U(q);let ce="0\u7C73";v&&(ce=R(v.path)),y=ce,I.spot.push(se),I.distance.push(ce);let j=f.entities.add({position:se,point:{pixelSize:5,color:w.point,outlineColor:At.WHITE,outlineWidth:1,clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:ce,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-20),clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}});I.label.push(j),f._points.push(j)}}},Ki.LEFT_CLICK),B.setInputAction(function(){f.entities.remove(L),f._points[f._points.length-1].label.text=y,B.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(I),F.style.display="none"},Ki.RIGHT_CLICK),this};yy.prototype.spaceDistance=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=new Ur(f.scene.canvas),C=[],y=null,x="0\u7C73",v=null,E,I="",w,Q=document.createElement("div");nA(".map-widget",Q),nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let B=document.getElementById("toolTip");B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let T={name:"",spot:[],distance:[],label:[],ployline:[]},D={point:At.RED,polyline:At.fromRgba(4286644096)};O(A)&&(O(A.point)&&(D.point=A.point),O(A.polyline)&&(D.polyline=A.polyline));let F=function(){function L(R){this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:D.polyline,width:3,clampToGround:!1}},this.positions=R,this._init()}return L.prototype._init=function(){let R=this,k=function(){return R.positions};this.options.polyline.positions=new Bn(k,!1);let U=f.entities.add(this.options);f.item=U,T.ployline.push(U);let V=f.getuid();T.name=`\u65B0\u5EFA\u7A7A\u95F4\u8DDD\u79BB${V}`},L}();return m.setInputAction(function(L){if(f.scene.bim){let R=f.scene.bim.PickWorldPositionSync(L.endPosition.x,L.endPosition.y);R[0]===0?v=f.scene.pickPosition(L.endPosition):v=new ee(R[0],R[1],R[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.endPosition);!v||(B.style.left=`${L.endPosition.x+10}px`,B.style.top=`${L.endPosition.y+20}px`,B.style.display="block",C.length>=2&&(O(y)?(C.pop(),C.push(v)):y=new F(C),B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>',x=f.getSpaceDistance(C)),f.entities.remove(w),w=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],label:{text:`\u603B\u957F\uFF1A${x}`,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}}))},Ki.MOUSE_MOVE),m.setInputAction(function(L){if(f.scene.bim){let k=f.scene.bim.PickWorldPositionSync(L.position.x,L.position.y);k[0]===0?v=f.scene.pickPosition(L.position):v=new ee(k[0],k[1],k[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.position);if(!v)return;C.length===0&&C.push(v.clone()),C.push(v);let R=x;I=`\u603B\u957F\uFF1A${x}`,E=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],point:{pixelSize:5,color:D.point,outlineColor:At.WHITE,outlineWidth:2,clampToGround:!1,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:R,show:!0,font:"26px \u6977\u4F53",fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-20),heightReference:xn.NONE,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(E),T.spot.push(v),T.distance.push(x),T.label.push(E)},Ki.LEFT_CLICK),m.setInputAction(function(L){B.style.display="none",f.entities.remove(w),f._points.length>0&&(f._points[f._points.length-1].label.text=I),m.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(T)},Ki.RIGHT_CLICK),this};yy.prototype.getSpaceDistance=function(o){let A=0,f="";for(let m=0;m<o.length-1;m++){let C=Kt.fromCartesian(o[m]),y=Kt.fromCartesian(o[m+1]),x=new l0;x.setEndPoints(C,y);let v=x.surfaceDistance;v=Math.sqrt(Math.pow(v,2)+Math.pow(y.height-C.height,2)),A=A+v}return A>=1e3?f=`${(A/1e3).toFixed(2)}\u5343\u7C73`:f=`${A.toFixed(2)}\u7C73`,f};yy.prototype.getPlaneArea=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=0,C=new Ur(f.scene._imageryLayerCollection),y=document.getElementById("toolTip");y||(nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>'),y=document.getElementById("toolTip")),y.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB\uFF0C\u53F3\u952E\u7ED3\u675F\uFF01</span>';let x=[],v={},E=[],I=[],w=null,Q=null,M,B={point:At.RED,polyline:At.fromRgba(4286644096),polygon:At.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(B.point=A.point),O(A.polyline)&&(B.polyline=A.polyline),O(A.polygon)&&(B.polygon=A.polygon));let T={mj:0,label:[],polygon:[]};y.style.display="block";let D=function(){function F(L){this.options={name:"\u591A\u8FB9\u5F62",polygon:{hierarchy:[],perPositionHeight:!0,material:B.polygon,clampToGround:!1}},this.hierarchy=L,this._init()}return F.prototype._init=function(){let L=this,R=function(){return L.hierarchy};this.options.polygon.hierarchy=new Bn(R,!1),this.polygon=f.entities.add(this.options),f.item=this.polygon,f._entity=this.polygon,T.polygon=this.polygon},F}();return C.setInputAction(function(F){if(y.style.left=`${F.endPosition.x+10}px`,y.style.top=`${F.endPosition.y+20}px`,f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.endPosition.x,F.endPosition.y);V[0]===0?Q=f.scene.pickPosition(F.endPosition):Q=new ee(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.endPosition);if(!Q)return;let L=Kt.fromCartesian(Q),R=je.toDegrees(L.longitude),k=je.toDegrees(L.latitude),U=L.height;if(x.length>=2){O(w)?(x.pop(),x.push(Q),v=new Un(x),I.pop(),I.push({lon:R,lat:k,hei:U})):(v=new Un(x),w=new D(v));let V=f.getArea(I,x);f.entities.remove(M),M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:V,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),T.label=M}},Ki.MOUSE_MOVE),C.setInputAction(function(F){if(f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.position.x,F.position.y);V[0]===0?Q=f.scene.pickPosition(F.position):Q=new ee(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.position);if(!Q)return;let L=Kt.fromCartesian(Q);console.log("\u5DE6\u952E\u70B9",L);let R=je.toDegrees(L.longitude),k=je.toDegrees(L.latitude),U=L.height;x.length===0&&(x.push(Q.clone()),v=new Un(x),I.push({lon:R,lat:k,hei:U}),x.push(Q.clone()),v=new Un(x),I.push({lon:R,lat:k,hei:U})),x.push(Q),v=new Un(x),E.push({lon:R,lat:k,hei:U}),I.push({lon:R,lat:k,hei:U})},Ki.LEFT_CLICK),C.setInputAction(function(F){y.style.display="none",f.entities.remove(M),C.destroy();let L=f.getArea(I,x);m=L;let R=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:L,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}});f._points.push(R),f._lable=R,T.mj=m,T.label=R,O(o)&&typeof o=="function"&&o(T)},Ki.RIGHT_CLICK),this};yy.prototype.getSurfaceArea3d=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m={mj:0,label:[],polygon:[]},C=!0,y=[],x={},v,E=f.scene,I=E.globe.ellipsoid,w=new iI;E.primitives.add(w);let Q,M,B=0,T={point:At.RED,polyline:At.fromRgba(4286644096),polygon:At.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(T.point=A.point),O(A.polyline)&&(T.polyline=A.polyline),O(A.polygon)&&(T.polygon=A.polygon));let D=document.createElement("div");nA(".map-widget",D),nA(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let L=document.getElementById("toolTip");L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let R=new Ur(E.canvas),k=function(){function V(H){if(!O(H))throw new Ui("positions is required!");if(H.length<3)throw new Ui("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E3");this.options={polygon:{show:!0,hierarchy:void 0,material:T.polygon,clampToGround:!1}},this.path=H,this._init()}return V.prototype._init=function(){let H=this,q=function(){return H.path};this.options.polygon.hierarchy=new Bn(q,!1),this.polygonEntity=f.entities.add(this.options),f.item=this.polygonEntity,m.polygon=this.polygonEntity,f._entity=this.polygonEntity},V}();R.setInputAction(function(V){let H=0;f.entities.remove(M);let q,ie,Z=f.scene.camera.getPickRay(V.endPosition);Z&&(q=f.scene.globe.pick(Z,f.scene));let oe=f.scene.pick(V.endPosition),ne=!1;if(oe){let ce=f.scene.pickPosition(V.endPosition);ce&&(q=ce),ne=!0}if(!q)return;let se=function(ce){let j=new Array(ce.length),de=function(Be){return Be.longitude=Be.longitude/Math.PI*180,Be.latitude=Be.latitude/Math.PI*180,Be},me=function(Be){let Qe=0;for(let Ie=0;Ie<Be.length;Ie++){let ve=Be[Ie],K;Ie<Be.length-1?K=Be[Ie+1]:K=Be[0],Qe+=ve.x*K.y-K.x*ve.y}return Qe/2};for(let Be=0;Be<ce.length;Be++)j[Be]=de(I.cartesianToCartographic(ce[Be]));let _e=0;for(let Be=0;Be<j.length;Be++)_e+=j[Be].longitude;_e=_e/j.length;for(let Be=0;Be<j.length;Be++)j[Be]=f.Gauss_to_XY(j[Be].longitude,j[Be].latitude,_e);return Math.abs(me(j))};if(ie=Di.WGS84.cartesianToCartographic(q),ie&&C){if(L.style.left=`${V.endPosition.x+10}px`,L.style.top=`${V.endPosition.y+20}px`,L.style.display="block",y.length<2){B===1&&(M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:q,label:{text:`${H}\u5E73\u65B9\u5343\u7C73`,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M);return}if(O(v)?(v.path.positions.pop(),v.path.positions.push(q)):(y.push(q),x=new Un(y),v=new k(x)),y.length>=2){L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ce=String(se(v.path.positions));ce=ce.substr(0,ce.indexOf(".",0)),ce.length<6?H=`${ce}\u5E73\u65B9\u7C73`:(ce=String(ce/1e6),ce=ce.substr(0,ce.indexOf(".",0)+3),H=`${ce}\u5E73\u65B9\u5343\u7C73`),m.mj=H,M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:q,label:{text:H,font:"26px \u6977\u4F53",show:!0,fillColor:At.WHITE,style:mA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:bn.BOTTOM,pixelOffset:new It(20,-40),heightReference:xn.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M}}},Ki.MOUSE_MOVE),R.setInputAction(function(V){let H;B=1;let q=f.scene.camera.getPickRay(V.position);q&&(H=f.scene.globe.pick(q,f.scene));let ie=f.scene.pick(V.position),Z=!1;if(ie){let oe=f.scene.pickPosition(V.position);oe&&(H=oe),Z=!0}H&&C&&(y.push(H),x=new Un(y))},Ki.LEFT_CLICK),R.setInputAction(function(){R.removeInputAction(Ki.LEFT_CLICK),R.removeInputAction(Ki.LEFT_DOUBLE_CLICK),f.trackedEntity=void 0,C=!1,Q=w.add({show:!0,id:"measureTool",position:y[y.length-1],pixelOffset:new It(0,20),eyeOffset:new ee(0,0,0),horizontalOrigin:tA.CENTER,verticalOrigin:bn.CENTER,scale:1,color:new At(1,1,1,1)}),L.style.display="none",R.destroy(),O(o)&&typeof o=="function"&&o(m)},Ki.RIGHT_CLICK);let U=function(V){let H=0,q=0,ie=0;for(let oe=0;oe<V.length;oe++)H+=V[oe].x,q+=V[oe].y,ie+=V[oe].z;return new ee(H/V.length,q/V.length,ie/V.length)};return this};yy.prototype.to_N=function(o){let m=Math.sqrt(0)/1737400;return 1737400/Math.sqrt(1-m*m*Math.sin(o)*Math.sin(o))};yy.prototype.to_Sm=function(o){let m=Math.sqrt(0)/1737400,C,y,x,v,E;return C=1+m*m*3/4+Math.pow(m,4)*45/64+Math.pow(m,6)*175/256+Math.pow(m,8)*11025/16384,y=Math.pow(m,2)*3/4+Math.pow(m,4)*15/16+Math.pow(m,6)*525/512+Math.pow(m,8)*2205/2048,x=Math.pow(m,4)*15/64+Math.pow(m,6)*105/256+Math.pow(m,8)*2205/4096,v=Math.pow(m,6)*35/512+Math.pow(m,8)*315/2048,E=Math.pow(m,8)*315/16384,1737400*(1-m*m)*(C*o-y/2*Math.sin(2*o)+x/4*Math.sin(4*o)-v/6*Math.sin(6*o)+E/8*Math.sin(8*o))};yy.prototype.to_Radian=function(o){return o*Math.PI/180};yy.prototype.Gauss_to_XY=function(o,A,f){let y=Math.sqrt(0)/1737400,x=0,v=0,E=0,I=0,w=this.to_Radian(f);A=this.to_Radian(A),o=this.to_Radian(o);let Q=o-w,M=Math.cos(A);I=this.to_N(A),E=I*Math.cos(A),x=Math.tan(A),v=y*M;let B=Math.pow(x,2),T=Math.pow(x,4),D=Math.pow(v,2),F=Math.pow(v,4),L=Math.pow(M,3),R=Math.pow(M,5),k=this.to_Sm(A)+Math.pow(Q,2)/2*E*M*x+Math.pow(Q,4)/24*x*E*L*(5-B+9*D+4*F)+Math.pow(Q,6)/720*x*E*R*(61-58*x*x+T+270*D-330*x*x*D),U=Q*I*M+Math.pow(Q,3)/6*I*L*(1-x*x+v*v)+Math.pow(Q,5)/120*I*R*(5-18*x*x+T+14*D-58*D*B);return new It(U,k)};yy.prototype.getArea=function(o,A){let f=0;for(let m=0;m<o.length-2;m++){let C=(m+1)%o.length,y=(m+2)%o.length,x=this.Angle(o[m],o[C],o[y]),v=this.getdistance(A[m],A[C]),E=this.getdistance(A[C],A[y]);f+=v*E*Math.abs(Math.sin(x))}return f<1e6?f=`${f.toFixed(4)}\u5E73\u65B9\u7C73`:f=`${(f/1e6).toFixed(4)}\u5E73\u65B9\u5343\u7C73`,f};yy.prototype.getdistance=function(o,A){let f=Kt.fromCartesian(o),m=Kt.fromCartesian(A),C=new l0;C.setEndPoints(f,m);let y=C.surfaceDistance;return y=Math.sqrt(Math.pow(y,2)+Math.pow(m.height-f.height,2)),y};yy.prototype.Bearing=function(o,A){let f=Math.PI/180,m=180/Math.PI,C=o.lat*f,y=o.lon*f,x=A.lat*f,v=A.lon*f,E=-Math.atan2(Math.sin(y-v)*Math.cos(x),Math.cos(C)*Math.sin(x)-Math.sin(C)*Math.cos(x)*Math.cos(y-v));return E<0&&(E+=Math.PI*2),E=E*m,E};yy.prototype.Angle=function(o,A,f){let m=this.Bearing(A,o),C=this.Bearing(A,f),y=m-C;return y<0&&(y+=360),y};yy.prototype.getuid=function(){return this.uuid(8,16)};yy.prototype.uuid=function(o,A){let f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),m=[],C;if(A=A||f.length,o)for(C=0;C<o;C++)m[C]=f[0|je.nextRandomNumber()*A];else{let y;for(m[8]=m[13]=m[18]=m[23]="-",m[14]="4",C=0;C<36;C++)m[C]||(y=0|je.nextRandomNumber()*16,m[C]=f[C===19?y&3|8:y])}return m.join("")};yy.prototype.deleteObject=function(){if(this.entities.remove(this.item),this._points.length>0){for(let o=0;o<this._points.length;o++)this.entities.remove(this._points[o]);this._points=[]}try{this.scene.primitives.remove(this.item)}catch(o){console.log(o)}this.item=void 0};var NW=yy;function fw(o,A){this._earthCtrl=o,this._coreMap=this._earthCtrl.coreMap,this._show=Ae(A.show,!0),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,10),this._heading=Ae(A.heading,0),this._pitch=Ae(A.pitch,0),this._distance=Ae(A.distance,300),this._position=ee.fromDegrees(A.lon,A.lat,A.height),this._horizontalViewAngle=Ae(A.horizontalViewAngle,90),this._verticalViewAngle=Ae(A.verticalViewAngle,60),this._horizontalViewAngle=this.adjustViewRange(this._horizontalViewAngle),this._verticalViewAngle=this.adjustViewRange(this._verticalViewAngle),this._visibleAreaColor=Ae(A.visibleAreaColor,At.GREEN.withAlpha(.4)),this._invisibleAreaColor=Ae(A.invisibleAreaColor,At.RED.withAlpha(.4)),this._size=Ae(A.size,10240),this._softShadows=Ae(A.softShadows,!0),this._colorStyle=Ae(A.colorStyle,At.YELLOW),this._parameter=A,this._lineArray=[],this._visualCone=!0,this.pyramid=void 0,this.updateViewShed()}Object.defineProperties(fw.prototype,{show:{get:function(){return this._show},set:function(o){o!==this._show&&(this._show=o,this.updateViewShed())}},distance:{get:function(){return this._distance}},heading:{get:function(){return this._heading}},pitch:{get:function(){return this._pitch}},horizontalViewAngle:{get:function(){return this._horizontalViewAngle}},verticalViewAngle:{get:function(){return this._verticalViewAngle}},colorStyle:{get:function(){return this._colorStyle},set:function(o){this._colorStyle=o}},invisibleAreaColor:{get:function(){return this._invisibleAreaColor},set:function(o){this._invisibleAreaColor=o}},visibleAreaColor:{get:function(){return this._visibleAreaColor},set:function(o){this._visibleAreaColor=o}},visualCone:{get:function(){return this._visualCone},set:function(o){this._visualCone=o,this.visualConeShow(o)}}});fw.prototype.adjustViewRange=function(o){return o<=0?o=1:o>=180&&(o=179),o};fw.prototype.removeFromMap=function(){let o=this;O(o.viewShedMap)&&(o.viewShedMap.enabled=!1),O(o.pyramid)&&(o._earthCtrl.entities.removeById(o.pyramid.id),o.pyramid=null);for(let A=0;A<o._lineArray.length;A++){let f=o._lineArray[A];o._earthCtrl.entities.remove(f)}o._lineArray=[]};fw.prototype.visualConeShow=function(o){let A=this;O(A.pyramid)&&(A.pyramid.show=o);for(let f=0;f<A._lineArray.length;f++){let m=A._lineArray[f];m.show=o}};fw.prototype.addVisualPyramid=function(){let o=this,A=new u6({radii:new Bn(function(){return new ee(o._distance,o._distance,o._distance)},!1),minimumClock:new Bn(function(){return je.toRadians(90-o._heading-o._horizontalViewAngle/2)},!1),maximumClock:new Bn(function(){return je.toRadians(90-o._heading+o._horizontalViewAngle/2)},!1),minimumCone:new Bn(function(){return je.toRadians(90-o._verticalViewAngle/2)},!1),maximumCone:new Bn(function(){return je.toRadians(90+o._verticalViewAngle/2)},!1),fill:!1,outline:!0,subdivisions:128,slicePartitions:32,stackPartitions:16,outlineColor:new Bn(function(){return o._colorStyle},!1)}),f=new UA({position:new Bn(function(){return o._position},!1),ellipsoid:A});this.pyramid=o._earthCtrl.entities.add(f)};fw.prototype.createLightCamera=function(){O(this.viewShedMap)?this._lightCamera=this.viewShedMap._lightCamera:this._lightCamera=new Ml(this._coreMap.scene),this._lightCamera.position=this._position};fw.prototype.updateParameters=function(o){let A=this,f=A._lightCamera;if(!!O(o)&&(O(o.lon)||O(o.lat)||O(o.height)||O(o.heading)||O(o.pitch)||O(o.roll)||O(o.far)||O(o.distance)||O(o.verticalViewAngle)||O(o.horizontalViewAngle))){let m=this._parameter;for(let v in o)o.hasOwnProperty(v)&&O(m[v])&&(m[v]=o[v]);m.distance>=A.viewShedMap.maximumDistance&&(m.distance=A.viewShedMap.maximumDistance),A._heading=m.heading,A._pitch=m.pitch,A._distance=m.distance,A.viewShedMap._pointLightRadius=m.distance,m.verticalViewAngle=A.adjustViewRange(m.verticalViewAngle),A._verticalViewAngle=m.verticalViewAngle,m.horizontalViewAngle=A.adjustViewRange(m.horizontalViewAngle),A._horizontalViewAngle=m.horizontalViewAngle,A._position=ee.fromDegrees(m.lon,m.lat,m.height);let C=je.toRadians(m.heading);f.setView({destination:A._position,orientation:{heading:C,pitch:0,roll:0}}),f.frustum.far=m.far||1e5;let y=je.toRadians(A._horizontalViewAngle),x=je.toRadians(A._verticalViewAngle);f.frustum.aspectRatio=Math.tan(y/2)/Math.tan(x/2),y>x?f.frustum.fov=y:f.frustum.fov=x}};fw.prototype.createShadowMap=function(){if(O(this.viewShedMap)){this.viewShedMap.enabled=!0;return}this.viewShedMap=new oH({context:this._coreMap.scene.context,lightCamera:this._lightCamera,enabled:!0,isPointLight:!0,pointLightRadius:this._distance,cascadesEnabled:!1,size:this._size,softShadows:!0,normalOffset:!1,fromLightSource:!1,visibleAreaColor:this._visibleAreaColor,invisibleAreaColor:this._invisibleAreaColor}),this._earthCtrl.viewShedMapList.push(this.viewShedMap)};var Ux=new ee;fw.prototype.drawViewCentrum=function(){let o=this;function A(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=new dQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let f=this._earthCtrl.entities.add({polyline:{positions:new Bn(A,!1),material:this._colorStyle}});this._lineArray.push(f);function m(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=new dQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let C=this._earthCtrl.entities.add({polyline:{positions:new Bn(m,!1),material:this._colorStyle}});this._lineArray.push(C);function y(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=new dQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let x=this._earthCtrl.entities.add({polyline:{positions:new Bn(y,!1),material:this._colorStyle}});this._lineArray.push(x);function v(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Ux.x=Q.x*T*L,Ux.y=Q.y*T*F,Ux.z=Q.z*D;let R=dQ.changeCartesian3ByScalar(o._position,Ux);return[o._position,R]}let E=this._earthCtrl.entities.add({polyline:{positions:new Bn(v,!1),material:this._colorStyle}});this._lineArray.push(E)};fw.prototype.updateViewShed=function(){this.show?(this.createLightCamera(),this.setCameraParams(),this.createShadowMap(),this.addVisualPyramid(),this.drawViewCentrum()):this.removeFromMap()};fw.prototype.setCameraParams=function(){this._lightCamera.frustum.near=.1,this._lightCamera.frustum.far=this._distance;let o=je.toRadians(this._horizontalViewAngle),A=je.toRadians(this._verticalViewAngle);this._lightCamera.frustum.aspectRatio=Math.tan(o/2)/Math.tan(A/2),o>A?this._lightCamera.frustum.fov=o:this._lightCamera.frustum.fov=A,this._lightCamera.setView({destination:this._position,orientation:{heading:je.toRadians(this._heading),pitch:je.toRadians(this._pitch),roll:0}})};var Ele=fw;var rMe=Di.WGS84;function Kf(o){this._cesiumViewer=o,this.coreMap=o.coreMap,this._scene=this.coreMap.scene,this.loading||this.addLoading(),this._tooltip=CLi(this.coreMap.container)}function nMe(o,A){if(o===null||typeof o!="object"||o.constructor!==Object&&o.constructor!==Array)return o;if(o.constructor===Date||o.constructor===RegExp||o.constructor===Function||o.constructor===String||o.constructor===Number||o.constructor===Boolean)return new o.constructor(o);A=A||new o.constructor;for(let f in o)A[f]=typeof A[f]>"u"?nMe(o[f],null):A[f];return A}function AAt(o,A){let f=nMe(o),m;for(m in A)f[m]===void 0&&(f[m]=nMe(A[m]));return f}function CLi(o){let A=function(f){let m=document.createElement("DIV");m.className="twipsy right";let C=document.createElement("DIV");C.className="twipsy-arrow",m.appendChild(C);let y=document.createElement("DIV");y.className="twipsy-inner",m.appendChild(y),this._div=m,this._title=y,f.appendChild(m)};return A.prototype.setVisible=function(f){this._div.style.display=f?"block":"none"},A.prototype.showAt=function(f,m){f&&m&&(this.setVisible(!0),this._title.innerHTML=m,this._div.style.left=`${f.x+30}px`,this._div.style.top=`${f.y-this._div.clientHeight/2-15}px`)},new A(o)}Kf.prototype.addToolbar=function(o,A){return A=AAt(A,{container:o}),new Kf.Toolbar(this,A)};var hAt={shiftX:0,shiftY:0};Kf.prototype.createBillboardGroup=function(o,A,f){let m=new Kf.BillboardGroup(this,A);return m.addBillboards(o,f),m};Kf.BillboardGroup=function(o,A){this._drawHelper=o,this._scene=o._scene,this._options=AAt(A,hAt);let f=new iI;this._scene.primitives.add(f),this._billboards=f,this._orderedBillboards=[]};Kf.BillboardGroup.prototype.createBillboard=function(o,A){let f=this._billboards.add({show:!0,position:o,pixelOffset:new It(this._options.shiftX,this._options.shiftY),eyeOffset:new ee(0,0,-1e3),horizontalOrigin:tA.CENTER,verticalOrigin:bn.CENTER,scale:.3,image:Ae(this._options.iconUrl,`${globalThis.GEOWORLD_BASE_URL}Assets/Images/point.png`),color:new At(1,1,1,1)});if(A){let y=function(v){C.enableRotate=v},x=function(){let v=0;for(let E=m._orderedBillboards.length;v<E&&m._orderedBillboards[v]!==f;++v);return v},m=this,C=this._scene.screenSpaceCameraController;if(A.dragHandlers){let v=this,E=new Ur(v._scene.canvas);setListener(f,"leftDown",function(I){function w(M){f.position=M;for(let B=0,T=v._orderedBillboards.length;B<T&&v._orderedBillboards[B]!==f;++B);A.dragHandlers.onDrag&&A.dragHandlers.onDrag(x(),M)}function Q(M){E.destroy(),y(!0),A.dragHandlers.onDragEnd&&A.dragHandlers.onDragEnd(x(),M)}E.setInputAction(function(M){let B=v._scene.camera.pickEllipsoid(M.endPosition,rMe);B?w(B):Q(B)},Ki.MOUSE_MOVE),E.setInputAction(function(M){Q(v._scene.camera.pickEllipsoid(M.position,rMe))},Ki.LEFT_UP),y(!1),A.dragHandlers.onDragStart&&A.dragHandlers.onDragStart(x(),v._scene.camera.pickEllipsoid(I,rMe))})}A.onDoubleClick&&setListener(f,"leftDoubleClick",function(v){A.onDoubleClick(x())}),A.onClick&&setListener(f,"leftClick",function(v){A.onClick(x())}),A.tooltip&&(setListener(f,"mouseMove",function(v){m._drawHelper._tooltip.showAt(v,A.tooltip())}),setListener(f,"mouseOut",function(v){m._drawHelper._tooltip.setVisible(!1)}))}return f};Kf.BillboardGroup.prototype.insertBillboard=function(o,A,f){this._orderedBillboards.splice(o,0,this.createBillboard(A,f))};Kf.BillboardGroup.prototype.addBillboard=function(o,A){this._orderedBillboards.push(this.createBillboard(o,A))};Kf.BillboardGroup.prototype.addBillboards=function(o,A){let f=0;for(;f<o.length;f++)this.addBillboard(o[f],A)};Kf.BillboardGroup.prototype.updateBillboardsPositions=function(o){let A=0;for(;A<o.length;A++)this.getBillboard(A).position=o[A]};Kf.BillboardGroup.prototype.countBillboards=function(){return this._orderedBillboards.length};Kf.BillboardGroup.prototype.getBillboard=function(o){return this._orderedBillboards[o]};Kf.BillboardGroup.prototype.removeBillboard=function(o){this._billboards.remove(this.getBillboard(o)),this._orderedBillboards.splice(o,1)};Kf.BillboardGroup.prototype.remove=function(){this._billboards=this._billboards&&this._billboards.removeAll()&&this._billboards.destroy()};Kf.BillboardGroup.prototype.setOnTop=function(){this._scene.primitives.raiseToTop(this._billboards)};Kf.prototype.cleanUp=function(){this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1)};Kf.prototype.startDrawing=function(o){let A=this,f=this._scene;f.globe.depthTestAgainstTerrain=!0;let m=this._tooltip,C=3,y=[],x=[],v;this._positions=x;let E=new Ur(f.canvas);this._mouseHandler=E;let I=new Kf.BillboardGroup(this,hAt);this._markers=I,this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),E.setInputAction(function(Q){if(Q.position!==null){let M=f.camera.getPickRay(Q.position),B=f.globe.pick(M,f),T=Kt.fromCartesian(B),D=je.toDegrees(T.longitude),F=je.toDegrees(T.latitude);if(B){if(y.length===0&&(y.push(D,F),x.push(B),v=B,I.addBillboard(v)),x.length>=4){let L=Ss.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(L!==void 0){let R=L.x-Q.position.x,k=L.y-Q.position.y;if(R*R+k*k<16){y.splice(y.length-2,2),x.pop(),this.isLoading(!0),this.stopDrawing(o);return}}}y.push(D,F),x.push(B),I.addBillboard(B),x.length===C&&(A._prevEntity=A._cesiumViewer.factory.createElement({type:"polygon",parameters:{hierarchy:ee.fromDegreesArray(y),material:At.RED.withAlpha(.6),fill:!0}}),A._prevEntity.polygon.hierarchy=w())}}}.bind(this),Ki.LEFT_CLICK),E.setInputAction(function(Q){let M=Q.endPosition;if(M!==null)if(x.length===0)m.showAt(M,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let B=f.camera.getPickRay(M),T=f.globe.pick(B,f),D=Kt.fromCartesian(T),F=je.toDegrees(D.longitude),L=je.toDegrees(D.latitude);if(T&&(y.splice(y.length-2,2),x.pop(),y.push(F,L),x.push(T),I.getBillboard(x.length-1).position=T,m.showAt(M,"\u53CC\u51FB\u7ED3\u675F\u7ED8\u5236"),x.length>=3&&x.length>=4)){let R=Ss.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(R!==void 0){let k=R.x-M.x,U=R.y-M.y;k*k+U*U<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}.bind(this),Ki.MOUSE_MOVE),E.setInputAction(function(Q){x.length<C+2||(this.isLoading(!0),setTimeout(()=>{this.stopDrawing(o)},100))}.bind(this),Ki.LEFT_DOUBLE_CLICK);function w(){return ee.fromDegreesArray(y)}};Kf.prototype.stopDrawing=function(o){this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1),document.body.style.cursor="wait";let A=this.computeCutVolume(),f=A.maxHeight;document.body.style.cursor="default",typeof o=="function"&&o(A.volume);let m={polygon:{hierarchy:{positions:this._positions},extrudedHeight:f,closeTop:!1,closeBottom:!1,material:At.RED.withAlpha(.5),outline:!0,outlineColor:At.WHITE,outlineWidth:2}};this._prevEntity=this._cesiumViewer.entities.add(m),this.isLoading(!1)};Kf.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,o.appendChild(A),this.loading=o,this.coreMap.container.appendChild(o)};Kf.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};Kf.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};function yLi(o){let A=[],f=[];for(let Q=0;Q<o.length;Q++){let M=Kt.fromCartesian(o[Q]);A.push(M.longitude),f.push(M.latitude)}let m=0,C=0,y=0,x=0,v=0,E=0,I=0,w=0;for(let Q=0;Q<o.length;Q++)m=A[Q],C=f[Q],Q===o.length-1?(y=A[0],x=f[0]):(y=A[Q+1],x=f[Q+1]),E=m*x-y*C,v+=E,I+=(m+y)*E,w+=(C+x)*E;return v*=.5,I/=6*v,w/=6*v,new Kt(I,w)}function xLi(o,A,f){let m=ee.distance(o,A),C=ee.distance(A,f),y=ee.distance(f,o),x=(m+C+y)/2;return Math.sqrt(x*(x-m)*(x-C)*(x-y))}Kf.prototype.computeCutVolume=function(){let o=15e3;for(let k=0;k<this._positions.length;k++){let U=Kt.fromCartesian(this._positions[k]),V=this._scene.globe.getHeight(U);o>V&&(o=V)}let A=Math.PI/Math.pow(2,11);A=A/64;let f=new rh.fromPositions({positions:this._positions,vertexFormat:za.FLAT_VERTEX_FORMAT,granularity:A}),m=new rh.createGeometry(f),C=0,y=0,x,v,E,I,w,Q,M,B,T,D,F,L;for(let k=0;k<m.indices.length;k+=3)x=m.indices[k],v=m.indices[k+1],E=m.indices[k+2],D=new ee(m.attributes.position.values[x*3],m.attributes.position.values[x*3+1],m.attributes.position.values[x*3+2]),F=Kt.fromCartesian(D),I=this._scene.globe.getHeight(F),M=ee.fromRadians(F.longitude,F.latitude,0),y<I&&(y=I),D=new ee(m.attributes.position.values[v*3],m.attributes.position.values[v*3+1],m.attributes.position.values[v*3+2]),F=Kt.fromCartesian(D),w=this._scene.globe.getHeight(F),B=ee.fromRadians(F.longitude,F.latitude,0),y<w&&(y=w),D=new ee(m.attributes.position.values[E*3],m.attributes.position.values[E*3+1],m.attributes.position.values[E*3+2]),F=Kt.fromCartesian(D),Q=this._scene.globe.getHeight(F),T=ee.fromRadians(F.longitude,F.latitude,0),y<Q&&(y=Q),L=xLi(M,B,T),C=C+L*(I-o+w-o+Q-o)/3;let R=yLi(this._positions);return this._volumeLabel=this._cesiumViewer.entities.add({position:ee.fromRadians(R.longitude,R.latitude,y+1e3),label:{text:`${C.toFixed(4)}\u7ACB\u65B9\u7C73`}}),{maxHeight:y,volume:C}};var Ile=Kf;function dAt(o,A){if(this.mEarthCtrl=o,this._parameter=A,this.coreMap=o.coreMap,this._color=Ae(A.color,new At(1,0,0,.7)),this._positions=A.positions,this._positions.length<3)throw new Ui("invalid positions length!");this._duration=Ae(A.duration,4e3),this._minHeight=Ae(A.minHeight,0),this._maxHeight=Ae(A.maxHeight,100),this._image=A.image,this._pps=null}function vLi(o,A){let f=Kt.fromCartesian(o[0]),m=f.longitude,C=f.latitude,y=m,x=C,v=A;for(let E=1;E<o.length;E++){let I=Kt.fromCartesian(o[E]);m>I.longitude?m=I.longitude:y<I.longitude&&(y=I.longitude),C>I.latitude?C=I.latitude:x<I.latitude&&(x=I.latitude)}return new ee.fromRadians((m+y)/2,(C+x)/2,v)}function ELi(o){if(O(o._pps))return;let A=vLi(o._positions,o._minHeight),f=Kt.fromCartesian(A),m=new ai(A.x,A.y,A.z,1),C=new Kt(f.longitude,f.latitude,o.maxHeight+100),y=Kt.toCartesian(C),x=new ai(y.x,y.y,y.z,1),v=new ai,E=new ai,I=new ee,w=o.mEarthCtrl.coreMap.scene.camera,Q=o._positions.length;o._pps=new va({fragmentShader:_Li(Q),uniforms:{u_floodCenterEC:function(){return Xe.multiplyByVector(w._viewMatrix,m,v)},u_floodPlaneNormalEC:function(){let B=Xe.multiplyByVector(w._viewMatrix,m,v),T=Xe.multiplyByVector(w._viewMatrix,x,E);return I.x=T.x-B.x,I.y=T.y-B.y,I.z=T.z-B.z,ee.normalize(I,I),I},u_floodRange:function(){return o._positions},u_minHeight:function(){return o._minHeight},u_maxHeight:function(){return o._maxHeight},u_image:function(){return o.image},u_floodColor:function(){return o._color},u_positionsLength:function(){return o._positions.length}}}),o.mEarthCtrl.coreMap.scene.postProcessStages.add(o._pps)}function ILi(o){O(o._pps)&&(o.mEarthCtrl.coreMap.scene.postProcessStages.remove(o._pps),o._pps=null)}function _Li(o){return`uniform sampler2D colorTexture;
uniform sampler2D depthTexture;
varying vec2 v_textureCoordinates;
uniform vec4 u_floodCenterEC;
@@ -16835,7 +16835,7 @@
gl_FragColor = mix(gl_FragColor, u_floodColor, 0.3);
}
}
`}Object.defineProperties(dAt.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._pps!==null},set:function(o){o?ELi(this):ILi(this)}},maxHeight:{get:function(){return this._maxHeight},set:function(o){this._maxHeight=o}},minHeight:{get:function(){return this._minHeight},set:function(o){this._minHeight=o}}});var zO=dAt;function xy(o,A){this._earthCtrl=o,this._coreMap=o.coreMap,this._minHeight=Ae(A.minHeight,0),this._maxHeight=Ae(A.maxHeight,0),this._extrudedHeight=Ae(A.extrudedHeight,0),this.shapeTool=void 0,this._speed=Ae(A.speed,1),this._baseWaterColor=Ae(A.baseWaterColor,new At(.2,.3,.6,.5)),this._waterFrequency=Ae(A.waterFrequency,1e3),this._animationSpeed=Ae(A.animationSpeed,.01),this._amplitude=Ae(A.amplitude,10),this._isPolygon=Ae(A.isPolygon,!0),this.eventHelper=new Mx,this._nowHeight=null,this._height=Ae(A.height,void 0),this._type=Ae(A.type,"up")}xy.prototype.drawPolygon=function(o){let A=this;this.shapeTool=A._earthCtrl.shapeTool.createDrawShapeTool(function(f){A.setPolygon({positions:f.result}),o&&o(A)})};xy.prototype.setPolygon=function(o){this.positions=o.positions;let A=this,f=A.computePolygonHeightRange(this.positions);A._minHeight=f.minHeight,A._maxHeight=f.maxHeight,A._extrudedHeight=A._minHeight};xy.prototype.computePolygonHeightRange=function(o){let A=[],f=this._earthCtrl.coreMap;for(let D=0;D<o.length;D++)A.push(o[D].clone());let m,C,y,x,v,E,I,w=0,Q=9999,M=Math.PI/Math.pow(2,11)/64,B=new rh.fromPositions({positions:A,vertexFormat:za.FLAT_VERTEX_FORMAT,granularity:M}),T=new rh.createGeometry(B);for(let D=0;D<T.indices.length;D+=3)m=T.indices[D],C=T.indices[D+1],y=T.indices[D+2],I=new ee(T.attributes.position.values[3*m],T.attributes.position.values[3*m+1],T.attributes.position.values[3*m+2]),(x=f.scene.globe.getHeight(Kt.fromCartesian(I)))<Q&&(Q=x),w<x&&(w=x),I=new ee(T.attributes.position.values[3*C],T.attributes.position.values[3*C+1],T.attributes.position.values[3*C+2]),(v=f.scene.globe.getHeight(Kt.fromCartesian(I)))<Q&&(Q=v),w<v&&(w=v),I=new ee(T.attributes.position.values[3*y],T.attributes.position.values[3*y+1],T.attributes.position.values[3*y+2]),(E=f.scene.globe.getHeight(Kt.fromCartesian(I)))<Q&&(Q=E),w<E&&(w=E);return{maxHeight:w,minHeight:Q}};xy.prototype.removeFromMap=function(){this._isPolygon?O(this.primitive)&&(this.removePrimitive(),this._extrudedHeight=this.minHeight,this.primitive=null):O(this.flood)&&(this.flood.show=!1),this.eventHelper&&this.eventHelper.removeAll(),this.shapeTool&&this.shapeTool.removeFromMap()};xy.prototype._onTick=function(){let o=this;o._type==="up"?o._extrudedHeight>=o._maxHeight?(o._extrudedHeight=o._maxHeight,o._nowHeight=o._extrudedHeight,o.eventHelper.removeAll()):(o._isPolygon?o.removePrimitive():O(o.flood)||(o.flood=new zO(o._earthCtrl,{minHeight:o.minHeight,maxHeight:o._extrudedHeight,positions:o.positions}),o.flood.show=!0),o._extrudedHeight+=o._speed,o._isPolygon?o.addPrimitive():o.flood.maxHeight=o._extrudedHeight):o._type==="down"&&(o._extrudedHeight<=o._minHeight?(o._extrudedHeight=o._minHeight,o._nowHeight=o._extrudedHeight,o.eventHelper.removeAll()):(o._isPolygon?o.removePrimitive():O(o.flood)||(o.flood=new zO(o._earthCtrl,{minHeight:o.minHeight,maxHeight:o._extrudedHeight,positions:o.positions}),o.flood.show=!0),o._extrudedHeight-=o._speed,o._isPolygon?o.addPrimitive():o.flood.maxHeight=o._extrudedHeight))};xy.prototype._onTickNext=function(){let o=this;o._nowHeight?o._type==="up"?o._extrudedHeight>=o._nowHeight+o._height?(o._extrudedHeight=o._nowHeight+o._height,o._nowHeight=o._extrudedHeight,o.eventHelper.removeAll()):(o._isPolygon?o.removePrimitive():O(o.flood)||(o.flood=new zO(o._earthCtrl,{minHeight:o.minHeight,maxHeight:o._extrudedHeight,positions:o.positions}),o.flood.show=!0),o._extrudedHeight+=o._speed,o._isPolygon?o.addPrimitive():o.flood.maxHeight=o._extrudedHeight):o._type==="down"&&(o._extrudedHeight<=o._nowHeight-o._height?(o._extrudedHeight=o._nowHeight-o._height,o._nowHeight=o._extrudedHeight,o.eventHelper.removeAll()):(o._isPolygon?o.removePrimitive():O(o.flood)||(o.flood=new zO(o._earthCtrl,{minHeight:o.minHeight,maxHeight:o._extrudedHeight,positions:o.positions}),o.flood.show=!0),o._extrudedHeight-=o._speed,o._isPolygon?o.addPrimitive():o.flood.maxHeight=o._extrudedHeight)):o._type==="up"?o._extrudedHeight>=o._minHeight+o._height?(o._extrudedHeight=o._minHeight+o._height,o._nowHeight=o._extrudedHeight,o.eventHelper.removeAll()):(o._isPolygon?o.removePrimitive():O(o.flood)||(o.flood=new zO(o._earthCtrl,{minHeight:o.minHeight,maxHeight:o._extrudedHeight,positions:o.positions}),o.flood.show=!0),o._extrudedHeight+=o._speed,o._isPolygon?o.addPrimitive():o.flood.maxHeight=o._extrudedHeight):o._type==="down"&&(o._extrudedHeight<=o._maxHeight-o._height?(o._extrudedHeight=o._maxHeight-o._height,o._nowHeight=o._extrudedHeight,o.eventHelper.removeAll()):(o._isPolygon?o.removePrimitive():O(o.flood)||(o.flood=new zO(o._earthCtrl,{minHeight:o.minHeight,maxHeight:o._extrudedHeight,positions:o.positions}),o.flood.show=!0),o._extrudedHeight-=o._speed,o._isPolygon?o.addPrimitive():o.flood.maxHeight=o._extrudedHeight))};xy.prototype.removePrimitive=function(){O(this.primitive)&&this._earthCtrl.primitives.remove(this.primitive)};xy.prototype.polygonAnalysis=function(){let o=this;O(o.shapeTool)&&(o.shapeTool.removeFromMap(),o.shapeTool=void 0),o._height?o.eventHelper.add(o._earthCtrl.coreMap.clock.onTick,xy.prototype._onTickNext,this):o.eventHelper.add(o._earthCtrl.coreMap.clock.onTick,xy.prototype._onTick,this);let A={};A.normalMap=`${globalThis.GEOWORLD_BASE_URL}Assets/Images/waterNormals.jpg`,A.baseWaterColor=o.baseWaterColor,A.frequency=o.waterFrequency,A.animationSpeed=o.animationSpeed,A.amplitude=o.amplitude;let f=new ss({fabric:{type:"Water",uniforms:A}});f.update(o._earthCtrl.coreMap.scene.context),o.primitiveAppearance=new MY({material:f,fragmentShaderSource:PY})};xy.prototype.postAnalysis=function(){let o=this;O(o.shapeTool)&&(o.shapeTool.removeFromMap(),o.shapeTool=void 0),o._height?o.eventHelper.add(o._earthCtrl.coreMap.clock.onTick,xy.prototype._onTickNext,this):o.eventHelper.add(o._earthCtrl.coreMap.clock.onTick,xy.prototype._onTick,this)};xy.prototype.addPrimitive=function(){let o=this;o.primitive=o._earthCtrl.primitives.add(new $a({geometryInstances:new co({geometry:rh.fromPositions({positions:o.positions,extrudedHeight:o._extrudedHeight})}),asynchronous:!1,appearance:o.primitiveAppearance}))};xy.prototype.startAnalysis=function(){let o=this;setTimeout(()=>{o._isPolygon?o.polygonAnalysis():o.postAnalysis()},100)};Object.defineProperties(xy.prototype,{isPolygon:{get:function(){return this._isPolygon}},minHeight:{set:function(o){this._minHeight=o},get:function(){return this._minHeight}},maxHeight:{set:function(o){this._maxHeight=o},get:function(){return this._maxHeight}},speed:{set:function(o){this._speed=o},get:function(){return this._speed}},baseWaterColor:{set:function(o){this._baseWaterColor=o},get:function(){return this._baseWaterColor}},waterFrequency:{set:function(o){this._waterFrequency=o},get:function(){return this._waterFrequency}},animationSpeed:{set:function(o){this._animationSpeed=o},get:function(){return this._animationSpeed}},amplitude:{set:function(o){this._amplitude=o},get:function(){return this._amplitude}},height:{set:function(o){this._height=o,this.postAnalysis()},get:function(){return this._height}},type:{set:function(o){this._type=o},get:function(){return this._type}}});var _le=xy;function KO(o,A){this._earthCtrl=o,this._coreMap=o.coreMap,this.shapeTool=void 0,this.positions=void 0,this.echarts=void 0,this.mCallback=Ae(A.callback,void 0),this.defaultChart=Ae(A.defaultChart,!0),this.step=Ae(A.step,20),this.image=A.image,this.echarstView=A.echartsView,this.echartsParentView=A.echartsParentView,this.billboard=void 0,this.minHeight=0,this.maxHeight=0,this.profile={arrHB:[],arrPoint:[],arrLX:[],points:[],distance:0}}KO.prototype.drawPolyLine=function(){let o=this;this.shapeTool=o._earthCtrl.shapeTool.createDrawShapeTool(function(A){o.setPolyline({positions:A.result})},"polyline")};KO.prototype.setPolyline=function(o){this.positions=o.positions};KO.prototype.startAnalysis=function(){if(!this.positions)return console.info("\u8BF7\u5148\u7ED8\u5236\u5256\u9762\u7EBF\uFF01");if(this.positions.length>1){this.profile.arrLX.push(0);for(let A=0;A<this.positions.length-1;A++){let f=this.positions[A],m=this.positions[A+1];this.profile2PointAnalysis(f,m)}this.processHeight();let o=this.profile;this.defaultChart&&wLi(this,o),O(this.mCallback)&&this.mCallback(o),this.positions=void 0}};KO.prototype.processHeight=function(){let o=this;if(!(o.profile.arrHB.length<=0)){o.minHeight=o.maxHeight=o.profile.arrHB[0];for(let A=1;A<o.profile.arrHB.length;A++){let f=o.profile.arrHB[A];f>o.maxHeight?o.maxHeight=f:f<o.minHeight&&(o.minHeight=f)}o.minHeight=parseInt(o.minHeight/100)*100;for(let A=0;A<o.profile.arrHB.length;A++){let f=o.profile.arrHB[A];o.profile.arrHB[A]=f-o.minHeight}}};var BLi=new ee;KO.prototype.profile2PointAnalysis=function(o,A){let f=this,m=ee.distance(o,A),C=parseInt(m/f.step),y=Kt.fromCartesian(o),x=Kt.fromCartesian(A);f.positions.length>2&&f.profile.arrLX.length>1&&f.profile.arrLX.push(f.profile.arrLX[f.profile.arrLX.length-1]+aMe(f.profile.points[f.profile.points.length-1],y)),f.profile.points.push(y),f.profile.arrPoint.push(oMe(o)),f.profile.arrHB.push(y.height);let v=f.profile.arrLX.length-1;console.info(v);for(let E=1;E<C;E++){let I=ee.lerp(o,A,E/C,BLi),w=Kt.fromCartesian(I),Q=f._coreMap.scene.globe.getHeight(w);w.height=Q;let M=aMe(f.profile.points[v+E-1],w);f.profile.distance=f.profile.distance+M,f.profile.points.push(w),f.profile.arrLX.push(f.profile.arrLX[v+E-1]+M),f.profile.arrPoint.push(oMe(I)),f.profile.arrHB.push(Q)}return f.profile.points.push(x),f.profile.arrLX.push(f.profile.arrLX[f.profile.arrLX.length-1]+aMe(f.profile.points[f.profile.points.length-1],x)),f.profile.arrPoint.push(oMe(A)),f.profile.arrHB.push(x.height),f.profile};function mAt(o,A){let f=document.getElementById(o);f.style.display=A?"block":"none"}var fAt;function wLi(o,A){if(A!==null&&A.arrPoint!==null){mAt(o.echartsParentView,!0),O(o.echarts)||(o.echarts=Nb.init(document.getElementById(o.echarstView),"dark"));let f=A.arrPoint,m={grid:{left:10,right:10,bottom:10,containLabel:!0},dataZoom:[{type:"inside",throttle:50}],tooltip:{trigger:"axis",formatter:function(C){let y="";if(C.length===0)return y;let x=f[C[0].dataIndex],v=C[0].value+o.minHeight;return fAt=new ee.fromDegrees(x.x,x.y,v),O(o.billboard)||(o.billboard=o._earthCtrl.entities.add({name:"profile_billboard",position:new Bn(function(){return fAt},!1),billboard:{verticalOrigin:bn.BOTTOM,image:o.image,iconWidth:8,iconHeight:8,scale:.5}})),o.billboard.show||(o.billboard.show=!0),y+=`\u6240\u5728\u4F4D\u7F6E&nbsp;${pAt(x.x)},${pAt(x.y)}<br />\u8DDD\u8D77\u70B9&nbsp;<label>${gAt(C[0].axisValue)}</label><br />${C[0].seriesName}&nbsp;<label style='color:${C[0].color};'>${gAt(v)}</label><br />`}},xAxis:[{name:"\u884C\u7A0B",type:"category",boundaryGap:!1,axisLine:{show:!1},axisLabel:{show:!1},data:A.arrLX}],yAxis:[{type:"value",axisLabel:{formatter:function(C){return`${C+o.minHeight}\u7C73`}}}],series:[{name:"\u9AD8\u7A0B\u503C",type:"line",smooth:!0,symbol:"none",sampling:"average",itemStyle:{normal:{color:"rgb(255, 70, 131)"}},areaStyle:{normal:{color:new Nb.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"rgb(255, 158, 68)"},{offset:1,color:"rgb(255, 70, 131)"}])}},data:A.arrHB}]};o.echarts.setOption(m)}}function gAt(o,A){if(o===null)return"";o=Number(o),(A===null||A==="auto")&&(o<1e3?A="m":A="km");let f="";switch(A){default:case"m":f=`${o.toFixed(2)}\u7C73`;break;case"km":f=`${(o*.001).toFixed(2)}\u516C\u91CC`;break;case"mile":f=`${(o*54e-5).toFixed(2)}\u6D77\u91CC`;break;case"zhang":f=`${(o*.3).toFixed(2)}\u4E08`;break}return f}function pAt(o){let A=o.toString();return A.slice(0,A.indexOf(".")+3)}function oMe(o){let A=Kt.fromCartesian(o),f=je.toDegrees(A.longitude),m=je.toDegrees(A.latitude),C=A.height;return{x:f,y:m,z:C}}function aMe(o,A){let f=new l0;f.setEndPoints(o,A);let m=f.surfaceDistance;return m=Math.sqrt(Math.pow(m,2)+Math.pow(A.height-o.height,2)),m}KO.prototype.removeFromMap=function(){let o=this;O(o.shapeTool)&&(o.shapeTool.removeFromMap(),o.shapeTool=void 0),O(o.billboard)&&(o._earthCtrl.entities.remove(o.billboard),o.billboard=void 0),mAt(o.echartsParentView,!1)};var Ble=KO;function wle(o,A){this._earthCtrl=o,this._coreMap=o.coreMap,this._skylineColor=Ae(A.color,At.RED.withAlpha(1)),this._postProccessStage=null,this._postProcessStages=this._coreMap.scene.postProcessStages,this._width=Ae(A.width,1),this._edgeDetection=bv.createEdgeDetectionStage({width:this._width||1}),this.addToMap()}wle.prototype.addToMap=function(){this.removeFromMap();let o=new va({name:"czm_skylinetemp",fragmentShader:"uniform sampler2D colorTexture;uniform sampler2D depthTexture;varying vec2 v_textureCoordinates;void main(void){float depth = czm_readDepth(depthTexture, v_textureCoordinates);vec4 color = texture2D(colorTexture, v_textureCoordinates);if(depth<1.0 - 0.000001){gl_FragColor = color;}else{gl_FragColor = vec4(1.0,0.0,0.0,1.0);}}"}),A=new va({name:"czm_skylinetemp1",fragmentShader:"uniform sampler2D colorTexture;uniform sampler2D redTexture;uniform sampler2D silhouetteTexture;uniform vec4 skylineColor;varying vec2 v_textureCoordinates;void main(void){vec4 redcolor=texture2D(redTexture, v_textureCoordinates);vec4 silhouetteColor = texture2D(silhouetteTexture, v_textureCoordinates);vec4 color = texture2D(colorTexture, v_textureCoordinates);if(redcolor.r == 1.0){gl_FragColor = mix(color, skylineColor, silhouetteColor.a);}else{gl_FragColor = color;}}",uniforms:{redTexture:o.name,silhouetteTexture:this._edgeDetection.name,skylineColor:this._skylineColor}});this._postProccessStage=new CC({name:"czm_skyline",stages:[this._edgeDetection,o,A],inputPreviousStageTexture:!1,uniforms:this._edgeDetection.uniforms}),this._postProcessStages.add(this._postProccessStage)};wle.prototype.removeFromMap=function(){this._postProccessStage&&(this._earthCtrl.coreMap.scene.postProcessStages.remove(this._postProccessStage),this._postProccessStage=null)};Object.defineProperties(wle.prototype,{});var ble=wle;function Qle(o,A){this._earthCtrl=o,this._coreMap=o.coreMap,this.leftIndex=void 0,this.rightIndex=void 0,this.addToMap(A.leftIndex,A.rightIndex)}var YO={dragStartX:0,_scene:void 0};Qle.prototype.addToMap=function(o,A){document.getElementById("slider")&&this.clear();let m=this._coreMap.imageryLayers,C=this._coreMap.scene;YO._scene=C;let y=this._coreMap.container,x=document.createElement("div");x.id="slider",x.style.position="absolute",x.style.cursor="e-resize",x.style.top=0,x.style.backgroundColor="#D3D3D3",x.style.width="8px",x.style.height="100%",x.style.zIndex="1000",y.appendChild(x);let v=m.get(o),E=m.get(A);this.leftIndex=o,this.rightIndex=A,v.splitDirection=uI.LEFT,E.splitDirection=uI.RIGHT;let I=document.getElementById("slider");C.splitPosition=I.offsetLeft/I.parentElement.offsetWidth,I.addEventListener("mousedown",yAt,!1),window.addEventListener("mouseup",CAt,!1),I.style.left="50%",YO._scene.splitPosition=.5};function CAt(){window.removeEventListener("mousemove",sMe,!1)}function yAt(o){let A=document.getElementById("slider");YO.dragStartX=o.clientX-A.offsetLeft,window.addEventListener("mousemove",sMe,!1)}function sMe(o){let A=document.getElementById("slider"),f=(o.clientX-YO.dragStartX)/A.parentElement.offsetWidth;A.style.left=`${100*f}%`,YO._scene.splitPosition=f}Qle.prototype.removeFromMap=function(){let o=document.getElementById("slider");if(o){YO._scene.splitPosition="0%",o.removeEventListener("mousedown",yAt,!1),window.removeEventListener("mouseup",CAt,!1),window.removeEventListener("mousemove",sMe,!1),o.remove();let A=this._coreMap.imageryLayers,f=A.get(this.leftIndex),m=A.get(this.rightIndex);f.splitDirection=uI.NONE,m.splitDirection=uI.NONE,YO._scene=void 0}};Object.defineProperties(Qle.prototype,{});var xAt=Qle;function kW(o,A){this._earthCtrl=o,this._coreMap=o.coreMap,this.color=Ae(A.color,At.RED.withAlpha(.5)),this.positions=A.positions,this.baseHeight=Ae(A.baseHeight,0),this._height=Ae(A.height,0),this.extrudedHeight=Ae(A.extrudedHeight,1e4),this.limitHeightPrimitive=null,this.addToMap()}kW.prototype.addToMap=function(){if(this.removeFromMap(),!this.positions)return;let o=ee.fromDegreesArray(this.positions),A=new co({geometry:new rh({polygonHierarchy:new Un(o),height:this.baseHeight,extrudedHeight:this.baseHeight+this.extrudedHeight}),attributes:{color:Yo.fromColor(this.color)}});this.limitHeightPrimitive=this._coreMap.scene.primitives.add(new s6({geometryInstances:A,releaseGeometryInstances:!1,classificationType:Gu.CESIUM_3D_TILE}))};kW.prototype.changeHeight=function(o){!this.limitHeightPrimitive||(console.log("?!?!?!",this.limitHeightPrimitive),this.limitHeightPrimitive.readyPromise.then(A=>{let f=Kt.fromCartesian(this.limitHeightPrimitive._primitive._boundingSpheres[0].center);console.log("???",f);let m=ee.fromRadians(f.longitude,f.latitude,this.baseHeight),C=ee.fromRadians(f.longitude,f.latitude,this.baseHeight+o),y=ee.subtract(C,m,new ee);console.log("!!!!",this.limitHeightPrimitive._primitive.modelMatrix),this.limitHeightPrimitive._primitive.modelMatrix=Xe.setTranslation(Xe.IDENTITY,y,new Xe),this.baseHeight=this.baseHeight+o}))};kW.prototype.removeFromMap=function(){this.limitHeightPrimitive&&(this._coreMap.scene.primitives.remove(this.limitHeightPrimitive),this.limitHeightPrimitive=void 0)};Object.defineProperties(kW.prototype,{});var Sle=kW;function vAt(o){this._earthCtrl=o}vAt.prototype.toDegrees=function(o){let A=Kt.fromCartesian(o);return{lon:je.toDegrees(A.longitude),lat:je.toDegrees(A.latitude),height:A.height}};var EAt=vAt;function JO(o){this._viewer=o.coreMap,this._trans=new EAt}JO.prototype.addClipping=function(o,A={}){if(this.remove(),A.type==="polygon"){let f=A.positions,m=[];f.forEach(v=>{m.push(this._trans.toDegrees(v))}),m.push(m[0]);let C;A.isInner?C=this.isClockWise(m):C=!this.isClockWise(m),C&&m.reverse();let y=[],x=this.getInverseTransform(o);for(let v=0;v<m.length-1;v++){let E=this.createPlane(m[v],m[v+1],x);y.push(E)}o.clippingPlanes=new rB({planes:y,unionClippingRegions:!A.isInner})}return this.item=o,this};JO.prototype.getInverseTransform=function(o){let A,f=o.root.transform;return f&&f.equals(Xe.IDENTITY)||!f?A=Vn.eastNorthUpToFixedFrame(o.boundingSphere.center):A=Xe.fromArray(o.root.transform),Xe.inverseTransformation(A,new Xe)};JO.prototype.getOriginCoordinateSystemPoint=function(o,A){let f=ee.fromDegrees(o.lon,o.lat);return Xe.multiplyByPoint(A,f,new ee(0,0,0))};JO.prototype.createPlane=function(o,A,f){let m=this.getOriginCoordinateSystemPoint(o,f),C=this.getOriginCoordinateSystemPoint(A,f),y=new ee(0,0,1),x=ee.subtract(C,m,new ee),v=ee.cross(x,y,new ee);v=ee.normalize(v,v);let E=Wa.fromPointNormal(m,v);return kM.fromPlane(E)};JO.prototype.isClockWise=function(o){if(o.length<3)return null;o[0]===o[o.length-1]&&(o=o.slice(0,o.length-1));let A={i:-1,val:90};for(let E=0;E<o.length;E++){let{lat:I}=o[E];I<A.val&&(A.val=I,A.i=E)}let f=(A.i+o.length-1)%o.length,m=A.i,C=(A.i+1)%o.length,y={lat:o[m].lat-o[f].lat,lon:o[m].lon-o[f].lon},x={lat:o[C].lat-o[m].lat,lon:o[C].lon-o[m].lon},v=x.lon*y.lat-y.lon*x.lat;return v===0?o[C].lon<o[f].lon:v>0};JO.prototype.remove=function(){this.item&&this.item.clippingPlanes&&this.item.clippingPlanes.removeAll(),this.item&&(this.item.clippingPlanes=void 0)};var Dle=JO;var lMe;function uMe(o,A){this._viewer=o.coreMap,lMe=o.coreMap,this.createTerrainModifier(A.name,A.polygon,A.altitude)}uMe.prototype.findDirectParent=function(o){try{let A=[];if(o.width===Math.PI)return null;for(let f=0;f<lMe.scene.globe._surface._tilesToRender.length;f++){let m=lMe.scene.globe._surface._tilesToRender[f],C=m._rectangle;Si.intersection(C,o)&&A.push(m)}return A}catch(A){console.log(A)}return null};uMe.prototype.createTerrainModifier=function(o,A,f){let m=A.length,C=new Array(m);C.fill(f);let y=Vu(),x=Date.now(),v=Si.fromCartesianArray(A),E=this.findDirectParent(v);this._viewer.terrainProvider&&this._viewer.terrainProvider._modifyTerrainObjects===void 0&&(this._viewer.terrainProvider._modifyTerrainObjects=[]);let I=this._viewer,w={id:y,name:o,show:!0,rectangle:v,vertices:A,heights:C,timeStamp:x,remove:function(){if(I.terrainProvider&&I.terrainProvider._modifyTerrainObjects)for(let Q=I.terrainProvider._modifyTerrainObjects.length-1;Q>=0;Q--)I.terrainProvider._modifyTerrainObjects[Q].id===y&&I.terrainProvider._modifyTerrainObjects.splice(Q,1);if(E)try{for(let Q=0;Q<E.length;Q++)try{E[Q]._parent.freeResources()}catch(M){console.log(M)}}catch(Q){console.log(Q)}}};if(this._viewer.terrainProvider._modifyTerrainObjects.push(w),E)try{for(let Q=0;Q<E.length;Q++)try{E[Q]._parent.freeResources()}catch(M){console.log(M)}}catch(Q){console.log(Q)}return w};var Tle=uMe;var YH;function cMe(o){this._earthCtrl=o,this.Viewer=o.coreMap,YH=o.coreMap}cMe.prototype.CreateTooltip=function(o={},A,f){let m,C,y,x,v;typeof o=="object"&&(m=o),m&&m.origin?(m.origin==="center"&&(C=15,y=-12),m.origin==="top"&&(C=15,y=-44),m.origin==="bottom"&&(C=15,y=20)):(C=15,y=20),m&&m.color?(m.color==="white"&&(x="background: rgba(255, 255, 255, 0.8);color: black;"),m.color==="black"&&(x="background: rgba(0, 0, 0, 0.5);color: white;"),m.color==="yellow"&&(x="color: black;background-color: #ffcc33;border: 1px solid white;")):x="background: rgba(0, 0, 0, 0.5);color: white;",m&&m.id?v=`toolTip${m.id}`:v="toolTip";let E=document.getElementById(v);if(!E){let I=document.createElement("div");nA(".map-widget",I);let w=`<div id="${v}" style="display: none;pointer-events: none;position: absolute;z-index: 1000;opacity: 0.8;border-radius: 4px;padding: 4px 8px;white-space: nowrap;font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px;${x}"></div>`;nA(".map-widget",w),E=document.getElementById(v)}return f?(E.innerHTML=o,E.style.left=`${A.x+C}px`,E.style.top=`${A.y+y}px`,E.style.display="block"):E.style.display="none",{tooltip:E,style:m,showAt:function(I,w){this.tooltip.innerHTML=w,this.style&&this.style.origin?(this.style.origin==="center"&&(C=15,y=-this.tooltip.offsetHeight/2),this.style.origin==="top"&&(C=15,y=-this.tooltip.offsetHeight-20),this.style.origin==="bottom"&&(C=15,y=20)):(C=15,y=-this.tooltip.offsetHeight/2),this.tooltip.style.left=`${I.x+C}px`,this.tooltip.style.top=`${I.y+y}px`,this.tooltip.style.display="block"},show:function(I){I?this.tooltip.style.display="block":this.tooltip.style.display="none"}}};cMe.prototype.CreateResultTooltip=function(o={}){let A,f,m,C=o.id?`resultToolTip${o.id}`:"resultToolTip",y=document.getElementById(C);if(o.color?(o.color==="white"&&(m="background: rgba(255, 255, 255, 0.8);color: black;"),o.color==="black"&&(m="background: rgba(0, 0, 0, 0.5);color: white;"),o.color==="blue"&&(m="background: rgba(48, 119, 221);color: white;"),o.color==="yellow"&&(m="color: black;background-color: #ffcc33;border: 1px solid white;")):m="color: black;background-color: #ffcc33;border: 1px solid white;",!y){let Q=`<div id="${C}" class="resultToolTip" style="display: none;pointer-events: none;position: absolute;z-index: 1000;opacity: 0.8;border-radius: 4px;padding: 4px 8px;white-space: nowrap;font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px;${m}"></div>`;nA(".map-widget",Q),y=document.getElementById(C)}let x=o.addX||0,v=o.addY||0,E,I=this;function w(){if(E){if(o.far!==void 0||o.near!==void 0){let M=I.getPointToCameraDistance(YH,E);if(M>o.far){y.style.display="none";return}else if(M<o.near){y.style.display="none";return}y.style.display="block"}let Q=YH.scene.cartesianToCanvasCoordinates(E);if(!Q)return;A=-y.offsetWidth/2+x,f=-y.offsetHeight+v,y.style.left=`${Q.x+A}px`,y.style.top=`${Q.y+f}px`}}return YH.clock.onTick.addEventListener(w),{tooltip:y,position:E,showAt:function(Q,M){if(this.tooltip.innerHTML=M,this.tooltip.style.display="block",this.position=Q,E=Q,E){let B=YH.scene.cartesianToCanvasCoordinates(E);if(!B)return;A=-this.tooltip.offsetWidth/2+x,f=-this.tooltip.offsetHeight+v,this.tooltip.style.left=`${B.x+A}px`,this.tooltip.style.top=`${B.y+f}px`}},show:function(Q){Q?(this.tooltip.style.display="block",E=this.position):(this.tooltip.style.display="none",E=void 0)},destroy(){YH.clock.onTick.removeEventListener(w),y.remove()}}};var gw=cMe;var AMe=class{constructor(){this.minHeight=Number.MAX_VALUE,this.maxHeight=Number.MIN_VALUE,this.cutVolume=0,this.fillVolume=0,this.baseArea=0}},hMe=class{constructor(){this.minHeight=Number.MAX_VALUE,this.maxHeight=Number.MIN_VALUE,this.avgHeight=0,this.baseArea=0}};function Mle(o,A){this._earthCtrl=o,this._viewer=o.coreMap,this.baseHeight=Ae(A.baseHeight,0),this.options=A}Mle.prototype.start=function(){let o=this.options.positions,A=this.options.countBase,f=this.options.basePositions,m=this.options.baseHeight,C=new AMe,y=[];o.forEach(Q=>{let M=Kt.fromCartesian(Q);this.baseHeight=Math.min(M.height,Ae(m,this.baseHeight)),y.push(Ss.wgs84ToWindowCoordinates(this._viewer.scene,Q))});let x=bLi(y),v=Zl.randomPoint(100,{bbox:[x[0],x[1],x[2],x[3]]}),E=QLi(y);Zl.voronoi(v,{bbox:[x[0],x[1],x[2],x[3]]}).features.forEach(Q=>{let M=SLi(E,Q.geometry);if(M.length>0){let B=this.computeCubeInfo(M);this.baseHeight>B.avgHeight?C.fillVolume+=(this.baseHeight-B.avgHeight)*C.baseArea:C.cutVolume+=(B.avgHeight-this.baseHeight)*C.baseArea,C.maxHeight=Math.max(C.maxHeight,B.maxHeight),C.minHeight=Math.min(C.minHeight,B.minHeight),C.baseArea+=B.baseArea}});let w=this.countBaseVolume(A,f,m);return w!==0&&(C.cutVolume+=w,C.fillVolume+=w),C};Mle.prototype.countBaseVolume=function(o,A,f){let m=this;if(o){let C=[],y=[];for(let Q=0;Q<A.length;Q=Q+3){y.push(A[Q+2]);let M=ee.fromDegrees(A[Q],A[Q+1],f),B=Kt.fromCartesian(M);C.push(B)}C.push(C[0]);let x=IAt(C);y.sort(function(Q,M){return Q-M});let v=y[0],E=y[y.length-1];return Number(E-v)*x/2}return 0};Mle.prototype.computeCubeInfo=function(o){let A=this,f=[],m=Number.MAX_VALUE,C=Number.MIN_VALUE,y=0;o.forEach(function(E){let I=A._earthCtrl.coreMap.scene.camera.getPickRay(E),w=A._earthCtrl.coreMap.scene.globe.pick(I,A._earthCtrl.coreMap.scene),Q=Kt.fromCartesian(w);f.push(Q),m=Math.min(m,Q.height),C=Math.max(C,Q.height),y+=Q.height});let x=y/o.length,v=new hMe;return v.minHeight=m,v.maxHeight=C,v.avgHeight=x,v.baseArea=IAt(f),v};function IAt(o){let A=[0],f=[0],m=new l0,C=Math.PI/180;for(let x=0;x<o.length-1;x++){let v=o[x],E=o[x+1];m.setEndPoints(v,E);let I=Math.sqrt(Math.pow(m.surfaceDistance,2)),w=E.latitude*C,Q=E.longitude*C,M=v.latitude*C,B=v.longitude*C,T=-Math.atan2(Math.sin(Q-B)*Math.cos(M),Math.cos(w)*Math.sin(M)-Math.sin(w)*Math.cos(M)*Math.cos(Q-B));T<0&&(T+=Math.PI*2),f.push(Math.sin(T)*I+f[x]),A.push(Math.cos(T)*I+A[x])}let y=0;for(let x=0;x<A.length-1;x++)y+=A[x]*f[x+1]-A[x+1]*f[x];return Math.abs(y+A[A.length-1]*f[0]-A[0]*f[f.length-1])/2}function bLi(o){let A=[],f=Number.MAX_VALUE,m=Number.MIN_VALUE,C=Number.MAX_VALUE,y=Number.MIN_VALUE;return o.forEach(x=>{f=Math.min(f,x.x),m=Math.max(m,x.x),C=Math.min(C,x.y),y=Math.max(y,x.y)}),A.push(f),A.push(C),A.push(m),A.push(y),A}function QLi(o){let A=[[]];return o.forEach(m=>{A[0].push([m.x,m.y])}),A[0].push([o[0].x,o[0].y]),Zl.polygon(A).geometry}function SLi(o,A){let f=Zl.intersect(o,A);return f?.geometry!==void 0?DLi(f?.geometry):[]}function DLi(o){let A=[];return o.coordinates.forEach(function(f){f.forEach(function(m){A.push(new It(m[0],m[1]))})}),A.push(new It(o.coordinates[0][0][0],o.coordinates[0][0][1])),A}var Ple=Mle;function Gx(o,A){this._earthCtrl=o,this._viewer=o.coreMap,this._cesium=_r,this._scene=o.coreMap.scene,this._Tooltip=new gw(o),this.loadingImg=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,this.tooltip=this._Tooltip.CreateTooltip(),this.FlattenIsDraw=!1,this.wallArr=[],this.hierarchy=[],this.tophierarchy=[],this.heightsort=[],this.FlattenPolygon=[],this.deepth=100,this.polygon=null,this.editPoint=[],this.nowPoint=null,this.editPosition=[],this.topPositions=null,this._volumeLabel=void 0,this._volumeLabel1=void 0,this._option=Ae(A.option,{}),this._irregularCut=Ae(A.irregularCut,!1),this.terrainFlatten=new IN(o.coreMap.scene),this.CreatePolygon(A.height,A.option,A.callback)}Gx.prototype.CreatePolygon=function(o,A,f){if(this.FlattenIsDraw)return;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=null),this.removeLabel(),this.addLoading(),this.FlattenIsDraw=!0;let m=this._viewer,C=this._cesium;this.deepth=o||this.deepth,this.removeFromMap(),!A&&(A={});let y=[],x=this.hierarchy,v=this.polygon,E,I=null,w=0,Q=this.heightsort,M=this.deepth,B=this.wallArr,T=this;this.drawHandler=new C.ScreenSpaceEventHandler(m.scene.canvas),m.scene.globe.depthTestAgainstTerrain=!0;let D=this.tooltip,F;this._viewer.container.style.cursor=`url(${window.SmartEarthRootUrl} 'Workers/image/cursor/draw.cur')`,this.drawHandler.setInputAction(function(V){E=R(V.position);let H=C.Cartographic.fromCartesian(E),q=C.Math.toDegrees(H.longitude),ie=C.Math.toDegrees(H.latitude),Z=H.height;y.push(E),x.push(q,ie,H.height),T.tophierarchy.push(q,ie,Z),w===0?(y.push(E),x.push(q,ie,H.height),F=m.entities.add({name:"\u4E34\u65F6\u7EBF",polyline:{positions:new C.CallbackProperty(()=>y,!1),clampToGround:!0,material:new C.ColorMaterialProperty(C.Color.YELLOW.withAlpha(.3)),width:3}})):w===1&&(F&&m.entities.remove(F),v=m.entities.add({name:null,id:T._earthCtrl.factory.createUUID(),polygon:{hierarchy:new C.PolygonHierarchy(C.Cartesian3.fromDegreesArrayHeights(x)),material:C.Color.YELLOW.withAlpha(.3)}}),v.polygon.hierarchy=new C.CallbackProperty(L,!1)),w++},C.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(function(V){if(w===0){D.showAt(V.endPosition,"\u5DE6\u952E\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u70B9");return}else w===1?D.showAt(V.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u7B2C\u4E8C\u4E2A\u70B9"):D.showAt(V.endPosition,"\u53F3\u952E\u7ED3\u675F\u7ED8\u5236");E=R(V.endPosition);let H=C.Cartographic.fromCartesian(E),q=C.Math.toDegrees(H.longitude),ie=C.Math.toDegrees(H.latitude);x.splice(x.length-3,3),y.splice(y.length-1,1),y.push(E),x.push(q,ie,H.height)},C.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(function(V){this.end&&this.end()}.bind(this),C.ScreenSpaceEventType.RIGHT_CLICK),this.end=V=>{if(D.show(!1),T._viewer.container.style.cursor="default",T.drawHandler.destroy(),F&&m.entities.remove(F),v&&m.entities.remove(v),this.FlattenIsDraw=!1,this.end=void 0,V==="cancel"||y.length<3)return;if(w<2){w=0;return}w=0;for(let se=2;se<x.length;se=se+3)Q.push(x[se]);Q.sort(function(se,ce){return se-ce}),v=m.entities.add({name:null,id:T._earthCtrl.factory.createUUID(),polygon:{hierarchy:new C.CallbackProperty(function(){return new C.PolygonHierarchy(C.Cartesian3.fromDegreesArrayHeights(x))},!1),material:new C.ImageMaterialProperty({image:C.defaultValue(A.bottomImgUrl,`${window.SmartEarthRootUrl}Workers/image/bottomplane.jpg`),repeat:new C.Cartesian2(1,1)})}}),y.push(y[0]);let H,q,ie,Z,oe,ne;for(let se=0;se<y.length-1;se++){H=C.Cartographic.fromCartesian(y[se]),q=C.Cartographic.fromCartesian(y[se+1]),ie=C.Math.toDegrees(H.longitude),oe=C.Math.toDegrees(H.latitude),Z=C.Math.toDegrees(q.longitude),ne=C.Math.toDegrees(q.latitude),I?I=I>q.height?q.height:I:I=H.height>q.height?q.height:H.height;let ce=T.getPoint(ie,oe,Z,ne,H.height,q.height),j=[],de=[];T.getHeightsFromLonLat(ce.positions,function(me){if(me){j=me;for(let _e=0;_e<j.length;_e++)de.push(T.heightsort[0]-T.deepth);T.drawwall(ce.wallJwd,j,de)}})}v.polygon.height=Q[0]-M,this.FlattenPolygon.push(v),this.originHeight=Q[0],k(y),this.topPositions=y,typeof f=="function"&&f(y)};function L(){return new C.PolygonHierarchy(C.Cartesian3.fromDegreesArrayHeights(x))}function R(V){let H;if(m.scene.terrainProvider.constructor.name==="EllipsoidTerrainProvider")H=m.camera.pickEllipsoid(V,m.scene.globe.ellipsoid);else{let ie=m.scene.camera.getPickRay(V);H=m.scene.globe.pick(ie,m.scene)}if(m.scene.pick(V)){let ie=m.scene.pickPosition(V);if(ie){H=ie;let Z=C.Cartographic.fromCartesian(H),oe=m.scene.globe.getHeight(Z);Z.height=oe,H=C.Cartographic.toCartesian(Z)}}return H}function k(V){let H=m.scene.globe,q=V.concat();q.splice(q.length-1,1);for(let Z=0;Z<q.length-1;Z++)q[Z].x===q[Z+1].x&&q[Z].y===q[Z+1].y&&(q.splice(Z,1),Z--);let ie=q.length;if(U(q)&&q.reverse(),T.irregularCut){T.terrainFlatten.clearPolygon();let Z=[],oe=m.scene.globe.ellipsoid;for(let ne=0;ne<q.length;ne++){let se=oe.cartesianToCartographic(q[ne]),ce=C.Math.toDegrees(se.longitude),j=C.Math.toDegrees(se.latitude),de=se.height;Z.push(ce,j,de)}T.terrainFlatten.addPolygon(Z),T.terrainFlatten.update(),T.terrainFlatten.clipPlaneOfFlatten=!0}else{let Z=[];for(let oe=0;oe<ie;++oe){let ne=(oe+1)%ie,se=C.Cartesian3.add(q[oe],q[ne],new C.Cartesian3);se=C.Cartesian3.multiplyByScalar(se,.5,se);let ce=C.Cartesian3.normalize(se,new C.Cartesian3),j=C.Cartesian3.subtract(q[ne],se,new C.Cartesian3);j=C.Cartesian3.normalize(j,j);let de=C.Cartesian3.cross(j,ce,new C.Cartesian3);de=C.Cartesian3.normalize(de,de);let me=new C.Plane(de,0),_e=C.Plane.getPointDistance(me,se);Z.push(new C.ClippingPlane(de,_e))}H.clippingPlanes=new C.ClippingPlaneCollection({planes:Z})}}function U(V){if(V.length>=3)return!((V[1].x-V[0].x)*(V[2].y-V[1].y)-(V[1].y-V[0].y)*(V[2].x-V[1].x)>0)}return this};Gx.prototype.getPoint=function(o,A,f,m,C,y){let x=this,v=160,E=je.lerp(o,f,1/v)-o,I=je.lerp(A,m,1/v)-A,w=[],Q=[],M=[],B;w.push(o,A),B=ee.fromDegrees(o,A),Q.push(Kt.fromCartesian(B));for(let T=0;T<v;T++){let D=o+(T+1)*E,F=A+(T+1)*I;w.push(D,F),B=ee.fromDegrees(D,F),Q.push(Kt.fromCartesian(B))}return w.push(f,m),B=ee.fromDegrees(f,m),Q.push(Kt.fromCartesian(B)),{wallJwd:w,positions:Q}};Gx.prototype.getHeightsFromLonLat=function(o,A){let f=this._viewer,m=f.camera,C=[];if(this.isHaveTerrain(f))if(O(f.terrainProvider.availability)){let y=vQ(f.terrainProvider,o);Promise.resolve(y).then(function(x){x.forEach(function(v){C.push(v.height)}),typeof A=="function"&&A(C)})}else o.forEach(function(y){let x=f.scene.globe.getHeight(y);C.push(x)}),typeof A=="function"&&A(C);else o.forEach(function(y){C.push(f.scene.globe.getHeight(y))}),typeof A=="function"&&A(C)};Gx.prototype.isHaveTerrain=function(){return!!(this._viewer.scene&&this._viewer.scene.terrainProvider&&this._viewer.scene.terrainProvider._layers)};Gx.prototype.drawwall=function(o,A,f){let m=this,C=m._viewer.entities.add({wall:{positions:new Bn(function(){return ee.fromDegreesArray(o)},!1),maximumHeights:A,minimumHeights:f}}),y=C.wall;y.material=new z0({image:Ae(m._option.wallImgUrl,`${window.SmartEarthRootUrl}Workers/image/dzmc.jpg`),repeat:new It(1,1)}),m.wallArr.push(C)};Gx.prototype.setDeepth=function(o){this.FlattenPolygon[0]&&this.FlattenPolygon[0].polygon.height.setValue(this.originHeight-o),this.wallArr.forEach(A=>{let f=A.wall.minimumHeights.getValue();f=Array(f.length),f.fill(this.originHeight-o),A.wall.minimumHeights.setValue(f)})};Gx.prototype.edit=function(o){let A=this,f=A.editPoint,m=A.nowPoint;if(A._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain=!1,m){for(let x of A.editPoint)x&&(x.show=!0);A.update(m,f,o);return}for(let x=2;x<A.hierarchy.length;x=x+3)A.hierarchy[x]=A.originHeight-A.deepth;A.FlattenPolygon[0]&&A._viewer.entities.remove(A.FlattenPolygon[0]),A.FlattenPolygon=[];let C=this._viewer.entities.add({name:null,id:A._earthCtrl.factory.createUUID(),polygon:{hierarchy:new Un(ee.fromDegreesArrayHeights(A.hierarchy)),material:new z0({image:Ae(A._option.bottomImgUrl,`${window.SmartEarthRootUrl}Workers/image/bottomplane.jpg`),repeat:new It(1,1)}),perPositionHeight:!0}});A.FlattenPolygon.push(C);let y=A.FlattenPolygon[0].polygon.hierarchy.getValue();for(let x of y.positions){let v=this._viewer.entities.add({id:A._earthCtrl.factory.createUUID(),position:x,point:{color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}});f.push(v)}A._earthCtrl.measure.pickObject(null,function(x){let v=x.pickedObject.id;for(let E of f)if(v.id===E.id){A.nowPoint=E,A.update(E,f,o);return}})};Gx.prototype.endEdit=function(){let o=this;if(o._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain=!0,o.editPoint.length>0)for(let A of o.editPoint)A&&(A.show=!1)};Gx.prototype.excavationAndFill=function(){this.removeLabel();let o=this;this.endEdit(),o.topPositions&&(this.isLoading(!0),setTimeout(()=>{let A=null,f=null,m=!1;if(o.editPosition.length>0){let v=[];f=[];for(let E=0;E<o.editPosition.length-1;E++){let I=Kt.fromCartesian(o.editPosition[E]),w=je.toDegrees(I.longitude),Q=je.toDegrees(I.latitude),M=I.height;v.push(M),f.push(w,Q,M)}v.sort(function(E,I){return I-E}),A=v[0],m=!0}else A=o.heightsort[0]-o.deepth;let y=new Ple(o._earthCtrl,{positions:o.topPositions,baseHeight:A,basePositions:f,countBase:m}).start(),x=o.computeCentroidOfPolygon(o.topPositions);this._volumeLabel=this._viewer.entities.add({position:ee.fromRadians(x.longitude,x.latitude,o.heightsort[o.heightsort.length-1]),label:{text:`\u6316\u65B9\u4F53\u79EF\uFF1A${y.cutVolume}\u7ACB\u65B9\u7C73`,pixelOffset:{x:0,y:-30},font:"16px \u5B8B\u4F53",fillColor:At.GOLD,verticalOrigin:bn.BOTTOM,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),this._volumeLabel1=this._viewer.entities.add({position:ee.fromRadians(x.longitude,x.latitude,o.heightsort[o.heightsort.length-1]),label:{text:`\u586B\u65B9\u4F53\u79EF\uFF1A${y.fillVolume}\u7ACB\u65B9\u7C73`,pixelOffset:{x:0,y:-70},font:"16px \u5B8B\u4F53",fillColor:At.GOLD,verticalOrigin:bn.BOTTOM,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),this.isLoading(!1),console.log(y.result)},100))};Gx.prototype.computeCentroidOfPolygon=function(o){let A=[],f=[],m=0,C=0;for(let v=0;v<o.length;v++){let E=Kt.fromCartesian(o[v]);m+=E.longitude,C+=E.latitude,A.push(E.longitude),f.push(E.latitude)}let y=0,x=0;return y=m/o.length,x=C/o.length,new Kt(y,x)};Gx.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=this.loadingImg,o.appendChild(A),this.loading=o,this._viewer.container.appendChild(o)};Gx.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};Gx.prototype.update=function(o,A,f){let m=this,C=o.position.getValue(),x=m._scene.globe.ellipsoid.cartesianToCartographic(C),v=je.toDegrees(x.longitude),E=je.toDegrees(x.latitude),I=x.height;o.position.setValue(ee.fromDegrees(v,E,I+f)),m.editPoint=A,m.editPosition=[];let w=[];for(let M of A){let B=M.position.getValue();w.push(B),m.editPosition.push(B)}m.FlattenPolygon[0].polygon.hierarchy=new Bn(function(){return new Un(w)},!0);let Q=m.editPosition;Q.push(Q[0]);for(let M=0;M<Q.length-1;M++){let T=[];for(let D=0;D<=160;D++){let F=ee.lerp(Q[M],Q[M+1],D/160,new ee),L=Kt.fromCartesian(F);T.push(L.height)}m.wallArr[M].wall.minimumHeights.setValue(T)}};Gx.prototype.removeFromMap=function(){this.endEdit(),this._earthCtrl.tools.clearTool(),this.editPoint=[],this.nowPoint=null;let o=this._viewer;if(this.wallArr.length>0){for(let A=0;A<this.wallArr.length;A++)o.entities.remove(this.wallArr[A]);this.wallArr=[]}o.scene.globe.clippingPlanes&&o.scene.globe.clippingPlanes.removeAll(),this.FlattenPolygon&&this.FlattenPolygon.length>0&&(this.FlattenPolygon.forEach(function(A){o.entities.remove(A)}),this.FlattenPolygon=[]),this.FlattenIsDraw=!1,this.removeLabel(),this.terrainFlatten&&this.terrainFlatten.clearPolygon()};Gx.prototype.removeLabel=function(){this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0)};var Rle=Gx;function _C(o,A={}){this._earthCtrl=o,this._viewer=o.coreMap,this._scene=o.coreMap.scene,this.options=Ae(A,{}),this._Tooltip=new gw(o),this._tooltip=this._Tooltip.CreateTooltip(),this._drawColor={point:Ae(this.options.drawColor?.point,At.BLUE),polyline:Ae(this.options.drawColor?.polyline,At.YELLOW),polygon:Ae(this.options.drawColor?.point,At.YELLOW.withAlpha(.5))},this.selectDatum=!0,this.onlyTerrain=!0,this.tin=!1,this._volumeTin=[],this.loadingImg=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,this.unit=Ae(A.unit,"km\xB3")}_C.prototype.removeFromMap=function(){this._prevEntity!==void 0&&(this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._prevEntity1!==void 0&&(this._viewer.entities.remove(this._prevEntity1),this._prevEntity1=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this._volumeTin.forEach(o=>{this._viewer.entities.remove(o)}),this._volumeTin=[],this.addPointHandle&&(this.addPointHandle.destroy(),this.addPointHandle=void 0),this.Triangulation=[],this.tinData=void 0,this._tooltip.show(!1)};_C.prototype.deleteObject=_C.prototype.removeFromMap;_C.prototype.startDrawing=function(o={},A="auto",f){let m=this._scene,C=this._tooltip,y=3,x=[],v=[],E=[],I;this._positions=v,this._degreesArr=E,this._drawColor.point=o.point||this._drawColor.point,this._drawColor.polyline=o.polyline||this._drawColor.polyline,this._drawColor.polygon=o.polygon||this._drawColor.polygon,this.loadingImg=o.loading||this.loadingImg,this.tin=Ae(o.tin,!0),this.onlyTerrain=Ae(o.onlyTerrain,!1),this.selectDatum=Ae(o.selectDatum,!0);let w=this;this._mouseHandler&&this._mouseHandler.destroy(),this.loading||this.addLoading();let Q=new Ur(m.canvas);this._mouseHandler=Q,this.removeFromMap(),this._viewer.container.style.cursor=`url(${globalThis.GEOWORLD_BASE_URL} 'Workers/image/cursor/draw.cur')`;let M;Q.setInputAction(function(T){if(T.position!==null){let D=m.camera.getPickRay(T.position),F=m.globe.pick(D,m);if(this._viewer.scene.pick(T.position)){let R=this._viewer.scene.pickPosition(T.position);R&&(F=R)}if(F){let R=Kt.fromCartesian(F),k=je.toDegrees(R.longitude),U=je.toDegrees(R.latitude);if(x.length===0&&(x.push(k,U),E.push([k,U]),v.push(F),I=F),v.length>=4){let V=Ss.wgs84ToWindowCoordinates(this._viewer.scene,I);if(V!==void 0){let H=V.x-T.position.x,q=V.y-T.position.y;if(H*H+q*q<16){x.splice(x.length-2,2),v.pop(),this.stopDrawing(f);return}}}x.push(k,U),E.push([k,U]),v.push(F),v.length===2&&!M&&(M=this._viewer.entities.add({name:"\u4E34\u65F6\u7EBF",polyline:{positions:new Bn(function(){return v},!1),clampToGround:!0,material:w._drawColor.polygon,width:3}})),v.length===y&&(M&&this._viewer.entities.remove(M),this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:new Un(ee.fromDegreesArray(x)),material:w._drawColor.polygon,fill:!0}}),this._prevEntity.polygon.hierarchy=new Bn(B,!1))}}}.bind(this),Ki.LEFT_CLICK),Q.setInputAction(function(T){let D=T.endPosition;if(D!==null)if(v.length===0)C.showAt(D,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let F=m.camera.getPickRay(D),L=m.globe.pick(F,m),R=this._viewer.scene.pick(D),k=!1;if(R){let U=this._viewer.scene.pickPosition(D);U&&(L=U),k=!0}if(L){let U=Kt.fromCartesian(L),V=je.toDegrees(U.longitude),H=je.toDegrees(U.latitude);if(x.splice(x.length-2,2),E.pop(),v.pop(),x.push(V,H),E.push([V,H]),v.push(L),C.showAt(D,"\u53F3\u952E\u7ED3\u675F\u7ED8\u5236"),v.length>=3&&v.length>=4){let q=Ss.wgs84ToWindowCoordinates(this._viewer.scene,I);if(q!==void 0){let ie=q.x-D.x,Z=q.y-D.y;ie*ie+Z*Z<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}}.bind(this),Ki.MOUSE_MOVE),Q.setInputAction(function(T){this.end&&this.end()}.bind(this),Ki.RIGHT_CLICK);function B(){return new Un(ee.fromDegreesArray(x))}return this.end=T=>{if(this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),w._viewer.container.style.cursor="default",this._tooltip.show(!1),M&&this._viewer.entities.remove(M),this.end=void 0,!(v.length<y)){if(this._prevEntity&&(this._prevEntity.polygon.hierarchy=ee.fromDegreesArray(x)),T==="cancel"){this._prevEntity&&this._viewer.entities.remove(this._prevEntity);return}this.stopDrawing(A,f)}},this};_C.prototype.stopDrawing=function(o,A){this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this._volumeTin.forEach(f=>{this._viewer.entities.remove(f)}),this._volumeTin=[],this.isLoading(!0),setTimeout(()=>{let f=this.computeCutVolume(o,this.onlyTerrain),m=C=>{let y=C.maxHeight,x=C.minHeight;this._prevEntity.polygon.height=C.minHeight,this._prevEntity.polygon.heightReference=0;let v={id:this._earthCtrl.factory.createUUID(),polygon:{hierarchy:{positions:this._positions},height:x,extrudedHeight:y,closeTop:!1,closeBottom:!1,material:At.CYAN.withAlpha(.2),outline:!0,outlineColor:At.RED,outlineWidth:2}};if(this._prevEntity1=this._viewer.entities.add(v),typeof A=="function"&&A(C),this.selectDatum){let E=()=>{this.addPoint(I=>{this.setDatum(I,w=>{typeof A=="function"&&A({...C,...w}),E()})})};E()}};this.onlyTerrain?f.then(C=>{m(C)}):m(f)},100)};_C.prototype.computeCentroidOfPolygon=function(o){let A=[],f=[],m=0,C=0;for(let v=0;v<o.length;v++){let E=Kt.fromCartesian(o[v]);m+=E.longitude,C+=E.latitude,A.push(E.longitude),f.push(E.latitude)}let y=0,x=0;return y=m/o.length,x=C/o.length,new Kt(y,x)};_C.prototype.computeCutVolume=function(o,A){let f=this,m=15e3,C=-15e3;if(o==="auto"){let E=wi.fromPoints(this._positions);console.log("BoundingSphere.radius",E.radius),o=E.radius/20}let y=this.getPointsInPolygon(this._degreesArr,o,!0),x=Zl.polygon([this._degreesArr]),v=()=>{let{tin:E}=this.tinFromPoints(y,{getArea:!0,polygon:x});this.tinData=E;let I={fill:0,dig:0},w,Q,M,B,T;this.Triangulation=[],E.features.forEach(L=>{if(L.positions){if(this.tin){let k=this._viewer.entities.add({polygon:{hierarchy:new Un(L.positions),material:this._drawColor.polygon,perPositionHeight:!0,outline:!0,outlineColor:At.YELLOW}});this._volumeTin.push(k)}let R=L.geometry.coordinates[0];w=R[0][2],Q=R[1][2],M=R[2][2],T=L.area,this.Triangulation.push({bottomArea:T,height:[w,Q,M]}),B=(w-m+Q-m+M-m)/3,B>0?I.dig=I.dig+T*B:I.fill=I.fill-T*B}});let D=this.computeCentroidOfPolygon(this._positions);this.unit!=="m\xB3"&&(I.dig=I.dig/1e9,I.fill=I.fill/1e9);let F=this.unit==="m\xB3"?"\u7ACB\u65B9\u7C73":"\u7ACB\u65B9\u5343\u7C73";return this._volumeLabel=this._viewer.entities.add({position:ee.fromRadians(D.longitude,D.latitude,C),label:{text:`\u6316\u65B9\u4F53\u79EF\uFF1A${I.dig.toFixed(4)}${F}`,pixelOffset:{x:0,y:-30},font:"16px \u5B8B\u4F53",fillColor:At.GOLD,verticalOrigin:bn.BOTTOM,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),this._volumeLabel1=this._viewer.entities.add({position:ee.fromRadians(D.longitude,D.latitude,C),label:{text:`\u586B\u65B9\u4F53\u79EF\uFF1A${I.fill.toFixed(4)}${F}`,pixelOffset:{x:0,y:-70},font:"16px \u5B8B\u4F53",fillColor:At.GOLD,verticalOrigin:bn.BOTTOM,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),this.isLoading(!1),{maxHeight:C,minHeight:m,volume:I,unit:this.unit,spacing:o}};if(A){let E=[];return y.features.forEach(w=>{let Q=w.geometry.coordinates;E.push(Kt.fromDegrees(Q[0],Q[1]))}),vQ(this._viewer.scene.globe.terrainProvider,E).then(w=>(y.features.forEach((Q,M)=>{let B=Q.geometry.coordinates;B[2]=w[M]&&w[M].height?w[M].height:0,C<B[2]&&(C=B[2]),m>B[2]&&(m=B[2])}),v()))}return y.features.forEach(E=>{let I=E.geometry.coordinates,w=new Kt(je.toRadians(I[0]),je.toRadians(I[1]));I[2]=this._viewer.scene.sampleHeight(w)||0,C<I[2]&&(C=I[2]),m>I[2]&&(m=I[2])}),v()};_C.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=this.loadingImg,o.appendChild(A),this.loading=o,this._viewer.container.appendChild(o)};_C.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};_C.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};_C.prototype.addPoint=function(o){this.addPointHandle&&(this.addPointHandle.destroy(),this.addPointHandle=null),this._prevEntity1&&(this.addPointHandle=new Ur(this._viewer.scene.canvas),this.addPointHandle.setInputAction(function(A){let f=this._viewer.scene.pick(A.position);if(f&&f.id&&f.id.id===this._prevEntity1.id){let m=this._viewer.scene.pickPosition(A.position);if(m){let C=Kt.fromCartesian(m);this.addPointHandle.destroy(),this.addPointHandle=null,o&&typeof o=="function"&&o(C.height.toFixed(1))}}}.bind(this),Ki.LEFT_CLICK),this.addPointHandle.setInputAction(function(A){let f=this._viewer.scene.pick(A.endPosition);f&&f.id&&f.id.id===this._prevEntity1.id?this._tooltip.showAt(A.endPosition,"\u70B9\u51FB\u4FEE\u6539\u57FA\u51C6\u9762\u9AD8\u5EA6"):this._tooltip.show(!1)}.bind(this),Ki.MOUSE_MOVE))};_C.prototype.showTin=function(o){this.tin=o,this._volumeTin.forEach(A=>{this._viewer.entities.remove(A)}),this._volumeTin=[],o&&this.tinData&&this.tinData.features.forEach(A=>{if(A.positions){let f=this._viewer.entities.add({polygon:{hierarchy:new Un(A.positions),material:this._drawColor.polygon,perPositionHeight:!0,outline:!0,outlineColor:At.YELLOW}});this._volumeTin.push(f)}})};_C.prototype.setDatum=function(o,A){if(this.Triangulation&&this.Triangulation.length>0){let f,m,C,y={fill:0,dig:0};this.Triangulation.forEach(function(v){f=v.bottomArea,m=v.height,C=(m[0]-o+m[1]-o+m[2]-o)/3,C>0?y.dig=y.dig+f*C:y.fill=y.fill-f*C}),this.unit!=="m\xB3"&&(y.dig=y.dig/1e9,y.fill=y.fill/1e9);let x=this.unit==="m\xB3"?"\u7ACB\u65B9\u7C73":"\u7ACB\u65B9\u5343\u7C73";this._volumeLabel.label.text=`\u6316\u65B9\u4F53\u79EF\uFF1A${y.dig.toFixed(4)}${x}`,this._volumeLabel1.label.text=`\u586B\u65B9\u4F53\u79EF\uFF1A${y.fill.toFixed(4)}${x}`,this._prevEntity.polygon.height=o,A&&typeof A=="function"&&A({volume:y,unit:this.unit})}};_C.prototype.getPointsInPolygon=function(o,A=50,f=!0){if(o.length<3)return;o.push(o[0]);let m=Zl.lineString(o),C=Zl.bbox(m),y=Zl.pointGrid(C,A,{units:"meters"}),x=Zl.polygon([o]),v=Zl.pointsWithinPolygon(y,x);if(f)for(let E=0;E<o.length-1;E++){let I=Zl.lineString([o[E],o[E+1]]),w={units:"meters"},Q=Zl.length(I,w),M;for(let B=A;;B+=A)if(B<=Q)M=Zl.along(I,B,w),v.features.push(M);else{M=Zl.along(I,Q,w),v.features.push(M);break}}return v};_C.prototype.tinFromPoints=function(o,A={}){let{polygon:f,getArea:m}=A,C=Zl.tin(o),y=0;return C&&C.features&&C.features.forEach(x=>{let v=!0;if(f){let E=Zl.centerOfMass(x);v=Zl.booleanPointInPolygon(E,f)}if(v){let E=x.geometry.coordinates[0],I=[],w=[];for(let Q=0;Q<3;Q++)I.push([E[Q][0],E[Q][1]]),w.push(ee.fromDegrees(E[Q][0],E[Q][1],E[Q][2]));x.positions=w,m&&(x.area=this.getArea(I,w,!0),y+=x.area)}}),{tin:C,area:y}};_C.prototype.getArea=function(o,A,f){if(o.length<3)return;o.push(o[0]);let m=o,C=0,y=Zl.polygon([m]),x;m.length===4?x=[y]:x=Zl.tesselate(y).features;let v,E,I,w;return x.forEach(Q=>{v=Q.geometry.coordinates[0],E=m.findIndex(F=>F.toString()===v[0].toString()),I=m.findIndex(F=>F.toString()===v[1].toString()),w=m.findIndex(F=>F.toString()===v[2].toString());let M=this.getdistance(A[E],A[I]),B=this.getdistance(A[I],A[w]),T=this.getdistance(A[E],A[w]),D=(M+B+T)/2;C+=Math.sqrt(D*((D-M)*(D-B)*(D-T)))}),f||(C<1e6?C=`${C.toFixed(2)}\u5E73\u65B9\u7C73`:C=`${(C/1e6).toFixed(2)}\u5E73\u65B9\u5343\u7C73`),C};_C.prototype.getdistance=function(o,A){let f=Kt.fromCartesian(o),m=Kt.fromCartesian(A),C=Di.MOON2000,x=new l0(f,m,C).surfaceDistance;return x=Math.sqrt(Math.pow(x,2)+Math.pow(m.height-f.height,2)),x};var _At=_C;function Lle(o){this.mEarthCtrl=o,this._polylines=[],this._resPolylines=[],this._points=[],this.entities=this.mEarthCtrl.entities,this.camera=this.mEarthCtrl.coreMap.camera,this.scene=this.mEarthCtrl.coreMap.scene}Lle.prototype.createLineOfSight=function(o){let A=[],f=this,m=[],C=[],y={polyline:[]};f.objectsToExclude=null;let x,v=function(){function M(B){this.options={polyline:{show:!0,positions:[],material:At.YELLOW,width:3,clampToGround:!1}},this.positionsp=B,this._init()}return M.prototype._init=function(){let B=this,T=function(){return B.positionsp};this.options.polyline.positions=new Bn(T,!1),this.polyline=f.entities.add(this.options),f.item=this.polyline,C.push(this.polyline)},M}(),E=new Ur(f.scene.canvas),I=[],w;if(this._points.length>0)for(let M=0;M<this._points.length;M++)this.entities.remove(this._points[M]);let Q=[];return E.setInputAction(function(M){let B,T=new ee(0,0,0);if(new ja(f.mEarthCtrl).pickVector(M.position,T)&&(B=T),!!B)if(I.length===0){I.push(B.clone(),B.clone());let F={leftX:M.position.x,leftY:M.position.y};Q.push(F),x=B.clone()}else{let F={rightX:M.position.x,rightY:M.position.y};Q.push(F);let L={postion:I,entity:C,cartesian:Q};m.push(L),Q=[],w=void 0,I=[],I.push(x.clone()),I.push(x.clone()),w=new v(I),A.push(w)}},Ki.LEFT_CLICK),E.setInputAction(function(M){let B,T=f.camera.getPickRay(M.endPosition);if(B=f.scene.globe.pick(T,f.scene),f.scene.pick(M.endPosition)){let F=f.scene.pickPosition(M.endPosition);F&&(B=F)}!B||I.length>=2&&(O(w)?B!==void 0&&(I.pop(),I.push(B)):(w=new v(I),A.push(w)))},Ki.MOUSE_MOVE),E.setInputAction(function(M){let B=f.entities.add(new UA);f.objectsToExclude=[B];let T=!0;for(let D=0;D<m.length;D++)D===0?T=f.tsjx(m[0].postion[0],m[0].postion[1]):T=f.tsjx(m[D].postion[0],m[D].postion[1]);I.pop(),f._polylines=y.polyline,E.destroy();for(let D=0;D<C.length;D++)f.entities.remove(C[D]);O(o)&&typeof o=="function"&&o(y)},Ki.RIGHT_CLICK),this};Lle.prototype.tsjx=function(o,A){let f=this,m=ee.normalize(ee.subtract(A,o,new ee),new ee),C=new ls(o,m),y=f.scene.globe.pick(C,f.scene);y!=null?(x(y,o,At.GREEN),x(y,A,At.RED)):x(o,A,At.GREEN);function x(v,E,I){let w=f.entities.add({polyline:{positions:[v,E],width:1,material:I,depthFailMaterial:I}});f._resPolylines.push(w)}return!1};Lle.prototype.deleteObject=function(){if(this._points.length>0){this.objectsToExclude=null;for(let o=0;o<this._points.length;o++)this.entities.remove(this._points[o])}if(this._resPolylines.length>0){for(let o=0;o<this._resPolylines.length;o++)this.entities.remove(this._resPolylines[o]);this._resPolylines=[]}};var BAt=Lle;function _h(o,A={}){this._earthCtrl=o,this._viewer=o.coreMap,this._scene=o.coreMap.scene,this.options=Ae(A,{}),this._Tooltip=new gw(o),this._tooltip=this._Tooltip.CreateTooltip(),this._drawColor={point:Ae(this.options.drawColor?.point,At.BLUE),polyline:Ae(this.options.drawColor?.polyline,At.YELLOW),polygon:Ae(this.options.drawColor?.polygon,At.YELLOW.withAlpha(.5))},this.selectDatum=!0,this.onlyTerrain=!0,this.tin=!1,this._volumeTin=[],this.loadingImg=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,this.wallArr=[],this.FlattenPolygon=[],this._Apositions=[],this._heightsort=null,this._deepth=100,this._positions=[],this._modelArr=Ae(A.modelArr,[]),this._isFlattening=Ae(A.isFlattening,!0),this.modelCuttingPolygon=null,this.wallImgUrl=Ae(A.wallImgUrl,null),this.bottomImgUrl=Ae(A.bottomImgUrl,null),this.calculate=Ae(A.calculate,!0),this._Loading=Ae(A.loading,!0),this.editPoint=[],this.nowPoint=null,this.hierarchy=[],this._originHeight=null}_h.prototype.removeMeasureFromMap=function(){this._prevEntity!==void 0&&(this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._prevEntity1!==void 0&&(this._viewer.entities.remove(this._prevEntity1),this._prevEntity1=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this._volumeTin.forEach(o=>{this._viewer.entities.remove(o)}),this._volumeTin=[],this.addPointHandle&&(this.addPointHandle.destroy(),this.addPointHandle=void 0),this.Triangulation=[],this.tinData=void 0,this._tooltip.show(!1)};_h.prototype.removeFromMap=function(){if(this.endEdit(),this.removeMeasureFromMap(),this.wallArr.length>0){for(let o=0;o<this.wallArr.length;o++)this._viewer.entities.remove(this.wallArr[o]);this.wallArr=[]}if(this.FlattenPolygon&&this.FlattenPolygon.length>0){for(let o=0;o<this.FlattenPolygon.length;o++)this._viewer.entities.remove(this.FlattenPolygon[o]);this.FlattenPolygon=[]}this.removeModelCutting()};_h.prototype.deleteObject=_h.prototype.removeFromMap;_h.prototype.startDrawing=function(o={},A){let f=Ae(o.spacing,"auto"),m=this._scene,C=this._tooltip,y=3,x=[],v=[],E=[],I=[],w=[],Q;this._Apositions=o.positions,this._positions=v,this._hierarchy=E,this._heightsort=I,this._degreesArr=w,this._deepth=Ae(o.deepth,100),this._drawColor.point=o.point||this._drawColor.point,this._drawColor.polyline=o.polyline||this._drawColor.polyline,this._drawColor.polygon=o.polygon||this._drawColor.polygon,this.loadingImg=o.loading||this.loadingImg,this.tin=Ae(o.tin,!1),this.onlyTerrain=Ae(o.onlyTerrain,!1),this.selectDatum=Ae(o.selectDatum,!1);let M=this;if(this._mouseHandler&&this._mouseHandler.destroy(),this.loading||this.addLoading(),o.positions){let B=ee.fromDegreesArray(o.positions);for(let T of B)v.push(T);if(!(v.length<y)){for(let T=0;T<o.positions.length;T+=2)w.push([o.positions[T],o.positions[T+1]]);this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:ee.fromDegreesArray(o.positions),material:M._drawColor.polygon,fill:!0}});for(let T=0;T<o.positions.length;T+=2){let D=M._viewer.scene.sampleHeight(new Kt(je.toRadians(o.positions[T]),je.toRadians(o.positions[T+1])));I.push(D),E.push(o.positions[T],o.positions[T+1],D)}this.stopDrawing(f,T=>{A&&A(T)})}}else{let B=new Ur(m.canvas);this._mouseHandler=B,this.removeMeasureFromMap(),this._viewer.container.style.cursor=`url(${globalThis.GEOWORLD_BASE_URL} 'Workers/image/cursor/draw.cur')`;let T;B.setInputAction(function(F){if(F.position!==null){let L=m.camera.getPickRay(F.position),R=m.globe.pick(L,m);if(this._viewer.scene.pick(F.position)){let U=this._viewer.scene.pickPosition(F.position);U&&(R=U)}if(R){let U=Kt.fromCartesian(R),V=je.toDegrees(U.longitude),H=je.toDegrees(U.latitude);if(x.length===0&&(x.push(V,H),w.push([V,H]),v.push(R),Q=R),v.length>=4){let q=Ss.wgs84ToWindowCoordinates(this._viewer.scene,Q);if(q!==void 0){let ie=q.x-F.position.x,Z=q.y-F.position.y;if(ie*ie+Z*Z<16){x.splice(x.length-2,2),v.pop(),this.stopDrawing(A);return}}}x.push(V,H),w.push([V,H]),v.push(R),v.length===2&&!T&&(T=this._viewer.entities.add({name:"\u4E34\u65F6\u7EBF",polyline:{positions:new Bn(function(){return v},!1),clampToGround:!0,material:M._drawColor.polygon,width:3}})),v.length===y&&(T&&this._viewer.entities.remove(T),this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:new Un(ee.fromDegreesArray(x)),material:M._drawColor.polygon,fill:!0}}),this._prevEntity.polygon.hierarchy=new Bn(()=>new Un(ee.fromDegreesArray(x)),!1))}}}.bind(this),Ki.LEFT_CLICK),B.setInputAction(function(F){let L=F.endPosition;if(L!==null)if(v.length===0)C.showAt(L,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let R=m.camera.getPickRay(L),k=m.globe.pick(R,m),U=this._viewer.scene.pick(L),V=!1;if(U){let H=this._viewer.scene.pickPosition(L);H&&(k=H),V=!0}if(k){let H=Kt.fromCartesian(k),q=je.toDegrees(H.longitude),ie=je.toDegrees(H.latitude);if(x.splice(x.length-2,2),w.pop(),v.pop(),x.push(q,ie),w.push([q,ie]),v.push(k),C.showAt(L,"\u53F3\u952E\u7ED3\u675F\u7ED8\u5236"),v.length>=3&&v.length>=4){let Z=Ss.wgs84ToWindowCoordinates(this._viewer.scene,Q);if(Z!==void 0){let oe=Z.x-L.x,ne=Z.y-L.y;oe*oe+ne*ne<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}}.bind(this),Ki.MOUSE_MOVE);let D=null;B.setInputAction(function(F){D=window.setTimeout(()=>{console.log("\u5355\u51FB"),this.end&&this.end()},200)}.bind(this),Ki.RIGHT_CLICK),B.setInputAction(function(F){console.log("\u53CC\u51FB......"),clearTimeout(D)},Ki.LEFT_DOUBLE_CLICK),this.end=F=>{if(this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),M._viewer.container.style.cursor="default",this._tooltip.show(!1),T&&this._viewer.entities.remove(T),this.end=void 0,console.log(w,"?????????"),!(v.length<y)){if(this._prevEntity&&(this._prevEntity.polygon.hierarchy=ee.fromDegreesArray(x)),F==="cancel"){this._prevEntity&&this._viewer.entities.remove(this._prevEntity);return}for(let L=0;L<x.length;L+=2){let R=M._viewer.scene.sampleHeight(new Kt(je.toRadians(x[L]),je.toRadians(x[L+1])));I.push(R),E.push(x[L],x[L+1],R)}this._Apositions=x,this.stopDrawing(f,A)}}}return this};_h.prototype.stopDrawing=function(o,A){let f=this;this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this._volumeTin.forEach(m=>{this._viewer.entities.remove(m)}),this._volumeTin=[],this._Loading&&this.isLoading(!0),setTimeout(()=>{f._heightsort.sort(function(T,D){return T-D});let m=this._viewer.entities.add({name:null,id:f._earthCtrl.factory.createUUID(),polygon:{hierarchy:new Bn(function(){return new Un(ee.fromDegreesArrayHeights(f._hierarchy))},!1),material:new z0({image:Ae(f.bottomImgUrl,`${window.SmartEarthRootUrl}Workers/image/bottomplane.jpg`),repeat:new It(1,1)})}});f.FlattenPolygon.push(m),f.originHeight=f._heightsort[0];let C=ee.fromDegreesArrayHeights(f._hierarchy);C.push(C[0]),f._positionsB=C;let y=null,x,v,E,I,w,Q;for(let T=0;T<C.length-1;T++){x=Kt.fromCartesian(C[T]),v=Kt.fromCartesian(C[T+1]),E=je.toDegrees(x.longitude),w=je.toDegrees(x.latitude),I=je.toDegrees(v.longitude),Q=je.toDegrees(v.latitude),y?y=y>v.height?v.height:y:y=x.height>v.height?v.height:x.height;let D=f.getPoint(E,w,I,Q,x.height,v.height),F=[],L=[];f.getHeightsFromLonLat(D.positions,function(R){if(R){F=R;for(let k=0;k<F.length;k++)L.push(f._heightsort[0]-f._deepth);f.drawwall(D.wallJwd,F,L)}})}if(f._baseHeight=f._heightsort[0]-f._deepth,m.polygon.height=f._baseHeight,!this.calculate)return f._isFlattening&&f.modelCutting(),A&&A(!0),this.isLoading(!1);let M=this.computeCutVolume(o,this.onlyTerrain),B=T=>{let D=T.maxHeight,F=T.minHeight;if(this._prevEntity.polygon.height=T.minHeight,this._prevEntity.polygon.heightReference=0,this.selectDatum){let L=()=>{this.addPoint(R=>{this.setDatum(R,k=>{typeof A=="function"&&A({...T,...k}),L()})})};L()}};this.onlyTerrain?M.then(T=>{B(T)}):B(M),f.setDatum(f._baseHeight,T=>{f._isFlattening&&f.modelCutting(),A&&A(T),this._Loading&&this.isLoading(!1)})},100)};_h.prototype.modelCutting=function(){let o=this;if(o._modelCuttingPolygon=rh.fromPositions({positions:ee.fromDegreesArray(o._Apositions),height:o._baseHeight}),o._modelArr.length>0)for(let A of o._modelArr)A.addFlattenPolygon(o._modelCuttingPolygon),A.needUpdateFlatten=!0,A.clipPlaneOfFlatten=!0;else console.info("\u8BF7\u6DFB\u52A0\u6A21\u578B\uFF01")};_h.prototype.removeModelCutting=function(){let o=this;if(o._modelArr.length>0){for(let A of o._modelArr)A.removeFlattenPolygon(o._modelCuttingPolygon);o._modelCuttingPolygon=null,o._modelArr=[]}else console.info("\u8BF7\u6DFB\u52A0\u6A21\u578B\uFF01")};_h.prototype.computeCentroidOfPolygon=function(o){let A=[],f=[],m=0,C=0;for(let v=0;v<o.length;v++){let E=Kt.fromCartesian(o[v]);m+=E.longitude,C+=E.latitude,A.push(E.longitude),f.push(E.latitude)}let y=0,x=0;return y=m/o.length,x=C/o.length,new Kt(y,x)};_h.prototype.edit=function(o,A,f){let m=this,C=m.editPoint,y=m.nowPoint;if(m._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain=!1,y){for(let E of m.editPoint)E&&(E.show=!0);m.update(y,C,o);return}for(let E=2;E<m._hierarchy.length;E=E+3)m._hierarchy[E]=m.originHeight-m._deepth;m.FlattenPolygon[0]&&m._viewer.entities.remove(m.FlattenPolygon[0]),m.FlattenPolygon=[];let x=this._viewer.entities.add({name:null,id:m._earthCtrl.factory.createUUID(),polygon:{hierarchy:new Un(ee.fromDegreesArrayHeights(m._hierarchy)),material:new z0({image:Ae(m.bottomImgUrl,`${window.SmartEarthRootUrl}Workers/image/bottomplane.jpg`),repeat:new It(1,1)}),perPositionHeight:!0}});m.FlattenPolygon.push(x);let v=m.FlattenPolygon[0].polygon.hierarchy.getValue();for(let E of v.positions){let I=this._viewer.entities.add({id:m._earthCtrl.factory.createUUID(),position:E,point:{color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}});C.push(I)}if(o)if(A){for(let E of C)if(A===E.id){m.nowPoint=E,m.update(E,C,o);return}}else m._earthCtrl.measure.pickObject(null,function(E){let I=E.pickedObject.id;for(let w of C)if(I.id===w.id){m.nowPoint=w,m.update(w,C,o);return}});else f&&f(C)};_h.prototype.update=function(o,A,f){let m=this,C=o.position.getValue(),x=m._scene.globe.ellipsoid.cartesianToCartographic(C),v=je.toDegrees(x.longitude),E=je.toDegrees(x.latitude),I=x.height;o.position.setValue(ee.fromDegrees(v,E,I+f)),m.editPoint=A,m.editPosition=[];let w=[];for(let M of A){let B=M.position.getValue();w.push(B),m.editPosition.push(B)}m.FlattenPolygon[0].polygon.hierarchy=new Bn(function(){return new Un(w)},!0);let Q=m.editPosition;Q.push(Q[0]);for(let M=0;M<Q.length-1;M++){let T=[];for(let D=0;D<=160;D++){let F=ee.lerp(Q[M],Q[M+1],D/160,new ee),L=Kt.fromCartesian(F);T.push(L.height)}m.wallArr[M].wall.minimumHeights.setValue(T)}};_h.prototype.endEdit=function(){let o=this;if(o._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain=!0,o.editPoint.length>0)for(let A of o.editPoint)A&&(A.show=!1)};_h.prototype.computeCutVolume=function(o,A){let f=this,m=15e3,C=-15e3;o==="auto"&&(o=wi.fromPoints(this._positions).radius/20);let y=this.getPointsInPolygon(this._degreesArr,o,!0),x=Zl.polygon([this._degreesArr]),v=()=>{let{tin:E}=this.tinFromPoints(y,{getArea:!0,polygon:x});this.tinData=E;let I={fill:0,dig:0},w={fill:"\u7ACB\u65B9\u7C73",dig:"\u7ACB\u65B9\u7C73"},Q,M,B,T,D,F={fill:1,dig:1};this.Triangulation=[],E.features.forEach(R=>{if(R.positions){if(this.tin){let U=this._viewer.entities.add({polygon:{hierarchy:new Un(R.positions),material:this._drawColor.polygon,perPositionHeight:!0,outline:!0,outlineColor:At.YELLOW}});this._volumeTin.push(U)}let k=R.geometry.coordinates[0];Q=k[0][2],M=k[1][2],B=k[2][2],D=R.area,this.Triangulation.push({bottomArea:D,height:[Q,M,B]}),T=(Q-m+M-m+B-m)/3,T>0?I.dig=I.dig+D*T*F.dig:I.fill=I.fill-D*T*F.fill,I.dig>1e10&&w.dig==="\u7ACB\u65B9\u7C73"&&(I.dig=I.dig/1e9,w.dig="\u7ACB\u65B9\u5343\u7C73",F.dig=1e-9),I.fill>1e10&&w.fill==="\u7ACB\u65B9\u7C73"&&(I.fill=I.fill/1e9,w.fill="\u7ACB\u65B9\u5343\u7C73",F.fill=1e-9)}});let L=this.computeCentroidOfPolygon(this._positions);return this._volumeLabel=this._viewer.entities.add({position:ee.fromRadians(L.longitude,L.latitude,C),label:{text:`\u6316\u65B9\u4F53\u79EF\uFF1A${I.dig.toFixed(4)}${w.dig}`,pixelOffset:{x:0,y:-30},font:"16px \u5B8B\u4F53",fillColor:At.GOLD,verticalOrigin:bn.BOTTOM,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),this._volumeLabel1=this._viewer.entities.add({position:ee.fromRadians(L.longitude,L.latitude,C),label:{text:`\u586B\u65B9\u4F53\u79EF\uFF1A${I.fill.toFixed(4)}${w.fill}`,pixelOffset:{x:0,y:-70},font:"16px \u5B8B\u4F53",fillColor:At.GOLD,verticalOrigin:bn.BOTTOM,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),{maxHeight:C,minHeight:m,volume:I,unit:w,spacing:o}};if(A){let E=[];return y.features.forEach(w=>{let Q=w.geometry.coordinates;E.push(Kt.fromDegrees(Q[0],Q[1]))}),vQ(this._viewer.scene.globe.terrainProvider,E).then(w=>(y.features.forEach((Q,M)=>{let B=Q.geometry.coordinates;B[2]=w[M]&&w[M].height?w[M].height:0,C<B[2]&&(C=B[2]),m>B[2]&&(m=B[2])}),v()))}return y.features.forEach(E=>{let I=E.geometry.coordinates,w=new Kt(je.toRadians(I[0]),je.toRadians(I[1]));I[2]=this._viewer.scene.sampleHeight(w)||0,C<I[2]&&(C=I[2]),m>I[2]&&(m=I[2])}),v()};_h.prototype.getPoint=function(o,A,f,m,C,y){let x=this,v=160,E=je.lerp(o,f,1/v)-o,I=je.lerp(A,m,1/v)-A,w=[],Q=[],M=[],B;w.push(o,A),B=ee.fromDegrees(o,A),Q.push(Kt.fromCartesian(B));for(let T=0;T<v;T++){let D=o+(T+1)*E,F=A+(T+1)*I;w.push(D,F),B=ee.fromDegrees(D,F),Q.push(Kt.fromCartesian(B))}return w.push(f,m),B=ee.fromDegrees(f,m),Q.push(Kt.fromCartesian(B)),{wallJwd:w,positions:Q}};_h.prototype.getHeightsFromLonLat=function(o,A){let f=this._viewer,m=[];o.forEach(function(C){m.push(f.scene.sampleHeight(new Kt(C.longitude,C.latitude)))}),typeof A=="function"&&A(m)};_h.prototype.isHaveTerrain=function(){return!!(this._viewer.scene&&this._viewer.scene.terrainProvider&&this._viewer.scene.terrainProvider._layers)};_h.prototype.drawwall=function(o,A,f){let m=this,C=m._viewer.entities.add({wall:{positions:new Bn(function(){return ee.fromDegreesArray(o)},!1),maximumHeights:A,minimumHeights:f}}),y=C.wall;y.material=new z0({image:Ae(m.wallImgUrl,`${window.SmartEarthRootUrl}Workers/image/dzmc.jpg`),repeat:new It(1,1)}),m.wallArr.push(C)};_h.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=this.loadingImg,o.appendChild(A),this.loading=o,this._viewer.container.appendChild(o)};_h.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};_h.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};_h.prototype.addPoint=function(o){this.addPointHandle&&(this.addPointHandle.destroy(),this.addPointHandle=null),this._prevEntity1&&(this.addPointHandle=new Ur(this._viewer.scene.canvas),this.addPointHandle.setInputAction(function(A){let f=this._viewer.scene.pick(A.position);if(f&&f.id&&f.id.id===this._prevEntity1.id){let m=this._viewer.scene.pickPosition(A.position);if(m){let C=Kt.fromCartesian(m);this.addPointHandle.destroy(),this.addPointHandle=null,o&&typeof o=="function"&&o(C.height.toFixed(1))}}}.bind(this),Ki.LEFT_CLICK),this.addPointHandle.setInputAction(function(A){let f=this._viewer.scene.pick(A.endPosition);f&&f.id&&f.id.id===this._prevEntity1.id?this._tooltip.showAt(A.endPosition,"\u70B9\u51FB\u4FEE\u6539\u57FA\u51C6\u9762\u9AD8\u5EA6"):this._tooltip.show(!1)}.bind(this),Ki.MOUSE_MOVE))};_h.prototype.showTin=function(o){this.tin=o,this._volumeTin.forEach(A=>{this._viewer.entities.remove(A)}),this._volumeTin=[],o&&this.tinData&&this.tinData.features.forEach(A=>{if(A.positions){let f=this._viewer.entities.add({polygon:{hierarchy:new Un(A.positions),material:this._drawColor.polygon,perPositionHeight:!0,outline:!0,outlineColor:At.YELLOW}});this._volumeTin.push(f)}})};_h.prototype.setDatum=function(o,A){if(this.Triangulation&&this.Triangulation.length>0){let f,m,C,y={fill:0,dig:0},x={fill:"\u7ACB\u65B9\u7C73",dig:"\u7ACB\u65B9\u7C73"},v={fill:1,dig:1};this.Triangulation.forEach(function(E){f=E.bottomArea,m=E.height,C=(m[0]-o+m[1]-o+m[2]-o)/3,C>0?y.dig=y.dig+f*C*v.dig:y.fill=y.fill-f*C*v.fill,y.dig>1e10&&x.dig==="\u7ACB\u65B9\u7C73"&&(y.dig=y.dig/1e9,x.dig="\u7ACB\u65B9\u5343\u7C73",v.dig=1e-9),y.fill>1e10&&x.fill==="\u7ACB\u65B9\u7C73"&&(y.fill=y.fill/1e9,x.fill="\u7ACB\u65B9\u5343\u7C73",v.fill=1e-9)}),this._volumeLabel.label.text=`\u6316\u65B9\u4F53\u79EF\uFF1A${y.dig.toFixed(4)}${x.dig}`,this._volumeLabel1.label.text=`\u586B\u65B9\u4F53\u79EF\uFF1A${y.fill.toFixed(4)}${x.fill}`,this._prevEntity.polygon.height=o,A&&typeof A=="function"&&A({volume:y,unit:x})}};_h.prototype.getPointsInPolygon=function(o,A=50,f=!0){if(o.length<3)return;o.push(o[0]);let m=Zl.lineString(o),C=Zl.bbox(m),y=Zl.pointGrid(C,A,{units:"meters"}),x=Zl.polygon([o]),v=Zl.pointsWithinPolygon(y,x);if(f)for(let E=0;E<o.length-1;E++){let I=Zl.lineString([o[E],o[E+1]]),w={units:"meters"},Q=Zl.length(I,w),M;for(let B=A;;B+=A)if(B<=Q)M=Zl.along(I,B,w),v.features.push(M);else{M=Zl.along(I,Q,w),v.features.push(M);break}}return v};_h.prototype.tinFromPoints=function(o,A={}){let{polygon:f,getArea:m}=A,C=Zl.tin(o),y=0;return C&&C.features&&C.features.forEach(x=>{let v=!0;if(f){let E=Zl.centerOfMass(x);v=Zl.booleanPointInPolygon(E,f)}if(v){let E=x.geometry.coordinates[0],I=[],w=[];for(let Q=0;Q<3;Q++)I.push([E[Q][0],E[Q][1]]),w.push(ee.fromDegrees(E[Q][0],E[Q][1],E[Q][2]));x.positions=w,m&&(x.area=this.getArea(I,w,!0),y+=x.area)}}),{tin:C,area:y}};_h.prototype.getArea=function(o,A,f){if(o.length<3)return;o.push(o[0]);let m=o,C=0,y=Zl.polygon([m]),x;m.length===4?x=[y]:x=Zl.tesselate(y).features;let v,E,I,w;return x.forEach(Q=>{v=Q.geometry.coordinates[0],E=m.findIndex(F=>F.toString()===v[0].toString()),I=m.findIndex(F=>F.toString()===v[1].toString()),w=m.findIndex(F=>F.toString()===v[2].toString());let M=this.getdistance(A[E],A[I]),B=this.getdistance(A[I],A[w]),T=this.getdistance(A[E],A[w]),D=(M+B+T)/2;C+=Math.sqrt(D*((D-M)*(D-B)*(D-T)))}),f||(C<1e6?C=`${C.toFixed(2)}\u5E73\u65B9\u7C73`:C=`${(C/1e6).toFixed(2)}\u5E73\u65B9\u5343\u7C73`),C};_h.prototype.getdistance=function(o,A){let f=Kt.fromCartesian(o),m=Kt.fromCartesian(A),C=new l0;C.setEndPoints(f,m);let y=C.surfaceDistance;return y=Math.sqrt(Math.pow(y,2)+Math.pow(m.height-f.height,2)),y};var wAt=_h;function T2(o,A={}){this._earthCtrl=o,this._viewer=o.coreMap,this._scene=o.coreMap.scene,this.options=Ae(A,{}),this._modelArr=[],this._Apositions=[],this.FlattenPolygon=[],this._Loading=Ae(A.loading,!1),this._bottom=Ae(A.bottom,!1),this.loadingImg=Ae(A.loadingImg,`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`),this._Tooltip=new gw(o),this._tooltip=this._Tooltip.CreateTooltip(),this._positions=[],this._deepth=100,this._drawColor={point:Ae(this.options.drawColor?.point,At.BLUE),polyline:Ae(this.options.drawColor?.polyline,At.YELLOW),polygon:Ae(this.options.drawColor?.polygon,At.YELLOW.withAlpha(.5))}}T2.prototype.removeMeasureFromMap=function(){this._prevEntity!==void 0&&(this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this.addPointHandle&&(this.addPointHandle.destroy(),this.addPointHandle=void 0),this.Triangulation=[],this.tinData=void 0,this._tooltip.show(!1)};T2.prototype.startDrawing=function(o={},A){let f=this._scene,m=this._tooltip,C=3,y,x=[],v=[],E=[],I=[],w=[];this._positions=v,this._hierarchy=E,this._heightsort=I,this._degreesArr=w,this._deepth=Ae(o.deepth,100),this._modelArr=Ae(o.modelArr,[]);let Q=this;if(this._mouseHandler&&this._mouseHandler.destroy(),this.loading||this.addLoading(),o.positions){let M=ee.fromDegreesArray(o.positions);for(let B of M)v.push(B);if(!(v.length<C)){for(let B=0;B<o.positions.length;B+=2)w.push([o.positions[B],o.positions[B+1]]);console.log(v,"\u4F4D\u7F6E\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A"),this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:ee.fromDegreesArray(o.positions),material:Q._drawColor.polygon,fill:!0}});for(let B=0;B<o.positions.length;B+=2){let T=Q._viewer.scene.sampleHeight(new Kt(je.toRadians(o.positions[B]),je.toRadians(o.positions[B+1])));I.push(T),E.push(o.positions[B],o.positions[B+1],T)}this._Apositions=o.positions,this.stopDrawing(B=>{A&&A(B)})}}else{let M=new Ur(f.canvas);this._mouseHandler=M,this.removeMeasureFromMap(),this._viewer.container.style.cursor=`url(${globalThis.GEOWORLD_BASE_URL} 'Workers/image/cursor/draw.cur')`;let B;M.setInputAction(function(T){if(T.position!==null){let D=f.camera.getPickRay(T.position),F=f.globe.pick(D,f);if(this._viewer.scene.pick(T.position)){let R=this._viewer.scene.pickPosition(T.position);R&&(F=R)}if(F){let R=Kt.fromCartesian(F),k=je.toDegrees(R.longitude),U=je.toDegrees(R.latitude);if(x.length===0&&(x.push(k,U),w.push([k,U]),v.push(F),y=F),v.length>=4){let V=Ss.wgs84ToWindowCoordinates(this._viewer.scene,y);if(V!==void 0){let H=V.x-T.position.x,q=V.y-T.position.y;if(H*H+q*q<16){x.splice(x.length-2,2),v.pop(),this.stopDrawing(A);return}}}x.push(k,U),w.push([k,U]),v.push(F),v.length===2&&!B&&(B=this._viewer.entities.add({name:"\u4E34\u65F6\u7EBF",polyline:{positions:new Bn(function(){return v},!1),clampToGround:!0,material:Q._drawColor.polygon,width:3}})),v.length===C&&(B&&this._viewer.entities.remove(B),this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:new Un(ee.fromDegreesArray(x)),material:Q._drawColor.polygon,fill:!0}}),this._prevEntity.polygon.hierarchy=new Bn(()=>new Un(ee.fromDegreesArray(x)),!1))}}}.bind(this),Ki.LEFT_CLICK),M.setInputAction(function(T){let D=T.endPosition;if(D!==null)if(v.length===0)m.showAt(D,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let F=f.camera.getPickRay(D),L=f.globe.pick(F,f),R=this._viewer.scene.pick(D),k=!1;if(R){let U=this._viewer.scene.pickPosition(D);U&&(L=U),k=!0}if(L){let U=Kt.fromCartesian(L),V=je.toDegrees(U.longitude),H=je.toDegrees(U.latitude);if(x.splice(x.length-2,2),w.pop(),v.pop(),x.push(V,H),w.push([V,H]),v.push(L),m.showAt(D,"\u53F3\u952E\u7ED3\u675F\u7ED8\u5236"),v.length>=3&&v.length>=4){let q=Ss.wgs84ToWindowCoordinates(this._viewer.scene,y);if(q!==void 0){let ie=q.x-D.x,Z=q.y-D.y;ie*ie+Z*Z<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}}.bind(this),Ki.MOUSE_MOVE),M.setInputAction(function(T){this.end&&this.end()}.bind(this),Ki.RIGHT_CLICK),this.end=T=>{if(this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),Q._viewer.container.style.cursor="default",this._tooltip.show(!1),B&&this._viewer.entities.remove(B),this.end=void 0,console.log(w,"?????????"),!(v.length<C)){if(this._prevEntity&&(this._prevEntity.polygon.hierarchy=ee.fromDegreesArray(x)),T==="cancel"){this._prevEntity&&this._viewer.entities.remove(this._prevEntity);return}for(let D=0;D<x.length;D+=2){let F=Q._viewer.scene.sampleHeight(new Kt(je.toRadians(x[D]),je.toRadians(x[D+1])));I.push(F),E.push(x[D],x[D+1],F)}this._Apositions=x,this.stopDrawing(A)}}}};T2.prototype.stopDrawing=function(o){let A=this;this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this._prevEntity!==void 0&&(this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._Loading&&this.isLoading(!0),setTimeout(()=>{A._heightsort.sort(function(m,C){return m-C});let f=null;A._bottom?(f=this._viewer.entities.add({name:null,id:A._earthCtrl.factory.createUUID(),polygon:{hierarchy:new Bn(function(){return new Un(ee.fromDegreesArrayHeights(A._hierarchy))},!1),material:new z0({image:Ae(A.bottomImgUrl,`${window.SmartEarthRootUrl}Workers/image/bottomplane.jpg`),repeat:new It(1,1)})}}),A._baseHeight=A._heightsort[0]-A._deepth,f.polygon.height=A._baseHeight):f=this._viewer.entities.add({name:null,id:A._earthCtrl.factory.createUUID(),polygon:{hierarchy:new Bn(function(){return new Un(ee.fromDegreesArrayHeights(A._hierarchy))},!1),material:At.YELLOW.withAlpha(0)}}),A.FlattenPolygon.push(f),A.modelCutting()})};T2.prototype.modelCutting=function(){let o=this;if(o._modelCuttingPolygon=rh.fromPositions({positions:ee.fromDegreesArray(o._Apositions),height:o._baseHeight}),o._modelArr.length>0)for(let A of o._modelArr)A.addFlattenPolygon(o._modelCuttingPolygon),A.needUpdateFlatten=!0,A.clipPlaneOfFlatten=!0;else console.info("\u8BF7\u6DFB\u52A0\u6A21\u578B\uFF01")};T2.prototype.removeModelCutting=function(){let o=this;if(o._modelArr.length>0){for(let A of o._modelArr)A.removeFlattenPolygon(o._modelCuttingPolygon);o._modelCuttingPolygon=null,o._modelArr=[]}};T2.prototype.removeFromMap=function(){if(this.removeMeasureFromMap(),this.FlattenPolygon&&this.FlattenPolygon.length>0){for(let o=0;o<this.FlattenPolygon.length;o++)this._viewer.entities.remove(this.FlattenPolygon[o]);this.FlattenPolygon=[]}this.removeModelCutting()};T2.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=this.loadingImg,o.appendChild(A),this.loading=o,this._viewer.container.appendChild(o)};T2.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};T2.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};var bAt=T2;function M2(o,A={}){this._earthCtrl=o,this._viewer=o.coreMap,this._scene=o.coreMap.scene,this.options=Ae(A,{}),this._Apositions=[],this.FlattenPolygon=[],this._terrainFlatten=new IN(o.coreMap.scene),this._Loading=Ae(A.loading,!1),this._bottom=Ae(A.bottom,!1),this.loadingImg=Ae(A.loadingImg,`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`),this._Tooltip=new gw(o),this._tooltip=this._Tooltip.CreateTooltip(),this._positions=[],this._deepth=10,this._drawColor={point:Ae(this.options.drawColor?.point,At.BLUE),polyline:Ae(this.options.drawColor?.polyline,At.YELLOW),polygon:Ae(this.options.drawColor?.polygon,At.YELLOW.withAlpha(.5))}}M2.prototype.removeMeasureFromMap=function(){this._prevEntity!==void 0&&(this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this.addPointHandle&&(this.addPointHandle.destroy(),this.addPointHandle=void 0),this.Triangulation=[],this.tinData=void 0,this._tooltip.show(!1)};M2.prototype.startDrawing=function(o={},A){let f=this._scene,m=this._tooltip,C=3,y,x=[],v=[],E=[],I=[],w=[];this._positions=v,this._hierarchy=E,this._heightsort=I,this._degreesArr=w,this._deepth=Ae(o.deepth,100);let Q=this;if(this._mouseHandler&&this._mouseHandler.destroy(),this.loading||this.addLoading(),o.positions){let M=ee.fromDegreesArray(o.positions);for(let B of M)v.push(B);if(!(v.length<C)){for(let B=0;B<o.positions.length;B+=2)w.push([o.positions[B],o.positions[B+1]]);this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:ee.fromDegreesArray(o.positions),material:Q._drawColor.polygon,fill:!0}});for(let B=0;B<o.positions.length;B+=2){let T=Q._viewer.scene.sampleHeight(new Kt(je.toRadians(o.positions[B]),je.toRadians(o.positions[B+1])));I.push(T),E.push(o.positions[B],o.positions[B+1],T)}this._Apositions=o.positions,this.stopDrawing(B=>{A&&A(B)})}}else{let M=new Ur(f.canvas);this._mouseHandler=M,this.removeMeasureFromMap(),this._viewer.container.style.cursor=`url(${globalThis.GEOWORLD_BASE_URL} 'Workers/image/cursor/draw.cur')`;let B;M.setInputAction(function(T){if(T.position!==null){let D=f.camera.getPickRay(T.position),F=f.globe.pick(D,f);if(this._viewer.scene.pick(T.position)){let R=this._viewer.scene.pickPosition(T.position);R&&(F=R)}if(F){let R=Kt.fromCartesian(F),k=je.toDegrees(R.longitude),U=je.toDegrees(R.latitude);if(x.length===0&&(x.push(k,U),w.push([k,U]),v.push(F),y=F),v.length>=4){let V=Ss.wgs84ToWindowCoordinates(this._viewer.scene,y);if(V!==void 0){let H=V.x-T.position.x,q=V.y-T.position.y;if(H*H+q*q<16){x.splice(x.length-2,2),v.pop(),this.stopDrawing(A);return}}}x.push(k,U),w.push([k,U]),v.push(F),v.length===2&&!B&&(B=this._viewer.entities.add({name:"\u4E34\u65F6\u7EBF",polyline:{positions:new Bn(function(){return v},!1),clampToGround:!0,material:Q._drawColor.polygon,width:3}})),v.length===C&&(B&&this._viewer.entities.remove(B),this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:new Un(ee.fromDegreesArray(x)),material:Q._drawColor.polygon,fill:!0}}),this._prevEntity.polygon.hierarchy=new Bn(()=>new Un(ee.fromDegreesArray(x)),!1))}}}.bind(this),Ki.LEFT_CLICK),M.setInputAction(function(T){let D=T.endPosition;if(D!==null)if(v.length===0)m.showAt(D,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let F=f.camera.getPickRay(D),L=f.globe.pick(F,f),R=this._viewer.scene.pick(D),k=!1;if(R){let U=this._viewer.scene.pickPosition(D);U&&(L=U),k=!0}if(L){let U=Kt.fromCartesian(L),V=je.toDegrees(U.longitude),H=je.toDegrees(U.latitude);if(x.splice(x.length-2,2),w.pop(),v.pop(),x.push(V,H),w.push([V,H]),v.push(L),m.showAt(D,"\u53F3\u952E\u7ED3\u675F\u7ED8\u5236"),v.length>=3&&v.length>=4){let q=Ss.wgs84ToWindowCoordinates(this._viewer.scene,y);if(q!==void 0){let ie=q.x-D.x,Z=q.y-D.y;ie*ie+Z*Z<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}}.bind(this),Ki.MOUSE_MOVE),M.setInputAction(function(T){this.end&&this.end()}.bind(this),Ki.RIGHT_CLICK),this.end=T=>{if(this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),Q._viewer.container.style.cursor="default",this._tooltip.show(!1),B&&this._viewer.entities.remove(B),this.end=void 0,console.log(w,"?????????"),!(v.length<C)){if(this._prevEntity&&(this._prevEntity.polygon.hierarchy=ee.fromDegreesArray(x)),T==="cancel"){this._prevEntity&&this._viewer.entities.remove(this._prevEntity);return}for(let D=0;D<x.length;D+=2){let F=Q._viewer.scene.sampleHeight(new Kt(je.toRadians(x[D]),je.toRadians(x[D+1])));I.push(F),E.push(x[D],x[D+1],F)}this._Apositions=x,this.stopDrawing(A)}}}};M2.prototype.stopDrawing=function(o){let A=this;this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this._prevEntity!==void 0&&(this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._Loading&&this.isLoading(!0),setTimeout(()=>{A._heightsort.sort(function(C,y){return C-y});let f=null;A._bottom?(f=this._viewer.entities.add({name:null,id:A._earthCtrl.factory.createUUID(),polygon:{hierarchy:new Bn(function(){return new Un(ee.fromDegreesArrayHeights(A._hierarchy))},!1),material:new z0({image:Ae(A.bottomImgUrl,`${window.SmartEarthRootUrl}Workers/image/bottomplane.jpg`),repeat:new It(1,1)})}}),A._baseHeight=A._heightsort[0]-A._deepth,f.polygon.height=A._baseHeight):f=this._viewer.entities.add({name:null,id:A._earthCtrl.factory.createUUID(),polygon:{hierarchy:new Bn(function(){return new Un(ee.fromDegreesArrayHeights(A._hierarchy))},!1),material:At.YELLOW.withAlpha(0)}}),A.FlattenPolygon.push(f);let m=[];A._baseHeight=A._heightsort[0]-A._deepth;for(let C=0;C<A._hierarchy.length;C+=3)m.push(A._hierarchy[C],A._hierarchy[C+1],A._baseHeight);console.log(m,"\u4F4D\u7F6E\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A"),A.terrainCutting(m)})};M2.prototype.terrainCutting=function(o){let A=this;A._terrainFlatten.addPolygon(o),A._terrainFlatten.update(),A._terrainFlatten.clipPlaneOfFlatten=!0};M2.prototype.removeTerrainCutting=function(){this._terrainFlatten.clearPolygon()};M2.prototype.removeFromMap=function(){if(this.removeMeasureFromMap(),this.FlattenPolygon&&this.FlattenPolygon.length>0){for(let o=0;o<this.FlattenPolygon.length;o++)this._viewer.entities.remove(this.FlattenPolygon[o]);this.FlattenPolygon=[]}this.removeTerrainCutting()};M2.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=this.loadingImg,o.appendChild(A),this.loading=o,this._viewer.container.appendChild(o)};M2.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};M2.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};var QAt=M2;function pw(o,A={}){this._earthCtrl=o,this._terrainFlatten=new IN(this._earthCtrl.coreMap.scene),this._viewer=o.coreMap,this._scene=o.coreMap.scene,this.options=Ae(A,{}),this._Tooltip=new gw(o),this._tooltip=this._Tooltip.CreateTooltip(),this._drawColor={point:Ae(this.options.drawColor?.point,At.BLUE),polyline:Ae(this.options.drawColor?.polyline,At.YELLOW),polygon:Ae(this.options.drawColor?.polygon,At.YELLOW.withAlpha(.5))},this.loadingImg=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,this.wallArr=[],this.FlattenPolygon=[],this._Apositions=[],this._heightsort=null,this._deepth=100,this._positions=[],this._modelArr=Ae(A.modelArr,[]),this._isFlattening=Ae(A.isFlattening,!0),this.modelCuttingPolygon=null,this.wallImgUrl=Ae(A.wallImgUrl,null),this.bottomImgUrl=Ae(A.bottomImgUrl,null),this._Loading=Ae(A.loading,!0)}pw.prototype.removeMeasureFromMap=function(){this._prevEntity!==void 0&&(this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this.addPointHandle&&(this.addPointHandle.destroy(),this.addPointHandle=void 0),this.Triangulation=[],this.tinData=void 0,this._tooltip.show(!1)};pw.prototype.removeFromMap=function(){if(this.removeMeasureFromMap(),this.wallArr.length>0){for(let o=0;o<this.wallArr.length;o++)this._viewer.entities.remove(this.wallArr[o]);this.wallArr=[]}if(this.FlattenPolygon&&this.FlattenPolygon.length>0){for(let o=0;o<this.FlattenPolygon.length;o++)this._viewer.entities.remove(this.FlattenPolygon[o]);this.FlattenPolygon=[]}this.removeModelCutting()};pw.prototype.deleteObject=pw.prototype.removeFromMap;pw.prototype.startDrawing=function(o={},A){let f=Ae(o.spacing,"auto"),m=this._scene,C=this._tooltip,y=3,x=this._positions,v=[],E;this._Apositions=o.positions,this._heightsort=v,this._deepth=Ae(o.deepth,100),this._sampleStep=Ae(o.sampleStep,100),this._maxSampleCount=Ae(o.maxSampleCount,200),this._drawColor.point=o.point||this._drawColor.point,this._drawColor.polyline=o.polyline||this._drawColor.polyline,this._drawColor.polygon=o.polygon||this._drawColor.polygon,this.loadingImg=o.loading||this.loadingImg;let I=this;if(this._mouseHandler&&this._mouseHandler.destroy(),this.loading||this.addLoading(),!o.positions){let w=new Ur(m.canvas);this._mouseHandler=w,this.removeMeasureFromMap(),this._viewer.container.style.cursor=`url(${globalThis.GEOWORLD_BASE_URL} 'Assets/image/cursor/draw.cur')`;let Q;w.setInputAction(function(B){if(B.position!==null){let T=this._viewer.scene.pickPosition(B.position);if(T){let D=Kt.fromCartesian(T);if(x.length===0&&(x.push(D),E=T),x.length>=4){let F=Ss.wgs84ToWindowCoordinates(this._viewer.scene,E);if(F!==void 0){let L=F.x-B.position.x,R=F.y-B.position.y;if(L*L+R*R<16){x.splice(x.length-2,2),this.stopDrawing(A);return}}}x.push(D),x.length===2&&!Q&&(Q=this._viewer.entities.add({name:"\u4E34\u65F6\u7EBF",polyline:{positions:new Bn(function(){let F=[];for(let L=0;L<x.length;L++){let R=x[L];F.push(R.longitude,R.latitude,R.height)}return ee.fromRadiansArrayHeights(F)},!1),clampToGround:!1,material:I._drawColor.polygon,width:3}})),x.length===y&&(Q&&this._viewer.entities.remove(Q),this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:new Bn(()=>{let F=[];for(let L=0;L<x.length;L++){let R=x[L];F.push(R.longitude,R.latitude,R.height)}return new Un(ee.fromRadiansArrayHeights(F))},!1),material:I._drawColor.polygon,fill:!0}}))}}}.bind(this),Ki.LEFT_CLICK),w.setInputAction(function(B){let T=B.endPosition;if(T!==null)if(x.length===0)C.showAt(T,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let D=this._viewer.scene.pickPosition(T);if(D){let F=Kt.fromCartesian(D);if(x.splice(x.length-1,1),x.push(F),C.showAt(T,"\u53F3\u952E\u7ED3\u675F\u7ED8\u5236"),x.length>=3&&x.length>=4){let L=Ss.wgs84ToWindowCoordinates(this._viewer.scene,E);if(L!==void 0){let R=L.x-T.x,k=L.y-T.y;R*R+k*k<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}}.bind(this),Ki.MOUSE_MOVE);let M=null;w.setInputAction(function(B){M=window.setTimeout(()=>{console.log("\u5355\u51FB"),this.end&&this.end()},200)}.bind(this),Ki.RIGHT_CLICK),w.setInputAction(function(B){console.log("\u53CC\u51FB......"),clearTimeout(M)},Ki.LEFT_DOUBLE_CLICK),this.end=B=>{if(this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),I._viewer.container.style.cursor="default",this._tooltip.show(!1),Q&&this._viewer.entities.remove(Q),this.end=void 0,!(x.length<y)){if(this._prevEntity&&this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0,B==="cancel")return;for(let T=0;T<x.length;T+=2){let D=x[T].height;v.push(D)}this._Apositions=x,this.stopDrawing(f,A)}}}return this};function TLi(o,A,f){let m=je.lerp(o.longitude,A.longitude,1/f)-o.longitude,C=je.lerp(o.latitude,A.latitude,1/f)-o.latitude,y=[];y.push(o);for(let x=0;x<f;x++){let v=o.longitude+(x+1)*m,E=o.latitude+(x+1)*C;y.push(new Kt(v,E))}return y.push(A),y}function MLi(o,A,f,m,C){let y=[];A.forEach(function(x){let v=Kt.toCartesian(new Kt(x.longitude,x.latitude,m)),E=Kt.toCartesian(new Kt(x.longitude,x.latitude,f)),I=ee.normalize(ee.subtract(E,v,new ee),new ee),w=new ls(v,I),Q=null,M=[],B=o.scene.drillPickFromRay(w,1,M);o.scene.globe.show=!1,B.length>0&&!B[0].object&&B[0].position?(Q=o.scene.drillPickFromRay(w,100,M),Q.unshift(B[0])):Q=o.scene.drillPickFromRay(w,100,M),o.scene.globe.show=!0,y.push(Q)}),typeof C=="function"&&C(y)}function PLi(o,A,f){for(let y=0;y<o.length;y++){let x=o[y];for(let v=0;v<x.length;v++){let E=x[v].position,I=Kt.fromCartesian(E);if(I.height<A){x.splice(v,x.length-v);let w=ee.fromRadians(I.latitude,I.longitude,A);x.push({object:null,position:w});break}}{let v=x[x.length-1].position,E=Kt.fromCartesian(v);if(Math.abs(E.height-A)>.01){let I=ee.fromRadians(E.latitude,E.longitude,A);x.push({object:null,position:I})}}{let v=x[x.length-1].position,E=Kt.fromCartesian(v);console.log("di",E.height)}}for(let y=0;y<o.length;y++){let x=o[y],v=x[x.length-1];f.push(v.position)}let m=0;o.forEach(function(y){m=m<y.length?y.length:m}),o.forEach(function(y){if(m-y.length>0){let v=y.length;y.length=m,y.fill(null,v,y.length)}});let C=[];for(let y=0;y<m-1;y++){let x=[],v=[];for(let E=0;E<o.length;E++){let I=o[E][y],w=o[E][y+1];I&&w&&(x.push(I),v.push(w))}C.push({ups:x,bottoms:v})}return C}pw.prototype.stopDrawing=function(o,A){let f=this;this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this._Loading&&this.isLoading(!0);let m=this._positions,C=this._viewer,y=this.wallArr,x=this._deepth,v=this._sampleStep,E=this._maxSampleCount;m.push(m[0]);let I=0;for(let w=0;w<m.length-1;w++){let Q=ee.fromRadians(m[w].longitude,m[w].latitude,m[w].height),M=ee.fromRadians(m[w+1].longitude,m[w+1].latitude,m[w+1].height),T=ee.distance(M,Q)/v;I=I<T?T:I}I=E<I?E:I,I=260,setTimeout(()=>{f._heightsort.sort(function(D,F){return D-F});let w=f._heightsort[0]+2e3,Q=f._heightsort[0]-2e3,M=[];for(let D=0;D<m.length-1;D++){let F=m[D],L=m[D+1],R=TLi(F,L,I);MLi(C,R,Q,w,function(k){let U=PLi(k,x,M);for(let V=0;V<U.length;V++){let H=U[V];y.push(RLi(C,H,V))}})}let B=[];for(let D=0;D<m.length;D++){let F=m[D];B.push(F.longitude,F.latitude,x)}let T=C.entities.add({polygon:{hierarchy:{positions:ee.fromRadiansArrayHeights(B)},perPositionHeight:!0,granularity:je.RADIANS_PER_DEGREE*100,material:new z0({image:`${globalThis.GEOWORLD_BASE_URL}Workers/image/bottomplane.jpg`,repeat:new It(1,1)}),fill:!0}});return y.push(T),f._isFlattening&&f.modelCutting(),A&&A(!0),this.isLoading(!1)},20)};pw.prototype.modelCutting=function(){let o=this,A=this._deepth,f=this._positions,m=[],C=[];for(let y=0;y<f.length;y++){let x=f[y];m.push(x.longitude,x.latitude,x.height-10),C.push(je.toDegrees(x.longitude),je.toDegrees(x.latitude),x.height-10)}if(o._modelCuttingPolygon=rh.fromPositions({positions:ee.fromRadiansArrayHeights(m),height:A-10}),o._terrainFlatten.addPolygon(C),o._terrainFlatten.update(),o._terrainFlatten.clipPlaneOfFlatten=!0,o._modelArr.length>0)for(let y of o._modelArr)y.addFlattenPolygon(o._modelCuttingPolygon),y.needUpdateFlatten=!0,y.clipPlaneOfFlatten=!0;else console.info("\u8BF7\u6DFB\u52A0\u6A21\u578B\uFF01")};pw.prototype.removeModelCutting=function(){let o=this;if(o._modelArr.length>0){for(let A of o._modelArr)A.removeFlattenPolygon(o._modelCuttingPolygon);o._modelCuttingPolygon=null,o._modelArr=[],o._terrainFlatten.clearPolygon(),o._terrainFlatten.clipPlaneOfFlatten=!1}else console.info("\u8BF7\u6DFB\u52A0\u6A21\u578B\uFF01")};function RLi(o,A,f){let m=[],C=[];for(let I=0;I<A.ups.length;I++){let w=A.ups[I];m.push(w.position);let Q=Kt.fromCartesian(w.position);C.push(Q.height)}let y=[];for(let I=0;I<A.bottoms.length;I++){let w=A.bottoms[I],Q=Kt.fromCartesian(w.position);y.push(Q.height)}let x=`${globalThis.GEOWORLD_BASE_URL}Workers/image/MTY0001.jpg`,v=`${globalThis.GEOWORLD_BASE_URL}Workers/image/MTY0002.jpg`,E=o.entities.add({wall:{positions:m,material:new z0({image:f%2?x:v,repeat:new It(.01,.01)}),maximumHeights:C,minimumHeights:y,granularity:je.RADIANS_PER_DEGREE*100}});return E.show=!0,E}pw.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=this.loadingImg,o.appendChild(A),this.loading=o,this._viewer.container.appendChild(o)};pw.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};pw.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};var SAt=pw;function id(o){this._earthCtrl=o,this._coreMap=o.coreMap,this.tools=[],this.vols=[],this.saveResult=!1}id.prototype.getDistanceSpace=function(o){this.saveResult===!1&&this.deleteObject(),this._tool=new NW(this._earthCtrl),this._tool.spaceDistance(o),this.tools.push(this._tool)};id.prototype.getDistanceHorizontal=function(o){this.saveResult===!1&&this.deleteObject(),this._tool=new NW(this._earthCtrl),this._tool.horizontalDistance(o),this.tools.push(this._tool)};id.prototype.deleteObject=function(){O(this._tool)&&this._tool.deleteObject(),this.saveResult===!1&&this.tools.pop()};id.prototype.deleteAll=function(){this.tools.forEach(function(o){o.deleteObject()}),this.vols.forEach(function(o){o.cleanUp()}),this._earthCtrl.measure.tools.forEach(function(o){o.clearResult()}),this.tools=[],this.vols=[],this._earthCtrl.measure.tools=[]};id.prototype.saveResults=function(o){this.saveResult=o};id.prototype.getPlaneArea=function(o){this.saveResult===!1&&this.deleteObject(),this._tool=new NW(this._earthCtrl),this._tool.getPlaneArea(o),this.tools.push(this._tool)};id.prototype.getSurfaceArea3d=function(o){this.saveResult===!1&&this.deleteObject(),this._tool=new NW(this._earthCtrl),this._tool.getSurfaceArea3d(o),this.tools.push(this._tool)};id.prototype.volumetric=function(o){this.saveResult===!1&&this.removeVolumetric(),this._vol=new Ile(this._earthCtrl),this._vol.startDrawing(o),this.vols.push(this._vol)};id.prototype.removeVolumetric=function(o){O(this._vol)&&this.vols.forEach(function(A){A.cleanUp()})};id.prototype.lineOfSight=function(o){this._tool=new BAt(this._earthCtrl),this._tool.createLineOfSight(o),this.tools.push(this._tool)};id.prototype.createViewShed=function(o){return new Ele(this._earthCtrl,o)};id.prototype.createSubmergence=function(o){return new _le(this._earthCtrl,o)};id.prototype.createProfile=function(o){return new Ble(this._earthCtrl,o)};id.prototype.createBufferAnalysis=function(o){return new Yre(this._earthCtrl,o)};id.prototype.createSkyline=function(o){return new ble(this._earthCtrl,o)};id.prototype.createCurtainContrast=function(o){return new xAt(this._earthCtrl,o)};id.prototype.createRestrictTheHeight=function(o){return new Sle(this._earthCtrl,o)};id.prototype.createModifyMesh=function(o,A){return new Dle(this._earthCtrl).addClipping(o,A)};id.prototype.createTerrainModifier=function(o){return new Tle(this._earthCtrl,o)};id.prototype.createTerrainExcavation=function(o){return new Rle(this._earthCtrl,o)};id.prototype.createExcavationAndFillAnalysis=function(o){return new Ple(this._earthCtrl,o)};id.prototype.createVolumetricMeasure=function(o){return new _At(this._earthCtrl,o)};id.prototype.createModelVolumetric=function(o){return new wAt(this._earthCtrl,o)};id.prototype.createModelCutting=function(o){return new bAt(this._earthCtrl,o)};id.prototype.createTerrainCutting=function(o){return new QAt(this._earthCtrl,o)};id.prototype.createModelSection=function(o){return new SAt(this._earthCtrl,o)};var Fle=id;function Nle(o,A){if(this._earthCtrl=o,!O(A.flagHtml))throw new Ui("flagDiv is required.");this._flagHtml=A.flagHtml,this._options=Ae(A,Ae.EMAIL),this._circleRadius=Ae(A.circleRadius,10),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,0),this._show=Ae(A.show,!0),this._flagScale=Ae(A.flagScale,4),this._circleColor=Ae(A.circleColor,At.RED),this._cylinderColor=Ae(A.cylinderColor,At.YELLOWGREEN),this._duration=Ae(A.duration,2e3),this._gradient=Ae(A.gradient,2),this._count=Ae(A.count,2),this._canvasZoom=Ae(A.canvasZoom,10),this._circleEntity=void 0,this._cylinderEntity=void 0,this._lineEntity=void 0,this._htmlPlaneEntity=void 0,this._linePlaneEntity=void 0,this._flagDiv=document.createElement("div"),this._flagDiv.style.opacity="0.7",this._flagDiv.style.margin="0",this._flagDiv.style.padding="0",this._flagDiv.id=Ae(A.id,Vu()),this._flagDiv.innerHTML=this._flagHtml,this._show&&this.addToMap()}Nle.prototype.removeFromMap=function(){O(this._circleEntity)&&(this._earthCtrl.entities.remove(this._circleEntity),this._circleEntity=void 0),O(this._cylinderEntity)&&(this._earthCtrl.entities.remove(this._cylinderEntity),this._cylinderEntity=void 0),O(this._lineEntity)&&(this._earthCtrl.entities.remove(this._lineEntity),this._lineEntity=void 0),O(this._linePlaneEntity)&&(this._earthCtrl.entities.remove(this._linePlaneEntity),this._linePlaneEntity=void 0),O(this._htmlPlaneEntity)&&(this._earthCtrl.entities.remove(this._htmlPlaneEntity),this._htmlPlaneEntity=void 0)};Nle.prototype.addToMap=function(){let o=this,A=0,f=2,m,C=ee.fromDegrees(o._lon,o._lat,o._height);if(O(o._circleEntity)||(o._circleEntity=o._earthCtrl.entities.add({position:C,ellipse:{height:o._height,semiMinorAxis:o._circleRadius,semiMajorAxis:o._circleRadius,material:new Z8({duration:o._duration,gradient:o._gradient,color:o._circleColor,count:o._count})}})),!O(o._cylinderEntity)){let v=o._circleRadius*2/5,E=o._circleRadius*3/4;m=dQ.changeCartesian3Height(C,E/2),o._cylinderEntity=o._earthCtrl.entities.add({position:m,cylinder:{length:E,topRadius:v,bottomRadius:v,fill:!0,outline:!1,material:o._cylinderColor}})}if(O(o._lineEntity)||(A=o._circleRadius*o._flagScale+o._height,o._lineEntity=o._earthCtrl.entities.add({polyline:{width:f,positions:ee.fromDegreesArrayHeights([o._lon,o._lat,o._height,o._lon,o._lat,A]),material:o._cylinderColor}})),!O(o._htmlPlaneEntity)){A=o._circleRadius*o._flagScale;let v=A/5,E=v*3,I=A-v/2,w=4*f,Q=new ee(w/2,0,I),M=dQ.changeCartesian3ByScalar(C,Q);this._linePlaneEntity=o._earthCtrl.entities.add({position:M,plane:{plane:new Wa(ee.UNIT_Y,0),dimensions:new It(w,v),material:o._cylinderColor}});let B=new ee(E/2+w,0,I);m=dQ.changeCartesian3ByScalar(C,B);let T=o._flagDiv,D=o._canvasZoom,F=document.createElement("canvas");F.width=10*v/E*D,F.height=10*D,lH.drawDocument(T,F,{zoom:D}).then(function(L){o._htmlPlaneEntity=o._earthCtrl.entities.add({position:new Bn(y,!1),plane:{plane:new Bn(x,!0),dimensions:new It(E,v),material:new z0({image:L.image,transparent:!0})}})},function(L){console.info(L)})}function y(){return m}function x(){let v=new ee;return v=ee.negate(ee.UNIT_Y,v),new Wa(v,0)}};Object.defineProperties(Nle.prototype,{});var DAt=Nle;function kle(o,A){this._earthCtrl=o,this._scene=o.coreMap.scene,this._options=O(A,Ae.EMPTY_OBJECT),this._color=Ae(A.color,At.RED),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,0),this._statistics=Ae(A.statisticData,1e3),this._radius=Ae(A.radius,100),this._duration=Ae(A.duration,2e3),this._gradient=Ae(A.gradient,2),this._count=Ae(A.count,2),this._scale=Ae(A.dataScale,1),this._show=Ae(A.show,!0),this._billboardWidthRatio=Ae(A.billboardWidthRatio,1.2),this._billboardHeightRatio=Ae(A.billboardHeightRatio,2.4),this._prefix=Ae(A.prefix,""),this._scaleByDistance=Ae(A.scaleByDistance,new To(1500,3,15e3,.1)),this._topFillColor=Ae(A.topFillColor,At.fromCssColorString("#323232")),this._circleEntity=void 0,this._cylinderEntity=void 0,this._billboardEntity=void 0,this._position=ee.fromDegrees(this._lon,this._lat,this._height),this._show&&this.addToMap()}var RN=new ee;kle.prototype.addToMap=function(){let o=this;if(O(o._circleEntity)||(o._circleEntity=o._earthCtrl.entities.add({position:o._position,ellipse:{height:o._height,semiMinorAxis:o._radius,semiMajorAxis:o._radius,material:new Z8({duration:o._duration,gradient:o._gradient,color:o._color,count:o._count})}})),!O(o._cylinderEntity)){RN=ee.clone(o._position,RN);let A=o._statistics*o._scale,f=Vn.eastNorthUpToFixedFrame(RN),m=new ee(0,0,A/2);Xe.multiplyByPoint(f,m,RN),o._cylinderEntity=o._earthCtrl.entities.add({position:RN,cylinder:{length:A,topRadius:o._radius/10,bottomRadius:o._radius/10,fill:!0,outline:!1,material:o._color}})}if(!O(o._billboardEntity)){RN=ee.clone(o._position,RN);let A=o._cylinderEntity.cylinder.length._value,f=Kt.fromCartesian(RN),m=ee.fromRadians(f.longitude,f.latitude,f.height+A);o._billboardEntity=o._earthCtrl.entities.add({position:m,billboard:{scaleByDistance:o._scaleByDistance,verticalOrigin:bn.BOTTOM,width:o._radius/o._billboardWidthRatio,height:o._radius/o._billboardHeightRatio,image:NLi(o._color,o._topFillColor,o._prefix+o._statistics,o._radius).toDataURL()}})}};kle.prototype.removeFromMap=function(){O(this._cylinderEntity)&&(this._earthCtrl.entities.remove(this._cylinderEntity),this._cylinderEntity=void 0),O(this._circleEntity)&&(this._earthCtrl.entities.remove(this._circleEntity),this._circleEntity=void 0),O(this._billboardEntity)&&(this._earthCtrl.entities.remove(this._billboardEntity),this._billboardEntity=void 0)};function LLi(o,A,f,m){o.save(),o.strokeStyle="rgba(0,0,0,0)",o.scale(m/150,m/100),o.save(),o.fillStyle=A.toCssColorString(),o.lineWidth=4,o.beginPath(),o.moveTo(77.8,82.1),o.lineTo(64.6,69),o.lineTo(23.8,69),o.bezierCurveTo(20.8,69,18.3,66.5,18.3,63.5),o.lineTo(18.3,22.5),o.bezierCurveTo(18.3,19.5,20.8,17,23.8,17),o.lineTo(131.8,17),o.bezierCurveTo(134.8,17,137.3,19.5,137.3,22.5),o.lineTo(137.3,63.5),o.bezierCurveTo(137.3,66.5,134.8,69,131.8,69),o.lineTo(90.9,69),o.lineTo(77.8,82.1),o.closePath(),o.moveTo(23.8,18),o.bezierCurveTo(21.3,18,19.3,20,19.3,22.5),o.lineTo(19.3,63.5),o.bezierCurveTo(19.3,66,21.3,68,23.8,68),o.lineTo(65,68),o.lineTo(77.7,80.7),o.lineTo(90.5,68),o.lineTo(131.8,68),o.bezierCurveTo(134.3,68,136.3,66,136.3,63.5),o.lineTo(136.3,22.5),o.bezierCurveTo(136.3,20,134.3,18,131.8,18),o.lineTo(23.8,18),o.closePath(),o.fill(),o.stroke(),o.restore(),o.save(),o.fillStyle=f.toCssColorString(),o.beginPath(),o.moveTo(131.8,18),o.lineTo(23.80000000000001,18),o.bezierCurveTo(21.30000000000001,18,19.30000000000001,20,19.30000000000001,22.5),o.lineTo(19.30000000000001,63.5),o.bezierCurveTo(19.30000000000001,66,21.30000000000001,68,23.80000000000001,68),o.lineTo(65,68),o.lineTo(77.7,80.7),o.lineTo(90.5,68),o.lineTo(131.8,68),o.bezierCurveTo(134.3,68,136.3,66,136.3,63.5),o.lineTo(136.3,22.5),o.bezierCurveTo(136.3,20,134.2,18,131.8,18),o.closePath(),o.fill(),o.stroke(),o.restore(),o.restore()}function FLi(o,A,f){let m=f/1.4,C=m,y=m;A.width>A.height?y=m*(A.height/A.width):A.width<A.height&&(C=m*(A.width/A.height));let x=f/150*8,v=Math.round((f-C+x)/2),E=Math.round((5/6*f-y)/2);o.drawImage(A,v,E,C,y)}function NLi(o,A,f,m){let C=document.createElement("canvas");C.width=m,C.height=m;let y=C.getContext("2d");LLi(y,o,A,m);let x=m,v=N5(f,{font:`bold ${x}pt Microsoft YaHei`,fillColor:o});return FLi(y,v,x),C}Object.defineProperties(kle.prototype,{billboard:{get:function(){return this._billboardEntity}},cylinder:{get:function(){return this._cylinderEntity}},circle:{get:function(){return this._circleEntity}},show:{get:function(){return this._show},set:function(o){O(this._billboardEntity)&&(this._billboardEntity.show=o),O(this._cylinderEntity)&&(this._cylinderEntity.show=o),O(this._circleEntity)&&(this._circleEntity.show=o)}}});var TAt=kle;function dMe(o,A){if(this._earthCtrl=o,this._scene=o.coreMap.scene,this._options=Ae(A,Ae.EMPTY_OBJECT),this._color=Ae(A.color,At.RED),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,0),this._show=Ae(A.show,!0),this._containerWidth=Ae(A.containerWidth,200),this._containerHeight=Ae(A.containerHeight,200),this._containerColor=Ae(A.cylinderColor,At.YELLOWGREEN),this._canvasZoom=Ae(A.canvasZoom,10),this._scaleByDistance=Ae(A.scaleByDistance,new To(1500,3,15e3,.1)),this._tipsHtml=A.tipsHtml,this._tipsEntity=void 0,this._tipsDiv=document.createElement("div"),this._tipsDiv.style.opacity="0.7",this._tipsDiv.style.margin="0",this._tipsDiv.style.padding="0",this._tipsDiv.id=Ae(A.id,Vu()),this._tipsDiv.innerHTML=this._tipsHtml,!O(A.tipsHtml))throw new Ui("tipsHtml is required.");this.addToMap()}dMe.prototype.removeFromMap=function(){O(this._tipsEntity)&&(this._earthCtrl.entities.remove(this._tipsEntity),this._tipsEntity=void 0),O(this._tipsDiv)&&(this._earthCtrl.entities.remove(this._tipsDiv),this._tipsDiv=void 0)};dMe.prototype.addToMap=function(){let o=this,A=ee.fromDegrees(o._lon,o._lat,o._height);if(!O(o._tipsEntity)){let m=o._containerHeight,C=o._containerWidth,y=o._canvasZoom,x=o._tipsDiv,v=document.createElement("canvas");v.width=C,v.height=m,lH.drawDocument(x,v,{zoom:y}).then(function(E){o._tipsEntity=o._earthCtrl.entities.add({position:new Bn(f,!1),billboard:{scaleByDistance:o._scaleByDistance,verticalOrigin:bn.BOTTOM,width:C,height:m,image:E.image.src}})},function(E){console.info(E)})}function f(){return A}};var MAt=dMe;function WO(o,A){this._earthCtrl=o,this._scene=o.coreMap.scene,this._options=Ae(A,Ae.EMPTY_OBJECT),this.element=document.createElement("div"),this._html=Ae(A.html,""),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,10),this._show=Ae(A.show,!0),this._removeHandler=void 0,this._pos=void 0,this._position=void 0,this._c=void 0,this._changedC=void 0,this._point=void 0,this._parameter=A,this._rtti="GwScreenDialog",this.isInit=!1,this.isInit===!1&&this.addToMap()}WO.prototype.setHtml=function(o){this.element.innerHTML=o};WO.prototype.setShow=function(o){if(!this.isInit)return 0;this.element.style.display=o?"block":"none"};WO.prototype.showAt=function(){if(!this.isInit)return 0;this._position&&(this._pos=Ss.wgs84ToWindowCoordinates(this._scene,this._position),this._pos&&(this.element.style.left=`${this._pos.x}px`,this.element.style.top=`${this._pos.y}px`))};WO.prototype.removeFromMap=function(){this.element.remove(),this.isInit=!1};WO.prototype.addToMap=function(){if(this.isInit)return 0;nA(".map-widget",this.element),this.element.innerHTML=this._html,this.element.style.position="absolute",this.isInit=!0,this._position=ee.fromDegrees(this._lon,this._lat,this._height),this.showAt(),this._c=new It(this._pos.x,this._pos.y);let o=this;this._scene.camera.moveStart.addEventListener(function(){o._removeHandler=o._scene.postRender.addEventListener(function(){if(o._c){let A=new L5(Di.WGS84,o._earthCtrl.camera._camera.position);A&&o._position&&(A.isPointVisible(o._position)===!1?o.setShow(!1):(o._show===!0&&o.setShow(!0),o._changedC=Ss.wgs84ToWindowCoordinates(o._scene,o._position),o._changedC?(o._c=o._changedC,o.showAt()):o.setShow(!1)))}})}),this._scene.camera.moveEnd.addEventListener(function(){o._removeHandler&&o._removeHandler.call()})};Object.defineProperties(WO.prototype,{show:{get:function(){return this._show},set:function(o){this._show!==o&&(this._show=o,this.setShow(o))}},html:{get:function(){return this._html},set:function(o){this._html!==o&&(this._html=o,this.setHtml(o))}},lon:{get:function(){return this._lon},set:function(o){this._lon!==o&&(this._lon=o,this._position=ee.fromDegrees(this._lon,this._lat,this._height),this.showAt())}},lat:{get:function(){return this._lat},set:function(o){this._lat!==o&&(this._lat=o,this._position=ee.fromDegrees(this._lon,this._lat,this._height),this.showAt())}},height:{get:function(){return this._height},set:function(o){this._height!==o&&(this._height=o,this._position=ee.fromDegrees(this._lon,this._lat,this._height),this.showAt())}}});var PAt=WO;function OW(o){this._earthCtrl=o,this._coreMap=o.coreMap}OW.prototype.createStatisticFlag=function(o){return new DAt(this._earthCtrl,o)};OW.prototype.createStatisticCylinder=function(o){return new TAt(this._earthCtrl,o)};OW.prototype.createTipsContainer=function(o){return new MAt(this._earthCtrl,o)};OW.prototype.createScreenDialog=function(o){return new PAt(this._earthCtrl,o)};var RAt=OW;function Ole(){var o=["getKeyRecoveryParam","curveType","Input not Buffer","map","_ipad","b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef","setAutoPadding","rejected",'{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}',"dir","transform","ERR_UNKNOWN_ENCODING","mulf","Apr","_verify2","tmp","EncoderBuffer","password","raw","isBoxedPrimitive","onRuntimeInitialized","seqof","addn","sqlite3_bind_double","sum32_5","000000000000000000","bufferedRequest","non-byte EncoderBuffer value","set","ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","_countBits","assign","publicKey","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758","privateExponent","fired","root","isString","invalid sig","WeakMap","modulus must be greater than 1","_sqlite3_result_int64","-e4437ed6010e88286f547fa90abfe4c3","onend","modelDbModelIdList","The argument '","5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b","save","arrayBufferBlockCount","sum64_5_hi","notStrictEqual","sqlite3_column_blob","entry","c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","utf8","c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","readableListening","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865","/dev/stdin","clock","Password","codes","exitKey","a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","SetModelStoreyTransform","fromRed works only with numbers in reduction context","callbackify","e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","worldDirection","494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","byteLength","spread","kdeparams","canvas","7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","_final","not ","createDecipher","chdir","6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c","[object HTMLCollection]","_sqlite3_changes","dataStoreArrayBuffer","Trace","shim","isArgumentsObject","'name' must be a string","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58","isBuf","falling back to ArrayBuffer instantiation","Index out of range","call","[object Object]","emitter","tagged","rsa",'Failed to peek tag: "',"content","Attempt to access memory outside buffer bounds","eject","ERR_FR_TOO_MANY_REDIRECTS","exists","da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","pipe","String","boolean","Rand","_decodeTag","getHighWaterMark","3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","ERR_BUFFER_OUT_OF_BOUNDS","getCiphers","callee","2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06","serialNumber","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc","tinv","ineg","bool","0x8000000000000000","%Object.getOwnPropertyDescriptor%","00000000000000000","sync","maj32",". Build with -s ASSERTIONS=1 for more info.","0x7fffffffffffffff","search","iterator","readInt16LE","0000000000000","ECONNABORTED","join32","d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","imuln","zeroBits","acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","mtime","setRequestHeader","Instance","9333177ztxjEH","imul","worldUp","\x1B[31m"," [Function","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3","utils","toNumber","Number","heartbeat","ended","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375","isNull","stream","ixor","_importPublic","da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","outSize","path=","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589","hmacStrength","trying to set auth tag in unsupported state","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d","fillLast",'"buf" argument must be a Buffer or Uint8Array',"Jul","fromSecret","ETIMEDOUT","content-length","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e","notStrictEqualObject","aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","746590PyDowD","subjectPrivateKey","emitClose","writing","_secret","___errno_location"," ** ","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8","Number is too big","Function","_decode"," and <= ","4446261rhToce","RDNSequence","shift","numstr","oneC","Cancel","readingMore","BasePoint","52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","simpleSieve","getDivisor","charstr","a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","_events","SaveShell","Premature close","/dev/shm","176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ms exceeded","_sqlite3_open",'" argument must be of type number. Received type ',"recoveryParam","HEAP32","00000000000000000000000","onlyShowShells","persEnc","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8","revBin","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573","config","des-ede3","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e","allowHalfOpen","Not implemented yet","copy","computeSecret","Cipher","d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","handlers","Digest already called",`
`}Object.defineProperties(dAt.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return this._pps!==null},set:function(o){o?ELi(this):ILi(this)}},maxHeight:{get:function(){return this._maxHeight},set:function(o){this._maxHeight=o}},minHeight:{get:function(){return this._minHeight},set:function(o){this._minHeight=o}}});var zO=dAt;function xy(o,A){this._earthCtrl=o,this._coreMap=o.coreMap,this._minHeight=Ae(A.minHeight,0),this._maxHeight=Ae(A.maxHeight,0),this._extrudedHeight=Ae(A.extrudedHeight,0),this.shapeTool=void 0,this._speed=Ae(A.speed,1),this._baseWaterColor=Ae(A.baseWaterColor,new At(.2,.3,.6,.5)),this._waterFrequency=Ae(A.waterFrequency,1e3),this._animationSpeed=Ae(A.animationSpeed,.01),this._amplitude=Ae(A.amplitude,10),this._isPolygon=Ae(A.isPolygon,!0),this.eventHelper=new Mx,this._nowHeight=null,this._height=Ae(A.height,void 0),this._type=Ae(A.type,"up")}xy.prototype.drawPolygon=function(o){let A=this;this.shapeTool=A._earthCtrl.shapeTool.createDrawShapeTool(function(f){A.setPolygon({positions:f.result}),o&&o(A)})};xy.prototype.setPolygon=function(o){this.positions=o.positions;let A=this,f=A.computePolygonHeightRange(this.positions);A._minHeight=f.minHeight,A._maxHeight=f.maxHeight,A._extrudedHeight=A._minHeight};xy.prototype.computePolygonHeightRange=function(o){let A=[],f=this._earthCtrl.coreMap;for(let D=0;D<o.length;D++)A.push(o[D].clone());let m,C,y,x,v,E,I,w=0,Q=9999,M=Math.PI/Math.pow(2,11)/64,B=new rh.fromPositions({positions:A,vertexFormat:za.FLAT_VERTEX_FORMAT,granularity:M}),T=new rh.createGeometry(B);for(let D=0;D<T.indices.length;D+=3)m=T.indices[D],C=T.indices[D+1],y=T.indices[D+2],I=new ee(T.attributes.position.values[3*m],T.attributes.position.values[3*m+1],T.attributes.position.values[3*m+2]),(x=f.scene.globe.getHeight(Kt.fromCartesian(I)))<Q&&(Q=x),w<x&&(w=x),I=new ee(T.attributes.position.values[3*C],T.attributes.position.values[3*C+1],T.attributes.position.values[3*C+2]),(v=f.scene.globe.getHeight(Kt.fromCartesian(I)))<Q&&(Q=v),w<v&&(w=v),I=new ee(T.attributes.position.values[3*y],T.attributes.position.values[3*y+1],T.attributes.position.values[3*y+2]),(E=f.scene.globe.getHeight(Kt.fromCartesian(I)))<Q&&(Q=E),w<E&&(w=E);return{maxHeight:w,minHeight:Q}};xy.prototype.removeFromMap=function(){this._isPolygon?O(this.primitive)&&(this.removePrimitive(),this._extrudedHeight=this.minHeight,this.primitive=null):O(this.flood)&&(this.flood.show=!1),this.eventHelper&&this.eventHelper.removeAll(),this.shapeTool&&this.shapeTool.removeFromMap()};xy.prototype._onTick=function(){let o=this;o._type==="up"?o._extrudedHeight>=o._maxHeight?(o._extrudedHeight=o._maxHeight,o._nowHeight=o._extrudedHeight,o.eventHelper.removeAll()):(o._isPolygon?o.removePrimitive():O(o.flood)||(o.flood=new zO(o._earthCtrl,{minHeight:o.minHeight,maxHeight:o._extrudedHeight,positions:o.positions}),o.flood.show=!0),o._extrudedHeight+=o._speed,o._isPolygon?o.addPrimitive():o.flood.maxHeight=o._extrudedHeight):o._type==="down"&&(o._extrudedHeight<=o._minHeight?(o._extrudedHeight=o._minHeight,o._nowHeight=o._extrudedHeight,o.eventHelper.removeAll()):(o._isPolygon?o.removePrimitive():O(o.flood)||(o.flood=new zO(o._earthCtrl,{minHeight:o.minHeight,maxHeight:o._extrudedHeight,positions:o.positions}),o.flood.show=!0),o._extrudedHeight-=o._speed,o._isPolygon?o.addPrimitive():o.flood.maxHeight=o._extrudedHeight))};xy.prototype._onTickNext=function(){let o=this;o._nowHeight?o._type==="up"?o._extrudedHeight>=o._nowHeight+o._height?(o._extrudedHeight=o._nowHeight+o._height,o._nowHeight=o._extrudedHeight,o.eventHelper.removeAll()):(o._isPolygon?o.removePrimitive():O(o.flood)||(o.flood=new zO(o._earthCtrl,{minHeight:o.minHeight,maxHeight:o._extrudedHeight,positions:o.positions}),o.flood.show=!0),o._extrudedHeight+=o._speed,o._isPolygon?o.addPrimitive():o.flood.maxHeight=o._extrudedHeight):o._type==="down"&&(o._extrudedHeight<=o._nowHeight-o._height?(o._extrudedHeight=o._nowHeight-o._height,o._nowHeight=o._extrudedHeight,o.eventHelper.removeAll()):(o._isPolygon?o.removePrimitive():O(o.flood)||(o.flood=new zO(o._earthCtrl,{minHeight:o.minHeight,maxHeight:o._extrudedHeight,positions:o.positions}),o.flood.show=!0),o._extrudedHeight-=o._speed,o._isPolygon?o.addPrimitive():o.flood.maxHeight=o._extrudedHeight)):o._type==="up"?o._extrudedHeight>=o._minHeight+o._height?(o._extrudedHeight=o._minHeight+o._height,o._nowHeight=o._extrudedHeight,o.eventHelper.removeAll()):(o._isPolygon?o.removePrimitive():O(o.flood)||(o.flood=new zO(o._earthCtrl,{minHeight:o.minHeight,maxHeight:o._extrudedHeight,positions:o.positions}),o.flood.show=!0),o._extrudedHeight+=o._speed,o._isPolygon?o.addPrimitive():o.flood.maxHeight=o._extrudedHeight):o._type==="down"&&(o._extrudedHeight<=o._maxHeight-o._height?(o._extrudedHeight=o._maxHeight-o._height,o._nowHeight=o._extrudedHeight,o.eventHelper.removeAll()):(o._isPolygon?o.removePrimitive():O(o.flood)||(o.flood=new zO(o._earthCtrl,{minHeight:o.minHeight,maxHeight:o._extrudedHeight,positions:o.positions}),o.flood.show=!0),o._extrudedHeight-=o._speed,o._isPolygon?o.addPrimitive():o.flood.maxHeight=o._extrudedHeight))};xy.prototype.removePrimitive=function(){O(this.primitive)&&this._earthCtrl.primitives.remove(this.primitive)};xy.prototype.polygonAnalysis=function(){let o=this;O(o.shapeTool)&&(o.shapeTool.removeFromMap(),o.shapeTool=void 0),o._height?o.eventHelper.add(o._earthCtrl.coreMap.clock.onTick,xy.prototype._onTickNext,this):o.eventHelper.add(o._earthCtrl.coreMap.clock.onTick,xy.prototype._onTick,this);let A={};A.normalMap=`${globalThis.GEOWORLD_BASE_URL}Assets/Images/waterNormals.jpg`,A.baseWaterColor=o.baseWaterColor,A.frequency=o.waterFrequency,A.animationSpeed=o.animationSpeed,A.amplitude=o.amplitude;let f=new ss({fabric:{type:"Water",uniforms:A}});f.update(o._earthCtrl.coreMap.scene.context),o.primitiveAppearance=new MY({material:f,fragmentShaderSource:PY})};xy.prototype.postAnalysis=function(){let o=this;O(o.shapeTool)&&(o.shapeTool.removeFromMap(),o.shapeTool=void 0),o._height?o.eventHelper.add(o._earthCtrl.coreMap.clock.onTick,xy.prototype._onTickNext,this):o.eventHelper.add(o._earthCtrl.coreMap.clock.onTick,xy.prototype._onTick,this)};xy.prototype.addPrimitive=function(){let o=this;o.primitive=o._earthCtrl.primitives.add(new $a({geometryInstances:new co({geometry:rh.fromPositions({positions:o.positions,extrudedHeight:o._extrudedHeight})}),asynchronous:!1,appearance:o.primitiveAppearance}))};xy.prototype.startAnalysis=function(){let o=this;setTimeout(()=>{o._isPolygon?o.polygonAnalysis():o.postAnalysis()},100)};Object.defineProperties(xy.prototype,{isPolygon:{get:function(){return this._isPolygon}},minHeight:{set:function(o){this._minHeight=o},get:function(){return this._minHeight}},maxHeight:{set:function(o){this._maxHeight=o},get:function(){return this._maxHeight}},speed:{set:function(o){this._speed=o},get:function(){return this._speed}},baseWaterColor:{set:function(o){this._baseWaterColor=o},get:function(){return this._baseWaterColor}},waterFrequency:{set:function(o){this._waterFrequency=o},get:function(){return this._waterFrequency}},animationSpeed:{set:function(o){this._animationSpeed=o},get:function(){return this._animationSpeed}},amplitude:{set:function(o){this._amplitude=o},get:function(){return this._amplitude}},height:{set:function(o){this._height=o,this.postAnalysis()},get:function(){return this._height}},type:{set:function(o){this._type=o},get:function(){return this._type}}});var _le=xy;function KO(o,A){this._earthCtrl=o,this._coreMap=o.coreMap,this.shapeTool=void 0,this.positions=void 0,this.echarts=void 0,this.mCallback=Ae(A.callback,void 0),this.defaultChart=Ae(A.defaultChart,!0),this.step=Ae(A.step,20),this.image=A.image,this.echarstView=A.echartsView,this.echartsParentView=A.echartsParentView,this.billboard=void 0,this.minHeight=0,this.maxHeight=0,this.profile={arrHB:[],arrPoint:[],arrLX:[],points:[],distance:0}}KO.prototype.drawPolyLine=function(){let o=this;this.shapeTool=o._earthCtrl.shapeTool.createDrawShapeTool(function(A){o.setPolyline({positions:A.result})},"polyline")};KO.prototype.setPolyline=function(o){this.positions=o.positions};KO.prototype.startAnalysis=function(){if(!this.positions)return console.info("\u8BF7\u5148\u7ED8\u5236\u5256\u9762\u7EBF\uFF01");if(this.positions.length>1){this.profile.arrLX.push(0);for(let A=0;A<this.positions.length-1;A++){let f=this.positions[A],m=this.positions[A+1];this.profile2PointAnalysis(f,m)}this.processHeight();let o=this.profile;this.defaultChart&&wLi(this,o),O(this.mCallback)&&this.mCallback(o),this.positions=void 0}};KO.prototype.processHeight=function(){let o=this;if(!(o.profile.arrHB.length<=0)){o.minHeight=o.maxHeight=o.profile.arrHB[0];for(let A=1;A<o.profile.arrHB.length;A++){let f=o.profile.arrHB[A];f>o.maxHeight?o.maxHeight=f:f<o.minHeight&&(o.minHeight=f)}o.minHeight=parseInt(o.minHeight/100)*100;for(let A=0;A<o.profile.arrHB.length;A++){let f=o.profile.arrHB[A];o.profile.arrHB[A]=f-o.minHeight}}};var BLi=new ee;KO.prototype.profile2PointAnalysis=function(o,A){let f=this,m=ee.distance(o,A),C=parseInt(m/f.step),y=Kt.fromCartesian(o),x=Kt.fromCartesian(A);f.positions.length>2&&f.profile.arrLX.length>1&&f.profile.arrLX.push(f.profile.arrLX[f.profile.arrLX.length-1]+aMe(f.profile.points[f.profile.points.length-1],y)),f.profile.points.push(y),f.profile.arrPoint.push(oMe(o)),f.profile.arrHB.push(y.height);let v=f.profile.arrLX.length-1;console.info(v);for(let E=1;E<C;E++){let I=ee.lerp(o,A,E/C,BLi),w=Kt.fromCartesian(I),Q=f._coreMap.scene.globe.getHeight(w);w.height=Q;let M=aMe(f.profile.points[v+E-1],w);f.profile.distance=f.profile.distance+M,f.profile.points.push(w),f.profile.arrLX.push(f.profile.arrLX[v+E-1]+M),f.profile.arrPoint.push(oMe(I)),f.profile.arrHB.push(Q)}return f.profile.points.push(x),f.profile.arrLX.push(f.profile.arrLX[f.profile.arrLX.length-1]+aMe(f.profile.points[f.profile.points.length-1],x)),f.profile.arrPoint.push(oMe(A)),f.profile.arrHB.push(x.height),f.profile};function mAt(o,A){let f=document.getElementById(o);f.style.display=A?"block":"none"}var fAt;function wLi(o,A){if(A!==null&&A.arrPoint!==null){mAt(o.echartsParentView,!0),O(o.echarts)||(o.echarts=Nb.init(document.getElementById(o.echarstView),"dark"));let f=A.arrPoint,m={grid:{left:10,right:10,bottom:10,containLabel:!0},dataZoom:[{type:"inside",throttle:50}],tooltip:{trigger:"axis",formatter:function(C){let y="";if(C.length===0)return y;let x=f[C[0].dataIndex],v=C[0].value+o.minHeight;return fAt=new ee.fromDegrees(x.x,x.y,v),O(o.billboard)||(o.billboard=o._earthCtrl.entities.add({name:"profile_billboard",position:new Bn(function(){return fAt},!1),billboard:{verticalOrigin:bn.BOTTOM,image:o.image,iconWidth:8,iconHeight:8,scale:.5}})),o.billboard.show||(o.billboard.show=!0),y+=`\u6240\u5728\u4F4D\u7F6E&nbsp;${pAt(x.x)},${pAt(x.y)}<br />\u8DDD\u8D77\u70B9&nbsp;<label>${gAt(C[0].axisValue)}</label><br />${C[0].seriesName}&nbsp;<label style='color:${C[0].color};'>${gAt(v)}</label><br />`}},xAxis:[{name:"\u884C\u7A0B",type:"category",boundaryGap:!1,axisLine:{show:!1},axisLabel:{show:!1},data:A.arrLX}],yAxis:[{type:"value",axisLabel:{formatter:function(C){return`${C+o.minHeight}\u7C73`}}}],series:[{name:"\u9AD8\u7A0B\u503C",type:"line",smooth:!0,symbol:"none",sampling:"average",itemStyle:{normal:{color:"rgb(255, 70, 131)"}},areaStyle:{normal:{color:new Nb.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"rgb(255, 158, 68)"},{offset:1,color:"rgb(255, 70, 131)"}])}},data:A.arrHB}]};o.echarts.setOption(m)}}function gAt(o,A){if(o===null)return"";o=Number(o),(A===null||A==="auto")&&(o<1e3?A="m":A="km");let f="";switch(A){default:case"m":f=`${o.toFixed(2)}\u7C73`;break;case"km":f=`${(o*.001).toFixed(2)}\u516C\u91CC`;break;case"mile":f=`${(o*54e-5).toFixed(2)}\u6D77\u91CC`;break;case"zhang":f=`${(o*.3).toFixed(2)}\u4E08`;break}return f}function pAt(o){let A=o.toString();return A.slice(0,A.indexOf(".")+3)}function oMe(o){let A=Kt.fromCartesian(o),f=je.toDegrees(A.longitude),m=je.toDegrees(A.latitude),C=A.height;return{x:f,y:m,z:C}}function aMe(o,A){let f=new l0;f.setEndPoints(o,A);let m=f.surfaceDistance;return m=Math.sqrt(Math.pow(m,2)+Math.pow(A.height-o.height,2)),m}KO.prototype.removeFromMap=function(){let o=this;O(o.shapeTool)&&(o.shapeTool.removeFromMap(),o.shapeTool=void 0),O(o.billboard)&&(o._earthCtrl.entities.remove(o.billboard),o.billboard=void 0),mAt(o.echartsParentView,!1)};var Ble=KO;function wle(o,A){this._earthCtrl=o,this._coreMap=o.coreMap,this._skylineColor=Ae(A.color,At.RED.withAlpha(1)),this._postProccessStage=null,this._postProcessStages=this._coreMap.scene.postProcessStages,this._width=Ae(A.width,1),this._edgeDetection=bv.createEdgeDetectionStage({width:this._width||1}),this.addToMap()}wle.prototype.addToMap=function(){this.removeFromMap();let o=new va({name:"czm_skylinetemp",fragmentShader:"uniform sampler2D colorTexture;uniform sampler2D depthTexture;varying vec2 v_textureCoordinates;void main(void){float depth = czm_readDepth(depthTexture, v_textureCoordinates);vec4 color = texture2D(colorTexture, v_textureCoordinates);if(depth<1.0 - 0.000001){gl_FragColor = color;}else{gl_FragColor = vec4(1.0,0.0,0.0,1.0);}}"}),A=new va({name:"czm_skylinetemp1",fragmentShader:"uniform sampler2D colorTexture;uniform sampler2D redTexture;uniform sampler2D silhouetteTexture;uniform vec4 skylineColor;varying vec2 v_textureCoordinates;void main(void){vec4 redcolor=texture2D(redTexture, v_textureCoordinates);vec4 silhouetteColor = texture2D(silhouetteTexture, v_textureCoordinates);vec4 color = texture2D(colorTexture, v_textureCoordinates);if(redcolor.r == 1.0){gl_FragColor = mix(color, skylineColor, silhouetteColor.a);}else{gl_FragColor = color;}}",uniforms:{redTexture:o.name,silhouetteTexture:this._edgeDetection.name,skylineColor:this._skylineColor}});this._postProccessStage=new CC({name:"czm_skyline",stages:[this._edgeDetection,o,A],inputPreviousStageTexture:!1,uniforms:this._edgeDetection.uniforms}),this._postProcessStages.add(this._postProccessStage)};wle.prototype.removeFromMap=function(){this._postProccessStage&&(this._earthCtrl.coreMap.scene.postProcessStages.remove(this._postProccessStage),this._postProccessStage=null)};Object.defineProperties(wle.prototype,{});var ble=wle;function Qle(o,A){this._earthCtrl=o,this._coreMap=o.coreMap,this.leftIndex=void 0,this.rightIndex=void 0,this.addToMap(A.leftIndex,A.rightIndex)}var YO={dragStartX:0,_scene:void 0};Qle.prototype.addToMap=function(o,A){document.getElementById("slider")&&this.clear();let m=this._coreMap.imageryLayers,C=this._coreMap.scene;YO._scene=C;let y=this._coreMap.container,x=document.createElement("div");x.id="slider",x.style.position="absolute",x.style.cursor="e-resize",x.style.top=0,x.style.backgroundColor="#D3D3D3",x.style.width="8px",x.style.height="100%",x.style.zIndex="1000",y.appendChild(x);let v=m.get(o),E=m.get(A);this.leftIndex=o,this.rightIndex=A,v.splitDirection=uI.LEFT,E.splitDirection=uI.RIGHT;let I=document.getElementById("slider");C.splitPosition=I.offsetLeft/I.parentElement.offsetWidth,I.addEventListener("mousedown",yAt,!1),window.addEventListener("mouseup",CAt,!1),I.style.left="50%",YO._scene.splitPosition=.5};function CAt(){window.removeEventListener("mousemove",sMe,!1)}function yAt(o){let A=document.getElementById("slider");YO.dragStartX=o.clientX-A.offsetLeft,window.addEventListener("mousemove",sMe,!1)}function sMe(o){let A=document.getElementById("slider"),f=(o.clientX-YO.dragStartX)/A.parentElement.offsetWidth;A.style.left=`${100*f}%`,YO._scene.splitPosition=f}Qle.prototype.removeFromMap=function(){let o=document.getElementById("slider");if(o){YO._scene.splitPosition="0%",o.removeEventListener("mousedown",yAt,!1),window.removeEventListener("mouseup",CAt,!1),window.removeEventListener("mousemove",sMe,!1),o.remove();let A=this._coreMap.imageryLayers,f=A.get(this.leftIndex),m=A.get(this.rightIndex);f.splitDirection=uI.NONE,m.splitDirection=uI.NONE,YO._scene=void 0}};Object.defineProperties(Qle.prototype,{});var xAt=Qle;function kW(o,A){this._earthCtrl=o,this._coreMap=o.coreMap,this.color=Ae(A.color,At.RED.withAlpha(.5)),this.positions=A.positions,this.baseHeight=Ae(A.baseHeight,0),this._height=Ae(A.height,0),this.extrudedHeight=Ae(A.extrudedHeight,1e4),this.limitHeightPrimitive=null,this.addToMap()}kW.prototype.addToMap=function(){if(this.removeFromMap(),!this.positions)return;let o=ee.fromDegreesArray(this.positions),A=new co({geometry:new rh({polygonHierarchy:new Un(o),height:this.baseHeight,extrudedHeight:this.baseHeight+this.extrudedHeight}),attributes:{color:Yo.fromColor(this.color)}});this.limitHeightPrimitive=this._coreMap.scene.primitives.add(new s6({geometryInstances:A,releaseGeometryInstances:!1,classificationType:Gu.CESIUM_3D_TILE}))};kW.prototype.changeHeight=function(o){!this.limitHeightPrimitive||(console.log("?!?!?!",this.limitHeightPrimitive),this.limitHeightPrimitive.readyPromise.then(A=>{let f=Kt.fromCartesian(this.limitHeightPrimitive._primitive._boundingSpheres[0].center);console.log("???",f);let m=ee.fromRadians(f.longitude,f.latitude,this.baseHeight),C=ee.fromRadians(f.longitude,f.latitude,this.baseHeight+o),y=ee.subtract(C,m,new ee);console.log("!!!!",this.limitHeightPrimitive._primitive.modelMatrix),this.limitHeightPrimitive._primitive.modelMatrix=Xe.setTranslation(Xe.IDENTITY,y,new Xe),this.baseHeight=this.baseHeight+o}))};kW.prototype.removeFromMap=function(){this.limitHeightPrimitive&&(this._coreMap.scene.primitives.remove(this.limitHeightPrimitive),this.limitHeightPrimitive=void 0)};Object.defineProperties(kW.prototype,{});var Sle=kW;function vAt(o){this._earthCtrl=o}vAt.prototype.toDegrees=function(o){let A=Kt.fromCartesian(o);return{lon:je.toDegrees(A.longitude),lat:je.toDegrees(A.latitude),height:A.height}};var EAt=vAt;function JO(o){this._viewer=o.coreMap,this._trans=new EAt}JO.prototype.addClipping=function(o,A={}){if(this.remove(),A.type==="polygon"){let f=A.positions,m=[];f.forEach(v=>{m.push(this._trans.toDegrees(v))}),m.push(m[0]);let C;A.isInner?C=this.isClockWise(m):C=!this.isClockWise(m),C&&m.reverse();let y=[],x=this.getInverseTransform(o);for(let v=0;v<m.length-1;v++){let E=this.createPlane(m[v],m[v+1],x);y.push(E)}o.clippingPlanes=new rB({planes:y,unionClippingRegions:!A.isInner})}return this.item=o,this};JO.prototype.getInverseTransform=function(o){let A,f=o.root.transform;return f&&f.equals(Xe.IDENTITY)||!f?A=Vn.eastNorthUpToFixedFrame(o.boundingSphere.center):A=Xe.fromArray(o.root.transform),Xe.inverseTransformation(A,new Xe)};JO.prototype.getOriginCoordinateSystemPoint=function(o,A){let f=ee.fromDegrees(o.lon,o.lat);return Xe.multiplyByPoint(A,f,new ee(0,0,0))};JO.prototype.createPlane=function(o,A,f){let m=this.getOriginCoordinateSystemPoint(o,f),C=this.getOriginCoordinateSystemPoint(A,f),y=new ee(0,0,1),x=ee.subtract(C,m,new ee),v=ee.cross(x,y,new ee);v=ee.normalize(v,v);let E=Wa.fromPointNormal(m,v);return kM.fromPlane(E)};JO.prototype.isClockWise=function(o){if(o.length<3)return null;o[0]===o[o.length-1]&&(o=o.slice(0,o.length-1));let A={i:-1,val:90};for(let E=0;E<o.length;E++){let{lat:I}=o[E];I<A.val&&(A.val=I,A.i=E)}let f=(A.i+o.length-1)%o.length,m=A.i,C=(A.i+1)%o.length,y={lat:o[m].lat-o[f].lat,lon:o[m].lon-o[f].lon},x={lat:o[C].lat-o[m].lat,lon:o[C].lon-o[m].lon},v=x.lon*y.lat-y.lon*x.lat;return v===0?o[C].lon<o[f].lon:v>0};JO.prototype.remove=function(){this.item&&this.item.clippingPlanes&&this.item.clippingPlanes.removeAll(),this.item&&(this.item.clippingPlanes=void 0)};var Dle=JO;var lMe;function uMe(o,A){this._viewer=o.coreMap,lMe=o.coreMap,this.createTerrainModifier(A.name,A.polygon,A.altitude)}uMe.prototype.findDirectParent=function(o){try{let A=[];if(o.width===Math.PI)return null;for(let f=0;f<lMe.scene.globe._surface._tilesToRender.length;f++){let m=lMe.scene.globe._surface._tilesToRender[f],C=m._rectangle;Si.intersection(C,o)&&A.push(m)}return A}catch(A){console.log(A)}return null};uMe.prototype.createTerrainModifier=function(o,A,f){let m=A.length,C=new Array(m);C.fill(f);let y=Vu(),x=Date.now(),v=Si.fromCartesianArray(A),E=this.findDirectParent(v);this._viewer.terrainProvider&&this._viewer.terrainProvider._modifyTerrainObjects===void 0&&(this._viewer.terrainProvider._modifyTerrainObjects=[]);let I=this._viewer,w={id:y,name:o,show:!0,rectangle:v,vertices:A,heights:C,timeStamp:x,remove:function(){if(I.terrainProvider&&I.terrainProvider._modifyTerrainObjects)for(let Q=I.terrainProvider._modifyTerrainObjects.length-1;Q>=0;Q--)I.terrainProvider._modifyTerrainObjects[Q].id===y&&I.terrainProvider._modifyTerrainObjects.splice(Q,1);if(E)try{for(let Q=0;Q<E.length;Q++)try{E[Q]._parent.freeResources()}catch(M){console.log(M)}}catch(Q){console.log(Q)}}};if(this._viewer.terrainProvider._modifyTerrainObjects.push(w),E)try{for(let Q=0;Q<E.length;Q++)try{E[Q]._parent.freeResources()}catch(M){console.log(M)}}catch(Q){console.log(Q)}return w};var Tle=uMe;var YH;function cMe(o){this._earthCtrl=o,this.Viewer=o.coreMap,YH=o.coreMap}cMe.prototype.CreateTooltip=function(o={},A,f){let m,C,y,x,v;typeof o=="object"&&(m=o),m&&m.origin?(m.origin==="center"&&(C=15,y=-12),m.origin==="top"&&(C=15,y=-44),m.origin==="bottom"&&(C=15,y=20)):(C=15,y=20),m&&m.color?(m.color==="white"&&(x="background: rgba(255, 255, 255, 0.8);color: black;"),m.color==="black"&&(x="background: rgba(0, 0, 0, 0.5);color: white;"),m.color==="yellow"&&(x="color: black;background-color: #ffcc33;border: 1px solid white;")):x="background: rgba(0, 0, 0, 0.5);color: white;",m&&m.id?v=`toolTip${m.id}`:v="toolTip";let E=document.getElementById(v);if(!E){let I=document.createElement("div");nA(".map-widget",I);let w=`<div id="${v}" style="display: none;pointer-events: none;position: absolute;z-index: 1000;opacity: 0.8;border-radius: 4px;padding: 4px 8px;white-space: nowrap;font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px;${x}"></div>`;nA(".map-widget",w),E=document.getElementById(v)}return f?(E.innerHTML=o,E.style.left=`${A.x+C}px`,E.style.top=`${A.y+y}px`,E.style.display="block"):E.style.display="none",{tooltip:E,style:m,showAt:function(I,w){this.tooltip.innerHTML=w,this.style&&this.style.origin?(this.style.origin==="center"&&(C=15,y=-this.tooltip.offsetHeight/2),this.style.origin==="top"&&(C=15,y=-this.tooltip.offsetHeight-20),this.style.origin==="bottom"&&(C=15,y=20)):(C=15,y=-this.tooltip.offsetHeight/2),this.tooltip.style.left=`${I.x+C}px`,this.tooltip.style.top=`${I.y+y}px`,this.tooltip.style.display="block"},show:function(I){I?this.tooltip.style.display="block":this.tooltip.style.display="none"}}};cMe.prototype.CreateResultTooltip=function(o={}){let A,f,m,C=o.id?`resultToolTip${o.id}`:"resultToolTip",y=document.getElementById(C);if(o.color?(o.color==="white"&&(m="background: rgba(255, 255, 255, 0.8);color: black;"),o.color==="black"&&(m="background: rgba(0, 0, 0, 0.5);color: white;"),o.color==="blue"&&(m="background: rgba(48, 119, 221);color: white;"),o.color==="yellow"&&(m="color: black;background-color: #ffcc33;border: 1px solid white;")):m="color: black;background-color: #ffcc33;border: 1px solid white;",!y){let Q=`<div id="${C}" class="resultToolTip" style="display: none;pointer-events: none;position: absolute;z-index: 1000;opacity: 0.8;border-radius: 4px;padding: 4px 8px;white-space: nowrap;font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px;${m}"></div>`;nA(".map-widget",Q),y=document.getElementById(C)}let x=o.addX||0,v=o.addY||0,E,I=this;function w(){if(E){if(o.far!==void 0||o.near!==void 0){let M=I.getPointToCameraDistance(YH,E);if(M>o.far){y.style.display="none";return}else if(M<o.near){y.style.display="none";return}y.style.display="block"}let Q=YH.scene.cartesianToCanvasCoordinates(E);if(!Q)return;A=-y.offsetWidth/2+x,f=-y.offsetHeight+v,y.style.left=`${Q.x+A}px`,y.style.top=`${Q.y+f}px`}}return YH.clock.onTick.addEventListener(w),{tooltip:y,position:E,showAt:function(Q,M){if(this.tooltip.innerHTML=M,this.tooltip.style.display="block",this.position=Q,E=Q,E){let B=YH.scene.cartesianToCanvasCoordinates(E);if(!B)return;A=-this.tooltip.offsetWidth/2+x,f=-this.tooltip.offsetHeight+v,this.tooltip.style.left=`${B.x+A}px`,this.tooltip.style.top=`${B.y+f}px`}},show:function(Q){Q?(this.tooltip.style.display="block",E=this.position):(this.tooltip.style.display="none",E=void 0)},destroy(){YH.clock.onTick.removeEventListener(w),y.remove()}}};var gw=cMe;var AMe=class{constructor(){this.minHeight=Number.MAX_VALUE,this.maxHeight=Number.MIN_VALUE,this.cutVolume=0,this.fillVolume=0,this.baseArea=0}},hMe=class{constructor(){this.minHeight=Number.MAX_VALUE,this.maxHeight=Number.MIN_VALUE,this.avgHeight=0,this.baseArea=0}};function Mle(o,A){this._earthCtrl=o,this._viewer=o.coreMap,this.baseHeight=Ae(A.baseHeight,0),this.options=A}Mle.prototype.start=function(){let o=this.options.positions,A=this.options.countBase,f=this.options.basePositions,m=this.options.baseHeight,C=new AMe,y=[];o.forEach(Q=>{let M=Kt.fromCartesian(Q);this.baseHeight=Math.min(M.height,Ae(m,this.baseHeight)),y.push(Ss.wgs84ToWindowCoordinates(this._viewer.scene,Q))});let x=bLi(y),v=Zl.randomPoint(100,{bbox:[x[0],x[1],x[2],x[3]]}),E=QLi(y);Zl.voronoi(v,{bbox:[x[0],x[1],x[2],x[3]]}).features.forEach(Q=>{let M=SLi(E,Q.geometry);if(M.length>0){let B=this.computeCubeInfo(M);this.baseHeight>B.avgHeight?C.fillVolume+=(this.baseHeight-B.avgHeight)*C.baseArea:C.cutVolume+=(B.avgHeight-this.baseHeight)*C.baseArea,C.maxHeight=Math.max(C.maxHeight,B.maxHeight),C.minHeight=Math.min(C.minHeight,B.minHeight),C.baseArea+=B.baseArea}});let w=this.countBaseVolume(A,f,m);return w!==0&&(C.cutVolume+=w,C.fillVolume+=w),C};Mle.prototype.countBaseVolume=function(o,A,f){let m=this;if(o){let C=[],y=[];for(let Q=0;Q<A.length;Q=Q+3){y.push(A[Q+2]);let M=ee.fromDegrees(A[Q],A[Q+1],f),B=Kt.fromCartesian(M);C.push(B)}C.push(C[0]);let x=IAt(C);y.sort(function(Q,M){return Q-M});let v=y[0],E=y[y.length-1];return Number(E-v)*x/2}return 0};Mle.prototype.computeCubeInfo=function(o){let A=this,f=[],m=Number.MAX_VALUE,C=Number.MIN_VALUE,y=0;o.forEach(function(E){let I=A._earthCtrl.coreMap.scene.camera.getPickRay(E),w=A._earthCtrl.coreMap.scene.globe.pick(I,A._earthCtrl.coreMap.scene),Q=Kt.fromCartesian(w);f.push(Q),m=Math.min(m,Q.height),C=Math.max(C,Q.height),y+=Q.height});let x=y/o.length,v=new hMe;return v.minHeight=m,v.maxHeight=C,v.avgHeight=x,v.baseArea=IAt(f),v};function IAt(o){let A=[0],f=[0],m=new l0,C=Math.PI/180;for(let x=0;x<o.length-1;x++){let v=o[x],E=o[x+1];m.setEndPoints(v,E);let I=Math.sqrt(Math.pow(m.surfaceDistance,2)),w=E.latitude*C,Q=E.longitude*C,M=v.latitude*C,B=v.longitude*C,T=-Math.atan2(Math.sin(Q-B)*Math.cos(M),Math.cos(w)*Math.sin(M)-Math.sin(w)*Math.cos(M)*Math.cos(Q-B));T<0&&(T+=Math.PI*2),f.push(Math.sin(T)*I+f[x]),A.push(Math.cos(T)*I+A[x])}let y=0;for(let x=0;x<A.length-1;x++)y+=A[x]*f[x+1]-A[x+1]*f[x];return Math.abs(y+A[A.length-1]*f[0]-A[0]*f[f.length-1])/2}function bLi(o){let A=[],f=Number.MAX_VALUE,m=Number.MIN_VALUE,C=Number.MAX_VALUE,y=Number.MIN_VALUE;return o.forEach(x=>{f=Math.min(f,x.x),m=Math.max(m,x.x),C=Math.min(C,x.y),y=Math.max(y,x.y)}),A.push(f),A.push(C),A.push(m),A.push(y),A}function QLi(o){let A=[[]];return o.forEach(m=>{A[0].push([m.x,m.y])}),A[0].push([o[0].x,o[0].y]),Zl.polygon(A).geometry}function SLi(o,A){let f=Zl.intersect(o,A);return f?.geometry!==void 0?DLi(f?.geometry):[]}function DLi(o){let A=[];return o.coordinates.forEach(function(f){f.forEach(function(m){A.push(new It(m[0],m[1]))})}),A.push(new It(o.coordinates[0][0][0],o.coordinates[0][0][1])),A}var Ple=Mle;function Gx(o,A){this._earthCtrl=o,this._viewer=o.coreMap,this._cesium=_r,this._scene=o.coreMap.scene,this._Tooltip=new gw(o),this.loadingImg=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,this.tooltip=this._Tooltip.CreateTooltip(),this.FlattenIsDraw=!1,this.wallArr=[],this.hierarchy=[],this.tophierarchy=[],this.heightsort=[],this.FlattenPolygon=[],this.deepth=100,this.polygon=null,this.editPoint=[],this.nowPoint=null,this.editPosition=[],this.topPositions=null,this._volumeLabel=void 0,this._volumeLabel1=void 0,this._option=Ae(A.option,{}),this._irregularCut=Ae(A.irregularCut,!1),this.terrainFlatten=new xN(o.coreMap.scene),this.CreatePolygon(A.height,A.option,A.callback)}Gx.prototype.CreatePolygon=function(o,A,f){if(this.FlattenIsDraw)return;this.drawHandler&&(this.drawHandler.destroy(),this.drawHandler=null),this.removeLabel(),this.addLoading(),this.FlattenIsDraw=!0;let m=this._viewer,C=this._cesium;this.deepth=o||this.deepth,this.removeFromMap(),!A&&(A={});let y=[],x=this.hierarchy,v=this.polygon,E,I=null,w=0,Q=this.heightsort,M=this.deepth,B=this.wallArr,T=this;this.drawHandler=new C.ScreenSpaceEventHandler(m.scene.canvas),m.scene.globe.depthTestAgainstTerrain=!0;let D=this.tooltip,F;this._viewer.container.style.cursor=`url(${window.SmartEarthRootUrl} 'Workers/image/cursor/draw.cur')`,this.drawHandler.setInputAction(function(V){E=R(V.position);let H=C.Cartographic.fromCartesian(E),q=C.Math.toDegrees(H.longitude),ie=C.Math.toDegrees(H.latitude),Z=H.height;y.push(E),x.push(q,ie,H.height),T.tophierarchy.push(q,ie,Z),w===0?(y.push(E),x.push(q,ie,H.height),F=m.entities.add({name:"\u4E34\u65F6\u7EBF",polyline:{positions:new C.CallbackProperty(()=>y,!1),clampToGround:!0,material:new C.ColorMaterialProperty(C.Color.YELLOW.withAlpha(.3)),width:3}})):w===1&&(F&&m.entities.remove(F),v=m.entities.add({name:null,id:T._earthCtrl.factory.createUUID(),polygon:{hierarchy:new C.PolygonHierarchy(C.Cartesian3.fromDegreesArrayHeights(x)),material:C.Color.YELLOW.withAlpha(.3)}}),v.polygon.hierarchy=new C.CallbackProperty(L,!1)),w++},C.ScreenSpaceEventType.LEFT_CLICK),this.drawHandler.setInputAction(function(V){if(w===0){D.showAt(V.endPosition,"\u5DE6\u952E\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u70B9");return}else w===1?D.showAt(V.endPosition,"\u70B9\u51FB\u6DFB\u52A0\u7B2C\u4E8C\u4E2A\u70B9"):D.showAt(V.endPosition,"\u53F3\u952E\u7ED3\u675F\u7ED8\u5236");E=R(V.endPosition);let H=C.Cartographic.fromCartesian(E),q=C.Math.toDegrees(H.longitude),ie=C.Math.toDegrees(H.latitude);x.splice(x.length-3,3),y.splice(y.length-1,1),y.push(E),x.push(q,ie,H.height)},C.ScreenSpaceEventType.MOUSE_MOVE),this.drawHandler.setInputAction(function(V){this.end&&this.end()}.bind(this),C.ScreenSpaceEventType.RIGHT_CLICK),this.end=V=>{if(D.show(!1),T._viewer.container.style.cursor="default",T.drawHandler.destroy(),F&&m.entities.remove(F),v&&m.entities.remove(v),this.FlattenIsDraw=!1,this.end=void 0,V==="cancel"||y.length<3)return;if(w<2){w=0;return}w=0;for(let se=2;se<x.length;se=se+3)Q.push(x[se]);Q.sort(function(se,ce){return se-ce}),v=m.entities.add({name:null,id:T._earthCtrl.factory.createUUID(),polygon:{hierarchy:new C.CallbackProperty(function(){return new C.PolygonHierarchy(C.Cartesian3.fromDegreesArrayHeights(x))},!1),material:new C.ImageMaterialProperty({image:C.defaultValue(A.bottomImgUrl,`${window.SmartEarthRootUrl}Workers/image/bottomplane.jpg`),repeat:new C.Cartesian2(1,1)})}}),y.push(y[0]);let H,q,ie,Z,oe,ne;for(let se=0;se<y.length-1;se++){H=C.Cartographic.fromCartesian(y[se]),q=C.Cartographic.fromCartesian(y[se+1]),ie=C.Math.toDegrees(H.longitude),oe=C.Math.toDegrees(H.latitude),Z=C.Math.toDegrees(q.longitude),ne=C.Math.toDegrees(q.latitude),I?I=I>q.height?q.height:I:I=H.height>q.height?q.height:H.height;let ce=T.getPoint(ie,oe,Z,ne,H.height,q.height),j=[],de=[];T.getHeightsFromLonLat(ce.positions,function(me){if(me){j=me;for(let _e=0;_e<j.length;_e++)de.push(T.heightsort[0]-T.deepth);T.drawwall(ce.wallJwd,j,de)}})}v.polygon.height=Q[0]-M,this.FlattenPolygon.push(v),this.originHeight=Q[0],k(y),this.topPositions=y,typeof f=="function"&&f(y)};function L(){return new C.PolygonHierarchy(C.Cartesian3.fromDegreesArrayHeights(x))}function R(V){let H;if(m.scene.terrainProvider.constructor.name==="EllipsoidTerrainProvider")H=m.camera.pickEllipsoid(V,m.scene.globe.ellipsoid);else{let ie=m.scene.camera.getPickRay(V);H=m.scene.globe.pick(ie,m.scene)}if(m.scene.pick(V)){let ie=m.scene.pickPosition(V);if(ie){H=ie;let Z=C.Cartographic.fromCartesian(H),oe=m.scene.globe.getHeight(Z);Z.height=oe,H=C.Cartographic.toCartesian(Z)}}return H}function k(V){let H=m.scene.globe,q=V.concat();q.splice(q.length-1,1);for(let Z=0;Z<q.length-1;Z++)q[Z].x===q[Z+1].x&&q[Z].y===q[Z+1].y&&(q.splice(Z,1),Z--);let ie=q.length;if(U(q)&&q.reverse(),T.irregularCut){T.terrainFlatten.clearPolygon();let Z=[],oe=m.scene.globe.ellipsoid;for(let ne=0;ne<q.length;ne++){let se=oe.cartesianToCartographic(q[ne]),ce=C.Math.toDegrees(se.longitude),j=C.Math.toDegrees(se.latitude),de=se.height;Z.push(ce,j,de)}T.terrainFlatten.addPolygon(Z),T.terrainFlatten.update(),T.terrainFlatten.clipPlaneOfFlatten=!0}else{let Z=[];for(let oe=0;oe<ie;++oe){let ne=(oe+1)%ie,se=C.Cartesian3.add(q[oe],q[ne],new C.Cartesian3);se=C.Cartesian3.multiplyByScalar(se,.5,se);let ce=C.Cartesian3.normalize(se,new C.Cartesian3),j=C.Cartesian3.subtract(q[ne],se,new C.Cartesian3);j=C.Cartesian3.normalize(j,j);let de=C.Cartesian3.cross(j,ce,new C.Cartesian3);de=C.Cartesian3.normalize(de,de);let me=new C.Plane(de,0),_e=C.Plane.getPointDistance(me,se);Z.push(new C.ClippingPlane(de,_e))}H.clippingPlanes=new C.ClippingPlaneCollection({planes:Z})}}function U(V){if(V.length>=3)return!((V[1].x-V[0].x)*(V[2].y-V[1].y)-(V[1].y-V[0].y)*(V[2].x-V[1].x)>0)}return this};Gx.prototype.getPoint=function(o,A,f,m,C,y){let x=this,v=160,E=je.lerp(o,f,1/v)-o,I=je.lerp(A,m,1/v)-A,w=[],Q=[],M=[],B;w.push(o,A),B=ee.fromDegrees(o,A),Q.push(Kt.fromCartesian(B));for(let T=0;T<v;T++){let D=o+(T+1)*E,F=A+(T+1)*I;w.push(D,F),B=ee.fromDegrees(D,F),Q.push(Kt.fromCartesian(B))}return w.push(f,m),B=ee.fromDegrees(f,m),Q.push(Kt.fromCartesian(B)),{wallJwd:w,positions:Q}};Gx.prototype.getHeightsFromLonLat=function(o,A){let f=this._viewer,m=f.camera,C=[];if(this.isHaveTerrain(f))if(O(f.terrainProvider.availability)){let y=vQ(f.terrainProvider,o);Promise.resolve(y).then(function(x){x.forEach(function(v){C.push(v.height)}),typeof A=="function"&&A(C)})}else o.forEach(function(y){let x=f.scene.globe.getHeight(y);C.push(x)}),typeof A=="function"&&A(C);else o.forEach(function(y){C.push(f.scene.globe.getHeight(y))}),typeof A=="function"&&A(C)};Gx.prototype.isHaveTerrain=function(){return!!(this._viewer.scene&&this._viewer.scene.terrainProvider&&this._viewer.scene.terrainProvider._layers)};Gx.prototype.drawwall=function(o,A,f){let m=this,C=m._viewer.entities.add({wall:{positions:new Bn(function(){return ee.fromDegreesArray(o)},!1),maximumHeights:A,minimumHeights:f}}),y=C.wall;y.material=new z0({image:Ae(m._option.wallImgUrl,`${window.SmartEarthRootUrl}Workers/image/dzmc.jpg`),repeat:new It(1,1)}),m.wallArr.push(C)};Gx.prototype.setDeepth=function(o){this.FlattenPolygon[0]&&this.FlattenPolygon[0].polygon.height.setValue(this.originHeight-o),this.wallArr.forEach(A=>{let f=A.wall.minimumHeights.getValue();f=Array(f.length),f.fill(this.originHeight-o),A.wall.minimumHeights.setValue(f)})};Gx.prototype.edit=function(o){let A=this,f=A.editPoint,m=A.nowPoint;if(A._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain=!1,m){for(let x of A.editPoint)x&&(x.show=!0);A.update(m,f,o);return}for(let x=2;x<A.hierarchy.length;x=x+3)A.hierarchy[x]=A.originHeight-A.deepth;A.FlattenPolygon[0]&&A._viewer.entities.remove(A.FlattenPolygon[0]),A.FlattenPolygon=[];let C=this._viewer.entities.add({name:null,id:A._earthCtrl.factory.createUUID(),polygon:{hierarchy:new Un(ee.fromDegreesArrayHeights(A.hierarchy)),material:new z0({image:Ae(A._option.bottomImgUrl,`${window.SmartEarthRootUrl}Workers/image/bottomplane.jpg`),repeat:new It(1,1)}),perPositionHeight:!0}});A.FlattenPolygon.push(C);let y=A.FlattenPolygon[0].polygon.hierarchy.getValue();for(let x of y.positions){let v=this._viewer.entities.add({id:A._earthCtrl.factory.createUUID(),position:x,point:{color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}});f.push(v)}A._earthCtrl.measure.pickObject(null,function(x){let v=x.pickedObject.id;for(let E of f)if(v.id===E.id){A.nowPoint=E,A.update(E,f,o);return}})};Gx.prototype.endEdit=function(){let o=this;if(o._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain=!0,o.editPoint.length>0)for(let A of o.editPoint)A&&(A.show=!1)};Gx.prototype.excavationAndFill=function(){this.removeLabel();let o=this;this.endEdit(),o.topPositions&&(this.isLoading(!0),setTimeout(()=>{let A=null,f=null,m=!1;if(o.editPosition.length>0){let v=[];f=[];for(let E=0;E<o.editPosition.length-1;E++){let I=Kt.fromCartesian(o.editPosition[E]),w=je.toDegrees(I.longitude),Q=je.toDegrees(I.latitude),M=I.height;v.push(M),f.push(w,Q,M)}v.sort(function(E,I){return I-E}),A=v[0],m=!0}else A=o.heightsort[0]-o.deepth;let y=new Ple(o._earthCtrl,{positions:o.topPositions,baseHeight:A,basePositions:f,countBase:m}).start(),x=o.computeCentroidOfPolygon(o.topPositions);this._volumeLabel=this._viewer.entities.add({position:ee.fromRadians(x.longitude,x.latitude,o.heightsort[o.heightsort.length-1]),label:{text:`\u6316\u65B9\u4F53\u79EF\uFF1A${y.cutVolume}\u7ACB\u65B9\u7C73`,pixelOffset:{x:0,y:-30},font:"16px \u5B8B\u4F53",fillColor:At.GOLD,verticalOrigin:bn.BOTTOM,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),this._volumeLabel1=this._viewer.entities.add({position:ee.fromRadians(x.longitude,x.latitude,o.heightsort[o.heightsort.length-1]),label:{text:`\u586B\u65B9\u4F53\u79EF\uFF1A${y.fillVolume}\u7ACB\u65B9\u7C73`,pixelOffset:{x:0,y:-70},font:"16px \u5B8B\u4F53",fillColor:At.GOLD,verticalOrigin:bn.BOTTOM,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),this.isLoading(!1),console.log(y.result)},100))};Gx.prototype.computeCentroidOfPolygon=function(o){let A=[],f=[],m=0,C=0;for(let v=0;v<o.length;v++){let E=Kt.fromCartesian(o[v]);m+=E.longitude,C+=E.latitude,A.push(E.longitude),f.push(E.latitude)}let y=0,x=0;return y=m/o.length,x=C/o.length,new Kt(y,x)};Gx.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=this.loadingImg,o.appendChild(A),this.loading=o,this._viewer.container.appendChild(o)};Gx.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};Gx.prototype.update=function(o,A,f){let m=this,C=o.position.getValue(),x=m._scene.globe.ellipsoid.cartesianToCartographic(C),v=je.toDegrees(x.longitude),E=je.toDegrees(x.latitude),I=x.height;o.position.setValue(ee.fromDegrees(v,E,I+f)),m.editPoint=A,m.editPosition=[];let w=[];for(let M of A){let B=M.position.getValue();w.push(B),m.editPosition.push(B)}m.FlattenPolygon[0].polygon.hierarchy=new Bn(function(){return new Un(w)},!0);let Q=m.editPosition;Q.push(Q[0]);for(let M=0;M<Q.length-1;M++){let T=[];for(let D=0;D<=160;D++){let F=ee.lerp(Q[M],Q[M+1],D/160,new ee),L=Kt.fromCartesian(F);T.push(L.height)}m.wallArr[M].wall.minimumHeights.setValue(T)}};Gx.prototype.removeFromMap=function(){this.endEdit(),this._earthCtrl.tools.clearTool(),this.editPoint=[],this.nowPoint=null;let o=this._viewer;if(this.wallArr.length>0){for(let A=0;A<this.wallArr.length;A++)o.entities.remove(this.wallArr[A]);this.wallArr=[]}o.scene.globe.clippingPlanes&&o.scene.globe.clippingPlanes.removeAll(),this.FlattenPolygon&&this.FlattenPolygon.length>0&&(this.FlattenPolygon.forEach(function(A){o.entities.remove(A)}),this.FlattenPolygon=[]),this.FlattenIsDraw=!1,this.removeLabel(),this.terrainFlatten&&this.terrainFlatten.clearPolygon()};Gx.prototype.removeLabel=function(){this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0)};var Rle=Gx;function _C(o,A={}){this._earthCtrl=o,this._viewer=o.coreMap,this._scene=o.coreMap.scene,this.options=Ae(A,{}),this._Tooltip=new gw(o),this._tooltip=this._Tooltip.CreateTooltip(),this._drawColor={point:Ae(this.options.drawColor?.point,At.BLUE),polyline:Ae(this.options.drawColor?.polyline,At.YELLOW),polygon:Ae(this.options.drawColor?.point,At.YELLOW.withAlpha(.5))},this.selectDatum=!0,this.onlyTerrain=!0,this.tin=!1,this._volumeTin=[],this.loadingImg=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,this.unit=Ae(A.unit,"km\xB3")}_C.prototype.removeFromMap=function(){this._prevEntity!==void 0&&(this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._prevEntity1!==void 0&&(this._viewer.entities.remove(this._prevEntity1),this._prevEntity1=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this._volumeTin.forEach(o=>{this._viewer.entities.remove(o)}),this._volumeTin=[],this.addPointHandle&&(this.addPointHandle.destroy(),this.addPointHandle=void 0),this.Triangulation=[],this.tinData=void 0,this._tooltip.show(!1)};_C.prototype.deleteObject=_C.prototype.removeFromMap;_C.prototype.startDrawing=function(o={},A="auto",f){let m=this._scene,C=this._tooltip,y=3,x=[],v=[],E=[],I;this._positions=v,this._degreesArr=E,this._drawColor.point=o.point||this._drawColor.point,this._drawColor.polyline=o.polyline||this._drawColor.polyline,this._drawColor.polygon=o.polygon||this._drawColor.polygon,this.loadingImg=o.loading||this.loadingImg,this.tin=Ae(o.tin,!0),this.onlyTerrain=Ae(o.onlyTerrain,!1),this.selectDatum=Ae(o.selectDatum,!0);let w=this;this._mouseHandler&&this._mouseHandler.destroy(),this.loading||this.addLoading();let Q=new Ur(m.canvas);this._mouseHandler=Q,this.removeFromMap(),this._viewer.container.style.cursor=`url(${globalThis.GEOWORLD_BASE_URL} 'Workers/image/cursor/draw.cur')`;let M;Q.setInputAction(function(T){if(T.position!==null){let D=m.camera.getPickRay(T.position),F=m.globe.pick(D,m);if(this._viewer.scene.pick(T.position)){let R=this._viewer.scene.pickPosition(T.position);R&&(F=R)}if(F){let R=Kt.fromCartesian(F),k=je.toDegrees(R.longitude),U=je.toDegrees(R.latitude);if(x.length===0&&(x.push(k,U),E.push([k,U]),v.push(F),I=F),v.length>=4){let V=Ss.wgs84ToWindowCoordinates(this._viewer.scene,I);if(V!==void 0){let H=V.x-T.position.x,q=V.y-T.position.y;if(H*H+q*q<16){x.splice(x.length-2,2),v.pop(),this.stopDrawing(f);return}}}x.push(k,U),E.push([k,U]),v.push(F),v.length===2&&!M&&(M=this._viewer.entities.add({name:"\u4E34\u65F6\u7EBF",polyline:{positions:new Bn(function(){return v},!1),clampToGround:!0,material:w._drawColor.polygon,width:3}})),v.length===y&&(M&&this._viewer.entities.remove(M),this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:new Un(ee.fromDegreesArray(x)),material:w._drawColor.polygon,fill:!0}}),this._prevEntity.polygon.hierarchy=new Bn(B,!1))}}}.bind(this),Ki.LEFT_CLICK),Q.setInputAction(function(T){let D=T.endPosition;if(D!==null)if(v.length===0)C.showAt(D,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let F=m.camera.getPickRay(D),L=m.globe.pick(F,m),R=this._viewer.scene.pick(D),k=!1;if(R){let U=this._viewer.scene.pickPosition(D);U&&(L=U),k=!0}if(L){let U=Kt.fromCartesian(L),V=je.toDegrees(U.longitude),H=je.toDegrees(U.latitude);if(x.splice(x.length-2,2),E.pop(),v.pop(),x.push(V,H),E.push([V,H]),v.push(L),C.showAt(D,"\u53F3\u952E\u7ED3\u675F\u7ED8\u5236"),v.length>=3&&v.length>=4){let q=Ss.wgs84ToWindowCoordinates(this._viewer.scene,I);if(q!==void 0){let ie=q.x-D.x,Z=q.y-D.y;ie*ie+Z*Z<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}}.bind(this),Ki.MOUSE_MOVE),Q.setInputAction(function(T){this.end&&this.end()}.bind(this),Ki.RIGHT_CLICK);function B(){return new Un(ee.fromDegreesArray(x))}return this.end=T=>{if(this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),w._viewer.container.style.cursor="default",this._tooltip.show(!1),M&&this._viewer.entities.remove(M),this.end=void 0,!(v.length<y)){if(this._prevEntity&&(this._prevEntity.polygon.hierarchy=ee.fromDegreesArray(x)),T==="cancel"){this._prevEntity&&this._viewer.entities.remove(this._prevEntity);return}this.stopDrawing(A,f)}},this};_C.prototype.stopDrawing=function(o,A){this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this._volumeTin.forEach(f=>{this._viewer.entities.remove(f)}),this._volumeTin=[],this.isLoading(!0),setTimeout(()=>{let f=this.computeCutVolume(o,this.onlyTerrain),m=C=>{let y=C.maxHeight,x=C.minHeight;this._prevEntity.polygon.height=C.minHeight,this._prevEntity.polygon.heightReference=0;let v={id:this._earthCtrl.factory.createUUID(),polygon:{hierarchy:{positions:this._positions},height:x,extrudedHeight:y,closeTop:!1,closeBottom:!1,material:At.CYAN.withAlpha(.2),outline:!0,outlineColor:At.RED,outlineWidth:2}};if(this._prevEntity1=this._viewer.entities.add(v),typeof A=="function"&&A(C),this.selectDatum){let E=()=>{this.addPoint(I=>{this.setDatum(I,w=>{typeof A=="function"&&A({...C,...w}),E()})})};E()}};this.onlyTerrain?f.then(C=>{m(C)}):m(f)},100)};_C.prototype.computeCentroidOfPolygon=function(o){let A=[],f=[],m=0,C=0;for(let v=0;v<o.length;v++){let E=Kt.fromCartesian(o[v]);m+=E.longitude,C+=E.latitude,A.push(E.longitude),f.push(E.latitude)}let y=0,x=0;return y=m/o.length,x=C/o.length,new Kt(y,x)};_C.prototype.computeCutVolume=function(o,A){let f=this,m=15e3,C=-15e3;if(o==="auto"){let E=wi.fromPoints(this._positions);console.log("BoundingSphere.radius",E.radius),o=E.radius/20}let y=this.getPointsInPolygon(this._degreesArr,o,!0),x=Zl.polygon([this._degreesArr]),v=()=>{let{tin:E}=this.tinFromPoints(y,{getArea:!0,polygon:x});this.tinData=E;let I={fill:0,dig:0},w,Q,M,B,T;this.Triangulation=[],E.features.forEach(L=>{if(L.positions){if(this.tin){let k=this._viewer.entities.add({polygon:{hierarchy:new Un(L.positions),material:this._drawColor.polygon,perPositionHeight:!0,outline:!0,outlineColor:At.YELLOW}});this._volumeTin.push(k)}let R=L.geometry.coordinates[0];w=R[0][2],Q=R[1][2],M=R[2][2],T=L.area,this.Triangulation.push({bottomArea:T,height:[w,Q,M]}),B=(w-m+Q-m+M-m)/3,B>0?I.dig=I.dig+T*B:I.fill=I.fill-T*B}});let D=this.computeCentroidOfPolygon(this._positions);this.unit!=="m\xB3"&&(I.dig=I.dig/1e9,I.fill=I.fill/1e9);let F=this.unit==="m\xB3"?"\u7ACB\u65B9\u7C73":"\u7ACB\u65B9\u5343\u7C73";return this._volumeLabel=this._viewer.entities.add({position:ee.fromRadians(D.longitude,D.latitude,C),label:{text:`\u6316\u65B9\u4F53\u79EF\uFF1A${I.dig.toFixed(4)}${F}`,pixelOffset:{x:0,y:-30},font:"16px \u5B8B\u4F53",fillColor:At.GOLD,verticalOrigin:bn.BOTTOM,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),this._volumeLabel1=this._viewer.entities.add({position:ee.fromRadians(D.longitude,D.latitude,C),label:{text:`\u586B\u65B9\u4F53\u79EF\uFF1A${I.fill.toFixed(4)}${F}`,pixelOffset:{x:0,y:-70},font:"16px \u5B8B\u4F53",fillColor:At.GOLD,verticalOrigin:bn.BOTTOM,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),this.isLoading(!1),{maxHeight:C,minHeight:m,volume:I,unit:this.unit,spacing:o}};if(A){let E=[];return y.features.forEach(w=>{let Q=w.geometry.coordinates;E.push(Kt.fromDegrees(Q[0],Q[1]))}),vQ(this._viewer.scene.globe.terrainProvider,E).then(w=>(y.features.forEach((Q,M)=>{let B=Q.geometry.coordinates;B[2]=w[M]&&w[M].height?w[M].height:0,C<B[2]&&(C=B[2]),m>B[2]&&(m=B[2])}),v()))}return y.features.forEach(E=>{let I=E.geometry.coordinates,w=new Kt(je.toRadians(I[0]),je.toRadians(I[1]));I[2]=this._viewer.scene.sampleHeight(w)||0,C<I[2]&&(C=I[2]),m>I[2]&&(m=I[2])}),v()};_C.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=this.loadingImg,o.appendChild(A),this.loading=o,this._viewer.container.appendChild(o)};_C.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};_C.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};_C.prototype.addPoint=function(o){this.addPointHandle&&(this.addPointHandle.destroy(),this.addPointHandle=null),this._prevEntity1&&(this.addPointHandle=new Ur(this._viewer.scene.canvas),this.addPointHandle.setInputAction(function(A){let f=this._viewer.scene.pick(A.position);if(f&&f.id&&f.id.id===this._prevEntity1.id){let m=this._viewer.scene.pickPosition(A.position);if(m){let C=Kt.fromCartesian(m);this.addPointHandle.destroy(),this.addPointHandle=null,o&&typeof o=="function"&&o(C.height.toFixed(1))}}}.bind(this),Ki.LEFT_CLICK),this.addPointHandle.setInputAction(function(A){let f=this._viewer.scene.pick(A.endPosition);f&&f.id&&f.id.id===this._prevEntity1.id?this._tooltip.showAt(A.endPosition,"\u70B9\u51FB\u4FEE\u6539\u57FA\u51C6\u9762\u9AD8\u5EA6"):this._tooltip.show(!1)}.bind(this),Ki.MOUSE_MOVE))};_C.prototype.showTin=function(o){this.tin=o,this._volumeTin.forEach(A=>{this._viewer.entities.remove(A)}),this._volumeTin=[],o&&this.tinData&&this.tinData.features.forEach(A=>{if(A.positions){let f=this._viewer.entities.add({polygon:{hierarchy:new Un(A.positions),material:this._drawColor.polygon,perPositionHeight:!0,outline:!0,outlineColor:At.YELLOW}});this._volumeTin.push(f)}})};_C.prototype.setDatum=function(o,A){if(this.Triangulation&&this.Triangulation.length>0){let f,m,C,y={fill:0,dig:0};this.Triangulation.forEach(function(v){f=v.bottomArea,m=v.height,C=(m[0]-o+m[1]-o+m[2]-o)/3,C>0?y.dig=y.dig+f*C:y.fill=y.fill-f*C}),this.unit!=="m\xB3"&&(y.dig=y.dig/1e9,y.fill=y.fill/1e9);let x=this.unit==="m\xB3"?"\u7ACB\u65B9\u7C73":"\u7ACB\u65B9\u5343\u7C73";this._volumeLabel.label.text=`\u6316\u65B9\u4F53\u79EF\uFF1A${y.dig.toFixed(4)}${x}`,this._volumeLabel1.label.text=`\u586B\u65B9\u4F53\u79EF\uFF1A${y.fill.toFixed(4)}${x}`,this._prevEntity.polygon.height=o,A&&typeof A=="function"&&A({volume:y,unit:this.unit})}};_C.prototype.getPointsInPolygon=function(o,A=50,f=!0){if(o.length<3)return;o.push(o[0]);let m=Zl.lineString(o),C=Zl.bbox(m),y=Zl.pointGrid(C,A,{units:"meters"}),x=Zl.polygon([o]),v=Zl.pointsWithinPolygon(y,x);if(f)for(let E=0;E<o.length-1;E++){let I=Zl.lineString([o[E],o[E+1]]),w={units:"meters"},Q=Zl.length(I,w),M;for(let B=A;;B+=A)if(B<=Q)M=Zl.along(I,B,w),v.features.push(M);else{M=Zl.along(I,Q,w),v.features.push(M);break}}return v};_C.prototype.tinFromPoints=function(o,A={}){let{polygon:f,getArea:m}=A,C=Zl.tin(o),y=0;return C&&C.features&&C.features.forEach(x=>{let v=!0;if(f){let E=Zl.centerOfMass(x);v=Zl.booleanPointInPolygon(E,f)}if(v){let E=x.geometry.coordinates[0],I=[],w=[];for(let Q=0;Q<3;Q++)I.push([E[Q][0],E[Q][1]]),w.push(ee.fromDegrees(E[Q][0],E[Q][1],E[Q][2]));x.positions=w,m&&(x.area=this.getArea(I,w,!0),y+=x.area)}}),{tin:C,area:y}};_C.prototype.getArea=function(o,A,f){if(o.length<3)return;o.push(o[0]);let m=o,C=0,y=Zl.polygon([m]),x;m.length===4?x=[y]:x=Zl.tesselate(y).features;let v,E,I,w;return x.forEach(Q=>{v=Q.geometry.coordinates[0],E=m.findIndex(F=>F.toString()===v[0].toString()),I=m.findIndex(F=>F.toString()===v[1].toString()),w=m.findIndex(F=>F.toString()===v[2].toString());let M=this.getdistance(A[E],A[I]),B=this.getdistance(A[I],A[w]),T=this.getdistance(A[E],A[w]),D=(M+B+T)/2;C+=Math.sqrt(D*((D-M)*(D-B)*(D-T)))}),f||(C<1e6?C=`${C.toFixed(2)}\u5E73\u65B9\u7C73`:C=`${(C/1e6).toFixed(2)}\u5E73\u65B9\u5343\u7C73`),C};_C.prototype.getdistance=function(o,A){let f=Kt.fromCartesian(o),m=Kt.fromCartesian(A),C=Di.MOON2000,x=new l0(f,m,C).surfaceDistance;return x=Math.sqrt(Math.pow(x,2)+Math.pow(m.height-f.height,2)),x};var _At=_C;function Lle(o){this.mEarthCtrl=o,this._polylines=[],this._resPolylines=[],this._points=[],this.entities=this.mEarthCtrl.entities,this.camera=this.mEarthCtrl.coreMap.camera,this.scene=this.mEarthCtrl.coreMap.scene}Lle.prototype.createLineOfSight=function(o){let A=[],f=this,m=[],C=[],y={polyline:[]};f.objectsToExclude=null;let x,v=function(){function M(B){this.options={polyline:{show:!0,positions:[],material:At.YELLOW,width:3,clampToGround:!1}},this.positionsp=B,this._init()}return M.prototype._init=function(){let B=this,T=function(){return B.positionsp};this.options.polyline.positions=new Bn(T,!1),this.polyline=f.entities.add(this.options),f.item=this.polyline,C.push(this.polyline)},M}(),E=new Ur(f.scene.canvas),I=[],w;if(this._points.length>0)for(let M=0;M<this._points.length;M++)this.entities.remove(this._points[M]);let Q=[];return E.setInputAction(function(M){let B,T=new ee(0,0,0);if(new ja(f.mEarthCtrl).pickVector(M.position,T)&&(B=T),!!B)if(I.length===0){I.push(B.clone(),B.clone());let F={leftX:M.position.x,leftY:M.position.y};Q.push(F),x=B.clone()}else{let F={rightX:M.position.x,rightY:M.position.y};Q.push(F);let L={postion:I,entity:C,cartesian:Q};m.push(L),Q=[],w=void 0,I=[],I.push(x.clone()),I.push(x.clone()),w=new v(I),A.push(w)}},Ki.LEFT_CLICK),E.setInputAction(function(M){let B,T=f.camera.getPickRay(M.endPosition);if(B=f.scene.globe.pick(T,f.scene),f.scene.pick(M.endPosition)){let F=f.scene.pickPosition(M.endPosition);F&&(B=F)}!B||I.length>=2&&(O(w)?B!==void 0&&(I.pop(),I.push(B)):(w=new v(I),A.push(w)))},Ki.MOUSE_MOVE),E.setInputAction(function(M){let B=f.entities.add(new UA);f.objectsToExclude=[B];let T=!0;for(let D=0;D<m.length;D++)D===0?T=f.tsjx(m[0].postion[0],m[0].postion[1]):T=f.tsjx(m[D].postion[0],m[D].postion[1]);I.pop(),f._polylines=y.polyline,E.destroy();for(let D=0;D<C.length;D++)f.entities.remove(C[D]);O(o)&&typeof o=="function"&&o(y)},Ki.RIGHT_CLICK),this};Lle.prototype.tsjx=function(o,A){let f=this,m=ee.normalize(ee.subtract(A,o,new ee),new ee),C=new ls(o,m),y=f.scene.globe.pick(C,f.scene);y!=null?(x(y,o,At.GREEN),x(y,A,At.RED)):x(o,A,At.GREEN);function x(v,E,I){let w=f.entities.add({polyline:{positions:[v,E],width:1,material:I,depthFailMaterial:I}});f._resPolylines.push(w)}return!1};Lle.prototype.deleteObject=function(){if(this._points.length>0){this.objectsToExclude=null;for(let o=0;o<this._points.length;o++)this.entities.remove(this._points[o])}if(this._resPolylines.length>0){for(let o=0;o<this._resPolylines.length;o++)this.entities.remove(this._resPolylines[o]);this._resPolylines=[]}};var BAt=Lle;function _h(o,A={}){this._earthCtrl=o,this._viewer=o.coreMap,this._scene=o.coreMap.scene,this.options=Ae(A,{}),this._Tooltip=new gw(o),this._tooltip=this._Tooltip.CreateTooltip(),this._drawColor={point:Ae(this.options.drawColor?.point,At.BLUE),polyline:Ae(this.options.drawColor?.polyline,At.YELLOW),polygon:Ae(this.options.drawColor?.polygon,At.YELLOW.withAlpha(.5))},this.selectDatum=!0,this.onlyTerrain=!0,this.tin=!1,this._volumeTin=[],this.loadingImg=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,this.wallArr=[],this.FlattenPolygon=[],this._Apositions=[],this._heightsort=null,this._deepth=100,this._positions=[],this._modelArr=Ae(A.modelArr,[]),this._isFlattening=Ae(A.isFlattening,!0),this.modelCuttingPolygon=null,this.wallImgUrl=Ae(A.wallImgUrl,null),this.bottomImgUrl=Ae(A.bottomImgUrl,null),this.calculate=Ae(A.calculate,!0),this._Loading=Ae(A.loading,!0),this.editPoint=[],this.nowPoint=null,this.hierarchy=[],this._originHeight=null}_h.prototype.removeMeasureFromMap=function(){this._prevEntity!==void 0&&(this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._prevEntity1!==void 0&&(this._viewer.entities.remove(this._prevEntity1),this._prevEntity1=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this._volumeTin.forEach(o=>{this._viewer.entities.remove(o)}),this._volumeTin=[],this.addPointHandle&&(this.addPointHandle.destroy(),this.addPointHandle=void 0),this.Triangulation=[],this.tinData=void 0,this._tooltip.show(!1)};_h.prototype.removeFromMap=function(){if(this.endEdit(),this.removeMeasureFromMap(),this.wallArr.length>0){for(let o=0;o<this.wallArr.length;o++)this._viewer.entities.remove(this.wallArr[o]);this.wallArr=[]}if(this.FlattenPolygon&&this.FlattenPolygon.length>0){for(let o=0;o<this.FlattenPolygon.length;o++)this._viewer.entities.remove(this.FlattenPolygon[o]);this.FlattenPolygon=[]}this.removeModelCutting()};_h.prototype.deleteObject=_h.prototype.removeFromMap;_h.prototype.startDrawing=function(o={},A){let f=Ae(o.spacing,"auto"),m=this._scene,C=this._tooltip,y=3,x=[],v=[],E=[],I=[],w=[],Q;this._Apositions=o.positions,this._positions=v,this._hierarchy=E,this._heightsort=I,this._degreesArr=w,this._deepth=Ae(o.deepth,100),this._drawColor.point=o.point||this._drawColor.point,this._drawColor.polyline=o.polyline||this._drawColor.polyline,this._drawColor.polygon=o.polygon||this._drawColor.polygon,this.loadingImg=o.loading||this.loadingImg,this.tin=Ae(o.tin,!1),this.onlyTerrain=Ae(o.onlyTerrain,!1),this.selectDatum=Ae(o.selectDatum,!1);let M=this;if(this._mouseHandler&&this._mouseHandler.destroy(),this.loading||this.addLoading(),o.positions){let B=ee.fromDegreesArray(o.positions);for(let T of B)v.push(T);if(!(v.length<y)){for(let T=0;T<o.positions.length;T+=2)w.push([o.positions[T],o.positions[T+1]]);this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:ee.fromDegreesArray(o.positions),material:M._drawColor.polygon,fill:!0}});for(let T=0;T<o.positions.length;T+=2){let D=M._viewer.scene.sampleHeight(new Kt(je.toRadians(o.positions[T]),je.toRadians(o.positions[T+1])));I.push(D),E.push(o.positions[T],o.positions[T+1],D)}this.stopDrawing(f,T=>{A&&A(T)})}}else{let B=new Ur(m.canvas);this._mouseHandler=B,this.removeMeasureFromMap(),this._viewer.container.style.cursor=`url(${globalThis.GEOWORLD_BASE_URL} 'Workers/image/cursor/draw.cur')`;let T;B.setInputAction(function(F){if(F.position!==null){let L=m.camera.getPickRay(F.position),R=m.globe.pick(L,m);if(this._viewer.scene.pick(F.position)){let U=this._viewer.scene.pickPosition(F.position);U&&(R=U)}if(R){let U=Kt.fromCartesian(R),V=je.toDegrees(U.longitude),H=je.toDegrees(U.latitude);if(x.length===0&&(x.push(V,H),w.push([V,H]),v.push(R),Q=R),v.length>=4){let q=Ss.wgs84ToWindowCoordinates(this._viewer.scene,Q);if(q!==void 0){let ie=q.x-F.position.x,Z=q.y-F.position.y;if(ie*ie+Z*Z<16){x.splice(x.length-2,2),v.pop(),this.stopDrawing(A);return}}}x.push(V,H),w.push([V,H]),v.push(R),v.length===2&&!T&&(T=this._viewer.entities.add({name:"\u4E34\u65F6\u7EBF",polyline:{positions:new Bn(function(){return v},!1),clampToGround:!0,material:M._drawColor.polygon,width:3}})),v.length===y&&(T&&this._viewer.entities.remove(T),this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:new Un(ee.fromDegreesArray(x)),material:M._drawColor.polygon,fill:!0}}),this._prevEntity.polygon.hierarchy=new Bn(()=>new Un(ee.fromDegreesArray(x)),!1))}}}.bind(this),Ki.LEFT_CLICK),B.setInputAction(function(F){let L=F.endPosition;if(L!==null)if(v.length===0)C.showAt(L,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let R=m.camera.getPickRay(L),k=m.globe.pick(R,m),U=this._viewer.scene.pick(L),V=!1;if(U){let H=this._viewer.scene.pickPosition(L);H&&(k=H),V=!0}if(k){let H=Kt.fromCartesian(k),q=je.toDegrees(H.longitude),ie=je.toDegrees(H.latitude);if(x.splice(x.length-2,2),w.pop(),v.pop(),x.push(q,ie),w.push([q,ie]),v.push(k),C.showAt(L,"\u53F3\u952E\u7ED3\u675F\u7ED8\u5236"),v.length>=3&&v.length>=4){let Z=Ss.wgs84ToWindowCoordinates(this._viewer.scene,Q);if(Z!==void 0){let oe=Z.x-L.x,ne=Z.y-L.y;oe*oe+ne*ne<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}}.bind(this),Ki.MOUSE_MOVE);let D=null;B.setInputAction(function(F){D=window.setTimeout(()=>{console.log("\u5355\u51FB"),this.end&&this.end()},200)}.bind(this),Ki.RIGHT_CLICK),B.setInputAction(function(F){console.log("\u53CC\u51FB......"),clearTimeout(D)},Ki.LEFT_DOUBLE_CLICK),this.end=F=>{if(this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),M._viewer.container.style.cursor="default",this._tooltip.show(!1),T&&this._viewer.entities.remove(T),this.end=void 0,console.log(w,"?????????"),!(v.length<y)){if(this._prevEntity&&(this._prevEntity.polygon.hierarchy=ee.fromDegreesArray(x)),F==="cancel"){this._prevEntity&&this._viewer.entities.remove(this._prevEntity);return}for(let L=0;L<x.length;L+=2){let R=M._viewer.scene.sampleHeight(new Kt(je.toRadians(x[L]),je.toRadians(x[L+1])));I.push(R),E.push(x[L],x[L+1],R)}this._Apositions=x,this.stopDrawing(f,A)}}}return this};_h.prototype.stopDrawing=function(o,A){let f=this;this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this._volumeTin.forEach(m=>{this._viewer.entities.remove(m)}),this._volumeTin=[],this._Loading&&this.isLoading(!0),setTimeout(()=>{f._heightsort.sort(function(T,D){return T-D});let m=this._viewer.entities.add({name:null,id:f._earthCtrl.factory.createUUID(),polygon:{hierarchy:new Bn(function(){return new Un(ee.fromDegreesArrayHeights(f._hierarchy))},!1),material:new z0({image:Ae(f.bottomImgUrl,`${window.SmartEarthRootUrl}Workers/image/bottomplane.jpg`),repeat:new It(1,1)})}});f.FlattenPolygon.push(m),f.originHeight=f._heightsort[0];let C=ee.fromDegreesArrayHeights(f._hierarchy);C.push(C[0]),f._positionsB=C;let y=null,x,v,E,I,w,Q;for(let T=0;T<C.length-1;T++){x=Kt.fromCartesian(C[T]),v=Kt.fromCartesian(C[T+1]),E=je.toDegrees(x.longitude),w=je.toDegrees(x.latitude),I=je.toDegrees(v.longitude),Q=je.toDegrees(v.latitude),y?y=y>v.height?v.height:y:y=x.height>v.height?v.height:x.height;let D=f.getPoint(E,w,I,Q,x.height,v.height),F=[],L=[];f.getHeightsFromLonLat(D.positions,function(R){if(R){F=R;for(let k=0;k<F.length;k++)L.push(f._heightsort[0]-f._deepth);f.drawwall(D.wallJwd,F,L)}})}if(f._baseHeight=f._heightsort[0]-f._deepth,m.polygon.height=f._baseHeight,!this.calculate)return f._isFlattening&&f.modelCutting(),A&&A(!0),this.isLoading(!1);let M=this.computeCutVolume(o,this.onlyTerrain),B=T=>{let D=T.maxHeight,F=T.minHeight;if(this._prevEntity.polygon.height=T.minHeight,this._prevEntity.polygon.heightReference=0,this.selectDatum){let L=()=>{this.addPoint(R=>{this.setDatum(R,k=>{typeof A=="function"&&A({...T,...k}),L()})})};L()}};this.onlyTerrain?M.then(T=>{B(T)}):B(M),f.setDatum(f._baseHeight,T=>{f._isFlattening&&f.modelCutting(),A&&A(T),this._Loading&&this.isLoading(!1)})},100)};_h.prototype.modelCutting=function(){let o=this;if(o._modelCuttingPolygon=rh.fromPositions({positions:ee.fromDegreesArray(o._Apositions),height:o._baseHeight}),o._modelArr.length>0)for(let A of o._modelArr)A.addFlattenPolygon(o._modelCuttingPolygon),A.needUpdateFlatten=!0,A.clipPlaneOfFlatten=!0;else console.info("\u8BF7\u6DFB\u52A0\u6A21\u578B\uFF01")};_h.prototype.removeModelCutting=function(){let o=this;if(o._modelArr.length>0){for(let A of o._modelArr)A.removeFlattenPolygon(o._modelCuttingPolygon);o._modelCuttingPolygon=null,o._modelArr=[]}else console.info("\u8BF7\u6DFB\u52A0\u6A21\u578B\uFF01")};_h.prototype.computeCentroidOfPolygon=function(o){let A=[],f=[],m=0,C=0;for(let v=0;v<o.length;v++){let E=Kt.fromCartesian(o[v]);m+=E.longitude,C+=E.latitude,A.push(E.longitude),f.push(E.latitude)}let y=0,x=0;return y=m/o.length,x=C/o.length,new Kt(y,x)};_h.prototype.edit=function(o,A,f){let m=this,C=m.editPoint,y=m.nowPoint;if(m._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain=!1,y){for(let E of m.editPoint)E&&(E.show=!0);m.update(y,C,o);return}for(let E=2;E<m._hierarchy.length;E=E+3)m._hierarchy[E]=m.originHeight-m._deepth;m.FlattenPolygon[0]&&m._viewer.entities.remove(m.FlattenPolygon[0]),m.FlattenPolygon=[];let x=this._viewer.entities.add({name:null,id:m._earthCtrl.factory.createUUID(),polygon:{hierarchy:new Un(ee.fromDegreesArrayHeights(m._hierarchy)),material:new z0({image:Ae(m.bottomImgUrl,`${window.SmartEarthRootUrl}Workers/image/bottomplane.jpg`),repeat:new It(1,1)}),perPositionHeight:!0}});m.FlattenPolygon.push(x);let v=m.FlattenPolygon[0].polygon.hierarchy.getValue();for(let E of v.positions){let I=this._viewer.entities.add({id:m._earthCtrl.factory.createUUID(),position:E,point:{color:At.WHITE,pixelSize:12,outlineColor:At.BLACK,outlineWidth:1}});C.push(I)}if(o)if(A){for(let E of C)if(A===E.id){m.nowPoint=E,m.update(E,C,o);return}}else m._earthCtrl.measure.pickObject(null,function(E){let I=E.pickedObject.id;for(let w of C)if(I.id===w.id){m.nowPoint=w,m.update(w,C,o);return}});else f&&f(C)};_h.prototype.update=function(o,A,f){let m=this,C=o.position.getValue(),x=m._scene.globe.ellipsoid.cartesianToCartographic(C),v=je.toDegrees(x.longitude),E=je.toDegrees(x.latitude),I=x.height;o.position.setValue(ee.fromDegrees(v,E,I+f)),m.editPoint=A,m.editPosition=[];let w=[];for(let M of A){let B=M.position.getValue();w.push(B),m.editPosition.push(B)}m.FlattenPolygon[0].polygon.hierarchy=new Bn(function(){return new Un(w)},!0);let Q=m.editPosition;Q.push(Q[0]);for(let M=0;M<Q.length-1;M++){let T=[];for(let D=0;D<=160;D++){let F=ee.lerp(Q[M],Q[M+1],D/160,new ee),L=Kt.fromCartesian(F);T.push(L.height)}m.wallArr[M].wall.minimumHeights.setValue(T)}};_h.prototype.endEdit=function(){let o=this;if(o._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain=!0,o.editPoint.length>0)for(let A of o.editPoint)A&&(A.show=!1)};_h.prototype.computeCutVolume=function(o,A){let f=this,m=15e3,C=-15e3;o==="auto"&&(o=wi.fromPoints(this._positions).radius/20);let y=this.getPointsInPolygon(this._degreesArr,o,!0),x=Zl.polygon([this._degreesArr]),v=()=>{let{tin:E}=this.tinFromPoints(y,{getArea:!0,polygon:x});this.tinData=E;let I={fill:0,dig:0},w={fill:"\u7ACB\u65B9\u7C73",dig:"\u7ACB\u65B9\u7C73"},Q,M,B,T,D,F={fill:1,dig:1};this.Triangulation=[],E.features.forEach(R=>{if(R.positions){if(this.tin){let U=this._viewer.entities.add({polygon:{hierarchy:new Un(R.positions),material:this._drawColor.polygon,perPositionHeight:!0,outline:!0,outlineColor:At.YELLOW}});this._volumeTin.push(U)}let k=R.geometry.coordinates[0];Q=k[0][2],M=k[1][2],B=k[2][2],D=R.area,this.Triangulation.push({bottomArea:D,height:[Q,M,B]}),T=(Q-m+M-m+B-m)/3,T>0?I.dig=I.dig+D*T*F.dig:I.fill=I.fill-D*T*F.fill,I.dig>1e10&&w.dig==="\u7ACB\u65B9\u7C73"&&(I.dig=I.dig/1e9,w.dig="\u7ACB\u65B9\u5343\u7C73",F.dig=1e-9),I.fill>1e10&&w.fill==="\u7ACB\u65B9\u7C73"&&(I.fill=I.fill/1e9,w.fill="\u7ACB\u65B9\u5343\u7C73",F.fill=1e-9)}});let L=this.computeCentroidOfPolygon(this._positions);return this._volumeLabel=this._viewer.entities.add({position:ee.fromRadians(L.longitude,L.latitude,C),label:{text:`\u6316\u65B9\u4F53\u79EF\uFF1A${I.dig.toFixed(4)}${w.dig}`,pixelOffset:{x:0,y:-30},font:"16px \u5B8B\u4F53",fillColor:At.GOLD,verticalOrigin:bn.BOTTOM,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),this._volumeLabel1=this._viewer.entities.add({position:ee.fromRadians(L.longitude,L.latitude,C),label:{text:`\u586B\u65B9\u4F53\u79EF\uFF1A${I.fill.toFixed(4)}${w.fill}`,pixelOffset:{x:0,y:-70},font:"16px \u5B8B\u4F53",fillColor:At.GOLD,verticalOrigin:bn.BOTTOM,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),{maxHeight:C,minHeight:m,volume:I,unit:w,spacing:o}};if(A){let E=[];return y.features.forEach(w=>{let Q=w.geometry.coordinates;E.push(Kt.fromDegrees(Q[0],Q[1]))}),vQ(this._viewer.scene.globe.terrainProvider,E).then(w=>(y.features.forEach((Q,M)=>{let B=Q.geometry.coordinates;B[2]=w[M]&&w[M].height?w[M].height:0,C<B[2]&&(C=B[2]),m>B[2]&&(m=B[2])}),v()))}return y.features.forEach(E=>{let I=E.geometry.coordinates,w=new Kt(je.toRadians(I[0]),je.toRadians(I[1]));I[2]=this._viewer.scene.sampleHeight(w)||0,C<I[2]&&(C=I[2]),m>I[2]&&(m=I[2])}),v()};_h.prototype.getPoint=function(o,A,f,m,C,y){let x=this,v=160,E=je.lerp(o,f,1/v)-o,I=je.lerp(A,m,1/v)-A,w=[],Q=[],M=[],B;w.push(o,A),B=ee.fromDegrees(o,A),Q.push(Kt.fromCartesian(B));for(let T=0;T<v;T++){let D=o+(T+1)*E,F=A+(T+1)*I;w.push(D,F),B=ee.fromDegrees(D,F),Q.push(Kt.fromCartesian(B))}return w.push(f,m),B=ee.fromDegrees(f,m),Q.push(Kt.fromCartesian(B)),{wallJwd:w,positions:Q}};_h.prototype.getHeightsFromLonLat=function(o,A){let f=this._viewer,m=[];o.forEach(function(C){m.push(f.scene.sampleHeight(new Kt(C.longitude,C.latitude)))}),typeof A=="function"&&A(m)};_h.prototype.isHaveTerrain=function(){return!!(this._viewer.scene&&this._viewer.scene.terrainProvider&&this._viewer.scene.terrainProvider._layers)};_h.prototype.drawwall=function(o,A,f){let m=this,C=m._viewer.entities.add({wall:{positions:new Bn(function(){return ee.fromDegreesArray(o)},!1),maximumHeights:A,minimumHeights:f}}),y=C.wall;y.material=new z0({image:Ae(m.wallImgUrl,`${window.SmartEarthRootUrl}Workers/image/dzmc.jpg`),repeat:new It(1,1)}),m.wallArr.push(C)};_h.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=this.loadingImg,o.appendChild(A),this.loading=o,this._viewer.container.appendChild(o)};_h.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};_h.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};_h.prototype.addPoint=function(o){this.addPointHandle&&(this.addPointHandle.destroy(),this.addPointHandle=null),this._prevEntity1&&(this.addPointHandle=new Ur(this._viewer.scene.canvas),this.addPointHandle.setInputAction(function(A){let f=this._viewer.scene.pick(A.position);if(f&&f.id&&f.id.id===this._prevEntity1.id){let m=this._viewer.scene.pickPosition(A.position);if(m){let C=Kt.fromCartesian(m);this.addPointHandle.destroy(),this.addPointHandle=null,o&&typeof o=="function"&&o(C.height.toFixed(1))}}}.bind(this),Ki.LEFT_CLICK),this.addPointHandle.setInputAction(function(A){let f=this._viewer.scene.pick(A.endPosition);f&&f.id&&f.id.id===this._prevEntity1.id?this._tooltip.showAt(A.endPosition,"\u70B9\u51FB\u4FEE\u6539\u57FA\u51C6\u9762\u9AD8\u5EA6"):this._tooltip.show(!1)}.bind(this),Ki.MOUSE_MOVE))};_h.prototype.showTin=function(o){this.tin=o,this._volumeTin.forEach(A=>{this._viewer.entities.remove(A)}),this._volumeTin=[],o&&this.tinData&&this.tinData.features.forEach(A=>{if(A.positions){let f=this._viewer.entities.add({polygon:{hierarchy:new Un(A.positions),material:this._drawColor.polygon,perPositionHeight:!0,outline:!0,outlineColor:At.YELLOW}});this._volumeTin.push(f)}})};_h.prototype.setDatum=function(o,A){if(this.Triangulation&&this.Triangulation.length>0){let f,m,C,y={fill:0,dig:0},x={fill:"\u7ACB\u65B9\u7C73",dig:"\u7ACB\u65B9\u7C73"},v={fill:1,dig:1};this.Triangulation.forEach(function(E){f=E.bottomArea,m=E.height,C=(m[0]-o+m[1]-o+m[2]-o)/3,C>0?y.dig=y.dig+f*C*v.dig:y.fill=y.fill-f*C*v.fill,y.dig>1e10&&x.dig==="\u7ACB\u65B9\u7C73"&&(y.dig=y.dig/1e9,x.dig="\u7ACB\u65B9\u5343\u7C73",v.dig=1e-9),y.fill>1e10&&x.fill==="\u7ACB\u65B9\u7C73"&&(y.fill=y.fill/1e9,x.fill="\u7ACB\u65B9\u5343\u7C73",v.fill=1e-9)}),this._volumeLabel.label.text=`\u6316\u65B9\u4F53\u79EF\uFF1A${y.dig.toFixed(4)}${x.dig}`,this._volumeLabel1.label.text=`\u586B\u65B9\u4F53\u79EF\uFF1A${y.fill.toFixed(4)}${x.fill}`,this._prevEntity.polygon.height=o,A&&typeof A=="function"&&A({volume:y,unit:x})}};_h.prototype.getPointsInPolygon=function(o,A=50,f=!0){if(o.length<3)return;o.push(o[0]);let m=Zl.lineString(o),C=Zl.bbox(m),y=Zl.pointGrid(C,A,{units:"meters"}),x=Zl.polygon([o]),v=Zl.pointsWithinPolygon(y,x);if(f)for(let E=0;E<o.length-1;E++){let I=Zl.lineString([o[E],o[E+1]]),w={units:"meters"},Q=Zl.length(I,w),M;for(let B=A;;B+=A)if(B<=Q)M=Zl.along(I,B,w),v.features.push(M);else{M=Zl.along(I,Q,w),v.features.push(M);break}}return v};_h.prototype.tinFromPoints=function(o,A={}){let{polygon:f,getArea:m}=A,C=Zl.tin(o),y=0;return C&&C.features&&C.features.forEach(x=>{let v=!0;if(f){let E=Zl.centerOfMass(x);v=Zl.booleanPointInPolygon(E,f)}if(v){let E=x.geometry.coordinates[0],I=[],w=[];for(let Q=0;Q<3;Q++)I.push([E[Q][0],E[Q][1]]),w.push(ee.fromDegrees(E[Q][0],E[Q][1],E[Q][2]));x.positions=w,m&&(x.area=this.getArea(I,w,!0),y+=x.area)}}),{tin:C,area:y}};_h.prototype.getArea=function(o,A,f){if(o.length<3)return;o.push(o[0]);let m=o,C=0,y=Zl.polygon([m]),x;m.length===4?x=[y]:x=Zl.tesselate(y).features;let v,E,I,w;return x.forEach(Q=>{v=Q.geometry.coordinates[0],E=m.findIndex(F=>F.toString()===v[0].toString()),I=m.findIndex(F=>F.toString()===v[1].toString()),w=m.findIndex(F=>F.toString()===v[2].toString());let M=this.getdistance(A[E],A[I]),B=this.getdistance(A[I],A[w]),T=this.getdistance(A[E],A[w]),D=(M+B+T)/2;C+=Math.sqrt(D*((D-M)*(D-B)*(D-T)))}),f||(C<1e6?C=`${C.toFixed(2)}\u5E73\u65B9\u7C73`:C=`${(C/1e6).toFixed(2)}\u5E73\u65B9\u5343\u7C73`),C};_h.prototype.getdistance=function(o,A){let f=Kt.fromCartesian(o),m=Kt.fromCartesian(A),C=new l0;C.setEndPoints(f,m);let y=C.surfaceDistance;return y=Math.sqrt(Math.pow(y,2)+Math.pow(m.height-f.height,2)),y};var wAt=_h;function T2(o,A={}){this._earthCtrl=o,this._viewer=o.coreMap,this._scene=o.coreMap.scene,this.options=Ae(A,{}),this._modelArr=[],this._Apositions=[],this.FlattenPolygon=[],this._Loading=Ae(A.loading,!1),this._bottom=Ae(A.bottom,!1),this.loadingImg=Ae(A.loadingImg,`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`),this._Tooltip=new gw(o),this._tooltip=this._Tooltip.CreateTooltip(),this._positions=[],this._deepth=100,this._drawColor={point:Ae(this.options.drawColor?.point,At.BLUE),polyline:Ae(this.options.drawColor?.polyline,At.YELLOW),polygon:Ae(this.options.drawColor?.polygon,At.YELLOW.withAlpha(.5))}}T2.prototype.removeMeasureFromMap=function(){this._prevEntity!==void 0&&(this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this.addPointHandle&&(this.addPointHandle.destroy(),this.addPointHandle=void 0),this.Triangulation=[],this.tinData=void 0,this._tooltip.show(!1)};T2.prototype.startDrawing=function(o={},A){let f=this._scene,m=this._tooltip,C=3,y,x=[],v=[],E=[],I=[],w=[];this._positions=v,this._hierarchy=E,this._heightsort=I,this._degreesArr=w,this._deepth=Ae(o.deepth,100),this._modelArr=Ae(o.modelArr,[]);let Q=this;if(this._mouseHandler&&this._mouseHandler.destroy(),this.loading||this.addLoading(),o.positions){let M=ee.fromDegreesArray(o.positions);for(let B of M)v.push(B);if(!(v.length<C)){for(let B=0;B<o.positions.length;B+=2)w.push([o.positions[B],o.positions[B+1]]);console.log(v,"\u4F4D\u7F6E\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A"),this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:ee.fromDegreesArray(o.positions),material:Q._drawColor.polygon,fill:!0}});for(let B=0;B<o.positions.length;B+=2){let T=Q._viewer.scene.sampleHeight(new Kt(je.toRadians(o.positions[B]),je.toRadians(o.positions[B+1])));I.push(T),E.push(o.positions[B],o.positions[B+1],T)}this._Apositions=o.positions,this.stopDrawing(B=>{A&&A(B)})}}else{let M=new Ur(f.canvas);this._mouseHandler=M,this.removeMeasureFromMap(),this._viewer.container.style.cursor=`url(${globalThis.GEOWORLD_BASE_URL} 'Workers/image/cursor/draw.cur')`;let B;M.setInputAction(function(T){if(T.position!==null){let D=f.camera.getPickRay(T.position),F=f.globe.pick(D,f);if(this._viewer.scene.pick(T.position)){let R=this._viewer.scene.pickPosition(T.position);R&&(F=R)}if(F){let R=Kt.fromCartesian(F),k=je.toDegrees(R.longitude),U=je.toDegrees(R.latitude);if(x.length===0&&(x.push(k,U),w.push([k,U]),v.push(F),y=F),v.length>=4){let V=Ss.wgs84ToWindowCoordinates(this._viewer.scene,y);if(V!==void 0){let H=V.x-T.position.x,q=V.y-T.position.y;if(H*H+q*q<16){x.splice(x.length-2,2),v.pop(),this.stopDrawing(A);return}}}x.push(k,U),w.push([k,U]),v.push(F),v.length===2&&!B&&(B=this._viewer.entities.add({name:"\u4E34\u65F6\u7EBF",polyline:{positions:new Bn(function(){return v},!1),clampToGround:!0,material:Q._drawColor.polygon,width:3}})),v.length===C&&(B&&this._viewer.entities.remove(B),this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:new Un(ee.fromDegreesArray(x)),material:Q._drawColor.polygon,fill:!0}}),this._prevEntity.polygon.hierarchy=new Bn(()=>new Un(ee.fromDegreesArray(x)),!1))}}}.bind(this),Ki.LEFT_CLICK),M.setInputAction(function(T){let D=T.endPosition;if(D!==null)if(v.length===0)m.showAt(D,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let F=f.camera.getPickRay(D),L=f.globe.pick(F,f),R=this._viewer.scene.pick(D),k=!1;if(R){let U=this._viewer.scene.pickPosition(D);U&&(L=U),k=!0}if(L){let U=Kt.fromCartesian(L),V=je.toDegrees(U.longitude),H=je.toDegrees(U.latitude);if(x.splice(x.length-2,2),w.pop(),v.pop(),x.push(V,H),w.push([V,H]),v.push(L),m.showAt(D,"\u53F3\u952E\u7ED3\u675F\u7ED8\u5236"),v.length>=3&&v.length>=4){let q=Ss.wgs84ToWindowCoordinates(this._viewer.scene,y);if(q!==void 0){let ie=q.x-D.x,Z=q.y-D.y;ie*ie+Z*Z<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}}.bind(this),Ki.MOUSE_MOVE),M.setInputAction(function(T){this.end&&this.end()}.bind(this),Ki.RIGHT_CLICK),this.end=T=>{if(this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),Q._viewer.container.style.cursor="default",this._tooltip.show(!1),B&&this._viewer.entities.remove(B),this.end=void 0,console.log(w,"?????????"),!(v.length<C)){if(this._prevEntity&&(this._prevEntity.polygon.hierarchy=ee.fromDegreesArray(x)),T==="cancel"){this._prevEntity&&this._viewer.entities.remove(this._prevEntity);return}for(let D=0;D<x.length;D+=2){let F=Q._viewer.scene.sampleHeight(new Kt(je.toRadians(x[D]),je.toRadians(x[D+1])));I.push(F),E.push(x[D],x[D+1],F)}this._Apositions=x,this.stopDrawing(A)}}}};T2.prototype.stopDrawing=function(o){let A=this;this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this._prevEntity!==void 0&&(this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._Loading&&this.isLoading(!0),setTimeout(()=>{A._heightsort.sort(function(m,C){return m-C});let f=null;A._bottom?(f=this._viewer.entities.add({name:null,id:A._earthCtrl.factory.createUUID(),polygon:{hierarchy:new Bn(function(){return new Un(ee.fromDegreesArrayHeights(A._hierarchy))},!1),material:new z0({image:Ae(A.bottomImgUrl,`${window.SmartEarthRootUrl}Workers/image/bottomplane.jpg`),repeat:new It(1,1)})}}),A._baseHeight=A._heightsort[0]-A._deepth,f.polygon.height=A._baseHeight):f=this._viewer.entities.add({name:null,id:A._earthCtrl.factory.createUUID(),polygon:{hierarchy:new Bn(function(){return new Un(ee.fromDegreesArrayHeights(A._hierarchy))},!1),material:At.YELLOW.withAlpha(0)}}),A.FlattenPolygon.push(f),A.modelCutting()})};T2.prototype.modelCutting=function(){let o=this;if(o._modelCuttingPolygon=rh.fromPositions({positions:ee.fromDegreesArray(o._Apositions),height:o._baseHeight}),o._modelArr.length>0)for(let A of o._modelArr)A.addFlattenPolygon(o._modelCuttingPolygon),A.needUpdateFlatten=!0,A.clipPlaneOfFlatten=!0;else console.info("\u8BF7\u6DFB\u52A0\u6A21\u578B\uFF01")};T2.prototype.removeModelCutting=function(){let o=this;if(o._modelArr.length>0){for(let A of o._modelArr)A.removeFlattenPolygon(o._modelCuttingPolygon);o._modelCuttingPolygon=null,o._modelArr=[]}};T2.prototype.removeFromMap=function(){if(this.removeMeasureFromMap(),this.FlattenPolygon&&this.FlattenPolygon.length>0){for(let o=0;o<this.FlattenPolygon.length;o++)this._viewer.entities.remove(this.FlattenPolygon[o]);this.FlattenPolygon=[]}this.removeModelCutting()};T2.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=this.loadingImg,o.appendChild(A),this.loading=o,this._viewer.container.appendChild(o)};T2.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};T2.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};var bAt=T2;function M2(o,A={}){this._earthCtrl=o,this._viewer=o.coreMap,this._scene=o.coreMap.scene,this.options=Ae(A,{}),this._Apositions=[],this.FlattenPolygon=[],this._terrainFlatten=new xN(o.coreMap.scene),this._Loading=Ae(A.loading,!1),this._bottom=Ae(A.bottom,!1),this.loadingImg=Ae(A.loadingImg,`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`),this._Tooltip=new gw(o),this._tooltip=this._Tooltip.CreateTooltip(),this._positions=[],this._deepth=10,this._drawColor={point:Ae(this.options.drawColor?.point,At.BLUE),polyline:Ae(this.options.drawColor?.polyline,At.YELLOW),polygon:Ae(this.options.drawColor?.polygon,At.YELLOW.withAlpha(.5))}}M2.prototype.removeMeasureFromMap=function(){this._prevEntity!==void 0&&(this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this.addPointHandle&&(this.addPointHandle.destroy(),this.addPointHandle=void 0),this.Triangulation=[],this.tinData=void 0,this._tooltip.show(!1)};M2.prototype.startDrawing=function(o={},A){let f=this._scene,m=this._tooltip,C=3,y,x=[],v=[],E=[],I=[],w=[];this._positions=v,this._hierarchy=E,this._heightsort=I,this._degreesArr=w,this._deepth=Ae(o.deepth,100);let Q=this;if(this._mouseHandler&&this._mouseHandler.destroy(),this.loading||this.addLoading(),o.positions){let M=ee.fromDegreesArray(o.positions);for(let B of M)v.push(B);if(!(v.length<C)){for(let B=0;B<o.positions.length;B+=2)w.push([o.positions[B],o.positions[B+1]]);this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:ee.fromDegreesArray(o.positions),material:Q._drawColor.polygon,fill:!0}});for(let B=0;B<o.positions.length;B+=2){let T=Q._viewer.scene.sampleHeight(new Kt(je.toRadians(o.positions[B]),je.toRadians(o.positions[B+1])));I.push(T),E.push(o.positions[B],o.positions[B+1],T)}this._Apositions=o.positions,this.stopDrawing(B=>{A&&A(B)})}}else{let M=new Ur(f.canvas);this._mouseHandler=M,this.removeMeasureFromMap(),this._viewer.container.style.cursor=`url(${globalThis.GEOWORLD_BASE_URL} 'Workers/image/cursor/draw.cur')`;let B;M.setInputAction(function(T){if(T.position!==null){let D=f.camera.getPickRay(T.position),F=f.globe.pick(D,f);if(this._viewer.scene.pick(T.position)){let R=this._viewer.scene.pickPosition(T.position);R&&(F=R)}if(F){let R=Kt.fromCartesian(F),k=je.toDegrees(R.longitude),U=je.toDegrees(R.latitude);if(x.length===0&&(x.push(k,U),w.push([k,U]),v.push(F),y=F),v.length>=4){let V=Ss.wgs84ToWindowCoordinates(this._viewer.scene,y);if(V!==void 0){let H=V.x-T.position.x,q=V.y-T.position.y;if(H*H+q*q<16){x.splice(x.length-2,2),v.pop(),this.stopDrawing(A);return}}}x.push(k,U),w.push([k,U]),v.push(F),v.length===2&&!B&&(B=this._viewer.entities.add({name:"\u4E34\u65F6\u7EBF",polyline:{positions:new Bn(function(){return v},!1),clampToGround:!0,material:Q._drawColor.polygon,width:3}})),v.length===C&&(B&&this._viewer.entities.remove(B),this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:new Un(ee.fromDegreesArray(x)),material:Q._drawColor.polygon,fill:!0}}),this._prevEntity.polygon.hierarchy=new Bn(()=>new Un(ee.fromDegreesArray(x)),!1))}}}.bind(this),Ki.LEFT_CLICK),M.setInputAction(function(T){let D=T.endPosition;if(D!==null)if(v.length===0)m.showAt(D,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let F=f.camera.getPickRay(D),L=f.globe.pick(F,f),R=this._viewer.scene.pick(D),k=!1;if(R){let U=this._viewer.scene.pickPosition(D);U&&(L=U),k=!0}if(L){let U=Kt.fromCartesian(L),V=je.toDegrees(U.longitude),H=je.toDegrees(U.latitude);if(x.splice(x.length-2,2),w.pop(),v.pop(),x.push(V,H),w.push([V,H]),v.push(L),m.showAt(D,"\u53F3\u952E\u7ED3\u675F\u7ED8\u5236"),v.length>=3&&v.length>=4){let q=Ss.wgs84ToWindowCoordinates(this._viewer.scene,y);if(q!==void 0){let ie=q.x-D.x,Z=q.y-D.y;ie*ie+Z*Z<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}}.bind(this),Ki.MOUSE_MOVE),M.setInputAction(function(T){this.end&&this.end()}.bind(this),Ki.RIGHT_CLICK),this.end=T=>{if(this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),Q._viewer.container.style.cursor="default",this._tooltip.show(!1),B&&this._viewer.entities.remove(B),this.end=void 0,console.log(w,"?????????"),!(v.length<C)){if(this._prevEntity&&(this._prevEntity.polygon.hierarchy=ee.fromDegreesArray(x)),T==="cancel"){this._prevEntity&&this._viewer.entities.remove(this._prevEntity);return}for(let D=0;D<x.length;D+=2){let F=Q._viewer.scene.sampleHeight(new Kt(je.toRadians(x[D]),je.toRadians(x[D+1])));I.push(F),E.push(x[D],x[D+1],F)}this._Apositions=x,this.stopDrawing(A)}}}};M2.prototype.stopDrawing=function(o){let A=this;this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this._prevEntity!==void 0&&(this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._Loading&&this.isLoading(!0),setTimeout(()=>{A._heightsort.sort(function(C,y){return C-y});let f=null;A._bottom?(f=this._viewer.entities.add({name:null,id:A._earthCtrl.factory.createUUID(),polygon:{hierarchy:new Bn(function(){return new Un(ee.fromDegreesArrayHeights(A._hierarchy))},!1),material:new z0({image:Ae(A.bottomImgUrl,`${window.SmartEarthRootUrl}Workers/image/bottomplane.jpg`),repeat:new It(1,1)})}}),A._baseHeight=A._heightsort[0]-A._deepth,f.polygon.height=A._baseHeight):f=this._viewer.entities.add({name:null,id:A._earthCtrl.factory.createUUID(),polygon:{hierarchy:new Bn(function(){return new Un(ee.fromDegreesArrayHeights(A._hierarchy))},!1),material:At.YELLOW.withAlpha(0)}}),A.FlattenPolygon.push(f);let m=[];A._baseHeight=A._heightsort[0]-A._deepth;for(let C=0;C<A._hierarchy.length;C+=3)m.push(A._hierarchy[C],A._hierarchy[C+1],A._baseHeight);console.log(m,"\u4F4D\u7F6E\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A\uFF1A"),A.terrainCutting(m)})};M2.prototype.terrainCutting=function(o){let A=this;A._terrainFlatten.addPolygon(o),A._terrainFlatten.update(),A._terrainFlatten.clipPlaneOfFlatten=!0};M2.prototype.removeTerrainCutting=function(){this._terrainFlatten.clearPolygon()};M2.prototype.removeFromMap=function(){if(this.removeMeasureFromMap(),this.FlattenPolygon&&this.FlattenPolygon.length>0){for(let o=0;o<this.FlattenPolygon.length;o++)this._viewer.entities.remove(this.FlattenPolygon[o]);this.FlattenPolygon=[]}this.removeTerrainCutting()};M2.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=this.loadingImg,o.appendChild(A),this.loading=o,this._viewer.container.appendChild(o)};M2.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};M2.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};var QAt=M2;function pw(o,A={}){this._earthCtrl=o,this._terrainFlatten=new xN(this._earthCtrl.coreMap.scene),this._viewer=o.coreMap,this._scene=o.coreMap.scene,this.options=Ae(A,{}),this._Tooltip=new gw(o),this._tooltip=this._Tooltip.CreateTooltip(),this._drawColor={point:Ae(this.options.drawColor?.point,At.BLUE),polyline:Ae(this.options.drawColor?.polyline,At.YELLOW),polygon:Ae(this.options.drawColor?.polygon,At.YELLOW.withAlpha(.5))},this.loadingImg=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,this.wallArr=[],this.FlattenPolygon=[],this._Apositions=[],this._heightsort=null,this._deepth=100,this._positions=[],this._modelArr=Ae(A.modelArr,[]),this._isFlattening=Ae(A.isFlattening,!0),this.modelCuttingPolygon=null,this.wallImgUrl=Ae(A.wallImgUrl,null),this.bottomImgUrl=Ae(A.bottomImgUrl,null),this._Loading=Ae(A.loading,!0)}pw.prototype.removeMeasureFromMap=function(){this._prevEntity!==void 0&&(this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this.addPointHandle&&(this.addPointHandle.destroy(),this.addPointHandle=void 0),this.Triangulation=[],this.tinData=void 0,this._tooltip.show(!1)};pw.prototype.removeFromMap=function(){if(this.removeMeasureFromMap(),this.wallArr.length>0){for(let o=0;o<this.wallArr.length;o++)this._viewer.entities.remove(this.wallArr[o]);this.wallArr=[]}if(this.FlattenPolygon&&this.FlattenPolygon.length>0){for(let o=0;o<this.FlattenPolygon.length;o++)this._viewer.entities.remove(this.FlattenPolygon[o]);this.FlattenPolygon=[]}this.removeModelCutting()};pw.prototype.deleteObject=pw.prototype.removeFromMap;pw.prototype.startDrawing=function(o={},A){let f=Ae(o.spacing,"auto"),m=this._scene,C=this._tooltip,y=3,x=this._positions,v=[],E;this._Apositions=o.positions,this._heightsort=v,this._deepth=Ae(o.deepth,100),this._sampleStep=Ae(o.sampleStep,100),this._maxSampleCount=Ae(o.maxSampleCount,200),this._drawColor.point=o.point||this._drawColor.point,this._drawColor.polyline=o.polyline||this._drawColor.polyline,this._drawColor.polygon=o.polygon||this._drawColor.polygon,this.loadingImg=o.loading||this.loadingImg;let I=this;if(this._mouseHandler&&this._mouseHandler.destroy(),this.loading||this.addLoading(),!o.positions){let w=new Ur(m.canvas);this._mouseHandler=w,this.removeMeasureFromMap(),this._viewer.container.style.cursor=`url(${globalThis.GEOWORLD_BASE_URL} 'Assets/image/cursor/draw.cur')`;let Q;w.setInputAction(function(B){if(B.position!==null){let T=this._viewer.scene.pickPosition(B.position);if(T){let D=Kt.fromCartesian(T);if(x.length===0&&(x.push(D),E=T),x.length>=4){let F=Ss.wgs84ToWindowCoordinates(this._viewer.scene,E);if(F!==void 0){let L=F.x-B.position.x,R=F.y-B.position.y;if(L*L+R*R<16){x.splice(x.length-2,2),this.stopDrawing(A);return}}}x.push(D),x.length===2&&!Q&&(Q=this._viewer.entities.add({name:"\u4E34\u65F6\u7EBF",polyline:{positions:new Bn(function(){let F=[];for(let L=0;L<x.length;L++){let R=x[L];F.push(R.longitude,R.latitude,R.height)}return ee.fromRadiansArrayHeights(F)},!1),clampToGround:!1,material:I._drawColor.polygon,width:3}})),x.length===y&&(Q&&this._viewer.entities.remove(Q),this._prevEntity=this._viewer.entities.add({polygon:{hierarchy:new Bn(()=>{let F=[];for(let L=0;L<x.length;L++){let R=x[L];F.push(R.longitude,R.latitude,R.height)}return new Un(ee.fromRadiansArrayHeights(F))},!1),material:I._drawColor.polygon,fill:!0}}))}}}.bind(this),Ki.LEFT_CLICK),w.setInputAction(function(B){let T=B.endPosition;if(T!==null)if(x.length===0)C.showAt(T,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let D=this._viewer.scene.pickPosition(T);if(D){let F=Kt.fromCartesian(D);if(x.splice(x.length-1,1),x.push(F),C.showAt(T,"\u53F3\u952E\u7ED3\u675F\u7ED8\u5236"),x.length>=3&&x.length>=4){let L=Ss.wgs84ToWindowCoordinates(this._viewer.scene,E);if(L!==void 0){let R=L.x-T.x,k=L.y-T.y;R*R+k*k<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}}.bind(this),Ki.MOUSE_MOVE);let M=null;w.setInputAction(function(B){M=window.setTimeout(()=>{console.log("\u5355\u51FB"),this.end&&this.end()},200)}.bind(this),Ki.RIGHT_CLICK),w.setInputAction(function(B){console.log("\u53CC\u51FB......"),clearTimeout(M)},Ki.LEFT_DOUBLE_CLICK),this.end=B=>{if(this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),I._viewer.container.style.cursor="default",this._tooltip.show(!1),Q&&this._viewer.entities.remove(Q),this.end=void 0,!(x.length<y)){if(this._prevEntity&&this._viewer.entities.remove(this._prevEntity),this._prevEntity=void 0,B==="cancel")return;for(let T=0;T<x.length;T+=2){let D=x[T].height;v.push(D)}this._Apositions=x,this.stopDrawing(f,A)}}}return this};function TLi(o,A,f){let m=je.lerp(o.longitude,A.longitude,1/f)-o.longitude,C=je.lerp(o.latitude,A.latitude,1/f)-o.latitude,y=[];y.push(o);for(let x=0;x<f;x++){let v=o.longitude+(x+1)*m,E=o.latitude+(x+1)*C;y.push(new Kt(v,E))}return y.push(A),y}function MLi(o,A,f,m,C){let y=[];A.forEach(function(x){let v=Kt.toCartesian(new Kt(x.longitude,x.latitude,m)),E=Kt.toCartesian(new Kt(x.longitude,x.latitude,f)),I=ee.normalize(ee.subtract(E,v,new ee),new ee),w=new ls(v,I),Q=null,M=[],B=o.scene.drillPickFromRay(w,1,M);o.scene.globe.show=!1,B.length>0&&!B[0].object&&B[0].position?(Q=o.scene.drillPickFromRay(w,100,M),Q.unshift(B[0])):Q=o.scene.drillPickFromRay(w,100,M),o.scene.globe.show=!0,y.push(Q)}),typeof C=="function"&&C(y)}function PLi(o,A,f){for(let y=0;y<o.length;y++){let x=o[y];for(let v=0;v<x.length;v++){let E=x[v].position,I=Kt.fromCartesian(E);if(I.height<A){x.splice(v,x.length-v);let w=ee.fromRadians(I.latitude,I.longitude,A);x.push({object:null,position:w});break}}{let v=x[x.length-1].position,E=Kt.fromCartesian(v);if(Math.abs(E.height-A)>.01){let I=ee.fromRadians(E.latitude,E.longitude,A);x.push({object:null,position:I})}}{let v=x[x.length-1].position,E=Kt.fromCartesian(v);console.log("di",E.height)}}for(let y=0;y<o.length;y++){let x=o[y],v=x[x.length-1];f.push(v.position)}let m=0;o.forEach(function(y){m=m<y.length?y.length:m}),o.forEach(function(y){if(m-y.length>0){let v=y.length;y.length=m,y.fill(null,v,y.length)}});let C=[];for(let y=0;y<m-1;y++){let x=[],v=[];for(let E=0;E<o.length;E++){let I=o[E][y],w=o[E][y+1];I&&w&&(x.push(I),v.push(w))}C.push({ups:x,bottoms:v})}return C}pw.prototype.stopDrawing=function(o,A){let f=this;this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._volumeLabel!==void 0&&(this._viewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._volumeLabel1!==void 0&&(this._viewer.entities.remove(this._volumeLabel1),this._volumeLabel1=void 0),this._Loading&&this.isLoading(!0);let m=this._positions,C=this._viewer,y=this.wallArr,x=this._deepth,v=this._sampleStep,E=this._maxSampleCount;m.push(m[0]);let I=0;for(let w=0;w<m.length-1;w++){let Q=ee.fromRadians(m[w].longitude,m[w].latitude,m[w].height),M=ee.fromRadians(m[w+1].longitude,m[w+1].latitude,m[w+1].height),T=ee.distance(M,Q)/v;I=I<T?T:I}I=E<I?E:I,I=260,setTimeout(()=>{f._heightsort.sort(function(D,F){return D-F});let w=f._heightsort[0]+2e3,Q=f._heightsort[0]-2e3,M=[];for(let D=0;D<m.length-1;D++){let F=m[D],L=m[D+1],R=TLi(F,L,I);MLi(C,R,Q,w,function(k){let U=PLi(k,x,M);for(let V=0;V<U.length;V++){let H=U[V];y.push(RLi(C,H,V))}})}let B=[];for(let D=0;D<m.length;D++){let F=m[D];B.push(F.longitude,F.latitude,x)}let T=C.entities.add({polygon:{hierarchy:{positions:ee.fromRadiansArrayHeights(B)},perPositionHeight:!0,granularity:je.RADIANS_PER_DEGREE*100,material:new z0({image:`${globalThis.GEOWORLD_BASE_URL}Workers/image/bottomplane.jpg`,repeat:new It(1,1)}),fill:!0}});return y.push(T),f._isFlattening&&f.modelCutting(),A&&A(!0),this.isLoading(!1)},20)};pw.prototype.modelCutting=function(){let o=this,A=this._deepth,f=this._positions,m=[],C=[];for(let y=0;y<f.length;y++){let x=f[y];m.push(x.longitude,x.latitude,x.height-10),C.push(je.toDegrees(x.longitude),je.toDegrees(x.latitude),x.height-10)}if(o._modelCuttingPolygon=rh.fromPositions({positions:ee.fromRadiansArrayHeights(m),height:A-10}),o._terrainFlatten.addPolygon(C),o._terrainFlatten.update(),o._terrainFlatten.clipPlaneOfFlatten=!0,o._modelArr.length>0)for(let y of o._modelArr)y.addFlattenPolygon(o._modelCuttingPolygon),y.needUpdateFlatten=!0,y.clipPlaneOfFlatten=!0;else console.info("\u8BF7\u6DFB\u52A0\u6A21\u578B\uFF01")};pw.prototype.removeModelCutting=function(){let o=this;if(o._modelArr.length>0){for(let A of o._modelArr)A.removeFlattenPolygon(o._modelCuttingPolygon);o._modelCuttingPolygon=null,o._modelArr=[],o._terrainFlatten.clearPolygon(),o._terrainFlatten.clipPlaneOfFlatten=!1}else console.info("\u8BF7\u6DFB\u52A0\u6A21\u578B\uFF01")};function RLi(o,A,f){let m=[],C=[];for(let I=0;I<A.ups.length;I++){let w=A.ups[I];m.push(w.position);let Q=Kt.fromCartesian(w.position);C.push(Q.height)}let y=[];for(let I=0;I<A.bottoms.length;I++){let w=A.bottoms[I],Q=Kt.fromCartesian(w.position);y.push(Q.height)}let x=`${globalThis.GEOWORLD_BASE_URL}Workers/image/MTY0001.jpg`,v=`${globalThis.GEOWORLD_BASE_URL}Workers/image/MTY0002.jpg`,E=o.entities.add({wall:{positions:m,material:new z0({image:f%2?x:v,repeat:new It(.01,.01)}),maximumHeights:C,minimumHeights:y,granularity:je.RADIANS_PER_DEGREE*100}});return E.show=!0,E}pw.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=this.loadingImg,o.appendChild(A),this.loading=o,this._viewer.container.appendChild(o)};pw.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};pw.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};var SAt=pw;function id(o){this._earthCtrl=o,this._coreMap=o.coreMap,this.tools=[],this.vols=[],this.saveResult=!1}id.prototype.getDistanceSpace=function(o){this.saveResult===!1&&this.deleteObject(),this._tool=new NW(this._earthCtrl),this._tool.spaceDistance(o),this.tools.push(this._tool)};id.prototype.getDistanceHorizontal=function(o){this.saveResult===!1&&this.deleteObject(),this._tool=new NW(this._earthCtrl),this._tool.horizontalDistance(o),this.tools.push(this._tool)};id.prototype.deleteObject=function(){O(this._tool)&&this._tool.deleteObject(),this.saveResult===!1&&this.tools.pop()};id.prototype.deleteAll=function(){this.tools.forEach(function(o){o.deleteObject()}),this.vols.forEach(function(o){o.cleanUp()}),this._earthCtrl.measure.tools.forEach(function(o){o.clearResult()}),this.tools=[],this.vols=[],this._earthCtrl.measure.tools=[]};id.prototype.saveResults=function(o){this.saveResult=o};id.prototype.getPlaneArea=function(o){this.saveResult===!1&&this.deleteObject(),this._tool=new NW(this._earthCtrl),this._tool.getPlaneArea(o),this.tools.push(this._tool)};id.prototype.getSurfaceArea3d=function(o){this.saveResult===!1&&this.deleteObject(),this._tool=new NW(this._earthCtrl),this._tool.getSurfaceArea3d(o),this.tools.push(this._tool)};id.prototype.volumetric=function(o){this.saveResult===!1&&this.removeVolumetric(),this._vol=new Ile(this._earthCtrl),this._vol.startDrawing(o),this.vols.push(this._vol)};id.prototype.removeVolumetric=function(o){O(this._vol)&&this.vols.forEach(function(A){A.cleanUp()})};id.prototype.lineOfSight=function(o){this._tool=new BAt(this._earthCtrl),this._tool.createLineOfSight(o),this.tools.push(this._tool)};id.prototype.createViewShed=function(o){return new Ele(this._earthCtrl,o)};id.prototype.createSubmergence=function(o){return new _le(this._earthCtrl,o)};id.prototype.createProfile=function(o){return new Ble(this._earthCtrl,o)};id.prototype.createBufferAnalysis=function(o){return new Yre(this._earthCtrl,o)};id.prototype.createSkyline=function(o){return new ble(this._earthCtrl,o)};id.prototype.createCurtainContrast=function(o){return new xAt(this._earthCtrl,o)};id.prototype.createRestrictTheHeight=function(o){return new Sle(this._earthCtrl,o)};id.prototype.createModifyMesh=function(o,A){return new Dle(this._earthCtrl).addClipping(o,A)};id.prototype.createTerrainModifier=function(o){return new Tle(this._earthCtrl,o)};id.prototype.createTerrainExcavation=function(o){return new Rle(this._earthCtrl,o)};id.prototype.createExcavationAndFillAnalysis=function(o){return new Ple(this._earthCtrl,o)};id.prototype.createVolumetricMeasure=function(o){return new _At(this._earthCtrl,o)};id.prototype.createModelVolumetric=function(o){return new wAt(this._earthCtrl,o)};id.prototype.createModelCutting=function(o){return new bAt(this._earthCtrl,o)};id.prototype.createTerrainCutting=function(o){return new QAt(this._earthCtrl,o)};id.prototype.createModelSection=function(o){return new SAt(this._earthCtrl,o)};var Fle=id;function Nle(o,A){if(this._earthCtrl=o,!O(A.flagHtml))throw new Ui("flagDiv is required.");this._flagHtml=A.flagHtml,this._options=Ae(A,Ae.EMAIL),this._circleRadius=Ae(A.circleRadius,10),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,0),this._show=Ae(A.show,!0),this._flagScale=Ae(A.flagScale,4),this._circleColor=Ae(A.circleColor,At.RED),this._cylinderColor=Ae(A.cylinderColor,At.YELLOWGREEN),this._duration=Ae(A.duration,2e3),this._gradient=Ae(A.gradient,2),this._count=Ae(A.count,2),this._canvasZoom=Ae(A.canvasZoom,10),this._circleEntity=void 0,this._cylinderEntity=void 0,this._lineEntity=void 0,this._htmlPlaneEntity=void 0,this._linePlaneEntity=void 0,this._flagDiv=document.createElement("div"),this._flagDiv.style.opacity="0.7",this._flagDiv.style.margin="0",this._flagDiv.style.padding="0",this._flagDiv.id=Ae(A.id,Vu()),this._flagDiv.innerHTML=this._flagHtml,this._show&&this.addToMap()}Nle.prototype.removeFromMap=function(){O(this._circleEntity)&&(this._earthCtrl.entities.remove(this._circleEntity),this._circleEntity=void 0),O(this._cylinderEntity)&&(this._earthCtrl.entities.remove(this._cylinderEntity),this._cylinderEntity=void 0),O(this._lineEntity)&&(this._earthCtrl.entities.remove(this._lineEntity),this._lineEntity=void 0),O(this._linePlaneEntity)&&(this._earthCtrl.entities.remove(this._linePlaneEntity),this._linePlaneEntity=void 0),O(this._htmlPlaneEntity)&&(this._earthCtrl.entities.remove(this._htmlPlaneEntity),this._htmlPlaneEntity=void 0)};Nle.prototype.addToMap=function(){let o=this,A=0,f=2,m,C=ee.fromDegrees(o._lon,o._lat,o._height);if(O(o._circleEntity)||(o._circleEntity=o._earthCtrl.entities.add({position:C,ellipse:{height:o._height,semiMinorAxis:o._circleRadius,semiMajorAxis:o._circleRadius,material:new Z8({duration:o._duration,gradient:o._gradient,color:o._circleColor,count:o._count})}})),!O(o._cylinderEntity)){let v=o._circleRadius*2/5,E=o._circleRadius*3/4;m=dQ.changeCartesian3Height(C,E/2),o._cylinderEntity=o._earthCtrl.entities.add({position:m,cylinder:{length:E,topRadius:v,bottomRadius:v,fill:!0,outline:!1,material:o._cylinderColor}})}if(O(o._lineEntity)||(A=o._circleRadius*o._flagScale+o._height,o._lineEntity=o._earthCtrl.entities.add({polyline:{width:f,positions:ee.fromDegreesArrayHeights([o._lon,o._lat,o._height,o._lon,o._lat,A]),material:o._cylinderColor}})),!O(o._htmlPlaneEntity)){A=o._circleRadius*o._flagScale;let v=A/5,E=v*3,I=A-v/2,w=4*f,Q=new ee(w/2,0,I),M=dQ.changeCartesian3ByScalar(C,Q);this._linePlaneEntity=o._earthCtrl.entities.add({position:M,plane:{plane:new Wa(ee.UNIT_Y,0),dimensions:new It(w,v),material:o._cylinderColor}});let B=new ee(E/2+w,0,I);m=dQ.changeCartesian3ByScalar(C,B);let T=o._flagDiv,D=o._canvasZoom,F=document.createElement("canvas");F.width=10*v/E*D,F.height=10*D,lH.drawDocument(T,F,{zoom:D}).then(function(L){o._htmlPlaneEntity=o._earthCtrl.entities.add({position:new Bn(y,!1),plane:{plane:new Bn(x,!0),dimensions:new It(E,v),material:new z0({image:L.image,transparent:!0})}})},function(L){console.info(L)})}function y(){return m}function x(){let v=new ee;return v=ee.negate(ee.UNIT_Y,v),new Wa(v,0)}};Object.defineProperties(Nle.prototype,{});var DAt=Nle;function kle(o,A){this._earthCtrl=o,this._scene=o.coreMap.scene,this._options=O(A,Ae.EMPTY_OBJECT),this._color=Ae(A.color,At.RED),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,0),this._statistics=Ae(A.statisticData,1e3),this._radius=Ae(A.radius,100),this._duration=Ae(A.duration,2e3),this._gradient=Ae(A.gradient,2),this._count=Ae(A.count,2),this._scale=Ae(A.dataScale,1),this._show=Ae(A.show,!0),this._billboardWidthRatio=Ae(A.billboardWidthRatio,1.2),this._billboardHeightRatio=Ae(A.billboardHeightRatio,2.4),this._prefix=Ae(A.prefix,""),this._scaleByDistance=Ae(A.scaleByDistance,new To(1500,3,15e3,.1)),this._topFillColor=Ae(A.topFillColor,At.fromCssColorString("#323232")),this._circleEntity=void 0,this._cylinderEntity=void 0,this._billboardEntity=void 0,this._position=ee.fromDegrees(this._lon,this._lat,this._height),this._show&&this.addToMap()}var RN=new ee;kle.prototype.addToMap=function(){let o=this;if(O(o._circleEntity)||(o._circleEntity=o._earthCtrl.entities.add({position:o._position,ellipse:{height:o._height,semiMinorAxis:o._radius,semiMajorAxis:o._radius,material:new Z8({duration:o._duration,gradient:o._gradient,color:o._color,count:o._count})}})),!O(o._cylinderEntity)){RN=ee.clone(o._position,RN);let A=o._statistics*o._scale,f=Vn.eastNorthUpToFixedFrame(RN),m=new ee(0,0,A/2);Xe.multiplyByPoint(f,m,RN),o._cylinderEntity=o._earthCtrl.entities.add({position:RN,cylinder:{length:A,topRadius:o._radius/10,bottomRadius:o._radius/10,fill:!0,outline:!1,material:o._color}})}if(!O(o._billboardEntity)){RN=ee.clone(o._position,RN);let A=o._cylinderEntity.cylinder.length._value,f=Kt.fromCartesian(RN),m=ee.fromRadians(f.longitude,f.latitude,f.height+A);o._billboardEntity=o._earthCtrl.entities.add({position:m,billboard:{scaleByDistance:o._scaleByDistance,verticalOrigin:bn.BOTTOM,width:o._radius/o._billboardWidthRatio,height:o._radius/o._billboardHeightRatio,image:NLi(o._color,o._topFillColor,o._prefix+o._statistics,o._radius).toDataURL()}})}};kle.prototype.removeFromMap=function(){O(this._cylinderEntity)&&(this._earthCtrl.entities.remove(this._cylinderEntity),this._cylinderEntity=void 0),O(this._circleEntity)&&(this._earthCtrl.entities.remove(this._circleEntity),this._circleEntity=void 0),O(this._billboardEntity)&&(this._earthCtrl.entities.remove(this._billboardEntity),this._billboardEntity=void 0)};function LLi(o,A,f,m){o.save(),o.strokeStyle="rgba(0,0,0,0)",o.scale(m/150,m/100),o.save(),o.fillStyle=A.toCssColorString(),o.lineWidth=4,o.beginPath(),o.moveTo(77.8,82.1),o.lineTo(64.6,69),o.lineTo(23.8,69),o.bezierCurveTo(20.8,69,18.3,66.5,18.3,63.5),o.lineTo(18.3,22.5),o.bezierCurveTo(18.3,19.5,20.8,17,23.8,17),o.lineTo(131.8,17),o.bezierCurveTo(134.8,17,137.3,19.5,137.3,22.5),o.lineTo(137.3,63.5),o.bezierCurveTo(137.3,66.5,134.8,69,131.8,69),o.lineTo(90.9,69),o.lineTo(77.8,82.1),o.closePath(),o.moveTo(23.8,18),o.bezierCurveTo(21.3,18,19.3,20,19.3,22.5),o.lineTo(19.3,63.5),o.bezierCurveTo(19.3,66,21.3,68,23.8,68),o.lineTo(65,68),o.lineTo(77.7,80.7),o.lineTo(90.5,68),o.lineTo(131.8,68),o.bezierCurveTo(134.3,68,136.3,66,136.3,63.5),o.lineTo(136.3,22.5),o.bezierCurveTo(136.3,20,134.3,18,131.8,18),o.lineTo(23.8,18),o.closePath(),o.fill(),o.stroke(),o.restore(),o.save(),o.fillStyle=f.toCssColorString(),o.beginPath(),o.moveTo(131.8,18),o.lineTo(23.80000000000001,18),o.bezierCurveTo(21.30000000000001,18,19.30000000000001,20,19.30000000000001,22.5),o.lineTo(19.30000000000001,63.5),o.bezierCurveTo(19.30000000000001,66,21.30000000000001,68,23.80000000000001,68),o.lineTo(65,68),o.lineTo(77.7,80.7),o.lineTo(90.5,68),o.lineTo(131.8,68),o.bezierCurveTo(134.3,68,136.3,66,136.3,63.5),o.lineTo(136.3,22.5),o.bezierCurveTo(136.3,20,134.2,18,131.8,18),o.closePath(),o.fill(),o.stroke(),o.restore(),o.restore()}function FLi(o,A,f){let m=f/1.4,C=m,y=m;A.width>A.height?y=m*(A.height/A.width):A.width<A.height&&(C=m*(A.width/A.height));let x=f/150*8,v=Math.round((f-C+x)/2),E=Math.round((5/6*f-y)/2);o.drawImage(A,v,E,C,y)}function NLi(o,A,f,m){let C=document.createElement("canvas");C.width=m,C.height=m;let y=C.getContext("2d");LLi(y,o,A,m);let x=m,v=N5(f,{font:`bold ${x}pt Microsoft YaHei`,fillColor:o});return FLi(y,v,x),C}Object.defineProperties(kle.prototype,{billboard:{get:function(){return this._billboardEntity}},cylinder:{get:function(){return this._cylinderEntity}},circle:{get:function(){return this._circleEntity}},show:{get:function(){return this._show},set:function(o){O(this._billboardEntity)&&(this._billboardEntity.show=o),O(this._cylinderEntity)&&(this._cylinderEntity.show=o),O(this._circleEntity)&&(this._circleEntity.show=o)}}});var TAt=kle;function dMe(o,A){if(this._earthCtrl=o,this._scene=o.coreMap.scene,this._options=Ae(A,Ae.EMPTY_OBJECT),this._color=Ae(A.color,At.RED),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,0),this._show=Ae(A.show,!0),this._containerWidth=Ae(A.containerWidth,200),this._containerHeight=Ae(A.containerHeight,200),this._containerColor=Ae(A.cylinderColor,At.YELLOWGREEN),this._canvasZoom=Ae(A.canvasZoom,10),this._scaleByDistance=Ae(A.scaleByDistance,new To(1500,3,15e3,.1)),this._tipsHtml=A.tipsHtml,this._tipsEntity=void 0,this._tipsDiv=document.createElement("div"),this._tipsDiv.style.opacity="0.7",this._tipsDiv.style.margin="0",this._tipsDiv.style.padding="0",this._tipsDiv.id=Ae(A.id,Vu()),this._tipsDiv.innerHTML=this._tipsHtml,!O(A.tipsHtml))throw new Ui("tipsHtml is required.");this.addToMap()}dMe.prototype.removeFromMap=function(){O(this._tipsEntity)&&(this._earthCtrl.entities.remove(this._tipsEntity),this._tipsEntity=void 0),O(this._tipsDiv)&&(this._earthCtrl.entities.remove(this._tipsDiv),this._tipsDiv=void 0)};dMe.prototype.addToMap=function(){let o=this,A=ee.fromDegrees(o._lon,o._lat,o._height);if(!O(o._tipsEntity)){let m=o._containerHeight,C=o._containerWidth,y=o._canvasZoom,x=o._tipsDiv,v=document.createElement("canvas");v.width=C,v.height=m,lH.drawDocument(x,v,{zoom:y}).then(function(E){o._tipsEntity=o._earthCtrl.entities.add({position:new Bn(f,!1),billboard:{scaleByDistance:o._scaleByDistance,verticalOrigin:bn.BOTTOM,width:C,height:m,image:E.image.src}})},function(E){console.info(E)})}function f(){return A}};var MAt=dMe;function WO(o,A){this._earthCtrl=o,this._scene=o.coreMap.scene,this._options=Ae(A,Ae.EMPTY_OBJECT),this.element=document.createElement("div"),this._html=Ae(A.html,""),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,10),this._show=Ae(A.show,!0),this._removeHandler=void 0,this._pos=void 0,this._position=void 0,this._c=void 0,this._changedC=void 0,this._point=void 0,this._parameter=A,this._rtti="GwScreenDialog",this.isInit=!1,this.isInit===!1&&this.addToMap()}WO.prototype.setHtml=function(o){this.element.innerHTML=o};WO.prototype.setShow=function(o){if(!this.isInit)return 0;this.element.style.display=o?"block":"none"};WO.prototype.showAt=function(){if(!this.isInit)return 0;this._position&&(this._pos=Ss.wgs84ToWindowCoordinates(this._scene,this._position),this._pos&&(this.element.style.left=`${this._pos.x}px`,this.element.style.top=`${this._pos.y}px`))};WO.prototype.removeFromMap=function(){this.element.remove(),this.isInit=!1};WO.prototype.addToMap=function(){if(this.isInit)return 0;nA(".map-widget",this.element),this.element.innerHTML=this._html,this.element.style.position="absolute",this.isInit=!0,this._position=ee.fromDegrees(this._lon,this._lat,this._height),this.showAt(),this._c=new It(this._pos.x,this._pos.y);let o=this;this._scene.camera.moveStart.addEventListener(function(){o._removeHandler=o._scene.postRender.addEventListener(function(){if(o._c){let A=new L5(Di.WGS84,o._earthCtrl.camera._camera.position);A&&o._position&&(A.isPointVisible(o._position)===!1?o.setShow(!1):(o._show===!0&&o.setShow(!0),o._changedC=Ss.wgs84ToWindowCoordinates(o._scene,o._position),o._changedC?(o._c=o._changedC,o.showAt()):o.setShow(!1)))}})}),this._scene.camera.moveEnd.addEventListener(function(){o._removeHandler&&o._removeHandler.call()})};Object.defineProperties(WO.prototype,{show:{get:function(){return this._show},set:function(o){this._show!==o&&(this._show=o,this.setShow(o))}},html:{get:function(){return this._html},set:function(o){this._html!==o&&(this._html=o,this.setHtml(o))}},lon:{get:function(){return this._lon},set:function(o){this._lon!==o&&(this._lon=o,this._position=ee.fromDegrees(this._lon,this._lat,this._height),this.showAt())}},lat:{get:function(){return this._lat},set:function(o){this._lat!==o&&(this._lat=o,this._position=ee.fromDegrees(this._lon,this._lat,this._height),this.showAt())}},height:{get:function(){return this._height},set:function(o){this._height!==o&&(this._height=o,this._position=ee.fromDegrees(this._lon,this._lat,this._height),this.showAt())}}});var PAt=WO;function OW(o){this._earthCtrl=o,this._coreMap=o.coreMap}OW.prototype.createStatisticFlag=function(o){return new DAt(this._earthCtrl,o)};OW.prototype.createStatisticCylinder=function(o){return new TAt(this._earthCtrl,o)};OW.prototype.createTipsContainer=function(o){return new MAt(this._earthCtrl,o)};OW.prototype.createScreenDialog=function(o){return new PAt(this._earthCtrl,o)};var RAt=OW;function Ole(){var o=["getKeyRecoveryParam","curveType","Input not Buffer","map","_ipad","b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef","setAutoPadding","rejected",'{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}',"dir","transform","ERR_UNKNOWN_ENCODING","mulf","Apr","_verify2","tmp","EncoderBuffer","password","raw","isBoxedPrimitive","onRuntimeInitialized","seqof","addn","sqlite3_bind_double","sum32_5","000000000000000000","bufferedRequest","non-byte EncoderBuffer value","set","ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","_countBits","assign","publicKey","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758","privateExponent","fired","root","isString","invalid sig","WeakMap","modulus must be greater than 1","_sqlite3_result_int64","-e4437ed6010e88286f547fa90abfe4c3","onend","modelDbModelIdList","The argument '","5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b","save","arrayBufferBlockCount","sum64_5_hi","notStrictEqual","sqlite3_column_blob","entry","c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","utf8","c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","readableListening","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865","/dev/stdin","clock","Password","codes","exitKey","a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","SetModelStoreyTransform","fromRed works only with numbers in reduction context","callbackify","e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","worldDirection","494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","byteLength","spread","kdeparams","canvas","7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","_final","not ","createDecipher","chdir","6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c","[object HTMLCollection]","_sqlite3_changes","dataStoreArrayBuffer","Trace","shim","isArgumentsObject","'name' must be a string","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58","isBuf","falling back to ArrayBuffer instantiation","Index out of range","call","[object Object]","emitter","tagged","rsa",'Failed to peek tag: "',"content","Attempt to access memory outside buffer bounds","eject","ERR_FR_TOO_MANY_REDIRECTS","exists","da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","pipe","String","boolean","Rand","_decodeTag","getHighWaterMark","3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","ERR_BUFFER_OUT_OF_BOUNDS","getCiphers","callee","2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06","serialNumber","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc","tinv","ineg","bool","0x8000000000000000","%Object.getOwnPropertyDescriptor%","00000000000000000","sync","maj32",". Build with -s ASSERTIONS=1 for more info.","0x7fffffffffffffff","search","iterator","readInt16LE","0000000000000","ECONNABORTED","join32","d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","imuln","zeroBits","acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","mtime","setRequestHeader","Instance","9333177ztxjEH","imul","worldUp","\x1B[31m"," [Function","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3","utils","toNumber","Number","heartbeat","ended","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375","isNull","stream","ixor","_importPublic","da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","outSize","path=","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589","hmacStrength","trying to set auth tag in unsupported state","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d","fillLast",'"buf" argument must be a Buffer or Uint8Array',"Jul","fromSecret","ETIMEDOUT","content-length","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e","notStrictEqualObject","aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","746590PyDowD","subjectPrivateKey","emitClose","writing","_secret","___errno_location"," ** ","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8","Number is too big","Function","_decode"," and <= ","4446261rhToce","RDNSequence","shift","numstr","oneC","Cancel","readingMore","BasePoint","52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","simpleSieve","getDivisor","charstr","a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","_events","SaveShell","Premature close","/dev/shm","176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ms exceeded","_sqlite3_open",'" argument must be of type number. Received type ',"recoveryParam","HEAP32","00000000000000000000000","onlyShowShells","persEnc","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8","revBin","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573","config","des-ede3","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e","allowHalfOpen","Not implemented yet","copy","computeSecret","Cipher","d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","handlers","Digest already called",`
uniform sampler2D colorTexture;
uniform sampler2D depthTexture;
// in vec2 v_textureCoordinates;
@@ -18115,7 +18115,7 @@
    if (czm_seWaterHeight > -5000.0 && v_elevationPos.z < czm_seWaterHeight) { discard; }  
    gltf_seWater_main(); 
`;let v=C.getFragmentShaderCallback(y,o._diffuseAttributeOrUniformName[m],!1);return A.defined(v)?v(f):f}}function bki(o,A){let f=o._batchTable;return o._batchTable.featuresLength===0?function(m){let C={u_inverseElevationMatrix:function(y){let x=o._model,v=typeof x._elevationMatrix;if(v==="undefined")return A.Matrix4.IDENTITY;if(v==="function"?x._uniformInverseElevationMatrix=x._elevationMatrix(x._uniformInverseElevationMatrix):A.Matrix4.clone(x._elevationMatrix,x._uniformInverseElevationMatrix),A.Matrix4.inverse(x._uniformInverseElevationMatrix,x._uniformInverseElevationMatrix),x._rtcCenter){let E=new A.Matrix4,I=A.Matrix4.fromTranslation(x._rtcCenter,E);A.Matrix4.multiply(x._uniformInverseElevationMatrix,I,x._uniformInverseElevationMatrix)}return x._uniformInverseElevationModelMatrix||(x._uniformInverseElevationModelMatrix=new A.Matrix4),y&&y.model?(x._uniformInverseElevationModelMatrix=A.Matrix4.multiply(x._uniformInverseElevationMatrix,y.model,x._uniformInverseElevationModelMatrix),x._uniformInverseElevationModelMatrix):A.Matrix4.IDENTITY}};return A.combine(m,C)}:function(m){let C={tile_batchTexture:function(){return defaultValue(f._batchTexture.batchTexture,f._batchTexture.defaultTexture)},tile_textureDimensions:function(){return f._batchTexture.textureDimensions},tile_textureStep:function(){return f._batchTexture.textureStep},tile_colorBlend:function(){return getColorBlend(f)},tile_pickTexture:function(){return f._batchTexture.pickTexture},u_inverseElevationMatrix:function(y){let x=o._model,v=typeof x._elevationMatrix;if(v==="undefined")return A.Matrix4.IDENTITY;if(v==="function"?x._uniformInverseElevationMatrix=x._elevationMatrix(x._uniformInverseElevationMatrix):A.Matrix4.clone(x._elevationMatrix,x._uniformInverseElevationMatrix),A.Matrix4.inverse(x._uniformInverseElevationMatrix,x._uniformInverseElevationMatrix),x._rtcCenter){let E=new A.Matrix4,I=A.Matrix4.fromTranslation(x._rtcCenter,E);A.Matrix4.multiply(x._uniformInverseElevationMatrix,I,x._uniformInverseElevationMatrix)}return x._uniformInverseElevationModelMatrix||(x._uniformInverseElevationModelMatrix=new A.Matrix4),x._uniformInverseElevationModelMatrix=A.Matrix4.multiply(x._uniformInverseElevationMatrix,y.model,x._uniformInverseElevationModelMatrix),x._uniformInverseElevationModelMatrix}};return A.combine(m,C)}}function Qki(o){this._size=o.size,this._datatype=o.datatype,this.getValue=o.getValue}function Ski(o,A,f){try{let m=f.Ellipsoid.WGS84,C=m.scaleToGeodeticSurface(o);return A=f.Transforms.eastNorthUpToFixedFrame(C,m,A),A}catch{return f.Matrix4.clone(f.Matrix4.IDENTITY,A)}}function Dki(o){o.AutomaticUniforms.czm_seWaterHeight||(o.AutomaticUniforms.czm_seWaterHeight=new Qki({size:1,datatype:o.WebGLConstants.FLOAT,getValue:function(f){return f.seWaterHeight?f.seWaterHeight:-5e3}}),o.ShaderSource._czmBuiltinsAndUniforms.czm_seWaterHeight="uniform float czm_seWaterHeight;");var A=o.Cesium3DTileset.prototype.update;o.Cesium3DTileset.prototype.update=function(f){A.call(this,f),this.show&&this.ready&&(this._autoElevationMatrix=Ski(this.boundingSphere.center,this._autoElevationMatrix,o))},o.Cesium3DTileContentFactory.b3dm=function(f,m,C,y,x){if(f.enableModelExperimental)return o.ModelExperimental3DTileContent.fromB3dm(f,m,C,y,x);let v=new o.Batched3DModel3DTileContent(f,m,C,y,x);return v._model instanceof o.ClassificationModel||(v._model._elevationMatrix=function(E){let I=f._elevationMatrix||f._autoElevationMatrix||o.Matrix4.IDENTITY;return E=o.Matrix4.clone(I,E),E},v._model._uniformMapLoaded=bki(v,o),v._model._vertexShaderLoaded=Bki(v,o),v._model._fragmentShaderLoaded=wki(v,o)),v},o.ShaderProgram.prototype._setUniforms=function(f,m,C){let y,x;if(o.defined(f)){let I=this._manualUniforms;for(y=I.length,x=0;x<y;++x){let w=I[x];w.value=f[w.name](m)}}let v=this._automaticUniforms;for(y=v.length,x=0;x<y;++x){let I=v[x];I.uniform.value=I.automaticUniform.getValue(m)}let E=this._uniforms;for(y=E.length,x=0;x<y;++x)E[x].set();if(C){let I=this._gl,w=this._program;I.validateProgram(w)}}}function Tki(o,A){let f=o.baseWaterColor||new A.Color(.2,.3,.6,1),m=o.blendColor||new A.Color(.5,.5,.5,.7),C=o.animationSpeed||.05,y=o.amplitude||2,x=o.frequency||5e3,v=o.specularIntensity||.5,E=o.fadeFactor||1,I=o.sizeAndVelocity||new A.Cartesian4(100,100,10,0),w=o.width||316,Q=o.height||316;Dki(A),A.Material._materialCache.addMaterial("SEWater",{fabric:{type:"SEWater",uniforms:{baseWaterColor:f,blendColor:m,specularMap:A.Material.DefaultImageId,normalMap:A.Material.DefaultImageId,frequency:x,animationSpeed:C,amplitude:y,specularIntensity:v,fadeFactor:E,sizeAndVelocity:I},source:xgt},translucent:function(M){var B=M.uniforms;return B.baseWaterColor.alpha<1||B.blendColor.alpha<1}})}vB.prototype._createDebugView=function(){let o=this._cesium.Material.fromType("Image"),A=new this._cesium.ViewportQuad(new this._cesium.BoundingRectangle(0,100,300,300));A.material=o,this._debugViewportQuad=this._scene.primitives.add(A);let f=this._getWaterReflectTexture();f&&(o.uniforms.image=f)};vB.prototype.debugShow=function(o){this._debugViewportQuad.show=o};vB.prototype.isDebugShow=function(){return this._debugViewportQuad.show};vB.prototype._getWaterReflectTexture=function(){return this._wTexture._colorTexture};vB.prototype._getWaterReflectTextureChangedEvent=function(){return this._wTexture._textureChangedEvent};vB.prototype._createWaterMaterial=function(){var o=new this._cesium.Material({fabric:{type:"SEWater",uniforms:{specularMap:this._cesium.buildModuleUrl("Assets/Textures/waterNormals.jpg"),normalMap:this._cesium.buildModuleUrl("Assets/Textures/waterNormals.jpg"),frequency:this._option.frequency,animationSpeed:this._option.animationSpeed,amplitude:this._option.amplitude,width:this._option.width,height:this._option.height}}});let A=this;return o._uniforms.specularMap_0=function(){return A._wTexture._colorTexture||A._scene.context.defaultTexture},o};vB.prototype.createWaterPolygonPrimitive=function(o){let A=this,f=this._scene,m=null,C=null;if(o.type==0)m=this._cesium.PolygonGeometry.fromPositions({vertexFormat:this._cesium.MaterialAppearance.MaterialSupport.ALL.vertexFormat,positions:o.positions}),C=f.groundPrimitives.add(new this._cesium.GroundPrimitive({geometryInstances:new this._cesium.GeometryInstance({geometry:m}),appearance:new this._cesium.MaterialAppearance({materialSupport:this._cesium.MaterialAppearance.MaterialSupport.ALL}),classificationType:this._cesium.ClassificationType.BOTH})),C.appearance.material=this._createWaterMaterial();else if(o.type==1)m=this._cesium.CoplanarPolygonGeometry.fromPositions({vertexFormat:this._cesium.MaterialAppearance.MaterialSupport.ALL.vertexFormat,positions:o.positions}),C=f.primitives.add(new this._cesium.Primitive({geometryInstances:new this._cesium.GeometryInstance({geometry:m}),appearance:new this._cesium.MaterialAppearance({materialSupport:this._cesium.MaterialAppearance.MaterialSupport.ALL})})),C.appearance.material=this._createWaterMaterial();else if(o.type==2){let x=new this._cesium.GeometryInstance({geometry:o.geometry});C=f.primitives.add(new this._cesium.Primitive({geometryInstances:x,appearance:new this._cesium.EllipsoidSurfaceAppearance({material:this._createWaterMaterial()}),asynchronous:!1}))}C.appearance.material.uniforms.sizeAndVelocity.x=o.width,C.appearance.material.uniforms.sizeAndVelocity.y=o.height,C.radius=.5*Math.max(o.width,o.height),C.centerPos=o.center;let y=this._cesium.Cartographic.fromCartesian(o.center);return C.waterHeight=y.height,this._trackPrimitive(C),C};vB.prototype._trackPrimitive=function(o){this._trackedPrimitives.indexOf(o)<0&&this._trackedPrimitives.push(o)};vB.prototype.destroyWaterPolygonPrimitive=function(o){this._trackedPrimitives.indexOf(o)>=0&&(this._untrackPrimitive(o),this._scene.primitives.contains(o)&&this._scene.primitives.remove(o),this._scene.groundPrimitives.contains(o)&&this._scene.groundPrimitives.remove(o))};vB.prototype._untrackPrimitive=function(o){let A=this._trackedPrimitives.indexOf(o);A!=-1&&this._trackedPrimitives.splice(A,1)};vB.prototype.isDestroyed=function(){return!1};vB.prototype.destroy=function(){return this._disposeListener&&(this._disposeListener(),this._disposeListener=null),this._wTexture&&(this._wTexture.destroy(),this._wTexture=null),this._trackedPrimitives=[],this._cesium.destroyObject(this)};var Tgt=vB;function ir(o,A){if(this._viewer=o,this._cesium=A,this._core=new pr(o,A),this._Label=new XP(this._viewer,this._cesium),this._Circle=new G2(this._viewer,this._cesium),this._Box=new ZP(this._viewer,this._cesium),this._Cone=new yI(this._viewer,this._cesium),this._Color=new Pn(this._viewer,this._cesium),this._Polyline=new Ey(this._viewer,this._cesium),this._Rectangle=new $P(this._viewer,this._cesium),this._Polygon=new BC(this._viewer,this._cesium),this._ImageLabel=new KN(this._viewer,this._cesium),this._GeoJsonFeatureLayer=new df(this._viewer,this._cesium,this._ImageryProvidererid),this._Ellipsoid=new YN(this._viewer,this._cesium),this._PointModel=new GQ(this._viewer,this._cesium),this._wall=new n4(this._viewer,this._cesium),this._Terrain=new iR(this._viewer,this._cesium),this._createdynamicObject=new Oue(this._viewer,this._cesium),this._GeometryCreator,this._ImageryLayer=new eR(this._viewer,this._cesium),this._VolumeGeoJsonFeatureLayer=void 0,this._PolygonVectorGeoJsonFeatureLayer=void 0,this._skyBox=new Dft(this._viewer,this._cesium),this._flowField=new Tft(this._viewer,this._cesium),this._canvasField=new Gft(this._viewer,this._cesium),this.VectorGeoJsonFeatureLayer=new Wf(this._viewer,this._cesium),this._straightArrow=new qft(this._viewer,this._cesium),this._SimpleGraphic=new Sue(this._viewer,this._cesium),this._popupmessage=new UQ(this._viewer,this._cesium),this._VectorImgFeatureLayer=ngt,this._TerrainModifier=new ogt(this._viewer,this._cesium),!A.Resource._Implementations.createImageSGS){var f=new B2({workerPath:window.SmartEarthRootUrl+"/Workers/nullValueRemoveWorker.js"},this._cesium);A.Resource._Implementations.createImageSGS=function(m,C,y){var x=8,v={r:0,g:0,b:0,a:255};if(m.indexOf("nullvalue=")>-1){var E=m.split("nullvalue=")[1].split("&")[0],I=E.split("%2C");v.r=I[0],v.g=I[1],v.b=I[2]}if(m.indexOf("nulltolerance=")>-1)var w=m.split("nulltolerance=")[1].split("&")[0];var Q=new Image,M=document.createElement("canvas"),B=M.getContext("2d");Q.url=m,Q.onload=function(){if(Q.url!=null&&Q.url.indexOf("nullvalue")!=-1){delete Q.url,M.width=Q.width,M.height=Q.height,B.drawImage(Q,0,0),Q.imageProcesses=[];for(var T=Q.width/x,D=Q.height,F=0,L=0;L<x;L++){var R=L*T,k=B.getImageData(R,F,T,D).data;Q.imageProcesses[L]=f.queueWorkItem({nullValue:v,nullTolerance:w,canvasData:k,width:T,height:D,startX:R})}Cesium.when.all(Q.imageProcesses,function(U){for(var V=0;V<U.length;V++){for(var H=B.createImageData(U[V].width,U[V].height),q=0;q<U[V].canvasData.length;q++)H.data[q]=U[V].canvasData[q];B.putImageData(H,U[V].startX,0)}Q.src=M.toDataURL(),y.resolve(Q)}).otherwise(function(U){console.log(U)})}else y.resolve(Q)},Q.onerror=function(T){y.reject(T)},C&&(Cesium.TrustedServers.contains(m)?Q.crossOrigin="use-credentials":Q.crossOrigin=""),Q.src=m}}}ir.prototype.create3DTilesets=function(o,A,f,m,C,y,x){var v=this._D3Tileset.create3DTilesets(o,A,f,m,C,y,x);return this._D3Tilesets||(this._D3Tilesets=[],this._SE3DTilesets=new Map),this._SE3DTilesets.set(v.treeobj.id,v),this._D3Tilesets.push(v.item),v};ir.prototype.set3DTilesetsAlpha=function(o){this._D3Tilesets&&this._D3Tilesets.forEach(A=>{o==0?A.style=new this._cesium.Cesium3DTileStyle({show:!1}):o==1?A.style=new this._cesium.Cesium3DTileStyle({show:!0}):A.style=new this._cesium.Cesium3DTileStyle({color:`color('rgba(255,255,255,${o})')`})})};ir.prototype.createTerrainModifier=function(o,A,f){return this._TerrainModifier.createTerrainModifier(o,A,f)};ir.prototype.createS3MLayer=function(o,A={},f){return A instanceof this._cesium.Scene&&(A={scene:A}),new Lae({url:o,...A},f,this._cesium)};ir.prototype.createWaterPolygonLayer=function(o={}){return new Agt(this._viewer,this._cesium).createPolygonLayer(o)};ir.prototype.createWaterPolygon=function(o={}){return new Tgt(o,this._viewer.scene,this._cesium).createWaterPolygonPrimitive(o)};ir.prototype.createCloudMap=function(o,A,f,m){var C=new BC(this._viewer,this._cesium);return C.createCloudMap(o,A,f,m)};ir.prototype.addVideoPolygon=function(o,A){var f=new BC(this._viewer,this._cesium);return f.addVideoPolygon(o,A)};ir.prototype.addVideoBox=function(o,A){var f=new BC(this._viewer,this._cesium);return f.addVideoPlane(o,A)};ir.prototype.CZML=function(o,A,f){return new Zft(this._viewer,this._cesium).addCZML(o,A,f)};ir.prototype.addHeatMap=function(o,A){return new tgt(this._viewer,this._cesium).addHeatMap(o,A)};ir.prototype.militaryPlotting=function(o,A,f,m){var C=this._straightArrow,y=null;let x,v;f?typeof f=="function"?(x={},v=f):(x=f,v=m):x={};let E=I=>{x.removeEdit&&C.MilitaryStandardObj.pop(),C.defaultEdit(),v&&v(I)};switch(o){case"StraightArrow":var y=C.createStraightArrow(A,x,E);break;case"SwallowtailArrow":var y=C.createSwallowtailArrow(A,x,E);break;case"PincerArrow":var y=C.createPincerArrow(A,x,E);break;case"AttackArrow":var y=C.createAttackArrow(A,x,E);break;case"GatheringPlace":var y=C.createHandlerPolygon(A,x,E);break;case"RoundedRectangle":var y=C.createRoundedRectangle(A,x,E);break;case"Sector":var y=C.createSector(A,x,E);break;case"Bow":var y=C.createBow(A,x,E);break;case"Bezierline":var y=C.createBezierline(x,E);break;case"BezierArrow":var y=C.createBezierArrow(x,E);break;default:break}return y};ir.prototype.MilitaryCopy=function(o){var A=this._straightArrow,f=A.copyJb(o);return f};ir.prototype.NightMode=function(o){let A=this._viewer,f=A.imageryLayers.length,m,C;o?(m=.15,C=.15):(m=1,C=1);for(let y=0;y<f;y++)A.imageryLayers.get(y).brightness=m;this._D3Tilesets&&this._D3Tilesets.forEach(y=>{y.imageBasedLightingFactor.x=C,y.imageBasedLightingFactor.y=C}),A.scene.skyAtmosphere.show=!o};ir.prototype.SaveMilitaryStandard=function(){var o=this._straightArrow;o.save()};ir.prototype.OpenMilitaryStandard=function(o){var A=this._straightArrow;A.open(o)};ir.prototype.ClearMilitaryStandard=function(){var o=this._straightArrow;o.clear()};ir.prototype.getEntityById=function(o){var A=this._straightArrow,f=A.getEntityById(o);return f};ir.prototype.startModify=function(o){var A=this._straightArrow;A.edit(o)};ir.prototype.createSimpleGraphic=function(o,A,f){return this._SimpleGraphic.createSimpleGraphic(o,A,f)};ir.prototype.addSimpleGraphic=function(o,A,f){return this._SimpleGraphic.addSimpleGraphic(o,A,f)};ir.prototype.GeoWTFS=function(o){return this._TdtLabel||(this._TdtLabel=new cgt(this._viewer,this._cesium)),this._TdtLabel.GeoWTFS(o)};ir.prototype.Video3D=function(o){return new lgt(this._viewer,this._cesium).Video3D(o)};ir.prototype.addRotateEffectCircle=function(o){return new RPe(this._viewer,this._cesium).createRotateCircle(o)};ir.prototype.addTetrahedron=function(o){return new Cgt(this._viewer,o,this._cesium)};ir.prototype.addTrafficLight=function(o){return this._TrafficLight||(this._TrafficLight=new ygt(this._viewer,this._cesium)),this._TrafficLight.add(o)};ir.prototype.addDRWEffectCircle=function(o){return new RPe(this._viewer,this._cesium).createDRWCircle(o)};ir.prototype.addEffectCylinder=function(o){return new LPe(this._viewer,this._cesium).createCylinder(o)};ir.prototype.addEffectCone=function(o){return new LPe(this._viewer,this._cesium).createCone(o)};ir.prototype.createGeoJsonFeatureLayerProviderOptimization=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VolumeVectorGeoJsonFeatureLayerOptimization(o,A,f,m,C,y)};ir.prototype.createGeoJsonFeatureLayerProviderGisOptimization=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VolumeVectorGeoJsonFeatureLayerGisOptimization(o,A,f,m,C,y)};ir.prototype.VolumeVectorGeoJsonFeatureLayerGis=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VolumeVectorGeoJsonFeatureLayerGis(o,A,f,m,C,y)};ir.prototype.PointVectorGeoJsonFeatureLayerGis=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.PointVectorGeoJsonFeatureLayerGis(o,A,f,m,C,y)};ir.prototype.PolylineVectorGeoJsonFeatureLayerGis=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.PolylineVectorGeoJsonFeatureLayerGis(o,A,f,m,C,y)};ir.prototype.createGeoJsonFeatureLayerProviderClassOptimization=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VolumeVectorGeoJsonFeatureLayerClassOptimization(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerDthOptimization=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VolumeVectorGeoJsonFeatureLayerOptimization1(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerDthOptimizationtest=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayerDthOptimization(o,A,f,m,C,y)};ir.prototype.VolumeVectorGeoJsonFeatureLayerOptimizationGroundtest=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VolumeVectorGeoJsonFeatureLayerOptimizationGroundtest(o,A,f,m,C,y)};ir.prototype.VolumeVectorGeoJsonFeatureLayerOptimizationtest=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VolumeVectorGeoJsonFeatureLayerOptimizationtest(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerJCDthOptimization=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayerJCDthOptimization(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerJCDthOptimizationxp=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayerJCDthOptimizationxp(o,A,f,m,C,y)};ir.prototype.createHistogramVectorGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createHistogramVectorGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createLaycolorVectorGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLaycolorVectorGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createVector3DTilesFeatureLayer=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVector3DTilesFeatureLayer(o,A,f,m,C,y)};ir.prototype.createVector3DTilesFeatureLayerRelease=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVector3DTilesFeatureLayerRelease(o,A,f,m,C,y)};ir.prototype.createGeojsonImage=function(o){var A=new Wf(this._viewer,this._cesium);return A.createGeojsonImage(o)};ir.prototype.createGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VectorGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createGeojsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createGeojsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createGeojsonKmlFeatureLayer=function(o,A,f,m,C){var y=new df(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,y.createGeojsonKmlFeatureLayer(o,A,f,m,C)};ir.prototype.sfsterrainprovider=function(o,A,f,m,C){var y=new iR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,y.createSFSTerrain(o,A,f,m,C)};ir.prototype.createWMTSTerrain=function(o,A,f,m,C){var y=new iR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,y.createWMTSTerrain(o,A,f,m,C)};ir.prototype.sfsterrainprovider71=function(o,A,f,m,C){var y=new iR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,y.createSFSTerrain71(o,A,f,m,C)};ir.prototype.createTerrain=function(o,A,f,m,C){var y=new iR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,y.createTerrain(o,A,f,m,C)};ir.prototype.createTerrainLayer=function(o,A,f,m,C,y){var x=new iR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,x.createTerrainLayer(o,A,f,m,C,y)};ir.prototype.createArcGISTerrain=function(o,A,f,m,C){var y=new iR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,y.createArcGISTerrain(o,A,f,m,C)};ir.prototype.createCesiumTerrain=function(o,A,f,m){var C=new iR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,C.createCesiumTerrain(o,A,f,m)};ir.prototype.getFlyData=function(o,A){this._createdynamicObject.getFlyData(o,A)};ir.prototype.createDynamicObject=function(o,A,f){return this._createdynamicObject.Start(o,A,f)};ir.prototype.addmodle=function(o){return this._createdynamicObject.addmodle(o)};ir.prototype.createSatelliteTrail=function(o){return new rgt(this._viewer,this._cesium).createSatelliteTrail(o)};ir.prototype.executePauseFly3DPaths=function(){return this._createdynamicObject.executePauseFly3DPaths()};ir.prototype.executePlayForwardFly3DPaths=function(){return this._createdynamicObject.executePlayForwardFly3DPaths()};ir.prototype.executePlayReverseFly3DPaths=function(){return this._createdynamicObject.executePlayReverseFly3DPaths()};ir.prototype.executeSignout=function(){return this._createdynamicObject.executeSignout()};ir.prototype.createLabel=function(o,A,f,m,C){var y=new XP(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createLabel(o,A,f,m,C)};ir.prototype.createPosition=function(o,A,f){var m=new pPe(this._viewer,this._cesium);return m.createPosition(o,A,f)};ir.prototype.createLocation=function(o,A,f){return this._Point.createLocation(o,A,f)};ir.prototype.createPoint=function(o,A,f,m,C,y){return this._Point.createPoint(o,A,f,m,C,y)};ir.prototype.createLonlat=function(o){return this._Point.createLonlat(o)};ir.prototype.createDivPoint=function(o,A,f){return new yue(this._viewer,this._cesium).createDivPoint(o,A,f)};ir.prototype.createRichTextPoint=function(o,A,f,m){return this._Point.createRichTextPoint(o,A,f,m)};ir.prototype.SkyBox=function(o,A){return this._skyBox.SkyBox(o,A)};ir.prototype.setSpaceBackground=function(o){return this._skyBox.setSpaceBackground(o)};ir.prototype.createWindField=function(o,A){return this._flowField.createWindField(o,A)};ir.prototype.createField=function(o,A){return this._canvasField.createField(o,A)};ir.prototype.createRoad=function(o={}){return new Jft(this._viewer,this._cesium).createRoad(o)};ir.prototype.createTrailLinePath=function(o,A,f){return this._trailLine.createPath(o,A,f)};ir.prototype.createFlyingLine=function(o,A){return this._trailLine.createFlyingLine(o,A)};ir.prototype.createTrailLineWall=function(o,A){return this._trailLine.createWall(o,A)};ir.prototype.createTrailLine=function(o,A){return this._trailLine.createLine(o,A)};ir.prototype.createModel=function(o,A,f,m,C,y){var x=new GQ(this._viewer,this._cesium);return x.createModel(o,A,f,m,C,y)};ir.prototype.createModelEditable=function(o,A,f,m,C,y){var x=new GQ(this._viewer,this._cesium);return x.createModelEditable(o,A,f,m,C,y)};ir.prototype.createPointModel=function(o,A){return this._PointModel.createPointModel(o,A)};ir.prototype.executePolyline=function(o){var A=new Ey(this._viewer,this._cesium);return A.executePolyline(o)};ir.prototype.executePolygon=function(o){var A=new BC(this._viewer,this._cesium);return A.executePolygon(o)};ir.prototype.executeWall=function(o,A){var f=new n4(this._viewer,this._cesium);return f.executeWall(o,A)};ir.prototype.createWall=function(o,A,f,m){var C=new n4(this._viewer,this._cesium);return C.createWall(o,A,f,m)};ir.prototype.executePolyline1=function(o){var A=new Ey(this._viewer,this._cesium);return A.executePolyline1(method)};ir.prototype.createPolylineVolume=function(o,A,f,m,C){var y=new Fue(this._viewer,this._cesium);return y.createPolylineVolume(o,A,f,m,C)};ir.prototype.createCorridor=function(o,A,f,m){var C=new gft(this._viewer,this._cesium);return C.createCorridor(o,A,f,m)};ir.prototype.addViewCone=function(o){return new lj(this._viewer,this._cesium).addViewCone(o)};ir.prototype.createViewCone=function(o,A){return new lj(this._viewer,this._cesium).createViewCone(o,A)};ir.prototype.createModifyMesh=function(o,A,f,m,C){return this.createModelClipping(m,{type:"polygon",isInner:!0,positions:A})};ir.prototype.createModelClipping=function(o,A){var f=new Xft(this._viewer,this._cesium);return f.addClipping(o,A)};ir.prototype.createModelModifier=function(o,A,f,m){let C=[];return this._D3Tilesets&&this._D3Tilesets.forEach((y,x)=>{let v=this.createModifyMesh(o,A,f,y,m);C.push(v)}),{remove:()=>{C.forEach((y,x)=>{y.remove()}),C=[]}}};ir.prototype.createPopupMessage=function(o){var A=new UQ(this._viewer,this._cesium);return A.createPopupMessage(o)};ir.prototype.createMeasurement=function(o){var A=new UQ(this._viewer,this._cesium);return A.createMeasurement(o)};ir.prototype.createPlotting=function(o){var A=new UQ(this._viewer,this._cesium);return A.createPlotting(o)};ir.prototype.createPopupProp=function(o,A){return this._popupmessage.createPopupProp(o,A)};ir.prototype.createModelLibrary=function(o){return this._popupmessage.createModelLibrary(o)};ir.prototype.createHawkeye=function(o,A){var f=new jft(this._viewer,this._cesium);return f.createHawkeye(o,A)};ir.prototype.createGeoJsonFeatureLayer=function(o,A,f,m,C){var y=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createBillboardGeoJsonFeature=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createBillboardGeoJsonFeature(o,A,f,m,C,y)};ir.prototype.createBillboardPointGeoJsonFeatureLayer=function(o,A,f,m,C){var y=new ej(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createBillboardPointGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createKmlLayer=function(o,A,f){var m=new TPe(this._viewer,this._cesium);return m.createKmlLayer(o,A,f)};ir.prototype.addKmlLayer=function(o,A,f,m){var C=new TPe(this._viewer,this._cesium);return C.addKmlLayer(o,A,f,m)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerArcgis=function(o,A,f,m,C){var y=new bue(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createVolumeVectorGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createBillboardGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new ej(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createBillboardGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createPointGeojsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPointGeojsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createModelGeojsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createModelGeojsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createCirclePointGeoJsonFeatureLayer=function(o,A,f,m,C){var y=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createCirclePointGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createModelPointGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createModelPointGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createPrimitivLabelPointGeoJsonFeatureLayer=function(o,A,f,m,C){var y=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createLabelPointGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createLabelPointGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLabelPointGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createSXTLabelGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createSXTLabelGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createCustomCallbackGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y,x){var v=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,v.createCustomCallbackGeoJsonFeatureLayerProvider(o,A,f,m,C,x,y)};ir.prototype.createLabelPolymerizationGeoJsonFeatureLayer=function(o,A,f,m,C){var y=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createLabelPolymerizationGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createPointPolymerizationGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPointPolymerizationGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createLabelpolymerizationGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLabelpolymerizationGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createLabelpolymerizationGeoJsonFeatureLayers=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLabelpolymerizationGeoJsonFeatureLayers(o,A,f,m,C,y)};ir.prototype.createStreetscapeGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createStreetscapeGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createPrimitiveLabelGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLabelGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createLabelImageGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLabelImageGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createLabelImageGeoJsonFeatureLayerProvider1=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLabelImageGeoJsonFeatureLayerProvider1(o,A,f,m,C,y)};ir.prototype.createLabelRichtextGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLabelRichtextGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createModelGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createModelGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createPointGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPointGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createArcGisImageryLayer=function(o,A,f,m,C,y){var x=new eR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,x.createArcGisImageryLayer(o,A,f,m,C,y)};ir.prototype.createImageryLayerGrid=function(o){var A=new eR(this._viewer,this._cesium);return A.createImageryLayerGrid(o)};ir.prototype.createWebMapServerImageLayer=function(o,A,f,m,C,y){var x=new eR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,x.createWebMapServerImageLayer(o,A,f,m,C,y)};ir.prototype.createWebMapTileServerImageLayer=function(o,A,f,m,C,y){var x=new eR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,x.createWebMapTileServerImageLayer(o,A,f,m,C,y)};ir.prototype.createUrlTemplateImageryProvider=function(o,A,f,m,C,y){var x=new eR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,x.createUrlTemplateImageryProvider(o,A,f,m,C,y)};ir.prototype.createCirclePointGeoJsonFeatureLayer=function(o,A,f,m,C){var y=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createCirclePointGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createPolylineGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolylineGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createPrimitivePolylineGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new $O(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolylineGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createPrimitiveGroundPolylineGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new $O(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createGroundPolylineGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.exectPointModel=function(o,A,f,m,C,y){var x=new GQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.exectPointModel(o,A,f,m,C,y)};ir.prototype.createPolygonModel=function(o,A,f,m,C,y){var x=new GQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolygonModel(o,A,f,m,C,y)};ir.prototype.modelMove=function(){var o=new GQ(this._viewer,this._cesium);return o.modelMove()};ir.prototype.createPrimitivePolylineVectorGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new $O(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolylineVectorGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createPolylineVectorGeoJsonFeatureLayerProviderModel=function(o,A,f,m,C,y){var x=new $O(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolylineVectorGeoJsonFeatureLayerProviderModel(o,A,f,m,C,y)};ir.prototype.createpolylineVolumeGeojsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createpolylineVolumeGeojsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createpolylineVolumeGeojsonPrimitiveLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createpolylineVolumeGeojsonPrimitiveLayer(o,A,f,m,C,y)};ir.prototype.createVolumeGeoJsonFeatureLayer=function(o,A,f,m,C){var y=new xj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createVolumeGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createVolumeGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new xj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerOptimizations=function(o,A,f,m,C,y){var x=new xj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayerOptimization(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new xj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createPolygonVectorGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new vj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerOptimization=function(o,A,f,m,C,y){var x=new vj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayerOptimization(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayersd=function(o,A,f,m,C,y){var x=new vj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayersd(o,A,f,m,C,y)};ir.prototype.createWallGeoFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createWallGeoFeatureLayer(o,A,f,m,C,y)};ir.prototype.createWallPrimitiveGeoFeatureLayer=function(o,A,f,m,C,y){var x=new tj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createWallPrimitiveGeoFeatureLayer(o,A,f,m,C,y)};ir.prototype.createWallGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new tj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createWallGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createImageryProvider=function(o,A,f,m,C,y,x){var v=new eR(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,v.createImageryProvider(o,A,f,m,C,y,x)};ir.prototype.createCacheImageryProvider=function(o,A,f,m,C,y){var x=new eR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,x.createCacheImageryProvider(o,A,f,m,C,y)};ir.prototype.createterrainProvider=function(o,A,f,m){return this._TerrainProvider.createterrainProvider(o,A,f,m)};ir.prototype.createPolylineImageryProviderer=function(o,A,f,m){return this._ImageryLayer.createPolylineImageryProviderer(o,A,f,m)};ir.prototype.createMVTWithStyle=function(o,A,f,m){return this._ImageryLayer.createMVTWithStyle(o,A,f,m)};ir.prototype.createPolygonGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolygonGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createPolygonGeoJsonFeatureLayer1=function(o,A,f,m,C){var y=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createPolygonGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createPolygonVectorGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolygonVectorGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerDth=function(o,A,f,m,C,y){var x=new vj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayerDth(o,A,f,m,C,y)};ir.prototype.createPolygonVectorGeoJsonFeatureLayerProviderModel=function(o,A,f,m,C,y){var x=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolygonVectorGeoJsonFeatureLayerProviderModel(o,A,f,m,C,y)};ir.prototype.createPolygonVectorGeoJsonFeatureLayerProviderls=function(o,A,f,m,C,y){var x=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolygonVectorGeoJsonFeatureLayerProviderls(o,A,f,m,C,y)};ir.prototype.createPolygonVectorGeoJsonFeatureLayerProviderlsd=function(o,A,f,m,C,y){var x=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolygonVectorGeoJsonFeatureLayerProviderlsd(o,A,f,m,C,y)};ir.prototype.createArcgisPolygonVectorGeoJsonFeatureLayerProviderls=function(o,A,f,m,C,y){var x=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createArcgisPolygonVectorGeoJsonFeatureLayerProviderls(o,A,f,m,C,y)};ir.prototype.createPolygonVectorFeatureLayerProvider=function(o,A,f,m,C){var y=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createPolygonVectorFeatureLayerProvider(o,A,f,m,C)};ir.prototype.createPolygonVectorMonomerFeatureLayerProvider=function(o,A,f,m,C){var y=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createPolygonVectorMonomerFeatureLayerProvider(o,A,f,m,C)};ir.prototype.createPolygonMapGeoJsonFeatureLayer=function(o,A,f,m,C,y){return this._MapGeoJsonFeatureLayer.createPolygonMapGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createGeoJsonDataSource=function(o,A,f,m,C){var y=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createGeoJsonDataSource(o,A,f,m,C)};ir.prototype.DeleteObject=function(o){if(this._core.isnull(o._viewer)){console.log("obj is null");return}o.deleteObject();for(var A in o)delete o[A];o=void 0};ir.prototype.createCircle=function(o,A,f,m){var C=new G2(this._viewer,this._cesium);return C.createCircle(o,A,f,m)};ir.prototype.CreateRectangle=function(o,A,f,m,C){var y=new $P(this._viewer,this._cesium);return y.CreateRectangle(o,A,f,m,C)};ir.prototype.createBox=function(o,C,f,m){var C=new ZP(this._viewer,this._cesium);return C.createBox(o,C,f,m)};ir.prototype.createBillboardbatch=function(o){var A=new DPe(this._viewer,this._cesium);return A.createBillboardbatch(o)};ir.prototype.createBillboard=function(o){var A=new DPe(this._viewer,this._cesium);return A.createBillboard(o)};ir.prototype.createCone=function(o,A,f,m){var C=new yI(this._viewer,this._cesium);return C.createCone(o,A,f,m)};ir.prototype.createRectangularSensor=function(o,A,f,m){var C=new yI(this._viewer,this._cesium);return C.createRectangularSensor(o,A,f,m)};ir.prototype.createRadarMaskScan=function(o,A,f,m){var C=new yI(this._viewer,this._cesium);return C.createRadarMaskScan(o,A,f,m)};ir.prototype.ConicSensor=function(o,A,f){var m=new hgt(this._viewer,this._cesium);return m.create(o,A,f)};ir.prototype.FieldIntensity=function(o,A){var f=new dgt(this._viewer,this._cesium);return f.create(o,A)};ir.prototype.createRadarMask=function(o,A,f,m){var C=new yI(this._viewer,this._cesium);return C.createRadarMask(o,A,f,m)};ir.prototype.createConeRadar=function(o,A){var f=new yI(this._viewer,this._cesium);return f.createConeRadar(o,A)};ir.prototype.createColor=function(o,A,f,m){var C=new Pn(this._viewer,this._cesium);return C.createColor(o,A,f,m)};ir.prototype.createPolyline=function(o,A,f,m,C){var y=new Ey(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createPolyline(o,A,f,this._core.isnull(m)?0:m,C)};ir.prototype.createLink=function(o,A,f){var m=new Ey(this._viewer,this._cesium);return m.createLink(o,A,f)};ir.prototype.createLinkPro=function(o,A,f){var m=new Ey(this._viewer,this._cesium);return m.createLinkPro(o,A,f)};ir.prototype.createLandingLine=function(o,A={}){var f=new Ey(this._viewer,this._cesium);return f.createLandingLine(o,A)};ir.prototype.createLinkPros=function(o){var A=new Ey(this._viewer,this._cesium);return A.createLinkPros(o)};ir.prototype.createPathLayer=function(o){return this._trailLine.createPathLayer(o)};ir.prototype.createTrailWallLayer=function(o){return this._trailLine.createWallLayer(o)};ir.prototype.createPolygon=function(o,A,f,m,C){var y=new BC(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createPolygon(o,A,f,m,C)};ir.prototype.createSector=function(o,A,f,m,C){var y=new BC(this._viewer,this._cesium);return y.createSector(o,A,f,m,C)};ir.prototype.executeEllipsoid=function(o,C,f,m){var C=new YN(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,C.createEllipsoid(o,C,f,m)};ir.prototype.createImageLabel=function(o,A,f,m){var C=new KN(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,C.createImageLabel(o,A,f,m)};ir.prototype.toHtmlColor=function(o){return this._Color.toHtmlColor(o)};ir.prototype.CreateLabel=function(o,A,f,m,C,y){var x=new XP(this._viewer,this._cesium);return this._core.isnull(C)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(C=lt.selectedItem.id),C=this._core.isnull(C)?0:C,x.CreateLabel(o,A,f,m,C,y)};ir.prototype.CreateImageLabel=function(o,A,f,m,C){var y=new KN(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.CreateImageLabel(o,A,f,m,C)};ir.prototype.createImage=function(o,A,f,m,C){var y=new KN(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.CreateImageLabel(o,A,f,m,C)};ir.prototype.CreatePolyline=function(o,A,f,m,C){var y=new Ey(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.CreatePolyline(o,A,f,m,C)};ir.prototype.CreateCircle=function(o,A,f,m,C,y){var x=new G2(this._viewer,this._cesium);return this._core.isnull(C)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(C=lt.selectedItem.id),C=this._core.isnull(C)?0:C,x.CreateCircle(o,A,f,m,C,y)};ir.prototype.CreateEllipse=function(o,A,f,m,C,y,x,v){var E=new G2(this._viewer,this._cesium);return this._core.isnull(x)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(x=lt.selectedItem.id),x=this._core.isnull(x)?0:x,E.CreateEllipse(o,A,f,m,C,y,x,v)};ir.prototype.CreateBox=function(o,A,f,m,C,y,x,v){var E=new ZP(this._viewer,this._cesium);return this._core.isnull(x)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(x=lt.selectedItem.id),x=this._core.isnull(x)?0:x,E.CreateBox(o,A,f,m,C,y,x,v)};ir.prototype.CreatePosition=function(o,A,f,m,C,y,x,v){var E=new pPe(this._viewer,this._cesium);return E.CreatePosition(o,A,f,m,C,y,x,v)};ir.prototype.createColor=function(o,A,f,m){var C=new Pn(this._viewer,this._cesium);return C.CreateColor(o,A,f,m)};ir.prototype.CreateCone=function(o,A,f,m,C,y,x,v){var E=new yI(this._viewer,this._cesium);return this._core.isnull(x)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(x=lt.selectedItem.id),x=this._core.isnull(x)?0:x,E.CreateCone(o,A,f,m,C,y,x,v)};ir.prototype.CreateCylinder=function(o,A,f,m,C,y,x,v){var E=new yI(this._viewer,this._cesium);return this._core.isnull(x)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(x=lt.selectedItem.id),x=this._core.isnull(x)?0:x,E.CreateCylinder(o,A,f,m,C,y,x,v)};ir.prototype.CreateSphere=function(o,A,f,m,C,y,x,v){var E=new YN(this._viewer,this._cesium);return this._core.isnull(x)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(x=lt.selectedItem.id),x=this._core.isnull(x)?0:x,E.CreateSphere(o,A,f,m,C,y,x,v)};ir.prototype.createPointOptimization=function(o,A){var f=new KQ(this._viewer,this._cesium);return f.createPointOptimization(o,A)};ir.prototype.createRectangleOptimization=function(o,A){var f=new $P(this._viewer,this._cesium);return f.createRectangleOptimization(o,A)};ir.prototype.createCircleOptimization=function(o,A){var f=new G2(this._viewer,this._cesium);return f.createCircleOptimization(o,A)};ir.prototype.createCylinderOptimization=function(o,A){var f=new yI(this._viewer,this._cesium);return f.createCylinderOptimization(o,A)};ir.prototype.createPointOptimization=function(o,A){var f=new KQ(this._viewer,this._cesium);return f.createPointOptimization(o,A)};ir.prototype.CreatePolygonEdit=function(){return this._core.EntityEdit(this._viewer,this._cesium)};ir.prototype.CreateVectorImageFeatureLayer=function(o,A,f,m,C,y,x){var v=new this._VectorImgFeatureLayer(this._viewer,this._cesium);return this._core.isnull(C)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(C=lt.selectedItem.id),C=this._core.isnull(C)?0:C,v.CreateVectorImageFeatureLayer(o,A,f,m,C,y,x)};ir.prototype.CreateWMSImageFeatureLayer=function(o,A,f,m,C,y,x){var v=new this._VectorImgFeatureLayer(this._viewer,this._cesium);return this._core.isnull(C)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(C=lt.selectedItem.id),C=this._core.isnull(C)?0:C,v.CreateWMSImageFeatureLayer(o,A,f,m,C,y,x)};ir.prototype.createVolumetricMeasureTool=function(o){var A=new Rue(this._viewer,this._cesium,o);return A};Object.defineProperties(ir.prototype,{SimpleGraphic:{get:function(){return this._SimpleGraphic}},GeoJsonFeatureLayer:{get:function(){return this._GeoJsonFeatureLayer}},MilitaryPlotting:{get:function(){return this._straightArrow}},_D3Tileset:{get:function(){return new jP(this._viewer,this._cesium)}}});Object.defineProperties(ir.prototype,{_trailLine:{get:function(){return new Yft(this._viewer,this._cesium)}}});Object.defineProperties(ir.prototype,{_Point:{get:function(){return new KQ(this._viewer,this._cesium)}},GeometryCreator:{CreateLinearRingGeometry:function(o){return{}}}});var Wue=ir;var Mki=null;function Mgt(o,A){Mki=A,this._viewer=o,this._cesium=A,this._core=new pr(o,A),this._polyline=void 0,this._polygon=void 0,this._box=new ZP(o,A),this._ellipsoid=new YN(o,A),this._rectangle=new $P(o,A),this._circle=new G2(o,A),this._point=void 0,this._label=new XP(o,A),this._dynamicObject=new Oue(o,A),this._elevationContour=new oue(o,A),this._cone=new yI(o,A)}Mgt.prototype.execute=function(o,A,f={},m){var C=this._viewer,y=this._cesium;this._point=new KQ(C,y),this._polyline=new Ey(C,y),this._polygon=new BC(C,y);var x=this._core,v={polyline:{},positions:[],distance:[]};if(v.setDistance=function(){alert("qq")},o==0&&A==0)return this._polyline.executePolyline(f,m);if(o==4&&A==1)return this._elevationContour.executeContourMaterial(m);if(o==0&&A==1)return this._polygon.executePolygon(f,m);if(o==0&&A==11)return this._polygon.executePolygonvideo(m,f);if(o==1&&A==1)return this._box.executeBox(m);if(o==1&&A==2)return this._cone.executeCone(m);if(o==1&&A==3)return this._cone.executeCylinder(m);if(o==1&&A==4)return this._ellipsoid.executeEllipsoid(m);if(o==1&&A==5)return this._rectangle.createRectangle(f,m);if(o==1&&A==6)return this._circle.executeClircle(m);if(o==1&&A==7)return this._polygon.executeSector(m,f);if(o==1&&A==8)return this._box.executeExcavation(f,m);if(o==1&&A==9)return this._box.executeExcavation(f,m);if(o==1&&A==10)return this._circle.executeClirclews(m);if(o==1&&A==11)return this._point.executePoint(m,f);if(o==1&&A==12)return this._rectangle.createRectangledxkz(m);if(o==0&&A==2)return this._polyline.executeHorizontals(m,f);if(o==0&&A==3)return this._polygon.executePolygoncl(m,f);if(o==0&&A==4)return this._polyline.executeHorizontal(m,f);if(o==0&&A==10)return this._polyline.executePolyline1(m,f);if(o==0&&A==5)return this._polyline.executeHeightTe(m,f);if(o==0&&A==6)return this._polyline.executeAnge(m,f);if(o==0&&A==9)return this._polyline.executeAngeSd(m,f);if(!(o==0&&A==7)){if(o==0&&A==8)return this._polygon.surfaceArea(f,m);if(o==0&&A==12)return this._polyline.executeAngle(m,f);if(o==0&&A==13)this._point.executePointp(m,f);else{if(o==2&&A==0)return this._polyline.executeProfile(f,m);if(o==2&&A==1)return this._polygon.executePolygonym(m);if(o==2&&A==2)return new BC(C,y).executePolygonymsd(f,m);if(o==2&&A==3)return this._dynamicObject.executeFlycesium(m);if(o==2&&A==4)return this._polygon.executePolygonymsdtt(f,m);if(o==2&&A==5)return this._rectangle.createRectanglelbj(f,m);if(o==2&&A==6)return this._polyline.executeProfilePro(f,m);if(o==3&&A==0){if(f!=""&&f!=null){var E=new Date(f),I=y.JulianDate.fromDate(E);C.clock.currentTime=I.clone()}}else if(o==3&&A==1)this._viewer.animation.viewModel.faster();else if(o==3&&A==2)this._viewer.animation.viewModel.slower();else if(o==3&&A==3)this._viewer.animation.viewModel.playForwardViewModel.command();else if(o==3&&A==4)this._viewer.animation.viewModel.playReverseViewModel.command();else if(o==3&&A==5)this._viewer.animation.viewModel.pauseViewModel.command();else if(o==3&&A==6){var w=y.Cartographic.fromCartesian(f),Q=y.Math.toDegrees(w.longitude),M=y.Math.toDegrees(w.latitude),B=w.height,T={lon:Q,lat:M,hei:B};return T}}}};var Pgt=Mgt;function Rgt(o,A){this._viewer=o,this._cesium=A,this._execute=new Pgt(this._viewer,this._cesium)}Rgt.prototype.execute=function(o,A,f,m){return this._execute.execute(o,A,f,m)};var Lgt=Rgt;function FPe(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}FPe.prototype.deleteItem=function(o){lt.delete(o,this._viewer,this._cesium)};FPe.prototype.testTreeSource=function(){console.log(this._tree)};var Fgt=FPe;function Ngt(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}Ngt.prototype.findItem=function(o){var A=[],f="",m=Vi.clone(this._tree);A=o.split("\\");for(var C=0;C<A.length;C++)if(m=lt.getSourceByName(m,A[C]),C==A.length-1)if(m){f=m.id;break}else f="";else if(m)m=m.children;else{f="",m=null;break}return f};var kgt=Ngt;function Ogt(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}Ogt.prototype.getItemName=function(o){var A=lt.getSourceById(this._tree,o);return A?A.name:""};var Ugt=Ogt;function Ggt(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}Ggt.prototype.getVisibility=function(o){var A=A=lt.getSourceById(this._tree,o);if(A)return A.item.getVisibility()};var Hgt=Ggt;function Vgt(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}Vgt.prototype.setVisibility=function(o,A){lt.setVisibility(o,A,this._viewer,this._cesium)};var zgt=Vgt;function Kgt(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}Kgt.prototype.rename=function(o,A){var f=lt.getSourceById(this._tree,o);f&&(f.name=A);var m=lt.getTempSourceById(o);m&&(m.name=A)};var Ygt=Kgt;function Jgt(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}Jgt.prototype.getNextItem=function(o,A){};var Wgt=Jgt;var Pki={none:-1,point:0,polyline:1,polygon:2,label:3,imageLabel:4,position:5,imageLayer:6,dynamicObject:7,D3titles:8,box:9,circle:10,cone:11,pointfeaturelayer:12,polylinefeaturelayer:13,polygonfeaturelayer:14,pointmodel:15,rectangle:16,ellipsoid:17,wall:18,polylinevolume:19},Xf=Object.freeze(Pki);function _V(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource(),this._treeSource=lt.Source,this._treeTemp=lt.getTempSource(),this._tree1=lt,this._core=new pr(o,A)}_V.prototype.getObject=function(o){var A=Vi.clone(this._tree),f=lt.getSourceById(A,o);if(f)return f.item;var m=Vi.clone(lt.PointSelectSource),C=lt.getPointSelectSourceById(m,o);return C?C.item:void 0};_V.prototype.getTreeItem=function(o){var A=Vi.clone(this._tree),f=lt.getSourceById(A,o);if(f)return f;for(var m=this._viewer.dataSources,C=0;C<m.length;C++){var y=m.get(C).entities.getById(o);if(y){if(y.point&&(y.point.show==null||y.point.show._value)){var x=new KQ(this._viewer,this._cesium);x.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"point",item:x};return lt.pusPointSelectSource(v),v}else if(y.label&&(y.label.show==null||y.label.show._value)){var x=new XP(this._viewer,this._cesium);x.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"label",item:x};return lt.pusPointSelectSource(v),v}else if(y.box&&(y.box.show==null||y.box.show._value)){var E=new ZP(this._viewer,this._cesium);E.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"box",item:E};return lt.pusPointSelectSource(v),v}else if(y.model&&(y.model.show==null||y.model.show._value)){var x=new model(this._viewer,this._cesium);x.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"model",item:x};return lt.pusPointSelectSource(v),v}else if(y.wall&&(y.wall.show==null||y.wall.show._value)){var I=new n4(this._viewer,this._cesium);I.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"wall",item:I};return lt.pusPointSelectSource(v),v}else if(y.polyline){var w=new Ey(this._viewer,this._cesium);w.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"polyline",item:w};return lt.pusPointSelectSource(v),v}else if(y.polygon){var Q=new BC(this._viewer,this._cesium);Q.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"polygon",item:Q};return lt.pusPointSelectSource(v),v}else if(y.rectangle){var M=new $P(this._viewer,this._cesium);M.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"rectangle",item:M};return lt.pusPointSelectSource(v),v}else if(y.billboard&&(y.billboard.show==null||y.billboard.show._value)){var x=new KN(this._viewer,this._cesium);x.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"billboard",item:x};return lt.pusPointSelectSource(v),v}}}};_V.prototype.updateItemId=function(o,A){var m=this._treeSource,C=lt.getSourceById(m,o);if(C&&(C.id=A,C.type=="group"&&C.children&&C.children.length>0))for(var f=0;f<C.children.length;f++)C.children[f].pId=A;var m=this._treeTemp,C=lt.getSourceById(m,o);if(C&&(C.id=A,C.type=="group"&&C.children&&C.children.length>0))for(var f=0;f<C.children.length;f++)C.children[f].pId=A};_V.prototype.unifiedProject=function(o,A){for(var f=0;f<A.length;f++)A[f].id=o[f].id,A[f].pId=A[f].pId,A[f].children&&A[f].children.length>0&&this.unifiedProject(o[f].children,A[f].children)};_V.prototype.insertProjectTree=function(o,A,f,m,C){var y=!0;if(this._core.isnull(A)&&(A=this._core.getuid()),C==!1?y=!1:y=!0,Xf.none==f){var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"unknown",item:null};lt.insertGroupId(x,o)}else if(Xf.position==f){var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"unknown",item:null};lt.insertGroupId(x,o)}else if(Xf.imageLayer==f){var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,checked:y,type:"unknown",item:null};lt.insertGroupId(x,o)}else if(Xf.dynamicObject==f){var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"unknown",item:null};lt.insertGroupId(x,o)}else if(Xf.point==f){var v=new KQ(this._viewer,this._cesium);v.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"point",item:v};v.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.polyline==f){var E=new Ey(this._viewer,this._cesium);E.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"polyline",item:E};E.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.rectangle==f){var I=new $P(this._viewer,this._cesium);I.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"rectangle",item:I};I.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.ellipsoid==f){var w=new YN(this._viewer,this._cesium);w.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"ellipsoid",item:w};w.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.polygon==f){var Q=new BC(this._viewer,this._cesium);m._entity?(Q.setItem(m._entity),Q._points=m._points):Q.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"polygon",item:Q};Q.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.wall==f){var M=new n4(this._viewer,this._cesium);M.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"wall",item:M};M.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.polylinevolume==f){var B=new Fue(this._viewer,this._cesium);B.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"polylinevolume",item:B};B.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.pointmodel==f){var T=new GQ(this._viewer,this._cesium);T.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"pointmodel",item:T};T.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.label==f){var v=new XP(this._viewer,this._cesium);v.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"label",item:v};v.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.imageLabel==f){var v=new KN(this._viewer,this._cesium);v.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,checked:y,type:"billboard",item:v};v.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.D3titles==f){var D=new jP(this._viewer,this._cesium);D.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"3DTilesets",item:D};D.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.box==f){var F=new ZP(this._viewer,this._cesium);F.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"box",item:F};F.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.circle==f){var L=new G2(this._viewer,this._cesium);L.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"circle",item:L};L.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.cone==f){var R=new yI(this._viewer,this._cesium);R.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"cylinder",item:R};R.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.pointfeaturelayer==f){var k=new df(this._viewer,this._cesium);k.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"pointLayer",item:k};lt.insertGroupId(x,o)}else if(Xf.pointfeaturelayer==f){var k=new df(this._viewer,this._cesium);k.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"polylineLayer",item:k};lt.insertGroupId(x,o)}else if(Xf.polygonfeaturelayer==f){var k=new df(this._viewer,this._cesium);k.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"polygonLayer",item:k};lt.insertGroupId(x,o)}return x};var jgt=_V;function qgt(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}qgt.prototype.isGroup=function(o){var A=Vi.clone(this._tree),f=lt.getSourceById(A,o);return!!(f&&f.type=="group")};var Xgt=qgt;function NPe(o,A){this._viewer=o,this._cesium=A}NPe.prototype.exportMethod=function(o){for(var A=[],f=0;f<o.length;f++)if(typeof o[f].item.export=="function"){var m=o[f].item.export();if(A.push(m),o[f].children&&o[f].children.length){var C=this.exportMethod(o[f].children);A.push(C)}}return A};NPe.prototype.export=function(){var o=this.exportMethod(lt.Source);return o};var Zgt=NPe;function aA(o,A,f){this._viewer=o,this._cesium=A,this._tree=lt.Source,this._createGroup=new ZO(this._viewer,this._cesium,this._tree),this._deleteItem=new Fgt(this._viewer,this._cesium,this._tree),this._findItem=new kgt(this._viewer,this._cesium,this._tree),this._getItemName=new Ugt(this._viewer,this._cesium,this._tree),this._getVisibility=new Hgt(this._viewer,this._cesium,this._tree),this._setVisibility=new zgt(this._viewer,this._cesium,this._tree),this._renameGroup=new Ygt(this._viewer,this._cesium,this._tree),this._getNextItem=new Wgt(this._viewer,this._cesium,this._tree),this._isGroup=new Xgt(this._viewer,this._cesium,this._tree),this._creator=new Wue(this._viewer,this._cesium),this._getObject=new jgt(this._viewer,this._cesium),this._exportTree=new Zgt(this._viewer,this._cesium),this._core=new pr(o,A),this.InitTree(f,0),this.InitRootImageLayerAndTerrainlayer()}aA.prototype.export=function(){var o=this._exportTree.export(),A=new Blob([JSON.stringify(o)],{type:""});return this._core.saveAs(A,"tree.json"),o};aA.prototype.createGroup=function(o,A,f){return this._createGroup=new ZO(this._viewer,this._cesium),this._createGroup.createGroup(o,A,f)};aA.prototype.changeGroup=function(o,A){this._createGroup.changeGroup(o,A)};aA.prototype.starttemporaryItem=function(){return this._createGroup.starttemporaryItem()};aA.prototype.pushtemporaryItem=function(o){this._createGroup.pushtemporaryItem(o)};aA.prototype.pushStateItem=function(o){this._createGroup.pushStateItem(o)};aA.prototype.endtemporaryItem=function(){this._createGroup.endtemporaryItem()};aA.prototype.deleteItem=function(o){return this._deleteItem.deleteItem(o)};aA.prototype.findItem=function(o){return this._findItem.findItem(o)};aA.prototype.getItemName=function(o){return this._getItemName.getItemName(o)};aA.prototype.getObject=function(o){return this._getObject.getObject(o)};aA.prototype.getTreeItem=function(o){return this._getObject.getTreeItem(o)};aA.prototype.updateItemId=function(o,A){return this._getObject.updateItemId(o,A)};aA.prototype.getVisibility=function(o){return this._getVisibility.getVisibility(o)};aA.prototype.setVisibility=function(o,A){return this._setVisibility.setVisibility(o,A)};aA.prototype.removeAll=function(o){let A=[];this._viewer.entities.values.forEach(f=>{f.objectType===o&&A.push(f)}),A.forEach(f=>{this._viewer.entities.remove(f)}),A=null};aA.prototype.setVisibilityAll=function(o,A){this._viewer.entities.values.forEach(f=>{f.objectType===o&&(f.show=A)})};aA.prototype.rename=function(o,A){return this._renameGroup.rename(o,A)};aA.prototype.getNextItem=function(o,A){return this._getNextItem.getNextItem(o)};aA.prototype.isGroup=function(o){return this._isGroup.isGroup(o)};Object.defineProperties(aA.prototype,{exitsObjectType:{get:function(){return Xf}}});aA.prototype.insertProjectTree=function(o,A,f,m,C,y){return this._core.isnull(o)&&!this._core.isnull(this._tree.selectedItem)&&this._tree.selectedItem.type=="group"&&(o=this._tree.selectedItem.id),o=this._core.isnull(o)?0:o,this._core.isnull(A)||(o=this.createGroup(A,!0,o)),this._getObject.insertProjectTree(o,f,m,C,y)};aA.prototype.exitsGroup=function(o,A){return lt.exitsGroup(o,A)};aA.prototype.getTreeSource=function(){var o=Vi.cloneDeep(lt.getSource());return lt.removeItem(o)};aA.prototype.unifiedProject=function(o,A){this._getObject.unifiedProject(o,A)};aA.prototype.clearn=function(){lt.clearn()};Object.defineProperties(aA.prototype,{Source:{get:function(){return lt.TempSource}}});Object.defineProperties(aA.prototype,{currentObj:{get:function(){return lt.currentObj}}});aA.prototype.InitTree=function(o,A){if(o&&o.length)for(var f=0;f<o.length;f++){var m=o[f];switch(m.type){case"group":var C=this.createGroup(m.name,A);m.children&&m.children.length&&this.InitTree(m.children,C);break;case"label":this._creator.createLabel(m.position,m.text,m.option,A,m.description);break;case"imgLabel":this._creator.createImageLabel(m.position,m.imageLabel,A,m.description);break;case"polygon":this._creator.createPolygon(m.geometry,m.lineColor,m.altitudeType,A,m.description);break;case"polyline":this._creator.createPolyline(m.geometry,m.lineColor,m.altitudeType,A,m.description);break;case"box":this._creator.createBox(m.position,m.box,m.name,A,m.description);break;case"circle":this._creator.createCircle(m.position,m.circle,m.name,A,m.description);break;case"cone":this._creator.createCone(m.position,m.cylinder,m.name,m.description);break;default:break}}};aA.prototype.InitRootImageLayerAndTerrainlayer=function(){};Object.defineProperties(aA.prototype,{selectedItem:{get:function(){return lt.selectedItem},set:function(o){lt.selectedItem=o}}});var $gt=aA;var Rki={L_Click:"OnLButtonClk",L_DBL_Click:"OnLButtonDblClk",L_Down:"OnLButtonDown",L_Up:"OnLButtonUp",M_Click:"OnMButtonClk",M_Down:"OnMButtonDown",M_Up:"OnMButtonUp",R_Click:"OnRButtonClk",R_Down:"OnRButtonDown",R_Up:"OnRButtonUp",Move:"OnFrame",Wheel:"OnMouseWheel"},Ld=Object.freeze(Rki);function EI(o,A){this._viewer=o,this._cesium=A,this._Core=new pr(o,A)}EI.prototype.AttachEvent=function(o,A){var f=this._viewer,m=this._Core,m=this._Core;if(o===Ld.L_Click){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(x){let v=f.scene.pickPosition(x.position),E;v&&(E=m.toDegrees(v)),typeof A=="function"&&A(x,E)},this._cesium.ScreenSpaceEventType.LEFT_CLICK),y}else if(o===Ld.L_DBL_Click){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),y}else if(o===Ld.L_Down){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.LEFT_DOWN),y}else if(o===Ld.L_Up){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.LEFT_UP),y}else if(o===Ld.M_Click){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.MIDDLE_CLICK),y}else if(o===Ld.M_Down){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.MIDDLE_DOWN),y}else if(o===Ld.M_Up){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.MIDDLE_UP),y}else if(o===Ld.R_Click){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),y}else if(o===Ld.R_Down){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.RIGHT_DOWN),y}else if(o===Ld.R_Up){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.RIGHT_UP),y}else if(o===Ld.Wheel){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){typeof A=="function"&&A(E)},this._cesium.ScreenSpaceEventType.WHEEL),y}else if(o===Ld.Move){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){typeof A=="function"&&A(E)},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),y}};EI.prototype.AttachOnLButtonDblClkEvent=function(o){var A=this._viewer.scene,f=this._viewer,m=this._Core,C=new this._cesium.ScreenSpaceEventHandler(A.canvas);return C.setInputAction(function(y){let x=f.scene.pickPosition(y.position),v;x&&(v=m.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),C};EI.prototype.AttachOnLButtonDownEvent=function(o){var A=this._viewer,f=this._Core,m=this._viewer.scene,C=new this._cesium.ScreenSpaceEventHandler(m.canvas);return C.setInputAction(function(y){let x=A.scene.pickPosition(y.position),v;x&&(v=f.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.LEFT_DOWN),C};EI.prototype.AttachOnLButtonUpEvent=function(o){var A=this._viewer,f=this._Core,m=this._viewer.scene,C=new this._cesium.ScreenSpaceEventHandler(m.canvas);return C.setInputAction(function(y){let x=A.scene.pickPosition(y.position),v;x&&(v=f.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.LEFT_UP),C};EI.prototype.AttachOnMButtonDblClkEvent=function(o){var A=this._viewer,f=this._Core,m=this._viewer.scene,C=new this._cesium.ScreenSpaceEventHandler(m.canvas);return C.setInputAction(function(y){let x=A.scene.pickPosition(y.position),v;x&&(v=f.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.MIDDLE_CLICK),C};EI.prototype.AttachOnMButtonDownEvent=function(o){var A=this._viewer,f=this._Core,m=this._viewer.scene,C=new this._cesium.ScreenSpaceEventHandler(m.canvas);return C.setInputAction(function(y){let x=A.scene.pickPosition(y.position),v;x&&(v=f.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.MIDDLE_DOWN),C};EI.prototype.AttachOnMButtonUpEvent=function(o){var A=this._viewer,f=this._Core,m=this._viewer.scene,C=new this._cesium.ScreenSpaceEventHandler(m.canvas);return C.setInputAction(function(y){let x=A.scene.pickPosition(y.position),v;x&&(v=f.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.MIDDLE_UP),C};EI.prototype.AttachOnMouseWheelEvent=function(o){var A=this._viewer.scene,f=new this._cesium.ScreenSpaceEventHandler(A.canvas);return f.setInputAction(function(m){typeof o=="function"&&o(m)},this._cesium.ScreenSpaceEventType.WHEEL),f};EI.prototype.AttachOnFrameEvent=function(o){var A=this._viewer.scene,f=new this._cesium.ScreenSpaceEventHandler(A.canvas);return f.setInputAction(function(m){typeof o=="function"&&o(m)},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),f};EI.prototype.AttachOnRButtonDownEvent=function(o){var A=this._viewer,f=this._Core,m=this._viewer.scene,C=new this._cesium.ScreenSpaceEventHandler(m.canvas);return C.setInputAction(function(y){let x=A.scene.pickPosition(y.position),v;x&&(v=f.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.RIGHT_DOWN),C};EI.prototype.AttachOnRButtonUpEvent=function(o){var A=this._viewer,f=this._Core,m=this._viewer.scene,C=new this._cesium.ScreenSpaceEventHandler(m.canvas);return C.setInputAction(function(y){let x=A.scene.pickPosition(y.position),v;x&&(v=f.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.RIGHT_UP),C};EI.prototype.AttachCameraChangeEvent=function(o){return this._viewer.scene.camera.percentageChanged=1e-6,this._viewer.scene.camera.changed.addEventListener(o),o};EI.prototype.CameraMoveEndEvent=function(o){var A=this._viewer,f=!1;function m(){f=!0}function C(){f&&(o&&o(),A.scene.camera.moveStart.removeEventListener(m),A.scene.camera.moveEnd.removeEventListener(C))}setTimeout(function(){A.scene.camera.moveStart.addEventListener(m),A.scene.camera.moveEnd.addEventListener(C)},0)};var II=EI;function bj(o,A){this._viewer=o,this._cesium=A}bj.prototype.DetachEvent=function(o,A){A===Ld.L_Click?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.LEFT_CLICK):A===Ld.L_DBL_Click?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK):A===Ld.L_Down?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.LEFT_DOWN):A===Ld.L_Up?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.LEFT_UP):A===Ld.M_Click?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.MIDDLE_CLICK):A===Ld.M_Down?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.MIDDLE_DOWN):A===Ld.M_Up?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.MIDDLE_UP):A===Ld.R_Click?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.RIGHT_CLICK):A===Ld.R_Down?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.RIGHT_DOWN):A===Ld.R_Up?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.RIGHT_UP):A===Ld.Wheel?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.WHEEL):A===Ld.Move?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.MOUSE_MOVE):o&&o.destroy()};bj.prototype.DetachEventAll=function(o){o&&(o.destroy(),o=null)};bj.prototype.RemoNormalCesiumLeftDoubleClick=function(){this._viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(this._cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK)};bj.prototype.DetachCameraChangeEvent=function(o){this._viewer.scene.camera.percentageChanged=.5,this._viewer.scene.camera.changed.removeEventListener(o)};var Qj=bj;var Lki=function(o){if(!o.extensionsUsed||!o.extensionsRequired)return;let A=o.extensionsUsed.indexOf("KHR_technique_webgl"),f=o.extensionsRequired.indexOf("KHR_technique_webgl");if(A!==-1){o.extensionsRequired.splice(f,1,"KHR_techniques_webgl"),o.extensionsUsed.splice(A,1,"KHR_techniques_webgl"),o.extensions=o.extensions||{},o.extensions.KHR_techniques_webgl={},o.extensions.KHR_techniques_webgl.programs=o.programs,o.extensions.KHR_techniques_webgl.shaders=o.shaders,o.extensions.KHR_techniques_webgl.techniques=o.techniques;let m=o.extensions.KHR_techniques_webgl.techniques;o.materials.forEach(function(C,y){o.materials[y].extensions.KHR_technique_webgl.values=o.materials[y].values,o.materials[y].extensions.KHR_techniques_webgl=o.materials[y].extensions.KHR_technique_webgl;let x=o.materials[y].extensions.KHR_techniques_webgl;for(let v in x.values){let E=m[x.technique].uniforms;for(let I in E)if(E[I]===v){x.values[I]=x.values[v],delete x.values[v];break}}}),m.forEach(function(C){for(let y in C.attributes){let x=C.attributes[y];C.attributes[y]=C.parameters[x]}for(let y in C.uniforms){let x=C.uniforms[y];C.uniforms[y]=C.parameters[x]}})}},que=typeof window<"u"?window:typeof self<"u"?self:{},jue=setTimeout(()=>{jue=void 0,que.logSmartEarth&&que.logSmartEarth()},1e4);function Qh(o,A={},f,m,C){if(this._core=new pr(null,_r),this._cesium=_r,jue&&(clearTimeout(jue),jue=void 0,A.VERSION!==!1&&que.logSmartEarth&&que.logSmartEarth()),this.G=65535,f=Ae(f,Ae.EMPTY_OBJECT),O(A.StaticFileBaseUrl)?globalThis.GEOWORLD_BASE_URL=A.StaticFileBaseUrl:globalThis.GEOWORLD_BASE_URL="./WebSDK/",globalThis.SmartEarthRootUrl=globalThis.GEOWORLD_BASE_URL,ITe(),A.toolbar=!1,A.baseLayerPicker=!1,A.shadows=!1,A.skyAtmosphere=new sH,A.terrainShadows=Al.ENABLED,A.animation=!0,A.shouldAnimate=!0,A.fullscreenButton=!1,A.geocoder=!1,A.homeButton=!1,A.infoBox=!1,A.selectionIndicator=!1,A.timeline=Ae(A.timeline,!1),A.navigationHelpButton=!1,A.imageryProviderViewModels=[],A.terrainProviderViewModels=[],A.contextOptions={licenseServer:A.licenseServer,requestWebgl2:!0,webgl:{preserveDrawingBuffer:!0},failIfMajorPerformanceCaveat:!1,ellipsoidCoordinates:A.ellipsoidCoordinates},A.navigation=!0,A.disableRightClickMenu=!0,typeof A=="string"?A.imageryProvider=new bQ({url:A}):(A.url&&(A.imageryProvider=new bQ({url:A.url})),this._core.extend(A,A,!0)),A.baseLayerPicker){let E=this.getAllImageryView();if(A.basemaps)A.basemaps.forEach(I=>{A.imageryProviderViewModels.push(E[I])});else for(let I in E)A.imageryProviderViewModels.push(E[I])}else A.imageryProvider||(A.imageryProvider=new bQ({url:`${globalThis.GEOWORLD_BASE_URL}Workers/image/earth.jpg`}));let y={destination:ee.fromDegrees(A.x?A.x:106.69608,A.y?A.y:40.05164,A.z?A.z:2505283065e-2),orientation:{heading:je.toRadians(this._core.defaultValue(A.heading,0)),pitch:je.toRadians(this._core.defaultValue(A.pitch,-90)),roll:je.toRadians(this._core.defaultValue(A.roll,0))},duration:A.duration||1};if(A.removeGlobe&&(A.skyBox=!1,A.skyAtmosphere=!1,A.contextOptions={licenseServer:A.licenseServer,requestWebgl2:!0,failIfMajorPerformanceCaveat:!1,webgl:{alpha:!0,preserveDrawingBuffer:!0}}),this._Viewer=new $J(o,A),this._tree=m,this._Viewer.scene.globe.baseColor=At.WHITE,this._Viewer.shadowMap.size=2048,this._Viewer._cesiumWidget._creditContainer.style.display="none",this._Viewer.terrainShadows=Al.ENABLED,this._AttachEvent=void 0,this._DetachEvent=void 0,this._Analysis=void 0,this._Navigate=void 0,this._Creator=void 0,this._Command=void 0,this._ProjectTree=void 0,this._Coordinate=void 0,this._VectorTileProvider=void 0,this.toolbar=A.toolbar,A.removeGlobe){this._Viewer.imageryLayers.removeAll(),this._Viewer.shadows=!1,this._Viewer.scene.fog.enabled=!1,this._Viewer.scene.globe.show=!1;let E="rgba(0,0,0,0)";this._Viewer.scene.backgroundColor=At.fromCssColorString(E),this._Viewer.scene.light=new mae({direction:new ee(1,-.9,-.9)}),A.backgroundImage&&(this._Viewer.container.style.backgroundImage=`url(${A.backgroundImage})`)}else this._Viewer.scene.globe.depthTestAgainstTerrain=!0;if(this.coreMap=this._Viewer,this._environment=new pse(this),this._infoBar=new Xct(this),this._camera=new Wae(this),this._measure=new ase(this),this._shapeTool=new Cct(this),this._editTool=new use(this),this._factory=new D2(this),this._tools=new Jae(this),this._edit=new vle(this),this._analysis=new Fle(this),this._userScene=new xle(this,f),this._view=new RAt(this),this._bim=void 0,this._MilitaryPlotting=new nue(this),A.maxViewHeight&&(this._Viewer.scene.screenSpaceCameraController.maximumZoomDistance=A.maxViewHeight),A.minViewHeight||A.maxViewPitch){this.minViewHeight=A.minViewHeight,this.maxViewPitch=A.maxViewPitch&&je.toRadians(A.maxViewPitch);let E=0,I=this._Viewer.scene,w=!1;if(this.maxViewPitch){let Q=new Ur(this._Viewer.scene.canvas);Q.setInputAction(()=>{w=!0},Ki.MIDDLE_DOWN),Q.setInputAction(()=>{w=!1},Ki.MIDDLE_UP),Q.setInputAction(()=>{w=!0},Ki.RIGHT_DOWN),Q.setInputAction(()=>{w=!1},Ki.RIGHT_UP)}this._Viewer.scene.preRender.addEventListener(()=>{let Q=this._Viewer.camera;if(!(!Q||!Q.positionCartographic)){if(this.maxViewPitch){let M=Q.pitch;w&&M>this.maxViewPitch?(M=this.maxViewPitch,Q.setView({destination:this.oldPosition||Q.position.clone(),orientation:{heading:Q.heading,pitch:M,roll:0}})):this.oldPosition=Q.position.clone()}if(this.minViewHeight){E=I.globe.getHeight(Q.positionCartographic)||E;let B,T,D=Q.positionCartographic.height-E;this._Viewer.scene.globe.translucency.enabled||this._Analysis&&(this._Analysis._UndergroundMode&&this._Analysis._UndergroundMode.isUndergroundMode||this._Analysis._StreetView&&this._Analysis._StreetView.isStreetView)?(B=Q.positionCartographic.height<-200,T=-200):(B=D<this.minViewHeight,T=E+this.minViewHeight);let F=Q.pitch<0?Q.pitch:0;B?Q.setView({destination:this.oldPosition||ee.fromRadians(Q.positionCartographic.longitude,Q.positionCartographic.latitude,T),orientation:{heading:Q.heading,pitch:F,roll:0}}):this.oldPosition=Q.position.clone()}}})}let x={};Ml.DEFAULT_VIEW_RECTANGLE=Si.fromDegrees(79,0,130,60),A.navigationOption=Ae(A.navigationOption,Ae.EMPTY_OBJECT),x.defaultResetView=Ae(A.navigationOption.defaultResetView,Ml.DEFAULT_VIEW_RECTANGLE),x.enableCompass=Ae(A.navigationOption.enableCompass,!0),x.enableZoomControls=Ae(A.navigationOption.enableZoomControls,!0),x.enableDistanceLegend=Ae(A.navigationOption.enableDistanceLegend,!0),x.enableCompassOuterRing=Ae(A.navigationOption.enableCompassOuterRing,!0),this._Viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(this._cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),this._Viewer.extend(this._cesium.viewerCesiumNavigationMixin,x),this.Navigate.flyToPointsInterest(y,C),Zct.parse(this,f),A.mouseDownView&&this.mouseDownView(!0),Object.defineProperties(cI.prototype,{_cachedGltf:{configurable:!0,set:function(E){this._vtxf_cachedGltf=E,this._vtxf_cachedGltf&&this._vtxf_cachedGltf._gltf&&Lki(this._vtxf_cachedGltf._gltf)},get:function(){return this._vtxf_cachedGltf}}}),A.disableRightClickMenu&&(document.oncontextmenu=function(){return!1});let v=function(E){if(E.cesiumWidget._supportsImageRenderingPixelated&&window&&window.devicePixelRatio){let w=window.devicePixelRatio;for(;w>=2;)w/=2;E.resolutionScale=w}};BP.prototype.getRenderedBestLevelInfo=function(){let E=this.getRenderedLevelInfo(),I=0;for(let w in E)I<Number(w)&&(I=Number(w));return{bestLevel:I,count:E[I]}},BP.prototype.getRenderedLevelInfo=function(){let E=[];return this._tilesToRender.forEach(function(I){E[I.level]===void 0&&(E[I.level]=0,E[I.level]++)}),E},this.coreMap.camera.setView({destination:Ml.DEFAULT_VIEW_RECTANGLE})}Object.defineProperties(Qh.prototype,{environment:{get:function(){return this._environment}},entities:{get:function(){return this._Viewer.dataSourceDisplay.defaultDataSource.entities}},primitives:{get:function(){return this.coreMap.scene.primitives}},imageryLayers:{get:function(){return this.coreMap.imageryLayers}},view:{get:function(){return this._view}},terrainProvider:{get:function(){return this.coreMap.terrainProvider}},dataSources:{get:function(){return this._Viewer.dataSources}},camera:{get:function(){return this._camera}},measure:{get:function(){return this._measure}},shapeTool:{get:function(){return this._shapeTool}},editTool:{get:function(){return this._editTool}},edit:{get:function(){return this._edit}},analysis:{get:function(){return this._analysis}},factory:{get:function(){return this._factory}},userScene:{get:function(){return this._userScene}},tools:{get:function(){return this._tools}},hdr:{get:function(){return this.coreMap.scene.highDynamicRange},set:function(o){this.coreMap.scene.highDynamicRange=o}},sunGlowFactor:{set:function(o){this.coreMap.scene.sun.glowFactor=o},get:function(){return this.coreMap.scene.sun.glowFactor}},shadows:{get:function(){return this.coreMap.scene.shadowMap.enabled},set:function(o){this.coreMap.scene.shadowMap.enabled=o}},terrainShadows:{get:function(){return this.coreMap.scene.globe.shadows},set:function(o){this.coreMap.scene.globe.shadows=o}},shadowMap:{get:function(){return this.coreMap.scene.shadowMap}},shadowMapList:{get:function(){return this.coreMap.scene.shadowMapList}},textureProjectionMapList:{get:function(){return this.coreMap.scene.textureProjectionMapList}},viewShedMapList:{get:function(){return this.coreMap.scene.viewShedMapList}},clock:{get:function(){return this._Viewer.clock}},clockViewModel:{get:function(){return this._Viewer.clockViewModel}},sunShaftEnabled:{get:function(){return this.coreMap.scene.sunShaftEnabled},set:function(o){this.coreMap.scene.sunShaftEnabled=o}},MilitaryPlotting:{get:function(){return this._MilitaryPlotting}},Core:{get:function(){return this._Core||(this._Core=new pr(this._Viewer,_r)),this._Core}},Analysis:{get:function(){return this._Analysis||(this._Analysis=new eft(this._Viewer,_r)),this._Analysis}},Navigate:{get:function(){return this._Navigate||(this._Navigate=new fft(this._Viewer,_r,this._tree)),this._Navigate}},Creator:{get:function(){return this._Creator||(this._Creator=new Wue(this._Viewer,_r)),this._Creator}},Command:{get:function(){return this._Command||(this._Command=new Lgt(this._Viewer,_r)),this._Command}},ProjectTree:{get:function(){return this._ProjectTree||(this._ProjectTree=new $gt(this._Viewer,_r,this._tree)),this._ProjectTree}},tree:{get:function(){return this._tree}},Viewer:{get:function(){return this._Viewer}},toolbar:{get:function(){return this._Viewer._toolbar.style.display==="block"},set:function(o){this._Viewer._toolbar.style.display=o?"block":"none"}},wireframe:{get:function(){return this._Viewer.cesiumInspector.viewModel.wireframe},set:function(o){this._Viewer.cesiumInspector.viewModel.wireframe=o}},tileCoordinates:{get:function(){return this._Viewer.cesiumInspector.viewModel.tileCoordinates},set:function(o){this._Viewer.cesiumInspector.viewModel.tileCoordinates=o}},bim:{get:function(){if(!this._bim)throw new Ui("\u5F53\u524D\u7248\u672C\u4E0D\u652F\u6301Bim\u6A21\u5757\u529F\u80FD\uFF0C\u8BF7\u4F7F\u7528CimSDK!!!");return this._bim}},maxProjectionCount:{get:function(){return this.coreMap.scene.maxProjectionCount},set:function(o){this.coreMap.scene.maxProjectionCount=o}}});Qh.prototype.brightness=function(o){let A=Ae(o.enable,!0),f=Ae(o.brightness,1),m=this.coreMap.scene.postProcessStages;this.coreMap.scene.brightness=this.coreMap.scene.brightness||m.add(bv.createBrightnessStage()),this.coreMap.scene.brightness.enabled=A,this.coreMap.scene.brightness.uniforms.brightness=Number(f)};Qh.prototype.getAllImageryView=function(){return{arcgis_img:new fp({name:"ArcGIS\u5F71\u50CF",tooltip:"ArcGIS\u5F71\u50CF",iconUrl:`${globalThis.GEOWORLD_BASE_URL}Workers/image/baseLayer/arcgis_img.png`,creationFunction:()=>new qb({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"})}),arcgis_dark:new fp({name:"\u84DD\u8272\u5E95\u56FE",tooltip:"\u84DD\u8272\u5E95\u56FE",iconUrl:`${globalThis.GEOWORLD_BASE_URL}Workers/image/baseLayer/arcgis_dark.png`,creationFunction:()=>new qb({url:"http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer",enablePickFeatures:!1,usePreCachedTilesIfAvailable:!1,tilingScheme:this.Core.getOffsetTilingScheme(this._Viewer,_r)})})}};Qh.prototype.navControl=function(o,A){let f=A?"":"none";this._Viewer.cesiumNavigation&&(o==="all"?this._Viewer.cesiumNavigation.container.style.display=f:o==="nav"?this._Viewer.cesiumNavigation.navigationDiv.style.display=f:this._Viewer.cesiumNavigation.distanceLegendDiv.style.display=f)};Qh.prototype.CreateWfs=function(o,A,f,m,C,y,x,v,E){return new Oae(o,A,f,m,C,y,x,v,E,_r)};Qh.prototype.AttachEvent=function(o,A){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachEvent(o,A)};Qh.prototype.RemoNormalCesiumLeftDoubleClick=function(){return this._DetachEvent===void 0&&(this._DetachEvent=new Qj(this._Viewer,this._cesium)),this._DetachEvent.RemoNormalCesiumLeftDoubleClick()};Qh.prototype.AttachOnLButtonDblClkEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnLButtonDblClkEvent(o)};Qh.prototype.AttachOnLButtonDownEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnLButtonDownEvent(o)};Qh.prototype.AttachOnLButtonUpEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnLButtonUpEvent(o)};Qh.prototype.AttachOnMButtonDblClkEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnMButtonDblClkEvent(o)};Qh.prototype.AttachOnMButtonDownEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnMButtonDownEvent(o)};Qh.prototype.AttachOnMButtonUpEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnMButtonUpEvent(o)};Qh.prototype.AttachOnMouseWheelEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnMouseWheelEvent(o)};Qh.prototype.AttachOnFrameEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnFrameEvent(o)};Qh.prototype.AttachOnRButtonDownEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnRButtonDownEvent(o)};Qh.prototype.AttachOnRButtonUpEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnRButtonUpEvent(o)};Qh.prototype.AttachCameraChangeEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachCameraChangeEvent(o)};Qh.prototype.CameraMoveEndEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.CameraMoveEndEvent(o)};Qh.prototype.DetachEvent=function(o,A){return this._DetachEvent===void 0&&(this._DetachEvent=new Qj(this._Viewer,this._cesium)),this._DetachEvent.DetachEvent(o,A)};Qh.prototype.DetachEventAll=function(o){return this._DetachEvent===void 0&&(this._DetachEvent=new Qj(this._Viewer,this._cesium)),this._DetachEvent.DetachEventAll(o)};Qh.prototype.DetachCameraChangeEvent=function(o){return this._DetachEvent===void 0&&(this._DetachEvent=new Qj(this._Viewer,this._cesium)),this._DetachEvent.DetachCameraChangeEvent(o)};Qh.prototype.extend=function(o,A){if(!O(o))throw new Ui("mixin is required.");o(this,A)};Qh.prototype.pick=function(o,A=!0,f=!0,m=!1){this.endPick(),this.pick_callBcak=o,this._Viewer._enableInfoOrSelection=!0,f&&(this.pick_stage=this.Core.addPickStage(this._Viewer)),this.pick_handel=new Ur(this._Viewer.scene.canvas);let C,y,x,v;this.pick_handel.setInputAction(E=>{if(f&&this.pick_stage.remove(),C=this._Viewer.scene.pick(E.position),y=void 0,!C||m){let I=this._Viewer.scene.pickPosition(E.position);if(!I)return;let w=this.Core.toDegrees(I);v="\u5750\u6807\u4FE1\u606F",y={\u7ECF\u5EA6:w.lon.toFixed(6),\u7EAC\u5EA6:w.lat.toFixed(6),\u9AD8\u5EA6:w.height.toFixed(2)}}else if(C){if(f&&this.pick_stage.select(C),C.id)C.id.fid&&C.id.attributes?(v=C.id.fid,y=C.id.attributes):C.id.id&&C.id.properties?(v=C.id.name||C.id.id,y=C.id.properties.getValue?C.id.properties.getValue():C.id.properties):C.id.feature&&(v=C.id.feature.id,y=C.id.feature.properties);else if(C._modelId)C._modelId.id&&C._modelId.properties&&(v=C._modelId.id,y=C._modelId.properties);else if(!C.color&&C.content){v=`\u6A21\u578B${C.content.tile._priority}`;let I=this._Viewer.scene.pickPosition(E.position);if(I){let w=this.Core.toDegrees(I);y={\u7ECF\u5EA6:w.lon.toFixed(6),\u7EAC\u5EA6:w.lat.toFixed(6),\u9AD8\u5EA6:w.height.toFixed(2)}}}}if(A&&y){x='<table class="cesium-infoBox-defaultTable"><tbody>';for(let I in y)x+=`<tr><th>${I}</th><td>${y[I]}</td></tr>`;x+="</tbody></table>",this._Viewer.selectedEntity=new UA({name:v,description:x})}else if(C&&C.getPropertyIds&&C.getProperty){let I=C.getPropertyIds();y={},I.forEach(w=>{y[w]=C.getProperty(w)})}this.pick_callBcak&&(C||y)&&this.pick_callBcak(y,C,E)},Ki.LEFT_CLICK)};Qh.prototype.pickPosition=function(o,A=!0){this.endPick(),this.pick(o,A,!1,!0)};Qh.prototype.endPick=function(){this._Viewer.infoBox&&this._Viewer.infoBox.viewModel.closeClicked.raiseEvent(),this._Viewer._enableInfoOrSelection=!1,this.pick_callBcak=void 0,this.pick_handel&&this.pick_handel.destroy(),this.pick_handel=void 0,this.pick_stage&&(this.pick_stage.remove(),this.pick_stage.destroy(),this.pick_stage=void 0)};Qh.prototype.mouseDownView=function(o){if(o&&!this.cursorHandel){this.cursorHandel=new Ur(this._Viewer.scene.canvas);let A,f;this.cursorPoint=document.createElement("div"),this.cursorPoint.className="mouseDownViewPoint",this.cursorPoint.style.cssText="visibility: hidden;opacity: 0;pointer-events: none;position: absolute;z-index: 999;transition: visibility 0.2s ease 0s, opacity 0.2s ease-in;",this.cursorPoint.innerHTML=`<img src="${window.SmartEarthRootUrl}Workers/image/cursor.png" style="width: 36px;height: 36px;">`,this._Viewer.container.appendChild(this.cursorPoint);let m=v=>{v=v||f;let E=v.position||v.endPosition;this.cursorPoint.style.top=`${E.y-18}px`,this.cursorPoint.style.left=`${E.x-18}px`,this.cursorPoint.style.visibility="unset",this.cursorPoint.style.opacity=1},C=v=>{let E=v.position||v.endPosition;this.cursorPoint.style.top=`${E.y-18}px`,this.cursorPoint.style.left=`${E.x-18}px`};this.cursorHandel.setInputAction(v=>{f=v,clearTimeout(A),A=void 0,this._Viewer.camera.positionCartographic.height<1e4?m(v):(this.cursorPoint.style.visibility="hidden",this.cursorPoint.style.opacity=0)},this.rightRotate?Ki.RIGHT_DOWN:Ki.MIDDLE_DOWN),this.cursorHandel.setInputAction(v=>{this.cursorPoint.style.visibility="hidden"},this.rightRotate?Ki.RIGHT_UP:Ki.MIDDLE_UP),this.cursorHandel.setInputAction(v=>{f=v,A&&C(v)},Ki.MOUSE_MOVE),this.cursorHandel.setInputAction(v=>{clearTimeout(A),m(),A=setTimeout(()=>{this.cursorPoint.style.visibility="hidden",this.cursorPoint.style.opacity=0,A=void 0},500)},Ki.WHEEL);let y=0,x;this.cursorHandel.setInputAction(v=>{this._PointFly&&this._PointFly.end&&this._PointFly.end()},Ki.LEFT_CLICK),this.cursorHandel.setInputAction(v=>{y++,clearInterval(x),x=setTimeout(()=>{y=0},500),y>=2&&(y=0,!this._PointFly&&(this._PointFly=new gV(this._Viewer,_r)),this._PointFly&&this._PointFly.end&&this._PointFly.end(),this._PointFly.setPointFly({position:this.Navigate.getMousePosition(v),hideImage:!0,time:this._rotateFlyTime,pitch:je.toDegrees(this._Viewer.camera.pitch)}))},Ki.RIGHT_CLICK)}else this.cursorHandel&&this.cursorHandel.destroy(),this.cursorHandel=void 0,this.cursorPoint&&this.cursorPoint.remove(),this.cursorPoint=void 0};var e0t=Qh;function Sj(o){this.mEarthCtrl=o,this.coreMap=o.coreMap,this.trackInfos=[],this.timer=null,this.animationController=new vse,this.currIndex=-1,this.startTime=0,this.currentTrackInfo=null}function Fki(o,A){if(o.length===0)return null;let f=null;for(let m=0;m<o.length&&o[m].timeStamp<A;m++)f=o[m];return f}function Nki(o,A){A.type==="lookat"&&(console.log(A),A.duration===void 0&&(A.duration=4e3),o.coreMap.camera.flyTo({destination:A.position,orientation:A.orientation,duration:A.duration/1e3}))}Sj.prototype.initialize=function(o){let A=0,f=this;for(let m=0;m<o.length;m++){let C=o[m];C.type==="lookat"&&(C.timeStamp=A,A+=C.stopTime,f.trackInfos.push(C))}f.animationController.addListener(function(m){let C=new Date().getTime()-f.startTime,y=Fki(f.trackInfos,C);y!==f.currentTrackInfo&&(Nki(f.mEarthCtrl,y),f.currentTrackInfo=y)})};Sj.prototype.finalize=function(){this.animationController.finalize(),this.currentTrackInfo=null};Sj.prototype.play=function(){let o=this;o.currentTrackInfo=null,o.startTime=new Date().getTime(),o.animationController.start()};Sj.prototype.stop=function(){this.animationController.stop(),this.currentTrackInfo=null};var t0t=Sj;var Xue=1e-5*Math.PI/180,kki=11;function $v(o){this.mEarthCtrl=o,this._polylines=[],this._points=[],this.entities=this.mEarthCtrl.entities,this.camera=this.mEarthCtrl.coreMap.camera,this.scene=this.mEarthCtrl.coreMap.scene,this._interval=20}$v.prototype.createlineOfSight=function(o){let A=[],f=this,m=[],C=[],y={polyline:[]};f.objectsToExclude=null;let x,v=function(){function T(D){this.options={polyline:{show:!0,positions:[],material:At.YELLOW,width:3,clampToGround:!1}},this.positionsp=D,this._init()}return T.prototype._init=function(){let D=this,F=function(){return D.positionsp};this.options.polyline.positions=new Bn(F,!1),this.polyline=f.entities.add(this.options),f.item=this.polyline,C.push(this.polyline)},T}(),E=new Ur(f.scene.canvas),I=[],w;if(this._points.length>0)for(let T=0;T<this._points.length;T++)this.entities.remove(this._points[T]);let Q=[];E.setInputAction(function(T){let D,F=f.camera.getPickRay(T.position);if(D=f.scene.globe.pick(F,f.scene),f.scene.pick(T.position)){let R=f.scene.pickPosition(T.position);R&&(D=R)}if(!!D)if(I.length===0){I.push(D.clone(),D.clone());let R={leftX:T.position.x,leftY:T.position.y};Q.push(R),x=D.clone()}else{let R={rightX:T.position.x,rightY:T.position.y};Q.push(R);let k={postion:I,entity:C,cartesian:Q};m.push(k),Q=[],w=void 0,I=[],I.push(x.clone()),I.push(x.clone()),w=new v(I),A.push(w)}},Ki.LEFT_CLICK),E.setInputAction(function(T){let D,F=f.camera.getPickRay(T.endPosition);if(D=f.scene.globe.pick(F,f.scene),f.scene.pick(T.endPosition)){let R=f.scene.pickPosition(T.endPosition);R&&(D=R)}!D||I.length>=2&&(O(w)?D!==void 0&&(I.pop(),I.push(D)):(w=new v(I),A.push(w)))},Ki.MOUSE_MOVE);let M=0,B=0;return E.setInputAction(function(T){let D=f.entities.add(new UA);f.objectsToExclude=[D];let F=!0;for(let L=0;L<m.length;L++)if(L===0?(M=m[L].cartesian[0].leftX,B=m[L].cartesian[0].leftY,F=f.tsjx(m[L].postion,M,B,m[L].cartesian[1].rightX,m[L].cartesian[1].rightY,50,C)):F=f.tsjx(m[L].postion,M,B,m[L].cartesian[0].rightX,m[L].cartesian[0].rightY,50,C),F){let R=f.entities.add({name:"polyline1",polyline:{positions:m[L].postion,width:3,material:At.BLUE}});y.polyline.push(R)}else{let R=f.entities.add({name:"polyline1",polyline:{positions:m[L].postion,width:3,material:At.RED}});y.polyline.push(R)}I.pop(),f._polylines=y.polyline,E.destroy();for(let L=0;L<C.length;L++)f.entities.remove(C[L]);O(o)&&typeof o=="function"&&o(y)},Ki.RIGHT_CLICK),this};$v.prototype.tsjx=function(o,A,f,m,C,y,x){let v={gcs:[],min:0,max:0,juli:0,cys:y},E=this.getSpaceDistancem(o);E<=100&&E>=10?y=parseInt(E/2):E<10&&E>0?y=parseInt(E/1):E>100&&(y=parseInt(E/10)),v.cys=y;let I=o[0],w=o[o.length-1],Q=Kt.fromCartesian(I),M=je.toDegrees(Q.longitude),B=je.toDegrees(Q.latitude),T=Q.height,D=Kt.fromCartesian(w),F=je.toDegrees(D.longitude),L=je.toDegrees(D.latitude),R=D.height,k=y,U=je.lerp(M,F,1/k)-M,V=je.lerp(B,L,1/k)-B,H=je.lerp(T,R,1/k)-T,q=!0,ie,Z;for(let oe=0;oe<k-2;oe++){let ne=M+(oe+1)*U,se=B+(oe+1)*V,ce=T+(oe+1)*H;ie=ee.fromDegrees(ne,se,ce),Z=Kt.fromCartesian(ie);let j=this.scene.globe.getHeight(Z),de=this.scene.sampleHeight(Z,x);if(de&&(j=de),j=parseFloat(j.toFixed(1)),ce=parseFloat(ce.toFixed(1)),j>ce)return q=!1,q}return q};$v.prototype.getSpaceDistancem=function(o){let A=0;for(let f=0;f<o.length-1;f++){let m=Kt.fromCartesian(o[f]),C=Kt.fromCartesian(o[f+1]),y=new l0;y.setEndPoints(m,C);let x=y.surfaceDistance;x=Math.sqrt(Math.pow(x,2)+Math.pow(C.height-m.height,2)),A=A+x}return A.toFixed(2)};$v.prototype.deleteObject=function(){if(this._points.length>0){this.objectsToExclude=null;for(let o=0;o<this._points.length;o++)this.entities.remove(this._points[o])}};$v.prototype.InterpolateLineCartographic=function(o,A,f){if(!(o&&A)||!(o.longitude&&o.latitude&&A.longitude&&A.latitude))return null;let m=[];m.push(new Kt(o.longitude,o.latitude));let C=Math.sqrt(Math.pow(A.longitude-o.longitude,2)+Math.pow(A.latitude-o.latitude,2)),y=f&&typeof f=="number"?f:Xue;if(C<=y)return m.push(new Kt(A.longitude,A.latitude)),m;let x=C/y,v=(A.longitude-o.longitude)/x,E=(A.latitude-o.latitude)/x;for(let I=0;I<x;I++){let w=o.longitude+(I+1)*v,Q=o.latitude+(I+1)*E;m.push(new Kt(w,Q))}return m.push(new Kt(A.longitude,A.latitude,A.height)),m};$v.prototype.InterpolateLineCartographicxp=function(o,A,f){if(!(o&&A)||!(o.longitude&&o.latitude&&A.longitude&&A.latitude))return null;let m=[];m.push(new Kt(o.longitude,o.latitude));let C=Math.sqrt(Math.pow(A.longitude-o.longitude,2)+Math.pow(A.latitude-o.latitude,2)),y=f&&typeof f=="number"?f:Xue;if(C<=y)return m.push(new Kt(A.longitude,A.latitude)),m;let x=C/y,v=(A.longitude-o.longitude)/x,E=(A.latitude-o.latitude)/x,I=(A.height-o.height)/x;for(let w=0;w<x;w++){let Q=o.longitude+(w+1)*v,M=o.latitude+(w+1)*E,B=o.height+I*(w+1);m.push(new Kt(Q,M,B))}return m.push(new Kt(A.longitude,A.latitude,A.height)),m};$v.prototype.InterpolateLineHeightCartographic=function(o,A){if(!(o&&A)||!(o.longitude&&o.latitude&&A.longitude&&A.latitude))return null;let f=[];f.push(new Kt(o.longitude,o.latitude,o.height));let m=Math.sqrt(Math.pow(A.longitude-o.longitude,2)+Math.pow(A.latitude-o.latitude,2));if(m<=Xue)return f.push(new Kt(A.longitude,A.latitude,A.height)),f;let C=m/Xue,y=(A.longitude-o.longitude)/C,x=(A.latitude-o.latitude)/C,v=(A.height-o.height)/C;for(let E=0;E<C;E++){let I=o.longitude+(E+1)*y,w=o.latitude+(E+1)*x,Q=o.height+(E+1)*v;f.push(new Kt(I,w,Q))}return f.push(new Kt(A.longitude,A.latitude,A.height)),f};$v.prototype.InterpolateIndexLineHeightCartographic=function(o,A,f,m){if(!(o&&A)||!(o.longitude&&o.latitude&&A.longitude&&A.latitude))return null;let C=(A.longitude-o.longitude)/f,y=(A.latitude-o.latitude)/f,x=(A.height-o.height)/f,v=o.longitude+m*C,E=o.latitude+m*y,I=o.height+m*x;return new Kt(v,E,I)};$v.prototype.InterpolateIndexLineHeightCartographicxp=function(o,A,f,m){if(!(o&&A)||!(o.longitude&&o.latitude&&A.longitude&&A.latitude))return null;let C=(A.longitude-o.longitude)/f,y=(A.latitude-o.latitude)/f,x=(A.height-o.height)/f,v=o.longitude+m*C,E=o.latitude+m*y,I=o.height+m*x;return new Kt(v,E,I)};$v.prototype.Interpolate2IndexLineHeightCartographic=function(o,A,f,m){if(!(o&&A)||!(o.longitude&&o.latitude&&A.longitude&&A.latitude))return null;let C=[];C.push(new Kt(o.longitude,o.latitude,o.height));let y=(A.longitude-o.longitude)/f,x=(A.latitude-o.latitude)/f,v=(A.height-o.height)/f;for(let E=0;E<m;E++){let I=o.longitude+(E+1)*y,w=o.latitude+(E+1)*x,Q=o.height+(E+1)*v;C.push(new Kt(I,w,Q))}return C};$v.prototype.CartographicPointsTerrainData=function(o,A){if(o.length&&o.length>0){let f=gJ(this.scene.terrainProvider,kki,o);(void 0)(f,function(m){A(m)})}};$v.prototype.setVisibility=function(o){if(this._polylines.length>0)for(let A=0;A<this._polylines.length;A++)this._polylines[A].show=o};$v.prototype.deleteObject=function(){if(this._polylines.length>0)for(let o=0;o<this._polylines.length;o++)this.entities.remove(this._polylines[o])};Object.defineProperties($v.prototype,{sight:{get:function(){return this.item.sight},set:function(o){this.item.sight=o}}});var i0t=$v;function Dj(o){this.mEarthCtrl=o,this.coreMap=o.coreMap,this.shadowMap=null}Dj.prototype.initialize=function(o){let A=new Ml(this.coreMap.scene);A.setView({destination:o.destination,orientation:o.orientation}),A.frustum.fov=o.fov||Math.PI/3,A.frustum.near=o.near||1,A.frustum.far=o.far||1e5,A.frustum.aspectRatio=o.aspect||1;let f=new xQ({context:this.coreMap.scene.context,lightCamera:A,enabled:o.enabled||!0,isPointLight:!1,cascadesEnabled:!1,numberOfCascades:1,frustum:{fov:o.fov||Math.PI/3,near:o.near||1,far:o.far||1e5,aspectRatio:o.aspect||1},depthBias:o.depthBias});f.castTexture=o.castTexture,this.shadowMap=f,o.addToMap===!0&&this.addToMap()};Dj.prototype.addToMap=function(){this.shadowMap!==null&&this.mEarthCtrl.shadowMapList.push(this.shadowMap)};Dj.prototype.setEnable=function(o){this.shadowMap!==null&&(this.shadowMap.enabled=o)};Dj.prototype.remove=function(){if(this.shadowMap!==null)for(let o=0;o<this.mEarthCtrl.shadowMapList.length;o++){let A=this.mEarthCtrl.shadowMapList[o];this.shadowMap===A&&this.mEarthCtrl.shadowMapList.splice(o,1)}};var r0t=Dj;var n0t=`precision mediump float;\r
`;let v=C.getFragmentShaderCallback(y,o._diffuseAttributeOrUniformName[m],!1);return A.defined(v)?v(f):f}}function bki(o,A){let f=o._batchTable;return o._batchTable.featuresLength===0?function(m){let C={u_inverseElevationMatrix:function(y){let x=o._model,v=typeof x._elevationMatrix;if(v==="undefined")return A.Matrix4.IDENTITY;if(v==="function"?x._uniformInverseElevationMatrix=x._elevationMatrix(x._uniformInverseElevationMatrix):A.Matrix4.clone(x._elevationMatrix,x._uniformInverseElevationMatrix),A.Matrix4.inverse(x._uniformInverseElevationMatrix,x._uniformInverseElevationMatrix),x._rtcCenter){let E=new A.Matrix4,I=A.Matrix4.fromTranslation(x._rtcCenter,E);A.Matrix4.multiply(x._uniformInverseElevationMatrix,I,x._uniformInverseElevationMatrix)}return x._uniformInverseElevationModelMatrix||(x._uniformInverseElevationModelMatrix=new A.Matrix4),y&&y.model?(x._uniformInverseElevationModelMatrix=A.Matrix4.multiply(x._uniformInverseElevationMatrix,y.model,x._uniformInverseElevationModelMatrix),x._uniformInverseElevationModelMatrix):A.Matrix4.IDENTITY}};return A.combine(m,C)}:function(m){let C={tile_batchTexture:function(){return defaultValue(f._batchTexture.batchTexture,f._batchTexture.defaultTexture)},tile_textureDimensions:function(){return f._batchTexture.textureDimensions},tile_textureStep:function(){return f._batchTexture.textureStep},tile_colorBlend:function(){return getColorBlend(f)},tile_pickTexture:function(){return f._batchTexture.pickTexture},u_inverseElevationMatrix:function(y){let x=o._model,v=typeof x._elevationMatrix;if(v==="undefined")return A.Matrix4.IDENTITY;if(v==="function"?x._uniformInverseElevationMatrix=x._elevationMatrix(x._uniformInverseElevationMatrix):A.Matrix4.clone(x._elevationMatrix,x._uniformInverseElevationMatrix),A.Matrix4.inverse(x._uniformInverseElevationMatrix,x._uniformInverseElevationMatrix),x._rtcCenter){let E=new A.Matrix4,I=A.Matrix4.fromTranslation(x._rtcCenter,E);A.Matrix4.multiply(x._uniformInverseElevationMatrix,I,x._uniformInverseElevationMatrix)}return x._uniformInverseElevationModelMatrix||(x._uniformInverseElevationModelMatrix=new A.Matrix4),x._uniformInverseElevationModelMatrix=A.Matrix4.multiply(x._uniformInverseElevationMatrix,y.model,x._uniformInverseElevationModelMatrix),x._uniformInverseElevationModelMatrix}};return A.combine(m,C)}}function Qki(o){this._size=o.size,this._datatype=o.datatype,this.getValue=o.getValue}function Ski(o,A,f){try{let m=f.Ellipsoid.WGS84,C=m.scaleToGeodeticSurface(o);return A=f.Transforms.eastNorthUpToFixedFrame(C,m,A),A}catch{return f.Matrix4.clone(f.Matrix4.IDENTITY,A)}}function Dki(o){o.AutomaticUniforms.czm_seWaterHeight||(o.AutomaticUniforms.czm_seWaterHeight=new Qki({size:1,datatype:o.WebGLConstants.FLOAT,getValue:function(f){return f.seWaterHeight?f.seWaterHeight:-5e3}}),o.ShaderSource._czmBuiltinsAndUniforms.czm_seWaterHeight="uniform float czm_seWaterHeight;");var A=o.Cesium3DTileset.prototype.update;o.Cesium3DTileset.prototype.update=function(f){A.call(this,f),this.show&&this.ready&&(this._autoElevationMatrix=Ski(this.boundingSphere.center,this._autoElevationMatrix,o))},o.Cesium3DTileContentFactory.b3dm=function(f,m,C,y,x){if(f.enableModelExperimental)return o.ModelExperimental3DTileContent.fromB3dm(f,m,C,y,x);let v=new o.Batched3DModel3DTileContent(f,m,C,y,x);return v._model instanceof o.ClassificationModel||(v._model._elevationMatrix=function(E){let I=f._elevationMatrix||f._autoElevationMatrix||o.Matrix4.IDENTITY;return E=o.Matrix4.clone(I,E),E},v._model._uniformMapLoaded=bki(v,o),v._model._vertexShaderLoaded=Bki(v,o),v._model._fragmentShaderLoaded=wki(v,o)),v},o.ShaderProgram.prototype._setUniforms=function(f,m,C){let y,x;if(o.defined(f)){let I=this._manualUniforms;for(y=I.length,x=0;x<y;++x){let w=I[x];w.value=f[w.name](m)}}let v=this._automaticUniforms;for(y=v.length,x=0;x<y;++x){let I=v[x];I.uniform.value=I.automaticUniform.getValue(m)}let E=this._uniforms;for(y=E.length,x=0;x<y;++x)E[x].set();if(C){let I=this._gl,w=this._program;I.validateProgram(w)}}}function Tki(o,A){let f=o.baseWaterColor||new A.Color(.2,.3,.6,1),m=o.blendColor||new A.Color(.5,.5,.5,.7),C=o.animationSpeed||.05,y=o.amplitude||2,x=o.frequency||5e3,v=o.specularIntensity||.5,E=o.fadeFactor||1,I=o.sizeAndVelocity||new A.Cartesian4(100,100,10,0),w=o.width||316,Q=o.height||316;Dki(A),A.Material._materialCache.addMaterial("SEWater",{fabric:{type:"SEWater",uniforms:{baseWaterColor:f,blendColor:m,specularMap:A.Material.DefaultImageId,normalMap:A.Material.DefaultImageId,frequency:x,animationSpeed:C,amplitude:y,specularIntensity:v,fadeFactor:E,sizeAndVelocity:I},source:xgt},translucent:function(M){var B=M.uniforms;return B.baseWaterColor.alpha<1||B.blendColor.alpha<1}})}vB.prototype._createDebugView=function(){let o=this._cesium.Material.fromType("Image"),A=new this._cesium.ViewportQuad(new this._cesium.BoundingRectangle(0,100,300,300));A.material=o,this._debugViewportQuad=this._scene.primitives.add(A);let f=this._getWaterReflectTexture();f&&(o.uniforms.image=f)};vB.prototype.debugShow=function(o){this._debugViewportQuad.show=o};vB.prototype.isDebugShow=function(){return this._debugViewportQuad.show};vB.prototype._getWaterReflectTexture=function(){return this._wTexture._colorTexture};vB.prototype._getWaterReflectTextureChangedEvent=function(){return this._wTexture._textureChangedEvent};vB.prototype._createWaterMaterial=function(){var o=new this._cesium.Material({fabric:{type:"SEWater",uniforms:{specularMap:this._cesium.buildModuleUrl("Assets/Textures/waterNormals.jpg"),normalMap:this._cesium.buildModuleUrl("Assets/Textures/waterNormals.jpg"),frequency:this._option.frequency,animationSpeed:this._option.animationSpeed,amplitude:this._option.amplitude,width:this._option.width,height:this._option.height}}});let A=this;return o._uniforms.specularMap_0=function(){return A._wTexture._colorTexture||A._scene.context.defaultTexture},o};vB.prototype.createWaterPolygonPrimitive=function(o){let A=this,f=this._scene,m=null,C=null;if(o.type==0)m=this._cesium.PolygonGeometry.fromPositions({vertexFormat:this._cesium.MaterialAppearance.MaterialSupport.ALL.vertexFormat,positions:o.positions}),C=f.groundPrimitives.add(new this._cesium.GroundPrimitive({geometryInstances:new this._cesium.GeometryInstance({geometry:m}),appearance:new this._cesium.MaterialAppearance({materialSupport:this._cesium.MaterialAppearance.MaterialSupport.ALL}),classificationType:this._cesium.ClassificationType.BOTH})),C.appearance.material=this._createWaterMaterial();else if(o.type==1)m=this._cesium.CoplanarPolygonGeometry.fromPositions({vertexFormat:this._cesium.MaterialAppearance.MaterialSupport.ALL.vertexFormat,positions:o.positions}),C=f.primitives.add(new this._cesium.Primitive({geometryInstances:new this._cesium.GeometryInstance({geometry:m}),appearance:new this._cesium.MaterialAppearance({materialSupport:this._cesium.MaterialAppearance.MaterialSupport.ALL})})),C.appearance.material=this._createWaterMaterial();else if(o.type==2){let x=new this._cesium.GeometryInstance({geometry:o.geometry});C=f.primitives.add(new this._cesium.Primitive({geometryInstances:x,appearance:new this._cesium.EllipsoidSurfaceAppearance({material:this._createWaterMaterial()}),asynchronous:!1}))}C.appearance.material.uniforms.sizeAndVelocity.x=o.width,C.appearance.material.uniforms.sizeAndVelocity.y=o.height,C.radius=.5*Math.max(o.width,o.height),C.centerPos=o.center;let y=this._cesium.Cartographic.fromCartesian(o.center);return C.waterHeight=y.height,this._trackPrimitive(C),C};vB.prototype._trackPrimitive=function(o){this._trackedPrimitives.indexOf(o)<0&&this._trackedPrimitives.push(o)};vB.prototype.destroyWaterPolygonPrimitive=function(o){this._trackedPrimitives.indexOf(o)>=0&&(this._untrackPrimitive(o),this._scene.primitives.contains(o)&&this._scene.primitives.remove(o),this._scene.groundPrimitives.contains(o)&&this._scene.groundPrimitives.remove(o))};vB.prototype._untrackPrimitive=function(o){let A=this._trackedPrimitives.indexOf(o);A!=-1&&this._trackedPrimitives.splice(A,1)};vB.prototype.isDestroyed=function(){return!1};vB.prototype.destroy=function(){return this._disposeListener&&(this._disposeListener(),this._disposeListener=null),this._wTexture&&(this._wTexture.destroy(),this._wTexture=null),this._trackedPrimitives=[],this._cesium.destroyObject(this)};var Tgt=vB;function ir(o,A){if(this._viewer=o,this._cesium=A,this._core=new pr(o,A),this._Label=new XP(this._viewer,this._cesium),this._Circle=new G2(this._viewer,this._cesium),this._Box=new ZP(this._viewer,this._cesium),this._Cone=new yI(this._viewer,this._cesium),this._Color=new Pn(this._viewer,this._cesium),this._Polyline=new Ey(this._viewer,this._cesium),this._Rectangle=new $P(this._viewer,this._cesium),this._Polygon=new BC(this._viewer,this._cesium),this._ImageLabel=new KN(this._viewer,this._cesium),this._GeoJsonFeatureLayer=new df(this._viewer,this._cesium,this._ImageryProvidererid),this._Ellipsoid=new YN(this._viewer,this._cesium),this._PointModel=new GQ(this._viewer,this._cesium),this._wall=new n4(this._viewer,this._cesium),this._Terrain=new iR(this._viewer,this._cesium),this._createdynamicObject=new Oue(this._viewer,this._cesium),this._GeometryCreator,this._ImageryLayer=new eR(this._viewer,this._cesium),this._VolumeGeoJsonFeatureLayer=void 0,this._PolygonVectorGeoJsonFeatureLayer=void 0,this._skyBox=new Dft(this._viewer,this._cesium),this._flowField=new Tft(this._viewer,this._cesium),this._canvasField=new Gft(this._viewer,this._cesium),this.VectorGeoJsonFeatureLayer=new Wf(this._viewer,this._cesium),this._straightArrow=new qft(this._viewer,this._cesium),this._SimpleGraphic=new Sue(this._viewer,this._cesium),this._popupmessage=new UQ(this._viewer,this._cesium),this._VectorImgFeatureLayer=ngt,this._TerrainModifier=new ogt(this._viewer,this._cesium),!A.Resource._Implementations.createImageSGS){var f=new B2({workerPath:window.SmartEarthRootUrl+"/Workers/nullValueRemoveWorker.js"},this._cesium);A.Resource._Implementations.createImageSGS=function(m,C,y){var x=8,v={r:0,g:0,b:0,a:255};if(m.indexOf("nullvalue=")>-1){var E=m.split("nullvalue=")[1].split("&")[0],I=E.split("%2C");v.r=I[0],v.g=I[1],v.b=I[2]}if(m.indexOf("nulltolerance=")>-1)var w=m.split("nulltolerance=")[1].split("&")[0];var Q=new Image,M=document.createElement("canvas"),B=M.getContext("2d");Q.url=m,Q.onload=function(){if(Q.url!=null&&Q.url.indexOf("nullvalue")!=-1){delete Q.url,M.width=Q.width,M.height=Q.height,B.drawImage(Q,0,0),Q.imageProcesses=[];for(var T=Q.width/x,D=Q.height,F=0,L=0;L<x;L++){var R=L*T,k=B.getImageData(R,F,T,D).data;Q.imageProcesses[L]=f.queueWorkItem({nullValue:v,nullTolerance:w,canvasData:k,width:T,height:D,startX:R})}Cesium.when.all(Q.imageProcesses,function(U){for(var V=0;V<U.length;V++){for(var H=B.createImageData(U[V].width,U[V].height),q=0;q<U[V].canvasData.length;q++)H.data[q]=U[V].canvasData[q];B.putImageData(H,U[V].startX,0)}Q.src=M.toDataURL(),y.resolve(Q)}).otherwise(function(U){console.log(U)})}else y.resolve(Q)},Q.onerror=function(T){y.reject(T)},C&&(Cesium.TrustedServers.contains(m)?Q.crossOrigin="use-credentials":Q.crossOrigin=""),Q.src=m}}}ir.prototype.create3DTilesets=function(o,A,f,m,C,y,x){var v=this._D3Tileset.create3DTilesets(o,A,f,m,C,y,x);return this._D3Tilesets||(this._D3Tilesets=[],this._SE3DTilesets=new Map),this._SE3DTilesets.set(v.treeobj.id,v),this._D3Tilesets.push(v.item),v};ir.prototype.set3DTilesetsAlpha=function(o){this._D3Tilesets&&this._D3Tilesets.forEach(A=>{o==0?A.style=new this._cesium.Cesium3DTileStyle({show:!1}):o==1?A.style=new this._cesium.Cesium3DTileStyle({show:!0}):A.style=new this._cesium.Cesium3DTileStyle({color:`color('rgba(255,255,255,${o})')`})})};ir.prototype.createTerrainModifier=function(o,A,f){return this._TerrainModifier.createTerrainModifier(o,A,f)};ir.prototype.createS3MLayer=function(o,A={},f){return A instanceof this._cesium.Scene&&(A={scene:A}),new Lae({url:o,...A},f,this._cesium)};ir.prototype.createWaterPolygonLayer=function(o={}){return new Agt(this._viewer,this._cesium).createPolygonLayer(o)};ir.prototype.createWaterPolygon=function(o={}){return new Tgt(o,this._viewer.scene,this._cesium).createWaterPolygonPrimitive(o)};ir.prototype.createCloudMap=function(o,A,f,m){var C=new BC(this._viewer,this._cesium);return C.createCloudMap(o,A,f,m)};ir.prototype.addVideoPolygon=function(o,A){var f=new BC(this._viewer,this._cesium);return f.addVideoPolygon(o,A)};ir.prototype.addVideoBox=function(o,A){var f=new BC(this._viewer,this._cesium);return f.addVideoPlane(o,A)};ir.prototype.CZML=function(o,A,f){return new Zft(this._viewer,this._cesium).addCZML(o,A,f)};ir.prototype.addHeatMap=function(o,A){return new tgt(this._viewer,this._cesium).addHeatMap(o,A)};ir.prototype.militaryPlotting=function(o,A,f,m){var C=this._straightArrow,y=null;let x,v;f?typeof f=="function"?(x={},v=f):(x=f,v=m):x={};let E=I=>{x.removeEdit&&C.MilitaryStandardObj.pop(),C.defaultEdit(),v&&v(I)};switch(o){case"StraightArrow":var y=C.createStraightArrow(A,x,E);break;case"SwallowtailArrow":var y=C.createSwallowtailArrow(A,x,E);break;case"PincerArrow":var y=C.createPincerArrow(A,x,E);break;case"AttackArrow":var y=C.createAttackArrow(A,x,E);break;case"GatheringPlace":var y=C.createHandlerPolygon(A,x,E);break;case"RoundedRectangle":var y=C.createRoundedRectangle(A,x,E);break;case"Sector":var y=C.createSector(A,x,E);break;case"Bow":var y=C.createBow(A,x,E);break;case"Bezierline":var y=C.createBezierline(x,E);break;case"BezierArrow":var y=C.createBezierArrow(x,E);break;default:break}return y};ir.prototype.MilitaryCopy=function(o){var A=this._straightArrow,f=A.copyJb(o);return f};ir.prototype.NightMode=function(o){let A=this._viewer,f=A.imageryLayers.length,m,C;o?(m=.15,C=.15):(m=1,C=1);for(let y=0;y<f;y++)A.imageryLayers.get(y).brightness=m;this._D3Tilesets&&this._D3Tilesets.forEach(y=>{y.imageBasedLightingFactor.x=C,y.imageBasedLightingFactor.y=C}),A.scene.skyAtmosphere.show=!o};ir.prototype.SaveMilitaryStandard=function(){var o=this._straightArrow;o.save()};ir.prototype.OpenMilitaryStandard=function(o){var A=this._straightArrow;A.open(o)};ir.prototype.ClearMilitaryStandard=function(){var o=this._straightArrow;o.clear()};ir.prototype.getEntityById=function(o){var A=this._straightArrow,f=A.getEntityById(o);return f};ir.prototype.startModify=function(o){var A=this._straightArrow;A.edit(o)};ir.prototype.createSimpleGraphic=function(o,A,f){return this._SimpleGraphic.createSimpleGraphic(o,A,f)};ir.prototype.addSimpleGraphic=function(o,A,f){return this._SimpleGraphic.addSimpleGraphic(o,A,f)};ir.prototype.GeoWTFS=function(o){return this._TdtLabel||(this._TdtLabel=new cgt(this._viewer,this._cesium)),this._TdtLabel.GeoWTFS(o)};ir.prototype.Video3D=function(o){return new lgt(this._viewer,this._cesium).Video3D(o)};ir.prototype.addRotateEffectCircle=function(o){return new RPe(this._viewer,this._cesium).createRotateCircle(o)};ir.prototype.addTetrahedron=function(o){return new Cgt(this._viewer,o,this._cesium)};ir.prototype.addTrafficLight=function(o){return this._TrafficLight||(this._TrafficLight=new ygt(this._viewer,this._cesium)),this._TrafficLight.add(o)};ir.prototype.addDRWEffectCircle=function(o){return new RPe(this._viewer,this._cesium).createDRWCircle(o)};ir.prototype.addEffectCylinder=function(o){return new LPe(this._viewer,this._cesium).createCylinder(o)};ir.prototype.addEffectCone=function(o){return new LPe(this._viewer,this._cesium).createCone(o)};ir.prototype.createGeoJsonFeatureLayerProviderOptimization=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VolumeVectorGeoJsonFeatureLayerOptimization(o,A,f,m,C,y)};ir.prototype.createGeoJsonFeatureLayerProviderGisOptimization=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VolumeVectorGeoJsonFeatureLayerGisOptimization(o,A,f,m,C,y)};ir.prototype.VolumeVectorGeoJsonFeatureLayerGis=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VolumeVectorGeoJsonFeatureLayerGis(o,A,f,m,C,y)};ir.prototype.PointVectorGeoJsonFeatureLayerGis=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.PointVectorGeoJsonFeatureLayerGis(o,A,f,m,C,y)};ir.prototype.PolylineVectorGeoJsonFeatureLayerGis=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.PolylineVectorGeoJsonFeatureLayerGis(o,A,f,m,C,y)};ir.prototype.createGeoJsonFeatureLayerProviderClassOptimization=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VolumeVectorGeoJsonFeatureLayerClassOptimization(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerDthOptimization=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VolumeVectorGeoJsonFeatureLayerOptimization1(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerDthOptimizationtest=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayerDthOptimization(o,A,f,m,C,y)};ir.prototype.VolumeVectorGeoJsonFeatureLayerOptimizationGroundtest=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VolumeVectorGeoJsonFeatureLayerOptimizationGroundtest(o,A,f,m,C,y)};ir.prototype.VolumeVectorGeoJsonFeatureLayerOptimizationtest=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VolumeVectorGeoJsonFeatureLayerOptimizationtest(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerJCDthOptimization=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayerJCDthOptimization(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerJCDthOptimizationxp=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayerJCDthOptimizationxp(o,A,f,m,C,y)};ir.prototype.createHistogramVectorGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createHistogramVectorGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createLaycolorVectorGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLaycolorVectorGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createVector3DTilesFeatureLayer=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVector3DTilesFeatureLayer(o,A,f,m,C,y)};ir.prototype.createVector3DTilesFeatureLayerRelease=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVector3DTilesFeatureLayerRelease(o,A,f,m,C,y)};ir.prototype.createGeojsonImage=function(o){var A=new Wf(this._viewer,this._cesium);return A.createGeojsonImage(o)};ir.prototype.createGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.VectorGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createGeojsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createGeojsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createGeojsonKmlFeatureLayer=function(o,A,f,m,C){var y=new df(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,y.createGeojsonKmlFeatureLayer(o,A,f,m,C)};ir.prototype.sfsterrainprovider=function(o,A,f,m,C){var y=new iR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,y.createSFSTerrain(o,A,f,m,C)};ir.prototype.createWMTSTerrain=function(o,A,f,m,C){var y=new iR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,y.createWMTSTerrain(o,A,f,m,C)};ir.prototype.sfsterrainprovider71=function(o,A,f,m,C){var y=new iR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,y.createSFSTerrain71(o,A,f,m,C)};ir.prototype.createTerrain=function(o,A,f,m,C){var y=new iR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,y.createTerrain(o,A,f,m,C)};ir.prototype.createTerrainLayer=function(o,A,f,m,C,y){var x=new iR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,x.createTerrainLayer(o,A,f,m,C,y)};ir.prototype.createArcGISTerrain=function(o,A,f,m,C){var y=new iR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,y.createArcGISTerrain(o,A,f,m,C)};ir.prototype.createCesiumTerrain=function(o,A,f,m){var C=new iR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,C.createCesiumTerrain(o,A,f,m)};ir.prototype.getFlyData=function(o,A){this._createdynamicObject.getFlyData(o,A)};ir.prototype.createDynamicObject=function(o,A,f){return this._createdynamicObject.Start(o,A,f)};ir.prototype.addmodle=function(o){return this._createdynamicObject.addmodle(o)};ir.prototype.createSatelliteTrail=function(o){return new rgt(this._viewer,this._cesium).createSatelliteTrail(o)};ir.prototype.executePauseFly3DPaths=function(){return this._createdynamicObject.executePauseFly3DPaths()};ir.prototype.executePlayForwardFly3DPaths=function(){return this._createdynamicObject.executePlayForwardFly3DPaths()};ir.prototype.executePlayReverseFly3DPaths=function(){return this._createdynamicObject.executePlayReverseFly3DPaths()};ir.prototype.executeSignout=function(){return this._createdynamicObject.executeSignout()};ir.prototype.createLabel=function(o,A,f,m,C){var y=new XP(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createLabel(o,A,f,m,C)};ir.prototype.createPosition=function(o,A,f){var m=new pPe(this._viewer,this._cesium);return m.createPosition(o,A,f)};ir.prototype.createLocation=function(o,A,f){return this._Point.createLocation(o,A,f)};ir.prototype.createPoint=function(o,A,f,m,C,y){return this._Point.createPoint(o,A,f,m,C,y)};ir.prototype.createLonlat=function(o){return this._Point.createLonlat(o)};ir.prototype.createDivPoint=function(o,A,f){return new yue(this._viewer,this._cesium).createDivPoint(o,A,f)};ir.prototype.createRichTextPoint=function(o,A,f,m){return this._Point.createRichTextPoint(o,A,f,m)};ir.prototype.SkyBox=function(o,A){return this._skyBox.SkyBox(o,A)};ir.prototype.setSpaceBackground=function(o){return this._skyBox.setSpaceBackground(o)};ir.prototype.createWindField=function(o,A){return this._flowField.createWindField(o,A)};ir.prototype.createField=function(o,A){return this._canvasField.createField(o,A)};ir.prototype.createRoad=function(o={}){return new Jft(this._viewer,this._cesium).createRoad(o)};ir.prototype.createTrailLinePath=function(o,A,f){return this._trailLine.createPath(o,A,f)};ir.prototype.createFlyingLine=function(o,A){return this._trailLine.createFlyingLine(o,A)};ir.prototype.createTrailLineWall=function(o,A){return this._trailLine.createWall(o,A)};ir.prototype.createTrailLine=function(o,A){return this._trailLine.createLine(o,A)};ir.prototype.createModel=function(o,A,f,m,C,y){var x=new GQ(this._viewer,this._cesium);return x.createModel(o,A,f,m,C,y)};ir.prototype.createModelEditable=function(o,A,f,m,C,y){var x=new GQ(this._viewer,this._cesium);return x.createModelEditable(o,A,f,m,C,y)};ir.prototype.createPointModel=function(o,A){return this._PointModel.createPointModel(o,A)};ir.prototype.executePolyline=function(o){var A=new Ey(this._viewer,this._cesium);return A.executePolyline(o)};ir.prototype.executePolygon=function(o){var A=new BC(this._viewer,this._cesium);return A.executePolygon(o)};ir.prototype.executeWall=function(o,A){var f=new n4(this._viewer,this._cesium);return f.executeWall(o,A)};ir.prototype.createWall=function(o,A,f,m){var C=new n4(this._viewer,this._cesium);return C.createWall(o,A,f,m)};ir.prototype.executePolyline1=function(o){var A=new Ey(this._viewer,this._cesium);return A.executePolyline1(method)};ir.prototype.createPolylineVolume=function(o,A,f,m,C){var y=new Fue(this._viewer,this._cesium);return y.createPolylineVolume(o,A,f,m,C)};ir.prototype.createCorridor=function(o,A,f,m){var C=new gft(this._viewer,this._cesium);return C.createCorridor(o,A,f,m)};ir.prototype.addViewCone=function(o){return new lj(this._viewer,this._cesium).addViewCone(o)};ir.prototype.createViewCone=function(o,A){return new lj(this._viewer,this._cesium).createViewCone(o,A)};ir.prototype.createModifyMesh=function(o,A,f,m,C){return this.createModelClipping(m,{type:"polygon",isInner:!0,positions:A})};ir.prototype.createModelClipping=function(o,A){var f=new Xft(this._viewer,this._cesium);return f.addClipping(o,A)};ir.prototype.createModelModifier=function(o,A,f,m){let C=[];return this._D3Tilesets&&this._D3Tilesets.forEach((y,x)=>{let v=this.createModifyMesh(o,A,f,y,m);C.push(v)}),{remove:()=>{C.forEach((y,x)=>{y.remove()}),C=[]}}};ir.prototype.createPopupMessage=function(o){var A=new UQ(this._viewer,this._cesium);return A.createPopupMessage(o)};ir.prototype.createMeasurement=function(o){var A=new UQ(this._viewer,this._cesium);return A.createMeasurement(o)};ir.prototype.createPlotting=function(o){var A=new UQ(this._viewer,this._cesium);return A.createPlotting(o)};ir.prototype.createPopupProp=function(o,A){return this._popupmessage.createPopupProp(o,A)};ir.prototype.createModelLibrary=function(o){return this._popupmessage.createModelLibrary(o)};ir.prototype.createHawkeye=function(o,A){var f=new jft(this._viewer,this._cesium);return f.createHawkeye(o,A)};ir.prototype.createGeoJsonFeatureLayer=function(o,A,f,m,C){var y=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createBillboardGeoJsonFeature=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createBillboardGeoJsonFeature(o,A,f,m,C,y)};ir.prototype.createBillboardPointGeoJsonFeatureLayer=function(o,A,f,m,C){var y=new ej(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createBillboardPointGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createKmlLayer=function(o,A,f){var m=new TPe(this._viewer,this._cesium);return m.createKmlLayer(o,A,f)};ir.prototype.addKmlLayer=function(o,A,f,m){var C=new TPe(this._viewer,this._cesium);return C.addKmlLayer(o,A,f,m)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerArcgis=function(o,A,f,m,C){var y=new bue(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createVolumeVectorGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createBillboardGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new ej(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createBillboardGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createPointGeojsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPointGeojsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createModelGeojsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createModelGeojsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createCirclePointGeoJsonFeatureLayer=function(o,A,f,m,C){var y=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createCirclePointGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createModelPointGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createModelPointGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createPrimitivLabelPointGeoJsonFeatureLayer=function(o,A,f,m,C){var y=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createLabelPointGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createLabelPointGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLabelPointGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createSXTLabelGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createSXTLabelGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createCustomCallbackGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y,x){var v=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,v.createCustomCallbackGeoJsonFeatureLayerProvider(o,A,f,m,C,x,y)};ir.prototype.createLabelPolymerizationGeoJsonFeatureLayer=function(o,A,f,m,C){var y=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createLabelPolymerizationGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createPointPolymerizationGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPointPolymerizationGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createLabelpolymerizationGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLabelpolymerizationGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createLabelpolymerizationGeoJsonFeatureLayers=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLabelpolymerizationGeoJsonFeatureLayers(o,A,f,m,C,y)};ir.prototype.createStreetscapeGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createStreetscapeGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createPrimitiveLabelGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLabelGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createLabelImageGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLabelImageGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createLabelImageGeoJsonFeatureLayerProvider1=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLabelImageGeoJsonFeatureLayerProvider1(o,A,f,m,C,y)};ir.prototype.createLabelRichtextGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new dI(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createLabelRichtextGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createModelGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createModelGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createPointGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new Wf(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPointGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createArcGisImageryLayer=function(o,A,f,m,C,y){var x=new eR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,x.createArcGisImageryLayer(o,A,f,m,C,y)};ir.prototype.createImageryLayerGrid=function(o){var A=new eR(this._viewer,this._cesium);return A.createImageryLayerGrid(o)};ir.prototype.createWebMapServerImageLayer=function(o,A,f,m,C,y){var x=new eR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,x.createWebMapServerImageLayer(o,A,f,m,C,y)};ir.prototype.createWebMapTileServerImageLayer=function(o,A,f,m,C,y){var x=new eR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,x.createWebMapTileServerImageLayer(o,A,f,m,C,y)};ir.prototype.createUrlTemplateImageryProvider=function(o,A,f,m,C,y){var x=new eR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,x.createUrlTemplateImageryProvider(o,A,f,m,C,y)};ir.prototype.createCirclePointGeoJsonFeatureLayer=function(o,A,f,m,C){var y=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createCirclePointGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createPolylineGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolylineGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createPrimitivePolylineGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new $O(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolylineGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createPrimitiveGroundPolylineGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new $O(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createGroundPolylineGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.exectPointModel=function(o,A,f,m,C,y){var x=new GQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.exectPointModel(o,A,f,m,C,y)};ir.prototype.createPolygonModel=function(o,A,f,m,C,y){var x=new GQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolygonModel(o,A,f,m,C,y)};ir.prototype.modelMove=function(){var o=new GQ(this._viewer,this._cesium);return o.modelMove()};ir.prototype.createPrimitivePolylineVectorGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new $O(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolylineVectorGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createPolylineVectorGeoJsonFeatureLayerProviderModel=function(o,A,f,m,C,y){var x=new $O(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolylineVectorGeoJsonFeatureLayerProviderModel(o,A,f,m,C,y)};ir.prototype.createpolylineVolumeGeojsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createpolylineVolumeGeojsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createpolylineVolumeGeojsonPrimitiveLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createpolylineVolumeGeojsonPrimitiveLayer(o,A,f,m,C,y)};ir.prototype.createVolumeGeoJsonFeatureLayer=function(o,A,f,m,C){var y=new xj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createVolumeGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createVolumeGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new xj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerOptimizations=function(o,A,f,m,C,y){var x=new xj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayerOptimization(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new xj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createPolygonVectorGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new vj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerOptimization=function(o,A,f,m,C,y){var x=new vj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayerOptimization(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayersd=function(o,A,f,m,C,y){var x=new vj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayersd(o,A,f,m,C,y)};ir.prototype.createWallGeoFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createWallGeoFeatureLayer(o,A,f,m,C,y)};ir.prototype.createWallPrimitiveGeoFeatureLayer=function(o,A,f,m,C,y){var x=new tj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createWallPrimitiveGeoFeatureLayer(o,A,f,m,C,y)};ir.prototype.createWallGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new tj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createWallGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createImageryProvider=function(o,A,f,m,C,y,x){var v=new eR(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,v.createImageryProvider(o,A,f,m,C,y,x)};ir.prototype.createCacheImageryProvider=function(o,A,f,m,C,y){var x=new eR(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,x.createCacheImageryProvider(o,A,f,m,C,y)};ir.prototype.createterrainProvider=function(o,A,f,m){return this._TerrainProvider.createterrainProvider(o,A,f,m)};ir.prototype.createPolylineImageryProviderer=function(o,A,f,m){return this._ImageryLayer.createPolylineImageryProviderer(o,A,f,m)};ir.prototype.createMVTWithStyle=function(o,A,f,m){return this._ImageryLayer.createMVTWithStyle(o,A,f,m)};ir.prototype.createPolygonGeoJsonFeatureLayer=function(o,A,f,m,C,y){var x=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolygonGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createPolygonGeoJsonFeatureLayer1=function(o,A,f,m,C){var y=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createPolygonGeoJsonFeatureLayer(o,A,f,m,C)};ir.prototype.createPolygonVectorGeoJsonFeatureLayerProvider=function(o,A,f,m,C,y){var x=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolygonVectorGeoJsonFeatureLayerProvider(o,A,f,m,C,y)};ir.prototype.createVolumeVectorGeoJsonFeatureLayerDth=function(o,A,f,m,C,y){var x=new vj(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createVolumeVectorGeoJsonFeatureLayerDth(o,A,f,m,C,y)};ir.prototype.createPolygonVectorGeoJsonFeatureLayerProviderModel=function(o,A,f,m,C,y){var x=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolygonVectorGeoJsonFeatureLayerProviderModel(o,A,f,m,C,y)};ir.prototype.createPolygonVectorGeoJsonFeatureLayerProviderls=function(o,A,f,m,C,y){var x=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolygonVectorGeoJsonFeatureLayerProviderls(o,A,f,m,C,y)};ir.prototype.createPolygonVectorGeoJsonFeatureLayerProviderlsd=function(o,A,f,m,C,y){var x=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createPolygonVectorGeoJsonFeatureLayerProviderlsd(o,A,f,m,C,y)};ir.prototype.createArcgisPolygonVectorGeoJsonFeatureLayerProviderls=function(o,A,f,m,C,y){var x=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,x.createArcgisPolygonVectorGeoJsonFeatureLayerProviderls(o,A,f,m,C,y)};ir.prototype.createPolygonVectorFeatureLayerProvider=function(o,A,f,m,C){var y=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createPolygonVectorFeatureLayerProvider(o,A,f,m,C)};ir.prototype.createPolygonVectorMonomerFeatureLayerProvider=function(o,A,f,m,C){var y=new HQ(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createPolygonVectorMonomerFeatureLayerProvider(o,A,f,m,C)};ir.prototype.createPolygonMapGeoJsonFeatureLayer=function(o,A,f,m,C,y){return this._MapGeoJsonFeatureLayer.createPolygonMapGeoJsonFeatureLayer(o,A,f,m,C,y)};ir.prototype.createGeoJsonDataSource=function(o,A,f,m,C){var y=new df(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createGeoJsonDataSource(o,A,f,m,C)};ir.prototype.DeleteObject=function(o){if(this._core.isnull(o._viewer)){console.log("obj is null");return}o.deleteObject();for(var A in o)delete o[A];o=void 0};ir.prototype.createCircle=function(o,A,f,m){var C=new G2(this._viewer,this._cesium);return C.createCircle(o,A,f,m)};ir.prototype.CreateRectangle=function(o,A,f,m,C){var y=new $P(this._viewer,this._cesium);return y.CreateRectangle(o,A,f,m,C)};ir.prototype.createBox=function(o,C,f,m){var C=new ZP(this._viewer,this._cesium);return C.createBox(o,C,f,m)};ir.prototype.createBillboardbatch=function(o){var A=new DPe(this._viewer,this._cesium);return A.createBillboardbatch(o)};ir.prototype.createBillboard=function(o){var A=new DPe(this._viewer,this._cesium);return A.createBillboard(o)};ir.prototype.createCone=function(o,A,f,m){var C=new yI(this._viewer,this._cesium);return C.createCone(o,A,f,m)};ir.prototype.createRectangularSensor=function(o,A,f,m){var C=new yI(this._viewer,this._cesium);return C.createRectangularSensor(o,A,f,m)};ir.prototype.createRadarMaskScan=function(o,A,f,m){var C=new yI(this._viewer,this._cesium);return C.createRadarMaskScan(o,A,f,m)};ir.prototype.ConicSensor=function(o,A,f){var m=new hgt(this._viewer,this._cesium);return m.create(o,A,f)};ir.prototype.FieldIntensity=function(o,A){var f=new dgt(this._viewer,this._cesium);return f.create(o,A)};ir.prototype.createRadarMask=function(o,A,f,m){var C=new yI(this._viewer,this._cesium);return C.createRadarMask(o,A,f,m)};ir.prototype.createConeRadar=function(o,A){var f=new yI(this._viewer,this._cesium);return f.createConeRadar(o,A)};ir.prototype.createColor=function(o,A,f,m){var C=new Pn(this._viewer,this._cesium);return C.createColor(o,A,f,m)};ir.prototype.createPolyline=function(o,A,f,m,C){var y=new Ey(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createPolyline(o,A,f,this._core.isnull(m)?0:m,C)};ir.prototype.createLink=function(o,A,f){var m=new Ey(this._viewer,this._cesium);return m.createLink(o,A,f)};ir.prototype.createLinkPro=function(o,A,f){var m=new Ey(this._viewer,this._cesium);return m.createLinkPro(o,A,f)};ir.prototype.createLandingLine=function(o,A={}){var f=new Ey(this._viewer,this._cesium);return f.createLandingLine(o,A)};ir.prototype.createLinkPros=function(o){var A=new Ey(this._viewer,this._cesium);return A.createLinkPros(o)};ir.prototype.createPathLayer=function(o){return this._trailLine.createPathLayer(o)};ir.prototype.createTrailWallLayer=function(o){return this._trailLine.createWallLayer(o)};ir.prototype.createPolygon=function(o,A,f,m,C){var y=new BC(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.createPolygon(o,A,f,m,C)};ir.prototype.createSector=function(o,A,f,m,C){var y=new BC(this._viewer,this._cesium);return y.createSector(o,A,f,m,C)};ir.prototype.executeEllipsoid=function(o,C,f,m){var C=new YN(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,C.createEllipsoid(o,C,f,m)};ir.prototype.createImageLabel=function(o,A,f,m){var C=new KN(this._viewer,this._cesium);return this._core.isnull(f)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(f=lt.selectedItem.id),f=this._core.isnull(f)?0:f,C.createImageLabel(o,A,f,m)};ir.prototype.toHtmlColor=function(o){return this._Color.toHtmlColor(o)};ir.prototype.CreateLabel=function(o,A,f,m,C,y){var x=new XP(this._viewer,this._cesium);return this._core.isnull(C)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(C=lt.selectedItem.id),C=this._core.isnull(C)?0:C,x.CreateLabel(o,A,f,m,C,y)};ir.prototype.CreateImageLabel=function(o,A,f,m,C){var y=new KN(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.CreateImageLabel(o,A,f,m,C)};ir.prototype.createImage=function(o,A,f,m,C){var y=new KN(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.CreateImageLabel(o,A,f,m,C)};ir.prototype.CreatePolyline=function(o,A,f,m,C){var y=new Ey(this._viewer,this._cesium);return this._core.isnull(m)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(m=lt.selectedItem.id),m=this._core.isnull(m)?0:m,y.CreatePolyline(o,A,f,m,C)};ir.prototype.CreateCircle=function(o,A,f,m,C,y){var x=new G2(this._viewer,this._cesium);return this._core.isnull(C)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(C=lt.selectedItem.id),C=this._core.isnull(C)?0:C,x.CreateCircle(o,A,f,m,C,y)};ir.prototype.CreateEllipse=function(o,A,f,m,C,y,x,v){var E=new G2(this._viewer,this._cesium);return this._core.isnull(x)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(x=lt.selectedItem.id),x=this._core.isnull(x)?0:x,E.CreateEllipse(o,A,f,m,C,y,x,v)};ir.prototype.CreateBox=function(o,A,f,m,C,y,x,v){var E=new ZP(this._viewer,this._cesium);return this._core.isnull(x)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(x=lt.selectedItem.id),x=this._core.isnull(x)?0:x,E.CreateBox(o,A,f,m,C,y,x,v)};ir.prototype.CreatePosition=function(o,A,f,m,C,y,x,v){var E=new pPe(this._viewer,this._cesium);return E.CreatePosition(o,A,f,m,C,y,x,v)};ir.prototype.createColor=function(o,A,f,m){var C=new Pn(this._viewer,this._cesium);return C.CreateColor(o,A,f,m)};ir.prototype.CreateCone=function(o,A,f,m,C,y,x,v){var E=new yI(this._viewer,this._cesium);return this._core.isnull(x)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(x=lt.selectedItem.id),x=this._core.isnull(x)?0:x,E.CreateCone(o,A,f,m,C,y,x,v)};ir.prototype.CreateCylinder=function(o,A,f,m,C,y,x,v){var E=new yI(this._viewer,this._cesium);return this._core.isnull(x)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(x=lt.selectedItem.id),x=this._core.isnull(x)?0:x,E.CreateCylinder(o,A,f,m,C,y,x,v)};ir.prototype.CreateSphere=function(o,A,f,m,C,y,x,v){var E=new YN(this._viewer,this._cesium);return this._core.isnull(x)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(x=lt.selectedItem.id),x=this._core.isnull(x)?0:x,E.CreateSphere(o,A,f,m,C,y,x,v)};ir.prototype.createPointOptimization=function(o,A){var f=new KQ(this._viewer,this._cesium);return f.createPointOptimization(o,A)};ir.prototype.createRectangleOptimization=function(o,A){var f=new $P(this._viewer,this._cesium);return f.createRectangleOptimization(o,A)};ir.prototype.createCircleOptimization=function(o,A){var f=new G2(this._viewer,this._cesium);return f.createCircleOptimization(o,A)};ir.prototype.createCylinderOptimization=function(o,A){var f=new yI(this._viewer,this._cesium);return f.createCylinderOptimization(o,A)};ir.prototype.createPointOptimization=function(o,A){var f=new KQ(this._viewer,this._cesium);return f.createPointOptimization(o,A)};ir.prototype.CreatePolygonEdit=function(){return this._core.EntityEdit(this._viewer,this._cesium)};ir.prototype.CreateVectorImageFeatureLayer=function(o,A,f,m,C,y,x){var v=new this._VectorImgFeatureLayer(this._viewer,this._cesium);return this._core.isnull(C)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(C=lt.selectedItem.id),C=this._core.isnull(C)?0:C,v.CreateVectorImageFeatureLayer(o,A,f,m,C,y,x)};ir.prototype.CreateWMSImageFeatureLayer=function(o,A,f,m,C,y,x){var v=new this._VectorImgFeatureLayer(this._viewer,this._cesium);return this._core.isnull(C)&&!this._core.isnull(lt.selectedItem)&&lt.selectedItem.type=="group"&&(C=lt.selectedItem.id),C=this._core.isnull(C)?0:C,v.CreateWMSImageFeatureLayer(o,A,f,m,C,y,x)};ir.prototype.createVolumetricMeasureTool=function(o){var A=new Rue(this._viewer,this._cesium,o);return A};Object.defineProperties(ir.prototype,{SimpleGraphic:{get:function(){return this._SimpleGraphic}},GeoJsonFeatureLayer:{get:function(){return this._GeoJsonFeatureLayer}},MilitaryPlotting:{get:function(){return this._straightArrow}},_D3Tileset:{get:function(){return new jP(this._viewer,this._cesium)}}});Object.defineProperties(ir.prototype,{_trailLine:{get:function(){return new Yft(this._viewer,this._cesium)}}});Object.defineProperties(ir.prototype,{_Point:{get:function(){return new KQ(this._viewer,this._cesium)}},GeometryCreator:{CreateLinearRingGeometry:function(o){return{}}}});var Wue=ir;var Mki=null;function Mgt(o,A){Mki=A,this._viewer=o,this._cesium=A,this._core=new pr(o,A),this._polyline=void 0,this._polygon=void 0,this._box=new ZP(o,A),this._ellipsoid=new YN(o,A),this._rectangle=new $P(o,A),this._circle=new G2(o,A),this._point=void 0,this._label=new XP(o,A),this._dynamicObject=new Oue(o,A),this._elevationContour=new oue(o,A),this._cone=new yI(o,A)}Mgt.prototype.execute=function(o,A,f={},m){var C=this._viewer,y=this._cesium;this._point=new KQ(C,y),this._polyline=new Ey(C,y),this._polygon=new BC(C,y);var x=this._core,v={polyline:{},positions:[],distance:[]};if(v.setDistance=function(){alert("qq")},o==0&&A==0)return this._polyline.executePolyline(f,m);if(o==4&&A==1)return this._elevationContour.executeContourMaterial(m);if(o==0&&A==1)return this._polygon.executePolygon(f,m);if(o==0&&A==11)return this._polygon.executePolygonvideo(m,f);if(o==1&&A==1)return this._box.executeBox(m);if(o==1&&A==2)return this._cone.executeCone(m);if(o==1&&A==3)return this._cone.executeCylinder(m);if(o==1&&A==4)return this._ellipsoid.executeEllipsoid(m);if(o==1&&A==5)return this._rectangle.createRectangle(f,m);if(o==1&&A==6)return this._circle.executeClircle(m);if(o==1&&A==7)return this._polygon.executeSector(m,f);if(o==1&&A==8)return this._box.executeExcavation(f,m);if(o==1&&A==9)return this._box.executeExcavation(f,m);if(o==1&&A==10)return this._circle.executeClirclews(m);if(o==1&&A==11)return this._point.executePoint(m,f);if(o==1&&A==12)return this._rectangle.createRectangledxkz(m);if(o==0&&A==2)return this._polyline.executeHorizontals(m,f);if(o==0&&A==3)return this._polygon.executePolygoncl(m,f);if(o==0&&A==4)return this._polyline.executeHorizontal(m,f);if(o==0&&A==10)return this._polyline.executePolyline1(m,f);if(o==0&&A==5)return this._polyline.executeHeightTe(m,f);if(o==0&&A==6)return this._polyline.executeAnge(m,f);if(o==0&&A==9)return this._polyline.executeAngeSd(m,f);if(!(o==0&&A==7)){if(o==0&&A==8)return this._polygon.surfaceArea(f,m);if(o==0&&A==12)return this._polyline.executeAngle(m,f);if(o==0&&A==13)this._point.executePointp(m,f);else{if(o==2&&A==0)return this._polyline.executeProfile(f,m);if(o==2&&A==1)return this._polygon.executePolygonym(m);if(o==2&&A==2)return new BC(C,y).executePolygonymsd(f,m);if(o==2&&A==3)return this._dynamicObject.executeFlycesium(m);if(o==2&&A==4)return this._polygon.executePolygonymsdtt(f,m);if(o==2&&A==5)return this._rectangle.createRectanglelbj(f,m);if(o==2&&A==6)return this._polyline.executeProfilePro(f,m);if(o==3&&A==0){if(f!=""&&f!=null){var E=new Date(f),I=y.JulianDate.fromDate(E);C.clock.currentTime=I.clone()}}else if(o==3&&A==1)this._viewer.animation.viewModel.faster();else if(o==3&&A==2)this._viewer.animation.viewModel.slower();else if(o==3&&A==3)this._viewer.animation.viewModel.playForwardViewModel.command();else if(o==3&&A==4)this._viewer.animation.viewModel.playReverseViewModel.command();else if(o==3&&A==5)this._viewer.animation.viewModel.pauseViewModel.command();else if(o==3&&A==6){var w=y.Cartographic.fromCartesian(f),Q=y.Math.toDegrees(w.longitude),M=y.Math.toDegrees(w.latitude),B=w.height,T={lon:Q,lat:M,hei:B};return T}}}};var Pgt=Mgt;function Rgt(o,A){this._viewer=o,this._cesium=A,this._execute=new Pgt(this._viewer,this._cesium)}Rgt.prototype.execute=function(o,A,f,m){return this._execute.execute(o,A,f,m)};var Lgt=Rgt;function FPe(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}FPe.prototype.deleteItem=function(o){lt.delete(o,this._viewer,this._cesium)};FPe.prototype.testTreeSource=function(){console.log(this._tree)};var Fgt=FPe;function Ngt(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}Ngt.prototype.findItem=function(o){var A=[],f="",m=Vi.clone(this._tree);A=o.split("\\");for(var C=0;C<A.length;C++)if(m=lt.getSourceByName(m,A[C]),C==A.length-1)if(m){f=m.id;break}else f="";else if(m)m=m.children;else{f="",m=null;break}return f};var kgt=Ngt;function Ogt(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}Ogt.prototype.getItemName=function(o){var A=lt.getSourceById(this._tree,o);return A?A.name:""};var Ugt=Ogt;function Ggt(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}Ggt.prototype.getVisibility=function(o){var A=A=lt.getSourceById(this._tree,o);if(A)return A.item.getVisibility()};var Hgt=Ggt;function Vgt(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}Vgt.prototype.setVisibility=function(o,A){lt.setVisibility(o,A,this._viewer,this._cesium)};var zgt=Vgt;function Kgt(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}Kgt.prototype.rename=function(o,A){var f=lt.getSourceById(this._tree,o);f&&(f.name=A);var m=lt.getTempSourceById(o);m&&(m.name=A)};var Ygt=Kgt;function Jgt(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}Jgt.prototype.getNextItem=function(o,A){};var Wgt=Jgt;var Pki={none:-1,point:0,polyline:1,polygon:2,label:3,imageLabel:4,position:5,imageLayer:6,dynamicObject:7,D3titles:8,box:9,circle:10,cone:11,pointfeaturelayer:12,polylinefeaturelayer:13,polygonfeaturelayer:14,pointmodel:15,rectangle:16,ellipsoid:17,wall:18,polylinevolume:19},Xf=Object.freeze(Pki);function _V(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource(),this._treeSource=lt.Source,this._treeTemp=lt.getTempSource(),this._tree1=lt,this._core=new pr(o,A)}_V.prototype.getObject=function(o){var A=Vi.clone(this._tree),f=lt.getSourceById(A,o);if(f)return f.item;var m=Vi.clone(lt.PointSelectSource),C=lt.getPointSelectSourceById(m,o);return C?C.item:void 0};_V.prototype.getTreeItem=function(o){var A=Vi.clone(this._tree),f=lt.getSourceById(A,o);if(f)return f;for(var m=this._viewer.dataSources,C=0;C<m.length;C++){var y=m.get(C).entities.getById(o);if(y){if(y.point&&(y.point.show==null||y.point.show._value)){var x=new KQ(this._viewer,this._cesium);x.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"point",item:x};return lt.pusPointSelectSource(v),v}else if(y.label&&(y.label.show==null||y.label.show._value)){var x=new XP(this._viewer,this._cesium);x.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"label",item:x};return lt.pusPointSelectSource(v),v}else if(y.box&&(y.box.show==null||y.box.show._value)){var E=new ZP(this._viewer,this._cesium);E.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"box",item:E};return lt.pusPointSelectSource(v),v}else if(y.model&&(y.model.show==null||y.model.show._value)){var x=new model(this._viewer,this._cesium);x.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"model",item:x};return lt.pusPointSelectSource(v),v}else if(y.wall&&(y.wall.show==null||y.wall.show._value)){var I=new n4(this._viewer,this._cesium);I.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"wall",item:I};return lt.pusPointSelectSource(v),v}else if(y.polyline){var w=new Ey(this._viewer,this._cesium);w.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"polyline",item:w};return lt.pusPointSelectSource(v),v}else if(y.polygon){var Q=new BC(this._viewer,this._cesium);Q.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"polygon",item:Q};return lt.pusPointSelectSource(v),v}else if(y.rectangle){var M=new $P(this._viewer,this._cesium);M.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"rectangle",item:M};return lt.pusPointSelectSource(v),v}else if(y.billboard&&(y.billboard.show==null||y.billboard.show._value)){var x=new KN(this._viewer,this._cesium);x.setItem(y);var v={id:this._core.getuid(),name:"",pId:0,type:"billboard",item:x};return lt.pusPointSelectSource(v),v}}}};_V.prototype.updateItemId=function(o,A){var m=this._treeSource,C=lt.getSourceById(m,o);if(C&&(C.id=A,C.type=="group"&&C.children&&C.children.length>0))for(var f=0;f<C.children.length;f++)C.children[f].pId=A;var m=this._treeTemp,C=lt.getSourceById(m,o);if(C&&(C.id=A,C.type=="group"&&C.children&&C.children.length>0))for(var f=0;f<C.children.length;f++)C.children[f].pId=A};_V.prototype.unifiedProject=function(o,A){for(var f=0;f<A.length;f++)A[f].id=o[f].id,A[f].pId=A[f].pId,A[f].children&&A[f].children.length>0&&this.unifiedProject(o[f].children,A[f].children)};_V.prototype.insertProjectTree=function(o,A,f,m,C){var y=!0;if(this._core.isnull(A)&&(A=this._core.getuid()),C==!1?y=!1:y=!0,Xf.none==f){var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"unknown",item:null};lt.insertGroupId(x,o)}else if(Xf.position==f){var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"unknown",item:null};lt.insertGroupId(x,o)}else if(Xf.imageLayer==f){var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,checked:y,type:"unknown",item:null};lt.insertGroupId(x,o)}else if(Xf.dynamicObject==f){var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"unknown",item:null};lt.insertGroupId(x,o)}else if(Xf.point==f){var v=new KQ(this._viewer,this._cesium);v.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"point",item:v};v.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.polyline==f){var E=new Ey(this._viewer,this._cesium);E.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"polyline",item:E};E.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.rectangle==f){var I=new $P(this._viewer,this._cesium);I.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"rectangle",item:I};I.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.ellipsoid==f){var w=new YN(this._viewer,this._cesium);w.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"ellipsoid",item:w};w.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.polygon==f){var Q=new BC(this._viewer,this._cesium);m._entity?(Q.setItem(m._entity),Q._points=m._points):Q.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"polygon",item:Q};Q.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.wall==f){var M=new n4(this._viewer,this._cesium);M.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"wall",item:M};M.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.polylinevolume==f){var B=new Fue(this._viewer,this._cesium);B.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"polylinevolume",item:B};B.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.pointmodel==f){var T=new GQ(this._viewer,this._cesium);T.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"pointmodel",item:T};T.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.label==f){var v=new XP(this._viewer,this._cesium);v.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"label",item:v};v.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.imageLabel==f){var v=new KN(this._viewer,this._cesium);v.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,checked:y,type:"billboard",item:v};v.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.D3titles==f){var D=new jP(this._viewer,this._cesium);D.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"3DTilesets",item:D};D.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.box==f){var F=new ZP(this._viewer,this._cesium);F.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"box",item:F};F.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.circle==f){var L=new G2(this._viewer,this._cesium);L.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"circle",item:L};L.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.cone==f){var R=new yI(this._viewer,this._cesium);R.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"cylinder",item:R};R.setTreeobj(x),lt.insertGroupId(x,o)}else if(Xf.pointfeaturelayer==f){var k=new df(this._viewer,this._cesium);k.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"pointLayer",item:k};lt.insertGroupId(x,o)}else if(Xf.pointfeaturelayer==f){var k=new df(this._viewer,this._cesium);k.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"polylineLayer",item:k};lt.insertGroupId(x,o)}else if(Xf.polygonfeaturelayer==f){var k=new df(this._viewer,this._cesium);k.setItem(m);var x={id:m&&m.id?m.id:this._core.getuid(),name:A,pId:o,type:"polygonLayer",item:k};lt.insertGroupId(x,o)}return x};var jgt=_V;function qgt(o,A){this._viewer=o,this._cesium=A,this._tree=lt.getSource()}qgt.prototype.isGroup=function(o){var A=Vi.clone(this._tree),f=lt.getSourceById(A,o);return!!(f&&f.type=="group")};var Xgt=qgt;function NPe(o,A){this._viewer=o,this._cesium=A}NPe.prototype.exportMethod=function(o){for(var A=[],f=0;f<o.length;f++)if(typeof o[f].item.export=="function"){var m=o[f].item.export();if(A.push(m),o[f].children&&o[f].children.length){var C=this.exportMethod(o[f].children);A.push(C)}}return A};NPe.prototype.export=function(){var o=this.exportMethod(lt.Source);return o};var Zgt=NPe;function aA(o,A,f){this._viewer=o,this._cesium=A,this._tree=lt.Source,this._createGroup=new ZO(this._viewer,this._cesium,this._tree),this._deleteItem=new Fgt(this._viewer,this._cesium,this._tree),this._findItem=new kgt(this._viewer,this._cesium,this._tree),this._getItemName=new Ugt(this._viewer,this._cesium,this._tree),this._getVisibility=new Hgt(this._viewer,this._cesium,this._tree),this._setVisibility=new zgt(this._viewer,this._cesium,this._tree),this._renameGroup=new Ygt(this._viewer,this._cesium,this._tree),this._getNextItem=new Wgt(this._viewer,this._cesium,this._tree),this._isGroup=new Xgt(this._viewer,this._cesium,this._tree),this._creator=new Wue(this._viewer,this._cesium),this._getObject=new jgt(this._viewer,this._cesium),this._exportTree=new Zgt(this._viewer,this._cesium),this._core=new pr(o,A),this.InitTree(f,0),this.InitRootImageLayerAndTerrainlayer()}aA.prototype.export=function(){var o=this._exportTree.export(),A=new Blob([JSON.stringify(o)],{type:""});return this._core.saveAs(A,"tree.json"),o};aA.prototype.createGroup=function(o,A,f){return this._createGroup=new ZO(this._viewer,this._cesium),this._createGroup.createGroup(o,A,f)};aA.prototype.changeGroup=function(o,A){this._createGroup.changeGroup(o,A)};aA.prototype.starttemporaryItem=function(){return this._createGroup.starttemporaryItem()};aA.prototype.pushtemporaryItem=function(o){this._createGroup.pushtemporaryItem(o)};aA.prototype.pushStateItem=function(o){this._createGroup.pushStateItem(o)};aA.prototype.endtemporaryItem=function(){this._createGroup.endtemporaryItem()};aA.prototype.deleteItem=function(o){return this._deleteItem.deleteItem(o)};aA.prototype.findItem=function(o){return this._findItem.findItem(o)};aA.prototype.getItemName=function(o){return this._getItemName.getItemName(o)};aA.prototype.getObject=function(o){return this._getObject.getObject(o)};aA.prototype.getTreeItem=function(o){return this._getObject.getTreeItem(o)};aA.prototype.updateItemId=function(o,A){return this._getObject.updateItemId(o,A)};aA.prototype.getVisibility=function(o){return this._getVisibility.getVisibility(o)};aA.prototype.setVisibility=function(o,A){return this._setVisibility.setVisibility(o,A)};aA.prototype.removeAll=function(o){let A=[];this._viewer.entities.values.forEach(f=>{f.objectType===o&&A.push(f)}),A.forEach(f=>{this._viewer.entities.remove(f)}),A=null};aA.prototype.setVisibilityAll=function(o,A){this._viewer.entities.values.forEach(f=>{f.objectType===o&&(f.show=A)})};aA.prototype.rename=function(o,A){return this._renameGroup.rename(o,A)};aA.prototype.getNextItem=function(o,A){return this._getNextItem.getNextItem(o)};aA.prototype.isGroup=function(o){return this._isGroup.isGroup(o)};Object.defineProperties(aA.prototype,{exitsObjectType:{get:function(){return Xf}}});aA.prototype.insertProjectTree=function(o,A,f,m,C,y){return this._core.isnull(o)&&!this._core.isnull(this._tree.selectedItem)&&this._tree.selectedItem.type=="group"&&(o=this._tree.selectedItem.id),o=this._core.isnull(o)?0:o,this._core.isnull(A)||(o=this.createGroup(A,!0,o)),this._getObject.insertProjectTree(o,f,m,C,y)};aA.prototype.exitsGroup=function(o,A){return lt.exitsGroup(o,A)};aA.prototype.getTreeSource=function(){var o=Vi.cloneDeep(lt.getSource());return lt.removeItem(o)};aA.prototype.unifiedProject=function(o,A){this._getObject.unifiedProject(o,A)};aA.prototype.clearn=function(){lt.clearn()};Object.defineProperties(aA.prototype,{Source:{get:function(){return lt.TempSource}}});Object.defineProperties(aA.prototype,{currentObj:{get:function(){return lt.currentObj}}});aA.prototype.InitTree=function(o,A){if(o&&o.length)for(var f=0;f<o.length;f++){var m=o[f];switch(m.type){case"group":var C=this.createGroup(m.name,A);m.children&&m.children.length&&this.InitTree(m.children,C);break;case"label":this._creator.createLabel(m.position,m.text,m.option,A,m.description);break;case"imgLabel":this._creator.createImageLabel(m.position,m.imageLabel,A,m.description);break;case"polygon":this._creator.createPolygon(m.geometry,m.lineColor,m.altitudeType,A,m.description);break;case"polyline":this._creator.createPolyline(m.geometry,m.lineColor,m.altitudeType,A,m.description);break;case"box":this._creator.createBox(m.position,m.box,m.name,A,m.description);break;case"circle":this._creator.createCircle(m.position,m.circle,m.name,A,m.description);break;case"cone":this._creator.createCone(m.position,m.cylinder,m.name,m.description);break;default:break}}};aA.prototype.InitRootImageLayerAndTerrainlayer=function(){};Object.defineProperties(aA.prototype,{selectedItem:{get:function(){return lt.selectedItem},set:function(o){lt.selectedItem=o}}});var $gt=aA;var Rki={L_Click:"OnLButtonClk",L_DBL_Click:"OnLButtonDblClk",L_Down:"OnLButtonDown",L_Up:"OnLButtonUp",M_Click:"OnMButtonClk",M_Down:"OnMButtonDown",M_Up:"OnMButtonUp",R_Click:"OnRButtonClk",R_Down:"OnRButtonDown",R_Up:"OnRButtonUp",Move:"OnFrame",Wheel:"OnMouseWheel"},Ld=Object.freeze(Rki);function EI(o,A){this._viewer=o,this._cesium=A,this._Core=new pr(o,A)}EI.prototype.AttachEvent=function(o,A){var f=this._viewer,m=this._Core,m=this._Core;if(o===Ld.L_Click){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(x){let v=f.scene.pickPosition(x.position),E;v&&(E=m.toDegrees(v)),typeof A=="function"&&A(x,E)},this._cesium.ScreenSpaceEventType.LEFT_CLICK),y}else if(o===Ld.L_DBL_Click){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),y}else if(o===Ld.L_Down){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.LEFT_DOWN),y}else if(o===Ld.L_Up){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.LEFT_UP),y}else if(o===Ld.M_Click){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.MIDDLE_CLICK),y}else if(o===Ld.M_Down){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.MIDDLE_DOWN),y}else if(o===Ld.M_Up){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.MIDDLE_UP),y}else if(o===Ld.R_Click){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.RIGHT_CLICK),y}else if(o===Ld.R_Down){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.RIGHT_DOWN),y}else if(o===Ld.R_Up){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){let I=f.scene.pickPosition(E.position),w;I&&(w=m.toDegrees(I)),typeof A=="function"&&A(E,w)},this._cesium.ScreenSpaceEventType.RIGHT_UP),y}else if(o===Ld.Wheel){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){typeof A=="function"&&A(E)},this._cesium.ScreenSpaceEventType.WHEEL),y}else if(o===Ld.Move){var C=this._viewer.scene,y=new this._cesium.ScreenSpaceEventHandler(C.canvas);return y.setInputAction(function(E){typeof A=="function"&&A(E)},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),y}};EI.prototype.AttachOnLButtonDblClkEvent=function(o){var A=this._viewer.scene,f=this._viewer,m=this._Core,C=new this._cesium.ScreenSpaceEventHandler(A.canvas);return C.setInputAction(function(y){let x=f.scene.pickPosition(y.position),v;x&&(v=m.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),C};EI.prototype.AttachOnLButtonDownEvent=function(o){var A=this._viewer,f=this._Core,m=this._viewer.scene,C=new this._cesium.ScreenSpaceEventHandler(m.canvas);return C.setInputAction(function(y){let x=A.scene.pickPosition(y.position),v;x&&(v=f.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.LEFT_DOWN),C};EI.prototype.AttachOnLButtonUpEvent=function(o){var A=this._viewer,f=this._Core,m=this._viewer.scene,C=new this._cesium.ScreenSpaceEventHandler(m.canvas);return C.setInputAction(function(y){let x=A.scene.pickPosition(y.position),v;x&&(v=f.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.LEFT_UP),C};EI.prototype.AttachOnMButtonDblClkEvent=function(o){var A=this._viewer,f=this._Core,m=this._viewer.scene,C=new this._cesium.ScreenSpaceEventHandler(m.canvas);return C.setInputAction(function(y){let x=A.scene.pickPosition(y.position),v;x&&(v=f.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.MIDDLE_CLICK),C};EI.prototype.AttachOnMButtonDownEvent=function(o){var A=this._viewer,f=this._Core,m=this._viewer.scene,C=new this._cesium.ScreenSpaceEventHandler(m.canvas);return C.setInputAction(function(y){let x=A.scene.pickPosition(y.position),v;x&&(v=f.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.MIDDLE_DOWN),C};EI.prototype.AttachOnMButtonUpEvent=function(o){var A=this._viewer,f=this._Core,m=this._viewer.scene,C=new this._cesium.ScreenSpaceEventHandler(m.canvas);return C.setInputAction(function(y){let x=A.scene.pickPosition(y.position),v;x&&(v=f.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.MIDDLE_UP),C};EI.prototype.AttachOnMouseWheelEvent=function(o){var A=this._viewer.scene,f=new this._cesium.ScreenSpaceEventHandler(A.canvas);return f.setInputAction(function(m){typeof o=="function"&&o(m)},this._cesium.ScreenSpaceEventType.WHEEL),f};EI.prototype.AttachOnFrameEvent=function(o){var A=this._viewer.scene,f=new this._cesium.ScreenSpaceEventHandler(A.canvas);return f.setInputAction(function(m){typeof o=="function"&&o(m)},this._cesium.ScreenSpaceEventType.MOUSE_MOVE),f};EI.prototype.AttachOnRButtonDownEvent=function(o){var A=this._viewer,f=this._Core,m=this._viewer.scene,C=new this._cesium.ScreenSpaceEventHandler(m.canvas);return C.setInputAction(function(y){let x=A.scene.pickPosition(y.position),v;x&&(v=f.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.RIGHT_DOWN),C};EI.prototype.AttachOnRButtonUpEvent=function(o){var A=this._viewer,f=this._Core,m=this._viewer.scene,C=new this._cesium.ScreenSpaceEventHandler(m.canvas);return C.setInputAction(function(y){let x=A.scene.pickPosition(y.position),v;x&&(v=f.toDegrees(x)),typeof o=="function"&&o(click,v)},this._cesium.ScreenSpaceEventType.RIGHT_UP),C};EI.prototype.AttachCameraChangeEvent=function(o){return this._viewer.scene.camera.percentageChanged=1e-6,this._viewer.scene.camera.changed.addEventListener(o),o};EI.prototype.CameraMoveEndEvent=function(o){var A=this._viewer,f=!1;function m(){f=!0}function C(){f&&(o&&o(),A.scene.camera.moveStart.removeEventListener(m),A.scene.camera.moveEnd.removeEventListener(C))}setTimeout(function(){A.scene.camera.moveStart.addEventListener(m),A.scene.camera.moveEnd.addEventListener(C)},0)};var II=EI;function bj(o,A){this._viewer=o,this._cesium=A}bj.prototype.DetachEvent=function(o,A){A===Ld.L_Click?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.LEFT_CLICK):A===Ld.L_DBL_Click?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK):A===Ld.L_Down?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.LEFT_DOWN):A===Ld.L_Up?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.LEFT_UP):A===Ld.M_Click?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.MIDDLE_CLICK):A===Ld.M_Down?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.MIDDLE_DOWN):A===Ld.M_Up?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.MIDDLE_UP):A===Ld.R_Click?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.RIGHT_CLICK):A===Ld.R_Down?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.RIGHT_DOWN):A===Ld.R_Up?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.RIGHT_UP):A===Ld.Wheel?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.WHEEL):A===Ld.Move?o&&o.removeInputAction(this._cesium.ScreenSpaceEventType.MOUSE_MOVE):o&&o.destroy()};bj.prototype.DetachEventAll=function(o){o&&(o.destroy(),o=null)};bj.prototype.RemoNormalCesiumLeftDoubleClick=function(){this._viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(this._cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK)};bj.prototype.DetachCameraChangeEvent=function(o){this._viewer.scene.camera.percentageChanged=.5,this._viewer.scene.camera.changed.removeEventListener(o)};var Qj=bj;var Lki=function(o){if(!o.extensionsUsed||!o.extensionsRequired)return;let A=o.extensionsUsed.indexOf("KHR_technique_webgl"),f=o.extensionsRequired.indexOf("KHR_technique_webgl");if(A!==-1){o.extensionsRequired.splice(f,1,"KHR_techniques_webgl"),o.extensionsUsed.splice(A,1,"KHR_techniques_webgl"),o.extensions=o.extensions||{},o.extensions.KHR_techniques_webgl={},o.extensions.KHR_techniques_webgl.programs=o.programs,o.extensions.KHR_techniques_webgl.shaders=o.shaders,o.extensions.KHR_techniques_webgl.techniques=o.techniques;let m=o.extensions.KHR_techniques_webgl.techniques;o.materials.forEach(function(C,y){o.materials[y].extensions.KHR_technique_webgl.values=o.materials[y].values,o.materials[y].extensions.KHR_techniques_webgl=o.materials[y].extensions.KHR_technique_webgl;let x=o.materials[y].extensions.KHR_techniques_webgl;for(let v in x.values){let E=m[x.technique].uniforms;for(let I in E)if(E[I]===v){x.values[I]=x.values[v],delete x.values[v];break}}}),m.forEach(function(C){for(let y in C.attributes){let x=C.attributes[y];C.attributes[y]=C.parameters[x]}for(let y in C.uniforms){let x=C.uniforms[y];C.uniforms[y]=C.parameters[x]}})}},que=typeof window<"u"?window:typeof self<"u"?self:{},jue=setTimeout(()=>{jue=void 0,que.logSmartEarth&&que.logSmartEarth()},1e4);function Qh(o,A={},f,m,C){if(this._core=new pr(null,_r),this._cesium=_r,jue&&(clearTimeout(jue),jue=void 0,A.VERSION!==!1&&que.logSmartEarth&&que.logSmartEarth()),this.G=65535,f=Ae(f,Ae.EMPTY_OBJECT),O(A.StaticFileBaseUrl)?globalThis.GEOWORLD_BASE_URL=A.StaticFileBaseUrl:globalThis.GEOWORLD_BASE_URL="./WebSDK/",globalThis.SmartEarthRootUrl=globalThis.GEOWORLD_BASE_URL,ITe(),A.toolbar=!1,A.baseLayerPicker=!1,A.shadows=!1,A.skyAtmosphere=new sH,A.terrainShadows=Al.ENABLED,A.animation=!0,A.shouldAnimate=!0,A.fullscreenButton=!1,A.geocoder=!1,A.homeButton=!1,A.infoBox=!1,A.selectionIndicator=!1,A.timeline=Ae(A.timeline,!1),A.navigationHelpButton=!1,A.imageryProviderViewModels=[],A.terrainProviderViewModels=[],A.contextOptions={licenseServer:A.licenseServer,requestWebgl2:!0,webgl:{preserveDrawingBuffer:!0},failIfMajorPerformanceCaveat:!1,ellipsoidCoordinates:A.ellipsoidCoordinates},A.navigation=!0,A.disableRightClickMenu=!0,typeof A=="string"?A.imageryProvider=new bQ({url:A}):(A.url&&(A.imageryProvider=new bQ({url:A.url})),this._core.extend(A,A,!0)),A.baseLayerPicker){let E=this.getAllImageryView();if(A.basemaps)A.basemaps.forEach(I=>{A.imageryProviderViewModels.push(E[I])});else for(let I in E)A.imageryProviderViewModels.push(E[I])}else A.imageryProvider||(A.imageryProvider=new bQ({url:`${globalThis.GEOWORLD_BASE_URL}Workers/image/earth.jpg`}));let y={destination:ee.fromDegrees(A.x?A.x:106.69608,A.y?A.y:40.05164,A.z?A.z:2505283065e-2),orientation:{heading:je.toRadians(this._core.defaultValue(A.heading,0)),pitch:je.toRadians(this._core.defaultValue(A.pitch,-90)),roll:je.toRadians(this._core.defaultValue(A.roll,0))},duration:A.duration||1};if(A.removeGlobe&&(A.skyBox=!1,A.skyAtmosphere=!1,A.contextOptions={licenseServer:A.licenseServer,requestWebgl2:!0,failIfMajorPerformanceCaveat:!1,webgl:{alpha:!0,preserveDrawingBuffer:!0}}),this._Viewer=new $J(o,A),this._tree=m,this._Viewer.scene.globe.baseColor=At.WHITE,this._Viewer.shadowMap.size=2048,this._Viewer._cesiumWidget._creditContainer.style.display="none",this._Viewer.terrainShadows=Al.ENABLED,this._AttachEvent=void 0,this._DetachEvent=void 0,this._Analysis=void 0,this._Navigate=void 0,this._Creator=void 0,this._Command=void 0,this._ProjectTree=void 0,this._Coordinate=void 0,this._VectorTileProvider=void 0,this.toolbar=A.toolbar,A.removeGlobe){this._Viewer.imageryLayers.removeAll(),this._Viewer.shadows=!1,this._Viewer.scene.fog.enabled=!1,this._Viewer.scene.globe.show=!1;let E="rgba(0,0,0,0)";this._Viewer.scene.backgroundColor=At.fromCssColorString(E),this._Viewer.scene.light=new xae({direction:new ee(1,-.9,-.9)}),A.backgroundImage&&(this._Viewer.container.style.backgroundImage=`url(${A.backgroundImage})`)}else this._Viewer.scene.globe.depthTestAgainstTerrain=!0;if(this.coreMap=this._Viewer,this._environment=new pse(this),this._infoBar=new Xct(this),this._camera=new Wae(this),this._measure=new ase(this),this._shapeTool=new Cct(this),this._editTool=new use(this),this._factory=new D2(this),this._tools=new Jae(this),this._edit=new vle(this),this._analysis=new Fle(this),this._userScene=new xle(this,f),this._view=new RAt(this),this._bim=void 0,this._MilitaryPlotting=new nue(this),A.maxViewHeight&&(this._Viewer.scene.screenSpaceCameraController.maximumZoomDistance=A.maxViewHeight),A.minViewHeight||A.maxViewPitch){this.minViewHeight=A.minViewHeight,this.maxViewPitch=A.maxViewPitch&&je.toRadians(A.maxViewPitch);let E=0,I=this._Viewer.scene,w=!1;if(this.maxViewPitch){let Q=new Ur(this._Viewer.scene.canvas);Q.setInputAction(()=>{w=!0},Ki.MIDDLE_DOWN),Q.setInputAction(()=>{w=!1},Ki.MIDDLE_UP),Q.setInputAction(()=>{w=!0},Ki.RIGHT_DOWN),Q.setInputAction(()=>{w=!1},Ki.RIGHT_UP)}this._Viewer.scene.preRender.addEventListener(()=>{let Q=this._Viewer.camera;if(!(!Q||!Q.positionCartographic)){if(this.maxViewPitch){let M=Q.pitch;w&&M>this.maxViewPitch?(M=this.maxViewPitch,Q.setView({destination:this.oldPosition||Q.position.clone(),orientation:{heading:Q.heading,pitch:M,roll:0}})):this.oldPosition=Q.position.clone()}if(this.minViewHeight){E=I.globe.getHeight(Q.positionCartographic)||E;let B,T,D=Q.positionCartographic.height-E;this._Viewer.scene.globe.translucency.enabled||this._Analysis&&(this._Analysis._UndergroundMode&&this._Analysis._UndergroundMode.isUndergroundMode||this._Analysis._StreetView&&this._Analysis._StreetView.isStreetView)?(B=Q.positionCartographic.height<-200,T=-200):(B=D<this.minViewHeight,T=E+this.minViewHeight);let F=Q.pitch<0?Q.pitch:0;B?Q.setView({destination:this.oldPosition||ee.fromRadians(Q.positionCartographic.longitude,Q.positionCartographic.latitude,T),orientation:{heading:Q.heading,pitch:F,roll:0}}):this.oldPosition=Q.position.clone()}}})}let x={};Ml.DEFAULT_VIEW_RECTANGLE=Si.fromDegrees(79,0,130,60),A.navigationOption=Ae(A.navigationOption,Ae.EMPTY_OBJECT),x.defaultResetView=Ae(A.navigationOption.defaultResetView,Ml.DEFAULT_VIEW_RECTANGLE),x.enableCompass=Ae(A.navigationOption.enableCompass,!0),x.enableZoomControls=Ae(A.navigationOption.enableZoomControls,!0),x.enableDistanceLegend=Ae(A.navigationOption.enableDistanceLegend,!0),x.enableCompassOuterRing=Ae(A.navigationOption.enableCompassOuterRing,!0),this._Viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(this._cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),this._Viewer.extend(this._cesium.viewerCesiumNavigationMixin,x),this.Navigate.flyToPointsInterest(y,C),Zct.parse(this,f),A.mouseDownView&&this.mouseDownView(!0),Object.defineProperties(cI.prototype,{_cachedGltf:{configurable:!0,set:function(E){this._vtxf_cachedGltf=E,this._vtxf_cachedGltf&&this._vtxf_cachedGltf._gltf&&Lki(this._vtxf_cachedGltf._gltf)},get:function(){return this._vtxf_cachedGltf}}}),A.disableRightClickMenu&&(document.oncontextmenu=function(){return!1});let v=function(E){if(E.cesiumWidget._supportsImageRenderingPixelated&&window&&window.devicePixelRatio){let w=window.devicePixelRatio;for(;w>=2;)w/=2;E.resolutionScale=w}};BP.prototype.getRenderedBestLevelInfo=function(){let E=this.getRenderedLevelInfo(),I=0;for(let w in E)I<Number(w)&&(I=Number(w));return{bestLevel:I,count:E[I]}},BP.prototype.getRenderedLevelInfo=function(){let E=[];return this._tilesToRender.forEach(function(I){E[I.level]===void 0&&(E[I.level]=0,E[I.level]++)}),E},this.coreMap.camera.setView({destination:Ml.DEFAULT_VIEW_RECTANGLE})}Object.defineProperties(Qh.prototype,{environment:{get:function(){return this._environment}},entities:{get:function(){return this._Viewer.dataSourceDisplay.defaultDataSource.entities}},primitives:{get:function(){return this.coreMap.scene.primitives}},imageryLayers:{get:function(){return this.coreMap.imageryLayers}},view:{get:function(){return this._view}},terrainProvider:{get:function(){return this.coreMap.terrainProvider}},dataSources:{get:function(){return this._Viewer.dataSources}},camera:{get:function(){return this._camera}},measure:{get:function(){return this._measure}},shapeTool:{get:function(){return this._shapeTool}},editTool:{get:function(){return this._editTool}},edit:{get:function(){return this._edit}},analysis:{get:function(){return this._analysis}},factory:{get:function(){return this._factory}},userScene:{get:function(){return this._userScene}},tools:{get:function(){return this._tools}},hdr:{get:function(){return this.coreMap.scene.highDynamicRange},set:function(o){this.coreMap.scene.highDynamicRange=o}},sunGlowFactor:{set:function(o){this.coreMap.scene.sun.glowFactor=o},get:function(){return this.coreMap.scene.sun.glowFactor}},shadows:{get:function(){return this.coreMap.scene.shadowMap.enabled},set:function(o){this.coreMap.scene.shadowMap.enabled=o}},terrainShadows:{get:function(){return this.coreMap.scene.globe.shadows},set:function(o){this.coreMap.scene.globe.shadows=o}},shadowMap:{get:function(){return this.coreMap.scene.shadowMap}},shadowMapList:{get:function(){return this.coreMap.scene.shadowMapList}},textureProjectionMapList:{get:function(){return this.coreMap.scene.textureProjectionMapList}},viewShedMapList:{get:function(){return this.coreMap.scene.viewShedMapList}},clock:{get:function(){return this._Viewer.clock}},clockViewModel:{get:function(){return this._Viewer.clockViewModel}},sunShaftEnabled:{get:function(){return this.coreMap.scene.sunShaftEnabled},set:function(o){this.coreMap.scene.sunShaftEnabled=o}},MilitaryPlotting:{get:function(){return this._MilitaryPlotting}},Core:{get:function(){return this._Core||(this._Core=new pr(this._Viewer,_r)),this._Core}},Analysis:{get:function(){return this._Analysis||(this._Analysis=new eft(this._Viewer,_r)),this._Analysis}},Navigate:{get:function(){return this._Navigate||(this._Navigate=new fft(this._Viewer,_r,this._tree)),this._Navigate}},Creator:{get:function(){return this._Creator||(this._Creator=new Wue(this._Viewer,_r)),this._Creator}},Command:{get:function(){return this._Command||(this._Command=new Lgt(this._Viewer,_r)),this._Command}},ProjectTree:{get:function(){return this._ProjectTree||(this._ProjectTree=new $gt(this._Viewer,_r,this._tree)),this._ProjectTree}},tree:{get:function(){return this._tree}},Viewer:{get:function(){return this._Viewer}},toolbar:{get:function(){return this._Viewer._toolbar.style.display==="block"},set:function(o){this._Viewer._toolbar.style.display=o?"block":"none"}},wireframe:{get:function(){return this._Viewer.cesiumInspector.viewModel.wireframe},set:function(o){this._Viewer.cesiumInspector.viewModel.wireframe=o}},tileCoordinates:{get:function(){return this._Viewer.cesiumInspector.viewModel.tileCoordinates},set:function(o){this._Viewer.cesiumInspector.viewModel.tileCoordinates=o}},bim:{get:function(){if(!this._bim)throw new Ui("\u5F53\u524D\u7248\u672C\u4E0D\u652F\u6301Bim\u6A21\u5757\u529F\u80FD\uFF0C\u8BF7\u4F7F\u7528CimSDK!!!");return this._bim}},maxProjectionCount:{get:function(){return this.coreMap.scene.maxProjectionCount},set:function(o){this.coreMap.scene.maxProjectionCount=o}}});Qh.prototype.brightness=function(o){let A=Ae(o.enable,!0),f=Ae(o.brightness,1),m=this.coreMap.scene.postProcessStages;this.coreMap.scene.brightness=this.coreMap.scene.brightness||m.add(bv.createBrightnessStage()),this.coreMap.scene.brightness.enabled=A,this.coreMap.scene.brightness.uniforms.brightness=Number(f)};Qh.prototype.getAllImageryView=function(){return{arcgis_img:new fp({name:"ArcGIS\u5F71\u50CF",tooltip:"ArcGIS\u5F71\u50CF",iconUrl:`${globalThis.GEOWORLD_BASE_URL}Workers/image/baseLayer/arcgis_img.png`,creationFunction:()=>new qb({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"})}),arcgis_dark:new fp({name:"\u84DD\u8272\u5E95\u56FE",tooltip:"\u84DD\u8272\u5E95\u56FE",iconUrl:`${globalThis.GEOWORLD_BASE_URL}Workers/image/baseLayer/arcgis_dark.png`,creationFunction:()=>new qb({url:"http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer",enablePickFeatures:!1,usePreCachedTilesIfAvailable:!1,tilingScheme:this.Core.getOffsetTilingScheme(this._Viewer,_r)})})}};Qh.prototype.navControl=function(o,A){let f=A?"":"none";this._Viewer.cesiumNavigation&&(o==="all"?this._Viewer.cesiumNavigation.container.style.display=f:o==="nav"?this._Viewer.cesiumNavigation.navigationDiv.style.display=f:this._Viewer.cesiumNavigation.distanceLegendDiv.style.display=f)};Qh.prototype.CreateWfs=function(o,A,f,m,C,y,x,v,E){return new Oae(o,A,f,m,C,y,x,v,E,_r)};Qh.prototype.AttachEvent=function(o,A){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachEvent(o,A)};Qh.prototype.RemoNormalCesiumLeftDoubleClick=function(){return this._DetachEvent===void 0&&(this._DetachEvent=new Qj(this._Viewer,this._cesium)),this._DetachEvent.RemoNormalCesiumLeftDoubleClick()};Qh.prototype.AttachOnLButtonDblClkEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnLButtonDblClkEvent(o)};Qh.prototype.AttachOnLButtonDownEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnLButtonDownEvent(o)};Qh.prototype.AttachOnLButtonUpEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnLButtonUpEvent(o)};Qh.prototype.AttachOnMButtonDblClkEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnMButtonDblClkEvent(o)};Qh.prototype.AttachOnMButtonDownEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnMButtonDownEvent(o)};Qh.prototype.AttachOnMButtonUpEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnMButtonUpEvent(o)};Qh.prototype.AttachOnMouseWheelEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnMouseWheelEvent(o)};Qh.prototype.AttachOnFrameEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnFrameEvent(o)};Qh.prototype.AttachOnRButtonDownEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnRButtonDownEvent(o)};Qh.prototype.AttachOnRButtonUpEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachOnRButtonUpEvent(o)};Qh.prototype.AttachCameraChangeEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.AttachCameraChangeEvent(o)};Qh.prototype.CameraMoveEndEvent=function(o){return this._AttachEvent===void 0&&(this._AttachEvent=new II(this._Viewer,this._cesium)),this._AttachEvent.CameraMoveEndEvent(o)};Qh.prototype.DetachEvent=function(o,A){return this._DetachEvent===void 0&&(this._DetachEvent=new Qj(this._Viewer,this._cesium)),this._DetachEvent.DetachEvent(o,A)};Qh.prototype.DetachEventAll=function(o){return this._DetachEvent===void 0&&(this._DetachEvent=new Qj(this._Viewer,this._cesium)),this._DetachEvent.DetachEventAll(o)};Qh.prototype.DetachCameraChangeEvent=function(o){return this._DetachEvent===void 0&&(this._DetachEvent=new Qj(this._Viewer,this._cesium)),this._DetachEvent.DetachCameraChangeEvent(o)};Qh.prototype.extend=function(o,A){if(!O(o))throw new Ui("mixin is required.");o(this,A)};Qh.prototype.pick=function(o,A=!0,f=!0,m=!1){this.endPick(),this.pick_callBcak=o,this._Viewer._enableInfoOrSelection=!0,f&&(this.pick_stage=this.Core.addPickStage(this._Viewer)),this.pick_handel=new Ur(this._Viewer.scene.canvas);let C,y,x,v;this.pick_handel.setInputAction(E=>{if(f&&this.pick_stage.remove(),C=this._Viewer.scene.pick(E.position),y=void 0,!C||m){let I=this._Viewer.scene.pickPosition(E.position);if(!I)return;let w=this.Core.toDegrees(I);v="\u5750\u6807\u4FE1\u606F",y={\u7ECF\u5EA6:w.lon.toFixed(6),\u7EAC\u5EA6:w.lat.toFixed(6),\u9AD8\u5EA6:w.height.toFixed(2)}}else if(C){if(f&&this.pick_stage.select(C),C.id)C.id.fid&&C.id.attributes?(v=C.id.fid,y=C.id.attributes):C.id.id&&C.id.properties?(v=C.id.name||C.id.id,y=C.id.properties.getValue?C.id.properties.getValue():C.id.properties):C.id.feature&&(v=C.id.feature.id,y=C.id.feature.properties);else if(C._modelId)C._modelId.id&&C._modelId.properties&&(v=C._modelId.id,y=C._modelId.properties);else if(!C.color&&C.content){v=`\u6A21\u578B${C.content.tile._priority}`;let I=this._Viewer.scene.pickPosition(E.position);if(I){let w=this.Core.toDegrees(I);y={\u7ECF\u5EA6:w.lon.toFixed(6),\u7EAC\u5EA6:w.lat.toFixed(6),\u9AD8\u5EA6:w.height.toFixed(2)}}}}if(A&&y){x='<table class="cesium-infoBox-defaultTable"><tbody>';for(let I in y)x+=`<tr><th>${I}</th><td>${y[I]}</td></tr>`;x+="</tbody></table>",this._Viewer.selectedEntity=new UA({name:v,description:x})}else if(C&&C.getPropertyIds&&C.getProperty){let I=C.getPropertyIds();y={},I.forEach(w=>{y[w]=C.getProperty(w)})}this.pick_callBcak&&(C||y)&&this.pick_callBcak(y,C,E)},Ki.LEFT_CLICK)};Qh.prototype.pickPosition=function(o,A=!0){this.endPick(),this.pick(o,A,!1,!0)};Qh.prototype.endPick=function(){this._Viewer.infoBox&&this._Viewer.infoBox.viewModel.closeClicked.raiseEvent(),this._Viewer._enableInfoOrSelection=!1,this.pick_callBcak=void 0,this.pick_handel&&this.pick_handel.destroy(),this.pick_handel=void 0,this.pick_stage&&(this.pick_stage.remove(),this.pick_stage.destroy(),this.pick_stage=void 0)};Qh.prototype.mouseDownView=function(o){if(o&&!this.cursorHandel){this.cursorHandel=new Ur(this._Viewer.scene.canvas);let A,f;this.cursorPoint=document.createElement("div"),this.cursorPoint.className="mouseDownViewPoint",this.cursorPoint.style.cssText="visibility: hidden;opacity: 0;pointer-events: none;position: absolute;z-index: 999;transition: visibility 0.2s ease 0s, opacity 0.2s ease-in;",this.cursorPoint.innerHTML=`<img src="${window.SmartEarthRootUrl}Workers/image/cursor.png" style="width: 36px;height: 36px;">`,this._Viewer.container.appendChild(this.cursorPoint);let m=v=>{v=v||f;let E=v.position||v.endPosition;this.cursorPoint.style.top=`${E.y-18}px`,this.cursorPoint.style.left=`${E.x-18}px`,this.cursorPoint.style.visibility="unset",this.cursorPoint.style.opacity=1},C=v=>{let E=v.position||v.endPosition;this.cursorPoint.style.top=`${E.y-18}px`,this.cursorPoint.style.left=`${E.x-18}px`};this.cursorHandel.setInputAction(v=>{f=v,clearTimeout(A),A=void 0,this._Viewer.camera.positionCartographic.height<1e4?m(v):(this.cursorPoint.style.visibility="hidden",this.cursorPoint.style.opacity=0)},this.rightRotate?Ki.RIGHT_DOWN:Ki.MIDDLE_DOWN),this.cursorHandel.setInputAction(v=>{this.cursorPoint.style.visibility="hidden"},this.rightRotate?Ki.RIGHT_UP:Ki.MIDDLE_UP),this.cursorHandel.setInputAction(v=>{f=v,A&&C(v)},Ki.MOUSE_MOVE),this.cursorHandel.setInputAction(v=>{clearTimeout(A),m(),A=setTimeout(()=>{this.cursorPoint.style.visibility="hidden",this.cursorPoint.style.opacity=0,A=void 0},500)},Ki.WHEEL);let y=0,x;this.cursorHandel.setInputAction(v=>{this._PointFly&&this._PointFly.end&&this._PointFly.end()},Ki.LEFT_CLICK),this.cursorHandel.setInputAction(v=>{y++,clearInterval(x),x=setTimeout(()=>{y=0},500),y>=2&&(y=0,!this._PointFly&&(this._PointFly=new gV(this._Viewer,_r)),this._PointFly&&this._PointFly.end&&this._PointFly.end(),this._PointFly.setPointFly({position:this.Navigate.getMousePosition(v),hideImage:!0,time:this._rotateFlyTime,pitch:je.toDegrees(this._Viewer.camera.pitch)}))},Ki.RIGHT_CLICK)}else this.cursorHandel&&this.cursorHandel.destroy(),this.cursorHandel=void 0,this.cursorPoint&&this.cursorPoint.remove(),this.cursorPoint=void 0};var e0t=Qh;function Sj(o){this.mEarthCtrl=o,this.coreMap=o.coreMap,this.trackInfos=[],this.timer=null,this.animationController=new vse,this.currIndex=-1,this.startTime=0,this.currentTrackInfo=null}function Fki(o,A){if(o.length===0)return null;let f=null;for(let m=0;m<o.length&&o[m].timeStamp<A;m++)f=o[m];return f}function Nki(o,A){A.type==="lookat"&&(console.log(A),A.duration===void 0&&(A.duration=4e3),o.coreMap.camera.flyTo({destination:A.position,orientation:A.orientation,duration:A.duration/1e3}))}Sj.prototype.initialize=function(o){let A=0,f=this;for(let m=0;m<o.length;m++){let C=o[m];C.type==="lookat"&&(C.timeStamp=A,A+=C.stopTime,f.trackInfos.push(C))}f.animationController.addListener(function(m){let C=new Date().getTime()-f.startTime,y=Fki(f.trackInfos,C);y!==f.currentTrackInfo&&(Nki(f.mEarthCtrl,y),f.currentTrackInfo=y)})};Sj.prototype.finalize=function(){this.animationController.finalize(),this.currentTrackInfo=null};Sj.prototype.play=function(){let o=this;o.currentTrackInfo=null,o.startTime=new Date().getTime(),o.animationController.start()};Sj.prototype.stop=function(){this.animationController.stop(),this.currentTrackInfo=null};var t0t=Sj;var Xue=1e-5*Math.PI/180,kki=11;function $v(o){this.mEarthCtrl=o,this._polylines=[],this._points=[],this.entities=this.mEarthCtrl.entities,this.camera=this.mEarthCtrl.coreMap.camera,this.scene=this.mEarthCtrl.coreMap.scene,this._interval=20}$v.prototype.createlineOfSight=function(o){let A=[],f=this,m=[],C=[],y={polyline:[]};f.objectsToExclude=null;let x,v=function(){function T(D){this.options={polyline:{show:!0,positions:[],material:At.YELLOW,width:3,clampToGround:!1}},this.positionsp=D,this._init()}return T.prototype._init=function(){let D=this,F=function(){return D.positionsp};this.options.polyline.positions=new Bn(F,!1),this.polyline=f.entities.add(this.options),f.item=this.polyline,C.push(this.polyline)},T}(),E=new Ur(f.scene.canvas),I=[],w;if(this._points.length>0)for(let T=0;T<this._points.length;T++)this.entities.remove(this._points[T]);let Q=[];E.setInputAction(function(T){let D,F=f.camera.getPickRay(T.position);if(D=f.scene.globe.pick(F,f.scene),f.scene.pick(T.position)){let R=f.scene.pickPosition(T.position);R&&(D=R)}if(!!D)if(I.length===0){I.push(D.clone(),D.clone());let R={leftX:T.position.x,leftY:T.position.y};Q.push(R),x=D.clone()}else{let R={rightX:T.position.x,rightY:T.position.y};Q.push(R);let k={postion:I,entity:C,cartesian:Q};m.push(k),Q=[],w=void 0,I=[],I.push(x.clone()),I.push(x.clone()),w=new v(I),A.push(w)}},Ki.LEFT_CLICK),E.setInputAction(function(T){let D,F=f.camera.getPickRay(T.endPosition);if(D=f.scene.globe.pick(F,f.scene),f.scene.pick(T.endPosition)){let R=f.scene.pickPosition(T.endPosition);R&&(D=R)}!D||I.length>=2&&(O(w)?D!==void 0&&(I.pop(),I.push(D)):(w=new v(I),A.push(w)))},Ki.MOUSE_MOVE);let M=0,B=0;return E.setInputAction(function(T){let D=f.entities.add(new UA);f.objectsToExclude=[D];let F=!0;for(let L=0;L<m.length;L++)if(L===0?(M=m[L].cartesian[0].leftX,B=m[L].cartesian[0].leftY,F=f.tsjx(m[L].postion,M,B,m[L].cartesian[1].rightX,m[L].cartesian[1].rightY,50,C)):F=f.tsjx(m[L].postion,M,B,m[L].cartesian[0].rightX,m[L].cartesian[0].rightY,50,C),F){let R=f.entities.add({name:"polyline1",polyline:{positions:m[L].postion,width:3,material:At.BLUE}});y.polyline.push(R)}else{let R=f.entities.add({name:"polyline1",polyline:{positions:m[L].postion,width:3,material:At.RED}});y.polyline.push(R)}I.pop(),f._polylines=y.polyline,E.destroy();for(let L=0;L<C.length;L++)f.entities.remove(C[L]);O(o)&&typeof o=="function"&&o(y)},Ki.RIGHT_CLICK),this};$v.prototype.tsjx=function(o,A,f,m,C,y,x){let v={gcs:[],min:0,max:0,juli:0,cys:y},E=this.getSpaceDistancem(o);E<=100&&E>=10?y=parseInt(E/2):E<10&&E>0?y=parseInt(E/1):E>100&&(y=parseInt(E/10)),v.cys=y;let I=o[0],w=o[o.length-1],Q=Kt.fromCartesian(I),M=je.toDegrees(Q.longitude),B=je.toDegrees(Q.latitude),T=Q.height,D=Kt.fromCartesian(w),F=je.toDegrees(D.longitude),L=je.toDegrees(D.latitude),R=D.height,k=y,U=je.lerp(M,F,1/k)-M,V=je.lerp(B,L,1/k)-B,H=je.lerp(T,R,1/k)-T,q=!0,ie,Z;for(let oe=0;oe<k-2;oe++){let ne=M+(oe+1)*U,se=B+(oe+1)*V,ce=T+(oe+1)*H;ie=ee.fromDegrees(ne,se,ce),Z=Kt.fromCartesian(ie);let j=this.scene.globe.getHeight(Z),de=this.scene.sampleHeight(Z,x);if(de&&(j=de),j=parseFloat(j.toFixed(1)),ce=parseFloat(ce.toFixed(1)),j>ce)return q=!1,q}return q};$v.prototype.getSpaceDistancem=function(o){let A=0;for(let f=0;f<o.length-1;f++){let m=Kt.fromCartesian(o[f]),C=Kt.fromCartesian(o[f+1]),y=new l0;y.setEndPoints(m,C);let x=y.surfaceDistance;x=Math.sqrt(Math.pow(x,2)+Math.pow(C.height-m.height,2)),A=A+x}return A.toFixed(2)};$v.prototype.deleteObject=function(){if(this._points.length>0){this.objectsToExclude=null;for(let o=0;o<this._points.length;o++)this.entities.remove(this._points[o])}};$v.prototype.InterpolateLineCartographic=function(o,A,f){if(!(o&&A)||!(o.longitude&&o.latitude&&A.longitude&&A.latitude))return null;let m=[];m.push(new Kt(o.longitude,o.latitude));let C=Math.sqrt(Math.pow(A.longitude-o.longitude,2)+Math.pow(A.latitude-o.latitude,2)),y=f&&typeof f=="number"?f:Xue;if(C<=y)return m.push(new Kt(A.longitude,A.latitude)),m;let x=C/y,v=(A.longitude-o.longitude)/x,E=(A.latitude-o.latitude)/x;for(let I=0;I<x;I++){let w=o.longitude+(I+1)*v,Q=o.latitude+(I+1)*E;m.push(new Kt(w,Q))}return m.push(new Kt(A.longitude,A.latitude,A.height)),m};$v.prototype.InterpolateLineCartographicxp=function(o,A,f){if(!(o&&A)||!(o.longitude&&o.latitude&&A.longitude&&A.latitude))return null;let m=[];m.push(new Kt(o.longitude,o.latitude));let C=Math.sqrt(Math.pow(A.longitude-o.longitude,2)+Math.pow(A.latitude-o.latitude,2)),y=f&&typeof f=="number"?f:Xue;if(C<=y)return m.push(new Kt(A.longitude,A.latitude)),m;let x=C/y,v=(A.longitude-o.longitude)/x,E=(A.latitude-o.latitude)/x,I=(A.height-o.height)/x;for(let w=0;w<x;w++){let Q=o.longitude+(w+1)*v,M=o.latitude+(w+1)*E,B=o.height+I*(w+1);m.push(new Kt(Q,M,B))}return m.push(new Kt(A.longitude,A.latitude,A.height)),m};$v.prototype.InterpolateLineHeightCartographic=function(o,A){if(!(o&&A)||!(o.longitude&&o.latitude&&A.longitude&&A.latitude))return null;let f=[];f.push(new Kt(o.longitude,o.latitude,o.height));let m=Math.sqrt(Math.pow(A.longitude-o.longitude,2)+Math.pow(A.latitude-o.latitude,2));if(m<=Xue)return f.push(new Kt(A.longitude,A.latitude,A.height)),f;let C=m/Xue,y=(A.longitude-o.longitude)/C,x=(A.latitude-o.latitude)/C,v=(A.height-o.height)/C;for(let E=0;E<C;E++){let I=o.longitude+(E+1)*y,w=o.latitude+(E+1)*x,Q=o.height+(E+1)*v;f.push(new Kt(I,w,Q))}return f.push(new Kt(A.longitude,A.latitude,A.height)),f};$v.prototype.InterpolateIndexLineHeightCartographic=function(o,A,f,m){if(!(o&&A)||!(o.longitude&&o.latitude&&A.longitude&&A.latitude))return null;let C=(A.longitude-o.longitude)/f,y=(A.latitude-o.latitude)/f,x=(A.height-o.height)/f,v=o.longitude+m*C,E=o.latitude+m*y,I=o.height+m*x;return new Kt(v,E,I)};$v.prototype.InterpolateIndexLineHeightCartographicxp=function(o,A,f,m){if(!(o&&A)||!(o.longitude&&o.latitude&&A.longitude&&A.latitude))return null;let C=(A.longitude-o.longitude)/f,y=(A.latitude-o.latitude)/f,x=(A.height-o.height)/f,v=o.longitude+m*C,E=o.latitude+m*y,I=o.height+m*x;return new Kt(v,E,I)};$v.prototype.Interpolate2IndexLineHeightCartographic=function(o,A,f,m){if(!(o&&A)||!(o.longitude&&o.latitude&&A.longitude&&A.latitude))return null;let C=[];C.push(new Kt(o.longitude,o.latitude,o.height));let y=(A.longitude-o.longitude)/f,x=(A.latitude-o.latitude)/f,v=(A.height-o.height)/f;for(let E=0;E<m;E++){let I=o.longitude+(E+1)*y,w=o.latitude+(E+1)*x,Q=o.height+(E+1)*v;C.push(new Kt(I,w,Q))}return C};$v.prototype.CartographicPointsTerrainData=function(o,A){if(o.length&&o.length>0){let f=gJ(this.scene.terrainProvider,kki,o);(void 0)(f,function(m){A(m)})}};$v.prototype.setVisibility=function(o){if(this._polylines.length>0)for(let A=0;A<this._polylines.length;A++)this._polylines[A].show=o};$v.prototype.deleteObject=function(){if(this._polylines.length>0)for(let o=0;o<this._polylines.length;o++)this.entities.remove(this._polylines[o])};Object.defineProperties($v.prototype,{sight:{get:function(){return this.item.sight},set:function(o){this.item.sight=o}}});var i0t=$v;function Dj(o){this.mEarthCtrl=o,this.coreMap=o.coreMap,this.shadowMap=null}Dj.prototype.initialize=function(o){let A=new Ml(this.coreMap.scene);A.setView({destination:o.destination,orientation:o.orientation}),A.frustum.fov=o.fov||Math.PI/3,A.frustum.near=o.near||1,A.frustum.far=o.far||1e5,A.frustum.aspectRatio=o.aspect||1;let f=new xQ({context:this.coreMap.scene.context,lightCamera:A,enabled:o.enabled||!0,isPointLight:!1,cascadesEnabled:!1,numberOfCascades:1,frustum:{fov:o.fov||Math.PI/3,near:o.near||1,far:o.far||1e5,aspectRatio:o.aspect||1},depthBias:o.depthBias});f.castTexture=o.castTexture,this.shadowMap=f,o.addToMap===!0&&this.addToMap()};Dj.prototype.addToMap=function(){this.shadowMap!==null&&this.mEarthCtrl.shadowMapList.push(this.shadowMap)};Dj.prototype.setEnable=function(o){this.shadowMap!==null&&(this.shadowMap.enabled=o)};Dj.prototype.remove=function(){if(this.shadowMap!==null)for(let o=0;o<this.mEarthCtrl.shadowMapList.length;o++){let A=this.mEarthCtrl.shadowMapList[o];this.shadowMap===A&&this.mEarthCtrl.shadowMapList.splice(o,1)}};var r0t=Dj;var n0t=`precision mediump float;\r
\r
uniform float uAlpha;\r
uniform sampler2D uTexture;\r