@arcgis/core 4.29.0 → 4.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arcade/treeAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{b43fde3e25d0c3b020b5.js → 039a872509872ce67ba4.js} +1 -1
- package/assets/esri/core/workers/chunks/{5243f9ff21e768c620c2.js → 23a5d750d93a7829174f.js} +1 -1
- package/assets/esri/core/workers/chunks/{47e6119be4a4a5ed640d.js → 2447a4d5886aeb0ff72a.js} +1 -1
- package/assets/esri/core/workers/chunks/{7f45a9e9bdbcffc2d6e0.js → 348bcc57b99a975902a8.js} +1 -1
- package/assets/esri/core/workers/chunks/{8c9fb2601488998013ba.js → 3523789a2948a4ab8cc8.js} +1 -1
- package/assets/esri/core/workers/chunks/{24649b410b757599a549.js → 48db6e0bbb1a9c043193.js} +1 -1
- package/assets/esri/core/workers/chunks/{752082be991f1cc8558f.js → 4984e2b79d862114d6a6.js} +1 -1
- package/assets/esri/core/workers/chunks/{8d9736fd15cdb54d9855.js → 5227f9eea6988aadad7f.js} +1 -1
- package/assets/esri/core/workers/chunks/58723274ef657fe212eb.js +1 -0
- package/assets/esri/core/workers/chunks/60ab18c6a04d4b2f1d4c.js +1 -0
- package/assets/esri/core/workers/chunks/647515801d94180b8402.js +1 -0
- package/assets/esri/core/workers/chunks/6c3ae96ec90e9ed7dd50.js +1 -0
- package/assets/esri/core/workers/chunks/7a8bba91769ee18cc39f.js +1 -0
- package/assets/esri/core/workers/chunks/7a98d2e026f63a581b1e.js +1 -0
- package/assets/esri/core/workers/chunks/8c360923cd1850767d3e.js +1 -0
- package/assets/esri/core/workers/chunks/{1a25ba411b89e050fbb7.js → a61f337802ae963d7f65.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0c5318d7ef2e923aad0.js → a8ac511280f873960d46.js} +1 -1
- package/assets/esri/core/workers/chunks/b125ab84b7761e761734.js +1 -0
- package/assets/esri/core/workers/chunks/{b34d6e58b125fe111f91.js → b42a83db83851cb57d44.js} +1 -1
- package/assets/esri/core/workers/chunks/{1497dd943df7eede0704.js → b9c55ff1f21db198ce03.js} +1 -1
- package/assets/esri/core/workers/chunks/bb3322ddb89c0bd444f0.js +1 -0
- package/assets/esri/core/workers/chunks/becfdaeeb07f089d8be7.js +1 -0
- package/assets/esri/core/workers/chunks/{b26e39a399963c176d33.js → c527692694688a5b3b07.js} +2 -2
- package/assets/esri/core/workers/chunks/{210a93e0b96c5bff44a3.js → c556644bb0cf88770939.js} +1 -1
- package/assets/esri/core/workers/chunks/{a5e7b4acae17f88e2208.js → ce93027b6b81428ce9b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{b8ece275abac93f3dccf.js → d14f16bfa6c12909929c.js} +1 -1
- package/assets/esri/core/workers/chunks/{1594f06a2d7d9439c62e.js → e2147c99cc5839654be1.js} +1 -1
- package/assets/esri/core/workers/chunks/{d33ed3a2a0d4b640bd4a.js → e4c7d8c69e4957c9d27c.js} +1 -1
- package/assets/esri/core/workers/chunks/{7709248f59520aee6f51.js → eceaa46f622f6fa31128.js} +1 -1
- package/assets/esri/core/workers/chunks/{2286db4c83ff1b6fb088.js → ef3e6209e6ac6a56960b.js} +1 -1
- package/assets/esri/core/workers/chunks/f59b5ea05caca8a1a398.js +1 -0
- package/chunks/Laserlines.glsl.js +3 -3
- package/chunks/Precipitation.glsl.js +1 -1
- package/chunks/SSAOBlur.glsl.js +2 -2
- package/chunks/boundedPlane.js +1 -1
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/sphere.js +1 -1
- package/chunks/terrainUtilsPlanar.js +1 -1
- package/chunks/vec32.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/libs/gl-matrix-2/vec3.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/geometry/support/coordinateSystem.js +1 -1
- package/geometry/support/lineSegment.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/geometry/support/meshUtils/vertexSpaceConversion.js +5 -0
- package/geometry/support/meshVertexSpaceUtils.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/geometry/support/ray.js +1 -1
- package/geometry/support/triangle.js +1 -1
- package/geometry/support/vector.js +1 -1
- package/interfaces.d.ts +6 -6
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/mixins/FeatureReductionLayer.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/video/VideoCameraSensorModel.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/layers/voxel/voxelPlaneUtils.js +1 -1
- package/libs/linkchartlayout/LinkChartLayout.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/2d/arcade/callExpressionWithCursor.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
- package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/DrillDownTileSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/OverrideChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/PagedTileSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/StreamSourceChunk.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
- package/views/2d/layers/features/support/GraphicsReader.js +1 -1
- package/views/2d/layers/features/support/Tile.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/tiling/TileKey.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/support/measurementUtils.js +1 -1
- package/views/3d/animation/pointToPoint/Camera.js +1 -1
- package/views/3d/camera/constraintUtils/common.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/MarsAtmosphere.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentScale.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/extentUtils.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/support/Segment.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudWorker.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/LoDUtil.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/uvUtils.js +1 -1
- package/views/3d/state/Frustum.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/global/ZoomController.js +1 -1
- package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/local/ZoomController.js +1 -1
- package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/state/utils/viewUtils.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/cameraUtilsInternal.js +1 -1
- package/views/3d/support/intersectionUtils.js +1 -1
- package/views/3d/support/mathUtils.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/util/TwoVectorPosition.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
- package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
- package/views/SelectionManager.js +1 -1
- package/views/draw/support/createUtils.js +1 -1
- package/views/draw/support/surfaceCoordinateSystems.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/RightAngleSnapper.js +1 -1
- package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
- package/views/interactive/snapping/candidates/RightAngleTriangleSnappingCandidate.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
- package/views/support/angularMeasurementUtils.js +1 -1
- package/views/support/euclideanAreaMeasurementUtils.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0e83f3718a0b45652b5e.js +0 -1
- package/assets/esri/core/workers/chunks/1fa5c8af69a09a3730b3.js +0 -1
- package/assets/esri/core/workers/chunks/4736f79b5c94ce103d43.js +0 -1
- package/assets/esri/core/workers/chunks/65f7adaaf1f535310c11.js +0 -1
- package/assets/esri/core/workers/chunks/79c041b292648c5eaecc.js +0 -1
- package/assets/esri/core/workers/chunks/7c4c2c0beddabac672b6.js +0 -1
- package/assets/esri/core/workers/chunks/9307d485a9e5f9fa77d1.js +0 -1
- package/assets/esri/core/workers/chunks/9a758de08dfa57735879.js +0 -1
- package/assets/esri/core/workers/chunks/a4c3da057ec2a07bbbe8.js +0 -1
- package/assets/esri/core/workers/chunks/b252270b100351779f1f.js +0 -1
- package/assets/esri/core/workers/chunks/dc57aa9f2fc69e654559.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[572],{48952:(e,t,r)=>{r.d(t,{a:()=>n,b:()=>o,c:()=>i,d:()=>s,e:()=>c,f:()=>u,n:()=>p,s:()=>l,t:()=>d}),r(9456);var a=r(23704);function s(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,a=3,s=a){if(e.length/a!==Math.ceil(t.length/s))return e;const n=e.length/a,i=r[0],o=r[1],u=r[2],l=r[4],d=r[5],c=r[6],p=r[8],h=r[9],y=r[10],f=r[12],g=r[13],m=r[14];let w=0,b=0;for(let r=0;r<n;r++){const r=t[w],n=t[w+1],F=t[w+2];e[b]=i*r+l*n+p*F+f,e[b+1]=o*r+d*n+h*F+g,e[b+2]=u*r+c*n+y*F+m,w+=s,b+=a}return e}function i(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,s=3,n=s){if(e.length/s!==Math.ceil(t.length/n))return void(0,a.A)().error("source and destination buffers need to have the same number of elements");const i=e.length/s,o=r[0],u=r[1],l=r[2],d=r[3],c=r[4],p=r[5],h=r[6],y=r[7],f=r[8];let g=0,m=0;for(let r=0;r<i;r++){const r=t[g],a=t[g+1],i=t[g+2];e[m]=o*r+d*a+h*i,e[m+1]=u*r+c*a+y*i,e[m+2]=l*r+p*a+f*i,g+=n,m+=s}}function u(e,t,r){l(e.typedBuffer,t,r,e.typedBufferStride)}function l(e,t,r,a=3){const s=Math.min(e.length/a,t.count),n=t.typedBuffer,i=t.typedBufferStride;let o=0,u=0;for(let t=0;t<s;t++)e[u]=r*n[o],e[u+1]=r*n[o+1],e[u+2]=r*n[o+2],o+=i,u+=a}function d(e,t,r,a=3,s=a){const n=e.length/a;if(n!==Math.ceil(t.length/s))return e;let i=0,o=0;for(let u=0;u<n;u++)e[o]=t[i]+r[0],e[o+1]=t[i+1]+r[1],e[o+2]=t[i+2]+r[2],i+=s,o+=a;return e}function c(e,t){p(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function p(e,t,r=3,a=r){const s=Math.min(e.length/r,t.length/a);let n=0,i=0;for(let o=0;o<s;o++){const s=t[n],o=t[n+1],u=t[n+2],l=s*s+o*o+u*u;if(l>0){const t=1/Math.sqrt(l);e[i]=t*s,e[i+1]=t*o,e[i+2]=t*u}n+=a,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,normalize:p,normalizeView:c,scale:l,scaleView:u,shiftRight:function(e,t,r){const a=Math.min(e.count,t.count),s=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,o=t.typedBufferStride;let u=0,l=0;for(let e=0;e<a;e++)s[l]=i[u]>>r,s[l+1]=i[u+1]>>r,s[l+2]=i[u+2]>>r,u+=o,l+=n},transformMat3:o,transformMat3View:i,transformMat4:n,transformMat4View:s,translate:d},Symbol.toStringTag,{value:"Module"}))},51232:(e,t,r)=>{r.d(t,{c:()=>d});var a=r(41948),s=r(3856),n=r(40504),i=r(1580),o=(r(9456),r(66360),r(72052),r(9968)),u=r(12552);let l=class extends((0,s.q)(n.am)){constructor(e){super(e),this.type="georeferenced",this.origin=null}};(0,a._)([(0,o.G)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),(0,a._)([(0,i.qq)({type:[Number],nonNullable:!1,json:{write:!0}})],l.prototype,"origin",void 0),l=(0,a._)([(0,u.c)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l);const d=l},13708:(e,t,r)=>{r.d(t,{c:()=>c});var a=r(41948),s=r(3856),n=r(40504),i=r(1580),o=(r(9456),r(66360),r(72052),r(9968)),u=r(12552),l=r(62484);let d=class extends((0,s.q)(n.am)){constructor(e){super(e),this.type="local",this.origin=(0,l.Su)()}};(0,a._)([(0,o.G)({local:"local"},{readOnly:!0})],d.prototype,"type",void 0),(0,a._)([(0,i.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"origin",void 0),d=(0,a._)([(0,u.c)("esri.geometry.support.MeshLocalVertexSpace")],d);const c=d},23704:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(66360);const s=()=>a.c.getLogger("esri.views.3d.support.buffer.math")},54264:(e,t,r)=>{r.d(t,{CT:()=>w,Ki:()=>m,Si:()=>o,Ud:()=>l,_o:()=>f,ai:()=>u,mK:()=>b,v_:()=>y});var a=r(2600),s=r(92400),n=r(10860),i=r(4048);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,s.yK)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,n.wp)(e),new Blob(r)}}class u{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,a.c)(this.partUrl,{responseType:"blob"});return(0,n.wp)(e),t}}function l(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function d(e){return!!Array.isArray(e)&&e.every((e=>e instanceof o))}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return c.test(t)||p.test(r)}return c.test(e.assetMimeType)||p.test(e.assetName)}function y(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){if(Array.isArray(e)){const r=e;return r.length>0&&r.every((e=>g(e,t)))}return g(e,t)}(r,t)}function f(e,t){if(e===t)return!0;const{source:r}=e,{source:a}=t;if(r===a)return!0;if(d(r)&&d(a)){if(r.length!==a.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),s=[...a].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(s[e]))return!1;return!0}return!1}function g(e,t){return e instanceof o&&e.isOnService(t)}function m(e,t){return e instanceof File?(0,i.K0)(e,t):(0,i.me)(e.assetMimeType,t)??(0,i.If)(e.assetName,t)}function w(e){return Array.isArray(e)?e:[e]}function b(e){return!!e.original}},21136:(e,t,r)=>{r.d(t,{Al:()=>y,GF:()=>f,_c:()=>p,k$:()=>c,mA:()=>h,mm:()=>g,wX:()=>d});var a=r(26832),s=r(66360),n=r(67776),i=r(51232),o=r(13708),u=r(48952);function l(){return s.c.getLogger("esri.geometry.Mesh")}function d(e){const{vertexSpace:t}=e;if(null!=t.origin)return e.clone();const{anchor:r}=e,a=r.clone(),s=new i.c({origin:[a.x,a.y,a.z]}),n=e.cloneWithVertexSpace(s),{position:o}=n.vertexAttributes;return n.vertexAttributes.position=(0,u.t)(new Float64Array(o.length),o,[-a.x,-a.y,-(a.z??0)]),n.vertexAttributesChanged(),n}function c(e){return null!=e.origin}function p(e){return c(e.vertexSpace)}function h(e,t){if(!c(e))return null;const[r,a,s]=e.origin;return new n.c({x:r,y:a,z:s,spatialReference:t})}function y(e,t){const{x:r,y:s,z:n,spatialReference:u}=e,d=[r,s,n??0];if(void 0!==t?.geographic){if((0,a.O2)(l(),"option: geographic",{replacement:"use vertexSpace option instead",version:"4.29",warnOnce:!0}),!t?.vertexSpace)return t?.geographic?new o.c({origin:d}):new i.c({origin:d});l().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")}if(!t?.vertexSpace)return u.isGeographic||u.isWebMercator?new o.c({origin:d}):new i.c({origin:d});switch(t.vertexSpace){case"local":return new o.c({origin:d});case"georeferenced":return new i.c({origin:d});case"georeferenced-absolute":return new i.c}}function f(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function g(e,t){return"local"===e?new o.c({origin:t}):new i.c({origin:t})}},13136:(e,t,r)=>{r.d(t,{u:()=>a});const a={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},62768:(e,t,r)=>{r.d(t,{applyEdits:()=>A,cV:()=>b,cd:()=>S,uploadAssets:()=>x});var a=r(6444),s=r(2952),n=r(20744),i=r(62088),o=r(66360),u=r(10860),l=r(28176),d=r(63564),c=r(20480),p=r(60544),h=r(6576),y=r(564),f=r(4048),g=r(71068);function m(e){return null!=e?.applyEdits}function w(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(w)}function F(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function S(e){return e.every(F)}async function A(e,t,r,a={}){let l;const c="gdbVersion"in e?e.gdbVersion:null,p=a.gdbVersion??c;if((0,h.iC)(e)&&e.url)l=(0,h.mK)(e.url,e.layerId,p,"original-and-current-features"===a.returnServiceEditsOption);else{l=(0,u.qG)(),l.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:l.promise};e.emit("apply-edits",t)}try{const{results:u,edits:c}=await async function(e,t,r,a){if(await e.load(),!m(t))throw new n.c(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,g.UX)(e))throw new n.c(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:u}=await async function(e,t,r){const a=(0,g.kZ)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),u=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),l=null!=e.infoFor3D;if(function(e,t,r,a,s,i){if(!e||!a&&!s)throw new n.c(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new n.c(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&s)throw new n.c(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&s)throw new n.c(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,a,r,!!i,!!u,`${e.type}-layer`),!a.data.isVersioned&&r?.gdbVersion)throw new n.c(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!a.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new n.c(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const c={...r};if(null!=c.rollbackOnFailureEnabled||a.editing.supportsRollbackOnFailure||(c.rollbackOnFailureEnabled=!0),c.rollbackOnFailureEnabled||"original-and-current-features"!==c.returnServiceEditsOption||(!1===c.rollbackOnFailureEnabled&&o.c.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),c.rollbackOnFailureEnabled=!0),!a.editing.supportsReturnServiceEditsInSourceSpatialReference&&c.returnServiceEditsInSourceSR)throw new n.c(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(c.returnServiceEditsInSourceSR&&"original-and-current-features"!==c.returnServiceEditsOption)throw new n.c(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p=function(e,t,r){const a=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&s.c.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(a.addFeatures?.length&&!t.operations.supportsAdd)throw new n.c(`${r}:unsupported-operation`,"Layer does not support adding features.");if(a.updateFeatures?.length&&!t.operations.supportsUpdate)throw new n.c(`${r}:unsupported-operation`,"Layer does not support updating features.");if(a.deleteFeatures?.length&&!t.operations.supportsDelete)throw new n.c(`${r}:unsupported-operation`,"Layer does not support deleting features.");return a.addFeatures=a.addFeatures.map(E),a.updateFeatures=a.updateFeatures.map(E),a.addAssetFeatures=[],a}(t,a,`${e.type}-layer`),h=r?.globalIdUsed||l,y=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(h){const{globalIdField:t}=e;if(null==t)throw new n.c(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");p.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.cf)())}(e,t)))}return p.addFeatures.forEach((t=>function(e,t,r,a){v(e,t,r,a),R(e,t)}(t,e,h,y))),p.updateFeatures.forEach((t=>function(e,t,r,a){v(e,t,r,a),R(e,t);const s=(0,g.kZ)(t);if("geometry"in e&&null!=e.geometry&&!s?.editing.supportsGeometryUpdate)throw new n.c(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,h,y))),p.deleteFeatures.forEach((t=>function(e,t,r,a){v(e,t,r,a)}(t,e,h,y))),p.addAttachments.forEach((t=>I(t,e))),p.updateAttachments.forEach((t=>I(t,e))),l&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,a=(0,f.me)("model/gltf-binary",r.supportedFormats)??(0,f.If)("glb",r.supportedFormats);if(!a||!r.editFormats.includes(a))throw new n.c(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:s}=e;for(const t of e.addFeatures??[])O(t)&&s.push(t);for(const t of e.updateFeatures??[])O(t)&&s.push(t)}(p,e),{edits:await q(p),options:c}}(e,r,a);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,u)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,a),p=e=>e.filter((e=>!e.error)).map(i.ct),h={edits:c,addedFeatures:p(u.addFeatureResults),updatedFeatures:p(u.updateFeatureResults),deletedFeatures:p(u.deleteFeatureResults),addedAttachments:p(u.addAttachmentResults),updatedAttachments:p(u.updateAttachmentResults),deletedAttachments:p(u.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:u.editMoment?new Date(u.editMoment):null,globalIdToObjectId:a.globalIdToObjectId};return u.editedFeatureResults?.length&&(h.editedFeatures=u.editedFeatureResults),l.resolve(h),u}catch(e){throw l.reject(e),e}}function v(e,t,r,a){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new n.c(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(a.length&&"attributes"in e)for(const r of a){const a=e.attributes[r.name];if(void 0!==a&&!(0,y.mS)(r,a))throw new n.c(`${t.type}-layer:invalid-parameter`,`Big-integer field '${r.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new n.c(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new n.c(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function R(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D&&null!=t.spatialReference){const{geometry:r}=e,{spatialReference:a,vertexSpace:s}=r,i=t.spatialReference,o="local"===s.type,u=(0,p.Eb)(i),l=(0,p.yK)(i,a),d=l||(0,p.__)(i)&&((0,p.__)(a)||(0,p.kn)(a));if(!(o&&u&&d||!o&&!u&&l))throw new n.c(`${t.type}-layer:mesh-unsupported`,`Uploading a mesh with a ${s.type} vertex space and a spatial reference wkid:${a.wkid} to a layer with a spatial reference wkid:${i.wkid} is not supported.`)}}function I(e,t){const{feature:r,attachment:a}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!a.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!a.data&&!a.uploadId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(a.data instanceof File&&a.data.name||a.name))throw new n.c(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&a.uploadId)throw new n.c(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof a.data){const e=(0,l.nV)(a.data);if(e&&!e.isBase64)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function q(e){const t=e.addFeatures??[],r=e.updateFeatures??[],a=t.concat(r).map((e=>e.geometry)),s=await(0,c.WW)(a),n=t.length,i=r.length;return s.slice(0,n).forEach(((e,r)=>t[r].geometry=e)),s.slice(n,n+i).forEach(((e,t)=>r[t].geometry=e)),e}function E(e){const t=new a.c;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function O(e){return"mesh"===e?.geometry?.type}function x(e,t,r,a){if(!m(t))throw new n.c(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new n.c(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,a)}},50572:(e,t,r)=>{r.r(t),r.d(t,{default:()=>W});var a=r(41948),s=(r(60708),r(47620)),n=r(2600),i=r(25228),o=r(92400),u=r(20744),l=r(9456),d=r(14628),c=r(95800),p=r(66360),h=r(58820),y=r(10860),f=r(28176),g=r(63564),m=r(1580),w=r(12552),b=r(95247),F=r(21136),S=r(54264),A=r(6444),v=r(24296),R=r(60074),I=r(6704),q=r(60544),E=r(62768);async function O(e,t,r){const{geometry:a}=t,s={...t.attributes};if(null!=r&&"mesh"===a?.type){const{transformFieldRoles:t}=r,{origin:n,spatialReference:i,transform:o,vertexSpace:u}=a,l="local"===u.type,d=e.spatialReference,c=d.isGeographic,p=(0,q.yK)(d,i),h=p||(0,q.__)(d)&&((0,q.__)(i)||(0,q.kn)(i));if(!(l&&c&&h||!l&&!c&&p))return null;const y=(0,R.projectWithoutEngine)(n,i,d);if(null==y)return null;if(s[t.originX]=y.x,s[t.originY]=y.y,s[t.originZ]=y.z??0,null!=o){const{translation:e,scale:r,rotation:a}=o,n=l?1:(0,v.eg)(i)/(0,v.eg)(d);s[t.translationX]=e[0]*n,s[t.translationY]=e[2]*n,s[t.translationZ]=-e[1]*n,s[t.scaleX]=r[0],s[t.scaleY]=r[2],s[t.scaleZ]=r[1],s[t.rotationX]=a[0],s[t.rotationY]=a[2],s[t.rotationZ]=-a[1],s[t.rotationDeg]=a[3]}return{attributes:s}}return null==a?{attributes:s}:"mesh"===a.type||"extent"===a.type?null:{geometry:a.toJSON(),attributes:s}}async function x(e,t){const r=await Promise.all((t.addAttachments??[]).map((t=>_(e,t)))),a=await Promise.all((t.updateAttachments??[]).map((t=>_(e,t)))),s=t.deleteAttachments??[];return r.length||a.length||s.length?{adds:r,updates:a,deletes:[...s]}:null}async function _(e,t){const{feature:r,attachment:a}=t,{globalId:s,name:n,contentType:i,data:o,uploadId:u}=a,l={globalId:s};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[e.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const e=await(0,f.em)(o);e&&(l.contentType=e.mediaType,l.data=e.data),o instanceof File&&(l.name=o.name)}return n&&(l.name=n),i&&(l.contentType=i),l}function M(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new u.c("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}function $(e,t){return new A.c({attributes:e.attributes,geometry:(0,I.h4)({...e.geometry,spatialReference:t})})}function T(e,t){return{adds:e?.adds?.map((e=>$(e,t)))||[],updates:e?.updates?.map((e=>({original:$(e[0],t),current:$(e[1],t)})))||[],deletes:e?.deletes?.map((e=>$(e,t)))||[],spatialReference:t}}var k=r(17724),N=r(95468),C=r(48212),U=r(70388),B=r(4048),G=r(99944),L=r(49624),D=r(95776),j=r(73184),Q=r(56156);const J=new d.O({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),P=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),V=new d.O({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let z=class extends c.c{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,y.Cu)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then((()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e))).then((()=>this._ensureLatestMetadata(e)));return this.addResolvingPromise(r),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:r,infoFor3D:a,gdbVersion:s,spatialReference:n,fieldsIndex:i}=this.layer,o=(0,l.c)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==a,u=e?.operations?.supportsQueryAttachments??!1;return new N.c({url:t.path,pbfSupported:o,fieldsIndex:i,infoFor3D:a,dynamicDataSource:r,gdbVersion:s,sourceSpatialReference:n,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const{layer:r}=this;await(0,U.oh)(r,"editing");const a=e.attributes[r.objectIdField],s=r.parsedUrl.path+"/"+a+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,i.query);try{return M((await(0,n.c)(s,{body:o})).data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(a,e)}}async updateAttachment(e,t,r){await this.load();const{layer:a}=this;await(0,U.oh)(a,"editing");const s=e.attributes[a.objectIdField],i=a.parsedUrl.path+"/"+s+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),u=this._getFormDataForAttachment(r,o.query);try{return M((await(0,n.c)(i,{body:u})).data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async applyEdits(e,t){await this.load();const{layer:r}=this;await(0,U.oh)(r,"editing");const a=r.infoFor3D,i=null!=a,l=i||(t?.globalIdUsed??!1),d=i?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,c=e.addFeatures?.map((e=>O(this.layer,e,a)))??[],p=(await Promise.all(c)).filter(o.G6),h=e.updateFeatures?.map((e=>O(this.layer,e,a)))??[],y=(await Promise.all(h)).filter(o.G6),f=function(e,t,r){if(!t||0===t.length)return[];if(r&&(0,E.cd)(t))return t.map((e=>e.globalId));if((0,E.cV)(t))return t.map((e=>e.objectId));const a=r?e.globalIdField:e.objectIdField;return a?t.map((e=>e.getAttribute(a))):[]}(this.layer,e.deleteFeatures,l);(0,L.W)(p,y,r.spatialReference);const g=await x(this.layer,e),m=r.capabilities.editing.supportsAsyncApplyEdits&&i,w=t?.gdbVersion||r.gdbVersion,b={gdbVersion:w,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:l,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,async:m};await(0,j.eY)(this.layer.url,w,!0);const F=(0,j.oK)(this.layer.url,w||null);if(await(0,j.sy)(r.url,w,r.historicMoment))throw new u.c("feature-layer-source:historic-version","Editing a historic version is not allowed");t?.returnServiceEditsOption?(b.edits=JSON.stringify([{id:r.layerId,adds:p,updates:y,deletes:f,attachments:g,assetMaps:d}]),b.returnServiceEditsOption=J.toJSON(t?.returnServiceEditsOption),b.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(b.adds=p.length?JSON.stringify(p):null,b.updates=y.length?JSON.stringify(y):null,b.deletes=f.length?l?JSON.stringify(f):f.join(","):null,b.attachments=g&&JSON.stringify(g),b.assetMaps=null!=d?JSON.stringify(d):void 0);const S=this._getLayerRequestOptions({method:"post",query:b});F&&(S.authMode="immediate",S.query.returnEditMoment=!0,S.query.sessionId=j.aG);const A=t?.returnServiceEditsOption?r.url:r.parsedUrl.path;let v;try{v=m?await this._asyncApplyEdits(A+"/applyEdits",S):await(0,n.c)(A+"/applyEdits",S)}catch(e){if(!function(e){const t=e.details.raw,r=+t.code,a=+t.extendedCode;return 500===r&&(-2147217144===a||-2147467261===a)}(e))throw e;S.authMode="immediate",v=m?await this._asyncApplyEdits(A+"/applyEdits",S):await(0,n.c)(A+"/applyEdits",S)}if(!r.capabilities.operations?.supportsEditing&&r.effectiveCapabilities?.operations?.supportsEditing){const e=s.id?.findCredential(r.url);await(e?.refreshToken())}return this._createEditsResult(v)}async deleteAttachments(e,t){await this.load();const{layer:r}=this;await(0,U.oh)(r,"editing");const a=e.attributes[r.objectIdField],s=r.parsedUrl.path+"/"+a+"/deleteAttachments";try{return(await(0,n.c)(s,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(M)}catch(e){throw this._createAttachmentErrorResult(a,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:a}=this.layer,{data:s}=await(0,n.c)(`${a}/${r}`,t),{id:o,extent:u,fullExtent:l,timeExtent:d}=s,c=u||l;return{id:o,fullExtent:c&&b.c.fromJSON(c),timeExtent:d&&i.c.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();const r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});return e.outStatistics?.length&&r.features.length&&r.features.forEach((t=>{const r=t.attributes;e.outStatistics?.forEach((({outStatisticFieldName:e})=>{if(e){const t=e.toLowerCase();t&&t in r&&e!==t&&(r[e]=r[t],delete r[t])}}))})),r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,C.Wq)(this.layer.url))return"unavailable";const e=(0,f.kn)(this.layer.url,"status"),t=await(0,n.c)(e,{query:{f:"json"}});return V.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:a}=await r.e(9920).then(r.bind(r,59920));return a(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const r=(await(0,n.c)(e,t)).data.statusUrl;for(;;){const e=(await(0,n.c)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,n.c)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new u.c("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new u.c("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,y.iV)(H)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const r={};(0,l.c)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());const{data:a}=await(0,n.c)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=a}this.sourceJSON=await this._patchServiceJSON(e,t?.signal);const r=e.type;if(!P.has(r))throw new u.c("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,k.w7)(e.geometryType).renderer;(0,h.qQ)("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{const{data:r}=await(0,n.c)(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){(0,y.CE)(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const r=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const a=new Array,s=new Map;for(const e of r){const{geometry:t}=e,{vertexSpace:r}=t;if((0,F.k$)(r))a.push(t);else{const r=(0,F.wX)(t);s.set(r,t),e.geometry=r,a.push(r)}}await this.uploadAssets(a);for(const[e,t]of s)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(r),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,a=this.layer.parsedUrl;for(const s of e){const e=s.geometry,{metadata:n}=e,i=n.getExternalSourcesOnService(a),o=s.getAttribute(r);if(0===i.length){p.c.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=i.find(S.mK)??i[0];for(const e of u)1===e.parts.length?t.push({globalId:(0,g.cf)(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:[]}):p.c.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,a=[];let s=null;if(Array.isArray(t))for(const e of t)a.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(s={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else s=t;const n=function(e){const t=e?.assetMaps;if(t){for(const e of t.addResults)e.success||p.c.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of t.updateResults)e.success||p.c.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const r=e?.attachments,a={addFeatureResults:e?.addResults?.map(M)??[],updateFeatureResults:e?.updateResults?.map(M)??[],deleteFeatureResults:e?.deleteResults?.map(M)??[],addAttachmentResults:r?.addResults?r.addResults.map(M):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(M):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(M):[]};return e?.editMoment&&(a.editMoment=e.editMoment),a}(s);if(a.length>0){n.editedFeatureResults=[];for(const e of a){const{editedFeatures:t}=e,r=t?.spatialReference?new Q.c(t.spatialReference):null;n.editedFeatureResults.push({layerId:e.id,editedFeatures:T(t,r)})}}return n}_createAttachmentErrorResult(e,t){const r=t.details.messages?.[0]||t.message,a=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new u.c("feature-layer-source:attachment-failure",r,{code:a})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const a=t[e];null!=a&&(r.set?r.set(e,a):r.append(e,a))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:a}=this.layer;return{...e,query:{gdbVersion:r,layer:a?JSON.stringify({source:a}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:r,infoFor3D:a,parsedUrl:s}=t;if(null==a||null==r)return e;const n=(0,B.Mn)(a);if(null==n)return e;const i=(0,f.kn)(s.path,`../${n.id}`),u=new Array,l=new Array;for(const t of e)t.geometry.metadata.getExternalSourcesOnService(s).length>0?l.push(t):u.push(t);const d=l.map((e=>e.getAttribute(r))).filter(o.G6);if(0===d.length)return e;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=a,h=new D.c;h.where=`${c} IN (${d.map((e=>`'${e}'`))})`,h.outFields=[p,c],h.returnGeometry=!1;const y=await(0,G.c)(i,h),{features:g}=y;return 0===g.length?e:[...u,...l.filter((e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:a}=e.geometry,n=g.filter((e=>e.getAttribute(c)===t));if(0===n.length)return!0;const i=n.map((e=>e.getAttribute(p)));return a.getExternalSourcesOnService(s).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>i.every((t=>e!==t))))}))]}};(0,a._)([(0,m.qq)()],z.prototype,"type",void 0),(0,a._)([(0,m.qq)({constructOnly:!0})],z.prototype,"layer",void 0),(0,a._)([(0,m.qq)({readOnly:!0})],z.prototype,"queryTask",null),z=(0,a._)([(0,w.c)("esri.layers.graphics.sources.FeatureLayerSource")],z);const H=1e3,W=z},17724:(e,t,r)=>{r.d(t,{G4:()=>p,GA:()=>d,QD:()=>c,w7:()=>o});var a=r(9456),s=r(62088),n=r(13136),i=r(9504);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.qe:"esriGeometryPolyline"===e?i.MZ:i.yq}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,a.c)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const a=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new a}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.ct)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.u,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7752],{25228:(e,t,r)=>{r.d(t,{c:()=>m});var i,n=r(41948),s=r(40504),a=r(94360),l=r(1580),o=(r(9456),r(66360),r(72052),r(33600)),u=r(12552),c=r(18996),p=r(28484);let d=i=class extends s.am{static get allTime(){return h}static get empty(){return y}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=p.OX){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,a.aU)(r,e,t));let n=this.end;if(n){const r=(0,a.aU)(n,e,t);n=n.getTime()===r.getTime()?r:(0,a.g1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let a,l;if(n>=t&&n<=r?a=n:t>=n&&t<=s&&(a=t),r>=n&&r<=s?l=r:s>=t&&s<=r&&(l=s),null!=a&&null!=l&&!isNaN(a)&&!isNaN(l)){const e=new i;return e.start=a===-1/0?null:new Date(a),e.end=l===1/0?null:new Date(l),e}return i.empty}offset(e,t,r=p.OX){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:l}=this;return null!=s&&(n.start=(0,a.g1)(s,e,t,r)),null!=l&&(n.end=(0,a.g1)(l,e,t,r)),n}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n._)([(0,l.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n._)([(0,o.E)("end")],d.prototype,"readEnd",null),(0,n._)([(0,c.G)("end")],d.prototype,"writeEnd",null),(0,n._)([(0,l.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n._)([(0,l.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n._)([(0,l.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n._)([(0,o.E)("start")],d.prototype,"readStart",null),(0,n._)([(0,c.G)("start")],d.prototype,"writeStart",null),d=i=(0,n._)([(0,u.c)("esri.TimeExtent")],d);const h=new d,y=new d({start:void 0,end:void 0}),m=d},22156:(e,t,r)=>{r.d(t,{MR:()=>a,qm:()=>l});var i=r(41948),n=r(12552);let s=0;const a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return t=(0,i._)([(0,n.c)("esri.core.Identifiable")],t),t},l=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return t=(0,i._)([(0,n.c)("esri.core.NumericIdentifiable")],t),t};let o=class extends(a(class{})){};o=(0,i._)([(0,n.c)("esri.core.Identifiable")],o)},71316:(e,t,r)=>{r.r(t),r.d(t,{default:()=>P});var i=r(41948),n=r(2600),s=r(20744),a=r(66360),l=r(53648),o=r(26496),u=r(10860),c=r(1580),p=(r(9456),r(72052),r(12552)),d=r(98472),h=r(62484),y=r(22080),m=r(95247),f=r(56156),g=r(62880),v=r(81436),_=r(38724),q=r(16660),w=r(28584),b=r(66576),x=r(98768),I=r(3116),S=r(21488),E=r(69204);let T=class extends((0,q.u)((0,b.Y)((0,x.K)((0,I.I)((0,o.U)((0,w.G)((0,_.C)(v.c)))))))){constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.spatialReference=new f.c({wkid:4326,vcsWkid:115700}),this.fullExtent=new m.c(-180,-90,180,90,this.spatialReference),this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}_verifyArray(e,t){if(!Array.isArray(e)||e.length<t)return!1;for(const t of e)if("number"!=typeof t)return!1;return!0}_initFullExtent(e){const t=e.root?.boundingVolume;if(!t)return;if(t.box){const e=t?.box;if(e[3]>7972671&&e[7]>7972671&&e[11]>7945940)return}const r=e.root?.transform,i=(0,h.Su)();if(t.region&&this._verifyArray(t.region,6)){const e=t.region,r=(0,l.UB)(e[0]),i=(0,l.UB)(e[1]),n=e[4],s=(0,l.UB)(e[2]),a=(0,l.UB)(e[3]),o=e[5];this.fullExtent=new m.c({xmin:r,ymin:i,zmin:n,xmax:s,ymax:a,zmax:o,spatialReference:this.spatialReference})}else if(t.sphere&&this._verifyArray(t.sphere,4)){const e=t.sphere,n=(0,h.WK)(e[0],e[1],e[2]),s=e[3]/Math.sqrt(3),a=(0,h.Su)();(0,d.f)(a,n,(0,h.WK)(-s,-s,-s));const l=(0,h.Su)();if((0,d.g)(l,n,(0,h.WK)(s,s,s)),r&&this._verifyArray(r,16)){const e=r;(0,d.e)(i,a,e),(0,d.c)(a,i),(0,d.e)(i,l,e),(0,d.c)(l,i)}(0,g.projectBuffer)(a,y.MJ,0,a,f.c.WGS84,0,1),(0,g.projectBuffer)(l,y.MJ,0,l,f.c.WGS84,0,1);const o=(0,h.Su)(),u=(0,h.Su)();(0,d.y)(o,a,l),(0,d.C)(u,a,l),this.fullExtent=new m.c({xmin:o[0],ymin:o[1],zmin:o[2],xmax:u[0],ymax:u[1],zmax:u[2],spatialReference:this.spatialReference})}else if(t.box&&this._verifyArray(t.box,12)){const e=t.box,i=(0,h.WK)(e[0],e[1],e[2]),n=(0,h.WK)(e[3],e[4],e[5]),s=(0,h.WK)(e[6],e[7],e[8]),a=(0,h.WK)(e[9],e[10],e[11]),l=[];for(let e=0;e<8;++e)l.push((0,h.Su)());if((0,d.g)(l[0],i,n),(0,d.g)(l[0],l[0],s),(0,d.g)(l[0],l[0],a),(0,d.z)(l[1],i,n),(0,d.g)(l[1],l[1],s),(0,d.g)(l[1],l[1],a),(0,d.g)(l[2],i,n),(0,d.z)(l[2],l[2],s),(0,d.g)(l[2],l[2],a),(0,d.z)(l[3],i,n),(0,d.z)(l[3],l[3],s),(0,d.g)(l[3],l[3],a),(0,d.g)(l[4],i,n),(0,d.g)(l[4],l[4],s),(0,d.z)(l[4],l[4],a),(0,d.z)(l[5],i,n),(0,d.g)(l[5],l[5],s),(0,d.z)(l[5],l[5],a),(0,d.g)(l[6],i,n),(0,d.z)(l[6],l[6],s),(0,d.z)(l[6],l[6],a),(0,d.z)(l[7],i,n),(0,d.z)(l[7],l[7],s),(0,d.z)(l[7],l[7],a),r&&this._verifyArray(r,16)){const e=r;for(let t=0;t<8;++t)(0,d.e)(l[t],l[t],e)}const o=(0,h.WK)(Number.MIN_VALUE,Number.MIN_VALUE,Number.MIN_VALUE),u=(0,h.WK)(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let e=0;e<8;++e)(0,g.projectBuffer)(l[e],y.MJ,0,l[e],f.c.WGS84,0,1),(0,d.y)(u,u,l[e]),(0,d.C)(o,o,l[e]);this.fullExtent=new m.c({xmin:u[0],ymin:u[1],zmin:u[2],xmax:o[0],ymax:o[1],zmax:o[2],spatialReference:this.spatialReference})}}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=null!=e?e.signal:null;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new s.c("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(e){(0,u.CE)(e)}if(this.url){const e=(0,n.c)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t}).then((e=>{this._initFullExtent(e.data)}),(e=>{(0,u.CE)(e)}));await e}}async fetchAttributionData(){return this.load().then((()=>({})))}_validateElevationInfo(){const e=this.elevationInfo,t="Integrated mesh 3d tiles layers";(0,E.A$)(a.c.getLogger(this),(0,E.Ez)(t,"absolute-height",e)),(0,E.A$)(a.c.getLogger(this),(0,E.W8)(t,e))}};(0,i._)([(0,c.qq)({type:["IntegratedMesh3DTilesLayer"]})],T.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.qq)({type:f.c})],T.prototype,"spatialReference",void 0),(0,i._)([(0,c.qq)({type:m.c})],T.prototype,"fullExtent",void 0),(0,i._)([(0,c.qq)(S.Kg)],T.prototype,"elevationInfo",null),(0,i._)([(0,c.qq)({type:["show","hide"]})],T.prototype,"listMode",void 0),(0,i._)([(0,c.qq)(S.qW)],T.prototype,"url",void 0),(0,i._)([(0,c.qq)({readOnly:!0})],T.prototype,"type",void 0),(0,i._)([(0,c.qq)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],T.prototype,"path",void 0),(0,i._)([(0,c.qq)({type:Number,json:{origins:{"web-scene":{name:"layerDefinition.minScale",write:()=>{},read:()=>{}},"portal-item":{name:"layerDefinition.minScale",write:()=>{},read:()=>{}}}}})],T.prototype,"minScale",void 0),(0,i._)([(0,c.qq)({type:Number,json:{origins:{"web-scene":{name:"layerDefinition.maxScale",write:()=>{},read:()=>{}},"portal-item":{name:"layerDefinition.maxScale",write:()=>{},read:()=>{}}}}})],T.prototype,"maxScale",void 0),T=(0,i._)([(0,p.c)("esri.layers.IntegratedMesh3DTilesLayer")],T);const P=T},81436:(e,t,r)=>{r.d(t,{c:()=>_});var i=r(41948),n=(r(60708),r(2600)),s=r(20744),a=r(77860),l=r(22156),o=r(95800),u=r(66360),c=r(10860),p=r(28176),d=r(1580),h=(r(9456),r(72052),r(12552)),y=r(6220),m=r(95247),f=r(56156);let g=0,v=class extends(a.c.EventedMixin((0,l.MR)(o.c))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.c(-180,-90,180,90,f.c.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.c.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(9232).then(r.bind(r,69232))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(2259).then(r.bind(r,12259));try{return await i(t)}catch(e){const r=t&&t.portalItem,i=r?.id||"unset",n=r&&r.portal&&r.portal.url||y.default.portalUrl;throw u.c.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,c.mA)(e)||u.c.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,p.as)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.c)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.c("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.qq)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.qq)({type:m.c})],v.prototype,"fullExtent",void 0),(0,i._)([(0,d.qq)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,d.qq)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i._)([(0,d.qq)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,d.qq)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,d.qq)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,d.qq)({clonable:!1})],v.prototype,"parent",void 0),(0,i._)([(0,d.qq)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,d.qq)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.qq)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,d.qq)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,d.qq)({type:f.c})],v.prototype,"spatialReference",void 0),(0,i._)([(0,d.qq)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,d.qq)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,d.qq)()],v.prototype,"url",void 0),(0,i._)([(0,d.qq)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,h.c)("esri.layers.Layer")],v);const _=v},38724:(e,t,r)=>{r.d(t,{C:()=>a});var i=r(41948),n=r(1580),s=(r(9456),r(66360),r(72052),r(12552));const a=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,n.qq)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,s.c)("esri.layers.mixins.APIKeyMixin")],t),t}},16660:(e,t,r)=>{r.d(t,{u:()=>o});var i=r(41948),n=r(66360),s=r(1580),a=(r(9456),r(72052),r(12552)),l=r(48212);const o=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.K0)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.oR)(e,n.c.getLogger(this)))}};return(0,i._)([(0,s.qq)()],t.prototype,"title",null),(0,i._)([(0,s.qq)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,a.c)("esri.layers.mixins.ArcGISService")],t),t}},28584:(e,t,r)=>{r.d(t,{G:()=>a});var i=r(41948),n=r(1580),s=(r(9456),r(66360),r(72052),r(12552));const a=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.qq)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,s.c)("esri.layers.mixins.CustomParametersMixin")],t),t}},98768:(e,t,r)=>{r.d(t,{K:()=>b});var i=r(41948),n=r(6220),s=r(47620),a=r(2600),l=r(40196),o=r(20744),u=r(66360),c=r(70680),p=r(10860),d=r(28176),h=r(1580),y=(r(9456),r(72052),r(33600)),m=r(12552),f=r(18996),g=r(71068),v=r(54872),_=r(9764),q=r(53039),w=r(46940);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.mG)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new _.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(8828),r.e(4132)]).then(r.bind(r,94132));return(0,p.wp)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.mA)(e)||u.c.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.CE)(e),!0))))}async setUserPrivileges(e,t){if(!n.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,p.CE)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,w.CI)(r);let n,a;if(i)n=r.portal.url;else try{n=await(0,g.mK)(this.url,t)}catch(e){(0,p.CE)(e)}if(!n||!(0,d.Cs)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.CE)(e)}if(!a)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new _.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,w.CI)(r)}catch(e){(0,p.CE)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.CE)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.c.getDefault();if(n&&n.loaded&&(0,d.k7)(n.restUrl)===(0,d.k7)(i))return n.user;const o=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,l.aG)((0,a.c)(o,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?q.c.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.c.getDefault());return r&&i&&!(0,d.kF)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new o.c("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.qq)({type:_.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.E)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.G)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.qq)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.c)("esri.layers.mixins.PortalLayer")],t),t},x={credential:null,user:null}},3116:(e,t,r)=>{r.d(t,{I:()=>a});var i=r(41948),n=r(1580),s=(r(9456),r(66360),r(72052),r(12552));const a=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,n.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,n.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,n.qq)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,s.c)("esri.layers.mixins.ScaleRangeLayer")],t),t}},69204:(e,t,r)=>{function i(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?o:u}(e).mode}(null!=e&&e.hasZ,t)}function n(e,t,r){return r&&r.mode!==t?`${e} only support ${t} elevation mode`:null}function s(e,t,r){return r?.mode===t?`${e} do not support ${t} elevation mode`:null}function a(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function l(e,t){t&&e.warn(".elevationInfo=",t)}r.d(t,{A$:()=>l,Ez:()=>n,W8:()=>a,ay:()=>s,m6:()=>i}),r(24296),r(35764);const o={mode:"absolute-height",offset:0},u={mode:"on-the-ground",offset:null}}}]);
|
|
@@ -250,7 +250,7 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
250
250
|
|
|
251
251
|
fragOcclusion = A;
|
|
252
252
|
}
|
|
253
|
-
`),e}function p(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const v=(0,o.Su)(),g=Object.freeze(Object.defineProperty({__proto__:null,build:f,getRadius:p},Symbol.toStringTag,{value:"Module"}))},52404:(e,t,r)=>{r.d(t,{S:()=>p,b:()=>f});var i=r(98472),o=r(99556),a=r(22340),n=r(79216),s=r(48688),l=r(95464),c=r(60288),d=r(14920),u=r(83028),h=r(49916);const m=4;function f(){const e=new d.i0,t=e.fragment;e.include(o.Y);const r=(m+1)/2,f=1/(2*r*r);return t.include(a.W),t.uniforms.add(new h.W("depthMap",(e=>e.depthTexture)),new u.y("tex",(e=>e.colorTexture)),new n.O("blurSize",(e=>e.blurSize)),new l.d("projScale",((e,t)=>{const r=(0,i.
|
|
253
|
+
`),e}function p(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const v=(0,o.Su)(),g=Object.freeze(Object.defineProperty({__proto__:null,build:f,getRadius:p},Symbol.toStringTag,{value:"Module"}))},52404:(e,t,r)=>{r.d(t,{S:()=>p,b:()=>f});var i=r(98472),o=r(99556),a=r(22340),n=r(79216),s=r(48688),l=r(95464),c=r(60288),d=r(14920),u=r(83028),h=r(49916);const m=4;function f(){const e=new d.i0,t=e.fragment;e.include(o.Y);const r=(m+1)/2,f=1/(2*r*r);return t.include(a.W),t.uniforms.add(new h.W("depthMap",(e=>e.depthTexture)),new u.y("tex",(e=>e.colorTexture)),new n.O("blurSize",(e=>e.blurSize)),new l.d("projScale",((e,t)=>{const r=(0,i.q)(t.camera.eye,t.camera.center);return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale})),new s.$("nearFar",((e,t)=>t.camera.nearFar))),t.code.add(c.Y`
|
|
254
254
|
void blurFunction(vec2 uv, float r, float center_d, float sharpness, inout float wTotal, inout float bTotal) {
|
|
255
255
|
float c = texture(tex, uv).r;
|
|
256
256
|
float d = linearDepthFromTexture(depthMap, uv, nearFar);
|
|
@@ -277,7 +277,7 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
277
277
|
|
|
278
278
|
fragBlur = b / w_total;
|
|
279
279
|
}
|
|
280
|
-
`),e}const p=Object.freeze(Object.defineProperty({__proto__:null,build:f},Symbol.toStringTag,{value:"Module"}))},84752:(e,t,r)=>{r.d(t,{a:()=>T,c:()=>x,d:()=>v,f:()=>b,g:()=>E,i:()=>w,n:()=>L}),r(9456);var i=r(66360),o=r(53648),a=r(15008),n=r(98472),s=r(62484),l=r(74784),c=r(37008),d=r(47364),u=r(82315),h=r(90484),m=r(48880),f=r(20136);const p=v();function v(){return(0,c.Su)()}const g=l.e,_=l.e;function x(e,t){return(0,l.c)(t,e)}function T(e){return e[3]}function E(e){return e}function b(e,t,r,i){return(0,c.WK)(e,t,r,i)}function S(e,t,r){if(null==t)return!1;if(!y(e,t,A))return!1;let{t0:i,t1:o}=A;if((i<0||o<i&&o>0)&&(i=o),i<0)return!1;if(r){const{origin:e,direction:o}=t;r[0]=e[0]+o[0]*i,r[1]=e[1]+o[1]*i,r[2]=e[2]+o[2]*i}return!0}const A={t0:0,t1:0};function y(e,t,r){const{origin:i,direction:o}=t,a=C;a[0]=i[0]-e[0],a[1]=i[1]-e[1],a[2]=i[2]-e[2];const n=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===n)return!1;const s=2*(o[0]*a[0]+o[1]*a[1]+o[2]*a[2]),l=s*s-4*n*(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]-e[3]*e[3]);if(l<0)return!1;const c=Math.sqrt(l);return r.t0=(-s-c)/(2*n),r.t1=(-s+c)/(2*n),!0}const C=(0,s.Su)();function w(e,t){return S(e,t,null)}function M(e,t,r){const i=f.Wq.get(),o=f.SW.get();(0,n.b)(i,t.origin,t.direction);const s=T(e);(0,n.b)(r,i,t.origin),(0,n.h)(r,r,1/(0,n.l)(r)*s);const l=I(e,t.origin),c=(0,m.i4)(t.origin,r);return(0,a.IT)(o,c+l,i),(0,n.e)(r,r,o),r}function R(e,t,r){const i=(0,n.f)(f.Wq.get(),t,e),o=(0,n.h)(f.Wq.get(),i,e[3]/(0,n.l)(i));return(0,n.g)(r,o,e)}function I(e,t){const r=(0,n.f)(f.Wq.get(),t,e),i=(0,n.l)(r),a=T(e),s=a+Math.abs(a-i);return(0,o.Uj)(a/s)}const O=(0,s.Su)();function N(e,t,r,i){const a=(0,n.f)(O,t,e);switch(r){case u.k.X:{const e=(0,o.Iv)(a,O)[2];return(0,n.s)(i,-Math.sin(e),Math.cos(e),0)}case u.k.Y:{const e=(0,o.Iv)(a,O),t=e[1],r=e[2],s=Math.sin(t);return(0,n.s)(i,-s*Math.cos(r),-s*Math.sin(r),Math.cos(t))}case u.k.Z:return(0,n.n)(i,a);default:return}}function P(e,t){const r=(0,n.f)(D,t,e);return(0,n.l)(r)-e[3]}function L(e,t){const r=(0,n.a)(e,t),i=T(e);return r<=i*i}const D=(0,s.Su)(),F=v();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:p,altitudeAt:P,angleToSilhouette:I,axisAt:N,clear:function(e){e[0]=e[1]=e[2]=e[3]=0},closestPoint:function(e,t,r){return S(e,t,r)?r:((0,h.CE)(t,e,r),R(e,r,r))},closestPointOnSilhouette:M,containsPoint:L,copy:x,create:v,distanceToSilhouette:function(e,t){const r=(0,n.f)(f.Wq.get(),t,e),i=(0,n.o)(r),o=e[3]*e[3];return Math.sqrt(Math.abs(i-o))},elevate:function(e,t,r){return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=e[3]+t,r},equals:_,exactEquals:g,fromCenterAndRadius:function(e,t){return(0,c.WK)(e[0],e[1],e[2],t)},fromRadius:function(e,t){return e[0]=e[1]=e[2]=0,e[3]=t,e},fromValues:b,getCenter:E,getRadius:T,intersectLine:function(e,t,r){const i=(0,h.i_)(t,r);if(!y(e,i,A))return[];const{origin:o,direction:a}=i,{t0:l,t1:c}=A,u=t=>{const r=(0,s.Su)();return(0,n.q)(r,o,a,t),R(e,r,r)};return Math.abs(l-c)<(0,d.Au)()?[u(l)]:[u(l),u(c)]},intersectRay:S,intersectRayClosestSilhouette:function(e,t,r){if(S(e,t,r))return r;const i=M(e,t,f.Wq.get());return(0,n.g)(r,t.origin,(0,n.h)(f.Wq.get(),t.direction,(0,n.p)(t.origin,i)/(0,n.l)(t.direction))),r},intersectsRay:w,projectPoint:R,setAltitudeAt:function(e,t,r,i){const o=P(e,t),a=N(e,t,u.k.Z,D),s=(0,n.h)(D,a,r-o);return(0,n.g)(i,t,s)},setExtent:function(e,t,r){return i.c.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),e!==r&&x(e,r),r},tmpSphere:F,union:function(e,t,r=(0,c.Su)()){const i=(0,n.p)(e,t),o=e[3],a=t[3];return i+a<o?((0,l.c)(r,e),r):i+o<a?((0,l.c)(r,t),r):((0,n.k)(r,e,t,(i+a-o)/(2*i)),r[3]=(i+o+a)/2,r)},wrap:function(e){return e}},Symbol.toStringTag,{value:"Module"}))},52180:(e,t,r)=>{r.d(t,{o:()=>o});var i=r(52324);class o{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.o)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*a);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,a));e++)this._items.push(this._allocator())}}const a=1024},95728:(e,t,r)=>{r.d(t,{a:()=>o});var i=r(20744);let o=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.c(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[o,a]=t.split("."),n=/^\s*\d+\s*$/;if(!o?.match||!n.test(o))throw new i.c((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!a?.match||!n.test(a))throw new i.c((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const s=parseInt(o,10),l=parseInt(a,10);return new e(s,l,r)}}},8472:(e,t,r)=>{function i(e){return e=e||globalThis.location.hostname,c.some((t=>null!=e?.match(t)))}function o(e,t){return e&&(t=t||globalThis.location.hostname)?null!=t.match(a)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(n)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e}r.d(t,{OM:()=>i,Ur:()=>o});const a=/^devext.arcgis.com$/,n=/^qaext.arcgis.com$/,s=/^[\w-]*\.mapsdevext.arcgis.com$/,l=/^[\w-]*\.mapsqa.arcgis.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local.esri.com$/,a,n,/^jsapps.esri.com$/,s,l]},38600:(e,t,r)=>{function i(){return new Float32Array(2)}function o(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function a(){return i()}function n(){return o(1,1)}function s(){return o(1,0)}function l(){return o(0,1)}r.d(t,{Qw:()=>d,Su:()=>i,WK:()=>o,cX:()=>c});const c=a(),d=n(),u=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:u,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,createView:function(e,t){return new Float32Array(e,t,2)},fromValues:o,ones:n,unitX:s,unitY:l,zeros:a},Symbol.toStringTag,{value:"Module"}))},92896:(e,t,r)=>{r.d(t,{mc:()=>o});var i=r(72008);function o(e,t=!1){return e<=i._?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}},90484:(e,t,r)=>{r.d(t,{CE:()=>d,Su:()=>n,em:()=>l,i_:()=>c}),r(92400);var i=r(52180),o=r(98472),a=r(62484);function n(e){return e?s((0,a.ct)(e.origin),(0,a.ct)(e.direction)):s((0,a.Su)(),(0,a.Su)())}function s(e,t){return{origin:e,direction:t}}function l(e,t){const r=u.get();return r.origin=e,r.direction=t,r}function c(e,t,r=n()){return(0,o.c)(r.origin,e),(0,o.f)(r.direction,t,e),r}function d(e,t,r){const i=(0,o.j)(e.direction,(0,o.f)(r,t,e.origin));return(0,o.g)(r,e.origin,(0,o.h)(r,e.direction,i)),r}r(20136);const u=new i.o((()=>n()))},96472:(e,t,r)=>{r.d(t,{fetch:()=>jt});var i=r(8472),o=r(77556),a=r(68612),n=r(15008),s=r(87104),l=r(85256),c=r(98472),d=r(62484),u=r(77048),h=r(92896),m=r(71004),f=r(48952),p=r(92160),v=r(12240),g=r(88340),_=r(74960),x=r(57792),T=r(68268),E=r(2888),b=r(5472),S=r(38600);function A(e){if(null==e)return null;const t=null!=e.offset?e.offset:S.cX,r=null!=e.rotation?e.rotation:0,i=null!=e.scale?e.scale:S.Qw,n=(0,a.WK)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.WK)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,a.WK)(i[0],0,0,0,i[1],0,0,0,1),c=(0,a.Su)();return(0,o.iW)(c,s,l),(0,o.iW)(c,n,c),c}class y{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new y,this.numberOfVertices=0}}var w=r(2600),M=r(40196),R=r(33184),I=r(20744),O=r(66360);class N{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get(e,t){return this._outer.get(e)?.get(t)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}forEach(e){this._outer.forEach(((t,r)=>e(t,r)))}}var P=r(10860),L=r(95728),D=r(97143);async function F(e,t){const{data:r}=await(0,w.c)(e,{responseType:"image",...t});return r}var U=r(89560),G=r(12260),B=r(71520),V=r(9456),z=r(77860),Y=r(70680),H=r(72008),W=r(28176),j=r(49628),q=r(24832);let K;var k,$;($=k||(k={}))[$.ETC1_RGB=0]="ETC1_RGB",$[$.ETC2_RGBA=1]="ETC2_RGBA",$[$.BC1_RGB=2]="BC1_RGB",$[$.BC3_RGBA=3]="BC3_RGBA",$[$.BC4_R=4]="BC4_R",$[$.BC5_RG=5]="BC5_RG",$[$.BC7_M6_RGB=6]="BC7_M6_RGB",$[$.BC7_M5_RGBA=7]="BC7_M5_RGBA",$[$.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",$[$.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",$[$.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",$[$.ATC_RGB=11]="ATC_RGB",$[$.ATC_RGBA=12]="ATC_RGBA",$[$.FXT1_RGB=17]="FXT1_RGB",$[$.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",$[$.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",$[$.ETC2_EAC_R11=20]="ETC2_EAC_R11",$[$.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",$[$.RGBA32=13]="RGBA32",$[$.RGB565=14]="RGB565",$[$.BGR565=15]="BGR565",$[$.RGBA4444=16]="RGBA4444";var X=r(77800),J=r(22184),Z=r(97684);let Q=null,ee=null;async function te(){return null==ee&&(ee=function(){if(null==K){const e=e=>(0,q.O)(`esri/libs/basisu/${e}`);K=r.e(4824).then(r.bind(r,84824)).then((e=>e.b)).then((({default:t})=>t({locateFile:e}).then((e=>(e.initializeBasis(),delete e.then,e)))))}return K}(),Q=await ee),ee}function re(e,t,r,i,o){const a=(0,Z.O4)(t?X.sr.COMPRESSED_RGBA8_ETC2_EAC:X.sr.COMPRESSED_RGB8_ETC2),n=o&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*a*n)}function ie(e){return e.getNumImages()>=1&&!e.isUASTC()}function oe(e){return e.getFaces()>=1&&e.isETC1S()}function ae(e,t,r,i,o,a,n,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?i?[k.ETC2_RGBA,X.sr.COMPRESSED_RGBA8_ETC2_EAC]:[k.ETC1_RGB,X.sr.COMPRESSED_RGB8_ETC2]:c?i?[k.BC3_RGBA,X.sr.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[k.BC1_RGB,X.sr.COMPRESSED_RGB_S3TC_DXT1_EXT]:[k.RGBA32,X.Id.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(n(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.width=o,t.height=a,new J.w(e,t,{type:"compressed",levels:m})}var ne=r(58608),se=r(74376);const le=()=>O.c.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function ce(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const de=ce("DXT1"),ue=ce("DXT3"),he=ce("DXT5");function me(e,t,r){if(e instanceof ImageData)return me(fe(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}function fe(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new I.c("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}var pe,ve,ge=r(90736),_e=r(51576);class xe extends ne.u{get parameters(){return this._parameters}constructor(e,t){super(),this._data=e,this.type=se.C.Texture,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this.events=new z.c,this._parameters={...Ee,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(e){null!=e&&(e instanceof HTMLVideoElement?(this.frameUpdate=t=>this._frameUpdate(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e))}_startPreloadVideoElement(e){if(!((0,W.ue)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=!e.paused;if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()};e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,W.o9)(e.src)||(0,W.ue)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new _e.O;return t.wrapMode=this._parameters.wrap??X.Qz.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture}get memoryEstimate(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,H.uk)(e)||(0,H.K2)(e))return t.encoding===G.yk.KTX2_ENCODING?function(e,t){if(null==Q)return e.byteLength;const r=new Q.KTX2File(new Uint8Array(e)),i=oe(r)?re(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===G.yk.BASIS_ENCODING?function(e,t){if(null==Q)return e.byteLength;const r=new Q.BasisFile(new Uint8Array(e)),i=ie(r)?re(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?Te(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._glTexture)return this._glTexture;if(this._loadingPromise)return this._loadingPromise;const t=this._data;return null==t?(this._glTexture=new J.w(e,this._createDescriptor(e),null),this._glTexture):(this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.DDS_ENCODING?this._loadFromDDSData(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.BASIS_ENCODING?this._loadFromBasis(e,t):(0,H.K2)(t)?this._loadFromPixelData(e,t):(0,H.uk)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<pe.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e,0,31);if(542327876!==r[0])return le().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return le().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let o,a;switch(i){case de:o=8,a=X.sr.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case ue:o=16,a=X.sr.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case he:o=16,a=X.sr.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return le().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let n=1,s=r[4],l=r[3];0==(3&s)&&0==(3&l)||(le().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,d=l;let u,h;131072&r[2]&&!1!==t&&(n=Math.max(1,r[7]));let m=r[1]+4;const f=[];for(let t=0;t<n;++t)h=(s+3>>2)*(l+3>>2)*o,u=new Uint8Array(e,m,h),f.push(u),m+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:f},internalFormat:a,width:c,height:d}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:o,internalFormat:a,width:n,height:s}=i;return t.samplingMode=o.levels.length>1?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.hasMipmap=o.levels.length>1,t.internalFormat=a,t.width=n,t.height=s,new J.w(e,t,o)}(e,this._createDescriptor(e),t),this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==Q&&(Q=await te());const i=new Q.KTX2File(new Uint8Array(r));if(!oe(i))return null;i.startTranscoding();const o=ae(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==Q&&(Q=await te());const i=new Q.BasisFile(new Uint8Array(r));if(!ie(i))return null;i.startTranscoding();const o=ae(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,ge.Uc)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?X.Id.LUMINANCE:3===this._parameters.components?X.Id.RGB:X.Id.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new J.w(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await F(t,{signal:r});return(0,P.wp)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,j.wx)(t,t.src,!1,r);return(0,P.wp)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=pe.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((i,o)=>{const a=()=>{t.removeEventListener("loadeddata",n),t.removeEventListener("error",s),(0,Y.oR)(l)},n=()=>{t.readyState>=pe.HAVE_CURRENT_DATA&&(a(),i(this._loadFromImage(e,t)))},s=e=>{a(),o(e||new I.c("Failed to load video"))};t.addEventListener("loadeddata",n),t.addEventListener("error",s);const l=(0,P.wD)(r,(()=>s((0,P.Uh)())))}))))}_loadFromImage(e,t){let r=t;if(!(r instanceof HTMLVideoElement)){const{maxTextureSize:t}=e.parameters;r=this._parameters.downsampleUncompressed?function(e,t){let r=e.width*e.height;if(r<4096)return e instanceof ImageData?fe(e):e;let i=e.width,o=e.height;do{i=Math.ceil(i/2),o=Math.ceil(o/2),r=i*o}while(r>1048576||null!=t&&(i>t||o>t));return me(e,i,o)}(r,t):function(e,t){const r=Math.max(e.width,e.height);if(r<=t)return e;const i=t/r;return me(e,Math.round(e.width*i),Math.round(e.height*i))}(r,t)}const i=Te(r);this._parameters.width=i.width,this._parameters.height=i.height;const o=this._createDescriptor(e);return o.pixelFormat=3===this._parameters.components?X.Id.RGB:X.Id.RGBA,o.width=i.width,o.height=i.height,this._glTexture=new J.w(e,o,r),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)};return r.then(i,i),r}unload(){if(this._glTexture=(0,Y.yI)(this._glTexture),null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}function Te(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(ve=pe||(pe={}))[ve.HAVE_NOTHING=0]="HAVE_NOTHING",ve[ve.HAVE_METADATA=1]="HAVE_METADATA",ve[ve.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",ve[ve.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",ve[ve.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA";const Ee={wrap:{s:X.Qz.REPEAT,t:X.Qz.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1};var be=r(4636),Se=r(21288),Ae=r(72364),ye=r(80324),Ce=r(88196),we=r(58472),Me=r(81832),Re=r(10375),Ie=r(81048),Oe=r(56336),Ne=r(81472);const Pe=(0,Ne.ac)(X.w$.SRC_ALPHA,X.w$.ONE,X.w$.ONE_MINUS_SRC_ALPHA,X.w$.ONE_MINUS_SRC_ALPHA),Le=(0,Ne.KO)(X.w$.ONE,X.w$.ONE),De=(0,Ne.KO)(X.w$.ZERO,X.w$.ONE_MINUS_SRC_ALPHA);function Fe(e){return e===Oe.H.FrontFace?null:e===Oe.H.Alpha?De:Le}const Ue={factor:-1,units:-2};function Ge(e,t=X.et.LESS){return e===Oe.H.NONE||e===Oe.H.FrontFace?t:X.et.LEQUAL}var Be=r(40328),Ve=r(84752),ze=r(29244);const Ye=new class{constructor(e=0){this.offset=e,this.sphere=(0,Ve.d)(),this.tmpVertex=(0,d.Su)()}applyToVertex(e,t,r){const i=this.objectTransform.transform,o=(0,c.s)(He,e,t,r),a=(0,c.e)(o,o,i),n=this.offset/(0,c.l)(a);(0,c.q)(a,a,a,n);const s=this.objectTransform.inverse;return(0,c.e)(this.tmpVertex,a,s),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,c.l)(e);(0,c.q)(e,e,e,r);const i=this.offset/(0,c.l)(t);(0,c.q)(t,t,t,i)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,c.l)((0,Ve.g)(e)),r=this.offset/t;return(0,c.q)((0,Ve.g)(this.sphere),(0,Ve.g)(e),(0,Ve.g)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,d.Su)(),this._tmpMbs=(0,Ve.d)(),this._tmpObb=new ze.Eb,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,c.l)(e)}applyToVertex(e,t,r){const i=(0,c.s)(He,e,t,r),o=(0,c.s)(We,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,c.l)(o);return(0,c.q)(this._tmpVertex,i,o,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],o=e[2]+t,a=e[3],n=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(i),d=Math.abs(o),u=Math.abs(a),h=Math.abs(n),m=Math.abs(s),f=.5*(1+Math.sign(r*a))*Math.min(l,u),p=.5*(1+Math.sign(i*n))*Math.min(c,h),v=.5*(1+Math.sign(o*s))*Math.min(d,m),g=Math.max(l,u),_=Math.max(c,h),x=Math.max(d,m),T=Math.sqrt(f*f+p*p+v*v),E=Math.sign(l+r),b=Math.sign(c+i),S=Math.sign(d+o),A=Math.sign(u+a),y=Math.sign(h+n),C=Math.sign(m+s),w=this._totalOffset;if(T<w)return e[0]-=(1-E)*w,e[1]-=(1-b)*w,e[2]-=(1-S)*w,e[3]+=A*w,e[4]+=y*w,e[5]+=C*w,e;const M=w/Math.sqrt(g*g+_*_+x*x),R=w/T,I=R-M,O=-I;return e[0]+=r*(E*O+R),e[1]+=i*(b*O+R),e[2]+=o*(S*O+R),e[3]+=a*(A*I+M),e[4]+=n*(y*I+M),e[5]+=s*(C*I+M),e}applyToMbs(e){const t=(0,c.l)((0,Ve.g)(e)),r=this._totalOffset/t;return(0,c.q)((0,Ve.g)(this._tmpMbs),(0,Ve.g)(e),(0,Ve.g)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,ze.er)(e,this._totalOffset,this._totalOffset,Se.UZ.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,d.Su)()}applyToVertex(e,t,r){const i=(0,c.s)(He,e,t,r),o=(0,c.g)(We,i,this.localOrigin),a=this.offset/(0,c.l)(o);return(0,c.q)(this.tmpVertex,i,o,a),this.tmpVertex}applyToAabb(e){const t=je,r=qe,i=Ke;for(let o=0;o<3;++o)t[o]=e[0+o]+this.localOrigin[o],r[o]=e[3+o]+this.localOrigin[o],i[o]=t[o];const o=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=o[t],e[t+3]=o[t];const a=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let o=0;o<3;++o)i[o]=0==(e&1<<o)?t[o]:r[o];a(i)}let n=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(n|=1<<e);if(0!==n&&7!==n)for(let e=0;e<8;++e)if(0==(n&e)){for(let o=0;o<3;++o)i[o]=0!=(n&1<<o)?0:0!=(e&1<<o)?t[o]:r[o];a(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const He=(0,d.Su)(),We=(0,d.Su)(),je=(0,d.Su)(),qe=(0,d.Su)(),Ke=(0,d.Su)();function ke(e,t,r){const{data:i,indices:o}=e,a=t.typedBuffer,n=t.typedBufferStride,s=o.length;r*=n;for(let e=0;e<s;++e){const t=2*o[e];a[r]=i[t],a[r+1]=i[t+1],r+=n}}function $e(e,t,r,i){const{data:o,indices:a}=e,n=t.typedBuffer,s=t.typedBufferStride,l=a.length;if(r*=s,null==i||1===i)for(let e=0;e<l;++e){const t=3*a[e];n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*a[e];for(let e=0;e<i;++e)n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],r+=s}}function Xe(e,t,r,i=1){const{data:o,indices:a}=e,n=t.typedBuffer,s=t.typedBufferStride,l=a.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=4*a[e];n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],n[r+3]=o[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*a[e];for(let e=0;e<i;++e)n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],n[r+3]=o[t+3],r+=s}}function Je(e,t,r,i,o=1){const a=t.typedBuffer,n=t.typedBufferStride;if(i*=n,1===o)for(let t=0;t<r;++t)a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=e[3],i+=n;else for(let t=0;t<r;++t)for(let t=0;t<o;++t)a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=e[3],i+=n}function Ze(e,t,r,i,o,a){switch(e){case be.K.POSITION:{(0,ge.Uc)(3===t.size);const i=o.getField(e,m.Yj);(0,ge.Uc)(!!i,`No buffer view for ${e}`),i&&function(e,t,r,i,o=1){if(!t)return void $e(e,r,i,o);const{data:a,indices:s}=e,l=r.typedBuffer,c=r.typedBufferStride,d=s.length,u=t[0],h=t[1],m=t[2],f=t[4],p=t[5],v=t[6],g=t[8],_=t[9],x=t[10],T=t[12],E=t[13],b=t[14];i*=c;let S=0,A=0,y=0;const C=(0,n.yp)(t)?e=>{S=a[e]+T,A=a[e+1]+E,y=a[e+2]+b}:e=>{const t=a[e],r=a[e+1],i=a[e+2];S=u*t+f*r+g*i+T,A=h*t+p*r+_*i+E,y=m*t+v*r+x*i+b};if(1===o)for(let e=0;e<d;++e)C(3*s[e]),l[i]=S,l[i+1]=A,l[i+2]=y,i+=c;else for(let e=0;e<d;++e){C(3*s[e]);for(let e=0;e<o;++e)l[i]=S,l[i+1]=A,l[i+2]=y,i+=c}}(t,r,i,a);break}case be.K.NORMAL:{(0,ge.Uc)(3===t.size);const r=o.getField(e,m.Yj);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&function(e,t,r,i,o=1){if(!t)return void $e(e,r,i,o);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],E=!(0,n.QT)(l),b=1e-6,S=1-b;i*=d;let A=0,y=0,C=0;const w=(0,n.yp)(l)?e=>{A=a[e],y=a[e+1],C=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];A=h*t+p*r+_*i,y=m*t+v*r+x*i,C=f*t+g*r+T*i};if(1===o)if(E)for(let e=0;e<u;++e){w(3*s[e]);const t=A*A+y*y+C*C;if(t<S&&t>b){const e=1/Math.sqrt(t);c[i]=A*e,c[i+1]=y*e,c[i+2]=C*e}else c[i]=A,c[i+1]=y,c[i+2]=C;i+=d}else for(let e=0;e<u;++e)w(3*s[e]),c[i]=A,c[i+1]=y,c[i+2]=C,i+=d;else for(let e=0;e<u;++e){if(w(3*s[e]),E){const e=A*A+y*y+C*C;if(e<S&&e>b){const t=1/Math.sqrt(e);A*=t,y*=t,C*=t}}for(let e=0;e<o;++e)c[i]=A,c[i+1]=y,c[i+2]=C,i+=d}}(t,i,r,a);break}case be.K.NORMALCOMPRESSED:{(0,ge.Uc)(2===t.size);const r=o.getField(e,m.iN);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&ke(t,r,a);break}case be.K.UV0:{(0,ge.Uc)(2===t.size);const r=o.getField(e,m.U7);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&ke(t,r,a);break}case be.K.COLOR:case be.K.SYMBOLCOLOR:{const r=o.getField(e,m.sb);(0,ge.Uc)(!!r,`No buffer view for ${e}`),(0,ge.Uc)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||function(e,t,r,i,o=1){const{data:a,indices:n}=e,s=r.typedBuffer,l=r.typedBufferStride,c=n.length;if(i*=l,t!==a.length||4!==t)if(1!==o)if(4!==t)for(let e=0;e<c;++e){const t=3*n[e];for(let e=0;e<o;++e)s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=255,i+=l}else for(let e=0;e<c;++e){const t=4*n[e];for(let e=0;e<o;++e)s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=a[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*n[e];s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=a[t+3],i+=l}return}for(let e=0;e<c;++e){const t=3*n[e];s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=255,i+=l}}else{s[i]=a[0],s[i+1]=a[1],s[i+2]=a[2],s[i+3]=a[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,n=e[i/=4];i+=t;const d=c*o;for(let r=1;r<d;++r)e[i]=n,i+=t}}(t,t.size,r,a);break}case be.K.COLORFEATUREATTRIBUTE:{const r=o.getField(e,m.AZ);(0,ge.Uc)(!!r,`No buffer view for ${e}`),(0,ge.Uc)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:i,indices:o}=e,a=t.typedBuffer,n=t.typedBufferStride,s=o.length,l=i[0];r*=n;for(let e=0;e<s;++e)a[r]=l,r+=n}(t,r,a);break}case be.K.TANGENT:{(0,ge.Uc)(4===t.size);const r=o.getField(e,m._5);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&function(e,t,r,i,o=1){if(!t)return void Xe(e,r,i,o);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],E=!(0,n.QT)(l),b=1e-6,S=1-b;if(i*=d,1===o)for(let e=0;e<u;++e){const t=4*s[e],r=a[t],o=a[t+1],n=a[t+2],l=a[t+3];let u=h*r+p*o+_*n,A=m*r+v*o+x*n,y=f*r+g*o+T*n;if(E){const e=u*u+A*A+y*y;if(e<S&&e>b){const t=1/Math.sqrt(e);u*=t,A*=t,y*=t}}c[i]=u,c[i+1]=A,c[i+2]=y,c[i+3]=l,i+=d}else for(let e=0;e<u;++e){const t=4*s[e],r=a[t],n=a[t+1],l=a[t+2],u=a[t+3];let A=h*r+p*n+_*l,y=m*r+v*n+x*l,C=f*r+g*n+T*l;if(E){const e=A*A+y*y+C*C;if(e<S&&e>b){const t=1/Math.sqrt(e);A*=t,y*=t,C*=t}}for(let e=0;e<o;++e)c[i]=A,c[i+1]=y,c[i+2]=C,c[i+3]=u,i+=d}}(t,i,r,a);break}case be.K.PROFILERIGHT:case be.K.PROFILEUP:case be.K.PROFILEVERTEXANDNORMAL:case be.K.FEATUREVALUE:{(0,ge.Uc)(4===t.size);const r=o.getField(e,m._5);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&Xe(t,r,a)}}}class Qe{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.attributes.get(be.K.POSITION).indices.length}write(e,t,r,i,o){!function(e,t,r,i,o,a){for(const n of t.fields.keys()){const t=e.attributes.get(n),s=t?.indices;if(t&&s)Ze(n,t,r,i,o,a);else if(n===be.K.OBJECTANDLAYERIDCOLOR&&null!=e.objectAndLayerIdColor){const t=e.attributes.get(be.K.POSITION)?.indices;if(t){const r=t.length,i=o.getField(n,m.sb);Je(e.objectAndLayerIdColor,i,r,a)}}}}(r,this.vertexBufferLayout,e,t,i,o)}}var et=r(22592),tt=r(37008),rt=r(55164),it=r(60072),ot=r(74072),at=r(74780),nt=r(93316),st=r(63524),lt=r(1492);X.et.LESS,X.et.ALWAYS;const ct={mask:255},dt={function:{func:X.et.ALWAYS,ref:G.Aj.OutlineVisualElementMask,mask:G.Aj.OutlineVisualElementMask},operation:{fail:X.QD.KEEP,zFail:X.QD.KEEP,zPass:X.QD.ZERO}},ut={function:{func:X.et.ALWAYS,ref:G.Aj.OutlineVisualElementMask,mask:G.Aj.OutlineVisualElementMask},operation:{fail:X.QD.KEEP,zFail:X.QD.KEEP,zPass:X.QD.REPLACE}};X.et.EQUAL,G.Aj.OutlineVisualElementMask,G.Aj.OutlineVisualElementMask,X.QD.KEEP,X.QD.KEEP,X.QD.KEEP,X.et.NOTEQUAL,G.Aj.OutlineVisualElementMask,G.Aj.OutlineVisualElementMask,X.QD.KEEP,X.QD.KEEP,X.QD.KEEP;const ht=[1,1,.5],mt=[0,.6,.2],ft=[0,1,.2];var pt=r(83840);class vt extends it.Yj{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=(0,d.eu)(ht),this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=G.CM.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=(0,d.WK)(0,0,0),this.instancedDoublePrecision=!1,this.normalType=Ce.g.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.shadowMappingEnabled=!1,this.ambient=(0,d.WK)(.2,.2,.2),this.diffuse=(0,d.WK)(.8,.8,.8),this.externalColor=(0,tt.WK)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,d.Su)(),this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=G.sr.Less,this.textureAlphaMode=G.OA.Blend,this.textureAlphaCutoff=ot.k,this.textureAlphaPremultiplied=!1,this.hasOccludees=!1,this.renderOccluded=Ie.C2.Occlude,this.isDecoration=!1}}it.yO;class gt extends nt.O{initializeConfiguration(e,t){t.spherical=e.viewingMode===Se.UZ.Global,t.doublePrecisionRequiresObfuscation=e.rctx.driverTest.doublePrecisionRequiresObfuscation.result,t.textureCoordinateType=t.hasColorTexture||t.hasMetallicRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture||t.hasNormalTexture?rt.i.Default:rt.i.None,t.objectAndLayerIdColorInstanced=t.instanced}initializeProgram(e){return this._initializeProgram(e,gt.shader)}_initializeProgram(e,t){return new lt.G(e.rctx,t.get().build(this.configuration),st.q)}_convertDepthTestFunction(e){return e===G.sr.Lequal?X.et.LEQUAL:X.et.LESS}_makePipeline(e,t){const r=this.configuration,i=e===Oe.H.NONE,o=e===Oe.H.FrontFace;return(0,Ne._w)({blending:r.output!==ye.mC.Color&&r.output!==ye.mC.Alpha||!r.transparent?null:i?Pe:Fe(e),culling:_t(r)?(0,Ne.AD)(r.cullFace):null,depthTest:{func:Ge(e,this._convertDepthTestFunction(r.customDepthTest))},depthWrite:(i||o)&&r.writeDepth?Ne.AT:null,colorWrite:Ne.kp,stencilWrite:r.hasOccludees?ct:null,stencilTest:r.hasOccludees?t?ut:dt:null,polygonOffset:i||o?null:(a=r.enableOffset,a?Ue:null)});var a}initializePipeline(){return this._occludeePipelineState=this._makePipeline(this.configuration.transparencyPassType,!0),this._makePipeline(this.configuration.transparencyPassType,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function _t(e){return e.cullFace!==G.CM.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}gt.shader=new at.O(pt.D,(()=>r.e(5880).then(r.bind(r,75880))));var xt=r(41948),Tt=r(74912),Et=r(11925),bt=r(75040);class St extends Et.i0{}(0,xt._)([(0,Tt.y)({constValue:!0})],St.prototype,"hasSliceHighlight",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],St.prototype,"hasSliceInVertexProgram",void 0),(0,xt._)([(0,Tt.y)({constValue:bt.u.Pass})],St.prototype,"pbrTextureBindType",void 0);class At extends St{constructor(){super(...arguments),this.output=ye.mC.Color,this.alphaDiscardMode=G.OA.Opaque,this.doubleSidedMode=we.J.None,this.pbrMode=Me.Ax.Disabled,this.cullFace=G.CM.None,this.transparencyPassType=Oe.H.NONE,this.normalType=Ce.g.Attribute,this.textureCoordinateType=rt.i.None,this.customDepthTest=G.sr.Less,this.spherical=!1,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.multipassEnabled=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.objectAndLayerIdColorInstanced=!1,this.instancedDoublePrecision=!1,this.doublePrecisionRequiresObfuscation=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.cullAboveGround=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1}}(0,xt._)([(0,Tt.y)({count:ye.mC.COUNT})],At.prototype,"output",void 0),(0,xt._)([(0,Tt.y)({count:G.OA.COUNT})],At.prototype,"alphaDiscardMode",void 0),(0,xt._)([(0,Tt.y)({count:we.J.COUNT})],At.prototype,"doubleSidedMode",void 0),(0,xt._)([(0,Tt.y)({count:Me.Ax.COUNT})],At.prototype,"pbrMode",void 0),(0,xt._)([(0,Tt.y)({count:G.CM.COUNT})],At.prototype,"cullFace",void 0),(0,xt._)([(0,Tt.y)({count:Oe.H.COUNT})],At.prototype,"transparencyPassType",void 0),(0,xt._)([(0,Tt.y)({count:Ce.g.COUNT})],At.prototype,"normalType",void 0),(0,xt._)([(0,Tt.y)({count:rt.i.COUNT})],At.prototype,"textureCoordinateType",void 0),(0,xt._)([(0,Tt.y)({count:G.sr.COUNT})],At.prototype,"customDepthTest",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"spherical",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVertexColors",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSymbolColors",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVerticalOffset",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSlicePlane",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSliceHighlight",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasColorTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasMetallicRoughnessTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasEmissionTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOcclusionTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasNormalTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasScreenSizePerspective",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVertexTangents",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOccludees",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"multipassEnabled",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasModelTransformation",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"offsetBackfaces",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"vvSize",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"vvColor",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"receiveShadows",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"receiveAmbientOcclusion",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"textureAlphaPremultiplied",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instanced",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instancedColor",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"objectAndLayerIdColorInstanced",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instancedDoublePrecision",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"doublePrecisionRequiresObfuscation",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"writeDepth",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"transparent",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"enableOffset",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"cullAboveGround",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"snowCover",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasColorTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasEmissionTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasNormalTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOcclusionTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasMetallicRoughnessTextureTransform",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"occlusionPass",void 0),(0,xt._)([(0,Tt.y)({constValue:!0})],At.prototype,"hasVvInstancing",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"useCustomDTRExponentForWater",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"supportsTextureAtlas",void 0),(0,xt._)([(0,Tt.y)({constValue:!0})],At.prototype,"useFillLights",void 0);var yt=r(59888);class Ct extends gt{initializeConfiguration(e,t){super.initializeConfiguration(e,t),t.hasMetallicRoughnessTexture=!1,t.hasEmissionTexture=!1,t.hasOcclusionTexture=!1,t.hasNormalTexture=!1,t.hasModelTransformation=!1,t.normalType=Ce.g.Attribute,t.doubleSidedMode=we.J.WindingOrder,t.hasVertexTangents=!1}initializeProgram(e){return this._initializeProgram(e,Ct.shader)}}Ct.shader=new at.O(yt.R,(()=>r.e(1980).then(r.bind(r,81980))));class wt extends Ie.iK{constructor(e){super(e,Rt),this.supportsEdges=!0,this.produces=new Map([[Be.y.OPAQUE_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&!this.parameters.transparent],[Be.y.TRANSPARENT_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[Be.y.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._configuration=new At,this._vertexBufferLayout=function(e){const t=(0,Ae.iC)().vec3f(be.K.POSITION);return e.normalType===Ce.g.Compressed?t.vec2i16(be.K.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(be.K.NORMAL),e.hasVertexTangents&&t.vec4f(be.K.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(be.K.UV0),e.hasVertexColors&&t.vec4u8(be.K.COLOR),e.hasSymbolColors&&t.vec4u8(be.K.SYMBOLCOLOR),(0,V.c)("enable-feature:objectAndLayerId-rendering")&&t.vec4u8(be.K.OBJECTANDLAYERIDCOLOR),t}(this.parameters)}isVisibleForOutput(e){return e!==ye.mC.Shadow&&e!==ye.mC.ShadowExcludeHighlight&&e!==ye.mC.ShadowHighlight||this.parameters.castShadows}isVisible(){const e=this.parameters;if(!super.isVisible()||0===e.layerOpacity)return!1;const{hasInstancedColor:t,hasVertexColors:r,hasSymbolColors:i,vvColor:o}=e,a="replace"===e.colorMixMode,n=e.opacity>0,s=e.externalColor&&e.externalColor[3]>0,l=t||o||i;return r&&l?a||n:r?a?s:n:l?a||n:a?s:n}getConfiguration(e,t){return this._configuration.output=e,this._configuration.hasNormalTexture=!!this.parameters.normalTextureId,this._configuration.hasColorTexture=!!this.parameters.textureId,this._configuration.hasVertexTangents=this.parameters.hasVertexTangents,this._configuration.instanced=this.parameters.isInstanced,this._configuration.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasSliceHighlight=this.parameters.hasSliceHighlight,this._configuration.alphaDiscardMode=this.parameters.textureAlphaMode,this._configuration.normalType=this.parameters.normalType,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,null!=this.parameters.customDepthTest&&(this._configuration.customDepthTest=this.parameters.customDepthTest),this._configuration.hasOccludees=this.parameters.hasOccludees,this._configuration.cullFace=this.parameters.hasSlicePlane?G.CM.None:this.parameters.cullFace,this._configuration.multipassEnabled=t.multipassEnabled,this._configuration.cullAboveGround=t.multipassTerrain.cullAboveGround,this._configuration.hasModelTransformation=null!=this.parameters.modelTransformation,e!==ye.mC.Color&&e!==ye.mC.Alpha||(this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.hasSymbolColors=this.parameters.hasSymbolColors,this.parameters.treeRendering?this._configuration.doubleSidedMode=we.J.WindingOrder:this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?we.J.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?we.J.WindingOrder:we.J.None,this._configuration.instancedColor=this.parameters.hasInstancedColor,this._configuration.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this._configuration.receiveAmbientOcclusion=this.parameters.receiveAmbientOcclusion&&null!=t.ssao,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this._configuration.pbrMode=this.parameters.usePBR?this.parameters.isSchematic?Me.Ax.Schematic:Me.Ax.Normal:Me.Ax.Disabled,this._configuration.hasMetallicRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this._configuration.hasEmissionTexture=!!this.parameters.emissiveTextureId,this._configuration.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this._configuration.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this._configuration.transparencyPassType=t.transparencyPassType,this._configuration.enableOffset=t.camera.relativeElevation<5e5,this._configuration.snowCover=this.hasSnowCover(t),this._configuration.hasColorTextureTransform=!!this.parameters.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!this.parameters.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!this.parameters.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!this.parameters.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!this.parameters.metallicRoughnessTextureTransformMatrix),this._configuration}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}intersect(e,t,r,i,o,a){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,c.s)(Dt,t[12],t[13],t[14]);let a=null;switch(r.viewingMode){case Se.UZ.Global:a=(0,c.n)(Pt,Dt);break;case Se.UZ.Local:a=(0,c.c)(Pt,Nt)}let n=0;const s=(0,c.f)(Ft,Dt,e.eye),l=(0,c.l)(s),d=(0,c.h)(s,s,1/l);let u=null;this.parameters.screenSizePerspective&&(u=(0,c.j)(a,d)),n+=(0,et.u6)(e,l,this.parameters.verticalOffset,u??0,this.parameters.screenSizePerspective),(0,c.h)(a,a,n),(0,c.t)(Lt,a,r.transform.inverseRotation),i=(0,c.f)(It,i,Lt),o=(0,c.f)(Ot,o,Lt)}var n;(0,et.Ep)(e,r,i,o,null!=(n=r.verticalOffset)?(Ye.offset=n,Ye):null,a)}createGLMaterial(e){return new Mt(e)}createBufferWriter(){return new Qe(this._vertexBufferLayout)}}class Mt extends Re.Q{constructor(e){super({...e,...e.material.parameters})}_updateShadowState(e){e.shadowMap.enabled!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:e.shadowMap.enabled})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.hasOccludees&&this._material.setParameters({hasOccludees:e.hasOccludees})}beginSlot(e){this._output!==ye.mC.Color&&this._output!==ye.mC.Alpha||(this._updateShadowState(e),this._updateOccludeeState(e));const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,c.s)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.ensureTechnique(t.treeRendering?Ct:gt,e)}}const Rt=new class extends vt{constructor(){super(...arguments),this.initTextureTransparent=!1,this.treeRendering=!1,this.hasVertexTangents=!1}},It=(0,d.Su)(),Ot=(0,d.Su)(),Nt=(0,d.WK)(0,0,1),Pt=(0,d.Su)(),Lt=(0,d.Su)(),Dt=(0,d.Su)(),Ft=(0,d.Su)(),Ut=()=>O.c.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");function Gt(e){throw new I.c("",`Request for object resource failed: ${e}`)}function Bt(e){const t=e.params,r=t.topology;let i=!0;switch(t.vertexAttributes||(Ut().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(Ut().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(Ut().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(Ut().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else Ut().warn("Indexed geometries must specify faces"),i=!1;break}default:Ut().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(Ut().warn("Geometry requires material"),i=!1);const o=e.params.vertexAttributes;for(const e in o)o[e].values||(Ut().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function Vt(e){const t=(0,u.FZ)();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&((0,u.K8)(t,r.bbMin),(0,u.K8)(t,r.bbMax))})),t}function zt(e){switch(e){case"mask":return G.OA.Mask;case"maskAndTransparency":return G.OA.MaskBlend;case"none":return G.OA.Opaque;default:return G.OA.Blend}}function Yt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Ht=new L.a(1,2,"wosr");var Wt=r(44875);async function jt(e,t){const r=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,i.Ur)(e));if("wosr"===r.fileType){const e=await(t.cache?t.cache.loadWOSR(r.url,t):async function(e,t){const r=await async function(e,t){const r=t?.streamDataRequester;if(r)return async function(e,t,r){const i=await(0,M.aG)(t.request(e,"json",r));if(!0===i.ok)return i.value;(0,P.CE)(i.error),Gt(i.error.details.url)}(e,r,t);const i=await(0,M.aG)((0,w.c)(e,t));if(!0===i.ok)return i.value.data;(0,P.CE)(i.error),Gt(i.error)}(e,t),i=await async function(e,t){const r=new Array;for(const i in e){const o=e[i],a=o.images[0].data;if(!a){Ut().warn("Externally referenced texture data is not yet supported");continue}const n=o.encoding+";base64,"+a,s="/textureDefinitions/"+i,l="rgba"===o.channels?o.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:X.Qz.REPEAT,t:X.Qz.REPEAT},preMultiplyAlpha:zt(l)!==G.OA.Opaque},d=null!=t&&t.disableTextures?Promise.resolve(null):F(n,t);r.push(d.then((e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l}))))}const i=await Promise.all(r),o={};for(const e of i)o[e.refId]=e;return o}(r.textureDefinitions??{},t);let o=0;for(const e in i)if(i.hasOwnProperty(e)){const t=i[e];o+=t?.image?t.image.width*t.image.height*4:0}return{resource:r,textures:i,size:o+(0,R.UN)(r)}}(r.url,t)),{engineResources:i,referenceBoundingBox:o}=function(e,t){const r=new Array,i=new Array,o=new Array,a=new N,n=e.resource,s=L.a.parse(n.version||"1.0","wosr");Ht.validate(s);const l=n.model.name,c=n.model.geometries,u=n.materialDefinitions??{},h=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const n=c[e];if(!Bt(n))continue;const s=Yt(n),l=n.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===n.params.topology)return null;const t=n.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l[be.K.POSITION],_=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,i=v(e)??(0,D.yh)(_);p.push([e,new U.O(r,i,t.valuesPerElement,!0)])}const x=s.texture,T=h&&h[x];if(T&&!f.has(x)){const{image:e,parameters:t}=T,r=new xe(e,t);i.push(r),f.set(x,r)}const E=f.get(x),b=E?E.id:void 0,S=s.material;let A=a.get(S,x);if(null==A){const e=u[S.substring(S.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=T&&T.alphaChannelUsage,i=e.transparency>0||"transparency"===r||"maskAndTransparency"===r,o=T?zt(T.alphaChannelUsage):void 0,n={ambient:(0,d.eu)(e.diffuse),diffuse:(0,d.eu)(e.diffuse),opacity:1-(e.transparency||0),transparent:i,textureAlphaMode:o,textureAlphaCutoff:.33,textureId:b,initTextureTransparent:!0,doubleSided:!0,cullFace:G.CM.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:T?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(n,t.materialParameters),A=new wt(n),a.set(S,x,A)}o.push(A);const y=new B.K(A,p);m+=p.find((e=>e[0]===be.K.POSITION))?.[1]?.indices.length??0,r.push(y)}return{engineResources:[{name:l,stageResources:{textures:i,materials:o,geometries:r},pivotOffset:n.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:Vt(r)}}(e,t);return{lods:i,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}const a=await(t.cache?t.cache.loadGLTF(r.url,t,!!t.usePBR):(0,T.G)(new x.k(t.streamDataRequester),r.url,t,t.usePBR)),S=a.model.meta?.ESRI_proxyEllipsoid,y=a.meta.isEsriSymbolResource&&null!=S&&"EsriRealisticTreesStyle"===a.meta.ESRI_webstyle;y&&!a.customMeta.esriTreeRendering&&(a.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const i=e.model.lods[r];for(const o of i.parts){const i=o.attributes.normal;if(null==i)return;const a=o.attributes.position,l=a.count,u=(0,d.Su)(),h=(0,d.Su)(),f=(0,d.Su)(),p=new Uint8Array(4*l),v=new Float64Array(3*l),g=(0,n.S_)((0,s.Su)(),o.transform);let _=0,x=0;for(let n=0;n<l;n++){a.getVec(n,h),i.getVec(n,u),(0,c.e)(h,h,o.transform),(0,c.f)(f,h,t.center),(0,c.G)(f,f,t.radius);const s=f[2],l=(0,c.l)(f),d=Math.min(.45+.55*l*l,1);(0,c.G)(f,f,t.radius),null!==g&&(0,c.e)(f,f,g),(0,c.n)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,c.k)(f,f,u,s>-1?.2:Math.min(-4*s-3.8,1)),v[_]=f[0],v[_+1]=f[1],v[_+2]=f[2],_+=3,p[x]=255*d,p[x+1]=255*d,p[x+2]=255*d,p[x+3]=255,x+=4}o.attributes.normal=new m.Yj(v),o.attributes.color=new m.sb(p)}}}(a,S));const I=!!t.usePBR,O=a.meta.isEsriSymbolResource?{usePBR:I,isSchematic:!1,treeRendering:y,mrrFactors:[...ft]}:{usePBR:I,isSchematic:!1,treeRendering:!1,mrrFactors:[...ht]},V={...t.materialParameters,treeRendering:y},{engineResources:z,referenceBoundingBox:Y}=function(e,t,r,i){const a=e.model,n=new Array,s=new Map,x=new Map,T=a.lods.length,S=(0,u.FZ)();return a.lods.forEach(((e,y)=>{const w=!0===i.skipHighLods&&(T>1&&0===y||T>3&&1===y)||!1===i.skipHighLods&&null!=i.singleLodIndex&&y!==i.singleLodIndex;if(w&&0!==y)return;const M=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const i=w?new wt({}):function(e,t,r,i,o,a,n){const s=t.material+(t.attributes.normal?"_normal":"")+(t.attributes.color?"_color":"")+(t.attributes.texCoord0?"_texCoord0":"")+(t.attributes.tangent?"_tangent":""),u=e.materials.get(t.material),h=null!=t.attributes.texCoord0,m=null!=t.attributes.normal;if(null==u)return null;const f=function(e){switch(e){case"BLEND":return G.OA.Blend;case"MASK":return G.OA.Mask;case"OPAQUE":case null:case void 0:return G.OA.Opaque}}(u.alphaMode);if(!a.has(s)){if(h){const t=(t,r=!1)=>{if(null!=t&&!n.has(t)){const i=e.textures.get(t);if(null!=i){const e=i.data;n.set(t,new xe((0,b.e6)(e)?e.data:e,{...i.parameters,preMultiplyAlpha:!(0,b.e6)(e)&&r,encoding:(0,b.e6)(e)&&null!=e.encoding?e.encoding:void 0}))}}};t(u.textureColor,f!==G.OA.Opaque),t(u.textureNormal),t(u.textureOcclusion),t(u.textureEmissive),t(u.textureMetallicRoughness)}const r=u.color[0]**(1/Wt.g),p=u.color[1]**(1/Wt.g),v=u.color[2]**(1/Wt.g),g=u.emissiveFactor[0]**(1/Wt.g),_=u.emissiveFactor[1]**(1/Wt.g),x=u.emissiveFactor[2]**(1/Wt.g),T=null!=u.textureColor&&h?n.get(u.textureColor):null,E=function({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:i,emissiveTexture:o,emissiveFactor:a,occlusionTexture:n}){return null==e&&null==t&&null==o&&(null==a||(0,c.i)(a,d.cX))&&null==n&&(null==i||1===i)&&(null==r||1===r)}({normalTexture:u.textureNormal,metallicRoughnessTexture:u.textureMetallicRoughness,metallicFactor:u.metallicFactor,roughnessFactor:u.roughnessFactor,emissiveTexture:u.textureEmissive,emissiveFactor:u.emissiveFactor,occlusionTexture:u.textureOcclusion}),S=null!=u.normalTextureTransform?.scale?u.normalTextureTransform?.scale:l.Qw;a.set(s,new wt({...i,transparent:f===G.OA.Blend,customDepthTest:G.sr.Lequal,textureAlphaMode:f,textureAlphaCutoff:u.alphaCutoff,diffuse:[r,p,v],ambient:[r,p,v],opacity:u.opacity,doubleSided:u.doubleSided,doubleSidedType:"winding-order",cullFace:u.doubleSided?G.CM.None:G.CM.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:m?Ce.g.Attribute:Ce.g.ScreenDerivative,castShadows:!0,receiveShadows:u.receiveShadows,receiveAmbientOcclusion:u.receiveAmbientOcclustion,textureId:null!=T?T.id:void 0,colorMixMode:u.colorMixMode,normalTextureId:null!=u.textureNormal&&h?n.get(u.textureNormal).id:void 0,textureAlphaPremultiplied:null!=T&&!!T.parameters.preMultiplyAlpha,occlusionTextureId:null!=u.textureOcclusion&&h?n.get(u.textureOcclusion).id:void 0,emissiveTextureId:null!=u.textureEmissive&&h?n.get(u.textureEmissive).id:void 0,metallicRoughnessTextureId:null!=u.textureMetallicRoughness&&h?n.get(u.textureMetallicRoughness).id:void 0,emissiveFactor:[g,_,x],mrrFactors:E?[...mt]:[u.metallicFactor,u.roughnessFactor,i.mrrFactors[2]],isSchematic:E,colorTextureTransformMatrix:A(u.colorTextureTransform),normalTextureTransformMatrix:A(u.normalTextureTransform),scale:[S[0],S[1]],occlusionTextureTransformMatrix:A(u.occlusionTextureTransform),emissiveTextureTransformMatrix:A(u.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:A(u.metallicRoughnessTextureTransform),...o}))}const p=a.get(s);if(r.stageResources.materials.push(p),h){const e=e=>{null!=e&&r.stageResources.textures.push(n.get(e))};e(u.textureColor),e(u.textureNormal),e(u.textureOcclusion),e(u.textureEmissive),e(u.textureMetallicRoughness)}return p}(a,e,M,t,r,s,x),{geometry:n,vertexCount:T}=function(e,t){const r=e.attributes.position.count,i=(0,E.y)(e.indices||r,e.primitiveType),a=(0,h.mc)(3*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.position;(0,f.a)(a,n,e.transform,3,s);const l=[[be.K.POSITION,new U.O(a,i,3,!0)]];if(null!=e.attributes.normal){const t=(0,h.mc)(3*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.normal;(0,o.yy)(qt,e.transform),(0,f.b)(t,a,qt,3,n),l.push([be.K.NORMAL,new U.O(t,i,3,!0)])}if(null!=e.attributes.tangent){const t=(0,h.mc)(4*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.tangent;(0,o.yy)(qt,e.transform),(0,p.t)(t,a,qt,4,n),l.push([be.K.TANGENT,new U.O(t,i,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,h.mc)(2*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.texCoord0;(0,v.n)(t,o,2,a),l.push([be.K.UV0,new U.O(t,i,2,!0)])}if(null!=e.attributes.color){const t=new Uint8Array(4*r);4===e.attributes.color.elementCount?e.attributes.color instanceof m._5?(0,p.s)(t,e.attributes.color,255):e.attributes.color instanceof m.sb?(0,_.c)(t,e.attributes.color):e.attributes.color instanceof m.Ig&&(0,p.s)(t,e.attributes.color,1/256):(t.fill(255),e.attributes.color instanceof m.Yj?(0,f.s)(t,e.attributes.color,255,4):e.attributes.color instanceof m.IN?(0,g.c)(t,e.attributes.color.typedBuffer,4,e.attributes.color.typedBufferStride):e.attributes.color instanceof m.k5&&(0,f.s)(t,e.attributes.color,1/256,4)),l.push([be.K.COLOR,new U.O(t,i,4,!0)])}return{geometry:new B.K(t,l),vertexCount:r}}(e,null!=i?i:new wt({})),C=n.boundingInfo;null!=C&&0===y&&((0,u.K8)(S,C.bbMin),(0,u.K8)(S,C.bbMax)),null!=i&&(M.stageResources.geometries.push(n),M.numberOfVertices+=T)})),w||n.push(M)})),{engineResources:n,referenceBoundingBox:S}}(a,O,V,t.skipHighLods&&null==r.specifiedLodIndex?{skipHighLods:!0}:{skipHighLods:!1,singleLodIndex:r.specifiedLodIndex});return{lods:z,referenceBoundingBox:Y,isEsriSymbolResource:a.meta.isEsriSymbolResource,isWosr:!1}}const qt=(0,a.Su)()},78720:(e,t,r)=>{var i,o;r.d(t,{KQ:()=>i}),r(53648),(o=i||(i={}))[o.Multiply=1]="Multiply",o[o.Ignore=2]="Ignore",o[o.Replace=3]="Replace",o[o.Tint=4]="Tint"},72364:(e,t,r)=>{r.d(t,{U1:()=>c,iC:()=>l});var i=r(71004),o=r(98132),a=r(90736);class n{constructor(e,t){this.layout=e,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const t of e.fields.keys()){const r=e.fields.get(t);this[t]=new r.constructor(this.buffer,r.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(e,t){const r=this[e];return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new n(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const o=this.stride;if(o%4==0){const a=new Uint32Array(e.buffer,t*o,i*o/4);new Uint32Array(this.buffer,r*o,i*o/4).set(a)}else{const a=new Uint8Array(e.buffer,t*o,i*o);new Uint8Array(this.buffer,r*o,i*o).set(a)}return this}get usedMemory(){return this.byteLength}dispose(){}}class s{constructor(e=null){this._stride=0,this._lastAligned=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach((e=>this._fields.set(e[0],{...e[1],constructor:h(e[1].constructor)}))))}vec2f(e,t){return this._appendField(e,i.U7,t),this}vec2f64(e,t){return this._appendField(e,i.wT,t),this}vec3f(e,t){return this._appendField(e,i.Yj,t),this}vec3f64(e,t){return this._appendField(e,i.Ax,t),this}vec4f(e,t){return this._appendField(e,i._5,t),this}vec4f64(e,t){return this._appendField(e,i.Ip,t),this}mat3f(e,t){return this._appendField(e,i.Ko,t),this}mat3f64(e,t){return this._appendField(e,i.m_,t),this}mat4f(e,t){return this._appendField(e,i.IL,t),this}mat4f64(e,t){return this._appendField(e,i.mF,t),this}vec4u8(e,t){return this._appendField(e,i.sb,t),this}f32(e,t){return this._appendField(e,i.AZ,t),this}f64(e,t){return this._appendField(e,i.oN,t),this}u8(e,t){return this._appendField(e,i.Kg,t),this}u16(e,t){return this._appendField(e,i.E_,t),this}i8(e,t){return this._appendField(e,i.kV,t),this}vec2i8(e,t){return this._appendField(e,i.oR,t),this}vec2i16(e,t){return this._appendField(e,i.iN,t),this}vec2u8(e,t){return this._appendField(e,i.eS,t),this}vec4u16(e,t){return this._appendField(e,i.Ig,t),this}u32(e,t){return this._appendField(e,i.Ym,t),this}_appendField(e,t,r){if(this._fields.has(e))return void(0,a.Uc)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,o.Ad)(t.ElementType),n=this._stride;this._stride+=i,this._fields.set(e,{size:i,constructor:t,offset:n,optional:r})}createBuffer(e){return new n(this,e)}createView(e){return new n(this,e)}clone(){const e=new s;return e._stride=this._stride,e._fields=new Map,this._fields.forEach(((t,r)=>e._fields.set(r,t))),e.BufferType=this.BufferType,e}get stride(){if(this._lastAligned!==this._fields.size){let e=1;this._fields.forEach((t=>e=Math.max(e,(0,o.Ad)(t.constructor.ElementType)))),this._stride=Math.floor((this._stride+e-1)/e)*e,this._lastAligned=this._fields.size}return this._stride}get fields(){return this._fields}}function l(){return new s}class c{constructor(e){this.fields=new Array,e.fields.forEach(((e,t)=>{const r={...e,constructor:u(e.constructor)};this.fields.push([t,r])})),this.stride=e.stride}}const d=[i.AZ,i.U7,i.Yj,i._5,i.Ko,i.IL,i.oN,i.wT,i.Ax,i.Ip,i.m_,i.mF,i.Kg,i.eS,i.IN,i.sb,i.E_,i.kg,i.k5,i.Ig,i.Ym,i.qZ,i.ER,i.q$,i.kV,i.oR,i.Oq,i.mq,i.Mt,i.iN,i.g7,i.OS,i.Ep,i.mI,i.Yv,i.i9];function u(e){return`${e.ElementType}_${e.ElementCount}`}function h(e){return m.get(e)}const m=new Map;d.forEach((e=>m.set(u(e),e)))},29244:(e,t,r)=>{r.d(t,{Eb:()=>Te,er:()=>Ie});var i=r(77556),o=r(68612),a=r(87104),n=r(41512),s=r(2620),l=r(98472),c=r(62484),d=r(74784),u=r(37008),h=r(22080),m=r(82448),f=r(51120),p=r(62880),v=r(38380),g=r(58632),_=r(60544),x=r(20136),T=r(21288),E=r(85256),b=r(89560);const S=1e-6,A=(0,c.Su)(),y=(0,c.Su)();function C(e,t,r,i,o,a,n,s,l,c){return function(e,t,r){let i=_e(e.maxVert[0],e.minVert[0]),o=0;for(let t=1;t<7;++t){const r=_e(e.maxVert[t],e.minVert[t]);r>i&&(i=r,o=t)}fe(t,e.minVert[o]),fe(r,e.maxVert[o])}(e,i,o),_e(i,o)<S?1:(he(n,i,o),ve(n,n),function(e,t,r,i){const{data:o,size:a}=e;let n=Number.NEGATIVE_INFINITY,s=0;for(let e=0;e<o.length;e+=a){F[0]=o[e]-t[0],F[1]=o[e+1]-t[1],F[2]=o[e+2]-t[2];const i=r[0]*F[0]+r[1]*F[1]+r[2]*F[2],a=r[0]*r[0]+r[1]*r[1]+r[2]*r[2],l=F[0]*F[0]+F[1]*F[1]+F[2]*F[2]-i*i/a;l>n&&(n=l,s=e)}return fe(i,o,s),n}(t,i,n,a)<S?2:(he(s,o,a),ve(s,s),he(l,a,i),ve(l,l),pe(r,s,n),ve(r,r),W(t,r,n,s,l,c),0))}const w=(0,c.Su)(),M=(0,c.Su)(),R=(0,c.Su)(),I=(0,c.Su)(),O=(0,c.Su)(),N=(0,c.Su)(),P=(0,c.Su)(),L=(0,c.Su)();function D(e,t,r,i,o,a,n,s,l){(function(e,t,r,i,o){!function(e,t,r,i,o){const{data:a,size:n}=e;fe(i,a),fe(o,i),r[0]=xe(j,t),r[1]=r[0];for(let e=n;e<a.length;e+=n){const n=a[e]*t[0]+a[e+1]*t[1]+a[e+2]*t[2];n<r[0]&&(r[0]=n,fe(i,a,e)),n>r[1]&&(r[1]=n,fe(o,a,e))}}(e,t,U,o,i);const a=xe(r,t);U[1]-S<=a&&(i[0]=void 0),U[0]+S>=a&&(o[0]=void 0)})(e,t,r,w,M),void 0!==w[0]&&(he(R,w,r),ve(R,R),he(I,w,i),ve(I,I),he(O,w,o),ve(O,O),pe(N,I,a),ve(N,N),pe(P,O,n),ve(P,P),pe(L,R,s),ve(L,L),W(e,N,a,I,R,l),W(e,P,n,O,I,l),W(e,L,s,R,O,l)),void 0!==M[0]&&(he(R,M,r),ve(R,R),he(I,M,i),ve(I,I),he(O,M,o),ve(O,O),pe(N,I,a),ve(N,N),pe(P,O,n),ve(P,P),pe(L,R,s),ve(L,L),W(e,N,a,I,R,l),W(e,P,n,O,I,l),W(e,L,s,R,O,l))}const F=[0,0,0],U=(0,E.Su)(),G=(0,c.Su)(),B=(0,c.Su)(),V=(0,c.Su)(),z=(0,c.Su)(),Y=(0,c.Su)(),H=(0,c.Su)();function W(e,t,r,i,o,a){if(ge(t)<S)return;pe(G,r,t),pe(B,i,t),pe(V,o,t),q(e,t,U),Y[1]=U[0],z[1]=U[1],H[1]=z[1]-Y[1];const n=[r,i,o],s=[G,B,V];for(let r=0;r<3;++r){q(e,n[r],U),Y[0]=U[0],z[0]=U[1],q(e,s[r],U),Y[2]=U[0],z[2]=U[1],H[0]=z[0]-Y[0],H[2]=z[2]-Y[2];const i=de(H);i<a.quality&&(fe(a.b0,n[r]),fe(a.b1,t),fe(a.b2,s[r]),a.quality=i)}}const j=(0,c.Su)();function q(e,t,r){const{data:i,size:o}=e;r[0]=Number.POSITIVE_INFINITY,r[1]=Number.NEGATIVE_INFINITY;for(let e=0;e<i.length;e+=o){const o=i[e]*t[0]+i[e+1]*t[1]+i[e+2]*t[2];r[0]=Math.min(r[0],o),r[1]=Math.max(r[1],o)}}function K(e,t,r){r.center=e,r.halfSize=(0,l.h)(t,t,.5),r.quaternion=s.IJ}const k=(0,c.Su)(),$=(0,c.Su)(),X=(0,c.Su)(),J=(0,c.Su)(),Z=(0,c.Su)(),Q=(0,c.Su)();function ee(e,t,r){fe(k,t),Math.abs(t[0])>Math.abs(t[1])&&Math.abs(t[0])>Math.abs(t[2])?k[0]=0:Math.abs(t[1])>Math.abs(t[2])?k[1]=0:k[2]=0,ge(k)<S&&(k[0]=k[1]=k[2]=1),pe($,t,k),ve($,$),pe(X,t,$),ve(X,X),te(e,t,$,X,J,Z),he(Q,Z,J),se(t,$,X,J,Z,Q,r)}function te(e,t,r,i,o,a){q(e,t,U),o[0]=U[0],a[0]=U[1],q(e,r,U),o[1]=U[0],a[1]=U[1],q(e,i,U),o[2]=U[0],a[2]=U[1]}const re=(0,c.Su)(),ie=(0,c.Su)(),oe=(0,c.Su)(),ae=(0,o.WK)(1,0,0,0,1,0,0,0,1),ne=(0,s.Su)();function se(e,t,r,i,o,a,n){ae[0]=e[0],ae[1]=e[1],ae[2]=e[2],ae[3]=t[0],ae[4]=t[1],ae[5]=t[2],ae[6]=r[0],ae[7]=r[1],ae[8]=r[2],n.quaternion=function(e,t){const r=t[0]+t[4]+t[8];if(r>0){let i=Math.sqrt(r+1);e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i}else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const i=(r+1)%3,o=(r+2)%3;let a=Math.sqrt(t[3*r+r]-t[3*i+i]-t[3*o+o]+1);e[r]=.5*a,a=.5/a,e[3]=(t[3*i+o]-t[3*o+i])*a,e[i]=(t[3*i+r]+t[3*r+i])*a,e[o]=(t[3*o+r]+t[3*r+o])*a}return e}(ne,ae),ue(re,i,o),me(re,re,.5),me(ie,e,re[0]),me(oe,t,re[1]),ue(ie,ie,oe),me(oe,r,re[2]),n.center=(0,l.g)(ie,ie,oe),n.halfSize=(0,l.h)(re,a,.5)}class le{constructor(e){this.minVert=new Array(7),this.maxVert=new Array(7),this.buffer=new ArrayBuffer(448);let t=0;this.minProj=new Float64Array(this.buffer,t,7),t+=56,this.maxProj=new Float64Array(this.buffer,t,7),t+=56;for(let e=0;e<7;++e)this.minVert[e]=new Float64Array(this.buffer,t,3),t+=24;for(let e=0;e<7;++e)this.maxVert[e]=new Float64Array(this.buffer,t,3),t+=24;for(let e=0;e<7;++e)this.minProj[e]=Number.POSITIVE_INFINITY,this.maxProj[e]=Number.NEGATIVE_INFINITY;const r=new Array(7),i=new Array(7),{data:o,size:a}=e;for(let e=0;e<o.length;e+=a){let t=o[e];t<this.minProj[0]&&(this.minProj[0]=t,r[0]=e),t>this.maxProj[0]&&(this.maxProj[0]=t,i[0]=e),t=o[e+1],t<this.minProj[1]&&(this.minProj[1]=t,r[1]=e),t>this.maxProj[1]&&(this.maxProj[1]=t,i[1]=e),t=o[e+2],t<this.minProj[2]&&(this.minProj[2]=t,r[2]=e),t>this.maxProj[2]&&(this.maxProj[2]=t,i[2]=e),t=o[e]+o[e+1]+o[e+2],t<this.minProj[3]&&(this.minProj[3]=t,r[3]=e),t>this.maxProj[3]&&(this.maxProj[3]=t,i[3]=e),t=o[e]+o[e+1]-o[e+2],t<this.minProj[4]&&(this.minProj[4]=t,r[4]=e),t>this.maxProj[4]&&(this.maxProj[4]=t,i[4]=e),t=o[e]-o[e+1]+o[e+2],t<this.minProj[5]&&(this.minProj[5]=t,r[5]=e),t>this.maxProj[5]&&(this.maxProj[5]=t,i[5]=e),t=o[e]-o[e+1]-o[e+2],t<this.minProj[6]&&(this.minProj[6]=t,r[6]=e),t>this.maxProj[6]&&(this.maxProj[6]=t,i[6]=e)}for(let e=0;e<7;++e){let t=r[e];fe(this.minVert[e],o,t),t=i[e],fe(this.maxVert[e],o,t)}}}class ce{constructor(){this.b0=(0,c.WK)(1,0,0),this.b1=(0,c.WK)(0,1,0),this.b2=(0,c.WK)(0,0,1),this.quality=0}}function de(e){return e[0]*e[1]+e[0]*e[2]+e[1]*e[2]}function ue(e,t,r){e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2]}function he(e,t,r){e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2]}function me(e,t,r){e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r}function fe(e,t,r=0){e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2]}function pe(e,t,r){const i=t[0],o=t[1],a=t[2],n=r[0],s=r[1],l=r[2];e[0]=o*l-a*s,e[1]=a*n-i*l,e[2]=i*s-o*n}function ve(e,t){const r=t[0]*t[0]+t[1]*t[1]+t[2]*t[2];if(r>0){const i=1/Math.sqrt(r);e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i}}function ge(e){return e[0]*e[0]+e[1]*e[1]+e[2]*e[2]}function _e(e,t){const r=t[0]-e[0],i=t[1]-e[1],o=t[2]-e[2];return r*r+i*i+o*o}function xe(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}class Te{constructor(e=c.cX,t=We,r=s.IJ){this._data=[e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2],r[3]]}clone(){const e=new Te;return e._data=this._data.slice(),e}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(e){const t=new Te;return t._data=e.slice(),t}static fromJSON(e){return new Te(e.center,e.halfSize,e.quaternion)}copy(e){this._data=e.data.slice()}get center(){return(0,l.s)(x.Wq.get(),this._data[0],this._data[1],this._data[2])}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(e){return e[0]=this._data[0],e[1]=this._data[1],e[2]=this._data[2],e}set center(e){this._data[0]=e[0],this._data[1]=e[1],this._data[2]=e[2]}setCenter(e,t,r){this._data[0]=e,this._data[1]=t,this._data[2]=r}get halfSize(){return(0,l.s)(x.Wq.get(),this._data[3],this._data[4],this._data[5])}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(e){return e[0]=this._data[3],e[1]=this._data[4],e[2]=this._data[5],e}set halfSize(e){this._data[3]=e[0],this._data[4]=e[1],this._data[5]=e[2]}get quaternion(){return(0,n.WO)(x.QX.get(),this._data[6],this._data[7],this._data[8],this._data[9])}getQuaternion(e){return e[0]=this._data[6],e[1]=this._data[7],e[2]=this._data[8],e[3]=this._data[9],e}set quaternion(e){this._data[6]=e[0],this._data[7]=e[1],this._data[8]=e[2],this._data[9]=e[3]}get data(){return this._data}getCorners(e){const t=Ee,r=this._data;t[0]=r[6],t[1]=r[7],t[2]=r[8],t[3]=r[9];for(let i=0;i<8;++i){const o=e[i];o[0]=(1&i?-1:1)*r[3],o[1]=(2&i?-1:1)*r[4],o[2]=(4&i?-1:1)*r[5],(0,l.r)(o,o,t),o[0]+=r[0],o[1]+=r[1],o[2]+=r[2]}}isVisible(e){return this.intersectPlane(e[0])<=0&&this.intersectPlane(e[1])<=0&&this.intersectPlane(e[2])<=0&&this.intersectPlane(e[3])<=0&&this.intersectPlane(e[4])<=0&&this.intersectPlane(e[5])<=0}get radius(){const e=this._data[3],t=this._data[4],r=this._data[5];return Math.sqrt(e*e+t*t+r*r)}intersectSphere(e){Ae[0]=this._data[0]-e[0],Ae[1]=this._data[1]-e[1],Ae[2]=this._data[2]-e[2];const t=this.getQuaternion(be);return(0,n.fO)(Ee,t),(0,l.r)(Ae,Ae,Ee),(0,l.u)(Ae,Ae),ye[0]=Math.min(Ae[0],this._data[3]),ye[1]=Math.min(Ae[1],this._data[4]),ye[2]=Math.min(Ae[2],this._data[5]),(0,l.v)(ye,Ae)<e[3]*e[3]}intersectSphereWithMBS(e,t=this.radius){const r=this._data;Ae[0]=r[0]-e[0],Ae[1]=r[1]-e[1],Ae[2]=r[2]-e[2];const i=e[3],o=i+t;return!((0,l.w)(Ae)>o*o)&&(Ee[0]=-r[6],Ee[1]=-r[7],Ee[2]=-r[8],Ee[3]=r[9],(0,l.r)(Ae,Ae,Ee),(0,l.u)(Ae,Ae),ye[0]=Math.min(Ae[0],r[3]),ye[1]=Math.min(Ae[1],r[4]),ye[2]=Math.min(Ae[2],r[5]),(0,l.v)(ye,Ae)<i*i)}intersectPlane(e){const t=e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3],r=this.projectedRadius((0,g.Oq)(e));return t>r?1:t<-r?-1:0}intersectRay(e,t,r=0){const i=this._data,o=Ee;o[0]=-i[6],o[1]=-i[7],o[2]=-i[8],o[3]=i[9],Ae[0]=e[0]-i[0],Ae[1]=e[1]-i[1],Ae[2]=e[2]-i[2];const a=(0,l.r)(Ae,Ae,Ee),n=(0,l.r)(ye,t,Ee);let s=-1/0,c=1/0;const d=this.getHalfSize(Ue);for(let e=0;e<3;e++){const t=a[e],i=n[e],o=d[e]+r;if(Math.abs(i)>1e-6){const e=(o-t)/i,r=(-o-t)/i;s=Math.max(s,Math.min(e,r)),c=Math.min(c,Math.max(e,r))}else if(t>o||t<-o)return!1}return s<=c}projectedArea(e,t,r,o){const a=this.getQuaternion(be);(0,n.fO)(Ee,a),Ae[0]=e[0]-this._data[0],Ae[1]=e[1]-this._data[1],Ae[2]=e[2]-this._data[2],(0,l.r)(Ae,Ae,Ee);const s=this.getHalfSize(Ue),c=Ae[0]<-s[0]?-1:Ae[0]>s[0]?1:0,u=Ae[1]<-s[1]?-1:Ae[1]>s[1]?1:0,h=Ae[2]<-s[2]?-1:Ae[2]>s[2]?1:0,m=Math.abs(c)+Math.abs(u)+Math.abs(h);if(0===m)return 1/0;const f=1===m?4:6,p=6*(c+3*u+9*h+13);(0,i.KU)(Ge,a),(0,i.aU)(Ge,Ge,s);const v=this.getCenter(De);for(let e=0;e<f;e++){const r=Re[p+e];(0,l.s)(Ae,((1&r)<<1)-1,(2&r)-1,((4&r)>>1)-1),(0,l.t)(Ae,Ae,Ge),(0,l.g)(Ce,v,Ae),Ce[3]=1,(0,d.t)(Ce,Ce,t);const i=1/Math.max(1e-6,Ce[3]);Me[2*e]=Ce[0]*i,Me[2*e+1]=Ce[1]*i}const g=2*f-2;let _=Me[0]*(Me[3]-Me[g+1])+Me[g]*(Me[1]-Me[g-1]);for(let e=2;e<g;e+=2)_+=Me[e]*(Me[e+3]-Me[e-1]);return Math.abs(_)*r*o*.125}projectedRadius(e){const t=this.getQuaternion(be);return(0,n.fO)(Ee,t),(0,l.r)(Ae,e,Ee),Math.abs(Ae[0]*this._data[3])+Math.abs(Ae[1]*this._data[4])+Math.abs(Ae[2]*this._data[5])}minimumDistancePlane(e){return e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3]-this.projectedRadius((0,g.Oq)(e))}maximumDistancePlane(e){return e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3]+this.projectedRadius((0,g.Oq)(e))}toAaBoundingBox(e){const t=this.getQuaternion(be),r=(0,i.KU)(Ge,t),o=this._data[3]*Math.abs(r[0])+this._data[4]*Math.abs(r[3])+this._data[5]*Math.abs(r[6]),a=this._data[3]*Math.abs(r[1])+this._data[4]*Math.abs(r[4])+this._data[5]*Math.abs(r[7]),n=this._data[3]*Math.abs(r[2])+this._data[4]*Math.abs(r[5])+this._data[5]*Math.abs(r[8]);e[0]=this._data[0]-o,e[1]=this._data[1]-a,e[2]=this._data[2]-n,e[3]=this._data[0]+o,e[4]=this._data[1]+a,e[5]=this._data[2]+n}transform(e,t,r,i=0,o=(0,m._s)(r),a=(0,m._s)(t),s=(0,v.Mx)(t,a)){if(r===o)t.isGeographic?function(e,t,r,i,o=(0,m._s)(r)){const a=(0,h.e0)(r),s=1+Math.max(0,i)/(a.radius+e.centerZ);e.getCenter(Le),Le[2]+=i,(0,p.projectBuffer)(Le,r,0,Le,o,0,1),t.center=Le;const c=e.getQuaternion(be);t.quaternion=c,(0,n.fO)(Ee,c),(0,l.s)(ze,0,0,1),(0,l.r)(ze,ze,Ee);const d=e.getHalfSize(Ue);(0,l.s)(ze,d[0]*Math.abs(ze[0]),d[1]*Math.abs(ze[1]),d[2]*Math.abs(ze[2])),(0,l.h)(ze,ze,a.inverseFlattening),(0,l.g)(ze,d,ze),t.halfSize=(0,l.h)(ze,ze,s)}(this,e,t,i,a):function(e,t,r,i,o=(0,m._s)(r),a=(0,v.Mx)(r,o)){e.getCorners(Ve),e.getCenter(Le),Le[2]+=i,(0,f.y)(r,Le,Be,o),t.setCenter(Be[12],Be[13],Be[14]);const s=2*Math.sqrt(1+Be[0]+Be[5]+Be[10]);Ee[0]=(Be[6]-Be[9])/s,Ee[1]=(Be[8]-Be[2])/s,Ee[2]=(Be[1]-Be[4])/s,Ee[3]=.25*s;const c=e.getQuaternion(be);t.quaternion=(0,n.iW)(Ee,Ee,c),(0,n.fO)(Ee,Ee),(0,l.s)(Ye,0,0,0);const d=t.getCenter(Fe);for(const e of Ve)e[2]+=i,a(e,0,e,0),(0,l.y)(ze,e,d),(0,l.r)(ze,ze,Ee),(0,l.u)(ze,ze),(0,l.B)(Ye,Ye,ze);t.halfSize=Ye}(this,e,t,i,a,s);else if(t.isWGS84&&(r.isWebMercator||(0,_.GK)(r)))!function(e,t,r,i,o){t.getCenter(De),De[2]+=o;const a=(0,m._s)(r);(0,p.projectBuffer)(De,e,0,De,a,0,1),Oe(a,t,De,r,i)}(t,this,r,e,i);else if(t.isWebMercator&&(0,_.GK)(r))!function(e,t,r,i,o){t.getCenter(De),De[2]+=o,Oe(e,t,De,r,i)}(t,this,r,e,i);else{const o=this.getCenter(De);o[2]+=i,(0,p.projectBuffer)(o,t,0,o,r,0,1),e.center=o,this!==e&&(e.quaternion=this.getQuaternion(be),e.halfSize=this.getHalfSize(Ue))}}}const Ee=(0,s.Su)(),be=(0,s.Su)(),Se=(0,s.Su)(),Ae=(0,c.Su)(),ye=(0,c.Su)(),Ce=(0,u.Su)();function we(e,t=new Te){return function(e,t){const{data:r,size:i}=e,o=r.length/i;if(o<=0)return;const a=new le(e);ue(A,a.minProj,a.maxProj),me(A,A,.5),he(y,a.maxProj,a.minProj);const n=de(y),s=new ce;s.quality=n,o<14&&(e=new b.Y(new Float64Array(a.buffer,112,42),3));const l=(0,c.Su)(),d=(0,c.Su)(),u=(0,c.Su)(),h=(0,c.Su)(),m=(0,c.Su)(),f=(0,c.Su)(),p=(0,c.Su)();switch(C(a,e,p,l,d,u,h,m,f,s)){case 1:return void K(A,y,t);case 2:return void ee(e,h,t)}D(e,p,l,d,u,h,m,f,s),te(e,s.b0,s.b1,s.b2,J,Z);const v=(0,c.Su)();he(v,Z,J),s.quality=de(v),s.quality<n?se(s.b0,s.b1,s.b2,J,Z,v,t):K(A,y,t)}(e,t),t}const Me=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],Re=(()=>{const e=new Int8Array(162);let t=0;const r=r=>{for(let i=0;i<r.length;i++)e[t+i]=r[i];t+=6};return r([6,2,3,1,5,4]),r([0,2,3,1,5,4]),r([0,2,3,7,5,4]),r([0,1,3,2,6,4]),r([0,1,3,2,0,0]),r([0,1,5,7,3,2]),r([0,1,3,7,6,4]),r([0,1,3,7,6,2]),r([0,1,5,7,6,2]),r([0,1,5,4,6,2]),r([0,1,5,4,0,0]),r([0,1,3,7,5,4]),r([0,2,6,4,0,0]),r([0,0,0,0,0,0]),r([1,3,7,5,0,0]),r([2,3,7,6,4,0]),r([2,3,7,6,0,0]),r([2,3,1,5,7,6]),r([0,1,5,7,6,2]),r([0,1,5,7,6,4]),r([0,1,3,7,6,4]),r([4,5,7,6,2,0]),r([4,5,7,6,0,0]),r([4,5,1,3,7,6]),r([0,2,3,7,5,4]),r([6,2,3,7,5,4]),r([6,2,3,1,5,4]),e})();function Ie(e,t,r,i,o){const a=e.getQuaternion(be);o.quaternion=a,(0,n.fO)(Ee,a);const s=e.getCenter(De),d=e.getHalfSize(Ue);if(i===T.UZ.Global){(0,l.r)(ze,s,Ee),(0,l.u)(Ye,ze),(0,l.x)(He,Ye,d),(0,l.y)(He,Ye,He);const i=(0,l.l)(He);(0,l.g)(He,Ye,d);const a=(0,l.l)(He);if(i<r)o.center=s,(0,l.s)(ze,r,r,r),o.halfSize=(0,l.g)(ze,d,ze);else{const n=a>0?1+t/a:1,s=i>0?1+r/i:1,c=(s+n)/2,u=(s-n)/2;(0,l.h)(He,Ye,u),o.halfSize=(0,l.q)(He,He,d,c),(0,l.h)(He,Ye,c),(0,l.q)(He,He,d,u),(0,l.z)(ze,ze),(0,l.A)(ze,He,ze);const h=e.getQuaternion(Se);o.center=(0,l.r)(ze,ze,h)}}else{o.center=(0,l.q)(ze,s,c.wx,(r+t)/2);const e=(0,l.r)(ze,c.wx,Ee);(0,l.u)(e,e),o.halfSize=(0,l.q)(Ye,d,e,(r-t)/2)}return o}function Oe(e,t,r,o,a){const n=t.getQuaternion(be),s=(0,i.KU)(Ge,n),l=t.getHalfSize(Ue);for(let e=0;e<8;++e){for(let t=0;t<3;++t)Le[t]=l[t]*(0!=(e&1<<t)?-1:1);for(let t=0;t<3;++t){let i=r[t];for(let e=0;e<3;++e)i+=Le[e]*s[3*e+t];Ne[3*e+t]=i}}(0,p.projectBuffer)(Ne,e,0,Ne,o,0,8),we(Pe,a)}const Ne=new Array(24),Pe=new b.Y(Ne,3),Le=(0,c.Su)(),De=(0,c.Su)(),Fe=(0,c.Su)(),Ue=(0,c.Su)(),Ge=(0,o.Su)(),Be=(0,a.Su)(),Ve=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],ze=(0,c.Su)(),Ye=(0,c.Su)(),He=(0,c.Su)(),We=(0,c.WK)(-1,-1,-1)},90124:(e,t,r)=>{r.d(t,{Er:()=>d,G8:()=>c,_J:()=>l});var i=r(80324),o=r(44840),a=r(48688),n=r(60288);function s(e){e.varyings.add("linearDepth","float")}function l(e){e.vertex.uniforms.add(new a.$("nearFar",((e,t)=>t.camera.nearFar)))}function c(e){e.vertex.code.add(n.Y`float calculateLinearDepth(vec2 nearFar,float z) {
|
|
280
|
+
`),e}const p=Object.freeze(Object.defineProperty({__proto__:null,build:f},Symbol.toStringTag,{value:"Module"}))},84752:(e,t,r)=>{r.d(t,{a:()=>T,c:()=>x,d:()=>v,f:()=>b,g:()=>E,i:()=>w,n:()=>L}),r(9456);var i=r(66360),o=r(53648),a=r(15008),n=r(98472),s=r(62484),l=r(74784),c=r(37008),d=r(47364),u=r(82315),h=r(90484),m=r(48880),f=r(20136);const p=v();function v(){return(0,c.Su)()}const g=l.e,_=l.e;function x(e,t){return(0,l.c)(t,e)}function T(e){return e[3]}function E(e){return e}function b(e,t,r,i){return(0,c.WK)(e,t,r,i)}function S(e,t,r){if(null==t)return!1;if(!y(e,t,A))return!1;let{t0:i,t1:o}=A;if((i<0||o<i&&o>0)&&(i=o),i<0)return!1;if(r){const{origin:e,direction:o}=t;r[0]=e[0]+o[0]*i,r[1]=e[1]+o[1]*i,r[2]=e[2]+o[2]*i}return!0}const A={t0:0,t1:0};function y(e,t,r){const{origin:i,direction:o}=t,a=C;a[0]=i[0]-e[0],a[1]=i[1]-e[1],a[2]=i[2]-e[2];const n=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===n)return!1;const s=2*(o[0]*a[0]+o[1]*a[1]+o[2]*a[2]),l=s*s-4*n*(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]-e[3]*e[3]);if(l<0)return!1;const c=Math.sqrt(l);return r.t0=(-s-c)/(2*n),r.t1=(-s+c)/(2*n),!0}const C=(0,s.Su)();function w(e,t){return S(e,t,null)}function M(e,t,r){const i=f.Wq.get(),o=f.SW.get();(0,n.b)(i,t.origin,t.direction);const s=T(e);(0,n.b)(r,i,t.origin),(0,n.h)(r,r,1/(0,n.l)(r)*s);const l=I(e,t.origin),c=(0,m.i4)(t.origin,r);return(0,a.IT)(o,c+l,i),(0,n.e)(r,r,o),r}function R(e,t,r){const i=(0,n.f)(f.Wq.get(),t,e),o=(0,n.h)(f.Wq.get(),i,e[3]/(0,n.l)(i));return(0,n.g)(r,o,e)}function I(e,t){const r=(0,n.f)(f.Wq.get(),t,e),i=(0,n.l)(r),a=T(e),s=a+Math.abs(a-i);return(0,o.Uj)(a/s)}const O=(0,s.Su)();function N(e,t,r,i){const a=(0,n.f)(O,t,e);switch(r){case u.k.X:{const e=(0,o.Iv)(a,O)[2];return(0,n.s)(i,-Math.sin(e),Math.cos(e),0)}case u.k.Y:{const e=(0,o.Iv)(a,O),t=e[1],r=e[2],s=Math.sin(t);return(0,n.s)(i,-s*Math.cos(r),-s*Math.sin(r),Math.cos(t))}case u.k.Z:return(0,n.n)(i,a);default:return}}function P(e,t){const r=(0,n.f)(D,t,e);return(0,n.l)(r)-e[3]}function L(e,t){const r=(0,n.a)(e,t),i=T(e);return r<=i*i}const D=(0,s.Su)(),F=v();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:p,altitudeAt:P,angleToSilhouette:I,axisAt:N,clear:function(e){e[0]=e[1]=e[2]=e[3]=0},closestPoint:function(e,t,r){return S(e,t,r)?r:((0,h.CE)(t,e,r),R(e,r,r))},closestPointOnSilhouette:M,containsPoint:L,copy:x,create:v,distanceToSilhouette:function(e,t){const r=(0,n.f)(f.Wq.get(),t,e),i=(0,n.p)(r),o=e[3]*e[3];return Math.sqrt(Math.abs(i-o))},elevate:function(e,t,r){return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=e[3]+t,r},equals:_,exactEquals:g,fromCenterAndRadius:function(e,t){return(0,c.WK)(e[0],e[1],e[2],t)},fromRadius:function(e,t){return e[0]=e[1]=e[2]=0,e[3]=t,e},fromValues:b,getCenter:E,getRadius:T,intersectLine:function(e,t,r){const i=(0,h.i_)(t,r);if(!y(e,i,A))return[];const{origin:o,direction:a}=i,{t0:l,t1:c}=A,u=t=>{const r=(0,s.Su)();return(0,n.r)(r,o,a,t),R(e,r,r)};return Math.abs(l-c)<(0,d.Au)()?[u(l)]:[u(l),u(c)]},intersectRay:S,intersectRayClosestSilhouette:function(e,t,r){if(S(e,t,r))return r;const i=M(e,t,f.Wq.get());return(0,n.g)(r,t.origin,(0,n.h)(f.Wq.get(),t.direction,(0,n.q)(t.origin,i)/(0,n.l)(t.direction))),r},intersectsRay:w,projectPoint:R,setAltitudeAt:function(e,t,r,i){const o=P(e,t),a=N(e,t,u.k.Z,D),s=(0,n.h)(D,a,r-o);return(0,n.g)(i,t,s)},setExtent:function(e,t,r){return i.c.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),e!==r&&x(e,r),r},tmpSphere:F,union:function(e,t,r=(0,c.Su)()){const i=(0,n.q)(e,t),o=e[3],a=t[3];return i+a<o?((0,l.c)(r,e),r):i+o<a?((0,l.c)(r,t),r):((0,n.m)(r,e,t,(i+a-o)/(2*i)),r[3]=(i+o+a)/2,r)},wrap:function(e){return e}},Symbol.toStringTag,{value:"Module"}))},52180:(e,t,r)=>{r.d(t,{o:()=>o});var i=r(52324);class o{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.o)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*a);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,a));e++)this._items.push(this._allocator())}}const a=1024},95728:(e,t,r)=>{r.d(t,{a:()=>o});var i=r(20744);let o=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.c(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[o,a]=t.split("."),n=/^\s*\d+\s*$/;if(!o?.match||!n.test(o))throw new i.c((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!a?.match||!n.test(a))throw new i.c((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const s=parseInt(o,10),l=parseInt(a,10);return new e(s,l,r)}}},8472:(e,t,r)=>{function i(e){return e=e||globalThis.location.hostname,c.some((t=>null!=e?.match(t)))}function o(e,t){return e&&(t=t||globalThis.location.hostname)?null!=t.match(a)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(n)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e}r.d(t,{OM:()=>i,Ur:()=>o});const a=/^devext.arcgis.com$/,n=/^qaext.arcgis.com$/,s=/^[\w-]*\.mapsdevext.arcgis.com$/,l=/^[\w-]*\.mapsqa.arcgis.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local.esri.com$/,a,n,/^jsapps.esri.com$/,s,l]},38600:(e,t,r)=>{function i(){return new Float32Array(2)}function o(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function a(){return i()}function n(){return o(1,1)}function s(){return o(1,0)}function l(){return o(0,1)}r.d(t,{Qw:()=>d,Su:()=>i,WK:()=>o,cX:()=>c});const c=a(),d=n(),u=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:u,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,createView:function(e,t){return new Float32Array(e,t,2)},fromValues:o,ones:n,unitX:s,unitY:l,zeros:a},Symbol.toStringTag,{value:"Module"}))},92896:(e,t,r)=>{r.d(t,{mc:()=>o});var i=r(72008);function o(e,t=!1){return e<=i._?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}},90484:(e,t,r)=>{r.d(t,{CE:()=>d,Su:()=>n,em:()=>l,i_:()=>c}),r(92400);var i=r(52180),o=r(98472),a=r(62484);function n(e){return e?s((0,a.ct)(e.origin),(0,a.ct)(e.direction)):s((0,a.Su)(),(0,a.Su)())}function s(e,t){return{origin:e,direction:t}}function l(e,t){const r=u.get();return r.origin=e,r.direction=t,r}function c(e,t,r=n()){return(0,o.c)(r.origin,e),(0,o.f)(r.direction,t,e),r}function d(e,t,r){const i=(0,o.k)(e.direction,(0,o.f)(r,t,e.origin));return(0,o.g)(r,e.origin,(0,o.h)(r,e.direction,i)),r}r(20136);const u=new i.o((()=>n()))},96472:(e,t,r)=>{r.d(t,{fetch:()=>jt});var i=r(8472),o=r(77556),a=r(68612),n=r(15008),s=r(87104),l=r(85256),c=r(98472),d=r(62484),u=r(77048),h=r(92896),m=r(71004),f=r(48952),p=r(92160),v=r(12240),g=r(88340),_=r(74960),x=r(57792),T=r(68268),E=r(2888),b=r(5472),S=r(38600);function A(e){if(null==e)return null;const t=null!=e.offset?e.offset:S.cX,r=null!=e.rotation?e.rotation:0,i=null!=e.scale?e.scale:S.Qw,n=(0,a.WK)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.WK)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,a.WK)(i[0],0,0,0,i[1],0,0,0,1),c=(0,a.Su)();return(0,o.iW)(c,s,l),(0,o.iW)(c,n,c),c}class y{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new y,this.numberOfVertices=0}}var w=r(2600),M=r(40196),R=r(33184),I=r(20744),O=r(66360);class N{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get(e,t){return this._outer.get(e)?.get(t)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}forEach(e){this._outer.forEach(((t,r)=>e(t,r)))}}var P=r(10860),L=r(95728),D=r(97143);async function F(e,t){const{data:r}=await(0,w.c)(e,{responseType:"image",...t});return r}var U=r(89560),G=r(12260),B=r(71520),V=r(9456),z=r(77860),Y=r(70680),H=r(72008),W=r(28176),j=r(49628),q=r(24832);let K;var k,$;($=k||(k={}))[$.ETC1_RGB=0]="ETC1_RGB",$[$.ETC2_RGBA=1]="ETC2_RGBA",$[$.BC1_RGB=2]="BC1_RGB",$[$.BC3_RGBA=3]="BC3_RGBA",$[$.BC4_R=4]="BC4_R",$[$.BC5_RG=5]="BC5_RG",$[$.BC7_M6_RGB=6]="BC7_M6_RGB",$[$.BC7_M5_RGBA=7]="BC7_M5_RGBA",$[$.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",$[$.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",$[$.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",$[$.ATC_RGB=11]="ATC_RGB",$[$.ATC_RGBA=12]="ATC_RGBA",$[$.FXT1_RGB=17]="FXT1_RGB",$[$.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",$[$.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",$[$.ETC2_EAC_R11=20]="ETC2_EAC_R11",$[$.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",$[$.RGBA32=13]="RGBA32",$[$.RGB565=14]="RGB565",$[$.BGR565=15]="BGR565",$[$.RGBA4444=16]="RGBA4444";var X=r(77800),J=r(22184),Z=r(97684);let Q=null,ee=null;async function te(){return null==ee&&(ee=function(){if(null==K){const e=e=>(0,q.O)(`esri/libs/basisu/${e}`);K=r.e(4824).then(r.bind(r,84824)).then((e=>e.b)).then((({default:t})=>t({locateFile:e}).then((e=>(e.initializeBasis(),delete e.then,e)))))}return K}(),Q=await ee),ee}function re(e,t,r,i,o){const a=(0,Z.O4)(t?X.sr.COMPRESSED_RGBA8_ETC2_EAC:X.sr.COMPRESSED_RGB8_ETC2),n=o&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*a*n)}function ie(e){return e.getNumImages()>=1&&!e.isUASTC()}function oe(e){return e.getFaces()>=1&&e.isETC1S()}function ae(e,t,r,i,o,a,n,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?i?[k.ETC2_RGBA,X.sr.COMPRESSED_RGBA8_ETC2_EAC]:[k.ETC1_RGB,X.sr.COMPRESSED_RGB8_ETC2]:c?i?[k.BC3_RGBA,X.sr.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[k.BC1_RGB,X.sr.COMPRESSED_RGB_S3TC_DXT1_EXT]:[k.RGBA32,X.Id.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(n(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.width=o,t.height=a,new J.w(e,t,{type:"compressed",levels:m})}var ne=r(58608),se=r(74376);const le=()=>O.c.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function ce(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const de=ce("DXT1"),ue=ce("DXT3"),he=ce("DXT5");function me(e,t,r){if(e instanceof ImageData)return me(fe(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}function fe(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new I.c("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}var pe,ve,ge=r(90736),_e=r(51576);class xe extends ne.u{get parameters(){return this._parameters}constructor(e,t){super(),this._data=e,this.type=se.C.Texture,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this.events=new z.c,this._parameters={...Ee,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(e){null!=e&&(e instanceof HTMLVideoElement?(this.frameUpdate=t=>this._frameUpdate(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e))}_startPreloadVideoElement(e){if(!((0,W.ue)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=!e.paused;if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()};e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,W.o9)(e.src)||(0,W.ue)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new _e.O;return t.wrapMode=this._parameters.wrap??X.Qz.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture}get memoryEstimate(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,H.uk)(e)||(0,H.K2)(e))return t.encoding===G.yk.KTX2_ENCODING?function(e,t){if(null==Q)return e.byteLength;const r=new Q.KTX2File(new Uint8Array(e)),i=oe(r)?re(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===G.yk.BASIS_ENCODING?function(e,t){if(null==Q)return e.byteLength;const r=new Q.BasisFile(new Uint8Array(e)),i=ie(r)?re(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?Te(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._glTexture)return this._glTexture;if(this._loadingPromise)return this._loadingPromise;const t=this._data;return null==t?(this._glTexture=new J.w(e,this._createDescriptor(e),null),this._glTexture):(this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.DDS_ENCODING?this._loadFromDDSData(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,H.uk)(t)||(0,H.K2)(t))&&this._parameters.encoding===G.yk.BASIS_ENCODING?this._loadFromBasis(e,t):(0,H.K2)(t)?this._loadFromPixelData(e,t):(0,H.uk)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<pe.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e,0,31);if(542327876!==r[0])return le().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return le().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let o,a;switch(i){case de:o=8,a=X.sr.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case ue:o=16,a=X.sr.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case he:o=16,a=X.sr.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return le().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let n=1,s=r[4],l=r[3];0==(3&s)&&0==(3&l)||(le().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,d=l;let u,h;131072&r[2]&&!1!==t&&(n=Math.max(1,r[7]));let m=r[1]+4;const f=[];for(let t=0;t<n;++t)h=(s+3>>2)*(l+3>>2)*o,u=new Uint8Array(e,m,h),f.push(u),m+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:f},internalFormat:a,width:c,height:d}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:o,internalFormat:a,width:n,height:s}=i;return t.samplingMode=o.levels.length>1?X.Ud.LINEAR_MIPMAP_LINEAR:X.Ud.LINEAR,t.hasMipmap=o.levels.length>1,t.internalFormat=a,t.width=n,t.height=s,new J.w(e,t,o)}(e,this._createDescriptor(e),t),this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==Q&&(Q=await te());const i=new Q.KTX2File(new Uint8Array(r));if(!oe(i))return null;i.startTranscoding();const o=ae(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==Q&&(Q=await te());const i=new Q.BasisFile(new Uint8Array(r));if(!ie(i))return null;i.startTranscoding();const o=ae(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,ge.Uc)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?X.Id.LUMINANCE:3===this._parameters.components?X.Id.RGB:X.Id.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new J.w(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await F(t,{signal:r});return(0,P.wp)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,j.wx)(t,t.src,!1,r);return(0,P.wp)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=pe.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((i,o)=>{const a=()=>{t.removeEventListener("loadeddata",n),t.removeEventListener("error",s),(0,Y.oR)(l)},n=()=>{t.readyState>=pe.HAVE_CURRENT_DATA&&(a(),i(this._loadFromImage(e,t)))},s=e=>{a(),o(e||new I.c("Failed to load video"))};t.addEventListener("loadeddata",n),t.addEventListener("error",s);const l=(0,P.wD)(r,(()=>s((0,P.Uh)())))}))))}_loadFromImage(e,t){let r=t;if(!(r instanceof HTMLVideoElement)){const{maxTextureSize:t}=e.parameters;r=this._parameters.downsampleUncompressed?function(e,t){let r=e.width*e.height;if(r<4096)return e instanceof ImageData?fe(e):e;let i=e.width,o=e.height;do{i=Math.ceil(i/2),o=Math.ceil(o/2),r=i*o}while(r>1048576||null!=t&&(i>t||o>t));return me(e,i,o)}(r,t):function(e,t){const r=Math.max(e.width,e.height);if(r<=t)return e;const i=t/r;return me(e,Math.round(e.width*i),Math.round(e.height*i))}(r,t)}const i=Te(r);this._parameters.width=i.width,this._parameters.height=i.height;const o=this._createDescriptor(e);return o.pixelFormat=3===this._parameters.components?X.Id.RGB:X.Id.RGBA,o.width=i.width,o.height=i.height,this._glTexture=new J.w(e,o,r),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)};return r.then(i,i),r}unload(){if(this._glTexture=(0,Y.yI)(this._glTexture),null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}function Te(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(ve=pe||(pe={}))[ve.HAVE_NOTHING=0]="HAVE_NOTHING",ve[ve.HAVE_METADATA=1]="HAVE_METADATA",ve[ve.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",ve[ve.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",ve[ve.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA";const Ee={wrap:{s:X.Qz.REPEAT,t:X.Qz.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1};var be=r(4636),Se=r(21288),Ae=r(72364),ye=r(80324),Ce=r(88196),we=r(58472),Me=r(81832),Re=r(10375),Ie=r(81048),Oe=r(56336),Ne=r(81472);const Pe=(0,Ne.ac)(X.w$.SRC_ALPHA,X.w$.ONE,X.w$.ONE_MINUS_SRC_ALPHA,X.w$.ONE_MINUS_SRC_ALPHA),Le=(0,Ne.KO)(X.w$.ONE,X.w$.ONE),De=(0,Ne.KO)(X.w$.ZERO,X.w$.ONE_MINUS_SRC_ALPHA);function Fe(e){return e===Oe.H.FrontFace?null:e===Oe.H.Alpha?De:Le}const Ue={factor:-1,units:-2};function Ge(e,t=X.et.LESS){return e===Oe.H.NONE||e===Oe.H.FrontFace?t:X.et.LEQUAL}var Be=r(40328),Ve=r(84752),ze=r(29244);const Ye=new class{constructor(e=0){this.offset=e,this.sphere=(0,Ve.d)(),this.tmpVertex=(0,d.Su)()}applyToVertex(e,t,r){const i=this.objectTransform.transform,o=(0,c.s)(He,e,t,r),a=(0,c.e)(o,o,i),n=this.offset/(0,c.l)(a);(0,c.r)(a,a,a,n);const s=this.objectTransform.inverse;return(0,c.e)(this.tmpVertex,a,s),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,c.l)(e);(0,c.r)(e,e,e,r);const i=this.offset/(0,c.l)(t);(0,c.r)(t,t,t,i)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,c.l)((0,Ve.g)(e)),r=this.offset/t;return(0,c.r)((0,Ve.g)(this.sphere),(0,Ve.g)(e),(0,Ve.g)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,d.Su)(),this._tmpMbs=(0,Ve.d)(),this._tmpObb=new ze.Eb,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,c.l)(e)}applyToVertex(e,t,r){const i=(0,c.s)(He,e,t,r),o=(0,c.s)(We,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,c.l)(o);return(0,c.r)(this._tmpVertex,i,o,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],o=e[2]+t,a=e[3],n=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(i),d=Math.abs(o),u=Math.abs(a),h=Math.abs(n),m=Math.abs(s),f=.5*(1+Math.sign(r*a))*Math.min(l,u),p=.5*(1+Math.sign(i*n))*Math.min(c,h),v=.5*(1+Math.sign(o*s))*Math.min(d,m),g=Math.max(l,u),_=Math.max(c,h),x=Math.max(d,m),T=Math.sqrt(f*f+p*p+v*v),E=Math.sign(l+r),b=Math.sign(c+i),S=Math.sign(d+o),A=Math.sign(u+a),y=Math.sign(h+n),C=Math.sign(m+s),w=this._totalOffset;if(T<w)return e[0]-=(1-E)*w,e[1]-=(1-b)*w,e[2]-=(1-S)*w,e[3]+=A*w,e[4]+=y*w,e[5]+=C*w,e;const M=w/Math.sqrt(g*g+_*_+x*x),R=w/T,I=R-M,O=-I;return e[0]+=r*(E*O+R),e[1]+=i*(b*O+R),e[2]+=o*(S*O+R),e[3]+=a*(A*I+M),e[4]+=n*(y*I+M),e[5]+=s*(C*I+M),e}applyToMbs(e){const t=(0,c.l)((0,Ve.g)(e)),r=this._totalOffset/t;return(0,c.r)((0,Ve.g)(this._tmpMbs),(0,Ve.g)(e),(0,Ve.g)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,ze.er)(e,this._totalOffset,this._totalOffset,Se.UZ.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,d.Su)()}applyToVertex(e,t,r){const i=(0,c.s)(He,e,t,r),o=(0,c.g)(We,i,this.localOrigin),a=this.offset/(0,c.l)(o);return(0,c.r)(this.tmpVertex,i,o,a),this.tmpVertex}applyToAabb(e){const t=je,r=qe,i=Ke;for(let o=0;o<3;++o)t[o]=e[0+o]+this.localOrigin[o],r[o]=e[3+o]+this.localOrigin[o],i[o]=t[o];const o=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=o[t],e[t+3]=o[t];const a=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let o=0;o<3;++o)i[o]=0==(e&1<<o)?t[o]:r[o];a(i)}let n=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(n|=1<<e);if(0!==n&&7!==n)for(let e=0;e<8;++e)if(0==(n&e)){for(let o=0;o<3;++o)i[o]=0!=(n&1<<o)?0:0!=(e&1<<o)?t[o]:r[o];a(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const He=(0,d.Su)(),We=(0,d.Su)(),je=(0,d.Su)(),qe=(0,d.Su)(),Ke=(0,d.Su)();function ke(e,t,r){const{data:i,indices:o}=e,a=t.typedBuffer,n=t.typedBufferStride,s=o.length;r*=n;for(let e=0;e<s;++e){const t=2*o[e];a[r]=i[t],a[r+1]=i[t+1],r+=n}}function $e(e,t,r,i){const{data:o,indices:a}=e,n=t.typedBuffer,s=t.typedBufferStride,l=a.length;if(r*=s,null==i||1===i)for(let e=0;e<l;++e){const t=3*a[e];n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*a[e];for(let e=0;e<i;++e)n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],r+=s}}function Xe(e,t,r,i=1){const{data:o,indices:a}=e,n=t.typedBuffer,s=t.typedBufferStride,l=a.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=4*a[e];n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],n[r+3]=o[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*a[e];for(let e=0;e<i;++e)n[r]=o[t],n[r+1]=o[t+1],n[r+2]=o[t+2],n[r+3]=o[t+3],r+=s}}function Je(e,t,r,i,o=1){const a=t.typedBuffer,n=t.typedBufferStride;if(i*=n,1===o)for(let t=0;t<r;++t)a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=e[3],i+=n;else for(let t=0;t<r;++t)for(let t=0;t<o;++t)a[i]=e[0],a[i+1]=e[1],a[i+2]=e[2],a[i+3]=e[3],i+=n}function Ze(e,t,r,i,o,a){switch(e){case be.K.POSITION:{(0,ge.Uc)(3===t.size);const i=o.getField(e,m.Yj);(0,ge.Uc)(!!i,`No buffer view for ${e}`),i&&function(e,t,r,i,o=1){if(!t)return void $e(e,r,i,o);const{data:a,indices:s}=e,l=r.typedBuffer,c=r.typedBufferStride,d=s.length,u=t[0],h=t[1],m=t[2],f=t[4],p=t[5],v=t[6],g=t[8],_=t[9],x=t[10],T=t[12],E=t[13],b=t[14];i*=c;let S=0,A=0,y=0;const C=(0,n.yp)(t)?e=>{S=a[e]+T,A=a[e+1]+E,y=a[e+2]+b}:e=>{const t=a[e],r=a[e+1],i=a[e+2];S=u*t+f*r+g*i+T,A=h*t+p*r+_*i+E,y=m*t+v*r+x*i+b};if(1===o)for(let e=0;e<d;++e)C(3*s[e]),l[i]=S,l[i+1]=A,l[i+2]=y,i+=c;else for(let e=0;e<d;++e){C(3*s[e]);for(let e=0;e<o;++e)l[i]=S,l[i+1]=A,l[i+2]=y,i+=c}}(t,r,i,a);break}case be.K.NORMAL:{(0,ge.Uc)(3===t.size);const r=o.getField(e,m.Yj);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&function(e,t,r,i,o=1){if(!t)return void $e(e,r,i,o);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],E=!(0,n.QT)(l),b=1e-6,S=1-b;i*=d;let A=0,y=0,C=0;const w=(0,n.yp)(l)?e=>{A=a[e],y=a[e+1],C=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];A=h*t+p*r+_*i,y=m*t+v*r+x*i,C=f*t+g*r+T*i};if(1===o)if(E)for(let e=0;e<u;++e){w(3*s[e]);const t=A*A+y*y+C*C;if(t<S&&t>b){const e=1/Math.sqrt(t);c[i]=A*e,c[i+1]=y*e,c[i+2]=C*e}else c[i]=A,c[i+1]=y,c[i+2]=C;i+=d}else for(let e=0;e<u;++e)w(3*s[e]),c[i]=A,c[i+1]=y,c[i+2]=C,i+=d;else for(let e=0;e<u;++e){if(w(3*s[e]),E){const e=A*A+y*y+C*C;if(e<S&&e>b){const t=1/Math.sqrt(e);A*=t,y*=t,C*=t}}for(let e=0;e<o;++e)c[i]=A,c[i+1]=y,c[i+2]=C,i+=d}}(t,i,r,a);break}case be.K.NORMALCOMPRESSED:{(0,ge.Uc)(2===t.size);const r=o.getField(e,m.iN);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&ke(t,r,a);break}case be.K.UV0:{(0,ge.Uc)(2===t.size);const r=o.getField(e,m.U7);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&ke(t,r,a);break}case be.K.COLOR:case be.K.SYMBOLCOLOR:{const r=o.getField(e,m.sb);(0,ge.Uc)(!!r,`No buffer view for ${e}`),(0,ge.Uc)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||function(e,t,r,i,o=1){const{data:a,indices:n}=e,s=r.typedBuffer,l=r.typedBufferStride,c=n.length;if(i*=l,t!==a.length||4!==t)if(1!==o)if(4!==t)for(let e=0;e<c;++e){const t=3*n[e];for(let e=0;e<o;++e)s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=255,i+=l}else for(let e=0;e<c;++e){const t=4*n[e];for(let e=0;e<o;++e)s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=a[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*n[e];s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=a[t+3],i+=l}return}for(let e=0;e<c;++e){const t=3*n[e];s[i]=a[t],s[i+1]=a[t+1],s[i+2]=a[t+2],s[i+3]=255,i+=l}}else{s[i]=a[0],s[i+1]=a[1],s[i+2]=a[2],s[i+3]=a[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,n=e[i/=4];i+=t;const d=c*o;for(let r=1;r<d;++r)e[i]=n,i+=t}}(t,t.size,r,a);break}case be.K.COLORFEATUREATTRIBUTE:{const r=o.getField(e,m.AZ);(0,ge.Uc)(!!r,`No buffer view for ${e}`),(0,ge.Uc)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:i,indices:o}=e,a=t.typedBuffer,n=t.typedBufferStride,s=o.length,l=i[0];r*=n;for(let e=0;e<s;++e)a[r]=l,r+=n}(t,r,a);break}case be.K.TANGENT:{(0,ge.Uc)(4===t.size);const r=o.getField(e,m._5);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&function(e,t,r,i,o=1){if(!t)return void Xe(e,r,i,o);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=l[0],m=l[1],f=l[2],p=l[4],v=l[5],g=l[6],_=l[8],x=l[9],T=l[10],E=!(0,n.QT)(l),b=1e-6,S=1-b;if(i*=d,1===o)for(let e=0;e<u;++e){const t=4*s[e],r=a[t],o=a[t+1],n=a[t+2],l=a[t+3];let u=h*r+p*o+_*n,A=m*r+v*o+x*n,y=f*r+g*o+T*n;if(E){const e=u*u+A*A+y*y;if(e<S&&e>b){const t=1/Math.sqrt(e);u*=t,A*=t,y*=t}}c[i]=u,c[i+1]=A,c[i+2]=y,c[i+3]=l,i+=d}else for(let e=0;e<u;++e){const t=4*s[e],r=a[t],n=a[t+1],l=a[t+2],u=a[t+3];let A=h*r+p*n+_*l,y=m*r+v*n+x*l,C=f*r+g*n+T*l;if(E){const e=A*A+y*y+C*C;if(e<S&&e>b){const t=1/Math.sqrt(e);A*=t,y*=t,C*=t}}for(let e=0;e<o;++e)c[i]=A,c[i+1]=y,c[i+2]=C,c[i+3]=u,i+=d}}(t,i,r,a);break}case be.K.PROFILERIGHT:case be.K.PROFILEUP:case be.K.PROFILEVERTEXANDNORMAL:case be.K.FEATUREVALUE:{(0,ge.Uc)(4===t.size);const r=o.getField(e,m._5);(0,ge.Uc)(!!r,`No buffer view for ${e}`),r&&Xe(t,r,a)}}}class Qe{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.attributes.get(be.K.POSITION).indices.length}write(e,t,r,i,o){!function(e,t,r,i,o,a){for(const n of t.fields.keys()){const t=e.attributes.get(n),s=t?.indices;if(t&&s)Ze(n,t,r,i,o,a);else if(n===be.K.OBJECTANDLAYERIDCOLOR&&null!=e.objectAndLayerIdColor){const t=e.attributes.get(be.K.POSITION)?.indices;if(t){const r=t.length,i=o.getField(n,m.sb);Je(e.objectAndLayerIdColor,i,r,a)}}}}(r,this.vertexBufferLayout,e,t,i,o)}}var et=r(22592),tt=r(37008),rt=r(55164),it=r(60072),ot=r(74072),at=r(74780),nt=r(93316),st=r(63524),lt=r(1492);X.et.LESS,X.et.ALWAYS;const ct={mask:255},dt={function:{func:X.et.ALWAYS,ref:G.Aj.OutlineVisualElementMask,mask:G.Aj.OutlineVisualElementMask},operation:{fail:X.QD.KEEP,zFail:X.QD.KEEP,zPass:X.QD.ZERO}},ut={function:{func:X.et.ALWAYS,ref:G.Aj.OutlineVisualElementMask,mask:G.Aj.OutlineVisualElementMask},operation:{fail:X.QD.KEEP,zFail:X.QD.KEEP,zPass:X.QD.REPLACE}};X.et.EQUAL,G.Aj.OutlineVisualElementMask,G.Aj.OutlineVisualElementMask,X.QD.KEEP,X.QD.KEEP,X.QD.KEEP,X.et.NOTEQUAL,G.Aj.OutlineVisualElementMask,G.Aj.OutlineVisualElementMask,X.QD.KEEP,X.QD.KEEP,X.QD.KEEP;const ht=[1,1,.5],mt=[0,.6,.2],ft=[0,1,.2];var pt=r(83840);class vt extends it.Yj{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=(0,d.eu)(ht),this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=G.CM.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=(0,d.WK)(0,0,0),this.instancedDoublePrecision=!1,this.normalType=Ce.g.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.shadowMappingEnabled=!1,this.ambient=(0,d.WK)(.2,.2,.2),this.diffuse=(0,d.WK)(.8,.8,.8),this.externalColor=(0,tt.WK)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,d.Su)(),this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=G.sr.Less,this.textureAlphaMode=G.OA.Blend,this.textureAlphaCutoff=ot.k,this.textureAlphaPremultiplied=!1,this.hasOccludees=!1,this.renderOccluded=Ie.C2.Occlude,this.isDecoration=!1}}it.yO;class gt extends nt.O{initializeConfiguration(e,t){t.spherical=e.viewingMode===Se.UZ.Global,t.doublePrecisionRequiresObfuscation=e.rctx.driverTest.doublePrecisionRequiresObfuscation.result,t.textureCoordinateType=t.hasColorTexture||t.hasMetallicRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture||t.hasNormalTexture?rt.i.Default:rt.i.None,t.objectAndLayerIdColorInstanced=t.instanced}initializeProgram(e){return this._initializeProgram(e,gt.shader)}_initializeProgram(e,t){return new lt.G(e.rctx,t.get().build(this.configuration),st.q)}_convertDepthTestFunction(e){return e===G.sr.Lequal?X.et.LEQUAL:X.et.LESS}_makePipeline(e,t){const r=this.configuration,i=e===Oe.H.NONE,o=e===Oe.H.FrontFace;return(0,Ne._w)({blending:r.output!==ye.mC.Color&&r.output!==ye.mC.Alpha||!r.transparent?null:i?Pe:Fe(e),culling:_t(r)?(0,Ne.AD)(r.cullFace):null,depthTest:{func:Ge(e,this._convertDepthTestFunction(r.customDepthTest))},depthWrite:(i||o)&&r.writeDepth?Ne.AT:null,colorWrite:Ne.kp,stencilWrite:r.hasOccludees?ct:null,stencilTest:r.hasOccludees?t?ut:dt:null,polygonOffset:i||o?null:(a=r.enableOffset,a?Ue:null)});var a}initializePipeline(){return this._occludeePipelineState=this._makePipeline(this.configuration.transparencyPassType,!0),this._makePipeline(this.configuration.transparencyPassType,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function _t(e){return e.cullFace!==G.CM.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}gt.shader=new at.O(pt.D,(()=>r.e(5880).then(r.bind(r,75880))));var xt=r(41948),Tt=r(74912),Et=r(11925),bt=r(75040);class St extends Et.i0{}(0,xt._)([(0,Tt.y)({constValue:!0})],St.prototype,"hasSliceHighlight",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],St.prototype,"hasSliceInVertexProgram",void 0),(0,xt._)([(0,Tt.y)({constValue:bt.u.Pass})],St.prototype,"pbrTextureBindType",void 0);class At extends St{constructor(){super(...arguments),this.output=ye.mC.Color,this.alphaDiscardMode=G.OA.Opaque,this.doubleSidedMode=we.J.None,this.pbrMode=Me.Ax.Disabled,this.cullFace=G.CM.None,this.transparencyPassType=Oe.H.NONE,this.normalType=Ce.g.Attribute,this.textureCoordinateType=rt.i.None,this.customDepthTest=G.sr.Less,this.spherical=!1,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.multipassEnabled=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.objectAndLayerIdColorInstanced=!1,this.instancedDoublePrecision=!1,this.doublePrecisionRequiresObfuscation=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.cullAboveGround=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1}}(0,xt._)([(0,Tt.y)({count:ye.mC.COUNT})],At.prototype,"output",void 0),(0,xt._)([(0,Tt.y)({count:G.OA.COUNT})],At.prototype,"alphaDiscardMode",void 0),(0,xt._)([(0,Tt.y)({count:we.J.COUNT})],At.prototype,"doubleSidedMode",void 0),(0,xt._)([(0,Tt.y)({count:Me.Ax.COUNT})],At.prototype,"pbrMode",void 0),(0,xt._)([(0,Tt.y)({count:G.CM.COUNT})],At.prototype,"cullFace",void 0),(0,xt._)([(0,Tt.y)({count:Oe.H.COUNT})],At.prototype,"transparencyPassType",void 0),(0,xt._)([(0,Tt.y)({count:Ce.g.COUNT})],At.prototype,"normalType",void 0),(0,xt._)([(0,Tt.y)({count:rt.i.COUNT})],At.prototype,"textureCoordinateType",void 0),(0,xt._)([(0,Tt.y)({count:G.sr.COUNT})],At.prototype,"customDepthTest",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"spherical",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVertexColors",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSymbolColors",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVerticalOffset",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSlicePlane",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasSliceHighlight",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasColorTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasMetallicRoughnessTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasEmissionTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOcclusionTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasNormalTexture",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasScreenSizePerspective",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasVertexTangents",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOccludees",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"multipassEnabled",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasModelTransformation",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"offsetBackfaces",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"vvSize",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"vvColor",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"receiveShadows",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"receiveAmbientOcclusion",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"textureAlphaPremultiplied",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instanced",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instancedColor",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"objectAndLayerIdColorInstanced",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"instancedDoublePrecision",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"doublePrecisionRequiresObfuscation",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"writeDepth",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"transparent",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"enableOffset",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"cullAboveGround",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"snowCover",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasColorTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasEmissionTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasNormalTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasOcclusionTextureTransform",void 0),(0,xt._)([(0,Tt.y)()],At.prototype,"hasMetallicRoughnessTextureTransform",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"occlusionPass",void 0),(0,xt._)([(0,Tt.y)({constValue:!0})],At.prototype,"hasVvInstancing",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"useCustomDTRExponentForWater",void 0),(0,xt._)([(0,Tt.y)({constValue:!1})],At.prototype,"supportsTextureAtlas",void 0),(0,xt._)([(0,Tt.y)({constValue:!0})],At.prototype,"useFillLights",void 0);var yt=r(59888);class Ct extends gt{initializeConfiguration(e,t){super.initializeConfiguration(e,t),t.hasMetallicRoughnessTexture=!1,t.hasEmissionTexture=!1,t.hasOcclusionTexture=!1,t.hasNormalTexture=!1,t.hasModelTransformation=!1,t.normalType=Ce.g.Attribute,t.doubleSidedMode=we.J.WindingOrder,t.hasVertexTangents=!1}initializeProgram(e){return this._initializeProgram(e,Ct.shader)}}Ct.shader=new at.O(yt.R,(()=>r.e(1980).then(r.bind(r,81980))));class wt extends Ie.iK{constructor(e){super(e,Rt),this.supportsEdges=!0,this.produces=new Map([[Be.y.OPAQUE_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&!this.parameters.transparent],[Be.y.TRANSPARENT_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[Be.y.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,e=>((0,ye.ue)(e)||(0,ye.KQ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._configuration=new At,this._vertexBufferLayout=function(e){const t=(0,Ae.iC)().vec3f(be.K.POSITION);return e.normalType===Ce.g.Compressed?t.vec2i16(be.K.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(be.K.NORMAL),e.hasVertexTangents&&t.vec4f(be.K.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(be.K.UV0),e.hasVertexColors&&t.vec4u8(be.K.COLOR),e.hasSymbolColors&&t.vec4u8(be.K.SYMBOLCOLOR),(0,V.c)("enable-feature:objectAndLayerId-rendering")&&t.vec4u8(be.K.OBJECTANDLAYERIDCOLOR),t}(this.parameters)}isVisibleForOutput(e){return e!==ye.mC.Shadow&&e!==ye.mC.ShadowExcludeHighlight&&e!==ye.mC.ShadowHighlight||this.parameters.castShadows}isVisible(){const e=this.parameters;if(!super.isVisible()||0===e.layerOpacity)return!1;const{hasInstancedColor:t,hasVertexColors:r,hasSymbolColors:i,vvColor:o}=e,a="replace"===e.colorMixMode,n=e.opacity>0,s=e.externalColor&&e.externalColor[3]>0,l=t||o||i;return r&&l?a||n:r?a?s:n:l?a||n:a?s:n}getConfiguration(e,t){return this._configuration.output=e,this._configuration.hasNormalTexture=!!this.parameters.normalTextureId,this._configuration.hasColorTexture=!!this.parameters.textureId,this._configuration.hasVertexTangents=this.parameters.hasVertexTangents,this._configuration.instanced=this.parameters.isInstanced,this._configuration.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasSliceHighlight=this.parameters.hasSliceHighlight,this._configuration.alphaDiscardMode=this.parameters.textureAlphaMode,this._configuration.normalType=this.parameters.normalType,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,null!=this.parameters.customDepthTest&&(this._configuration.customDepthTest=this.parameters.customDepthTest),this._configuration.hasOccludees=this.parameters.hasOccludees,this._configuration.cullFace=this.parameters.hasSlicePlane?G.CM.None:this.parameters.cullFace,this._configuration.multipassEnabled=t.multipassEnabled,this._configuration.cullAboveGround=t.multipassTerrain.cullAboveGround,this._configuration.hasModelTransformation=null!=this.parameters.modelTransformation,e!==ye.mC.Color&&e!==ye.mC.Alpha||(this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.hasSymbolColors=this.parameters.hasSymbolColors,this.parameters.treeRendering?this._configuration.doubleSidedMode=we.J.WindingOrder:this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?we.J.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?we.J.WindingOrder:we.J.None,this._configuration.instancedColor=this.parameters.hasInstancedColor,this._configuration.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this._configuration.receiveAmbientOcclusion=this.parameters.receiveAmbientOcclusion&&null!=t.ssao,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this._configuration.pbrMode=this.parameters.usePBR?this.parameters.isSchematic?Me.Ax.Schematic:Me.Ax.Normal:Me.Ax.Disabled,this._configuration.hasMetallicRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this._configuration.hasEmissionTexture=!!this.parameters.emissiveTextureId,this._configuration.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this._configuration.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this._configuration.transparencyPassType=t.transparencyPassType,this._configuration.enableOffset=t.camera.relativeElevation<5e5,this._configuration.snowCover=this.hasSnowCover(t),this._configuration.hasColorTextureTransform=!!this.parameters.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!this.parameters.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!this.parameters.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!this.parameters.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!this.parameters.metallicRoughnessTextureTransformMatrix),this._configuration}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}intersect(e,t,r,i,o,a){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,c.s)(Dt,t[12],t[13],t[14]);let a=null;switch(r.viewingMode){case Se.UZ.Global:a=(0,c.n)(Pt,Dt);break;case Se.UZ.Local:a=(0,c.c)(Pt,Nt)}let n=0;const s=(0,c.f)(Ft,Dt,e.eye),l=(0,c.l)(s),d=(0,c.h)(s,s,1/l);let u=null;this.parameters.screenSizePerspective&&(u=(0,c.k)(a,d)),n+=(0,et.u6)(e,l,this.parameters.verticalOffset,u??0,this.parameters.screenSizePerspective),(0,c.h)(a,a,n),(0,c.t)(Lt,a,r.transform.inverseRotation),i=(0,c.f)(It,i,Lt),o=(0,c.f)(Ot,o,Lt)}var n;(0,et.Ep)(e,r,i,o,null!=(n=r.verticalOffset)?(Ye.offset=n,Ye):null,a)}createGLMaterial(e){return new Mt(e)}createBufferWriter(){return new Qe(this._vertexBufferLayout)}}class Mt extends Re.Q{constructor(e){super({...e,...e.material.parameters})}_updateShadowState(e){e.shadowMap.enabled!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:e.shadowMap.enabled})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.hasOccludees&&this._material.setParameters({hasOccludees:e.hasOccludees})}beginSlot(e){this._output!==ye.mC.Color&&this._output!==ye.mC.Alpha||(this._updateShadowState(e),this._updateOccludeeState(e));const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,c.s)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.ensureTechnique(t.treeRendering?Ct:gt,e)}}const Rt=new class extends vt{constructor(){super(...arguments),this.initTextureTransparent=!1,this.treeRendering=!1,this.hasVertexTangents=!1}},It=(0,d.Su)(),Ot=(0,d.Su)(),Nt=(0,d.WK)(0,0,1),Pt=(0,d.Su)(),Lt=(0,d.Su)(),Dt=(0,d.Su)(),Ft=(0,d.Su)(),Ut=()=>O.c.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");function Gt(e){throw new I.c("",`Request for object resource failed: ${e}`)}function Bt(e){const t=e.params,r=t.topology;let i=!0;switch(t.vertexAttributes||(Ut().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(Ut().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(Ut().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(Ut().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else Ut().warn("Indexed geometries must specify faces"),i=!1;break}default:Ut().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(Ut().warn("Geometry requires material"),i=!1);const o=e.params.vertexAttributes;for(const e in o)o[e].values||(Ut().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function Vt(e){const t=(0,u.FZ)();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&((0,u.K8)(t,r.bbMin),(0,u.K8)(t,r.bbMax))})),t}function zt(e){switch(e){case"mask":return G.OA.Mask;case"maskAndTransparency":return G.OA.MaskBlend;case"none":return G.OA.Opaque;default:return G.OA.Blend}}function Yt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Ht=new L.a(1,2,"wosr");var Wt=r(44875);async function jt(e,t){const r=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,i.Ur)(e));if("wosr"===r.fileType){const e=await(t.cache?t.cache.loadWOSR(r.url,t):async function(e,t){const r=await async function(e,t){const r=t?.streamDataRequester;if(r)return async function(e,t,r){const i=await(0,M.aG)(t.request(e,"json",r));if(!0===i.ok)return i.value;(0,P.CE)(i.error),Gt(i.error.details.url)}(e,r,t);const i=await(0,M.aG)((0,w.c)(e,t));if(!0===i.ok)return i.value.data;(0,P.CE)(i.error),Gt(i.error)}(e,t),i=await async function(e,t){const r=new Array;for(const i in e){const o=e[i],a=o.images[0].data;if(!a){Ut().warn("Externally referenced texture data is not yet supported");continue}const n=o.encoding+";base64,"+a,s="/textureDefinitions/"+i,l="rgba"===o.channels?o.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:X.Qz.REPEAT,t:X.Qz.REPEAT},preMultiplyAlpha:zt(l)!==G.OA.Opaque},d=null!=t&&t.disableTextures?Promise.resolve(null):F(n,t);r.push(d.then((e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l}))))}const i=await Promise.all(r),o={};for(const e of i)o[e.refId]=e;return o}(r.textureDefinitions??{},t);let o=0;for(const e in i)if(i.hasOwnProperty(e)){const t=i[e];o+=t?.image?t.image.width*t.image.height*4:0}return{resource:r,textures:i,size:o+(0,R.UN)(r)}}(r.url,t)),{engineResources:i,referenceBoundingBox:o}=function(e,t){const r=new Array,i=new Array,o=new Array,a=new N,n=e.resource,s=L.a.parse(n.version||"1.0","wosr");Ht.validate(s);const l=n.model.name,c=n.model.geometries,u=n.materialDefinitions??{},h=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const n=c[e];if(!Bt(n))continue;const s=Yt(n),l=n.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===n.params.topology)return null;const t=n.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l[be.K.POSITION],_=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,i=v(e)??(0,D.yh)(_);p.push([e,new U.O(r,i,t.valuesPerElement,!0)])}const x=s.texture,T=h&&h[x];if(T&&!f.has(x)){const{image:e,parameters:t}=T,r=new xe(e,t);i.push(r),f.set(x,r)}const E=f.get(x),b=E?E.id:void 0,S=s.material;let A=a.get(S,x);if(null==A){const e=u[S.substring(S.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=T&&T.alphaChannelUsage,i=e.transparency>0||"transparency"===r||"maskAndTransparency"===r,o=T?zt(T.alphaChannelUsage):void 0,n={ambient:(0,d.eu)(e.diffuse),diffuse:(0,d.eu)(e.diffuse),opacity:1-(e.transparency||0),transparent:i,textureAlphaMode:o,textureAlphaCutoff:.33,textureId:b,initTextureTransparent:!0,doubleSided:!0,cullFace:G.CM.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:T?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(n,t.materialParameters),A=new wt(n),a.set(S,x,A)}o.push(A);const y=new B.K(A,p);m+=p.find((e=>e[0]===be.K.POSITION))?.[1]?.indices.length??0,r.push(y)}return{engineResources:[{name:l,stageResources:{textures:i,materials:o,geometries:r},pivotOffset:n.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:Vt(r)}}(e,t);return{lods:i,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}const a=await(t.cache?t.cache.loadGLTF(r.url,t,!!t.usePBR):(0,T.G)(new x.k(t.streamDataRequester),r.url,t,t.usePBR)),S=a.model.meta?.ESRI_proxyEllipsoid,y=a.meta.isEsriSymbolResource&&null!=S&&"EsriRealisticTreesStyle"===a.meta.ESRI_webstyle;y&&!a.customMeta.esriTreeRendering&&(a.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const i=e.model.lods[r];for(const o of i.parts){const i=o.attributes.normal;if(null==i)return;const a=o.attributes.position,l=a.count,u=(0,d.Su)(),h=(0,d.Su)(),f=(0,d.Su)(),p=new Uint8Array(4*l),v=new Float64Array(3*l),g=(0,n.S_)((0,s.Su)(),o.transform);let _=0,x=0;for(let n=0;n<l;n++){a.getVec(n,h),i.getVec(n,u),(0,c.e)(h,h,o.transform),(0,c.f)(f,h,t.center),(0,c.H)(f,f,t.radius);const s=f[2],l=(0,c.l)(f),d=Math.min(.45+.55*l*l,1);(0,c.H)(f,f,t.radius),null!==g&&(0,c.e)(f,f,g),(0,c.n)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,c.m)(f,f,u,s>-1?.2:Math.min(-4*s-3.8,1)),v[_]=f[0],v[_+1]=f[1],v[_+2]=f[2],_+=3,p[x]=255*d,p[x+1]=255*d,p[x+2]=255*d,p[x+3]=255,x+=4}o.attributes.normal=new m.Yj(v),o.attributes.color=new m.sb(p)}}}(a,S));const I=!!t.usePBR,O=a.meta.isEsriSymbolResource?{usePBR:I,isSchematic:!1,treeRendering:y,mrrFactors:[...ft]}:{usePBR:I,isSchematic:!1,treeRendering:!1,mrrFactors:[...ht]},V={...t.materialParameters,treeRendering:y},{engineResources:z,referenceBoundingBox:Y}=function(e,t,r,i){const a=e.model,n=new Array,s=new Map,x=new Map,T=a.lods.length,S=(0,u.FZ)();return a.lods.forEach(((e,y)=>{const w=!0===i.skipHighLods&&(T>1&&0===y||T>3&&1===y)||!1===i.skipHighLods&&null!=i.singleLodIndex&&y!==i.singleLodIndex;if(w&&0!==y)return;const M=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const i=w?new wt({}):function(e,t,r,i,o,a,n){const s=t.material+(t.attributes.normal?"_normal":"")+(t.attributes.color?"_color":"")+(t.attributes.texCoord0?"_texCoord0":"")+(t.attributes.tangent?"_tangent":""),u=e.materials.get(t.material),h=null!=t.attributes.texCoord0,m=null!=t.attributes.normal;if(null==u)return null;const f=function(e){switch(e){case"BLEND":return G.OA.Blend;case"MASK":return G.OA.Mask;case"OPAQUE":case null:case void 0:return G.OA.Opaque}}(u.alphaMode);if(!a.has(s)){if(h){const t=(t,r=!1)=>{if(null!=t&&!n.has(t)){const i=e.textures.get(t);if(null!=i){const e=i.data;n.set(t,new xe((0,b.e6)(e)?e.data:e,{...i.parameters,preMultiplyAlpha:!(0,b.e6)(e)&&r,encoding:(0,b.e6)(e)&&null!=e.encoding?e.encoding:void 0}))}}};t(u.textureColor,f!==G.OA.Opaque),t(u.textureNormal),t(u.textureOcclusion),t(u.textureEmissive),t(u.textureMetallicRoughness)}const r=u.color[0]**(1/Wt.g),p=u.color[1]**(1/Wt.g),v=u.color[2]**(1/Wt.g),g=u.emissiveFactor[0]**(1/Wt.g),_=u.emissiveFactor[1]**(1/Wt.g),x=u.emissiveFactor[2]**(1/Wt.g),T=null!=u.textureColor&&h?n.get(u.textureColor):null,E=function({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:i,emissiveTexture:o,emissiveFactor:a,occlusionTexture:n}){return null==e&&null==t&&null==o&&(null==a||(0,c.j)(a,d.cX))&&null==n&&(null==i||1===i)&&(null==r||1===r)}({normalTexture:u.textureNormal,metallicRoughnessTexture:u.textureMetallicRoughness,metallicFactor:u.metallicFactor,roughnessFactor:u.roughnessFactor,emissiveTexture:u.textureEmissive,emissiveFactor:u.emissiveFactor,occlusionTexture:u.textureOcclusion}),S=null!=u.normalTextureTransform?.scale?u.normalTextureTransform?.scale:l.Qw;a.set(s,new wt({...i,transparent:f===G.OA.Blend,customDepthTest:G.sr.Lequal,textureAlphaMode:f,textureAlphaCutoff:u.alphaCutoff,diffuse:[r,p,v],ambient:[r,p,v],opacity:u.opacity,doubleSided:u.doubleSided,doubleSidedType:"winding-order",cullFace:u.doubleSided?G.CM.None:G.CM.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:m?Ce.g.Attribute:Ce.g.ScreenDerivative,castShadows:!0,receiveShadows:u.receiveShadows,receiveAmbientOcclusion:u.receiveAmbientOcclustion,textureId:null!=T?T.id:void 0,colorMixMode:u.colorMixMode,normalTextureId:null!=u.textureNormal&&h?n.get(u.textureNormal).id:void 0,textureAlphaPremultiplied:null!=T&&!!T.parameters.preMultiplyAlpha,occlusionTextureId:null!=u.textureOcclusion&&h?n.get(u.textureOcclusion).id:void 0,emissiveTextureId:null!=u.textureEmissive&&h?n.get(u.textureEmissive).id:void 0,metallicRoughnessTextureId:null!=u.textureMetallicRoughness&&h?n.get(u.textureMetallicRoughness).id:void 0,emissiveFactor:[g,_,x],mrrFactors:E?[...mt]:[u.metallicFactor,u.roughnessFactor,i.mrrFactors[2]],isSchematic:E,colorTextureTransformMatrix:A(u.colorTextureTransform),normalTextureTransformMatrix:A(u.normalTextureTransform),scale:[S[0],S[1]],occlusionTextureTransformMatrix:A(u.occlusionTextureTransform),emissiveTextureTransformMatrix:A(u.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:A(u.metallicRoughnessTextureTransform),...o}))}const p=a.get(s);if(r.stageResources.materials.push(p),h){const e=e=>{null!=e&&r.stageResources.textures.push(n.get(e))};e(u.textureColor),e(u.textureNormal),e(u.textureOcclusion),e(u.textureEmissive),e(u.textureMetallicRoughness)}return p}(a,e,M,t,r,s,x),{geometry:n,vertexCount:T}=function(e,t){const r=e.attributes.position.count,i=(0,E.y)(e.indices||r,e.primitiveType),a=(0,h.mc)(3*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.position;(0,f.a)(a,n,e.transform,3,s);const l=[[be.K.POSITION,new U.O(a,i,3,!0)]];if(null!=e.attributes.normal){const t=(0,h.mc)(3*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.normal;(0,o.yy)(qt,e.transform),(0,f.b)(t,a,qt,3,n),l.push([be.K.NORMAL,new U.O(t,i,3,!0)])}if(null!=e.attributes.tangent){const t=(0,h.mc)(4*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.tangent;(0,o.yy)(qt,e.transform),(0,p.t)(t,a,qt,4,n),l.push([be.K.TANGENT,new U.O(t,i,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,h.mc)(2*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.texCoord0;(0,v.n)(t,o,2,a),l.push([be.K.UV0,new U.O(t,i,2,!0)])}if(null!=e.attributes.color){const t=new Uint8Array(4*r);4===e.attributes.color.elementCount?e.attributes.color instanceof m._5?(0,p.s)(t,e.attributes.color,255):e.attributes.color instanceof m.sb?(0,_.c)(t,e.attributes.color):e.attributes.color instanceof m.Ig&&(0,p.s)(t,e.attributes.color,1/256):(t.fill(255),e.attributes.color instanceof m.Yj?(0,f.s)(t,e.attributes.color,255,4):e.attributes.color instanceof m.IN?(0,g.c)(t,e.attributes.color.typedBuffer,4,e.attributes.color.typedBufferStride):e.attributes.color instanceof m.k5&&(0,f.s)(t,e.attributes.color,1/256,4)),l.push([be.K.COLOR,new U.O(t,i,4,!0)])}return{geometry:new B.K(t,l),vertexCount:r}}(e,null!=i?i:new wt({})),C=n.boundingInfo;null!=C&&0===y&&((0,u.K8)(S,C.bbMin),(0,u.K8)(S,C.bbMax)),null!=i&&(M.stageResources.geometries.push(n),M.numberOfVertices+=T)})),w||n.push(M)})),{engineResources:n,referenceBoundingBox:S}}(a,O,V,t.skipHighLods&&null==r.specifiedLodIndex?{skipHighLods:!0}:{skipHighLods:!1,singleLodIndex:r.specifiedLodIndex});return{lods:z,referenceBoundingBox:Y,isEsriSymbolResource:a.meta.isEsriSymbolResource,isWosr:!1}}const qt=(0,a.Su)()},78720:(e,t,r)=>{var i,o;r.d(t,{KQ:()=>i}),r(53648),(o=i||(i={}))[o.Multiply=1]="Multiply",o[o.Ignore=2]="Ignore",o[o.Replace=3]="Replace",o[o.Tint=4]="Tint"},72364:(e,t,r)=>{r.d(t,{U1:()=>c,iC:()=>l});var i=r(71004),o=r(98132),a=r(90736);class n{constructor(e,t){this.layout=e,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const t of e.fields.keys()){const r=e.fields.get(t);this[t]=new r.constructor(this.buffer,r.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(e,t){const r=this[e];return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new n(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const o=this.stride;if(o%4==0){const a=new Uint32Array(e.buffer,t*o,i*o/4);new Uint32Array(this.buffer,r*o,i*o/4).set(a)}else{const a=new Uint8Array(e.buffer,t*o,i*o);new Uint8Array(this.buffer,r*o,i*o).set(a)}return this}get usedMemory(){return this.byteLength}dispose(){}}class s{constructor(e=null){this._stride=0,this._lastAligned=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach((e=>this._fields.set(e[0],{...e[1],constructor:h(e[1].constructor)}))))}vec2f(e,t){return this._appendField(e,i.U7,t),this}vec2f64(e,t){return this._appendField(e,i.wT,t),this}vec3f(e,t){return this._appendField(e,i.Yj,t),this}vec3f64(e,t){return this._appendField(e,i.Ax,t),this}vec4f(e,t){return this._appendField(e,i._5,t),this}vec4f64(e,t){return this._appendField(e,i.Ip,t),this}mat3f(e,t){return this._appendField(e,i.Ko,t),this}mat3f64(e,t){return this._appendField(e,i.m_,t),this}mat4f(e,t){return this._appendField(e,i.IL,t),this}mat4f64(e,t){return this._appendField(e,i.mF,t),this}vec4u8(e,t){return this._appendField(e,i.sb,t),this}f32(e,t){return this._appendField(e,i.AZ,t),this}f64(e,t){return this._appendField(e,i.oN,t),this}u8(e,t){return this._appendField(e,i.Kg,t),this}u16(e,t){return this._appendField(e,i.E_,t),this}i8(e,t){return this._appendField(e,i.kV,t),this}vec2i8(e,t){return this._appendField(e,i.oR,t),this}vec2i16(e,t){return this._appendField(e,i.iN,t),this}vec2u8(e,t){return this._appendField(e,i.eS,t),this}vec4u16(e,t){return this._appendField(e,i.Ig,t),this}u32(e,t){return this._appendField(e,i.Ym,t),this}_appendField(e,t,r){if(this._fields.has(e))return void(0,a.Uc)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,o.Ad)(t.ElementType),n=this._stride;this._stride+=i,this._fields.set(e,{size:i,constructor:t,offset:n,optional:r})}createBuffer(e){return new n(this,e)}createView(e){return new n(this,e)}clone(){const e=new s;return e._stride=this._stride,e._fields=new Map,this._fields.forEach(((t,r)=>e._fields.set(r,t))),e.BufferType=this.BufferType,e}get stride(){if(this._lastAligned!==this._fields.size){let e=1;this._fields.forEach((t=>e=Math.max(e,(0,o.Ad)(t.constructor.ElementType)))),this._stride=Math.floor((this._stride+e-1)/e)*e,this._lastAligned=this._fields.size}return this._stride}get fields(){return this._fields}}function l(){return new s}class c{constructor(e){this.fields=new Array,e.fields.forEach(((e,t)=>{const r={...e,constructor:u(e.constructor)};this.fields.push([t,r])})),this.stride=e.stride}}const d=[i.AZ,i.U7,i.Yj,i._5,i.Ko,i.IL,i.oN,i.wT,i.Ax,i.Ip,i.m_,i.mF,i.Kg,i.eS,i.IN,i.sb,i.E_,i.kg,i.k5,i.Ig,i.Ym,i.qZ,i.ER,i.q$,i.kV,i.oR,i.Oq,i.mq,i.Mt,i.iN,i.g7,i.OS,i.Ep,i.mI,i.Yv,i.i9];function u(e){return`${e.ElementType}_${e.ElementCount}`}function h(e){return m.get(e)}const m=new Map;d.forEach((e=>m.set(u(e),e)))},29244:(e,t,r)=>{r.d(t,{Eb:()=>Te,er:()=>Ie});var i=r(77556),o=r(68612),a=r(87104),n=r(41512),s=r(2620),l=r(98472),c=r(62484),d=r(74784),u=r(37008),h=r(22080),m=r(82448),f=r(51120),p=r(62880),v=r(38380),g=r(58632),_=r(60544),x=r(20136),T=r(21288),E=r(85256),b=r(89560);const S=1e-6,A=(0,c.Su)(),y=(0,c.Su)();function C(e,t,r,i,o,a,n,s,l,c){return function(e,t,r){let i=_e(e.maxVert[0],e.minVert[0]),o=0;for(let t=1;t<7;++t){const r=_e(e.maxVert[t],e.minVert[t]);r>i&&(i=r,o=t)}fe(t,e.minVert[o]),fe(r,e.maxVert[o])}(e,i,o),_e(i,o)<S?1:(he(n,i,o),ve(n,n),function(e,t,r,i){const{data:o,size:a}=e;let n=Number.NEGATIVE_INFINITY,s=0;for(let e=0;e<o.length;e+=a){F[0]=o[e]-t[0],F[1]=o[e+1]-t[1],F[2]=o[e+2]-t[2];const i=r[0]*F[0]+r[1]*F[1]+r[2]*F[2],a=r[0]*r[0]+r[1]*r[1]+r[2]*r[2],l=F[0]*F[0]+F[1]*F[1]+F[2]*F[2]-i*i/a;l>n&&(n=l,s=e)}return fe(i,o,s),n}(t,i,n,a)<S?2:(he(s,o,a),ve(s,s),he(l,a,i),ve(l,l),pe(r,s,n),ve(r,r),W(t,r,n,s,l,c),0))}const w=(0,c.Su)(),M=(0,c.Su)(),R=(0,c.Su)(),I=(0,c.Su)(),O=(0,c.Su)(),N=(0,c.Su)(),P=(0,c.Su)(),L=(0,c.Su)();function D(e,t,r,i,o,a,n,s,l){(function(e,t,r,i,o){!function(e,t,r,i,o){const{data:a,size:n}=e;fe(i,a),fe(o,i),r[0]=xe(j,t),r[1]=r[0];for(let e=n;e<a.length;e+=n){const n=a[e]*t[0]+a[e+1]*t[1]+a[e+2]*t[2];n<r[0]&&(r[0]=n,fe(i,a,e)),n>r[1]&&(r[1]=n,fe(o,a,e))}}(e,t,U,o,i);const a=xe(r,t);U[1]-S<=a&&(i[0]=void 0),U[0]+S>=a&&(o[0]=void 0)})(e,t,r,w,M),void 0!==w[0]&&(he(R,w,r),ve(R,R),he(I,w,i),ve(I,I),he(O,w,o),ve(O,O),pe(N,I,a),ve(N,N),pe(P,O,n),ve(P,P),pe(L,R,s),ve(L,L),W(e,N,a,I,R,l),W(e,P,n,O,I,l),W(e,L,s,R,O,l)),void 0!==M[0]&&(he(R,M,r),ve(R,R),he(I,M,i),ve(I,I),he(O,M,o),ve(O,O),pe(N,I,a),ve(N,N),pe(P,O,n),ve(P,P),pe(L,R,s),ve(L,L),W(e,N,a,I,R,l),W(e,P,n,O,I,l),W(e,L,s,R,O,l))}const F=[0,0,0],U=(0,E.Su)(),G=(0,c.Su)(),B=(0,c.Su)(),V=(0,c.Su)(),z=(0,c.Su)(),Y=(0,c.Su)(),H=(0,c.Su)();function W(e,t,r,i,o,a){if(ge(t)<S)return;pe(G,r,t),pe(B,i,t),pe(V,o,t),q(e,t,U),Y[1]=U[0],z[1]=U[1],H[1]=z[1]-Y[1];const n=[r,i,o],s=[G,B,V];for(let r=0;r<3;++r){q(e,n[r],U),Y[0]=U[0],z[0]=U[1],q(e,s[r],U),Y[2]=U[0],z[2]=U[1],H[0]=z[0]-Y[0],H[2]=z[2]-Y[2];const i=de(H);i<a.quality&&(fe(a.b0,n[r]),fe(a.b1,t),fe(a.b2,s[r]),a.quality=i)}}const j=(0,c.Su)();function q(e,t,r){const{data:i,size:o}=e;r[0]=Number.POSITIVE_INFINITY,r[1]=Number.NEGATIVE_INFINITY;for(let e=0;e<i.length;e+=o){const o=i[e]*t[0]+i[e+1]*t[1]+i[e+2]*t[2];r[0]=Math.min(r[0],o),r[1]=Math.max(r[1],o)}}function K(e,t,r){r.center=e,r.halfSize=(0,l.h)(t,t,.5),r.quaternion=s.IJ}const k=(0,c.Su)(),$=(0,c.Su)(),X=(0,c.Su)(),J=(0,c.Su)(),Z=(0,c.Su)(),Q=(0,c.Su)();function ee(e,t,r){fe(k,t),Math.abs(t[0])>Math.abs(t[1])&&Math.abs(t[0])>Math.abs(t[2])?k[0]=0:Math.abs(t[1])>Math.abs(t[2])?k[1]=0:k[2]=0,ge(k)<S&&(k[0]=k[1]=k[2]=1),pe($,t,k),ve($,$),pe(X,t,$),ve(X,X),te(e,t,$,X,J,Z),he(Q,Z,J),se(t,$,X,J,Z,Q,r)}function te(e,t,r,i,o,a){q(e,t,U),o[0]=U[0],a[0]=U[1],q(e,r,U),o[1]=U[0],a[1]=U[1],q(e,i,U),o[2]=U[0],a[2]=U[1]}const re=(0,c.Su)(),ie=(0,c.Su)(),oe=(0,c.Su)(),ae=(0,o.WK)(1,0,0,0,1,0,0,0,1),ne=(0,s.Su)();function se(e,t,r,i,o,a,n){ae[0]=e[0],ae[1]=e[1],ae[2]=e[2],ae[3]=t[0],ae[4]=t[1],ae[5]=t[2],ae[6]=r[0],ae[7]=r[1],ae[8]=r[2],n.quaternion=function(e,t){const r=t[0]+t[4]+t[8];if(r>0){let i=Math.sqrt(r+1);e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i}else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const i=(r+1)%3,o=(r+2)%3;let a=Math.sqrt(t[3*r+r]-t[3*i+i]-t[3*o+o]+1);e[r]=.5*a,a=.5/a,e[3]=(t[3*i+o]-t[3*o+i])*a,e[i]=(t[3*i+r]+t[3*r+i])*a,e[o]=(t[3*o+r]+t[3*r+o])*a}return e}(ne,ae),ue(re,i,o),me(re,re,.5),me(ie,e,re[0]),me(oe,t,re[1]),ue(ie,ie,oe),me(oe,r,re[2]),n.center=(0,l.g)(ie,ie,oe),n.halfSize=(0,l.h)(re,a,.5)}class le{constructor(e){this.minVert=new Array(7),this.maxVert=new Array(7),this.buffer=new ArrayBuffer(448);let t=0;this.minProj=new Float64Array(this.buffer,t,7),t+=56,this.maxProj=new Float64Array(this.buffer,t,7),t+=56;for(let e=0;e<7;++e)this.minVert[e]=new Float64Array(this.buffer,t,3),t+=24;for(let e=0;e<7;++e)this.maxVert[e]=new Float64Array(this.buffer,t,3),t+=24;for(let e=0;e<7;++e)this.minProj[e]=Number.POSITIVE_INFINITY,this.maxProj[e]=Number.NEGATIVE_INFINITY;const r=new Array(7),i=new Array(7),{data:o,size:a}=e;for(let e=0;e<o.length;e+=a){let t=o[e];t<this.minProj[0]&&(this.minProj[0]=t,r[0]=e),t>this.maxProj[0]&&(this.maxProj[0]=t,i[0]=e),t=o[e+1],t<this.minProj[1]&&(this.minProj[1]=t,r[1]=e),t>this.maxProj[1]&&(this.maxProj[1]=t,i[1]=e),t=o[e+2],t<this.minProj[2]&&(this.minProj[2]=t,r[2]=e),t>this.maxProj[2]&&(this.maxProj[2]=t,i[2]=e),t=o[e]+o[e+1]+o[e+2],t<this.minProj[3]&&(this.minProj[3]=t,r[3]=e),t>this.maxProj[3]&&(this.maxProj[3]=t,i[3]=e),t=o[e]+o[e+1]-o[e+2],t<this.minProj[4]&&(this.minProj[4]=t,r[4]=e),t>this.maxProj[4]&&(this.maxProj[4]=t,i[4]=e),t=o[e]-o[e+1]+o[e+2],t<this.minProj[5]&&(this.minProj[5]=t,r[5]=e),t>this.maxProj[5]&&(this.maxProj[5]=t,i[5]=e),t=o[e]-o[e+1]-o[e+2],t<this.minProj[6]&&(this.minProj[6]=t,r[6]=e),t>this.maxProj[6]&&(this.maxProj[6]=t,i[6]=e)}for(let e=0;e<7;++e){let t=r[e];fe(this.minVert[e],o,t),t=i[e],fe(this.maxVert[e],o,t)}}}class ce{constructor(){this.b0=(0,c.WK)(1,0,0),this.b1=(0,c.WK)(0,1,0),this.b2=(0,c.WK)(0,0,1),this.quality=0}}function de(e){return e[0]*e[1]+e[0]*e[2]+e[1]*e[2]}function ue(e,t,r){e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2]}function he(e,t,r){e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2]}function me(e,t,r){e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r}function fe(e,t,r=0){e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2]}function pe(e,t,r){const i=t[0],o=t[1],a=t[2],n=r[0],s=r[1],l=r[2];e[0]=o*l-a*s,e[1]=a*n-i*l,e[2]=i*s-o*n}function ve(e,t){const r=t[0]*t[0]+t[1]*t[1]+t[2]*t[2];if(r>0){const i=1/Math.sqrt(r);e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i}}function ge(e){return e[0]*e[0]+e[1]*e[1]+e[2]*e[2]}function _e(e,t){const r=t[0]-e[0],i=t[1]-e[1],o=t[2]-e[2];return r*r+i*i+o*o}function xe(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}class Te{constructor(e=c.cX,t=We,r=s.IJ){this._data=[e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2],r[3]]}clone(){const e=new Te;return e._data=this._data.slice(),e}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(e){const t=new Te;return t._data=e.slice(),t}static fromJSON(e){return new Te(e.center,e.halfSize,e.quaternion)}copy(e){this._data=e.data.slice()}get center(){return(0,l.s)(x.Wq.get(),this._data[0],this._data[1],this._data[2])}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(e){return e[0]=this._data[0],e[1]=this._data[1],e[2]=this._data[2],e}set center(e){this._data[0]=e[0],this._data[1]=e[1],this._data[2]=e[2]}setCenter(e,t,r){this._data[0]=e,this._data[1]=t,this._data[2]=r}get halfSize(){return(0,l.s)(x.Wq.get(),this._data[3],this._data[4],this._data[5])}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(e){return e[0]=this._data[3],e[1]=this._data[4],e[2]=this._data[5],e}set halfSize(e){this._data[3]=e[0],this._data[4]=e[1],this._data[5]=e[2]}get quaternion(){return(0,n.WO)(x.QX.get(),this._data[6],this._data[7],this._data[8],this._data[9])}getQuaternion(e){return e[0]=this._data[6],e[1]=this._data[7],e[2]=this._data[8],e[3]=this._data[9],e}set quaternion(e){this._data[6]=e[0],this._data[7]=e[1],this._data[8]=e[2],this._data[9]=e[3]}get data(){return this._data}getCorners(e){const t=Ee,r=this._data;t[0]=r[6],t[1]=r[7],t[2]=r[8],t[3]=r[9];for(let i=0;i<8;++i){const o=e[i];o[0]=(1&i?-1:1)*r[3],o[1]=(2&i?-1:1)*r[4],o[2]=(4&i?-1:1)*r[5],(0,l.u)(o,o,t),o[0]+=r[0],o[1]+=r[1],o[2]+=r[2]}}isVisible(e){return this.intersectPlane(e[0])<=0&&this.intersectPlane(e[1])<=0&&this.intersectPlane(e[2])<=0&&this.intersectPlane(e[3])<=0&&this.intersectPlane(e[4])<=0&&this.intersectPlane(e[5])<=0}get radius(){const e=this._data[3],t=this._data[4],r=this._data[5];return Math.sqrt(e*e+t*t+r*r)}intersectSphere(e){Ae[0]=this._data[0]-e[0],Ae[1]=this._data[1]-e[1],Ae[2]=this._data[2]-e[2];const t=this.getQuaternion(be);return(0,n.fO)(Ee,t),(0,l.u)(Ae,Ae,Ee),(0,l.v)(Ae,Ae),ye[0]=Math.min(Ae[0],this._data[3]),ye[1]=Math.min(Ae[1],this._data[4]),ye[2]=Math.min(Ae[2],this._data[5]),(0,l.w)(ye,Ae)<e[3]*e[3]}intersectSphereWithMBS(e,t=this.radius){const r=this._data;Ae[0]=r[0]-e[0],Ae[1]=r[1]-e[1],Ae[2]=r[2]-e[2];const i=e[3],o=i+t;return!((0,l.x)(Ae)>o*o)&&(Ee[0]=-r[6],Ee[1]=-r[7],Ee[2]=-r[8],Ee[3]=r[9],(0,l.u)(Ae,Ae,Ee),(0,l.v)(Ae,Ae),ye[0]=Math.min(Ae[0],r[3]),ye[1]=Math.min(Ae[1],r[4]),ye[2]=Math.min(Ae[2],r[5]),(0,l.w)(ye,Ae)<i*i)}intersectPlane(e){const t=e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3],r=this.projectedRadius((0,g.Oq)(e));return t>r?1:t<-r?-1:0}intersectRay(e,t,r=0){const i=this._data,o=Ee;o[0]=-i[6],o[1]=-i[7],o[2]=-i[8],o[3]=i[9],Ae[0]=e[0]-i[0],Ae[1]=e[1]-i[1],Ae[2]=e[2]-i[2];const a=(0,l.u)(Ae,Ae,Ee),n=(0,l.u)(ye,t,Ee);let s=-1/0,c=1/0;const d=this.getHalfSize(Ue);for(let e=0;e<3;e++){const t=a[e],i=n[e],o=d[e]+r;if(Math.abs(i)>1e-6){const e=(o-t)/i,r=(-o-t)/i;s=Math.max(s,Math.min(e,r)),c=Math.min(c,Math.max(e,r))}else if(t>o||t<-o)return!1}return s<=c}projectedArea(e,t,r,o){const a=this.getQuaternion(be);(0,n.fO)(Ee,a),Ae[0]=e[0]-this._data[0],Ae[1]=e[1]-this._data[1],Ae[2]=e[2]-this._data[2],(0,l.u)(Ae,Ae,Ee);const s=this.getHalfSize(Ue),c=Ae[0]<-s[0]?-1:Ae[0]>s[0]?1:0,u=Ae[1]<-s[1]?-1:Ae[1]>s[1]?1:0,h=Ae[2]<-s[2]?-1:Ae[2]>s[2]?1:0,m=Math.abs(c)+Math.abs(u)+Math.abs(h);if(0===m)return 1/0;const f=1===m?4:6,p=6*(c+3*u+9*h+13);(0,i.KU)(Ge,a),(0,i.aU)(Ge,Ge,s);const v=this.getCenter(De);for(let e=0;e<f;e++){const r=Re[p+e];(0,l.s)(Ae,((1&r)<<1)-1,(2&r)-1,((4&r)>>1)-1),(0,l.t)(Ae,Ae,Ge),(0,l.g)(Ce,v,Ae),Ce[3]=1,(0,d.t)(Ce,Ce,t);const i=1/Math.max(1e-6,Ce[3]);Me[2*e]=Ce[0]*i,Me[2*e+1]=Ce[1]*i}const g=2*f-2;let _=Me[0]*(Me[3]-Me[g+1])+Me[g]*(Me[1]-Me[g-1]);for(let e=2;e<g;e+=2)_+=Me[e]*(Me[e+3]-Me[e-1]);return Math.abs(_)*r*o*.125}projectedRadius(e){const t=this.getQuaternion(be);return(0,n.fO)(Ee,t),(0,l.u)(Ae,e,Ee),Math.abs(Ae[0]*this._data[3])+Math.abs(Ae[1]*this._data[4])+Math.abs(Ae[2]*this._data[5])}minimumDistancePlane(e){return e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3]-this.projectedRadius((0,g.Oq)(e))}maximumDistancePlane(e){return e[0]*this._data[0]+e[1]*this._data[1]+e[2]*this._data[2]+e[3]+this.projectedRadius((0,g.Oq)(e))}toAaBoundingBox(e){const t=this.getQuaternion(be),r=(0,i.KU)(Ge,t),o=this._data[3]*Math.abs(r[0])+this._data[4]*Math.abs(r[3])+this._data[5]*Math.abs(r[6]),a=this._data[3]*Math.abs(r[1])+this._data[4]*Math.abs(r[4])+this._data[5]*Math.abs(r[7]),n=this._data[3]*Math.abs(r[2])+this._data[4]*Math.abs(r[5])+this._data[5]*Math.abs(r[8]);e[0]=this._data[0]-o,e[1]=this._data[1]-a,e[2]=this._data[2]-n,e[3]=this._data[0]+o,e[4]=this._data[1]+a,e[5]=this._data[2]+n}transform(e,t,r,i=0,o=(0,m._s)(r),a=(0,m._s)(t),s=(0,v.Mx)(t,a)){if(r===o)t.isGeographic?function(e,t,r,i,o=(0,m._s)(r)){const a=(0,h.e0)(r),s=1+Math.max(0,i)/(a.radius+e.centerZ);e.getCenter(Le),Le[2]+=i,(0,p.projectBuffer)(Le,r,0,Le,o,0,1),t.center=Le;const c=e.getQuaternion(be);t.quaternion=c,(0,n.fO)(Ee,c),(0,l.s)(ze,0,0,1),(0,l.u)(ze,ze,Ee);const d=e.getHalfSize(Ue);(0,l.s)(ze,d[0]*Math.abs(ze[0]),d[1]*Math.abs(ze[1]),d[2]*Math.abs(ze[2])),(0,l.h)(ze,ze,a.inverseFlattening),(0,l.g)(ze,d,ze),t.halfSize=(0,l.h)(ze,ze,s)}(this,e,t,i,a):function(e,t,r,i,o=(0,m._s)(r),a=(0,v.Mx)(r,o)){e.getCorners(Ve),e.getCenter(Le),Le[2]+=i,(0,f.y)(r,Le,Be,o),t.setCenter(Be[12],Be[13],Be[14]);const s=2*Math.sqrt(1+Be[0]+Be[5]+Be[10]);Ee[0]=(Be[6]-Be[9])/s,Ee[1]=(Be[8]-Be[2])/s,Ee[2]=(Be[1]-Be[4])/s,Ee[3]=.25*s;const c=e.getQuaternion(be);t.quaternion=(0,n.iW)(Ee,Ee,c),(0,n.fO)(Ee,Ee),(0,l.s)(Ye,0,0,0);const d=t.getCenter(Fe);for(const e of Ve)e[2]+=i,a(e,0,e,0),(0,l.z)(ze,e,d),(0,l.u)(ze,ze,Ee),(0,l.v)(ze,ze),(0,l.C)(Ye,Ye,ze);t.halfSize=Ye}(this,e,t,i,a,s);else if(t.isWGS84&&(r.isWebMercator||(0,_.GK)(r)))!function(e,t,r,i,o){t.getCenter(De),De[2]+=o;const a=(0,m._s)(r);(0,p.projectBuffer)(De,e,0,De,a,0,1),Oe(a,t,De,r,i)}(t,this,r,e,i);else if(t.isWebMercator&&(0,_.GK)(r))!function(e,t,r,i,o){t.getCenter(De),De[2]+=o,Oe(e,t,De,r,i)}(t,this,r,e,i);else{const o=this.getCenter(De);o[2]+=i,(0,p.projectBuffer)(o,t,0,o,r,0,1),e.center=o,this!==e&&(e.quaternion=this.getQuaternion(be),e.halfSize=this.getHalfSize(Ue))}}}const Ee=(0,s.Su)(),be=(0,s.Su)(),Se=(0,s.Su)(),Ae=(0,c.Su)(),ye=(0,c.Su)(),Ce=(0,u.Su)();function we(e,t=new Te){return function(e,t){const{data:r,size:i}=e,o=r.length/i;if(o<=0)return;const a=new le(e);ue(A,a.minProj,a.maxProj),me(A,A,.5),he(y,a.maxProj,a.minProj);const n=de(y),s=new ce;s.quality=n,o<14&&(e=new b.Y(new Float64Array(a.buffer,112,42),3));const l=(0,c.Su)(),d=(0,c.Su)(),u=(0,c.Su)(),h=(0,c.Su)(),m=(0,c.Su)(),f=(0,c.Su)(),p=(0,c.Su)();switch(C(a,e,p,l,d,u,h,m,f,s)){case 1:return void K(A,y,t);case 2:return void ee(e,h,t)}D(e,p,l,d,u,h,m,f,s),te(e,s.b0,s.b1,s.b2,J,Z);const v=(0,c.Su)();he(v,Z,J),s.quality=de(v),s.quality<n?se(s.b0,s.b1,s.b2,J,Z,v,t):K(A,y,t)}(e,t),t}const Me=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],Re=(()=>{const e=new Int8Array(162);let t=0;const r=r=>{for(let i=0;i<r.length;i++)e[t+i]=r[i];t+=6};return r([6,2,3,1,5,4]),r([0,2,3,1,5,4]),r([0,2,3,7,5,4]),r([0,1,3,2,6,4]),r([0,1,3,2,0,0]),r([0,1,5,7,3,2]),r([0,1,3,7,6,4]),r([0,1,3,7,6,2]),r([0,1,5,7,6,2]),r([0,1,5,4,6,2]),r([0,1,5,4,0,0]),r([0,1,3,7,5,4]),r([0,2,6,4,0,0]),r([0,0,0,0,0,0]),r([1,3,7,5,0,0]),r([2,3,7,6,4,0]),r([2,3,7,6,0,0]),r([2,3,1,5,7,6]),r([0,1,5,7,6,2]),r([0,1,5,7,6,4]),r([0,1,3,7,6,4]),r([4,5,7,6,2,0]),r([4,5,7,6,0,0]),r([4,5,1,3,7,6]),r([0,2,3,7,5,4]),r([6,2,3,7,5,4]),r([6,2,3,1,5,4]),e})();function Ie(e,t,r,i,o){const a=e.getQuaternion(be);o.quaternion=a,(0,n.fO)(Ee,a);const s=e.getCenter(De),d=e.getHalfSize(Ue);if(i===T.UZ.Global){(0,l.u)(ze,s,Ee),(0,l.v)(Ye,ze),(0,l.y)(He,Ye,d),(0,l.z)(He,Ye,He);const i=(0,l.l)(He);(0,l.g)(He,Ye,d);const a=(0,l.l)(He);if(i<r)o.center=s,(0,l.s)(ze,r,r,r),o.halfSize=(0,l.g)(ze,d,ze);else{const n=a>0?1+t/a:1,s=i>0?1+r/i:1,c=(s+n)/2,u=(s-n)/2;(0,l.h)(He,Ye,u),o.halfSize=(0,l.r)(He,He,d,c),(0,l.h)(He,Ye,c),(0,l.r)(He,He,d,u),(0,l.A)(ze,ze),(0,l.B)(ze,He,ze);const h=e.getQuaternion(Se);o.center=(0,l.u)(ze,ze,h)}}else{o.center=(0,l.r)(ze,s,c.wx,(r+t)/2);const e=(0,l.u)(ze,c.wx,Ee);(0,l.v)(e,e),o.halfSize=(0,l.r)(Ye,d,e,(r-t)/2)}return o}function Oe(e,t,r,o,a){const n=t.getQuaternion(be),s=(0,i.KU)(Ge,n),l=t.getHalfSize(Ue);for(let e=0;e<8;++e){for(let t=0;t<3;++t)Le[t]=l[t]*(0!=(e&1<<t)?-1:1);for(let t=0;t<3;++t){let i=r[t];for(let e=0;e<3;++e)i+=Le[e]*s[3*e+t];Ne[3*e+t]=i}}(0,p.projectBuffer)(Ne,e,0,Ne,o,0,8),we(Pe,a)}const Ne=new Array(24),Pe=new b.Y(Ne,3),Le=(0,c.Su)(),De=(0,c.Su)(),Fe=(0,c.Su)(),Ue=(0,c.Su)(),Ge=(0,o.Su)(),Be=(0,a.Su)(),Ve=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],ze=(0,c.Su)(),Ye=(0,c.Su)(),He=(0,c.Su)(),We=(0,c.WK)(-1,-1,-1)},90124:(e,t,r)=>{r.d(t,{Er:()=>d,G8:()=>c,_J:()=>l});var i=r(80324),o=r(44840),a=r(48688),n=r(60288);function s(e){e.varyings.add("linearDepth","float")}function l(e){e.vertex.uniforms.add(new a.$("nearFar",((e,t)=>t.camera.nearFar)))}function c(e){e.vertex.code.add(n.Y`float calculateLinearDepth(vec2 nearFar,float z) {
|
|
281
281
|
return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
|
|
282
282
|
}`)}function d(e,t){const{vertex:r}=e;switch(t.output){case i.mC.Color:if(t.receiveShadows)return s(e),void r.code.add(n.Y`void forwardLinearDepth() { linearDepth = gl_Position.w; }`);break;case i.mC.LinearDepth:case i.mC.Shadow:case i.mC.ShadowHighlight:case i.mC.ShadowExcludeHighlight:return e.include(o.AX,t),s(e),l(e),c(e),void r.code.add(n.Y`void forwardLinearDepth() {
|
|
283
283
|
linearDepth = calculateLinearDepth(nearFar, vPosition_view.z);
|