@arcgis/core 4.24.0-next.20220430 → 4.24.0-next.20220503

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.
Files changed (998) hide show
  1. package/Basemap.js +1 -1
  2. package/Color.js +1 -1
  3. package/Ground.js +1 -1
  4. package/Map.js +1 -1
  5. package/PopupTemplate.js +1 -1
  6. package/WebMap.js +1 -1
  7. package/WebScene.js +1 -1
  8. package/analysis/LinearDimension.js +1 -1
  9. package/analysis/SliceAnalysis.js +1 -1
  10. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  11. package/arcade/Dictionary.js +1 -1
  12. package/arcade/Feature.js +1 -1
  13. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  14. package/arcade/featureset/support/FeatureSet.js +1 -1
  15. package/assets/esri/core/workers/RemoteClient.js +1 -1
  16. package/assets/esri/core/workers/chunks/{e06461703e6f1acfcfdc.js → 076d1b1101b59af0d389.js} +1 -1
  17. package/assets/esri/core/workers/chunks/0b72d123386dc4ec7538.js +1 -0
  18. package/assets/esri/core/workers/chunks/0d53e575f11198867619.js +1 -0
  19. package/assets/esri/core/workers/chunks/0e6e3cf07c84d9f040c0.js +1 -0
  20. package/assets/esri/core/workers/chunks/105728404ddd9e73d5c9.js +1 -0
  21. package/assets/esri/core/workers/chunks/11106873b009b98e4286.js +1 -0
  22. package/assets/esri/core/workers/chunks/11a7b156591d1feca952.js +1 -0
  23. package/assets/esri/core/workers/chunks/{94325f920a125610e1f5.js → 12feeace7215248be23f.js} +1 -1
  24. package/assets/esri/core/workers/chunks/17be5bd0d1c233d73d7a.js +1 -0
  25. package/assets/esri/core/workers/chunks/1b53bd65407ba5c479d7.js +1 -0
  26. package/assets/esri/core/workers/chunks/1d91aa745b49b2ab36cf.js +1 -0
  27. package/assets/esri/core/workers/chunks/{fd35b69872ac9393924f.js → 1db8bfb1731be3ae320c.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{3433361f09c84b31aec4.js → 2290bd6dc2e6bb136e14.js} +1 -1
  29. package/assets/esri/core/workers/chunks/24217129d492e170f0f0.js +1 -0
  30. package/assets/esri/core/workers/chunks/24e194107e0e5090125b.js +1 -0
  31. package/assets/esri/core/workers/chunks/2a1301a1d0cd4c0c17cf.js +1 -0
  32. package/assets/esri/core/workers/chunks/{178831b0d0bdabcc45e7.js → 2a676221ca1fc8e0cf34.js} +1 -1
  33. package/assets/esri/core/workers/chunks/2aede0d1dcac8592436b.js +1 -0
  34. package/assets/esri/core/workers/chunks/2b93ad626f5e75b97692.js +1 -0
  35. package/assets/esri/core/workers/chunks/2d03210fc6b5884c6bf9.js +1 -0
  36. package/assets/esri/core/workers/chunks/{b10c333abe4f4e52841c.js → 2dfd3def105005fc72c7.js} +1 -1
  37. package/assets/esri/core/workers/chunks/2f8ff35b8ab15c0e39c2.js +1 -0
  38. package/assets/esri/core/workers/chunks/36272141b3c33cb19026.js +1 -0
  39. package/assets/esri/core/workers/chunks/36c8e8de9c3f67d32572.js +1 -0
  40. package/assets/esri/core/workers/chunks/3ab8c6ae2f2713f637b0.js +1 -0
  41. package/assets/esri/core/workers/chunks/3c058381adcfdc407aa1.js +1 -0
  42. package/assets/esri/core/workers/chunks/3f39df1dfc0a685e5f9d.js +1 -0
  43. package/assets/esri/core/workers/chunks/3fd52a03b3126556aee6.js +1 -0
  44. package/assets/esri/core/workers/chunks/4082d8573f41f952c72e.js +1 -0
  45. package/assets/esri/core/workers/chunks/40b11eea270f6688ff9c.js +1 -0
  46. package/assets/esri/core/workers/chunks/4281b4b27f4767cdd3ae.js +1 -0
  47. package/assets/esri/core/workers/chunks/43fcaaeb6fd179e9199b.js +1 -0
  48. package/assets/esri/core/workers/chunks/4c65b27d80b23c0c3101.js +1 -0
  49. package/assets/esri/core/workers/chunks/{a6406a248b7b2ed65f35.js → 4ec7d59b0c814dbaa7a4.js} +1 -1
  50. package/assets/esri/core/workers/chunks/4f378ad6f4299183df85.js +1 -0
  51. package/assets/esri/core/workers/chunks/505b0aa5ee3e5a26c351.js +1 -0
  52. package/assets/esri/core/workers/chunks/509a9cdd0228a730bcea.js +1 -0
  53. package/assets/esri/core/workers/chunks/52255ad573cec0a34720.js +1 -0
  54. package/assets/esri/core/workers/chunks/52d4fdc451a58a858af1.js +1 -0
  55. package/assets/esri/core/workers/chunks/5405f478af3563580926.js +1 -0
  56. package/assets/esri/core/workers/chunks/54577c2522ca3ff08f7e.js +1 -0
  57. package/assets/esri/core/workers/chunks/54d67e450da6ce2641b4.js +1 -0
  58. package/assets/esri/core/workers/chunks/56d3cb0ae0069a8eadde.js +1 -0
  59. package/assets/esri/core/workers/chunks/5b4efe0014162f777534.js +1 -0
  60. package/assets/esri/core/workers/chunks/5baa162351551817838b.js +1 -0
  61. package/assets/esri/core/workers/chunks/5cf2064bfd9d0847d9ec.js +1 -0
  62. package/assets/esri/core/workers/chunks/620dc3c13c345d5aa9f6.js +1 -0
  63. package/assets/esri/core/workers/chunks/7c290763920f52a1f504.js +1 -0
  64. package/assets/esri/core/workers/chunks/7dc266be958e34e81007.js +972 -0
  65. package/assets/esri/core/workers/chunks/7dfd70f4fa1096e56641.js +1 -0
  66. package/assets/esri/core/workers/chunks/7f097de06972a68cd08a.js +1 -0
  67. package/assets/esri/core/workers/chunks/8033531b0cc706b40d86.js +1 -0
  68. package/assets/esri/core/workers/chunks/814234844a056d9f1ddc.js +1 -0
  69. package/assets/esri/core/workers/chunks/83700cdd60ceecc639cd.js +1 -0
  70. package/assets/esri/core/workers/chunks/857df84cea67079a91e5.js +1 -0
  71. package/assets/esri/core/workers/chunks/8793070d288878d6f49b.js +1 -0
  72. package/assets/esri/core/workers/chunks/8865c5cc28df60364e60.js +1 -0
  73. package/assets/esri/core/workers/chunks/{e9f786d4ba3143ed9644.js → 8cc85d1d46dda16ad041.js} +1 -1
  74. package/assets/esri/core/workers/chunks/958a7ef2cbf048819988.js +1 -0
  75. package/assets/esri/core/workers/chunks/967af0aa4dc4da032fdc.js +1 -0
  76. package/assets/esri/core/workers/chunks/9722880bd7f455b2bd07.js +1 -0
  77. package/assets/esri/core/workers/chunks/9d738aab0d907cd09a9d.js +1 -0
  78. package/assets/esri/core/workers/chunks/{86b31ae136f931d7884a.js → 9e6df034d7949880471f.js} +1 -1
  79. package/assets/esri/core/workers/chunks/a056a79f31cddb066f15.js +1 -0
  80. package/assets/esri/core/workers/chunks/a2c9fd78d42df7314a3e.js +1 -0
  81. package/assets/esri/core/workers/chunks/a4dcb50f6622cb1444c8.js +1 -0
  82. package/assets/esri/core/workers/chunks/a6bfbe449b8c2fa5334c.js +1 -0
  83. package/assets/esri/core/workers/chunks/a8ed1a938dc164b401d9.js +1 -0
  84. package/assets/esri/core/workers/chunks/a9a73bc4875a5aeaf1b9.js +1 -0
  85. package/assets/esri/core/workers/chunks/ac0df52b2f2a4874e4ea.js +1 -0
  86. package/assets/esri/core/workers/chunks/{431efa172901ab8e4d53.js → acfa8eb19225f7862b1d.js} +1 -1
  87. package/assets/esri/core/workers/chunks/adae54f116f311d72d97.js +1 -0
  88. package/assets/esri/core/workers/chunks/{718073d13d3de67b629b.js → aeeb364b7c1876f6e7db.js} +1 -1
  89. package/assets/esri/core/workers/chunks/afddfe620e6539991e6b.js +1 -0
  90. package/assets/esri/core/workers/chunks/b02a83845d3da4caee9d.js +1 -0
  91. package/assets/esri/core/workers/chunks/{0d21506b7d4f9afdbb09.js → b3847a6bbd45d813f03c.js} +1 -1
  92. package/assets/esri/core/workers/chunks/b4c23630d6c85f7b59c0.js +1 -0
  93. package/assets/esri/core/workers/chunks/{c318b229911b60fc3cbf.js → b50ae3dc7e43ff452568.js} +1 -1
  94. package/assets/esri/core/workers/chunks/b5ede4df4620097c6528.js +1 -0
  95. package/assets/esri/core/workers/chunks/b7d7ad127f8939cbdec2.js +1 -0
  96. package/assets/esri/core/workers/chunks/bf1d1c02d12b526b0750.js +1 -0
  97. package/assets/esri/core/workers/chunks/c0e6dbecdbd30066a82c.js +1 -0
  98. package/assets/esri/core/workers/chunks/c2a36243eb105d570bff.js +1 -0
  99. package/assets/esri/core/workers/chunks/c8a3a28809542396c6fd.js +1 -0
  100. package/assets/esri/core/workers/chunks/cf1047ad176a25dcd2d6.js +1 -0
  101. package/assets/esri/core/workers/chunks/d03de043d43691665a93.js +1 -0
  102. package/assets/esri/core/workers/chunks/d3fecbaca51ef8844026.js +1 -0
  103. package/assets/esri/core/workers/chunks/dafe120243db6648a4ab.js +1 -0
  104. package/assets/esri/core/workers/chunks/dccc33d87cb7d902f5c7.js +1 -0
  105. package/assets/esri/core/workers/chunks/dd43f5647900ee27af22.js +1 -0
  106. package/assets/esri/core/workers/chunks/{52489e2f7748dc610263.js → dfdd853dd6c023089963.js} +1 -1
  107. package/assets/esri/core/workers/chunks/e6f76f62cf58fb1e67c6.js +1 -0
  108. package/assets/esri/core/workers/chunks/ea73a1d9cad5e1a5d861.js +1 -0
  109. package/assets/esri/core/workers/chunks/{4130ea1f5a9f197168d7.js → ed4519ac9533a4d340f1.js} +1 -1
  110. package/assets/esri/core/workers/chunks/f0e462f5a16852f33225.js +1 -0
  111. package/assets/esri/core/workers/chunks/f13c29bcc71aed8f3a2e.js +1 -0
  112. package/assets/esri/core/workers/chunks/f356e505c36397fda3cf.js +1 -0
  113. package/assets/esri/core/workers/chunks/f55cbaf5a1d6ee6ac171.js +1 -0
  114. package/assets/esri/core/workers/chunks/f6e613ae6812a347a26c.js +1 -0
  115. package/assets/esri/core/workers/chunks/fb3279408bd5323ec612.js +1 -0
  116. package/assets/esri/core/workers/chunks/fdf80a371b7b2a45f1ff.js +1 -0
  117. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  118. package/chunks/ChapmanAtmosphere.glsl.js +15 -15
  119. package/chunks/CheckerBoard.glsl.js +3 -3
  120. package/chunks/Clouds.glsl.js +2 -3
  121. package/chunks/CloudsComposition.glsl.js +3 -3
  122. package/chunks/ColorMaterial.glsl.js +11 -11
  123. package/chunks/DefaultMaterial.glsl.js +26 -26
  124. package/chunks/EdgeShader.glsl.js +3 -3
  125. package/chunks/Fog.glsl.js +6 -6
  126. package/chunks/HUDMaterial.glsl.js +48 -48
  127. package/chunks/HeatmapDensity.glsl.js +7 -7
  128. package/chunks/HighlightApply.glsl.js +3 -3
  129. package/chunks/LineCallout.glsl.js +3 -3
  130. package/chunks/LineMarker.glsl.js +22 -22
  131. package/chunks/MeasurementArrow.glsl.js +4 -4
  132. package/chunks/NativeLine.glsl.js +11 -11
  133. package/chunks/Path.glsl.js +16 -16
  134. package/chunks/Pattern.glsl.js +30 -30
  135. package/chunks/RasterColorizer.glsl.js +4 -4
  136. package/chunks/RealisticTree.glsl.js +20 -20
  137. package/chunks/RibbonLine.glsl.js +39 -39
  138. package/chunks/ShadedColorMaterial.glsl.js +10 -10
  139. package/chunks/ShadowCastVisualize.glsl.js +5 -5
  140. package/chunks/ShadowHighlight.glsl.js +2 -2
  141. package/chunks/SlicePlaneMaterial.glsl.js +3 -3
  142. package/chunks/Stars.glsl.js +2 -2
  143. package/chunks/WaterSurface.glsl.js +20 -20
  144. package/chunks/languageUtils.js +1 -1
  145. package/chunks/persistableUrlUtils.js +1 -1
  146. package/chunks/vec22.js +1 -1
  147. package/chunks/vec2f64.js +1 -1
  148. package/chunks/vec3.js +1 -1
  149. package/chunks/vec33.js +1 -1
  150. package/chunks/vec43.js +1 -1
  151. package/colorUtils.js +1 -1
  152. package/config.js +1 -1
  153. package/core/Accessor.js +1 -1
  154. package/core/AsyncUpdate.js +1 -1
  155. package/core/Clonable.js +1 -1
  156. package/core/Collection.js +1 -1
  157. package/core/HandleOwner.js +1 -1
  158. package/core/Loadable.js +1 -1
  159. package/core/NestedMap.js +1 -1
  160. package/core/accessorSupport/DefaultsStore.js +1 -1
  161. package/core/accessorSupport/Properties.js +1 -1
  162. package/core/accessorSupport/decorators/enumeration.js +1 -1
  163. package/core/accessorSupport/extensions/serializableProperty/reader.js +1 -1
  164. package/core/accessorSupport/extensions/serializableProperty/writePolicyUtils.js +1 -1
  165. package/core/accessorSupport/extensions/serializableProperty/writer.js +1 -1
  166. package/core/accessorSupport/read.js +1 -1
  167. package/core/accessorSupport/tracking.js +1 -1
  168. package/core/accessorSupport/write.js +1 -1
  169. package/core/devEnvironmentUtils.js +1 -1
  170. package/core/has.js +1 -1
  171. package/core/libs/gl-matrix-2/factories/vec2f64.js +1 -1
  172. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  173. package/core/libs/rbush/PooledRBush.js +1 -1
  174. package/core/promiseUtils.js +1 -1
  175. package/core/reactiveUtils.js +1 -1
  176. package/core/scheduling.js +1 -1
  177. package/core/throttle.js +1 -1
  178. package/core/urlUtils.js +1 -1
  179. package/core/watchUtils.js +1 -1
  180. package/core/workers/RemoteClient.js +1 -1
  181. package/core/workers/WorkerOwner.js +1 -1
  182. package/core/workers/loaderConfig.js +1 -1
  183. package/core/workers/workerFactory.js +1 -1
  184. package/geometry/Mesh.js +1 -1
  185. package/geometry/geometryEngine.js +1 -1
  186. package/geometry/geometryEngineAsync.js +1 -1
  187. package/geometry/projection.js +1 -1
  188. package/geometry/support/axisAngleDegrees.js +1 -1
  189. package/geometry/support/meshUtils/centerAt.js +1 -1
  190. package/geometry/support/meshUtils/deduplicate.js +1 -1
  191. package/geometry/support/meshUtils/elevation.js +1 -1
  192. package/geometry/support/meshUtils/geographicUtils.js +1 -1
  193. package/geometry/support/meshUtils/georeference.js +1 -1
  194. package/geometry/support/meshUtils/loadExternal.js +1 -1
  195. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  196. package/geometry/support/meshUtils/offset.js +1 -1
  197. package/geometry/support/meshUtils/rotate.js +1 -1
  198. package/geometry/support/meshUtils/scale.js +1 -1
  199. package/geometry/support/normalizeUtils.js +1 -1
  200. package/geometry/support/normalizeUtilsCommon.js +1 -1
  201. package/geometry/support/offset.js +1 -1
  202. package/geometry/support/rotate.js +1 -1
  203. package/identity/IdentityManagerBase.js +1 -1
  204. package/identity/IdentityModal.js +1 -1
  205. package/interfaces.d.ts +109 -2
  206. package/intl/locale.js +1 -1
  207. package/intl/messages.js +1 -1
  208. package/kernel.js +1 -1
  209. package/layers/AnalysisLayer.js +1 -1
  210. package/layers/CSVLayer.js +1 -1
  211. package/layers/FeatureLayer.js +1 -1
  212. package/layers/GeoJSONLayer.js +1 -1
  213. package/layers/GeoRSSLayer.js +1 -1
  214. package/layers/ImageryLayer.js +1 -1
  215. package/layers/ImageryTileLayer.js +1 -1
  216. package/layers/Layer.js +1 -1
  217. package/layers/MapImageLayer.js +1 -1
  218. package/layers/MapNotesLayer.js +1 -1
  219. package/layers/OGCFeatureLayer.js +1 -1
  220. package/layers/RouteLayer.js +1 -1
  221. package/layers/SceneLayer.js +1 -1
  222. package/layers/StreamLayer.js +1 -1
  223. package/layers/SubtypeGroupLayer.js +1 -1
  224. package/layers/TileLayer.js +1 -1
  225. package/layers/VectorTileLayer.js +1 -1
  226. package/layers/VoxelLayer.js +1 -1
  227. package/layers/VoxelWasmPerScene.js +1 -1
  228. package/layers/WCSLayer.js +1 -1
  229. package/layers/WFSLayer.js +1 -1
  230. package/layers/WMSLayer.js +1 -1
  231. package/layers/WMTSLayer.js +1 -1
  232. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  233. package/layers/effects/EffectView.js +1 -1
  234. package/layers/effects/FeatureEffectView.js +1 -1
  235. package/layers/effects/jsonUtils.js +1 -1
  236. package/layers/graphics/OptimizedGeometry.js +1 -1
  237. package/layers/graphics/centroid.js +1 -1
  238. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  239. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  240. package/layers/graphics/data/QueryEngineResult.js +1 -1
  241. package/layers/graphics/data/StreamFeatureManager.js +1 -1
  242. package/layers/graphics/editingSupport.js +1 -1
  243. package/layers/graphics/objectIdUtils.js +1 -1
  244. package/layers/graphics/sources/CSVSource.js +1 -1
  245. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  246. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  247. package/layers/graphics/sources/MemorySource.js +1 -1
  248. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  249. package/layers/graphics/sources/WFSSource.js +1 -1
  250. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  251. package/layers/graphics/sources/connections/WebSocketConnection.js +1 -1
  252. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  253. package/layers/graphics/sources/geojson/geojson.js +1 -1
  254. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  255. package/layers/graphics/sources/support/QueryTask.js +1 -1
  256. package/layers/mixins/APIKeyMixin.js +1 -1
  257. package/layers/mixins/ArcGISImageService.js +1 -1
  258. package/layers/mixins/ArcGISMapService.js +1 -1
  259. package/layers/mixins/ImageryTileMixin.js +1 -1
  260. package/layers/mixins/OperationalLayer.js +1 -1
  261. package/layers/mixins/PortalLayer.js +1 -1
  262. package/layers/mixins/SceneService.js +1 -1
  263. package/layers/mixins/refresh.js +1 -1
  264. package/layers/ogc/dateUtils.js +1 -1
  265. package/layers/ogc/ogcFeatureUtils.js +1 -1
  266. package/layers/ogc/wfsUtils.js +1 -1
  267. package/layers/save/featureLayerUtils.js +1 -1
  268. package/layers/support/ExportImageParameters.js +1 -1
  269. package/layers/support/ExportImageServiceParameters.js +1 -1
  270. package/layers/support/ExportWMSImageParameters.js +1 -1
  271. package/layers/support/FeatureEffect.js +1 -1
  272. package/layers/support/FeatureType.js +1 -1
  273. package/layers/support/FetchAssociatedFeatureLayer.js +1 -1
  274. package/layers/support/LabelClass.js +1 -1
  275. package/layers/support/LayerContingentValuesCache.js +1 -1
  276. package/layers/support/RasterFunction.js +1 -1
  277. package/layers/support/RasterInfo.js +1 -1
  278. package/layers/support/RasterJobHandler.js +1 -1
  279. package/layers/support/RasterWorker.js +1 -1
  280. package/layers/support/Sublayer.js +1 -1
  281. package/layers/support/SubtypeSublayer.js +1 -1
  282. package/layers/support/TilemapCache.js +1 -1
  283. package/layers/support/TimeReference.d.ts +4 -0
  284. package/layers/support/WMTSSublayer.js +1 -1
  285. package/layers/support/arcgisLayers.js +1 -1
  286. package/layers/support/commonProperties.js +1 -1
  287. package/layers/support/editableLayers.js +1 -1
  288. package/layers/support/fieldUtils.js +1 -1
  289. package/layers/support/floorFilterUtils.js +1 -1
  290. package/layers/support/imageryRendererUtils.js +1 -1
  291. package/layers/support/layerUtils.js +1 -1
  292. package/layers/support/layersCreator.js +1 -1
  293. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  294. package/layers/support/rasterDatasets/CloudRaster.js +1 -1
  295. package/layers/support/rasterDatasets/ImageAuxRaster.js +1 -1
  296. package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
  297. package/layers/support/rasterDatasets/InMemoryRaster.js +1 -1
  298. package/layers/support/rasterDatasets/MRFRaster.js +1 -1
  299. package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
  300. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  301. package/layers/support/rasterDatasets/multipartParser.js +1 -1
  302. package/layers/support/rasterDatasets/pamParser.js +1 -1
  303. package/layers/support/rasterDatasets/wcsCapabilitiesParser.js +1 -1
  304. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  305. package/layers/support/rasterDatasets/xmlUtilities.js +1 -1
  306. package/layers/support/rasterFormats/Lerc.js +1 -1
  307. package/layers/support/rasterFormats/RasterCodec.js +1 -1
  308. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  309. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  310. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  311. package/layers/support/rasterFunctions/stretchUtils.js +1 -1
  312. package/layers/support/rasterFunctions/vectorFieldUtils.js +1 -1
  313. package/layers/support/rasterTransforms/PolynomialTransform.js +1 -1
  314. package/layers/support/rasterTransforms/utils.js +1 -1
  315. package/layers/support/source/DataLayerSource.js +1 -1
  316. package/layers/support/source/QueryTableDataSource.js +1 -1
  317. package/layers/support/vectorTileLayerLoader.js +1 -1
  318. package/layers/support/wmsUtils.js +1 -1
  319. package/layers/support/wmtsUtils.js +1 -1
  320. package/libs/maquette-advanced-projector/projector.js +1 -1
  321. package/networks/Network.js +1 -1
  322. package/networks/UtilityNetwork.js +1 -1
  323. package/networks/support/utils.js +1 -1
  324. package/package.json +1 -1
  325. package/popup/content/ExpressionContent.js +1 -1
  326. package/portal/Portal.js +1 -1
  327. package/portal/PortalItem.js +1 -1
  328. package/portal/support/geometryServiceUtils.js +1 -1
  329. package/portal/support/layersLoader.js +1 -1
  330. package/portal/support/portalItemUtils.js +1 -1
  331. package/portal/support/portalLayers.js +1 -1
  332. package/renderers/DictionaryRenderer.js +1 -1
  333. package/renderers/FlowRenderer.js +1 -1
  334. package/renderers/RasterColormapRenderer.js +1 -1
  335. package/renderers/RasterStretchRenderer.js +1 -1
  336. package/renderers/VectorFieldRenderer.js +1 -1
  337. package/renderers/support/RasterSymbolizer.js +1 -1
  338. package/renderers/support/UniqueValueInfo.js +1 -1
  339. package/renderers/support/colorRampUtils.js +1 -1
  340. package/renderers/support/heatmapUtils.js +1 -1
  341. package/renderers/support/rasterRendererHelper.js +1 -1
  342. package/request.js +1 -1
  343. package/rest/identify.js +1 -1
  344. package/rest/imageService.js +1 -1
  345. package/rest/networkService.js +1 -1
  346. package/rest/networks/support/SynthesizeAssociationGeometriesParameters.js +1 -1
  347. package/rest/operations/identify.js +1 -1
  348. package/rest/print.js +1 -1
  349. package/rest/query/executeQuery.js +1 -1
  350. package/rest/query/operations/query.js +1 -1
  351. package/rest/query/operations/queryRelatedRecords.js +1 -1
  352. package/rest/query/operations/queryTopFeatures.js +1 -1
  353. package/rest/route.js +1 -1
  354. package/rest/support/DirectionLine.js +1 -1
  355. package/rest/support/DirectionPoint.js +1 -1
  356. package/rest/support/DirectionsFeatureSet.js +1 -1
  357. package/rest/support/FeatureSet.js +1 -1
  358. package/rest/support/ImageSampleParameters.js +1 -1
  359. package/rest/support/PointBarrier.js +1 -1
  360. package/rest/support/PolygonBarrier.js +1 -1
  361. package/rest/support/PolylineBarrier.js +1 -1
  362. package/rest/support/RouteInfo.js +1 -1
  363. package/rest/support/Stop.js +1 -1
  364. package/rest/support/meshFeatureSet.js +1 -1
  365. package/rest/support/printTaskUtils.js +1 -1
  366. package/smartMapping/labels/clusters.js +1 -1
  367. package/smartMapping/raster/renderers/rgb.js +1 -1
  368. package/smartMapping/raster/renderers/uniqueValue.js +1 -1
  369. package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
  370. package/smartMapping/raster/support/adapters/RasterLayerAdapter.js +1 -1
  371. package/smartMapping/raster/support/utils.js +1 -1
  372. package/smartMapping/renderers/color.js +1 -1
  373. package/smartMapping/renderers/size.js +1 -1
  374. package/smartMapping/renderers/support/utils.js +1 -1
  375. package/smartMapping/renderers/univariateColorSize.js +1 -1
  376. package/smartMapping/statistics/support/WorkerClient.js +1 -1
  377. package/smartMapping/support/adapters/CSVLayerAdapter.js +1 -1
  378. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  379. package/smartMapping/support/adapters/OGCFeatureLayerAdapter.js +1 -1
  380. package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
  381. package/smartMapping/support/adapters/support/utils.js +1 -1
  382. package/statistics/utils.js +1 -1
  383. package/support/LayersMixin.js +1 -1
  384. package/support/TablesMixin.js +1 -1
  385. package/support/arcadeUtils.js +1 -1
  386. package/support/basemapUtils.js +1 -1
  387. package/support/popupUtils.js +1 -1
  388. package/support/revision.js +1 -1
  389. package/support/timeUtils.js +1 -1
  390. package/symbols/FillSymbol3DLayer.js +1 -1
  391. package/symbols/LineSymbol3DLayer.js +1 -1
  392. package/symbols/LineSymbolMarker.js +1 -1
  393. package/symbols/PictureFillSymbol.js +1 -1
  394. package/symbols/PointSymbol3D.js +1 -1
  395. package/symbols/SimpleLineSymbol.js +1 -1
  396. package/symbols/SimpleMarkerSymbol.js +1 -1
  397. package/symbols/cim/CIMResourceManager.js +1 -1
  398. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  399. package/symbols/cim/CIMSymbolHelper.js +1 -1
  400. package/symbols/cim/ExpandedCIM.js +1 -1
  401. package/symbols/cim/SDFHelper.js +1 -1
  402. package/symbols/cim/cimAnalyzer.js +1 -1
  403. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  404. package/symbols/cim/effects/EffectDashes.js +1 -1
  405. package/symbols/cim/effects/EffectOffset.js +1 -1
  406. package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
  407. package/symbols/cim/utils.js +1 -1
  408. package/symbols/support/cimSymbolUtils.js +1 -1
  409. package/symbols/support/jsonUtils.js +1 -1
  410. package/symbols/support/previewCIMSymbol.js +1 -1
  411. package/symbols/support/previewSymbol2D.js +1 -1
  412. package/symbols/support/previewSymbol3D.js +1 -1
  413. package/symbols/support/previewWebStyleSymbol.js +1 -1
  414. package/symbols/support/svgUtils.js +1 -1
  415. package/symbols/support/symbolConversion.js +1 -1
  416. package/symbols/support/symbolUtils.js +1 -1
  417. package/tasks/GenerateRendererTask.js +1 -1
  418. package/views/2d/MapViewConstraints.js +1 -1
  419. package/views/2d/constraints/GeometryConstraint.js +1 -1
  420. package/views/2d/engine/Bitmap.js +1 -1
  421. package/views/2d/engine/Container.js +1 -1
  422. package/views/2d/engine/DisplayObject.js +1 -1
  423. package/views/2d/engine/Stage.js +1 -1
  424. package/views/2d/engine/imagery/BrushRasterBitmap.js +1 -1
  425. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  426. package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
  427. package/views/2d/engine/vectorTiles/TilemapRequest.js +1 -1
  428. package/views/2d/engine/vectorTiles/WorkerTileHandler.js +1 -1
  429. package/views/2d/engine/vectorTiles/buckets/FillBucket.js +1 -1
  430. package/views/2d/engine/vectorTiles/buckets/LineBucket.js +1 -1
  431. package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
  432. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  433. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  434. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  435. package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
  436. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  437. package/views/2d/engine/webgl/GraphicTile.js +1 -1
  438. package/views/2d/engine/webgl/TextureManager.js +1 -1
  439. package/views/2d/engine/webgl/brushes/WGLBrushHeatmap.js +1 -1
  440. package/views/2d/engine/webgl/brushes/WGLBrushVTLCircle.js +1 -1
  441. package/views/2d/engine/webgl/brushes/WGLBrushVTLFill.js +1 -1
  442. package/views/2d/engine/webgl/brushes/WGLBrushVTLLine.js +1 -1
  443. package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
  444. package/views/2d/engine/webgl/collisions/MetricReader.js +1 -1
  445. package/views/2d/engine/webgl/cpuMapped/DisplayRecordReader.js +1 -1
  446. package/views/2d/engine/webgl/cpuMapped/FreeList.js +1 -1
  447. package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
  448. package/views/2d/engine/webgl/mesh/templates/WGLBaseLineTemplate.js +1 -1
  449. package/views/2d/engine/webgl/mesh/templates/WGLBaseMarkerTemplate.js +1 -1
  450. package/views/2d/engine/webgl/mesh/templates/WGLBaseTextTemplate.js +1 -1
  451. package/views/2d/engine/webgl/mesh/templates/WGLDynamicFillTemplate.js +1 -1
  452. package/views/2d/engine/webgl/mesh/templates/WGLLabelTemplate.js +1 -1
  453. package/views/2d/engine/webgl/mesh/templates/WGLLineTemplate.js +1 -1
  454. package/views/2d/engine/webgl/mesh/templates/WGLMeshTemplate.js +1 -1
  455. package/views/2d/engine/webgl/painter/RenderPass.js +1 -1
  456. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  457. package/views/2d/engine/webgl/techniques/dotDensity/TechniqueDotDensity.js +1 -1
  458. package/views/2d/input/MapViewInputManager.js +1 -1
  459. package/views/2d/input/handlers/GamepadNavigation.js +1 -1
  460. package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
  461. package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
  462. package/views/2d/layers/BaseLayerView2D.js +1 -1
  463. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  464. package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
  465. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  466. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  467. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  468. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  469. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  470. package/views/2d/layers/KMLLayerView2D.js +1 -1
  471. package/views/2d/layers/LayerView2D.js +1 -1
  472. package/views/2d/layers/SubtypeGroupLayerView2D.js +1 -1
  473. package/views/2d/layers/TileLayerView2D.js +1 -1
  474. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  475. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  476. package/views/2d/layers/features/FeatureStore2D.js +1 -1
  477. package/views/2d/layers/features/Pipeline.js +1 -1
  478. package/views/2d/layers/features/batchUtils.js +1 -1
  479. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  480. package/views/2d/layers/features/controllers/support/sourceAdapters.js +1 -1
  481. package/views/2d/layers/features/createSymbolSchema.js +1 -1
  482. package/views/2d/layers/features/processors/SymbolProcessor.js +1 -1
  483. package/views/2d/layers/features/schemaUtils.js +1 -1
  484. package/views/2d/layers/features/sources/BaseFeatureSource.js +1 -1
  485. package/views/2d/layers/features/sources/DataTileSource.js +1 -1
  486. package/views/2d/layers/features/sources/DataTileSubscription.js +1 -1
  487. package/views/2d/layers/features/sources/SnapshotFeatureSource.js +1 -1
  488. package/views/2d/layers/features/support/ClusterStore.js +1 -1
  489. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  490. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  491. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  492. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  493. package/views/2d/layers/features/support/ResourceManagerProxy.js +1 -1
  494. package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
  495. package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
  496. package/views/2d/layers/graphics/graphicsUtils.js +1 -1
  497. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  498. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  499. package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
  500. package/views/2d/layers/support/ExportStrategy.js +1 -1
  501. package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
  502. package/views/2d/magnifier/MagnifierView2D.js +1 -1
  503. package/views/2d/support/engineHelpers.js +1 -1
  504. package/views/2d/tiling/TileManager.js +1 -1
  505. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  506. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  507. package/views/3d/analysis/Dimensioning/DimensioningVisualization.js +5 -0
  508. package/views/3d/analysis/Dimensioning/LinearDimensionVisualization.js +5 -0
  509. package/views/3d/analysis/DimensioningAnalysisView3D.js +1 -1
  510. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
  511. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  512. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
  513. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  514. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  515. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  516. package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
  517. package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
  518. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  519. package/views/3d/environment/Clouds.glsl.js +1 -1
  520. package/views/3d/environment/CloudsComposition.glsl.js +1 -1
  521. package/views/3d/environment/CloudsComposition.js +1 -1
  522. package/views/3d/environment/CloudsCompositionParameters.js +5 -0
  523. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  524. package/views/3d/environment/Fog.glsl.js +1 -1
  525. package/views/3d/environment/Fog.js +1 -1
  526. package/views/3d/environment/Precipitation.js +1 -1
  527. package/views/3d/environment/SceneViewEnvironment.js +1 -1
  528. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  529. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  530. package/views/3d/environment/Stars.glsl.js +1 -1
  531. package/views/3d/environment/Stars.js +1 -1
  532. package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
  533. package/views/3d/glTF/internal/Resource.js +1 -1
  534. package/views/3d/glTF/loader.js +1 -1
  535. package/views/3d/input/SceneInputManager.js +1 -1
  536. package/views/3d/input/handlers/TwoFingerTilt.js +1 -1
  537. package/views/3d/interactive/Manipulator3D.js +1 -1
  538. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  539. package/views/3d/interactive/editingTools/manipulations/MoveManipulation.js +1 -1
  540. package/views/3d/interactive/editingTools/moveGraphic/isSupportedGraphic.js +1 -1
  541. package/views/3d/interactive/editingTools/reshapeGraphic/GraphicReshapeTool.js +1 -1
  542. package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
  543. package/views/3d/interactive/editingTools/reshapeGraphic/isSupportedGraphic.js +1 -1
  544. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  545. package/views/3d/interactive/editingTools/transformGraphic/isSupportedGraphic.js +1 -1
  546. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  547. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  548. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  549. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  550. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  551. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  552. package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
  553. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  554. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  555. package/views/3d/layers/FeatureLayerView3D.js +1 -1
  556. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  557. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  558. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  559. package/views/3d/layers/GraphicsView3D.js +1 -1
  560. package/views/3d/layers/I3SMeshView3D.js +1 -1
  561. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  562. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  563. package/views/3d/layers/LayerView3D.js +1 -1
  564. package/views/3d/layers/RouteLayerView3D.js +1 -1
  565. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  566. package/views/3d/layers/SceneLayerView3D.js +1 -1
  567. package/views/3d/layers/SceneLayerWorker.js +1 -1
  568. package/views/3d/layers/StreamLayerView3D.js +1 -1
  569. package/views/3d/layers/TiledLayerView3D.js +1 -1
  570. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  571. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  572. package/views/3d/layers/WMSLayerView3D.js +1 -1
  573. package/views/3d/layers/WMTSLayerView3D.js +1 -1
  574. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  575. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  576. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  577. package/views/3d/layers/graphics/Graphics3DFilterVisibility.js +1 -1
  578. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  579. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  580. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  581. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  582. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  583. package/views/3d/layers/graphics/Graphics3DPointSymbol.js +1 -1
  584. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  585. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  586. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  587. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  588. package/views/3d/layers/graphics/Labeler.js +1 -1
  589. package/views/3d/layers/i3s/I3SAttributeOverrides.js +1 -1
  590. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  591. package/views/3d/layers/i3s/I3SStreamDataController.js +1 -1
  592. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  593. package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
  594. package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
  595. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  596. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  597. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  598. package/views/3d/state/ConstraintsManager.js +1 -1
  599. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  600. package/views/3d/support/ResourceController.js +1 -1
  601. package/views/3d/support/SharedSymbolResources.js +1 -1
  602. package/views/3d/support/TextureCollection.js +1 -1
  603. package/views/3d/support/cameraUtils.js +1 -1
  604. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  605. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  606. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  607. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  608. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  609. package/views/3d/terrain/OverlayManager.js +1 -1
  610. package/views/3d/terrain/OverlayRenderer.js +1 -1
  611. package/views/3d/terrain/PatchGeometry.js +1 -1
  612. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  613. package/views/3d/terrain/PatchRenderData.js +1 -1
  614. package/views/3d/terrain/PlanarPatch.js +1 -1
  615. package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
  616. package/views/3d/terrain/RasterTile.js +1 -1
  617. package/views/3d/terrain/SphericalPatch.js +1 -1
  618. package/views/3d/terrain/TerrainRenderer.js +1 -1
  619. package/views/3d/terrain/TerrainSurface.js +1 -1
  620. package/views/3d/terrain/Tile.js +1 -1
  621. package/views/3d/terrain/TileCompositor.js +1 -1
  622. package/views/3d/terrain/TileRenderer.js +1 -1
  623. package/views/3d/terrain/TilingSchemeLogic.js +1 -1
  624. package/views/3d/terrain/terrainUtils.js +1 -1
  625. package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
  626. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  627. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  628. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +2 -2
  629. package/views/3d/webgl-engine/core/material/MaterialBase.js +1 -1
  630. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSizeScaling.glsl.js +1 -1
  631. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +5 -5
  632. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +8 -8
  633. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +6 -6
  634. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +4 -4
  635. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +2 -2
  636. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +5 -5
  637. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +13 -13
  638. package/views/3d/webgl-engine/core/shaderLibrary/raster/BasicGrid.glsl.js +2 -2
  639. package/views/3d/webgl-engine/core/shaderLibrary/raster/Colormap.glsl.js +1 -1
  640. package/views/3d/webgl-engine/core/shaderLibrary/raster/Common.glsl.js +2 -2
  641. package/views/3d/webgl-engine/core/shaderLibrary/raster/Projection.glsl.js +1 -1
  642. package/views/3d/webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js +1 -1
  643. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js +1 -1
  644. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +5 -5
  645. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js +3 -3
  646. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +13 -13
  647. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +17 -17
  648. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +1 -1
  649. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +7 -7
  650. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +2 -2
  651. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +5 -5
  652. package/views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js +2 -2
  653. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +15 -15
  654. package/views/3d/webgl-engine/core/shaderLibrary/util/ScreenSizePerspective.glsl.js +2 -2
  655. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  656. package/views/3d/webgl-engine/core/shaderModules/BooleanPassUniform.js +5 -0
  657. package/views/3d/webgl-engine/core/shaderModules/Float4DrawUniform.js +5 -0
  658. package/views/3d/webgl-engine/core/shaderModules/{Matrix3Uniform.js → Float4PassUniform.js} +1 -1
  659. package/views/3d/webgl-engine/core/shaderModules/Float4Uniform.js +1 -1
  660. package/views/3d/webgl-engine/core/shaderModules/Matrix3DrawUniform.js +5 -0
  661. package/views/3d/webgl-engine/core/shaderModules/Matrix3PassUniform.js +5 -0
  662. package/views/3d/webgl-engine/core/shaderModules/{TextureCubeUniform.js → TextureCubePassUniform.js} +1 -1
  663. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js +1 -1
  664. package/views/3d/webgl-engine/lib/AutoDisposable.js +1 -1
  665. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  666. package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
  667. package/views/3d/webgl-engine/lib/RenderPluginManager.js +1 -1
  668. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  669. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  670. package/views/3d/webgl-engine/lib/ShadowHighlight.js +1 -1
  671. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  672. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  673. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  674. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  675. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  676. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  677. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  678. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  679. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  680. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  681. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  682. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  683. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  684. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  685. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  686. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  687. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  688. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  689. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  690. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  691. package/views/3d/webgl-engine/materials/{VisualVariableMaterialParameters.js → VisualVariablePassParameters.js} +1 -1
  692. package/views/3d/webgl-engine/materials/WaterGLMaterial.js +1 -1
  693. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  694. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  695. package/views/3d/webgl-engine/parts/requireUtils.js +1 -1
  696. package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
  697. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  698. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  699. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  700. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  701. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  702. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  703. package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +1 -1
  704. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  705. package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
  706. package/views/3d/webgl-engine/shaders/HighlightApply.glsl.js +1 -1
  707. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  708. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  709. package/views/3d/webgl-engine/shaders/Magnifier.glsl.js +3 -3
  710. package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
  711. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
  712. package/views/3d/webgl-engine/shaders/Path.glsl.js +1 -1
  713. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  714. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  715. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  716. package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
  717. package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
  718. package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
  719. package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
  720. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  721. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +3 -3
  722. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeShader.glsl.js +1 -1
  723. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +5 -5
  724. package/views/BasemapView.js +1 -1
  725. package/views/GroundView.js +1 -1
  726. package/views/LayerViewManager.js +1 -1
  727. package/views/MapView.js +1 -1
  728. package/views/SceneView.js +1 -1
  729. package/views/ToolViewManager.js +1 -1
  730. package/views/View.js +1 -1
  731. package/views/draw/DrawAction.js +1 -1
  732. package/views/draw/DrawGraphicTool.js +1 -1
  733. package/views/draw/DrawOperation.js +1 -1
  734. package/views/draw/DrawTool.js +1 -1
  735. package/views/draw/support/Box.js +1 -1
  736. package/views/draw/support/GraphicMover.js +1 -1
  737. package/views/draw/support/Reshape.js +1 -1
  738. package/views/interactive/coordinateHelper.js +1 -1
  739. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  740. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  741. package/views/interactive/snapping/SnappingManager.js +1 -1
  742. package/views/interactive/snapping/featureSources/WorkerTileTreeDebugger.js +1 -1
  743. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  744. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
  745. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  746. package/views/layers/FeatureLayerView.js +1 -1
  747. package/views/layers/GroupLayerView.js +1 -1
  748. package/views/layers/ImageryLayerView.js +1 -1
  749. package/views/layers/ImageryTileLayerView.js +1 -1
  750. package/views/layers/LayerView.js +1 -1
  751. package/views/layers/MapImageLayerView.js +1 -1
  752. package/views/layers/WMSLayerView.js +1 -1
  753. package/views/support/AllocationTracer.js +1 -1
  754. package/views/support/DefaultsFromMap.js +1 -1
  755. package/views/support/geometry2dUtils.js +1 -1
  756. package/views/support/layerViewUtils.js +1 -1
  757. package/views/support/waitForResources.js +1 -1
  758. package/views/ui/UI.js +1 -1
  759. package/views/webgl/BufferObject.js +1 -1
  760. package/views/webgl/FramebufferObject.js +1 -1
  761. package/views/webgl/RenderingContext.js +1 -1
  762. package/views/webgl/Texture.js +1 -1
  763. package/views/webgl/UniformBufferLayout.js +1 -1
  764. package/views/webgl/VertexArrayObject.js +1 -1
  765. package/views/webgl/capabilities.js +1 -1
  766. package/views/webgl/rasterUtils.js +1 -1
  767. package/views/webgl/testFloatBufferBlend.js +1 -1
  768. package/webdoc/widgets/TimeSlider.js +1 -1
  769. package/webmap/Bookmark.js +1 -1
  770. package/webscene/Slide.js +1 -1
  771. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  772. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
  773. package/widgets/AreaMeasurement2D.js +1 -1
  774. package/widgets/AreaMeasurement3D.js +1 -1
  775. package/widgets/Attribution.js +1 -1
  776. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  777. package/widgets/BasemapGallery/support/BasemapGalleryItem.js +1 -1
  778. package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
  779. package/widgets/BasemapLayerList.js +1 -1
  780. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  781. package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
  782. package/widgets/Bookmarks.js +1 -1
  783. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
  784. package/widgets/BuildingExplorer/BuildingExplorerViewModel.js +1 -1
  785. package/widgets/BuildingExplorer/BuildingLevel.js +1 -1
  786. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  787. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.js +1 -1
  788. package/widgets/BuildingExplorer/BuildingPhase.js +1 -1
  789. package/widgets/BuildingExplorer/support/buildingLayerUtils.js +1 -1
  790. package/widgets/BuildingExplorer.js +1 -1
  791. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  792. package/widgets/CoordinateConversion/support/Format.js +1 -1
  793. package/widgets/Daylight/DaylightViewModel.js +1 -1
  794. package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
  795. package/widgets/Daylight.js +1 -1
  796. package/widgets/DirectLineMeasurement3D.js +1 -1
  797. package/widgets/Directions/DirectionsViewModel.js +1 -1
  798. package/widgets/Directions.js +1 -1
  799. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
  800. package/widgets/DistanceMeasurement2D.js +1 -1
  801. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  802. package/widgets/Editor/CreateWorkflow.js +1 -1
  803. package/widgets/Editor/EditorViewModel.js +1 -1
  804. package/widgets/Editor/UpdateWorkflow.js +1 -1
  805. package/widgets/Editor/workflowUtils.js +1 -1
  806. package/widgets/Editor.js +1 -1
  807. package/widgets/ElevationProfile/ElevationProfileLineGround.js +1 -1
  808. package/widgets/ElevationProfile/ElevationProfileLineInput.js +1 -1
  809. package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
  810. package/widgets/ElevationProfile/ElevationProfileTool.js +1 -1
  811. package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
  812. package/widgets/ElevationProfile/components/Statistics.js +1 -1
  813. package/widgets/ElevationProfile/support/elevationQuerySourceUtils.js +1 -1
  814. package/widgets/ElevationProfile/support/profileUtils.js +1 -1
  815. package/widgets/ElevationProfile.js +1 -1
  816. package/widgets/Expand.js +1 -1
  817. package/widgets/Feature/FeatureAttachments.js +1 -1
  818. package/widgets/Feature/FeatureContent.js +1 -1
  819. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  820. package/widgets/Feature/FeatureExpression.js +1 -1
  821. package/widgets/Feature/FeatureFields/FeatureFieldsViewModel.js +1 -1
  822. package/widgets/Feature/FeatureFields.js +1 -1
  823. package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
  824. package/widgets/Feature/FeatureMedia.js +1 -1
  825. package/widgets/Feature/FeatureViewModel.js +1 -1
  826. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  827. package/widgets/Feature/support/featureUtils.js +1 -1
  828. package/widgets/Feature/support/relatedFeatureUtils.js +1 -1
  829. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  830. package/widgets/FeatureForm/InputField.js +1 -1
  831. package/widgets/FeatureForm/support/formTemplateUtils.js +1 -1
  832. package/widgets/FeatureForm.js +1 -1
  833. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  834. package/widgets/FeatureTable/FieldColumn.js +1 -1
  835. package/widgets/FeatureTable/Grid/Column.js +1 -1
  836. package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
  837. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  838. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  839. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
  840. package/widgets/FeatureTable/Grid/support/LocalStore.js +1 -1
  841. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  842. package/widgets/FeatureTable.js +1 -1
  843. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  844. package/widgets/FeatureTemplates/ItemList.js +1 -1
  845. package/widgets/FeatureTemplates/TemplateItem.js +1 -1
  846. package/widgets/FeatureTemplates.js +1 -1
  847. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  848. package/widgets/FloorFilter.js +1 -1
  849. package/widgets/Fullscreen.js +1 -1
  850. package/widgets/Home.js +1 -1
  851. package/widgets/LayerList/LayerListViewModel.js +1 -1
  852. package/widgets/LayerList/support/layerListUtils.js +1 -1
  853. package/widgets/LayerList.js +1 -1
  854. package/widgets/Legend/LegendViewModel.js +1 -1
  855. package/widgets/Legend/styles/Card.js +1 -1
  856. package/widgets/Legend/styles/support/univariateUtils.js +1 -1
  857. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  858. package/widgets/Legend/support/clusterUtils.js +1 -1
  859. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  860. package/widgets/Locate/LocateViewModel.js +1 -1
  861. package/widgets/Popup/PopupViewModel.js +1 -1
  862. package/widgets/Popup/actionUtils.js +1 -1
  863. package/widgets/Popup.js +1 -1
  864. package/widgets/Print/PrintViewModel.js +1 -1
  865. package/widgets/Print.js +1 -1
  866. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
  867. package/widgets/Search/LayerSearchSource.js +1 -1
  868. package/widgets/Search/SearchResultRenderer.js +1 -1
  869. package/widgets/Search/SearchViewModel.js +1 -1
  870. package/widgets/Search/support/geometryUtils.js +1 -1
  871. package/widgets/Search/support/layerSearchUtils.js +1 -1
  872. package/widgets/Search/support/locatorUtils.js +1 -1
  873. package/widgets/Search.js +1 -1
  874. package/widgets/ShadowCast/components/DiscreteConfigurator.js +1 -1
  875. package/widgets/ShadowCast/components/Label.js +1 -1
  876. package/widgets/ShadowCast/components/TimezonePicker.js +1 -1
  877. package/widgets/ShadowCast.js +1 -1
  878. package/widgets/Sketch/SketchViewModel.js +1 -1
  879. package/widgets/Sketch.js +1 -1
  880. package/widgets/Slider.js +1 -1
  881. package/widgets/Swipe/SwipeViewModel.js +1 -1
  882. package/widgets/TableList/TableListViewModel.js +1 -1
  883. package/widgets/TableList/support/tableListUtils.js +1 -1
  884. package/widgets/TableList.js +1 -1
  885. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  886. package/widgets/TimeSlider/utils.js +1 -1
  887. package/widgets/TimeSlider.js +1 -1
  888. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  889. package/widgets/Weather.js +1 -1
  890. package/widgets/Widget.js +1 -1
  891. package/widgets/smartMapping/BinaryColorSizeSlider/BinaryColorSizeSliderViewModel.js +1 -1
  892. package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
  893. package/widgets/smartMapping/ClassedColorSlider.js +1 -1
  894. package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
  895. package/widgets/smartMapping/ColorSizeSlider.js +1 -1
  896. package/widgets/smartMapping/SizeSlider/SizeSliderViewModel.js +1 -1
  897. package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
  898. package/widgets/smartMapping/SmartMappingSliderViewModel.js +1 -1
  899. package/widgets/support/AnalysisViewModel.js +1 -1
  900. package/widgets/support/ColorPicker.js +1 -1
  901. package/widgets/support/DatePicker.js +1 -1
  902. package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
  903. package/widgets/support/Popover.js +1 -1
  904. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  905. package/widgets/support/SelectionToolbar.js +1 -1
  906. package/widgets/support/Selector2D/SelectionOperation2D.js +1 -1
  907. package/widgets/support/Selector2D.js +1 -1
  908. package/widgets/support/SnappingControls/SnappingControlsViewModel.js +1 -1
  909. package/widgets/support/SnappingControls.js +1 -1
  910. package/widgets/support/jsxWidgetSupport.js +1 -1
  911. package/widgets/support/widgetUtils.js +1 -1
  912. package/assets/esri/core/workers/chunks/049c5c30bd37693dddb7.js +0 -1
  913. package/assets/esri/core/workers/chunks/055a0ebf22a82f859474.js +0 -1
  914. package/assets/esri/core/workers/chunks/0b12ff7b2ed2838afbb8.js +0 -1
  915. package/assets/esri/core/workers/chunks/0e25548573baf855e394.js +0 -1
  916. package/assets/esri/core/workers/chunks/0edd4c3ca6e7d749d0e5.js +0 -1
  917. package/assets/esri/core/workers/chunks/0fcbf7e2db58e38ee6d1.js +0 -1
  918. package/assets/esri/core/workers/chunks/133f971e72a1a6277ac4.js +0 -1
  919. package/assets/esri/core/workers/chunks/135a90ae61f3b3cae91b.js +0 -1
  920. package/assets/esri/core/workers/chunks/13fde7fd56c39fa3f2d5.js +0 -1
  921. package/assets/esri/core/workers/chunks/1c90855c3b0e5dcff908.js +0 -1
  922. package/assets/esri/core/workers/chunks/1dbef1919c7ac10a6bcc.js +0 -1
  923. package/assets/esri/core/workers/chunks/1facbda248863cf72cbd.js +0 -1
  924. package/assets/esri/core/workers/chunks/1fb2d7abe6c8efa84695.js +0 -1
  925. package/assets/esri/core/workers/chunks/2068377c2a796d5f2245.js +0 -1
  926. package/assets/esri/core/workers/chunks/28a5878cbe5880476855.js +0 -1
  927. package/assets/esri/core/workers/chunks/2cf3934b3ecabdf207c8.js +0 -1
  928. package/assets/esri/core/workers/chunks/2d42711a629384144625.js +0 -1
  929. package/assets/esri/core/workers/chunks/3021fda52083fc67d18c.js +0 -1
  930. package/assets/esri/core/workers/chunks/30333a95dc0a44e23fb5.js +0 -1
  931. package/assets/esri/core/workers/chunks/30837d93116f0337972f.js +0 -1
  932. package/assets/esri/core/workers/chunks/320543485c8e22485075.js +0 -1
  933. package/assets/esri/core/workers/chunks/3f0f7da92a6e4493686e.js +0 -1
  934. package/assets/esri/core/workers/chunks/42057f252ba4e82a8b45.js +0 -1
  935. package/assets/esri/core/workers/chunks/45a3f6033cdf4bc74a4c.js +0 -1
  936. package/assets/esri/core/workers/chunks/492b65fe99641f5740f0.js +0 -1
  937. package/assets/esri/core/workers/chunks/4d1cd7df617273c489f4.js +0 -1
  938. package/assets/esri/core/workers/chunks/4df9dfa80dbbae9b743d.js +0 -1
  939. package/assets/esri/core/workers/chunks/515c1c055666ff4740f3.js +0 -1
  940. package/assets/esri/core/workers/chunks/541e644fc77dbe527124.js +0 -1
  941. package/assets/esri/core/workers/chunks/59e341b2db44351bf557.js +0 -1
  942. package/assets/esri/core/workers/chunks/5a10b58533b4116115ac.js +0 -1
  943. package/assets/esri/core/workers/chunks/5f940853341d7e2bc852.js +0 -1
  944. package/assets/esri/core/workers/chunks/5ff2cdecf95e0136dd52.js +0 -1
  945. package/assets/esri/core/workers/chunks/6147bfbe2bd7292d6ad0.js +0 -1
  946. package/assets/esri/core/workers/chunks/6467f996fe9f136c370b.js +0 -1
  947. package/assets/esri/core/workers/chunks/682a8f15f352de76df69.js +0 -1
  948. package/assets/esri/core/workers/chunks/6a06635089761ee3e6d4.js +0 -972
  949. package/assets/esri/core/workers/chunks/725828a41917d3d56f2d.js +0 -1
  950. package/assets/esri/core/workers/chunks/794b47764ebb0257ed41.js +0 -1
  951. package/assets/esri/core/workers/chunks/7fd03a75eb07a09cda35.js +0 -1
  952. package/assets/esri/core/workers/chunks/86ad6b020c01850d9095.js +0 -1
  953. package/assets/esri/core/workers/chunks/86f9d1ce36661781d962.js +0 -1
  954. package/assets/esri/core/workers/chunks/8dcf6c836b53b40dfbf1.js +0 -1
  955. package/assets/esri/core/workers/chunks/8e98ff9404a802352037.js +0 -1
  956. package/assets/esri/core/workers/chunks/94e51fe1c539df6257c2.js +0 -1
  957. package/assets/esri/core/workers/chunks/9519a02b9b8db88a3150.js +0 -1
  958. package/assets/esri/core/workers/chunks/9a8b50ed75219b4a42e1.js +0 -1
  959. package/assets/esri/core/workers/chunks/9f3a094aa4b47e4eb046.js +0 -1
  960. package/assets/esri/core/workers/chunks/a0ebf25c9c9a7f839b93.js +0 -1
  961. package/assets/esri/core/workers/chunks/a25f0a195f9217665530.js +0 -1
  962. package/assets/esri/core/workers/chunks/a2be1e0b632cef87f6a4.js +0 -1
  963. package/assets/esri/core/workers/chunks/a4d8cf9829da9cfc5f36.js +0 -1
  964. package/assets/esri/core/workers/chunks/a562059dbdd1bf1fab66.js +0 -1
  965. package/assets/esri/core/workers/chunks/a59ee7d2b98c85f27dd2.js +0 -1
  966. package/assets/esri/core/workers/chunks/a5dbab94697757c87c49.js +0 -1
  967. package/assets/esri/core/workers/chunks/a5e65d5a7a536759d1cc.js +0 -1
  968. package/assets/esri/core/workers/chunks/a8ac0b6a3eba35e3a5b6.js +0 -1
  969. package/assets/esri/core/workers/chunks/acbd0f4d72d1f5d8e4e8.js +0 -1
  970. package/assets/esri/core/workers/chunks/acc97a210f36bff2d1b0.js +0 -1
  971. package/assets/esri/core/workers/chunks/ad68fe924456d6d7d4f0.js +0 -1
  972. package/assets/esri/core/workers/chunks/b06c949fc7d08e376a5f.js +0 -1
  973. package/assets/esri/core/workers/chunks/b26bd8fde2fc65bb67fb.js +0 -1
  974. package/assets/esri/core/workers/chunks/b4405e9fe6c0cf7250d3.js +0 -1
  975. package/assets/esri/core/workers/chunks/bc08fe3b03767bd694c5.js +0 -1
  976. package/assets/esri/core/workers/chunks/c11501e96ffd81bf39a0.js +0 -1
  977. package/assets/esri/core/workers/chunks/c44116378cc1bc627044.js +0 -1
  978. package/assets/esri/core/workers/chunks/c9b09099488d0e719dfb.js +0 -1
  979. package/assets/esri/core/workers/chunks/cbea4f1eb814115748db.js +0 -1
  980. package/assets/esri/core/workers/chunks/ce262a2accd982988ef1.js +0 -1
  981. package/assets/esri/core/workers/chunks/d15e6662d90718411d62.js +0 -1
  982. package/assets/esri/core/workers/chunks/d16aac3461af9cee0c29.js +0 -1
  983. package/assets/esri/core/workers/chunks/d60dd3e1028f714f2258.js +0 -1
  984. package/assets/esri/core/workers/chunks/d6c150c243ca1f6108f9.js +0 -1
  985. package/assets/esri/core/workers/chunks/d85748b57a71999caf3a.js +0 -1
  986. package/assets/esri/core/workers/chunks/d8c59b1d73650c060dfb.js +0 -1
  987. package/assets/esri/core/workers/chunks/dcb6e1b33402d7fa455b.js +0 -1
  988. package/assets/esri/core/workers/chunks/df653bca2b14dffc82d1.js +0 -1
  989. package/assets/esri/core/workers/chunks/e2a12142439d3037a3a7.js +0 -1
  990. package/assets/esri/core/workers/chunks/e3e1d87b8532bf84a18d.js +0 -1
  991. package/assets/esri/core/workers/chunks/e7744b7e0c16bba93151.js +0 -1
  992. package/assets/esri/core/workers/chunks/ea50effc5c39870dc871.js +0 -1
  993. package/assets/esri/core/workers/chunks/f1665a64564593f2a438.js +0 -1
  994. package/assets/esri/core/workers/chunks/f4c12f3a5e7f89106ae0.js +0 -1
  995. package/assets/esri/core/workers/chunks/fbefdc74b3aab716187f.js +0 -1
  996. package/assets/esri/core/workers/chunks/fc4fd9db056579e09bfe.js +0 -1
  997. package/assets/esri/core/workers/chunks/fd4907fa96f55128764d.js +0 -1
  998. package/views/3d/webgl-engine/core/shaderModules/BooleanUniform.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import"../../../../renderers/ClassBreaksRenderer.js";import"../../../../renderers/DictionaryRenderer.js";import"../../../../renderers/DotDensityRenderer.js";import"../../../../renderers/HeatmapRenderer.js";import"../../../../renderers/Renderer.js";import"../../../../renderers/SimpleRenderer.js";import t from"../../../../renderers/UniqueValueRenderer.js";import"../../../../renderers/support/jsonUtils.js";import"../../../../symbols.js";import i from"../../../../core/Accessor.js";import"../../../../core/has.js";import r from"../../../../core/Error.js";import s from"../../../../core/Handles.js";import{makeHandle as a}from"../../../../core/handleUtils.js";import{equalsShallow as n}from"../../../../core/lang.js";import o from"../../../../core/Logger.js";import{someMap as l,findInMap as h}from"../../../../core/MapUtils.js";import{isSome as d,unwrapOr as p,isNone as c,removeMaybe as y,destroyMaybe as m,get as g,unwrap as u}from"../../../../core/maybe.js";import b from"../../../../core/PooledArray.js";import{throwIfAborted as f,eachAlways as v,createDeferred as C,isAbortError as S}from"../../../../core/promiseUtils.js";import{watch as _,when as G,on as w,syncAndInitial as x,whenOnce as R}from"../../../../core/reactiveUtils.js";import{schedule as P}from"../../../../core/scheduling.js";import{property as D}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as E}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as I,isEmpty as U}from"../../../../core/accessorSupport/diffUtils.js";import{s as O,a as A,g as L}from"../../../../chunks/vec3.js";import{c as j}from"../../../../chunks/vec3f64.js";import{projectVectorToVector as V,projectXYZToVector as F,canProjectWithoutEngine as T,projectBuffer as k}from"../../../../geometry/projection.js";import{create as M,center as W,fromRect as N,equals as z}from"../../../../geometry/support/aaBoundingBox.js";import{create as B}from"../../../../geometry/support/aaBoundingRect.js";import q from"../../../../layers/Layer.js";import{getObjectId as H,computeAABB as Y,hasGeometry as $}from"../../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as Z}from"../../../../layers/graphics/hydratedFeatures.js";import{isSupportedRenderer3D as J,validateTo3D as Q}from"../../../../renderers/support/rendererConversion.js";import{loadArcade as K}from"../../../../support/arcadeOnDemand.js";import{getDefaultSymbol3D as X}from"../../../../symbols/support/defaults3D.js";import{to3D as ee}from"../../../../symbols/support/symbolConversion.js";import{ViewElevationProvider as te}from"./ElevationQuery.js";import{VisibilityFlag as ie,VisibilityGroup as re}from"./enums.js";import{extractExpressionInfo as se,createContext as ae}from"./featureExpressionInfoUtils.js";import{Graphics3DFeatureStore as ne}from"./Graphics3DFeatureStore.js";import oe from"./Graphics3DGraphicCreationContext.js";import{Graphics3DSymbolCreationContext as le}from"./Graphics3DSymbolCreationContext.js";import{make as he}from"./Graphics3DSymbolFactory.js";import de from"./Graphics3DWebStyleSymbol.js";import{GraphicStateTracking as pe}from"./GraphicStateTracking.js";import{computeCentroid as ce}from"./graphicUtils.js";import{ApplyRendererDiffResult as ye}from"./interfaces.js";import{LoadStatus as me}from"./Loadable.js";import{SpatialIndex2D as ge}from"./SpatialIndex2D.js";import{averageSymbolComplexities as ue,defaultSymbolComplexity as be}from"./symbolComplexity.js";import{StageLayerElevationProvider as fe}from"../support/StageLayerElevationProvider.js";import{toBoundingRect as ve}from"../../support/extentUtils.js";import{PropertiesPool as Ce}from"../../support/PropertiesPool.js";import{UpdatePolicy as Se}from"../../webgl-engine/lib/basicInterfaces.js";import{GridLocalOriginFactory as _e}from"../../webgl-engine/lib/GridLocalOriginFactory.js";import{WebGLLayer as Ge}from"../../webgl-engine/lib/WebGLLayer.js";import{ImmediateTask as we,noBudget as xe,TaskPriority as Re}from"../../../support/Scheduler.js";import Pe from"../../../../geometry/Extent.js";import De from"../../../../geometry/Point.js";import Ee from"../../../../symbols/LabelSymbol3D.js";import Ie from"../../../../symbols/TextSymbol.js";import Ue from"../../../../symbols/WebStyleSymbol.js";var Oe;const Ae=j(),Le=M(),je=o.getLogger("esri.views.3d.layers.graphics.Graphics3DCore");let Ve=Oe=class extends i{constructor(e){super(e),this.propertiesPool=new Ce({computedExtent:Pe},this),this.computedExtent=null,this.currentRenderer=null,this.rendererHasGeometryOperations=!1,this.graphicStateTracking=null,this.symbolCreationContext=new le(((e,t)=>this._frameTask.schedule(e,t))),this.graphics3DGraphics=new Map,this.stageLayer=null,this.stage=null,this.graphicsDrapedUids=new Set,this.graphicsBySymbol=new Map,this.symbolConversionCache=new Map,this.symbols=new Map,this.graphicsWithoutSymbol=new Map,this.graphicsWaitingForSymbol=new Map,this.graphicsUpdateId=0,this._handles=new s,this._frameTask=we,this.suspendSymbolCleanup=!1,this._spatialReference=null,this.arcadeOnDemand=null,this.rendererChangeAbortController=null,this.elevationInfoChangeAbortController=null,this.setupAbortController=null,this.elevationAlignment=null,this.scaleVisibility=null,this.filterVisibility=null,this._spatialIndex=null,this.extentPadding=0,this._updatingPendingLoadedGraphicsChange=null,this.featureStore=null,this.deconflictor=null,this.labeler=null,this.objectStates=null,this.viewElevationProvider=null,this.stageLayerElevationProvider=null,this.sharedSymbolResourcesOwnerHandle=null,this.whenGraphics3DGraphicRequests={},this.pendingUpdates=new Map,this.numberOfGraphics=0,this.numberOfGraphicsProvidingElevation=0,this.pendingAdds=0,this.pendingRemoves=0,this._loadingSymbols=0,this.pendingUpdatesPool=new b({allocator:e=>e||new Te,deallocator:e=>(e.clear(),e)}),this.symbolWarningLogged=!1,this.geometryWarningLogged=!1,this.objectIdInvisibleSet=new Set,this._whenSymbolRemoved=new b,this.preferredUpdatePolicy=Se.SYNC,this.forcedUpdatePolicy=null,this.elevationFeatureExpressionEnabled=!0,this.owner=null,this.layer=null,this.graphicSymbolSupported=!0,this.getRenderingInfoWithoutRenderer=!1,this.hasZ=null,this.hasM=null,this._usedMemory=0,this._visible=void 0,this._startCreateGraphics=!1}get spatialIndex(){var e;this._spatialIndex||(this._spatialIndex=new ge({objectIdField:null==(e=this.owner.layer)?void 0:e.objectIdField,spatialReference:this._spatialReference,hasZ:this.hasZ,hasM:this.hasM}),this._spatialIndex.setup(Array.from(this.graphics3DGraphics.values())));return this._spatialIndex.update(),this._spatialIndex}get effectiveUpdatePolicy(){return d(this.currentRenderer)&&"dictionary"===this.currentRenderer.type?Se.ASYNC:p(this.forcedUpdatePolicy,this.preferredUpdatePolicy)}get updating(){var e,t;return!!(this.graphicsWaitingForSymbol.size>0||this.running||null!=(e=this.elevationAlignment)&&e.updating||d(this.scaleVisibility)&&this.scaleVisibility.updating||null!=(t=this.filterVisibility)&&t.updating||this.rendererChangeAbortController||this.elevationInfoChangeAbortController||this._updatingPendingLoadedGraphicsChange||this._frameTask.updating||this._loadingSymbols>0)}get running(){var e;return this.pendingUpdates.size>0||!(null==(e=this._spatialIndex)||!e.updating)}get suspendedOrOutsideOfView(){var e;return this.owner.suspended||(null==(e=this.owner.suspendInfo)?void 0:e.outsideOfView)}get updatingRemaining(){var e,t;return this.updating?this.pendingUpdates.size+.1*((null==(e=this._spatialIndex)?void 0:e.updatingRemaining)||0)+.1*((null==(t=this.elevationAlignment)?void 0:t.updatingRemaining)||0):0}get displayFeatureLimit(){const e=this.owner&&this.owner.view&&this.owner.view.qualitySettings,t=e?e.graphics3D.minTotalNumberOfFeatures:0,i=e?e.graphics3D.maxTotalNumberOfFeatures:0,r=e?e.graphics3D.maxTotalNumberOfPrimitives:0,s=this.averageSymbolComplexity,a=Math.max(1,d(s)?s.primitivesPerFeature:1),n=d(s)&&s.drawCallsPerFeature>0?i/s.drawCallsPerFeature*.3:i,o=Math.ceil(r/a),l=Math.max(t,Math.min(i,o,n)),h=this._get("displayFeatureLimit");return h&&h.minimumTotalNumberOfFeatures===t&&h.maximumTotalNumberOfFeatures===i&&h.maximumTotalNumberOfPrimitives===r&&h.averageSymbolComplexity===s&&h.maximumNumberOfFeatures===l?h:{minimumTotalNumberOfFeatures:t,maximumTotalNumberOfFeatures:i,maximumTotalNumberOfPrimitives:r,averageSymbolComplexity:s,maximumNumberOfFeatures:l}}get averageSymbolComplexity(){const e=ue(this.symbolComplexities),t=this._get("averageSymbolComplexity");return 0===e.numComplexities||d(t)&&(e.estimated&&(t.primitivesPerFeature>=e.primitivesPerFeature||t.primitivesPerCoordinate>=e.primitivesPerCoordinate||t.drawCallsPerFeature>=e.drawCallsPerFeature)||t.primitivesPerFeature===e.primitivesPerFeature&&t.primitivesPerCoordinate===e.primitivesPerCoordinate&&t.drawCallsPerFeature===e.drawCallsPerFeature)?t:e}get spatialReference(){return this._spatialReference}get usedMemory(){const e=d(this.averageSymbolComplexity)&&this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel*this.numberOfGraphics:0;return this._usedMemory+e}get usedMemoryPerGraphic(){if(this._usedMemory&&this.numberOfGraphics)return Math.abs(this.pendingAdds-this.pendingRemoves)/this.numberOfGraphics>30?0:this._usedMemory/this.numberOfGraphics;if(d(this.averageSymbolComplexity)){const e=this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel:0;return this.averageSymbolComplexity.memory.bytesPerFeature+e}return 0}get unprocessedMemoryEstimate(){return Math.max(0,(this.pendingAdds-this.pendingRemoves)*this.usedMemoryPerGraphic)}get symbolComplexities(){return this.currentRenderer?this._getSymbolComplexitiesUsedOrRenderer(this.currentRenderer):this._getSymbolComplexitiesUsed()}_getConvertedSymbol(e){if("web-style"===e.type)return e.clone();const t=this.symbolConversionCache.get(e.id);if(d(t))return t;const i=ee(e,{retainId:!0,hasLabelingContext:this._hasLabelingContext(e)}),r=i.symbol||null;return c(r)&&i.error&&je.error(i.error.message),this.symbolConversionCache.set(e.id,r),r}_getSymbolComplexitiesUsedOrRenderer(e){if(c(e))return[];const t=e.getSymbols(),i="backgroundFillSymbol"in e&&e.backgroundFillSymbol;if(!(i||t&&t.length))return[];const r=[],s=this._getSymbolComplexityUsedOrRenderer(i);d(s)&&r.push(s);for(const a of t){const e=this._getSymbolComplexityUsedOrRenderer(a);d(e)&&r.push(e)}return r}_getSymbolComplexityUsedOrRenderer(e){if(c(e))return null;const t=this.symbols.get(e.id);if(d(t))return t.complexity;const i=this._getConvertedSymbol(e);return d(i)?be(i):null}_getSymbolComplexitiesUsed(){const e=[];return this.symbols.forEach((t=>{d(t)&&e.push(t.complexity)})),e}initialize(){this._spatialReference=this.owner.view.spatialReference,this._set("featureStore",new ne({objectIdField:this.owner.layer&&this.owner.layer.objectIdField,hasZ:this.hasZ,hasM:this.hasM,spatialReference:this._spatialReference,featureSpatialReference:this.owner.featureSpatialReference,getSpatialIndex:()=>this.spatialIndex,forAllGraphics:e=>this.graphics3DGraphics.forEach(e)}))}async setup(e){this.setupAbortController=new AbortController;const t=this.setupAbortController.signal;this._set("elevationAlignment",e.elevationAlignment),this._set("scaleVisibility",e.scaleVisibility),this._set("filterVisibility",e.filterVisibility),this._set("deconflictor",e.deconflictor),this._set("labeler",e.labeler),this._set("objectStates",e.objectStates);const i=this.owner.view;this.viewElevationProvider=new te(this._spatialReference,i),this._initializeStage(i,this.layer.uid),this.symbolCreationContext.sharedResources=i.sharedSymbolResources,this.sharedSymbolResourcesOwnerHandle=i.sharedSymbolResources.addGraphicsOwner(this.owner),d(this.currentRenderer)&&(this.symbolCreationContext.renderer=this.currentRenderer),this.symbolCreationContext.stage=this.stage,this.symbolCreationContext.streamDataRequester=i.sharedSymbolResources.streamDataRequester,this.symbolCreationContext.renderCoordsHelper=i.renderCoordsHelper,this.symbolCreationContext.layer=this.layer,this.symbolCreationContext.graphicsCoreOwner=this.owner,this.symbolCreationContext.localOriginFactory=new _e(i.renderSpatialReference),this.symbolCreationContext.elevationProvider=i.elevationProvider,this.symbolCreationContext.notifyGraphicGeometryChanged=e=>this.notifyGraphicGeometryChanged(e),this.symbolCreationContext.notifyGraphicVisibilityChanged=e=>this.notifyGraphicVisibilityChanged(e);const r=se(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);if(this.symbolCreationContext.featureExpressionInfoContext=await ae(r,this._spatialReference,je),f(t),this.symbolCreationContext.screenSizePerspectiveEnabled=i.screenSizePerspectiveEnabled&&this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this.symbolCreationContext.physicalBasedRenderingEnabled=!!this.owner.view.qualitySettings.physicallyBasedRenderingEnabled,"drapeSourceType"in this.owner){const{owner:e}=this;this.symbolCreationContext.drapeSourceRenderer=i.basemapTerrain.overlayManager.registerGeometryDrapeSource(e),this._handles.add(a((()=>i.basemapTerrain.overlayManager.unregisterDrapeSource(e))))}this._handles.add([_((()=>this.suspendedOrOutsideOfView),(()=>this._frameTask.reschedule((()=>this._updateLayerVisibility())))),_((()=>{var e;return[null==(e=this.layer)?void 0:e.screenSizePerspectiveEnabled,this.owner.view.screenSizePerspectiveEnabled]}),(()=>{const e=i.screenSizePerspectiveEnabled&&this.layer.screenSizePerspectiveEnabled;var t;e!==this.symbolCreationContext.screenSizePerspectiveEnabled&&(this.symbolCreationContext.screenSizePerspectiveEnabled=e,null==(t=this.labeler)||t.reset(),this.recreateAllGraphicsAndSymbols())}),{equals:n}),_((()=>this.owner.slicePlaneEnabled),(e=>this._slicePlaneEnabledChange(!!e))),_((()=>{var e;return null==(e=this.owner.view.state)?void 0:e.pixelRatio}),(()=>this._pixelRatioChange())),_((()=>{var e;return null==(e=this.owner.view.qualitySettings)?void 0:e.physicallyBasedRenderingEnabled}),(e=>this._physicalBasedRenderingChange(e))),G((()=>{var e;return null==(e=i.basemapTerrain)?void 0:e.tilingScheme}),(e=>{if(e.spatialReference.equals(this.symbolCreationContext.overlaySR)||(this.symbolCreationContext.overlaySR=i.basemapTerrain.spatialReference),this._handles.has("loaded-graphics"))this.recreateAllGraphics();else{const e=()=>{var e;return null==(e=this.owner)?void 0:e.loadedGraphics};this._handles.add([w(e,"change",(e=>{this._graphicsCollectionChanged(e),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}),{onListenerAdd:()=>{this.recreateAllGraphics(),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}})],"loaded-graphics")}}),{initial:!0}),_((()=>this.effectiveUpdatePolicy),(e=>{d(this.stageLayer)&&(this.stageLayer.updatePolicy=e),this.symbolCreationContext.isAsync=this.effectiveUpdatePolicy===Se.ASYNC,e===Se.SYNC&&this.runTask(xe)}),x)]),this._frameTask=i.resourceController.scheduler.registerTask(Re.GRAPHICS_CORE,this),this.layer&&"featureReduction"in this.layer&&this._handles.add(_((()=>this.layer.featureReduction),(()=>this.deconflictor.featureReductionChange()))),this.notifyChange("averageSymbolComplexity");try{await this.rendererChange(this.layer.renderer)}catch{}f(t),this.setupAbortController=null}_abortSetup(){this.setupAbortController&&(this.setupAbortController.abort(),this.setupAbortController=null)}destroy(){this._abortSetup(),this._abortRendererChange(),this._abortElevationInfoChange(),this.owner.view.deconflictor.removeGraphicsOwner(this),this.owner.view.labeler.removeGraphicsOwner(this),this._updatingPendingLoadedGraphicsChange=y(this._updatingPendingLoadedGraphicsChange),this.clear(),this.graphicStateTracking=m(this.graphicStateTracking),this.stage&&(this.stage.remove(this.stageLayer),this.stageLayer=null,this.stage=null),this._handles=m(this._handles),this._frameTask.remove(),this._frameTask=we,this._spatialReference=null,this._set("owner",null);for(const e in this.whenGraphics3DGraphicRequests)this.whenGraphics3DGraphicRequests[e].reject(new r("graphic:layer-destroyed","Layer has been destroyed"));this.whenGraphics3DGraphicRequests=null,this.sharedSymbolResourcesOwnerHandle=y(this.sharedSymbolResourcesOwnerHandle),this.propertiesPool=m(this.propertiesPool),this.pendingUpdatesPool=null,this.symbolConversionCache.clear(),this.objectIdInvisibleSet.clear(),this._spatialIndex=m(this._spatialIndex),this._set("featureStore",m(this.featureStore))}clear(){var e,t;null==(e=this.objectStates)||e.allGraphicsDeleted(),d(this.graphicStateTracking)&&this.graphicStateTracking.allGraphicsDeleted(),this.graphics3DGraphics.forEach((e=>e.destroy())),null==(t=this._spatialIndex)||t.clear(),this.graphics3DGraphics.clear(),this.numberOfGraphics=0,this._usedMemory=0,this._updateLayerVisibility(),this.symbols.forEach(m),this.symbols.clear(),this.graphicsBySymbol.clear(),this.graphicsWithoutSymbol.clear(),this.graphicsWaitingForSymbol.clear(),this.pendingUpdates.clear(),this.pendingUpdatesPool.clear(),this.pendingAdds=0,this.pendingRemoves=0,this.notifyChange("updating"),this.notifyChange("running"),this.notifyChange("updatingRemaining"),this.featureStore.events.emit("changed")}_initializeStage(e,t){this.stage=e._stage,this.stageLayer=new Ge({isPickable:!this.suspendedOrOutsideOfView,updatePolicy:this.effectiveUpdatePolicy},t),this.stage.add(this.stageLayer);const i=this.stageLayer.events;i.on("objectTransformation",(e=>this.notifyGraphicGeometryChanged(e.metadata.graphicUid))),i.on("visibilityChanged",(e=>this.notifyGraphicVisibilityChanged(e.metadata.graphicUid))),i.on("objectGeometryAdded",(e=>this.notifyGraphicGeometryChanged(e.object.metadata.graphicUid))),i.on("objectGeometryRemoved",(e=>this.notifyGraphicGeometryChanged(e.object.metadata.graphicUid))),i.on("vertexAttrsUpdated",(e=>this.notifyGraphicGeometryChanged(e.object.metadata.graphicUid)))}notifyGraphicGeometryChanged(e){if(c(this.graphicStateTracking)||c(e))return;const t=this.graphics3DGraphics.get(e);t&&this.graphicStateTracking.updateGraphicGeometry(t)}notifyGraphicVisibilityChanged(e){if(c(this.graphicStateTracking)||c(e))return;const t=this.graphics3DGraphics.get(e);t&&this.graphicStateTracking.updateGraphicVisibility(t)}_updateLayerVisibility(){const e=this.displayFeatureLimit.maximumNumberOfFeatures,t=this.numberOfGraphics>e*ke,i=!this.suspendedOrOutsideOfView&&!t;i!==this._visible&&(this._visible=i,i?(this.stageLayer.isPickable=!0,this.updateAllGraphicsVisibility()):(this.stageLayer.isPickable=!1,this._hideAllGraphics()),this._updateStageLayerVisibility())}_updateStageLayerVisibility(){this.stageLayer.isVisible=this._visible&&(null==this.layer.opacity||this.layer.opacity>0)}getGraphics3DGraphicById(e){return this.graphics3DGraphics.get(e)}getGraphics3DGraphicByObjectId(e){var t;return null!=(t=this.owner.layer)&&t.objectIdField?this._findGraphics3DGraphicByObjectId(e):null}_getGraphicObjectID(e,t=this.owner.layer&&this.owner.layer.objectIdField){return H(e,t)}get graphics3DGraphicsByObjectID(){const e=this.owner.layer&&this.owner.layer.objectIdField;if(!e)return null;const t=new Map;return this.graphics3DGraphics.forEach((i=>{if(!i)return;const r=i.graphic,s=this._getGraphicObjectID(r,e);d(s)&&t.set(s,i)})),t}get labelsEnabled(){return!(!this.labeler||!this.labeler.layerLabelsEnabled())}async updateLabelingInfo(e){const t=this.deconflictor&&this.deconflictor.labelingInfoChange(e),i=this.labeler&&this.labeler.labelingInfoChange(e);await v([t,i])}updateVisibilityInfo(){this.deconflictor&&this.deconflictor.labelingInfoChange(),this.labeler&&this.labeler.visibilityInfoChange()}get symbolUpdateType(){if(this.pendingUpdates.size>0)return"unknown";let e=0,t=0;return l(this.symbols,((i,r)=>{if(d(i)){const s=i.getFastUpdateStatus();if(s.loading>0)return!0;this.graphicsBySymbol.has(r)&&(t+=s.fast,e+=s.slow)}return!1}))?"unknown":t>=0&&0===e?"fast":e>=0&&0===t?"slow":"mixed"}runTask(e){this._frameTask.processQueue(e),this._applyPendingUpdates(e),this.notifyChange("running"),this.running||this.notifyChange("updating"),this.notifyChange("updatingRemaining")}setObjectIdVisibility(e,t){t?this.objectIdInvisibleSet.delete(e):this.objectIdInvisibleSet.add(e);const i=this._findGraphics3DGraphicByObjectId(e);d(i)&&this._updateUserVisibility(i)}_findGraphics3DGraphicByObjectId(e){return h(this.graphics3DGraphics,(t=>this._getGraphicObjectID(t.graphic)===e))}_updateUserVisibility(e){if(c(e))return!1;const t=e.graphic,i=this._getGraphicObjectID(t),r=t.visible&&!this.owner.suspended&&(c(i)||!this.objectIdInvisibleSet.has(i));return e.setVisibilityFlag(ie.USER_SETTING,r,re.GRAPHIC)}_whenGraphics3DGraphic(e){const t=this.graphics3DGraphics.get(e.uid);if(t)return Promise.resolve(t);const i=this.whenGraphics3DGraphicRequests[e.uid];if(i)return i.promise;const r=C();return this.whenGraphics3DGraphicRequests[e.uid]=r,r.promise}async _boundsForGraphics3DGraphic(e,t){const i=this._spatialReference,r=this.owner.view.renderSpatialReference,s=this.owner.view.basemapTerrain.spatialReference,a=(e,t,s)=>k(e,r,t,e,i,t,s),n=(e,t,r)=>k(e,s,t,e,i,t,r),o=this.viewElevationProvider?{service:this.viewElevationProvider,useViewElevation:d(t)&&t.useViewElevation,minDemResolution:d(t)&&t.minDemResolution,minDemResolutionForPoints:this.owner.view.resolution}:null,l=await e.getProjectedBoundingBox(a,n,o,g(t,"signal"));if(!l)return null;const h=l.boundingBox;if(l.requiresDrapedElevation){const e=this.symbolCreationContext.elevationProvider;if(e){W(h,Ae);const t=p(e.getElevation(Ae[0],Ae[1],0,i,"ground"),0);h[2]=Math.min(h[2],t),h[5]=Math.max(h[5],t)}}return{boundingBox:h,screenSpaceObjects:l.screenSpaceObjects}}async whenGraphicBounds(e,t){await R((()=>{var e;return null==(e=this.owner)?void 0:e.loadedGraphics}));const i=this.owner.layer&&this.owner.layer.objectIdField,s=this.owner.loadedGraphics.find((t=>t===e||i&&t.attributes&&e.attributes&&t.attributes[i]===e.attributes[i]));if(!s)throw new r("internal:graphic-not-part-of-view","Graphic is not part of this view");const a=await this._whenGraphics3DGraphic(s);return this._boundsForGraphics3DGraphic(a,t)}computeAttachmentOrigin(e,t){const i=this.graphics3DGraphics.get(e.uid);if(!i)return null;const r=i.computeAttachmentOrigin();if(0===r.render.num&&0===r.draped.num)return null;O(Me,0,0,0);let s=0;if(r.render.num>0){if(!V(r.render.origin,this.symbolCreationContext.renderCoordsHelper.spatialReference,We,t))return null;A(Me,Me,We),s++}if(r.draped.num>0){const[e,i]=r.draped.origin,a=p(this.viewElevationProvider.getElevation(e,i,"ground"),0);if(O(We,e,i,a),!V(We,this.viewElevationProvider.spatialReference,We,t))return null;A(Me,Me,We),s++}return s>1&&L(Me,Me,1/s),new De({x:Me[0],y:Me[1],z:Me[2],spatialReference:t})}getSymbolLayerSize(e,t){const i=this.symbols.get(e.id);if(c(i))throw new r("internal:symbol-not-part-of-view","Symbol is not part of this view");const s=e.symbolLayers.indexOf(t);if(-1===s)throw new r("internal:missing-symbol-layer","Symbol layer is not in symbol");const a=i.getSymbolLayerSize(s);if(null==a)throw new r("internal:missing-size","Symbol layer has no valid size");return a}_graphicsCollectionChanged(e){this._startCreateGraphics&&(this.add(e.added),this.remove(e.removed))}graphicUpdateHandler(e){const t=e.graphic.uid,i=this.graphics3DGraphics.get(t);if(!c(i)||!c(this.graphicsWithoutSymbol.get(t)))switch(e.property){case"visible":this._graphicUpdateVisibleHandler(i);break;case"geometry":this._graphicUpdateGeometryHandler(i,e);break;case"symbol":this._graphicUpdateSymbolHandler(i,e);break;case"attributes":break;case"transform":this._graphicUpdateTransformHandler(i,e)}}_graphicUpdateGeometryHandler(e,t){const i=t.graphic.geometry;if(c(i))return void this._recreateGraphic(t.graphic);if(c(e)){const e=t.graphic.symbol&&t.graphic.symbol.id;if(e){const t=this.symbols.get(e);if(d(t)&&t.loadStatus===me.LOADING)return}return void this._recreateGraphic(t.graphic)}const r=e.graphics3DSymbol;!c(t.newValue)&&r.updateGeometry(e,t.newValue)||this._recreateGraphic(e.graphic),this._expandComputedExtent(i)}_graphicUpdateSymbolHandler(e,t){const i=t.graphic,r=d(e)?e.graphics3DSymbol:d(t.oldValue)?this.symbols.get(t.oldValue.id):null;if(c(r)||c(t.newValue))return void this._recreateGraphic(i);const s=r.symbol,a=this._getConvertedSymbol(t.newValue);if(d(a)&&(a.type!==s.type||"web-style"===a.type)||"web-style"===s.type)return void this._recreateGraphic(i);const n=this.graphicsBySymbol.get(s.id);if(n&&1!==n.size)return void this._recreateGraphic(i);const o=I(s,a);if(c(o))return void this._updateSymbolMapping(s.id,a);const l={diff:o,graphics3DGraphicPatches:[],symbolStatePatches:[]};if(r.prepareSymbolPatch(l),!U(l.diff))return void this._recreateGraphic(i);const h=this._getRenderingInfo(i);if(c(h))return void this._recreateGraphic(i);const p=r.extentPadding;for(const d of l.symbolStatePatches)d();if(p!==r.extentPadding&&this._recomputeExtentPadding(),d(e))for(const d of l.graphics3DGraphicPatches)d(e,h);this._updateSymbolMapping(s.id,a)}_graphicUpdateVisibleHandler(e){this._updateUserVisibility(e)&&(this.labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty())}_graphicUpdateTransformHandler(e,t){}recreateGraphics(e){this.suspendSymbolCleanup=!0,this.remove(e),this.add(e),this.suspendSymbolCleanup=!1,this.effectiveUpdatePolicy===Se.SYNC&&this._cleanupSymbols()}_recreateGraphic(e){this.recreateGraphics([e])}_beginGraphicUpdate(e){const t=this.graphicsUpdateId;return this.graphicsUpdateId++,this.graphicsWaitingForSymbol.set(e.uid,t),1===this.graphicsWaitingForSymbol.size&&this.notifyChange("updating"),t}_endGraphicUpdate(e){e&&(this.graphicsWaitingForSymbol.delete(e.uid),0===this.graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("updating")))}_recomputeExtentPadding(){let e=0;this.symbols.forEach((t=>{d(t)&&(e=Math.max(e,t.extentPadding))})),this._set("extentPadding",e)}_expandComputedExtent(e){const t=Le,i=e.spatialReference;Y(e,t);const r=this._spatialReference,s=Oe.tmpVec;if(i.equals(r)||F(t[0],t[1],0,i,s,r)&&(t[0]=s[0],t[1]=s[1],F(t[3],t[4],0,i,s,r),t[3]=s[0],t[4]=s[1]),!(isFinite(t[0])&&isFinite(t[3])&&isFinite(t[1])&&isFinite(t[4])))return;const a=this.computedExtent;let n=null;const o=isFinite(t[2])&&isFinite(t[5]),l=o&&(!a||null==a.zmin||t[2]<a.zmin),h=o&&(!a||null==a.zmax||t[5]>a.zmax);if(a){(t[0]<a.xmin||t[1]<a.ymin||t[3]>a.xmax||t[4]>a.ymax||l||h)&&(n=this.propertiesPool.get("computedExtent"),n.xmin=Math.min(t[0],a.xmin),n.ymin=Math.min(t[1],a.ymin),n.xmax=Math.max(t[3],a.xmax),n.ymax=Math.max(t[4],a.ymax),n.spatialReference=r)}else n=this.propertiesPool.get("computedExtent"),n.xmin=t[0],n.ymin=t[1],n.xmax=t[3],n.ymax=t[4],n.spatialReference=r;n&&(l&&(n.zmin=t[2]),h&&(n.zmax=t[5]),this._set("computedExtent",n))}_abortElevationInfoChange(){this.elevationInfoChangeAbortController&&(this.elevationInfoChangeAbortController.abort(),this.elevationInfoChangeAbortController=null)}async elevationInfoChange(){var e,t;this._abortElevationInfoChange();const i=new AbortController;this.elevationInfoChangeAbortController=i;const r=se(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);this.symbolCreationContext.featureExpressionInfoContext=await ae(r,this._spatialReference,je),f(i),this.elevationInfoChangeAbortController=null,null==(e=this.labeler)||e.elevationInfoChange(),this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("elevationInfo",t)?t.forEach((e=>{const t=e.graphic,i=e.labelGraphics;for(const r of i){r.graphics3DSymbolLayer.updateGraphicElevationContext(t,r)}})):this._recreateSymbol(i)})),this.updateStageLayerElevationProvider(),null==(t=this.elevationAlignment)||t.elevationInfoChange()}updateStageLayerElevationProvider(){this.stageLayerElevationProvider?(this.layer.elevationInfo&&"relative-to-scene"===this.layer.elevationInfo.mode||0===this.numberOfGraphicsProvidingElevation)&&(this.owner.view.elevationProvider.unregister(this.stageLayerElevationProvider),this.stageLayerElevationProvider.dispose(),this.stageLayerElevationProvider=null):(!this.layer.elevationInfo||this.layer.elevationInfo&&"relative-to-scene"!==this.layer.elevationInfo.mode)&&this.numberOfGraphicsProvidingElevation>0&&(this.stageLayerElevationProvider=new fe({layer:this.layer,stageLayer:this.stageLayer,view:this.owner.view}),this.owner.view.elevationProvider.register("scene",this.stageLayerElevationProvider))}_clearSymbolsAndGraphics(){var e,t,i,r,s;this.clear(),null==(e=this.filterVisibility)||e.clear(),null==(t=this.labeler)||t.reset(),null==(i=this.deconflictor)||i.clear(),null==(r=this.elevationAlignment)||r.clear(),null==(s=this.stageLayer)||s.invalidateSpatialQueryAccelerator(),this.stageLayerElevationProvider&&(this.owner.view.elevationProvider.unregister(this.stageLayerElevationProvider),this.stageLayerElevationProvider.dispose(),this.stageLayerElevationProvider=null)}startCreateGraphics(){this._startCreateGraphics=!0,this.recreateAllGraphics()}recreateAllGraphics(){this._recreateAllGraphics(!1)}recreateAllGraphicsAndSymbols(){this._recreateAllGraphics(!0)}_recreateAllGraphics(e=!1){if(!this._startCreateGraphics)return;const{loadedGraphics:t,view:i}=this.owner,r=i.basemapTerrain.tilingScheme&&t&&t.length?t.toArray():null;!e&&r||this._clearSymbolsAndGraphics(),this.symbolCreationContext.screenSizePerspectiveEnabled=this.owner.view.screenSizePerspectiveEnabled&&this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this._set("computedExtent",null),r&&(e?this.add(r):this.recreateGraphics(r))}_recreateSymbol(e){const t=this.graphicsBySymbol.get(e),i=[];t&&(t.forEach(((e,t)=>{var r;const s=e.usedMemory;this._conditionalRemove(e,t),null==(r=this._spatialIndex)||r.remove(e),i.push(e.graphic),e.destroy(),this._removeGraphics3DGraphic(t,s),this._updateLayerVisibility(),this.featureStore.events.emit("changed")})),this.graphicsBySymbol.set(e,new Map));const r=this.symbols.get(e);m(r),this.symbols.delete(e),this.add(i)}_recreateGraphicsForSymbol(e){const t=this.graphicsBySymbol.get(e);if(t){const e=[];t.forEach((t=>e.push(t.graphic))),this.recreateGraphics(e)}}_conditionalRemove(e,t){var i,r,s;this.graphicsDrapedUids.delete(t),null==(i=this.objectStates)||i.removeGraphic(e),null==(r=this.labeler)||r.removeGraphic(e),null==(s=this.deconflictor)||s.removeGraphic(e),d(this.graphicStateTracking)&&this.graphicStateTracking.removeGraphic(e)}add(e){e&&0!==e.length&&(this.owner.view.basemapTerrain&&this.owner.view.basemapTerrain.tilingScheme?(this._updatePolicyForGraphics(e)===Se.ASYNC?this._addDelayed(e):this._addImmediate(e),this.notifyChange("updating")):je.error("#add()","Cannot add graphics before terrain surface has been initialized"))}_updatePolicyForGraphics(e){if(this.effectiveUpdatePolicy===Se.SYNC&&("mesh"===this.layer.geometryType||null==this.layer.geometryType))for(const t of e)if(d(t.geometry)&&"mesh"===t.geometry.type&&!t.geometry.loaded)return Se.ASYNC;return this.effectiveUpdatePolicy}_addImmediate(e){this.geometryWarningLogged=!1,this.symbolWarningLogged=!1;for(const t of e)this._addGraphic(t,this._getRenderingInfo(t,je),Se.SYNC);this._cleanupSymbols(),this.labeler&&(this.owner.view.labeler.setDirty(),this._cleanupSymbols()),this.owner.view.deconflictor.setDirty()}_addDelayed(e){for(const t of e){const e=t.uid;let i=this.pendingUpdates.get(e);i?i.add?i.state!==Fe.NEW&&i.abortController.abort():this.pendingAdds++:(i=this.pendingUpdatesPool.pushNew(),this.pendingAdds++,this.pendingUpdates.set(e,i)),i.add=t}this.notifyChange("running"),this.notifyChange("updatingRemaining")}remove(e){this.effectiveUpdatePolicy===Se.ASYNC?this._removeDelayed(e):this._removeImmediate(e),this.notifyChange("updating")}_removeImmediate(e){for(const t of e)this._removeGraphic(t);this._cleanupSymbols(),this.labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty()}_removeDelayed(e){for(const t of e){const e=t.uid,i=this.pendingUpdates.get(e);if(i)i.add&&(i.remove?i.add=null:this.pendingUpdates.delete(e),i.state===Fe.LOADING&&i.abortController.abort(),this.pendingAdds--);else{const i=this.pendingUpdatesPool.pushNew();i.remove=t,this.pendingUpdates.set(e,i),this.pendingRemoves++}}0===this.pendingUpdates.size&&this._finishPendingUpdates(),this.notifyChange("running"),this.notifyChange("updatingRemaining")}_finishPendingUpdates(){this.pendingUpdatesPool.clear(),this._cleanupSymbols(),(this.pendingAdds||this.pendingRemoves)&&je.warn("pendingAdds/Removes in inconsistent state!"),this.pendingAdds=0,this.pendingRemoves=0}_applyPendingUpdates(e){var t;if(this.geometryWarningLogged=!1,this.symbolWarningLogged=!1,0===this.pendingUpdates.size&&null!=(t=this._spatialIndex)&&t.updating)this._spatialIndex.update();else{for(const[t,i]of this.pendingUpdates){if(e.done)break;i.add&&i.state===Fe.NEW&&this._processPendingUpdateNew(i);let r=this.effectiveUpdatePolicy;if(!i.remove||i.add&&i.state!==Fe.READY||(this.pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,r=Se.SYNC),i.add)switch(i.state){case Fe.READY:this._addGraphic(i.add,i.renderingInfo,r),i.add=null,this.pendingAdds--,e.madeProgress();break;case Fe.REJECTED:i.add=null,this.pendingAdds--;case Fe.LOADING:}null==i.remove&&null==i.add&&this.pendingUpdates.delete(t)}0===this.pendingUpdates.size&&(this._finishPendingUpdates(),this.notifyChange("running"))}}_processPendingUpdateNew(e){if(!e.add)return void(e.state=Fe.READY);const t=e.add.geometry;d(t)&&"mesh"===t.type&&!t.loaded?this._processPendingUpdateNewMesh(e,t):this._processPendingUpdateNewRenderingInfo(e)}async _processPendingUpdateNewMesh(e,t){e.state=Fe.LOADING,e.abortController=new AbortController;const i=e.abortController.signal;try{await t.load({signal:i})}catch(r){return this._processPendingUpdateNewError(e,r)}e.abortController=null,this._processPendingUpdateNewRenderingInfo(e)}_processPendingUpdateNewError(e,t){e.abortController=null,S(t)?e.state=Fe.NEW:e.state=Fe.REJECTED}async _processPendingUpdateNewRenderingInfo(e){if(c(this.layer.renderer)||"dictionary"!==this.layer.renderer.type)return e.renderingInfo=this._getRenderingInfo(e.add,je),void(e.state=Fe.READY);e.state=Fe.LOADING,e.abortController=new AbortController;let t=null;try{t=await this._getRenderingInfoAsync(e.add,{signal:e.abortController.signal})}catch(i){return e.abortController=null,void(S(i)?e.state=Fe.NEW:e.state=Fe.REJECTED)}c(t)||c(t.symbol)?(je&&!this.symbolWarningLogged&&(this.symbolWarningLogged=!0,je.warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),e.renderingInfo=null):e.renderingInfo=t,e.state=Fe.READY}_addGraphic(e,t,i){if(this.graphicsWithoutSymbol.set(e.uid,e),c(t)||c(t.symbol)||!$(e))return;const r=t.symbol,s=this.getOrCreateGraphics3DSymbol(r,t.renderer);if(c(s))return;this._expandComputedExtent(e.geometry);const a=this._beginGraphicUpdate(e),n=new oe(e,t,this.layer);let o=!1;const l=e=>{e===s.symbol.id&&(o=!0)};this._whenSymbolRemoved.push(l);const h=()=>{if(--this._loadingSymbols,this.destroyed)return;this._whenSymbolRemoved.removeUnordered(l);if(this.graphicsWaitingForSymbol.get(e.uid)!==a||o||s.destroyed||this.graphicSymbolSupported&&e.symbol&&e.symbol.id!==s.symbol.id)--s.referenced,this._cleanupSymbols();else{const t=this._createGraphics3DGraphic(s,n);this._spatialIndex&&d(t)&&this._spatialIndex.add(t),--s.referenced,this._endGraphicUpdate(e)}this.featureStore.events.emit("changed"),this.labeler&&this.owner.view.labeler.setDirty()},p=t=>{--this._loadingSymbols,this.destroyed||(this._whenSymbolRemoved.removeUnordered(l),o||(S(t)?this.add([e]):s.destroyed||this._endGraphicUpdate(e)))};++this._loadingSymbols,i===Se.ASYNC?s.load((()=>this._frameTask.schedule(h)),(e=>this._frameTask.schedule((()=>p(e))))):s.load(h,p)}_removeGraphic(e){const t=e.uid,i=this.graphics3DGraphics.get(t);if(i){var r;i.graphics3DSymbol.onRemoveGraphic(i);const e=i.usedMemory,s=i.isElevationSource;this._conditionalRemove(i,t),null==(r=this._spatialIndex)||r.remove(i);const a=i.graphics3DSymbol.symbol.id;this.graphicsBySymbol.get(a).delete(t),this.graphicsWithoutSymbol.delete(t),this._removeGraphics3DGraphic(t,e,s),i.destroy(),this.featureStore.events.emit("changed")}else this.graphicsWithoutSymbol.delete(t),this.graphicsWaitingForSymbol.delete(t),0===this.graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("updating"))}_hasLabelingContext(e){if(e instanceof Ee||e instanceof Ie){const t=this.symbolCreationContext.layer;return!!t.labelingInfo&&t.labelingInfo.some((t=>t.symbol===e))}return!1}_hasValidSymbolCreationContext(e){return!(e instanceof Ee&&!this._hasLabelingContext(e))||(je.error("LabelSymbol3D is only valid as part of a LabelClass. Using LabelSymbol3D as a renderer symbol is not supported."),!1)}_getRenderingInfo(e,t){const i=e.geometry;if(c(i))return t&&!this.geometryWarningLogged&&(this.geometryWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!T(i.spatialReference,this._spatialReference))return t&&!this.geometryWarningLogged&&(this.geometryWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} has incompatible spatial reference and will not render`)),null;if(!this.graphicSymbolSupported&&d(e.symbol))return t&&!this.symbolWarningLogged&&(this.symbolWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?Z(e,this.layer):e;let s;if(this.owner.getRenderingInfo&&(this.getRenderingInfoWithoutRenderer||d(this.currentRenderer)))s=this.owner.getRenderingInfo(r,this.currentRenderer,u(this.arcadeOnDemand));else{s={symbol:r.symbol||X(r.geometry)}}return c(s)||c(s.symbol)?(t&&!this.symbolWarningLogged&&(this.symbolWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),null):s}_getRenderingInfoAsync(e,t){const i=e.geometry;if(c(i))return je&&!this.geometryWarningLogged&&(this.geometryWarningLogged=!0,je.warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!this.graphicSymbolSupported&&d(e.symbol))return je&&!this.symbolWarningLogged&&(this.symbolWarningLogged=!0,je.warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?Z(e,this.layer):e;return this.owner.getRenderingInfoAsync(r,u(this.currentRenderer),u(this.arcadeOnDemand),t)}_createGraphics3DSymbol(e,t){if(!this._hasValidSymbolCreationContext(e))return null;const i=this._getConvertedSymbol(e);if(!i)return null;let r;if(d(t)&&"backgroundFillSymbol"in t&&t.backgroundFillSymbol){const e=ee(t.backgroundFillSymbol,{ignoreDrivers:!0});d(e.symbol)&&"web-style"!==e.symbol.type&&"cim"!==e.symbol.type&&(r=e.symbol.symbolLayers)}const s=he(i,this.symbolCreationContext,r);return s.load((()=>{const e=s.extentPadding;e>this.extentPadding&&this._set("extentPadding",e),this.notifyChange("averageSymbolComplexity")}),(()=>{})),s}getOrCreateGraphics3DSymbol(e,t){let i=this.symbols.get(e.id);return void 0===i&&(i=e instanceof Ue?new de(e,(e=>this._frameTask.schedule(e)),(e=>this._createGraphics3DSymbol(e,t))):this._createGraphics3DSymbol(e,t),this.symbols.set(e.id,i)),d(i)&&++i.referenced,i}trackGraphicState(e){return c(this.graphicStateTracking)&&(this.graphicStateTracking=new pe(this)),this.graphicStateTracking.add(e)}_addGraphics3DGraphic(e){this._usedMemory+=e.usedMemory,this.graphics3DGraphics.set(e.graphic.uid,e),this.numberOfGraphics++,e.isElevationSource&&(this.numberOfGraphicsProvidingElevation++,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_removeGraphics3DGraphic(e,t,i=!1){this._usedMemory-=t,this.graphics3DGraphics.delete(e),this.numberOfGraphics--,i&&(this.numberOfGraphicsProvidingElevation--,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_createGraphics3DGraphic(e,t){var i,r,s,a;const n=t.graphic;if(this.graphicsWithoutSymbol.delete(n.uid),!this.symbols.has(e.symbol.id))return this.add([n]),null;if(this.graphics3DGraphics.has(n.uid))return null;const o=e.createGraphics3DGraphic(t);if(c(o))return null;this._addGraphics3DGraphic(o);const l=e.symbol.id;this.graphicsBySymbol.has(l)||this.graphicsBySymbol.set(l,new Map),this.graphicsBySymbol.get(l).set(n.uid,o);o.isDraped&&this.graphicsDrapedUids.add(n.uid),o.centroid=null,d(n.geometry)&&"point"!==n.geometry.type&&(o.centroid=ce(n.geometry,this._spatialReference)),this._updateUserVisibility(o),d(this.scaleVisibility)&&this.scaleVisibility.updateVisibility(o),null==(i=this.filterVisibility)||i.updateVisibility(o),null==(r=this.deconflictor)||r.addGraphic(o),null==(s=this.labeler)||s.addGraphic(o),null==(a=this.objectStates)||a.addGraphic(o),this.deconflictor&&this.owner.view.deconflictor.setInitialIconVisibilityFlag(this,o),o.initialize(this.stage,this.stageLayer,this.owner),d(this.graphicStateTracking)&&this.graphicStateTracking.addGraphic(o);const h=this.whenGraphics3DGraphicRequests[n.uid];return h&&(delete this.whenGraphics3DGraphicRequests[n.uid],h.resolve(o)),o}_abortRendererChange(){this.rendererChangeAbortController&&(this.rendererChangeAbortController.abort(),this.rendererChangeAbortController=null)}async rendererChange(e){if(this._abortRendererChange(),e!==this.currentRenderer)if(this._validateRenderer(e),c(e)&&this._currentRendererChange(null,!1),J(e))if(d(e)&&e.arcadeRequired){const t=new AbortController;this.rendererChangeAbortController=t;const{arcadeUtils:i}=await this._ensureArcade();f(t),i.hasGeometryOperations(e)&&(await i.enableGeometryOperations(),f(t)),this.effectiveUpdatePolicy===Se.ASYNC?await this._frameTask.schedule((()=>this._currentRendererChange(e,!0)),t.signal):this._currentRendererChange(e,!0),this.rendererChangeAbortController=null}else if(this.effectiveUpdatePolicy===Se.ASYNC){const t=new AbortController;this.rendererChangeAbortController=t,await this._frameTask.schedule((()=>this._currentRendererChange(e,!1)),t.signal),this.rendererChangeAbortController=null}else this._currentRendererChange(e,!1);else this._currentRendererChange(e,!1)}async _ensureArcade(){return c(this.arcadeOnDemand)?(this.arcadeOnDemand=await K(),this.arcadeOnDemand):this.arcadeOnDemand}_currentRendererChange(e,t){this.currentRenderer=e,this.rendererHasGeometryOperations=t,this.symbolCreationContext.arcade=u(this.arcadeOnDemand);const i=this.symbolCreationContext.renderer;if(e===i)return;if(this.symbolConversionCache.clear(),c(e))return this.symbolCreationContext.renderer=null,void this.recreateAllGraphicsAndSymbols();const r=I(i,e);this._updateUnchangedSymbolMappings(r,e,i),this.symbolCreationContext.renderer=e,c(r)||("complete"===r.type?this.recreateAllGraphicsAndSymbols():"partial"===r.type&&(this._applyRendererDiff(r,e,i)?this._volatileGraphicsUpdated():this.recreateAllGraphicsAndSymbols()),this.notifyChange("averageSymbolComplexity"))}_diffHasSymbolChange(e){for(const t in e.diff)switch(t){case"visualVariables":case"defaultSymbol":case"uniqueValueInfos":break;case"authoringInfo":case"fieldDelimiter":delete e.diff[t];break;default:return!0}return!1}_applySymbolSetDiff(e,t,i){e=e||[],t=t||[];const r=[];for(const s of t){const t=this.graphicsBySymbol.get(s.id);t&&t.forEach(((a,n)=>{const o=a.graphic,l=this.layer instanceof q?this.layer:null,h=u(this.arcadeOnDemand);if(s===i.defaultSymbol&&i.getSymbol(Z(o,l),{arcade:h})===i.defaultSymbol)return;const d=a.usedMemory;e.length||i.defaultSymbol?r.push(o):this.graphicsWithoutSymbol.set(n,o);const p=this.graphics3DGraphics.get(n);this._conditionalRemove(p,n),a.destroy(),t.delete(n),this._removeGraphics3DGraphic(n,d),this._updateLayerVisibility()})),this._whenSymbolRemoved.forAll((e=>e(s.id)))}(e.length||r.length)&&(this.graphicsWithoutSymbol.forEach((e=>r.push(e))),this.graphicsWithoutSymbol.clear(),this.add(r)),this._cleanupSymbols(),this.labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty()}_applyUniqueValueRendererDiff(e,t,i){const r=e.diff.defaultSymbol,s=e.diff.uniqueValueInfos;if(r||s){const a=s?s.added.map((e=>e.symbol)):[],n=s?s.removed.map((e=>e.symbol)):[];if(s)for(let e=0;e<s.changed.length;e++)a.push(s.changed[e].newValue.symbol),n.push(s.changed[e].oldValue.symbol);return r?(i.defaultSymbol&&n.push(i.defaultSymbol),t.defaultSymbol&&a.push(t.defaultSymbol)):i.defaultSymbol&&a.length&&n.push(t.defaultSymbol),this._applySymbolSetDiff(a,n,t),delete e.diff.defaultSymbol,delete e.diff.uniqueValueInfos,!0}return!1}_calculateUnchangedSymbolMapping(e,t,i){if("unique-value"!==(null==t?void 0:t.type)||"unique-value"!==(null==i?void 0:i.type)||d(e)&&"partial"!==e.type)return[];const r=e=>d(e)?e.id:null,s=e&&e.diff,a=s&&s.defaultSymbol,n=s&&s.uniqueValueInfos;let o;if(n)o=n.unchanged.map((e=>({oldId:r(e.oldValue.symbol),newId:r(e.newValue.symbol)})));else{o=[];for(const e of i.uniqueValueInfos){const i=r(e.symbol),s=t.uniqueValueInfos.find((t=>t.value===e.value));s&&i!==r(s.symbol)&&o.push({oldId:i,newId:r(s.symbol)})}}return!a&&i.defaultSymbol&&o.push({oldId:r(i.defaultSymbol),newId:r(t.defaultSymbol)}),o}_updateSymbolMapping(e,t){const i=d(t)&&t?"string"==typeof t?t:t.id:null;if(!e||e===i)return;const r=this.graphicsBySymbol.get(e);this.graphicsBySymbol.delete(e),void 0!==r&&this.graphicsBySymbol.set(i,r);const s=this.symbols.get(e);if(void 0!==s&&(this.symbols.delete(e),this.symbols.set(i,s),d(s))){const e="string"==typeof t?null:t;d(e)?s.symbol=e:s.symbol.id=i}}_updateUnchangedSymbolMappings(e,t,i){const r=this._calculateUnchangedSymbolMapping(e,t,i);for(const{oldId:s,newId:a}of r)this._updateSymbolMapping(s,a)}_applyRendererDiff(e,i,r){if(this._diffHasSymbolChange(e))return!1;if(i instanceof t&&r instanceof t&&this._applyUniqueValueRendererDiff(e,i,r)&&0===Object.keys(e.diff).length)return!0;for(const[t]of this.graphicsBySymbol){const r=this.symbols.get(t);if(d(r))switch(r.applyRendererDiff(e,i)){case ye.Recreate_Symbol:this._recreateSymbol(t);break;case ye.Recreate_Graphics:this._recreateGraphicsForSymbol(t);case ye.Fast_Update:}}return!0}opacityChange(){this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("opacity",t))),this._updateStageLayerVisibility()}_slicePlaneEnabledChange(e){e!==this.symbolCreationContext.slicePlaneEnabled&&(this.symbolCreationContext.slicePlaneEnabled=e,this.stageLayer.isSliceable=e,this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("slicePlaneEnabled",t))),this.deconflictor&&this.deconflictor.slicePlaneEnabledChange(),this.labeler&&this.labeler.slicePlaneEnabledChange())}_physicalBasedRenderingChange(e){e!==this.symbolCreationContext.physicalBasedRenderingEnabled&&(this.symbolCreationContext.physicalBasedRenderingEnabled=e,this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("physicalBasedRenderingEnabled",t)||this._recreateSymbol(i)})))}_pixelRatioChange(){this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("pixelRatio",t)||this._recreateSymbol(i)}))}_signalUpdatingDuringAsyncLoadedGraphicsChange(){this._updatingPendingLoadedGraphicsChange&&this._updatingPendingLoadedGraphicsChange.remove(),this._updatingPendingLoadedGraphicsChange=P((()=>{this._updatingPendingLoadedGraphicsChange=null}))}setClippingExtent(e,t){const i=this.symbolCreationContext.clippingExtent,r=B();return ve(e,r,t)?this.symbolCreationContext.clippingExtent=N(M(),r):this.symbolCreationContext.clippingExtent=null,!z(this.symbolCreationContext.clippingExtent,i)}modifyGraphics3DGraphicVisibilities(e){let t=!1;this.graphics3DGraphics.forEach((i=>{e(i)&&(t=!0)})),t&&(this.labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty())}forEachGraphics3DSymbol(e){for(const[t,i]of this.symbols){if(c(i))return;e(i,this.graphicsBySymbol.get(t)||Ne,t)}}updateAllGraphicsVisibility(){this.filterVisibility&&(this.filterVisibility.dirty=!0),this.modifyGraphics3DGraphicVisibilities((e=>{const t=this._updateUserVisibility(e),i=d(this.scaleVisibility)&&this.scaleVisibility.updateVisibility(e);return t||i}))}_hideAllGraphics(){this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(ie.USER_SETTING,!1,re.GRAPHIC)))}_validateRenderer(e){const t=Q(e);if(t){const e=`Renderer for layer '${this.layer.title?`${this.layer.title}, `:""}, id:${this.layer.id}' is not supported in a SceneView`;je.warn(e,t.message)}}_volatileGraphicsUpdated(){var e;null==(e=this.labeler)||e.reset(),this.stageLayer.shaderTransformationChanged(),this.notifyChange("updating")}_cleanupSymbols(){if(this.graphicsWaitingForSymbol.size>0||this.suspendSymbolCleanup)return;let e=!1;this.symbols.forEach(((t,i)=>{if(c(t)||t.referenced>0)return;const r=this.graphicsBySymbol.get(i);r&&0!==r.size||(this.graphicsBySymbol.delete(i),this.symbols.delete(i),m(t),e=!0)})),e&&(this._recomputeExtentPadding(),this.notifyChange("averageSymbolComplexity"))}get test(){return{snapshotInternals:()=>({graphics:[...this.graphics3DGraphics.keys()].sort(),symbols:[...this.symbols.keys()].sort(),graphicsBySymbol:[...this.graphicsBySymbol.keys()].sort().map((e=>({symbolId:e,graphics:[...this.graphicsBySymbol.get(e).keys()].sort()}))),graphicsWithoutSymbol:[...this.graphicsWithoutSymbol.keys()].sort(),graphicsDrapedUids:[...this.graphicsDrapedUids].sort(),pendingUpdates:this.pendingUpdates}),symbols:this.symbols,filterVisibility:this.filterVisibility,numPending:this.pendingUpdates.size,forceUpdatePolicy:e=>{this.forcedUpdatePolicy=e}}}get performanceInfo(){return{visible:this.graphics3DGraphics.size,missing:this.graphicsWithoutSymbol.size,pending:this.pendingUpdates.size}}};var Fe;Ve.tmpVec=j(),e([D({readOnly:!0})],Ve.prototype,"computedExtent",void 0),e([D()],Ve.prototype,"currentRenderer",void 0),e([D()],Ve.prototype,"rendererHasGeometryOperations",void 0),e([D()],Ve.prototype,"_frameTask",void 0),e([D()],Ve.prototype,"rendererChangeAbortController",void 0),e([D()],Ve.prototype,"elevationInfoChangeAbortController",void 0),e([D()],Ve.prototype,"setupAbortController",void 0),e([D({readOnly:!0})],Ve.prototype,"elevationAlignment",void 0),e([D({readOnly:!0})],Ve.prototype,"scaleVisibility",void 0),e([D({readOnly:!0})],Ve.prototype,"filterVisibility",void 0),e([D()],Ve.prototype,"_spatialIndex",void 0),e([D({readOnly:!0})],Ve.prototype,"extentPadding",void 0),e([D()],Ve.prototype,"_updatingPendingLoadedGraphicsChange",void 0),e([D({readOnly:!0})],Ve.prototype,"featureStore",void 0),e([D({readOnly:!0})],Ve.prototype,"deconflictor",void 0),e([D({readOnly:!0})],Ve.prototype,"labeler",void 0),e([D({readOnly:!0})],Ve.prototype,"objectStates",void 0),e([D()],Ve.prototype,"_loadingSymbols",void 0),e([D()],Ve.prototype,"preferredUpdatePolicy",void 0),e([D()],Ve.prototype,"forcedUpdatePolicy",void 0),e([D({readOnly:!0})],Ve.prototype,"effectiveUpdatePolicy",null),e([D({constructOnly:!0})],Ve.prototype,"elevationFeatureExpressionEnabled",void 0),e([D({constructOnly:!0})],Ve.prototype,"owner",void 0),e([D({constructOnly:!0})],Ve.prototype,"layer",void 0),e([D({constructOnly:!0})],Ve.prototype,"graphicSymbolSupported",void 0),e([D({constructOnly:!0})],Ve.prototype,"getRenderingInfoWithoutRenderer",void 0),e([D({readOnly:!0})],Ve.prototype,"updating",null),e([D({readOnly:!0})],Ve.prototype,"running",null),e([D({readOnly:!0})],Ve.prototype,"suspendedOrOutsideOfView",null),e([D({readOnly:!0,dependsOn:[]})],Ve.prototype,"updatingRemaining",null),e([D({readOnly:!0,dependsOn:["owner.view.qualitySettings.graphics3D.maxTotalNumberOfPrimitives","owner.view.qualitySettings.graphics3D.maxTotalNumberOfFeatures","averageSymbolComplexity"]})],Ve.prototype,"displayFeatureLimit",null),e([D({readOnly:!0,dependsOn:[]})],Ve.prototype,"averageSymbolComplexity",null),e([D({constructOnly:!0})],Ve.prototype,"hasZ",void 0),e([D({constructOnly:!0})],Ve.prototype,"hasM",void 0),Ve=Oe=e([E("esri.views.3d.layers.graphics.Graphics3DCore")],Ve),function(e){e[e.NEW=0]="NEW",e[e.LOADING=1]="LOADING",e[e.READY=2]="READY",e[e.REJECTED=3]="REJECTED"}(Fe||(Fe={}));class Te{constructor(){this.add=null,this.renderingInfo=null,this.state=Fe.NEW,this.remove=null}clear(){this.add=null,this.renderingInfo=null,this.state=Fe.NEW,this.abortController=null,this.remove=null}}const ke=10,Me=j(),We=j(),Ne=new Map;export{Ve as Graphics3DCore};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import"../../../../renderers/ClassBreaksRenderer.js";import"../../../../renderers/DictionaryRenderer.js";import"../../../../renderers/DotDensityRenderer.js";import"../../../../renderers/HeatmapRenderer.js";import"../../../../renderers/Renderer.js";import"../../../../renderers/SimpleRenderer.js";import t from"../../../../renderers/UniqueValueRenderer.js";import"../../../../renderers/support/jsonUtils.js";import"../../../../symbols.js";import i from"../../../../core/Accessor.js";import"../../../../core/has.js";import r from"../../../../core/Error.js";import s from"../../../../core/Handles.js";import{makeHandle as a}from"../../../../core/handleUtils.js";import{equalsShallow as n}from"../../../../core/lang.js";import o from"../../../../core/Logger.js";import{someMap as l,findInMap as h}from"../../../../core/MapUtils.js";import{isSome as d,unwrapOr as p,isNone as c,removeMaybe as y,destroyMaybe as m,get as g,unwrap as u}from"../../../../core/maybe.js";import b from"../../../../core/PooledArray.js";import{throwIfAborted as f,eachAlways as v,createDeferred as C,isAbortError as S}from"../../../../core/promiseUtils.js";import{watch as _,when as G,on as w,syncAndInitial as x,whenOnce as R}from"../../../../core/reactiveUtils.js";import{schedule as P}from"../../../../core/scheduling.js";import{property as D}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as E}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as I,isEmpty as U}from"../../../../core/accessorSupport/diffUtils.js";import{s as O,a as A,g as L}from"../../../../chunks/vec3.js";import{c as j}from"../../../../chunks/vec3f64.js";import{projectVectorToVector as V,projectXYZToVector as F,canProjectWithoutEngine as T,projectBuffer as k}from"../../../../geometry/projection.js";import{create as M,center as W,fromRect as N,equals as z}from"../../../../geometry/support/aaBoundingBox.js";import{create as B}from"../../../../geometry/support/aaBoundingRect.js";import q from"../../../../layers/Layer.js";import{getObjectId as H,computeAABB as Y,hasGeometry as $}from"../../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as Z}from"../../../../layers/graphics/hydratedFeatures.js";import{isSupportedRenderer3D as J,validateTo3D as Q}from"../../../../renderers/support/rendererConversion.js";import{loadArcade as K}from"../../../../support/arcadeOnDemand.js";import{getDefaultSymbol3D as X}from"../../../../symbols/support/defaults3D.js";import{to3D as ee}from"../../../../symbols/support/symbolConversion.js";import{ViewElevationProvider as te}from"./ElevationQuery.js";import{VisibilityFlag as ie,VisibilityGroup as re}from"./enums.js";import{extractExpressionInfo as se,createContext as ae}from"./featureExpressionInfoUtils.js";import{Graphics3DFeatureStore as ne}from"./Graphics3DFeatureStore.js";import oe from"./Graphics3DGraphicCreationContext.js";import{Graphics3DSymbolCreationContext as le}from"./Graphics3DSymbolCreationContext.js";import{make as he}from"./Graphics3DSymbolFactory.js";import de from"./Graphics3DWebStyleSymbol.js";import{GraphicStateTracking as pe}from"./GraphicStateTracking.js";import{computeCentroid as ce}from"./graphicUtils.js";import{ApplyRendererDiffResult as ye}from"./interfaces.js";import{LoadStatus as me}from"./Loadable.js";import{SpatialIndex2D as ge}from"./SpatialIndex2D.js";import{averageSymbolComplexities as ue,defaultSymbolComplexity as be}from"./symbolComplexity.js";import{StageLayerElevationProvider as fe}from"../support/StageLayerElevationProvider.js";import{toBoundingRect as ve}from"../../support/extentUtils.js";import{PropertiesPool as Ce}from"../../support/PropertiesPool.js";import{UpdatePolicy as Se}from"../../webgl-engine/lib/basicInterfaces.js";import{GridLocalOriginFactory as _e}from"../../webgl-engine/lib/GridLocalOriginFactory.js";import{WebGLLayer as Ge}from"../../webgl-engine/lib/WebGLLayer.js";import{ImmediateTask as we,noBudget as xe,TaskPriority as Re}from"../../../support/Scheduler.js";import Pe from"../../../../geometry/Extent.js";import De from"../../../../geometry/Point.js";import Ee from"../../../../symbols/LabelSymbol3D.js";import Ie from"../../../../symbols/TextSymbol.js";import Ue from"../../../../symbols/WebStyleSymbol.js";var Oe;const Ae=j(),Le=M(),je=o.getLogger("esri.views.3d.layers.graphics.Graphics3DCore");let Ve=Oe=class extends i{constructor(e){super(e),this.propertiesPool=new Ce({computedExtent:Pe},this),this.computedExtent=null,this.currentRenderer=null,this.rendererHasGeometryOperations=!1,this.graphicStateTracking=null,this.symbolCreationContext=new le(((e,t)=>this._frameTask.schedule(e,t))),this.graphics3DGraphics=new Map,this.stageLayer=null,this.stage=null,this.graphicsDrapedUids=new Set,this.graphicsBySymbol=new Map,this.symbolConversionCache=new Map,this.symbols=new Map,this.graphicsWithoutSymbol=new Map,this.graphicsWaitingForSymbol=new Map,this.graphicsUpdateId=0,this._handles=new s,this._frameTask=we,this.suspendSymbolCleanup=!1,this._spatialReference=null,this.arcadeOnDemand=null,this.rendererChangeAbortController=null,this.elevationInfoChangeAbortController=null,this.setupAbortController=null,this.elevationAlignment=null,this.scaleVisibility=null,this.filterVisibility=null,this._spatialIndex=null,this.extentPadding=0,this._updatingPendingLoadedGraphicsChange=null,this.featureStore=null,this.deconflictor=null,this.labeler=null,this.objectStates=null,this.viewElevationProvider=null,this.stageLayerElevationProvider=null,this.sharedSymbolResourcesOwnerHandle=null,this.whenGraphics3DGraphicRequests={},this.pendingUpdates=new Map,this.numberOfGraphics=0,this.numberOfGraphicsProvidingElevation=0,this.pendingAdds=0,this.pendingRemoves=0,this._loadingSymbols=0,this.pendingUpdatesPool=new b({allocator:e=>e||new Te,deallocator:e=>(e.clear(),e)}),this.symbolWarningLogged=!1,this.geometryWarningLogged=!1,this.objectIdInvisibleSet=new Set,this._whenSymbolRemoved=new b,this.preferredUpdatePolicy=Se.SYNC,this.forcedUpdatePolicy=null,this.elevationFeatureExpressionEnabled=!0,this.owner=null,this.layer=null,this.graphicSymbolSupported=!0,this.getRenderingInfoWithoutRenderer=!1,this.hasZ=null,this.hasM=null,this._usedMemory=0,this._visible=void 0,this._startCreateGraphics=!1}get spatialIndex(){return this._spatialIndex||(this._spatialIndex=new ge({objectIdField:this.owner.layer?.objectIdField,spatialReference:this._spatialReference,hasZ:this.hasZ,hasM:this.hasM}),this._spatialIndex.setup(Array.from(this.graphics3DGraphics.values()))),this._spatialIndex.update(),this._spatialIndex}get effectiveUpdatePolicy(){return d(this.currentRenderer)&&"dictionary"===this.currentRenderer.type?Se.ASYNC:p(this.forcedUpdatePolicy,this.preferredUpdatePolicy)}get updating(){return!!(this.graphicsWaitingForSymbol.size>0||this.running||this.elevationAlignment?.updating||d(this.scaleVisibility)&&this.scaleVisibility.updating||this.filterVisibility?.updating||this.rendererChangeAbortController||this.elevationInfoChangeAbortController||this._updatingPendingLoadedGraphicsChange||this._frameTask.updating||this._loadingSymbols>0)}get running(){return this.pendingUpdates.size>0||!!this._spatialIndex?.updating}get suspendedOrOutsideOfView(){return this.owner.suspended||this.owner.suspendInfo?.outsideOfView}get updatingRemaining(){return this.updating?this.pendingUpdates.size+.1*(this._spatialIndex?.updatingRemaining||0)+.1*(this.elevationAlignment?.updatingRemaining||0):0}get displayFeatureLimit(){const e=this.owner&&this.owner.view&&this.owner.view.qualitySettings,t=e?e.graphics3D.minTotalNumberOfFeatures:0,i=e?e.graphics3D.maxTotalNumberOfFeatures:0,r=e?e.graphics3D.maxTotalNumberOfPrimitives:0,s=this.averageSymbolComplexity,a=Math.max(1,d(s)?s.primitivesPerFeature:1),n=d(s)&&s.drawCallsPerFeature>0?i/s.drawCallsPerFeature*.3:i,o=Math.ceil(r/a),l=Math.max(t,Math.min(i,o,n)),h=this._get("displayFeatureLimit");return h&&h.minimumTotalNumberOfFeatures===t&&h.maximumTotalNumberOfFeatures===i&&h.maximumTotalNumberOfPrimitives===r&&h.averageSymbolComplexity===s&&h.maximumNumberOfFeatures===l?h:{minimumTotalNumberOfFeatures:t,maximumTotalNumberOfFeatures:i,maximumTotalNumberOfPrimitives:r,averageSymbolComplexity:s,maximumNumberOfFeatures:l}}get averageSymbolComplexity(){const e=ue(this.symbolComplexities),t=this._get("averageSymbolComplexity");return 0===e.numComplexities||d(t)&&(e.estimated&&(t.primitivesPerFeature>=e.primitivesPerFeature||t.primitivesPerCoordinate>=e.primitivesPerCoordinate||t.drawCallsPerFeature>=e.drawCallsPerFeature)||t.primitivesPerFeature===e.primitivesPerFeature&&t.primitivesPerCoordinate===e.primitivesPerCoordinate&&t.drawCallsPerFeature===e.drawCallsPerFeature)?t:e}get spatialReference(){return this._spatialReference}get usedMemory(){const e=d(this.averageSymbolComplexity)&&this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel*this.numberOfGraphics:0;return this._usedMemory+e}get usedMemoryPerGraphic(){if(this._usedMemory&&this.numberOfGraphics)return Math.abs(this.pendingAdds-this.pendingRemoves)/this.numberOfGraphics>30?0:this._usedMemory/this.numberOfGraphics;if(d(this.averageSymbolComplexity)){const e=this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel:0;return this.averageSymbolComplexity.memory.bytesPerFeature+e}return 0}get unprocessedMemoryEstimate(){return Math.max(0,(this.pendingAdds-this.pendingRemoves)*this.usedMemoryPerGraphic)}get symbolComplexities(){return this.currentRenderer?this._getSymbolComplexitiesUsedOrRenderer(this.currentRenderer):this._getSymbolComplexitiesUsed()}_getConvertedSymbol(e){if("web-style"===e.type)return e.clone();const t=this.symbolConversionCache.get(e.id);if(d(t))return t;const i=ee(e,{retainId:!0,hasLabelingContext:this._hasLabelingContext(e)}),r=i.symbol||null;return c(r)&&i.error&&je.error(i.error.message),this.symbolConversionCache.set(e.id,r),r}_getSymbolComplexitiesUsedOrRenderer(e){if(c(e))return[];const t=e.getSymbols(),i="backgroundFillSymbol"in e&&e.backgroundFillSymbol;if(!(i||t&&t.length))return[];const r=[],s=this._getSymbolComplexityUsedOrRenderer(i);d(s)&&r.push(s);for(const a of t){const e=this._getSymbolComplexityUsedOrRenderer(a);d(e)&&r.push(e)}return r}_getSymbolComplexityUsedOrRenderer(e){if(c(e))return null;const t=this.symbols.get(e.id);if(d(t))return t.complexity;const i=this._getConvertedSymbol(e);return d(i)?be(i):null}_getSymbolComplexitiesUsed(){const e=[];return this.symbols.forEach((t=>{d(t)&&e.push(t.complexity)})),e}initialize(){this._spatialReference=this.owner.view.spatialReference,this._set("featureStore",new ne({objectIdField:this.owner.layer&&this.owner.layer.objectIdField,hasZ:this.hasZ,hasM:this.hasM,spatialReference:this._spatialReference,featureSpatialReference:this.owner.featureSpatialReference,getSpatialIndex:()=>this.spatialIndex,forAllGraphics:e=>this.graphics3DGraphics.forEach(e)}))}async setup(e){this.setupAbortController=new AbortController;const t=this.setupAbortController.signal;this._set("elevationAlignment",e.elevationAlignment),this._set("scaleVisibility",e.scaleVisibility),this._set("filterVisibility",e.filterVisibility),this._set("deconflictor",e.deconflictor),this._set("labeler",e.labeler),this._set("objectStates",e.objectStates);const i=this.owner.view;this.viewElevationProvider=new te(this._spatialReference,i),this._initializeStage(i,this.layer.uid),this.symbolCreationContext.sharedResources=i.sharedSymbolResources,this.sharedSymbolResourcesOwnerHandle=i.sharedSymbolResources.addGraphicsOwner(this.owner),d(this.currentRenderer)&&(this.symbolCreationContext.renderer=this.currentRenderer),this.symbolCreationContext.stage=this.stage,this.symbolCreationContext.streamDataRequester=i.sharedSymbolResources.streamDataRequester,this.symbolCreationContext.renderCoordsHelper=i.renderCoordsHelper,this.symbolCreationContext.layer=this.layer,this.symbolCreationContext.graphicsCoreOwner=this.owner,this.symbolCreationContext.localOriginFactory=new _e(i.renderSpatialReference),this.symbolCreationContext.elevationProvider=i.elevationProvider,this.symbolCreationContext.notifyGraphicGeometryChanged=e=>this.notifyGraphicGeometryChanged(e),this.symbolCreationContext.notifyGraphicVisibilityChanged=e=>this.notifyGraphicVisibilityChanged(e);const r=se(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);if(this.symbolCreationContext.featureExpressionInfoContext=await ae(r,this._spatialReference,je),f(t),this.symbolCreationContext.screenSizePerspectiveEnabled=i.screenSizePerspectiveEnabled&&this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this.symbolCreationContext.physicalBasedRenderingEnabled=!!this.owner.view.qualitySettings.physicallyBasedRenderingEnabled,"drapeSourceType"in this.owner){const{owner:e}=this;this.symbolCreationContext.drapeSourceRenderer=i.basemapTerrain.overlayManager.registerGeometryDrapeSource(e),this._handles.add(a((()=>i.basemapTerrain.overlayManager.unregisterDrapeSource(e))))}this._handles.add([_((()=>this.suspendedOrOutsideOfView),(()=>this._frameTask.reschedule((()=>this._updateLayerVisibility())))),_((()=>[this.layer?.screenSizePerspectiveEnabled,this.owner.view.screenSizePerspectiveEnabled]),(()=>{const e=i.screenSizePerspectiveEnabled&&this.layer.screenSizePerspectiveEnabled;e!==this.symbolCreationContext.screenSizePerspectiveEnabled&&(this.symbolCreationContext.screenSizePerspectiveEnabled=e,this.labeler?.reset(),this.recreateAllGraphicsAndSymbols())}),{equals:n}),_((()=>this.owner.slicePlaneEnabled),(e=>this._slicePlaneEnabledChange(!!e))),_((()=>this.owner.view.state?.pixelRatio),(()=>this._pixelRatioChange())),_((()=>this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled),(e=>this._physicalBasedRenderingChange(e))),G((()=>i.basemapTerrain?.tilingScheme),(e=>{if(e.spatialReference.equals(this.symbolCreationContext.overlaySR)||(this.symbolCreationContext.overlaySR=i.basemapTerrain.spatialReference),this._handles.has("loaded-graphics"))this.recreateAllGraphics();else{const e=()=>this.owner?.loadedGraphics;this._handles.add([w(e,"change",(e=>{this._graphicsCollectionChanged(e),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}),{onListenerAdd:()=>{this.recreateAllGraphics(),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}})],"loaded-graphics")}}),{initial:!0}),_((()=>this.effectiveUpdatePolicy),(e=>{d(this.stageLayer)&&(this.stageLayer.updatePolicy=e),this.symbolCreationContext.isAsync=this.effectiveUpdatePolicy===Se.ASYNC,e===Se.SYNC&&this.runTask(xe)}),x)]),this._frameTask=i.resourceController.scheduler.registerTask(Re.GRAPHICS_CORE,this),this.layer&&"featureReduction"in this.layer&&this._handles.add(_((()=>this.layer.featureReduction),(()=>this.deconflictor.featureReductionChange()))),this.notifyChange("averageSymbolComplexity");try{await this.rendererChange(this.layer.renderer)}catch{}f(t),this.setupAbortController=null}_abortSetup(){this.setupAbortController&&(this.setupAbortController.abort(),this.setupAbortController=null)}destroy(){this._abortSetup(),this._abortRendererChange(),this._abortElevationInfoChange(),this.owner.view.deconflictor.removeGraphicsOwner(this),this.owner.view.labeler.removeGraphicsOwner(this),this._updatingPendingLoadedGraphicsChange=y(this._updatingPendingLoadedGraphicsChange),this.clear(),this.graphicStateTracking=m(this.graphicStateTracking),this.stage&&(this.stage.remove(this.stageLayer),this.stageLayer=null,this.stage=null),this._handles=m(this._handles),this._frameTask.remove(),this._frameTask=we,this._spatialReference=null,this._set("owner",null);for(const e in this.whenGraphics3DGraphicRequests)this.whenGraphics3DGraphicRequests[e].reject(new r("graphic:layer-destroyed","Layer has been destroyed"));this.whenGraphics3DGraphicRequests=null,this.sharedSymbolResourcesOwnerHandle=y(this.sharedSymbolResourcesOwnerHandle),this.propertiesPool=m(this.propertiesPool),this.pendingUpdatesPool=null,this.symbolConversionCache.clear(),this.objectIdInvisibleSet.clear(),this._spatialIndex=m(this._spatialIndex),this._set("featureStore",m(this.featureStore))}clear(){this.objectStates?.allGraphicsDeleted(),d(this.graphicStateTracking)&&this.graphicStateTracking.allGraphicsDeleted(),this.graphics3DGraphics.forEach((e=>e.destroy())),this._spatialIndex?.clear(),this.graphics3DGraphics.clear(),this.numberOfGraphics=0,this._usedMemory=0,this._updateLayerVisibility(),this.symbols.forEach(m),this.symbols.clear(),this.graphicsBySymbol.clear(),this.graphicsWithoutSymbol.clear(),this.graphicsWaitingForSymbol.clear(),this.pendingUpdates.clear(),this.pendingUpdatesPool.clear(),this.pendingAdds=0,this.pendingRemoves=0,this.notifyChange("updating"),this.notifyChange("running"),this.notifyChange("updatingRemaining"),this.featureStore.events.emit("changed")}_initializeStage(e,t){this.stage=e._stage,this.stageLayer=new Ge({isPickable:!this.suspendedOrOutsideOfView,updatePolicy:this.effectiveUpdatePolicy},t),this.stage.add(this.stageLayer);const i=this.stageLayer.events;i.on("objectTransformation",(e=>this.notifyGraphicGeometryChanged(e.metadata.graphicUid))),i.on("visibilityChanged",(e=>this.notifyGraphicVisibilityChanged(e.metadata.graphicUid))),i.on("objectGeometryAdded",(e=>this.notifyGraphicGeometryChanged(e.object.metadata.graphicUid))),i.on("objectGeometryRemoved",(e=>this.notifyGraphicGeometryChanged(e.object.metadata.graphicUid))),i.on("vertexAttrsUpdated",(e=>this.notifyGraphicGeometryChanged(e.object.metadata.graphicUid)))}notifyGraphicGeometryChanged(e){if(c(this.graphicStateTracking)||c(e))return;const t=this.graphics3DGraphics.get(e);t&&this.graphicStateTracking.updateGraphicGeometry(t)}notifyGraphicVisibilityChanged(e){if(c(this.graphicStateTracking)||c(e))return;const t=this.graphics3DGraphics.get(e);t&&this.graphicStateTracking.updateGraphicVisibility(t)}_updateLayerVisibility(){const e=this.displayFeatureLimit.maximumNumberOfFeatures,t=this.numberOfGraphics>e*ke,i=!this.suspendedOrOutsideOfView&&!t;i!==this._visible&&(this._visible=i,i?(this.stageLayer.isPickable=!0,this.updateAllGraphicsVisibility()):(this.stageLayer.isPickable=!1,this._hideAllGraphics()),this._updateStageLayerVisibility())}_updateStageLayerVisibility(){this.stageLayer.isVisible=this._visible&&(null==this.layer.opacity||this.layer.opacity>0)}getGraphics3DGraphicById(e){return this.graphics3DGraphics.get(e)}getGraphics3DGraphicByObjectId(e){return this.owner.layer?.objectIdField?this._findGraphics3DGraphicByObjectId(e):null}_getGraphicObjectID(e,t=this.owner.layer&&this.owner.layer.objectIdField){return H(e,t)}get graphics3DGraphicsByObjectID(){const e=this.owner.layer&&this.owner.layer.objectIdField;if(!e)return null;const t=new Map;return this.graphics3DGraphics.forEach((i=>{if(!i)return;const r=i.graphic,s=this._getGraphicObjectID(r,e);d(s)&&t.set(s,i)})),t}get labelsEnabled(){return!(!this.labeler||!this.labeler.layerLabelsEnabled())}async updateLabelingInfo(e){const t=this.deconflictor&&this.deconflictor.labelingInfoChange(e),i=this.labeler&&this.labeler.labelingInfoChange(e);await v([t,i])}updateVisibilityInfo(){this.deconflictor&&this.deconflictor.labelingInfoChange(),this.labeler&&this.labeler.visibilityInfoChange()}get symbolUpdateType(){if(this.pendingUpdates.size>0)return"unknown";let e=0,t=0;return l(this.symbols,((i,r)=>{if(d(i)){const s=i.getFastUpdateStatus();if(s.loading>0)return!0;this.graphicsBySymbol.has(r)&&(t+=s.fast,e+=s.slow)}return!1}))?"unknown":t>=0&&0===e?"fast":e>=0&&0===t?"slow":"mixed"}runTask(e){this._frameTask.processQueue(e),this._applyPendingUpdates(e),this.notifyChange("running"),this.running||this.notifyChange("updating"),this.notifyChange("updatingRemaining")}setObjectIdVisibility(e,t){t?this.objectIdInvisibleSet.delete(e):this.objectIdInvisibleSet.add(e);const i=this._findGraphics3DGraphicByObjectId(e);d(i)&&this._updateUserVisibility(i)}_findGraphics3DGraphicByObjectId(e){return h(this.graphics3DGraphics,(t=>this._getGraphicObjectID(t.graphic)===e))}_updateUserVisibility(e){if(c(e))return!1;const t=e.graphic,i=this._getGraphicObjectID(t),r=t.visible&&!this.owner.suspended&&(c(i)||!this.objectIdInvisibleSet.has(i));return e.setVisibilityFlag(ie.USER_SETTING,r,re.GRAPHIC)}_whenGraphics3DGraphic(e){const t=this.graphics3DGraphics.get(e.uid);if(t)return Promise.resolve(t);const i=this.whenGraphics3DGraphicRequests[e.uid];if(i)return i.promise;const r=C();return this.whenGraphics3DGraphicRequests[e.uid]=r,r.promise}async _boundsForGraphics3DGraphic(e,t){const i=this._spatialReference,r=this.owner.view.renderSpatialReference,s=this.owner.view.basemapTerrain.spatialReference,a=(e,t,s)=>k(e,r,t,e,i,t,s),n=(e,t,r)=>k(e,s,t,e,i,t,r),o=this.viewElevationProvider?{service:this.viewElevationProvider,useViewElevation:d(t)&&t.useViewElevation,minDemResolution:d(t)&&t.minDemResolution,minDemResolutionForPoints:this.owner.view.resolution}:null,l=await e.getProjectedBoundingBox(a,n,o,g(t,"signal"));if(!l)return null;const h=l.boundingBox;if(l.requiresDrapedElevation){const e=this.symbolCreationContext.elevationProvider;if(e){W(h,Ae);const t=p(e.getElevation(Ae[0],Ae[1],0,i,"ground"),0);h[2]=Math.min(h[2],t),h[5]=Math.max(h[5],t)}}return{boundingBox:h,screenSpaceObjects:l.screenSpaceObjects}}async whenGraphicBounds(e,t){await R((()=>this.owner?.loadedGraphics));const i=this.owner.layer&&this.owner.layer.objectIdField,s=this.owner.loadedGraphics.find((t=>t===e||i&&t.attributes&&e.attributes&&t.attributes[i]===e.attributes[i]));if(!s)throw new r("internal:graphic-not-part-of-view","Graphic is not part of this view");const a=await this._whenGraphics3DGraphic(s);return this._boundsForGraphics3DGraphic(a,t)}computeAttachmentOrigin(e,t){const i=this.graphics3DGraphics.get(e.uid);if(!i)return null;const r=i.computeAttachmentOrigin();if(0===r.render.num&&0===r.draped.num)return null;O(Me,0,0,0);let s=0;if(r.render.num>0){if(!V(r.render.origin,this.symbolCreationContext.renderCoordsHelper.spatialReference,We,t))return null;A(Me,Me,We),s++}if(r.draped.num>0){const[e,i]=r.draped.origin,a=p(this.viewElevationProvider.getElevation(e,i,"ground"),0);if(O(We,e,i,a),!V(We,this.viewElevationProvider.spatialReference,We,t))return null;A(Me,Me,We),s++}return s>1&&L(Me,Me,1/s),new De({x:Me[0],y:Me[1],z:Me[2],spatialReference:t})}getSymbolLayerSize(e,t){const i=this.symbols.get(e.id);if(c(i))throw new r("internal:symbol-not-part-of-view","Symbol is not part of this view");const s=e.symbolLayers.indexOf(t);if(-1===s)throw new r("internal:missing-symbol-layer","Symbol layer is not in symbol");const a=i.getSymbolLayerSize(s);if(null==a)throw new r("internal:missing-size","Symbol layer has no valid size");return a}_graphicsCollectionChanged(e){this._startCreateGraphics&&(this.add(e.added),this.remove(e.removed))}graphicUpdateHandler(e){const t=e.graphic.uid,i=this.graphics3DGraphics.get(t);if(!c(i)||!c(this.graphicsWithoutSymbol.get(t)))switch(e.property){case"visible":this._graphicUpdateVisibleHandler(i);break;case"geometry":this._graphicUpdateGeometryHandler(i,e);break;case"symbol":this._graphicUpdateSymbolHandler(i,e);break;case"attributes":break;case"transform":this._graphicUpdateTransformHandler(i,e)}}_graphicUpdateGeometryHandler(e,t){const i=t.graphic.geometry;if(c(i))return void this._recreateGraphic(t.graphic);if(c(e)){const e=t.graphic.symbol&&t.graphic.symbol.id;if(e){const t=this.symbols.get(e);if(d(t)&&t.loadStatus===me.LOADING)return}return void this._recreateGraphic(t.graphic)}const r=e.graphics3DSymbol;!c(t.newValue)&&r.updateGeometry(e,t.newValue)||this._recreateGraphic(e.graphic),this._expandComputedExtent(i)}_graphicUpdateSymbolHandler(e,t){const i=t.graphic,r=d(e)?e.graphics3DSymbol:d(t.oldValue)?this.symbols.get(t.oldValue.id):null;if(c(r)||c(t.newValue))return void this._recreateGraphic(i);const s=r.symbol,a=this._getConvertedSymbol(t.newValue);if(d(a)&&(a.type!==s.type||"web-style"===a.type)||"web-style"===s.type)return void this._recreateGraphic(i);const n=this.graphicsBySymbol.get(s.id);if(n&&1!==n.size)return void this._recreateGraphic(i);const o=I(s,a);if(c(o))return void this._updateSymbolMapping(s.id,a);const l={diff:o,graphics3DGraphicPatches:[],symbolStatePatches:[]};if(r.prepareSymbolPatch(l),!U(l.diff))return void this._recreateGraphic(i);const h=this._getRenderingInfo(i);if(c(h))return void this._recreateGraphic(i);const p=r.extentPadding;for(const d of l.symbolStatePatches)d();if(p!==r.extentPadding&&this._recomputeExtentPadding(),d(e))for(const d of l.graphics3DGraphicPatches)d(e,h);this._updateSymbolMapping(s.id,a)}_graphicUpdateVisibleHandler(e){this._updateUserVisibility(e)&&(this.labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty())}_graphicUpdateTransformHandler(e,t){}recreateGraphics(e){this.suspendSymbolCleanup=!0,this.remove(e),this.add(e),this.suspendSymbolCleanup=!1,this.effectiveUpdatePolicy===Se.SYNC&&this._cleanupSymbols()}_recreateGraphic(e){this.recreateGraphics([e])}_beginGraphicUpdate(e){const t=this.graphicsUpdateId;return this.graphicsUpdateId++,this.graphicsWaitingForSymbol.set(e.uid,t),1===this.graphicsWaitingForSymbol.size&&this.notifyChange("updating"),t}_endGraphicUpdate(e){e&&(this.graphicsWaitingForSymbol.delete(e.uid),0===this.graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("updating")))}_recomputeExtentPadding(){let e=0;this.symbols.forEach((t=>{d(t)&&(e=Math.max(e,t.extentPadding))})),this._set("extentPadding",e)}_expandComputedExtent(e){const t=Le,i=e.spatialReference;Y(e,t);const r=this._spatialReference,s=Oe.tmpVec;if(i.equals(r)||F(t[0],t[1],0,i,s,r)&&(t[0]=s[0],t[1]=s[1],F(t[3],t[4],0,i,s,r),t[3]=s[0],t[4]=s[1]),!(isFinite(t[0])&&isFinite(t[3])&&isFinite(t[1])&&isFinite(t[4])))return;const a=this.computedExtent;let n=null;const o=isFinite(t[2])&&isFinite(t[5]),l=o&&(!a||null==a.zmin||t[2]<a.zmin),h=o&&(!a||null==a.zmax||t[5]>a.zmax);if(a){(t[0]<a.xmin||t[1]<a.ymin||t[3]>a.xmax||t[4]>a.ymax||l||h)&&(n=this.propertiesPool.get("computedExtent"),n.xmin=Math.min(t[0],a.xmin),n.ymin=Math.min(t[1],a.ymin),n.xmax=Math.max(t[3],a.xmax),n.ymax=Math.max(t[4],a.ymax),n.spatialReference=r)}else n=this.propertiesPool.get("computedExtent"),n.xmin=t[0],n.ymin=t[1],n.xmax=t[3],n.ymax=t[4],n.spatialReference=r;n&&(l&&(n.zmin=t[2]),h&&(n.zmax=t[5]),this._set("computedExtent",n))}_abortElevationInfoChange(){this.elevationInfoChangeAbortController&&(this.elevationInfoChangeAbortController.abort(),this.elevationInfoChangeAbortController=null)}async elevationInfoChange(){this._abortElevationInfoChange();const e=new AbortController;this.elevationInfoChangeAbortController=e;const t=se(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);this.symbolCreationContext.featureExpressionInfoContext=await ae(t,this._spatialReference,je),f(e),this.elevationInfoChangeAbortController=null,this.labeler?.elevationInfoChange(),this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("elevationInfo",t)?t.forEach((e=>{const t=e.graphic,i=e.labelGraphics;for(const r of i){r.graphics3DSymbolLayer.updateGraphicElevationContext(t,r)}})):this._recreateSymbol(i)})),this.updateStageLayerElevationProvider(),this.elevationAlignment?.elevationInfoChange()}updateStageLayerElevationProvider(){this.stageLayerElevationProvider?(this.layer.elevationInfo&&"relative-to-scene"===this.layer.elevationInfo.mode||0===this.numberOfGraphicsProvidingElevation)&&(this.owner.view.elevationProvider.unregister(this.stageLayerElevationProvider),this.stageLayerElevationProvider.dispose(),this.stageLayerElevationProvider=null):(!this.layer.elevationInfo||this.layer.elevationInfo&&"relative-to-scene"!==this.layer.elevationInfo.mode)&&this.numberOfGraphicsProvidingElevation>0&&(this.stageLayerElevationProvider=new fe({layer:this.layer,stageLayer:this.stageLayer,view:this.owner.view}),this.owner.view.elevationProvider.register("scene",this.stageLayerElevationProvider))}_clearSymbolsAndGraphics(){this.clear(),this.filterVisibility?.clear(),this.labeler?.reset(),this.deconflictor?.clear(),this.elevationAlignment?.clear(),this.stageLayer?.invalidateSpatialQueryAccelerator(),this.stageLayerElevationProvider&&(this.owner.view.elevationProvider.unregister(this.stageLayerElevationProvider),this.stageLayerElevationProvider.dispose(),this.stageLayerElevationProvider=null)}startCreateGraphics(){this._startCreateGraphics=!0,this.recreateAllGraphics()}recreateAllGraphics(){this._recreateAllGraphics(!1)}recreateAllGraphicsAndSymbols(){this._recreateAllGraphics(!0)}_recreateAllGraphics(e=!1){if(!this._startCreateGraphics)return;const{loadedGraphics:t,view:i}=this.owner,r=i.basemapTerrain.tilingScheme&&t&&t.length?t.toArray():null;!e&&r||this._clearSymbolsAndGraphics(),this.symbolCreationContext.screenSizePerspectiveEnabled=this.owner.view.screenSizePerspectiveEnabled&&this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this._set("computedExtent",null),r&&(e?this.add(r):this.recreateGraphics(r))}_recreateSymbol(e){const t=this.graphicsBySymbol.get(e),i=[];t&&(t.forEach(((e,t)=>{const r=e.usedMemory;this._conditionalRemove(e,t),this._spatialIndex?.remove(e),i.push(e.graphic),e.destroy(),this._removeGraphics3DGraphic(t,r),this._updateLayerVisibility(),this.featureStore.events.emit("changed")})),this.graphicsBySymbol.set(e,new Map));const r=this.symbols.get(e);m(r),this.symbols.delete(e),this.add(i)}_recreateGraphicsForSymbol(e){const t=this.graphicsBySymbol.get(e);if(t){const e=[];t.forEach((t=>e.push(t.graphic))),this.recreateGraphics(e)}}_conditionalRemove(e,t){this.graphicsDrapedUids.delete(t),this.objectStates?.removeGraphic(e),this.labeler?.removeGraphic(e),this.deconflictor?.removeGraphic(e),d(this.graphicStateTracking)&&this.graphicStateTracking.removeGraphic(e)}add(e){e&&0!==e.length&&(this.owner.view.basemapTerrain&&this.owner.view.basemapTerrain.tilingScheme?(this._updatePolicyForGraphics(e)===Se.ASYNC?this._addDelayed(e):this._addImmediate(e),this.notifyChange("updating")):je.error("#add()","Cannot add graphics before terrain surface has been initialized"))}_updatePolicyForGraphics(e){if(this.effectiveUpdatePolicy===Se.SYNC&&("mesh"===this.layer.geometryType||null==this.layer.geometryType))for(const t of e)if(d(t.geometry)&&"mesh"===t.geometry.type&&!t.geometry.loaded)return Se.ASYNC;return this.effectiveUpdatePolicy}_addImmediate(e){this.geometryWarningLogged=!1,this.symbolWarningLogged=!1;for(const t of e)this._addGraphic(t,this._getRenderingInfo(t,je),Se.SYNC);this._cleanupSymbols(),this.labeler&&(this.owner.view.labeler.setDirty(),this._cleanupSymbols()),this.owner.view.deconflictor.setDirty()}_addDelayed(e){for(const t of e){const e=t.uid;let i=this.pendingUpdates.get(e);i?i.add?i.state!==Fe.NEW&&i.abortController.abort():this.pendingAdds++:(i=this.pendingUpdatesPool.pushNew(),this.pendingAdds++,this.pendingUpdates.set(e,i)),i.add=t}this.notifyChange("running"),this.notifyChange("updatingRemaining")}remove(e){this.effectiveUpdatePolicy===Se.ASYNC?this._removeDelayed(e):this._removeImmediate(e),this.notifyChange("updating")}_removeImmediate(e){for(const t of e)this._removeGraphic(t);this._cleanupSymbols(),this.labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty()}_removeDelayed(e){for(const t of e){const e=t.uid,i=this.pendingUpdates.get(e);if(i)i.add&&(i.remove?i.add=null:this.pendingUpdates.delete(e),i.state===Fe.LOADING&&i.abortController.abort(),this.pendingAdds--);else{const i=this.pendingUpdatesPool.pushNew();i.remove=t,this.pendingUpdates.set(e,i),this.pendingRemoves++}}0===this.pendingUpdates.size&&this._finishPendingUpdates(),this.notifyChange("running"),this.notifyChange("updatingRemaining")}_finishPendingUpdates(){this.pendingUpdatesPool.clear(),this._cleanupSymbols(),(this.pendingAdds||this.pendingRemoves)&&je.warn("pendingAdds/Removes in inconsistent state!"),this.pendingAdds=0,this.pendingRemoves=0}_applyPendingUpdates(e){if(this.geometryWarningLogged=!1,this.symbolWarningLogged=!1,0===this.pendingUpdates.size&&this._spatialIndex?.updating)this._spatialIndex.update();else{for(const[t,i]of this.pendingUpdates){if(e.done)break;i.add&&i.state===Fe.NEW&&this._processPendingUpdateNew(i);let r=this.effectiveUpdatePolicy;if(!i.remove||i.add&&i.state!==Fe.READY||(this.pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,r=Se.SYNC),i.add)switch(i.state){case Fe.READY:this._addGraphic(i.add,i.renderingInfo,r),i.add=null,this.pendingAdds--,e.madeProgress();break;case Fe.REJECTED:i.add=null,this.pendingAdds--;case Fe.LOADING:}null==i.remove&&null==i.add&&this.pendingUpdates.delete(t)}0===this.pendingUpdates.size&&(this._finishPendingUpdates(),this.notifyChange("running"))}}_processPendingUpdateNew(e){if(!e.add)return void(e.state=Fe.READY);const t=e.add.geometry;d(t)&&"mesh"===t.type&&!t.loaded?this._processPendingUpdateNewMesh(e,t):this._processPendingUpdateNewRenderingInfo(e)}async _processPendingUpdateNewMesh(e,t){e.state=Fe.LOADING,e.abortController=new AbortController;const i=e.abortController.signal;try{await t.load({signal:i})}catch(r){return this._processPendingUpdateNewError(e,r)}e.abortController=null,this._processPendingUpdateNewRenderingInfo(e)}_processPendingUpdateNewError(e,t){e.abortController=null,S(t)?e.state=Fe.NEW:e.state=Fe.REJECTED}async _processPendingUpdateNewRenderingInfo(e){if(c(this.layer.renderer)||"dictionary"!==this.layer.renderer.type)return e.renderingInfo=this._getRenderingInfo(e.add,je),void(e.state=Fe.READY);e.state=Fe.LOADING,e.abortController=new AbortController;let t=null;try{t=await this._getRenderingInfoAsync(e.add,{signal:e.abortController.signal})}catch(i){return e.abortController=null,void(S(i)?e.state=Fe.NEW:e.state=Fe.REJECTED)}c(t)||c(t.symbol)?(je&&!this.symbolWarningLogged&&(this.symbolWarningLogged=!0,je.warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),e.renderingInfo=null):e.renderingInfo=t,e.state=Fe.READY}_addGraphic(e,t,i){if(this.graphicsWithoutSymbol.set(e.uid,e),c(t)||c(t.symbol)||!$(e))return;const r=t.symbol,s=this.getOrCreateGraphics3DSymbol(r,t.renderer);if(c(s))return;this._expandComputedExtent(e.geometry);const a=this._beginGraphicUpdate(e),n=new oe(e,t,this.layer);let o=!1;const l=e=>{e===s.symbol.id&&(o=!0)};this._whenSymbolRemoved.push(l);const h=()=>{if(--this._loadingSymbols,this.destroyed)return;this._whenSymbolRemoved.removeUnordered(l);if(this.graphicsWaitingForSymbol.get(e.uid)!==a||o||s.destroyed||this.graphicSymbolSupported&&e.symbol&&e.symbol.id!==s.symbol.id)--s.referenced,this._cleanupSymbols();else{const t=this._createGraphics3DGraphic(s,n);this._spatialIndex&&d(t)&&this._spatialIndex.add(t),--s.referenced,this._endGraphicUpdate(e)}this.featureStore.events.emit("changed"),this.labeler&&this.owner.view.labeler.setDirty()},p=t=>{--this._loadingSymbols,this.destroyed||(this._whenSymbolRemoved.removeUnordered(l),o||(S(t)?this.add([e]):s.destroyed||this._endGraphicUpdate(e)))};++this._loadingSymbols,i===Se.ASYNC?s.load((()=>this._frameTask.schedule(h)),(e=>this._frameTask.schedule((()=>p(e))))):s.load(h,p)}_removeGraphic(e){const t=e.uid,i=this.graphics3DGraphics.get(t);if(i){i.graphics3DSymbol.onRemoveGraphic(i);const e=i.usedMemory,r=i.isElevationSource;this._conditionalRemove(i,t),this._spatialIndex?.remove(i);const s=i.graphics3DSymbol.symbol.id;this.graphicsBySymbol.get(s).delete(t),this.graphicsWithoutSymbol.delete(t),this._removeGraphics3DGraphic(t,e,r),i.destroy(),this.featureStore.events.emit("changed")}else this.graphicsWithoutSymbol.delete(t),this.graphicsWaitingForSymbol.delete(t),0===this.graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("updating"))}_hasLabelingContext(e){if(e instanceof Ee||e instanceof Ie){const t=this.symbolCreationContext.layer;return!!t.labelingInfo&&t.labelingInfo.some((t=>t.symbol===e))}return!1}_hasValidSymbolCreationContext(e){return!(e instanceof Ee&&!this._hasLabelingContext(e))||(je.error("LabelSymbol3D is only valid as part of a LabelClass. Using LabelSymbol3D as a renderer symbol is not supported."),!1)}_getRenderingInfo(e,t){const i=e.geometry;if(c(i))return t&&!this.geometryWarningLogged&&(this.geometryWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!T(i.spatialReference,this._spatialReference))return t&&!this.geometryWarningLogged&&(this.geometryWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} has incompatible spatial reference and will not render`)),null;if(!this.graphicSymbolSupported&&d(e.symbol))return t&&!this.symbolWarningLogged&&(this.symbolWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?Z(e,this.layer):e;let s;if(this.owner.getRenderingInfo&&(this.getRenderingInfoWithoutRenderer||d(this.currentRenderer)))s=this.owner.getRenderingInfo(r,this.currentRenderer,u(this.arcadeOnDemand));else{s={symbol:r.symbol||X(r.geometry)}}return c(s)||c(s.symbol)?(t&&!this.symbolWarningLogged&&(this.symbolWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),null):s}_getRenderingInfoAsync(e,t){const i=e.geometry;if(c(i))return je&&!this.geometryWarningLogged&&(this.geometryWarningLogged=!0,je.warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!this.graphicSymbolSupported&&d(e.symbol))return je&&!this.symbolWarningLogged&&(this.symbolWarningLogged=!0,je.warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?Z(e,this.layer):e;return this.owner.getRenderingInfoAsync(r,u(this.currentRenderer),u(this.arcadeOnDemand),t)}_createGraphics3DSymbol(e,t){if(!this._hasValidSymbolCreationContext(e))return null;const i=this._getConvertedSymbol(e);if(!i)return null;let r;if(d(t)&&"backgroundFillSymbol"in t&&t.backgroundFillSymbol){const e=ee(t.backgroundFillSymbol,{ignoreDrivers:!0});d(e.symbol)&&"web-style"!==e.symbol.type&&"cim"!==e.symbol.type&&(r=e.symbol.symbolLayers)}const s=he(i,this.symbolCreationContext,r);return s.load((()=>{const e=s.extentPadding;e>this.extentPadding&&this._set("extentPadding",e),this.notifyChange("averageSymbolComplexity")}),(()=>{})),s}getOrCreateGraphics3DSymbol(e,t){let i=this.symbols.get(e.id);return void 0===i&&(i=e instanceof Ue?new de(e,(e=>this._frameTask.schedule(e)),(e=>this._createGraphics3DSymbol(e,t))):this._createGraphics3DSymbol(e,t),this.symbols.set(e.id,i)),d(i)&&++i.referenced,i}trackGraphicState(e){return c(this.graphicStateTracking)&&(this.graphicStateTracking=new pe(this)),this.graphicStateTracking.add(e)}_addGraphics3DGraphic(e){this._usedMemory+=e.usedMemory,this.graphics3DGraphics.set(e.graphic.uid,e),this.numberOfGraphics++,e.isElevationSource&&(this.numberOfGraphicsProvidingElevation++,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_removeGraphics3DGraphic(e,t,i=!1){this._usedMemory-=t,this.graphics3DGraphics.delete(e),this.numberOfGraphics--,i&&(this.numberOfGraphicsProvidingElevation--,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_createGraphics3DGraphic(e,t){const i=t.graphic;if(this.graphicsWithoutSymbol.delete(i.uid),!this.symbols.has(e.symbol.id))return this.add([i]),null;if(this.graphics3DGraphics.has(i.uid))return null;const r=e.createGraphics3DGraphic(t);if(c(r))return null;this._addGraphics3DGraphic(r);const s=e.symbol.id;this.graphicsBySymbol.has(s)||this.graphicsBySymbol.set(s,new Map),this.graphicsBySymbol.get(s).set(i.uid,r);r.isDraped&&this.graphicsDrapedUids.add(i.uid),r.centroid=null,d(i.geometry)&&"point"!==i.geometry.type&&(r.centroid=ce(i.geometry,this._spatialReference)),this._updateUserVisibility(r),d(this.scaleVisibility)&&this.scaleVisibility.updateVisibility(r),this.filterVisibility?.updateVisibility(r),this.deconflictor?.addGraphic(r),this.labeler?.addGraphic(r),this.objectStates?.addGraphic(r),this.deconflictor&&this.owner.view.deconflictor.setInitialIconVisibilityFlag(this,r),r.initialize(this.stage,this.stageLayer,this.owner),d(this.graphicStateTracking)&&this.graphicStateTracking.addGraphic(r);const a=this.whenGraphics3DGraphicRequests[i.uid];return a&&(delete this.whenGraphics3DGraphicRequests[i.uid],a.resolve(r)),r}_abortRendererChange(){this.rendererChangeAbortController&&(this.rendererChangeAbortController.abort(),this.rendererChangeAbortController=null)}async rendererChange(e){if(this._abortRendererChange(),e!==this.currentRenderer)if(this._validateRenderer(e),c(e)&&this._currentRendererChange(null,!1),J(e))if(d(e)&&e.arcadeRequired){const t=new AbortController;this.rendererChangeAbortController=t;const{arcadeUtils:i}=await this._ensureArcade();f(t),i.hasGeometryOperations(e)&&(await i.enableGeometryOperations(),f(t)),this.effectiveUpdatePolicy===Se.ASYNC?await this._frameTask.schedule((()=>this._currentRendererChange(e,!0)),t.signal):this._currentRendererChange(e,!0),this.rendererChangeAbortController=null}else if(this.effectiveUpdatePolicy===Se.ASYNC){const t=new AbortController;this.rendererChangeAbortController=t,await this._frameTask.schedule((()=>this._currentRendererChange(e,!1)),t.signal),this.rendererChangeAbortController=null}else this._currentRendererChange(e,!1);else this._currentRendererChange(e,!1)}async _ensureArcade(){return c(this.arcadeOnDemand)?(this.arcadeOnDemand=await K(),this.arcadeOnDemand):this.arcadeOnDemand}_currentRendererChange(e,t){this.currentRenderer=e,this.rendererHasGeometryOperations=t,this.symbolCreationContext.arcade=u(this.arcadeOnDemand);const i=this.symbolCreationContext.renderer;if(e===i)return;if(this.symbolConversionCache.clear(),c(e))return this.symbolCreationContext.renderer=null,void this.recreateAllGraphicsAndSymbols();const r=I(i,e);this._updateUnchangedSymbolMappings(r,e,i),this.symbolCreationContext.renderer=e,c(r)||("complete"===r.type?this.recreateAllGraphicsAndSymbols():"partial"===r.type&&(this._applyRendererDiff(r,e,i)?this._volatileGraphicsUpdated():this.recreateAllGraphicsAndSymbols()),this.notifyChange("averageSymbolComplexity"))}_diffHasSymbolChange(e){for(const t in e.diff)switch(t){case"visualVariables":case"defaultSymbol":case"uniqueValueInfos":break;case"authoringInfo":case"fieldDelimiter":delete e.diff[t];break;default:return!0}return!1}_applySymbolSetDiff(e,t,i){e=e||[],t=t||[];const r=[];for(const s of t){const t=this.graphicsBySymbol.get(s.id);t&&t.forEach(((a,n)=>{const o=a.graphic,l=this.layer instanceof q?this.layer:null,h=u(this.arcadeOnDemand);if(s===i.defaultSymbol&&i.getSymbol(Z(o,l),{arcade:h})===i.defaultSymbol)return;const d=a.usedMemory;e.length||i.defaultSymbol?r.push(o):this.graphicsWithoutSymbol.set(n,o);const p=this.graphics3DGraphics.get(n);this._conditionalRemove(p,n),a.destroy(),t.delete(n),this._removeGraphics3DGraphic(n,d),this._updateLayerVisibility()})),this._whenSymbolRemoved.forAll((e=>e(s.id)))}(e.length||r.length)&&(this.graphicsWithoutSymbol.forEach((e=>r.push(e))),this.graphicsWithoutSymbol.clear(),this.add(r)),this._cleanupSymbols(),this.labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty()}_applyUniqueValueRendererDiff(e,t,i){const r=e.diff.defaultSymbol,s=e.diff.uniqueValueInfos;if(r||s){const a=s?s.added.map((e=>e.symbol)):[],n=s?s.removed.map((e=>e.symbol)):[];if(s)for(let e=0;e<s.changed.length;e++)a.push(s.changed[e].newValue.symbol),n.push(s.changed[e].oldValue.symbol);return r?(i.defaultSymbol&&n.push(i.defaultSymbol),t.defaultSymbol&&a.push(t.defaultSymbol)):i.defaultSymbol&&a.length&&n.push(t.defaultSymbol),this._applySymbolSetDiff(a,n,t),delete e.diff.defaultSymbol,delete e.diff.uniqueValueInfos,!0}return!1}_calculateUnchangedSymbolMapping(e,t,i){if("unique-value"!==t?.type||"unique-value"!==i?.type||d(e)&&"partial"!==e.type)return[];const r=e=>d(e)?e.id:null,s=e&&e.diff,a=s&&s.defaultSymbol,n=s&&s.uniqueValueInfos;let o;if(n)o=n.unchanged.map((e=>({oldId:r(e.oldValue.symbol),newId:r(e.newValue.symbol)})));else{o=[];for(const e of i.uniqueValueInfos){const i=r(e.symbol),s=t.uniqueValueInfos.find((t=>t.value===e.value));s&&i!==r(s.symbol)&&o.push({oldId:i,newId:r(s.symbol)})}}return!a&&i.defaultSymbol&&o.push({oldId:r(i.defaultSymbol),newId:r(t.defaultSymbol)}),o}_updateSymbolMapping(e,t){const i=d(t)&&t?"string"==typeof t?t:t.id:null;if(!e||e===i)return;const r=this.graphicsBySymbol.get(e);this.graphicsBySymbol.delete(e),void 0!==r&&this.graphicsBySymbol.set(i,r);const s=this.symbols.get(e);if(void 0!==s&&(this.symbols.delete(e),this.symbols.set(i,s),d(s))){const e="string"==typeof t?null:t;d(e)?s.symbol=e:s.symbol.id=i}}_updateUnchangedSymbolMappings(e,t,i){const r=this._calculateUnchangedSymbolMapping(e,t,i);for(const{oldId:s,newId:a}of r)this._updateSymbolMapping(s,a)}_applyRendererDiff(e,i,r){if(this._diffHasSymbolChange(e))return!1;if(i instanceof t&&r instanceof t&&this._applyUniqueValueRendererDiff(e,i,r)&&0===Object.keys(e.diff).length)return!0;for(const[t]of this.graphicsBySymbol){const r=this.symbols.get(t);if(d(r))switch(r.applyRendererDiff(e,i)){case ye.Recreate_Symbol:this._recreateSymbol(t);break;case ye.Recreate_Graphics:this._recreateGraphicsForSymbol(t);case ye.Fast_Update:}}return!0}opacityChange(){this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("opacity",t))),this._updateStageLayerVisibility()}_slicePlaneEnabledChange(e){e!==this.symbolCreationContext.slicePlaneEnabled&&(this.symbolCreationContext.slicePlaneEnabled=e,this.stageLayer.isSliceable=e,this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("slicePlaneEnabled",t))),this.deconflictor&&this.deconflictor.slicePlaneEnabledChange(),this.labeler&&this.labeler.slicePlaneEnabledChange())}_physicalBasedRenderingChange(e){e!==this.symbolCreationContext.physicalBasedRenderingEnabled&&(this.symbolCreationContext.physicalBasedRenderingEnabled=e,this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("physicalBasedRenderingEnabled",t)||this._recreateSymbol(i)})))}_pixelRatioChange(){this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("pixelRatio",t)||this._recreateSymbol(i)}))}_signalUpdatingDuringAsyncLoadedGraphicsChange(){this._updatingPendingLoadedGraphicsChange&&this._updatingPendingLoadedGraphicsChange.remove(),this._updatingPendingLoadedGraphicsChange=P((()=>{this._updatingPendingLoadedGraphicsChange=null}))}setClippingExtent(e,t){const i=this.symbolCreationContext.clippingExtent,r=B();return ve(e,r,t)?this.symbolCreationContext.clippingExtent=N(M(),r):this.symbolCreationContext.clippingExtent=null,!z(this.symbolCreationContext.clippingExtent,i)}modifyGraphics3DGraphicVisibilities(e){let t=!1;this.graphics3DGraphics.forEach((i=>{e(i)&&(t=!0)})),t&&(this.labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty())}forEachGraphics3DSymbol(e){for(const[t,i]of this.symbols){if(c(i))return;e(i,this.graphicsBySymbol.get(t)||Ne,t)}}updateAllGraphicsVisibility(){this.filterVisibility&&(this.filterVisibility.dirty=!0),this.modifyGraphics3DGraphicVisibilities((e=>{const t=this._updateUserVisibility(e),i=d(this.scaleVisibility)&&this.scaleVisibility.updateVisibility(e);return t||i}))}_hideAllGraphics(){this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(ie.USER_SETTING,!1,re.GRAPHIC)))}_validateRenderer(e){const t=Q(e);if(t){const e=`Renderer for layer '${this.layer.title?`${this.layer.title}, `:""}, id:${this.layer.id}' is not supported in a SceneView`;je.warn(e,t.message)}}_volatileGraphicsUpdated(){this.labeler?.reset(),this.stageLayer.shaderTransformationChanged(),this.notifyChange("updating")}_cleanupSymbols(){if(this.graphicsWaitingForSymbol.size>0||this.suspendSymbolCleanup)return;let e=!1;this.symbols.forEach(((t,i)=>{if(c(t)||t.referenced>0)return;const r=this.graphicsBySymbol.get(i);r&&0!==r.size||(this.graphicsBySymbol.delete(i),this.symbols.delete(i),m(t),e=!0)})),e&&(this._recomputeExtentPadding(),this.notifyChange("averageSymbolComplexity"))}get test(){return{snapshotInternals:()=>({graphics:[...this.graphics3DGraphics.keys()].sort(),symbols:[...this.symbols.keys()].sort(),graphicsBySymbol:[...this.graphicsBySymbol.keys()].sort().map((e=>({symbolId:e,graphics:[...this.graphicsBySymbol.get(e).keys()].sort()}))),graphicsWithoutSymbol:[...this.graphicsWithoutSymbol.keys()].sort(),graphicsDrapedUids:[...this.graphicsDrapedUids].sort(),pendingUpdates:this.pendingUpdates}),symbols:this.symbols,filterVisibility:this.filterVisibility,numPending:this.pendingUpdates.size,forceUpdatePolicy:e=>{this.forcedUpdatePolicy=e}}}get performanceInfo(){return{visible:this.graphics3DGraphics.size,missing:this.graphicsWithoutSymbol.size,pending:this.pendingUpdates.size}}};var Fe;Ve.tmpVec=j(),e([D({readOnly:!0})],Ve.prototype,"computedExtent",void 0),e([D()],Ve.prototype,"currentRenderer",void 0),e([D()],Ve.prototype,"rendererHasGeometryOperations",void 0),e([D()],Ve.prototype,"_frameTask",void 0),e([D()],Ve.prototype,"rendererChangeAbortController",void 0),e([D()],Ve.prototype,"elevationInfoChangeAbortController",void 0),e([D()],Ve.prototype,"setupAbortController",void 0),e([D({readOnly:!0})],Ve.prototype,"elevationAlignment",void 0),e([D({readOnly:!0})],Ve.prototype,"scaleVisibility",void 0),e([D({readOnly:!0})],Ve.prototype,"filterVisibility",void 0),e([D()],Ve.prototype,"_spatialIndex",void 0),e([D({readOnly:!0})],Ve.prototype,"extentPadding",void 0),e([D()],Ve.prototype,"_updatingPendingLoadedGraphicsChange",void 0),e([D({readOnly:!0})],Ve.prototype,"featureStore",void 0),e([D({readOnly:!0})],Ve.prototype,"deconflictor",void 0),e([D({readOnly:!0})],Ve.prototype,"labeler",void 0),e([D({readOnly:!0})],Ve.prototype,"objectStates",void 0),e([D()],Ve.prototype,"_loadingSymbols",void 0),e([D()],Ve.prototype,"preferredUpdatePolicy",void 0),e([D()],Ve.prototype,"forcedUpdatePolicy",void 0),e([D({readOnly:!0})],Ve.prototype,"effectiveUpdatePolicy",null),e([D({constructOnly:!0})],Ve.prototype,"elevationFeatureExpressionEnabled",void 0),e([D({constructOnly:!0})],Ve.prototype,"owner",void 0),e([D({constructOnly:!0})],Ve.prototype,"layer",void 0),e([D({constructOnly:!0})],Ve.prototype,"graphicSymbolSupported",void 0),e([D({constructOnly:!0})],Ve.prototype,"getRenderingInfoWithoutRenderer",void 0),e([D({readOnly:!0})],Ve.prototype,"updating",null),e([D({readOnly:!0})],Ve.prototype,"running",null),e([D({readOnly:!0})],Ve.prototype,"suspendedOrOutsideOfView",null),e([D({readOnly:!0,dependsOn:[]})],Ve.prototype,"updatingRemaining",null),e([D({readOnly:!0,dependsOn:["owner.view.qualitySettings.graphics3D.maxTotalNumberOfPrimitives","owner.view.qualitySettings.graphics3D.maxTotalNumberOfFeatures","averageSymbolComplexity"]})],Ve.prototype,"displayFeatureLimit",null),e([D({readOnly:!0,dependsOn:[]})],Ve.prototype,"averageSymbolComplexity",null),e([D({constructOnly:!0})],Ve.prototype,"hasZ",void 0),e([D({constructOnly:!0})],Ve.prototype,"hasM",void 0),Ve=Oe=e([E("esri.views.3d.layers.graphics.Graphics3DCore")],Ve),function(e){e[e.NEW=0]="NEW",e[e.LOADING=1]="LOADING",e[e.READY=2]="READY",e[e.REJECTED=3]="REJECTED"}(Fe||(Fe={}));class Te{constructor(){this.add=null,this.renderingInfo=null,this.state=Fe.NEW,this.remove=null}clear(){this.add=null,this.renderingInfo=null,this.state=Fe.NEW,this.abortController=null,this.remove=null}}const ke=10,Me=j(),We=j(),Ne=new Map;export{Ve as Graphics3DCore};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Error.js";import{get as t,isSome as r,isNone as s}from"../../../../core/maybe.js";import{e as n}from"../../../../chunks/earcut.js";import{a}from"../../../../chunks/mat3.js";import{c as i}from"../../../../chunks/mat3f64.js";import{a as o}from"../../../../chunks/mat4.js";import{I as l,c}from"../../../../chunks/mat4f64.js";import{c as h,n as m,s as p,b as d,f as u,m as f}from"../../../../chunks/vec3.js";import{d as g,c as y}from"../../../../chunks/vec3f64.js";import{computeTranslationToOriginAndRotation as _}from"../../../../geometry/projection.js";import{create as b,empty as E,expandWithBuffer as x,intersectsClippingArea as P}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f64 as v}from"../../../../geometry/support/buffer/BufferView.js";import{t as S,a as w}from"../../../../chunks/vec32.js";import{getDriverAxisSizeValue as j}from"../../../../renderers/support/renderingInfoUtils.js";import{ViewingMode as A}from"../../../ViewingMode.js";import{needsElevationUpdates3D as L,evaluateElevationInfoAtPoint as M,SampleElevationInfo as O}from"./elevationAlignmentUtils.js";import{ElevationContext as B}from"./ElevationContext.js";import{Graphics3DObject3DGraphicLayer as C}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as I}from"./Graphics3DSymbolLayer.js";import{validateSymbolLayerSize as R,computeCentroid as T}from"./graphicUtils.js";import{ApplyRendererDiffResult as z}from"./interfaces.js";import{geometryAsPolygon as D,geometryToRenderInfo as G}from"./polygonUtils.js";import{createMaterial as U}from"../support/edgeUtils.js";import k from"../../support/debugFlags.js";import{SamplePosition as N}from"../../support/ElevationProvider.js";import{CullFaceOptions as F,PrimitiveType as V}from"../../webgl-engine/lib/basicInterfaces.js";import{Geometry as H}from"../../webgl-engine/lib/Geometry.js";import{Object3D as Y}from"../../webgl-engine/lib/Object3D.js";import{VertexAttribute as Z}from"../../webgl-engine/lib/VertexAttribute.js";import{DefaultMaterial as W}from"../../webgl-engine/materials/DefaultMaterial.js";const q=["polygon","extent"];class J extends I{constructor(e,t,r,s){super(e,t,r,s),this.ensureDrapedStatus(!1)}async doLoad(){if(!this._drivenProperties.size){const t=R(this._getSymbolSize());if(t)throw new e("graphics3dextrudesymbollayer:invalid-size",t)}const r=t(this.symbolLayer,"material","color"),s=this._getCombinedOpacityAndColor(r),n=g(s),a=s[3],i=a<1||this.needsDrivenTransparentPass,o={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,diffuse:n,ambient:n,opacity:a,transparent:i,cullFace:i?F.None:F.Back,hasVertexColors:!0,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:this.symbolLayer.castShadows,offsetTransparentBackfaces:!0};this._material=new W(o),this._bottomMaterial=new W({...o,cullFace:F.Back}),this._context.stage.add(this._material),this._context.stage.add(this._bottomMaterial)}destroy(){super.destroy(),this._material&&(this._context.stage.remove(this._material),this._context.stage.remove(this._bottomMaterial))}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,q,this.symbolLayer.type))return null;const r=this._getVertexOpacityAndColor(e.renderingInfo,255),s=this.setGraphicElevationContext(t,new B);return this._createAs3DShape(t,e.renderingInfo,r,s,t.uid)}layerOpacityChanged(e,s){const n=t(this.symbolLayer,"material","color"),a=this._getCombinedOpacity(n),i=a<1||this.needsDrivenTransparentPass;this._material.setParameters({opacity:a,transparent:i}),this._bottomMaterial.setParameters({opacity:a,transparent:i});const o=this._getLayerOpacity();return e.forEach((e=>{const t=s(e);r(t)&&t.layerOpacityChanged(o,this._context.isAsync)})),!0}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,L)}slicePlaneEnabledChanged(e,t){return this._material.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._bottomMaterial.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),e.forEach((e=>{const s=t(e);r(s)&&s.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)})),!0}physicalBasedRenderingChanged(){return this._material.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),this._bottomMaterial.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),!0}pixelRatioChanged(){return!0}_getExtrusionSize(e){let t;var r;e.size&&this._drivenProperties.size?t=null!=(r=j(e.size,2))?r:0:t=this._getSymbolSize();return t/=this._context.renderCoordsHelper.unitInMeters,t}applyRendererDiff(e,t){return this._drivenPropertiesChanged(t)?z.Recreate_Symbol:z.Recreate_Graphics}_getSymbolSize(){var e;return null!=(e=this.symbolLayer.size)?e:1}_createAs3DShape(e,t,h,m,p){const d=D(e.geometry);if(s(d))return null;const u=G(d,this._context.elevationProvider,this._context.renderCoordsHelper,m);if(this._logGeometryCreationWarnings(u,d.rings,"rings","ExtrudeSymbol3DLayer"),0===d.rings.length||!d.rings.some((e=>e.length>0)))return null;const f=T(d);if(s(f))return null;const g=new Array,j=new Array,M=new Array,O=b(),B=c(),I=y(),R=this._context.renderCoordsHelper.viewingMode===A.Global;R||this._context.renderCoordsHelper.worldUpAtPosition(null,I),_(d.spatialReference,[f.x,f.y,0],B,this._context.renderCoordsHelper.spatialReference);const z=c();o(z,B);const k=i();a(k,z);const{polygons:N,mapPosition:F,position:V}=u,H=V.length/3,Z=new Float64Array(3*H*6),W=new Float64Array(3*H*6),q=new Float64Array(3*H*6),J=new Float64Array(1*H*6);let X=0;for(let r=0;r<N.length;++r){const e=N[r],s=e.count;if(this._context.clippingExtent&&(E(O),x(O,e.mapPosition),!P(O,this._context.clippingExtent)))continue;const a=n(e.mapPosition,e.holeIndices,3);if(0===a.length)continue;const i=3*s*2+a.length,o=new Uint32Array(i),c=new Uint32Array(a.length),m=6*s,p=3*Z.BYTES_PER_ELEMENT,d=new v(Z.buffer,X*p,p,(X+m)*p),u=3*W.BYTES_PER_ELEMENT,f=new v(W.buffer,X*u,u,(X+m)*u),y=new Float64Array(q.buffer,3*X*q.BYTES_PER_ELEMENT,3*m),_=new Float64Array(J.buffer,1*X*J.BYTES_PER_ELEMENT,1*m),b=this._getExtrusionSize(t);Q(V,F,a,e,d.typedBuffer,y,f.typedBuffer,_,0,o,c,b,I,R),S(d,d,z),w(f,f,k),X+=6*s;const A=K(o,o.length-c.length,{positions:d.typedBuffer,elevation:y,normals:f.typedBuffer,heights:_},h);g.push(A),j.push(this._material),M.push(l);const L=K(c,0,{positions:d.typedBuffer,elevation:y,normals:f.typedBuffer,heights:_},h);g.push(L),j.push(this._bottomMaterial),M.push(l)}if(0===g.length)return null;const $=new Y({geometries:g,materials:j,transformations:M,metadata:{layerUid:this._context.layer.uid,graphicUid:p,isElevationSource:!0}});$.transformation=B;const ee=U(this.symbolLayer,{opacity:this._getLayerOpacity()}),te=r(ee)?{baseMaterial:this._material,edgeMaterials:[ee],properties:{mergeGeometries:!0,hasSlicePlane:this._context.slicePlaneEnabled}}:null,re=new C(this,$,g,null,null,ce,m,te);return re.alignedSampledElevation=u.sampledElevation,re.needsElevationUpdates=L(m.mode),re}}function K(e,t,r,s){const n=new Uint32Array(e.length),a=[[Z.POSITION,{size:3,data:r.positions,exclusive:!0}],[Z.NORMAL,{size:3,data:r.normals,exclusive:!0}],[Z.COLOR,{size:4,data:s,exclusive:!0}],[Z.SIZE,{size:1,data:r.heights,exclusive:!0}]],i=[[Z.POSITION,e],[Z.NORMAL,e],[Z.COLOR,n]];return r.elevation&&(a.push([Z.MAPPOS,{size:3,data:r.elevation}]),i.push([Z.MAPPOS,e])),new H(a,i,V.Triangle,t)}function Q(e,t,r,s,n,a,i,o,l,c,h,m,p,d){const u=r.length/3;let f=0,g=2*s.count;X(e,t,s.index,s.count,r,0,u,n,a,i,o,l,c,h,g,m,p,d),l+=2*s.count,g=0,te(n,a,o,i,f,s.pathLengths[0],s.count,l,c,g,m),l+=4*s.pathLengths[0],g+=2*s.pathLengths[0],f+=s.pathLengths[0];for(let y=1;y<s.pathLengths.length;++y)te(n,a,o,i,f,s.pathLengths[y],s.count,l,c,g,m),l+=4*s.pathLengths[y],g+=2*s.pathLengths[y],f+=s.pathLengths[y]}function X(e,t,r,s,n,a,i,o,l,c,p,d,u,f,g,y,_,b){h(me,_);const E=y>0?1:-1;let x=3*r,P=d,v=3*P,S=d+s,w=3*S;for(let h=0;h<s;++h)b&&(me[0]=e[x+0],me[1]=e[x+1],me[2]=e[x+2],m(me,me)),o[v+0]=e[x+0],o[v+1]=e[x+1],o[v+2]=e[x+2],l[v+0]=t[x+0],l[v+1]=t[x+1],l[v+2]=t[x+2],c[v+0]=-E*me[0],c[v+1]=-E*me[1],c[v+2]=-E*me[2],p[P]=0,o[w+0]=e[x+0]+y*me[0],o[w+1]=e[x+1]+y*me[1],o[w+2]=e[x+2]+y*me[2],l[w+0]=t[x+0],l[w+1]=t[x+1],l[w+2]=t[x+2],c[w+0]=E*me[0],c[w+1]=E*me[1],c[w+2]=E*me[2],p[S]=y,v+=3,w+=3,x+=3,P+=1,S+=1;x=3*a,v=0,w=3*g;const j=y<0?ue:de,A=y<0?de:ue;for(let h=0;h<i;++h)f[v+0]=n[x+j[0]],f[v+1]=n[x+j[1]],f[v+2]=n[x+j[2]],u[w+0]=n[x+A[0]]+s,u[w+1]=n[x+A[1]]+s,u[w+2]=n[x+A[2]]+s,v+=3,w+=3,x+=3}function $(e,t,r,s,n,a,i){s[a]=s[i],i*=3,e[(a*=3)+0]=e[i+0],e[a+1]=e[i+1],e[a+2]=e[i+2],t[a+0]=t[i+0],t[a+1]=t[i+1],t[a+2]=t[i+2],r[a+0]=n[0],r[a+1]=n[1],r[a+2]=n[2]}const ee=y();function te(e,t,r,s,n,a,i,o,l,c,h){let m=n,p=n+1,d=n+i,u=n+i+1,f=o,g=o+1,y=o+2*a,_=o+2*a+1;h<0&&(m=n+i+1,u=n),c*=3;for(let b=0;b<a;++b)b===a-1&&(h>0?(p=n,u=n+i):(p=n,m=n+i)),oe(e,m,p,d,ee),$(e,t,s,r,ee,f,m),$(e,t,s,r,ee,g,p),$(e,t,s,r,ee,y,d),$(e,t,s,r,ee,_,u),l[c++]=f,l[c++]=y,l[c++]=_,l[c++]=f,l[c++]=_,l[c++]=g,m++,p++,d++,u++,f+=2,g+=2,y+=2,_+=2}const re=y(),se=y(),ne=y(),ae=y(),ie=y();function oe(e,t,r,s,n){t*=3,r*=3,s*=3,p(re,e[t++],e[t++],e[t++]),p(se,e[r++],e[r++],e[r++]),p(ne,e[s++],e[s++],e[s++]),d(ae,se,re),d(ie,ne,re),u(n,ie,ae),m(n,n)}const le=y();function ce(e,t,r,s){const n=e.stageObject,a=n.geometryRecords,i=a.length,l="absolute-height"!==t.mode;let h=0;const m=n.transformation,d=o(c(),m);for(let o=0;o<i;o+=2){const e=a[o].geometry,i=e.getMutableAttribute(Z.POSITION).data,c=e.vertexAttributes.get(Z.SIZE).data,u=e.vertexAttributes.get(Z.MAPPOS).data,g=new N(u),y=i.length/3;let _=0,b=!1,E=0;const x=r.spatialReference;for(let n=0;n<y;n++){le[0]=i[_],le[1]=i[_+1],le[2]=i[_+2],M(g,r,t,s,pe),l&&(E+=pe.sampledElevation),k.TESTS_DISABLE_OPTIMIZATIONS?(p(he,g.array[g.offset+0],g.array[g.offset+1],pe.z+c[_/3]),s.toRenderCoords(he,x,he),f(he,he,d)):(p(he,i[_+0],i[_+1],i[_+2]),f(he,he,m),s.setAltitude(he,pe.z+c[_/3]),f(he,he,d)),i[_]=he[0],i[_+1]=he[1],i[_+2]=he[2];const e=fe/s.unitInMeters;(Math.abs(le[0]-i[_])>=e||Math.abs(le[1]-i[_+1])>=e||Math.abs(le[2]-i[_+2])>=e)&&(b=!0),g.offset+=3,_+=3}b&&(e.invalidateBoundingInfo(),n.geometryVertexAttrsUpdated(a[o]),a[o+1].geometry.invalidateBoundingInfo(),n.geometryVertexAttrsUpdated(a[o+1])),h+=E/y}return h/i}const he=y(),me=y(),pe=new O,de=[0,2,1],ue=[0,1,2],fe=.01;export{J as Graphics3DExtrudeSymbolLayer};
5
+ import e from"../../../../core/Error.js";import{get as t,isSome as r,isNone as s}from"../../../../core/maybe.js";import{e as n}from"../../../../chunks/earcut.js";import{a}from"../../../../chunks/mat3.js";import{c as i}from"../../../../chunks/mat3f64.js";import{a as o}from"../../../../chunks/mat4.js";import{I as l,c}from"../../../../chunks/mat4f64.js";import{c as h,n as m,s as p,b as d,f as u,m as f}from"../../../../chunks/vec3.js";import{d as g,c as y}from"../../../../chunks/vec3f64.js";import{computeTranslationToOriginAndRotation as _}from"../../../../geometry/projection.js";import{create as b,empty as E,expandWithBuffer as x,intersectsClippingArea as P}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f64 as S}from"../../../../geometry/support/buffer/BufferView.js";import{t as v,a as w}from"../../../../chunks/vec32.js";import{getDriverAxisSizeValue as j}from"../../../../renderers/support/renderingInfoUtils.js";import{ViewingMode as A}from"../../../ViewingMode.js";import{needsElevationUpdates3D as L,evaluateElevationInfoAtPoint as M,SampleElevationInfo as O}from"./elevationAlignmentUtils.js";import{ElevationContext as B}from"./ElevationContext.js";import{Graphics3DObject3DGraphicLayer as C}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as I}from"./Graphics3DSymbolLayer.js";import{validateSymbolLayerSize as R,computeCentroid as T}from"./graphicUtils.js";import{ApplyRendererDiffResult as z}from"./interfaces.js";import{geometryAsPolygon as D,geometryToRenderInfo as G}from"./polygonUtils.js";import{createMaterial as U}from"../support/edgeUtils.js";import k from"../../support/debugFlags.js";import{SamplePosition as N}from"../../support/ElevationProvider.js";import{CullFaceOptions as F,PrimitiveType as V}from"../../webgl-engine/lib/basicInterfaces.js";import{Geometry as H}from"../../webgl-engine/lib/Geometry.js";import{Object3D as Y}from"../../webgl-engine/lib/Object3D.js";import{VertexAttribute as Z}from"../../webgl-engine/lib/VertexAttribute.js";import{DefaultMaterial as W}from"../../webgl-engine/materials/DefaultMaterial.js";const q=["polygon","extent"];class J extends I{constructor(e,t,r,s){super(e,t,r,s),this.ensureDrapedStatus(!1)}async doLoad(){if(!this._drivenProperties.size){const t=R(this._getSymbolSize());if(t)throw new e("graphics3dextrudesymbollayer:invalid-size",t)}const r=t(this.symbolLayer,"material","color"),s=this._getCombinedOpacityAndColor(r),n=g(s),a=s[3],i=a<1||this.needsDrivenTransparentPass,o={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,diffuse:n,ambient:n,opacity:a,transparent:i,cullFace:i?F.None:F.Back,hasVertexColors:!0,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:this.symbolLayer.castShadows,offsetTransparentBackfaces:!0};this._material=new W(o),this._bottomMaterial=new W({...o,cullFace:F.Back}),this._context.stage.add(this._material),this._context.stage.add(this._bottomMaterial)}destroy(){super.destroy(),this._material&&(this._context.stage.remove(this._material),this._context.stage.remove(this._bottomMaterial))}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,q,this.symbolLayer.type))return null;const r=this._getVertexOpacityAndColor(e.renderingInfo,255),s=this.setGraphicElevationContext(t,new B);return this._createAs3DShape(t,e.renderingInfo,r,s,t.uid)}layerOpacityChanged(e,s){const n=t(this.symbolLayer,"material","color"),a=this._getCombinedOpacity(n),i=a<1||this.needsDrivenTransparentPass;this._material.setParameters({opacity:a,transparent:i}),this._bottomMaterial.setParameters({opacity:a,transparent:i});const o=this._getLayerOpacity();return e.forEach((e=>{const t=s(e);r(t)&&t.layerOpacityChanged(o,this._context.isAsync)})),!0}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,L)}slicePlaneEnabledChanged(e,t){return this._material.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._bottomMaterial.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),e.forEach((e=>{const s=t(e);r(s)&&s.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)})),!0}physicalBasedRenderingChanged(){return this._material.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),this._bottomMaterial.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),!0}pixelRatioChanged(){return!0}_getExtrusionSize(e){let t;return t=e.size&&this._drivenProperties.size?j(e.size,2)??0:this._getSymbolSize(),t/=this._context.renderCoordsHelper.unitInMeters,t}applyRendererDiff(e,t){return this._drivenPropertiesChanged(t)?z.Recreate_Symbol:z.Recreate_Graphics}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(e,t,h,m,p){const d=D(e.geometry);if(s(d))return null;const u=G(d,this._context.elevationProvider,this._context.renderCoordsHelper,m);if(this._logGeometryCreationWarnings(u,d.rings,"rings","ExtrudeSymbol3DLayer"),0===d.rings.length||!d.rings.some((e=>e.length>0)))return null;const f=T(d);if(s(f))return null;const g=new Array,j=new Array,M=new Array,O=b(),B=c(),I=y(),R=this._context.renderCoordsHelper.viewingMode===A.Global;R||this._context.renderCoordsHelper.worldUpAtPosition(null,I),_(d.spatialReference,[f.x,f.y,0],B,this._context.renderCoordsHelper.spatialReference);const z=c();o(z,B);const k=i();a(k,z);const{polygons:N,mapPosition:F,position:V}=u,H=V.length/3,Z=new Float64Array(3*H*6),W=new Float64Array(3*H*6),q=new Float64Array(3*H*6),J=new Float64Array(1*H*6);let X=0;for(let r=0;r<N.length;++r){const e=N[r],s=e.count;if(this._context.clippingExtent&&(E(O),x(O,e.mapPosition),!P(O,this._context.clippingExtent)))continue;const a=n(e.mapPosition,e.holeIndices,3);if(0===a.length)continue;const i=3*s*2+a.length,o=new Uint32Array(i),c=new Uint32Array(a.length),m=6*s,p=3*Z.BYTES_PER_ELEMENT,d=new S(Z.buffer,X*p,p,(X+m)*p),u=3*W.BYTES_PER_ELEMENT,f=new S(W.buffer,X*u,u,(X+m)*u),y=new Float64Array(q.buffer,3*X*q.BYTES_PER_ELEMENT,3*m),_=new Float64Array(J.buffer,1*X*J.BYTES_PER_ELEMENT,1*m),b=this._getExtrusionSize(t);Q(V,F,a,e,d.typedBuffer,y,f.typedBuffer,_,0,o,c,b,I,R),v(d,d,z),w(f,f,k),X+=6*s;const A=K(o,o.length-c.length,{positions:d.typedBuffer,elevation:y,normals:f.typedBuffer,heights:_},h);g.push(A),j.push(this._material),M.push(l);const L=K(c,0,{positions:d.typedBuffer,elevation:y,normals:f.typedBuffer,heights:_},h);g.push(L),j.push(this._bottomMaterial),M.push(l)}if(0===g.length)return null;const $=new Y({geometries:g,materials:j,transformations:M,metadata:{layerUid:this._context.layer.uid,graphicUid:p,isElevationSource:!0}});$.transformation=B;const ee=U(this.symbolLayer,{opacity:this._getLayerOpacity()}),te=r(ee)?{baseMaterial:this._material,edgeMaterials:[ee],properties:{mergeGeometries:!0,hasSlicePlane:this._context.slicePlaneEnabled}}:null,re=new C(this,$,g,null,null,ce,m,te);return re.alignedSampledElevation=u.sampledElevation,re.needsElevationUpdates=L(m.mode),re}}function K(e,t,r,s){const n=new Uint32Array(e.length),a=[[Z.POSITION,{size:3,data:r.positions,exclusive:!0}],[Z.NORMAL,{size:3,data:r.normals,exclusive:!0}],[Z.COLOR,{size:4,data:s,exclusive:!0}],[Z.SIZE,{size:1,data:r.heights,exclusive:!0}]],i=[[Z.POSITION,e],[Z.NORMAL,e],[Z.COLOR,n]];return r.elevation&&(a.push([Z.MAPPOS,{size:3,data:r.elevation}]),i.push([Z.MAPPOS,e])),new H(a,i,V.Triangle,t)}function Q(e,t,r,s,n,a,i,o,l,c,h,m,p,d){const u=r.length/3;let f=0,g=2*s.count;X(e,t,s.index,s.count,r,0,u,n,a,i,o,l,c,h,g,m,p,d),l+=2*s.count,g=0,te(n,a,o,i,f,s.pathLengths[0],s.count,l,c,g,m),l+=4*s.pathLengths[0],g+=2*s.pathLengths[0],f+=s.pathLengths[0];for(let y=1;y<s.pathLengths.length;++y)te(n,a,o,i,f,s.pathLengths[y],s.count,l,c,g,m),l+=4*s.pathLengths[y],g+=2*s.pathLengths[y],f+=s.pathLengths[y]}function X(e,t,r,s,n,a,i,o,l,c,p,d,u,f,g,y,_,b){h(me,_);const E=y>0?1:-1;let x=3*r,P=d,S=3*P,v=d+s,w=3*v;for(let h=0;h<s;++h)b&&(me[0]=e[x+0],me[1]=e[x+1],me[2]=e[x+2],m(me,me)),o[S+0]=e[x+0],o[S+1]=e[x+1],o[S+2]=e[x+2],l[S+0]=t[x+0],l[S+1]=t[x+1],l[S+2]=t[x+2],c[S+0]=-E*me[0],c[S+1]=-E*me[1],c[S+2]=-E*me[2],p[P]=0,o[w+0]=e[x+0]+y*me[0],o[w+1]=e[x+1]+y*me[1],o[w+2]=e[x+2]+y*me[2],l[w+0]=t[x+0],l[w+1]=t[x+1],l[w+2]=t[x+2],c[w+0]=E*me[0],c[w+1]=E*me[1],c[w+2]=E*me[2],p[v]=y,S+=3,w+=3,x+=3,P+=1,v+=1;x=3*a,S=0,w=3*g;const j=y<0?ue:de,A=y<0?de:ue;for(let h=0;h<i;++h)f[S+0]=n[x+j[0]],f[S+1]=n[x+j[1]],f[S+2]=n[x+j[2]],u[w+0]=n[x+A[0]]+s,u[w+1]=n[x+A[1]]+s,u[w+2]=n[x+A[2]]+s,S+=3,w+=3,x+=3}function $(e,t,r,s,n,a,i){s[a]=s[i],i*=3,e[(a*=3)+0]=e[i+0],e[a+1]=e[i+1],e[a+2]=e[i+2],t[a+0]=t[i+0],t[a+1]=t[i+1],t[a+2]=t[i+2],r[a+0]=n[0],r[a+1]=n[1],r[a+2]=n[2]}const ee=y();function te(e,t,r,s,n,a,i,o,l,c,h){let m=n,p=n+1,d=n+i,u=n+i+1,f=o,g=o+1,y=o+2*a,_=o+2*a+1;h<0&&(m=n+i+1,u=n),c*=3;for(let b=0;b<a;++b)b===a-1&&(h>0?(p=n,u=n+i):(p=n,m=n+i)),oe(e,m,p,d,ee),$(e,t,s,r,ee,f,m),$(e,t,s,r,ee,g,p),$(e,t,s,r,ee,y,d),$(e,t,s,r,ee,_,u),l[c++]=f,l[c++]=y,l[c++]=_,l[c++]=f,l[c++]=_,l[c++]=g,m++,p++,d++,u++,f+=2,g+=2,y+=2,_+=2}const re=y(),se=y(),ne=y(),ae=y(),ie=y();function oe(e,t,r,s,n){t*=3,r*=3,s*=3,p(re,e[t++],e[t++],e[t++]),p(se,e[r++],e[r++],e[r++]),p(ne,e[s++],e[s++],e[s++]),d(ae,se,re),d(ie,ne,re),u(n,ie,ae),m(n,n)}const le=y();function ce(e,t,r,s){const n=e.stageObject,a=n.geometryRecords,i=a.length,l="absolute-height"!==t.mode;let h=0;const m=n.transformation,d=o(c(),m);for(let o=0;o<i;o+=2){const e=a[o].geometry,i=e.getMutableAttribute(Z.POSITION).data,c=e.vertexAttributes.get(Z.SIZE).data,u=e.vertexAttributes.get(Z.MAPPOS).data,g=new N(u),y=i.length/3;let _=0,b=!1,E=0;const x=r.spatialReference;for(let n=0;n<y;n++){le[0]=i[_],le[1]=i[_+1],le[2]=i[_+2],M(g,r,t,s,pe),l&&(E+=pe.sampledElevation),k.TESTS_DISABLE_OPTIMIZATIONS?(p(he,g.array[g.offset+0],g.array[g.offset+1],pe.z+c[_/3]),s.toRenderCoords(he,x,he),f(he,he,d)):(p(he,i[_+0],i[_+1],i[_+2]),f(he,he,m),s.setAltitude(he,pe.z+c[_/3]),f(he,he,d)),i[_]=he[0],i[_+1]=he[1],i[_+2]=he[2];const e=fe/s.unitInMeters;(Math.abs(le[0]-i[_])>=e||Math.abs(le[1]-i[_+1])>=e||Math.abs(le[2]-i[_+2])>=e)&&(b=!0),g.offset+=3,_+=3}b&&(e.invalidateBoundingInfo(),n.geometryVertexAttrsUpdated(a[o]),a[o+1].geometry.invalidateBoundingInfo(),n.geometryVertexAttrsUpdated(a[o+1])),h+=E/y}return h/i}const he=y(),me=y(),pe=new O,de=[0,2,1],ue=[0,1,2],fe=.01;export{J as Graphics3DExtrudeSymbolLayer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import{neverReached as i}from"../../../../core/compilerUtils.js";import{HandleOwner as s}from"../../../../core/HandleOwner.js";import{destroyMaybe as r,isSome as n,unwrap as a}from"../../../../core/maybe.js";import{logOnError as o}from"../../../../core/promiseUtils.js";import{watch as l,initial as p,when as u}from"../../../../core/reactiveUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as d}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as c}from"../../../../core/accessorSupport/diffUtils.js";import{canProject as m,project as y}from"../../../../geometry/support/webMercatorUtils.js";import{getRenderingInfo as g,getRenderingInfoAsync as f}from"../../../../renderers/support/renderingInfoUtils.js";import b from"../../../../rest/support/Query.js";import{DrapeSourceType as v}from"../interfaces.js";import{SUSPEND_RESUME_EXTENT_OPTIMISM as C}from"./constants.js";import{Graphics3DCore as E}from"./Graphics3DCore.js";import x from"./Graphics3DElevationAlignment.js";import{Graphics3DFilterVisibility as w}from"./Graphics3DFilterVisibility.js";import V from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as S}from"./Graphics3DObjectStates.js";import j from"./Graphics3DScaleVisibility.js";import{enlargeExtent as O}from"./graphicUtils.js";import{attributeLookup as R}from"../support/attributeUtils.js";import{UpdatePolicy as G,Object3DState as _}from"../../webgl-engine/lib/basicInterfaces.js";let A=class extends s{constructor(e){super(e),this.type="graphics-3d",this.elevationFeatureExpressionEnabled=!1,this.dataExtent=null,this.drapeSourceType=v.Features,this.preferredUpdatePolicy=G.ASYNC,this.suspendResumeExtent=null}normalizeCtorArgs(e){const t=e.frustumVisibilityEnabled?new V:null,i=e.scaleVisibilityEnabled?new j:null,s=(e.filterVisibilityEnabled||e.timeExtentVisibilityEnabled)&&"multipatch"!==e.owner.layer.geometryType?new w:null,r=e.elevationAlignmentEnabled?new x:null,{owner:n,updateClippingExtent:a,dataExtent:o,elevationFeatureExpressionEnabled:l,preferredUpdatePolicy:p}=e;return{owner:n,updateClippingExtent:a,dataExtent:o,frustumVisibility:t,scaleVisibility:i,filterVisibility:s,elevationAlignment:r,elevationFeatureExpressionEnabled:l,preferredUpdatePolicy:p}}get featureSpatialReference(){return"featureSpatialReference"in this.owner?this.owner.featureSpatialReference:void 0}initialize(){const e=new E({owner:this,layer:this.layer,preferredUpdatePolicy:this.preferredUpdatePolicy,elevationFeatureExpressionEnabled:this.elevationFeatureExpressionEnabled,graphicSymbolSupported:!1,hasZ:this.owner.hasZ,hasM:this.owner.hasM});this._set("graphicsCore",e),this.scaleVisibility&&this.updatingHandles.add((()=>this.layer.effectiveScaleRange),(()=>this.scaleVisibility.layerMinMaxScaleChangeHandler())),this.filterVisibility&&(this.updatingHandles.add((()=>"filter"in this.owner&&this.owner.filter),(()=>this.filterVisibility.filterChanged())),this.updatingHandles.add((()=>"timeExtent"in this.owner&&this.owner.timeExtent),(()=>this.filterVisibility.filterChanged()))),this.elevationAlignment&&this.updatingHandles.add((()=>this.layer.elevationInfo),((e,t)=>{c(e,t)&&this.updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())})),this.updatingHandles.add((()=>this.layer.labelsVisible),(()=>this.graphicsCore.updateVisibilityInfo())),this.updatingHandles.add((()=>this.layer.labelingInfo),((e,t)=>{c(e,t)&&this.graphicsCore.updateLabelingInfo()})),this.updatingHandles.add((()=>this.preferredUpdatePolicy),(e=>this.graphicsCore.preferredUpdatePolicy=e))}destroy(){this.handles.removeAll(),this.updatingHandles.removeAll(),this._set("frustumVisibility",r(this.frustumVisibility)),this._set("scaleVisibility",r(this.scaleVisibility)),this._set("filterVisibility",r(this.filterVisibility)),this._set("elevationAlignment",r(this.elevationAlignment)),this._set("objectStates",r(this.objectStates)),this._set("graphicsCore",r(this.graphicsCore)),this._set("owner",null)}get layer(){return this.owner.layer}get suspendResumeExtentMode(){return"suspendResumeExtentMode"in this.owner?this.owner.suspendResumeExtentMode:"computed"}get scaleVisibilitySuspended(){var e;return null==(e=this.scaleVisibility)?void 0:e.suspended}get suspended(){return this.owner.suspended}get legendEnabled(){return!this.frustumVisibility.suspended}get suspendInfo(){var e,t;const i={};return null!=(e=this.scaleVisibility)&&e.suspended&&(i.outsideScaleRange=!0),null!=(t=this.frustumVisibility)&&t.suspended&&(i.outsideOfView=!0),i}get updating(){var e,t,i;return!!(null!=(e=this.graphicsCore)&&e.updating||null!=(t=this.frustumVisibility)&&t.updating||null!=(i=this.updatingHandles)&&i.updating)}get updatingRemaining(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.updatingRemaining)?e:0}get featureStore(){var e;return null==(e=this.graphicsCore)?void 0:e.featureStore}get view(){return this.owner.view}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){var e;return null==(e=this.owner)?void 0:e.fullOpacity}get filter(){return"filter"in this.owner?this.owner.filter:null}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get updatePolicy(){return this.owner.updatePolicy}get graphics3DGraphics(){var e;return null==(e=this.graphicsCore)?void 0:e.graphics3DGraphics}get graphics3DGraphicsByObjectID(){var e;return null==(e=this.graphicsCore)?void 0:e.graphics3DGraphicsByObjectID}get symbolUpdateType(){var e;return null==(e=this.graphicsCore)?void 0:e.symbolUpdateType}get displayFeatureLimit(){var e;const t=this.view.resourceController.memoryController.memoryFactor,i=null==(e=this.graphicsCore)?void 0:e.displayFeatureLimit;if(1===t)return i;const s=Math.ceil(i.maximumNumberOfFeatures*t),r=Math.ceil(i.maximumTotalNumberOfFeatures*t),n=Math.ceil(i.minimumTotalNumberOfFeatures*t);return{...i,maximumNumberOfFeatures:s,maximumTotalNumberOfFeatures:r,minimumTotalNumberOfFeatures:n}}get usedMemory(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.usedMemory)?e:0}get usedMemoryPerFeature(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.usedMemoryPerGraphic)?e:0}get unprocessedMemoryEstimate(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.unprocessedMemoryEstimate)?e:0}get performanceInfo(){return{core:this.graphicsCore.performanceInfo,elevationUpdating:this.elevationAlignment.updating,visibilityFrustum:!this.frustumVisibility.suspended,visibilityScale:!this.scaleVisibility.suspended}}async setup(){this.frustumVisibility&&this.frustumVisibility.setup(this);const e=this.owner,t=this.owner.view.basemapTerrain,i=(e,t,i)=>this.graphicsCore.spatialIndex.queryGraphicUIDsInExtent(e,t,i);if(this.scaleVisibility&&this.scaleVisibility.setup(this,this.layer,i,this.graphicsCore,t),this.filterVisibility&&("filter"in e||"timeExtent"in e)&&this.filterVisibility.setup(e,this.graphicsCore),this.elevationAlignment){const t=e.view.elevationProvider;this.elevationAlignment.setup(this,i,this.graphicsCore,t)}this._set("objectStates",new S(this.graphicsCore)),this._set("labeling",this.owner.view.labeler.addGraphicsOwner(this.graphicsCore,this.scaleVisibility)),this._set("deconfliction",e.view.deconflictor.addGraphicsOwner(this.graphicsCore)),await o(this.graphicsCore.setup({elevationAlignment:this.elevationAlignment,scaleVisibility:this.scaleVisibility,filterVisibility:this.filterVisibility,deconflictor:this.deconfliction,labeler:this.labeling,objectStates:this.objectStates})),this.updatingHandles.add((()=>this.layer.renderer),(e=>this.updatingHandles.addPromise(this.graphicsCore.rendererChange(e)))),this.updatingHandles.add((()=>e.fullOpacity),(()=>this.graphicsCore.opacityChange())),this._setupSuspendResumeExtent(),this.updateClippingExtent&&(this.updatingHandles.add((()=>e.view.clippingArea),(()=>this._updateClippingExtent())),this._updateClippingExtent()),this.graphicsCore.startCreateGraphics(),this.graphicsCore.labelsEnabled&&await o(this.graphicsCore.updateLabelingInfo())}maskOccludee(e){const{set:t,handle:i}=this.objectStates.acquireSet(_.MaskOccludee,null);return this.objectStates.setUid(t,e.uid),i}highlight(e,i){if(e instanceof b){const{set:t,handle:s}=this.objectStates.acquireSet(_.Highlight,i);return this.owner.queryObjectIds(e).then((e=>this.objectStates.setObjectIds(t,e))),s}if("number"==typeof e||"string"==typeof e)return this.highlight([e],i);if(e instanceof t)return this.highlight([e],i);if("toArray"in e&&(e=e.toArray()),Array.isArray(e)&&e.length>0){if(e[0]instanceof t){const t=e;if(null==R(this.layer.fieldsIndex,t[0].attributes,i)){const e=t.map((e=>e.uid)),{set:i,handle:s}=this.objectStates.acquireSet(_.Highlight,null);return this.objectStates.setUids(i,e),s}e=t.map((e=>R(this.layer.fieldsIndex,e.attributes,i)))}if("number"==typeof e[0]||"string"==typeof e[0]){const t=e,{set:s,handle:r}=this.objectStates.acquireSet(_.Highlight,i);return this.objectStates.setObjectIds(s,t),r}}return P}whenGraphicBounds(e,t){var i;return null==(i=this.graphicsCore)?void 0:i.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){var i;return null==(i=this.graphicsCore)?void 0:i.computeAttachmentOrigin(e,t)}notifyGraphicGeometryChanged(e){this.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphicsCore.notifyGraphicVisibilityChanged(e)}getRenderingInfo(e,t,i){const s=g(e,{renderer:t,arcade:i});if(n(s)&&s.color){const e=s.color;e[0]=e[0]/255,e[1]=e[1]/255,e[2]=e[2]/255}return s}getRenderingInfoAsync(e,t,i,s){return f(e,{renderer:t,arcade:i,...s})}getSymbolLayerSize(e,t){var i;return null==(i=this.graphicsCore)?void 0:i.getSymbolLayerSize(e,t)}setObjectIdVisibility(e,t){var i;null==(i=this.graphicsCore)||i.setObjectIdVisibility(e,t)}_updateClippingExtent(){const e=this.owner.view.clippingArea;this.graphicsCore.setClippingExtent(e,this.owner.view.spatialReference)&&(this.updateClippingExtent(e)||this.graphicsCore.recreateAllGraphics())}_setupSuspendResumeExtent(){(this.frustumVisibility||this.scaleVisibility)&&this.handles.add(l((()=>this.suspendResumeExtentMode),(()=>{switch(this.handles.remove(M),this.suspendResumeExtentMode){case"computed":this.handles.add([l((()=>this.graphicsCore.computedExtent),(e=>this._updateSuspendResumeExtent(e)),p),l((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(this.graphicsCore.computedExtent)))],M);break;case"data":this.handles.add([u((()=>this.dataExtent),(e=>this._updateSuspendResumeExtent(e)),p),l((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(a(this.dataExtent))))],M);break;default:i(this.suspendResumeExtentMode)}}),p))}_updateSuspendResumeExtent(e){e?this._suspendResumeExtentChanged(this._extentToSuspendResumeRect(e,this.suspendResumeExtent)):this._suspendResumeExtentChanged(null)}_extentToSuspendResumeRect(e,t){const i=this.owner.view.spatialReference;if(!e.spatialReference.equals(i)){if(!m(e,i))return;e=y(e,i)}return O(e,t,C,this.graphicsCore.extentPadding)}_suspendResumeExtentChanged(e){this.frustumVisibility&&this.frustumVisibility.setExtent(e),this.scaleVisibility&&this.scaleVisibility.setExtent(e)}};e([h()],A.prototype,"type",void 0),e([h({constructOnly:!0})],A.prototype,"owner",void 0),e([h()],A.prototype,"layer",null),e([h({constructOnly:!0})],A.prototype,"updateClippingExtent",void 0),e([h({constructOnly:!0})],A.prototype,"elevationFeatureExpressionEnabled",void 0),e([h({constructOnly:!0})],A.prototype,"graphicsCore",void 0),e([h({constructOnly:!0})],A.prototype,"scaleVisibility",void 0),e([h({constructOnly:!0})],A.prototype,"filterVisibility",void 0),e([h({constructOnly:!0})],A.prototype,"elevationAlignment",void 0),e([h({constructOnly:!0})],A.prototype,"frustumVisibility",void 0),e([h({readOnly:!0})],A.prototype,"deconfliction",void 0),e([h({readOnly:!0})],A.prototype,"labeling",void 0),e([h({readOnly:!0})],A.prototype,"objectStates",void 0),e([h()],A.prototype,"suspendResumeExtentMode",null),e([h()],A.prototype,"dataExtent",void 0),e([h()],A.prototype,"scaleVisibilitySuspended",null),e([h()],A.prototype,"suspended",null),e([h()],A.prototype,"legendEnabled",null),e([h()],A.prototype,"suspendInfo",null),e([h()],A.prototype,"updating",null),e([h()],A.prototype,"updatingRemaining",null),e([h()],A.prototype,"featureStore",null),e([h()],A.prototype,"view",null),e([h()],A.prototype,"loadedGraphics",null),e([h()],A.prototype,"fullOpacity",null),e([h()],A.prototype,"filter",null),e([h()],A.prototype,"slicePlaneEnabled",null),e([h()],A.prototype,"drapeSourceType",void 0),e([h()],A.prototype,"updatePolicy",null),e([h()],A.prototype,"preferredUpdatePolicy",void 0),e([h()],A.prototype,"displayFeatureLimit",null),A=e([d("esri.views.3d.layers.graphics.Graphics3DFeatureProcessor")],A);const I=A,M="suspendResumeExtentMode",P={remove(){},pause(){},resume(){}};export{I as default};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import{neverReached as i}from"../../../../core/compilerUtils.js";import{HandleOwner as s}from"../../../../core/HandleOwner.js";import{destroyMaybe as r,isSome as n,unwrap as a}from"../../../../core/maybe.js";import{logOnError as o}from"../../../../core/promiseUtils.js";import{watch as l,initial as p,when as h}from"../../../../core/reactiveUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as d}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as c}from"../../../../core/accessorSupport/diffUtils.js";import{canProject as m,project as y}from"../../../../geometry/support/webMercatorUtils.js";import{getRenderingInfo as g,getRenderingInfoAsync as f}from"../../../../renderers/support/renderingInfoUtils.js";import b from"../../../../rest/support/Query.js";import{DrapeSourceType as C}from"../interfaces.js";import{SUSPEND_RESUME_EXTENT_OPTIMISM as E}from"./constants.js";import{Graphics3DCore as x}from"./Graphics3DCore.js";import w from"./Graphics3DElevationAlignment.js";import{Graphics3DFilterVisibility as v}from"./Graphics3DFilterVisibility.js";import V from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as S}from"./Graphics3DObjectStates.js";import j from"./Graphics3DScaleVisibility.js";import{enlargeExtent as O}from"./graphicUtils.js";import{attributeLookup as R}from"../support/attributeUtils.js";import{UpdatePolicy as G,Object3DState as _}from"../../webgl-engine/lib/basicInterfaces.js";let A=class extends s{constructor(e){super(e),this.type="graphics-3d",this.elevationFeatureExpressionEnabled=!1,this.dataExtent=null,this.drapeSourceType=C.Features,this.preferredUpdatePolicy=G.ASYNC,this.suspendResumeExtent=null}normalizeCtorArgs(e){const t=e.frustumVisibilityEnabled?new V:null,i=e.scaleVisibilityEnabled?new j:null,s=(e.filterVisibilityEnabled||e.timeExtentVisibilityEnabled)&&"multipatch"!==e.owner.layer.geometryType?new v:null,r=e.elevationAlignmentEnabled?new w:null,{owner:n,updateClippingExtent:a,dataExtent:o,elevationFeatureExpressionEnabled:l,preferredUpdatePolicy:p}=e;return{owner:n,updateClippingExtent:a,dataExtent:o,frustumVisibility:t,scaleVisibility:i,filterVisibility:s,elevationAlignment:r,elevationFeatureExpressionEnabled:l,preferredUpdatePolicy:p}}get featureSpatialReference(){return"featureSpatialReference"in this.owner?this.owner.featureSpatialReference:void 0}initialize(){const e=new x({owner:this,layer:this.layer,preferredUpdatePolicy:this.preferredUpdatePolicy,elevationFeatureExpressionEnabled:this.elevationFeatureExpressionEnabled,graphicSymbolSupported:!1,hasZ:this.owner.hasZ,hasM:this.owner.hasM});this._set("graphicsCore",e),this.scaleVisibility&&this.updatingHandles.add((()=>this.layer.effectiveScaleRange),(()=>this.scaleVisibility.layerMinMaxScaleChangeHandler())),this.filterVisibility&&(this.updatingHandles.add((()=>"filter"in this.owner&&this.owner.filter),(()=>this.filterVisibility.filterChanged())),this.updatingHandles.add((()=>"timeExtent"in this.owner&&this.owner.timeExtent),(()=>this.filterVisibility.filterChanged()))),this.elevationAlignment&&this.updatingHandles.add((()=>this.layer.elevationInfo),((e,t)=>{c(e,t)&&this.updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())})),this.updatingHandles.add((()=>this.layer.labelsVisible),(()=>this.graphicsCore.updateVisibilityInfo())),this.updatingHandles.add((()=>this.layer.labelingInfo),((e,t)=>{c(e,t)&&this.graphicsCore.updateLabelingInfo()})),this.updatingHandles.add((()=>this.preferredUpdatePolicy),(e=>this.graphicsCore.preferredUpdatePolicy=e))}destroy(){this.handles.removeAll(),this.updatingHandles.removeAll(),this._set("frustumVisibility",r(this.frustumVisibility)),this._set("scaleVisibility",r(this.scaleVisibility)),this._set("filterVisibility",r(this.filterVisibility)),this._set("elevationAlignment",r(this.elevationAlignment)),this._set("objectStates",r(this.objectStates)),this._set("graphicsCore",r(this.graphicsCore)),this._set("owner",null)}get layer(){return this.owner.layer}get suspendResumeExtentMode(){return"suspendResumeExtentMode"in this.owner?this.owner.suspendResumeExtentMode:"computed"}get scaleVisibilitySuspended(){return this.scaleVisibility?.suspended}get suspended(){return this.owner.suspended}get legendEnabled(){return!this.frustumVisibility.suspended}get suspendInfo(){const e={};return this.scaleVisibility?.suspended&&(e.outsideScaleRange=!0),this.frustumVisibility?.suspended&&(e.outsideOfView=!0),e}get updating(){return!!(this.graphicsCore?.updating||this.frustumVisibility?.updating||this.updatingHandles?.updating)}get updatingRemaining(){return this.graphicsCore?.updatingRemaining??0}get featureStore(){return this.graphicsCore?.featureStore}get view(){return this.owner.view}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner?.fullOpacity}get filter(){return"filter"in this.owner?this.owner.filter:null}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get updatePolicy(){return this.owner.updatePolicy}get graphics3DGraphics(){return this.graphicsCore?.graphics3DGraphics}get graphics3DGraphicsByObjectID(){return this.graphicsCore?.graphics3DGraphicsByObjectID}get symbolUpdateType(){return this.graphicsCore?.symbolUpdateType}get displayFeatureLimit(){const e=this.view.resourceController.memoryController.memoryFactor,t=this.graphicsCore?.displayFeatureLimit;if(1===e)return t;const i=Math.ceil(t.maximumNumberOfFeatures*e),s=Math.ceil(t.maximumTotalNumberOfFeatures*e),r=Math.ceil(t.minimumTotalNumberOfFeatures*e);return{...t,maximumNumberOfFeatures:i,maximumTotalNumberOfFeatures:s,minimumTotalNumberOfFeatures:r}}get usedMemory(){return this.graphicsCore?.usedMemory??0}get usedMemoryPerFeature(){return this.graphicsCore?.usedMemoryPerGraphic??0}get unprocessedMemoryEstimate(){return this.graphicsCore?.unprocessedMemoryEstimate??0}get performanceInfo(){return{core:this.graphicsCore.performanceInfo,elevationUpdating:this.elevationAlignment.updating,visibilityFrustum:!this.frustumVisibility.suspended,visibilityScale:!this.scaleVisibility.suspended}}async setup(){this.frustumVisibility&&this.frustumVisibility.setup(this);const e=this.owner,t=this.owner.view.basemapTerrain,i=(e,t,i)=>this.graphicsCore.spatialIndex.queryGraphicUIDsInExtent(e,t,i);if(this.scaleVisibility&&this.scaleVisibility.setup(this,this.layer,i,this.graphicsCore,t),this.filterVisibility&&("filter"in e||"timeExtent"in e)&&this.filterVisibility.setup(e,this.graphicsCore),this.elevationAlignment){const t=e.view.elevationProvider;this.elevationAlignment.setup(this,i,this.graphicsCore,t)}this._set("objectStates",new S(this.graphicsCore)),this._set("labeling",this.owner.view.labeler.addGraphicsOwner(this.graphicsCore,this.scaleVisibility)),this._set("deconfliction",e.view.deconflictor.addGraphicsOwner(this.graphicsCore)),await o(this.graphicsCore.setup({elevationAlignment:this.elevationAlignment,scaleVisibility:this.scaleVisibility,filterVisibility:this.filterVisibility,deconflictor:this.deconfliction,labeler:this.labeling,objectStates:this.objectStates})),this.updatingHandles.add((()=>this.layer.renderer),(e=>this.updatingHandles.addPromise(this.graphicsCore.rendererChange(e)))),this.updatingHandles.add((()=>e.fullOpacity),(()=>this.graphicsCore.opacityChange())),this._setupSuspendResumeExtent(),this.updateClippingExtent&&(this.updatingHandles.add((()=>e.view.clippingArea),(()=>this._updateClippingExtent())),this._updateClippingExtent()),this.graphicsCore.startCreateGraphics(),this.graphicsCore.labelsEnabled&&await o(this.graphicsCore.updateLabelingInfo())}maskOccludee(e){const{set:t,handle:i}=this.objectStates.acquireSet(_.MaskOccludee,null);return this.objectStates.setUid(t,e.uid),i}highlight(e,i){if(e instanceof b){const{set:t,handle:s}=this.objectStates.acquireSet(_.Highlight,i);return this.owner.queryObjectIds(e).then((e=>this.objectStates.setObjectIds(t,e))),s}if("number"==typeof e||"string"==typeof e)return this.highlight([e],i);if(e instanceof t)return this.highlight([e],i);if("toArray"in e&&(e=e.toArray()),Array.isArray(e)&&e.length>0){if(e[0]instanceof t){const t=e;if(null==R(this.layer.fieldsIndex,t[0].attributes,i)){const e=t.map((e=>e.uid)),{set:i,handle:s}=this.objectStates.acquireSet(_.Highlight,null);return this.objectStates.setUids(i,e),s}e=t.map((e=>R(this.layer.fieldsIndex,e.attributes,i)))}if("number"==typeof e[0]||"string"==typeof e[0]){const t=e,{set:s,handle:r}=this.objectStates.acquireSet(_.Highlight,i);return this.objectStates.setObjectIds(s,t),r}}return P}whenGraphicBounds(e,t){return this.graphicsCore?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsCore?.computeAttachmentOrigin(e,t)}notifyGraphicGeometryChanged(e){this.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphicsCore.notifyGraphicVisibilityChanged(e)}getRenderingInfo(e,t,i){const s=g(e,{renderer:t,arcade:i});if(n(s)&&s.color){const e=s.color;e[0]=e[0]/255,e[1]=e[1]/255,e[2]=e[2]/255}return s}getRenderingInfoAsync(e,t,i,s){return f(e,{renderer:t,arcade:i,...s})}getSymbolLayerSize(e,t){return this.graphicsCore?.getSymbolLayerSize(e,t)}setObjectIdVisibility(e,t){this.graphicsCore?.setObjectIdVisibility(e,t)}_updateClippingExtent(){const e=this.owner.view.clippingArea;this.graphicsCore.setClippingExtent(e,this.owner.view.spatialReference)&&(this.updateClippingExtent(e)||this.graphicsCore.recreateAllGraphics())}_setupSuspendResumeExtent(){(this.frustumVisibility||this.scaleVisibility)&&this.handles.add(l((()=>this.suspendResumeExtentMode),(()=>{switch(this.handles.remove(M),this.suspendResumeExtentMode){case"computed":this.handles.add([l((()=>this.graphicsCore.computedExtent),(e=>this._updateSuspendResumeExtent(e)),p),l((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(this.graphicsCore.computedExtent)))],M);break;case"data":this.handles.add([h((()=>this.dataExtent),(e=>this._updateSuspendResumeExtent(e)),p),l((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(a(this.dataExtent))))],M);break;default:i(this.suspendResumeExtentMode)}}),p))}_updateSuspendResumeExtent(e){e?this._suspendResumeExtentChanged(this._extentToSuspendResumeRect(e,this.suspendResumeExtent)):this._suspendResumeExtentChanged(null)}_extentToSuspendResumeRect(e,t){const i=this.owner.view.spatialReference;if(!e.spatialReference.equals(i)){if(!m(e,i))return;e=y(e,i)}return O(e,t,E,this.graphicsCore.extentPadding)}_suspendResumeExtentChanged(e){this.frustumVisibility&&this.frustumVisibility.setExtent(e),this.scaleVisibility&&this.scaleVisibility.setExtent(e)}};e([u()],A.prototype,"type",void 0),e([u({constructOnly:!0})],A.prototype,"owner",void 0),e([u()],A.prototype,"layer",null),e([u({constructOnly:!0})],A.prototype,"updateClippingExtent",void 0),e([u({constructOnly:!0})],A.prototype,"elevationFeatureExpressionEnabled",void 0),e([u({constructOnly:!0})],A.prototype,"graphicsCore",void 0),e([u({constructOnly:!0})],A.prototype,"scaleVisibility",void 0),e([u({constructOnly:!0})],A.prototype,"filterVisibility",void 0),e([u({constructOnly:!0})],A.prototype,"elevationAlignment",void 0),e([u({constructOnly:!0})],A.prototype,"frustumVisibility",void 0),e([u({readOnly:!0})],A.prototype,"deconfliction",void 0),e([u({readOnly:!0})],A.prototype,"labeling",void 0),e([u({readOnly:!0})],A.prototype,"objectStates",void 0),e([u()],A.prototype,"suspendResumeExtentMode",null),e([u()],A.prototype,"dataExtent",void 0),e([u()],A.prototype,"scaleVisibilitySuspended",null),e([u()],A.prototype,"suspended",null),e([u()],A.prototype,"legendEnabled",null),e([u()],A.prototype,"suspendInfo",null),e([u()],A.prototype,"updating",null),e([u()],A.prototype,"updatingRemaining",null),e([u()],A.prototype,"featureStore",null),e([u()],A.prototype,"view",null),e([u()],A.prototype,"loadedGraphics",null),e([u()],A.prototype,"fullOpacity",null),e([u()],A.prototype,"filter",null),e([u()],A.prototype,"slicePlaneEnabled",null),e([u()],A.prototype,"drapeSourceType",void 0),e([u()],A.prototype,"updatePolicy",null),e([u()],A.prototype,"preferredUpdatePolicy",void 0),e([u()],A.prototype,"displayFeatureLimit",null),A=e([d("esri.views.3d.layers.graphics.Graphics3DFeatureProcessor")],A);const I=A,M="suspendResumeExtentMode",P={remove(){},pause(){},resume(){}};export{I as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import i from"../../../../core/Accessor.js";import r from"../../../../core/Handles.js";import t from"../../../../core/Logger.js";import{isSome as s,isNone as o}from"../../../../core/maybe.js";import{ObservableChangesType as l}from"../../../../core/ObservableChangesType.js";import{isAbortError as h}from"../../../../core/promiseUtils.js";import{on as n}from"../../../../core/reactiveUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import u from"../../../../layers/support/FeatureFilter.js";import{getFloorFilterClause as y}from"../../../../layers/support/floorFilterUtils.js";import{VisibilityFlag as d,VisibilityGroup as p}from"./enums.js";import{QueryEngine as _}from"./QueryEngine.js";import{TaskPriority as g}from"../../../support/Scheduler.js";const m=t.getLogger("esri.views.3d.layers.graphics.Graphics3DFilterVisibility");let f=class extends i{constructor(...e){super(...e),this._dirty=!1,this._querying=!1,this._handles=new r}get updating(){return this._dirty||this._querying||s(this._queryResult)}setup(e,i){this._layerView=e,this._core=i,this._objectIdField=e.layer.objectIdField,this._queryEngine=new _({layerView:this._layerView,priority:g.FILTER_VISIBILITY});const r=this._layerView.view.resourceController.scheduler;this._handles.add(r.registerTask(g.FILTER_VISIBILITY,this)),this._handles.add(n((()=>{var e;return null==(e=i.owner)?void 0:e.loadedGraphics}),"after-changes",(e=>this._graphicsChanged(e)),{onListenerAdd:()=>this.dirty=!0})),this.filterChanged()}destroy(){this._handles.destroy(),this._handles=null,this.clear(),this._layerView=null,this._core=null}clear(){this._queryEngine.clear()&&(this._core.modifyGraphics3DGraphicVisibilities((e=>e.clearVisibilityFlag(d.FILTER))),this._queryResult=null,this._querying=!1),this.dirty=!1}_graphicsChanged(e){this._queryEngine&&0==(e.type&l.ADD)||(this.dirty=!0)}updateVisibility(e){this.active&&(e.hasVisibilityFlag(d.FILTER,p.GRAPHIC)||e.setVisibilityFlag(d.FILTER,!1,p.GRAPHIC),this.dirty=!0)}filterChanged(){const e=this._recomputeFilter();e!==this._filter&&(this._filter=e,this.dirty=!0)}get active(){return this._filter&&this._core.graphics3DGraphics.size>0}_recomputeFilter(){const e="filter"in this._layerView?this._layerView.filter:null,i="timeExtent"in this._layerView?this._layerView.timeExtent:null,r=y(this._layerView);if(o(i)&&o(r))return e;const t=s(e)?e.clone():new u;if(s(i)&&(t.timeExtent=s(t.timeExtent)?t.timeExtent.intersection(i):i),s(r)){const e=null==t.where||""===t.where;t.where=e?r:`(${t.where}) AND (${r})`}return t}get running(){return this._dirty&&!this._querying||s(this._queryResult)}runTask(e){if(!this.active)return void this.clear();!this._dirty||this._querying||e.done||(this._querying=!0,this.dirty=!1,this._queryEngine.executeQueryForIdSet(this._filter).then((e=>{this._queryResult=e,this._querying=!1})).catch((e=>{if(!h(e)){m.warn("FeatureFilter query failed: "+e,{error:e});const i=new Set;this._core.graphics3DGraphics.forEach((e=>i.add(this._getFeatureId(e.graphic)))),this._queryResult=i,this._querying=!1}})),e.madeProgress());const i=this._queryResult;s(i)&&!e.done&&(this._core.modifyGraphics3DGraphicVisibilities((r=>{if(e.done)return!1;const t=i.has(this._getFeatureId(r.graphic));return!!r.setVisibilityFlag(d.FILTER,t,p.GRAPHIC)&&(e.madeProgress(),!0)})),e.done||(this._queryResult=null))}_getFeatureId(e){return null==e.objectId?e.attributes[this._objectIdField]:e.objectId}set dirty(e){this._dirty=e}};e([a({readOnly:!0})],f.prototype,"updating",null),e([a({readOnly:!0})],f.prototype,"running",null),e([a()],f.prototype,"_dirty",void 0),e([a()],f.prototype,"_querying",void 0),e([a()],f.prototype,"_queryResult",void 0),f=e([c("esri.views.3d.layers.graphics.Graphics3DFilterVisibility")],f);export{f as Graphics3DFilterVisibility};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import i from"../../../../core/Accessor.js";import t from"../../../../core/Handles.js";import r from"../../../../core/Logger.js";import{isSome as s,isNone as o}from"../../../../core/maybe.js";import{ObservableChangesType as h}from"../../../../core/ObservableChangesType.js";import{isAbortError as l}from"../../../../core/promiseUtils.js";import{on as n}from"../../../../core/reactiveUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import u from"../../../../layers/support/FeatureFilter.js";import{getFloorFilterClause as y}from"../../../../layers/support/floorFilterUtils.js";import{VisibilityFlag as d,VisibilityGroup as p}from"./enums.js";import{QueryEngine as _}from"./QueryEngine.js";import{TaskPriority as g}from"../../../support/Scheduler.js";const m=r.getLogger("esri.views.3d.layers.graphics.Graphics3DFilterVisibility");let f=class extends i{constructor(...e){super(...e),this._dirty=!1,this._querying=!1,this._handles=new t}get updating(){return this._dirty||this._querying||s(this._queryResult)}setup(e,i){this._layerView=e,this._core=i,this._objectIdField=e.layer.objectIdField,this._queryEngine=new _({layerView:this._layerView,priority:g.FILTER_VISIBILITY});const t=this._layerView.view.resourceController.scheduler;this._handles.add(t.registerTask(g.FILTER_VISIBILITY,this)),this._handles.add(n((()=>i.owner?.loadedGraphics),"after-changes",(e=>this._graphicsChanged(e)),{onListenerAdd:()=>this.dirty=!0})),this.filterChanged()}destroy(){this._handles.destroy(),this._handles=null,this.clear(),this._layerView=null,this._core=null}clear(){this._queryEngine.clear()&&(this._core.modifyGraphics3DGraphicVisibilities((e=>e.clearVisibilityFlag(d.FILTER))),this._queryResult=null,this._querying=!1),this.dirty=!1}_graphicsChanged(e){this._queryEngine&&0==(e.type&h.ADD)||(this.dirty=!0)}updateVisibility(e){this.active&&(e.hasVisibilityFlag(d.FILTER,p.GRAPHIC)||e.setVisibilityFlag(d.FILTER,!1,p.GRAPHIC),this.dirty=!0)}filterChanged(){const e=this._recomputeFilter();e!==this._filter&&(this._filter=e,this.dirty=!0)}get active(){return this._filter&&this._core.graphics3DGraphics.size>0}_recomputeFilter(){const e="filter"in this._layerView?this._layerView.filter:null,i="timeExtent"in this._layerView?this._layerView.timeExtent:null,t=y(this._layerView);if(o(i)&&o(t))return e;const r=s(e)?e.clone():new u;if(s(i)&&(r.timeExtent=s(r.timeExtent)?r.timeExtent.intersection(i):i),s(t)){const e=null==r.where||""===r.where;r.where=e?t:`(${r.where}) AND (${t})`}return r}get running(){return this._dirty&&!this._querying||s(this._queryResult)}runTask(e){if(!this.active)return void this.clear();!this._dirty||this._querying||e.done||(this._querying=!0,this.dirty=!1,this._queryEngine.executeQueryForIdSet(this._filter).then((e=>{this._queryResult=e,this._querying=!1})).catch((e=>{if(!l(e)){m.warn("FeatureFilter query failed: "+e,{error:e});const i=new Set;this._core.graphics3DGraphics.forEach((e=>i.add(this._getFeatureId(e.graphic)))),this._queryResult=i,this._querying=!1}})),e.madeProgress());const i=this._queryResult;s(i)&&!e.done&&(this._core.modifyGraphics3DGraphicVisibilities((t=>{if(e.done)return!1;const r=i.has(this._getFeatureId(t.graphic));return!!t.setVisibilityFlag(d.FILTER,r,p.GRAPHIC)&&(e.madeProgress(),!0)})),e.done||(this._queryResult=null))}_getFeatureId(e){return null==e.objectId?e.attributes[this._objectIdField]:e.objectId}set dirty(e){this._dirty=e}};e([a({readOnly:!0})],f.prototype,"updating",null),e([a({readOnly:!0})],f.prototype,"running",null),e([a()],f.prototype,"_dirty",void 0),e([a()],f.prototype,"_querying",void 0),e([a()],f.prototype,"_queryResult",void 0),f=e([c("esri.views.3d.layers.graphics.Graphics3DFilterVisibility")],f);export{f as Graphics3DFilterVisibility};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import s from"../../../../core/Handles.js";import{watch as i,sync as r,initial as n}from"../../../../core/reactiveUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{getReferenceEllipsoid as h}from"../../../../geometry/projectionEllipsoid.js";import{FrustumExtentIntersection as l}from"../../support/FrustumExtentIntersection.js";import{TaskPriority as p}from"../../../support/Scheduler.js";const c=1.2;let u=class extends t{constructor(){super(...arguments),this.suspended=!1,this.extent=null,this.extentIntersectionDirty=!0,this._isVisibleBelowSurface=!1,this.handles=new s,this.graphicsCoreOwner=null,this.updating=!0}setup(e){this.graphicsCoreOwner=e,this.extentIntersection=new l({renderCoordsHelper:e.view.renderCoordsHelper});const t=e.view,s=t.basemapTerrain,o=t.resourceController.scheduler;this.handles.add([t.on("resize",(()=>this._viewChange())),i((()=>t.state.camera),(()=>this._viewChange()),r),o.registerTask(p.FRUSTUM_VISIBILITY,this),s.on("elevation-bounds-change",(()=>this._elevationBoundsChange()))]),"local"===t.viewingMode?this.isVisibleBelowSurface=!0:this.handles.add([i((()=>{var e,i,r;return[s.baseOpacity,s.wireframe,null==(e=t.map)||null==(i=e.ground)||null==(r=i.navigationConstraint)?void 0:r.type]}),(()=>this._updateIsVisibleBelowSurface()),n)])}destroy(){this.graphicsCoreOwner=null,this.extent=null,this.extentIntersection=null,this.handles&&(this.handles.destroy(),this.handles=null)}_setDirty(){this.updating||this._set("updating",!0)}setExtent(e){this.extent=e,this.extentIntersectionDirty=!0,this._setDirty()}_viewChange(){this._setDirty()}_elevationBoundsChange(){this._setDirty(),this.extentIntersectionDirty=!0}set isVisibleBelowSurface(e){this._isVisibleBelowSurface=e,this._setDirty(),this.extentIntersectionDirty=!0}_updateIsVisibleBelowSurface(){const e=this.graphicsCoreOwner.view,t=e.basemapTerrain,s="local"===e.viewingMode,i=e.map.ground&&e.map.ground.navigationConstraint&&"none"===e.map.ground.navigationConstraint.type;this.isVisibleBelowSurface=s||!t.opaque||i}_updateExtentIntersection(){if(!this.extentIntersectionDirty)return;this.extentIntersectionDirty=!1;const e=this.graphicsCoreOwner.view;let t;if(this._isVisibleBelowSurface)t=-.3*h(e.spatialReference).radius;else{const{min:s,max:i}=e.basemapTerrain.elevationBounds;t=s-Math.max(1,(i-s)*(c-1))}this.extentIntersection.update(this.extent,e.spatialReference,t)}get running(){return this.updating}runTask(){if(this._set("updating",!1),!this.extent)return void this._set("suspended",!1);this._updateExtentIntersection();const e=this.graphicsCoreOwner.view.frustum,t=h(this.graphicsCoreOwner.view.spatialReference).radius;this._set("suspended",!this.extentIntersection.isVisibleInFrustum(e,t))}};e([o({readOnly:!0})],u.prototype,"suspended",void 0),e([o({readOnly:!0})],u.prototype,"updating",void 0),u=e([a("esri.views.3d.layers.graphics.Graphics3DFrustumVisibility")],u);const d=u;export{d as default};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import s from"../../../../core/Handles.js";import{watch as i,sync as r,initial as n}from"../../../../core/reactiveUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{getReferenceEllipsoid as h}from"../../../../geometry/projectionEllipsoid.js";import{FrustumExtentIntersection as p}from"../../support/FrustumExtentIntersection.js";import{TaskPriority as c}from"../../../support/Scheduler.js";const l=1.2;let u=class extends t{constructor(){super(...arguments),this.suspended=!1,this.extent=null,this.extentIntersectionDirty=!0,this._isVisibleBelowSurface=!1,this.handles=new s,this.graphicsCoreOwner=null,this.updating=!0}setup(e){this.graphicsCoreOwner=e,this.extentIntersection=new p({renderCoordsHelper:e.view.renderCoordsHelper});const t=e.view,s=t.basemapTerrain,o=t.resourceController.scheduler;this.handles.add([t.on("resize",(()=>this._viewChange())),i((()=>t.state.camera),(()=>this._viewChange()),r),o.registerTask(c.FRUSTUM_VISIBILITY,this),s.on("elevation-bounds-change",(()=>this._elevationBoundsChange()))]),"local"===t.viewingMode?this.isVisibleBelowSurface=!0:this.handles.add([i((()=>[s.baseOpacity,s.wireframe,t.map?.ground?.navigationConstraint?.type]),(()=>this._updateIsVisibleBelowSurface()),n)])}destroy(){this.graphicsCoreOwner=null,this.extent=null,this.extentIntersection=null,this.handles&&(this.handles.destroy(),this.handles=null)}_setDirty(){this.updating||this._set("updating",!0)}setExtent(e){this.extent=e,this.extentIntersectionDirty=!0,this._setDirty()}_viewChange(){this._setDirty()}_elevationBoundsChange(){this._setDirty(),this.extentIntersectionDirty=!0}set isVisibleBelowSurface(e){this._isVisibleBelowSurface=e,this._setDirty(),this.extentIntersectionDirty=!0}_updateIsVisibleBelowSurface(){const e=this.graphicsCoreOwner.view,t=e.basemapTerrain,s="local"===e.viewingMode,i=e.map.ground&&e.map.ground.navigationConstraint&&"none"===e.map.ground.navigationConstraint.type;this.isVisibleBelowSurface=s||!t.opaque||i}_updateExtentIntersection(){if(!this.extentIntersectionDirty)return;this.extentIntersectionDirty=!1;const e=this.graphicsCoreOwner.view;let t;if(this._isVisibleBelowSurface)t=-.3*h(e.spatialReference).radius;else{const{min:s,max:i}=e.basemapTerrain.elevationBounds;t=s-Math.max(1,(i-s)*(l-1))}this.extentIntersection.update(this.extent,e.spatialReference,t)}get running(){return this.updating}runTask(){if(this._set("updating",!1),!this.extent)return void this._set("suspended",!1);this._updateExtentIntersection();const e=this.graphicsCoreOwner.view.frustum,t=h(this.graphicsCoreOwner.view.spatialReference).radius;this._set("suspended",!this.extentIntersection.isVisibleInFrustum(e,t))}};e([o({readOnly:!0})],u.prototype,"suspended",void 0),e([o({readOnly:!0})],u.prototype,"updating",void 0),u=e([a("esri.views.3d.layers.graphics.Graphics3DFrustumVisibility")],u);const d=u;export{d as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../geometry.js";import e from"../../../../core/Error.js";import{applySome as t,isNone as r,isSome as i,releaseMaybe as a,unwrapOr as s,get as o,unwrap as n}from"../../../../core/maybe.js";import{px2pt as l,pt2px as h}from"../../../../core/screenUtils.js";import{I as p}from"../../../../chunks/mat4f64.js";import{s as m}from"../../../../chunks/vec4.js";import{f as c,d}from"../../../../chunks/vec4f64.js";import{create as _,empty as u,expandWithBuffer as y,intersectsClippingArea as g,expandWithAABB as f}from"../../../../geometry/support/aaBoundingBox.js";import{getDriverAxisSizeValueAny as M}from"../../../../renderers/support/renderingInfoUtils.js";import{sharedGeometryElevationAligner as b}from"./ElevationAligners.js";import{SymbolUpdateType as v,elevationModeChangeUpdateType as E,needsElevationUpdates2D as w}from"./elevationAlignmentUtils.js";import{ElevationContext as C}from"./ElevationContext.js";import P from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as L}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as x,getAttributeValue as S}from"./Graphics3DSymbolLayer.js";import{ApplyRendererDiffResult as k}from"./interfaces.js";import{parseCapType as D,geometryToRenderInfo as R,RemoveDuplicateStartEnd as A,createGeometry as U,geometryToRenderInfoDraped as j}from"./lineUtils.js";import{initFastSymbolUpdatesState as z,updateFastSymbolUpdatesState as O}from"../support/FastSymbolUpdates.js";import{prepareMarkerResources as G}from"../support/markerUtils.js";import V from"../../support/debugFlags.js";import{Object3D as T}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as F}from"../../webgl-engine/lib/RenderGeometry.js";import{LineMarkerMaterial as I}from"../../webgl-engine/materials/LineMarkerMaterial.js";import{getStipplePatternForLinePattern as W}from"../../webgl-engine/materials/lineStippleUtils.js";import{RibbonLineMaterial as B}from"../../webgl-engine/materials/RibbonLineMaterial.js";import H from"../../../../geometry/Extent.js";import N from"../../../../geometry/Polygon.js";const q=["polyline","polygon","extent"];class K extends x{constructor(e,t,r,i){super(e,t,r,i),this._uniformSize=1}async doLoad(){if(this._vvConvertOptions={modelSize:[1,1,1],symbolSize:[1,1,1],unitInMeters:1,transformation:{anchor:[0,0,0],scale:[1,1,1],rotation:[0,0,0]},supportedTypes:{size:!0,color:!0,opacity:!0,rotation:!1}},this._context.renderer&&this._context.renderer.visualVariables&&this._context.renderer.visualVariables.length>0?this._fastUpdates=z(this._context.renderer,this._vvConvertOptions):this._fastUpdates={enabled:!1},!this._drivenProperties.size){const t=null!=this.symbolLayer.size?this.symbolLayer.size:l(1);if(t<0)throw new e("graphics3dlinesymbollayer:invalid-size","Symbol sizes may not be negative values");this._uniformSize=t}this._markerTexture=G(this._context.sharedResources.textures,this.symbolLayer.marker)}_getMaterialParameters(e,t=!1){var r;const i=this._getCombinedOpacityAndColor(t&&this._markerColor||this._materialColor);this._patternHidesLine&&!t&&(i[3]=0);const a={width:this._computeMaterialWidth(null==(r=this.symbolLayer)?void 0:r.size),color:i,hasPolygonOffset:!0,join:this.symbolLayer.join||"miter",cap:D(this.symbolLayer.cap||"butt"),hasSlicePlane:this._context.slicePlaneEnabled,isClosed:e,stipplePattern:W(this.symbolLayer.pattern),stippleScaleWithLineWidth:!0};return this._fastUpdates&&this._fastUpdates.visualVariables?{...a,...this._fastUpdates.materialParameters}:a}get _materialColor(){return t(this.symbolLayer.material,(e=>e.color))}get _markerColor(){return t(this.symbolLayer.marker,(e=>e.color))}get lineMaterial(){return r(this._lineMaterial)&&(this._lineMaterial=new B(this._getMaterialParameters(!1)),this._context.stage.add(this._lineMaterial)),this._lineMaterial}get ringMaterial(){return r(this._ringMaterial)&&(this._ringMaterial=new B(this._getMaterialParameters(!0)),this._context.stage.add(this._ringMaterial)),this._ringMaterial}get wireframeLineMaterial(){return r(this._wireframeLineMaterial)&&(this._wireframeLineMaterial=new B({...this._getMaterialParameters(!1),wireframe:!0}),this._context.stage.add(this._wireframeLineMaterial)),this._wireframeLineMaterial}get wireframeRingMaterial(){return r(this._wireframeRingMaterial)&&(this._wireframeRingMaterial=new B({...this._getMaterialParameters(!0),wireframe:!0}),this._context.stage.add(this._wireframeRingMaterial)),this._wireframeRingMaterial}get markerMaterial(){return r(this._markerMaterial)&&i(this.symbolLayer.marker)&&i(this._markerTexture)&&(this._markerMaterial=new I({...this._getMaterialParameters(!1,!0),placement:this.symbolLayer.marker.placement,textureId:this._markerTexture.texture.id}),this._context.stage.add(this._markerMaterial)),this._markerMaterial}destroy(){super.destroy(),this._forEachMaterial((e=>this._context.stage.remove(e))),this._lineMaterial=null,this._ringMaterial=null,this._wireframeLineMaterial=null,this._wireframeRingMaterial=null,this._markerMaterial=null,this._markerTexture=a(this._markerTexture)}_getDrivenSize(e){return this._drivenProperties.size&&e.size?h(M(e.size)):1}_getSizeFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size?S(this._fastUpdates.visualVariables.size.field,e):null}_getDrivenColor(e){const t=c(1,1,1,1);return this._drivenProperties.color&&e.color&&(t[0]=e.color[0],t[1]=e.color[1],t[2]=e.color[2],e.color.length>0&&(t[3]=e.color[3])),this._drivenProperties.opacity&&e.opacity&&(t[3]=e.opacity),t}_getColorFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.color?S(this._fastUpdates.visualVariables.color.field,e):null}_getOpacityFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.opacity?S(this._fastUpdates.visualVariables.opacity.field,e):null}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,q,this.symbolLayer.type))return null;const r=this.setGraphicElevationContext(t,new C);return this.ensureDrapedStatus("on-the-ground"===r.mode),this.draped?this._createAsOverlay(e,this._context.layer.uid):this._createAs3DShape(e,r,t.uid)}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return k.Recreate_Symbol;if(!O(this._fastUpdates,t,this._vvConvertOptions))return k.Recreate_Symbol;this._forEachMaterial((e=>e.setParameters(this._fastUpdates.materialParameters)))}return k.Fast_Update}prepareSymbolLayerPatch(e){var t,r;if("partial"!==e.diff.type)return;const i=e.diff.diff,a={};"complete"===(null==(t=i.size)?void 0:t.type)&&(a.width=this._computeMaterialWidth(i.size.newValue),delete i.size),"complete"===(null==(r=i.cap)?void 0:r.type)&&(a.cap=D(s(i.cap.newValue,"butt")),delete i.cap);const o=this._prepareMarkerPatch(e,i);this._prepareMaterialPatch(e,i,o),e.symbolLayerStatePatches.push((()=>this._forEachMaterial((e=>e.setParameters(a)))))}layerOpacityChanged(){return this._forEachMaterial(((e,t)=>this._updateMaterialLayerOpacity(e,t))),!0}_forEachMaterial(e){i(this._lineMaterial)&&e(this._lineMaterial),i(this._ringMaterial)&&e(this._ringMaterial),i(this._wireframeLineMaterial)&&e(this._wireframeLineMaterial),i(this._wireframeRingMaterial)&&e(this._wireframeRingMaterial),i(this._markerMaterial)&&e(this._markerMaterial,!0)}_updateMaterialLayerOpacity(e,t=!1){const r=e.parameters.color,i=o(this.symbolLayer,"material","color"),a=this._patternHidesLine&&!t?0:this._getCombinedOpacity(i),s=c(r[0],r[1],r[2],a);e.setParameters({color:s})}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,a=E(K.elevationModeChangeTypes,r,i);if(a!==v.UPDATE)return a;const s=w(i);return this.updateGraphics3DGraphicElevationInfo(e,t,(()=>s))}slicePlaneEnabledChanged(){const e={hasSlicePlane:this._context.slicePlaneEnabled};return this._forEachMaterial((t=>t.setParameters(e))),!0}physicalBasedRenderingChanged(){return!0}pixelRatioChanged(){return!0}_getGeometryAsPolygonOrPolyline(e){switch(e.type){case"extent":if(e instanceof H)return N.fromExtent(e);break;case"polygon":case"polyline":return e}return null}_createAs3DShape(e,t,r){const a=e.graphic,s=this._getGeometryAsPolygonOrPolyline(a.geometry),o="polygon"===s.type?s.rings:s.paths,n=new Array,l=new Array,h=new Array,m=_(),c=R(s,this._context.elevationProvider,this._context.renderCoordsHelper,t),d="polygon"===s.type?"rings":"paths";this._logGeometryCreationWarnings(c,o,d,"LineSymbol3DLayer");for(let _=0;_<c.lines.length;_++){const{position:t,mapPosition:r}=c.lines[_];if(i(this._context.clippingExtent)&&(u(m),y(m,r),!g(m,this._context.clippingExtent)))continue;const a=this._createGeometry(e,t,r,s.type,J.ELEVATED);n.push(a),l.push("polygon"===s.type?this.ringMaterial:this.lineMaterial),h.push(p),V.LINE_WIREFRAMES&&(n.push(a.cloneShallow()),l.push("polygon"===s.type?this.wireframeRingMaterial:this.wireframeLineMaterial),h.push(p));const o=this.markerMaterial;i(o)&&(n.push(a.cloneShallow()),l.push(o),h.push(p))}if(0===n.length)return null;const f=new T({geometries:n,materials:l,transformations:h,castShadow:!1,metadata:{layerUid:this._context.layer.uid,graphicUid:r}}),M=new L(this,f,n,null,null,b,t);return M.alignedSampledElevation=c.sampledElevation,M.needsElevationUpdates=w(t.mode),M}_createGeometry(e,t,r,i,a){const s="polygon"===i?A.REMOVE:A.KEEP,o=this._fastUpdates.enabled&&this._fastUpdates.visualVariables.color,n=this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size;return U({overlayInfo:a===J.DRAPED?{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper}:null,removeDuplicateStartEnd:s,uniformSize:this._uniformSize,attributeData:{position:t,mapPosition:r,size:n?null:this._getDrivenSize(e.renderingInfo),color:o?null:this._getDrivenColor(e.renderingInfo),sizeFeature:this._getSizeFeatureAttributeData(e.graphic),colorFeature:this._getColorFeatureAttributeData(e.graphic),opacityFeature:this._getOpacityFeatureAttributeData(e.graphic)}})}_createAsOverlay(e,t){const r=e.graphic,a=this._getGeometryAsPolygonOrPolyline(r.geometry),s="polygon"===a.type?a.rings:a.paths,o="polygon"===a.type?this.ringMaterial:this.lineMaterial;o.renderPriority=this._renderPriority;const l=V.LINE_WIREFRAMES?"polygon"===a.type?this.wireframeRingMaterial:this.wireframeLineMaterial:null,h=this.markerMaterial;i(l)&&(l.renderPriority=this._renderPriority-.001),i(h)&&(h.renderPriority=this._renderPriority-.002);const p=new Array,m=_(),c=u(),d=j(a,this._context.overlaySR),M="polygon"===a.type?"rings":"paths";this._logGeometryCreationWarnings(d,s,M,"LineSymbol3DLayer");for(const _ of d.lines){if(u(m),y(m,_.position),!g(m,this._context.clippingExtent))continue;f(c,m);const s=this._createGeometry(e,_.position,null,a.type,J.DRAPED),d=e=>{const i=new F(s,e,{layerUid:t,graphicUid:r.uid});return p.push(i),i};if(i(h)){const e=d(h),t=n(this.symbolLayer.marker).placement;"begin"!==t&&"begin-end"!==t||y(m,_.position,0,1),"end"!==t&&"begin-end"!==t||y(m,_.position,_.position.length-3,1),this._updateBoundingSphere(e,m)}const M=d(o);if(this._updateBoundingSphere(M,m),V.LINE_WIREFRAMES){const e=d(l);this._updateBoundingSphere(e,m)}}return new P(this,p,c,this._context.drapeSourceRenderer)}_updateBoundingSphere(e,t){m(e.boundingSphere,.5*(t[0]+t[3]),.5*(t[1]+t[4]),0,.5*Math.sqrt((t[3]-t[0])*(t[3]-t[0])+(t[4]-t[1])*(t[4]-t[1])))}get _patternHidesLine(){const e=this.symbolLayer.pattern;return i(e)&&"style"===e.type&&"none"===e.style}_computeMaterialWidth(e){return e=s(e,l(1)),this._drivenProperties.size?this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size?h(1):1:h(e)}_prepareMaterialPatch(e,i,a){const s=i.material;if(r(s))return void(a.changed&&a.useMaterialColor&&this._patchMaterialColor(this._getCombinedOpacityAndColor(this._materialColor),this._markerMaterial,e));if("collection"===s.type)return;const o="complete"===s.type?t(s.newValue,(e=>e.color)):"complete"===s.diff.color.type?s.diff.color.newValue:null,n=this._getCombinedOpacityAndColor(o);a.useMaterialColor&&this._patchMaterialColor(d(n),this._markerMaterial,e),this._patternHidesLine&&(n[3]=0),this._patchMaterialColor(n,this._lineMaterial,e),delete i.material}_prepareMarkerPatch(e,t){const a=t.marker;if(r(a)||"partial"!==a.type||i(a.diff.style)||i(a.diff.placement)||i(a.diff.color)&&"complete"!==a.diff.color.type)return{changed:!1,useMaterialColor:r(this._markerColor)};const s=a.diff.color;if(r(s))return delete t.marker,{changed:!1,useMaterialColor:r(this._markerColor)};const o=n(s.newValue);return r(o)?(delete t.marker,{changed:!0,useMaterialColor:!0}):(this._patchMaterialColor(this._getCombinedOpacityAndColor(o),this._markerMaterial,e),delete t.marker,{changed:!0,useMaterialColor:!1})}_patchMaterialColor(e,t,i){r(t)||i.symbolLayerStatePatches.push((()=>t.setParameters({color:e})))}}var J;K.elevationModeChangeTypes={definedChanged:v.RECREATE,staysOnTheGround:v.NONE,onTheGroundChanged:v.RECREATE},function(e){e[e.DRAPED=0]="DRAPED",e[e.ELEVATED=1]="ELEVATED"}(J||(J={}));export{K as Graphics3DLineSymbolLayer};
5
+ import"../../../../geometry.js";import e from"../../../../core/Error.js";import{applySome as t,isNone as r,isSome as i,releaseMaybe as a,unwrapOr as s,get as o,unwrap as n}from"../../../../core/maybe.js";import{px2pt as l,pt2px as h}from"../../../../core/screenUtils.js";import{I as p}from"../../../../chunks/mat4f64.js";import{s as m}from"../../../../chunks/vec4.js";import{f as c,d}from"../../../../chunks/vec4f64.js";import{create as _,empty as u,expandWithBuffer as y,intersectsClippingArea as g,expandWithAABB as f}from"../../../../geometry/support/aaBoundingBox.js";import{getDriverAxisSizeValueAny as M}from"../../../../renderers/support/renderingInfoUtils.js";import{sharedGeometryElevationAligner as b}from"./ElevationAligners.js";import{SymbolUpdateType as v,elevationModeChangeUpdateType as E,needsElevationUpdates2D as w}from"./elevationAlignmentUtils.js";import{ElevationContext as C}from"./ElevationContext.js";import P from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as L}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as x,getAttributeValue as S}from"./Graphics3DSymbolLayer.js";import{ApplyRendererDiffResult as k}from"./interfaces.js";import{parseCapType as D,geometryToRenderInfo as R,RemoveDuplicateStartEnd as A,createGeometry as U,geometryToRenderInfoDraped as j}from"./lineUtils.js";import{initFastSymbolUpdatesState as z,updateFastSymbolUpdatesState as O}from"../support/FastSymbolUpdates.js";import{prepareMarkerResources as G}from"../support/markerUtils.js";import V from"../../support/debugFlags.js";import{Object3D as T}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as F}from"../../webgl-engine/lib/RenderGeometry.js";import{LineMarkerMaterial as I}from"../../webgl-engine/materials/LineMarkerMaterial.js";import{getStipplePatternForLinePattern as W}from"../../webgl-engine/materials/lineStippleUtils.js";import{RibbonLineMaterial as B}from"../../webgl-engine/materials/RibbonLineMaterial.js";import H from"../../../../geometry/Extent.js";import N from"../../../../geometry/Polygon.js";const q=["polyline","polygon","extent"];class K extends x{constructor(e,t,r,i){super(e,t,r,i),this._uniformSize=1}async doLoad(){if(this._vvConvertOptions={modelSize:[1,1,1],symbolSize:[1,1,1],unitInMeters:1,transformation:{anchor:[0,0,0],scale:[1,1,1],rotation:[0,0,0]},supportedTypes:{size:!0,color:!0,opacity:!0,rotation:!1}},this._context.renderer&&this._context.renderer.visualVariables&&this._context.renderer.visualVariables.length>0?this._fastUpdates=z(this._context.renderer,this._vvConvertOptions):this._fastUpdates={enabled:!1},!this._drivenProperties.size){const t=null!=this.symbolLayer.size?this.symbolLayer.size:l(1);if(t<0)throw new e("graphics3dlinesymbollayer:invalid-size","Symbol sizes may not be negative values");this._uniformSize=t}this._markerTexture=G(this._context.sharedResources.textures,this.symbolLayer.marker)}_getMaterialParameters(e,t=!1){const r=this._getCombinedOpacityAndColor(t&&this._markerColor||this._materialColor);this._patternHidesLine&&!t&&(r[3]=0);const i={width:this._computeMaterialWidth(this.symbolLayer?.size),color:r,hasPolygonOffset:!0,join:this.symbolLayer.join||"miter",cap:D(this.symbolLayer.cap||"butt"),hasSlicePlane:this._context.slicePlaneEnabled,isClosed:e,stipplePattern:W(this.symbolLayer.pattern),stippleScaleWithLineWidth:!0};return this._fastUpdates&&this._fastUpdates.visualVariables?{...i,...this._fastUpdates.materialParameters}:i}get _materialColor(){return t(this.symbolLayer.material,(e=>e.color))}get _markerColor(){return t(this.symbolLayer.marker,(e=>e.color))}get lineMaterial(){return r(this._lineMaterial)&&(this._lineMaterial=new B(this._getMaterialParameters(!1)),this._context.stage.add(this._lineMaterial)),this._lineMaterial}get ringMaterial(){return r(this._ringMaterial)&&(this._ringMaterial=new B(this._getMaterialParameters(!0)),this._context.stage.add(this._ringMaterial)),this._ringMaterial}get wireframeLineMaterial(){return r(this._wireframeLineMaterial)&&(this._wireframeLineMaterial=new B({...this._getMaterialParameters(!1),wireframe:!0}),this._context.stage.add(this._wireframeLineMaterial)),this._wireframeLineMaterial}get wireframeRingMaterial(){return r(this._wireframeRingMaterial)&&(this._wireframeRingMaterial=new B({...this._getMaterialParameters(!0),wireframe:!0}),this._context.stage.add(this._wireframeRingMaterial)),this._wireframeRingMaterial}get markerMaterial(){return r(this._markerMaterial)&&i(this.symbolLayer.marker)&&i(this._markerTexture)&&(this._markerMaterial=new I({...this._getMaterialParameters(!1,!0),placement:this.symbolLayer.marker.placement,textureId:this._markerTexture.texture.id}),this._context.stage.add(this._markerMaterial)),this._markerMaterial}destroy(){super.destroy(),this._forEachMaterial((e=>this._context.stage.remove(e))),this._lineMaterial=null,this._ringMaterial=null,this._wireframeLineMaterial=null,this._wireframeRingMaterial=null,this._markerMaterial=null,this._markerTexture=a(this._markerTexture)}_getDrivenSize(e){return this._drivenProperties.size&&e.size?h(M(e.size)):1}_getSizeFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size?S(this._fastUpdates.visualVariables.size.field,e):null}_getDrivenColor(e){const t=c(1,1,1,1);return this._drivenProperties.color&&e.color&&(t[0]=e.color[0],t[1]=e.color[1],t[2]=e.color[2],e.color.length>0&&(t[3]=e.color[3])),this._drivenProperties.opacity&&e.opacity&&(t[3]=e.opacity),t}_getColorFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.color?S(this._fastUpdates.visualVariables.color.field,e):null}_getOpacityFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.opacity?S(this._fastUpdates.visualVariables.opacity.field,e):null}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,q,this.symbolLayer.type))return null;const r=this.setGraphicElevationContext(t,new C);return this.ensureDrapedStatus("on-the-ground"===r.mode),this.draped?this._createAsOverlay(e,this._context.layer.uid):this._createAs3DShape(e,r,t.uid)}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return k.Recreate_Symbol;if(!O(this._fastUpdates,t,this._vvConvertOptions))return k.Recreate_Symbol;this._forEachMaterial((e=>e.setParameters(this._fastUpdates.materialParameters)))}return k.Fast_Update}prepareSymbolLayerPatch(e){if("partial"!==e.diff.type)return;const t=e.diff.diff,r={};"complete"===t.size?.type&&(r.width=this._computeMaterialWidth(t.size.newValue),delete t.size),"complete"===t.cap?.type&&(r.cap=D(s(t.cap.newValue,"butt")),delete t.cap);const i=this._prepareMarkerPatch(e,t);this._prepareMaterialPatch(e,t,i),e.symbolLayerStatePatches.push((()=>this._forEachMaterial((e=>e.setParameters(r)))))}layerOpacityChanged(){return this._forEachMaterial(((e,t)=>this._updateMaterialLayerOpacity(e,t))),!0}_forEachMaterial(e){i(this._lineMaterial)&&e(this._lineMaterial),i(this._ringMaterial)&&e(this._ringMaterial),i(this._wireframeLineMaterial)&&e(this._wireframeLineMaterial),i(this._wireframeRingMaterial)&&e(this._wireframeRingMaterial),i(this._markerMaterial)&&e(this._markerMaterial,!0)}_updateMaterialLayerOpacity(e,t=!1){const r=e.parameters.color,i=o(this.symbolLayer,"material","color"),a=this._patternHidesLine&&!t?0:this._getCombinedOpacity(i),s=c(r[0],r[1],r[2],a);e.setParameters({color:s})}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,a=E(K.elevationModeChangeTypes,r,i);if(a!==v.UPDATE)return a;const s=w(i);return this.updateGraphics3DGraphicElevationInfo(e,t,(()=>s))}slicePlaneEnabledChanged(){const e={hasSlicePlane:this._context.slicePlaneEnabled};return this._forEachMaterial((t=>t.setParameters(e))),!0}physicalBasedRenderingChanged(){return!0}pixelRatioChanged(){return!0}_getGeometryAsPolygonOrPolyline(e){switch(e.type){case"extent":if(e instanceof H)return N.fromExtent(e);break;case"polygon":case"polyline":return e}return null}_createAs3DShape(e,t,r){const a=e.graphic,s=this._getGeometryAsPolygonOrPolyline(a.geometry),o="polygon"===s.type?s.rings:s.paths,n=new Array,l=new Array,h=new Array,m=_(),c=R(s,this._context.elevationProvider,this._context.renderCoordsHelper,t),d="polygon"===s.type?"rings":"paths";this._logGeometryCreationWarnings(c,o,d,"LineSymbol3DLayer");for(let _=0;_<c.lines.length;_++){const{position:t,mapPosition:r}=c.lines[_];if(i(this._context.clippingExtent)&&(u(m),y(m,r),!g(m,this._context.clippingExtent)))continue;const a=this._createGeometry(e,t,r,s.type,J.ELEVATED);n.push(a),l.push("polygon"===s.type?this.ringMaterial:this.lineMaterial),h.push(p),V.LINE_WIREFRAMES&&(n.push(a.cloneShallow()),l.push("polygon"===s.type?this.wireframeRingMaterial:this.wireframeLineMaterial),h.push(p));const o=this.markerMaterial;i(o)&&(n.push(a.cloneShallow()),l.push(o),h.push(p))}if(0===n.length)return null;const f=new T({geometries:n,materials:l,transformations:h,castShadow:!1,metadata:{layerUid:this._context.layer.uid,graphicUid:r}}),M=new L(this,f,n,null,null,b,t);return M.alignedSampledElevation=c.sampledElevation,M.needsElevationUpdates=w(t.mode),M}_createGeometry(e,t,r,i,a){const s="polygon"===i?A.REMOVE:A.KEEP,o=this._fastUpdates.enabled&&this._fastUpdates.visualVariables.color,n=this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size;return U({overlayInfo:a===J.DRAPED?{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper}:null,removeDuplicateStartEnd:s,uniformSize:this._uniformSize,attributeData:{position:t,mapPosition:r,size:n?null:this._getDrivenSize(e.renderingInfo),color:o?null:this._getDrivenColor(e.renderingInfo),sizeFeature:this._getSizeFeatureAttributeData(e.graphic),colorFeature:this._getColorFeatureAttributeData(e.graphic),opacityFeature:this._getOpacityFeatureAttributeData(e.graphic)}})}_createAsOverlay(e,t){const r=e.graphic,a=this._getGeometryAsPolygonOrPolyline(r.geometry),s="polygon"===a.type?a.rings:a.paths,o="polygon"===a.type?this.ringMaterial:this.lineMaterial;o.renderPriority=this._renderPriority;const l=V.LINE_WIREFRAMES?"polygon"===a.type?this.wireframeRingMaterial:this.wireframeLineMaterial:null,h=this.markerMaterial;i(l)&&(l.renderPriority=this._renderPriority-.001),i(h)&&(h.renderPriority=this._renderPriority-.002);const p=new Array,m=_(),c=u(),d=j(a,this._context.overlaySR),M="polygon"===a.type?"rings":"paths";this._logGeometryCreationWarnings(d,s,M,"LineSymbol3DLayer");for(const _ of d.lines){if(u(m),y(m,_.position),!g(m,this._context.clippingExtent))continue;f(c,m);const s=this._createGeometry(e,_.position,null,a.type,J.DRAPED),d=e=>{const i=new F(s,e,{layerUid:t,graphicUid:r.uid});return p.push(i),i};if(i(h)){const e=d(h),t=n(this.symbolLayer.marker).placement;"begin"!==t&&"begin-end"!==t||y(m,_.position,0,1),"end"!==t&&"begin-end"!==t||y(m,_.position,_.position.length-3,1),this._updateBoundingSphere(e,m)}const M=d(o);if(this._updateBoundingSphere(M,m),V.LINE_WIREFRAMES){const e=d(l);this._updateBoundingSphere(e,m)}}return new P(this,p,c,this._context.drapeSourceRenderer)}_updateBoundingSphere(e,t){m(e.boundingSphere,.5*(t[0]+t[3]),.5*(t[1]+t[4]),0,.5*Math.sqrt((t[3]-t[0])*(t[3]-t[0])+(t[4]-t[1])*(t[4]-t[1])))}get _patternHidesLine(){const e=this.symbolLayer.pattern;return i(e)&&"style"===e.type&&"none"===e.style}_computeMaterialWidth(e){return e=s(e,l(1)),this._drivenProperties.size?this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size?h(1):1:h(e)}_prepareMaterialPatch(e,i,a){const s=i.material;if(r(s))return void(a.changed&&a.useMaterialColor&&this._patchMaterialColor(this._getCombinedOpacityAndColor(this._materialColor),this._markerMaterial,e));if("collection"===s.type)return;const o="complete"===s.type?t(s.newValue,(e=>e.color)):"complete"===s.diff.color.type?s.diff.color.newValue:null,n=this._getCombinedOpacityAndColor(o);a.useMaterialColor&&this._patchMaterialColor(d(n),this._markerMaterial,e),this._patternHidesLine&&(n[3]=0),this._patchMaterialColor(n,this._lineMaterial,e),delete i.material}_prepareMarkerPatch(e,t){const a=t.marker;if(r(a)||"partial"!==a.type||i(a.diff.style)||i(a.diff.placement)||i(a.diff.color)&&"complete"!==a.diff.color.type)return{changed:!1,useMaterialColor:r(this._markerColor)};const s=a.diff.color;if(r(s))return delete t.marker,{changed:!1,useMaterialColor:r(this._markerColor)};const o=n(s.newValue);return r(o)?(delete t.marker,{changed:!0,useMaterialColor:!0}):(this._patchMaterialColor(this._getCombinedOpacityAndColor(o),this._markerMaterial,e),delete t.marker,{changed:!0,useMaterialColor:!1})}_patchMaterialColor(e,t,i){r(t)||i.symbolLayerStatePatches.push((()=>t.setParameters({color:e})))}}var J;K.elevationModeChangeTypes={definedChanged:v.RECREATE,staysOnTheGround:v.NONE,onTheGroundChanged:v.RECREATE},function(e){e[e.DRAPED=0]="DRAPED",e[e.ELEVATED=1]="ELEVATED"}(J||(J={}));export{K as Graphics3DLineSymbolLayer};