1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8d661569-d896-4746-93d9-d25e07069c17",e._sentryDebugIdIdentifier="sentry-dbid-8d661569-d896-4746-93d9-d25e07069c17")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5209],{66669:(e,t,i)=>{let r;i.d(t,{A:()=>tg});var n=i(53801),s=i(85343),o=i(14273),a=i(1893),u=i(58843),l=i(62836),d=i(61501),m=i(52135),c=i(17650),h=i(56347),p=i(80950),f=i(48680),_=i(19069),g=i(80717),A=i(93370),C=i(79385),v=i(80773),b=i(43020),y=i(27368),S=i(96601),x=i(57106),w=i(60161),D=i(8097),T=i(81319),E=i(78143),P=i(24295),k=i(89844),R=i(18626),L=i(58944),F=i(84570),I=i(96310),M=i(21084),V=i(60033),O=i(67813),N=i(66751),B=i(4089),W=i(80316),U=i(19971),H=i(38918),G=i(22175),q=i(98875),j=i(69629),z=i(70505),K=i(96821),X=i(20626),Y=i(34797),Q=i(80396),J=i(79791),Z=i(98015),$=i(3601),ee=i(90227),et=i(18578),ei=i(25936),er=i(15669),en=i(21443),es=i(66132),eo=i(71361),ea=i(16901),eu=i(71154),el=i(95765),ed=i(66358),em=i(80753),ec=i(78767),eh=i(31734),ep=i(18532),ef=i(86474),e_=i(30576),eg=i(85845),eA=i(35850),eC=i(55833),ev=i(60248),eb=i(64346),ey=i(49820),eS=i(2519),ex=i(70796),ew=i(34210),eD=i(73775),eT=i(58913),eE=i(98229),eP=i(71457),ek=i(96279),eR=i(50512),eL=i(59661);let eF=function(e){return function(){e.frameState.afterRender.push(function(){e.requestRender()})}};function eI(e){let t=(e=e??f.A.EMPTY_OBJECT).canvas,i=e.creditContainer,r=e.creditViewport;if(!(0,_.A)(t))throw new A.A("options and options.canvas are required.");let s=e.contextOptions instanceof ev.A;if(s)this._context=e.contextOptions.createSceneContext(t);else{let i=(0,d.A)(e.contextOptions);this._context=new H.A(t,i)}let o=this._context,a=(0,_.A)(i);a||((i=document.createElement("div")).style.position="absolute",i.style.bottom="0",i.style["text-shadow"]="0 0 2px #000000",i.style.color="#ffffff",i.style["font-size"]="10px",i.style["padding-right"]="5px",t.parentNode.appendChild(i)),(0,_.A)(r)||(r=t.parentNode),this._id=(0,h.A)(),this._jobScheduler=new ea.A,this._frameState=new en.A(o,new J.A(i,"â¢",r),this._jobScheduler),this._frameState.scene3DOnly=e.scene3DOnly??!1,this._removeCreditContainer=!a,this._creditContainer=i,this._canvas=t,this._computeEngine=new U.A(o),this._ellipsoid=e.ellipsoid??C.A.default,this._globe=void 0,this._globeTranslucencyState=new es.A,this._primitives=new ep.A({countReferences:s}),this._groundPrimitives=new ep.A({countReferences:s}),this._globeHeight=void 0,this._globeHeightDirty=!0,this._cameraUnderground=!1,this._removeUpdateHeightCallback=void 0,this._logDepthBuffer=eI.defaultLogDepthBuffer&&o.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new ew.A,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=e.orderIndependentTranslucency??!0,this._executeOITFunction=void 0,this._depthPlane=new $.A(e.depthPlaneEllipsoidOffset),this._clearColorCommand=new W.A({color:new m.A,stencil:0,owner:this}),this._depthClearCommand=new W.A({depth:1,owner:this}),this._stencilClearCommand=new W.A({stencil:0}),this._classificationStencilClearCommand=new W.A({stencil:0,renderState:j.A.fromCache({stencilMask:ey.A.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new eg.A(this),this._preUpdate=new b.A,this._postUpdate=new b.A,this._renderError=new b.A,this._preRender=new b.A,this._postRender=new b.A,this._minimumDisableDepthTestDistance=0,this._debugInspector=new eT.A,this._msaaSamples=e.msaaSamples??4,this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new b.A,this.morphComplete=new b.A,this.skyBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=m.A.clone(m.A.BLACK),this._mode=ef.A.SCENE3D,this._mapProjection=(0,_.A)(e.mapProjection)?e.mapProjection:new y.A(this._ellipsoid),this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e9,this.nearToFarDistance2D=175e4,this.verticalExaggeration=1,this.verticalExaggerationRelativeHeight=0,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.atmosphere=new z.A,this.fog=new er.A,this.fog.enabled=C.A.WGS84.equals(this._ellipsoid),C.A.WGS84.equals(this._ellipsoid)||(X.A.DEFAULT_VIEW_RECTANGLE=V.A.fromDegrees(-45,-45,45,45)),this._shadowMapCamera=new X.A(this),this.shadowMap=new eC.A({context:o,lightCamera:this._shadowMapCamera,enabled:e.shadows??!1}),this.invertClassification=!1,this.invertClassificationColor=m.A.clone(m.A.WHITE),this._actualInvertClassificationColor=m.A.clone(this._invertClassificationColor),this._invertClassification=new eo.A,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new ec.A,this._brdfLutGenerator=new K.A,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new eA.A(this),this._cameraUnderground=!1,this._mapMode2D=e.mapMode2D??eu.A.INFINITE_SCROLL,this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,
1clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostProcessSelected:!1,useWebVR:!1},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=e.requestRenderMode??!1,this._renderRequested=!0,this.maximumRenderTimeChange=e.maximumRenderTimeChange??0,this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=O.A.requestCompletedEvent.addEventListener(eF(this)),this._removeTaskProcessorListenerCallback=N.A.taskCompletedEvent.addEventListener(eF(this)),this._removeGlobeCallbacks=[],this._removeTerrainProviderReadyListener=void 0;let u=new n.A(0,0,o.drawingBufferWidth,o.drawingBufferHeight),l=new X.A(this);this._logDepthBuffer&&(l.frustum.near=.1,l.frustum.far=1e10),this.preloadFlightCamera=new X.A(this),this.preloadFlightCullingVolume=void 0,this._picking=new em.A(this),this._defaultView=new eD.A(this,l,u),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentCubeMap=void 0,this.light=new eS.A,this._enableEdgeVisibility=!1,eU(this,0,T.A.now()),this.updateFrameState(),this.initializeFrame()}function eM(e,t,i){let r=e._frameState,n=e._context,s=e._view.oit,{lightShadowMaps:o,lightShadowsEnabled:a}=r.shadowState,u=t.derivedCommands;(0,_.A)(t.pickId)&&(u.picking=ee.A.createPickDerivedCommand(e,t,n,u.picking)),r.pickingMetadata&&t.pickMetadataAllowed&&(t.pickedMetadataInfo=r.pickedMetadataInfo,(0,_.A)(t.pickedMetadataInfo)&&(u.pickingMetadata=ee.A.createPickMetadataDerivedCommand(e,t,n,u.pickingMetadata))),t.pickOnly||(u.depth=ee.A.createDepthOnlyDerivedCommand(e,t,n,u.depth)),u.originalCommand=t,e._hdr&&(u.hdr=ee.A.createHdrCommand(t,n,u.hdr),u=(t=u.hdr.command).derivedCommands),a&&t.receiveShadows&&(u.shadows=eC.A.createReceiveDerivedCommand(o,t,i,n,u.shadows)),t.pass===q.A.TRANSLUCENT&&(0,_.A)(s)&&s.isSupported()&&(a&&t.receiveShadows?(u.oit=(0,_.A)(u.oit)?u.oit:{},u.oit.shadows=s.createDerivedCommands(u.shadows.receiveCommand,n,u.oit.shadows)):u.oit=s.createDerivedCommands(t,n,u.oit))}eI.defaultLogDepthBuffer=!0,Object.defineProperties(eI.prototype,{canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},maximumAliasedLineWidth:{get:function(){return G.A.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return G.A.maximumCubeMapSize}},pickPositionSupported:{get:function(){return this._context.depthTexture}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return eb.A.isSupported(this._context)}},ellipsoid:{get:function(){return this._ellipsoid}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,function(e,t){for(let t=0;t<e._removeGlobeCallbacks.length;++t)e._removeGlobeCallbacks[t]();e._removeGlobeCallbacks.length=0;let i=[];(0,_.A)(t)&&(i.push(t.imageryLayersUpdatedEvent.addEventListener(eF(e))),i.push(t.terrainProviderChanged.addEventListener(eF(e)))),e._removeGlobeCallbacks=i}(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},environmentState:{get:function(){return this._environmentState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if((0,_.A)(this.globe))return this.globe.imageryLayers}},terrainProvider:{get:function(){if((0,_.A)(this.globe))return this.globe.terrainProvider},set:function(e){this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),(0,_.A)(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if((0,_.A)(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){if(this.scene3DOnly&&e!==ef.A.SCENE3D)throw new A.A("Only SceneMode.SCENE3D is valid when scene3DOnly is true.");if(e===ef.A.SCENE2D)this.morphTo2D(0);else if(e===ef.A.SCENE3D)this.morphTo3D(0);else if(e===ef.A.COLUMBUS_VIEW)this.morphToColumbusView(0);else throw new A.A("value must be a valid SceneMode enumeration.");this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},useWebVR:{get:function(){return this._useWebVR},set:function(e){if(this.camera.frustum instanceof L.A)throw new A.A("VR is unsupported with an orthographic projection.");this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new X.A(this),(0,_.A)(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new et.A(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},splitPosition:{get:function(){return this._frameState.splitPosition},set:function(e){this._frameState.splitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){if(!(0,_.A)(e)||e<0)throw new A.A("minimumDisableDepthTestDistance must be greater than or equal to 0.0.");this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){let t=this._context,i=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=i!==this._hdr,this._hdr=i}},highDynamicRangeSupported:{get:function(){let e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},cameraUnderground:{get:function(){return this._cameraUnderground}},msaaSamples:{get:function(){return this._msaaSamples},set:function(e){e=Math.min(e,G.A.maximumSamples),this._msaaSamples=e}},msaaSupported:{get:function(){return this._context.msaa}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},opaqueFrustumNearOffset:{get:function(){return .9999}},globeHeight:{get:function(){return this._globeHeight}}}),eI.prototype.getCompressedTextureFormatSupported=function(e){let t=this.context;return("WEBGL_compressed_texture_s3tc"===e||"s3tc"===e)&&t.s3tc||("WEBGL_compressed_texture_pvrtc"===e||"pvrtc"===e)&&t.pvrtc||("WEBGL_compressed_texture_etc"===e||"etc"===e)&&t.etc||("WEBGL_compressed_texture_etc1"===e||"etc1"===e)&&t.etc1||("WEBGL_compressed_texture_astc"===e||"astc"===e)&&t.astc||("EXT_texture_compression_bptc"===e||"bc7"===e)&&t.bc7},eI.prototype.updateDerivedCommands=function(e){let{derivedCommands:t}=e;if(!(0,_.A)(t))return;let i=this._frameState,{shadowState:r,useLogDepth:n}=this._frameState,s=this._context,o=!1,a=r.lastDirtyTime;e.lastDirtyTime!==a&&(e.lastDirtyTime=a,e.dirty=!0,o=!0);let u=this._hdr,l=(0,_.A)(t.logDepth),d=(0,_.A)(t.hdr),m=(0,_.A)(t.originalCommand),c=n&&!l,h=(!n||!u)&&!m,p=i.pickingMetadata&&function(e,t){let i=e.pickedMetadataInfo,r=t.pickedMetadataInfo;return i?.schemaId!==r?.schemaId||i?.className!==r?.className||i?.propertyName!==r?.propertyName}(e,i);if(e.dirty=e.dirty||c||u&&!d||h||p,!e.dirty)return;e.dirty=!1;let{shadowsEnabled:f,shadowMaps:g}=r;f&&e.castShadows&&(t.shadows=eC.A.createCastDerivedCommand(g,e,o,s,t.shadows)),(l||c)&&(t.logDepth=ee.A.createLogDepthCommand(e,s,t.logDepth),eM(this,t.logDepth.command,o)),(m||h)&&eM(this,e,o)};let eV=new Q.A({pass:Y.A.RENDER}),eO=new Q.A({pass:Y.A.PRELOAD}),eN=new Q.A({pass:Y.A.PRELOAD_FLIGHT}),eB=new Q.A({pass:Y.A.REQUEST_RENDER_MODE_DEFER_CHECK}),eW=new s.A;function eU(e,t,i){let r=e._frameState;r.frameNumber=t,r.time=T.A.clone(i,r.time)}eI.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.pickVoxel=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1},eI.prototype.updateFrameState=function(){let e=this.camera,t=this._frameState;t.commandList.length=0,t.shadowMaps.length=0,t.brdfLutGenerator=this._brdfLutGenerator,t.environmentMap=this.skyBox&&this.skyBox._cubeMap,t.mode=this._mode,t.morphTime=this.morphTime,t.mapProjection=this.mapProjection,t.camera=e,t.cullingVolume=e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC),t.occluder=function(e){if(e._mode===ef.A.SCENE3D&&e.globe?.show&&!e._cameraUnderground&&!e._globeTranslucencyState.translucent)return eW.radiu
1s=e.ellipsoid.minimumRadius+e.frameState.minimumTerrainHeight,r=R.A.fromBoundingSphere(eW,e.camera.positionWC,r)}(this),t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof L.A||this.camera.frustum instanceof F.A),t.light=this.light,t.cameraUnderground=this._cameraUnderground,t.globeTranslucencyState=this._globeTranslucencyState;let{globe:i}=this;(0,_.A)(i)&&i._terrainExaggerationChanged&&(this.verticalExaggeration=i._terrainExaggeration,this.verticalExaggerationRelativeHeight=i._terrainExaggerationRelativeHeight,i._terrainExaggerationChanged=!1),t.verticalExaggeration=this.verticalExaggeration,t.verticalExaggerationRelativeHeight=this.verticalExaggerationRelativeHeight,(0,_.A)(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.ready?(t.specularEnvironmentMaps=this._specularEnvironmentCubeMap.texture,t.specularEnvironmentMapsMaximumLOD=this._specularEnvironmentCubeMap.maximumMipmapLevel):(t.specularEnvironmentMaps=void 0,t.specularEnvironmentMapsMaximumLOD=void 0),t.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,this._actualInvertClassificationColor=m.A.clone(this.invertClassificationColor,this._actualInvertClassificationColor),eo.A.isTranslucencySupported(this._context)||(this._actualInvertClassificationColor.alpha=1),t.invertClassificationColor=this._actualInvertClassificationColor,(0,_.A)(this.globe)?t.maximumScreenSpaceError=this.globe.maximumScreenSpaceError:t.maximumScreenSpaceError=2,this.clearPasses(t.passes),t.tilesetPassState=void 0},eI.prototype.isVisible=function(e,t,i){if(!(0,_.A)(t))return!1;let{boundingVolume:r}=t;return!(0,_.A)(r)||!t.cull||e.computeVisibility(r)!==D.A.OUTSIDE&&(!(0,_.A)(i)||!t.occlude||!r.isOccluded(i))};let eH=new P.A(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function eG(e,t,i,r){let n=t._frameState,s=t._context;if((0,_.A)(t.debugCommandFilter)&&!t.debugCommandFilter(e))return;if(e instanceof W.A){e.execute(s,i);return}e.debugShowBoundingVolume&&(0,_.A)(e.boundingVolume)&&function(e,t,i,r){let n,s,u;let l=t._frameState,d=l.context,m=e.boundingVolume;(0,_.A)(t._debugVolume)&&t._debugVolume.destroy();let h=a.A.clone(m.center);if(l.mode!==ef.A.SCENE3D){h=P.A.multiplyByPoint(eH,h,h);let e=l.mapProjection,t=e.unproject(h);h=e.ellipsoid.cartographicToCartesian(t)}let{radius:p}=m;(0,_.A)(p)?(n=v.A.createGeometry(new v.A({radii:new a.A(p,p,p),vertexFormat:ed.A.FLAT_VERTEX_FORMAT})),s=P.A.fromTranslation(h)):(n=o.A.createGeometry(o.A.fromDimensions({dimensions:new a.A(2,2,2),vertexFormat:ed.A.FLAT_VERTEX_FORMAT})),s=P.A.fromRotationTranslation(m.halfAxes,h,new P.A)),t._debugVolume=new eh.A({geometryInstances:new S.A({geometry:x.A.toWireframe(n),modelMatrix:s,attributes:{color:new c.A(1,0,0,1)}}),appearance:new ed.A({flat:!0,translucent:!1}),asynchronous:!1});let f=l.commandList,g=l.commandList=[];t._debugVolume.update(l),e=g[0],l.useLogDepth&&(e=ee.A.createLogDepthCommand(e,d).command),(0,_.A)(r)&&(u=i.framebuffer,i.framebuffer=r),e.execute(d,i),(0,_.A)(u)&&(i.framebuffer=u),l.commandList=f}(e,t,i,r),n.useLogDepth&&(0,_.A)(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command);let u=n.passes;if(!u.pick&&!u.pickVoxel&&!u.depth&&t._hdr&&(0,_.A)(e.derivedCommands)&&(0,_.A)(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),u.pick||u.depth){if(u.pick&&!u.depth){if(n.pickingMetadata&&(0,_.A)(e.derivedCommands.pickingMetadata)){(e=e.derivedCommands.pickingMetadata.pickMetadataCommand).execute(s,i);return}if(!n.pickingMetadata&&(0,_.A)(e.derivedCommands.picking)){(e=e.derivedCommands.picking.pickCommand).execute(s,i);return}}else if((0,_.A)(e.derivedCommands.depth)){(e=e.derivedCommands.depth.depthOnlyCommand).execute(s,i);return}}if(t.debugShowCommands||t.debugShowFrustums){t._debugInspector.executeDebugShowFrustumsCommand(t,e,i);return}n.shadowState.lightShadowsEnabled&&e.receiveShadows&&(0,_.A)(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(s,i):e.execute(s,i)}function eq(e,t,i){let{derivedCommands:r}=e;if(!(0,_.A)(r))return;let n=t._frameState,s=t._context;n.useLogDepth&&(0,_.A)(r.logDepth)&&(e=r.logDepth.command);let{picking:o,pickingMetadata:a,depth:u}=e.derivedCommands;(0,_.A)(a)&&(e=r.pickingMetadata.pickMetadataCommand).execute(s,i),(0,_.A)(o)?(e=o.pickCommand).execute(s,i):(0,_.A)(u)&&(e=u.depthOnlyCommand).execute(s,i)}function ej(e,t,i){return t.boundingVolume.distanceSquaredTo(i)-e.boundingVolume.distanceSquaredTo(i)}eH=P.A.inverseTransformation(eH,eH);let ez=new a.A;function eK(e,t){let i=a.A.subtract(e,t,ez),r=Math.max(0,a.A.magnitude(i));return r*r}function eX(e,t,i){let r=e.boundingVolume;return eK(t.boundingVolume.center,i)-eK(r.center,i)}
1function eY(e,t,i){return e.boundingVolume.distanceSquaredTo(i)-t.boundingVolume.distanceSquaredTo(i)+E.A.EPSILON12}function eQ(e,t,i,r,n){(0,k.A)(r,ej,e.camera.positionWC),(0,_.A)(n)&&t(n.unclassifiedCommand,e,i);for(let n=0;n<r.length;++n)t(r[n],e,i)}function eJ(e,t,i,r,n){(0,k.A)(r,eY,e.camera.positionWC),(0,_.A)(n)&&t(n.unclassifiedCommand,e,i);for(let n=0;n<r.length;++n)t(r[n],e,i)}let eZ=new I.A,e$=new M.A,e0=new L.A,e1=new F.A;function e3(e,t){let{camera:i,context:r,frameState:n}=e,{uniformState:s}=r;s.updateCamera(i);let o=function(e){let{frustum:t}=e;return(0,_.A)(t.fov)?t.clone(eZ):(0,_.A)(t.infiniteProjectionMatrix)?t.clone(e$):(0,_.A)(t.width)?t.clone(e0):t.clone(e1)}(i);o.near=i.frustum.near,o.far=i.frustum.far;let a=n.passes,u=a.pick||a.pickVoxel;u||function(e,t){let{context:i,environmentState:r,view:n}=e;if(i.uniformState.updatePass(q.A.ENVIRONMENT),(0,_.A)(r.skyBoxCommand)&&eG(r.skyBoxCommand,e,t),r.isSkyAtmosphereVisible&&eG(r.skyAtmosphereCommand,e,t),r.isSunVisible&&(r.sunDrawCommand.execute(i,t),e.sunBloom&&!r.useWebVR)){let s;s=r.useGlobeDepthFramebuffer?n.globeDepth.framebuffer:r.usePostProcess?n.sceneFramebuffer.framebuffer:r.originalFramebuffer,e._sunPostProcess.execute(i),e._sunPostProcess.copy(i,s),t.framebuffer=s}r.isMoonVisible&&r.moonCommand.execute(i,t);let s=e.frameState.panoramaCommandList;for(let i=s.length-1;i>=0;i--){let r=s[i];(0,_.A)(r.shaderProgram)?eG(s[i],e,t):s.splice(i,1)}}(e,t);let{clearGlobeDepth:l,renderTranslucentDepthForPick:d,useDepthPlane:c,useGlobeDepthFramebuffer:h,useInvertClassification:p,usePostProcessSelected:f}=e._environmentState,{globeDepth:g,globeTranslucencyFramebuffer:A,sceneFramebuffer:C,frustumCommandsList:v}=e._view,b=v.length,y=e._globeTranslucencyState,S=e._depthClearCommand,x=e._stencilClearCommand,w=e._classificationStencilClearCommand,D=e._depthPlane,T=i.position.z;function E(i,r){s.updatePass(r);let n=i.commands[r],o=i.indices[r];for(let i=0;i<o;++i)eG(n[i],e,t);return o}function P(i,r){s.updatePass(r);let n=i.commands[r],o=i.indices[r];for(let i=0;i<o;++i)eq(n[i],e,t)}for(let a=0;a<b;++a){let R;let L=b-a-1,F=v[L];if(e.mode===ef.A.SCENE2D?(i.position.z=T-F.near+1,o.far=Math.max(1,F.far-F.near),o.near=1,s.update(n)):(o.near=0!==L?F.near*e.opaqueFrustumNearOffset:F.near,o.far=F.far),s.updateFrustum(o),S.execute(r,t),r.stencilBuffer&&x.execute(r,t),y.translucent?(s.updatePass(q.A.GLOBE),y.executeGlobeCommands(F,eG,A,e,t)):E(F,q.A.GLOBE),h&&g.executeCopyDepth(r,t),d||(y.translucent?(s.updatePass(q.A.TERRAIN_CLASSIFICATION),y.executeGlobeClassificationCommands(F,eG,A,e,t)):E(F,q.A.TERRAIN_CLASSIFICATION)),l&&(S.execute(r,t),c&&D.execute(r,t)),!function(e,t,i){e.context.uniformState.updatePass(q.A.CESIUM_3D_TILE_EDGES);let r=t.framebuffer;e.context.uniformState.edgeColorTexture=e.context.defaultTexture,e.context.uniformState.edgeIdTexture=e.context.defaultTexture,e.context.uniformState.edgeDepthTexture=e.context.defaultTexture,e._enableEdgeVisibility&&(0,_.A)(e._view)&&(0,_.A)(e._view.edgeFramebuffer)&&(t.framebuffer=e._view.edgeFramebuffer.framebuffer);let n=i.commands[q.A.CESIUM_3D_TILE_EDGES],s=i.indices[q.A.CESIUM_3D_TILE_EDGES];e._enableEdgeVisibility&&(0,_.A)(e._view)&&(0,_.A)(e._view.edgeFramebuffer)&&e._view.edgeFramebuffer.getClearCommand(new m.A(0,0,0,0)).execute(e.context,t);for(let i=0;i<s;++i)eG(n[i],e,t);t.framebuffer=r}(e,t,F),e._enableEdgeVisibility&&(0,_.A)(e._view)&&(0,_.A)(e._view.edgeFramebuffer)){let t=e._view.edgeFramebuffer.colorTexture;(0,_.A)(t)?e.context.uniformState.edgeColorTexture=t:e.context.uniformState.edgeColorTexture=e.context.defaultTexture;let i=e._view.edgeFramebuffer.idTexture;(0,_.A)(i)?e.context.uniformState.edgeIdTexture=i:e.context.uniformState.edgeIdTexture=e.context.defaultTexture;let r=e._view.edgeFramebuffer.depthTexture;(0,_.A)(r)?e.context.uniformState.edgeDepthTexture=r:e.context.uniformState.edgeDepthTexture=e.context.defaultTexture}else e.context.uniformState.edgeColorTexture=e.context.defaultTexture,e.context.uniformState.edgeIdTexture=e.context.defaultTexture,e.context.uniformState.edgeDepthTexture=e.context.defaultTexture;
1if(!p||u||d)(R=E(F,q.A.CESIUM_3D_TILE))>0&&(h&&(g.prepareColorTextures(r,l),g.executeUpdateDepth(r,t,g.depthStencilTexture)),d||(R=E(F,q.A.CESIUM_3D_TILE_CLASSIFICATION)));else{e._invertClassification.clear(r,t);let i=t.framebuffer;t.framebuffer=e._invertClassification._fbo.framebuffer,R=E(F,q.A.CESIUM_3D_TILE),h&&(e._invertClassification.prepareTextures(r),g.executeUpdateDepth(r,t,e._invertClassification._fbo.getDepthStencilTexture())),R=E(F,q.A.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),t.framebuffer=i,e._invertClassification.executeClassified(r,t),1===n.invertClassificationColor.alpha&&e._invertClassification.executeUnclassified(r,t),R>0&&r.stencilBuffer&&w.execute(r,t),R=E(F,q.A.CESIUM_3D_TILE_CLASSIFICATION)}if(R>0&&r.stencilBuffer&&x.execute(r,t),!function(e,t,i){e.context.uniformState.updatePass(q.A.VOXELS);let r=i.commands[q.A.VOXELS];r.length=i.indices[q.A.VOXELS],(0,k.A)(r,ej,e.camera.positionWC);for(let i=0;i<r.length;++i)eG(r[i],e,t)}(e,t,F),E(F,q.A.OPAQUE),!function(e,t,i){e.context.uniformState.updatePass(q.A.GAUSSIAN_SPLATS);let r=i.commands[q.A.GAUSSIAN_SPLATS];r.length=i.indices[q.A.GAUSSIAN_SPLATS],(0,k.A)(r,eX,e.camera.positionWC);for(let i=0;i<r.length;++i)eG(r[i],e,t)}(e,t,F),0!==L&&e.mode!==ef.A.SCENE2D&&(o.near=F.near,s.updateFrustum(o)),!function(e,t,i){let r;let{frameState:n,context:s}=e,{pick:o,pickVoxel:a}=n.passes;!(o||a)&&e._environmentState.useInvertClassification&&n.invertClassificationColor.alpha<1&&(r=e._invertClassification);let u=function(e){if(e._environmentState.useOIT){if(!(0,_.A)(e._executeOITFunction)){let{view:t,context:i}=e;e._executeOITFunction=function(e,r,n,s,o){t.globeDepth.prepareColorTextures(i),t.oit.executeCommands(e,r,n,s,o)}}return e._executeOITFunction}return e.frameState.passes.render?eQ:eJ}(e);s.uniformState.updatePass(q.A.TRANSLUCENT);let l=i.commands[q.A.TRANSLUCENT];l.length=i.indices[q.A.TRANSLUCENT],u(e,eG,t,l,r)}(e,t,F),!function(e,t,i){let{translucentTileClassification:r,globeDepth:n}=e._view;if(!(i.indices[q.A.CESIUM_3D_TILE_CLASSIFICATION]>0)||!r.isSupported())return;let s=i.commands[q.A.TRANSLUCENT];r.executeTranslucentCommands(e,eG,t,s,n.depthStencilTexture),r.executeClassificationCommands(e,eG,t,i)}(e,t,F),r.depthTexture&&e.useDepthPicking&&(h||d)){let i=e._picking.getPickDepth(e,L);i.update(r,g.depthStencilTexture),i.executeCopyDepth(r,t)}if(u||!f)continue;let I=t.framebuffer;t.framebuffer=C.getIdFramebuffer(),o.near=0!==L?F.near*e.opaqueFrustumNearOffset:F.near,o.far=F.far,s.updateFrustum(o),y.translucent?(s.updatePass(q.A.GLOBE),y.executeGlobeCommands(F,eq,A,e,t)):P(F,q.A.GLOBE),l&&(S.framebuffer=t.framebuffer,S.execute(r,t),S.framebuffer=void 0),l&&c&&D.execute(r,t),P(F,q.A.CESIUM_3D_TILE),P(F,q.A.OPAQUE),P(F,q.A.TRANSLUCENT),t.framebuffer=I}}function e5(e){e.context.uniformState.updatePass(q.A.COMPUTE);let t=e._environmentState.sunComputeCommand;(0,_.A)(t)&&t.execute(e._computeEngine);let i=e._computeCommandList;for(let t=0;t<i.length;++t)i[t].execute(e._computeEngine)}function e2(e){let{shadowState:t,commandList:i}=e.frameState,{shadowsEnabled:r,shadowMaps:n}=t;if(!r)return;let{context:s}=e,{uniformState:o}=s;for(let t=0;t<n.length;++t){let r=n[t];if(r.outOfView)continue;let{passes:a}=r;for(let e=0;e<a.length;++e)a[e].commandList.length=0;!function(e,t,i){let{shadowMapCullingVolume:r,isPointLight:n,passes:s}=i,o=s.length,a=[q.A.GLOBE,q.A.CESIUM_3D_TILE,q.A.OPAQUE,q.A.TRANSLUCENT];for(let i=0;i<t.length;++i){let u=t[i];if(e.updateDerivedCommands(u),!(!u.castShadows||0>a.indexOf(u.pass))&&e.isVisible(r,u)){if(n)for(let e=0;e<o;++e)s[e].commandList.push(u);else if(1===o)s[0].commandList.push(u);else{let t=!1;for(let i=o-1;i>=0;--i){let r=s[i].cullingVolume;if(e.isVisible(r,u))s[i].commandList.push(u),t=!0;else if(t)break}}}}}(e,i,r);for(let i=0;i<a.length;++i){let n=r.passes[i],{camera:a,commandList:u}=n;o.updateCamera(a),r.updatePass(s,i);for(let i=0;i<u.length;++i){let r=u[i];o.updatePass(r.pass),eG(r.derivedCommands.shadows.castCommands[t],e,n.passState)}}}}let e6=new a.A;eI.prototype.updateAndExecuteCommands=function(e,t){(function(e,t,i){let r=e._context,n=e._frameState,s=e._environmentState,o=e._view,a=n.passes,u=a.pick||a.pickVoxel;(0,_.A)(o.globeDepth)&&(o.globeDepth.picking=u);let l=s.useWebVR;s.originalFramebuffer=t.framebuffer,(0,_.A)(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!l?e._sunPostProcess=new ex.A:(0,_.A)(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!(0,_.A)(e.sun)&&(0,_.A)(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);let d=e._clearColorCommand;m.A.clone(i,d.color),d.execute(r,t);let c=s.useGlobeDepthFramebuffer=(0,_.A)(o.globeDepth);c&&(o.globeDepth.update(r,t,o.viewport,e.msaaSamples,e._hdr,s.clearGlobeDepth),o.globeDepth.clear(r,t,i));let h=o.oit,p=s.useOIT=!u&&(0,_.A)(h)&&h.isSupported();p&&(h.update(r,t,o.globeDepth.colorFramebufferManager,e._hdr,e.msaaSamples),h.clear(r,t,i),s.useOIT=h.isSupported());let f=e.postProcessStages,g=s.usePostProcess=!u&&(e._hdr||f.length>0||f.ambientOcclusion.enabled||f.fxaa.enabled||f.bloom.enabled);s.usePostProcessSelected=!1,g&&(o.sceneFramebuffer.update(r,o.viewport,e._hdr,e.msaaSamples),o.sceneFramebuffer.clear(r,t,i),f.update(r,n.useLogDepth,e._hdr),f.clear(r),g=s.usePostProcess=f.ready,s.usePostProcessSelected=g&&f.hasSelected),s.isSunVisible&&e.sunBloom&&!l?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(r,t,i)):c?t.framebuffer=o.globeDepth.framebuffer:g&&(t.framebuffer=o.sceneFramebuffer.framebuffer),(0,_.A)(t.framebuffer)&&d.execute(r,t);let A=s.useInvertClassification=!u&&(0,_.A)(t.framebuffer)&&e.invertClassification;if(!u&&e._enableEdgeVisibility&&o.edgeFramebuffer.update(r,o.viewport,e._hdr),A){let i;
1if(1===n.invertClassificationColor.alpha&&c&&(i=o.globeDepth.framebuffer),(0,_.A)(i)||r.depthTexture){if(e._invertClassification.previousFramebuffer=i,e._invertClassification.update(r,e.msaaSamples,o.globeDepth.colorFramebufferManager),e._invertClassification.clear(r,t),n.invertClassificationColor.alpha<1&&p){let t=e._invertClassification.unclassifiedCommand,i=t.derivedCommands;i.oit=h.createDerivedCommands(t,r,i.oit)}}else s.useInvertClassification=!1}e._globeTranslucencyState.translucent&&o.globeTranslucencyFramebuffer.updateAndClear(e._hdr,o.viewport,r,t)})(this,e,t),this._environmentState.useWebVR?function(e,t){let i=e._view,r=i.camera,n=e._environmentState.renderTranslucentDepthForPick;to(e),i.createPotentiallyVisibleSet(e),e5(e),n||e2(e);let s=t.viewport;s.x=0,s.y=0,s.width=.5*s.width;let o=X.A.clone(r,e._cameraVR);o.frustum=r.frustum;let u=r.frustum.near,l=u*(e.focalLength??5),d=e.eyeSeparation??l/30,m=a.A.multiplyByScalar(o.right,.5*d,e6);r.frustum.aspectRatio=s.width/s.height;let c=.5*d*u/l;a.A.add(o.position,m,r.position),r.frustum.xOffset=c,e3(e,t),s.x=s.width,a.A.subtract(o.position,m,r.position),r.frustum.xOffset=-c,e3(e,t),X.A.clone(o,r)}(this,e,t):this._frameState.mode!==ef.A.SCENE2D||this._mapMode2D===eu.A.ROTATE?tn(!0,this,e):function(e,t){let{frameState:i,camera:r}=e,{uniformState:s}=e.context,o=t.viewport,u=n.A.clone(o,tr);t.viewport=u,e.mapProjection.project(e9,e7);let l=a.A.clone(r.position,e8),d=P.A.clone(r.transform,te),m=r.frustum.clone();r._setTransform(P.A.IDENTITY);let c=P.A.computeViewportTransformation(u,0,1,e4),h=r.frustum.projectionMatrix,p=r.positionWC.y,f=a.A.from
1Elements(E.A.sign(p)*e7.x-p,0,-r.positionWC.x,tt),_=B.A.pointToGLWindowCoordinates(h,c,f,ti);_.x=Math.floor(_.x);let g=u.x,A=u.width;if(0===p||_.x<=g||_.x>=g+A)tn(!0,e,t);else if(1>Math.abs(g+.5*A-_.x))u.width=_.x-u.x,r.position.x*=E.A.sign(r.position.x),r.frustum.right=0,i.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),s.update(i),tn(!0,e,t),u.x=_.x,r.position.x=-r.position.x,r.frustum.right=-r.frustum.left,r.frustum.left=0,i.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),s.update(i),tn(!1,e,t);else if(_.x>g+.5*A){u.width=_.x-g;let n=r.frustum.right;r.frustum.right=e7.x-p,i.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),s.update(i),tn(!0,e,t),u.x=_.x,u.width=g+A-_.x,r.position.x=-r.position.x,r.frustum.left=-r.frustum.right,r.frustum.right=n-2*r.frustum.right,i.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),s.update(i),tn(!1,e,t)}else{u.x=_.x,u.width=g+A-_.x;let n=r.frustum.left;r.frustum.left=-e7.x-p,i.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),s.update(i),tn(!0,e,t),u.x=g,u.width=_.x-g,r.position.x=-r.position.x,r.frustum.right=-r.frustum.left,r.frustum.left=n-2*r.frustum.left,i.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),s.update(i),tn(!1,e,t)}r._setTransform(d),a.A.clone(l,r.position),r.frustum=m.clone(),t.viewport=o}(this,e)};let e9=new u.A(Math.PI,E.A.PI_OVER_TWO),e7=new a.A,e8=new a.A,e4=new P.A,te=new P.A,tt=new a.A,ti=new a.A,tr=new n.A;function tn(e,t,i){let r=t._view,{renderTranslucentDepthForPick:n}=t._environmentState;e||(t.frameState.commandList.length=0),to(t),r.createPotentiallyVisibleSet(t),e&&(e5(t),n||e2(t)),e3(t,i)}let ts=new p.A;function to(e){let t=e._frameState;t.edgeVisibilityRequested=!1,e._groundPrimitives.update(t),e._primitives.update(t),t.edgeVisibilityRequested&&!1===e._enableEdgeVisibility&&(e._enableEdgeVisibility=!0),function(e){let t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new Z.A({camera:e.camera,updateOnChange:!1,frustumSplits:t.frustumSplits}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),(0,_.A)(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}(e),function(e){let t=e._frameState,{passes:i,shadowState:r,shadowMaps:n}=t,s=n.length,o=s>0&&!i.pick&&!i.pickVoxel&&e.mode===ef.A.SCENE3D;if(o!==r.shadowsEnabled&&(++r.lastDirtyTime,r.shadowsEnabled=o),r.lightShadowsEnabled=!1,o){for(let e=0;e<s;++e)if(n[e]!==r.shadowMaps[e]){++r.lastDirtyTime;break}r.shadowMaps.length=0,r.lightShadowMaps.length=0;for(let e=0;e<s;++e){let i=n[e];i.update(t),r.shadowMaps.push(i),i.fromLightSource&&(r.lightShadowMaps.push(i),r.lightShadowsEnabled=!0),i.dirty&&(++r.lastDirtyTime,i.dirty=!1)}}}(e),e._globe&&e._globe.render(t)}eI.prototype.updateEnvironment=function(){let e=this._frameState,t=this._view,i=this._environmentState,r=e.passes.render,n=e.passes.offscreen,s=this.atmosphere,o=this.skyAtmosphere,a=this.globe,u=this._globeTranslucencyState;if(!r||this._mode!==ef.A.SCENE2D&&t.camera.frustum instanceof L.A||!u.environmentVisible)i.skyAtmosphereCommand=void 0,i.skyBoxCommand=void 0,i.sunDrawCommand=void 0,i.sunComputeCommand=void 0,i.moonCommand=void 0;else{if((0,_.A)(o)){if((0,_.A)(a))o.setDynamicLighting(ei.A.fromGlobeFlags(a)),i.isReadyForAtmosphere=i.isReadyForAtmosphere||!a.show||a._surface._tilesToRender.length>0;else{let e=s.dynamicLighting;o.setDynamicLighting(e),i.isReadyForAtmosphere=!0}i.skyAtmosphereCommand=o.update(e,a),(0,_.A)(i.skyAtmosphereCommand)&&this.updateDerivedCommands(i.skyAtmosphereCommand)}else i.skyAtmosphereCommand=void 0;i.skyBoxCommand=(0,_.A)(this.skyBox)?this.skyBox.update(e,this._hdr):void 0;let r=(0,_.A)(this.sun)?this.sun.update(e,t.passState,this._hdr):void 0;i.sunDrawCommand=(0,_.A)(r)?r.drawCommand:void 0,i.sunComputeCommand=(0,_.A)(r)?r.computeCommand:void 0,i.moonCommand=(0,_.A)(this.moon)?this.moon.update(e):void 0}let l=i.clearGlobeDepth=(0,_.A)(a)&&a.show&&(!a.depthTestAgainstTerrain||this.mode===ef.A.SCENE2D);(i.useDepthPlane=l&&this.mode===ef.A.SCENE3D&&u.useDepthPlane)&&this._depthPlane.update(e),i.renderTranslucentDepthForPick=!1,i.useWebVR=this._useWebVR&&this.mode!==ef.A.SCENE2D&&!n;let d=e.mode!==ef.A.SCENE3D||u.sunVisibleThroughGlobe?void 0:e.occluder,m=e.cullingVolume,c=ts.planes;for(let e=0;e<5;
1++e)c[e]=m.planes[e];m=ts,i.isSkyAtmosphereVisible=(0,_.A)(i.skyAtmosphereCommand)&&i.isReadyForAtmosphere,i.isSunVisible=this.isVisible(m,i.sunDrawCommand,d),i.isMoonVisible=this.isVisible(m,i.moonCommand,d);let h=this.specularEnvironmentMaps,p=this._specularEnvironmentCubeMap;(0,_.A)(h)&&p?.url!==h?(p=p&&p.destroy(),this._specularEnvironmentCubeMap=new eb.A(h)):!(0,_.A)(h)&&(0,_.A)(p)&&(p.destroy(),this._specularEnvironmentCubeMap=void 0),(0,_.A)(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.update(e)},eI.prototype.resolveFramebuffers=function(e){let t=this._context,i=this._environmentState,r=this._view,{globeDepth:n,translucentTileClassification:s}=r;(0,_.A)(n)&&n.prepareColorTextures(t);let{useOIT:o,useGlobeDepthFramebuffer:a,usePostProcess:u,originalFramebuffer:l}=i,d=a?n.colorFramebufferManager:void 0,m=r.sceneFramebuffer._colorFramebuffer,c=r.sceneFramebuffer.idFramebuffer;if(o&&(e.framebuffer=u?m.framebuffer:l,r.oit.execute(t,e)),s.hasTranslucentDepth&&s.isSupported()&&s.execute(this,e),u){r.sceneFramebuffer.prepareColorTextures(t);let e=m;a&&!o&&(e=d);let i=this.postProcessStages,n=e.getColorTexture(0),s=c.getColorTexture(0),u=(d??m).getDepthStencilTexture();i.execute(t,n,u,s),i.copy(t,l)}o||u||!a||(e.framebuffer=l,n.executeCopyColor(t,e))},eI.prototype.getHeight=function(e,t){if(!(0,_.A)(e))return;let i=t===w.Ay.CLAMP_TO_TERRAIN||t===w.Ay.RELATIVE_TO_TERRAIN,r=t===w.Ay.CLAMP_TO_3D_TILE||t===w.Ay.RELATIVE_TO_3D_TILE;if(!(0,_.A)(e))return;let n=Number.NEGATIVE_INFINITY;if(!i){let t=function e(t,i,r){let n=Number.NEGATIVE_INFINITY;if(t instanceof ep.A){let s=t.length;for(let o=0;o<s;++o){let s=e(t.get(o),i,r);(0,_.A)(s)&&s>n&&(n=s)}}else if(t.isCesium3DTileset&&t.show&&t.enableCollision){let e=t.getHeight(i,r);if((0,_.A)(e)&&e>n)return e}return n}(this.primitives,e,this);(0,_.A)(t)&&t>n&&(n=t)}let s=this._globe;if(!r&&(0,_.A)(s)&&s.show){let t=s.getHeight(e);t>n&&(n=t)}if(n>Number.NEGATIVE_INFINITY)return n};let ta=new u.A;function tu(e){e._jobScheduler.resetBudgets();let t=e._frameState;e.primitives.prePassesUpdate(t),(0,_.A)(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function tl(e){e.primitives.postPassesUpdate(e._frameState),O.A.update()}eI.prototype.updateHeight=function(e,t,i){let r;l.A.typeOf.func("callback",t);let n=this._ellipsoid,s=r=>{let n;u.A.clone(e,ta),(0,_.A)(r)&&(n=r.height),(0,_.A)(n)||(n=this.getHeight(e,i)),(0,_.A)(n)&&(ta.height=n,t(ta))},o=i===w.Ay.CLAMP_TO_TERRAIN||i===w.Ay.RELATIVE_TO_TERRAIN;!(i===w.Ay.CLAMP_TO_3D_TILE||i===w.Ay.RELATIVE_TO_3D_TILE)&&(0,_.A)(this.globe)&&(r=this.globe._surface.updateHeight(e,s));let a={},d=t=>{if(o||t.isDestroyed()||!t.isCesium3DTileset)return;let i=t.updateHeight(e,s,n);a[t.id]=i};if(!o){let e=this.primitives.length;for(let t=0;t<e;++t)d(this.primitives.get(t))}let m=this.primitives.primitiveAdded.addEventListener(d),c=this.primitives.primitiveRemoved.addEventListener(e=>{!e.isDestroyed()&&e.isCesium3DTileset&&((0,_.A)(a[e.id])&&a[e.id](),delete a[e.id])});return()=>{r=r&&r(),Object.values(a).forEach(e=>e()),a={},m(),c()}},eI.prototype.initializeFrame=function(){if(120==this._shaderFrameCount++&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeightDirty){(0,_.A)(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),this._globeHeight=function(e){if(e.mode===ef.A.MORPHING)return;let t=e.camera.positionCartographic;return e.getHeight(t)}(this),this._globeHeightDirty=!1;let e=this.camera.positionCartographic;this._removeUpdateHeightCallback=this.updateHeight(e,e=>{this.isDestroyed()||(this._globeHeight=e.height)})}this._cameraUnderground=function(e){let t=e.camera,i=e._mode,r=e._screenSpaceCameraController,n=t.positionCartographic;if(!(0,_.A)(n))return!1;if(!r.onMap()&&n.height<0)return!0;if(i===ef.A.SCENE2D||i===ef.A.MORPHING)return!1;let s=e._globeHeight;return(0,_.A)(s)&&n.height<s}(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(
1),(0,_.A)(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};let td=new m.A;function tm(e){let t=e._frameState,i=e.context,{uniformState:r}=i,s=e._defaultView;e._view=s,e.updateFrameState(),t.passes.render=!0,t.passes.postProcess=e.postProcessStages.hasSelected,t.tilesetPassState=eV;let o=e.backgroundColor??m.A.BLACK;e._hdr&&((o=m.A.clone(o,td)).red=Math.pow(o.red,e.gamma),o.green=Math.pow(o.green,e.gamma),o.blue=Math.pow(o.blue,e.gamma)),t.backgroundColor=o,t.atmosphere=e.atmosphere,e.fog.update(t),r.update(t);let u=e.shadowMap;(0,_.A)(u)&&u.enabled&&(!(0,_.A)(e.light)||e.light instanceof eS.A?a.A.negate(r.sunDirectionWC,e._shadowMapCamera.direction):a.A.clone(e.light.direction,e._shadowMapCamera.direction),t.shadowMaps.push(u)),e._computeCommandList.length=0,e._overlayCommandList.length=0;let l=s.viewport;l.x=0,l.y=0,l.width=i.drawingBufferWidth,l.height=i.drawingBufferHeight;let d=s.passState;d.framebuffer=void 0,d.blendingEnabled=void 0,d.scissorTest=void 0,d.viewport=n.A.clone(l,d.viewport),i.beginFrame(),(0,_.A)(e.globe)&&e.globe.beginFrame(t),e.updateEnvironment(),e.updateAndExecuteCommands(d,o),e.resolveFramebuffers(d),d.framebuffer=void 0,function(e,t){e.context.uniformState.updatePass(q.A.OVERLAY);let i=e.context,r=e._overlayCommandList;for(let e=0;e<r.length;++e)r[e].execute(i,t)}(e,d),(0,_.A)(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),i.endFrame()}function tc(e,t){try{t(e)}catch(t){if(e._renderError.raiseEvent(e,t),e.rethrowRenderErrors)throw t}}function th(e){return e._picking.updateMostDetailedRayPicks(e)}function tp(e){let t=e._frameState;eO.camera=t.camera,eO.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,eO)}function tf(e){let t=e._frameState;t.camera.canPreloadFlight()&&(eN.camera=e.preloadFlightCamera,eN.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,eN))}function t_(e){e.primitives.updateForPass(e._frameState,eB)}eI.prototype.render=function(e){this._preUpdate.raiseEvent(this,e);let t=this._frameState;t.newFrame=!1,(0,_.A)(e)||(e=T.A.now());let i=this._view.checkForCameraUpdates(this);i&&(this._globeHeightDirty=!0);let r=!this.requestRenderMode||this._renderRequested||i||this._logDepthBufferDirty||this._hdrDirty||this.mode===ef.A.MORPHING;if(!r&&(0,_.A)(this.maximumRenderTimeChange)&&(0,_.A)(this._lastRenderTime)){let t=Math.abs(T.A.secondsDifference(this._lastRenderTime,e));r=r||t>this.maximumRenderTimeChange}r&&(this._lastRenderTime=T.A.clone(e,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1,eU(this,E.A.incrementWrap(t.frameNumber,15e6,1),e),t.newFrame=!0),tc(this,tu),this.primitives.show&&(tc(this,th),tc(this,tp),tc(this,tf),r||tc(this,t_)),this._postUpdate.raiseEvent(this,e),r&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),tc(this,tm)),function(e,t){if(e.debugShowFramesPerSecond){if(!(0,_.A)(e._performanceDisplay)){let t=document.createElement("div");t.className="cesium-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(t);let i=new el.A({container:t});e._performanceDisplay=i,e._performanceContainer=t}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.update(t)}else(0,_.A)(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}(this,r),tc(this,tl),function(e){let t=e._frameState.afterRender,i=t.slice();t.length=0;for(let t=0;t<i.length;++t)i[t]()&&e.requestRender()}(this),r&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())},eI.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)},eI.prototype.requestRender=function(){this._renderRequested=!0},eI.prototype.clampLineWidth=function(e){return Math.max(G.A.minimumAliasedLineWidth,Math.min(e,G.A.maximumAliasedLineWidth))},eI.prototype.pick=function(e,t,i){return this._picking.pick(this,e,t,i,1)[0]},eI.prototype.pickAsync=async function(e,t,i){return(await this._picking.pickAsync(this,e,t,i,1))[0]},eI.prototype.pickVoxel=function(e,t,i){let r=this.pick(e,t,i);if(!(0,_.A)(r))return;let n=r.primitive;if(!(n instanceof eP.A))return;let s=this._picking.pickVoxelCoordinate(this,e,t,i),o=255*s[0]+s[1],a=n._traversal.findKeyframeNode(o);if(!(0,_.A)(a))return;let u=255*s[2]+s[3];return eE.A.fromKeyframeNode(n,o,u,a)},eI.prototype.pickMetadata=function(e,t,i,r){l.A.typeOf.object("windowPosition",e),l.A.typeOf.string("className",i),l.A.typeOf.string("propertyName",r);let n=this.pick(e);if(!(0,_.A)(n))return;let s=n.detail?.model?.structuralMetadata;if(!(0,_.A)(s))return;let o=s.schema,a=(0,ek.A)(o,t,i,r);if(!(0,_.A)(a))return;let u=(0,eL.A)(s,i,r);if(!(0,_.A)(u))return;let d=new eR.A(t,i,r,a,u);return this._picking.pickMetadata(this,e,d)},eI.prototype.pickMetadataSchema=function(e){l.A.typeOf.object("windowPosition",e);let t=this.pick(e);if((0,_.A)(t))return t.detail?.model?.structuralMetadata?.schema},eI.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)},eI.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)},eI.prototype.drillPick=function(e,t,i,r){return this._picking.drillPick(this,e,t,i,r)},eI.prototype.pickFromRay=function(e,t,i){return this._picking.pickFromRay(this,e,t,i)},eI.prototype.drillPickFromRay=function(e,t,i,r){return this._picking.drillPickFromRay(this,e,t,i,r)},eI.prototype.pickFromRayMostDetailed=function(e,t,i){return this._picking.pickFromRayMostDetailed(this,e,t,i)},eI.prototype.drillPickFromRayMostDetailed=function(e,t,i,r){return this._picking.drillPickFromRayMostDetailed(this,e,t,i,r)},eI.prototype.sampleHeight=function(e,t,i){return this._picking.sampleHeight(this,e,t,i)},eI.prototype.clampToHeight=function(e,t,i,r){return this._picking.clampToHeight(this,e,t,i,r)},eI.prototype.sampleHeightMostDetailed=function(e,t,i){return this._picking.sampleHeightMostDetailed(this,e,t,i)},eI.prototype.clampToHeightMostDetailed=function(e,t,i){return this._picking.clampToHeightMostDetailed(this,e,t,i)},eI.prototype.cartesianToCanvasCoordinates=function(e,t){return e_.A.worldToWindowCoordinates(this,e,t)},eI.prototype.completeMorph=function(){this._transitioner.completeMorph()},eI.prototype.morphTo2D=function(e){e=e??2,this._transitioner.morphTo2D(e,this._ellipsoid)},eI.prototype.morphToColumbusView=function(e){e=e??2,this._transitioner.morphToColumbusView(e,this._ellipsoid)},eI.prototype.morphTo3D=function(e){e=e??2,this._transitioner.morphTo3D(e,this._ellipsoid)},eI.prototype.setTerrain=function(e){return l.A.typeOf.object("terrain",e),function(e,t){if(e._removeTerrainProviderReadyListener=e._removeTerrainProviderReadyListener&&e._removeTerrainProviderReadyListener(),t.ready){(0,_.A)(e.globe)&&(e.globe.terrainProvider=t.provider);return}e.globe.terrainProvider=void 0,e._removeTerrainProviderReadyListener=t.readyEvent.addEventListener(t=>{(0,_.A)(e)&&(0,_.A)(e.globe)&&(e.globe.terrainProvider=t),e._removeTerrainProviderReadyListener()})}(this,e),e},eI.prototype.isDestroyed=function(){return!1},eI.prototype.destroy=function(){this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.de
1stroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._picking=this._picking&&this._picking.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),(0,_.A)(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(let e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,(0,_.A)(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),(0,g.A)(this)};let tg=eI}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.