@arcgis/core 5.2.0-next.35 → 5.2.0-next.37
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02b043a3c5fa8bcb4c5b.js +1 -0
- package/assets/esri/core/workers/chunks/{acbc14395c31f6da509e.js → 03437a8ef35c200dbf17.js} +1 -1
- package/assets/esri/core/workers/chunks/034dd8ee5152a12412cd.js +1 -0
- package/assets/esri/core/workers/chunks/0a6e03263ab0906d8bcf.js +1 -0
- package/assets/esri/core/workers/chunks/0edd250159ec259601b3.js +1 -0
- package/assets/esri/core/workers/chunks/{401ee7fa500adad77db1.js → 1079914101d69a40b3eb.js} +1 -1
- package/assets/esri/core/workers/chunks/{bbcb213d20693fcad5be.js → 1599dc5309a4e60017ce.js} +2 -2
- package/assets/esri/core/workers/chunks/181e98399732f425305d.js +1 -0
- package/assets/esri/core/workers/chunks/{47d88e1b003c4519b7b6.js → 18f4b2099299942aaf97.js} +1 -1
- package/assets/esri/core/workers/chunks/196e7515a43bd0026f49.js +1 -0
- package/assets/esri/core/workers/chunks/1aa7496a7dc95aae11ac.js +1 -0
- package/assets/esri/core/workers/chunks/1d524690c4b66289bd20.js +1 -0
- package/assets/esri/core/workers/chunks/{f72f38e7609756a7f8ea.js → 20fa2c3d4360afa5e136.js} +1 -1
- package/assets/esri/core/workers/chunks/{03350a56f840cffe5459.js → 2757c4bf0280e27f3484.js} +1 -1
- package/assets/esri/core/workers/chunks/{93ceb74ac88ef460fe5f.js → 278409028bc5af45b507.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c61bb25578f73ba49bc.js → 29a1d0659bbc5a039864.js} +1 -1
- package/assets/esri/core/workers/chunks/29df3f829006719b2680.js +1 -0
- package/assets/esri/core/workers/chunks/30cf84a47ebefd180bb7.js +1 -0
- package/assets/esri/core/workers/chunks/{71a593fa116770e58832.js → 37a95f097533bad1b338.js} +1 -1
- package/assets/esri/core/workers/chunks/{7335a762412bc8c15a2f.js → 37e823202424c11076cb.js} +1 -1
- package/assets/esri/core/workers/chunks/{ee446250a40e5d89bb5a.js → 3a76fffa2016c16d7989.js} +3 -3
- package/assets/esri/core/workers/chunks/{58ce4bcfb15f378b1b9f.js → 3d6d2b42ba2ad7086d5d.js} +1 -1
- package/assets/esri/core/workers/chunks/3ec91474658eae87b832.js +1 -0
- package/assets/esri/core/workers/chunks/448e0596005cba9a4225.js +1 -0
- package/assets/esri/core/workers/chunks/{f148666308071bdb185a.js → 45530a49fa1f09d1682e.js} +1 -1
- package/assets/esri/core/workers/chunks/{155940ef3d1888272d73.js → 459e89d1b94a3b204d20.js} +2 -2
- package/assets/esri/core/workers/chunks/{f71f5778e03f68f27482.js → 45b2e58051f42ebd236e.js} +1 -1
- package/assets/esri/core/workers/chunks/4611cf051c3c396fdf96.js +1 -0
- package/assets/esri/core/workers/chunks/{efaa1d05705f6b450e8f.js → 46e3d33e44e5398221e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{866950e9ab96aebc6b32.js → 4a8201e09bc3ad5cc00b.js} +1 -1
- package/assets/esri/core/workers/chunks/{110135b0562a3b5708b9.js → 4abe820bbe4f7ffccc09.js} +1 -1
- package/assets/esri/core/workers/chunks/4ad86d6b1be07c97b6f6.js +1 -0
- package/assets/esri/core/workers/chunks/{20ffeb09bb30400de110.js → 4e28f49d0be20ea50fd7.js} +1 -1
- package/assets/esri/core/workers/chunks/4f25aac84d9eb10cac83.js +1 -0
- package/assets/esri/core/workers/chunks/{0197e459fdb04dfb28ef.js → 51838d55d8ec4ce70398.js} +1 -1
- package/assets/esri/core/workers/chunks/542d8a6c415098b9857c.js +1 -0
- package/assets/esri/core/workers/chunks/57abf838fcff0f0e2c5e.js +1 -0
- package/assets/esri/core/workers/chunks/57dd017fed2943d24e3d.js +1 -0
- package/assets/esri/core/workers/chunks/59801b2ccaaf4b394e02.js +1 -0
- package/assets/esri/core/workers/chunks/5a62c9f64db4fcae5e52.js +1 -0
- package/assets/esri/core/workers/chunks/{e84c13ac59e5381b77e2.js → 5aebecb5c2b3e7887127.js} +1 -1
- package/assets/esri/core/workers/chunks/{c19fe4f31e4ef84bbcf6.js → 5e68b74fd548c7cdba36.js} +1 -1
- package/assets/esri/core/workers/chunks/{9dcb2cbf89dcb7558432.js → 5f360492560ae07083a6.js} +1 -1
- package/assets/esri/core/workers/chunks/6022f43ebd58e21c737a.js +1 -0
- package/assets/esri/core/workers/chunks/62b137a795e487fa06a1.js +1 -0
- package/assets/esri/core/workers/chunks/{007485862ce95928717a.js → 632de34ebd2f44b4423d.js} +1 -1
- package/assets/esri/core/workers/chunks/{1ad5fcae6d6a9801cf58.js → 63ca17f569407c89bde1.js} +2 -2
- package/assets/esri/core/workers/chunks/6896a6dd36fa91a27151.js +1 -0
- package/assets/esri/core/workers/chunks/{e6263e1983e703befe48.js → 68bc674affe2f7269c40.js} +1 -1
- package/assets/esri/core/workers/chunks/{759686b896f51f0fe6a9.js → 6a51499c6623ddce5f00.js} +1 -1
- package/assets/esri/core/workers/chunks/6cdf1db30793133294dd.js +1 -0
- package/assets/esri/core/workers/chunks/{b0e4af49fc968b0a910f.js → 6ff6783f89ecd3a5e752.js} +1 -1
- package/assets/esri/core/workers/chunks/{857532de88f21e8c3466.js → 70763c7b68d8abe8d5fe.js} +1 -1
- package/assets/esri/core/workers/chunks/{e67a9f9298d63026e7f6.js → 716b1f073e3cd807abd3.js} +1 -1
- package/assets/esri/core/workers/chunks/71a3f05cb86ae2920f8d.js +1 -0
- package/assets/esri/core/workers/chunks/723bb56de2324b41df4e.js +1 -0
- package/assets/esri/core/workers/chunks/73f61107cb7e6d30bf03.js +1 -0
- package/assets/esri/core/workers/chunks/752c34cee981862add89.js +1 -0
- package/assets/esri/core/workers/chunks/760dfd585b6c2c1937ce.js +1 -0
- package/assets/esri/core/workers/chunks/{595401947e74a0a67144.js → 76449e50222111ba0eb1.js} +1 -1
- package/assets/esri/core/workers/chunks/76bed5497f42f23a27ed.js +1 -0
- package/assets/esri/core/workers/chunks/832ecc1f7d45774c4726.js +1 -0
- package/assets/esri/core/workers/chunks/860a0f9d20f53db1caf4.js +1 -0
- package/assets/esri/core/workers/chunks/867e39bb444947c93586.js +1 -0
- package/assets/esri/core/workers/chunks/8a8b7ac6693bdfbebf07.js +1 -0
- package/assets/esri/core/workers/chunks/8fce15ce4cfdccf407f3.js +1 -0
- package/assets/esri/core/workers/chunks/{5260f623438bd84f2caa.js → 937cf55b3b9d324eea73.js} +1 -1
- package/assets/esri/core/workers/chunks/93df864c2e829f0fd5ce.js +1 -0
- package/assets/esri/core/workers/chunks/{3dd8145ef89f32920177.js → 966d002acec8c72be56a.js} +1 -1
- package/assets/esri/core/workers/chunks/{367a3031abbeff0c0090.js → 9aef0b87f471626abd66.js} +1 -1
- package/assets/esri/core/workers/chunks/{f1d211904d5a1de93cb3.js → 9ba9a3705623679bc305.js} +1 -1
- package/assets/esri/core/workers/chunks/{aec82b94787821153d2b.js → a188d0767825d322f96d.js} +1 -1
- package/assets/esri/core/workers/chunks/a638de0102c3990403d1.js +1 -0
- package/assets/esri/core/workers/chunks/b09935d0105d50a0971b.js +1 -0
- package/assets/esri/core/workers/chunks/b2c0262c4a76b8a86200.js +1 -0
- package/assets/esri/core/workers/chunks/{599bd80379423c99799d.js → b4323e69e624c6b51754.js} +1 -1
- package/assets/esri/core/workers/chunks/b5141f240ca79729686d.js +1 -0
- package/assets/esri/core/workers/chunks/b549a4d4b1a34bee8beb.js +1 -0
- package/assets/esri/core/workers/chunks/bb89b6fd93513c61b2d3.js +1 -0
- package/assets/esri/core/workers/chunks/{3bd32387af52fa48d747.js → bc553ecc8cbcc1b02717.js} +1 -1
- package/assets/esri/core/workers/chunks/bcba02f61cf0abcb5600.js +1 -0
- package/assets/esri/core/workers/chunks/bccc199af4e2e49f7acd.js +1 -0
- package/assets/esri/core/workers/chunks/{f63e7b01c70352538b1e.js → bd0f488e228a75fbefb3.js} +2 -2
- package/assets/esri/core/workers/chunks/c48dfda8dcb9551606fb.js +1 -0
- package/assets/esri/core/workers/chunks/c4e44fde4bc4ff89e2bc.js +1 -0
- package/assets/esri/core/workers/chunks/c93a68618674b38b932e.js +1 -0
- package/assets/esri/core/workers/chunks/d2745886ba5a86fd5c4c.js +680 -0
- package/assets/esri/core/workers/chunks/d4c341b15d9244276fb9.js +1 -0
- package/assets/esri/core/workers/chunks/d5faab9799891e5da5a8.js +1 -0
- package/assets/esri/core/workers/chunks/d811924acc9c0be95bba.js +1 -0
- package/assets/esri/core/workers/chunks/{4b96aa2dc5b88846bb53.js → e0a4d0288abd334b0673.js} +1 -1
- package/assets/esri/core/workers/chunks/{b22a1c98271c2e4d8808.js → e1ddb8e4977b317fd40c.js} +1 -1
- package/assets/esri/core/workers/chunks/e961c6140c39921816a8.js +1 -0
- package/assets/esri/core/workers/chunks/eb7daa0f6610983ff8db.js +1 -0
- package/assets/esri/core/workers/chunks/eb842cf470ce28a73187.js +1 -0
- package/assets/esri/core/workers/chunks/ed1d4ebf487c7dcd5c33.js +1 -0
- package/assets/esri/core/workers/chunks/f565e203d8fed2672112.js +1 -0
- package/assets/esri/core/workers/chunks/f80cadcc2a588da63b38.js +1 -0
- package/assets/esri/core/workers/chunks/f8bbb52b865a0a242140.js +1 -0
- package/assets/esri/core/workers/chunks/f9592bcdd9988199a7ea.js +1 -0
- package/assets/esri/core/workers/chunks/ff7e1eb2366d4301d288.js +1 -0
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/chunks/NavigationDepth.glsl.js +18 -0
- package/chunks/Path.glsl.js +20 -16
- package/config.js +1 -1
- package/core/accessorSupport/diffUtils.js +1 -1
- package/core/has.js +1 -1
- package/geometry/FlatGeometry.js +1 -1
- package/geometry/support/Indices.js +1 -1
- package/geometry/support/ShortArray.js +1 -1
- package/geometry/support/UintArray.js +1 -1
- package/geometry/support/meshUtils/geographicUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/MapImageLayer.js +1 -1
- package/layers/mixins/PublishableLayer.js +1 -1
- package/layers/mixins/RefreshableLayer.js +1 -1
- package/layers/raster/functions/pixelUtils.js +1 -1
- package/layers/support/kustoUtils.js +1 -1
- package/layers/types.d.ts +9 -2
- package/package.json +1 -1
- package/popup/Feature.js +1 -1
- package/portal/support/resourceUtils.js +1 -1
- package/renderers/support/rasterTypeUtils.js +1 -1
- package/rest/query/operations/pbfFeatureSetUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/tables/support/tablesUtils.js +1 -1
- package/views/2d/engine/flow/utils.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/AlignedVertexSpec.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/layerAdapters/labelingUtils.js +1 -1
- package/views/2d/layers/support/ExportStrategy.js +1 -1
- package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
- package/views/2d/layers/support/annodime/utils.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/Lyr3DWasm.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/i3s/PointCloudRendererUtil.js +1 -1
- package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
- package/views/3d/layers/support/lyr3dTypeConversions.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl-engine/core/material/MaterialBase.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +32 -16
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js +2 -2
- package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/NavigationDepthCache.js +2 -0
- package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
- package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/PathLayouts.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/NavigationDepth.glsl.js +2 -0
- package/views/3d/webgl-engine/shaders/NavigationDepthTechnique.js +2 -0
- package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
- package/views/View2D.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/tooltip/fields/fields.js +1 -1
- package/views/interactive/tooltip/fields/parsingAndFormattingUtils.js +1 -1
- package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.js +1 -1
- package/views/support/selectionUtils.js +1 -1
- package/views/webgl/BufferObject.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/VertexAttributeLayouts.js +1 -1
- package/webscene/spec-certification/utils.js +1 -1
- package/widgets/Editor/legacy/workflowUtils.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.d.ts +6 -0
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/errors.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/constants.js +1 -1
- package/widgets/PanoramicViewer/support/importUtils.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0a2f08298a3c932614f2.js +0 -1
- package/assets/esri/core/workers/chunks/0df978697328b6453c94.js +0 -1
- package/assets/esri/core/workers/chunks/168c15cf462f9abcbdd2.js +0 -1
- package/assets/esri/core/workers/chunks/22c447fcc9a28afeb6e3.js +0 -1
- package/assets/esri/core/workers/chunks/24aa98cb2021ddd789ce.js +0 -1
- package/assets/esri/core/workers/chunks/2509da565e5a2b43ac7f.js +0 -1
- package/assets/esri/core/workers/chunks/256cc116e3be4feee593.js +0 -1
- package/assets/esri/core/workers/chunks/2bb3494659609594c4ca.js +0 -1
- package/assets/esri/core/workers/chunks/2c017eae434254610c8e.js +0 -1
- package/assets/esri/core/workers/chunks/303e723e829ea7088d43.js +0 -1
- package/assets/esri/core/workers/chunks/368db1420b8520beae05.js +0 -1
- package/assets/esri/core/workers/chunks/38a6a7c56c592f336a12.js +0 -1
- package/assets/esri/core/workers/chunks/39ff5b2a05a90e1cb214.js +0 -1
- package/assets/esri/core/workers/chunks/3b914ca36e7e2b00cfe6.js +0 -1
- package/assets/esri/core/workers/chunks/3d1021f7ea9617a76ccf.js +0 -1
- package/assets/esri/core/workers/chunks/3e8fa2a7a36881234479.js +0 -1
- package/assets/esri/core/workers/chunks/451331f69d21c61ec93b.js +0 -1
- package/assets/esri/core/workers/chunks/4656a4bf430d7eed1465.js +0 -1
- package/assets/esri/core/workers/chunks/472ec242cd3070e6acfe.js +0 -1
- package/assets/esri/core/workers/chunks/51d7145f748b4865de7f.js +0 -1
- package/assets/esri/core/workers/chunks/54f54623532f633dc0e2.js +0 -1
- package/assets/esri/core/workers/chunks/570a4725b2a4a19c5148.js +0 -1
- package/assets/esri/core/workers/chunks/586ca90e46f5cbdfeece.js +0 -1
- package/assets/esri/core/workers/chunks/59c22bab85f9cdbb9948.js +0 -1
- package/assets/esri/core/workers/chunks/5dfeefee96659832398a.js +0 -1
- package/assets/esri/core/workers/chunks/6c746ac4bd2e57b8cb41.js +0 -1
- package/assets/esri/core/workers/chunks/6d72a1bdc2664df62c4c.js +0 -1
- package/assets/esri/core/workers/chunks/7085b4c655a19694da04.js +0 -1
- package/assets/esri/core/workers/chunks/777b16b76db406c99c69.js +0 -1
- package/assets/esri/core/workers/chunks/818a481ce579f519de1c.js +0 -1
- package/assets/esri/core/workers/chunks/85a280ee915010a8da3c.js +0 -1
- package/assets/esri/core/workers/chunks/86731e276b31453bc235.js +0 -1
- package/assets/esri/core/workers/chunks/87b86375f8557418dbe6.js +0 -1
- package/assets/esri/core/workers/chunks/8817d25c7f4cf0e6c6bd.js +0 -1
- package/assets/esri/core/workers/chunks/8a9b2efa0603e9fa4e8b.js +0 -1
- package/assets/esri/core/workers/chunks/8aa5bbf9a9b09815725a.js +0 -1
- package/assets/esri/core/workers/chunks/8b68a69ab8fb1679e7b2.js +0 -1
- package/assets/esri/core/workers/chunks/98685bd149dee1d6dc99.js +0 -1
- package/assets/esri/core/workers/chunks/9de673a04c70bd47047e.js +0 -1
- package/assets/esri/core/workers/chunks/9de9cec5c644bc452294.js +0 -1
- package/assets/esri/core/workers/chunks/9fb0431b0628dcb53004.js +0 -680
- package/assets/esri/core/workers/chunks/a2a688dd2ed4565e01ff.js +0 -1
- package/assets/esri/core/workers/chunks/a3ae7c41832c7a8b0570.js +0 -1
- package/assets/esri/core/workers/chunks/a3e86830460e52706a4d.js +0 -1
- package/assets/esri/core/workers/chunks/a58b8903ae17acf117d6.js +0 -1
- package/assets/esri/core/workers/chunks/a99ce2f12c8204ee542a.js +0 -1
- package/assets/esri/core/workers/chunks/ab3d1c00ef514b61ce0b.js +0 -1
- package/assets/esri/core/workers/chunks/ae5363956b4467208e04.js +0 -1
- package/assets/esri/core/workers/chunks/b24b7411a73d1da87c30.js +0 -1
- package/assets/esri/core/workers/chunks/b97b83159fec34f383af.js +0 -1
- package/assets/esri/core/workers/chunks/bec660ee2e7828f965e2.js +0 -1
- package/assets/esri/core/workers/chunks/c7316fd2bdb7ac9eada3.js +0 -1
- package/assets/esri/core/workers/chunks/ca7d4d76a6bf5a3046cd.js +0 -1
- package/assets/esri/core/workers/chunks/cffef41791f0cfa6c26c.js +0 -1
- package/assets/esri/core/workers/chunks/d26b1a9f47b4b2744c89.js +0 -1
- package/assets/esri/core/workers/chunks/d4a96f0402172787823a.js +0 -1
- package/assets/esri/core/workers/chunks/d9fcc63df008f687848a.js +0 -1
- package/assets/esri/core/workers/chunks/e3a4695c31d3f9d55213.js +0 -1
- package/assets/esri/core/workers/chunks/e65d291bab13f7f5323b.js +0 -1
- package/assets/esri/core/workers/chunks/eeee7421f64a52074ff4.js +0 -1
- package/assets/esri/core/workers/chunks/eef7e0bee19c4258ba55.js +0 -1
- package/assets/esri/core/workers/chunks/efaf998d18479a0380ae.js +0 -1
- package/assets/esri/core/workers/chunks/f0573db9a3d3e1499a7e.js +0 -1
- package/assets/esri/core/workers/chunks/f07722efd7fa2b75d4dd.js +0 -1
- package/assets/esri/core/workers/chunks/f137e544076482e348ad.js +0 -1
- package/assets/esri/core/workers/chunks/fd53ef66176ae164e221.js +0 -1
- package/assets/esri/core/workers/chunks/fd956a58787020d610af.js +0 -1
- package/rest/sharedTemplates/addSharedTemplates.js +0 -2
- package/support/featureFlags.js +0 -2
- package/views/2d/engine/webgl/ClippingInfo.js +0 -2
- package/views/2d/engine/webgl/Mesh2D.js +0 -2
- package/views/2d/engine/webgl/shaderGraph/GLSLShaderModule.js +0 -2
- package/views/2d/layers/features/ProcessorTileMessageQueue.js +0 -2
- package/views/3d/support/AsyncWorkerQueue.js +0 -2
- package/views/3d/webgl-engine/lib/PathGeometryData.js +0 -2
- package/widgets/BatchAttributeForm/templates/support/contingentValuesUtils.js +0 -2
- package/widgets/OrientedImageryViewer/components/NavigationAction.js +0 -2
- package/widgets/OrientedImageryViewer/components/NavigationActions.js +0 -2
- package/widgets/OrientedImageryViewer/support/NonPanoramicMediaCollection.js +0 -2
- package/widgets/PanoramicViewer/support/PanoramicMediaCollection.js +0 -2
package/chunks/Path.glsl.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{addNearFar as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{Offset as r}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as
|
|
2
|
+
import{addNearFar as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{Offset as r}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as o}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as a}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{PathVertexPosition as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{OutputDepth as n}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as l}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as s,addAmbientBoostFactor as c,addLightingGlobalFactor as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{NormalUtils as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRenderingParameters as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDrawFragment as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{ColorConversion as w}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as f,addCameraPosition as h,addViewNormal as y}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as L}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as j,If as P}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{SnowCover as V}from"../views/3d/webgl-engine/effects/snowcover/SnowCover.glsl.js";import{outputColorHighlightOLID as S}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as C}from"../views/webgl/ShaderBuilder.js";function O(O){const A=new C,{vertex:I,fragment:B,varyings:_}=A;f(I,O),_.add("vpos","vec3",{invariant:!0}),A.include(d,O);const{output:D,spherical:M,pbrMode:F,snowCover:k,offsetBackfaces:z}=O,E=11===D;switch((o(D)||E)&&(E?(A.varyings.add("objectAndLayerIdColorVarying","vec4"),A.vertex.code.add(j`void forwardObjectAndLayerIdColor() {
|
|
3
|
+
objectAndLayerIdColorVarying = getOlidColor();
|
|
4
|
+
}`),A.fragment.code.add(j`void outputObjectAndLayerIdColor() {
|
|
5
|
+
fragColor = objectAndLayerIdColorVarying;
|
|
6
|
+
}`)):(A.vertex.code.add(j`void forwardObjectAndLayerIdColor() {}`),A.fragment.code.add(j`void outputObjectAndLayerIdColor() {}`)),A.include(i),A.include(b,O),z&&(h(I,O),A.include(r)),_.add("vnormal","vec3"),_.add("vcolor","vec4"),I.main.add(j`
|
|
3
7
|
ExtrudedVertex extrudedVertex = evaluateVertex();
|
|
4
8
|
vpos = calculateVPos(extrudedVertex);
|
|
5
9
|
vnormal = normalize(localNormal(extrudedVertex));
|
|
6
10
|
gl_Position = transformPosition(proj, view, vpos);
|
|
7
|
-
${P(
|
|
11
|
+
${P(z,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vnormal, cameraPosition);")}
|
|
8
12
|
|
|
9
13
|
forwardObjectAndLayerIdColor();
|
|
10
14
|
vcolor = getColor();
|
|
11
|
-
forwardLinearDepthToReadShadowMap();`)),
|
|
15
|
+
forwardLinearDepthToReadShadowMap();`)),D){case 0:case 1:case 2:A.include(p,O),B.include(s,O),B.include(t,O),A.include(v,O),B.include(a,O),A.include(S,O),h(B,O),c(B),m(B),B.uniforms.add(I.uniforms.get("localOrigin"),new x("ambient",e=>e.ambient),new x("diffuse",e=>e.diffuse),new L("opacity",e=>e.opacity)),B.include(w),B.include(V,O),g(B),B.main.add(j`
|
|
12
16
|
discardBySlice(vpos);
|
|
13
17
|
|
|
14
18
|
shadingParams.viewDirection = normalize(vpos - cameraPosition);
|
|
@@ -17,12 +21,12 @@ import{addNearFar as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardL
|
|
|
17
21
|
float ssao = evaluateAmbientOcclusionInverse();
|
|
18
22
|
|
|
19
23
|
vec3 posWorld = vpos + localOrigin;
|
|
20
|
-
vec3 normalGround = ${
|
|
24
|
+
vec3 normalGround = ${M?"normalize(posWorld);":"vec3(0.0, 0.0, 1.0);"}
|
|
21
25
|
|
|
22
26
|
vec3 albedo = vcolor.rgb * max(ambient, diffuse); // combine the old material parameters into a single one
|
|
23
27
|
float combinedOpacity = vcolor.a * opacity;
|
|
24
28
|
|
|
25
|
-
${P(
|
|
29
|
+
${P(k,j`float snow = getSnow(normal, normalGround);
|
|
26
30
|
albedo = mix(albedo, vec3(1), snow);
|
|
27
31
|
ssao = mix(ssao, 1.0, snow);`)}
|
|
28
32
|
|
|
@@ -30,23 +34,23 @@ import{addNearFar as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardL
|
|
|
30
34
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
31
35
|
float shadow = readShadow(additionalAmbientScale, vpos);
|
|
32
36
|
|
|
33
|
-
${P(2===
|
|
37
|
+
${P(2===F,`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];\n ${P(k,"mrr = applySnowToMRR(mrr, snow);")}`)}
|
|
34
38
|
|
|
35
|
-
vec3 shadedColor = ${2===
|
|
39
|
+
vec3 shadedColor = ${2===F?"evaluateSceneLightingPBR(normal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, additionalAmbientIrradiance);":"evaluateSceneLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight);"}
|
|
36
40
|
vec4 finalColor = vec4(shadedColor, combinedOpacity);
|
|
37
|
-
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${P(
|
|
41
|
+
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${P(k,", snow")});`);break;case 3:A.include(i),I.main.add(j`ExtrudedVertex extrudedVertex = evaluateVertex();
|
|
38
42
|
vpos = calculateVPos(extrudedVertex);
|
|
39
|
-
gl_Position = transformPosition(proj, view, vpos);`),
|
|
43
|
+
gl_Position = transformPosition(proj, view, vpos);`),A.fragment.include(a,O),B.main.add(j`discardBySlice(vpos);`);break;case 5:case 6:case 7:case 8:A.include(i),e(A),_.add("depth","float"),I.main.add(j`ExtrudedVertex extrudedVertex = evaluateVertex();
|
|
40
44
|
vpos = calculateVPos(extrudedVertex);
|
|
41
|
-
gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);`),
|
|
42
|
-
outputDepth(depth);`);break;case 11:
|
|
43
|
-
outputObjectAndLayerIdColor();`);break;case 4:
|
|
45
|
+
gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);`),A.fragment.include(a,O),A.include(n,O),B.main.add(j`discardBySlice(vpos);
|
|
46
|
+
outputDepth(depth);`);break;case 11:A.fragment.include(a,O),B.main.add(j`discardBySlice(vpos);
|
|
47
|
+
outputObjectAndLayerIdColor();`);break;case 4:A.include(i),A.include(u,O),y(I),_.add("vnormal","vec3"),I.main.add(j`ExtrudedVertex extrudedVertex = evaluateVertex();
|
|
44
48
|
vpos = calculateVPos(extrudedVertex);
|
|
45
49
|
vnormal = normalize((viewNormal * vec4(localNormal(extrudedVertex), 1.0)).xyz);
|
|
46
|
-
gl_Position = transformPosition(proj, view, vpos);`),
|
|
50
|
+
gl_Position = transformPosition(proj, view, vpos);`),A.fragment.include(a,O),B.main.add(j`discardBySlice(vpos);
|
|
47
51
|
vec3 normal = normalize(vnormal);
|
|
48
52
|
if (gl_FrontFacing == false) normal = -normal;
|
|
49
|
-
fragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);`);break;case 10:
|
|
53
|
+
fragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);`);break;case 10:A.include(i),A.include(u,O),_.add("vnormal","vec3"),I.main.add(j`ExtrudedVertex extrudedVertex = evaluateVertex();
|
|
50
54
|
vpos = calculateVPos(extrudedVertex);
|
|
51
|
-
gl_Position = transformPosition(proj, view, vpos);`),
|
|
52
|
-
calculateOcclusionAndOutputHighlight();`)}return
|
|
55
|
+
gl_Position = transformPosition(proj, view, vpos);`),A.fragment.include(a,O),A.include(l,O),B.main.add(j`discardBySlice(vpos);
|
|
56
|
+
calculateOcclusionAndOutputHighlight();`)}return A}const A=Object.freeze(Object.defineProperty({__proto__:null,build:O},Symbol.toStringTag,{value:"Module"}));export{A as P,O as b};
|
package/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.
|
|
2
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.37";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import
|
|
2
|
+
import e from"../Accessor.js";import t from"../Collection.js";import{getProperties as n}from"./utils.js";const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function r(t){return t instanceof e}function l(e){return e instanceof t?Object.keys(e.items):r(e)?n(e).keys():e?Object.keys(e):[]}function f(e,n){return e instanceof t?e.items[n]:e[n]}function i(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}function c(e){return e?e.declaredClass:null}function u(e,t){const n=e.diff;if(n&&"function"==typeof n)return n(e,t);const s=l(e),p=l(t);if(0===s.length&&0===p.length)return;if(!s.length||!p.length||i(e,t))return{type:"complete",oldValue:e,newValue:t};const a=p.filter(e=>!s.includes(e)),y=s.filter(e=>!p.includes(e)),m=s.filter(n=>p.includes(n)&&f(e,n)!==f(t,n)).concat(a,y).sort(),d=c(e);if(d&&o.has(d)&&m.length)return{type:"complete",oldValue:e,newValue:t};let h;const b=r(e)&&r(t);for(const o of m){const r=f(e,o),l=f(t,o);let i;if((b||"function"!=typeof r&&"function"!=typeof l)&&(r!==l&&(null!=r||null!=l))){if(n&&n[o]&&"function"==typeof n[o])i=n[o]?.(r,l);else if(r instanceof Date&&l instanceof Date){if(r.getTime()===l.getTime())continue;i={type:"complete",oldValue:r,newValue:l}}else i="object"==typeof r&&"object"==typeof l&&c(r)===c(l)?u(r,l):{type:"complete",oldValue:r,newValue:l};null!=i&&(null!=h?h.diff[o]=i:h={type:"partial",diff:{[o]:i}})}}return h}function s(e,t){if(null==e)return!1;const n=t.split(".");let o=e;for(const r of n){if("complete"===o.type)return!0;if("partial"!==o.type)return!1;{const e=o.diff[r];if(!e)return!1;o=e}}return!0}function p(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:u(e,t)}function a(e){if(null==e)return!0;switch(e.type){case"complete":return!1;case"collection":{const t=e;for(const e of t.added)if(!a(e))return!1;for(const e of t.removed)if(!a(e))return!1;for(const e of t.changed)if(!a(e))return!1;return!0}case"partial":for(const t in e.diff){if(!a(e.diff[t]))return!1}return!0}}export{p as diff,s as hasDiff,a as isEmpty};
|
package/core/has.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const e=globalThis,a={...e.esriConfig?.has};function has(d){return"function"==typeof a[d]?a[d]=a[d](e):a[d]}has.add=(e,d,r,t)=>{(t||void 0===a[e])&&(a[e]=d),r&&has(e)},has.cache=a,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),has.add("esri-cim-animations-enable-status","enabled"),has.add("esri-cim-animations-spotlight",!1),has.add("esri-cim-animations-freeze-time",!1),(()=>{has.add("host-webworker",void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope);const a="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",a),has.add("host-node",!("object"!=typeof e.process||!e.process.versions?.node||!e.process.versions.v8)),has.add("dom",a),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,r=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?r:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",r=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,r),has.add("ios",r)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",r),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(e.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in e),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",()=>{const a="SharedArrayBuffer"in e,d=!1===e.crossOriginIsolated;return a&&!d}),has.add("wasm-simd",()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))}),has.add("esri-atomics","Atomics"in e),has.add("esri-workers","Worker"in e),has.add("web-feat:cache","caches"in e),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("min-workers-pool-size",2),has.add("max-workers-pool-size",has("esri-mobile")?3:8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-hybrid-tile-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-initial-tolerance",0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-multipoint-min-threshold",2e4),has.add("featurelayer-snapshot-multipoint-max-threshold",1e5),has.add("featurelayer-snapshot-polygon-min-threshold",2e3),has.add("featurelayer-snapshot-polygon-max-threshold",2e3),has.add("featurelayer-snapshot-polyline-min-threshold",2e3),has.add("featurelayer-snapshot-polyline-max-threshold",2e3),has.add("featurelayer-snapshot-max-vertex-count",25e4),has.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled",!0),has.add("featurelayer-snapshot-concurrency",4),has.add("featurelayer-snapshot-allow-editable",!1),has.add("featurelayer-snapshot-coverage",.1),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-max-page-size",8e3),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-query-tile-concurrency",4),has.add("featurelayer-query-tile-max-features",6e5),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("featurelayer-pbf-true-curves",!0),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("featurelayer-relative-time-queries-enabled",!0),has.add("featurelayer-relative-time-queries-bin-window-public",1),has.add("featurelayer-relative-time-queries-bin-window-private",60),has.add("parquetlayer-full-query-feature-count",5e5),has.add("parquetlayer-persistence-enabled",!0),has.add("parquetlayer-cache-enabled",!0),has.add("parquetlayer-legacy-field-overrides-enabled",!1),has.add("mapview-transitions-duration",200),has.add("mapview-essential-goto-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("request-queue-concurrency-global",64),has.add("request-queue-concurrency-hosted",16),has.add("request-queue-concurrency-non-hosted",16),has.add("curve-densification-coarse-segments",128),has.add("curve-densification-max-segments",2e3),has.add("curve-densification-min-segments",3),has.add("curve-densification-pixel-deviation",.5),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has.add("enable-feature:analysis-drawtool-line-of-sight",!1),has.add("enable-feature:analysis-drawtool-line-of-sight-placement-visuals",!1),has.add("enable-feature:esri-compress-textures",!0),has.add("enable-feature:analysis-new-viewshed-tool",!
|
|
2
|
+
const e=globalThis,a={...e.esriConfig?.has};function has(d){return"function"==typeof a[d]?a[d]=a[d](e):a[d]}has.add=(e,d,r,t)=>{(t||void 0===a[e])&&(a[e]=d),r&&has(e)},has.cache=a,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),has.add("esri-cim-animations-enable-status","enabled"),has.add("esri-cim-animations-spotlight",!1),has.add("esri-cim-animations-freeze-time",!1),(()=>{has.add("host-webworker",void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope);const a="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",a),has.add("host-node",!("object"!=typeof e.process||!e.process.versions?.node||!e.process.versions.v8)),has.add("dom",a),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,r=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?r:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",r=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,r),has.add("ios",r)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",r),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(e.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in e),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",()=>{const a="SharedArrayBuffer"in e,d=!1===e.crossOriginIsolated;return a&&!d}),has.add("wasm-simd",()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))}),has.add("esri-atomics","Atomics"in e),has.add("esri-workers","Worker"in e),has.add("web-feat:cache","caches"in e),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("min-workers-pool-size",2),has.add("max-workers-pool-size",has("esri-mobile")?3:8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-hybrid-tile-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-initial-tolerance",0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-multipoint-min-threshold",2e4),has.add("featurelayer-snapshot-multipoint-max-threshold",1e5),has.add("featurelayer-snapshot-polygon-min-threshold",2e3),has.add("featurelayer-snapshot-polygon-max-threshold",2e3),has.add("featurelayer-snapshot-polyline-min-threshold",2e3),has.add("featurelayer-snapshot-polyline-max-threshold",2e3),has.add("featurelayer-snapshot-max-vertex-count",25e4),has.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled",!0),has.add("featurelayer-snapshot-concurrency",4),has.add("featurelayer-snapshot-allow-editable",!1),has.add("featurelayer-snapshot-coverage",.1),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-max-page-size",8e3),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-query-tile-concurrency",4),has.add("featurelayer-query-tile-max-features",6e5),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("featurelayer-pbf-true-curves",!0),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("featurelayer-relative-time-queries-enabled",!0),has.add("featurelayer-relative-time-queries-bin-window-public",1),has.add("featurelayer-relative-time-queries-bin-window-private",60),has.add("parquetlayer-full-query-feature-count",5e5),has.add("parquetlayer-persistence-enabled",!0),has.add("parquetlayer-cache-enabled",!0),has.add("parquetlayer-legacy-field-overrides-enabled",!1),has.add("mapview-transitions-duration",200),has.add("mapview-essential-goto-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("request-queue-concurrency-global",64),has.add("request-queue-concurrency-hosted",16),has.add("request-queue-concurrency-non-hosted",16),has.add("curve-densification-coarse-segments",128),has.add("curve-densification-max-segments",2e3),has.add("curve-densification-min-segments",3),has.add("curve-densification-pixel-deviation",.5),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has.add("enable-feature:analysis-drawtool-line-of-sight",!1),has.add("enable-feature:analysis-drawtool-line-of-sight-placement-visuals",!1),has.add("enable-feature:esri-compress-textures",!0),has.add("enable-feature:analysis-new-viewshed-tool",!0),has.add("enable-feature:basemap-groundlayers",!0),has.add("enable-feature:im-shading",!0),has.add("enable-feature:im-vertex-normals",!0),!has("host-webworker")&&has("host-browser")&&(has.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),has.add("esri-url-encodes-apostrophe",()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})();export{has as default};
|
package/geometry/FlatGeometry.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__addDisposableResource as t,__disposeResources as e}from"tslib";import{baseTypedSubArrayMemory as r}from"../core/memoryEstimations.js";import s from"./SpatialReference.js";import{empty as n,expandWithExtent as i}from"./support/aaBoundingBox.js";import{empty as a,expandExtentInPlace as o}from"./support/aaBoundingRect.js";import{isPoint as u,isMultipoint as h,isPolyline as l,isGeometryWithM as c,isGeometryWithZ as g}from"./support/jsonTypeUtils.js";import{equals as f}from"./support/spatialReferenceUtils.js";import{interpolateCircle as m}from"./support/curves/circleUtils.js";import{deriveCircleFromCircularArc as p}from"./support/curves/circularArcUtils.js";import{curveExtent as x}from"./support/curves/curveExtent.js";import{getEndpoint as v,isCurvedGeometry as d,isEllipticArc7 as y,isEllipticArc4 as C,isCircularArc as M,isBezierCurve as E}from"./support/curves/curveUtils.js";import{deriveCircleFromEllipticArc4 as O}from"./support/curves/ellipticArc4Utils.js";import{deriveEllipse as S,interpolateEllipse as P}from"./support/curves/ellipticArc7Utils.js";import _ from"../layers/graphics/OptimizedGeometry.js";class A{constructor({type:t,spatialReference:e,vertexCount:r,vertexXY:s,vertexZ:n,vertexM:i,partCount:a,partOffsets:o,partFlags:u,segmentFlags:h,segmentIndices:l,segmentParams:c,segmentCountArc:g,segmentCountBezier:f}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=t,this.spatialReference=e,this.vertexCount=r,this.vertexXY=s,this.vertexZ=n,this.vertexM=i,this.partCount=a,this.partOffsets=o,this.partFlags=u,this.segmentFlags=h,this.segmentIndices=l,this.segmentParams=c,this.segmentCountArc=g,this.segmentCountBezier=f}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:t,segmentCountArc:e,segmentCountBezier:r}=this;return t&&t-e-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function t(t){return t?r+t.byteLength:0}return t(this.vertexXY)+t(this.vertexZ)+t(this.vertexM)+t(this.partOffsets)+t(this.partFlags)+t(this.segmentFlags)+t(this.segmentIndices)+t(this.segmentParams)}clone(){const{type:t,vertexCount:e,partCount:r,hasZ:s,hasM:n,segmentCountArc:i,segmentCountBezier:a}=this,o=U(t,e,r,s,n,this.hasCurves(),i,a);o.spatialReference=this.spatialReference;const{vertexXY:u,vertexZ:h,vertexM:l}=this;if(o.vertexXY.set(u.subarray(0,2*e),0),o.vertexZ?.set(h.subarray(0,e),0),o.vertexM?.set(l.subarray(0,e),0),this.isMultipart()){const{partOffsets:t,partFlags:e}=this;o.partFlags.set(e.subarray(0,r+1)),o.partOffsets.set(t.subarray(0,r+1))}if(this.hasCurves()){const{segmentFlags:t,segmentIndices:r,segmentParams:s,segmentParamCount:n}=this;o.segmentFlags.set(t.subarray(0,e),0),o.segmentIndices.set(r.subarray(0,e),0),o.segmentParams.set(s.subarray(0,n),0)}return o}equals(t){return this.equalsWithinTolerance(t,0)}equalsWithinTolerance(t,e){if(null==t)return!1;if(this===t)return!0;if(!f(this.spatialReference,t.spatialReference))return!1;if(this.vertexCount!==t.vertexCount||this.partCount!==t.partCount)return!1;if(this.hasZ!==t.hasZ||this.hasM!==t.hasM)return!1;if(this.hasCurves()!==t.hasCurves()||this.segmentCountArc!==t.segmentCountArc||this.segmentCountBezier!==t.segmentCountBezier)return!1;const r=0===e?(t,e)=>t!==e||isNaN(t)!==isNaN(e):(t,r)=>Math.abs(t-r)>e||isNaN(t)!==isNaN(r);for(let s=0;s<this.vertexCount;++s)if(r(this.vertexXY[2*s],t.vertexXY[2*s])||r(this.vertexXY[2*s+1],t.vertexXY[2*s+1]))return!1;if(this.hasZ)for(let s=0;s<this.vertexCount;++s)if(r(this.vertexZ[s],t.vertexZ[s]))return!1;if(this.hasM)for(let s=0;s<this.vertexCount;++s)if(r(this.vertexM[s],t.vertexM[s]))return!1;for(let s=0;s<this.partCount;++s)if(this.partFlags[s]!==t.partFlags[s]||this.partOffsets[s]!==t.partOffsets[s])return!1;if(this.hasCurves()){for(let e=0;e<this.vertexCount;++e)if(this.segmentFlags[e]!==t.segmentFlags[e]||this.segmentIndices[e]!==t.segmentIndices[e])return!1;for(let e=0;e<this.segmentParamCount;++e)if(r(this.segmentParams[e],t.segmentParams[e]))return!1}return!0}get parts(){return this.isMultipart()?new F(this):[][Symbol.iterator]()}}class F{constructor(t){this.geometry=t,this.value=new Z(t)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class Z{constructor(t){this.geometry=t,this.index=-1,this._readVertex=j(t),this._segments=new R(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const t=this.geometry.partOffsets;return t[this.index+1]-t[this.index]}}class R{constructor(t){this._part=t,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===t.geometry.type,this.value=new V(t.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const t=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=t&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:t}=this._part,e=this._part.geometry.partOffsets;this._partStart=e[t],this._partEnd=e[t+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class V{constructor(t){this.geometry=t,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=j(t)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const t=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===t)return this.end;const e=this.geometry.segmentParams;let r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===t){const t=e[r++],s=e[r++],n=e[r++],i=e[r++];return{b:[this.end,[t,s],[n,i]]}}const s=e[r++],n=e[r++],i=e[r++],a=e[r++],o=e[r++],u=e[r++];r++,r++;const h=e[r++],l=e[r++];if(!Boolean(4&s)&&1===i)return{c:[this.end,[h,l]]};const c=2&s?0:1,g=1&s?0:1;return{a:[this.end,[o,u],c,g,a,n,i]}}}function Y(r){let s;const{vertexCount:n,vertexXY:i,vertexZ:o,vertexM:u}=r,h=k(r);if(r.hasCurves()){const n={stack:[],error:void 0,hasError:!1};try{t(n,new z(r,["vertexZ","vertexM"]),!1);const e=a();for(const t of r.parts){let r=t.startVertex;for(const{curve:s}of t.segments)x(e,r,s),r=v(s)}const[i,o,u,l]=e;s={xmin:i,ymin:o,xmax:u,ymax:l,spatialReference:h}}catch(l){n.error=l,n.hasError=!0}finally{e(n)}}else{let t,e,r,a;t=e=1/0,r=a=-1/0;for(let s=0;s<n;++s){const n=i[2*s],o=i[2*s+1];t=Math.min(t,n),r=Math.max(r,n),e=Math.min(e,o),a=Math.max(a,o)}s={xmin:t,ymin:e,xmax:r,ymax:a,spatialReference:h}}if(o){let t=1/0,e=-1/0;for(const r of o)t=Math.min(t,r),e=Math.max(e,r);s.zmin=t,s.zmax=e}if(u){let t=1/0,e=-1/0;for(const r of u)t=Math.min(t,r),e=Math.max(e,r);s.mmin=t,s.mmax=e}return s}function b(r,s){const n={stack:[],error:void 0,hasError:!1};try{s??=a();t(n,new z(r,["vertexZ","vertexM","spatialReference"]),!1);return o(s,Y(r)),s}catch(i){n.error=i,n.hasError=!0}finally{e(n)}}function w(r,s){const a={stack:[],error:void 0,hasError:!1};try{s??=n();t(a,new z(r,["vertexM","spatialReference"]),!1);return i(s,Y(r)),s}catch(o){a.error=o,a.hasError=!0}finally{e(a)}}function I(t){let e,r,s;if(u(t)){s="point";const{x:n,y:i,z:a,m:o}=t,u=[n,i];null!=a&&u.push(a),null!=o&&u.push(o),r=[[u]],e=1}else h(t)?(s="multipoint",r=[t.points],e=t.points.length):l(t)?(s="polyline",r=t.curvePaths??t.paths,e=r.reduce((t,e)=>t+e.length,0)):(s="polygon",r=t.curveRings??t.rings,e=r.reduce((t,e)=>(0===e.length||(t+=e.length,W(e[0],v(e.at(-1)))&&--t),t),0));const n=U(s,e,s.includes("point")?0:r.length,g(t),c(t),d(t)),{hasZ:i,hasM:a,vertexXY:o,vertexZ:f,vertexM:m}=n;function p(t){o[2*O]=t[0],o[2*O+1]=t[1],i&&(f[O]=t[2]),a&&(m[O]=t[x]),++O}n.spatialReference=t.spatialReference??void 0;const x=n.hasZ?3:2;let O=0;if(!n.isMultipart()){if(!i&&!a){for(const[t,e]of r[0])o[2*O]=t,o[2*O+1]=e,++O;return n}for(const t of r[0])p(t);return n}const S="polygon"===s,{partOffsets:P}=n;let _=0;if(!d(t)){for(const t of r){if(P[_++]=O,0===t.length)continue;let e=t.length;if(S&&W(t[0],t.at(-1))&&--e,i||a)for(let r=0;r<e;++r)p(t[r]);else for(let r=0;r<e;++r){const[e,s]=t[r];o[2*O]=e,o[2*O+1]=s,++O}}return P[_]=O,n}function A(t){const e=F+t;if(e<=(n.segmentParams?.length??0))return;let r=e*K;r=20*Math.ceil(r/20);const s=n.segmentParams;n.segmentParams=new Float64Array(r),null!=s&&n.segmentParams.set(s)}let F=0;for(const u of r){if(n.partOffsets[_++]=O,0===u.length)continue;const t=u[0];let e=t;for(let r=1;r<u.length;++r){const t=u[r];p(e);const s=O-1;y(t)?(A(10),++n.segmentCountArc,F=D(e,t,n,s,F),e=t.a[0]):C(t)?(A(10),++n.segmentCountArc,F=q(e,t,n,s,F),e=t.a[0]):M(t)?(A(10),++n.segmentCountArc,F=G(e,t,n,s,F),e=t.c[0]):E(t)?(A(4),++n.segmentCountBezier,F=H(e,t,n,s,F),e=t.b[0]):e=t}S&&W(t,e)||p(e)}return n.partOffsets[_]=O,n}function X(t){const e=j(t),{vertexCount:r,partCount:s,hasZ:n,hasM:i}=t,a=k(t);if("point"===t.type){const[e,r]=t.vertexXY,s=t.vertexZ?.[0],n=t.vertexM?.[0];return{x:e,y:r,z:s,m:n,spatialReference:a}}let o=0;if("multipoint"===t.type){const t=[];for(;o<r;)t.push(e(o++));return{points:t,spatialReference:a,hasZ:n,hasM:i}}const u="polygon"===t.type;if(!t.hasCurves()){const r=new Array;for(let n=0;n<s;++n){const s=t.partOffsets[n+1],i=new Array;for(;o<s;)i.push(e(o++));u&&i.length>0&&i.push(i[0]),r.push(i)}return u?{rings:r,hasZ:n,hasM:i,spatialReference:a}:{paths:r,hasZ:n,hasM:i,spatialReference:a}}const h=new Array;for(const{segments:l,startVertex:c}of t.parts){const t=[c];for(const{curve:e}of l)t.push(e);h.push(t)}return u?{rings:[],curveRings:h,hasZ:n,hasM:i,spatialReference:a}:{paths:[],curvePaths:h,hasZ:n,hasM:i,spatialReference:a}}function B(t,{lengths:e,coords:r,hasZ:s,hasM:n},i){const a=t.includes("point")?0:e.length,o="polygon"===t,u="point"===t?1:e.reduce((t,e)=>t+e,0)-(o?a:0);s??=!1,n??=!1;const h=U(t,u,a,s,n,!1,0,0);if(h.spatialReference=i??void 0,!h.isMultipart()){for(let t=0,e=0;t<u;++t)h.vertexXY[2*t]=r[e++],h.vertexXY[2*t+1]=r[e++],s&&(h.vertexZ[t]=r[e++]),n&&(h.vertexM[t]=r[e++]);return h}const l=2+Number(s)+Number(n);let c=0,g=0;h.partOffsets[0]=0;for(const f of e){const t=h.partOffsets[g],e=t+f-Number(o);h.partOffsets[++g]=e;for(let i=t;i<e;++i)h.vertexXY[2*i]=r[c++],h.vertexXY[2*i+1]=r[c++],s&&(h.vertexZ[i]=r[c++]),n&&(h.vertexM[i]=r[c++]);o&&(c+=l)}return h}function L({type:t,vertexCount:e,vertexXY:r,vertexZ:s,vertexM:n,partCount:i,partOffsets:a,hasZ:o,hasM:u}){const h=new _([],[],o,u);i=Math.max(i,1);const l="polygon"===t;let c=0;for(let g=0;g<i;++g){const t=a?.[g+1]??e,i=h.coords.length;for(let e=c;e<t;++e)h.coords.push(r[2*e],r[2*e+1]),o&&h.coords.push(s[e]),u&&h.coords.push(n[e]);if(l){const t=c;h.coords.push(r[2*t],r[2*t+1]),o&&h.coords.push(s[t]),u&&h.coords.push(n[t])}h.lengths.push((h.coords.length-i)/h.stride),c=t}return"point"===t&&(h.lengths.length=0),h}function N(t,e){return"getSpatialReference"in t&&(e=T(t.getSpatialReference()),t=t.getGeometry()),new A({...t.toFlatGeometry(),spatialReference:e})}function T(t){if(null==t)return;const e=t.getText()||void 0,r=t.isCustomWkid()?0:t.getOldID();if(r<=0)return{wkt:e};let s=t.getLatestID();(s<=0||s===r)&&(s=void 0);const n=t.getVCS();if(null==n)return{wkid:r,latestWkid:s,wkt:e};const i=n.isCustomWkid()?0:n.getOldID();if(i<=0)return{wkt:e};let a=t.getLatestVerticalID();return(a<=0||a===i)&&(a=void 0),{wkid:r,wkt:e,latestWkid:s,vcsWkid:i,latestVcsWkid:a}}class z{constructor(t,e){this.target=t,this.keys=e,this.oldValues=e.map(e=>t[e]);for(const r of e)t[r]=void 0}[Symbol.dispose](){this.keys.map((t,e)=>{this.target[t]=this.oldValues[e]})}}function k({spatialReference:t}){return t instanceof s?t.toJSON():t}function j({vertexXY:t,vertexZ:e,vertexM:r}){return e?r?s=>[t[2*s],t[2*s+1],e[s],r[s]]:r=>[t[2*r],t[2*r+1],e[r]]:r?e=>[t[2*e],t[2*e+1],r[e]]:e=>[t[2*e],t[2*e+1]]}function W(t,e){return t.every((t,r)=>t===e[r])}function U(t,e,r,s,n,i,a,o){a??=0,o??=0;const u=new A({type:t,vertexCount:e,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:a,segmentCountBezier:o});let h=2*Float64Array.BYTES_PER_ELEMENT*e;s&&(h+=Float64Array.BYTES_PER_ELEMENT*e),n&&(h+=Float64Array.BYTES_PER_ELEMENT*e),u.isMultipart()&&(h+=(r+1)*Int32Array.BYTES_PER_ELEMENT,h+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(h+=e*Int8Array.BYTES_PER_ELEMENT,h+=e*Int32Array.BYTES_PER_ELEMENT,h+=u.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const l=new ArrayBuffer(h);let c=0;return u.vertexXY=new Float64Array(l,c,2*e),c+=u.vertexXY.byteLength,s&&(u.vertexZ=new Float64Array(l,c,e),c+=u.vertexZ.byteLength),n&&(u.vertexM=new Float64Array(l,c,e),c+=u.vertexM.byteLength),i&&(u.segmentParams=new Float64Array(l,c,u.segmentParamCount),c+=u.segmentParams.byteLength,u.segmentIndices=new Int32Array(l,c,e),u.segmentIndices.fill(Q),c+=u.segmentIndices.byteLength),u.isMultipart()&&(u.partOffsets=new Int32Array(l,c,r+1),c+=u.partOffsets.byteLength,u.partFlags=new Int8Array(l,c,r+1),c+=u.partFlags.byteLength,"polygon"===u.type&&u.partFlags.subarray(0,r).fill(1)),i&&(u.segmentFlags=new Int8Array(l,c,e),u.segmentFlags.fill(1),c+=u.segmentFlags.byteLength),u}function D(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;const[o,[u,h],l,c,g,f,m]=e.a;let p=4;c||(p|=1),l||(p|=2);const x=S(t,e),[v,d]=P(x,.5);return n[a++]=p,n[a++]=f,n[a++]=m,n[a++]=g,n[a++]=u,n[a++]=h,n[a++]=x.u2-x.u1,n[a++]=x.u1,n[a++]=v,n[a++]=d,a}function q(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;const o=O(t,e);return J(o,4,...m(o,.5),n,a)}function G(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;return J(p(t,e),0,...e.c[1],n,a)}function J(t,e,r,s,n,i){const{cx:a,cy:o,thetaStart:u,thetaEnd:h,radius:l}=t;u>h||(e|=1);return Math.abs(h-u)<=Math.PI||(e|=2),n[i++]=e,n[i++]=l,n[i++]=1,n[i++]=0,n[i++]=a,n[i++]=o,n[i++]=h-u,n[i++]=u,n[i++]=r,n[i++]=s,i}function H(t,{b:[e,[r,s],[n,i]]},{segmentFlags:a,segmentIndices:o,segmentParams:u},h,l){return a[h]=2,o[h]=l,u[l++]=r,u[l++]=s,u[l++]=n,u[l++]=i,l}const K=1.61803,Q=-1;export{A as FlatGeometry,U as allocateFlatGeometry,X as convertFlatToGeometryJSON,L as convertFlatToOptimizedGeometry,I as convertGeometryToFlat,N as convertGeometryxToFlat,B as convertOptimizedGeometryToFlat,w as getBoundingBox,b as getBoundingRect,Y as getExtentJSON,H as writeBezierCurveSegment,G as writeCircularArcSegment,q as writeEllipticArc4Segment,D as writeEllipticArc7Segment};
|
|
2
|
+
import{__addDisposableResource as t,__disposeResources as e}from"tslib";import{baseTypedSubArrayMemory as r}from"../core/memoryEstimations.js";import s from"./SpatialReference.js";import{empty as n,expandExtentInPlace as i}from"./support/aaBoundingRect.js";import{isPoint as a,isMultipoint as o,isPolyline as u,isGeometryWithM as h,isGeometryWithZ as l}from"./support/jsonTypeUtils.js";import{equals as c}from"./support/spatialReferenceUtils.js";import{interpolateCircle as g}from"./support/curves/circleUtils.js";import{deriveCircleFromCircularArc as f}from"./support/curves/circularArcUtils.js";import{curveExtent as m}from"./support/curves/curveExtent.js";import{getEndpoint as p,isCurvedGeometry as x,isEllipticArc7 as v,isEllipticArc4 as d,isCircularArc as y,isBezierCurve as C}from"./support/curves/curveUtils.js";import{deriveCircleFromEllipticArc4 as M}from"./support/curves/ellipticArc4Utils.js";import{deriveEllipse as E,interpolateEllipse as O}from"./support/curves/ellipticArc7Utils.js";import S from"../layers/graphics/OptimizedGeometry.js";class P{constructor({type:t,spatialReference:e,vertexCount:r,vertexXY:s,vertexZ:n,vertexM:i,partCount:a,partOffsets:o,partFlags:u,segmentFlags:h,segmentIndices:l,segmentParams:c,segmentCountArc:g,segmentCountBezier:f}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=t,this.spatialReference=e,this.vertexCount=r,this.vertexXY=s,this.vertexZ=n,this.vertexM=i,this.partCount=a,this.partOffsets=o,this.partFlags=u,this.segmentFlags=h,this.segmentIndices=l,this.segmentParams=c,this.segmentCountArc=g,this.segmentCountBezier=f}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:t,segmentCountArc:e,segmentCountBezier:r}=this;return t&&t-e-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function t(t){return t?r+t.byteLength:0}return t(this.vertexXY)+t(this.vertexZ)+t(this.vertexM)+t(this.partOffsets)+t(this.partFlags)+t(this.segmentFlags)+t(this.segmentIndices)+t(this.segmentParams)}clone(){const{type:t,vertexCount:e,partCount:r,hasZ:s,hasM:n,segmentCountArc:i,segmentCountBezier:a}=this,o=k(t,e,r,s,n,this.hasCurves(),i,a);o.spatialReference=this.spatialReference;const{vertexXY:u,vertexZ:h,vertexM:l}=this;if(o.vertexXY.set(u.subarray(0,2*e),0),o.vertexZ?.set(h.subarray(0,e),0),o.vertexM?.set(l.subarray(0,e),0),this.isMultipart()){const{partOffsets:t,partFlags:e}=this;o.partFlags.set(e.subarray(0,r+1)),o.partOffsets.set(t.subarray(0,r+1))}if(this.hasCurves()){const{segmentFlags:t,segmentIndices:r,segmentParams:s,segmentParamCount:n}=this;o.segmentFlags.set(t.subarray(0,e),0),o.segmentIndices.set(r.subarray(0,e),0),o.segmentParams.set(s.subarray(0,n),0)}return o}equals(t){return this.equalsWithinTolerance(t,0)}equalsWithinTolerance(t,e){if(null==t)return!1;if(this===t)return!0;if(!c(this.spatialReference,t.spatialReference))return!1;if(this.vertexCount!==t.vertexCount||this.partCount!==t.partCount)return!1;if(this.hasZ!==t.hasZ||this.hasM!==t.hasM)return!1;if(this.hasCurves()!==t.hasCurves()||this.segmentCountArc!==t.segmentCountArc||this.segmentCountBezier!==t.segmentCountBezier)return!1;const r=0===e?(t,e)=>t!==e||isNaN(t)!==isNaN(e):(t,r)=>Math.abs(t-r)>e||isNaN(t)!==isNaN(r);for(let s=0;s<this.vertexCount;++s)if(r(this.vertexXY[2*s],t.vertexXY[2*s])||r(this.vertexXY[2*s+1],t.vertexXY[2*s+1]))return!1;if(this.hasZ)for(let s=0;s<this.vertexCount;++s)if(r(this.vertexZ[s],t.vertexZ[s]))return!1;if(this.hasM)for(let s=0;s<this.vertexCount;++s)if(r(this.vertexM[s],t.vertexM[s]))return!1;for(let s=0;s<this.partCount;++s)if(this.partFlags[s]!==t.partFlags[s]||this.partOffsets[s]!==t.partOffsets[s])return!1;if(this.hasCurves()){for(let e=0;e<this.vertexCount;++e)if(this.segmentFlags[e]!==t.segmentFlags[e]||this.segmentIndices[e]!==t.segmentIndices[e])return!1;for(let e=0;e<this.segmentParamCount;++e)if(r(this.segmentParams[e],t.segmentParams[e]))return!1}return!0}get parts(){return this.isMultipart()?new _(this):[][Symbol.iterator]()}}class _{constructor(t){this.geometry=t,this.value=new A(t)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class A{constructor(t){this.geometry=t,this.index=-1,this._readVertex=T(t),this._segments=new F(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const t=this.geometry.partOffsets;return t[this.index+1]-t[this.index]}}class F{constructor(t){this._part=t,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===t.geometry.type,this.value=new Z(t.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const t=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=t&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:t}=this._part,e=this._part.geometry.partOffsets;this._partStart=e[t],this._partEnd=e[t+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class Z{constructor(t){this.geometry=t,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=T(t)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const t=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===t)return this.end;const e=this.geometry.segmentParams;let r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===t){const t=e[r++],s=e[r++],n=e[r++],i=e[r++];return{b:[this.end,[t,s],[n,i]]}}const s=e[r++],n=e[r++],i=e[r++],a=e[r++],o=e[r++],u=e[r++];r++,r++;const h=e[r++],l=e[r++];if(!Boolean(4&s)&&1===i)return{c:[this.end,[h,l]]};const c=2&s?0:1,g=1&s?0:1;return{a:[this.end,[o,u],c,g,a,n,i]}}}function R(r){let s;const{vertexCount:i,vertexXY:a,vertexZ:o,vertexM:u}=r,h=N(r);if(r.hasCurves()){const i={stack:[],error:void 0,hasError:!1};try{t(i,new L(r,["vertexZ","vertexM"]),!1);const e=n();for(const t of r.parts){let r=t.startVertex;for(const{curve:s}of t.segments)m(e,r,s),r=p(s)}const[a,o,u,l]=e;s={xmin:a,ymin:o,xmax:u,ymax:l,spatialReference:h}}catch(l){i.error=l,i.hasError=!0}finally{e(i)}}else{let t,e,r,n;t=e=1/0,r=n=-1/0;for(let s=0;s<i;++s){const i=a[2*s],o=a[2*s+1];t=Math.min(t,i),r=Math.max(r,i),e=Math.min(e,o),n=Math.max(n,o)}s={xmin:t,ymin:e,xmax:r,ymax:n,spatialReference:h}}if(o){let t=1/0,e=-1/0;for(const r of o)t=Math.min(t,r),e=Math.max(e,r);s.zmin=t,s.zmax=e}if(u){let t=1/0,e=-1/0;for(const r of u)t=Math.min(t,r),e=Math.max(e,r);s.mmin=t,s.mmax=e}return s}function V(r,s){const a={stack:[],error:void 0,hasError:!1};try{s??=n();t(a,new L(r,["vertexZ","vertexM","spatialReference"]),!1);return i(s,R(r)),s}catch(o){a.error=o,a.hasError=!0}finally{e(a)}}function Y(t){let e,r,s;if(a(t)){s="point";const{x:n,y:i,z:a,m:o}=t,u=[n,i];null!=a&&u.push(a),null!=o&&u.push(o),r=[[u]],e=1}else o(t)?(s="multipoint",r=[t.points],e=t.points.length):u(t)?(s="polyline",r=t.curvePaths??t.paths,e=r.reduce((t,e)=>t+e.length,0)):(s="polygon",r=t.curveRings??t.rings,e=r.reduce((t,e)=>(0===e.length||(t+=e.length,z(e[0],p(e.at(-1)))&&--t),t),0));const n=k(s,e,s.includes("point")?0:r.length,l(t),h(t),x(t)),{hasZ:i,hasM:c,vertexXY:g,vertexZ:f,vertexM:m}=n;function M(t){g[2*O]=t[0],g[2*O+1]=t[1],i&&(f[O]=t[2]),c&&(m[O]=t[E]),++O}n.spatialReference=t.spatialReference??void 0;const E=n.hasZ?3:2;let O=0;if(!n.isMultipart()){if(!i&&!c){for(const[t,e]of r[0])g[2*O]=t,g[2*O+1]=e,++O;return n}for(const t of r[0])M(t);return n}const S="polygon"===s,{partOffsets:P}=n;let _=0;if(!x(t)){for(const t of r){if(P[_++]=O,0===t.length)continue;let e=t.length;if(S&&z(t[0],t.at(-1))&&--e,i||c)for(let r=0;r<e;++r)M(t[r]);else for(let r=0;r<e;++r){const[e,s]=t[r];g[2*O]=e,g[2*O+1]=s,++O}}return P[_]=O,n}function A(t){const e=F+t;if(e<=(n.segmentParams?.length??0))return;let r=e*G;r=20*Math.ceil(r/20);const s=n.segmentParams;n.segmentParams=new Float64Array(r),null!=s&&n.segmentParams.set(s)}let F=0;for(const a of r){if(n.partOffsets[_++]=O,0===a.length)continue;const t=a[0];let e=t;for(let r=1;r<a.length;++r){const t=a[r];M(e);const s=O-1;v(t)?(A(10),++n.segmentCountArc,F=j(e,t,n,s,F),e=t.a[0]):d(t)?(A(10),++n.segmentCountArc,F=W(e,t,n,s,F),e=t.a[0]):y(t)?(A(10),++n.segmentCountArc,F=U(e,t,n,s,F),e=t.c[0]):C(t)?(A(4),++n.segmentCountBezier,F=q(e,t,n,s,F),e=t.b[0]):e=t}S&&z(t,e)||M(e)}return n.partOffsets[_]=O,n}function b(t){const e=T(t),{vertexCount:r,partCount:s,hasZ:n,hasM:i}=t,a=N(t);if("point"===t.type){const[e,r]=t.vertexXY,s=t.vertexZ?.[0],n=t.vertexM?.[0];return{x:e,y:r,z:s,m:n,spatialReference:a}}let o=0;if("multipoint"===t.type){const t=[];for(;o<r;)t.push(e(o++));return{points:t,spatialReference:a,hasZ:n,hasM:i}}const u="polygon"===t.type;if(!t.hasCurves()){const r=new Array;for(let n=0;n<s;++n){const s=t.partOffsets[n+1],i=new Array;for(;o<s;)i.push(e(o++));u&&i.length>0&&i.push(i[0]),r.push(i)}return u?{rings:r,hasZ:n,hasM:i,spatialReference:a}:{paths:r,hasZ:n,hasM:i,spatialReference:a}}const h=new Array;for(const{segments:l,startVertex:c}of t.parts){const t=[c];for(const{curve:e}of l)t.push(e);h.push(t)}return u?{rings:[],curveRings:h,hasZ:n,hasM:i,spatialReference:a}:{paths:[],curvePaths:h,hasZ:n,hasM:i,spatialReference:a}}function I(t,{lengths:e,coords:r,hasZ:s,hasM:n},i){const a=t.includes("point")?0:e.length,o="polygon"===t,u="point"===t?1:e.reduce((t,e)=>t+e,0)-(o?a:0);s??=!1,n??=!1;const h=k(t,u,a,s,n,!1,0,0);if(h.spatialReference=i??void 0,!h.isMultipart()){for(let t=0,e=0;t<u;++t)h.vertexXY[2*t]=r[e++],h.vertexXY[2*t+1]=r[e++],s&&(h.vertexZ[t]=r[e++]),n&&(h.vertexM[t]=r[e++]);return h}const l=2+Number(s)+Number(n);let c=0,g=0;h.partOffsets[0]=0;for(const f of e){const t=h.partOffsets[g],e=t+f-Number(o);h.partOffsets[++g]=e;for(let i=t;i<e;++i)h.vertexXY[2*i]=r[c++],h.vertexXY[2*i+1]=r[c++],s&&(h.vertexZ[i]=r[c++]),n&&(h.vertexM[i]=r[c++]);o&&(c+=l)}return h}function w({type:t,vertexCount:e,vertexXY:r,vertexZ:s,vertexM:n,partCount:i,partOffsets:a,hasZ:o,hasM:u}){const h=new S([],[],o,u);i=Math.max(i,1);const l="polygon"===t;let c=0;for(let g=0;g<i;++g){const t=a?.[g+1]??e,i=h.coords.length;for(let e=c;e<t;++e)h.coords.push(r[2*e],r[2*e+1]),o&&h.coords.push(s[e]),u&&h.coords.push(n[e]);if(l){const t=c;h.coords.push(r[2*t],r[2*t+1]),o&&h.coords.push(s[t]),u&&h.coords.push(n[t])}h.lengths.push((h.coords.length-i)/h.stride),c=t}return"point"===t&&(h.lengths.length=0),h}function X(t,e){return"getSpatialReference"in t&&(e=B(t.getSpatialReference()),t=t.getGeometry()),new P({...t.toFlatGeometry(),spatialReference:e})}function B(t){if(null==t)return;const e=t.getText()||void 0,r=t.isCustomWkid()?0:t.getOldID();if(r<=0)return{wkt:e};let s=t.getLatestID();(s<=0||s===r)&&(s=void 0);const n=t.getVCS();if(null==n)return{wkid:r,latestWkid:s,wkt:e};const i=n.isCustomWkid()?0:n.getOldID();if(i<=0)return{wkt:e};let a=t.getLatestVerticalID();return(a<=0||a===i)&&(a=void 0),{wkid:r,wkt:e,latestWkid:s,vcsWkid:i,latestVcsWkid:a}}class L{constructor(t,e){this.target=t,this.keys=e,this.oldValues=e.map(e=>t[e]);for(const r of e)t[r]=void 0}[Symbol.dispose](){this.keys.map((t,e)=>{this.target[t]=this.oldValues[e]})}}function N({spatialReference:t}){return t instanceof s?t.toJSON():t}function T({vertexXY:t,vertexZ:e,vertexM:r}){return e?r?s=>[t[2*s],t[2*s+1],e[s],r[s]]:r=>[t[2*r],t[2*r+1],e[r]]:r?e=>[t[2*e],t[2*e+1],r[e]]:e=>[t[2*e],t[2*e+1]]}function z(t,e){return t.every((t,r)=>t===e[r])}function k(t,e,r,s,n,i,a,o){a??=0,o??=0;const u=new P({type:t,vertexCount:e,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:a,segmentCountBezier:o});let h=2*Float64Array.BYTES_PER_ELEMENT*e;s&&(h+=Float64Array.BYTES_PER_ELEMENT*e),n&&(h+=Float64Array.BYTES_PER_ELEMENT*e),u.isMultipart()&&(h+=(r+1)*Int32Array.BYTES_PER_ELEMENT,h+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(h+=e*Int8Array.BYTES_PER_ELEMENT,h+=e*Int32Array.BYTES_PER_ELEMENT,h+=u.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const l=new ArrayBuffer(h);let c=0;return u.vertexXY=new Float64Array(l,c,2*e),c+=u.vertexXY.byteLength,s&&(u.vertexZ=new Float64Array(l,c,e),c+=u.vertexZ.byteLength),n&&(u.vertexM=new Float64Array(l,c,e),c+=u.vertexM.byteLength),i&&(u.segmentParams=new Float64Array(l,c,u.segmentParamCount),c+=u.segmentParams.byteLength,u.segmentIndices=new Int32Array(l,c,e),u.segmentIndices.fill(J),c+=u.segmentIndices.byteLength),u.isMultipart()&&(u.partOffsets=new Int32Array(l,c,r+1),c+=u.partOffsets.byteLength,u.partFlags=new Int8Array(l,c,r+1),c+=u.partFlags.byteLength,"polygon"===u.type&&u.partFlags.subarray(0,r).fill(1)),i&&(u.segmentFlags=new Int8Array(l,c,e),u.segmentFlags.fill(1),c+=u.segmentFlags.byteLength),u}function j(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;const[o,[u,h],l,c,g,f,m]=e.a;let p=4;c||(p|=1),l||(p|=2);const x=E(t,e),[v,d]=O(x,.5);return n[a++]=p,n[a++]=f,n[a++]=m,n[a++]=g,n[a++]=u,n[a++]=h,n[a++]=x.u2-x.u1,n[a++]=x.u1,n[a++]=v,n[a++]=d,a}function W(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;const o=M(t,e);return D(o,4,...g(o,.5),n,a)}function U(t,e,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;return D(f(t,e),0,...e.c[1],n,a)}function D(t,e,r,s,n,i){const{cx:a,cy:o,thetaStart:u,thetaEnd:h,radius:l}=t;u>h||(e|=1);return Math.abs(h-u)<=Math.PI||(e|=2),n[i++]=e,n[i++]=l,n[i++]=1,n[i++]=0,n[i++]=a,n[i++]=o,n[i++]=h-u,n[i++]=u,n[i++]=r,n[i++]=s,i}function q(t,{b:[e,[r,s],[n,i]]},{segmentFlags:a,segmentIndices:o,segmentParams:u},h,l){return a[h]=2,o[h]=l,u[l++]=r,u[l++]=s,u[l++]=n,u[l++]=i,l}const G=1.61803,J=-1;export{P as FlatGeometry,k as allocateFlatGeometry,b as convertFlatToGeometryJSON,w as convertFlatToOptimizedGeometry,Y as convertGeometryToFlat,X as convertGeometryxToFlat,I as convertOptimizedGeometryToFlat,V as getBoundingRect,R as getExtentJSON,q as writeBezierCurveSegment,U as writeCircularArcSegment,W as writeEllipticArc4Segment,j as writeEllipticArc7Segment};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{nativeArrayMaxSize as r,isTypedArray as n}from"../../core/typedArrayUtil.js";function t(r){return e(r,!0)}function e(t,e){if(Array.isArray(t)){if(t.length<r)return t}else if(t.length<r)return Array.from(t);let i=!0,
|
|
2
|
+
import{nativeArrayMaxSize as r,isTypedArray as n}from"../../core/typedArrayUtil.js";function t(r){return e(r,!0)}function e(t,e){if(Array.isArray(t)){if(t.length<r)return t}else if(t.length<r)return Array.from(t);let i=!0,l=!0;return t.some((r,n)=>(i=i&&0===r,l=l&&r===n,!i&&!l)),i?U(t.length):l?A(t.length):n(t)&&t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:f(t,!e)}function i(n,t){return n.length<r?Array.from(n):t<256?Uint8Array.from(n):t<65536?Uint16Array.from(n):Uint32Array.from(n)}function f(r,t){for(const e of r){if(e>=65536)return n(r)?r:new Uint32Array(r);e>=256&&(t=!1)}return t?new Uint8Array(r):new Uint16Array(r)}function l(n,t=n){return n<=r?new Array(n):t<=65536?new Uint16Array(n):new Uint32Array(n)}function u(r,n,t){if(0===n.length)return r.slice();if(0===r.length)return n.slice();const e=l(r.length+n.length,t);for(let i=0;i<r.length;++i)e[i]=r[i];for(let i=0;i<n.length;++i)e[r.length+i]=n[i];return e}let a=g(131072);const o=[0],y=(()=>{const r=new Uint16Array(65536);for(let n=0;n<r.length;++n)r[n]=n;return r})();function A(n){return 1===n?o:n<r?Array.from(new Uint16Array(y.buffer,0,n)):n<y.length?new Uint16Array(y.buffer,0,n):(n>a.length&&(a=g(Math.max(2*a.length,n))),new Uint32Array(a.buffer,0,n))}function h(n){return 1===n?[0]:n<r?Array.from(new Uint16Array(y.buffer,0,n)):n<y.length?new Uint16Array(y.buffer,0,n).slice():(n>a.length&&(a=g(Math.max(2*a.length,n))),new Uint32Array(a.buffer,0,n).slice())}function g(r){const n=new Uint32Array(r);for(let t=0;t<n.length;t++)n[t]=t;return n}let c=new Uint8Array(65536);function U(n){if(1===n)return o;if(n<r)return new Array(n).fill(0);if(n>c.length){const r=Math.max(2*c.length,n);c=new Uint8Array(r)}return new Uint8Array(c.buffer,0,n)}function w(){a=g(131072),c=new Uint8Array(65536)}function s(r){return"byteLength"in r?r.byteLength:8*r.length}export{e as compactIndices,t as compactMeshIndices,u as concatIndexArrays,A as getContinuousIndexArray,U as getZeroIndexArray,s as indexArrayByteSize,i as indexArrayFrom,h as newContinuousIndexArray,l as newIndexArray,w as pruneIndexArrays};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{nativeArrayMaxSize as r}from"../../core/typedArrayUtil.js";function
|
|
2
|
+
import{nativeArrayMaxSize as r}from"../../core/typedArrayUtil.js";function t(t){return t<=r?new Array(t):new Int16Array(t)}export{t as newShortArray};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{nativeArrayMaxSize as r}from"../../core/typedArrayUtil.js";function
|
|
2
|
+
import{nativeArrayMaxSize as r}from"../../core/typedArrayUtil.js";function e(e,n=!1){return e<=r?n?new Array(e).fill(0):new Array(e):new Uint32Array(e)}export{e as newUintArray};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
function e(e
|
|
2
|
+
function e(e,r){switch(e.type){case"georeferenced":return r.isGeographic;case"local":return r.isGeographic||r.isWebMercator}}export{e as performGlobalOperation};
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.
|
|
2
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.37",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
|
package/layers/MapImageLayer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import r from"../request.js";import t from"../core/Collection.js";import i from"../core/Error.js";import{loadAll as s}from"../core/loadAll.js";import{
|
|
2
|
+
import{__decorate as e}from"tslib";import r from"../request.js";import t from"../core/Collection.js";import i from"../core/Error.js";import{loadAll as s}from"../core/loadAll.js";import{floatEqualAbsolute as o}from"../core/mathUtils.js";import{MultiOriginJSONSupportMixin as a}from"../core/MultiOriginJSONSupport.js";import{debounce as p,throwIfAbortError as n,isAbortError as m}from"../core/promiseUtils.js";import{property as l,subclass as c}from"../core/accessorSupport/decorators.js";import{Integer as u}from"../core/accessorSupport/ensureType.js";import{nameToId as y}from"../core/accessorSupport/PropertyOrigin.js";import d from"../geometry/Extent.js";import{getScale as h}from"../geometry/support/scaleUtils.js";import{srToRESTValue as f}from"../geometry/support/spatialReferenceUtils.js";import g from"./Layer.js";import{APIKeyMixin as v}from"./mixins/APIKeyMixin.js";import{ArcGISMapService as b}from"./mixins/ArcGISMapService.js";import{ArcGISService as x}from"./mixins/ArcGISService.js";import{BlendLayer as j}from"./mixins/BlendLayer.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as I}from"./mixins/OperationalLayer.js";import{PortalLayer as w}from"./mixins/PortalLayer.js";import{RefreshableLayer as O}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{SublayersOwner as L}from"./mixins/SublayersOwner.js";import{TemporalLayer as T}from"./mixins/TemporalLayer.js";import{url as U}from"./support/commonProperties.js";import{ExportImageParameters as E}from"./support/ExportImageParameters.js";import{createBitmap as M}from"./support/imageBitmapUtils.js";import F from"./support/Sublayer.js";import{shouldWriteSublayerStructure as _}from"./support/sublayerUtils.js";import{serviceSupportsSpatialReference as R}from"./support/versionUtils.js";import A from"../symbols/support/ElevationInfo.js";import N from"../time/TimeExtent.js";import{timeZoneProperty as J}from"../time/timeZoneUtils.js";import{reader as q}from"../core/accessorSupport/decorators/reader.js";import{writer as k}from"../core/accessorSupport/decorators/writer.js";let V=class extends(j(T(P(L(b(x(I(w(a(O(v(S(g))))))))))))){constructor(...e){super(...e),this._exportImageParameters=new E({layer:this}),this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.dpi=96,this.elevationInfo=new A({mode:"on-the-ground"}),this.gdbVersion=null,this.imageFormat="png24",this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.isReference=null,this.labelsVisible=!1,this.operationalLayerType="ArcGISMapServiceLayer",this.preferredTimeZone=null,this.sourceJSON=null,this.sublayers=null,this.type="map-image",this.url=null,this._debouncedSaveOperations=p(async(e,r,t)=>{const{save:i,saveAs:s}=await import("./save/mapImageLayerUtils.js");switch(e){case 0:return i(this,r);case 1:return s(this,t,r)}})}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(n).then(()=>this._fetchService(r))),Promise.resolve(this)}destroy(){this._exportImageParameters.destroy()}readImageFormat(e,r){const t=r.supportedImageFormatTypes;return t&&t.includes("PNG32")?"png32":"png24"}get loaded(){return super.loaded}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}writeSublayers(e,r,t,i){if(!this.loaded||!e)return;const s=e.slice().reverse().flatten(({sublayers:e})=>e&&e.toArray().reverse()).toArray();let o=!1;const a=y(i.origin);let p;if(this.capabilities?.operations.supportsExportMap&&this.capabilities?.exportMap?.supportsDynamicLayers)if(3===a){const e=this.createSublayersForOrigin("service").sublayers;o=_(s,e,2)}else if(a>3){const e=this.createSublayersForOrigin("portal-item");o=_(s,e.sublayers,y(e.origin)),p=e.originWithPartialOverrides}const n=[],m={writeSublayerStructure:o,...i,minimumWritableOrigin:p};let l=o||this.hasVisibleLayersForOrigin(a);s.forEach(e=>{const r=e.write({},m);n.push(r),l=l||"user"===e.originOf("visible")});n.some(e=>Object.keys(e).length>1)&&(r.layers=n),l&&(r.visibleLayers=s.filter(e=>e.visible).map(e=>e.id))}createExportImageParameters(e,r,t,i){const s=i?.pixelRatio??1;e&&this.version>=10&&(e=e.clone().shiftCentralMeridian()),this._exportImageParameters.floors=i?.floors??null,this._exportImageParameters.scale=i?.scale??h({extent:e,width:r})*s;const a=this._exportImageParameters.toJSON(),p=!i?.rotation||this.version<10.3?{}:{rotation:-i.rotation},n=e?.spatialReference,m=f(n);let l=this._exportImageParameters.scale/h({extent:e,width:r});l=o(l,s)?s:l,a.dpi*=l;const c={};if(i?.timeExtent){const{start:e,end:r}=i.timeExtent.toJSON();c.time=e&&r&&e===r?""+e:`${e??"null"},${r??"null"}`}else this.timeInfo&&!this.timeInfo.hasLiveData&&(c.time="null,null");return{bbox:e?e.xmin+","+e.ymin+","+e.xmax+","+e.ymax:void 0,bboxSR:m,imageSR:m,size:r+","+t,mapScale:this._exportImageParameters.scale,...a,...p,...c}}async fetchImage(e,r,t,i){const{data:s}=await this._fetchImage("image",e,r,t,i);return s}async fetchImageBitmap(e,r,t,i){const{data:s,url:o}=await this._fetchImage("blob",e,r,t,i);return M(s,o,i)}async fetchRecomputedExtents(e={}){const t={...e,query:{returnUpdates:!0,f:"json",...this.customParameters,token:this.apiKey}},{data:i}=await r(this.url,t),{extent:s,fullExtent:o,timeExtent:a}=i,p=s||o;return{fullExtent:p&&d.fromJSON(p),timeExtent:a&&N.fromJSON({start:a[0],end:a[1]})}}loadAll(){return s(this,e=>{e(this.allSublayers),e(this.subtables)})}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,r){return this._debouncedSaveOperations(1,r,e)}serviceSupportsSpatialReference(e){return R(this,e)}async _fetchImage(e,t,s,o,a){const p={responseType:e,signal:a?.signal??null,query:{...this.parsedUrl.query,...this.createExportImageParameters(t,s,o,a),f:"image",...this.refreshParameters,...this.customParameters,token:this.apiKey}},n=this.parsedUrl.path+"/export";if(null!=p.query?.dynamicLayers&&!this.capabilities?.exportMap?.supportsDynamicLayers)throw new i("mapimagelayer:dynamiclayer-not-supported",`service ${this.url} doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source.`,{query:p.query});try{const{data:e}=await r(n,p);return{data:e,url:n}}catch(l){if(m(l))throw l;throw new i("mapimagelayer:image-fetch-error",`Unable to load image: ${n}`,{error:l})}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:i}=await r(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},signal:e});i&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})}hasVisibleLayersForOrigin(e){return!(null==e||!this.sublayersSourceJSON[e]?.visibleLayers)}};e([l(J("dateFieldsTimeReference"))],V.prototype,"dateFieldsTimeZone",void 0),e([l({type:Boolean})],V.prototype,"datesInUnknownTimezone",void 0),e([l()],V.prototype,"dpi",void 0),e([l()],V.prototype,"elevationInfo",void 0),e([l()],V.prototype,"gdbVersion",void 0),e([l()],V.prototype,"imageFormat",void 0),e([q("imageFormat",["supportedImageFormatTypes"])],V.prototype,"readImageFormat",null),e([l({json:{origins:{service:{read:{source:"maxImageHeight"}}}}})],V.prototype,"imageMaxHeight",void 0),e([l({json:{origins:{service:{read:{source:"maxImageWidth"}}}}})],V.prototype,"imageMaxWidth",void 0),e([l()],V.prototype,"imageTransparency",void 0),e([l({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],V.prototype,"isReference",void 0),e([l({json:{read:!1,write:!1}})],V.prototype,"labelsVisible",void 0),e([l({type:["ArcGISMapServiceLayer"]})],V.prototype,"operationalLayerType",void 0),e([l({json:{read:!1,write:!1}})],V.prototype,"popupEnabled",void 0),e([l(J("preferredTimeReference"))],V.prototype,"preferredTimeZone",void 0),e([l()],V.prototype,"sourceJSON",void 0),e([l({type:t.ofType(F),json:{write:{ignoreOrigin:!0}}})],V.prototype,"sublayers",void 0),e([k("sublayers",{layers:{type:[F]},visibleLayers:{type:[u]}})],V.prototype,"writeSublayers",null),e([l({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],V.prototype,"listMode",void 0),e([l({json:{read:!1},readOnly:!0,value:"map-image"})],V.prototype,"type",void 0),e([l(U)],V.prototype,"url",void 0),V=e([c("esri.layers.MapImageLayer")],V);const B=V;export{B as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{property as
|
|
2
|
+
import{__decorate as t}from"tslib";import{property as s,subclass as e}from"../../core/accessorSupport/decorators.js";import i from"../support/PublishingInfo.js";const r=Symbol(),o=o=>{var n;const a=o;let l=class extends a{constructor(){super(...arguments),this[n]=!0}static{n=r}get publishingInfo(){if(this.destroyed)return null;const t=this._get("publishingInfo");if(t)return t;const s=new i;return this._checkPublishingStatus(s),s}_checkPublishingStatus(t){const s=250,e=125;let i=0;const r=async s=>{let n;t.updating=!0;try{n=await this.fetchPublishingStatus()}catch(a){n="unavailable"}"published"!==n&&"unavailable"!==n||("publishing"===t.status&&this.refresh(),o.remove()),t.status=n,t.updating=!1,o.removed||(i=setTimeout(r,s,s+e))},o={removed:!1,remove(){this.removed=!0,clearTimeout(i)}};this.when().catch(()=>o.remove()),r(s),this.addHandles(o)}};return t([s({readOnly:!0,clonable:!1})],l.prototype,"publishingInfo",null),l=t([e("esri.layers.mixins.PublishableLayer")],l),l};export{o as PublishableLayer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import"../../core/has.js";import r from"../../core/Logger.js";import{debounce as t,ignoreAbortErrors as s}from"../../core/promiseUtils.js";import{property as
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../core/has.js";import r from"../../core/Logger.js";import{debounce as t,ignoreAbortErrors as s}from"../../core/promiseUtils.js";import{property as a,cast as o,subclass as h}from"../../core/accessorSupport/decorators.js";import{excludeTables as i}from"../../core/accessorSupport/layerContainerType.js";import{registerLayer as n,unregisterLayer as p}from"./refresh.js";const m=.1,f=f=>{const l=f;let c=class extends l{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=t(()=>this.hasDataChanged()),this.when().then(()=>{this.destroyed||n(this)},()=>{})}destroy(){p(this)}castRefreshInterval(e){return e>=m?e:e<=0?0:m}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){s(this._debounceHasDataChanged()).then(r=>{r&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:r})},e=>{r.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})})}async hasDataChanged(){return!0}get test(){}};return e([a({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:i}}}}})],c.prototype,"refreshInterval",void 0),e([o("refreshInterval")],c.prototype,"castRefreshInterval",null),e([a({readOnly:!0})],c.prototype,"refreshTimestamp",void 0),e([a({readOnly:!0})],c.prototype,"refreshParameters",null),c=e([h("esri.layers.mixins.RefreshableLayer")],c),c};export{f as RefreshableLayer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{numberMaxFloat32 as t}from"../../../core/mathUtils.js";import{getPixelValueRange as e}from"../formats/pixelRangeUtils.js";import n from"../../support/PixelBlock.js";const l=9,i="PixelID";function o(t){return null!=t&&t.pixels?.length>0}function r(t,e){return e?.length&&o(t)?t.extractBands(e):t}function s(t){if(!t?.length||t.some(t=>!o(t)))return null;if(1===t.length)return t[0]?.clone()??null;const e=t,{width:l,height:i,pixelType:r}=e[0];if(e.some(t=>t.width!==l||t.height!==i))return null;const s=e.map(({mask:t})=>t).filter(t=>null!=t);let a=null;s.length&&(a=new Uint8Array(l*i),a.set(s[0]),s.length>1&&k(s.slice(1),a));const h=[];e.forEach(({pixels:t})=>h.push(...t));const f=null!=a&&h.length===e.length?e.map(({width:t,height:e,mask:n})=>n??new Uint8Array(t*e).fill(255)):null,c=e.map(({statistics:t})=>t).filter(t=>t?.length),u=[];return c.forEach(t=>u.push(...t)),new n({pixelType:r,width:l,height:i,mask:a,bandMasks:f,pixels:h,statistics:u.length?u:null})}function a(t){if(!t)return;const e=t.colormap;if(!e||0===e.length)return;const n=e.sort((t,e)=>t[0]-e[0]),l=n[0][0]<0?n[0][0]:0,i=Math.max(256,n[n.length-1][0]-l+1),o=new Uint8Array(4*i),r=[],s=5===n[0].length;if(i>65536)return n.forEach(t=>{r[t[0]-l]=s?t.slice(1):t.slice(1).concat([255])}),{indexed2DColormap:r,offset:l,alphaSpecified:s};if(t.fillUnspecified){let t=n[0];for(let e=t[0]-l,r=0;e<i;e++)o[4*e]=t[1],o[4*e+1]=t[2],o[4*e+2]=t[3],o[4*e+3]=s?t[4]:255,e===t[0]-l&&(t=r===n.length-1?t:n[++r])}else for(let a=0;a<n.length;a++){const t=n[a],e=4*(t[0]-l);o[e]=t[1],o[e+1]=t[2],o[e+2]=t[3],o[e+3]=s?t[4]:255}return{indexedColormap:o,offset:l,alphaSpecified:s}}function h(t,e){if(!o(t))return t;if(!e||!e.indexedColormap&&!e.indexed2DColormap)return t;const n=t.clone(),l=n.pixels;let i=n.mask;const r=n.width*n.height;if(1!==l.length)return t;const{indexedColormap:s,indexed2DColormap:a,offset:h,alphaSpecified:f}=e,c=l[0],u=new Uint8Array(c.length),p=new Uint8Array(c.length),x=new Uint8Array(c.length);let d,m=0;if(s){const t=s.length-1;if(null!=i)for(let e=0;e<r;e++)i[e]&&(m=4*(c[e]-h),m<h||m>t?i[e]=0:(u[e]=s[m],p[e]=s[m+1],x[e]=s[m+2],i[e]=s[m+3]));else{i=new Uint8Array(r);for(let e=0;e<r;e++)m=4*(c[e]-h),m<h||m>t?i[e]=0:(u[e]=s[m],p[e]=s[m+1],x[e]=s[m+2],i[e]=s[m+3]);n.mask=i}}else if(a)if(null!=i)for(let o=0;o<r;o++)i[o]&&(d=a[c[o]],u[o]=d[0],p[o]=d[1],x[o]=d[2],i[o]=d[3]);else{i=new Uint8Array(r);for(let t=0;t<r;t++)d=a[c[t]],u[t]=d[0],p[t]=d[1],x[t]=d[2],i[t]=d[3];n.mask=i}return n.pixels=[u,p,x],n.statistics=null,n.pixelType="u8",n.maskIsAlpha=f,n}function f(t,e){if(!o(t))return null;const{pixels:l,mask:i}=t,r=l.length;let s=e.lut;const{offset:a}=e;s&&1===s[0].length&&(s=l.map(()=>s));const h=[],f=e.outputPixelType||"u8";for(let n=0;n<r;n++){const t=c(l[n],i,s[n],a||0,f);h.push(t)}const u=new n({width:t.width,height:t.height,pixels:h,mask:i,pixelType:f});return u.updateStatistics(),u}function c(t,e,l,i,o){const r=t.length,s=n.createEmptyBand(o,r);if(e)for(let n=0;n<r;n++)e[n]&&(s[n]=l[t[n]-i]);else for(let n=0;n<r;n++)s[n]=l[t[n]-i];return s}function u(t,e,n,l){const{width:i,height:o,pixels:r,mask:s}=t,a=i*o,{bandId:h,ranges:f}=n,c=r[h];if(!c)return;const u=1===f.length,[p,x]=f[0];for(let d=0;d<a;d++)if(!s||s[d]){const t=c[d];if(u)t>=p&&t<=x&&(e[d]=l);else for(let n=0;n<f.length;n++){const[i,o]=f[n];if(t>=i&&t<=o){e[d]=l;break}}}}function p(t,e,n,l){const{width:i,height:o,xyMask:r,xBandId:s,yBandId:a,xBandRange:h,yBandRange:f}=n,{pixels:c,mask:u}=t,p=c[s],x=c[a],[d,m]=h,[g,y]=f,w=(m-d)/i,k=(y-g)/o;for(let M=0;M<p.length;M++)if(!u||u[M]){let t=p[M],n=x[M];if(t<d||t>m||n<g||n>y)continue;r?(t=(t-d)*w,t=t>i-1?i-1:t<0?0:255&t,n=(y-n)*k,n=n>o-1?o-1:n<0?0:255&n,r[n*i+t]&&(e[M]=l)):e[M]=l}}function x(t){const{pixelBlock:e,renderedPixelBlock:n,highlightOptions:l}=t;if(!o(e))return;const{width:i,height:r}=e,s=i*r,a=new Uint8Array(s);for(let o=1;o<=l.length;o++){const t=l[o-1];"bandId"in t?u(e,a,t,o):p(e,a,t,o)}const{pixels:h}=n;1===h.length&&(h[1]=h[0].slice(),h[2]=h[0].slice());const f=l.map(t=>t.color),[c,x,d]=h;if(n.mask){const t=n.mask;for(let e=0;e<s;e++)if(t[e]){t[e]=255;const n=a[e];if(n){const l=f[n-1];c[e]=l[0],x[e]=l[1],d[e]=l[2],t[e]=l[3]}}}else{const t=new Uint8Array(s).fill(255);for(let e=0;e<s;e++){const n=a[e];if(n){const l=f[n-1];c[e]=l[0],x[e]=l[1],d[e]=l[2],t[e]=l[3]}}n.mask=t}n.maskIsAlpha=!0}function d(t,e){if(!o(t))return null;const n=t.clone(),{pixels:l}=n,i=n.width*n.height,r=e.length,s=Math.floor(r/2),a=e[Math.floor(s)],h=l[0],f=new Uint8Array(i),c=new Uint8Array(i),u=new Uint8Array(i);let p=n.mask;const x=4===e[0].mappedColor.length;p||(p=new Uint8Array(i),p.fill(x?255:1),n.mask=p);for(let o=0;o<i;o++)if(p[o]){const t=h[o];let n=!1,l=s,i=a,x=0,d=r-1;for(;d-x>1;){if(t===i.value){n=!0;break}t>i.value?x=l:d=l,l=Math.floor((x+d)/2),i=e[Math.floor(l)]}n||(t===e[x].value?(i=e[x],n=!0):t===e[d].value?(i=e[d],n=!0):t<e[x].value?n=!1:t>e[x].value&&(t<e[d].value?(i=e[x],n=!0):d===r-1?n=!1:(i=e[d],n=!0))),n?(f[o]=i.mappedColor[0],c[o]=i.mappedColor[1],u[o]=i.mappedColor[2],p[o]=i.mappedColor[3]):f[o]=c[o]=u[o]=p[o]=0}return n.pixels=[f,c,u],n.mask=p,n.pixelType="u8",n.maskIsAlpha=x,n}function m(e,n,i=!1){const o=1e-5,r=new Float32Array(3*l),s=n.length;for(let a=0;a<l;a++)r[3*a]=e[2*a]??t-1,r[3*a+1]=e[2*a+1]??t,r[3*a+2]=n[a]??0,a<s&&(a>0&&(r[3*a]-=o),e[2*a+1]!==e[2*a]&&(a<s-1||!i)&&(r[3*a+1]-=o));return r}function g(t,l){if(!o(t))return null;const{width:i,height:r}=t,{inputRanges:s,outputValues:a,outputPixelType:h,noDataRanges:f,allowUnmatched:c,replacementValue:u,isLastInputRangeInclusive:p}=l,x=t.pixels[0],d=n.createEmptyBand(h,x.length),m=t.mask,g=new Uint8Array(i*r);m?g.set(m):g.fill(255);const y=t.pixelType.startsWith("f")?1e-6:0,w=s.map(t=>t-y);w[0]=s[0],w[w.length-1]=s[s.length-1]+(p?1e-6:0);const k=s.length/2,[M,A]=e(h);for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=e*i+t;if(g[n]){const t=x[n];let e=!1;for(let l=k-1;l>=0;l--)if(t===s[2*l]||t>w[2*l]&&t<w[2*l+1]){d[n]=a[l],e=!0;break}e||(c?d[n]=t>A?A:t<M?M:u??t:g[n]=0)}}const U=f?.length;if(U)for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=e*i+t;if(!m||m[n]){const t=x[n];for(let e=0;e<U;e+=2)if(t>=f[e]&&t<=f[e+1]){d[n]=0,g[n]=0;break}}}return new n({width:i,height:r,pixelType:h,pixels:[d],mask:g})}function y(t,e,n,l){const i=null!=n&&n.length>=2?new Set(n):null,o=1===n?.length?n[0]:null,r=!!e?.length;for(let s=0;s<t.length;s++)if(l[s]){const n=t[s];if(r){let t=!1;for(let l=0;l<e.length;l+=2)if(n>=e[l]&&n<=e[l+1]){t=!0;break}t||(l[s]=0)}l[s]&&(n===o||i?.has(n))&&(l[s]=0)}}function w(t,e){const n=t[0].length;e??=new Uint8Array(n).fill(255);for(let l=0;l<n;l++)if(e[l]){let n=!1;for(let e=0;e<t.length;e++)if(t[e][l]){n=!0;break}n||(e[l]=0)}return e}function k(t,e){const n=t[0].length;e??=new Uint8Array(n).fill(255);for(let l=0;l<n;l++)if(e[l]){let n=!1;for(let e=0;e<t.length;e++)if(0===t[e][l]){n=!0;break}n&&(e[l]=0)}return e}function M(t,e){if(!o(t))return null;const{width:l,height:i,pixels:r}=t,s=l*i,a=new Uint8Array(s);t.mask?a.set(t.mask):a.fill(255);const h=r.length,{includedRanges:f,noDataValues:u,outputPixelType:p,matchAll:x,lookups:d}=e;if(d){const t=[];for(let e=0;e<h;e++){const n=d[e],l=c(r[e],a,n.lut,n.offset||0,"u8");t.push(l)}1===t.length?a.set(t[0]):x?w(t,a):k(t,a)}else if(x){const t=[];for(let e=0;e<h;e++){const n=new Uint8Array(s);n.set(a),y(r[e],f?.slice(2*e,2*e+2),u?.[e],n),t.push(n)}1===t.length?a.set(t[0]):w(t,a)}else for(let n=0;n<h;n++)y(r[n],f?.slice(2*n,2*n+2),u?.[n],a);return new n({width:l,height:i,pixelType:p,pixels:r,mask:a})}function A(t){const{srcPixelType:l,inputRanges:i,outputValues:o,allowUnmatched:r,noDataRanges:s,isLastInputRangeInclusive:a,outputPixelType:h}=t;if("u8"!==l&&"s8"!==l&&"u16"!==l&&"s16"!==l)return null;const f=l.includes("16")?65536:256,c=l.includes("s")?-f/2:0,u=n.createEmptyBand(h,f),p=new Uint8Array(f);r&&p.fill(255);const[x,d]=e(h);if(i?.length&&o?.length){const t=1e-6,e=i.map(e=>e-t);e[0]=i[0],a&&(e[e.length-1]=i[i.length-1]);for(let n=0;n<e.length;n++){const t=o[n]>d?d:o[n]<x?x:o[n],l=Math.ceil(e[2*n]-c),r=i[2*n+1]===i[2*n]?l:Math.floor(e[2*n+1]-c);for(let e=l;e<=r;e++)u[e]=t,p[e]=255}}if(s?.length)for(let e=0;e<s.length;e++){const t=Math.ceil(s[2*e]-c),n=Math.floor(s[2*e+1]-c);for(let e=t;e<=n;e++)p[e]=0}return{lut:u,offset:c,mask:p}}function U(t,e,n){if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const l=t.includes("16")?65536:256,i=t.includes("s")?-l/2:0,o=new Uint8Array(l);if(e)for(let r=0;r<e.length;r++){const t=Math.ceil(e[2*r]-i),n=Math.floor(e[2*r+1]-i);for(let e=t;e<=n;e++)o[e]=255}else o.fill(255);if(n)for(let r=0;r<n.length;r++)o[n[r]-i]=0;return{lut:o,offset:i}}function b(t,e,n,l,i,o,r,s){return{xmin:i<=n*t?0:i<n*t+t?i-n*t:t,ymin:o<=l*e?0:o<l*e+e?o-l*e:e,xmax:i+r<=n*t?0:i+r<n*t+t?i+r-n*t:t,ymax:o+s<=l*e?0:o+s<l*e+e?o+s-l*e:e}}function T(t,e){if(!t||0===t.length)return null;const n=t.find(t=>t.pixelBlock);if(null==n?.pixelBlock)return null;const l=(n.extent.xmax-n.extent.xmin)/n.pixelBlock.width,i=(n.extent.ymax-n.extent.ymin)/n.pixelBlock.height,o=.01*Math.min(l,i),r=t.sort((t,e)=>Math.abs(t.extent.ymax-e.extent.ymax)>o?e.extent.ymax-t.extent.ymax:Math.abs(t.extent.xmin-e.extent.xmin)>o?t.extent.xmin-e.extent.xmin:0),s=Math.min.apply(null,r.map(t=>t.extent.xmin)),a=Math.min.apply(null,r.map(t=>t.extent.ymin)),h=Math.max.apply(null,r.map(t=>t.extent.xmax)),f=Math.max.apply(null,r.map(t=>t.extent.ymax)),c={x:Math.round((e.xmin-s)/l),y:Math.round((f-e.ymax)/i)},u={width:Math.round((h-s)/l),height:Math.round((f-a)/i)},p={width:Math.round((e.xmax-e.xmin)/l),height:Math.round((e.ymax-e.ymin)/i)};if(Math.round(u.width/n.pixelBlock.width)*Math.round(u.height/n.pixelBlock.height)!==r.length||c.x<0||c.y<0||u.width<p.width||u.height<p.height)return null;return{extent:e,pixelBlock:S(r.map(t=>t.pixelBlock),u,{clipOffset:c,clipSize:p})}}function B(t,e,n,l,i,o){const{width:r,height:s}=n.block,{x:a,y:h}=n.offset,{width:f,height:c}=n.mosaic,u=b(r,s,l,i,a,h,f,c);let p=0,x=0;if(o){const t=o.hasGCSSShiftTransform?360:o.halfWorldWidth??0,e=r*o.resolutionX,n=o.startX+l*e;n<t&&n+e>t?x=o.rightPadding:n>=t&&(p=o.leftMargin-o.rightPadding,x=0)}if(u.xmax-=x,"number"!=typeof e)for(let d=u.ymin;d<u.ymax;d++){const n=(i*s+d-h)*f+(l*r-a)+p,o=d*r;for(let l=u.xmin;l<u.xmax;l++)t[n+l]=e[o+l]}else for(let d=u.ymin;d<u.ymax;d++){const n=(i*s+d-h)*f+(l*r-a)+p;for(let l=u.xmin;l<u.xmax;l++)t[n+l]=e}}function S(t,e,l={}){const{clipOffset:i,clipSize:r,alignmentInfo:s,blockWidths:a}=l;if(a)return v(t,e,{blockWidths:a});const h=t.find(t=>o(t));if(null==h)return null;const f=r?r.width:e.width,c=r?r.height:e.height,u=h.width,p=h.height,x=e.width/u,d=e.height/p,m={offset:i||{x:0,y:0},mosaic:r||e,block:{width:u,height:p}},g=h.pixelType,y=n.getPixelArrayConstructor(g),w=h.pixels.length,k=[];let M,A;for(let n=0;n<w;n++){A=new y(f*c);for(let e=0;e<d;e++)for(let l=0;l<x;l++){const i=t[e*x+l];o(i)&&(M=i.pixels[n],B(A,M,m,l,e,s))}k.push(A)}const U=t.some(t=>null==t||null!=t.mask&&t.mask.length>0),b=t.some(t=>t?.bandMasks&&t.bandMasks.length>1),T=U?new Uint8Array(f*c):void 0,S=b?[]:void 0;if(T){for(let e=0;e<d;e++)for(let n=0;n<x;n++){const l=t[e*x+n],i=null!=l?l.mask:null;B(T,null!=i?i:l?255:0,m,n,e,s)}if(S)for(let e=0;e<w;e++){const n=new Uint8Array(f*c);for(let l=0;l<d;l++)for(let i=0;i<x;i++){const o=t[l*x+i],r=o?.bandMasks?.[e]??o?.mask;B(n,null!=r?r:o?255:0,m,i,l,s)}S.push(n)}}const C=new n({width:f,height:c,pixels:k,pixelType:g,bandMasks:S,mask:T});return C.updateStatistics(),C}function v(t,e,l){const i=t.find(t=>null!=t);if(null==i)return null;const r=t.some(t=>null==t||!!t.mask),{width:s,height:a}=e,h=r?new Uint8Array(s*a):null,{blockWidths:f}=l,c=[],u=i.getPlaneCount(),p=n.getPixelArrayConstructor(i.pixelType);if(r)for(let n=0,y=0;n<t.length;y+=f[n],n++){const e=t[n];if(!o(e))continue;const l=e.mask;for(let t=0;t<a;t++)for(let i=0;i<f[n];i++)h[t*s+i+y]=null==l?255:l[t*e.width+i]}const x=t.some(t=>t?.bandMasks&&t.bandMasks.length>1),d=x?[]:void 0,m=s*a;for(let n=0;n<u;n++){const e=new p(m),l=x?new Uint8Array(m):void 0;for(let i=0,r=0;i<t.length;r+=f[i],i++){const h=t[i];if(!o(h))continue;const c=h.pixels[n];if(null!=c){for(let t=0;t<a;t++)for(let n=0;n<f[i];n++)e[t*s+n+r]=c[t*h.width+n];if(l){const t=h.bandMasks?.[n]??h.mask;for(let e=0;e<a;e++)for(let n=0;n<f[i];n++)l[e*s+n+r]=t?t[e*h.width+n]:255}}}c.push(e),d&&l&&d.push(l)}const g=new n({width:s,height:a,mask:h,bandMasks:d,pixels:c,pixelType:i.pixelType});return g.updateStatistics(),g}function C(t,e,n){if(!o(t))return null;const{width:l,height:i}=t,r=e.x,s=e.y,a=n.width+r,h=n.height+s;if(r<0||s<0||a>l||h>i)return t;if(0===r&&0===s&&a===l&&h===i)return t;t.mask||(t.mask=new Uint8Array(l*i));const f=t.mask;for(let o=0;o<i;o++){const t=o*l;for(let e=0;e<l;e++)f[t+e]=o<s||o>=h||e<r||e>=a?0:1}return t.updateStatistics(),t}function I(t){if(!o(t))return null;const e=t.clone(),{width:n,height:l,pixels:i}=t,r=i[0],s=e.pixels[0],a=t.mask;for(let o=2;o<l-1;o++){const t=new Map;for(let l=o-2;l<o+2;l++)for(let e=0;e<4;e++){const i=l*n+e;D(t,r[i],a?a[i]:1)}s[o*n]=R(t),s[o*n+1]=s[o*n+2]=s[o*n];let e=3;for(;e<n-1;e++){let l=(o-2)*n+e+1;D(t,r[l],a?a[l]:1),l=(o-1)*n+e+1,D(t,r[l],a?a[l]:1),l=o*n+e+1,D(t,r[l],a?a[l]:1),l=(o+1)*n+e+1,D(t,r[l],a?a[l]:1),l=(o-2)*n+e-3,P(t,r[l],a?a[l]:1),l=(o-1)*n+e-3,P(t,r[l],a?a[l]:1),l=o*n+e-3,P(t,r[l],a?a[l]:1),l=(o+1)*n+e-3,P(t,r[l],a?a[l]:1),s[o*n+e]=R(t)}s[o*n+e+1]=s[o*n+e]}for(let o=0;o<n;o++)s[o]=s[n+o]=s[2*n+o],s[(l-1)*n+o]=s[(l-2)*n+o];return e.updateStatistics(),e}function R(t){if(0===t.size)return 0;let e=0,n=-1,l=0;const i=t.keys();let o=i.next();for(;!o.done;)l=t.get(o.value),l>e&&(n=o.value,e=l),o=i.next();return n}function P(t,e,n){if(0===n)return;const l=t.get(e);1===l?t.delete(e):t.set(e,l-1)}function D(t,e,n){0!==n&&t.set(e,t.has(e)?t.get(e)+1:1)}function _(t,e,l){let{x:i,y:r}=e;const{width:s,height:a}=l;if(0===i&&0===r&&a===t.height&&s===t.width)return t;const{width:h,height:f}=t,c=Math.max(0,r),u=Math.max(0,i),p=Math.min(i+s,h),x=Math.min(r+a,f);if(p<0||x<0||!o(t))return null;i=Math.max(0,-i),r=Math.max(0,-r);const{pixels:d}=t,m=s*a,g=d.length,y=[];for(let o=0;o<g;o++){const e=d[o],l=n.createEmptyBand(t.pixelType,m);for(let t=c;t<x;t++){const n=t*h;let o=(t+r-c)*s+i;for(let t=u;t<p;t++)l[o++]=e[n+t]}y.push(l)}const w=new Uint8Array(m),k=t.mask;for(let n=c;n<x;n++){const t=n*h;let e=(n+r-c)*s+i;for(let n=u;n<p;n++)w[e++]=k?k[t+n]:1}const M=new n({width:l.width,height:l.height,pixelType:t.pixelType,pixels:y,mask:w});return M.updateStatistics(),M}function F(t,e=!0){if(!o(t))return null;const{pixels:l,width:i,height:r,mask:s,pixelType:a}=t,h=[],f=Math.round(i/2),c=Math.round(r/2),u=r-1,p=i-1;for(let o=0;o<l.length;o++){const t=l[o],s=n.createEmptyBand(a,f*c);let x=0;for(let n=0;n<r;n+=2)for(let l=0;l<i;l+=2){const o=t[n*i+l];if(e){const e=l===p?o:t[n*i+l+1],r=n===u?o:t[n*i+l+i],a=l===p?r:n===u?e:t[n*i+l+i+1];s[x++]=(o+e+r+a)/4}else s[x++]=o}h.push(s)}let x=null;if(null!=s){x=new Uint8Array(f*c);let t=0;for(let n=0;n<r;n+=2)for(let l=0;l<i;l+=2){const o=s[n*i+l];if(e){const e=l===p?o:s[n*i+l+1],r=n===u?o:s[n*i+l+i],a=l===p?r:n===u?e:s[n*i+l+i+1];x[t++]=o*e*r*a?1:0}else x[t++]=o}}return new n({width:f,height:c,pixelType:a,pixels:h,mask:x})}function W(t,e,n=0,l=!0){if(!o(t))return null;const{width:i,height:r}=e;let{width:s,height:a}=t;const h=new Map,f={x:0,y:0},c=1+n;let u=t;for(let o=0;o<c;o++){const t=Math.ceil(s/i),n=Math.ceil(a/r);for(let l=0;l<n;l++){f.y=l*r;for(let n=0;n<t;n++){f.x=n*i;const t=_(u,f,e);h.set(`${o}/${l}/${n}`,t)}}o<c-1&&(u=F(u,l)),s=Math.round(s/2),a=Math.round(a/2)}return h}function E(t){const{pixelBlock:e,tileSize:n,level:l,row:i,col:r,useBilinear:s}=t;if(!o(e))return null;const{width:a,height:h}=n,f=2**l,c=f*a,u=f*h;let p=_(e,{y:i*u,x:r*c},{width:c,height:u});if(!p)return null;for(let o=l;o>0;o--)p=F(p,s);return p}function N(t,e,n,l,i=0){const{width:o,height:r}=t,{width:s,height:a}=e,h=l.cols,f=l.rows,c=Math.ceil(s/h-.1/h),u=Math.ceil(a/f-.1/f);let p,x,d,m,g,y,w;const k=c*h,M=k*u*f,A=new Float32Array(M),U=new Float32Array(M),b=new Uint32Array(M),T=new Uint32Array(M);let B,S,v=0;for(let C=0;C<u;C++)for(let t=0;t<c;t++){p=12*(C*c+t),x=n[p],d=n[p+1],m=n[p+2],g=n[p+3],y=n[p+4],w=n[p+5];for(let e=0;e<f;e++){v=(C*f+e)*k+t*h,S=(e+.5)/f;for(let t=0;t<e;t++)B=(t+.5)/h,A[v+t]=(x*B+d*S+m)*o+i,U[v+t]=(g*B+y*S+w)*r+i,b[v+t]=Math.floor(A[v+t]),T[v+t]=Math.floor(U[v+t])}p+=6,x=n[p],d=n[p+1],m=n[p+2],g=n[p+3],y=n[p+4],w=n[p+5];for(let e=0;e<f;e++){v=(C*f+e)*k+t*h,S=(e+.5)/f;for(let t=e;t<h;t++)B=(t+.5)/h,A[v+t]=(x*B+d*S+m)*o+i,U[v+t]=(g*B+y*S+w)*r+i,b[v+t]=Math.floor(A[v+t]),T[v+t]=Math.floor(U[v+t])}}return{offsets_x:A,offsets_y:U,offsets_xi:b,offsets_yi:T,gridWidth:k}}function j(t,e){const{coefficients:n,spacing:l}=e,{offsets_x:i,offsets_y:o,gridWidth:r}=N(t,t,n,{rows:l[0],cols:l[1]}),{width:s,height:a}=t,h=new Float32Array(s*a),f=180/Math.PI;for(let c=0;c<a;c++)for(let t=0;t<s;t++){const e=c*r+t,n=0===c?e:e-r,l=c===a-1?e:e+r,u=i[n]-i[l],p=o[l]-o[n];if(isNaN(u)||isNaN(p))h[c*s+t]=90;else{let e=Math.atan2(p,u)*f;e=(360+e)%360,h[c*s+t]=e}}return h}function z(t,e,l,i,r="nearest"){if(!o(t))return null;"majority"===r&&(t=I(t));const{pixels:s,mask:a,bandMasks:h,pixelType:f}=t,c=t.width,u=t.height,p=n.getPixelArrayConstructor(f),x=s.length,{width:d,height:m}=e;let g=!1;for(let n=0;n<l.length;n+=3)-1===l[n]&&-1===l[n+1]&&-1===l[n+2]&&(g=!0);const{offsets_x:y,offsets_y:w,offsets_xi:k,offsets_yi:M,gridWidth:A}=N({width:c,height:u},e,l,i,"majority"===r?.5:0);let U;const b=(t,e,n,l)=>{const i=t instanceof Float32Array||t instanceof Float64Array?0:.5;for(let o=0;o<m;o++){U=o*A;for(let r=0;r<d;r++){if(y[U]<0||w[U]<0)t[o*d+r]=0;else if(l)t[o*d+r]=e[k[U]+M[U]*c];else{const l=Math.floor(y[U]),s=Math.floor(w[U]),a=Math.ceil(y[U]),h=Math.ceil(w[U]),f=y[U]-l,u=w[U]-s;if(!n||n[l+s*c]&&n[a+s*c]&&n[l+h*c]&&n[a+h*c]){const n=(1-f)*e[l+s*c]+f*e[a+s*c],p=(1-f)*e[l+h*c]+f*e[a+h*c];t[o*d+r]=(1-u)*n+u*p+i}else t[o*d+r]=e[k[U]+M[U]*c]}U++}}},T=[];let B;const S=h?.length===x,v=[];for(let n=0;n<x;n++){if(S){const t=new Uint8Array(d*m);b(t,h[n],h[n],!0),v.push(t)}B=new p(d*m),b(B,s[n],S?h[n]:a,"nearest"===r||"majority"===r),T.push(B)}const C=new n({width:d,height:m,pixelType:f,pixels:T,bandMasks:S?v:void 0});if(null!=a)C.mask=new Uint8Array(d*m),b(C.mask,a,a,!0);else if(g){C.mask=new Uint8Array(d*m);for(let t=0;t<d*m;t++)C.mask[t]=y[t]<0||w[t]<0?0:1}return C.updateStatistics(),C}function O(t){const{pixelBlock:e,extent:n,fieldNames:l,skipFactor:o,skipSpatialReference:r=!1,pixelIdOffset:s=0}=t,a=[],{width:h,height:f,pixels:c,mask:u}=e,p=t.imageRowSize??h,x=n.width/h,d=n.height/f,m=c.length,g=Math.floor(o/2),{xmin:y,ymax:w}=n,k=r?void 0:n.spatialReference.toJSON();for(let M=g;M<f;M+=o)for(let t=g;t<h;t+=o){const e=M*h+t;if(!u||u[e]){const n={x:y+(t+.5)*x,y:w-(M+.5)*d,spatialReference:k},o={[i]:s+M*p+t};for(let t=0;t<m;t++)o[l[t+1]]=c[t][e];a.push({geometry:n,attributes:o})}}return a}function L(t,e){const{width:n,height:l,pixels:i,mask:o}=t,r=i[0];let s=0;for(let a=0;a<l;a++){let t=a*n;for(let l=0;l<n;l++,t++)if(!o||o[t]){const n=r[t];e.set(n,(e.get(n)??0)+1),s++}}return s}function G(t,e){const{width:n,height:l,pixels:i,mask:o}=t,r=e.width/n,s=e.height/l,{xmin:a,ymax:h}=e,f=e.spatialReference.toJSON(),c=[];for(let u=0;u<l;u++)for(let t=0;t<n;t++){const e=u*n+t;if(!o||o[e]){const n={x:a+(t+.5)*r,y:h-(u+.5)*s,spatialReference:f},l=i.map(t=>t[e]);c.push({location:n,value:l})}}return c}function V(t,e,l){const{attributeTable:i}=e;if(!i)return t;const o=i.fields.find(t=>t.name.toLowerCase()===l.toLowerCase()),r=i.fields.find(t=>"value"===t.name.toLowerCase());if(!o||!r)return t;const[s]=t.pixels,a="single"===o.type?"f32":"double"===o.type||"big-integer"===o.type?"f64":"small-integer"===o.type?"s16":"s32",h=s.length,f=new("f32"===a?Float32Array:"f64"===a?Float64Array:"s16"===a?Int16Array:Int32Array)(h),c=new Map;for(const n of i.features){const t=n.attributes[r.name],e=n.attributes[o.name];c.set(t,e)}const u=t.mask??new Uint8Array(h).fill(255);for(let n=0;n<h;n++)if(u[n]){const t=c.get(s[n]);null==t?u[n]=0:f[n]=t}return new n({width:t.width,height:t.height,pixels:[f],mask:u,pixelType:a})}function $(t){const{srcDimensions:e,destDimension:n,transformGrid:{coefficients:l,spacing:i},bias:o=0,pos:{x:r,y:s}}=t;if(!l?.length)return null;const{width:a,height:h}=e,{width:f}=n,[c,u]=i,p=Math.ceil(f/c-.1/c),x=Math.floor(r/c),d=Math.floor(s/u),m=Math.floor(r-x*c),g=Math.floor(s-d*u),y=12*(d*p+x)+(m>=g?6:0),w=(g+.5)/u,k=(m+.5)/c;return{x:(l[y]*k+l[y+1]*w+l[y+2])*a+o,y:(l[y+3]*k+l[y+4]*w+l[y+5])*h+o}}function J(t){const{pos:e,pixelData:n,pixelSize:l,transformGrid:i}=t;if(!n.pixelBlock)return null;const{xmin:o,xmax:r,ymin:s,ymax:a}=n.extent;let h=Math.floor((e.x-o)/l.x),f=Math.floor((a-e.y)/l.y);const c={width:Math.round((r-o)/l.x),height:Math.round((a-s)/l.y)},{width:u,height:p,mask:x}=n.pixelBlock;if(i){const t=$({pos:{x:h,y:f},transformGrid:i,srcDimensions:{width:u,height:p},destDimension:c});if(!t||t.x<0||t.x>=u||t.y<0||t.y>=p)return null;h=t.x,f=t.y}const d=Math.floor(f),m=Math.floor(h),g=d*u+m,y=x&&!x[g]?null:n.pixelBlock.pixels.map(t=>t[g]);return{x:h,y:f,row:d,col:m,position:g,value:y}}export{z as approximateTransform,_ as clip,E as clipTile,h as colorize,s as compositeBands,O as convertPixelBlockToFeatures,L as countCategoricalPixels,a as createColormapLUT,U as createMaskLUT,m as createRangeMaps,A as createRemapLUT,r as extractBands,b as getClipBounds,j as getLocalArithmeticNorthRotations,J as getPixelLocationAndValue,$ as getPixelOffset,G as getValidPixels,x as highlightPixels,N as interpolateOffsets,o as isValidPixelBlock,c as lookupBandValues,f as lookupPixels,V as mapPixelValueToAttribute,M as mask,k as matchAnyMask,l as maxMapSizeGpu,S as mosaic,T as mosaicPixelData,i as pixelIdFieldName,g as remap,d as remapColor,I as resampleByMajority,u as selectBySingleBandRange,p as selectByXYMask,C as setValidBoundary,W as split};
|
|
2
|
+
import{numberMaxFloat32 as t}from"../../../core/mathUtils.js";import{getPixelValueRange as e}from"../formats/pixelRangeUtils.js";import n from"../../support/PixelBlock.js";const l=9,i="PixelID";function o(t){return null!=t&&t.pixels?.length>0}function s(t){if(!t?.length||t.some(t=>!o(t)))return null;if(1===t.length)return t[0]?.clone()??null;const e=t,{width:l,height:i,pixelType:s}=e[0];if(e.some(t=>t.width!==l||t.height!==i))return null;const r=e.map(({mask:t})=>t).filter(t=>null!=t);let a=null;r.length&&(a=new Uint8Array(l*i),a.set(r[0]),r.length>1&&w(r.slice(1),a));const h=[];e.forEach(({pixels:t})=>h.push(...t));const f=null!=a&&h.length===e.length?e.map(({width:t,height:e,mask:n})=>n??new Uint8Array(t*e).fill(255)):null,c=e.map(({statistics:t})=>t).filter(t=>t?.length),u=[];return c.forEach(t=>u.push(...t)),new n({pixelType:s,width:l,height:i,mask:a,bandMasks:f,pixels:h,statistics:u.length?u:null})}function r(t){if(!t)return;const e=t.colormap;if(!e||0===e.length)return;const n=e.sort((t,e)=>t[0]-e[0]),l=n[0][0]<0?n[0][0]:0,i=Math.max(256,n[n.length-1][0]-l+1),o=new Uint8Array(4*i),s=[],r=5===n[0].length;if(i>65536)return n.forEach(t=>{s[t[0]-l]=r?t.slice(1):t.slice(1).concat([255])}),{indexed2DColormap:s,offset:l,alphaSpecified:r};if(t.fillUnspecified){let t=n[0];for(let e=t[0]-l,s=0;e<i;e++)o[4*e]=t[1],o[4*e+1]=t[2],o[4*e+2]=t[3],o[4*e+3]=r?t[4]:255,e===t[0]-l&&(t=s===n.length-1?t:n[++s])}else for(let a=0;a<n.length;a++){const t=n[a],e=4*(t[0]-l);o[e]=t[1],o[e+1]=t[2],o[e+2]=t[3],o[e+3]=r?t[4]:255}return{indexedColormap:o,offset:l,alphaSpecified:r}}function a(t,e){if(!o(t))return t;if(!e||!e.indexedColormap&&!e.indexed2DColormap)return t;const n=t.clone(),l=n.pixels;let i=n.mask;const s=n.width*n.height;if(1!==l.length)return t;const{indexedColormap:r,indexed2DColormap:a,offset:h,alphaSpecified:f}=e,c=l[0],u=new Uint8Array(c.length),p=new Uint8Array(c.length),x=new Uint8Array(c.length);let d,m=0;if(r){const t=r.length-1;if(null!=i)for(let e=0;e<s;e++)i[e]&&(m=4*(c[e]-h),m<h||m>t?i[e]=0:(u[e]=r[m],p[e]=r[m+1],x[e]=r[m+2],i[e]=r[m+3]));else{i=new Uint8Array(s);for(let e=0;e<s;e++)m=4*(c[e]-h),m<h||m>t?i[e]=0:(u[e]=r[m],p[e]=r[m+1],x[e]=r[m+2],i[e]=r[m+3]);n.mask=i}}else if(a)if(null!=i)for(let o=0;o<s;o++)i[o]&&(d=a[c[o]],u[o]=d[0],p[o]=d[1],x[o]=d[2],i[o]=d[3]);else{i=new Uint8Array(s);for(let t=0;t<s;t++)d=a[c[t]],u[t]=d[0],p[t]=d[1],x[t]=d[2],i[t]=d[3];n.mask=i}return n.pixels=[u,p,x],n.statistics=null,n.pixelType="u8",n.maskIsAlpha=f,n}function h(t,e){if(!o(t))return null;const{pixels:l,mask:i}=t,s=l.length;let r=e.lut;const{offset:a}=e;r&&1===r[0].length&&(r=l.map(()=>r));const h=[],c=e.outputPixelType||"u8";for(let n=0;n<s;n++){const t=f(l[n],i,r[n],a||0,c);h.push(t)}const u=new n({width:t.width,height:t.height,pixels:h,mask:i,pixelType:c});return u.updateStatistics(),u}function f(t,e,l,i,o){const s=t.length,r=n.createEmptyBand(o,s);if(e)for(let n=0;n<s;n++)e[n]&&(r[n]=l[t[n]-i]);else for(let n=0;n<s;n++)r[n]=l[t[n]-i];return r}function c(t,e,n,l){const{width:i,height:o,pixels:s,mask:r}=t,a=i*o,{bandId:h,ranges:f}=n,c=s[h];if(!c)return;const u=1===f.length,[p,x]=f[0];for(let d=0;d<a;d++)if(!r||r[d]){const t=c[d];if(u)t>=p&&t<=x&&(e[d]=l);else for(let n=0;n<f.length;n++){const[i,o]=f[n];if(t>=i&&t<=o){e[d]=l;break}}}}function u(t,e,n,l){const{width:i,height:o,xyMask:s,xBandId:r,yBandId:a,xBandRange:h,yBandRange:f}=n,{pixels:c,mask:u}=t,p=c[r],x=c[a],[d,m]=h,[g,y]=f,w=(m-d)/i,k=(y-g)/o;for(let M=0;M<p.length;M++)if(!u||u[M]){let t=p[M],n=x[M];if(t<d||t>m||n<g||n>y)continue;s?(t=(t-d)*w,t=t>i-1?i-1:t<0?0:255&t,n=(y-n)*k,n=n>o-1?o-1:n<0?0:255&n,s[n*i+t]&&(e[M]=l)):e[M]=l}}function p(t){const{pixelBlock:e,renderedPixelBlock:n,highlightOptions:l}=t;if(!o(e))return;const{width:i,height:s}=e,r=i*s,a=new Uint8Array(r);for(let o=1;o<=l.length;o++){const t=l[o-1];"bandId"in t?c(e,a,t,o):u(e,a,t,o)}const{pixels:h}=n;1===h.length&&(h[1]=h[0].slice(),h[2]=h[0].slice());const f=l.map(t=>t.color),[p,x,d]=h;if(n.mask){const t=n.mask;for(let e=0;e<r;e++)if(t[e]){t[e]=255;const n=a[e];if(n){const l=f[n-1];p[e]=l[0],x[e]=l[1],d[e]=l[2],t[e]=l[3]}}}else{const t=new Uint8Array(r).fill(255);for(let e=0;e<r;e++){const n=a[e];if(n){const l=f[n-1];p[e]=l[0],x[e]=l[1],d[e]=l[2],t[e]=l[3]}}n.mask=t}n.maskIsAlpha=!0}function x(t,e){if(!o(t))return null;const n=t.clone(),{pixels:l}=n,i=n.width*n.height,s=e.length,r=Math.floor(s/2),a=e[Math.floor(r)],h=l[0],f=new Uint8Array(i),c=new Uint8Array(i),u=new Uint8Array(i);let p=n.mask;const x=4===e[0].mappedColor.length;p||(p=new Uint8Array(i),p.fill(x?255:1),n.mask=p);for(let o=0;o<i;o++)if(p[o]){const t=h[o];let n=!1,l=r,i=a,x=0,d=s-1;for(;d-x>1;){if(t===i.value){n=!0;break}t>i.value?x=l:d=l,l=Math.floor((x+d)/2),i=e[Math.floor(l)]}n||(t===e[x].value?(i=e[x],n=!0):t===e[d].value?(i=e[d],n=!0):t<e[x].value?n=!1:t>e[x].value&&(t<e[d].value?(i=e[x],n=!0):d===s-1?n=!1:(i=e[d],n=!0))),n?(f[o]=i.mappedColor[0],c[o]=i.mappedColor[1],u[o]=i.mappedColor[2],p[o]=i.mappedColor[3]):f[o]=c[o]=u[o]=p[o]=0}return n.pixels=[f,c,u],n.mask=p,n.pixelType="u8",n.maskIsAlpha=x,n}function d(e,n,i=!1){const o=1e-5,s=new Float32Array(3*l),r=n.length;for(let a=0;a<l;a++)s[3*a]=e[2*a]??t-1,s[3*a+1]=e[2*a+1]??t,s[3*a+2]=n[a]??0,a<r&&(a>0&&(s[3*a]-=o),e[2*a+1]!==e[2*a]&&(a<r-1||!i)&&(s[3*a+1]-=o));return s}function m(t,l){if(!o(t))return null;const{width:i,height:s}=t,{inputRanges:r,outputValues:a,outputPixelType:h,noDataRanges:f,allowUnmatched:c,replacementValue:u,isLastInputRangeInclusive:p}=l,x=t.pixels[0],d=n.createEmptyBand(h,x.length),m=t.mask,g=new Uint8Array(i*s);m?g.set(m):g.fill(255);const y=t.pixelType.startsWith("f")?1e-6:0,w=r.map(t=>t-y);w[0]=r[0],w[w.length-1]=r[r.length-1]+(p?1e-6:0);const k=r.length/2,[M,A]=e(h);for(let e=0;e<s;e++)for(let t=0;t<i;t++){const n=e*i+t;if(g[n]){const t=x[n];let e=!1;for(let l=k-1;l>=0;l--)if(t===r[2*l]||t>w[2*l]&&t<w[2*l+1]){d[n]=a[l],e=!0;break}e||(c?d[n]=t>A?A:t<M?M:u??t:g[n]=0)}}const U=f?.length;if(U)for(let e=0;e<s;e++)for(let t=0;t<i;t++){const n=e*i+t;if(!m||m[n]){const t=x[n];for(let e=0;e<U;e+=2)if(t>=f[e]&&t<=f[e+1]){d[n]=0,g[n]=0;break}}}return new n({width:i,height:s,pixelType:h,pixels:[d],mask:g})}function g(t,e,n,l){const i=null!=n&&n.length>=2?new Set(n):null,o=1===n?.length?n[0]:null,s=!!e?.length;for(let r=0;r<t.length;r++)if(l[r]){const n=t[r];if(s){let t=!1;for(let l=0;l<e.length;l+=2)if(n>=e[l]&&n<=e[l+1]){t=!0;break}t||(l[r]=0)}l[r]&&(n===o||i?.has(n))&&(l[r]=0)}}function y(t,e){const n=t[0].length;e??=new Uint8Array(n).fill(255);for(let l=0;l<n;l++)if(e[l]){let n=!1;for(let e=0;e<t.length;e++)if(t[e][l]){n=!0;break}n||(e[l]=0)}return e}function w(t,e){const n=t[0].length;e??=new Uint8Array(n).fill(255);for(let l=0;l<n;l++)if(e[l]){let n=!1;for(let e=0;e<t.length;e++)if(0===t[e][l]){n=!0;break}n&&(e[l]=0)}return e}function k(t,e){if(!o(t))return null;const{width:l,height:i,pixels:s}=t,r=l*i,a=new Uint8Array(r);t.mask?a.set(t.mask):a.fill(255);const h=s.length,{includedRanges:c,noDataValues:u,outputPixelType:p,matchAll:x,lookups:d}=e;if(d){const t=[];for(let e=0;e<h;e++){const n=d[e],l=f(s[e],a,n.lut,n.offset||0,"u8");t.push(l)}1===t.length?a.set(t[0]):x?y(t,a):w(t,a)}else if(x){const t=[];for(let e=0;e<h;e++){const n=new Uint8Array(r);n.set(a),g(s[e],c?.slice(2*e,2*e+2),u?.[e],n),t.push(n)}1===t.length?a.set(t[0]):y(t,a)}else for(let n=0;n<h;n++)g(s[n],c?.slice(2*n,2*n+2),u?.[n],a);return new n({width:l,height:i,pixelType:p,pixels:s,mask:a})}function M(t){const{srcPixelType:l,inputRanges:i,outputValues:o,allowUnmatched:s,noDataRanges:r,isLastInputRangeInclusive:a,outputPixelType:h}=t;if("u8"!==l&&"s8"!==l&&"u16"!==l&&"s16"!==l)return null;const f=l.includes("16")?65536:256,c=l.includes("s")?-f/2:0,u=n.createEmptyBand(h,f),p=new Uint8Array(f);s&&p.fill(255);const[x,d]=e(h);if(i?.length&&o?.length){const t=1e-6,e=i.map(e=>e-t);e[0]=i[0],a&&(e[e.length-1]=i[i.length-1]);for(let n=0;n<e.length;n++){const t=o[n]>d?d:o[n]<x?x:o[n],l=Math.ceil(e[2*n]-c),s=i[2*n+1]===i[2*n]?l:Math.floor(e[2*n+1]-c);for(let e=l;e<=s;e++)u[e]=t,p[e]=255}}if(r?.length)for(let e=0;e<r.length;e++){const t=Math.ceil(r[2*e]-c),n=Math.floor(r[2*e+1]-c);for(let e=t;e<=n;e++)p[e]=0}return{lut:u,offset:c,mask:p}}function A(t,e,n){if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const l=t.includes("16")?65536:256,i=t.includes("s")?-l/2:0,o=new Uint8Array(l);if(e)for(let s=0;s<e.length;s++){const t=Math.ceil(e[2*s]-i),n=Math.floor(e[2*s+1]-i);for(let e=t;e<=n;e++)o[e]=255}else o.fill(255);if(n)for(let s=0;s<n.length;s++)o[n[s]-i]=0;return{lut:o,offset:i}}function U(t,e,n,l,i,o,s,r){return{xmin:i<=n*t?0:i<n*t+t?i-n*t:t,ymin:o<=l*e?0:o<l*e+e?o-l*e:e,xmax:i+s<=n*t?0:i+s<n*t+t?i+s-n*t:t,ymax:o+r<=l*e?0:o+r<l*e+e?o+r-l*e:e}}function b(t,e){if(!t||0===t.length)return null;const n=t.find(t=>t.pixelBlock);if(null==n?.pixelBlock)return null;const l=(n.extent.xmax-n.extent.xmin)/n.pixelBlock.width,i=(n.extent.ymax-n.extent.ymin)/n.pixelBlock.height,o=.01*Math.min(l,i),s=t.sort((t,e)=>Math.abs(t.extent.ymax-e.extent.ymax)>o?e.extent.ymax-t.extent.ymax:Math.abs(t.extent.xmin-e.extent.xmin)>o?t.extent.xmin-e.extent.xmin:0),r=Math.min.apply(null,s.map(t=>t.extent.xmin)),a=Math.min.apply(null,s.map(t=>t.extent.ymin)),h=Math.max.apply(null,s.map(t=>t.extent.xmax)),f=Math.max.apply(null,s.map(t=>t.extent.ymax)),c={x:Math.round((e.xmin-r)/l),y:Math.round((f-e.ymax)/i)},u={width:Math.round((h-r)/l),height:Math.round((f-a)/i)},p={width:Math.round((e.xmax-e.xmin)/l),height:Math.round((e.ymax-e.ymin)/i)};if(Math.round(u.width/n.pixelBlock.width)*Math.round(u.height/n.pixelBlock.height)!==s.length||c.x<0||c.y<0||u.width<p.width||u.height<p.height)return null;return{extent:e,pixelBlock:B(s.map(t=>t.pixelBlock),u,{clipOffset:c,clipSize:p})}}function T(t,e,n,l,i,o){const{width:s,height:r}=n.block,{x:a,y:h}=n.offset,{width:f,height:c}=n.mosaic,u=U(s,r,l,i,a,h,f,c);let p=0,x=0;if(o){const t=o.hasGCSSShiftTransform?360:o.halfWorldWidth??0,e=s*o.resolutionX,n=o.startX+l*e;n<t&&n+e>t?x=o.rightPadding:n>=t&&(p=o.leftMargin-o.rightPadding,x=0)}if(u.xmax-=x,"number"!=typeof e)for(let d=u.ymin;d<u.ymax;d++){const n=(i*r+d-h)*f+(l*s-a)+p,o=d*s;for(let l=u.xmin;l<u.xmax;l++)t[n+l]=e[o+l]}else for(let d=u.ymin;d<u.ymax;d++){const n=(i*r+d-h)*f+(l*s-a)+p;for(let l=u.xmin;l<u.xmax;l++)t[n+l]=e}}function B(t,e,l={}){const{clipOffset:i,clipSize:s,alignmentInfo:r,blockWidths:a}=l;if(a)return S(t,e,{blockWidths:a});const h=t.find(t=>o(t));if(null==h)return null;const f=s?s.width:e.width,c=s?s.height:e.height,u=h.width,p=h.height,x=e.width/u,d=e.height/p,m={offset:i||{x:0,y:0},mosaic:s||e,block:{width:u,height:p}},g=h.pixelType,y=n.getPixelArrayConstructor(g),w=h.pixels.length,k=[];let M,A;for(let n=0;n<w;n++){A=new y(f*c);for(let e=0;e<d;e++)for(let l=0;l<x;l++){const i=t[e*x+l];o(i)&&(M=i.pixels[n],T(A,M,m,l,e,r))}k.push(A)}const U=t.some(t=>null==t||null!=t.mask&&t.mask.length>0),b=t.some(t=>t?.bandMasks&&t.bandMasks.length>1),B=U?new Uint8Array(f*c):void 0,v=b?[]:void 0;if(B){for(let e=0;e<d;e++)for(let n=0;n<x;n++){const l=t[e*x+n],i=null!=l?l.mask:null;T(B,null!=i?i:l?255:0,m,n,e,r)}if(v)for(let e=0;e<w;e++){const n=new Uint8Array(f*c);for(let l=0;l<d;l++)for(let i=0;i<x;i++){const o=t[l*x+i],s=o?.bandMasks?.[e]??o?.mask;T(n,null!=s?s:o?255:0,m,i,l,r)}v.push(n)}}const C=new n({width:f,height:c,pixels:k,pixelType:g,bandMasks:v,mask:B});return C.updateStatistics(),C}function S(t,e,l){const i=t.find(t=>null!=t);if(null==i)return null;const s=t.some(t=>null==t||!!t.mask),{width:r,height:a}=e,h=s?new Uint8Array(r*a):null,{blockWidths:f}=l,c=[],u=i.getPlaneCount(),p=n.getPixelArrayConstructor(i.pixelType);if(s)for(let n=0,y=0;n<t.length;y+=f[n],n++){const e=t[n];if(!o(e))continue;const l=e.mask;for(let t=0;t<a;t++)for(let i=0;i<f[n];i++)h[t*r+i+y]=null==l?255:l[t*e.width+i]}const x=t.some(t=>t?.bandMasks&&t.bandMasks.length>1),d=x?[]:void 0,m=r*a;for(let n=0;n<u;n++){const e=new p(m),l=x?new Uint8Array(m):void 0;for(let i=0,s=0;i<t.length;s+=f[i],i++){const h=t[i];if(!o(h))continue;const c=h.pixels[n];if(null!=c){for(let t=0;t<a;t++)for(let n=0;n<f[i];n++)e[t*r+n+s]=c[t*h.width+n];if(l){const t=h.bandMasks?.[n]??h.mask;for(let e=0;e<a;e++)for(let n=0;n<f[i];n++)l[e*r+n+s]=t?t[e*h.width+n]:255}}}c.push(e),d&&l&&d.push(l)}const g=new n({width:r,height:a,mask:h,bandMasks:d,pixels:c,pixelType:i.pixelType});return g.updateStatistics(),g}function v(t,e,n){if(!o(t))return null;const{width:l,height:i}=t,s=e.x,r=e.y,a=n.width+s,h=n.height+r;if(s<0||r<0||a>l||h>i)return t;if(0===s&&0===r&&a===l&&h===i)return t;t.mask||(t.mask=new Uint8Array(l*i));const f=t.mask;for(let o=0;o<i;o++){const t=o*l;for(let e=0;e<l;e++)f[t+e]=o<r||o>=h||e<s||e>=a?0:1}return t.updateStatistics(),t}function C(t){if(!o(t))return null;const e=t.clone(),{width:n,height:l,pixels:i}=t,s=i[0],r=e.pixels[0],a=t.mask;for(let o=2;o<l-1;o++){const t=new Map;for(let l=o-2;l<o+2;l++)for(let e=0;e<4;e++){const i=l*n+e;P(t,s[i],a?a[i]:1)}r[o*n]=I(t),r[o*n+1]=r[o*n+2]=r[o*n];let e=3;for(;e<n-1;e++){let l=(o-2)*n+e+1;P(t,s[l],a?a[l]:1),l=(o-1)*n+e+1,P(t,s[l],a?a[l]:1),l=o*n+e+1,P(t,s[l],a?a[l]:1),l=(o+1)*n+e+1,P(t,s[l],a?a[l]:1),l=(o-2)*n+e-3,R(t,s[l],a?a[l]:1),l=(o-1)*n+e-3,R(t,s[l],a?a[l]:1),l=o*n+e-3,R(t,s[l],a?a[l]:1),l=(o+1)*n+e-3,R(t,s[l],a?a[l]:1),r[o*n+e]=I(t)}r[o*n+e+1]=r[o*n+e]}for(let o=0;o<n;o++)r[o]=r[n+o]=r[2*n+o],r[(l-1)*n+o]=r[(l-2)*n+o];return e.updateStatistics(),e}function I(t){if(0===t.size)return 0;let e=0,n=-1,l=0;const i=t.keys();let o=i.next();for(;!o.done;)l=t.get(o.value),l>e&&(n=o.value,e=l),o=i.next();return n}function R(t,e,n){if(0===n)return;const l=t.get(e);1===l?t.delete(e):t.set(e,l-1)}function P(t,e,n){0!==n&&t.set(e,t.has(e)?t.get(e)+1:1)}function D(t,e,l){let{x:i,y:s}=e;const{width:r,height:a}=l;if(0===i&&0===s&&a===t.height&&r===t.width)return t;const{width:h,height:f}=t,c=Math.max(0,s),u=Math.max(0,i),p=Math.min(i+r,h),x=Math.min(s+a,f);if(p<0||x<0||!o(t))return null;i=Math.max(0,-i),s=Math.max(0,-s);const{pixels:d}=t,m=r*a,g=d.length,y=[];for(let o=0;o<g;o++){const e=d[o],l=n.createEmptyBand(t.pixelType,m);for(let t=c;t<x;t++){const n=t*h;let o=(t+s-c)*r+i;for(let t=u;t<p;t++)l[o++]=e[n+t]}y.push(l)}const w=new Uint8Array(m),k=t.mask;for(let n=c;n<x;n++){const t=n*h;let e=(n+s-c)*r+i;for(let n=u;n<p;n++)w[e++]=k?k[t+n]:1}const M=new n({width:l.width,height:l.height,pixelType:t.pixelType,pixels:y,mask:w});return M.updateStatistics(),M}function _(t,e=!0){if(!o(t))return null;const{pixels:l,width:i,height:s,mask:r,pixelType:a}=t,h=[],f=Math.round(i/2),c=Math.round(s/2),u=s-1,p=i-1;for(let o=0;o<l.length;o++){const t=l[o],r=n.createEmptyBand(a,f*c);let x=0;for(let n=0;n<s;n+=2)for(let l=0;l<i;l+=2){const o=t[n*i+l];if(e){const e=l===p?o:t[n*i+l+1],s=n===u?o:t[n*i+l+i],a=l===p?s:n===u?e:t[n*i+l+i+1];r[x++]=(o+e+s+a)/4}else r[x++]=o}h.push(r)}let x=null;if(null!=r){x=new Uint8Array(f*c);let t=0;for(let n=0;n<s;n+=2)for(let l=0;l<i;l+=2){const o=r[n*i+l];if(e){const e=l===p?o:r[n*i+l+1],s=n===u?o:r[n*i+l+i],a=l===p?s:n===u?e:r[n*i+l+i+1];x[t++]=o*e*s*a?1:0}else x[t++]=o}}return new n({width:f,height:c,pixelType:a,pixels:h,mask:x})}function F(t,e,n=0,l=!0){if(!o(t))return null;const{width:i,height:s}=e;let{width:r,height:a}=t;const h=new Map,f={x:0,y:0},c=1+n;let u=t;for(let o=0;o<c;o++){const t=Math.ceil(r/i),n=Math.ceil(a/s);for(let l=0;l<n;l++){f.y=l*s;for(let n=0;n<t;n++){f.x=n*i;const t=D(u,f,e);h.set(`${o}/${l}/${n}`,t)}}o<c-1&&(u=_(u,l)),r=Math.round(r/2),a=Math.round(a/2)}return h}function W(t){const{pixelBlock:e,tileSize:n,level:l,row:i,col:s,useBilinear:r}=t;if(!o(e))return null;const{width:a,height:h}=n,f=2**l,c=f*a,u=f*h;let p=D(e,{y:i*u,x:s*c},{width:c,height:u});if(!p)return null;for(let o=l;o>0;o--)p=_(p,r);return p}function E(t,e,n,l,i=0){const{width:o,height:s}=t,{width:r,height:a}=e,h=l.cols,f=l.rows,c=Math.ceil(r/h-.1/h),u=Math.ceil(a/f-.1/f);let p,x,d,m,g,y,w;const k=c*h,M=k*u*f,A=new Float32Array(M),U=new Float32Array(M),b=new Uint32Array(M),T=new Uint32Array(M);let B,S,v=0;for(let C=0;C<u;C++)for(let t=0;t<c;t++){p=12*(C*c+t),x=n[p],d=n[p+1],m=n[p+2],g=n[p+3],y=n[p+4],w=n[p+5];for(let e=0;e<f;e++){v=(C*f+e)*k+t*h,S=(e+.5)/f;for(let t=0;t<e;t++)B=(t+.5)/h,A[v+t]=(x*B+d*S+m)*o+i,U[v+t]=(g*B+y*S+w)*s+i,b[v+t]=Math.floor(A[v+t]),T[v+t]=Math.floor(U[v+t])}p+=6,x=n[p],d=n[p+1],m=n[p+2],g=n[p+3],y=n[p+4],w=n[p+5];for(let e=0;e<f;e++){v=(C*f+e)*k+t*h,S=(e+.5)/f;for(let t=e;t<h;t++)B=(t+.5)/h,A[v+t]=(x*B+d*S+m)*o+i,U[v+t]=(g*B+y*S+w)*s+i,b[v+t]=Math.floor(A[v+t]),T[v+t]=Math.floor(U[v+t])}}return{offsets_x:A,offsets_y:U,offsets_xi:b,offsets_yi:T,gridWidth:k}}function N(t,e){const{coefficients:n,spacing:l}=e,{offsets_x:i,offsets_y:o,gridWidth:s}=E(t,t,n,{rows:l[0],cols:l[1]}),{width:r,height:a}=t,h=new Float32Array(r*a),f=180/Math.PI;for(let c=0;c<a;c++)for(let t=0;t<r;t++){const e=c*s+t,n=0===c?e:e-s,l=c===a-1?e:e+s,u=i[n]-i[l],p=o[l]-o[n];if(isNaN(u)||isNaN(p))h[c*r+t]=90;else{let e=Math.atan2(p,u)*f;e=(360+e)%360,h[c*r+t]=e}}return h}function j(t,e,l,i,s="nearest"){if(!o(t))return null;"majority"===s&&(t=C(t));const{pixels:r,mask:a,bandMasks:h,pixelType:f}=t,c=t.width,u=t.height,p=n.getPixelArrayConstructor(f),x=r.length,{width:d,height:m}=e;let g=!1;for(let n=0;n<l.length;n+=3)-1===l[n]&&-1===l[n+1]&&-1===l[n+2]&&(g=!0);const{offsets_x:y,offsets_y:w,offsets_xi:k,offsets_yi:M,gridWidth:A}=E({width:c,height:u},e,l,i,"majority"===s?.5:0);let U;const b=(t,e,n,l)=>{const i=t instanceof Float32Array||t instanceof Float64Array?0:.5;for(let o=0;o<m;o++){U=o*A;for(let s=0;s<d;s++){if(y[U]<0||w[U]<0)t[o*d+s]=0;else if(l)t[o*d+s]=e[k[U]+M[U]*c];else{const l=Math.floor(y[U]),r=Math.floor(w[U]),a=Math.ceil(y[U]),h=Math.ceil(w[U]),f=y[U]-l,u=w[U]-r;if(!n||n[l+r*c]&&n[a+r*c]&&n[l+h*c]&&n[a+h*c]){const n=(1-f)*e[l+r*c]+f*e[a+r*c],p=(1-f)*e[l+h*c]+f*e[a+h*c];t[o*d+s]=(1-u)*n+u*p+i}else t[o*d+s]=e[k[U]+M[U]*c]}U++}}},T=[];let B;const S=h?.length===x,v=[];for(let n=0;n<x;n++){if(S){const t=new Uint8Array(d*m);b(t,h[n],h[n],!0),v.push(t)}B=new p(d*m),b(B,r[n],S?h[n]:a,"nearest"===s||"majority"===s),T.push(B)}const I=new n({width:d,height:m,pixelType:f,pixels:T,bandMasks:S?v:void 0});if(null!=a)I.mask=new Uint8Array(d*m),b(I.mask,a,a,!0);else if(g){I.mask=new Uint8Array(d*m);for(let t=0;t<d*m;t++)I.mask[t]=y[t]<0||w[t]<0?0:1}return I.updateStatistics(),I}function z(t){const{pixelBlock:e,extent:n,fieldNames:l,skipFactor:o,skipSpatialReference:s=!1,pixelIdOffset:r=0}=t,a=[],{width:h,height:f,pixels:c,mask:u}=e,p=t.imageRowSize??h,x=n.width/h,d=n.height/f,m=c.length,g=Math.floor(o/2),{xmin:y,ymax:w}=n,k=s?void 0:n.spatialReference.toJSON();for(let M=g;M<f;M+=o)for(let t=g;t<h;t+=o){const e=M*h+t;if(!u||u[e]){const n={x:y+(t+.5)*x,y:w-(M+.5)*d,spatialReference:k},o={[i]:r+M*p+t};for(let t=0;t<m;t++)o[l[t+1]]=c[t][e];a.push({geometry:n,attributes:o})}}return a}function O(t,e){const{width:n,height:l,pixels:i,mask:o}=t,s=i[0];let r=0;for(let a=0;a<l;a++){let t=a*n;for(let l=0;l<n;l++,t++)if(!o||o[t]){const n=s[t];e.set(n,(e.get(n)??0)+1),r++}}return r}function L(t,e){const{width:n,height:l,pixels:i,mask:o}=t,s=e.width/n,r=e.height/l,{xmin:a,ymax:h}=e,f=e.spatialReference.toJSON(),c=[];for(let u=0;u<l;u++)for(let t=0;t<n;t++){const e=u*n+t;if(!o||o[e]){const n={x:a+(t+.5)*s,y:h-(u+.5)*r,spatialReference:f},l=i.map(t=>t[e]);c.push({location:n,value:l})}}return c}function G(t,e,l){const{attributeTable:i}=e;if(!i)return t;const o=i.fields.find(t=>t.name.toLowerCase()===l.toLowerCase()),s=i.fields.find(t=>"value"===t.name.toLowerCase());if(!o||!s)return t;const[r]=t.pixels,a="single"===o.type?"f32":"double"===o.type||"big-integer"===o.type?"f64":"small-integer"===o.type?"s16":"s32",h=r.length,f=new("f32"===a?Float32Array:"f64"===a?Float64Array:"s16"===a?Int16Array:Int32Array)(h),c=new Map;for(const n of i.features){const t=n.attributes[s.name],e=n.attributes[o.name];c.set(t,e)}const u=t.mask??new Uint8Array(h).fill(255);for(let n=0;n<h;n++)if(u[n]){const t=c.get(r[n]);null==t?u[n]=0:f[n]=t}return new n({width:t.width,height:t.height,pixels:[f],mask:u,pixelType:a})}function V(t){const{srcDimensions:e,destDimension:n,transformGrid:{coefficients:l,spacing:i},bias:o=0,pos:{x:s,y:r}}=t;if(!l?.length)return null;const{width:a,height:h}=e,{width:f}=n,[c,u]=i,p=Math.ceil(f/c-.1/c),x=Math.floor(s/c),d=Math.floor(r/u),m=Math.floor(s-x*c),g=Math.floor(r-d*u),y=12*(d*p+x)+(m>=g?6:0),w=(g+.5)/u,k=(m+.5)/c;return{x:(l[y]*k+l[y+1]*w+l[y+2])*a+o,y:(l[y+3]*k+l[y+4]*w+l[y+5])*h+o}}function $(t){const{pos:e,pixelData:n,pixelSize:l,transformGrid:i}=t;if(!n.pixelBlock)return null;const{xmin:o,xmax:s,ymin:r,ymax:a}=n.extent;let h=Math.floor((e.x-o)/l.x),f=Math.floor((a-e.y)/l.y);const c={width:Math.round((s-o)/l.x),height:Math.round((a-r)/l.y)},{width:u,height:p,mask:x}=n.pixelBlock;if(i){const t=V({pos:{x:h,y:f},transformGrid:i,srcDimensions:{width:u,height:p},destDimension:c});if(!t||t.x<0||t.x>=u||t.y<0||t.y>=p)return null;h=t.x,f=t.y}const d=Math.floor(f),m=Math.floor(h),g=d*u+m,y=x&&!x[g]?null:n.pixelBlock.pixels.map(t=>t[g]);return{x:h,y:f,row:d,col:m,position:g,value:y}}export{j as approximateTransform,D as clip,W as clipTile,a as colorize,s as compositeBands,z as convertPixelBlockToFeatures,O as countCategoricalPixels,r as createColormapLUT,A as createMaskLUT,d as createRangeMaps,M as createRemapLUT,U as getClipBounds,N as getLocalArithmeticNorthRotations,$ as getPixelLocationAndValue,V as getPixelOffset,L as getValidPixels,p as highlightPixels,E as interpolateOffsets,o as isValidPixelBlock,f as lookupBandValues,h as lookupPixels,G as mapPixelValueToAttribute,k as mask,w as matchAnyMask,l as maxMapSizeGpu,B as mosaic,b as mosaicPixelData,i as pixelIdFieldName,m as remap,x as remapColor,C as resampleByMajority,c as selectBySingleBandRange,u as selectByXYMask,v as setValidBoundary,F as split};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../request.js";import n from"../../core/Error.js";import t from"./FabricKustoSource.js";import s from"./Field.js";import o from"./GeometryEncodingLocation.js";import{inferLocationInfo as a}from"./locationUtils.js";async function r(t,s){const{data:o}=await e(`https://api.fabric.microsoft.com/v1/workspaces/${t}/kqlDatabases/${s}`,{responseType:"json"});if(null==o)throw new n("kusto:connection",`KQL database '${s}' was not found in workspace '${t}'`);return o}async function i(e,n,
|
|
2
|
+
import e from"../../request.js";import n from"../../core/Error.js";import t from"./FabricKustoSource.js";import s from"./Field.js";import o from"./GeometryEncodingLocation.js";import{inferLocationInfo as a}from"./locationUtils.js";async function r(t,s){const{data:o}=await e(`https://api.fabric.microsoft.com/v1/workspaces/${t}/kqlDatabases/${s}`,{responseType:"json"});if(null==o)throw new n("kusto:connection",`KQL database '${s}' was not found in workspace '${t}'`);return o}async function i(e,n,s,i,l={}){if(i.database||(i.database=await r(e,n)),i.fields?.length||(i.fields=await c(i.database,s,l)),i.source||(i.source=new t({workspace:e,database:n,table:s})),!i.source.geometryEncoding){const e=a(i.fields.map(e=>e.name));e.latitudeFieldName&&e.longitudeFieldName&&(i.source.geometryEncoding=new o({xField:e.longitudeFieldName,yField:e.latitudeFieldName}))}return i}async function c(e,n,t={}){const s=await l(e,n,t),o=[];for(const a of s.OrderedColumns){const e=u(a);e&&o.push(e)}return o}async function l(n,t,s={}){const o=n.properties.queryServiceUri;return m((await e(`${o}/v1/rest/mgmt`,{responseType:"json",method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({db:n.displayName,csl:`.show table ${p(t)} schema as json`}),signal:s.signal})).data)}function u(e){const n=d(e.CslType);return n?new s({name:e.Name,type:n}):null}function d(e){switch(e){case"bool":return"small-integer";case"guid":case"string":return"string";case"int":return"integer";case"long":return"big-integer";case"real":return"double";case"dynamic":case"datetime":case"decimal":case"timespan":return null}}function m(e){const t=e.Tables[0];if(null==t||0===t.Rows.length)throw new n("kusto:invalid-schema-response","Kusto schema response did not include any rows");const[s,o]=t.Rows[0];if("string"!=typeof o)throw new n("kusto:invalid-schema-response","Kusto schema response did not include a schema string");return JSON.parse(o)}function p(e){return`['${e.replaceAll("'","''")}']`}function f(e){return e.replaceAll("'","''")}export{i as completeKustoStreamLayerInfo,p as escapeKustoIdentifier,f as escapeKustoStringLiteral,r as fetchKustoDatabaseDetails};
|
package/layers/types.d.ts
CHANGED
|
@@ -1043,6 +1043,12 @@ export interface VectorTileLayerCapabilitiesExportTiles {
|
|
|
1043
1043
|
* @see [MapImageLayer.fetchImage()](https://developers.arcgis.com/javascript/latest/references/core/layers/MapImageLayer/#fetchImage)
|
|
1044
1044
|
*/
|
|
1045
1045
|
export interface FetchImageOptions extends AbortOptions {
|
|
1046
|
+
/**
|
|
1047
|
+
* The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at.
|
|
1048
|
+
*
|
|
1049
|
+
* @since 5.0
|
|
1050
|
+
*/
|
|
1051
|
+
pixelRatio?: number | null;
|
|
1046
1052
|
/**
|
|
1047
1053
|
* The rotation in degrees of the exported image. Available since ArcGIS Server 10.3.
|
|
1048
1054
|
*
|
|
@@ -1050,11 +1056,12 @@ export interface FetchImageOptions extends AbortOptions {
|
|
|
1050
1056
|
*/
|
|
1051
1057
|
rotation?: number | null;
|
|
1052
1058
|
/**
|
|
1053
|
-
* The
|
|
1059
|
+
* The map scale of the exported image.
|
|
1060
|
+
* If not specified, the scale will be calculated based on the provided `extent` and `size`.
|
|
1054
1061
|
*
|
|
1055
1062
|
* @since 5.0
|
|
1056
1063
|
*/
|
|
1057
|
-
|
|
1064
|
+
scale?: number | null;
|
|
1058
1065
|
/**
|
|
1059
1066
|
* The time instant or time extent of content to render.
|
|
1060
1067
|
*
|
package/package.json
CHANGED