@arcgis/core 5.0.0-next.42 → 5.0.0-next.44
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/applications/Components/imageryUtils.js +1 -1
- package/arcade/featureset/sources/FeatureLayerOGC.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{f97a7cb367634353177d.js → 001a7a4cf6fe74432ed6.js} +1 -1
- package/assets/esri/core/workers/chunks/00ff4ca88c9d291d82c3.js +1 -0
- package/assets/esri/core/workers/chunks/04a0685ee53ef74883aa.js +1 -0
- package/assets/esri/core/workers/chunks/{c320a29df40e85fb4a8e.js → 15a0750c10b510564a42.js} +1 -1
- package/assets/esri/core/workers/chunks/{9d95f38da21f97214f83.js → 1e0e7cef7ef947894bbe.js} +10 -10
- package/assets/esri/core/workers/chunks/20ad34f9d45c64392022.js +1 -0
- package/assets/esri/core/workers/chunks/23396a6318edf9264c1f.js +1 -0
- package/assets/esri/core/workers/chunks/{816227de5bd42b437df4.js → 233f9eb617f3d72995b5.js} +1 -1
- package/assets/esri/core/workers/chunks/{fb9643b74cf35221ff98.js → 249504f7d356be80d214.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad891ac388fa6c1c9b94.js → 2b34a010f76e5f289868.js} +1 -1
- package/assets/esri/core/workers/chunks/2ef4c0092c59a98a5532.js +1 -0
- package/assets/esri/core/workers/chunks/35272810c2ed04eb403d.js +1 -0
- package/assets/esri/core/workers/chunks/{4f4d51181ae7db9fbe6d.js → 4404b6f931f681cca342.js} +1 -1
- package/assets/esri/core/workers/chunks/555a0ea44ba77819d493.js +1 -0
- package/assets/esri/core/workers/chunks/6e8925412fb90f88d688.js +1 -0
- package/assets/esri/core/workers/chunks/{d1f4152b2b8d47cbf586.js → 72fbee59d5d909615408.js} +1 -1
- package/assets/esri/core/workers/chunks/75c66e38bdc1c786c599.js +1 -0
- package/assets/esri/core/workers/chunks/7d3c2a063598bdd015e2.js +1 -0
- package/assets/esri/core/workers/chunks/83da9ee6544ee9d3c124.js +1 -0
- package/assets/esri/core/workers/chunks/897ce6fc9cefb1e14a64.js +1 -0
- package/assets/esri/core/workers/chunks/{da517b4b07d4d27ce94c.js → 8e26831f71634288f834.js} +1 -1
- package/assets/esri/core/workers/chunks/{c367c7e553be3682f2db.js → 93c5f097bb7b380bb175.js} +1 -1
- package/assets/esri/core/workers/chunks/992e9bbdf9d3787ddb0e.js +1 -0
- package/assets/esri/core/workers/chunks/9c7682b300b877f60095.js +1 -0
- package/assets/esri/core/workers/chunks/a2442549c5daf3653eb4.js +1 -0
- package/assets/esri/core/workers/chunks/a7cd795042ebb8585906.js +1 -0
- package/assets/esri/core/workers/chunks/{f3b3b193959db809c8c6.js → ab520fd1ae917daf07d8.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c9865e34f32fb5683e5.js → af8d6e6949930d0e6c7b.js} +1 -1
- package/assets/esri/core/workers/chunks/c9942ca57f542582ab4d.js +1 -0
- package/assets/esri/core/workers/chunks/ca1c65eb7f5900c60170.js +1 -0
- package/assets/esri/core/workers/chunks/cddce67919e13e2f365e.js +1 -0
- package/assets/esri/core/workers/chunks/da2ba40bc017bff0fe49.js +1 -0
- package/assets/esri/core/workers/chunks/e5a6a646f27715152714.js +1 -0
- package/assets/esri/core/workers/chunks/e6784251bbb8b71ead93.js +1 -0
- package/assets/esri/core/workers/chunks/e8a9971c8354569cb81d.js +1 -0
- package/assets/esri/core/workers/chunks/{96f798ee286b59396131.js → ea3cba01c60d9bc72719.js} +1 -1
- package/assets/esri/core/workers/chunks/ed550bf27f2bbf8d30fa.js +1 -0
- package/assets/esri/core/workers/chunks/ee186ddbb1eb5144a790.js +1 -0
- package/assets/esri/core/workers/chunks/{1357cc637524cd254974.js → ffcdc7ae03b0570e0db8.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Attribution.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/config.js +1 -1
- package/core/PooledArray.js +1 -1
- package/geometry/FlatGeometry.js +1 -1
- package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/interfaces.d.ts +109 -37
- package/kernel.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/WCSLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/RasterJobHandlerMixin.js +1 -1
- package/layers/ogc/wcsUtils.js +1 -1
- package/layers/raster/datasets/BaseRaster.js +5 -0
- package/layers/raster/datasets/CovJSONRaster.js +5 -0
- package/layers/raster/datasets/FunctionRaster.js +5 -0
- package/layers/raster/datasets/ImageAuxRaster.js +5 -0
- package/layers/raster/datasets/ImageServerRaster.js +5 -0
- package/layers/raster/datasets/InMemoryRaster.js +5 -0
- package/layers/raster/datasets/MRFRaster.js +5 -0
- package/layers/raster/datasets/RawBlockCache.js +5 -0
- package/layers/raster/datasets/TIFFRaster.js +5 -0
- package/layers/raster/datasets/WCSRaster.js +5 -0
- package/layers/raster/datasets/covJSONParser.js +5 -0
- package/layers/raster/datasets/multidimensionalUtils.js +5 -0
- package/layers/raster/datasets/pamParser.js +5 -0
- package/layers/raster/datasets/pixelReader.js +5 -0
- package/layers/raster/datasets/wcsCoverageParser.js +5 -0
- package/layers/raster/formats/Lerc.js +5 -0
- package/layers/raster/formats/Qb3.js +5 -0
- package/layers/raster/formats/RasterCodec.js +5 -0
- package/layers/raster/formats/TiffDecoder.js +5 -0
- package/layers/raster/functions/ArithmeticFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ArithmeticFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/AspectFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/AspectFunctionArguments.js +1 -1
- package/layers/raster/functions/BandArithmeticFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/BandArithmeticFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/BaseFunctionArguments.js +1 -1
- package/layers/raster/functions/BaseRasterFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ClipFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ClipFunctionArguments.js +1 -1
- package/layers/raster/functions/ColormapFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ColormapFunctionArguments.js +1 -1
- package/layers/raster/functions/ColormapToRGBFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ColormapToRGBFunctionArguments.js +1 -1
- package/layers/raster/functions/CompositeBandFunction.js +5 -0
- package/layers/raster/functions/CompositeBandFunctionArguments.js +5 -0
- package/layers/raster/functions/ComputeChangeFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ComputeChangeFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ContrastBrightnessFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ContrastBrightnessFunctionArguments.js +1 -1
- package/layers/raster/functions/ConvolutionFunction.js +5 -0
- package/layers/raster/functions/ConvolutionFunctionArguments.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/CurvatureFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/CurvatureFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ExtractBandFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/ExtractBandFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/GrayscaleFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/GrayscaleFunctionArguments.js +1 -1
- package/layers/raster/functions/HillshadeFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/HillshadeFunctionArguments.js +1 -1
- package/layers/raster/functions/LocalFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/LocalFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/MaskFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/MaskFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/NDVIFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/NDVIFunctionArguments.js +1 -1
- package/layers/raster/functions/RemapFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/RemapFunctionArguments.js +1 -1
- package/layers/raster/functions/ShadedReliefFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/ShadedReliefFunctionArguments.js +1 -1
- package/layers/raster/functions/SlopeFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/SlopeFunctionArguments.js +1 -1
- package/layers/raster/functions/StatisticsFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/StatisticsFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/StatisticsHistogramFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/StatisticsHistogramFunctionArguments.js +1 -1
- package/layers/raster/functions/StretchFunction.js +5 -0
- package/layers/{support/rasterFunctions → raster/functions}/StretchFunctionArguments.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/TableFunction.js +1 -1
- package/layers/{support/rasterFunctions → raster/functions}/TableFunctionArguments.js +1 -1
- package/layers/raster/functions/bandIndexUtils.js +5 -0
- package/layers/raster/functions/changeDetectionUtils.js +5 -0
- package/layers/raster/functions/clipUtils.js +5 -0
- package/layers/raster/functions/conversionUtils.js +5 -0
- package/layers/raster/functions/convolutionUtils.js +5 -0
- package/layers/raster/functions/creators/createDataManagementFunctions.js +5 -0
- package/layers/raster/functions/creators/utils.js +5 -0
- package/layers/raster/functions/focalStatUtils.js +5 -0
- package/layers/raster/functions/localUtils.js +5 -0
- package/layers/raster/functions/pixelTransformUtils.js +5 -0
- package/layers/raster/functions/pixelUtils.js +5 -0
- package/layers/raster/functions/stretchUtils.js +5 -0
- package/layers/raster/functions/surfaceUtils.js +5 -0
- package/layers/raster/functions/vectorFieldUtils.js +5 -0
- package/layers/raster/transforms/BaseRasterTransform.js +5 -0
- package/layers/{support/rasterTransforms → raster/transforms}/GCSShiftTransform.js +1 -1
- package/layers/{support/rasterTransforms → raster/transforms}/IdentityTransform.js +1 -1
- package/layers/{support/rasterTransforms → raster/transforms}/PolynomialTransform.js +1 -1
- package/layers/save/imageryUtils.js +1 -1
- package/layers/support/PixelBlock.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/imageryRendererUtils.js +1 -1
- package/layers/support/rasterFunctionUtils.js +1 -1
- package/package.json +1 -1
- package/renderers/VectorFieldRenderer.js +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/rasterRendererHelper.js +1 -1
- package/rest/locator/addressToLocations.js +1 -1
- package/rest/locator/addressesToLocations.js +1 -1
- package/rest/locator/suggestLocations.js +1 -1
- package/rest/networks/support/Association.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterRangeHighlightShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MaskShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/RemapShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
- package/views/2d/engine/webgl/textureUtils.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
- package/views/3d/glTF/LoaderResult.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/glTF/loader.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.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/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SGraphicsMap.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/support/buffer/glUtil.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +10 -10
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBufferView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgeProcessing.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DrawParameters.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.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/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/Instance.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerOriginData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +9 -9
- package/views/DOMContainer.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/layers/ImageryLayerViewMixin.js +1 -1
- package/views/layers/ImageryTileLayerViewMixin.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/views/webgl/Util.js +1 -1
- package/views/webgl/VertexElementDescriptor.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/BuildingExplorer/BuildingExplorerViewModel.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/DirectLineMeasurement3D.js +1 -1
- package/widgets/DistanceMeasurement2D.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/support/GroupColumnTemplate.js +1 -1
- package/widgets/FeatureTable/support/TableTemplate.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend.js +1 -1
- package/widgets/LineOfSight.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
- package/widgets/PanoramicViewer/support/importUtils.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleBar.js +1 -1
- package/widgets/ScaleRangeSlider.js +1 -1
- package/widgets/Search/SearchResultRenderer.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/types.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/ShadowCast.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0a5427127634738aa239.js +0 -1
- package/assets/esri/core/workers/chunks/110429583b28c28c36ee.js +0 -1
- package/assets/esri/core/workers/chunks/145c6a7cdcc9893efb27.js +0 -1
- package/assets/esri/core/workers/chunks/1bacdd17e199e22b5cd1.js +0 -1
- package/assets/esri/core/workers/chunks/1d566539ff6fb6ac798c.js +0 -1
- package/assets/esri/core/workers/chunks/1f6ead46b723630db897.js +0 -1
- package/assets/esri/core/workers/chunks/3a16347e17312556e02c.js +0 -1
- package/assets/esri/core/workers/chunks/478def691ae6763686f3.js +0 -1
- package/assets/esri/core/workers/chunks/4c4a55be41ba105c091c.js +0 -1
- package/assets/esri/core/workers/chunks/4cbf5a97b2b3c6553f6f.js +0 -1
- package/assets/esri/core/workers/chunks/5dc0d853c21ccb6054c7.js +0 -1
- package/assets/esri/core/workers/chunks/613cbac9cb925cd20b48.js +0 -1
- package/assets/esri/core/workers/chunks/646f58b69d2354f1ef27.js +0 -1
- package/assets/esri/core/workers/chunks/800c91302eaad7f00877.js +0 -1
- package/assets/esri/core/workers/chunks/93d11075f65a5b6625ea.js +0 -1
- package/assets/esri/core/workers/chunks/9f2a8445a5848502c7e7.js +0 -1
- package/assets/esri/core/workers/chunks/a1b08aab73747f4e7e25.js +0 -1
- package/assets/esri/core/workers/chunks/ba59568e748f0ba53b78.js +0 -1
- package/assets/esri/core/workers/chunks/c4de24582c29fda5a033.js +0 -1
- package/assets/esri/core/workers/chunks/d786b17cc9062b1450ac.js +0 -1
- package/assets/esri/core/workers/chunks/d9958654c6438f28237b.js +0 -1
- package/assets/esri/core/workers/chunks/e6fa6f9c278589c8a713.js +0 -1
- package/assets/esri/core/workers/chunks/e7f4d135ef9665de1468.js +0 -1
- package/assets/esri/core/workers/chunks/f21cb5b34d4d1e3af1a9.js +0 -1
- package/assets/esri/core/workers/chunks/f93f0586ce10cb5d98b3.js +0 -1
- package/layers/support/rasterDatasets/BaseRaster.js +0 -5
- package/layers/support/rasterDatasets/CovJSONRaster.js +0 -5
- package/layers/support/rasterDatasets/FunctionRaster.js +0 -5
- package/layers/support/rasterDatasets/ImageAuxRaster.js +0 -5
- package/layers/support/rasterDatasets/ImageServerRaster.js +0 -5
- package/layers/support/rasterDatasets/InMemoryRaster.js +0 -5
- package/layers/support/rasterDatasets/MRFRaster.js +0 -5
- package/layers/support/rasterDatasets/RawBlockCache.js +0 -5
- package/layers/support/rasterDatasets/TIFFRaster.js +0 -5
- package/layers/support/rasterDatasets/WCSRaster.js +0 -5
- package/layers/support/rasterDatasets/covJSONParser.js +0 -5
- package/layers/support/rasterDatasets/multidimensionalUtils.js +0 -5
- package/layers/support/rasterDatasets/pamParser.js +0 -5
- package/layers/support/rasterDatasets/pixelReader.js +0 -5
- package/layers/support/rasterDatasets/wcsCoverageParser.js +0 -5
- package/layers/support/rasterFormats/Lerc.js +0 -5
- package/layers/support/rasterFormats/Qb3.js +0 -5
- package/layers/support/rasterFormats/RasterCodec.js +0 -5
- package/layers/support/rasterFormats/TiffDecoder.js +0 -5
- package/layers/support/rasterFunctions/ArithmeticFunction.js +0 -5
- package/layers/support/rasterFunctions/BandArithmeticFunction.js +0 -5
- package/layers/support/rasterFunctions/BaseRasterFunction.js +0 -5
- package/layers/support/rasterFunctions/ColormapFunction.js +0 -5
- package/layers/support/rasterFunctions/ColormapToRGBFunction.js +0 -5
- package/layers/support/rasterFunctions/CompositeBandFunction.js +0 -5
- package/layers/support/rasterFunctions/CompositeBandFunctionArguments.js +0 -5
- package/layers/support/rasterFunctions/ComputeChangeFunction.js +0 -5
- package/layers/support/rasterFunctions/ConvolutionFunction.js +0 -5
- package/layers/support/rasterFunctions/ConvolutionFunctionArguments.js +0 -5
- package/layers/support/rasterFunctions/HillshadeFunction.js +0 -5
- package/layers/support/rasterFunctions/LocalFunction.js +0 -5
- package/layers/support/rasterFunctions/RemapFunction.js +0 -5
- package/layers/support/rasterFunctions/ShadedReliefFunction.js +0 -5
- package/layers/support/rasterFunctions/SlopeFunction.js +0 -5
- package/layers/support/rasterFunctions/StatisticsFunction.js +0 -5
- package/layers/support/rasterFunctions/StretchFunction.js +0 -5
- package/layers/support/rasterFunctions/bandIndexUtils.js +0 -5
- package/layers/support/rasterFunctions/changeDetectionUtils.js +0 -5
- package/layers/support/rasterFunctions/clipUtils.js +0 -5
- package/layers/support/rasterFunctions/conversionUtils.js +0 -5
- package/layers/support/rasterFunctions/convolutionUtils.js +0 -5
- package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +0 -5
- package/layers/support/rasterFunctions/creators/utils.js +0 -5
- package/layers/support/rasterFunctions/focalStatUtils.js +0 -5
- package/layers/support/rasterFunctions/localUtils.js +0 -5
- package/layers/support/rasterFunctions/pixelTransformUtils.js +0 -5
- package/layers/support/rasterFunctions/pixelUtils.js +0 -5
- package/layers/support/rasterFunctions/stretchUtils.js +0 -5
- package/layers/support/rasterFunctions/surfaceUtils.js +0 -5
- package/layers/support/rasterFunctions/vectorFieldUtils.js +0 -5
- package/layers/support/rasterTransforms/BaseRasterTransform.js +0 -5
- /package/assets/esri/layers/{support/rasterFormats → raster/formats}/lerc-wasm.wasm +0 -0
- /package/assets/esri/layers/{support/rasterFormats → raster/formats}/qb3-wasm.wasm +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/DBFParser.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/EphemeralBlockCache.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/RasterFactory.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/byteStreamUtils.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/datasetUtils.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/multipartParser.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/wcsCapabilitiesParser.js +0 -0
- /package/layers/{support/rasterDatasets → raster/datasets}/xmlUtilities.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/ImageCanvasDecoder.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/JpgPlus.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/Lzw.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/Raw.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/pixelRangeUtils.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/tiffTag.js +0 -0
- /package/layers/{support/rasterFormats → raster/formats}/utils.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/colormaps.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createAppearenceFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createBandIndexFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createChangeFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createConversionFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createLocalFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createMultiRasterAnalysisFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createStatisticsFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/creators/createSurfaceFunctions.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/customBandIndexUtils.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/mirror.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/rasterFunctionHelper.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/rasterFunctionSchema.js +0 -0
- /package/layers/{support/rasterFunctions → raster/functions}/rasterProjectionHelper.js +0 -0
- /package/layers/{support/rasterTransforms → raster/transforms}/utils.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5694],{159:(e,t,n)=>{n.d(t,{A:()=>l});var i,s=n(31635),r=n(69622),o=n(91429),a=n(99157);let l=i=class extends r.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}};(0,s.Cg)([(0,o.MZ)({type:[a.A],nonNullable:!0})],l.prototype,"steps",void 0),l=i=(0,s.Cg)([(0,o.$K)("esri.geometry.operators.support.GeographicTransformation")],l)},9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>s});var i=n(37539);function s(e,t,n,s,r,o,a=Math.floor(e.length/3)){const l=(0,i.jd)(t,r);if(null==l)return!1;if(l===i.pO){if(e===s&&n===o)return!0;const t=n+3*a;for(let i=n,r=o;i<t;i++,r++)s[r]=e[i]??0;return!0}const u=n+3*a;for(let t=n,i=o;t<u;t+=3,i+=3)l(e,t,s,i);return!0}},20521:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Se});var i=n(31635),s=n(37838),r=n(69540),o=n(49186),a=n(25728),l=n(74887),u=n(36708),c=n(91429),p=n(89808),d=n(99959);const f=Symbol("isWCSGraphicOrigin");var m;class h extends d.A{get[(m=f,p.Q)](){return this.layer}constructor(e){super(),this[m]=!0,this.type="wcs",this.layer=e}get id(){return this.layer.id}}var g=n(4146),v=n(63074),y=n(69208),w=n(89015),x=n(16131),b=n(8303),C=n(63660),I=n(54310),S=n(25036),A=n(82935),M=n(53966),R=n(5443),D=n(38458),T=n(11254),P=n(330);function L(e){return e.endsWith("?")?e.slice(0,-1):e}function O(e){return e.filter(({coverageSubType:e})=>null==e||""===e||/^rectified(grid|dataset)/i.test(e))}function N(e){const t={};for(let n=0;n<e.childNodes.length;n++){const i=e.childNodes[n];if(1!==i.nodeType)continue;const s=(0,P.vv)(i).toLowerCase();switch(s){case"title":case"abstract":t[s]=(0,P.mX)(i);break;case"identifier":t.id=(0,P.mX)(i);break;case"wgs84boundingbox":{const e=(0,P.pN)(i,"LowerCorner"),n=(0,P.pN)(i,"UpperCorner");t.lonLatEnvelope=new R.A({xmin:e[0],ymin:e[1],xmax:n[0],ymax:n[1],spatialReference:{wkid:4326}})}break;case"coveragesummary":t.coverageSummaries=t.coverageSummaries||[],t.coverageSummaries.push(N(i))}}return t}function V(e,t){if(e.coverageSummaries)for(let n=0;n<e.coverageSummaries.length;n++)e.coverageSummaries[n].abstract=e.coverageSummaries[n].abstract||e.abstract,e.coverageSummaries[n].lonLatEnvelope=e.coverageSummaries[n].lonLatEnvelope||e.lonLatEnvelope,e.coverageSummaries[n].title=e.coverageSummaries[n].title||e.title,V(e.coverageSummaries[n],t);null!=e.id&&t.push(e)}function $(e){const t=(0,P.V6)(e.querySelector("Operation[name=GetCapabilities]"),"Get")?.getAttribute("xlink:href")||"",n=(0,P.V6)(e.querySelector("Operation[name=DescribeCoverage]"),"Get")?.getAttribute("xlink:href")||"",i=(0,P.V6)(e.querySelector("Operation[name=GetCoverage]"),"Get")?.getAttribute("xlink:href")||"";return{getCapabilities:L(t),describeCoverage:L(n),getCoverage:L(i)}}function E(e,t=null){let n=null;n="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e;let i=n.documentElement.getAttribute("version");"1.0"===i?i="1.0.0":"1.1"===i&&(i="1.1.0");const s=i||t||"1.0.0",r=s.slice(0,3);let a;if("2.0"===r)a=function(e){const t=(0,P.V6)(e,"ServiceIdentification"),n=(0,P.mX)(t,"Title"),i=(0,P.Dy)(t,"ServiceTypeVersion"),s=(0,P.Dy)(t,"Profile"),r=$((0,P.V6)(e,"OperationsMetadata")),o=(0,P.IC)(e,"Contents/CoverageSummary"),a=[];for(let e=0;e<o.length;e++){const t=o[e],n=(0,P.mX)(t,"CoverageId"),i=(0,P.V6)(t,"WGS84BoundingBox");let s;if(i){const e=(0,P.pN)(i,"LowerCorner"),t=(0,P.pN)(i,"UpperCorner");s=new R.A({xmin:e[0],ymin:e[1],xmax:t[0],ymax:t[1],spatialReference:{wkid:4326}})}const r=(0,P.mX)(t,"CoverageSubtype")||"RectifiedGridCoverage";a.push({id:n,lonLatEnvelope:s,coverageSubType:r})}const l=(0,P.V6)(e,"ServiceMetadata");return{name:n,supportedVersions:i,supportedFormats:(0,P.Dy)(l,"formatSupported"),supportedInterpolations:(0,P.Dy)(l,"interpolationSupported").concat((0,P.Dy)(l,"InterpolationSupported")),onlineResources:r,profiles:s,coverages:a,gridCoverages:O(a),version:"2.0.1"}}(n);else if("1.1"===r)a=function(e){const t=(0,P.mX)(e,"ServiceIdentification/Title"),n=(0,P.Dy)(e,"ServiceIdentification/ServiceTypeVersion"),i=$((0,P.V6)(e,"OperationsMetadata")),s=[],r=(0,P.V6)(e,"Contents");for(let e=0;e<r.childNodes.length;e++){const t=r.childNodes[e];1===t.nodeType&&(0,P.g7)(t,"CoverageSummary")&&V(N(t),s)}const o=(0,P.Dy)(r,"SupportedFormat");return{name:t,onlineResources:i,coverages:s,gridCoverages:O(s),supportedVersions:n,supportedFormats:o,version:"1.1.0"}}(n);else{if("1.0"!==r)throw new o.A("wcsraster:parsecapabilities","the capabilities version is not supported");a=function(e){const t=(0,P.mX)(e,"Service/name"),n=(0,P.V6)(e,"Capability"),i=(0,P.V6)(n,"GetCapabilities/Get/OnlineResource")?.getAttribute("xlink:href")??"",s=(0,P.V6)(n,"DescribeCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",r=(0,P.V6)(n,"GetCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",o={getCapabilities:L(i),describeCoverage:L(s),getCoverage:L(r)},a=(0,P.IC)(e,"CoverageOfferingBrief"),l=[];for(let e=0;e<a.length;e++){const t=a[e],n=(0,P.mX)(t,"name"),i=(0,P.IC)(t,"pos"),s=(0,P.pN)(i[0]),r=(0,P.pN)(i[1]),o=new R.A({xmin:s[0],ymin:s[1],xmax:r[0],ymax:r[1],spatialReference:{wkid:4326}});l.push({id:n,lonLatEnvelope:o})}return{name:t,onlineResources:o,coverages:l,gridCoverages:O(l),supportedVersions:["1.0.0"],version:"1.0.0"}}(n)}return a.version=s,a}var k=n(39829),j=n(4366),G=n(87186);function X(e){e.variables.forEach(e=>e.dimensions.forEach(e=>e.values??=(0,j.Xg)(e)))}function F(e){return{requestResponseCRSs:(0,P.Dy)(e,"requestResponseCRSs").map(e=>e.split(":")[1]),nativeCRSs:(0,P.Dy)(e,"nativeCRSs").map(e=>e.split(":")[1])}}function W(e,t){const n=(0,P.Dy)(e,"1.0.0"===t?"interpolationMethod":"InterpolationMethod"),i="1.0.0"===t?e.getAttribute("default"):(0,P.mX)(e,"InterpolationMethods/Default");return null!=i?[i].concat(n.filter(e=>e.toLowerCase()!==i.toLowerCase())):n}function q(e){return null==e?["nearest"]:e.map(e=>{const t=e.toLowerCase();return t.includes("nearest")?"nearest":t.includes("linear")?"bilinear":t.includes("cubic")?"cubic":null}).filter(e=>!!e)}function Z(e){const t=(0,P.IC)(e,"pos"),n=(0,P.pN)(t[0]),i=(0,P.pN)(t[1]);return new R.A({xmin:n[0],ymin:n[1],xmax:i[0],ymax:i[1],spatialReference:{wkid:4326}})}function B(e,t){const n=(0,P.Dy)(e,t);return n?.length&&""!==n[0]&&!isNaN(Number(n[0]))?n.map(e=>Number(e)):null}function _(e){const t=(0,P.pN)(e,"MinimumValue"),n=(0,P.pN)(e,"MaximumValue");return t.length&&n.length?t.map((e,t)=>({min:e,max:n[t],avg:-1,stddev:-1})):null}function z(e){return null==e?null:e.every(t=>t===e[0])?e[0]:e}function U(e){const t=[],n=(0,P.IC)(e,"RangeSet");let i=[];for(let e=0;e<n.length;e++){const s=(0,P.mX)(n[e],"name"),r=(0,P.mX)(n[e],"label"),o=[],a=B(n[e],"nullValues/singleValue"),l=(0,P.IC)(n[e],"AxisDescription");for(let e=0;e<l.length;e++){const t=(0,P.mX)(l[e],"name"),n=(0,P.mX)(l[e],"label"),s=(0,P.Dy)(l[e],"singleValue");if(0===s.length){const t=(0,P.mX)(l[e],"min"),n=(0,P.mX)(l[e],"max"),i=Number((0,P.mX)(l[e],"res"))||1;if(null!==t&&null!==n)for(let e=parseInt(t,10);e<=parseInt(n,10);e+=i)s.push(e.toString())}"band"===t.toLowerCase()&&(i=s),o.push({name:t,label:n,values:s})}t.push({name:s,label:r,nullValues:a,axis:o})}return{rangeSet:t,bandNames:i}}function H(e=null){if(!e)return{resolution:null,units:null};let t=e.toUpperCase();const n=["Years","Months","Days","Hours","Minutes","Seconds"];let i,s,r;return t.includes("PT")?(t=t.slice(2),r=["H","M","S"].findIndex(e=>t.includes(e)),i=n[3+r],s=parseFloat(t.slice(0,-1))):(t=t.slice(1),r=["Y","M","D"].findIndex(e=>t.includes(e)),r>-1&&(i=n[r]),s=parseFloat(t.slice(0,-1))),{resolution:s,units:i}}function K(e){const t=(0,P.IC)(e,"timeposition");if(t.length>0){const e=[];for(let n=0;n<t.length;n++)e.push(new Date((0,P.mX)(t[n])));return{begin:e[0],end:e[e.length-1],values:e}}const n=(0,P.V6)(e,"timePeriod")||(0,P.V6)(e,"TimePeriod");return n?{begin:new Date((0,P.mX)(n,"beginPosition")||(0,P.mX)(n,"BeginPosition")),end:new Date((0,P.mX)(n,"endPosition")||(0,P.mX)(n,"EndPosition")),...H((0,P.mX)(n,"timeResolution")||(0,P.mX)(n,"TimeResolution"))}:null}function Y(e){const t=(0,P.V6)(e,"spatialDomain"),n=(0,P.V6)(t,"Envelope")||(0,P.V6)(t,"EnvelopeWithTimePeriod"),i=n.getAttribute("srsName").split(":"),s=i[i.length-1],r=(0,P.IC)(n,"pos"),o=(0,P.pN)(r[0]),a=(0,P.pN)(r[1]),l=parseInt(s,10),u=isNaN(l)?null:{wkid:l},c=new R.A({xmin:o[0],ymin:o[1],xmax:a[0],ymax:a[1],spatialReference:u}),p=(0,P.V6)(t,"RectifiedGrid"),d=(0,P.mX)(p,"low").split(" "),f=(0,P.mX)(p,"high").split(" "),m=parseInt(f[0],10)-parseInt(d[0],10)+1,h=parseInt(f[1],10)-parseInt(d[1],10)+1,g=(0,P.pN)(t,"origin/pos"),v=(0,P.IC)(t,"offsetVector"),y={envelope:c,columns:m,rows:h,offset:{x:parseFloat((0,P.mX)(v[0]).split(" ")[0]),y:parseFloat((0,P.mX)(v[1]).split(" ")[1])},origin:{x:g[0],y:g[1]}},w=(0,P.V6)(e,"temporalDomain")||(0,P.V6)(e,"TemporalDomain");return{spatialDomain:y,temporalDomain:w?K(w):null}}function Q(e,t){const n=[],i=(0,P.IC)(e,"Field");let s,r=[];for(let e=0;e<i.length;e++){const o=(0,P.mX)(i[e],"Identifier"),a=(0,P.mX)(i[e],"Description"),l=(0,P.mX)(i[e],"Definition"),u=(0,P.mX)(i[e],"Abstract"),c=(0,P.mX)(i[e],"Title"),p=B(i[e],"NullValue"),d=(0,P.V6)(i[e],"AllowedValues"),f=d?_(d):null,m=W(i[e],"1.1.0"),h=[],g=(0,P.IC)(i[e],"Axis");for(let e=0;e<g.length;e++){const n=g[e].getAttribute("identifier"),i=(0,P.mX)(g[e],"UOM"),o=(0,P.mX)(g[e],"DataType"),a=(0,P.Dy)(g[e],"Key");t&&!n.toLowerCase().includes("band")||(r=a,s=p),h.push({identifier:n,uom:i,dataType:o,values:a,bandNoDataValues:s})}n.push({identifier:o,description:a,definition:l,abstract:u,title:c,supportedInterpolations:m,axis:h,nullValues:p,statistics:f})}return{rangeSet:n,bandNames:r,bandNoDataValues:s,statistics:n[0].statistics}}function J(e){const t=(0,P.V6)(e,"SpatialDomain"),n=(0,P.V6)(t,"GridCRS"),i=(0,P.mX)(n,"GridBaseCRS"),s=(0,P.mX)(n,"GridOrigin"),r=s?.split(" ").map(e=>parseFloat(e))??[0,0],o=(0,P.pN)(n,"GridOffsets"),a=(0,P.IC)(t,"BoundingBox");let l,u,c,p;for(let e=0;e<a.length;e++){const t=a[e].getAttribute("crs")?.toLowerCase();if(null!=t)if(t.includes("imagecrs")){const t=(0,P.pN)(a[e],"LowerCorner"),n=(0,P.pN)(a[e],"UpperCorner");l=n[0]-t[0]+1,u=n[1]-t[1]+1}else if(t.indexOf("epsg")>0){const n=t.split(":");c=parseInt(n[n.length-1],10);const i=(0,P.pN)(a[e],"LowerCorner"),s=(0,P.pN)(a[e],"UpperCorner");p=new R.A({xmin:i[0],ymin:i[1],xmax:s[0],ymax:s[1],spatialReference:{wkid:c}})}}const d=l>u,f=p.xmax-p.xmin>p.ymax-p.ymin;let m=!1;(0,D.m)(c)&&(d===f?m=!1:(m=!0,p=new R.A({xmin:p.ymin,ymin:p.xmin,xmax:p.ymax,ymax:p.xmax,spatialReference:{wkid:c}})));const h={columns:l,rows:u,origin:{x:r[0],y:r[1]},offset:{x:o[0],y:o[o.length-1]},gridBaseCRS:i,envelope:p,useEPSGAxis:m},g=(0,P.V6)(e,"temporalDomain")||(0,P.V6)(e,"TemporalDomain");return{spatialDomain:h,temporalDomain:g?K(g):null}}function ee(e){const t=(0,P.V6)(e,"Envelope")||(0,P.V6)(e,"EnvelopeWithTimePeriod"),n=t.getAttribute("srsName"),i=n.slice(n.lastIndexOf("/")+1),s=t.getAttribute("axisLabels").split(" ").map(e=>e.trim()).filter(e=>""!==e.trim()),r=(0,P.pN)(t,"lowerCorner"),o=(0,P.pN)(t,"upperCorner"),a=!["y","lat","latitude","north","nor","n","b"].includes(s[0].toLowerCase());let l;const u=parseInt(i,10),c=isNaN(u)?null:{wkid:u};l=new R.A(a?{xmin:r[0],ymin:r[1],xmax:o[0],ymax:o[1],spatialReference:c}:{xmin:r[1],ymin:r[0],xmax:o[1],ymax:o[0],spatialReference:c});const p={mins:r,maxs:o},d=t.getAttribute("uomLabels").trim().split(" ");let f,m;if((0,P.g7)(t,"EnvelopeWithTimePeriod")){f=new Date((0,P.mX)(e,"beginPosition")||(0,P.mX)(e,"BeginPosition")),m=new Date((0,P.mX)(e,"endPosition")||(0,P.mX)(e,"EndPosition"));const t=d?.findIndex(e=>"oledatetime"===e?.toLowerCase());t>-1&&(d[t]="ISO8601")}return{envelope:l,axisLabels:s,uomLabels:d.length?d:null,envelopeAllDims:p,beginPosition:f,endPosition:m,isEastFirst:a}}function te(e,t){const n=[],i=(0,P.IC)(e,"DataRecord"),s=[];let r,o=[];for(let e=0;e<i.length;e++){const a=(0,P.IC)(i[e],"field"),l=[];for(let e=0;e<a.length;e++){const n=a[e].getAttribute("name"),i=(0,P.mX)(a[e],"description")||"",u=(0,P.V6)(a[e],"uom")?.getAttribute("code")||"",c=(0,P.pN)(a[e],"interval"),p=B(a[e],"nilValue")?.[0];t&&!n.toLowerCase().includes("band")||(s.push(n),c?.length&&(r=r||[],r.push({min:c[0],max:c[1],avg:-1,stddev:-1})),o.push(p)),l.push({name:n,description:i,uom:u,allowedValues:c,nilValue:p})}n.push(l)}return o.some(e=>null!=e)||(o=null),{rangeType:n,bandNames:s,bandStats:r,bandNoDataValues:o}}function ne(e){let t=1,n="";const i=.01;return Math.abs(e-1/24)<1/24*i?n="Hours":Math.abs(e-1)<1*i?n="Days":e<1?(t=Math.round(24*e),n="Hours"):e>28-i&&e<31+i||Math.round(e/30)<12?n="Months":e>365-i&&e<366+i&&(n="Years"),{interval:t,intervalUnit:n}}function ie(e,t){const n=(0,P.V6)(e,"RectifiedGrid"),i=(0,P.pN)(n,"low"),s=(0,P.pN)(n,"high"),r=[];for(let e=0;e<i.length;e++)r.push(s[e]-i[e]+1);const o=(0,P.mX)(n,"axisLabels").split(" "),a=(0,P.pN)(n,"origin/pos"),l=(0,P.IC)(n,"offsetVector"),u=[];for(let e=0;e<l.length;e++){const t=(0,P.pN)(l[e]),n=t.findIndex(e=>0!==e);u[n]=t[n]}let c,p,d,f=!1;return t?.length&&o?.length&&(f=[...t].sort((e,t)=>e<t?-1:1).join(",")===[...o].sort((e,t)=>e<t?-1:1).join(",")),["y","lat","latitude","north","nor","n","b"].includes((f?o:t)[0].toLowerCase())?(c=r[1],p=r[0],d={y:Math.abs(u[0]),x:Math.abs(u[1])}):(c=r[0],p=r[1],d={x:Math.abs(u[0]),y:Math.abs(u[1])}),{columns:c,rows:p,origin:a,offset:u,resolution:d,gridSamples:r,axisLabels:o,hasSameAxisLabelsAsBoundedBy:f}}function se(e){const t=(0,P.V6)(e,"EarthObservation");if(!t)return null;const n=(0,P.V6)(t,"phenomenonTime"),i=n?K(n):null,s=(0,P.V6)(t,"phenomenonTime"),r=s?K(s):null,o=(0,P.mX)(t,"featureOfInterest/Footprint/multiExtentOf/MultiSurface/surfaceMembers/Polygon/exterior/LinearRing/posList");let a=null;if(o){const e=o.split(" ").map(e=>e.trim()).filter(e=>null!=e&&""!==e).map(Number);if(e.length){const t=[];for(let n=0;n<e.length/2;n+=2)t.push(e[n],e[n+1]);a=new k.A({rings:[[t]]})}}return{observation:{phenomenonTime:i,resultTime:r,footprint:a,identifier:(0,P.mX)(e,"metaDataProperty/EarthObservationMetaData/identifier"),acquisitionType:(0,P.mX)(e,"metaDataProperty/EarthObservationMetaData/acquisitionType"),status:(0,P.mX)(e,"metaDataProperty/EarthObservationMetaData/status")}}}async function re(e,t){const{coverageIds:n,version:i,customParameters:s,signal:r}=t,a=i.slice(0,3),u="1.0"===a?"coverage":"1.1"===a?"identifiers":"coverageId",c={service:"WCS",request:"DescribeCoverage",version:i,[u]:n.join(","),...s};try{const{data:t}=await(0,T.A)(e,{query:c,responseType:"xml",signal:r});return function(e,t){let n=null;if(n="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e,"1.0.0"===t)return(0,P.IC)(n,"CoverageOffering").map(e=>function(e){const t={version:"1.0"};let n,i=[];for(let s=0;s<e.childNodes.length;s++){const r=e.childNodes[s];if(1===r.nodeType)if((0,P.g7)(r,"description"))t.description=(0,P.mX)(r);else if((0,P.g7)(r,"name"))t.name=(0,P.mX)(r);else if((0,P.g7)(r,"label"))t.label=(0,P.mX)(r);else if((0,P.g7)(r,"supportedFormats"))t.supportedFormats=(0,P.Dy)(r,"formats");else if((0,P.g7)(r,"supportedCRSs"))t.supportedCRSs=F(r);else if((0,P.g7)(r,"supportedInterpolations"))t.supportedInterpolations=W(r,"1.0.0");else if((0,P.g7)(r,"lonLatEnvelope"))t.lonLatEnvelope=Z(r);else if((0,P.g7)(r,"rangeSet")){const e=U(r);t.rangeSet=e.rangeSet,i=e.bandNames;const s=e.rangeSet[0].nullValues;s?.length&&(n=z(s))}else(0,P.g7)(r,"domainSet")&&(t.domainSet=Y(r))}const s=q(t.supportedInterpolations),{name:r,description:o,label:a,lonLatEnvelope:l,supportedFormats:u}=t,{spatialDomain:c}=t.domainSet,p={x:Math.abs(c.offset.x),y:Math.abs(c.offset.y)},d=function(e){if(!e.temporalDomain)return null;const{begin:t,end:n,values:i,units:s,resolution:r}=e.temporalDomain,o={variables:[{name:"default",description:"",dimensions:[{name:"StdTime",description:"",unit:"ISO8601",values:i?.map(e=>e.getTime()),hasRegularIntervals:!i,interval:r,intervalUnit:s,extent:[t.getTime(),n.getTime()]}]}]};return X(o),o}(t.domainSet),f=new G.A({width:c.columns,height:c.rows,pixelSize:p,pixelType:"unknown",extent:c.envelope,spatialReference:c.envelope.spatialReference,bandCount:i.length||1,noDataValue:n,multidimensionalInfo:d});return{id:r,title:t.name,description:o||a,lonLatEnvelope:l,rasterInfo:f,bandNames:i,supportedFormats:u,supportedInterpolations:s,coverageDescription:t,version:"1.0.0",useEPSGAxis:!1}}(e));const i=(0,P.IC)(n,"CoverageDescription");return"1.1.0"===t||"1.1.1"===t||"1.1.2"===t?i.map(e=>function(e,t){const n=[],i=[],s={supportedFormats:n,supportedCRSs:i,version:"1.1"};let r,o,a=[];for(let t=0;t<e.childNodes.length;t++){const l=e.childNodes[t];if(1!==l.nodeType)continue;const u=(0,P.vv)(l).toLowerCase();switch(u){case"title":case"abstract":case"identifier":s[u]=(0,P.mX)(l);break;case"supportedformat":{const e=(0,P.mX)(l);n.includes(e)||n.push(e)}break;case"supportedcrs":{const e=(0,P.mX)(l);i.includes(e)||i.push(e)}break;case"range":{const e=Q(l,!!s.domain?.temporalDomain);s.range=e.rangeSet,a=e.bandNames;const{bandNoDataValues:t}=e;t?.length&&(r=z(t)),o=e.statistics}break;case"domain":s.domain=J(l)}}const l=q(s.range[0].supportedInterpolations),{identifier:u,abstract:c,title:p,domain:d,range:f}=s,m={x:Math.abs(d.spatialDomain.offset.x),y:Math.abs(d.spatialDomain.offset.y)},h=function(e,t){if(!t.temporalDomain)return null;const n=e.filter(e=>!e.identifier.toLowerCase().includes("field_1")&&!e.axis.some(e=>e.identifier.includes("band"))),i=[];if(n.length&&n.forEach(e=>{const t=e.axis.map(e=>{const t=e.values.map(t=>"ISO8601"===e.uom?(t=t.trim()).toLowerCase().includes("z")?new Date(t).getTime():new Date(t+"Z").getTime():parseFloat(t.trim())),n=[Math.min.apply(null,t),Math.max.apply(null,t)];return{name:e.identifier.trim(),description:"",field:e.identifier.trim(),unit:e.uom?e.uom.trim():"",hasRegularIntervals:!1,values:t,extent:n}});i.push({name:e.identifier.trim(),description:e.description?.trim()??"",unit:"",dimensions:t,statistics:e.statistics})}),t.temporalDomain){const{begin:e,end:n,values:s,units:r,resolution:o}=t.temporalDomain;i.some(e=>e.dimensions.some(e=>"stdtime"===e.name.toLowerCase()))||i.forEach(t=>{t.dimensions.push({name:"StdTime",description:"",unit:"ISO8601",values:s?.map(e=>e.getTime()),hasRegularIntervals:!s,interval:o,intervalUnit:r,extent:[e.getTime(),n.getTime()]})})}if(i.length){const e={variables:i};return X(e),e}return null}(f,d);h&&(r=f[0].nullValues,1===r?.length&&(r=r[0]));const g=new G.A({width:d.spatialDomain.columns,height:d.spatialDomain.rows,pixelSize:m,pixelType:"unknown",extent:d.spatialDomain.envelope,spatialReference:d.spatialDomain.envelope.spatialReference,bandCount:a.length||1,noDataValue:r,statistics:o,multidimensionalInfo:h});return{id:u,title:s.title,description:c||p,bandNames:a,rasterInfo:g,supportedFormats:n,supportedInterpolations:l,coverageDescription:s,version:t,useEPSGAxis:d.spatialDomain.useEPSGAxis}}(e,t)):i.map(e=>function(e){const t={version:"2.0"};let n,i,s=[];for(let r=0;r<e.childNodes.length;r++){const o=e.childNodes[r];if(1===o.nodeType)if((0,P.g7)(o,"coverageId"))t.coverageId=(0,P.mX)(o);else if((0,P.g7)(o,"ServiceParameters"))t.serviceParameters={supportedFormats:(0,P.Dy)(o,"nativeFormat")};else if((0,P.g7)(o,"boundedBy"))t.boundedBy=ee(o);else if((0,P.g7)(o,"rangeType")){const e=te(o,t.boundedBy?.axisLabels.length>2||t.domainSet?.axisLabels.length>2);t.rangeType=e.rangeType,s=e.bandNames,n=e.bandStats;const{bandNoDataValues:r}=e;r?.length&&(i=z(r))}else if((0,P.g7)(o,"domainSet"))t.domainSet=ie(o,t.boundedBy?.axisLabels);else if((0,P.g7)(o,"metadata")){const e=(0,P.V6)(o,"EOMetadata");t.eoMetadata=e?se(e):null}}const{coverageId:r,boundedBy:o,domainSet:a,rangeType:l,serviceParameters:u}=t,c=function(e,t,n){if(n.axisLabels.length<=2)return null;const i=[];for(let t=0;t<e.length;t++){const n=e[t];for(let e=0;e<n.length;e++)n[e].name.toLowerCase().includes("band")||i.push(n[e])}const s=[];if(i.length){const e=[];for(let i=2;i<n.axisLabels.length;i++){const s=t.uomLabels?.[i]?.trim()??"",r=n.axisLabels[i].toLowerCase().includes("time")||"iso8601"===s.toLowerCase()||"oledatetime"===s.toLowerCase();let o,a;if(r){const e=ne(n.offset[i]);o=e.interval,a=e.intervalUnit}else o=n.offset[i],a=s;const l=[];r?(l.push((0,j.$E)(t.envelopeAllDims.mins[i])),l.push((0,j.$E)(t.envelopeAllDims.maxs[i]))):(l.push(t.envelopeAllDims.mins[i]),l.push(t.envelopeAllDims.maxs[i])),e.push({name:n.axisLabels[i].trim(),description:n.axisLabels[i].trim(),unit:r?"ISO8601":s,hasRegularIntervals:!0,extent:l,interval:o,intervalUnit:a})}if(i.forEach(t=>{const{allowedValues:n}=t,i=2===n?.length?[{min:n[0],max:n[1],avg:-1,stddev:-1}]:null;s.push({name:t.name.trim(),description:t.description?.trim()??"",unit:t.uom.trim(),statistics:i,dimensions:[...e]})}),s.length){const e={variables:s};return X(e),e}}return null}(l,o,a);return!n&&c&&(n=c?.variables[0].statistics),null!=c&&(i=l[0][0].nilValue),{id:r,title:r,description:r,bandNames:s,rasterInfo:new G.A({width:a.columns,height:a.rows,pixelSize:a.resolution,pixelType:"unknown",extent:o.envelope,spatialReference:o.envelope.spatialReference,bandCount:s.length||1,statistics:n,noDataValue:i,multidimensionalInfo:c}),supportedFormats:u.supportedFormats,coverageDescription:t,version:"2.0.1",useEPSGAxis:!1}}(e))}(t,i)}catch(e){if(!(0,l.zf)(e))throw new o.A("wcslayer:open","wcs coverage description is not valid or supported");throw e}}var oe=n(49859);function ae(e,t,n=0){const i="--"+t.boundary,s=[];for(let e=0;e<i.length;e++)s.push(i.charCodeAt(e));const r=[],o="\n--"+t.boundary+"--";for(let e=0;e<o.length;e++)r.push(o.charCodeAt(e));const a=[10],l=[13,10],u=[],c=s.length,p=new Uint8Array(e,n),d=p.length-c;let f=0,m=0;for(let e=0;e<d;e++){for(m=0;m<c&&p[e+m]===s[m];m++);if(m!==c)continue;let n=!1;if(f){const i=le(p.subarray(f,e),t);u.push(i),n=!!i.isValidImage}if(e+=c-1,p[e+1]===a[0]?e+=1:p[e+1]===l[0]&&p[e+2]===l[1]&&(e+=2),f=e+1,n)break}const h=r.length;for(let e=p.length-h-10;e<p.length-h;e++){for(m=0;m<h&&p[e+m]===r[m];m++);if(m===h){u.push(le(p.subarray(f,e),t));break}}return u}function le(e,t){const n=String.fromCharCode.apply(null,e.subarray(0,Math.min(300,e.length))).split("\n"),i=Math.min(n.length,7),s={contentDisposition:"inline"};let r=0;for(let o=0;o<i;o++)if(n[o].length<4)r=r+n[o].length+1;else if("content"===n[o].slice(0,7).toLowerCase()){r=r+n[o].length+1;const e=n[o].indexOf(":");if(-1===e)continue;const t=n[o].slice(0,e).trim(),i=n[o].slice(e+1).trim();switch(t.toLowerCase()){case"content-type":s.contentType=i;break;case"content-description":s.contentDescription=i;break;case"content-transfer-encoding":s.contentTransferEncoding=i;break;case"content-id":s.contentID=i;break;case"content-disposition":s.contentDisposition=i;break;case"content-location":s.contentLocation=i}}else{if(s.contentDisposition.toLowerCase().includes("inline")&&n[o].length>=4&&s.contentType?.toLowerCase().includes("image")){let t=!0,n=e.subarray(r,e.length);if(s.contentType.toLowerCase().indexOf("tif")>0){if("base64"===s.contentTransferEncoding){let e="";const t=n;for(let n=0;n<t.length;n+=65535){const i=t.subarray(n,n+65535>t.length-1?t.length-1:n+65535);e+=String.fromCharCode.apply(null,i)}const i=atob(e);n=new Uint8Array(i.length);for(let e=0;e<n.length;e++)n[e]=i.charCodeAt(e)}t=73===n[0]&&73===n[1]||77===n[0]&&77===n[1]}if(t){let t=n.buffer;"base64"!==s.contentTransferEncoding&&(t=new ArrayBuffer(e.length-r),n=new Uint8Array(t),n.set(e.subarray(r,e.length))),s.contentData=t,s.isValidImage=!0}break}if((""===t.start||s.contentID===t.start)&&s.contentType){if(s.contentType.includes("text")||s.contentType.includes("xml")){s.contentData=String.fromCharCode.apply(null,e.subarray(r,e.length));break}s.contentData=e.subarray(r,e.length)}}return s}var ue=n(20758),ce=n(47520),pe=n(45617);const de=["nearest neighbor","bilinear","bicubic"],fe=["nearest","linear","cubic"],me="response is not a supported multipart/related mediaType with inline tiff, switching to compatibility mode",he=new Set(["1.0.0","1.1.0","1.1.1","1.1.2","2.0.1"]);let ge=class extends oe.A{constructor(){super(...arguments),this.datasetFormat="WCSServer",this.tileType="Raster"}get rasterId(){return`${this.url}-${this.coverageId}-${this.version}`}async fetchRawTile(e,t,n,i={}){if(this.isBlockOutside(e,t,n))return null;const{nativePixelSize:s,spatialReference:r}=this.rasterInfo,a=2**e,l=s.x*a,u=s.y*a,{blockWidth:c,blockHeight:p}=this.getBlockWidthHeight(e),{origin:d}=this.rasterInfo.storageInfo.tileInfo,f=this.getTileExtent({x:l,y:u},t,n,d,r,[c,p]),m=this.rasterInfo.extent,h=f.xmax>m.xmax,g=f.ymin<m.ymin,v=h||g;let y=f,w=c,x=p;if(v&&(y=f.clone().intersection(m),null!=y&&(h&&(w=Math.floor((y.xmax-y.xmin)/l),y.xmax=y.xmin+l*w),g&&(x=Math.floor((y.ymax-y.ymin)/u),y.ymin=y.ymax-u*x))),null==y||w<=1||x<=1)return null;const b=await this._getCoverage(y,w,x,a,i);if(!b)return null;const{coverageDescription:C}=this.coverageInfo,{noDataValue:I,multidimensionalInfo:S}=this.rasterInfo,{multidimensionalDefinition:A}=i;let M;if(null!=S&&null!=A&&A.length){const e=A[0].variableName;if("2.0"===C.version){const t=C.rangeType[0].find(t=>t.name===e);M=t?.nilValue}else if("1.1"===C.version){const t=C.range.find(t=>t.identifier===e);M=t?.nullValues}}const R=M??I,D=await this.decodePixelBlock(b,{width:w,height:x,planes:null,pixelType:null,tiffNoDataValue:Array.isArray(R)?R[0]:R,matchAllNoData:!0});if(null==D)return null;if(D&&(D.width!==w||D.height!==x))throw new o.A("wcsraster-fetch",`the response has unexpected dimension width: ${D.width}, height: {pixelBlock.height}`);return v?(0,ce.$Q)(D,{x:0,y:0},{width:p,height:p}):D}async _open(e){const{customFetchParameters:t}=this.ioConfig,n=e?.signal,i=await async function(e,t){const{version:n,customParameters:i,signal:s}=t??{},r=n?.startsWith("1.0")?"version":"acceptVersions",a={service:"WCS",request:"GetCapabilities",[r]:n,...i};try{let{data:n}=await(0,T.A)(e,{query:a,responseType:"xml",signal:s});return t?.version||function(e){let t=null;t="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e;const n=t.documentElement.getAttribute("version"),i=n?.slice(0,3);return null!=i&&i<"2.1"}(n)||(a[r]="2.0.1",({data:n}=await(0,T.A)(e,{query:a,responseType:"xml",signal:s}))),E(n)}catch(e){if(!(0,l.zf)(e))throw new o.A("wcslayer:open","wcs capabilities is not valid or supported");throw e}}(this.url,{version:t?.version??this.version,customParameters:t,signal:n});if(this.capabilities=i,!this.version){let e=i.version.slice(0,3);"2.0"===e||"1.1"===e||"1.0"===e?this.version=i.version:(e=i.supportedVersions.find(e=>"2.0.1"===e)||i.supportedVersions.find(e=>e.startsWith("2.0"))||i.supportedVersions.find(e=>e.startsWith("1.1"))||i.supportedVersions.find(e=>e.startsWith("1.0"))||"1.0.0",this.version=e)}const{version:s}=this;if(!he.has(s))throw new o.A("wcsraster-open",`unsupported WCS version ${s}`);const{gridCoverages:r}=i;if(!r.length)throw new o.A("wcsraster-open","cannot find rectified grid coverages");this.coverageId??=r[0].id;const{coverageId:a}=this,u=r.find(e=>e.id===a);if(null==u)throw new o.A("wcsraster-open",`the coverageId ${a} does not exist in capabilities`);const c=await re(this.url,{coverageIds:[a],version:s,customParameters:t,signal:n});if(this.coverageInfo=c[0],s.startsWith("2.0")){const{coverageInfo:e}=this;e.lonLatEnvelope=u.lonLatEnvelope,e.supportedInterpolations=q(i.supportedInterpolations),this._patchDimensionValues201(a,n)}this.datasetName=this.coverageInfo.title;const{rasterInfo:p}=this.coverageInfo;if(this.createRemoteDatasetStorageInfo(p,512,512),this._set("rasterInfo",p),null==p.spatialReference)throw new o.A("wcsraster-open",`coverage without spatial reference is not supported: ${a}`);const{pixelType:d,bandCount:f}=await this._getPixelTypeAndBandCount(n);p.pixelType=d,1===p.bandCount&&f>1&&(p.bandCount=f),this.updateTileInfo()}async _patchDimensionValues201(e,t){const{coverageInfo:n}=this,i=n.rasterInfo.multidimensionalInfo?.variables,s=he.has("1.1.2")?"1.1.2":he.has("1.1.1")?"1.1.1":he.has("1.1.0")?"1.1.0":null,{customFetchParameters:r}=this.ioConfig;if(i&&s)try{const n=this.url.includes("/ImageServer/"),o=e.length>8&&e.startsWith("Coverage")&&n?e.slice(8):e,a=await re(this.url,{coverageIds:[o??e],version:s,customParameters:r,signal:t}).catch(()=>{if(o)return re(this.url,{coverageIds:[e],version:s,customParameters:r,signal:t})}),l=a?.[0].rasterInfo.multidimensionalInfo?.variables;if(l)for(const e of i){const t=l.find(({name:t})=>t===e.name);if(t?.dimensions?.length)for(let i=e.dimensions.length-1;i>=0;i--){const s=e.dimensions[i],r=t.dimensions.find(({name:e})=>e===s.name);r?r.values&&r.extent?.join(",")===s.extent?.join(",")&&(e.dimensions[i]={...s,values:r.values}):n&&e.dimensions.splice(i,1)}}}catch{}}async _getPixelTypeAndBandCount(e){const{pixelSize:t,extent:n,multidimensionalInfo:i}=this.rasterInfo,s=n.center,r=new R.A({xmin:s.x-t.x,xmax:s.x+t.x,ymin:s.y-t.y,ymax:s.y+t.y,spatialReference:n.spatialReference});let a=[];if(null!=i){const e=i.variables[0];a=[],e.dimensions.forEach(t=>{a.push(new pe.A({variableName:e.name,dimensionName:t.name,values:t.hasRegularIntervals?t.extent?.[0]:t.values?.[0],isSlice:!0}))})}const{coverageDescription:l}=this.coverageInfo,u={interpolation:"nearest",multidimensionalDefinition:a,signal:e},{version:c}=l,{ioConfig:p}=this,d="2.0"===c&&null==p.allowAnyMediaType||"1.1"===c&&null==p.use2GridOffsets;let f;try{f=await this._getCoverage(r,2,2,1,u,!0)}catch(e){if(!d)throw e;if("1.1"===c){if(!e.details?.isResolutionMismatch)throw e;p.use2GridOffsets=!0}}if(!f&&d&&("2.0"===c&&(p.allowAnyMediaType=!0),f=await this._getCoverage(r,2,2,1,u),f&&M.A.getLogger(this).warn("wcsraster:getcoverage",me)),!f)throw new o.A("wcsraster-open","unable to determine pixel type");const m=await this.decodePixelBlock(f,{width:2,height:2,planes:null,pixelType:null});if(null==m)throw new o.A("wcsraster-open","unable to determine pixel type");return{pixelType:m.pixelType,bandCount:m.getPlaneCount()??0}}async _getCoverage(e,t,n,i,s,r=!1){const{coverageDescription:a}=this.coverageInfo,{version:l}=a,u="2.0"===l?this._getCoverage201Parameters(e,t,n,i,s,a):"1.1"===l?this._getCoverage110Parameters(e,t,n,s,a):this._getCoverage100Parameters(e,t,n,s),c="2.0"===l?await this.request(this._constructWCS201Url(u),{signal:s.signal,responseType:"array-buffer"}):await this.request(this.url,{query:u,signal:s.signal,responseType:"array-buffer"});if("1.0"===l)return c.data;if("2.0"===l&&!1!==this.ioConfig.allowAnyMediaType&&"tiff"===(0,ue.g)(c.data))return r&&(this.ioConfig.allowAnyMediaType=!0,M.A.getLogger(this).warn("wcsraster:getcoverage",me)),c.data;const p=function(e){const t=function(e){const t=e.getHeader?.("Content-Type")?.split(";");if(!t)return null;if(!(t[0].trim()??"").startsWith("multipart/"))return null;const n={boundary:"",start:"",type:""};for(let e=1;e<t.length;e++){const i=t[e].indexOf("=");if(i>0){const s=t[e].slice(0,i).trim(),r=t[e].slice(i+1).trim();n[s]=r.startsWith('"')?r.slice(1,-1):r}}return n}(e);return t?{isMultipart:!0,data:t.boundary?ae(e.data,t,0):null}:{isMultipart:!1,data:null}}(c);if(p.isMultipart&&p.data){const e=p.data.find(e=>e.isValidImage);return r&&"base64"===e?.contentTransferEncoding&&M.A.getLogger(this).warn("wcsraster:getcoverage","response is base64 encoded which may impact layer display performance"),e?.contentData}const d=new Uint8Array(c.data,0,Math.min(c.data.byteLength,2e3)),f=String.fromCharCode.apply(null,d).toLowerCase().includes("exception"),m=f&&String.fromCharCode.apply(null,d).includes("A non-zero RESX/RESY or WIDTH/HEIGHT is required but neither was provided");if(f)throw new o.A("wcsraster:getcoverage","server returns an exception",{isResolutionMismatch:m});throw new o.A("wcsraster:getcoverage","response is not a supported multipart mediaType with inline tiff")}_getInterpolationIndex(e){return e&&this.coverageInfo.supportedInterpolations?.includes(e)?"nearest"===e?0:"bilinear"===e?1:"cubic"===e?2:0:0}_getCoverage100Parameters(e,t,n,i){const s=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`,r=e.spatialReference.wkid,o=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"GEOTIFF",{bandIds:a,interpolation:l}=i,u=this._getInterpolationIndex(l),c=a?a.map(e=>this.coverageInfo.bandNames[e]):null,p=de[u],{multidimensionalDefinition:d}=i;let f;if(null!=d&&null!=this.rasterInfo.multidimensionalInfo){const e=d.find(e=>"StdTime"===e.dimensionName);let t=e?.values;t&&t.length>0&&(Array.isArray(t[0])&&(t=t[0]),f=t.map(e=>ve(e)).join(","))}return{service:"WCS",request:"GetCoverage",version:this.version,coverage:this.coverageId,format:o,crs:`EPSG:${r}`,bbox:s,width:t,height:n,time:f,interpolation:p,band:c?.join(",")}}_getCoverage110Parameters(e,t,n,i,s){const{multidimensionalDefinition:r,bandIds:o,interpolation:a}=i,l=e.spatialReference.wkid,u=`urn:ogc:def:crs:EPSG::${l}`,c=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"image/tiff",p=this._getInterpolationIndex(a),d=fe[p],f=null==a||0===this.coverageInfo.supportedInterpolations?.indexOf(a),m=s.domain.spatialDomain,h=m.origin.x<=m.envelope.xmin&&m.origin.y<=m.envelope.ymin,g=e.width/t,v=e.height/n*(h?1:-1),y=h?[e.xmin,e.ymin]:[e.xmin,e.ymax],w=m.useEPSGAxis&&(0,D.m)(l),x=w?`${y[1]},${y[0]}`:`${y[0]},${y[1]}`,b=this.ioConfig.use2GridOffsets,C=w?b?`${v},${g}`:`${v},0,0,${g}`:b?`${g},${v}`:`${g},0,0,${v}`,I=g/2,S=e.xmin+I,A=e.xmax-I,M=Math.abs(v)/2,R=e.ymin+M,T=e.ymax-M,P=w?`${R},${S},${T},${A},${u}`:`${S},${R},${A},${T},${u}`,L=s.range.find(e=>e.axis.some(e=>e.identifier.toLowerCase().includes("band")));let O,N=L&&d&&o?f?`${L.identifier}[${L.axis[0].identifier}[${o.join(",")}]]`:`${L.identifier}:${d}[${L.axis[0].identifier}[${o.join(",")}]]`:null;if(null!=r&&r.length)for(let e=0;e<r.length;e++){let t=r[e].values;const n=r[e].dimensionName?.toLowerCase(),i=r[e].variableName?.toLowerCase(),o=s.range.find(e=>e.identifier.toLowerCase()===i);if(t.length>0)if(Array.isArray(t[0])&&(t=t[0]),"stdtime"===n)O=t.map(e=>ve(e)).join(",");else if(o){const e=o.axis.find(e=>e.identifier.toLowerCase()===n);e&&(N=f?o.identifier+"["+e.identifier+"["+t.join(",")+"]]":o.identifier+":"+d+"["+e.identifier+"["+t.join(",")+"]]")}e===r.length-1&&o&&!N&&(N=f?o.identifier:o.identifier+":"+d)}return{service:"WCS",request:"GetCoverage",version:this.version,identifier:this.coverageId,format:c,crs:`EPSG:${l}`,boundingbox:P,gridCS:"urn:ogc:def:cs:OGC:0.0:Grid2dSquareCS",gridType:"urn:ogc:def:method:WCS:1.1:2dGridIn2dCrs",gridOrigin:x,gridOffsets:C,gridBaseCRS:u,timeSequence:O,rangeSubset:N}}_getCoverage201Parameters(e,t,n,i,s,r){const{multidimensionalDefinition:o,interpolation:a}=s,l=this._getInterpolationIndex(a);let u=null;const{supportedInterpolations:c}=this.capabilities;if(c?.length)switch(l){case 0:u=c.find(e=>e.toLowerCase().includes("nearest"));break;case 1:u=c.find(e=>e.toLowerCase().includes("linear"));break;case 2:u=c.find(e=>e.toLowerCase().includes("cubic")||e.toLowerCase().includes("quadratic"))}const p=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"image/tiff",{bandNames:d}=this.coverageInfo,{boundedBy:f,domainSet:m,rangeType:h}=r,g=f.isEastFirst?0:1,v=1-g,{axisLabels:y}=f,w=y[g],x=y[v],b=`http://www.opengis.net/def/crs/EPSG/0/${e.spatialReference.wkid}`,C=b,I=[];I.push(`${w}(${e.xmin},${e.xmax})`),I.push(`${x}(${e.ymin},${e.ymax})`);const S=[];if(y.length>2)for(let e=2;e<y.length;e++){const t=m.origin[e];if(y[e].toLowerCase().includes("time")){let n=t.toString();f.uomLabels?.[e].toLowerCase().includes("ole")&&(S.push(y[e]),n=ve(t,!0)),I.push(y[e]+",http://www.opengis.net("+n+")")}else I.push(y[e]+",http://www.opengis.net("+t+")")}let A=null;if(null!=o&&o.length){const e=[];h.forEach(t=>t.forEach(t=>e.push(t.name)));const t=[];for(let n=0;n<o.length;n++){const i=y.find(e=>e===o[n].dimensionName),s=e.find(e=>e===o[n].variableName);if(t.includes(s)||t.push(s),i){let e=o[n].values;if(e.length>0){Array.isArray(e[0])&&(e=e[0]);let t="";t=i.toLowerCase().includes("time")?e.map(e=>ve(e)).join(","):e.join(",");const n=I.findIndex(e=>e.startsWith(i+",http://www.opengis.net"));-1===n&&I.push(i+",http://www.opengis.net("+t+")"),-1===n||I[n].includes("("+t+")")||I.splice(n,1,i+",http://www.opengis.net("+t+")")}}}t.length&&(A=t.join(","))}else d?.length>=2&&(A=(s.bandIds?s.bandIds.map(e=>d[e]):d).join(","));const M=I.join("&subset="),R=!r.domainSet.hasSameAxisLabelsAsBoundedBy&&!1!==this.ioConfig.allowScaleFactor,D=R?null:`${w}(${t}),${x}(${n})`,T=R?1/i:null;return{service:"WCS",request:"GetCoverage",version:this.version,coverageId:this.coverageId,rangesubset:A,interpolation:u,scaleSize:D,scaleFactor:T,subset:M,format:p,mediaType:this.ioConfig.allowAnyMediaType?null:"multipart/related",outputcrs:b,subsettingcrs:C}}_constructWCS201Url(e){const t={...this.ioConfig.customFetchParameters,...e},n=[];return Object.keys(t).forEach(e=>{const i=t[e];null!=i&&("subset"===e?"string"==typeof i&&i.split("&subset=").forEach(e=>{e&&n.push(`subset=${encodeURIComponent(e)}`)}):n.push(`${e}=${encodeURIComponent(i)}`))}),`${encodeURI(this.url)}?${n.join("&")}`}};function ve(e,t=!1){return(t?new Date((0,j.$E)(e)):new Date(e)).toISOString()}(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],ge.prototype,"datasetFormat",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],ge.prototype,"tileType",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],ge.prototype,"version",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],ge.prototype,"coverageId",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],ge.prototype,"rasterId",null),ge=(0,i.Cg)([(0,c.$K)("esri.layers.raster.datasets.WCSRaster")],ge);var ye=n(10873),we=n(20437),xe=n(74797),be=n(30291);const Ce=new Set(["milliseconds","seconds","minutes","hours","days","weeks","months","years","decades","centuries"]);let Ie=class extends((0,v.dM)((0,S.j)((0,x.q)((0,b.A)((0,y.d)((0,w.o)((0,C.G)((0,A.e)((0,I.J)((0,a.P)((0,r.OU)(g.A)))))))))))){constructor(...e){super(...e),this.coverageId=null,this.version=null,this.isReference=null,this.graphicOrigin=new h(this),this.legendEnabled=!0,this.noData=0,this.operationalLayerType="WCS",this.type="wcs",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this._debouncedSaveOperations=(0,l.sg)(async(e,t,i)=>{const{save:s,saveAs:r}=await n.e(9838).then(n.bind(n,59838));switch(e){case 0:return s(this,t);case 1:return r(this,i,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WCS"]},e).catch(l.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}get renderer(){return super.renderer}set renderer(e){super.renderer=e}get coverageInfo(){return this.raster.coverageInfo}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,xe.rZ)("Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,n=t?.multidimensionalInfo;if(n){const t=(0,xe.AL)(n);e.push(...t)}return e}createPopupTemplate(e){return(0,be.tn)({fields:this.rasterFields,title:this.title},e)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}async _openRaster(e){const t=new ge({url:this.url,version:this.version,coverageId:this.coverageId,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters}});if(await t.open({signal:e}),!t.rasterInfo)throw t.destroy(),new o.A("wcs-layer:load","cannot load resources on "+this.url);const{rasterInfo:n}=t;null==n.noDataValue&&(n.noDataValue=this.noData),this._set("serviceRasterInfo",n),this._set("spatialReference",n.spatialReference),null==this.title&&this.setAtOrigin("title",t.datasetName,"service"),null==this.coverageId&&this.setAtOrigin("coverageId",t.coverageInfo.id,"service"),null==this.version&&t.version&&this.setAtOrigin("version",t.version,"service"),this.setAtOrigin("tileInfo",t.rasterInfo.storageInfo.tileInfo,"service");const{multidimensionalInfo:i}=n;if(null!=i){const e=i.variables[0].dimensions.find(({name:e})=>"StdTime"===e);if(e){let t=e.extent?.[0]??e.values[0];Array.isArray(t)&&(t=t[0]);let n=e.extent?.[1]??e.values[e.values.length-1];Array.isArray(n)&&(n=n[1]);const i=Ce.has(e.intervalUnit?.toLowerCase())?e.intervalUnit?.toLowerCase():null;this.set("timeInfo",{startField:"StdTime",fullTimeExtent:{start:t,end:n},timeZone:null,interval:i?{value:e.interval,unit:i}:null})}}this.raster=t,this._configDefaultSettings(),this.addHandles((0,u.wB)(()=>this.customParameters,e=>this.raster.ioConfig.customFetchParameters=e))}};(0,i.Cg)([(0,c.MZ)({type:String,nonNullable:!0,json:{name:"wcsInfo.coverageId",write:{isRequired:!0,ignoreOrigin:!0}}})],Ie.prototype,"coverageId",void 0),(0,i.Cg)([(0,c.MZ)()],Ie.prototype,"coverageInfo",null),(0,i.Cg)([(0,c.MZ)({type:["1.0.0","1.1.0","1.1.1","1.1.2","2.0.1"],nonNullable:!0,json:{name:"wcsInfo.version",write:{isRequired:!0,ignoreOrigin:!0}}})],Ie.prototype,"version",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Ie.prototype,"isReference",void 0),(0,i.Cg)([(0,c.MZ)({json:{read:!0,write:!0}})],Ie.prototype,"blendMode",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,clonable:!1})],Ie.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,c.MZ)(ye.fV)],Ie.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],Ie.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)()],Ie.prototype,"noData",void 0),(0,i.Cg)([(0,c.MZ)({type:["WCS"]})],Ie.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)()],Ie.prototype,"raster",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Ie.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)(ye.M6)],Ie.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],Ie.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Ie.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0,type:[we.A]})],Ie.prototype,"fields",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,type:[we.A]})],Ie.prototype,"rasterFields",null),Ie=(0,i.Cg)([(0,c.$K)("esri.layers.WCSLayer")],Ie);const Se=Ie},37539:(e,t,n)=>{n.d(t,{pO:()=>h,jd:()=>d,Tp:()=>f,w5:()=>p});var i=n(34727),s=n(86211),r=n(73941),o=n(79258);Math.PI;const a=o.$O.radius,l=o.$O.eccentricitySquared,u={a1:a*l,a2:a*l*a*l,a3:a*l*l/2,a4:a*l*a*l*2.5,a5:a*l+a*l*l/2,a6:1-l};o.$O.radius,o.$O.flattening,o.Sw.radius,o.Sw.flattening,o.sH.radius,o.sH.flattening,o.sH.radius;var c=n(21325);const p={2:{5:h,7:null,9:null,10:h,1:I,6:null,8:null,0:null,3:v,11:y,2:h,4:D},5:{5:h,7:null,9:null,10:h,1:I,6:null,8:null,0:null,3:v,11:y,2:h,4:D},7:{5:null,7:h,9:null,10:h,1:null,6:C,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:h,10:h,1:null,6:null,8:b,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(e,t,n,i){const s=e[t]/V,r=N-2*Math.atan(Math.exp(-e[t+1]/V)),o=V+(e[t+2]??0),a=Math.cos(r)*o;n[i]=Math.cos(s)*a,n[i+1]=Math.sin(s)*a,n[i+2]=Math.sin(r)*o},6:null,8:null,0:null,3:h,11:function(e,t,n,i){g(e,t,n,i),y(n,i,n,i)},2:g,4:function(e,t,n,i){g(e,t,n,i),D(n,i,n,i)}},4:{5:T,7:null,9:null,10:T,1:function(e,t,n,i){T(e,t,n,i),I(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){T(e,t,n,i),v(n,i,n,i)},11:function(e,t,n,i){T(e,t,n,i),y(n,i,n,i)},2:T,4:h},1:{5:R,7:null,9:null,10:R,1:h,6:null,8:null,0:null,3:function(e,t,n,i){R(e,t,n,i),v(n,i,n,i)},11:function(e,t,n,i){R(e,t,n,i),y(n,i,n,i)},2:R,4:function(e,t,n,i){R(e,t,n,i),D(n,i,n,i)}},6:{5:null,7:M,9:null,10:M,1:null,6:h,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:A,10:A,1:null,6:null,8:h,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:h,3:null,11:null,2:null,4:null},10:{5:h,7:h,9:h,10:h,1:I,6:C,8:b,0:null,3:v,11:y,2:h,4:D},11:{5:w,7:null,9:null,10:w,1:function(e,t,n,i){w(e,t,n,i),I(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){w(e,t,n,i),v(n,i,n,i)},11:h,2:w,4:function(e,t,n,i){w(e,t,n,i),D(n,i,n,i)}}};function d(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(P.source.spatialReference===e&&P.dest.spatialReference===t)return P;const n=m(e,P.source),i=m(t,P.dest);return 0===n&&0===i?(0,c.aI)(e,t)?P.projector=h:P.projector=null:P.projector=p[n][i],P}function m(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,s.GA)(e,1)),(0,r.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===r.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===r.FY.wkt?t.spatialReferenceId=6:e.wkt===r.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function h(e,t,n,i){e!==n&&(n[i++]=e[t++],n[i++]=e[t++],n[i]=e[t]??0)}function g(e,t,n,i){n[i]=O*(e[t]/V),n[i+1]=O*(N-2*Math.atan(Math.exp(-e[t+1]/V))),n[i+2]=e[t+2]??0}function v(e,t,n,s){!function(e,t,n,s,r){const o=.4999999*Math.PI,a=(0,i.qE)(L*e[t+1],-o,o),l=Math.sin(a);n[s++]=L*e[t]*r.radius,n[s++]=r.halfSemiMajorAxis*Math.log((1+l)/(1-l)),n[s]=e[t+2]??0}(e,t,n,s,o.$O)}function y(e,t,n,i){n[i]=e[t]*$,n[i+1]=e[t+1]*$,n[i+2]=e[t+2]??0}function w(e,t,n,i){n[i]=e[t]*E,n[i+1]=e[t+1]*E,n[i+2]=e[t+2]??0}function x(e,t,n,i,s){const r=s+(e[t+2]??0),o=L*e[t],a=L*e[t+1],l=Math.cos(a)*r;n[i]=Math.cos(o)*l,n[i+1]=Math.sin(o)*l,n[i+2]=Math.sin(a)*r}function b(e,t,n,i){x(e,t,n,i,o.Sw.radius)}function C(e,t,n,i){x(e,t,n,i,o.sH.radius)}function I(e,t,n,i){x(e,t,n,i,o.$O.radius)}function S(e,t,n,s,r){const o=e[t],a=e[t+1],l=e[t+2]??0,u=Math.sqrt(o*o+a*a+l*l),c=(0,i.YN)(l/(0===u?1:u)),p=Math.atan2(a,o);n[s++]=O*p,n[s++]=O*c,n[s]=u-r}function A(e,t,n,i){S(e,t,n,i,o.Sw.radius)}function M(e,t,n,i){S(e,t,n,i,o.sH.radius)}function R(e,t,n,i){S(e,t,n,i,o.$O.radius)}function D(e,t,n,i){!function(e,t,n,i,s){const r=L*e[t],o=L*e[t+1],a=e[t+2]??0,l=Math.sin(o),u=Math.cos(o),c=s.radius/Math.sqrt(1-s.eccentricitySquared*l*l);n[i++]=(c+a)*u*Math.cos(r),n[i++]=(c+a)*u*Math.sin(r),n[i++]=(c*(1-s.eccentricitySquared)+a)*l}(e,t,n,i,o.$O)}function T(e,t,n,i){const s=u,r=e[t],a=e[t+1],l=e[t+2]??0;let c,p,d,f,m,h,g,v,y,w,x,b,C,I,S,A,M,R,D,T,P;c=Math.abs(l),p=r*r+a*a,d=Math.sqrt(p),f=p+l*l,m=Math.sqrt(f),T=Math.atan2(a,r),h=l*l/f,g=p/f,I=s.a2/m,S=s.a3-s.a4/m,g>.3?(v=c/m*(1+g*(s.a1+I+h*S)/m),D=Math.asin(v),w=v*v,y=Math.sqrt(1-w)):(y=d/m*(1-h*(s.a5-I-g*S)/m),D=Math.acos(y),w=1-y*y,v=Math.sqrt(w)),x=1-o.$O.eccentricitySquared*w,b=o.$O.radius/Math.sqrt(x),C=s.a6*b,I=d-b*y,S=c-C*v,M=y*I+v*S,A=y*S-v*I,R=A/(C/x+M),D+=R,P=M+A*R/2,l<0&&(D=-D),n[i++]=O*T,n[i++]=O*D,n[i]=P}const P={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:h},L=(0,i.kU)(1),O=(0,i.KJ)(1),N=.5*Math.PI,V=o.$O.radius,$=V*Math.PI/180,E=180/(V*Math.PI)},38458:(e,t,n)=>{n.d(t,{m:()=>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 null!=e&&i.some(([t,n])=>e>=t&&e<=n)}},62815:(e,t,n)=>{n.d(t,{N:()=>o});var i=n(86211),s=n(73941),r=n(21325);function o(e,t,n){if(null==t||null==n||n.vcsWkid||(0,r.aI)(t,n)||(0,s.xP)(t)||(0,s.xP)(n))return null;const o=(0,i.G9)(t)/(0,i.G9)(n);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},91218:(e,t,n)=>{n.r(t),n.d(t,{canProjectWithoutEngine:()=>Z,initializeProjection:()=>_,isEqualBaseGCS:()=>B,isLoaded:()=>P,isLoadedOrLoad:()=>L,isLoadedOrLoadFor:()=>O,load:()=>V,project:()=>$,projectExtent:()=>ne,projectMany:()=>E,projectMultipoint:()=>K,projectOrLoad:()=>k,projectOrLoadMany:()=>j,projectPoint:()=>U,projectPolygon:()=>ee,projectPolyline:()=>Q,projectWithZConversion:()=>q,projectWithoutEngine:()=>z,requiresLoad:()=>N,test:()=>F,tryProjectWithZConversion:()=>W,unload:()=>X});var i=n(49186),s=n(74887),r=n(62788),o=n(95488),a=n(51850),l=n(21276),u=n(73941),c=n(5443),p=n(91075),d=n(48526),f=n(86738),m=n(39829),h=n(82799),g=n(16930),v=n(159),y=n(9762),w=n(37539);function x(e,t,n,i,s,r){return b[0]=e,b[1]=t,b[2]=n,(0,y.projectBuffer)(b,i,0,s,r,0)}const b=(0,a.vt)();var C=n(21325),I=n(62815);let S=null,A=null,M=null,R=null,D={};const T=new o.I;function P(){return!!(A?.isLoaded()&&M?.isLoaded()&&R?.isLoaded())}function L(){return!!P()||((0,r.gc)(T),V(),!1)}function O(e,t){return!e||!t||Z(e,t)||L()}function N(e,t){return!Z(e,t)&&!P()}async function V(e){null==S&&(S=Promise.all([n.e(3276).then(n.bind(n,83276)).then(e=>(A=e,A.load())),n.e(8377).then(n.bind(n,8377)).then(e=>(M=e,M.load())),n.e(2158).then(n.bind(n,12158)).then(e=>(R=e,R.load()))])),await S,(0,s.Te)(e),T.notify()}function $(e,t,n){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),E(e,e[0].spatialReference,t,n)):((0,l.f)(e),E([e],e.spatialReference,t,n)[0])}function E(e,t,n,i){if(null==t||null==n)return e;if(Z(t,n,i))return e.map(e=>z(e,t,n));if(null==i?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>z(e,t,g.A.WGS84)).map(e=>W(e,n));if(null==i?.geographicTransformation&&(0,u.jA)(n))return e.map(e=>W(e,g.A.WGS84)).map(e=>z(e,g.A.WGS84,n));if(!P())throw new G;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:R.getTransformation(t,n,i.areaOfInterestExtent)||new v.A};else if(!i?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,n);let s=D[e];s||(s=R.getTransformation(t,n)||new v.A,D[e]=s),i={geographicTransformation:s}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof p.A?A.executeMany(e,n,i):M.executeMany(e,n,i)}function k(e,t){const n=j([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function j(e,t){if(!P())for(const n of e)if(null!=n&&!(0,C.aI)(n.spatialReference,t)&&(0,C.fn)(n.spatialReference)&&(0,C.fn)(t)&&!Z(n.spatialReference,t))return(0,r.gc)(T),{pending:V(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,C.aI)(e.spatialReference,t)?e:(0,C.fn)(e.spatialReference)&&(0,C.fn)(t)?W(e,t):null)}}class G extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function X(){S=null,A=null,M=null,R=null,D={}}const F={get loadPromise(){return S}};function W(e,t){try{const n=$(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const i=(0,I.N)(n.type,e.spatialReference,t);return null!=i&&i(n),n}catch(e){if(!(e instanceof G))throw e;return null}}async function q(e,t,n){const i=e.spatialReference;return null!=i&&null!=t&&await _(i,t,null,n),W(e,t)}function Z(e,t,n){return!(n?.areaOfInterestExtent||n?.extendedParams||n?.geographicTransformation)&&(!!(0,C.aI)(e,t)||(0,C.fn)(e)&&(0,C.fn)(t)&&!!(0,w.jd)(e,t))}function B(e,t){if((0,C.aI)(e,t))return!0;if(!(0,C.fn)(e)||!(0,C.fn)(t))return!1;const n=(0,C.oT)(e)||(0,C.K8)(e)||(0,C.x1)(e),i=(0,C.oT)(t)||(0,C.K8)(t)||(0,C.x1)(t);return n&&i}async function _(e,t,n,i){if(P())return(0,s.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:n,options:s}of e)if(t&&n&&!Z(t,n,s))return V(i)}else if(e&&t&&!Z(e,t,n))return V(i);return(0,s.NO)(i)}function z(e,t,n){return e?"x"in e?H(e,t,new f.A,n,0):"xmin"in e?ie(e,t,new c.A,n,0):"rings"in e?te(e,t,new m.A,n,0):"paths"in e?J(e,t,new h.A,n,0):"points"in e?Y(e,t,new d.A,n,0):null:null}function U(e,t,n=t.spatialReference,i=0){return null!=n&&null!=e.spatialReference&&null!=H(e,e.spatialReference,t,n,i)}function H(e,t,n,i,s){re[0]=e.x,re[1]=e.y;const r=e.z;return re[2]=void 0!==r?r:s,(0,y.projectBuffer)(re,t,0,re,i,0)?(n.x=re[0],n.y=re[1],n.spatialReference=i,void 0!==r||(0,u.xP)(i)?(n.z=re[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function K(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=Y(e,e.spatialReference,t,n,i)}function Y(e,t,n,i,s){const{points:r,hasZ:o,hasM:a}=e,l=[],c=r.length,p=[];for(const e of r)p.push(e[0],e[1],o?e[2]:s);if(!(0,y.projectBuffer)(p,t,0,p,i,0,c))return null;const d=o||(0,u.xP)(i);for(let e=0;e<c;++e){const t=3*e,n=p[t],i=p[t+1];d&&a?l.push([n,i,p[t+2],r[e][3]]):d?l.push([n,i,p[t+2]]):a?l.push([n,i,r[e][2]]):l.push([n,i])}return n.points=l,n.spatialReference=i,n.hasZ=o,n.hasM=a,n}function Q(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=J(e,e.spatialReference,t,n,i)}function J(e,t,n,i,s){const{paths:r,hasZ:o,hasM:a}=e,l=[];if(!se(r,o??!1,a??!1,t,l,i,s))return null;const c=o||(0,u.xP)(i);return n.paths=l,n.spatialReference=i,n.hasZ=c,n.hasM=a,n}function ee(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=te(e,e.spatialReference,t,n,i)}function te(e,t,n,i,s){const{rings:r,hasZ:o,hasM:a}=e,l=[];if(!se(r,o??!1,a??!1,t,l,i,s))return null;const c=o||(0,u.xP)(i);return n.rings=l,n.spatialReference=i,n.hasZ=c,n.hasM=a,n}function ne(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=ie(e,e.spatialReference,t,n,i)}function ie(e,t,n,i,s){const{xmin:r,ymin:o,xmax:a,ymax:l,hasZ:c,hasM:p}=e;if(!x(r,o,c?e.zmin:s,t,re,i))return null;const d=c||(0,u.xP)(i);return n.xmin=re[0],n.ymin=re[1],d&&(n.zmin=re[2]),x(a,l,c?e.zmax:s,t,re,i)?(n.xmax=re[0],n.ymax=re[1],d&&(n.zmax=re[2]),p&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=i,n):null}function se(e,t,n,i,s,r,o=0){const a=new Array;for(const n of e)for(const e of n)a.push(e[0],e[1],t?e[2]:o);if(!(0,y.projectBuffer)(a,i,0,a,r,0))return!1;let l=0;s.length=0;const c=t||(0,u.xP)(r);for(const t of e){const e=new Array;for(const i of t)c&&n?e.push([a[l++],a[l++],a[l++],i[3]]):c?e.push([a[l++],a[l++],a[l++]]):n?(e.push([a[l++],a[l++],i[2]]),l++):(e.push([a[l++],a[l++]]),l++);s.push(e)}return!0}const re=(0,a.vt)()},99157:(e,t,n)=>{n.d(t,{A:()=>a});var i,s=n(31635),r=n(69622),o=n(91429);let a=i=class extends r.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,s.Cg)([(0,o.MZ)()],a.prototype,"isInverse",void 0),(0,s.Cg)([(0,o.MZ)()],a.prototype,"wkt",void 0),(0,s.Cg)([(0,o.MZ)()],a.prototype,"wkid",void 0),a=i=(0,s.Cg)([(0,o.$K)("esri.geometry.operators.support.GeographicTransformationStep")],a)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4038],{51530:(e,t,s)=>{s.d(t,{KB:()=>a,Xi:()=>r,pn:()=>o,x3:()=>n});var i=s(44208);class r{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function n(e){return"encoded-mesh-texture"===e?.type}async function a(e){const t=new Blob([e]),s=await t.text();return JSON.parse(s)}async function o(e,t){if("image/ktx2"===t)return new r(e);const s=new Blob([e],{type:t});let n=URL.createObjectURL(s);switch(t){case"image/jpeg":n+="#.jpg";break;case"image/png":n+="#.png"}const a=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{const s=()=>{r(),e(a)},i=e=>{r(),t(e)},r=()=>{URL.revokeObjectURL(n),a.removeEventListener("load",s),a.removeEventListener("error",i)};a.addEventListener("load",s),a.addEventListener("error",i),a.src=n});try{a.src=n,await a.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(n),a}},63907:(e,t,s)=>{s.d(t,{$0:()=>f,CQ:()=>m,Fq:()=>d,H0:()=>n,SB:()=>c,WR:()=>i,XN:()=>a,iE:()=>o,ld:()=>h,nI:()=>p,pe:()=>r,r6:()=>l,vt:()=>u,yI:()=>_});const i={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},r={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},n={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},a=Object.values(n),o={DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},c={DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},h={FLOAT:r.FLOAT,UNSIGNED_BYTE:r.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:r.BYTE,UNSIGNED_SHORT:r.UNSIGNED_SHORT,SHORT:r.SHORT,UNSIGNED_INT:r.UNSIGNED_INT,INT:r.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269},u={Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12},f=0,l=36064,_=36065,d=36066,p=33306,m={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497}},84038:(e,t,s)=>{s.r(t),s.d(t,{exportGLTF:()=>V,modelNameGlb:()=>v,modelNameGltf:()=>z,toBinaryGLTF:()=>H});var i=s(74887),r=s(4576);class n{constructor(){this.copyright="",this.defaultScene=0,this.generator="",this._scenes=[]}addScene(e){if(this._scenes.includes(e))throw new Error("Scene already added");this._scenes.push(e)}removeScene(e){(0,r.TF)(this._scenes,e)}forEachScene(e){this._scenes.forEach(e)}}class a{static{this.HEADER_SIZE=12}static{this.CHUNK_HEADER_SIZE=8}static{this.MAGIC=1179937895}static{this.VERSION=2}constructor(e,t){if(!e)throw new Error("GLB requires a JSON gltf chunk");this._length=a.HEADER_SIZE,this._length+=a.CHUNK_HEADER_SIZE;const s=function(e){return(new TextEncoder).encode(e).buffer}(e);if(this._length+=o(s.byteLength,4),t&&(this._length+=a.CHUNK_HEADER_SIZE,this._length+=t.byteLength,t.byteLength%4))throw new Error("Expected BIN chunk length to be divisible by 4 at this point");this.buffer=new ArrayBuffer(this._length),this._outView=new DataView(this.buffer),this._writeHeader();const i=this._writeChunk(s,12,1313821514,32);t&&this._writeChunk(t,i,5130562)}_writeHeader(){this._outView.setUint32(0,a.MAGIC,!0),this._outView.setUint32(4,a.VERSION,!0),this._outView.setUint32(8,this._length,!0)}_writeChunk(e,t,s,i=0){const r=o(e.byteLength,4);for(this._outView.setUint32(t,r,!0),this._outView.setUint32(t+=4,s,!0),function(e,t,s,i,r){new Uint8Array(e,s,r).set(new Uint8Array(t,0,r),0)}(this._outView.buffer,e,t+=4,0,e.byteLength),t+=e.byteLength;t%4;)i&&this._outView.setUint8(t,i),t++;return t}}function o(e,t){return t*Math.ceil(e/t)}var c=s(40876),h=s(53966),u=s(91869),f=s(34727),l=s(67026),_=s(82534),d=s(38954),p=s(51850),m=s(80882),g=s(72258),T=s(63907);class E{constructor(e,t,s,i,r){this._buffer=e,this._componentType=s,this._dataType=i,this._data=[],this._isFinalized=!1,this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,t.bufferViews||(t.bufferViews=[]),this.index=t.bufferViews.length,this._bufferView={buffer:e.index,byteLength:-1,target:r};const n=this._getElementSize();n>=4&&34963!==r&&(this._bufferView.byteStride=n),t.bufferViews.push(this._bufferView),this._numComponentsForDataType=this._calculateNumComponentsForDataType()}push(e){const t=this._data.length;if(this._data.push(e),this._accessorIndex>=0){const s=t%this._numComponentsForDataType,i=this._accessorMin[s];this._accessorMin[s]="number"!=typeof i?e:Math.min(i,e);const r=this._accessorMax[s];this._accessorMax[s]="number"!=typeof r?e:Math.max(r,e)}}get dataSize(){return this._data.length*this._sizeComponentType()}get byteSize(){return e=this.dataSize,4*Math.ceil(e/4);var e}getByteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}get byteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}_createTypedArray(e,t){switch(this._componentType){case T.pe.BYTE:return new Int8Array(e,t);case T.pe.FLOAT:return new Float32Array(e,t);case T.pe.SHORT:return new Int16Array(e,t);case T.pe.UNSIGNED_BYTE:return new Uint8Array(e,t);case T.pe.UNSIGNED_INT:return new Uint32Array(e,t);case T.pe.UNSIGNED_SHORT:return new Uint16Array(e,t)}}writeOutToBuffer(e,t){this._createTypedArray(e,t).set(this._data)}writeAsync(e){if(this._asyncWritePromise)throw new Error("Can't write multiple bufferView values asynchronously");return this._asyncWritePromise=e.then(e=>{const t=new Uint8Array(e);for(let e=0;e<t.length;++e)this._data.push(t[e]);delete this._asyncWritePromise}),this._asyncWritePromise}startAccessor(e){if(this._accessorIndex>=0)throw new Error("Accessor was started without ending the previous one");this._accessorIndex=this._data.length,this._accessorAttribute=e;const t=this._numComponentsForDataType;this._accessorMin=new Array(t),this._accessorMax=new Array(t)}endAccessor(){if(this._accessorIndex<0)throw new Error("An accessor was not started, but was attempted to be ended");const e=this._getElementSize(),t=this._numComponentsForDataType,s=(this._data.length-this._accessorIndex)/t;if(s%1)throw new Error("An accessor was ended with missing component values");for(let e=0;e<this._accessorMin.length;++e)"number"!=typeof this._accessorMin[e]&&(this._accessorMin[e]=0),"number"!=typeof this._accessorMax[e]&&(this._accessorMax[e]=0);const i={byteOffset:e*(this._accessorIndex/t),componentType:this._componentType,count:s,type:this._dataType,min:this._accessorMin,max:this._accessorMax,name:this._accessorAttribute};switch(this._accessorAttribute){case"TEXCOORD_0":case"TEXCOORD_1":case"COLOR_0":case"WEIGHTS_0":switch(this._componentType){case T.pe.UNSIGNED_BYTE:case T.pe.UNSIGNED_SHORT:i.normalized=!0}}return this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,i}get finalized(){return this._finalizedPromise?this._finalizedPromise:this._isFinalized?this._finalizedPromise=Promise.resolve():this._finalizedPromise=new Promise(e=>this._finalizedPromiseResolve=e)}async finalize(){const e=this._bufferView,t=this._buffer.getViewFinalizePromises(this);this._asyncWritePromise&&t.push(this._asyncWritePromise),await Promise.allSettled(t),this._isFinalized=!0,e.byteOffset=this.getByteOffset(),e.byteLength=this.dataSize,this._finalizedPromiseResolve&&this._finalizedPromiseResolve()}_getElementSize(){return this._sizeComponentType()*this._numComponentsForDataType}_sizeComponentType(){switch(this._componentType){case T.pe.BYTE:case T.pe.UNSIGNED_BYTE:return 1;case T.pe.SHORT:case T.pe.UNSIGNED_SHORT:return 2;case T.pe.UNSIGNED_INT:case T.pe.FLOAT:return 4}}_calculateNumComponentsForDataType(){switch(this._dataType){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}}class w{constructor(e){this._gltf=e,this._bufferViews=[],this._isFinalized=!1,e.buffers||(e.buffers=[]),this.index=e.buffers.length;const t={byteLength:-1};e.buffers.push(t),this._buffer=t}addBufferView(e,t,s){if(this._finalizePromise)throw new Error("Cannot add buffer view after fiinalizing buffer");const i=new E(this,this._gltf,e,t,s);return this._bufferViews.push(i),i}getByteOffset(e){let t=0;for(const s of this._bufferViews){if(s===e)return t;t+=s.byteSize}throw new Error("Given bufferView was not present in this buffer")}getViewFinalizePromises(e){const t=[];for(const s of this._bufferViews){if(e&&s===e)return t;t.push(s.finalized)}return t}getArrayBuffer(){if(!this._isFinalized)throw new Error("Cannot get ArrayBuffer from Buffer before it is finalized");const e=this._getTotalSize(),t=new ArrayBuffer(e);let s=0;for(const e of this._bufferViews)e.writeOutToBuffer(t,s),s+=e.byteSize;return t}finalize(){if(this._finalizePromise)throw new Error(`Buffer ${this.index} was already finalized`);return this._finalizePromise=Promise.allSettled(this.getViewFinalizePromises()).then(()=>{this._isFinalized=!0;const e=this.getArrayBuffer();this._buffer.byteLength=e.byteLength,this._buffer.uri=e}),this._gltf.extras.promises.push(this._finalizePromise),this._finalizePromise}_getTotalSize(){let e=0;for(const t of this._bufferViews)e+=t.byteSize;return e}}function R(e,t){if(e.components)for(const s of e.components)s.faces&&"smooth"===s.shading&&S(s.faces,t)}function S(e,t){null==t.normal&&(t.normal=new Float32Array(t.position.length));const{position:s,normal:i}=t,r=e.length/3;for(let t=0;t<r;++t){const r=3*e[3*t],n=3*e[3*t+1],a=3*e[3*t+2],o=(0,d.h)(b,s[r],s[r+1],s[r+2]),c=(0,d.h)(A,s[n],s[n+1],s[n+2]),h=(0,d.h)(N,s[a],s[a+1],s[a+2]),u=(0,d.e)(c,c,o),f=(0,d.e)(h,h,o),l=(0,d.f)(u,u,f);i[r]+=l[0],i[r+1]+=l[1],i[r+2]+=l[2],i[n]+=l[0],i[n+1]+=l[1],i[n+2]+=l[2],i[a]+=l[0],i[a+1]+=l[1],i[a+2]+=l[2]}for(let e=0;e<i.length;e+=3)(0,d.h)(y,i[e],i[e+1],i[e+2]),(0,d.n)(y,y),i[e]=y[0],i[e+1]=y[1],i[e+2]=y[2]}const b=(0,p.vt)(),A=(0,p.vt)(),N=(0,p.vt)(),y=(0,p.vt)();s(44208);var I=s(49186),x=s(84952);async function O(e,t){const s=C(e);if(null==s)throw new I.A("imageToArrayBuffer","Unsupported image type");const r=function(e){if(!(e instanceof HTMLImageElement))return"image/png";const t=e.src;if((0,x.DB)(t)){const e=(0,x.r$)(t);return"image/jpeg"===e?.mediaType?e.mediaType:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}(e),n=await new Promise(e=>s.toBlob(e,r));if((0,i.Te)(t),!n)throw new I.A("imageToArrayBuffer","Failed to encode image");const a=await n.arrayBuffer();return(0,i.Te)(t),{data:a,type:r}}function C(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const s=t.getContext("2d");return e instanceof HTMLImageElement?s.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&s.putImageData(e,0,0),t}var B=s(51530);const G=()=>h.A.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class M{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=2===t.output.buffer||2===t.output.image;s&&(t.binChunkBuffer=new w(this.gltf)),e.forEachScene(e=>{this._addScene(e)}),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode(e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))}),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;(0,d.m)(s,p.uY)||(t.translation=(0,p.o8)(s));const i=e.rotation;(0,l.t2)(i,_.zK)||(t.rotation=(0,_.o8)(i));const r=e.scale;(0,d.m)(r,p.Un)||(t.scale=(0,p.o8)(r));const n=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),i=[n];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),i.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return i}return e.forEachNode(e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))}),[n]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=2===t.output.buffer;let i;i=s?t.binChunkBuffer:new w(this.gltf);const r=this.options.origin,n=e.vertexSpace.clone();n.origin=[r.x,r.y,r.z??0];const a=(0,g.UR)({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},n,{targetUnit:this.options.unitConversionDisabled?void 0:"meters"});if(!a)return[];R(e,a),U(a);const{position:o,normal:c,tangent:h}=a,{uv:u,color:f}=e.vertexAttributes,l=i.addBufferView(T.pe.FLOAT,"VEC3",34962);let _,d,p,m;c&&(_=i.addBufferView(T.pe.FLOAT,"VEC3",34962)),u&&(d=i.addBufferView(T.pe.FLOAT,"VEC2",34962)),h&&(p=i.addBufferView(T.pe.FLOAT,"VEC4",34962)),f&&(m=i.addBufferView(T.pe.FLOAT,"VEC4",34962)),l.startAccessor("POSITION"),_&&_.startAccessor("NORMAL"),d&&d.startAccessor("TEXCOORD_0"),p&&p.startAccessor("TANGENT"),m&&m.startAccessor("COLOR_0");const E=a.position.length/3;for(let e=0;e<E;++e)l.push(o[3*e]),l.push(o[3*e+1]),l.push(o[3*e+2]),_&&null!=c&&(_.push(c[3*e]),_.push(c[3*e+1]),_.push(c[3*e+2])),d&&null!=u&&(d.push(u[2*e]),d.push(u[2*e+1])),p&&null!=h&&(p.push(h[4*e]),p.push(h[4*e+1]),p.push(h[4*e+2]),p.push(h[4*e+3])),m&&null!=f&&(m.push(L(f[4*e]/255)),m.push(L(f[4*e+1]/255)),m.push(L(f[4*e+2]/255)),m.push(f[4*e+3]/255));const S=l.endAccessor(),b=this._addAccessor(l.index,S);let A,N,y,I,x;if(_){const e=_.endAccessor();A=this._addAccessor(_.index,e)}if(d){const e=d.endAccessor();N=this._addAccessor(d.index,e)}if(p){const e=p.endAccessor();y=this._addAccessor(p.index,e)}if(m){const e=m.endAccessor();I=this._addAccessor(m.index,e)}const O=[];return e.components&&e.components.length>0&&e.components[0].faces?(x=i.addBufferView(T.pe.UNSIGNED_INT,"SCALAR",34963),this._addMeshVertexIndexed(x,e.components,O,b,A,N,y,I)):this._addMeshVertexNonIndexed(e.components,O,b,A,N,y,I),l.finalize(),_?.finalize(),d?.finalize(),p?.finalize(),x?.finalize(),m?.finalize(),s||i.finalize(),O}_addMaterial(e){if(null==e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode="MASK";break;case"auto":case"blend":s.alphaMode="BLEND"}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const i=e=>{const t=e.toRgba();return t[0]=L(t[0]/255),t[1]=L(t[1]/255),t[2]=L(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=i(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof m.A){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=i(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,G().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const r=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),r}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:(0,f.kU)(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,(0,u.tE)(this._textureMap,e,()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},i=t.length;return t.push(s),i})}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const i=this.gltf.extras;switch(i.output.image){case 2:{const e=i.binChunkBuffer.addBufferView(T.pe.UNSIGNED_BYTE,"SCALAR");if((0,B.x3)(t))null!=t.data&&e.writeOutToBuffer(t.data.buffer,0);else{const r=O(t,this.options.signal).then(({data:e,type:t})=>(s.mimeType=t,e));i.promises.push(e.writeAsync(r).then(()=>e.finalize()))}s.bufferView=e.index;break}case 1:if((0,B.x3)(t)){G().warnOnce("Image export for basis compressed textures not available.");break}s.uri=function(e){const t=C(e);return null!=t?t.toDataURL():""}(t);break;default:if((0,B.x3)(t)){G().warnOnce("Image export for basis compressed textures not available.");break}i.promises.push(O(t,this.options.signal).then(({data:e,type:t})=>{s.uri=e,s.mimeType=t}))}}const i=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,i),i}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=10497,s=10497;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=33071,s=33071;break;case"mirror":t=33648,s=33648}else{switch(e.wrap.vertical){case"clamp":s=33071;break;case"mirror":s=33648}switch(e.wrap.horizontal){case"clamp":t=33071;break;case"mirror":t=33648}}const i={wrapS:t,wrapT:s};for(let e=0;e<this.gltf.samplers.length;++e)if(JSON.stringify(i)===JSON.stringify(this.gltf.samplers[e]))return e;const r=this.gltf.samplers.length;return this.gltf.samplers.push(i),r}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const i=this.gltf.accessors.length;return this.gltf.accessors.push(s),i}_addMeshVertexIndexed(e,t,s,i,r,n,a,o){const c=new Map;for(const h of t){if(e.startAccessor("INDICES"),h.faces)for(let t=0;t<h.faces.length;++t)e.push(h.faces[t]);const t=e.endAccessor(),u={attributes:{POSITION:i},indices:this._addAccessor(e.index,t),material:this._addMaterial(h.material)};r&&"flat"!==h.shading&&(u.attributes.NORMAL=r),n&&(u.attributes.TEXCOORD_0=n),a&&"flat"!==h.shading&&(u.attributes.TANGENT=a),o&&(u.attributes.COLOR_0=o);const f=c.get(h.name);if(f)f.primitives.push(u);else{const e={name:h.name,primitives:[u]};c.set(h.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,i,r,n,a){const o={primitives:[]};t.push(o);const c={attributes:{POSITION:s}};i&&(c.attributes.NORMAL=i),r&&(c.attributes.TEXCOORD_0=r),n&&(c.attributes.TANGENT=n),a&&(c.attributes.COLOR_0=a),e&&(c.material=this._addMaterial(e[0].material)),o.primitives.push(c)}}function U({position:e,normal:t,tangent:s}){D(e,3),D(t,3),D(s,4)}function D(e,t){if(null!=e)for(let s=1,i=2;s<e.length;s+=t,i+=t){const t=e[s],r=e[i];e[s]=r,e[i]=-t}}function L(e){return e**c.Tf}class F{constructor(e){this.mesh=e,this.name="",this.translation=(0,p.vt)(),this.rotation=(0,_.vt)(),this.scale=(0,p.o8)(p.Un),this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}set rotationAngles(e){(0,l.A6)(this.rotation,e[0],e[1],e[2])}}class P{constructor(){this.name="",this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}}const z="model.gltf",v="model.glb";async function V(e,t){const s=new M(e,t).gltf,r=s.extras.promises;let n=1,o=1,c=null;await Promise.allSettled(r),(0,i.Te)(t.signal);const h=t.jsonSpacing??4,u=new Map,f=JSON.stringify(s,(e,s)=>{if("extras"!==e){if(s instanceof ArrayBuffer){if(function(e){if(e.byteLength<8)return!1;const t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7]}(s))switch(t.output?.image){case 1:case 2:break;default:{const e=`img${o}.png`;return o++,u.set(e,s),e}}switch(t.output?.buffer){case 1:return function(e){const t=[],s=new Uint8Array(e);for(let e=0;e<s.length;e++)t.push(String.fromCharCode(s[e]));return"data:application/octet-stream;base64,"+btoa(t.join(""))}(s);case 2:if(c)throw new Error("Already encountered an ArrayBuffer, there should only be one in the GLB format.");return void(c=s);default:{const e=`data${n}.bin`;return n++,u.set(e,s),e}}}return s}},h);return 2===t.output?.buffer||2===t.output?.image?u.set(v,new a(f,c).buffer):u.set(z,f),u}async function H(e,t){const s=new n,i=new P;return s.addScene(i),i.addNode(new F(e)),await async function(e,t){const s=(await V(e,{output:{buffer:2,image:2},jsonSpacing:0,...t})).get(v);if(!(s&&s instanceof ArrayBuffer))throw new Error("failed to export to glb");return s}(s,{origin:e.origin,...t})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4038],{51530:(e,t,s)=>{s.d(t,{KB:()=>a,Xi:()=>r,pn:()=>o,x3:()=>n});var i=s(44208);class r{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function n(e){return"encoded-mesh-texture"===e?.type}async function a(e){const t=new Blob([e]),s=await t.text();return JSON.parse(s)}async function o(e,t){if("image/ktx2"===t)return new r(e);const s=new Blob([e],{type:t});let n=URL.createObjectURL(s);switch(t){case"image/jpeg":n+="#.jpg";break;case"image/png":n+="#.png"}const a=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{const s=()=>{r(),e(a)},i=e=>{r(),t(e)},r=()=>{URL.revokeObjectURL(n),a.removeEventListener("load",s),a.removeEventListener("error",i)};a.addEventListener("load",s),a.addEventListener("error",i),a.src=n});try{a.src=n,await a.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(n),a}},63907:(e,t,s)=>{s.d(t,{$0:()=>f,CQ:()=>m,Fq:()=>d,H0:()=>n,SB:()=>c,WR:()=>i,XN:()=>a,iE:()=>o,ld:()=>h,nI:()=>p,pe:()=>r,r6:()=>l,vt:()=>u,yI:()=>_});const i={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},r={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},n={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},a=Object.values(n),o={DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},c={DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},h={FLOAT:r.FLOAT,UNSIGNED_BYTE:r.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:r.BYTE,UNSIGNED_SHORT:r.UNSIGNED_SHORT,SHORT:r.SHORT,UNSIGNED_INT:r.UNSIGNED_INT,INT:r.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269},u={Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12},f=0,l=36064,_=36065,d=36066,p=33306,m={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497}},84038:(e,t,s)=>{s.r(t),s.d(t,{exportGLTF:()=>V,modelNameGlb:()=>z,modelNameGltf:()=>P,toBinaryGLTF:()=>H});var i=s(74887),r=s(4576);class n{constructor(){this.copyright="",this.defaultScene=0,this.generator="",this._scenes=[]}addScene(e){if(this._scenes.includes(e))throw new Error("Scene already added");this._scenes.push(e)}removeScene(e){(0,r.TF)(this._scenes,e)}forEachScene(e){this._scenes.forEach(e)}}class a{static{this.HEADER_SIZE=12}static{this.CHUNK_HEADER_SIZE=8}static{this.MAGIC=1179937895}static{this.VERSION=2}constructor(e,t){if(!e)throw new Error("GLB requires a JSON gltf chunk");this._length=a.HEADER_SIZE,this._length+=a.CHUNK_HEADER_SIZE;const s=function(e){return(new TextEncoder).encode(e).buffer}(e);if(this._length+=o(s.byteLength,4),t&&(this._length+=a.CHUNK_HEADER_SIZE,this._length+=t.byteLength,t.byteLength%4))throw new Error("Expected BIN chunk length to be divisible by 4 at this point");this.buffer=new ArrayBuffer(this._length),this._outView=new DataView(this.buffer),this._writeHeader();const i=this._writeChunk(s,12,1313821514,32);t&&this._writeChunk(t,i,5130562)}_writeHeader(){this._outView.setUint32(0,a.MAGIC,!0),this._outView.setUint32(4,a.VERSION,!0),this._outView.setUint32(8,this._length,!0)}_writeChunk(e,t,s,i=0){const r=o(e.byteLength,4);for(this._outView.setUint32(t,r,!0),this._outView.setUint32(t+=4,s,!0),function(e,t,s,i,r){new Uint8Array(e,s,r).set(new Uint8Array(t,0,r),0)}(this._outView.buffer,e,t+=4,0,e.byteLength),t+=e.byteLength;t%4;)i&&this._outView.setUint8(t,i),t++;return t}}function o(e,t){return t*Math.ceil(e/t)}var c=s(40876),h=s(53966),u=s(91869),f=s(34727),l=s(67026),_=s(82534),d=s(38954),p=s(51850),m=s(80882),g=s(72258),T=s(63907);class E{constructor(e,t,s,i,r){this._buffer=e,this._componentType=s,this._dataType=i,this._data=[],this._isFinalized=!1,this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,t.bufferViews||(t.bufferViews=[]),this.index=t.bufferViews.length,this._bufferView={buffer:e.index,byteLength:-1,target:r};const n=this._getElementSize();n>=4&&34963!==r&&(this._bufferView.byteStride=n),t.bufferViews.push(this._bufferView),this._numComponentsForDataType=this._calculateNumComponentsForDataType()}push(e){const t=this._data.length;if(this._data.push(e),this._accessorIndex>=0){const s=t%this._numComponentsForDataType,i=this._accessorMin[s];this._accessorMin[s]="number"!=typeof i?e:Math.min(i,e);const r=this._accessorMax[s];this._accessorMax[s]="number"!=typeof r?e:Math.max(r,e)}}get dataSize(){return this._data.length*this._sizeComponentType()}get byteSize(){return e=this.dataSize,4*Math.ceil(e/4);var e}getByteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}get byteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}_createTypedArray(e,t){switch(this._componentType){case T.pe.BYTE:return new Int8Array(e,t);case T.pe.FLOAT:return new Float32Array(e,t);case T.pe.SHORT:return new Int16Array(e,t);case T.pe.UNSIGNED_BYTE:return new Uint8Array(e,t);case T.pe.UNSIGNED_INT:return new Uint32Array(e,t);case T.pe.UNSIGNED_SHORT:return new Uint16Array(e,t)}}writeOutToBuffer(e,t){this._createTypedArray(e,t).set(this._data)}writeAsync(e){if(this._asyncWritePromise)throw new Error("Can't write multiple bufferView values asynchronously");return this._asyncWritePromise=e.then(e=>{const t=new Uint8Array(e);for(let e=0;e<t.length;++e)this._data.push(t[e]);delete this._asyncWritePromise}),this._asyncWritePromise}startAccessor(e){if(this._accessorIndex>=0)throw new Error("Accessor was started without ending the previous one");this._accessorIndex=this._data.length,this._accessorAttribute=e;const t=this._numComponentsForDataType;this._accessorMin=new Array(t),this._accessorMax=new Array(t)}endAccessor(){if(this._accessorIndex<0)throw new Error("An accessor was not started, but was attempted to be ended");const e=this._getElementSize(),t=this._numComponentsForDataType,s=(this._data.length-this._accessorIndex)/t;if(s%1)throw new Error("An accessor was ended with missing component values");for(let e=0;e<this._accessorMin.length;++e)"number"!=typeof this._accessorMin[e]&&(this._accessorMin[e]=0),"number"!=typeof this._accessorMax[e]&&(this._accessorMax[e]=0);const i={byteOffset:e*(this._accessorIndex/t),componentType:this._componentType,count:s,type:this._dataType,min:this._accessorMin,max:this._accessorMax,name:this._accessorAttribute};switch(this._accessorAttribute){case"TEXCOORD_0":case"TEXCOORD_1":case"COLOR_0":case"WEIGHTS_0":switch(this._componentType){case T.pe.UNSIGNED_BYTE:case T.pe.UNSIGNED_SHORT:i.normalized=!0}}return this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,i}get finalized(){return this._finalizedPromise?this._finalizedPromise:this._isFinalized?this._finalizedPromise=Promise.resolve():this._finalizedPromise=new Promise(e=>this._finalizedPromiseResolve=e)}async finalize(){const e=this._bufferView,t=this._buffer.getViewFinalizePromises(this);this._asyncWritePromise&&t.push(this._asyncWritePromise),await Promise.allSettled(t),this._isFinalized=!0,e.byteOffset=this.getByteOffset(),e.byteLength=this.dataSize,this._finalizedPromiseResolve&&this._finalizedPromiseResolve()}_getElementSize(){return this._sizeComponentType()*this._numComponentsForDataType}_sizeComponentType(){switch(this._componentType){case T.pe.BYTE:case T.pe.UNSIGNED_BYTE:return 1;case T.pe.SHORT:case T.pe.UNSIGNED_SHORT:return 2;case T.pe.UNSIGNED_INT:case T.pe.FLOAT:return 4}}_calculateNumComponentsForDataType(){switch(this._dataType){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}}class w{constructor(e){this._gltf=e,this._bufferViews=[],this._isFinalized=!1,e.buffers||(e.buffers=[]),this.index=e.buffers.length;const t={byteLength:-1};e.buffers.push(t),this._buffer=t}addBufferView(e,t,s){if(this._finalizePromise)throw new Error("Cannot add buffer view after fiinalizing buffer");const i=new E(this,this._gltf,e,t,s);return this._bufferViews.push(i),i}getByteOffset(e){let t=0;for(const s of this._bufferViews){if(s===e)return t;t+=s.byteSize}throw new Error("Given bufferView was not present in this buffer")}getViewFinalizePromises(e){const t=[];for(const s of this._bufferViews){if(e&&s===e)return t;t.push(s.finalized)}return t}getArrayBuffer(){if(!this._isFinalized)throw new Error("Cannot get ArrayBuffer from Buffer before it is finalized");const e=this._getTotalSize(),t=new ArrayBuffer(e);let s=0;for(const e of this._bufferViews)e.writeOutToBuffer(t,s),s+=e.byteSize;return t}finalize(){if(this._finalizePromise)throw new Error(`Buffer ${this.index} was already finalized`);return this._finalizePromise=Promise.allSettled(this.getViewFinalizePromises()).then(()=>{this._isFinalized=!0;const e=this.getArrayBuffer();this._buffer.byteLength=e.byteLength,this._buffer.uri=e}),this._gltf.extras.promises.push(this._finalizePromise),this._finalizePromise}_getTotalSize(){let e=0;for(const t of this._bufferViews)e+=t.byteSize;return e}}function R(e,t){if(e.components)for(const s of e.components)s.faces&&"smooth"===s.shading&&S(s.faces,t)}function S(e,t){null==t.normal&&(t.normal=new Float32Array(t.position.length));const{position:s,normal:i}=t,r=e.length/3;for(let t=0;t<r;++t){const r=3*e[3*t],n=3*e[3*t+1],a=3*e[3*t+2],o=(0,d.h)(b,s[r],s[r+1],s[r+2]),c=(0,d.h)(A,s[n],s[n+1],s[n+2]),h=(0,d.h)(N,s[a],s[a+1],s[a+2]),u=(0,d.e)(c,c,o),f=(0,d.e)(h,h,o),l=(0,d.f)(u,u,f);i[r]+=l[0],i[r+1]+=l[1],i[r+2]+=l[2],i[n]+=l[0],i[n+1]+=l[1],i[n+2]+=l[2],i[a]+=l[0],i[a+1]+=l[1],i[a+2]+=l[2]}for(let e=0;e<i.length;e+=3)(0,d.h)(y,i[e],i[e+1],i[e+2]),(0,d.n)(y,y),i[e]=y[0],i[e+1]=y[1],i[e+2]=y[2]}const b=(0,p.vt)(),A=(0,p.vt)(),N=(0,p.vt)(),y=(0,p.vt)();s(44208);var I=s(49186),x=s(84952);async function O(e,t){const s=C(e);if(null==s)throw new I.A("imageToArrayBuffer","Unsupported image type");const r=function(e){if(!(e instanceof HTMLImageElement))return"image/png";const t=e.src;if((0,x.DB)(t)){const e=(0,x.r$)(t);return"image/jpeg"===e?.mediaType?e.mediaType:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}(e),n=await new Promise(e=>s.toBlob(e,r));if((0,i.Te)(t),!n)throw new I.A("imageToArrayBuffer","Failed to encode image");const a=await n.arrayBuffer();return(0,i.Te)(t),{data:a,type:r}}function C(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const s=t.getContext("2d");return e instanceof HTMLImageElement?s.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&s.putImageData(e,0,0),t}var B=s(51530);const G=()=>h.A.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class M{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=2===t.output.buffer||2===t.output.image;s&&(t.binChunkBuffer=new w(this.gltf)),e.forEachScene(e=>{this._addScene(e)}),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode(e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))}),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;(0,d.m)(s,p.uY)||(t.translation=(0,p.o8)(s));const i=e.rotation;(0,l.t2)(i,_.zK)||(t.rotation=(0,_.o8)(i));const r=e.scale;(0,d.m)(r,p.Un)||(t.scale=(0,p.o8)(r));const n=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),i=[n];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),i.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return i}return e.forEachNode(e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))}),[n]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=2===t.output.buffer;let i;i=s?t.binChunkBuffer:new w(this.gltf);const r=this.options.origin,n=e.vertexSpace.clone();n.origin=[r.x,r.y,r.z??0];const a=(0,g.UR)({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},n,{targetUnit:this.options.unitConversionDisabled?void 0:"meters"});if(!a)return[];R(e,a),U(a);const{position:o,normal:c,tangent:h}=a,{uv:u,color:f}=e.vertexAttributes,l=i.addBufferView(T.pe.FLOAT,"VEC3",34962);let _,d,p,m;c&&(_=i.addBufferView(T.pe.FLOAT,"VEC3",34962)),u&&(d=i.addBufferView(T.pe.FLOAT,"VEC2",34962)),h&&(p=i.addBufferView(T.pe.FLOAT,"VEC4",34962)),f&&(m=i.addBufferView(T.pe.FLOAT,"VEC4",34962)),l.startAccessor("POSITION"),_&&_.startAccessor("NORMAL"),d&&d.startAccessor("TEXCOORD_0"),p&&p.startAccessor("TANGENT"),m&&m.startAccessor("COLOR_0");const E=a.position.length/3;for(let e=0;e<E;++e)l.push(o[3*e]),l.push(o[3*e+1]),l.push(o[3*e+2]),_&&null!=c&&(_.push(c[3*e]),_.push(c[3*e+1]),_.push(c[3*e+2])),d&&null!=u&&(d.push(u[2*e]),d.push(u[2*e+1])),p&&null!=h&&(p.push(h[4*e]),p.push(h[4*e+1]),p.push(h[4*e+2]),p.push(h[4*e+3])),m&&null!=f&&(m.push(L(f[4*e]/255)),m.push(L(f[4*e+1]/255)),m.push(L(f[4*e+2]/255)),m.push(f[4*e+3]/255));const S=l.endAccessor(),b=this._addAccessor(l.index,S);let A,N,y,I,x;if(_){const e=_.endAccessor();A=this._addAccessor(_.index,e)}if(d){const e=d.endAccessor();N=this._addAccessor(d.index,e)}if(p){const e=p.endAccessor();y=this._addAccessor(p.index,e)}if(m){const e=m.endAccessor();I=this._addAccessor(m.index,e)}const O=[];return e.components&&e.components.length>0&&e.components[0].faces?(x=i.addBufferView(T.pe.UNSIGNED_INT,"SCALAR",34963),this._addMeshVertexIndexed(x,e.components,O,b,A,N,y,I)):this._addMeshVertexNonIndexed(e.components,O,b,A,N,y,I),l.finalize(),_?.finalize(),d?.finalize(),p?.finalize(),x?.finalize(),m?.finalize(),s||i.finalize(),O}_addMaterial(e){if(null==e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode="MASK";break;case"auto":case"blend":s.alphaMode="BLEND"}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const i=e=>{const t=e.toRgba();return t[0]=L(t[0]/255),t[1]=L(t[1]/255),t[2]=L(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=i(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof m.A){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=i(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.emissiveStrength&&(s.extensions??={},s.extensions.KHR_materials_emissive_strength={emissiveStrength:e.emissiveStrength}),null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,G().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const r=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),r}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:(0,f.kU)(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,(0,u.tE)(this._textureMap,e,()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},i=t.length;return t.push(s),i})}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const i=this.gltf.extras;switch(i.output.image){case 2:{const e=i.binChunkBuffer.addBufferView(T.pe.UNSIGNED_BYTE,"SCALAR");if((0,B.x3)(t))null!=t.data&&e.writeOutToBuffer(t.data.buffer,0);else{const r=O(t,this.options.signal).then(({data:e,type:t})=>(s.mimeType=t,e));i.promises.push(e.writeAsync(r).then(()=>e.finalize()))}s.bufferView=e.index;break}case 1:if((0,B.x3)(t)){G().warnOnce("Image export for basis compressed textures not available.");break}s.uri=function(e){const t=C(e);return null!=t?t.toDataURL():""}(t);break;default:if((0,B.x3)(t)){G().warnOnce("Image export for basis compressed textures not available.");break}i.promises.push(O(t,this.options.signal).then(({data:e,type:t})=>{s.uri=e,s.mimeType=t}))}}const i=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,i),i}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=10497,s=10497;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=33071,s=33071;break;case"mirror":t=33648,s=33648}else{switch(e.wrap.vertical){case"clamp":s=33071;break;case"mirror":s=33648}switch(e.wrap.horizontal){case"clamp":t=33071;break;case"mirror":t=33648}}const i={wrapS:t,wrapT:s};for(let e=0;e<this.gltf.samplers.length;++e)if(JSON.stringify(i)===JSON.stringify(this.gltf.samplers[e]))return e;const r=this.gltf.samplers.length;return this.gltf.samplers.push(i),r}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const i=this.gltf.accessors.length;return this.gltf.accessors.push(s),i}_addMeshVertexIndexed(e,t,s,i,r,n,a,o){const c=new Map;for(const h of t){if(e.startAccessor("INDICES"),h.faces)for(let t=0;t<h.faces.length;++t)e.push(h.faces[t]);const t=e.endAccessor(),u={attributes:{POSITION:i},indices:this._addAccessor(e.index,t),material:this._addMaterial(h.material)};r&&"flat"!==h.shading&&(u.attributes.NORMAL=r),n&&(u.attributes.TEXCOORD_0=n),a&&"flat"!==h.shading&&(u.attributes.TANGENT=a),o&&(u.attributes.COLOR_0=o);const f=c.get(h.name);if(f)f.primitives.push(u);else{const e={name:h.name,primitives:[u]};c.set(h.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,i,r,n,a){const o={primitives:[]};t.push(o);const c={attributes:{POSITION:s}};i&&(c.attributes.NORMAL=i),r&&(c.attributes.TEXCOORD_0=r),n&&(c.attributes.TANGENT=n),a&&(c.attributes.COLOR_0=a),e&&(c.material=this._addMaterial(e[0].material)),o.primitives.push(c)}}function U({position:e,normal:t,tangent:s}){D(e,3),D(t,3),D(s,4)}function D(e,t){if(null!=e)for(let s=1,i=2;s<e.length;s+=t,i+=t){const t=e[s],r=e[i];e[s]=r,e[i]=-t}}function L(e){return e**c.Tf}class F{constructor(e){this.mesh=e,this.name="",this.translation=(0,p.vt)(),this.rotation=(0,_.vt)(),this.scale=(0,p.o8)(p.Un),this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}set rotationAngles(e){(0,l.A6)(this.rotation,e[0],e[1],e[2])}}class v{constructor(){this.name="",this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}}const P="model.gltf",z="model.glb";async function V(e,t){const s=new M(e,t).gltf,r=s.extras.promises;let n=1,o=1,c=null;await Promise.allSettled(r),(0,i.Te)(t.signal);const h=t.jsonSpacing??4,u=new Map,f=JSON.stringify(s,(e,s)=>{if("extras"!==e){if(s instanceof ArrayBuffer){if(function(e){if(e.byteLength<8)return!1;const t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7]}(s))switch(t.output?.image){case 1:case 2:break;default:{const e=`img${o}.png`;return o++,u.set(e,s),e}}switch(t.output?.buffer){case 1:return function(e){const t=[],s=new Uint8Array(e);for(let e=0;e<s.length;e++)t.push(String.fromCharCode(s[e]));return"data:application/octet-stream;base64,"+btoa(t.join(""))}(s);case 2:if(c)throw new Error("Already encountered an ArrayBuffer, there should only be one in the GLB format.");return void(c=s);default:{const e=`data${n}.bin`;return n++,u.set(e,s),e}}}return s}},h);return 2===t.output?.buffer||2===t.output?.image?u.set(z,new a(f,c).buffer):u.set(P,f),u}async function H(e,t){const s=new n,i=new v;return s.addScene(i),i.addNode(new F(e)),await async function(e,t){const s=(await V(e,{output:{buffer:2,image:2},jsonSpacing:0,...t})).get(z);if(!(s&&s instanceof ArrayBuffer))throw new Error("failed to export to glb");return s}(s,{origin:e.origin,...t})}}}]);
|