@arcgis/core 4.25.0-next.20220718 → 4.25.0-next.20220721
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/Camera.js +1 -1
- package/analysis/DimensioningAnalysis.js +1 -1
- package/analysis/LineOfSightAnalysis.js +1 -1
- package/analysis/SliceAnalysis.js +1 -1
- package/arcade/featureset/support/RecentlyUsedCache.js +1 -1
- package/arcade/functions/featuresetgeom.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/1751de504354d98ac3fd.js +1 -0
- package/assets/esri/core/workers/chunks/1f4f1896880bfa6801c5.js +1 -0
- package/assets/esri/core/workers/chunks/290cd411d0d18b1d0efd.js +1 -0
- package/assets/esri/core/workers/chunks/{ab3bd5fecdb97f2d690e.js → 3b5be512567d9c1c6fe6.js} +1 -1
- package/assets/esri/core/workers/chunks/{c3236a7058e64ea3b939.js → 3c9da9b88777700879aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{f96e8724ae3458f5e262.js → 4a7aa1b9de61eb013647.js} +1 -1
- package/assets/esri/core/workers/chunks/4cb64ccb5fba126f9a66.js +1 -0
- package/assets/esri/core/workers/chunks/{68f19e58aae01791944e.js → 579ba109718bc2554008.js} +1 -1
- package/assets/esri/core/workers/chunks/59845b02b07a8ed7ce81.js +1 -0
- package/assets/esri/core/workers/chunks/{c705f907ce60a646d9aa.js → 652d36523efbe5c9ebb2.js} +1 -1
- package/assets/esri/core/workers/chunks/888d8e4471c9a2cd5009.js +1 -0
- package/assets/esri/core/workers/chunks/9493a8e5d6001b6bf275.js +1 -0
- package/assets/esri/core/workers/chunks/9d824cdfbcdf3cb3246f.js +1 -0
- package/assets/esri/core/workers/chunks/bf348f6f52701fa6016e.js +987 -0
- package/assets/esri/core/workers/chunks/d02881954c0cc0d39dfb.js +1 -0
- package/assets/esri/core/workers/chunks/{1ecbf642debc2207b762.js → da54483123f377e9b3e1.js} +1 -1
- package/assets/esri/core/workers/chunks/{61b71b8e028eda10ccab.js → e4ad2cf5d6bded02e392.js} +1 -1
- package/assets/esri/core/workers/chunks/{3bfab05ae07ac18a75fe.js → f298a70f3b6f27675d53.js} +1 -1
- package/assets/esri/core/workers/chunks/{d499cce61c1c5c367380.js → f40290cfad3fe6fb4ef9.js} +1 -1
- package/assets/esri/layers/support/rasterFormats/lerc-wasm.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Tooltip.scss +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/ComponentShader.glsl.js +39 -33
- package/chunks/Laserlines.glsl.js +4 -4
- package/chunks/Precipitation.glsl.js +2 -2
- package/chunks/RibbonLine.glsl.js +46 -44
- package/chunks/Stars.glsl.js +2 -2
- package/chunks/Terrain.glsl.js +25 -17
- package/chunks/boundedPlane.js +1 -1
- package/chunks/lerc-wasm.js +1 -1
- package/chunks/mat2d.js +1 -1
- package/chunks/quatf32.js +1 -1
- package/core/BidiEngine.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/libs/gl-matrix-2/factories/quatf32.js +1 -1
- package/core/libs/gl-matrix-2/math/mat2d.js +1 -1
- package/core/perspectiveUtils.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/core/reactiveUtils.js +1 -1
- package/core/unitUtils.js +1 -1
- package/geometry/projection.js +1 -1
- package/geometry/projectionEllipsoid.js +1 -1
- package/geometry/support/MeshTexture.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/geometry/support/coordinateSystem.js +1 -1
- package/geometry/support/geodesicUtils.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/index.js +1 -1
- package/geometry/support/meshUtils/loadExternal.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/scaleUtils.js +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/identity/IdentityModal.js +1 -1
- package/interfaces.d.ts +3 -33
- package/layers/FeatureLayer.js +1 -1
- package/layers/effects/parser.js +1 -1
- package/layers/graphics/hydratedFeatures.js +1 -1
- package/layers/graphics/sources/support/sourceUtils.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/ogc/wfsUtils.js +1 -1
- package/layers/support/ContingentValue.js +1 -1
- package/layers/support/ElevationQuery.js +1 -1
- package/layers/support/PixelBlock.js +1 -1
- package/layers/support/kmlUtils.js +1 -1
- package/layers/support/rasterDatasets/CloudRaster.js +1 -1
- package/layers/support/rasterDatasets/EphemeralBlockCache.js +1 -1
- package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
- package/layers/support/rasterDatasets/multipartParser.js +1 -1
- package/layers/support/rasterFormats/ImageCanvasDecoder.js +1 -1
- package/layers/support/rasterFormats/JpgPlus.js +1 -1
- package/layers/support/rasterFormats/Lerc.js +1 -1
- package/layers/support/rasterFormats/RasterCodec.js +1 -1
- package/layers/support/rasterFormats/Raw.js +1 -1
- package/layers/support/rasterFormats/TiffTags.js +1 -1
- package/layers/support/rasterFunctions/vectorFieldUtils.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/layers/support/wmtsUtils.js +1 -1
- package/package.json +1 -1
- package/renderers/RasterShadedReliefRenderer.js +1 -1
- package/renderers/RasterStretchRenderer.js +1 -1
- package/renderers/UniqueValueRenderer.js +1 -1
- package/renderers/support/AuthoringInfo.js +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/operations/queryTopFeatures.js +1 -1
- package/rest/support/DirectionsFeatureSet.js +1 -1
- package/rest/support/ImageHistogramParameters.js +1 -1
- package/rest/support/ImageSampleParameters.js +1 -1
- package/smartMapping/labels/clusters.js +1 -1
- package/smartMapping/renderers/relationship.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/LabelSymbol3D.js +1 -1
- package/symbols/PointSymbol3D.js +1 -1
- package/symbols/cim/CIMCursor.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/webStyleSymbolUtils.js +1 -1
- package/views/2d/ViewState.js +1 -1
- package/views/2d/engine/vectorTiles/Feature.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
- package/views/2d/engine/webgl/SDFConverter.js +1 -1
- package/views/2d/engine/webgl/TurboLine.js +1 -1
- package/views/2d/engine/webgl/brushes/BrushClip.js +1 -1
- package/views/2d/engine/webgl/brushes/BrushOverlay.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLGeometryBrushLabel.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLGeometryBrushLine.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLGeometryBrushText.js +1 -1
- package/views/2d/engine/webgl/collisions/MetricReader.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/DisplayRecordReader.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/FreeList.js +1 -1
- package/views/2d/engine/webgl/mesh/heuristics.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLDynamicFillTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLDynamicLineTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLDynamicMarkerTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLDynamicTextTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLLineTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLMarkerTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/input/MapViewInputManager.js +1 -1
- package/views/2d/layers/features/createSymbolSchema.js +1 -1
- package/views/2d/viewpointUtils.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/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechniqueConfiguration.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/FogTechnique.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateObjectSymbol3DAdapter.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.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/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/lineUtils.js +1 -1
- package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/IDBCache.js +1 -1
- package/views/3d/layers/i3s/IDBMockCache.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/Overlay.js +1 -1
- package/views/3d/terrain/OverlayRenderTarget.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TilingSchemeLogic.js +1 -1
- package/views/3d/terrain/interfaces.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js +9 -0
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +18 -17
- package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +5 -0
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/RenderInstanceData.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LaserlinePathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/MapView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/analysis/analysisViewUtils.js +1 -1
- package/views/animation/pointToPoint/apex/planning.js +1 -1
- package/views/draw/PolygonDrawAction.js +1 -1
- package/views/draw/PolylineDrawAction.js +1 -1
- package/views/draw/support/createUtils.js +1 -1
- package/views/draw/support/surfaceCoordinateSystems.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/input/handlers/LatestPointer.js +1 -1
- package/views/input/handlers/MultiTouch.js +5 -0
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileCache.js +1 -1
- package/views/interactive/tooltip/Tooltip.js +1 -1
- package/views/interactive/tooltip/support/measurements.js +1 -1
- package/views/layers/GroupLayerView.js +1 -1
- package/views/navigation/FilteredFiniteDifference.js +1 -1
- package/views/navigation/MomentumEstimator.js +1 -1
- package/views/navigation/PanPlanarMomentumEstimator.js +1 -1
- package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
- package/views/navigation/RotationMomentumEstimator.js +1 -1
- package/views/support/GroundViewElevationSampler.js +1 -1
- package/views/support/euclideanAreaMeasurementUtils.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.js +1 -1
- package/views/support/screenshotUtils.js +1 -1
- package/views/webgl/BufferObject.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/capabilities/Capabilities.js +1 -1
- package/views/webgl/capabilities.js +1 -1
- package/views/webgl/renderState.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/CoordinateConversion/support/formatUtils.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileController.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineInput.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
- package/widgets/ElevationProfile/support/chartUtils.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Legend/support/sizeRampUtils.js +1 -1
- package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/widgets/ScaleRangeSlider.js +1 -1
- package/widgets/Slider/SliderViewModel.js +1 -1
- package/widgets/Widget.js +1 -1
- package/assets/esri/core/workers/chunks/04ea469cb081e181ca82.js +0 -1
- package/assets/esri/core/workers/chunks/16c2626ca47132700519.js +0 -1
- package/assets/esri/core/workers/chunks/1e4e5d147263e98536bc.js +0 -1
- package/assets/esri/core/workers/chunks/35083def3c658d1ae9ff.js +0 -1
- package/assets/esri/core/workers/chunks/40032d2bf404a46b8f80.js +0 -1
- package/assets/esri/core/workers/chunks/613e82a3e13442685ac4.js +0 -1
- package/assets/esri/core/workers/chunks/64b4f1dbf61439cde801.js +0 -1
- package/assets/esri/core/workers/chunks/abd68b7ba3be4696611c.js +0 -1
- package/assets/esri/core/workers/chunks/b8a062c0c9c626acf61e.js +0 -982
- package/assets/esri/core/workers/chunks/e08686088be0aaca1a99.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[934],{46521:(t,e,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function i(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>i,c:()=>r}),Object.freeze(Object.defineProperty({__proto__:null,create:r,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},fromValues:function(t,e,n,r,i,o,s,c,a){return[t,e,n,r,i,o,s,c,a]},createView:i},Symbol.toStringTag,{value:"Module"}))},13598:(t,e,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}function o(t,e){return new Float64Array(t,e,16)}n.d(e,{I:()=>s,a:()=>o,b:()=>i,c:()=>r});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,create:r,clone:i,fromValues:function(t,e,n,r,i,o,s,c,a,u,l,d,h,f,_,T){return[t,e,n,r,i,o,s,c,a,u,l,d,h,f,_,T]},createView:o,IDENTITY:s},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,n)=>{function r(){return[0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3]]}function o(t,e){return new Float64Array(t,e,4)}n.d(e,{I:()=>s,a:()=>r,b:()=>i,c:()=>o});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,create:r,clone:i,fromValues:function(t,e,n,r){return[t,e,n,r]},createView:o,IDENTITY:s},Symbol.toStringTag,{value:"Module"}))},29268:(t,e,n)=>{n.d(e,{a:()=>m,c:()=>g,g:()=>O,h:()=>p,j:()=>A,m:()=>L}),n(80442);var r,i,o=n(92604),s=n(22021),c=n(70586),a=n(52138),u=n(17896),l=n(65617),d=n(98766),h=n(88669);(i=r||(r={}))[i.X=0]="X",i[i.Y=1]="Y",i[i.Z=2]="Z";var f=n(78341),_=n(61277),T=n(12981);function g(){return(0,h.c)()}function p(t,e=g()){return(0,d.c)(e,t)}function m(t){return t[3]}function O(t){return t}function N(t,e,n){if((0,c.Wi)(e))return!1;const{origin:r,direction:i}=e,o=E;o[0]=r[0]-t[0],o[1]=r[1]-t[1],o[2]=r[2]-t[2];const s=i[0]*i[0]+i[1]*i[1]+i[2]*i[2],a=2*(i[0]*o[0]+i[1]*o[1]+i[2]*o[2]),u=a*a-4*s*(o[0]*o[0]+o[1]*o[1]+o[2]*o[2]-t[3]*t[3]);if(u<0)return!1;const l=Math.sqrt(u);let d=(-a-l)/(2*s);const h=(-a+l)/(2*s);return(d<0||h<d&&h>0)&&(d=h),!(d<0||(n&&(n[0]=r[0]+i[0]*d,n[1]=r[1]+i[1]*d,n[2]=r[2]+i[2]*d),0))}const E=(0,l.c)();function A(t,e){return N(t,e,null)}function I(t,e,n){const r=T.WM.get(),i=T.MP.get();(0,u.f)(r,e.origin,e.direction);const o=m(t);(0,u.f)(n,r,e.origin),(0,u.g)(n,n,1/(0,u.l)(n)*o);const s=b(t,e.origin),c=(0,_.EU)(e.origin,n);return(0,a.d)(i,c+s,r),(0,u.m)(n,n,i),n}function R(t,e,n){const r=(0,u.b)(T.WM.get(),e,t),i=(0,u.g)(T.WM.get(),r,t[3]/(0,u.l)(r));return(0,u.a)(n,i,t)}function b(t,e){const n=(0,u.b)(T.WM.get(),e,t),r=(0,u.l)(n),i=m(t),o=i+Math.abs(i-r);return(0,s.ZF)(i/o)}const S=(0,l.c)();function F(t,e,n,i){const o=(0,u.b)(S,e,t);switch(n){case r.X:{const t=(0,s.jE)(o,S)[2];return(0,u.s)(i,-Math.sin(t),Math.cos(t),0)}case r.Y:{const t=(0,s.jE)(o,S),e=t[1],n=t[2],r=Math.sin(e);return(0,u.s)(i,-r*Math.cos(n),-r*Math.sin(n),Math.cos(e))}case r.Z:return(0,u.n)(i,o);default:return}}function M(t,e){const n=(0,u.b)(y,e,t);return(0,u.l)(n)-t[3]}function L(t,e){const n=(0,u.d)(t,e),r=m(t);return n<=r*r}const y=(0,l.c)(),v=g();Object.freeze(Object.defineProperty({__proto__:null,create:g,copy:p,fromCenterAndRadius:function(t,e){return(0,h.f)(t[0],t[1],t[2],e)},wrap:function(t){return t},clear:function(t){t[0]=t[1]=t[2]=t[3]=0},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},getRadius:m,getCenter:O,fromValues:function(t,e,n,r){return(0,h.f)(t,e,n,r)},elevate:function(t,e,n){return t!==n&&(0,u.c)(n,t),n[3]=t[3]+e,n},setExtent:function(t,e,n){return o.Z.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),t===n?n:p(t,n)},intersectRay:N,intersectsRay:A,intersectRayClosestSilhouette:function(t,e,n){if(N(t,e,n))return n;const r=I(t,e,T.WM.get());return(0,u.a)(n,e.origin,(0,u.g)(T.WM.get(),e.direction,(0,u.i)(e.origin,r)/(0,u.l)(e.direction))),n},closestPointOnSilhouette:I,closestPoint:function(t,e,n){return N(t,e,n)?n:((0,f.JI)(e,t,n),R(t,n,n))},projectPoint:R,distanceToSilhouette:function(t,e){const n=(0,u.b)(T.WM.get(),e,t),r=(0,u.p)(n),i=t[3]*t[3];return Math.sqrt(Math.abs(r-i))},angleToSilhouette:b,axisAt:F,altitudeAt:M,setAltitudeAt:function(t,e,n,i){const o=M(t,e),s=F(t,e,r.Z,y),c=(0,u.g)(y,s,n-o);return(0,u.a)(i,e,c)},containsPoint:L,tmpSphere:v},Symbol.toStringTag,{value:"Module"}))},88669:(t,e,n)=>{function r(){return[0,0,0,0]}function i(t,e,n,r){return[t,e,n,r]}function o(t,e){return new Float64Array(t,e,4)}function s(){return i(1,1,1,1)}function c(){return i(1,0,0,0)}function a(){return i(0,1,0,0)}function u(){return i(0,0,1,0)}function l(){return i(0,0,0,1)}n.d(e,{a:()=>o,c:()=>r,f:()=>i});const d=s(),h=c(),f=a(),_=u(),T=l();Object.freeze(Object.defineProperty({__proto__:null,create:r,clone:function(t){return[t[0],t[1],t[2],t[3]]},fromValues:i,fromArray:function(t){const e=[0,0,0,0],n=Math.min(4,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e},createView:o,zeros:function(){return[0,0,0,0]},ones:s,unitX:c,unitY:a,unitZ:u,unitW:l,ZEROS:[0,0,0,0],ONES:d,UNIT_X:h,UNIT_Y:f,UNIT_Z:_,UNIT_W:T},Symbol.toStringTag,{value:"Module"}))},47545:(t,e,n)=>{n.d(e,{d:()=>i});var r=n(22021);function i(t,e,n){const i=t.byteLength/(4*e),u=new Uint32Array(t,0,i*e);let l=new Uint32Array(i);const d=n?.minReduction??0,h=n?.originalIndices||null,f=h?h.length:0,_=n?.componentOffsets||null;let T=0;if(_)for(let t=0;t<_.length-1;t++){const e=_[t+1]-_[t];e>T&&(T=e)}else T=i;const g=Math.floor(1.1*T)+1;(null==a||a.length<2*g)&&(a=new Uint32Array((0,r.Sf)(2*g)));for(let t=0;t<2*g;t++)a[t]=0;let p=0;const m=!!_&&!!h,O=m?f:i,N=m?new Uint32Array(f):null,E=1.96;let A=0!==d?Math.ceil(4*E*E/(d*d)*d*(1-d)):O,I=1,R=_?_[1]:O;for(let t=0;t<O;t++){if(t===A){const e=1-p/t;if(e+E*Math.sqrt(e*(1-e)/t)<d)return null;A*=2}if(t===R){for(let t=0;t<2*g;t++)a[t]=0;if(h)for(let t=_[I-1];t<_[I];t++)N[t]=l[h[t]];R=_[++I]}const n=m?h[t]:t,r=n*e,i=c(u,r,e);let s=i%g,f=p;for(;0!==a[2*s+1];){if(a[2*s]===i){const t=a[2*s+1]-1;if(o(u,r,t*e,e)){f=l[t];break}}s++,s>=g&&(s-=g)}f===p&&(a[2*s]=i,a[2*s+1]=n+1,p++),l[n]=f}if(0!==d&&1-p/i<d)return null;if(m){for(let t=_[I-1];t<N.length;t++)N[t]=l[h[t]];l=N}const b=new Uint32Array(e*p);p=0;for(let t=0;t<O;t++)l[t]===p&&(s(u,(m?h[t]:t)*e,b,p*e,e),p++);if(h&&!m){const t=new Uint32Array(f);for(let e=0;e<t.length;e++)t[e]=l[h[e]];l=t}return{buffer:b.buffer,indices:l,uniqueCount:p}}function o(t,e,n,r){for(let i=0;i<r;i++)if(t[e+i]!==t[n+i])return!1;return!0}function s(t,e,n,r,i){for(let o=0;o<i;o++)n[r+o]=t[e+o]}function c(t,e,n){let r=0;for(let i=0;i<n;i++)r=t[e+i]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let a=null},78341:(t,e,n)=>{n.d(e,{JI:()=>u,Ue:()=>s,re:()=>a}),n(67676);var r=n(22807),i=n(17896),o=n(65617);function s(t){return t?c((0,o.a)(t.origin),(0,o.a)(t.direction)):c((0,o.c)(),(0,o.c)())}function c(t,e){return{origin:t,direction:e}}function a(t,e){const n=l.get();return n.origin=t,n.direction=e,n}function u(t,e,n){const r=(0,i.e)(t.direction,(0,i.b)(n,e,t.origin));return(0,i.a)(n,t.origin,(0,i.g)(n,t.direction,r)),n}n(12981);const l=new r.x((()=>s()))},61277:(t,e,n)=>{n.d(e,{EU:()=>s});var r=n(22021),i=n(17896),o=n(65617);function s(t,e){const n=(0,i.e)(t,e)/((0,i.l)(t)*(0,i.l)(e));return-(0,r.ZF)(n)}(0,o.c)(),(0,o.c)()},65576:(t,e,n)=>{n.d(e,{U$:()=>c});var r=n(56481),i=n(79583);class o{constructor(t,e){this.layout=t,this.buffer="number"==typeof e?new ArrayBuffer(e*t.stride):e;for(const e of t.fieldNames){const n=t.fields.get(e);this[e]=new n.constructor(this.buffer,n.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(t,e){const n=this[t];return n&&n.elementCount===e.ElementCount&&n.elementType===e.ElementType?n:null}slice(t,e){return new o(this.layout,this.buffer.slice(t*this.stride,e*this.stride))}copyFrom(t,e,n,r){const i=this.stride;if(i%4==0){const o=new Uint32Array(t.buffer,e*i,r*i/4);new Uint32Array(this.buffer,n*i,r*i/4).set(o)}else{const o=new Uint8Array(t.buffer,e*i,r*i);new Uint8Array(this.buffer,n*i,r*i).set(o)}}}class s{constructor(){this.stride=0,this.fields=new Map,this.fieldNames=[]}vec2f(t,e){return this._appendField(t,r.Eu,e),this}vec2f64(t,e){return this._appendField(t,r.q6,e),this}vec3f(t,e){return this._appendField(t,r.ct,e),this}vec3f64(t,e){return this._appendField(t,r.fP,e),this}vec4f(t,e){return this._appendField(t,r.ek,e),this}vec4f64(t,e){return this._appendField(t,r.Cd,e),this}mat3f(t,e){return this._appendField(t,r.gK,e),this}mat3f64(t,e){return this._appendField(t,r.ey,e),this}mat4f(t,e){return this._appendField(t,r.bj,e),this}mat4f64(t,e){return this._appendField(t,r.O1,e),this}vec4u8(t,e){return this._appendField(t,r.mc,e),this}f32(t,e){return this._appendField(t,r.ly,e),this}f64(t,e){return this._appendField(t,r.oS,e),this}u8(t,e){return this._appendField(t,r.D_,e),this}u16(t,e){return this._appendField(t,r.av,e),this}i8(t,e){return this._appendField(t,r.Hz,e),this}vec2i8(t,e){return this._appendField(t,r.Vs,e),this}vec2i16(t,e){return this._appendField(t,r.or,e),this}vec2u8(t,e){return this._appendField(t,r.xA,e),this}vec4u16(t,e){return this._appendField(t,r.v6,e),this}u32(t,e){return this._appendField(t,r.Nu,e),this}_appendField(t,e,n){const r=e.ElementCount*(0,i.n1)(e.ElementType),o=this.stride;this.fields.set(t,{size:r,constructor:e,offset:o,optional:n}),this.stride+=r,this.fieldNames.push(t)}alignTo(t){return this.stride=Math.floor((this.stride+t-1)/t)*t,this}hasField(t){return this.fieldNames.includes(t)}createBuffer(t){return new o(this,t)}createView(t){return new o(this,t)}clone(){const t=new s;return t.stride=this.stride,t.fields=new Map,this.fields.forEach(((e,n)=>t.fields.set(n,e))),t.fieldNames=this.fieldNames.slice(),t.BufferType=this.BufferType,t}}function c(){return new s}},5329:(t,e,n)=>{n.d(e,{K:()=>o});var r=n(35371),i=n(21968);function o(t,e=0){const n=t.stride;return t.fieldNames.filter((e=>{const n=t.fields.get(e).optional;return!(n&&n.glPadding)})).map((r=>{const o=t.fields.get(r),c=o.constructor.ElementCount,a=s(o.constructor.ElementType),u=o.offset,l=!(!o.optional||!o.optional.glNormalized);return new i.G(r,c,a,u,n,l,e)}))}function s(t){const e=c[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const c={u8:r.g.UNSIGNED_BYTE,u16:r.g.UNSIGNED_SHORT,u32:r.g.UNSIGNED_INT,i8:r.g.BYTE,i16:r.g.SHORT,i32:r.g.INT,f32:r.g.FLOAT}},11726:(t,e,n)=>{n.d(e,{hu:()=>i,yK:()=>o}),n(97323),n(98766),(0,n(88669).c)();class r{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function i(t,e){if(!t)throw e=e||"assert",console.log(new Error(e).stack),new r(e)}function o(t,e,n,r){let i,o=(n[0]-t[0])/e[0],s=(r[0]-t[0])/e[0];o>s&&(i=o,o=s,s=i);let c=(n[1]-t[1])/e[1],a=(r[1]-t[1])/e[1];if(c>a&&(i=c,c=a,a=i),o>a||c>s)return!1;c>o&&(o=c),a<s&&(s=a);let u=(n[2]-t[2])/e[2],l=(r[2]-t[2])/e[2];return u>l&&(i=u,u=l,l=i),!(o>l||u>s||(l<s&&(s=l),s<0))}},35065:(t,e,n)=>{var r;n.d(e,{T:()=>r}),function(t){t.POSITION="position",t.NORMAL="normal",t.UV0="uv0",t.AUXPOS1="auxpos1",t.AUXPOS2="auxpos2",t.MAPPOS="mapPos",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.TANGENT="tangent",t.OFFSET="offset",t.SUBDIVISIONFACTOR="subdivisionFactor",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.NORMALCOMPRESSED="normalCompressed",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.FEATUREVALUE="featureValue",t.MODELORIGINHI="modelOriginHi",t.MODELORIGINLO="modelOriginLo",t.MODEL="model",t.MODELNORMAL="modelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMALA="normalA",t.NORMALB="normalB",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.U8PADDING="u8padding",t.U16PADDING="u16padding",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.EXTRUDE="extrude",t.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",t.OBJECTANDLAYERIDCOLOR_INSTANCED="objectAndLayerIdColor_instanced"}(r||(r={}))},17288:(t,e,n)=>{n.d(e,{Hr:()=>l,dG:()=>u,tf:()=>s});var r=n(5329),i=n(65576),o=n(35065);const s=(0,i.U$)().vec3f(o.T.POSITION).u16(o.T.COMPONENTINDEX).u16(o.T.U16PADDING),c=(0,i.U$)().vec2u8(o.T.SIDENESS),a=((0,r.K)(c),(0,i.U$)().vec3f(o.T.POSITION0).vec3f(o.T.POSITION1).u16(o.T.COMPONENTINDEX).u8(o.T.VARIANTOFFSET,{glNormalized:!0}).u8(o.T.VARIANTSTROKE).u8(o.T.VARIANTEXTENSION,{glNormalized:!0}).u8(o.T.U8PADDING,{glPadding:!0}).u16(o.T.U16PADDING,{glPadding:!0})),u=a.clone().vec3f(o.T.NORMAL),l=a.clone().vec3f(o.T.NORMALA).vec3f(o.T.NORMALB);new Map([[o.T.POSITION0,0],[o.T.POSITION1,1],[o.T.COMPONENTINDEX,2],[o.T.VARIANTOFFSET,3],[o.T.VARIANTSTROKE,4],[o.T.VARIANTEXTENSION,5],[o.T.NORMAL,6],[o.T.NORMALA,6],[o.T.NORMALB,7],[o.T.SIDENESS,8]])},97411:(t,e,n)=>{n.d(e,{n:()=>d});var r=n(67676),i=n(22021),o=n(1533),s=n(17896),c=n(65617);const a=-1;var u,l;function d(t,e,n,c=m){const u=t.vertices.position,l=t.vertices.componentIndex,d=(0,i.Vl)(c.anglePlanar),p=(0,i.Vl)(c.angleSignificantEdge),O=Math.cos(p),N=Math.cos(d),E=g.edge,A=E.position0,I=E.position1,R=E.faceNormal0,b=E.faceNormal1,S=T(t),F=function(t){const e=t.faces.length/3,n=t.faces,r=t.neighbors;let i=0;for(let t=0;t<e;t++){const e=r[3*t+0],o=r[3*t+1],s=r[3*t+2],c=n[3*t+0],u=n[3*t+1],l=n[3*t+2];i+=e===a||c<u?1:0,i+=o===a||u<l?1:0,i+=s===a||l<c?1:0}const o=new Int32Array(4*i);let s=0;for(let t=0;t<e;t++){const e=r[3*t+0],i=r[3*t+1],c=r[3*t+2],u=n[3*t+0],l=n[3*t+1],d=n[3*t+2];(e===a||u<l)&&(o[s++]=u,o[s++]=l,o[s++]=t,o[s++]=e),(i===a||l<d)&&(o[s++]=l,o[s++]=d,o[s++]=t,o[s++]=i),(c===a||d<u)&&(o[s++]=d,o[s++]=u,o[s++]=t,o[s++]=c)}return o}(t),M=F.length/4,L=e.allocate(M);let y=0;const v=M,w=n.allocate(v);let P=0,C=0,D=0;const x=(0,r.w6)(0,M),U=new Float32Array(M);(0,o.Ed)(U,((t,e,n)=>{u.getVec(F[4*e+0],A),u.getVec(F[4*e+1],I),n[e]=(0,s.i)(A,I)})),x.sort(((t,e)=>U[e]-U[t]));const B=new Array,j=new Array;for(let t=0;t<M;t++){const r=x[t],i=U[r],o=F[4*r+0],c=F[4*r+1],T=F[4*r+2],g=F[4*r+3],p=g===a;if(u.getVec(o,A),u.getVec(c,I),p)(0,s.s)(R,S[3*T+0],S[3*T+1],S[3*T+2]),(0,s.c)(b,R),E.componentIndex=l.get(o),E.cosAngle=(0,s.e)(R,b);else{if((0,s.s)(R,S[3*T+0],S[3*T+1],S[3*T+2]),(0,s.s)(b,S[3*g+0],S[3*g+1],S[3*g+2]),E.componentIndex=l.get(o),E.cosAngle=(0,s.e)(R,b),f(E,N))continue;E.cosAngle<-.9999&&(0,s.c)(b,R)}C+=i,D++,p||h(E,O)?(e.write(L,y++,E),B.push(i)):_(E,d)&&(n.write(w,P++,E),j.push(i))}const V=new Float32Array(B.reverse()),G=new Float32Array(j.reverse());return{regular:{instancesData:e.trim(L,y),lodInfo:{lengths:V}},silhouette:{instancesData:n.trim(w,P),lodInfo:{lengths:G}},averageEdgeLength:C/D}}function h(t,e){return t.cosAngle<e}function f(t,e){return t.cosAngle>e}function _(t,e){const n=(0,i.ZF)(t.cosAngle),r=g.fwd,o=g.ortho;return(0,s.r)(r,t.position1,t.position0),n*((0,s.e)((0,s.f)(o,t.faceNormal0,t.faceNormal1),r)>0?-1:1)>e}function T(t){const e=t.faces.length/3,n=t.vertices.position,r=t.faces,i=p.v0,o=p.v1,c=p.v2,a=new Float32Array(3*e);for(let t=0;t<e;t++){const e=r[3*t+0],u=r[3*t+1],l=r[3*t+2];n.getVec(e,i),n.getVec(u,o),n.getVec(l,c),(0,s.b)(o,o,i),(0,s.b)(c,c,i),(0,s.f)(i,o,c),(0,s.n)(i,i),a[3*t+0]=i[0],a[3*t+1]=i[1],a[3*t+2]=i[2]}return a}(l=u||(u={}))[l.SOLID=0]="SOLID",l[l.SKETCH=1]="SKETCH";const g={edge:{position0:(0,c.c)(),position1:(0,c.c)(),faceNormal0:(0,c.c)(),faceNormal1:(0,c.c)(),componentIndex:0,cosAngle:0},ortho:(0,c.c)(),fwd:(0,c.c)()},p={v0:(0,c.c)(),v1:(0,c.c)(),v2:(0,c.c)()},m={anglePlanar:4,angleSignificantEdge:35}},212:(t,e,n)=>{n.d(e,{Kl:()=>R,n_:()=>L,kY:()=>b,Yr:()=>M});var r=n(47545);function i(t,e,n){const r=e/3,i=new Uint32Array(n+1),o=new Uint32Array(n+1),s=(t,e)=>{t<e?i[t+1]++:o[e+1]++};for(let e=0;e<r;e++){const n=t[3*e],r=t[3*e+1],i=t[3*e+2];s(n,r),s(r,i),s(i,n)}let c=0,a=0;for(let t=0;t<n;t++){const e=i[t+1],n=o[t+1];i[t+1]=c,o[t+1]=a,c+=e,a+=n}const u=new Uint32Array(6*r),l=i[n],d=(t,e,n)=>{if(t<e){const r=i[t+1]++;u[2*r]=e,u[2*r+1]=n}else{const r=o[e+1]++;u[2*l+2*r]=t,u[2*l+2*r+1]=n}};for(let e=0;e<r;e++){const n=t[3*e],r=t[3*e+1],i=t[3*e+2];d(n,r,e),d(r,i,e),d(i,n,e)}const h=(t,e)=>{const n=2*t,r=e-t;for(let t=1;t<r;t++){const e=u[n+2*t],r=u[n+2*t+1];let i=t-1;for(;i>=0&&u[n+2*i]>e;i--)u[n+2*i+2]=u[n+2*i],u[n+2*i+3]=u[n+2*i+1];u[n+2*i+2]=e,u[n+2*i+3]=r}};for(let t=0;t<n;t++)h(i[t],i[t+1]),h(l+o[t],l+o[t+1]);const f=new Int32Array(3*r),_=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,T=(t,e)=>{const n=_(t,e);f[3*e+n]=-1},g=(t,e,n,r)=>{const i=_(t,e);f[3*e+i]=r;const o=_(n,r);f[3*r+o]=e};for(let t=0;t<n;t++){let e=i[t];const n=i[t+1];let r=o[t];const s=o[t+1];for(;e<n&&r<s;){const n=u[2*e],i=u[2*l+2*r];n===i?(g(t,u[2*e+1],i,u[2*l+2*r+1]),e++,r++):n<i?(T(t,u[2*e+1]),e++):(T(i,u[2*l+2*r+1]),r++)}for(;e<n;)T(t,u[2*e+1]),e++;for(;r<s;)T(u[2*l+2*r],u[2*l+2*r+1]),r++}return f}var o=n(65576),s=n(35065),c=n(17288),a=n(77734),u=n(17896),l=n(65617),d=n(5329);class h{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?p:g}write(t,e,n){const r=this._edgeHashFunction(n);A.seed=r;const i=A.getIntRange(0,255),o=A.getIntRange(0,this.settings.variants-1),s=A.getFloat(),c=255*(.5*function(t,e){const n=t<0?-1:1;return Math.abs(t)**1.2*n}(-(1-Math.min(s/.7,1))+Math.max(0,s-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,i),t.variantStroke.set(e,o),t.variantExtension.set(e,c)}trim(t,e){return t.slice(0,e)}}const f=new Float32Array(6),_=new Uint32Array(f.buffer),T=new Uint32Array(1);function g(t){const e=f;e[0]=t.position0[0],e[1]=t.position0[1],e[2]=t.position0[2],e[3]=t.position1[0],e[4]=t.position1[1],e[5]=t.position1[2],T[0]=5381;for(let t=0;t<_.length;t++)T[0]=31*T[0]+_[t];return T[0]}function p(t){const e=f;e[0]=m(t.position0[0]),e[1]=m(t.position0[1]),e[2]=m(t.position0[2]),e[3]=m(t.position1[0]),e[4]=m(t.position1[1]),e[5]=m(t.position1[2]),T[0]=5381;for(let t=0;t<_.length;t++)T[0]=31*T[0]+_[t];return T[0]}function m(t){return Math.round(1e4*t)/1e4}class O{constructor(){this._commonWriter=new h}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return c.dG.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.a)(E,n.faceNormal0,n.faceNormal1),(0,u.n)(E,E),t.normal.setVec(e,E)}trim(t,e){return this._commonWriter.trim(t,e)}}O.Layout=c.dG,O.glLayout=(0,d.K)(c.dG,1);class N{constructor(){this._commonWriter=new h}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return c.Hr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),t.normalA.setVec(e,n.faceNormal0),t.normalB.setVec(e,n.faceNormal1)}trim(t,e){return this._commonWriter.trim(t,e)}}N.Layout=c.Hr,N.glLayout=(0,d.K)(c.Hr,1);const E=(0,l.c)(),A=new a.Z;var I=n(97411);function R(t){const e=b(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return S.updateSettings(t.writerSettings),F.updateSettings(t.writerSettings),(0,I.n)(e,S,F)}function b(t,e,n,o){if(e)return{faces:n,facesLength:o,neighbors:i(n,o,t.count),vertices:t};const s=(0,r.d)(t.buffer,t.stride/4,{originalIndices:n,originalIndicesLength:o}),a=i(s.indices,o,s.uniqueCount);return{faces:s.indices,facesLength:s.indices.length,neighbors:a,vertices:c.tf.createView(s.buffer)}}const S=new O,F=new N,M=(0,o.U$)().vec3f(s.T.POSITION0).vec3f(s.T.POSITION1),L=(0,o.U$)().vec3f(s.T.POSITION0).vec3f(s.T.POSITION1).u16(s.T.COMPONENTINDEX).u16(s.T.U16PADDING,{glPadding:!0})},40614:(t,e,n)=>{n.r(e),n.d(e,{default:()=>et});var r,i,o,s,c,a,u,l=n(43697),d=n(70586),h=n(95330),f=(n(92604),n(75215),n(67676),n(80442),n(20102),n(52011)),_=n(17896),T=n(65617),g=n(16996),p=n(29268),m=n(98370),O=n(71143),N=n(44553),E=n(22807),A=(n(52138),n(98766),n(88669)),I=n(78341);function R(t){return t?{ray:(0,I.Ue)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,I.Ue)(),c0:0,c1:Number.MAX_VALUE}}function b(t,e){for(let n=0;n<a.NUM;n++){const r=t[n];if(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]>=e[3])return!1}return!0}n(12981),new E.x((()=>R())),n(22021),n(61277),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(i=r||(r={}))[i.NONE=0]="NONE",i[i.CLAMP=1]="CLAMP",i[i.INFINITE_MIN=4]="INFINITE_MIN",i[i.INFINITE_MAX=8]="INFINITE_MAX",r.INFINITE_MIN,r.INFINITE_MAX,r.INFINITE_MAX,(c=o||(o={}))[c.LEFT=0]="LEFT",c[c.RIGHT=1]="RIGHT",c[c.BOTTOM=2]="BOTTOM",c[c.TOP=3]="TOP",c[c.NEAR=4]="NEAR",c[c.FAR=5]="FAR",function(t){t[t.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",t[t.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",t[t.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",t[t.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",t[t.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",t[t.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",t[t.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",t[t.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(s||(s={})),s.FAR_BOTTOM_RIGHT,s.NEAR_BOTTOM_RIGHT,s.NEAR_BOTTOM_LEFT,s.FAR_BOTTOM_LEFT,s.NEAR_BOTTOM_LEFT,s.NEAR_BOTTOM_RIGHT,s.NEAR_TOP_RIGHT,s.NEAR_TOP_LEFT,s.FAR_BOTTOM_RIGHT,s.FAR_BOTTOM_LEFT,s.FAR_TOP_LEFT,s.FAR_TOP_RIGHT,s.NEAR_BOTTOM_RIGHT,s.FAR_BOTTOM_RIGHT,s.FAR_TOP_RIGHT,s.NEAR_TOP_RIGHT,s.FAR_BOTTOM_LEFT,s.NEAR_BOTTOM_LEFT,s.NEAR_TOP_LEFT,s.FAR_TOP_LEFT,s.FAR_TOP_LEFT,s.NEAR_TOP_LEFT,s.NEAR_TOP_RIGHT,s.FAR_TOP_RIGHT,function(t){t[t.NUM=6]="NUM"}(a||(a={})),function(t){t[t.NUM=8]="NUM"}(u||(u={})),(0,A.f)(-1,-1,-1,1),(0,A.f)(1,-1,-1,1),(0,A.f)(1,1,-1,1),(0,A.f)(-1,1,-1,1),(0,A.f)(-1,-1,1,1),(0,A.f)(1,-1,1,1),(0,A.f)(1,1,1,1),(0,A.f)(-1,1,1,1),new E.x(R),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)();var S=n(11726);class F{constructor(t,e){this._objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new M,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}destroy(){this._degenerateObjects.clear(),M.clearPool(),j[0]=null,W.prune(),Y.prune()}add(t,e=t.length){this._objectCount+=e,this._grow(t,e);const n=M.acquire();for(let r=0;r<e;r++){const e=t[r];this._isDegenerate(e)?this._degenerateObjects.add(e):(n.init(this._root),this._add(e,n))}M.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=M.acquire();for(const r of t){const t=(0,d.pC)(e)?e:(0,p.h)(this._objectToBoundingSphere(r),k);D(t[3])?(n.init(this._root),this._remove(r,t,n)):this._degenerateObjects.delete(r)}M.release(n),this._shrink()}update(t,e){if(!D(e[3])&&this._isDegenerate(t))return;const n=function(t){return j[0]=t,j}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const r=(0,I.re)(t,e);this._forEachNode(this._root,(t=>{if(!this._intersectsNode(r,t))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObject(r,t)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObject(r,t)&&n(t)})),!0}))}forEachAlongRayWithVerticalOffset(t,e,n,r){const i=(0,I.re)(t,e);this._forEachNode(this._root,(t=>{if(!this._intersectsNodeWithOffset(i,t,r))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObjectWithOffset(i,t,r)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObjectWithOffset(i,t,r)&&n(t)})),!0}))}forEach(t){this._forEachNode(this._root,(e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0})),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,r=(()=>!0),i=1/0){let o=1/0,s=1/0,c=null;const a=P(t,e),u=a=>{if(--i,!r(a))return;const u=this._objectToBoundingSphere(a);if(!b(n,u))return;const l=C(t,e,(0,p.g)(u)),d=l-u[3],h=l+u[3];d<o&&(o=d,s=h,c=a)};return this._forEachNodeDepthOrdered(this._root,(r=>{if(i<=0||!b(n,r.bounds))return!1;if((0,_.g)(G,a,r.halfSize),(0,_.a)(G,G,r.bounds),C(t,e,G)>s)return!1;const o=r.node;return o.terminals.forAll((t=>u(t))),null!==o.residents&&o.residents.forAll((t=>u(t))),!0}),t,e),c}forEachInDepthRange(t,e,n,r,i,o,s){let c=-1/0,a=1/0;const u={setRange:t=>{n===F.DepthOrder.FRONT_TO_BACK?(c=Math.max(c,t.near),a=Math.min(a,t.far)):(c=Math.max(c,-t.far),a=Math.min(a,-t.near))}};u.setRange(r);const l=C(e,n,t),d=P(e,n),h=P(e,-n),f=t=>{if(!s(t))return;const r=this._objectToBoundingSphere(t),d=(0,p.g)(r),h=C(e,n,d)-l,f=h-r[3],_=h+r[3];f>a||_<c||!b(o,r)||i(t,u)};this._forEachNodeDepthOrdered(this._root,(t=>{if(!b(o,t.bounds))return!1;if((0,_.g)(G,d,t.halfSize),(0,_.a)(G,G,t.bounds),C(e,n,G)-l>a)return!1;if((0,_.g)(G,h,t.halfSize),(0,_.a)(G,G,t.bounds),C(e,n,G)-l<c)return!1;const r=t.node;return r.terminals.forAll((t=>f(t))),null!==r.residents&&r.residents.forAll((t=>f(t))),!0}),e,n)}forEachNode(t){this._forEachNode(this._root,(e=>t(e.node,e.bounds,e.halfSize)))}forEachNeighbor(t,e){const n=(0,p.a)(e),r=(0,p.g)(e),i=e=>{const i=this._objectToBoundingSphere(e),o=(0,p.a)(i),s=n+o;(0,_.d)((0,p.g)(i),r)-s*s<=0&&t(e)};this._forEachNode(this._root,(t=>{const e=(0,p.a)(t.bounds),o=n+e;if((0,_.d)((0,p.g)(t.bounds),r)-o*o>0)return!1;const s=t.node;return s.terminals.forAll((t=>i(t))),null!==s.residents&&s.residents.forAll((t=>i(t))),!0})),this.forEachDegenerateObject(i)}_intersectsNode(t,e){return v(e.bounds,2*-e.halfSize,z),v(e.bounds,2*e.halfSize,H),(0,S.yK)(t.origin,t.direction,z,H)}_intersectsNodeWithOffset(t,e,n){return v(e.bounds,2*-e.halfSize,z),v(e.bounds,2*e.halfSize,H),n.applyToMinMax(z,H),(0,S.yK)(t.origin,t.direction,z,H)}_intersectsObject(t,e){const n=this._objectToBoundingSphere(e);return!(n[3]>0)||(0,p.j)(n,t)}_intersectsObjectWithOffset(t,e,n){const r=this._objectToBoundingSphere(e);return!(r[3]>0)||(0,p.j)(n.applyToBoundingSphere(r),t)}_forEachNode(t,e){let n=M.acquire().init(t);const r=[n];for(;0!==r.length;){if(n=r.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&r.push(M.acquire().init(n).advance(t));M.release(n)}}_forEachNodeDepthOrdered(t,e,n,r=F.DepthOrder.FRONT_TO_BACK){let i=M.acquire().init(t);const o=[i];for(function(t,e,n){if(!Y.length)for(let t=0;t<8;++t)Y.push({index:0,distance:0});for(let n=0;n<8;++n){const r=x[n];Y.data[n].index=n,Y.data[n].distance=C(t,e,r)}Y.sort(((t,e)=>t.distance-e.distance));for(let t=0;t<8;++t)n[t]=Y.data[t].index}(n,r,$);0!==o.length;){if(i=o.pop(),e(i)&&!i.isLeaf())for(let t=7;t>=0;--t){const e=$[t];i.node.children[e]&&o.push(M.acquire().init(i).advance(e))}M.release(i)}}_remove(t,e,n){W.clear();const r=n.advanceTo(e,((t,e)=>{W.push(t.node),W.push(e)}))?n.node.terminals:n.node.residents;if(r.removeUnordered(t),0===r.length)for(let t=W.length-2;t>=0;t-=2){const e=W.data[t],n=W.data[t+1];if(!this._purge(e,n))break}}_nodeIsEmpty(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}_purge(t,e){return e>=0&&(t.children[e]=null),!!this._nodeIsEmpty(t)&&(null===t.residents&&(t.residents=new N.Z({shrink:!0})),!0)}_add(t,e){e.advanceTo(this._objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const r=M.acquire().init(t);this._add(e.getItemAt(n),r),M.release(r)}}_grow(t,e){if(0!==e&&(w(t,e,(t=>this._objectToBoundingSphere(t)),X),D(X[3])&&!this._fitsInsideTree(X)))if(this._nodeIsEmpty(this._root.node))(0,p.h)(X,this._root.bounds),this._root.halfSize=1.25*X[3];else{const t=this._rootBoundsForRootAsSubNode(X);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(X,t):this._growRootAsSubNode(t),M.release(t)}}_rebuildTree(t,e){(0,_.c)(K,e.bounds),K[3]=e.halfSize,w([t,K],2,(t=>t),Z);const n=M.acquire().init(this._root);this._root.initFrom(null,Z,1.25*Z[3]),this._forEachNode(n,(t=>(this.add(t.node.terminals.data,t.node.terminals.length),null!==t.node.residents&&this.add(t.node.residents.data,t.node.residents.length),!0))),M.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return this._forEachNode(this._root,(t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth))),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let r=-1/0;const i=this._root.bounds,o=this._root.halfSize;for(let t=0;t<3;t++){const s=i[t]-o-(n[t]-e),c=n[t]+e-(i[t]+o),a=Math.max(0,Math.ceil(s/(2*o))),u=Math.max(0,Math.ceil(c/(2*o)))+1,l=2**Math.ceil(Math.log(a+u)*Math.LOG2E);r=Math.max(r,l),q[t].min=a,q[t].max=u}for(let t=0;t<3;t++){let e=q[t].min,n=q[t].max;const s=(r-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const c=i[t]-o-e*o*2;V[t]=c+(n+e)*o}return V[3]=r*o*B,M.acquire().initFrom(null,V,r*o,0)}_growRootAsSubNode(t){const e=this._root.node;(0,_.c)(X,this._root.bounds),X[3]=this._root.halfSize,this._root.init(t),t.advanceTo(X,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,r=0;for(;r<e.length&&null==t;)n=r++,t=e[n];for(;r<e.length;)if(e[r++])return-1;return n}_isDegenerate(t){return!D(this._objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}}class M{constructor(){this.bounds=(0,p.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,r=this.depth){return this.node=(0,d.pC)(t)?t:M.createEmptyNode(),(0,d.pC)(e)&&(0,p.h)(e,this.bounds),this.halfSize=n,this.depth=r,this}advance(t){let e=this.node.children[t];e||(e=M.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=x[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.bounds[3]=this.halfSize*B,this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const r=this._childIndex(t);e&&e(this,r),this.advance(r)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new N.Z({shrink:!0}),residents:new N.Z({shrink:!0})}}static acquire(){return M._pool.acquire()}static release(t){M._pool.release(t)}static clearPool(){M._pool.prune()}}function L(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function y(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function v(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function w(t,e,n,r){if(1===e){const e=n(t[0]);(0,p.h)(e,r)}else{z[0]=1/0,z[1]=1/0,z[2]=1/0,H[0]=-1/0,H[1]=-1/0,H[2]=-1/0;for(let r=0;r<e;r++){const e=n(t[r]);D(e[3])&&(L(z,e),y(H,e))}(0,_.h)(r,z,H,.5),r[3]=Math.max(H[0]-z[0],H[1]-z[1],H[2]-z[2])/2}}function P(t,e){let n=1/0,r=null;for(let i=0;i<8;++i){const o=C(t,e,U[i]);o<n&&(n=o,r=U[i])}return r}function C(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function D(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}M._pool=new O.Z(M),function(t){var e;(e=t.DepthOrder||(t.DepthOrder={}))[e.FRONT_TO_BACK=1]="FRONT_TO_BACK",e[e.BACK_TO_FRONT=-1]="BACK_TO_FRONT"}(F||(F={}));const x=[(0,T.f)(-1,-1,-1),(0,T.f)(1,-1,-1),(0,T.f)(-1,1,-1),(0,T.f)(1,1,-1),(0,T.f)(-1,-1,1),(0,T.f)(1,-1,1),(0,T.f)(-1,1,1),(0,T.f)(1,1,1)],U=[(0,T.f)(-1,-1,-1),(0,T.f)(-1,-1,1),(0,T.f)(-1,1,-1),(0,T.f)(-1,1,1),(0,T.f)(1,-1,-1),(0,T.f)(1,-1,1),(0,T.f)(1,1,-1),(0,T.f)(1,1,1)],B=Math.sqrt(3),j=[null],V=(0,p.c)(),G=(0,T.c)(),z=(0,T.c)(),H=(0,T.c)(),W=new N.Z,k=(0,p.c)(),X=(0,p.c)(),K=(0,p.c)(),Z=(0,p.c)(),q=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],Y=new N.Z,$=[0,0,0,0,0,0,0,0],J=F;var Q=n(212);let tt=class{constructor(){this._idToComponent=new Map,this._components=new J((t=>t.bounds)),this._edges=new J((t=>t.bounds)),this._tmpLineSegment=(0,g.Ue)(),this._tmpP1=(0,T.c)(),this._tmpP2=(0,T.c)(),this._tmpP3=(0,T.c)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,h.k_)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor((e=>this._addCandidates(t,e,n)),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor((t=>{if((0,d.Wi)(t.info)){const{id:e,uid:r}=t;n.push({id:e,uid:r})}}),t.bounds),!n.length)return;const r={components:n},i=await this.remoteClient.invoke("fetchAllEdgeLocations",r,(0,d.Pt)(e,{}));for(const t of i.components)this._setFetchEdgeLocations(t)}async add(t){const e=new nt(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor((n=>{n.component===e&&t.push(n)}),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if((0,d.Wi)(e)||t.uid!==e.uid)return;const n=Q.n_.createView(t.locations),r=new Array(n.count),i=(0,T.c)(),o=(0,T.c)();for(let s=0;s<n.count;s++){const c=(0,p.c)(),a=(0,p.g)(c);n.position0.getVec(s,i),n.position1.getVec(s,o),(0,_.C)(a,a,i,.5),(0,_.C)(a,a,o,.5),(0,_.a)(a,a,t.origin),c[3]=(0,_.i)(a,i);const u=new rt(e,s,c);r[s]=u}this._edges.add(r);const{objectIds:s,origin:c}=t;e.info={locations:n,objectIds:s,origin:c}}_addCandidates(t,e,n){const{locations:r,origin:i,objectIds:o}=e.component.info,s=r.position0.getVec(e.index,this._tmpP1),c=r.position1.getVec(e.index,this._tmpP2);(0,_.a)(s,s,i),(0,_.a)(c,c,i);const a=o[r.componentIndex.get(e.index)];this._addEdgeCandidate(t,a,s,c,n),this._addVertexCandidate(t,a,s,n),this._addVertexCandidate(t,a,c,n)}_addEdgeCandidate(t,e,n,r,i){if(!(t.types&m.r.EDGE))return;const o=(0,p.g)(t.bounds),s=(0,g.zk)(n,r,this._tmpLineSegment),c=(0,g.nF)(s,o,this._tmpP3);if(!(0,p.m)(t.bounds,c))return null;i.push({type:"edge",objectId:e,target:(0,T.a)(c),distance:(0,_.i)(o,c),start:(0,T.a)(n),end:(0,T.a)(r)})}_addVertexCandidate(t,e,n,r){if(!(t.types&m.r.VERTEX))return;const i=(0,p.g)(t.bounds);if(!(0,p.m)(t.bounds,n))return null;r.push({type:"vertex",objectId:e,target:(0,T.a)(n),distance:(0,_.i)(i,n)})}};tt=(0,l._)([(0,f.j)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],tt);const et=tt;class nt{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++nt.uid}}nt.uid=0;class rt{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},21968:(t,e,n)=>{n.d(e,{G:()=>r});class r{constructor(t,e,n,r,i,o=!1,s=0){this.name=t,this.count=e,this.type=n,this.offset=r,this.stride=i,this.normalized=o,this.divisor=s}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7789],{22303:(e,t,r)=>{r.d(t,{Z:()=>f});var n,o,i=r(35270),s=r(22021),a=r(70586),l=r(75215);function u(e){return(0,s.uZ)((0,l.vU)(e),0,255)}function c(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}class d{constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}static blendColors(e,t,r,n=new d){return n.r=Math.round(e.r+(t.r-e.r)*r),n.g=Math.round(e.g+(t.g-e.g)*r),n.b=Math.round(e.b+(t.b-e.b)*r),n.a=e.a+(t.a-e.a)*r,n._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),n=r[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),d.fromArray(r,t)}return d.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return d.fromArray((0,i.B7)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new d){if(4!==e.length&&7!==e.length||"#"!==e[0])return null;const r=4===e.length?4:8,n=(1<<r)-1;let o=Number("0x"+e.substr(1));return isNaN(o)?null:(["b","g","r"].forEach((e=>{const i=o&n;o>>=r,t[e]=4===r?17*i:i})),t.a=1,t)}static fromArray(e,t=new d){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,i.St)(e)?(0,i.h$)(e):null;return r&&d.fromArray(r,t)||d.fromRgb(e,t)||d.fromHex(e,t)}static fromJSON(e){return e&&new d([e[0],e[1],e[2],e[3]/255])}static toUnitRGB(e){return(0,a.pC)(e)?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return(0,a.pC)(e)?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?d.fromString(e,this):Array.isArray(e)?d.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof d||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(){const e=this.r.toString(16),t=this.g.toString(16),r=this.b.toString(16);return`#${e.length<2?"0"+e:e}${t.length<2?"0"+t:t}${r.length<2?"0"+r:r}`}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=d.AlphaMode.ALWAYS){const t=u(this.r),r=u(this.g),n=u(this.b);return e===d.AlphaMode.ALWAYS||1!==this.a?[t,r,n,u(255*this.a)]:[t,r,n]}clone(){return new d(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return(0,a.pC)(e)&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(c(this.r,0,255)),this.g=Math.round(c(this.g,0,255)),this.b=Math.round(c(this.b,0,255)),this.a=c(this.a,0,1),this}_set(e,t,r,n){this.r=e,this.g=t,this.b=r,this.a=n}}d.prototype.declaredClass="esri.Color",n=d||(d={}),(o=n.AlphaMode||(n.AlphaMode={}))[o.ALWAYS=0]="ALWAYS",o[o.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const f=d},46521:(e,t,r)=>{function n(){return[1,0,0,0,1,0,0,0,1]}function o(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>o,c:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,create:n,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},fromValues:function(e,t,r,n,o,i,s,a,l){return[e,t,r,n,o,i,s,a,l]},createView:o},Symbol.toStringTag,{value:"Module"}))},51305:(e,t,r)=>{r.d(t,{c:()=>p,g:()=>c,j:()=>O,k:()=>b,m:()=>d,s:()=>u});var n=r(46521),o=r(94961),i=r(65617),s=r(46851),a=r(17896),l=r(98766);function u(e,t,r){r*=.5;const n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),n=Math.sin(r/2);return n>(0,s.g)()?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),r}function d(e,t,r){const n=t[0],o=t[1],i=t[2],s=t[3],a=r[0],l=r[1],u=r[2],c=r[3];return e[0]=n*c+s*a+o*u-i*l,e[1]=o*c+s*l+i*a-n*u,e[2]=i*c+s*u+n*l-o*a,e[3]=s*c-n*a-o*l-i*u,e}function f(e,t,r,n){const o=t[0],i=t[1],a=t[2],l=t[3];let u,c,d,f,p,h=r[0],b=r[1],y=r[2],g=r[3];return c=o*h+i*b+a*y+l*g,c<0&&(c=-c,h=-h,b=-b,y=-y,g=-g),1-c>(0,s.g)()?(u=Math.acos(c),d=Math.sin(u),f=Math.sin((1-n)*u)/d,p=Math.sin(n*u)/d):(f=1-n,p=n),e[0]=f*o+p*h,e[1]=f*i+p*b,e[2]=f*a+p*y,e[3]=f*l+p*g,e}function p(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function h(e,t){const r=t[0]+t[4]+t[8];let n;if(r>0)n=Math.sqrt(r+1),e[3]=.5*n,n=.5/n,e[0]=(t[5]-t[7])*n,e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const o=(r+1)%3,i=(r+2)%3;n=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*i+i]+1),e[r]=.5*n,n=.5/n,e[3]=(t[3*o+i]-t[3*i+o])*n,e[o]=(t[3*o+r]+t[3*r+o])*n,e[i]=(t[3*i+r]+t[3*r+i])*n}return e}function b(e,t,r,n){const o=.5*Math.PI/180;t*=o,r*=o,n*=o;const i=Math.sin(t),s=Math.cos(t),a=Math.sin(r),l=Math.cos(r),u=Math.sin(n),c=Math.cos(n);return e[0]=i*l*c-s*a*u,e[1]=s*a*c+i*l*u,e[2]=s*l*u-i*a*c,e[3]=s*l*c+i*a*u,e}const y=l.c,g=l.s,m=l.a,w=d,C=l.b,v=l.d,T=l.l,S=l.e,A=S,U=l.f,I=U,M=l.n,O=l.g,_=l.h,E=(0,i.c)(),R=(0,i.f)(1,0,0),N=(0,i.f)(0,1,0),B=(0,o.a)(),k=(0,o.a)(),P=(0,n.c)();Object.freeze(Object.defineProperty({__proto__:null,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},setAxisAngle:u,getAxisAngle:c,multiply:d,rotateX:function(e,t,r){r*=.5;const n=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=n*l+s*a,e[1]=o*l+i*a,e[2]=i*l-o*a,e[3]=s*l-n*a,e},rotateY:function(e,t,r){r*=.5;const n=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=n*l-i*a,e[1]=o*l+s*a,e[2]=i*l+n*a,e[3]=s*l-o*a,e},rotateZ:function(e,t,r){r*=.5;const n=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=n*l+o*a,e[1]=o*l-n*a,e[2]=i*l+s*a,e[3]=s*l-i*a,e},calculateW:function(e,t){const r=t[0],n=t[1],o=t[2];return e[0]=r,e[1]=n,e[2]=o,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-o*o)),e},slerp:f,random:function(e){const t=s.R,r=t(),n=t(),o=t(),i=Math.sqrt(1-r),a=Math.sqrt(r);return e[0]=i*Math.sin(2*Math.PI*n),e[1]=i*Math.cos(2*Math.PI*n),e[2]=a*Math.sin(2*Math.PI*o),e[3]=a*Math.cos(2*Math.PI*o),e},invert:function(e,t){const r=t[0],n=t[1],o=t[2],i=t[3],s=r*r+n*n+o*o+i*i,a=s?1/s:0;return e[0]=-r*a,e[1]=-n*a,e[2]=-o*a,e[3]=i*a,e},conjugate:p,fromMat3:h,fromEuler:b,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},copy:y,set:g,add:m,mul:w,scale:C,dot:v,lerp:T,length:S,len:A,squaredLength:U,sqrLen:I,normalize:M,exactEquals:O,equals:_,rotationTo:function(e,t,r){const n=(0,a.e)(t,r);return n<-.999999?((0,a.f)(E,R,t),(0,a.u)(E)<1e-6&&(0,a.f)(E,N,t),(0,a.n)(E,E),u(e,E,Math.PI),e):n>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,a.f)(E,t,r),e[0]=E[0],e[1]=E[1],e[2]=E[2],e[3]=1+n,M(e,e))},sqlerp:function(e,t,r,n,o,i){return f(B,t,o,i),f(k,r,n,i),f(e,B,k,2*i*(1-i)),e},setAxes:function(e,t,r,n){const o=P;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=n[0],o[4]=n[1],o[7]=n[2],o[2]=-t[0],o[5]=-t[1],o[8]=-t[2],M(e,h(e,o))}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function n(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}function i(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>s,a:()=>n,b:()=>o,c:()=>i});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,create:n,clone:o,fromValues:function(e,t,r,n){return[e,t,r,n]},createView:i,IDENTITY:s},Symbol.toStringTag,{value:"Module"}))},72119:(e,t,r)=>{function n(){return new Float32Array(3)}function o(e,t,r){const n=new Float32Array(3);return n[0]=e,n[1]=t,n[2]=r,n}function i(){return n()}function s(){return o(1,1,1)}function a(){return o(1,0,0)}function l(){return o(0,1,0)}function u(){return o(0,0,1)}r.d(t,{c:()=>n,f:()=>o});const c=i(),d=s(),f=a(),p=l(),h=u();Object.freeze(Object.defineProperty({__proto__:null,create:n,clone:function(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},fromValues:o,createView:function(e,t){return new Float32Array(e,t,3)},zeros:i,ones:s,unitX:a,unitY:l,unitZ:u,ZEROS:c,ONES:d,UNIT_X:f,UNIT_Y:p,UNIT_Z:h},Symbol.toStringTag,{value:"Module"}))},35270:(e,t,r)=>{r.d(t,{B7:()=>l,St:()=>o,VL:()=>s,h$:()=>i,rW:()=>u});const n={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(e){return n[e]||n[e.toLowerCase()]}function i(e){return n[e]??n[e.toLowerCase()]}function s(e){return[...i(e)]}function a(e,t,r){r<0&&++r,r>1&&--r;const n=6*r;return n<1?e+(t-e)*n:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,n=1){const o=(e%360+360)%360/360,i=r<=.5?r*(t+1):r+t-r*t,s=2*r-i;return[Math.round(255*a(s,i,o+1/3)),Math.round(255*a(s,i,o)),Math.round(255*a(s,i,o-1/3)),n]}function u(e){const t=e.length>5,r=t?8:4,n=(1<<r)-1,o=t?1:17,i=t?9===e.length:5===e.length;let s=Number("0x"+e.substr(1));if(isNaN(s))return null;const a=[0,0,0,1];let l;return i&&(l=s&n,s>>=r,a[3]=o*l/255),l=s&n,s>>=r,a[2]=o*l,l=s&n,s>>=r,a[1]=o*l,l=s&n,s>>=r,a[0]=o*l,a}},36030:(e,t,r)=>{r.d(t,{J:()=>i});var n=r(35454),o=r(5600);function i(e,t={}){const r=e instanceof n.X?e:new n.X(e,t),i={type:t?.ignoreUnknown??1?r.apiValues:String,json:{type:r.jsonValues,read:!t?.readOnly&&{reader:r.read},write:{writer:r.write}}};return void 0!==t?.readOnly&&(i.readOnly=!!t.readOnly),void 0!==t?.default&&(i.json.default=t.default),void 0!==t?.name&&(i.json.name=t.name),(0,o.Cb)(i)}},10661:(e,t,r)=>{r.d(t,{s:()=>o});var n=r(39020);class o{constructor(){this._observers=[]}observe(e){return this._observers.includes(e)||this._observers.push(e),new n.X(this._observers,e)}notify(){const e=this._observers.slice();for(let t=0;t<e.length;++t){const r=e[t];r.onInvalidated(),r.onCommitted()}}}},67900:(e,t,r)=>{r.d(t,{$C:()=>A,En:()=>T,Jo:()=>V,_R:()=>U,c9:()=>M,cM:()=>I,gV:()=>P,hd:()=>u,qE:()=>E,ty:()=>S}),r(80442);var n=r(35454),o=r(70586),i=r(24678),s=r(68441),a=r(8744),l=r(58116);const u=39.37,c=s.sv.radius*Math.PI/200,d=/UNIT\[([^\]]+)\]\]$/i,f=l.Z,p=/UNIT\[([^\]]+)\]/i,h=new Set([4261,4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104139,104140]),b=(0,n.w)()({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"}),y=e=>e*e,g=e=>e*e*e,m={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},decimeters:{inBaseUnits:.1},meters:{inBaseUnits:1},kilometers:{inBaseUnits:1e3},inches:{inBaseUnits:.0254},feet:{inBaseUnits:.3048},yards:{inBaseUnits:.9144},miles:{inBaseUnits:1609.344},"nautical-miles":{inBaseUnits:1852},"us-feet":{inBaseUnits:1200/3937}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:y(.001)},"square-centimeters":{inBaseUnits:y(.01)},"square-decimeters":{inBaseUnits:y(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:y(1e3)},"square-inches":{inBaseUnits:y(.0254)},"square-feet":{inBaseUnits:y(.3048)},"square-yards":{inBaseUnits:y(.9144)},"square-miles":{inBaseUnits:y(1609.344)},"square-us-feet":{inBaseUnits:y(1200/3937)},acres:{inBaseUnits:.0015625*y(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*g(.001)},"cubic-centimeters":{inBaseUnits:1e3*g(.01)},"cubic-decimeters":{inBaseUnits:1e3*g(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*g(1e3)},"cubic-inches":{inBaseUnits:1e3*g(.0254)},"cubic-feet":{inBaseUnits:1e3*g(.3048)},"cubic-yards":{inBaseUnits:1e3*g(.9144)},"cubic-miles":{inBaseUnits:1e3*g(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},w=(()=>{const e={};for(const t in m)for(const r in m[t].units)e[r]=t;return e})();function C(e){const t=w[e];if(!t)throw new Error("unknown type");return t}function v(e,t=null){return t=t||C(e),m[t].baseUnit===e}function T(e,t,r){if(t===r)return e;const n=C(t);if(n!==C(r))throw new Error("incompatible units");const o=v(t,n)?e:function(e,t,r){return e*m[r].units[t].inBaseUnits}(e,t,n);return v(r,n)?o:function(e,t,r){return e/m[r].units[t].inBaseUnits}(o,r,n)}function S(e,t,r){return T(e,t,"meters")/(r*Math.PI/180)}function A(e){return b.fromJSON(e.toLowerCase())||null}function U(e){if((0,o.pC)(e)&&!(0,a.N$)(e))return 1;const t=M(e);return t>1e5?1:t}function I(e){return M(e)>=(0,i.Iu)(e).metersPerDegree?"meters":E(e)}function M(e,t=s.sv.metersPerDegree){return(0,o.Pt)(function(e,t=!1){const r=(0,o.pC)(e)?e.wkid:null,n=(0,o.pC)(e)?e.wkt:null;let i=null;if(r){if((0,a.o$)(r))return s.yr.metersPerDegree;if((0,a.ME)(r))return s.Z1.metersPerDegree;i=f.values[f[r]],!i&&t&&h.has(r)&&(i=c)}else n&&(N(n)?i=O(d.exec(n),i):R(n)&&(i=O(p.exec(n),i)));return i}(e,!0),t)}function O(e,t){return e&&e[1]?_(e[1]):t}function _(e){return parseFloat(e.split(",")[1])}function E(e){const t=(0,o.pC)(e)?e.wkid:null,r=(0,o.pC)(e)?e.wkt:null;let n=null;if(t)n=f.units[f[t]];else if(r){const e=N(r)?d:R(r)?p:null;if(e){const t=e.exec(r);t&&t[1]&&(n=function(e){const t=/[\\"\\']{1}([^\\"\\']+)/.exec(e);let r=t&&t[1];if(!r||!f.units.includes(r)){const t=_(e);r=null;const n=f.values;for(let e=0;e<n.length;++e)if(Math.abs(t-n[e])<1e-7){r=f.units[e];break}}return r}(t[1]))}}return(0,o.pC)(n)?A(n):null}function R(e){return/^GEOCCS/i.test(e)}function N(e){return/^PROJCS/i.test(e)}new Map([["meters","square-meters"],["feet","square-feet"],["us-feet","square-us-feet"]]);const B={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},k={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},P=(0,n.w)()(B),V=(0,n.w)()(k);(0,n.w)()({...B,...k})},24678:(e,t,r)=>{r.d(t,{GG:()=>l,HQ:()=>u,Iu:()=>p,VY:()=>c,e8:()=>h,rS:()=>f,wY:()=>d});var n=r(70586),o=r(82971),i=r(68441),s=r(8744);function a(e){return new o.Z({wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${e.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`})}const l=a(i.sv),u=a(i.yr),c=a(i.Z1),d=new o.Z({wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${i.sv.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`});function f(e){return e&&((0,s.BZ)(e)||e===u)?u:e&&((0,s.V2)(e)||e===c)?c:l}function p(e){return(0,n.pC)(e)&&((0,s.BZ)(e)||e===u)?i.yr:(0,n.pC)(e)&&((0,s.V2)(e)||e===c)?i.Z1:i.sv}function h(e){return(0,s.o$)(e)?i.yr:(0,s.ME)(e)?i.Z1:i.sv}},24470:(e,t,r)=>{r.d(t,{HH:()=>l,SO:()=>u,Ue:()=>i,al:()=>s,cS:()=>p,jE:()=>c,kK:()=>d,oJ:()=>a,r3:()=>f}),r(80442),r(22021);var n=r(70586),o=r(6570);function i(e=b){return[e[0],e[1],e[2],e[3]]}function s(e,t,r,n,o=i()){return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o}function a(e,t=i()){return t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax,t}function l(e,t){return new o.Z({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}function u(e){return function(e){return(0,n.Wi)(e)||e[0]>=e[2]?0:e[2]-e[0]}(e)*function(e){return e[1]>=e[3]?0:e[3]-e[1]}(e)}function c(e,t,r){return t>=e[0]&&r>=e[1]&&t<=e[2]&&r<=e[3]}function d(e,t){return Math.max(t[0],e[0])<=Math.min(t[2],e[2])&&Math.max(t[1],e[1])<=Math.min(t[3],e[3])}function f(e,t){return t[0]>=e[0]&&t[2]<=e[2]&&t[1]>=e[1]&&t[3]<=e[3]}function p(e){return e?function(e,t){return e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3]),e}(e,h):i(h)}const h=[1/0,1/0,-1/0,-1/0],b=[0,0,0,0]},69285:(e,t,r)=>{r.d(t,{k:()=>s});var n=r(70586),o=r(67900),i=r(8744);function s(e,t,r){if((0,n.Wi)(t)||(0,n.Wi)(r)||r.vcsWkid||(0,i.fS)(t,r))return null;const s=(0,o._R)(t)/(0,o._R)(r);if(1===s)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,s);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,s);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,s);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,s);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,s);default:return null}}},23030:(e,t,r)=>{r.d(t,{Z:()=>m});var n,o=r(43697),i=r(22974),s=r(5600),a=r(75215),l=r(36030),u=r(52011),c=r(25848),d=r(66338),f=r(22303),p=r(96674);let h=n=class extends p.wq{constructor(){super(...arguments),this.description=null,this.label=null,this.minValue=0,this.maxValue=0,this.color=null}clone(){return new n({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,color:(0,i.d9)(this.color)})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],h.prototype,"description",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],h.prototype,"label",void 0),(0,o._)([(0,s.Cb)({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],h.prototype,"minValue",void 0),(0,o._)([(0,s.Cb)({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],h.prototype,"maxValue",void 0),(0,o._)([(0,s.Cb)({type:f.Z,json:{type:[a.z8],write:!0}})],h.prototype,"color",void 0),h=n=(0,o._)([(0,u.j)("esri.renderers.support.pointCloud.ColorClassBreakInfo")],h);const b=h;var y;let g=y=class extends c.Z{constructor(e){super(e),this.type="point-cloud-class-breaks",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.colorClassBreakInfos=null}clone(){return new y({...this.cloneProperties(),field:this.field,fieldTransformType:this.fieldTransformType,colorClassBreakInfos:(0,i.d9)(this.colorClassBreakInfos),legendOptions:(0,i.d9)(this.legendOptions)})}};(0,o._)([(0,l.J)({pointCloudClassBreaksRenderer:"point-cloud-class-breaks"})],g.prototype,"type",void 0),(0,o._)([(0,s.Cb)({json:{write:!0},type:String})],g.prototype,"field",void 0),(0,o._)([(0,s.Cb)({type:d.I,json:{write:!0}})],g.prototype,"legendOptions",void 0),(0,o._)([(0,s.Cb)({type:c.Z.fieldTransformTypeKebabDict.apiValues,json:{type:c.Z.fieldTransformTypeKebabDict.jsonValues,read:c.Z.fieldTransformTypeKebabDict.read,write:c.Z.fieldTransformTypeKebabDict.write}})],g.prototype,"fieldTransformType",void 0),(0,o._)([(0,s.Cb)({type:[b],json:{write:!0}})],g.prototype,"colorClassBreakInfos",void 0),g=y=(0,o._)([(0,u.j)("esri.renderers.PointCloudClassBreaksRenderer")],g);const m=g},25848:(e,t,r)=>{r.d(t,{Z:()=>A});var n,o=r(43697),i=r(35454),s=r(96674),a=r(22974),l=r(5600),u=(r(75215),r(52011));r(67676),r(80442);let c=n=class extends s.wq{constructor(){super(...arguments),this.field=null,this.minValue=0,this.maxValue=255}clone(){return new n({field:this.field,minValue:this.minValue,maxValue:this.maxValue})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,o._)([(0,l.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],c.prototype,"minValue",void 0),(0,o._)([(0,l.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],c.prototype,"maxValue",void 0),c=n=(0,o._)([(0,u.j)("esri.renderers.support.pointCloud.ColorModulation")],c);const d=c,f=new i.X({pointCloudFixedSizeAlgorithm:"fixed-size",pointCloudSplatAlgorithm:"splat"});let p=class extends s.wq{};(0,o._)([(0,l.Cb)({type:f.apiValues,readOnly:!0,nonNullable:!0,json:{type:f.jsonValues,read:!1,write:f.write}})],p.prototype,"type",void 0),p=(0,o._)([(0,u.j)("esri.renderers.support.pointCloud.PointSizeAlgorithm")],p);const h=p;var b,y=r(36030);let g=b=class extends h{constructor(){super(...arguments),this.type="fixed-size",this.size=0,this.useRealWorldSymbolSizes=null}clone(){return new b({size:this.size,useRealWorldSymbolSizes:this.useRealWorldSymbolSizes})}};(0,o._)([(0,y.J)({pointCloudFixedSizeAlgorithm:"fixed-size"})],g.prototype,"type",void 0),(0,o._)([(0,l.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],g.prototype,"size",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],g.prototype,"useRealWorldSymbolSizes",void 0),g=b=(0,o._)([(0,u.j)("esri.renderers.support.pointCloud.PointSizeFixedSizeAlgorithm")],g);const m=g;var w;let C=w=class extends h{constructor(){super(...arguments),this.type="splat",this.scaleFactor=1}clone(){return new w({scaleFactor:this.scaleFactor})}};(0,o._)([(0,y.J)({pointCloudSplatAlgorithm:"splat"})],C.prototype,"type",void 0),(0,o._)([(0,l.Cb)({type:Number,value:1,nonNullable:!0,json:{write:!0}})],C.prototype,"scaleFactor",void 0),C=w=(0,o._)([(0,u.j)("esri.renderers.support.pointCloud.PointSizeSplatAlgorithm")],C);const v={key:"type",base:h,typeMap:{"fixed-size":m,splat:C}},T=(0,i.w)()({pointCloudClassBreaksRenderer:"point-cloud-class-breaks",pointCloudRGBRenderer:"point-cloud-rgb",pointCloudStretchRenderer:"point-cloud-stretch",pointCloudUniqueValueRenderer:"point-cloud-unique-value"});let S=class extends s.wq{constructor(e){super(e),this.type=void 0,this.pointSizeAlgorithm=null,this.colorModulation=null,this.pointsPerInch=10}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}cloneProperties(){return{pointSizeAlgorithm:(0,a.d9)(this.pointSizeAlgorithm),colorModulation:(0,a.d9)(this.colorModulation),pointsPerInch:(0,a.d9)(this.pointsPerInch)}}};(0,o._)([(0,l.Cb)({type:T.apiValues,readOnly:!0,nonNullable:!0,json:{type:T.jsonValues,read:!1,write:T.write}})],S.prototype,"type",void 0),(0,o._)([(0,l.Cb)({types:v,json:{write:!0}})],S.prototype,"pointSizeAlgorithm",void 0),(0,o._)([(0,l.Cb)({type:d,json:{write:!0}})],S.prototype,"colorModulation",void 0),(0,o._)([(0,l.Cb)({json:{write:!0},nonNullable:!0,type:Number})],S.prototype,"pointsPerInch",void 0),S=(0,o._)([(0,u.j)("esri.renderers.PointCloudRenderer")],S),(S||(S={})).fieldTransformTypeKebabDict=new i.X({none:"none",lowFourBit:"low-four-bit",highFourBit:"high-four-bit",absoluteValue:"absolute-value",moduloTen:"modulo-ten"});const A=S},14008:(e,t,r)=>{r.d(t,{Z:()=>p});var n,o=r(43697),i=r(22974),s=r(5600),a=(r(75215),r(36030)),l=r(52011),u=r(25848),c=r(66338),d=r(21849);let f=n=class extends u.Z{constructor(e){super(e),this.type="point-cloud-stretch",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.stops=null}clone(){return new n({...this.cloneProperties(),field:(0,i.d9)(this.field),fieldTransformType:(0,i.d9)(this.fieldTransformType),stops:(0,i.d9)(this.stops),legendOptions:(0,i.d9)(this.legendOptions)})}};(0,o._)([(0,a.J)({pointCloudStretchRenderer:"point-cloud-stretch"})],f.prototype,"type",void 0),(0,o._)([(0,s.Cb)({json:{write:!0},type:String})],f.prototype,"field",void 0),(0,o._)([(0,s.Cb)({type:c.I,json:{write:!0}})],f.prototype,"legendOptions",void 0),(0,o._)([(0,s.Cb)({type:u.Z.fieldTransformTypeKebabDict.apiValues,json:{type:u.Z.fieldTransformTypeKebabDict.jsonValues,read:u.Z.fieldTransformTypeKebabDict.read,write:u.Z.fieldTransformTypeKebabDict.write}})],f.prototype,"fieldTransformType",void 0),(0,o._)([(0,s.Cb)({type:[d.Z],json:{write:!0}})],f.prototype,"stops",void 0),f=n=(0,o._)([(0,l.j)("esri.renderers.PointCloudStretchRenderer")],f);const p=f},46329:(e,t,r)=>{r.d(t,{Z:()=>m});var n,o=r(43697),i=r(22974),s=r(5600),a=r(75215),l=r(36030),u=r(52011),c=r(25848),d=r(66338),f=r(22303),p=r(96674);let h=n=class extends p.wq{constructor(){super(...arguments),this.description=null,this.label=null,this.values=null,this.color=null}clone(){return new n({description:this.description,label:this.label,values:(0,i.d9)(this.values),color:(0,i.d9)(this.color)})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],h.prototype,"description",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],h.prototype,"label",void 0),(0,o._)([(0,s.Cb)({type:[String],json:{write:!0}})],h.prototype,"values",void 0),(0,o._)([(0,s.Cb)({type:f.Z,json:{type:[a.z8],write:!0}})],h.prototype,"color",void 0),h=n=(0,o._)([(0,u.j)("esri.renderers.support.pointCloud.ColorUniqueValueInfo")],h);const b=h;var y;let g=y=class extends c.Z{constructor(e){super(e),this.type="point-cloud-unique-value",this.field=null,this.fieldTransformType=null,this.colorUniqueValueInfos=null,this.legendOptions=null}clone(){return new y({...this.cloneProperties(),field:(0,i.d9)(this.field),fieldTransformType:(0,i.d9)(this.fieldTransformType),colorUniqueValueInfos:(0,i.d9)(this.colorUniqueValueInfos),legendOptions:(0,i.d9)(this.legendOptions)})}};(0,o._)([(0,l.J)({pointCloudUniqueValueRenderer:"point-cloud-unique-value"})],g.prototype,"type",void 0),(0,o._)([(0,s.Cb)({json:{write:!0},type:String})],g.prototype,"field",void 0),(0,o._)([(0,s.Cb)({type:c.Z.fieldTransformTypeKebabDict.apiValues,json:{type:c.Z.fieldTransformTypeKebabDict.jsonValues,read:c.Z.fieldTransformTypeKebabDict.read,write:c.Z.fieldTransformTypeKebabDict.write}})],g.prototype,"fieldTransformType",void 0),(0,o._)([(0,s.Cb)({type:[b],json:{write:!0}})],g.prototype,"colorUniqueValueInfos",void 0),(0,o._)([(0,s.Cb)({type:d.I,json:{write:!0}})],g.prototype,"legendOptions",void 0),g=y=(0,o._)([(0,u.j)("esri.renderers.PointCloudUniqueValueRenderer")],g);const m=g},66338:(e,t,r)=>{r.d(t,{I:()=>l});var n,o=r(43697),i=r(96674),s=r(5600),a=(r(67676),r(80442),r(75215),r(52011));let l=n=class extends i.wq{constructor(){super(...arguments),this.title=null}clone(){return new n({title:this.title})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"title",void 0),l=n=(0,o._)([(0,a.j)("esri.renderers.support.LegendOptions")],l)},21849:(e,t,r)=>{r.d(t,{Z:()=>f});var n,o=r(43697),i=r(22303),s=r(96674),a=r(5600),l=(r(67676),r(80442),r(75215)),u=r(52011),c=r(30556);let d=n=class extends s.wq{constructor(e){super(e),this.color=null,this.label=null,this.value=null}writeValue(e,t,r){t[r]=e??0}clone(){return new n({color:this.color&&this.color.clone(),label:this.label,value:this.value})}};(0,o._)([(0,a.Cb)({type:i.Z,json:{type:[l.z8],write:!0}})],d.prototype,"color",void 0),(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:{writerEnsuresNonNull:!0}}})],d.prototype,"value",void 0),(0,o._)([(0,c.c)("value")],d.prototype,"writeValue",null),d=n=(0,o._)([(0,u.j)("esri.renderers.visualVariables.support.ColorStop")],d);const f=d},16583:(e,t,r)=>{r.r(t),r.d(t,{default:()=>x});var n=r(70586),o=r(1533),i=r(51305);function s(){const e=new Float32Array(4);return e[3]=1,e}Object.freeze(Object.defineProperty({__proto__:null,create:s,clone:function(e){const t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},fromValues:function(e,t,r,n){const o=new Float32Array(4);return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o},createView:function(e,t){return new Float32Array(e,t,4)}},Symbol.toStringTag,{value:"Module"}));var a=r(17896),l=r(72119),u=r(44547),c=r(82971),d=r(23030),f=r(14008),p=r(46329),h=r(20102),b=r(22974),y=r(92604);const g=!0;function m(e,t,r){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,r+0,10)),version:t.getUint16(r+10,g),checksum:t.getUint32(r+12,g)}}function w(e,t,r){const n=[];t=C(e,t,n);const o=[];for(let i=0;i<n.length;i++){o.length=0,t=C(e,t,o);for(let e=0;e<o.length;e++)r.push(o[e]+n[i])}return t}function C(e,t,r){const n=new DataView(e,t),o=n.getUint8(0),i=31&o,s=!!(32&o),a=(192&o)>>6;let l=0;if(0===a)l=n.getUint32(1,g),t+=5;else if(1===a)l=n.getUint16(1,g),t+=3;else{if(2!==a)throw new h.Z("lepcc-decode-error","Bad count type");l=n.getUint8(1),t+=2}if(s)throw new h.Z("lepcc-decode-error","LUT not implemented");const u=Math.ceil(l*i/8),c=new Uint8Array(e,t,u);let d=0,f=0,p=0;const b=-1>>>32-i;for(let e=0;e<l;e++){for(;f<i;)d|=c[p]<<f,f+=8,p+=1;r[e]=d&b,d>>>=i,f-=i,f+i>32&&(d|=c[p-1]>>8-f)}return t+p}var v=r(35065);const T=y.Z.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function S(e,t,r){let n="",o=0;for(;o<r;){const i=e[t+o];if(i<128)n+=String.fromCharCode(i),o++;else if(i>=192&&i<224){if(o+1>=r)throw new h.Z("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const s=(31&i)<<6|63&e[t+o+1];n+=String.fromCharCode(s),o+=2}else if(i>=224&&i<240){if(o+2>=r)throw new h.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(15&i)<<12|(63&e[t+o+1])<<6|63&e[t+o+2];n+=String.fromCharCode(s),o+=3}else{if(!(i>=240&&i<248))throw new h.Z("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(o+3>=r)throw new h.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(7&i)<<18|(63&e[t+o+1])<<12|(63&e[t+o+2])<<6|63&e[t+o+3];if(s>=65536){const e=55296+(s-65536>>10),t=56320+(1023&s);n+=String.fromCharCode(e,t)}else n+=String.fromCharCode(s);o+=4}}}return n}function A(e,t){const r={byteOffset:0,byteCount:0,fields:Object.create(null)};let n=0;for(let o=0;o<t.length;o++){const i=t[o],s=i.valueType||i.type,a=E[s];r.fields[i.property]=a(e,n),n+=_[s].BYTES_PER_ELEMENT}return r.byteCount=n,r}function U(e,t){return new(0,_[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function I(e,t,r){if(t!==e&&T.error(`Invalid ${r} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new h.Z("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}const M={position:v.T.POSITION,normal:v.T.NORMAL,color:v.T.COLOR,uv0:v.T.UV0,region:v.T.UVREGION};function O(e,t,r){if("lepcc-rgb"===e.encoding)return function(e){const t=new DataView(e,0);let r=0;const{identifier:n,version:o}=m(e,t,r);if(r+=16,"ClusterRGB"!==n)throw new h.Z("lepcc-decode-error","Bad identifier");if(o>1)throw new h.Z("lepcc-decode-error","Unknown version");const i=function(e,t){return{sizeLo:e.getUint32(t+0,g),sizeHi:e.getUint32(t+4,g),count:e.getUint32(t+8,g),colorMapCount:e.getUint16(t+12,g),lookupMethod:e.getUint8(t+14),compressionMethod:e.getUint8(t+15)}}(t,r);if(r+=16,i.sizeHi*2**32+i.sizeLo!==e.byteLength)throw new h.Z("lepcc-decode-error","Bad size");if((2===i.lookupMethod||1===i.lookupMethod)&&0===i.compressionMethod){if(3*i.colorMapCount+i.count+r!==e.byteLength||i.colorMapCount>256)throw new h.Z("lepcc-decode-error","Bad count");const t=new Uint8Array(e,r,3*i.colorMapCount),n=new Uint8Array(e,r+3*i.colorMapCount,i.count),o=new Uint8Array(3*i.count);for(let e=0;e<i.count;e++){const r=n[e];o[3*e]=t[3*r],o[3*e+1]=t[3*r+1],o[3*e+2]=t[3*r+2]}return o}if(0===i.lookupMethod&&0===i.compressionMethod){if(3*i.count+r!==e.byteLength||0!==i.colorMapCount)throw new h.Z("lepcc-decode-error","Bad count");return new Uint8Array(e,r).slice()}if(i.lookupMethod<=2&&1===i.compressionMethod){if(r+3!==e.byteLength||1!==i.colorMapCount)throw new h.Z("lepcc-decode-error","Bad count");const n=t.getUint8(r),o=t.getUint8(r+1),s=t.getUint8(r+2),a=new Uint8Array(3*i.count);for(let e=0;e<i.count;e++)a[3*e]=n,a[3*e+1]=o,a[3*e+2]=s;return a}throw new h.Z("lepcc-decode-error","Bad method "+i.lookupMethod+","+i.compressionMethod)}(t);if("lepcc-intensity"===e.encoding)return function(e){const t=new DataView(e,0);let r=0;const{identifier:n,version:o}=m(e,t,r);if(r+=16,"Intensity "!==n)throw new h.Z("lepcc-decode-error","Bad identifier");if(o>1)throw new h.Z("lepcc-decode-error","Unknown version");const i=function(e,t){return{sizeLo:e.getUint32(t+0,g),sizeHi:e.getUint32(t+4,g),count:e.getUint32(t+8,g),scaleFactor:e.getUint16(t+12,g),bitsPerPoint:e.getUint8(t+14),reserved:e.getUint8(t+15)}}(t,r);if(r+=16,i.sizeHi*2**32+i.sizeLo!==e.byteLength)throw new h.Z("lepcc-decode-error","Bad size");const s=new Uint16Array(i.count);if(8===i.bitsPerPoint){if(i.count+r!==e.byteLength)throw new h.Z("lepcc-decode-error","Bad size");const t=new Uint8Array(e,r,i.count);for(let e=0;e<i.count;e++)s[e]=t[e]*i.scaleFactor}else if(16===i.bitsPerPoint){if(2*i.count+r!==e.byteLength)throw new h.Z("lepcc-decode-error","Bad size");const t=new Uint16Array(e,r,i.count);for(let e=0;e<i.count;e++)s[e]=t[e]*i.scaleFactor}else{const t=[];if(C(e,r,t)!==e.byteLength)throw new h.Z("lepcc-decode-error","Bad size");for(let e=0;e<i.count;e++)s[e]=t[e]*i.scaleFactor}return s}(t);if(null!=e.encoding&&""!==e.encoding)throw new h.Z("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(T.warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(T.warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const n=function(e,t,r){const n=null!=t.header?A(e,t.header):{byteOffset:0,byteCount:0,fields:{count:r}},o={header:n,byteOffset:n.byteCount,byteCount:0,entries:Object.create(null)};let i=n.byteCount;for(let e=0;e<t.ordering.length;e++){const r=t.ordering[e],s=(0,b.d9)(t[r]);if(s.count=n.fields.count,"String"===s.valueType){if(s.byteOffset=i,s.byteCount=n.fields[r+"ByteCount"],"UTF-8"!==s.encoding)throw new h.Z("unsupported-encoding","Unsupported String encoding.",{encoding:s.encoding})}else{if(!R(s.valueType))throw new h.Z("unsupported-value-type","Unsupported binary valueType",{valueType:s.valueType});{const e=N(s.valueType);i+=i%e!=0?e-i%e:0,s.byteOffset=i,s.byteCount=e*s.valuesPerElement*s.count}}i+=s.byteCount,o.entries[r]=s}return o.byteCount=i-o.byteOffset,o}(t,e,r);I(n.byteOffset+n.byteCount,t.byteLength,"attribute");const o=n.entries.attributeValues||n.entries.objectIds;if(o){if("String"===o.valueType){const e=n.entries.attributeByteCounts,r=U(t,e),i=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,o);return function(e,t,r){const n=[];let o,i,s=0;for(i=0;i<e;i+=1){if(o=t[i],o>0){if(n.push(S(r,s,o-1)),0!==r[s+o-1])throw new h.Z("string-array-error","Invalid string array: missing null termination.")}else n.push(null);s+=o}return n}(e.count,r,i)}return U(t,o)}throw new h.Z("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const _={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},E={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function R(e){return _.hasOwnProperty(e)}function N(e){return R(e)?_[e].BYTES_PER_ELEMENT:0}function B(e,t){if(null==e.encoding||""===e.encoding){const r=function(e,t){const r=A(e,t&&t.header);let n=r.byteCount;const o={isDraco:!1,header:r,byteOffset:r.byteCount,byteCount:0,vertexAttributes:{}},i=r.fields,s=null!=i.vertexCount?i.vertexCount:i.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const r={...t.vertexAttributes[e],byteOffset:n,count:s},i=M[e]?M[e]:"_"+e;o.vertexAttributes[i]=r,n+=N(r.valueType)*r.valuesPerElement*s}const a=i.faceCount;if(t.faces&&a){o.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const r={...t.faces[e],byteOffset:n,count:a};o.faces[e]=r,n+=N(r.valueType)*r.valuesPerElement*a}}const l=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&l){o.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const r={...t.featureAttributes[e],byteOffset:n,count:l};o.featureAttributes[e]=r,n+=("UInt64"===r.valueType?8:N(r.valueType))*r.valuesPerElement*l}}return I(n,e.byteLength,"geometry"),o.byteCount=n-o.byteOffset,o}(t,e);if((0,n.Wi)(r.vertexAttributes.position))return;const o=U(t,r.vertexAttributes.position),i=r.header.fields,s=[i.offsetX,i.offsetY,i.offsetZ],a=[i.scaleX,i.scaleY,i.scaleZ],l=o.length/3,u=new Float64Array(3*l);for(let e=0;e<l;e++)u[3*e]=o[3*e]*a[0]+s[0],u[3*e+1]=o[3*e+1]*a[1]+s[1],u[3*e+2]=o[3*e+2]*a[2]+s[2];return u}if("lepcc-xyz"===e.encoding)return function(e){const t=new DataView(e,0);let r=0;const{identifier:n,version:o}=m(e,t,r);if(r+=16,"LEPCC "!==n)throw new h.Z("lepcc-decode-error","Bad identifier");if(o>1)throw new h.Z("lepcc-decode-error","Unknown version");const i=function(e,t){return{sizeLo:e.getUint32(t+0,g),sizeHi:e.getUint32(t+4,g),minX:e.getFloat64(t+8,g),minY:e.getFloat64(t+16,g),minZ:e.getFloat64(t+24,g),maxX:e.getFloat64(t+32,g),maxY:e.getFloat64(t+40,g),maxZ:e.getFloat64(t+48,g),errorX:e.getFloat64(t+56,g),errorY:e.getFloat64(t+64,g),errorZ:e.getFloat64(t+72,g),count:e.getUint32(t+80,g),reserved:e.getUint32(t+84,g)}}(t,r);if(r+=88,i.sizeHi*2**32+i.sizeLo!==e.byteLength)throw new h.Z("lepcc-decode-error","Bad size");const s=new Float64Array(3*i.count),a=[],l=[],u=[],c=[];if(r=w(e,r,a),r=w(e,r,l),r=w(e,r,u),r=w(e,r,c),r!==e.byteLength)throw new h.Z("lepcc-decode-error","Bad length");let d=0,f=0;for(let e=0;e<a.length;e++){f+=a[e];let t=0;for(let r=0;r<l[e];r++){t+=u[d];const e=c[d];s[3*d]=Math.min(i.maxX,i.minX+2*i.errorX*t),s[3*d+1]=Math.min(i.maxY,i.minY+2*i.errorY*f),s[3*d+2]=Math.min(i.maxZ,i.minZ+2*i.errorZ*e),d++}}return{errorX:i.errorX,errorY:i.errorY,errorZ:i.errorZ,result:s}}(t).result}function k(e,t,r){return(0,n.pC)(e)&&e.attributeInfo.useElevation?function(e,t){const r=new Float64Array(t);for(let n=0;n<t;n++)r[n]=e[3*n+2];return r}(t,r):(0,n.pC)(e)?O(e.attributeInfo.storageInfo,e.buffer,r):null}function P(e){return null==e||"none"===e?null:"low-four-bit"===e?e=>15&e:"high-four-bit"===e?e=>(240&e)>>4:"absolute-value"===e?e=>Math.abs(e):"modulo-ten"===e?e=>e%10:null}function V(e){let t=0;for(const r of e||[])t|=1<<r;return t}class F{transform(e){const t=this._transform(e),r=[t.points.buffer,t.rgb.buffer];(0,n.pC)(t.pointIdFilterMap)&&r.push(t.pointIdFilterMap.buffer);for(const e of t.attributes)"buffer"in e.values&&(0,o.eP)(e.values.buffer)&&e.values.buffer!==t.rgb.buffer&&r.push(e.values.buffer);return Promise.resolve({result:t,transferList:r})}_transform(e){const t=B(e.schema,e.geometryBuffer);let r=t.length/3,o=null;const i=[],s=k(e.primaryAttributeData,t,r);(0,n.pC)(e.primaryAttributeData)&&s&&i.push({attributeInfo:e.primaryAttributeData.attributeInfo,values:s});const a=k(e.modulationAttributeData,t,r);(0,n.pC)(e.modulationAttributeData)&&a&&i.push({attributeInfo:e.modulationAttributeData.attributeInfo,values:a});let l=function(e,t,r,n){const{rendererJSON:o,isRGBRenderer:i}=e;let s=null,a=null;if(t&&i)s=t;else if(t&&"pointCloudUniqueValueRenderer"===o.type){a=p.Z.fromJSON(o);const e=a.colorUniqueValueInfos;s=new Uint8Array(3*n);const r=P(a.fieldTransformType);for(let o=0;o<n;o++){const n=(r?r(t[o]):t[o])+"";for(let t=0;t<e.length;t++)if(e[t].values.includes(n)){s[3*o]=e[t].color.r,s[3*o+1]=e[t].color.g,s[3*o+2]=e[t].color.b;break}}}else if(t&&"pointCloudStretchRenderer"===o.type){a=f.Z.fromJSON(o);const e=a.stops;s=new Uint8Array(3*n);const r=P(a.fieldTransformType);for(let o=0;o<n;o++){const n=r?r(t[o]):t[o],i=e.length-1;if(n<e[0].value)s[3*o]=e[0].color.r,s[3*o+1]=e[0].color.g,s[3*o+2]=e[0].color.b;else if(n>=e[i].value)s[3*o]=e[i].color.r,s[3*o+1]=e[i].color.g,s[3*o+2]=e[i].color.b;else for(let t=1;t<e.length;t++)if(n<e[t].value){const r=(n-e[t-1].value)/(e[t].value-e[t-1].value);s[3*o]=e[t].color.r*r+e[t-1].color.r*(1-r),s[3*o+1]=e[t].color.g*r+e[t-1].color.g*(1-r),s[3*o+2]=e[t].color.b*r+e[t-1].color.b*(1-r);break}}}else if(t&&"pointCloudClassBreaksRenderer"===o.type){a=d.Z.fromJSON(o);const e=a.colorClassBreakInfos;s=new Uint8Array(3*n);const r=P(a.fieldTransformType);for(let o=0;o<n;o++){const n=r?r(t[o]):t[o];for(let t=0;t<e.length;t++)if(n>=e[t].minValue&&n<=e[t].maxValue){s[3*o]=e[t].color.r,s[3*o+1]=e[t].color.g,s[3*o+2]=e[t].color.b;break}}}else{s=new Uint8Array(3*n);for(let e=0;e<s.length;e++)s[e]=255}if(r&&a&&a.colorModulation){const e=a.colorModulation.minValue,t=a.colorModulation.maxValue,o=.3;for(let i=0;i<n;i++){const n=r[i],a=n>=t?1:n<=e?o:o+(1-o)*(n-e)/(t-e);s[3*i]=a*s[3*i],s[3*i+1]=a*s[3*i+1],s[3*i+2]=a*s[3*i+2]}}return s}(e.rendererInfo,s,a,r);if(e.filterInfo&&e.filterInfo.length>0&&(0,n.pC)(e.filterAttributesData)){const n=e.filterAttributesData.map((e=>{const n=k(e,t,r),o={attributeInfo:e.attributeInfo,values:n};return i.push(o),o}));o=new Uint32Array(r),r=function(e,t,r,n,o){const i=e.length/3;let s=0;for(let a=0;a<i;a++){let i=!0;for(let e=0;e<n.length&&i;e++){const{filterJSON:t}=n[e],r=o[e].values[a];switch(t.type){case"pointCloudValueFilter":{const e="exclude"===t.mode;t.values.includes(r)===e&&(i=!1);break}case"pointCloudBitfieldFilter":{const e=V(t.requiredSetBits),n=V(t.requiredClearBits);(r&e)===e&&0==(r&n)||(i=!1);break}case"pointCloudReturnFilter":{const e=15&r,n=r>>>4&15,o=n>1,s=1===e,a=e===n;let l=!1;for(const e of t.includedReturns)if("last"===e&&a||"firstOfMany"===e&&s&&o||"lastOfMany"===e&&a&&o||"single"===e&&!o){l=!0;break}l||(i=!1);break}}}i&&(r[s]=a,e[3*s]=e[3*a],e[3*s+1]=e[3*a+1],e[3*s+2]=e[3*a+2],t[3*s]=t[3*a],t[3*s+1]=t[3*a+1],t[3*s+2]=t[3*a+2],s++)}return s}(t,l,o,e.filterInfo,n)}for(const n of e.userAttributesData){const e=k(n,t,r);i.push({attributeInfo:n.attributeInfo,values:e})}3*r<l.length&&(l=new Uint8Array(l.buffer.slice(0,3*r))),this._applyElevationOffsetInPlace(t,r,e.elevationOffset);const u=this._transformCoordinates(t,r,e.obb,c.Z.fromJSON(e.inSR),c.Z.fromJSON(e.outSR));return{obb:e.obb,points:u,rgb:l,attributes:i,pointIdFilterMap:o}}_transformCoordinates(e,t,r,n,o){if(!(0,u.CM)(e,n,0,e,o,0,t))throw new Error("Can't reproject");const s=(0,l.f)(r.center[0],r.center[1],r.center[2]),c=(0,l.c)(),d=(0,l.c)();(0,i.c)(Z,r.quaternion);const f=new Float32Array(3*t);for(let n=0;n<t;n++)c[0]=e[3*n]-s[0],c[1]=e[3*n+1]-s[1],c[2]=e[3*n+2]-s[2],(0,a.q)(d,c,Z),r.halfSize[0]=Math.max(r.halfSize[0],Math.abs(d[0])),r.halfSize[1]=Math.max(r.halfSize[1],Math.abs(d[1])),r.halfSize[2]=Math.max(r.halfSize[2],Math.abs(d[2])),f[3*n]=c[0],f[3*n+1]=c[1],f[3*n+2]=c[2];return f}_applyElevationOffsetInPlace(e,t,r){if(0!==r)for(let n=0;n<t;n++)e[3*n+2]+=r}}const Z=s();function x(){return new F}},35065:(e,t,r)=>{var n;r.d(t,{T:()=>n}),function(e){e.POSITION="position",e.NORMAL="normal",e.UV0="uv0",e.AUXPOS1="auxpos1",e.AUXPOS2="auxpos2",e.MAPPOS="mapPos",e.COLOR="color",e.SYMBOLCOLOR="symbolColor",e.SIZE="size",e.TANGENT="tangent",e.OFFSET="offset",e.SUBDIVISIONFACTOR="subdivisionFactor",e.COLORFEATUREATTRIBUTE="colorFeatureAttribute",e.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",e.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",e.DISTANCETOSTART="distanceToStart",e.UVMAPSPACE="uvMapSpace",e.BOUNDINGRECT="boundingRect",e.UVREGION="uvRegion",e.NORMALCOMPRESSED="normalCompressed",e.PROFILERIGHT="profileRight",e.PROFILEUP="profileUp",e.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",e.FEATUREVALUE="featureValue",e.MODELORIGINHI="modelOriginHi",e.MODELORIGINLO="modelOriginLo",e.MODEL="model",e.MODELNORMAL="modelNormal",e.INSTANCECOLOR="instanceColor",e.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",e.LOCALTRANSFORM="localTransform",e.GLOBALTRANSFORM="globalTransform",e.BOUNDINGSPHERE="boundingSphere",e.MODELORIGIN="modelOrigin",e.MODELSCALEFACTORS="modelScaleFactors",e.FEATUREATTRIBUTE="featureAttribute",e.STATE="state",e.LODLEVEL="lodLevel",e.POSITION0="position0",e.POSITION1="position1",e.NORMALA="normalA",e.NORMALB="normalB",e.COMPONENTINDEX="componentIndex",e.VARIANTOFFSET="variantOffset",e.VARIANTSTROKE="variantStroke",e.VARIANTEXTENSION="variantExtension",e.U8PADDING="u8padding",e.U16PADDING="u16padding",e.SIDENESS="sideness",e.START="start",e.END="end",e.UP="up",e.EXTRUDE="extrude"}(n||(n={}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7789],{22303:(e,t,r)=>{r.d(t,{Z:()=>f});var n,o,i=r(35270),s=r(22021),a=r(70586),l=r(75215);function u(e){return(0,s.uZ)((0,l.vU)(e),0,255)}function c(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}class d{constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}static blendColors(e,t,r,n=new d){return n.r=Math.round(e.r+(t.r-e.r)*r),n.g=Math.round(e.g+(t.g-e.g)*r),n.b=Math.round(e.b+(t.b-e.b)*r),n.a=e.a+(t.a-e.a)*r,n._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),n=r[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),d.fromArray(r,t)}return d.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return d.fromArray((0,i.B7)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new d){if(4!==e.length&&7!==e.length||"#"!==e[0])return null;const r=4===e.length?4:8,n=(1<<r)-1;let o=Number("0x"+e.substr(1));return isNaN(o)?null:(["b","g","r"].forEach((e=>{const i=o&n;o>>=r,t[e]=4===r?17*i:i})),t.a=1,t)}static fromArray(e,t=new d){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,i.St)(e)?(0,i.h$)(e):null;return r&&d.fromArray(r,t)||d.fromRgb(e,t)||d.fromHex(e,t)}static fromJSON(e){return e&&new d([e[0],e[1],e[2],e[3]/255])}static toUnitRGB(e){return(0,a.pC)(e)?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return(0,a.pC)(e)?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?d.fromString(e,this):Array.isArray(e)?d.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof d||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(){const e=this.r.toString(16),t=this.g.toString(16),r=this.b.toString(16);return`#${e.length<2?"0"+e:e}${t.length<2?"0"+t:t}${r.length<2?"0"+r:r}`}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=d.AlphaMode.ALWAYS){const t=u(this.r),r=u(this.g),n=u(this.b);return e===d.AlphaMode.ALWAYS||1!==this.a?[t,r,n,u(255*this.a)]:[t,r,n]}clone(){return new d(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return(0,a.pC)(e)&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(c(this.r,0,255)),this.g=Math.round(c(this.g,0,255)),this.b=Math.round(c(this.b,0,255)),this.a=c(this.a,0,1),this}_set(e,t,r,n){this.r=e,this.g=t,this.b=r,this.a=n}}d.prototype.declaredClass="esri.Color",n=d||(d={}),(o=n.AlphaMode||(n.AlphaMode={}))[o.ALWAYS=0]="ALWAYS",o[o.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const f=d},46521:(e,t,r)=>{function n(){return[1,0,0,0,1,0,0,0,1]}function o(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>o,c:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,create:n,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},fromValues:function(e,t,r,n,o,i,s,a,l){return[e,t,r,n,o,i,s,a,l]},createView:o},Symbol.toStringTag,{value:"Module"}))},51305:(e,t,r)=>{r.d(t,{c:()=>p,g:()=>c,j:()=>M,k:()=>b,m:()=>d,s:()=>u});var n=r(46521),o=r(94961),i=r(65617),s=r(46851),a=r(17896),l=r(98766);function u(e,t,r){r*=.5;const n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),n=Math.sin(r/2);return n>(0,s.g)()?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),r}function d(e,t,r){const n=t[0],o=t[1],i=t[2],s=t[3],a=r[0],l=r[1],u=r[2],c=r[3];return e[0]=n*c+s*a+o*u-i*l,e[1]=o*c+s*l+i*a-n*u,e[2]=i*c+s*u+n*l-o*a,e[3]=s*c-n*a-o*l-i*u,e}function f(e,t,r,n){const o=t[0],i=t[1],a=t[2],l=t[3];let u,c,d,f,p,h=r[0],b=r[1],y=r[2],g=r[3];return c=o*h+i*b+a*y+l*g,c<0&&(c=-c,h=-h,b=-b,y=-y,g=-g),1-c>(0,s.g)()?(u=Math.acos(c),d=Math.sin(u),f=Math.sin((1-n)*u)/d,p=Math.sin(n*u)/d):(f=1-n,p=n),e[0]=f*o+p*h,e[1]=f*i+p*b,e[2]=f*a+p*y,e[3]=f*l+p*g,e}function p(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function h(e,t){const r=t[0]+t[4]+t[8];let n;if(r>0)n=Math.sqrt(r+1),e[3]=.5*n,n=.5/n,e[0]=(t[5]-t[7])*n,e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const o=(r+1)%3,i=(r+2)%3;n=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*i+i]+1),e[r]=.5*n,n=.5/n,e[3]=(t[3*o+i]-t[3*i+o])*n,e[o]=(t[3*o+r]+t[3*r+o])*n,e[i]=(t[3*i+r]+t[3*r+i])*n}return e}function b(e,t,r,n){const o=.5*Math.PI/180;t*=o,r*=o,n*=o;const i=Math.sin(t),s=Math.cos(t),a=Math.sin(r),l=Math.cos(r),u=Math.sin(n),c=Math.cos(n);return e[0]=i*l*c-s*a*u,e[1]=s*a*c+i*l*u,e[2]=s*l*u-i*a*c,e[3]=s*l*c+i*a*u,e}const y=l.c,g=l.s,m=l.a,w=d,C=l.b,v=l.d,A=l.l,T=l.e,S=T,U=l.f,I=U,O=l.n,M=l.g,_=l.h,E=(0,i.c)(),R=(0,i.f)(1,0,0),N=(0,i.f)(0,1,0),B=(0,o.a)(),k=(0,o.a)(),P=(0,n.c)();Object.freeze(Object.defineProperty({__proto__:null,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},setAxisAngle:u,getAxisAngle:c,multiply:d,rotateX:function(e,t,r){r*=.5;const n=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=n*l+s*a,e[1]=o*l+i*a,e[2]=i*l-o*a,e[3]=s*l-n*a,e},rotateY:function(e,t,r){r*=.5;const n=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=n*l-i*a,e[1]=o*l+s*a,e[2]=i*l+n*a,e[3]=s*l-o*a,e},rotateZ:function(e,t,r){r*=.5;const n=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=n*l+o*a,e[1]=o*l-n*a,e[2]=i*l+s*a,e[3]=s*l-i*a,e},calculateW:function(e,t){const r=t[0],n=t[1],o=t[2];return e[0]=r,e[1]=n,e[2]=o,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-o*o)),e},slerp:f,random:function(e){const t=s.R,r=t(),n=t(),o=t(),i=Math.sqrt(1-r),a=Math.sqrt(r);return e[0]=i*Math.sin(2*Math.PI*n),e[1]=i*Math.cos(2*Math.PI*n),e[2]=a*Math.sin(2*Math.PI*o),e[3]=a*Math.cos(2*Math.PI*o),e},invert:function(e,t){const r=t[0],n=t[1],o=t[2],i=t[3],s=r*r+n*n+o*o+i*i,a=s?1/s:0;return e[0]=-r*a,e[1]=-n*a,e[2]=-o*a,e[3]=i*a,e},conjugate:p,fromMat3:h,fromEuler:b,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},copy:y,set:g,add:m,mul:w,scale:C,dot:v,lerp:A,length:T,len:S,squaredLength:U,sqrLen:I,normalize:O,exactEquals:M,equals:_,rotationTo:function(e,t,r){const n=(0,a.e)(t,r);return n<-.999999?((0,a.f)(E,R,t),(0,a.u)(E)<1e-6&&(0,a.f)(E,N,t),(0,a.n)(E,E),u(e,E,Math.PI),e):n>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,a.f)(E,t,r),e[0]=E[0],e[1]=E[1],e[2]=E[2],e[3]=1+n,O(e,e))},sqlerp:function(e,t,r,n,o,i){return f(B,t,o,i),f(k,r,n,i),f(e,B,k,2*i*(1-i)),e},setAxes:function(e,t,r,n){const o=P;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=n[0],o[4]=n[1],o[7]=n[2],o[2]=-t[0],o[5]=-t[1],o[8]=-t[2],O(e,h(e,o))}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function n(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}function i(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>s,a:()=>n,b:()=>o,c:()=>i});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,create:n,clone:o,fromValues:function(e,t,r,n){return[e,t,r,n]},createView:i,IDENTITY:s},Symbol.toStringTag,{value:"Module"}))},72119:(e,t,r)=>{function n(){return new Float32Array(3)}function o(e,t,r){const n=new Float32Array(3);return n[0]=e,n[1]=t,n[2]=r,n}function i(){return n()}function s(){return o(1,1,1)}function a(){return o(1,0,0)}function l(){return o(0,1,0)}function u(){return o(0,0,1)}r.d(t,{c:()=>n,f:()=>o});const c=i(),d=s(),f=a(),p=l(),h=u();Object.freeze(Object.defineProperty({__proto__:null,create:n,clone:function(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},fromValues:o,createView:function(e,t){return new Float32Array(e,t,3)},zeros:i,ones:s,unitX:a,unitY:l,unitZ:u,ZEROS:c,ONES:d,UNIT_X:f,UNIT_Y:p,UNIT_Z:h},Symbol.toStringTag,{value:"Module"}))},35270:(e,t,r)=>{r.d(t,{B7:()=>l,St:()=>o,VL:()=>s,h$:()=>i,rW:()=>u});const n={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(e){return n[e]||n[e.toLowerCase()]}function i(e){return n[e]??n[e.toLowerCase()]}function s(e){return[...i(e)]}function a(e,t,r){r<0&&++r,r>1&&--r;const n=6*r;return n<1?e+(t-e)*n:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,n=1){const o=(e%360+360)%360/360,i=r<=.5?r*(t+1):r+t-r*t,s=2*r-i;return[Math.round(255*a(s,i,o+1/3)),Math.round(255*a(s,i,o)),Math.round(255*a(s,i,o-1/3)),n]}function u(e){const t=e.length>5,r=t?8:4,n=(1<<r)-1,o=t?1:17,i=t?9===e.length:5===e.length;let s=Number("0x"+e.substr(1));if(isNaN(s))return null;const a=[0,0,0,1];let l;return i&&(l=s&n,s>>=r,a[3]=o*l/255),l=s&n,s>>=r,a[2]=o*l,l=s&n,s>>=r,a[1]=o*l,l=s&n,s>>=r,a[0]=o*l,a}},36030:(e,t,r)=>{r.d(t,{J:()=>i});var n=r(35454),o=r(5600);function i(e,t={}){const r=e instanceof n.X?e:new n.X(e,t),i={type:t?.ignoreUnknown??1?r.apiValues:String,json:{type:r.jsonValues,read:!t?.readOnly&&{reader:r.read},write:{writer:r.write}}};return void 0!==t?.readOnly&&(i.readOnly=!!t.readOnly),void 0!==t?.default&&(i.json.default=t.default),void 0!==t?.name&&(i.json.name=t.name),(0,o.Cb)(i)}},10661:(e,t,r)=>{r.d(t,{s:()=>o});var n=r(39020);class o{constructor(){this._observers=[]}observe(e){return this._observers.includes(e)||this._observers.push(e),new n.X(this._observers,e)}notify(){const e=this._observers.slice();for(let t=0;t<e.length;++t){const r=e[t];r.onInvalidated(),r.onCommitted()}}}},67900:(e,t,r)=>{r.d(t,{$C:()=>S,En:()=>A,Jo:()=>V,_R:()=>U,c9:()=>O,cM:()=>I,gV:()=>P,hd:()=>u,qE:()=>E,ty:()=>T}),r(80442);var n=r(35454),o=r(70586),i=r(24678),s=r(68441),a=r(8744),l=r(58116);const u=39.37,c=s.sv.radius*Math.PI/200,d=/UNIT\[([^\]]+)\]\]$/i,f=l.Z,p=/UNIT\[([^\]]+)\]/i,h=new Set([4261,4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104139,104140]),b=(0,n.w)()({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"}),y=e=>e*e,g=e=>e*e*e,m={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},decimeters:{inBaseUnits:.1},meters:{inBaseUnits:1},kilometers:{inBaseUnits:1e3},inches:{inBaseUnits:.0254},feet:{inBaseUnits:.3048},yards:{inBaseUnits:.9144},miles:{inBaseUnits:1609.344},"nautical-miles":{inBaseUnits:1852},"us-feet":{inBaseUnits:1200/3937}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:y(.001)},"square-centimeters":{inBaseUnits:y(.01)},"square-decimeters":{inBaseUnits:y(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:y(1e3)},"square-inches":{inBaseUnits:y(.0254)},"square-feet":{inBaseUnits:y(.3048)},"square-yards":{inBaseUnits:y(.9144)},"square-miles":{inBaseUnits:y(1609.344)},"square-us-feet":{inBaseUnits:y(1200/3937)},acres:{inBaseUnits:.0015625*y(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*g(.001)},"cubic-centimeters":{inBaseUnits:1e3*g(.01)},"cubic-decimeters":{inBaseUnits:1e3*g(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*g(1e3)},"cubic-inches":{inBaseUnits:1e3*g(.0254)},"cubic-feet":{inBaseUnits:1e3*g(.3048)},"cubic-yards":{inBaseUnits:1e3*g(.9144)},"cubic-miles":{inBaseUnits:1e3*g(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},w=(()=>{const e={};for(const t in m)for(const r in m[t].units)e[r]=t;return e})();function C(e){const t=w[e];if(!t)throw new Error("unknown type");return t}function v(e,t=null){return t=t||C(e),m[t].baseUnit===e}function A(e,t,r){if(t===r)return e;const n=C(t);if(n!==C(r))throw new Error("incompatible units");const o=v(t,n)?e:function(e,t,r){return e*m[r].units[t].inBaseUnits}(e,t,n);return v(r,n)?o:function(e,t,r){return e/m[r].units[t].inBaseUnits}(o,r,n)}function T(e,t,r){return A(e,t,"meters")/(r*Math.PI/180)}function S(e){return b.fromJSON(e.toLowerCase())||null}function U(e){if((0,o.pC)(e)&&!(0,a.N$)(e))return 1;const t=O(e);return t>1e5?1:t}function I(e){return O(e)>=(0,i.Iu)(e).metersPerDegree?"meters":E(e)}function O(e,t=s.sv.metersPerDegree){return(0,o.Pt)(function(e,t=!1){const r=(0,o.pC)(e)?e.wkid:null,n=(0,o.pC)(e)?e.wkt:null;let i=null;if(r){if((0,a.o$)(r))return s.yr.metersPerDegree;if((0,a.ME)(r))return s.Z1.metersPerDegree;i=f.values[f[r]],!i&&t&&h.has(r)&&(i=c)}else n&&(N(n)?i=M(d.exec(n),i):R(n)&&(i=M(p.exec(n),i)));return i}(e,!0),t)}function M(e,t){return e&&e[1]?_(e[1]):t}function _(e){return parseFloat(e.split(",")[1])}function E(e){const t=(0,o.pC)(e)?e.wkid:null,r=(0,o.pC)(e)?e.wkt:null;let n=null;if(t)n=f.units[f[t]];else if(r){const e=N(r)?d:R(r)?p:null;if(e){const t=e.exec(r);t&&t[1]&&(n=function(e){const t=/[\\"\\']{1}([^\\"\\']+)/.exec(e);let r=t&&t[1];if(!r||!f.units.includes(r)){const t=_(e);r=null;const n=f.values;for(let e=0;e<n.length;++e)if(Math.abs(t-n[e])<1e-7){r=f.units[e];break}}return r}(t[1]))}}return(0,o.pC)(n)?S(n):null}function R(e){return/^GEOCCS/i.test(e)}function N(e){return/^PROJCS/i.test(e)}new Map([["meters","square-meters"],["feet","square-feet"],["us-feet","square-us-feet"]]);const B={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},k={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},P=(0,n.w)()(B),V=(0,n.w)()(k);(0,n.w)()({...B,...k})},24678:(e,t,r)=>{r.d(t,{GG:()=>l,HQ:()=>u,Iu:()=>p,VY:()=>c,e8:()=>h,rS:()=>f,wY:()=>d});var n=r(70586),o=r(82971),i=r(68441),s=r(8744);function a(e){return new o.Z({wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${e.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`})}const l=a(i.sv),u=a(i.yr),c=a(i.Z1),d=new o.Z({wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${i.sv.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`});function f(e){return e&&((0,s.BZ)(e)||e===u)?u:e&&((0,s.V2)(e)||e===c)?c:l}function p(e){return(0,n.pC)(e)&&((0,s.BZ)(e)||e===u)?i.yr:(0,n.pC)(e)&&((0,s.V2)(e)||e===c)?i.Z1:i.sv}function h(e){return(0,s.o$)(e)?i.yr:(0,s.ME)(e)?i.Z1:i.sv}},24470:(e,t,r)=>{r.d(t,{HH:()=>l,SO:()=>u,Ue:()=>i,al:()=>s,cS:()=>p,jE:()=>c,kK:()=>d,oJ:()=>a,r3:()=>f}),r(80442),r(22021);var n=r(70586),o=r(6570);function i(e=b){return[e[0],e[1],e[2],e[3]]}function s(e,t,r,n,o=i()){return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o}function a(e,t=i()){return t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax,t}function l(e,t){return new o.Z({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}function u(e){return function(e){return(0,n.Wi)(e)||e[0]>=e[2]?0:e[2]-e[0]}(e)*function(e){return e[1]>=e[3]?0:e[3]-e[1]}(e)}function c(e,t,r){return t>=e[0]&&r>=e[1]&&t<=e[2]&&r<=e[3]}function d(e,t){return Math.max(t[0],e[0])<=Math.min(t[2],e[2])&&Math.max(t[1],e[1])<=Math.min(t[3],e[3])}function f(e,t){return t[0]>=e[0]&&t[2]<=e[2]&&t[1]>=e[1]&&t[3]<=e[3]}function p(e){return e?function(e,t){return e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3]),e}(e,h):i(h)}const h=[1/0,1/0,-1/0,-1/0],b=[0,0,0,0]},69285:(e,t,r)=>{r.d(t,{k:()=>s});var n=r(70586),o=r(67900),i=r(8744);function s(e,t,r){if((0,n.Wi)(t)||(0,n.Wi)(r)||r.vcsWkid||(0,i.fS)(t,r))return null;const s=(0,o._R)(t)/(0,o._R)(r);if(1===s)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,s);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,s);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,s);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,s);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,s);default:return null}}},23030:(e,t,r)=>{r.d(t,{Z:()=>m});var n,o=r(43697),i=r(22974),s=r(5600),a=r(75215),l=r(36030),u=r(52011),c=r(25848),d=r(66338),f=r(22303),p=r(96674);let h=n=class extends p.wq{constructor(){super(...arguments),this.description=null,this.label=null,this.minValue=0,this.maxValue=0,this.color=null}clone(){return new n({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,color:(0,i.d9)(this.color)})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],h.prototype,"description",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],h.prototype,"label",void 0),(0,o._)([(0,s.Cb)({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],h.prototype,"minValue",void 0),(0,o._)([(0,s.Cb)({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],h.prototype,"maxValue",void 0),(0,o._)([(0,s.Cb)({type:f.Z,json:{type:[a.z8],write:!0}})],h.prototype,"color",void 0),h=n=(0,o._)([(0,u.j)("esri.renderers.support.pointCloud.ColorClassBreakInfo")],h);const b=h;var y;let g=y=class extends c.Z{constructor(e){super(e),this.type="point-cloud-class-breaks",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.colorClassBreakInfos=null}clone(){return new y({...this.cloneProperties(),field:this.field,fieldTransformType:this.fieldTransformType,colorClassBreakInfos:(0,i.d9)(this.colorClassBreakInfos),legendOptions:(0,i.d9)(this.legendOptions)})}};(0,o._)([(0,l.J)({pointCloudClassBreaksRenderer:"point-cloud-class-breaks"})],g.prototype,"type",void 0),(0,o._)([(0,s.Cb)({json:{write:!0},type:String})],g.prototype,"field",void 0),(0,o._)([(0,s.Cb)({type:d.I,json:{write:!0}})],g.prototype,"legendOptions",void 0),(0,o._)([(0,s.Cb)({type:c.Z.fieldTransformTypeKebabDict.apiValues,json:{type:c.Z.fieldTransformTypeKebabDict.jsonValues,read:c.Z.fieldTransformTypeKebabDict.read,write:c.Z.fieldTransformTypeKebabDict.write}})],g.prototype,"fieldTransformType",void 0),(0,o._)([(0,s.Cb)({type:[b],json:{write:!0}})],g.prototype,"colorClassBreakInfos",void 0),g=y=(0,o._)([(0,u.j)("esri.renderers.PointCloudClassBreaksRenderer")],g);const m=g},25848:(e,t,r)=>{r.d(t,{Z:()=>S});var n,o=r(43697),i=r(35454),s=r(96674),a=r(22974),l=r(5600),u=(r(75215),r(52011));r(67676),r(80442);let c=n=class extends s.wq{constructor(){super(...arguments),this.field=null,this.minValue=0,this.maxValue=255}clone(){return new n({field:this.field,minValue:this.minValue,maxValue:this.maxValue})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,o._)([(0,l.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],c.prototype,"minValue",void 0),(0,o._)([(0,l.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],c.prototype,"maxValue",void 0),c=n=(0,o._)([(0,u.j)("esri.renderers.support.pointCloud.ColorModulation")],c);const d=c,f=new i.X({pointCloudFixedSizeAlgorithm:"fixed-size",pointCloudSplatAlgorithm:"splat"});let p=class extends s.wq{};(0,o._)([(0,l.Cb)({type:f.apiValues,readOnly:!0,nonNullable:!0,json:{type:f.jsonValues,read:!1,write:f.write}})],p.prototype,"type",void 0),p=(0,o._)([(0,u.j)("esri.renderers.support.pointCloud.PointSizeAlgorithm")],p);const h=p;var b,y=r(36030);let g=b=class extends h{constructor(){super(...arguments),this.type="fixed-size",this.size=0,this.useRealWorldSymbolSizes=null}clone(){return new b({size:this.size,useRealWorldSymbolSizes:this.useRealWorldSymbolSizes})}};(0,o._)([(0,y.J)({pointCloudFixedSizeAlgorithm:"fixed-size"})],g.prototype,"type",void 0),(0,o._)([(0,l.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],g.prototype,"size",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],g.prototype,"useRealWorldSymbolSizes",void 0),g=b=(0,o._)([(0,u.j)("esri.renderers.support.pointCloud.PointSizeFixedSizeAlgorithm")],g);const m=g;var w;let C=w=class extends h{constructor(){super(...arguments),this.type="splat",this.scaleFactor=1}clone(){return new w({scaleFactor:this.scaleFactor})}};(0,o._)([(0,y.J)({pointCloudSplatAlgorithm:"splat"})],C.prototype,"type",void 0),(0,o._)([(0,l.Cb)({type:Number,value:1,nonNullable:!0,json:{write:!0}})],C.prototype,"scaleFactor",void 0),C=w=(0,o._)([(0,u.j)("esri.renderers.support.pointCloud.PointSizeSplatAlgorithm")],C);const v={key:"type",base:h,typeMap:{"fixed-size":m,splat:C}},A=(0,i.w)()({pointCloudClassBreaksRenderer:"point-cloud-class-breaks",pointCloudRGBRenderer:"point-cloud-rgb",pointCloudStretchRenderer:"point-cloud-stretch",pointCloudUniqueValueRenderer:"point-cloud-unique-value"});let T=class extends s.wq{constructor(e){super(e),this.type=void 0,this.pointSizeAlgorithm=null,this.colorModulation=null,this.pointsPerInch=10}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}cloneProperties(){return{pointSizeAlgorithm:(0,a.d9)(this.pointSizeAlgorithm),colorModulation:(0,a.d9)(this.colorModulation),pointsPerInch:(0,a.d9)(this.pointsPerInch)}}};(0,o._)([(0,l.Cb)({type:A.apiValues,readOnly:!0,nonNullable:!0,json:{type:A.jsonValues,read:!1,write:A.write}})],T.prototype,"type",void 0),(0,o._)([(0,l.Cb)({types:v,json:{write:!0}})],T.prototype,"pointSizeAlgorithm",void 0),(0,o._)([(0,l.Cb)({type:d,json:{write:!0}})],T.prototype,"colorModulation",void 0),(0,o._)([(0,l.Cb)({json:{write:!0},nonNullable:!0,type:Number})],T.prototype,"pointsPerInch",void 0),T=(0,o._)([(0,u.j)("esri.renderers.PointCloudRenderer")],T),(T||(T={})).fieldTransformTypeKebabDict=new i.X({none:"none",lowFourBit:"low-four-bit",highFourBit:"high-four-bit",absoluteValue:"absolute-value",moduloTen:"modulo-ten"});const S=T},14008:(e,t,r)=>{r.d(t,{Z:()=>p});var n,o=r(43697),i=r(22974),s=r(5600),a=(r(75215),r(36030)),l=r(52011),u=r(25848),c=r(66338),d=r(21849);let f=n=class extends u.Z{constructor(e){super(e),this.type="point-cloud-stretch",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.stops=null}clone(){return new n({...this.cloneProperties(),field:(0,i.d9)(this.field),fieldTransformType:(0,i.d9)(this.fieldTransformType),stops:(0,i.d9)(this.stops),legendOptions:(0,i.d9)(this.legendOptions)})}};(0,o._)([(0,a.J)({pointCloudStretchRenderer:"point-cloud-stretch"})],f.prototype,"type",void 0),(0,o._)([(0,s.Cb)({json:{write:!0},type:String})],f.prototype,"field",void 0),(0,o._)([(0,s.Cb)({type:c.I,json:{write:!0}})],f.prototype,"legendOptions",void 0),(0,o._)([(0,s.Cb)({type:u.Z.fieldTransformTypeKebabDict.apiValues,json:{type:u.Z.fieldTransformTypeKebabDict.jsonValues,read:u.Z.fieldTransformTypeKebabDict.read,write:u.Z.fieldTransformTypeKebabDict.write}})],f.prototype,"fieldTransformType",void 0),(0,o._)([(0,s.Cb)({type:[d.Z],json:{write:!0}})],f.prototype,"stops",void 0),f=n=(0,o._)([(0,l.j)("esri.renderers.PointCloudStretchRenderer")],f);const p=f},46329:(e,t,r)=>{r.d(t,{Z:()=>m});var n,o=r(43697),i=r(22974),s=r(5600),a=r(75215),l=r(36030),u=r(52011),c=r(25848),d=r(66338),f=r(22303),p=r(96674);let h=n=class extends p.wq{constructor(){super(...arguments),this.description=null,this.label=null,this.values=null,this.color=null}clone(){return new n({description:this.description,label:this.label,values:(0,i.d9)(this.values),color:(0,i.d9)(this.color)})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],h.prototype,"description",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],h.prototype,"label",void 0),(0,o._)([(0,s.Cb)({type:[String],json:{write:!0}})],h.prototype,"values",void 0),(0,o._)([(0,s.Cb)({type:f.Z,json:{type:[a.z8],write:!0}})],h.prototype,"color",void 0),h=n=(0,o._)([(0,u.j)("esri.renderers.support.pointCloud.ColorUniqueValueInfo")],h);const b=h;var y;let g=y=class extends c.Z{constructor(e){super(e),this.type="point-cloud-unique-value",this.field=null,this.fieldTransformType=null,this.colorUniqueValueInfos=null,this.legendOptions=null}clone(){return new y({...this.cloneProperties(),field:(0,i.d9)(this.field),fieldTransformType:(0,i.d9)(this.fieldTransformType),colorUniqueValueInfos:(0,i.d9)(this.colorUniqueValueInfos),legendOptions:(0,i.d9)(this.legendOptions)})}};(0,o._)([(0,l.J)({pointCloudUniqueValueRenderer:"point-cloud-unique-value"})],g.prototype,"type",void 0),(0,o._)([(0,s.Cb)({json:{write:!0},type:String})],g.prototype,"field",void 0),(0,o._)([(0,s.Cb)({type:c.Z.fieldTransformTypeKebabDict.apiValues,json:{type:c.Z.fieldTransformTypeKebabDict.jsonValues,read:c.Z.fieldTransformTypeKebabDict.read,write:c.Z.fieldTransformTypeKebabDict.write}})],g.prototype,"fieldTransformType",void 0),(0,o._)([(0,s.Cb)({type:[b],json:{write:!0}})],g.prototype,"colorUniqueValueInfos",void 0),(0,o._)([(0,s.Cb)({type:d.I,json:{write:!0}})],g.prototype,"legendOptions",void 0),g=y=(0,o._)([(0,u.j)("esri.renderers.PointCloudUniqueValueRenderer")],g);const m=g},66338:(e,t,r)=>{r.d(t,{I:()=>l});var n,o=r(43697),i=r(96674),s=r(5600),a=(r(67676),r(80442),r(75215),r(52011));let l=n=class extends i.wq{constructor(){super(...arguments),this.title=null}clone(){return new n({title:this.title})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"title",void 0),l=n=(0,o._)([(0,a.j)("esri.renderers.support.LegendOptions")],l)},21849:(e,t,r)=>{r.d(t,{Z:()=>f});var n,o=r(43697),i=r(22303),s=r(96674),a=r(5600),l=(r(67676),r(80442),r(75215)),u=r(52011),c=r(30556);let d=n=class extends s.wq{constructor(e){super(e),this.color=null,this.label=null,this.value=null}writeValue(e,t,r){t[r]=e??0}clone(){return new n({color:this.color&&this.color.clone(),label:this.label,value:this.value})}};(0,o._)([(0,a.Cb)({type:i.Z,json:{type:[l.z8],write:!0}})],d.prototype,"color",void 0),(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:{writerEnsuresNonNull:!0}}})],d.prototype,"value",void 0),(0,o._)([(0,c.c)("value")],d.prototype,"writeValue",null),d=n=(0,o._)([(0,u.j)("esri.renderers.visualVariables.support.ColorStop")],d);const f=d},16583:(e,t,r)=>{r.r(t),r.d(t,{default:()=>x});var n=r(70586),o=r(1533),i=r(51305);function s(){const e=new Float32Array(4);return e[3]=1,e}Object.freeze(Object.defineProperty({__proto__:null,create:s,clone:function(e){const t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},fromValues:function(e,t,r,n){const o=new Float32Array(4);return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o},createView:function(e,t){return new Float32Array(e,t,4)}},Symbol.toStringTag,{value:"Module"}));var a=r(17896),l=r(72119),u=r(44547),c=r(82971),d=r(23030),f=r(14008),p=r(46329),h=r(20102),b=r(22974),y=r(92604);const g=!0;function m(e,t,r){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,r+0,10)),version:t.getUint16(r+10,g),checksum:t.getUint32(r+12,g)}}function w(e,t,r){const n=[];t=C(e,t,n);const o=[];for(let i=0;i<n.length;i++){o.length=0,t=C(e,t,o);for(let e=0;e<o.length;e++)r.push(o[e]+n[i])}return t}function C(e,t,r){const n=new DataView(e,t),o=n.getUint8(0),i=31&o,s=!!(32&o),a=(192&o)>>6;let l=0;if(0===a)l=n.getUint32(1,g),t+=5;else if(1===a)l=n.getUint16(1,g),t+=3;else{if(2!==a)throw new h.Z("lepcc-decode-error","Bad count type");l=n.getUint8(1),t+=2}if(s)throw new h.Z("lepcc-decode-error","LUT not implemented");const u=Math.ceil(l*i/8),c=new Uint8Array(e,t,u);let d=0,f=0,p=0;const b=-1>>>32-i;for(let e=0;e<l;e++){for(;f<i;)d|=c[p]<<f,f+=8,p+=1;r[e]=d&b,d>>>=i,f-=i,f+i>32&&(d|=c[p-1]>>8-f)}return t+p}var v=r(35065);const A=y.Z.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function T(e,t,r){let n="",o=0;for(;o<r;){const i=e[t+o];if(i<128)n+=String.fromCharCode(i),o++;else if(i>=192&&i<224){if(o+1>=r)throw new h.Z("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const s=(31&i)<<6|63&e[t+o+1];n+=String.fromCharCode(s),o+=2}else if(i>=224&&i<240){if(o+2>=r)throw new h.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(15&i)<<12|(63&e[t+o+1])<<6|63&e[t+o+2];n+=String.fromCharCode(s),o+=3}else{if(!(i>=240&&i<248))throw new h.Z("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(o+3>=r)throw new h.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(7&i)<<18|(63&e[t+o+1])<<12|(63&e[t+o+2])<<6|63&e[t+o+3];if(s>=65536){const e=55296+(s-65536>>10),t=56320+(1023&s);n+=String.fromCharCode(e,t)}else n+=String.fromCharCode(s);o+=4}}}return n}function S(e,t){const r={byteOffset:0,byteCount:0,fields:Object.create(null)};let n=0;for(let o=0;o<t.length;o++){const i=t[o],s=i.valueType||i.type,a=E[s];r.fields[i.property]=a(e,n),n+=_[s].BYTES_PER_ELEMENT}return r.byteCount=n,r}function U(e,t){return new(0,_[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function I(e,t,r){if(t!==e&&A.error(`Invalid ${r} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new h.Z("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}const O={position:v.T.POSITION,normal:v.T.NORMAL,color:v.T.COLOR,uv0:v.T.UV0,region:v.T.UVREGION};function M(e,t,r){if("lepcc-rgb"===e.encoding)return function(e){const t=new DataView(e,0);let r=0;const{identifier:n,version:o}=m(e,t,r);if(r+=16,"ClusterRGB"!==n)throw new h.Z("lepcc-decode-error","Bad identifier");if(o>1)throw new h.Z("lepcc-decode-error","Unknown version");const i=function(e,t){return{sizeLo:e.getUint32(t+0,g),sizeHi:e.getUint32(t+4,g),count:e.getUint32(t+8,g),colorMapCount:e.getUint16(t+12,g),lookupMethod:e.getUint8(t+14),compressionMethod:e.getUint8(t+15)}}(t,r);if(r+=16,i.sizeHi*2**32+i.sizeLo!==e.byteLength)throw new h.Z("lepcc-decode-error","Bad size");if((2===i.lookupMethod||1===i.lookupMethod)&&0===i.compressionMethod){if(3*i.colorMapCount+i.count+r!==e.byteLength||i.colorMapCount>256)throw new h.Z("lepcc-decode-error","Bad count");const t=new Uint8Array(e,r,3*i.colorMapCount),n=new Uint8Array(e,r+3*i.colorMapCount,i.count),o=new Uint8Array(3*i.count);for(let e=0;e<i.count;e++){const r=n[e];o[3*e]=t[3*r],o[3*e+1]=t[3*r+1],o[3*e+2]=t[3*r+2]}return o}if(0===i.lookupMethod&&0===i.compressionMethod){if(3*i.count+r!==e.byteLength||0!==i.colorMapCount)throw new h.Z("lepcc-decode-error","Bad count");return new Uint8Array(e,r).slice()}if(i.lookupMethod<=2&&1===i.compressionMethod){if(r+3!==e.byteLength||1!==i.colorMapCount)throw new h.Z("lepcc-decode-error","Bad count");const n=t.getUint8(r),o=t.getUint8(r+1),s=t.getUint8(r+2),a=new Uint8Array(3*i.count);for(let e=0;e<i.count;e++)a[3*e]=n,a[3*e+1]=o,a[3*e+2]=s;return a}throw new h.Z("lepcc-decode-error","Bad method "+i.lookupMethod+","+i.compressionMethod)}(t);if("lepcc-intensity"===e.encoding)return function(e){const t=new DataView(e,0);let r=0;const{identifier:n,version:o}=m(e,t,r);if(r+=16,"Intensity "!==n)throw new h.Z("lepcc-decode-error","Bad identifier");if(o>1)throw new h.Z("lepcc-decode-error","Unknown version");const i=function(e,t){return{sizeLo:e.getUint32(t+0,g),sizeHi:e.getUint32(t+4,g),count:e.getUint32(t+8,g),scaleFactor:e.getUint16(t+12,g),bitsPerPoint:e.getUint8(t+14),reserved:e.getUint8(t+15)}}(t,r);if(r+=16,i.sizeHi*2**32+i.sizeLo!==e.byteLength)throw new h.Z("lepcc-decode-error","Bad size");const s=new Uint16Array(i.count);if(8===i.bitsPerPoint){if(i.count+r!==e.byteLength)throw new h.Z("lepcc-decode-error","Bad size");const t=new Uint8Array(e,r,i.count);for(let e=0;e<i.count;e++)s[e]=t[e]*i.scaleFactor}else if(16===i.bitsPerPoint){if(2*i.count+r!==e.byteLength)throw new h.Z("lepcc-decode-error","Bad size");const t=new Uint16Array(e,r,i.count);for(let e=0;e<i.count;e++)s[e]=t[e]*i.scaleFactor}else{const t=[];if(C(e,r,t)!==e.byteLength)throw new h.Z("lepcc-decode-error","Bad size");for(let e=0;e<i.count;e++)s[e]=t[e]*i.scaleFactor}return s}(t);if(null!=e.encoding&&""!==e.encoding)throw new h.Z("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(A.warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(A.warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const n=function(e,t,r){const n=null!=t.header?S(e,t.header):{byteOffset:0,byteCount:0,fields:{count:r}},o={header:n,byteOffset:n.byteCount,byteCount:0,entries:Object.create(null)};let i=n.byteCount;for(let e=0;e<t.ordering.length;e++){const r=t.ordering[e],s=(0,b.d9)(t[r]);if(s.count=n.fields.count,"String"===s.valueType){if(s.byteOffset=i,s.byteCount=n.fields[r+"ByteCount"],"UTF-8"!==s.encoding)throw new h.Z("unsupported-encoding","Unsupported String encoding.",{encoding:s.encoding})}else{if(!R(s.valueType))throw new h.Z("unsupported-value-type","Unsupported binary valueType",{valueType:s.valueType});{const e=N(s.valueType);i+=i%e!=0?e-i%e:0,s.byteOffset=i,s.byteCount=e*s.valuesPerElement*s.count}}i+=s.byteCount,o.entries[r]=s}return o.byteCount=i-o.byteOffset,o}(t,e,r);I(n.byteOffset+n.byteCount,t.byteLength,"attribute");const o=n.entries.attributeValues||n.entries.objectIds;if(o){if("String"===o.valueType){const e=n.entries.attributeByteCounts,r=U(t,e),i=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,o);return function(e,t,r){const n=[];let o,i,s=0;for(i=0;i<e;i+=1){if(o=t[i],o>0){if(n.push(T(r,s,o-1)),0!==r[s+o-1])throw new h.Z("string-array-error","Invalid string array: missing null termination.")}else n.push(null);s+=o}return n}(e.count,r,i)}return U(t,o)}throw new h.Z("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const _={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},E={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function R(e){return _.hasOwnProperty(e)}function N(e){return R(e)?_[e].BYTES_PER_ELEMENT:0}function B(e,t){if(null==e.encoding||""===e.encoding){const r=function(e,t){const r=S(e,t&&t.header);let n=r.byteCount;const o={isDraco:!1,header:r,byteOffset:r.byteCount,byteCount:0,vertexAttributes:{}},i=r.fields,s=null!=i.vertexCount?i.vertexCount:i.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const r={...t.vertexAttributes[e],byteOffset:n,count:s},i=O[e]?O[e]:"_"+e;o.vertexAttributes[i]=r,n+=N(r.valueType)*r.valuesPerElement*s}const a=i.faceCount;if(t.faces&&a){o.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const r={...t.faces[e],byteOffset:n,count:a};o.faces[e]=r,n+=N(r.valueType)*r.valuesPerElement*a}}const l=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&l){o.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const r={...t.featureAttributes[e],byteOffset:n,count:l};o.featureAttributes[e]=r,n+=("UInt64"===r.valueType?8:N(r.valueType))*r.valuesPerElement*l}}return I(n,e.byteLength,"geometry"),o.byteCount=n-o.byteOffset,o}(t,e);if((0,n.Wi)(r.vertexAttributes.position))return;const o=U(t,r.vertexAttributes.position),i=r.header.fields,s=[i.offsetX,i.offsetY,i.offsetZ],a=[i.scaleX,i.scaleY,i.scaleZ],l=o.length/3,u=new Float64Array(3*l);for(let e=0;e<l;e++)u[3*e]=o[3*e]*a[0]+s[0],u[3*e+1]=o[3*e+1]*a[1]+s[1],u[3*e+2]=o[3*e+2]*a[2]+s[2];return u}if("lepcc-xyz"===e.encoding)return function(e){const t=new DataView(e,0);let r=0;const{identifier:n,version:o}=m(e,t,r);if(r+=16,"LEPCC "!==n)throw new h.Z("lepcc-decode-error","Bad identifier");if(o>1)throw new h.Z("lepcc-decode-error","Unknown version");const i=function(e,t){return{sizeLo:e.getUint32(t+0,g),sizeHi:e.getUint32(t+4,g),minX:e.getFloat64(t+8,g),minY:e.getFloat64(t+16,g),minZ:e.getFloat64(t+24,g),maxX:e.getFloat64(t+32,g),maxY:e.getFloat64(t+40,g),maxZ:e.getFloat64(t+48,g),errorX:e.getFloat64(t+56,g),errorY:e.getFloat64(t+64,g),errorZ:e.getFloat64(t+72,g),count:e.getUint32(t+80,g),reserved:e.getUint32(t+84,g)}}(t,r);if(r+=88,i.sizeHi*2**32+i.sizeLo!==e.byteLength)throw new h.Z("lepcc-decode-error","Bad size");const s=new Float64Array(3*i.count),a=[],l=[],u=[],c=[];if(r=w(e,r,a),r=w(e,r,l),r=w(e,r,u),r=w(e,r,c),r!==e.byteLength)throw new h.Z("lepcc-decode-error","Bad length");let d=0,f=0;for(let e=0;e<a.length;e++){f+=a[e];let t=0;for(let r=0;r<l[e];r++){t+=u[d];const e=c[d];s[3*d]=Math.min(i.maxX,i.minX+2*i.errorX*t),s[3*d+1]=Math.min(i.maxY,i.minY+2*i.errorY*f),s[3*d+2]=Math.min(i.maxZ,i.minZ+2*i.errorZ*e),d++}}return{errorX:i.errorX,errorY:i.errorY,errorZ:i.errorZ,result:s}}(t).result}function k(e,t,r){return(0,n.pC)(e)&&e.attributeInfo.useElevation?function(e,t){const r=new Float64Array(t);for(let n=0;n<t;n++)r[n]=e[3*n+2];return r}(t,r):(0,n.pC)(e)?M(e.attributeInfo.storageInfo,e.buffer,r):null}function P(e){return null==e||"none"===e?null:"low-four-bit"===e?e=>15&e:"high-four-bit"===e?e=>(240&e)>>4:"absolute-value"===e?e=>Math.abs(e):"modulo-ten"===e?e=>e%10:null}function V(e){let t=0;for(const r of e||[])t|=1<<r;return t}class F{transform(e){const t=this._transform(e),r=[t.points.buffer,t.rgb.buffer];(0,n.pC)(t.pointIdFilterMap)&&r.push(t.pointIdFilterMap.buffer);for(const e of t.attributes)"buffer"in e.values&&(0,o.eP)(e.values.buffer)&&e.values.buffer!==t.rgb.buffer&&r.push(e.values.buffer);return Promise.resolve({result:t,transferList:r})}_transform(e){const t=B(e.schema,e.geometryBuffer);let r=t.length/3,o=null;const i=[],s=k(e.primaryAttributeData,t,r);(0,n.pC)(e.primaryAttributeData)&&s&&i.push({attributeInfo:e.primaryAttributeData.attributeInfo,values:s});const a=k(e.modulationAttributeData,t,r);(0,n.pC)(e.modulationAttributeData)&&a&&i.push({attributeInfo:e.modulationAttributeData.attributeInfo,values:a});let l=function(e,t,r,n){const{rendererJSON:o,isRGBRenderer:i}=e;let s=null,a=null;if(t&&i)s=t;else if(t&&"pointCloudUniqueValueRenderer"===o.type){a=p.Z.fromJSON(o);const e=a.colorUniqueValueInfos;s=new Uint8Array(3*n);const r=P(a.fieldTransformType);for(let o=0;o<n;o++){const n=(r?r(t[o]):t[o])+"";for(let t=0;t<e.length;t++)if(e[t].values.includes(n)){s[3*o]=e[t].color.r,s[3*o+1]=e[t].color.g,s[3*o+2]=e[t].color.b;break}}}else if(t&&"pointCloudStretchRenderer"===o.type){a=f.Z.fromJSON(o);const e=a.stops;s=new Uint8Array(3*n);const r=P(a.fieldTransformType);for(let o=0;o<n;o++){const n=r?r(t[o]):t[o],i=e.length-1;if(n<e[0].value)s[3*o]=e[0].color.r,s[3*o+1]=e[0].color.g,s[3*o+2]=e[0].color.b;else if(n>=e[i].value)s[3*o]=e[i].color.r,s[3*o+1]=e[i].color.g,s[3*o+2]=e[i].color.b;else for(let t=1;t<e.length;t++)if(n<e[t].value){const r=(n-e[t-1].value)/(e[t].value-e[t-1].value);s[3*o]=e[t].color.r*r+e[t-1].color.r*(1-r),s[3*o+1]=e[t].color.g*r+e[t-1].color.g*(1-r),s[3*o+2]=e[t].color.b*r+e[t-1].color.b*(1-r);break}}}else if(t&&"pointCloudClassBreaksRenderer"===o.type){a=d.Z.fromJSON(o);const e=a.colorClassBreakInfos;s=new Uint8Array(3*n);const r=P(a.fieldTransformType);for(let o=0;o<n;o++){const n=r?r(t[o]):t[o];for(let t=0;t<e.length;t++)if(n>=e[t].minValue&&n<=e[t].maxValue){s[3*o]=e[t].color.r,s[3*o+1]=e[t].color.g,s[3*o+2]=e[t].color.b;break}}}else{s=new Uint8Array(3*n);for(let e=0;e<s.length;e++)s[e]=255}if(r&&a&&a.colorModulation){const e=a.colorModulation.minValue,t=a.colorModulation.maxValue,o=.3;for(let i=0;i<n;i++){const n=r[i],a=n>=t?1:n<=e?o:o+(1-o)*(n-e)/(t-e);s[3*i]=a*s[3*i],s[3*i+1]=a*s[3*i+1],s[3*i+2]=a*s[3*i+2]}}return s}(e.rendererInfo,s,a,r);if(e.filterInfo&&e.filterInfo.length>0&&(0,n.pC)(e.filterAttributesData)){const n=e.filterAttributesData.map((e=>{const n=k(e,t,r),o={attributeInfo:e.attributeInfo,values:n};return i.push(o),o}));o=new Uint32Array(r),r=function(e,t,r,n,o){const i=e.length/3;let s=0;for(let a=0;a<i;a++){let i=!0;for(let e=0;e<n.length&&i;e++){const{filterJSON:t}=n[e],r=o[e].values[a];switch(t.type){case"pointCloudValueFilter":{const e="exclude"===t.mode;t.values.includes(r)===e&&(i=!1);break}case"pointCloudBitfieldFilter":{const e=V(t.requiredSetBits),n=V(t.requiredClearBits);(r&e)===e&&0==(r&n)||(i=!1);break}case"pointCloudReturnFilter":{const e=15&r,n=r>>>4&15,o=n>1,s=1===e,a=e===n;let l=!1;for(const e of t.includedReturns)if("last"===e&&a||"firstOfMany"===e&&s&&o||"lastOfMany"===e&&a&&o||"single"===e&&!o){l=!0;break}l||(i=!1);break}}}i&&(r[s]=a,e[3*s]=e[3*a],e[3*s+1]=e[3*a+1],e[3*s+2]=e[3*a+2],t[3*s]=t[3*a],t[3*s+1]=t[3*a+1],t[3*s+2]=t[3*a+2],s++)}return s}(t,l,o,e.filterInfo,n)}for(const n of e.userAttributesData){const e=k(n,t,r);i.push({attributeInfo:n.attributeInfo,values:e})}3*r<l.length&&(l=new Uint8Array(l.buffer.slice(0,3*r))),this._applyElevationOffsetInPlace(t,r,e.elevationOffset);const u=this._transformCoordinates(t,r,e.obb,c.Z.fromJSON(e.inSR),c.Z.fromJSON(e.outSR));return{obb:e.obb,points:u,rgb:l,attributes:i,pointIdFilterMap:o}}_transformCoordinates(e,t,r,n,o){if(!(0,u.CM)(e,n,0,e,o,0,t))throw new Error("Can't reproject");const s=(0,l.f)(r.center[0],r.center[1],r.center[2]),c=(0,l.c)(),d=(0,l.c)();(0,i.c)(Z,r.quaternion);const f=new Float32Array(3*t);for(let n=0;n<t;n++)c[0]=e[3*n]-s[0],c[1]=e[3*n+1]-s[1],c[2]=e[3*n+2]-s[2],(0,a.q)(d,c,Z),r.halfSize[0]=Math.max(r.halfSize[0],Math.abs(d[0])),r.halfSize[1]=Math.max(r.halfSize[1],Math.abs(d[1])),r.halfSize[2]=Math.max(r.halfSize[2],Math.abs(d[2])),f[3*n]=c[0],f[3*n+1]=c[1],f[3*n+2]=c[2];return f}_applyElevationOffsetInPlace(e,t,r){if(0!==r)for(let n=0;n<t;n++)e[3*n+2]+=r}}const Z=s();function x(){return new F}},35065:(e,t,r)=>{var n;r.d(t,{T:()=>n}),function(e){e.POSITION="position",e.NORMAL="normal",e.UV0="uv0",e.AUXPOS1="auxpos1",e.AUXPOS2="auxpos2",e.MAPPOS="mapPos",e.COLOR="color",e.SYMBOLCOLOR="symbolColor",e.SIZE="size",e.TANGENT="tangent",e.OFFSET="offset",e.SUBDIVISIONFACTOR="subdivisionFactor",e.COLORFEATUREATTRIBUTE="colorFeatureAttribute",e.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",e.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",e.DISTANCETOSTART="distanceToStart",e.UVMAPSPACE="uvMapSpace",e.BOUNDINGRECT="boundingRect",e.UVREGION="uvRegion",e.NORMALCOMPRESSED="normalCompressed",e.PROFILERIGHT="profileRight",e.PROFILEUP="profileUp",e.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",e.FEATUREVALUE="featureValue",e.MODELORIGINHI="modelOriginHi",e.MODELORIGINLO="modelOriginLo",e.MODEL="model",e.MODELNORMAL="modelNormal",e.INSTANCECOLOR="instanceColor",e.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",e.LOCALTRANSFORM="localTransform",e.GLOBALTRANSFORM="globalTransform",e.BOUNDINGSPHERE="boundingSphere",e.MODELORIGIN="modelOrigin",e.MODELSCALEFACTORS="modelScaleFactors",e.FEATUREATTRIBUTE="featureAttribute",e.STATE="state",e.LODLEVEL="lodLevel",e.POSITION0="position0",e.POSITION1="position1",e.NORMALA="normalA",e.NORMALB="normalB",e.COMPONENTINDEX="componentIndex",e.VARIANTOFFSET="variantOffset",e.VARIANTSTROKE="variantStroke",e.VARIANTEXTENSION="variantExtension",e.U8PADDING="u8padding",e.U16PADDING="u16padding",e.SIDENESS="sideness",e.START="start",e.END="end",e.UP="up",e.EXTRUDE="extrude",e.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",e.OBJECTANDLAYERIDCOLOR_INSTANCED="objectAndLayerIdColor_instanced"}(n||(n={}))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9291],{79291:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(13598),l(1391),l(62707),l(55039),l(51546),l(77171),l(47624),l(64267),l(37099),l(76056),l(135),l(11317),l(15719),l(92555),l(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9291],{79291:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(13598),l(1391),l(62707),l(55039),l(51546),l(77171),l(47624),l(64267),l(37099),l(76056),l(135),l(11317),l(15719),l(92555),l(89136),l(15817),l(66242),l(14482),l(83603),l(19419),l(26322),l(85504),l(22539),l(82550),l(85787),l(90692),l(93669),l(172),l(71250),l(21437),l(74709),l(8319),l(33680),l(98069),l(93144),l(35065),l(9749);var s=l(32078)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5853],{55853:(e,t,r)=>{r.r(t),r.d(t,{default:()=>me});var i=r(43697),s=r(3172),l=r(46791),a=r(20102),o=r(61247),n=r(22974),u=r(16453),c=r(78286),p=r(95330),d=r(17445),h=r(17452),m=r(5600),y=(r(75215),r(71715)),f=r(52011),g=r(30556),w=r(6570),x=r(87085),v=r(16199),S=r(71612),b=r(38009),M=r(16859),C=r(34760),I=r(72965),_=r(11145);class L{constructor(e,t=0,r=e.lods.length-1){this.tileInfo=e,this.minLOD=t,this.maxLOD=r}getAvailability(e,t,r){const i=this.tileInfo.lodAt(e);return!i||e<this.minLOD||e>this.maxLOD?"unavailable":i.cols&&i.rows?r>=i.cols[0]&&r<=i.cols[1]&&t>=i.rows[0]&&t<=i.rows[1]?"available":"unavailable":"available"}async fetchAvailability(e,t,r,i){return await(0,p.Yn)(i),this.getAvailability(e,t,r)}async fetchAvailabilityUpsample(e,t,r,i,s){await(0,p.Yn)(s),i.level=e,i.row=t,i.col=r;const l=this.tileInfo;for(l.updateTileInfo(i);;){const e=this.getAvailability(i.level,i.row,i.col);if("unavailable"!==e)return e;if(!l.upsampleTile(i))return"unavailable"}}}var T,E=r(5833),P=r(96674);r(67676),r(80442);let O=T=class extends P.wq{constructor(e){super(e),this.fullExtent=null,this.id=null,this.tileInfo=null}clone(){const e=new T;return this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent&&this.fullExtent.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("tileInfo")&&(e.tileInfo=this.tileInfo&&this.tileInfo.clone()),e}};(0,i._)([(0,m.Cb)({type:w.Z,json:{read:{source:"fullExtent"}}})],O.prototype,"fullExtent",void 0),(0,i._)([(0,m.Cb)({type:String,json:{read:{source:"id"}}})],O.prototype,"id",void 0),(0,i._)([(0,m.Cb)({type:_.Z,json:{read:{source:"tileInfo"}}})],O.prototype,"tileInfo",void 0),O=T=(0,i._)([(0,f.j)("esri.layer.support.TileMatrixSet")],O);const R=O;var F;let A=F=class extends P.wq{constructor(e){super(e),this.id=null,this.title=null,this.description=null,this.legendUrl=null}clone(){const e=new F;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("isDefault")&&(e.isDefault=this.isDefault),this.hasOwnProperty("keywords")&&(e.keywords=this.keywords&&this.keywords.slice()),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,i._)([(0,m.Cb)({json:{read:{source:"id"}}})],A.prototype,"id",void 0),(0,i._)([(0,m.Cb)({json:{read:{source:"title"}}})],A.prototype,"title",void 0),(0,i._)([(0,m.Cb)({json:{read:{source:"abstract"}}})],A.prototype,"description",void 0),(0,i._)([(0,m.Cb)({json:{read:{source:"legendUrl"}}})],A.prototype,"legendUrl",void 0),(0,i._)([(0,m.Cb)({json:{read:{source:"isDefault"}}})],A.prototype,"isDefault",void 0),(0,i._)([(0,m.Cb)({json:{read:{source:"keywords"}}})],A.prototype,"keywords",void 0),A=F=(0,i._)([(0,f.j)("esri.layer.support.WMTSStyle")],A);const V=A;var j;let U=j=class extends P.wq{constructor(e){super(e),this.fullExtent=null,this.fullExtents=null,this.imageFormats=null,this.id=null,this.layer=null,this.styles=null,this.tileMatrixSetId=null,this.tileMatrixSets=null}get description(){return this._get("description")}set description(e){this._set("description",e)}readFullExtent(e,t){return(e=t.fullExtent)?w.Z.fromJSON(e):null}readFullExtents(e,t){return t.fullExtents?.length?t.fullExtents.map((e=>w.Z.fromJSON(e))):t.tileMatrixSets.map((e=>w.Z.fromJSON(e.fullExtent))).filter((e=>e))}get imageFormat(){let e=this._get("imageFormat");return e||(e=this.imageFormats&&this.imageFormats.length?this.imageFormats[0]:""),e}set imageFormat(e){const t=this.imageFormats;e&&(e.includes("image/")||t&&!t.includes(e))&&(e.includes("image/")||(e="image/"+e),t&&!t.includes(e))?console.error("The layer doesn't support the format of "+e):this._set("imageFormat",e)}get styleId(){let e=this._get("styleId");return e||(e=this.styles&&this.styles.length?this.styles.getItemAt(0).id:""),e}set styleId(e){this._set("styleId",e)}get title(){return this._get("title")}set title(e){this._set("title",e)}get tileMatrixSet(){return this.tileMatrixSets?this.tileMatrixSets.find((e=>e.id===this.tileMatrixSetId)):null}clone(){const e=new j;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("imageFormats")&&(e.imageFormats=this.imageFormats&&this.imageFormats.slice()),this.hasOwnProperty("imageFormat")&&(e.imageFormat=this.imageFormat),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent&&this.fullExtent.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("styleId")&&(e.styleId=this.styleId),this.hasOwnProperty("styles")&&(e.styles=this.styles&&this.styles.clone()),this.hasOwnProperty("tileMatrixSetId")&&(e.tileMatrixSetId=this.tileMatrixSetId),this.hasOwnProperty("tileMatrixSets")&&(e.tileMatrixSets=this.tileMatrixSets.clone()),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,i._)([(0,m.Cb)()],U.prototype,"description",null),(0,i._)([(0,m.Cb)()],U.prototype,"fullExtent",void 0),(0,i._)([(0,y.r)("fullExtent",["fullExtent"])],U.prototype,"readFullExtent",null),(0,i._)([(0,m.Cb)({readOnly:!0})],U.prototype,"fullExtents",void 0),(0,i._)([(0,y.r)("fullExtents",["fullExtents","tileMatrixSets"])],U.prototype,"readFullExtents",null),(0,i._)([(0,m.Cb)()],U.prototype,"imageFormat",null),(0,i._)([(0,m.Cb)({json:{read:{source:"formats"}}})],U.prototype,"imageFormats",void 0),(0,i._)([(0,m.Cb)()],U.prototype,"id",void 0),(0,i._)([(0,m.Cb)()],U.prototype,"layer",void 0),(0,i._)([(0,m.Cb)()],U.prototype,"styleId",null),(0,i._)([(0,m.Cb)({type:l.Z.ofType(V),json:{read:{source:"styles"}}})],U.prototype,"styles",void 0),(0,i._)([(0,m.Cb)({value:null,json:{write:{ignoreOrigin:!0}}})],U.prototype,"title",null),(0,i._)([(0,m.Cb)()],U.prototype,"tileMatrixSetId",void 0),(0,i._)([(0,m.Cb)({readOnly:!0})],U.prototype,"tileMatrixSet",null),(0,i._)([(0,m.Cb)({type:l.Z.ofType(R),json:{read:{source:"tileMatrixSets"}}})],U.prototype,"tileMatrixSets",void 0),U=j=(0,i._)([(0,f.j)("esri.layers.support.WMTSSublayer")],U);const N=U;var Z=r(70586),k=r(13473),D=r(24678),W=r(58116),B=r(52162),K=r(88724);const H=90.71428571428571;function $(e){const t=e.replace(/ows:/gi,"");if(!J("Contents",(new DOMParser).parseFromString(t,"text/xml").documentElement))throw new a.Z("wmtslayer:wmts-capabilities-xml-is-not-valid","the wmts get capabilities response is not compliant",{text:e})}function q(e){return e.nodeType===Node.ELEMENT_NODE}function J(e,t){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];if(q(i)&&i.nodeName===e)return i}return null}function Y(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];q(s)&&s.nodeName===e&&r.push(s)}return r}function G(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];q(s)&&s.nodeName===e&&r.push(s)}return r.map((e=>e.textContent))}function z(e,t){return e.split(">").forEach((e=>{t&&(t=J(e,t))})),t&&t.textContent}function Q(e,t,r,i){let s;return Array.prototype.slice.call(i.childNodes).some((i=>{if(i.nodeName.includes(e)){const e=J(t,i),l=e&&e.textContent;if(l===r||r.split(":")&&r.split(":")[1]===l)return s=i,!0}return!1})),s}function X(e,t,r,i,s){const l=z("Abstract",t),a=G("Format",t);return{id:e,fullExtent:te(t),fullExtents:re(t),description:l,formats:a,styles:ie(t,i),title:z("Title",t),tileMatrixSets:se(s,t,r)}}function ee(e,t){const r=[],i=e.layerMap?.get(t);if(!i)return;const s=Y("ResourceURL",i),l=Y("Dimension",i);let a,o,n,u;return l.length&&(a=z("Identifier",l[0]),o=G("Default",l[0])||G("Value",l[0])),l.length>1&&(n=z("Identifier",l[1]),u=G("Default",l[1])||G("Value",l[1])),e.dimensionMap.set(t,{dimensions:o,dimensions2:u}),s.forEach((e=>{let t=e.getAttribute("template");if("tile"===e.getAttribute("resourceType")){if(a&&o.length)if(t.includes("{"+a+"}"))t=t.replace("{"+a+"}","{dimensionValue}");else{const e=t.toLowerCase().indexOf("{"+a.toLowerCase()+"}");e>-1&&(t=t.substring(0,e)+"{dimensionValue}"+t.substring(e+a.length+2))}if(n&&u.length)if(t.includes("{"+n+"}"))t=t.replace("{"+n+"}","{dimensionValue2}");else{const e=t.toLowerCase().indexOf("{"+n.toLowerCase()+"}");e>-1&&(t=t.substring(0,e)+"{dimensionValue2}"+t.substring(e+n.length+2))}r.push({template:t,format:e.getAttribute("format"),resourceType:"tile"})}})),r}function te(e){const t=J("WGS84BoundingBox",e),r=t?z("LowerCorner",t).split(" "):["-180","-90"],i=t?z("UpperCorner",t).split(" "):["180","90"];return{xmin:parseFloat(r[0]),ymin:parseFloat(r[1]),xmax:parseFloat(i[0]),ymax:parseFloat(i[1]),spatialReference:{wkid:4326}}}function re(e){const t=[];return(0,K.h)(e,{BoundingBox:e=>{if(!e.getAttribute("crs"))return;const r=e.getAttribute("crs").toLowerCase(),i=le(r),s=r.includes("epsg")&&(0,B.A)(i.wkid);let l,a,o,n;(0,K.h)(e,{LowerCorner:e=>{[l,a]=e.textContent.split(" ").map((e=>Number.parseFloat(e))),s&&([l,a]=[a,l])},UpperCorner:e=>{[o,n]=e.textContent.split(" ").map((e=>Number.parseFloat(e))),s&&([o,n]=[n,o])}}),t.push({xmin:l,ymin:a,xmax:o,ymax:n,spatialReference:i})}}),t}function ie(e,t){return Y("Style",e).map((e=>{const r=J("LegendURL",e),i=J("Keywords",e),s=i&&G("Keyword",i);let l=r&&r.getAttribute("xlink:href");return t&&(l=l&&l.replace(/^http:/i,"https:")),{abstract:z("Abstract",e),id:z("Identifier",e),isDefault:"true"===e.getAttribute("isDefault"),keywords:s,legendUrl:l,title:z("Title",e)}}))}function se(e,t,r){return Y("TileMatrixSetLink",t).map((t=>function(e,t,r){const i=J("TileMatrixSet",t).textContent,s=G("TileMatrix",t),l=r.find((e=>{const t=J("Identifier",e),r=t&&t.textContent;return!!(r===i||i.split(":")&&i.split(":")[1]===r)})),a=J("TileMatrixSetLimits",t),o=a&&Y("TileMatrixLimits",a),n=new Map;if(o?.length)for(const e of o){const t=J("TileMatrix",e).textContent,r=+J("MinTileRow",e).textContent,i=+J("MaxTileRow",e).textContent,s=+J("MinTileCol",e).textContent,l=+J("MaxTileCol",e).textContent;n.set(t,{minCol:s,maxCol:l,minRow:r,maxRow:i})}const u=z("SupportedCRS",l).toLowerCase(),c=function(e,t){return ae(J("TileMatrix",e),t)}(l,u),p=c.spatialReference,d=J("TileMatrix",l),h=[parseInt(z("TileWidth",d),10),parseInt(z("TileHeight",d),10)],m=[];s.length?s.forEach(((e,t)=>{const r=Q("TileMatrix","Identifier",e,l);m.push(ue(r,u,t,i,n))})):Y("TileMatrix",l).forEach(((e,t)=>{m.push(ue(e,u,t,i,n))}));const y=function(e,t,r,i,s){const l=J("BoundingBox",t);let a,o,n,u,c,p;if(l&&(a=z("LowerCorner",l).split(" "),o=z("UpperCorner",l).split(" ")),a&&a.length>1&&o&&o.length>1)n=parseFloat(a[0]),c=parseFloat(a[1]),u=parseFloat(o[0]),p=parseFloat(o[1]);else{const e=J("TileMatrix",t),l=parseInt(z("MatrixWidth",e),10),a=parseInt(z("MatrixHeight",e),10);n=r.x,p=r.y,u=n+l*i[0]*s.resolution,c=p-a*i[1]*s.resolution}return function(e,t){return"1.0.0"===e&&(0,B.A)(t.wkid)}(e,r.spatialReference)?new w.Z(c,n,p,u,r.spatialReference):new w.Z(n,c,u,p,r.spatialReference)}(e,l,c,h,m[0]).toJSON(),f=new _.Z({dpi:96,spatialReference:p,size:h,origin:c,lods:m}).toJSON();return{id:i,fullExtent:y,tileInfo:f}}(e,t,r)))}function le(e){e=e.toLowerCase();let t=parseInt(e.split(":").pop(),10);900913!==t&&3857!==t||(t=102100);const r=function(e){return e.includes("crs84")||e.includes("crs:84")?oe.CRS84:e.includes("crs83")||e.includes("crs:83")?oe.CRS83:e.includes("crs27")||e.includes("crs:27")?oe.CRS27:null}(e);return(0,Z.pC)(r)&&(t=r),{wkid:t}}function ae(e,t){const r=le(t),[i,s]=z("TopLeftCorner",e).split(" ").map((e=>parseFloat(e))),l=t.includes("epsg")&&(0,B.A)(r.wkid);return new k.Z(l?{x:s,y:i,spatialReference:r}:{x:i,y:s,spatialReference:r})}var oe,ne;function ue(e,t,r,i,s){const l=le(t),a=z("Identifier",e);let o=parseFloat(z("ScaleDenominator",e));const n=ce(l.wkid,o,i);o*=96/H;const u=+z("MatrixWidth",e),c=+z("MatrixHeight",e),{maxCol:p=u-1,maxRow:d=c-1,minCol:h=0,minRow:m=0}=s.get(a)??{},{x:y,y:f}=ae(e,t);return{cols:[h,p],level:r,levelValue:a,origin:[y,f],scale:o,resolution:n,rows:[m,d]}}function ce(e,t,r){let i;return i=W.Z.hasOwnProperty(""+e)?W.Z.values[W.Z[e]]:"default028mm"===r?6370997*Math.PI/180:(0,D.e8)(e).metersPerDegree,7*t/25e3/i}(ne=oe||(oe={}))[ne.CRS84=4326]="CRS84",ne[ne.CRS83=4269]="CRS83",ne[ne.CRS27=4267]="CRS27";const pe={"image/png":".png","image/png8":".png","image/png24":".png","image/png32":".png","image/jpg":".jpg","image/jpeg":".jpeg","image/gif":".gif","image/bmp":".bmp","image/tiff":".tif","image/jpgpng":"","image/jpegpng":"","image/unknown":""},de=new Set(["version","service","request","layer","style","format","tilematrixset","tilematrix","tilerow","tilecol"]);let he=class extends((0,S.h)((0,C.Q)((0,I.M)((0,b.q)((0,M.I)((0,u.R)(x.Z))))))){constructor(...e){super(...e),this._sublayersHandles=new o.Z,this.copyright="",this.customParameters=null,this.customLayerParameters=null,this.fullExtent=null,this.operationalLayerType="WebTiledLayer",this.resourceInfo=null,this.serviceMode="RESTful",this.sublayers=null,this.type="wmts",this.version="1.0.0",this.addHandles([(0,d.YP)((()=>this.activeLayer),((e,t)=>{t&&(t.layer=null),e&&(e.layer=this)}),d.Z_),(0,d.YP)((()=>this.sublayers),((e,t)=>{t&&(t.forEach((e=>{e.layer=null})),this._sublayersHandles.removeAll(),this._sublayersHandles=null),e&&(e.forEach((e=>{e.layer=this})),this._sublayersHandles||(this._sublayersHandles=new o.Z),this._sublayersHandles.add([e.on("after-add",(({item:e})=>{e.layer=this})),e.on("after-remove",(({item:e})=>{e.layer=null}))]))}),d.Z_)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){if("KVP"===this.serviceMode||"RESTful"===this.serviceMode)return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMTS"]},e).catch(p.r9).then((()=>this._fetchService(e))).catch((e=>{throw(0,p.r9)(e),new a.Z("wmtslayer:unsupported-service-data","Invalid response from the WMTS service.",{error:e})}))),Promise.resolve(this);console.error("WMTS mode could only be 'KVP' or 'RESTful'")}get activeLayer(){return this._get("activeLayer")}set activeLayer(e){this._set("activeLayer",e)}readActiveLayerFromService(e,t,r){this.activeLayer||(this.activeLayer=new N);let i=t.layers.find((e=>e.id===this.activeLayer.id));return i||(i=t.layers[0]),this.activeLayer.read(i,r),this.activeLayer}readActiveLayerFromItemOrWebDoc(e,t){const{templateUrl:r,wmtsInfo:i}=t,s=r?this._getLowerCasedUrlParams(r):null,l=i?.layerIdentifier;let a=null;const o=i?.tileMatrixSet;o&&(Array.isArray(o)?o.length&&(a=o[0]):a=o);const n=s?.format,u=s?.style;return new N({id:l,imageFormat:n,styleId:u,tileMatrixSetId:a})}writeActiveLayer(e,t,r,i){const s=this.activeLayer;t.templateUrl=this.getUrlTemplate(s.id,s.tileMatrixSetId,s.imageFormat,s.styleId);const l=(0,c.hS)("tileMatrixSet.tileInfo",s);t.tileInfo=l?l.toJSON(i):null,t.wmtsInfo={...t.wmtsInfo,layerIdentifier:s.id,tileMatrixSet:s.tileMatrixSetId}}readCustomParameters(e,t){const r=t.wmtsInfo;return r?this._mergeParams(r.customParameters,r.url):null}get fullExtents(){return this.activeLayer.fullExtents}readServiceMode(e,t){return t.templateUrl.includes("?")?"KVP":"RESTful"}readSublayersFromService(e,t,r){return function(e,t){return e.map((e=>{const r=new N;return r.read(e,t),r}))}(t.layers,r)}get supportedSpatialReferences(){return this.activeLayer.tileMatrixSets.map((e=>e.tileInfo.spatialReference)).toArray()}get tilemapCache(){const e=this.activeLayer?.tileMatrixSet?.tileInfo;return new L(e)}get title(){return this.activeLayer?.title??"Layer"}set title(e){e?this._override("title",e):this._clearOverride("title")}get url(){return this._get("url")}set url(e){e&&"/"===e.substr(-1)?this._set("url",e.slice(0,-1)):this._set("url",e)}createWebTileLayer(e){const t=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId),r=this._getTileMatrixSetById(e.tileMatrixSetId).tileInfo,i=e.fullExtent,s=new E.B({layerIdentifier:e.id,tileMatrixSet:e.tileMatrixSetId,url:this.url});return this.customLayerParameters&&(s.customLayerParameters=this.customLayerParameters),this.customParameters&&(s.customParameters=this.customParameters),new v.default({fullExtent:i,urlTemplate:t,tileInfo:r,wmtsInfo:s})}fetchTile(e,t,r){const i=this.getTileUrl(e,t,r);return(0,s.default)(i,{responseType:"image"}).then((e=>e.data))}findSublayerById(e){return this.sublayers.find((t=>t.id===e))}getTileUrl(e,t,r){const i=this._getTileMatrixSetById(this.activeLayer.tileMatrixSetId).tileInfo.lods[e],s=i?i.levelValue?i.levelValue:`${i.level}`:`${e}`;let l=this.resourceInfo?"":function(e,t,r,i,s,l,a,o){const n=function(e,t,r){const i=ee(e,t),s=i.filter((e=>e.format===r));return s.length?s:i}(e,t,i);if(!(n?.length>0))return"";const{dimensionMap:u}=e,c=u.get(t).dimensions?.[0],p=u.get(t).dimensions2?.[0];return n[a%n.length].template.replace(/\{Style\}/gi,s).replace(/\{TileMatrixSet\}/gi,r).replace(/\{TileMatrix\}/gi,l).replace(/\{TileRow\}/gi,""+a).replace(/\{TileCol\}/gi,""+o).replace(/\{dimensionValue\}/gi,c).replace(/\{dimensionValue2\}/gi,p)}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId,s,t,r);return l||(l=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId).replace(/\{level\}/gi,s).replace(/\{row\}/gi,`${t}`).replace(/\{col\}/gi,`${r}`)),l=this._appendCustomLayerParameters(l),l}getUrlTemplate(e,t,r,i){if(!this.resourceInfo){const r=function(e,t,r,i){const{dimensionMap:s}=e,l=ee(e,t);let a="";if(l&&l.length>0){const e=s.get(t).dimensions&&s.get(t).dimensions[0],o=s.get(t).dimensions2&&s.get(t).dimensions2[0];a=l[0].template,a.indexOf(".xxx")===a.length-4&&(a=a.slice(0,a.length-4)),a=a.replace(/\{Style\}/gi,i),a=a.replace(/\{TileMatrixSet\}/gi,r),a=a.replace(/\{TileMatrix\}/gi,"{level}"),a=a.replace(/\{TileRow\}/gi,"{row}"),a=a.replace(/\{TileCol\}/gi,"{col}"),a=a.replace(/\{dimensionValue\}/gi,e),a=a.replace(/\{dimensionValue2\}/gi,o)}return a}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},e,t,i);if(r)return r}if("KVP"===this.serviceMode)return this.url+"?SERVICE=WMTS&VERSION="+this.version+"&REQUEST=GetTile&LAYER="+e+"&STYLE="+i+"&FORMAT="+r+"&TILEMATRIXSET="+t+"&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}";if("RESTful"===this.serviceMode){let s="";return pe[r.toLowerCase()]&&(s=pe[r.toLowerCase()]),this.url+e+"/"+i+"/"+t+"/{level}/{row}/{col}"+s}return""}async _fetchService(e){let t;if(this.resourceInfo)"KVP"===this.resourceInfo.serviceMode&&(this.url+=this.url.includes("?")?"":"?"),t={ssl:!1,data:this.resourceInfo};else try{t=await this._getCapabilities(this.serviceMode,e),$(t.data)}catch{const r="KVP"===this.serviceMode?"RESTful":"KVP";try{t=await this._getCapabilities(r,e),$(t.data),this.serviceMode=r}catch(e){throw new a.Z("wmtslayer:unsupported-service-data","Services does not support RESTful or KVP service modes.",{error:e})}}this.resourceInfo?t.data=function(e){return e.layers.forEach((e=>{e.tileMatrixSets.forEach((e=>{const t=e.tileInfo;96!==t.dpi&&(t.lods.forEach((r=>{r.scale=96*r.scale/t.dpi,r.resolution=ce(t.spatialReference.wkid,r.scale*H/96,e.id)})),t.dpi=96)}))})),e}(t.data):t.data=function(e,t){e=e.replace(/ows:/gi,"");const r=(new DOMParser).parseFromString(e,"text/xml").documentElement,i=new Map,s=new Map,l=J("Contents",r);if(!l)throw new a.Z("wmtslayer:wmts-capabilities-xml-is-not-valid");const o=J("OperationsMetadata",r)?.querySelector("[name='GetTile']"),n=o?.getElementsByTagName("Get"),u=n&&Array.prototype.slice.call(n),c=t?.url?.indexOf("https")>-1??!1;let p,d,h=t.serviceMode,m=t&&t.url;if(u&&u.length&&u.some((e=>{const t=J("Constraint",e);return!t||Q("AllowedValues","Value",h,t)?(m=e.attributes[0].nodeValue,!0):(!t||Q("AllowedValues","Value","RESTful",t)||Q("AllowedValues","Value","REST",t)?d=e.attributes[0].nodeValue:t&&!Q("AllowedValues","Value","KVP",t)||(p=e.attributes[0].nodeValue),!1)})),!m)if(d)m=d,h="RESTful";else if(p)m=p,h="KVP";else{const e=J("ServiceMetadataURL",r);m=e&&e.getAttribute("xlink:href")}const y=m.indexOf("1.0.0/");-1===y&&"RESTful"===h?m+="/":y>-1&&(m=m.substring(0,y)),"KVP"===h&&(m+=y>-1?"":"?"),c&&(m=m.replace(/^http:/i,"https:"));const f=z("ServiceIdentification>ServiceTypeVersion",r),g=z("ServiceIdentification>AccessConstraints",r),w=/^none$/i.test(g)?null:g,x=Y("Layer",l),v=Y("TileMatrixSet",l),S=x.map((e=>{const t=z("Identifier",e);return i.set(t,e),X(t,e,v,c,f)}));return{copyright:w,dimensionMap:s,layerMap:i,layers:S,serviceMode:h,tileUrl:m}}(t.data,{serviceMode:this.serviceMode,url:this.url}),t.data&&this.read(t.data,{origin:"service"})}async _getCapabilities(e,t){const r=this._getCapabilitiesUrl(e);return await(0,s.default)(r,{...t,responseType:"text"})}_getTileMatrixSetById(e){return this.findSublayerById(this.activeLayer.id).tileMatrixSets.find((t=>t.id===e))}_appendCustomParameters(e){return this._appendParameters(e,this.customParameters)}_appendCustomLayerParameters(e){return this._appendParameters(e,{...(0,n.d9)(this.customParameters),...this.customLayerParameters})}_appendParameters(e,t){const r=(0,h.mN)(e),i={...r.query,...t},s=(0,h.B7)(i);return""===s?r.path:`${r.path}?${s}`}_getCapabilitiesUrl(e){this.url=this.url.split("?")[0];const t="KVP"===e?`${this.url}?request=GetCapabilities&service=WMTS&version=${this.version}`:`${this.url}/${this.version}/WMTSCapabilities.xml`;return this._appendCustomParameters(t)}_getLowerCasedUrlParams(e){if(!e)return null;const t=(0,h.mN)(e).query;if(!t)return null;const r={};return Object.keys(t).forEach((e=>{r[e.toLowerCase()]=t[e]})),r}_mergeParams(e,t){const r=this._getLowerCasedUrlParams(t);if(r){const t=Object.keys(r);t.length&&(e=e?(0,n.d9)(e):{},t.forEach((t=>{e.hasOwnProperty(t)||de.has(t)||(e[t]=r[t])})))}return e}};(0,i._)([(0,m.Cb)()],he.prototype,"dimensionMap",void 0),(0,i._)([(0,m.Cb)()],he.prototype,"layerMap",void 0),(0,i._)([(0,m.Cb)({type:N,json:{origins:{"web-document":{write:{ignoreOrigin:!0}}}}})],he.prototype,"activeLayer",null),(0,i._)([(0,y.r)("service","activeLayer",["layers"])],he.prototype,"readActiveLayerFromService",null),(0,i._)([(0,y.r)(["web-document","portal-item"],"activeLayer",["wmtsInfo"])],he.prototype,"readActiveLayerFromItemOrWebDoc",null),(0,i._)([(0,g.c)(["web-document","portal-item"],"activeLayer",{templateUrl:{type:String},tileInfo:{type:_.Z},"wmtsInfo.layerIdentifier":{type:String},"wmtsInfo.tileMatrixSet":{type:String}})],he.prototype,"writeActiveLayer",null),(0,i._)([(0,m.Cb)({type:String,value:"",json:{write:!0}})],he.prototype,"copyright",void 0),(0,i._)([(0,m.Cb)({type:["show","hide"]})],he.prototype,"listMode",void 0),(0,i._)([(0,m.Cb)({json:{read:!0,write:!0}})],he.prototype,"blendMode",void 0),(0,i._)([(0,m.Cb)({json:{origins:{"web-document":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}},"portal-item":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}}}}})],he.prototype,"customParameters",void 0),(0,i._)([(0,y.r)(["portal-item","web-document"],"customParameters")],he.prototype,"readCustomParameters",null),(0,i._)([(0,m.Cb)({json:{origins:{"web-document":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}},"portal-item":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}}}}})],he.prototype,"customLayerParameters",void 0),(0,i._)([(0,m.Cb)({type:w.Z,json:{write:{ignoreOrigin:!0},origins:{"web-document":{read:{source:"fullExtent"}},"portal-item":{read:{source:"fullExtent"}}}}})],he.prototype,"fullExtent",void 0),(0,i._)([(0,m.Cb)({readOnly:!0})],he.prototype,"fullExtents",null),(0,i._)([(0,m.Cb)({type:["WebTiledLayer"]})],he.prototype,"operationalLayerType",void 0),(0,i._)([(0,m.Cb)()],he.prototype,"resourceInfo",void 0),(0,i._)([(0,m.Cb)()],he.prototype,"serviceMode",void 0),(0,i._)([(0,y.r)(["portal-item","web-document"],"serviceMode",["templateUrl"])],he.prototype,"readServiceMode",null),(0,i._)([(0,m.Cb)({type:l.Z.ofType(N)})],he.prototype,"sublayers",void 0),(0,i._)([(0,y.r)("service","sublayers",["layers"])],he.prototype,"readSublayersFromService",null),(0,i._)([(0,m.Cb)({readOnly:!0})],he.prototype,"supportedSpatialReferences",null),(0,i._)([(0,m.Cb)({readOnly:!0})],he.prototype,"tilemapCache",null),(0,i._)([(0,m.Cb)({json:{read:{source:"title"}}})],he.prototype,"title",null),(0,i._)([(0,m.Cb)({json:{read:!1},readOnly:!0,value:"wmts"})],he.prototype,"type",void 0),(0,i._)([(0,m.Cb)({json:{origins:{service:{read:{source:"tileUrl"}},"web-document":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}},"portal-item":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}}}}})],he.prototype,"url",null),(0,i._)([(0,m.Cb)()],he.prototype,"version",void 0),he=(0,i._)([(0,f.j)("esri.layers.WMTSLayer")],he);const me=he},52162:(e,t,r)=>{r.d(t,{A:()=>s});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function s(e){return i.some((([t,r])=>e>=t&&e<=r))}},88724:(e,t,r)=>{function i(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];if("function"==typeof e){const t=e(r);t&&i(r,t)}else i(r,e)}}function*s(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];"function"==typeof e?yield e(r):yield*s(r,e)}}r.d(t,{H:()=>s,h:()=>i})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5853],{55853:(e,t,r)=>{r.r(t),r.d(t,{default:()=>me});var i=r(43697),s=r(3172),l=r(46791),a=r(20102),o=r(61247),n=r(22974),u=r(16453),c=r(78286),p=r(95330),d=r(17445),h=r(17452),m=r(5600),y=(r(75215),r(71715)),f=r(52011),g=r(30556),w=r(6570),x=r(87085),v=r(16199),S=r(71612),b=r(38009),M=r(16859),C=r(34760),I=r(72965),_=r(11145);class L{constructor(e,t=0,r=e.lods.length-1){this.tileInfo=e,this.minLOD=t,this.maxLOD=r}getAvailability(e,t,r){const i=this.tileInfo.lodAt(e);return!i||e<this.minLOD||e>this.maxLOD?"unavailable":i.cols&&i.rows?r>=i.cols[0]&&r<=i.cols[1]&&t>=i.rows[0]&&t<=i.rows[1]?"available":"unavailable":"available"}async fetchAvailability(e,t,r,i){return await(0,p.Yn)(i),this.getAvailability(e,t,r)}async fetchAvailabilityUpsample(e,t,r,i,s){await(0,p.Yn)(s),i.level=e,i.row=t,i.col=r;const l=this.tileInfo;for(l.updateTileInfo(i);;){const e=this.getAvailability(i.level,i.row,i.col);if("unavailable"!==e)return e;if(!l.upsampleTile(i))return"unavailable"}}}var T,E=r(5833),P=r(96674);r(67676),r(80442);let O=T=class extends P.wq{constructor(e){super(e),this.fullExtent=null,this.id=null,this.tileInfo=null}clone(){const e=new T;return this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent&&this.fullExtent.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("tileInfo")&&(e.tileInfo=this.tileInfo&&this.tileInfo.clone()),e}};(0,i._)([(0,m.Cb)({type:w.Z,json:{read:{source:"fullExtent"}}})],O.prototype,"fullExtent",void 0),(0,i._)([(0,m.Cb)({type:String,json:{read:{source:"id"}}})],O.prototype,"id",void 0),(0,i._)([(0,m.Cb)({type:_.Z,json:{read:{source:"tileInfo"}}})],O.prototype,"tileInfo",void 0),O=T=(0,i._)([(0,f.j)("esri.layer.support.TileMatrixSet")],O);const R=O;var F;let A=F=class extends P.wq{constructor(e){super(e),this.id=null,this.title=null,this.description=null,this.legendUrl=null}clone(){const e=new F;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("isDefault")&&(e.isDefault=this.isDefault),this.hasOwnProperty("keywords")&&(e.keywords=this.keywords&&this.keywords.slice()),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,i._)([(0,m.Cb)({json:{read:{source:"id"}}})],A.prototype,"id",void 0),(0,i._)([(0,m.Cb)({json:{read:{source:"title"}}})],A.prototype,"title",void 0),(0,i._)([(0,m.Cb)({json:{read:{source:"abstract"}}})],A.prototype,"description",void 0),(0,i._)([(0,m.Cb)({json:{read:{source:"legendUrl"}}})],A.prototype,"legendUrl",void 0),(0,i._)([(0,m.Cb)({json:{read:{source:"isDefault"}}})],A.prototype,"isDefault",void 0),(0,i._)([(0,m.Cb)({json:{read:{source:"keywords"}}})],A.prototype,"keywords",void 0),A=F=(0,i._)([(0,f.j)("esri.layer.support.WMTSStyle")],A);const V=A;var j;let U=j=class extends P.wq{constructor(e){super(e),this.fullExtent=null,this.fullExtents=null,this.imageFormats=null,this.id=null,this.layer=null,this.styles=null,this.tileMatrixSetId=null,this.tileMatrixSets=null}get description(){return this._get("description")}set description(e){this._set("description",e)}readFullExtent(e,t){return(e=t.fullExtent)?w.Z.fromJSON(e):null}readFullExtents(e,t){return t.fullExtents?.length?t.fullExtents.map((e=>w.Z.fromJSON(e))):t.tileMatrixSets.map((e=>w.Z.fromJSON(e.fullExtent))).filter((e=>e))}get imageFormat(){let e=this._get("imageFormat");return e||(e=this.imageFormats&&this.imageFormats.length?this.imageFormats[0]:""),e}set imageFormat(e){const t=this.imageFormats;e&&(e.includes("image/")||t&&!t.includes(e))&&(e.includes("image/")||(e="image/"+e),t&&!t.includes(e))?console.error("The layer doesn't support the format of "+e):this._set("imageFormat",e)}get styleId(){let e=this._get("styleId");return e||(e=this.styles&&this.styles.length?this.styles.getItemAt(0).id:""),e}set styleId(e){this._set("styleId",e)}get title(){return this._get("title")}set title(e){this._set("title",e)}get tileMatrixSet(){return this.tileMatrixSets?this.tileMatrixSets.find((e=>e.id===this.tileMatrixSetId)):null}clone(){const e=new j;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("imageFormats")&&(e.imageFormats=this.imageFormats&&this.imageFormats.slice()),this.hasOwnProperty("imageFormat")&&(e.imageFormat=this.imageFormat),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent&&this.fullExtent.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("styleId")&&(e.styleId=this.styleId),this.hasOwnProperty("styles")&&(e.styles=this.styles&&this.styles.clone()),this.hasOwnProperty("tileMatrixSetId")&&(e.tileMatrixSetId=this.tileMatrixSetId),this.hasOwnProperty("tileMatrixSets")&&(e.tileMatrixSets=this.tileMatrixSets.clone()),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,i._)([(0,m.Cb)()],U.prototype,"description",null),(0,i._)([(0,m.Cb)()],U.prototype,"fullExtent",void 0),(0,i._)([(0,y.r)("fullExtent",["fullExtent"])],U.prototype,"readFullExtent",null),(0,i._)([(0,m.Cb)({readOnly:!0})],U.prototype,"fullExtents",void 0),(0,i._)([(0,y.r)("fullExtents",["fullExtents","tileMatrixSets"])],U.prototype,"readFullExtents",null),(0,i._)([(0,m.Cb)()],U.prototype,"imageFormat",null),(0,i._)([(0,m.Cb)({json:{read:{source:"formats"}}})],U.prototype,"imageFormats",void 0),(0,i._)([(0,m.Cb)()],U.prototype,"id",void 0),(0,i._)([(0,m.Cb)()],U.prototype,"layer",void 0),(0,i._)([(0,m.Cb)()],U.prototype,"styleId",null),(0,i._)([(0,m.Cb)({type:l.Z.ofType(V),json:{read:{source:"styles"}}})],U.prototype,"styles",void 0),(0,i._)([(0,m.Cb)({value:null,json:{write:{ignoreOrigin:!0}}})],U.prototype,"title",null),(0,i._)([(0,m.Cb)()],U.prototype,"tileMatrixSetId",void 0),(0,i._)([(0,m.Cb)({readOnly:!0})],U.prototype,"tileMatrixSet",null),(0,i._)([(0,m.Cb)({type:l.Z.ofType(R),json:{read:{source:"tileMatrixSets"}}})],U.prototype,"tileMatrixSets",void 0),U=j=(0,i._)([(0,f.j)("esri.layers.support.WMTSSublayer")],U);const N=U;var Z=r(70586),k=r(13473),D=r(24678),W=r(58116),B=r(52162),K=r(88724);const H=90.71428571428571;function $(e){const t=e.replace(/ows:/gi,"");if(!J("Contents",(new DOMParser).parseFromString(t,"text/xml").documentElement))throw new a.Z("wmtslayer:wmts-capabilities-xml-is-not-valid","the wmts get capabilities response is not compliant",{text:e})}function q(e){return e.nodeType===Node.ELEMENT_NODE}function J(e,t){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];if(q(i)&&i.nodeName===e)return i}return null}function Y(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];q(s)&&s.nodeName===e&&r.push(s)}return r}function G(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];q(s)&&s.nodeName===e&&r.push(s)}return r.map((e=>e.textContent))}function z(e,t){return e.split(">").forEach((e=>{t&&(t=J(e,t))})),t&&t.textContent}function Q(e,t,r,i){let s;return Array.prototype.slice.call(i.childNodes).some((i=>{if(i.nodeName.includes(e)){const e=J(t,i),l=e&&e.textContent;if(l===r||r.split(":")&&r.split(":")[1]===l)return s=i,!0}return!1})),s}function X(e,t,r,i,s){const l=z("Abstract",t),a=G("Format",t);return{id:e,fullExtent:te(t),fullExtents:re(t),description:l,formats:a,styles:ie(t,i),title:z("Title",t),tileMatrixSets:se(s,t,r)}}function ee(e,t){const r=[],i=e.layerMap?.get(t);if(!i)return;const s=Y("ResourceURL",i),l=Y("Dimension",i);let a,o,n,u;return l.length&&(a=z("Identifier",l[0]),o=G("Default",l[0])||G("Value",l[0])),l.length>1&&(n=z("Identifier",l[1]),u=G("Default",l[1])||G("Value",l[1])),e.dimensionMap.set(t,{dimensions:o,dimensions2:u}),s.forEach((e=>{let t=e.getAttribute("template");if("tile"===e.getAttribute("resourceType")){if(a&&o.length)if(t.includes("{"+a+"}"))t=t.replace("{"+a+"}","{dimensionValue}");else{const e=t.toLowerCase().indexOf("{"+a.toLowerCase()+"}");e>-1&&(t=t.substring(0,e)+"{dimensionValue}"+t.substring(e+a.length+2))}if(n&&u.length)if(t.includes("{"+n+"}"))t=t.replace("{"+n+"}","{dimensionValue2}");else{const e=t.toLowerCase().indexOf("{"+n.toLowerCase()+"}");e>-1&&(t=t.substring(0,e)+"{dimensionValue2}"+t.substring(e+n.length+2))}r.push({template:t,format:e.getAttribute("format"),resourceType:"tile"})}})),r}function te(e){const t=J("WGS84BoundingBox",e),r=t?z("LowerCorner",t).split(" "):["-180","-90"],i=t?z("UpperCorner",t).split(" "):["180","90"];return{xmin:parseFloat(r[0]),ymin:parseFloat(r[1]),xmax:parseFloat(i[0]),ymax:parseFloat(i[1]),spatialReference:{wkid:4326}}}function re(e){const t=[];return(0,K.h)(e,{BoundingBox:e=>{if(!e.getAttribute("crs"))return;const r=e.getAttribute("crs").toLowerCase(),i=le(r),s=r.includes("epsg")&&(0,B.A)(i.wkid);let l,a,o,n;(0,K.h)(e,{LowerCorner:e=>{[l,a]=e.textContent.split(" ").map((e=>Number.parseFloat(e))),s&&([l,a]=[a,l])},UpperCorner:e=>{[o,n]=e.textContent.split(" ").map((e=>Number.parseFloat(e))),s&&([o,n]=[n,o])}}),t.push({xmin:l,ymin:a,xmax:o,ymax:n,spatialReference:i})}}),t}function ie(e,t){return Y("Style",e).map((e=>{const r=J("LegendURL",e),i=J("Keywords",e),s=i&&G("Keyword",i);let l=r&&r.getAttribute("xlink:href");return t&&(l=l&&l.replace(/^http:/i,"https:")),{abstract:z("Abstract",e),id:z("Identifier",e),isDefault:"true"===e.getAttribute("isDefault"),keywords:s,legendUrl:l,title:z("Title",e)}}))}function se(e,t,r){return Y("TileMatrixSetLink",t).map((t=>function(e,t,r){const i=J("TileMatrixSet",t).textContent,s=G("TileMatrix",t),l=r.find((e=>{const t=J("Identifier",e),r=t&&t.textContent;return!!(r===i||i.split(":")&&i.split(":")[1]===r)})),a=J("TileMatrixSetLimits",t),o=a&&Y("TileMatrixLimits",a),n=new Map;if(o?.length)for(const e of o){const t=J("TileMatrix",e).textContent,r=+J("MinTileRow",e).textContent,i=+J("MaxTileRow",e).textContent,s=+J("MinTileCol",e).textContent,l=+J("MaxTileCol",e).textContent;n.set(t,{minCol:s,maxCol:l,minRow:r,maxRow:i})}const u=z("SupportedCRS",l).toLowerCase(),c=function(e,t){return ae(J("TileMatrix",e),t)}(l,u),p=c.spatialReference,d=J("TileMatrix",l),h=[parseInt(z("TileWidth",d),10),parseInt(z("TileHeight",d),10)],m=[];s.length?s.forEach(((e,t)=>{const r=Q("TileMatrix","Identifier",e,l);m.push(ue(r,u,t,i,n))})):Y("TileMatrix",l).forEach(((e,t)=>{m.push(ue(e,u,t,i,n))}));const y=function(e,t,r,i,s){const l=J("BoundingBox",t);let a,o,n,u,c,p;if(l&&(a=z("LowerCorner",l).split(" "),o=z("UpperCorner",l).split(" ")),a&&a.length>1&&o&&o.length>1)n=parseFloat(a[0]),c=parseFloat(a[1]),u=parseFloat(o[0]),p=parseFloat(o[1]);else{const e=J("TileMatrix",t),l=parseInt(z("MatrixWidth",e),10),a=parseInt(z("MatrixHeight",e),10);n=r.x,p=r.y,u=n+l*i[0]*s.resolution,c=p-a*i[1]*s.resolution}return function(e,t){return"1.0.0"===e&&(0,B.A)(t.wkid)}(e,r.spatialReference)?new w.Z(c,n,p,u,r.spatialReference):new w.Z(n,c,u,p,r.spatialReference)}(e,l,c,h,m[0]).toJSON(),f=new _.Z({dpi:96,spatialReference:p,size:h,origin:c,lods:m}).toJSON();return{id:i,fullExtent:y,tileInfo:f}}(e,t,r)))}function le(e){e=e.toLowerCase();let t=parseInt(e.split(":").pop(),10);900913!==t&&3857!==t||(t=102100);const r=function(e){return e.includes("crs84")||e.includes("crs:84")?oe.CRS84:e.includes("crs83")||e.includes("crs:83")?oe.CRS83:e.includes("crs27")||e.includes("crs:27")?oe.CRS27:null}(e);return(0,Z.pC)(r)&&(t=r),{wkid:t}}function ae(e,t){const r=le(t),[i,s]=z("TopLeftCorner",e).split(" ").map((e=>parseFloat(e))),l=t.includes("epsg")&&(0,B.A)(r.wkid);return new k.Z(l?{x:s,y:i,spatialReference:r}:{x:i,y:s,spatialReference:r})}var oe,ne;function ue(e,t,r,i,s){const l=le(t),a=z("Identifier",e);let o=parseFloat(z("ScaleDenominator",e));const n=ce(l.wkid,o,i);o*=96/H;const u=+z("MatrixWidth",e),c=+z("MatrixHeight",e),{maxCol:p=u-1,maxRow:d=c-1,minCol:h=0,minRow:m=0}=s.get(a)??{},{x:y,y:f}=ae(e,t);return{cols:[h,p],level:r,levelValue:a,origin:[y,f],scale:o,resolution:n,rows:[m,d]}}function ce(e,t,r){let i;return i=W.Z.hasOwnProperty(""+e)?W.Z.values[W.Z[e]]:"default028mm"===r?6370997*Math.PI/180:(0,D.e8)(e).metersPerDegree,7*t/25e3/i}(ne=oe||(oe={}))[ne.CRS84=4326]="CRS84",ne[ne.CRS83=4269]="CRS83",ne[ne.CRS27=4267]="CRS27";const pe={"image/png":".png","image/png8":".png","image/png24":".png","image/png32":".png","image/jpg":".jpg","image/jpeg":".jpeg","image/gif":".gif","image/bmp":".bmp","image/tiff":".tif","image/jpgpng":"","image/jpegpng":"","image/unknown":""},de=new Set(["version","service","request","layer","style","format","tilematrixset","tilematrix","tilerow","tilecol"]);let he=class extends((0,S.h)((0,C.Q)((0,I.M)((0,b.q)((0,M.I)((0,u.R)(x.Z))))))){constructor(...e){super(...e),this._sublayersHandles=new o.Z,this.copyright="",this.customParameters=null,this.customLayerParameters=null,this.fullExtent=null,this.operationalLayerType="WebTiledLayer",this.resourceInfo=null,this.serviceMode="RESTful",this.sublayers=null,this.type="wmts",this.version="1.0.0",this.addHandles([(0,d.YP)((()=>this.activeLayer),((e,t)=>{t&&(t.layer=null),e&&(e.layer=this)}),d.Z_),(0,d.YP)((()=>this.sublayers),((e,t)=>{t&&(t.forEach((e=>{e.layer=null})),this._sublayersHandles.removeAll(),this._sublayersHandles=null),e&&(e.forEach((e=>{e.layer=this})),this._sublayersHandles||(this._sublayersHandles=new o.Z),this._sublayersHandles.add([e.on("after-add",(({item:e})=>{e.layer=this})),e.on("after-remove",(({item:e})=>{e.layer=null}))]))}),d.Z_)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){if("KVP"===this.serviceMode||"RESTful"===this.serviceMode)return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMTS"]},e).catch(p.r9).then((()=>this._fetchService(e))).catch((e=>{throw(0,p.r9)(e),new a.Z("wmtslayer:unsupported-service-data","Invalid response from the WMTS service.",{error:e})}))),Promise.resolve(this);console.error("WMTS mode could only be 'KVP' or 'RESTful'")}get activeLayer(){return this._get("activeLayer")}set activeLayer(e){this._set("activeLayer",e)}readActiveLayerFromService(e,t,r){this.activeLayer||(this.activeLayer=new N);let i=t.layers.find((e=>e.id===this.activeLayer.id));return i||(i=t.layers[0]),this.activeLayer.read(i,r),this.activeLayer}readActiveLayerFromItemOrWebDoc(e,t){const{templateUrl:r,wmtsInfo:i}=t,s=r?this._getLowerCasedUrlParams(r):null,l=i?.layerIdentifier;let a=null;const o=i?.tileMatrixSet;o&&(Array.isArray(o)?o.length&&(a=o[0]):a=o);const n=s?.format,u=s?.style;return new N({id:l,imageFormat:n,styleId:u,tileMatrixSetId:a})}writeActiveLayer(e,t,r,i){const s=this.activeLayer;t.templateUrl=this.getUrlTemplate(s.id,s.tileMatrixSetId,s.imageFormat,s.styleId);const l=(0,c.hS)("tileMatrixSet.tileInfo",s);t.tileInfo=l?l.toJSON(i):null,t.wmtsInfo={...t.wmtsInfo,layerIdentifier:s.id,tileMatrixSet:s.tileMatrixSetId}}readCustomParameters(e,t){const r=t.wmtsInfo;return r?this._mergeParams(r.customParameters,r.url):null}get fullExtents(){return this.activeLayer.fullExtents}readServiceMode(e,t){return t.templateUrl.includes("?")?"KVP":"RESTful"}readSublayersFromService(e,t,r){return function(e,t){return e.map((e=>{const r=new N;return r.read(e,t),r}))}(t.layers,r)}get supportedSpatialReferences(){return this.activeLayer.tileMatrixSets.map((e=>e.tileInfo.spatialReference)).toArray()}get tilemapCache(){const e=this.activeLayer?.tileMatrixSet?.tileInfo;return new L(e)}get title(){return this.activeLayer?.title??"Layer"}set title(e){e?this._override("title",e):this._clearOverride("title")}get url(){return this._get("url")}set url(e){e&&"/"===e.substr(-1)?this._set("url",e.slice(0,-1)):this._set("url",e)}createWebTileLayer(e){const t=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId),r=this._getTileMatrixSetById(e.tileMatrixSetId).tileInfo,i=e.fullExtent,s=new E.B({layerIdentifier:e.id,tileMatrixSet:e.tileMatrixSetId,url:this.url});return this.customLayerParameters&&(s.customLayerParameters=this.customLayerParameters),this.customParameters&&(s.customParameters=this.customParameters),new v.default({fullExtent:i,urlTemplate:t,tileInfo:r,wmtsInfo:s})}fetchTile(e,t,r){const i=this.getTileUrl(e,t,r);return(0,s.default)(i,{responseType:"image"}).then((e=>e.data))}findSublayerById(e){return this.sublayers.find((t=>t.id===e))}getTileUrl(e,t,r){const i=this._getTileMatrixSetById(this.activeLayer.tileMatrixSetId).tileInfo.lods[e],s=i?i.levelValue?i.levelValue:`${i.level}`:`${e}`;let l=this.resourceInfo?"":function(e,t,r,i,s,l,a,o){const n=function(e,t,r){const i=ee(e,t),s=i.filter((e=>e.format===r));return s.length?s:i}(e,t,i);if(!(n?.length>0))return"";const{dimensionMap:u}=e,c=u.get(t).dimensions?.[0],p=u.get(t).dimensions2?.[0];return n[a%n.length].template.replace(/\{Style\}/gi,s).replace(/\{TileMatrixSet\}/gi,r).replace(/\{TileMatrix\}/gi,l).replace(/\{TileRow\}/gi,""+a).replace(/\{TileCol\}/gi,""+o).replace(/\{dimensionValue\}/gi,c).replace(/\{dimensionValue2\}/gi,p)}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId,s,t,r);return l||(l=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId).replace(/\{level\}/gi,s).replace(/\{row\}/gi,`${t}`).replace(/\{col\}/gi,`${r}`)),l=this._appendCustomLayerParameters(l),l}getUrlTemplate(e,t,r,i){if(!this.resourceInfo){const r=function(e,t,r,i){const{dimensionMap:s}=e,l=ee(e,t);let a="";if(l&&l.length>0){const e=s.get(t).dimensions&&s.get(t).dimensions[0],o=s.get(t).dimensions2&&s.get(t).dimensions2[0];a=l[0].template,a.indexOf(".xxx")===a.length-4&&(a=a.slice(0,a.length-4)),a=a.replace(/\{Style\}/gi,i),a=a.replace(/\{TileMatrixSet\}/gi,r),a=a.replace(/\{TileMatrix\}/gi,"{level}"),a=a.replace(/\{TileRow\}/gi,"{row}"),a=a.replace(/\{TileCol\}/gi,"{col}"),a=a.replace(/\{dimensionValue\}/gi,e),a=a.replace(/\{dimensionValue2\}/gi,o)}return a}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},e,t,i);if(r)return r}if("KVP"===this.serviceMode)return this.url+"?SERVICE=WMTS&VERSION="+this.version+"&REQUEST=GetTile&LAYER="+e+"&STYLE="+i+"&FORMAT="+r+"&TILEMATRIXSET="+t+"&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}";if("RESTful"===this.serviceMode){let s="";return pe[r.toLowerCase()]&&(s=pe[r.toLowerCase()]),this.url+e+"/"+i+"/"+t+"/{level}/{row}/{col}"+s}return""}async _fetchService(e){let t;if(this.resourceInfo)"KVP"===this.resourceInfo.serviceMode&&(this.url+=this.url.includes("?")?"":"?"),t={ssl:!1,data:this.resourceInfo};else try{t=await this._getCapabilities(this.serviceMode,e),$(t.data)}catch{const r="KVP"===this.serviceMode?"RESTful":"KVP";try{t=await this._getCapabilities(r,e),$(t.data),this.serviceMode=r}catch(e){throw new a.Z("wmtslayer:unsupported-service-data","Services does not support RESTful or KVP service modes.",{error:e})}}this.resourceInfo?t.data=function(e){return e.layers.forEach((e=>{e.tileMatrixSets.forEach((e=>{const t=e.tileInfo;96!==t.dpi&&(t.lods.forEach((r=>{r.scale=96*r.scale/t.dpi,r.resolution=ce(t.spatialReference.wkid,r.scale*H/96,e.id)})),t.dpi=96)}))})),e}(t.data):t.data=function(e,t){e=e.replace(/ows:/gi,"");const r=(new DOMParser).parseFromString(e,"text/xml").documentElement,i=new Map,s=new Map,l=J("Contents",r);if(!l)throw new a.Z("wmtslayer:wmts-capabilities-xml-is-not-valid");const o=J("OperationsMetadata",r)?.querySelector("[name='GetTile']"),n=o?.getElementsByTagName("Get"),u=n&&Array.prototype.slice.call(n),c=t?.url?.indexOf("https")>-1;let p,d,h=t.serviceMode,m=t&&t.url;if(u&&u.length&&u.some((e=>{const t=J("Constraint",e);return!t||Q("AllowedValues","Value",h,t)?(m=e.attributes[0].nodeValue,!0):(!t||Q("AllowedValues","Value","RESTful",t)||Q("AllowedValues","Value","REST",t)?d=e.attributes[0].nodeValue:t&&!Q("AllowedValues","Value","KVP",t)||(p=e.attributes[0].nodeValue),!1)})),!m)if(d)m=d,h="RESTful";else if(p)m=p,h="KVP";else{const e=J("ServiceMetadataURL",r);m=e&&e.getAttribute("xlink:href")}const y=m.indexOf("1.0.0/");-1===y&&"RESTful"===h?m+="/":y>-1&&(m=m.substring(0,y)),"KVP"===h&&(m+=y>-1?"":"?"),c&&(m=m.replace(/^http:/i,"https:"));const f=z("ServiceIdentification>ServiceTypeVersion",r),g=z("ServiceIdentification>AccessConstraints",r),w=/^none$/i.test(g)?null:g,x=Y("Layer",l),v=Y("TileMatrixSet",l),S=x.map((e=>{const t=z("Identifier",e);return i.set(t,e),X(t,e,v,c,f)}));return{copyright:w,dimensionMap:s,layerMap:i,layers:S,serviceMode:h,tileUrl:m}}(t.data,{serviceMode:this.serviceMode,url:this.url}),t.data&&this.read(t.data,{origin:"service"})}async _getCapabilities(e,t){const r=this._getCapabilitiesUrl(e);return await(0,s.default)(r,{...t,responseType:"text"})}_getTileMatrixSetById(e){return this.findSublayerById(this.activeLayer.id).tileMatrixSets.find((t=>t.id===e))}_appendCustomParameters(e){return this._appendParameters(e,this.customParameters)}_appendCustomLayerParameters(e){return this._appendParameters(e,{...(0,n.d9)(this.customParameters),...this.customLayerParameters})}_appendParameters(e,t){const r=(0,h.mN)(e),i={...r.query,...t},s=(0,h.B7)(i);return""===s?r.path:`${r.path}?${s}`}_getCapabilitiesUrl(e){this.url=this.url.split("?")[0];const t="KVP"===e?`${this.url}?request=GetCapabilities&service=WMTS&version=${this.version}`:`${this.url}/${this.version}/WMTSCapabilities.xml`;return this._appendCustomParameters(t)}_getLowerCasedUrlParams(e){if(!e)return null;const t=(0,h.mN)(e).query;if(!t)return null;const r={};return Object.keys(t).forEach((e=>{r[e.toLowerCase()]=t[e]})),r}_mergeParams(e,t){const r=this._getLowerCasedUrlParams(t);if(r){const t=Object.keys(r);t.length&&(e=e?(0,n.d9)(e):{},t.forEach((t=>{e.hasOwnProperty(t)||de.has(t)||(e[t]=r[t])})))}return e}};(0,i._)([(0,m.Cb)()],he.prototype,"dimensionMap",void 0),(0,i._)([(0,m.Cb)()],he.prototype,"layerMap",void 0),(0,i._)([(0,m.Cb)({type:N,json:{origins:{"web-document":{write:{ignoreOrigin:!0}}}}})],he.prototype,"activeLayer",null),(0,i._)([(0,y.r)("service","activeLayer",["layers"])],he.prototype,"readActiveLayerFromService",null),(0,i._)([(0,y.r)(["web-document","portal-item"],"activeLayer",["wmtsInfo"])],he.prototype,"readActiveLayerFromItemOrWebDoc",null),(0,i._)([(0,g.c)(["web-document","portal-item"],"activeLayer",{templateUrl:{type:String},tileInfo:{type:_.Z},"wmtsInfo.layerIdentifier":{type:String},"wmtsInfo.tileMatrixSet":{type:String}})],he.prototype,"writeActiveLayer",null),(0,i._)([(0,m.Cb)({type:String,value:"",json:{write:!0}})],he.prototype,"copyright",void 0),(0,i._)([(0,m.Cb)({type:["show","hide"]})],he.prototype,"listMode",void 0),(0,i._)([(0,m.Cb)({json:{read:!0,write:!0}})],he.prototype,"blendMode",void 0),(0,i._)([(0,m.Cb)({json:{origins:{"web-document":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}},"portal-item":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}}}}})],he.prototype,"customParameters",void 0),(0,i._)([(0,y.r)(["portal-item","web-document"],"customParameters")],he.prototype,"readCustomParameters",null),(0,i._)([(0,m.Cb)({json:{origins:{"web-document":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}},"portal-item":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}}}}})],he.prototype,"customLayerParameters",void 0),(0,i._)([(0,m.Cb)({type:w.Z,json:{write:{ignoreOrigin:!0},origins:{"web-document":{read:{source:"fullExtent"}},"portal-item":{read:{source:"fullExtent"}}}}})],he.prototype,"fullExtent",void 0),(0,i._)([(0,m.Cb)({readOnly:!0})],he.prototype,"fullExtents",null),(0,i._)([(0,m.Cb)({type:["WebTiledLayer"]})],he.prototype,"operationalLayerType",void 0),(0,i._)([(0,m.Cb)()],he.prototype,"resourceInfo",void 0),(0,i._)([(0,m.Cb)()],he.prototype,"serviceMode",void 0),(0,i._)([(0,y.r)(["portal-item","web-document"],"serviceMode",["templateUrl"])],he.prototype,"readServiceMode",null),(0,i._)([(0,m.Cb)({type:l.Z.ofType(N)})],he.prototype,"sublayers",void 0),(0,i._)([(0,y.r)("service","sublayers",["layers"])],he.prototype,"readSublayersFromService",null),(0,i._)([(0,m.Cb)({readOnly:!0})],he.prototype,"supportedSpatialReferences",null),(0,i._)([(0,m.Cb)({readOnly:!0})],he.prototype,"tilemapCache",null),(0,i._)([(0,m.Cb)({json:{read:{source:"title"}}})],he.prototype,"title",null),(0,i._)([(0,m.Cb)({json:{read:!1},readOnly:!0,value:"wmts"})],he.prototype,"type",void 0),(0,i._)([(0,m.Cb)({json:{origins:{service:{read:{source:"tileUrl"}},"web-document":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}},"portal-item":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}}}}})],he.prototype,"url",null),(0,i._)([(0,m.Cb)()],he.prototype,"version",void 0),he=(0,i._)([(0,f.j)("esri.layers.WMTSLayer")],he);const me=he},52162:(e,t,r)=>{r.d(t,{A:()=>s});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function s(e){return i.some((([t,r])=>e>=t&&e<=r))}},88724:(e,t,r)=>{function i(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];if("function"==typeof e){const t=e(r);t&&i(r,t)}else i(r,e)}}function*s(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];"function"==typeof e?yield e(r):yield*s(r,e)}}r.d(t,{H:()=>s,h:()=>i})}}]);
|