@arcgis/core 4.34.0-next.23 → 4.34.0-next.25

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 (438) hide show
  1. package/Basemap.js +1 -1
  2. package/analysis/VolumeMeasurement/CutFillOptions.d.ts +4 -0
  3. package/analysis/VolumeMeasurement/CutFillOptions.js +1 -1
  4. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  5. package/applications/Components/imageryUtils.d.ts +4 -0
  6. package/applications/Components/imageryUtils.js +5 -0
  7. package/arcade/parser.js +1 -1
  8. package/arcade/validation/arcadeValidator.js +1 -1
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/026fbeb0ff5b9e6c74df.js +1 -0
  11. package/assets/esri/core/workers/chunks/{0867aa688fa8938906da.js → 03bef3f4b6b09b1e864b.js} +1 -1
  12. package/assets/esri/core/workers/chunks/06cdbccc9f325dcc303d.js +1 -0
  13. package/assets/esri/core/workers/chunks/07613c89255bdab6b7c6.js +1 -0
  14. package/assets/esri/core/workers/chunks/09618761df5c4fdd52a0.js +1 -0
  15. package/assets/esri/core/workers/chunks/0ae00339991f5387203e.js +1 -0
  16. package/assets/esri/core/workers/chunks/0b4b294f3ce74fde5620.js +1 -0
  17. package/assets/esri/core/workers/chunks/{146520d263b910b5bdc7.js → 0e96a3b7228f1ff8e6c5.js} +1 -1
  18. package/assets/esri/core/workers/chunks/109ef17dd4f9430bb686.js +1 -0
  19. package/assets/esri/core/workers/chunks/1597aca21334cab3b802.js +1 -0
  20. package/assets/esri/core/workers/chunks/196564ad230bef6b59cf.js +1 -0
  21. package/assets/esri/core/workers/chunks/19f8d551cbebc11db1eb.js +1 -0
  22. package/assets/esri/core/workers/chunks/1ceee047e3fa617b0600.js +1 -0
  23. package/assets/esri/core/workers/chunks/1d27701832ea139fcc20.js +1 -0
  24. package/assets/esri/core/workers/chunks/1f296f85becf1ca6714d.js +1 -0
  25. package/assets/esri/core/workers/chunks/1f8d7bd44d53c30df383.js +1 -0
  26. package/assets/esri/core/workers/chunks/1fabb5ec59da698c1618.js +1 -0
  27. package/assets/esri/core/workers/chunks/{919d2fd7ebc0c840a759.js → 219b2911668db120452b.js} +1 -1
  28. package/assets/esri/core/workers/chunks/234cbc290b074eeb5dd6.js +1 -0
  29. package/assets/esri/core/workers/chunks/29ae5723fa35aa73ff9b.js +1 -0
  30. package/assets/esri/core/workers/chunks/2b4b073254fe8b6a081c.js +1 -0
  31. package/assets/esri/core/workers/chunks/30293b88501b5d6162fc.js +1 -0
  32. package/assets/esri/core/workers/chunks/31533f5e8b76b307f61c.js +1 -0
  33. package/assets/esri/core/workers/chunks/347117e61e1c6edd074f.js +1 -0
  34. package/assets/esri/core/workers/chunks/3616eb2607843524483f.js +1 -0
  35. package/assets/esri/core/workers/chunks/36648facd56ee91afc7c.js +1 -0
  36. package/assets/esri/core/workers/chunks/394477e88be0c6790f02.js +1 -0
  37. package/assets/esri/core/workers/chunks/3b80b01551d124534a1b.js +1 -0
  38. package/assets/esri/core/workers/chunks/{89d91ce2f566dd3f57f7.js → 3be9ec0503a669bcfce6.js} +1 -1
  39. package/assets/esri/core/workers/chunks/3c9cf06ac6aa1db6c4f6.js +1 -0
  40. package/assets/esri/core/workers/chunks/40fc7c43feaeef8b814d.js +1 -0
  41. package/assets/esri/core/workers/chunks/42cddc8f8c8d73e22ee2.js +1 -0
  42. package/assets/esri/core/workers/chunks/437a4100a837ee16df7c.js +1 -0
  43. package/assets/esri/core/workers/chunks/{63cc4647b7775ff8aedf.js → 44d28849e59f62616e72.js} +1 -1
  44. package/assets/esri/core/workers/chunks/453e536f566d80a9863b.js +1 -0
  45. package/assets/esri/core/workers/chunks/472c677a74d779ce62d7.js +1 -0
  46. package/assets/esri/core/workers/chunks/4b68b6985430c42316b7.js +1 -0
  47. package/assets/esri/core/workers/chunks/{6bb1ecaa0afc2c7de79e.js → 4cc3eeb0b824c53793d0.js} +1 -1
  48. package/assets/esri/core/workers/chunks/4ce671bc4d36387b55fa.js +1 -0
  49. package/assets/esri/core/workers/chunks/51cfa2f70ec222e1582b.js +1 -0
  50. package/assets/esri/core/workers/chunks/5284d46aecd6fe0345b8.js +1 -0
  51. package/assets/esri/core/workers/chunks/567385709e18ace93b1e.js +1 -0
  52. package/assets/esri/core/workers/chunks/5a9b27f2b343cd5b0852.js +1 -0
  53. package/assets/esri/core/workers/chunks/{4c2f3e43992a918e4c2d.js → 5ef3256c32c4b622bd11.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{5ce62d9fff80d014d186.js → 60aeb7a5ccd8bc71be02.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{55e9b02d70812f7cdac2.js → 63966066a963e9a1fb14.js} +1 -1
  56. package/assets/esri/core/workers/chunks/63f50ff2ae94f684d56b.js +1 -0
  57. package/assets/esri/core/workers/chunks/{8bf04be4052bf148777a.js → 6a1cf6b0ffdf6080b5c4.js} +1 -1
  58. package/assets/esri/core/workers/chunks/6deaa08e3a61a455e564.js +1 -0
  59. package/assets/esri/core/workers/chunks/6e9b4bfe2a1497c96100.js +1 -0
  60. package/assets/esri/core/workers/chunks/6efc3d120c9c2c09cb06.js +1 -0
  61. package/assets/esri/core/workers/chunks/7338ce95bceb2c7fab87.js +1 -0
  62. package/assets/esri/core/workers/chunks/{c64fa94cba71ba2794e2.js → 771012f129890f9a089c.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{d1b363c418a67b087306.js → 780ff9314f26ae62f75f.js} +1 -1
  64. package/assets/esri/core/workers/chunks/820cf4337b248a0cb63c.js +1 -0
  65. package/assets/esri/core/workers/chunks/{b57c0ef7bc57e3c91257.js → 865fccacf44ae5b70eba.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{fedbf639a0788417a70f.js → 86abfce1f2ac93cc4d54.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{c94cc026c4ed330408fb.js → 8894483b91bcda845b6f.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{f050ab9d100012b77bb9.js → 8c5b1114cc2a58305a81.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{6ca764b4baadef5c1515.js → 92737419b66894799a34.js} +1 -1
  70. package/assets/esri/core/workers/chunks/9511e55e4fabb3235eac.js +1 -0
  71. package/assets/esri/core/workers/chunks/{f43110391f124b8a179c.js → 9a78cb291c966f8ddda6.js} +2 -2
  72. package/assets/esri/core/workers/chunks/9f8341caab3b1d02f387.js +1 -0
  73. package/assets/esri/core/workers/chunks/a08d018d8c137fc4ca17.js +1 -0
  74. package/assets/esri/core/workers/chunks/{7051bcc178eb512819f6.js → a55338add265d330124b.js} +1 -1
  75. package/assets/esri/core/workers/chunks/afe4fd3b1b3521712edd.js +1 -0
  76. package/assets/esri/core/workers/chunks/{9991bd3c7991bffd8260.js → b37f3c416cefc1a6ea2c.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{6782114a752b9cc59168.js → b6b8272a74a5c24a6b86.js} +1 -1
  78. package/assets/esri/core/workers/chunks/b9f66d735a7e63417b3d.js +1 -0
  79. package/assets/esri/core/workers/chunks/bb50b4a3af627f91d789.js +1 -0
  80. package/assets/esri/core/workers/chunks/{f42155b7a4e6c5e80757.js → bbc2a4976d044b990193.js} +1 -1
  81. package/assets/esri/core/workers/chunks/bbf2c31d217de1b8ba6e.js +1 -0
  82. package/assets/esri/core/workers/chunks/be3977f7fe0c46a1b493.js +1 -0
  83. package/assets/esri/core/workers/chunks/befba7ceeb26a38732c1.js +1 -0
  84. package/assets/esri/core/workers/chunks/bf3fc71881aa559fc931.js +1 -0
  85. package/assets/esri/core/workers/chunks/c19421707257fc93acb9.js +1 -0
  86. package/assets/esri/core/workers/chunks/c1fb5290e0e259b74389.js +1 -0
  87. package/assets/esri/core/workers/chunks/c361bf4d41a1843d4640.js +1 -0
  88. package/assets/esri/core/workers/chunks/c51099eab5a99c88e5de.js +1 -0
  89. package/assets/esri/core/workers/chunks/c56b05a8be498b6f3ee7.js +1 -0
  90. package/assets/esri/core/workers/chunks/c82e78590c2fabc67609.js +1 -0
  91. package/assets/esri/core/workers/chunks/{cab1a1067f44ce374673.js → c9e580867f7ac17be329.js} +1 -1
  92. package/assets/esri/core/workers/chunks/{92ad9098006568358550.js → cafcb46d723d38b377a9.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{1d75cb1747ffb7b8b050.js → cb81d448ed6bad205346.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{0f6203ae32663b2b52db.js → d08a523b548e892e1222.js} +1 -1
  95. package/assets/esri/core/workers/chunks/d29ae64703a947bfb83b.js +1 -0
  96. package/assets/esri/core/workers/chunks/d2ce360961ca4b58666c.js +1 -0
  97. package/assets/esri/core/workers/chunks/{04c17957c15234ca0321.js → d81260303a11d3fbe940.js} +1 -1
  98. package/assets/esri/core/workers/chunks/de1457b07f4e263f1524.js +1 -0
  99. package/assets/esri/core/workers/chunks/{6bf43bc3714d7b3878fa.js → e547318638c8f496c1a0.js} +1 -1
  100. package/assets/esri/core/workers/chunks/e8e993fb8697b8f3e0c7.js +346 -0
  101. package/assets/esri/core/workers/chunks/{53781ccca16e53d4a8c3.js → f291ccf9da6aa7d7ae23.js} +1 -1
  102. package/assets/esri/core/workers/chunks/f61a8cc7e2b198e521ba.js +1 -0
  103. package/assets/esri/core/workers/chunks/f9442a281cb91c64c7cd.js +1 -0
  104. package/assets/esri/core/workers/chunks/fb785bc38323cce6e549.js +1 -0
  105. package/assets/esri/core/workers/chunks/{c3213b487c11076985af.js → fbf3240b36718fa5dc76.js} +1 -1
  106. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  107. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  108. package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
  109. package/chunks/ComponentShader.glsl.js +36 -36
  110. package/chunks/Envelope.js +1 -1
  111. package/chunks/MultiPathImpl.js +1 -1
  112. package/chunks/OperatorClip.js +1 -1
  113. package/chunks/ProjectionTransformation.js +1 -1
  114. package/chunks/RibbonLine.glsl.js +40 -33
  115. package/chunks/index.js +1 -1
  116. package/chunks/persistableUrlUtils.js +1 -1
  117. package/config.js +1 -1
  118. package/core/AsyncUpdate.js +1 -1
  119. package/core/Clonable.js +1 -1
  120. package/core/Evented.js +1 -1
  121. package/core/Identifiable.js +1 -1
  122. package/core/JSONSupport.js +1 -1
  123. package/core/Loadable.js +1 -1
  124. package/core/MapUtils.js +1 -1
  125. package/core/MemCache.js +1 -1
  126. package/core/MemCachePool.js +1 -1
  127. package/core/MultiOriginJSONSupport.js +1 -1
  128. package/core/ObjectPool.js +1 -1
  129. package/core/Promise.js +1 -1
  130. package/core/ReadOnlyMultiOriginJSONSupport.js +1 -1
  131. package/core/accessorSupport/overrideDefaultsFrom.js +1 -1
  132. package/core/quantity.d.ts +1 -0
  133. package/geometry/operators/gx/operatorOffset.js +1 -1
  134. package/geometry/operators/support/jsonConverter.js +1 -1
  135. package/geometry/support/buffer/BufferPool.js +1 -1
  136. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  137. package/interfaces.d.ts +211 -8
  138. package/kernel.js +1 -1
  139. package/layers/CatalogLayer.js +1 -1
  140. package/layers/FeatureLayer.js +1 -1
  141. package/layers/GeoJSONLayer.js +1 -1
  142. package/layers/SubtypeGroupLayer.js +1 -1
  143. package/layers/knowledgeGraph/KnowledgeGraphSublayerBase.js +1 -1
  144. package/layers/mixins/APIKeyMixin.js +1 -1
  145. package/layers/mixins/ArcGISCachedService.js +1 -1
  146. package/layers/mixins/ArcGISImageService.js +1 -1
  147. package/layers/mixins/ArcGISMapService.js +1 -1
  148. package/layers/mixins/ArcGISService.js +1 -1
  149. package/layers/mixins/BlendLayer.js +1 -1
  150. package/layers/mixins/CustomParametersMixin.js +1 -1
  151. package/layers/mixins/DisplayFilteredLayer.js +1 -1
  152. package/layers/mixins/EditBusLayer.js +1 -1
  153. package/layers/mixins/FeatureEffectLayer.js +1 -1
  154. package/layers/mixins/FeatureLayerBase.js +1 -1
  155. package/layers/mixins/FeatureReductionLayer.js +1 -1
  156. package/layers/mixins/ImageryTileMixin.js +1 -1
  157. package/layers/mixins/OperationalLayer.js +1 -1
  158. package/layers/mixins/OrderedLayer.js +1 -1
  159. package/layers/mixins/PortalLayer.js +1 -1
  160. package/layers/mixins/PublishableLayer.js +1 -1
  161. package/layers/mixins/RasterJobHandlerMixin.js +1 -1
  162. package/layers/mixins/RasterPresetRendererMixin.js +1 -1
  163. package/layers/mixins/RefreshableLayer.js +1 -1
  164. package/layers/mixins/ScaleRangeLayer.js +1 -1
  165. package/layers/mixins/SceneService.js +1 -1
  166. package/layers/mixins/SublayersOwner.js +1 -1
  167. package/layers/mixins/TemporalLayer.js +1 -1
  168. package/layers/mixins/TemporalSceneLayer.js +1 -1
  169. package/layers/mixins/TrackableLayer.js +1 -1
  170. package/layers/ogc/wfsUtils.js +1 -1
  171. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  172. package/layers/orientedImagery/core/bestImageUtils.js +1 -1
  173. package/layers/support/ControlPointsGeoreference.js +1 -1
  174. package/layers/support/PixelBlock.js +1 -1
  175. package/layers/support/RasterJobHandler.js +1 -1
  176. package/layers/support/RasterWorker.js +1 -1
  177. package/layers/support/Sublayer.js +1 -1
  178. package/layers/support/arcgisLayerUrl.js +1 -1
  179. package/layers/support/multiLayerServiceUtils.js +1 -1
  180. package/layers/support/rasterDatasets/pixelReader.js +5 -0
  181. package/layers/support/rasterFormats/pixelRangeUtils.js +1 -1
  182. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  183. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  184. package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
  185. package/layers/video/VideoController.js +1 -1
  186. package/networks/support/UtilityNetworkLookupHelper.js +1 -1
  187. package/package.json +1 -1
  188. package/renderers/mixins/VisualVariablesMixin.js +1 -1
  189. package/renderers/support/DictionaryControlString.js +1 -1
  190. package/rest/support/CameraInfoMixin.js +1 -1
  191. package/rest/support/NormalizationBinParametersMixin.js +1 -1
  192. package/smartMapping/renderers/color.js +1 -1
  193. package/smartMapping/renderers/heatmap.js +1 -1
  194. package/smartMapping/renderers/pieChart.js +1 -1
  195. package/smartMapping/renderers/size.js +1 -1
  196. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  197. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  198. package/smartMapping/renderers/type.js +1 -1
  199. package/smartMapping/symbology/color.js +1 -1
  200. package/smartMapping/symbology/support/utils.js +1 -1
  201. package/support/LayersMixin.js +1 -1
  202. package/support/TablesMixin.js +1 -1
  203. package/support/revision.js +1 -1
  204. package/symbols/cim/cimAnalyzer.js +1 -1
  205. package/symbols/support/utils.js +1 -1
  206. package/views/2d/engine/ParentChildStage.js +1 -1
  207. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  208. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  209. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator.js +1 -1
  210. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MultiRasterMixin.js +1 -1
  211. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
  212. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  213. package/views/2d/engine/webgl/textureUtils.js +1 -1
  214. package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
  215. package/views/2d/layers/LayerView2D.js +1 -1
  216. package/views/2d/layers/MediaLayerView2D.js +1 -1
  217. package/views/2d/layers/TileLayerView2D.js +1 -1
  218. package/views/2d/layers/features/FeatureContainer.js +1 -1
  219. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  220. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  221. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
  222. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  223. package/views/2d/layers/features/support/FeatureFilterEvaluator.js +1 -1
  224. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  225. package/views/2d/layers/support/DebugOverlay.js +1 -1
  226. package/views/3d/analysis/AnalysisView3D.js +1 -1
  227. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementController.js +5 -0
  228. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  229. package/views/3d/analysis/images/heading-rotate-svg.js +1 -1
  230. package/views/3d/analysis/images/tilt-rotate-svg.js +1 -1
  231. package/views/3d/glTF/DefaultLoadingContext.js +1 -1
  232. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  233. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  234. package/views/3d/layers/BuildingSublayerView3D.js +1 -1
  235. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  236. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  237. package/views/3d/layers/FlowSubView3D.js +1 -1
  238. package/views/3d/layers/I3SMeshView3D.js +1 -1
  239. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  240. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  241. package/views/3d/layers/LayerView3D.js +1 -1
  242. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  243. package/views/3d/layers/StreamLayerView3D.js +1 -1
  244. package/views/3d/layers/TiledLayerView3D.js +1 -1
  245. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  246. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  247. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  248. package/views/3d/layers/graphics/Labeler.js +1 -1
  249. package/views/3d/layers/graphics/StreamController.js +5 -0
  250. package/views/3d/layers/graphics/StreamGraphics3DGraphicsPipeline.js +1 -1
  251. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  252. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  253. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  254. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  255. package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
  256. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  257. package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
  258. package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
  259. package/views/3d/layers/support/fetchTile.js +1 -1
  260. package/views/3d/state/ViewStateManager.js +1 -1
  261. package/views/3d/support/MemoryController.js +1 -1
  262. package/views/3d/support/ResourceController.js +1 -1
  263. package/views/3d/support/StreamDataLoader.js +1 -1
  264. package/views/3d/support/StreamDataRequester.js +5 -0
  265. package/views/3d/support/StreamTextureCollection.js +1 -1
  266. package/views/3d/support/engineContent/line.js +1 -1
  267. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  268. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  269. package/views/3d/support/flow/StreamlinesResources3D.js +1 -1
  270. package/views/3d/support/flow/geometryUtils.js +1 -1
  271. package/views/3d/support/index.js +1 -1
  272. package/views/3d/terrain/OverlayRenderer.js +1 -1
  273. package/views/3d/terrain/TerrainRenderer.js +1 -1
  274. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  275. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  276. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
  277. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  278. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  279. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  280. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  281. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  282. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  283. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  284. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  285. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  286. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  287. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  288. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  289. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +17 -0
  290. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  291. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  292. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  293. package/views/BreakpointsOwner.js +1 -1
  294. package/views/DOMContainer.js +1 -1
  295. package/views/PopupView.js +1 -1
  296. package/views/VideoView.js +1 -1
  297. package/views/Viewport2DBaseMixin.js +1 -1
  298. package/views/Viewport2DMixin.js +1 -1
  299. package/views/draw/DrawGraphicTool.js +1 -1
  300. package/views/draw/DrawScreenTool.js +1 -1
  301. package/views/draw/DrawTool.js +1 -1
  302. package/views/draw/MultipointDrawAction.js +1 -1
  303. package/views/draw/PointDrawAction.js +1 -1
  304. package/views/draw/PolygonDrawAction.js +1 -1
  305. package/views/draw/PolylineDrawAction.js +1 -1
  306. package/views/interactive/tooltip/infos/TooltipInfoWithCoordinates.js +1 -1
  307. package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
  308. package/views/layers/CatalogFootprintLayerView.js +1 -1
  309. package/views/layers/CatalogLayerView.js +1 -1
  310. package/views/layers/DimensionLayerView.js +1 -1
  311. package/views/layers/FeatureLayerView.js +1 -1
  312. package/views/layers/ImageryLayerView.js +1 -1
  313. package/views/layers/ImageryTileLayerView.js +1 -1
  314. package/views/layers/LineOfSightLayerView.js +1 -1
  315. package/views/layers/MapImageLayerView.js +1 -1
  316. package/views/layers/MediaLayerView.js +1 -1
  317. package/views/layers/OGCFeatureLayerView.js +1 -1
  318. package/views/layers/PointCloudLayerView.js +1 -1
  319. package/views/layers/RefreshableLayerView.js +1 -1
  320. package/views/layers/StreamLayerView.js +1 -1
  321. package/views/layers/ViewshedLayerView.js +1 -1
  322. package/views/layers/WMSLayerView.js +1 -1
  323. package/views/magnifier/mask-svg.js +1 -1
  324. package/views/magnifier/overlay-svg.js +1 -1
  325. package/views/support/Scheduler.js +1 -1
  326. package/views/video/VideoOperationalDataView.js +1 -1
  327. package/views/webgl/BufferObject.js +1 -1
  328. package/views/webgl/Program.js +1 -1
  329. package/views/webgl/Renderbuffer.js +1 -1
  330. package/views/webgl/Texture.js +1 -1
  331. package/views/webgl/Util.js +1 -1
  332. package/webmap/Bookmark.js +1 -1
  333. package/webscene/SunLighting.js +1 -1
  334. package/webscene/VirtualLighting.js +1 -1
  335. package/webscene/spec-certification/spec.js +1 -1
  336. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  337. package/widgets/BasemapLayerList.js +1 -1
  338. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  339. package/widgets/Directions/DirectionsSearchTool.js +1 -1
  340. package/widgets/Editor/EditorViewModel.js +1 -1
  341. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  342. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  343. package/widgets/Editor/support/SketchController.js +1 -1
  344. package/widgets/Editor/workflowUtils.js +1 -1
  345. package/widgets/Editor.js +1 -1
  346. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  347. package/widgets/Feature/support/FeatureContentMixin.js +1 -1
  348. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  349. package/widgets/FeatureTable/support/EditableColumnTemplateMixin.js +1 -1
  350. package/widgets/LayerList.js +1 -1
  351. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  352. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  353. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  354. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  355. package/widgets/OrientedImageryViewer/mixins/ImageMeasurementMixin.js +1 -1
  356. package/widgets/OrientedImageryViewer/mixins/SketchHandlerMixin.js +1 -1
  357. package/widgets/OrientedImageryViewer/mixins/TriangulatedImageMeasurementMixin.js +1 -1
  358. package/widgets/OrientedImageryViewer/mixins/TriangulatedSketchHandlerMixin.js +1 -1
  359. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  360. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  361. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  362. package/widgets/OrientedImageryViewer.js +1 -1
  363. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  364. package/widgets/PanoramicViewer/PanoramicZoomConditions.js +1 -1
  365. package/widgets/PanoramicViewer.js +1 -1
  366. package/widgets/Print.js +1 -1
  367. package/widgets/Sketch/SketchViewModel.js +1 -1
  368. package/widgets/Sketch/support/ResponsiveToolbar/ToolbarGroupBase.js +1 -1
  369. package/widgets/Slider/SliderViewModel.js +1 -1
  370. package/widgets/support/GoTo.js +1 -1
  371. package/widgets/support/SelectionList.js +1 -1
  372. package/assets/esri/core/workers/chunks/00eef04fd026adaf0df8.js +0 -1
  373. package/assets/esri/core/workers/chunks/0202c2ac73354e3970b2.js +0 -1
  374. package/assets/esri/core/workers/chunks/02dc6e31b1244e5bb785.js +0 -1
  375. package/assets/esri/core/workers/chunks/080c79d6caca3b6a2db2.js +0 -1
  376. package/assets/esri/core/workers/chunks/084236ca316aad980192.js +0 -1
  377. package/assets/esri/core/workers/chunks/0b484224a92b52c34330.js +0 -1
  378. package/assets/esri/core/workers/chunks/0ba6177ba118a0f032e2.js +0 -1
  379. package/assets/esri/core/workers/chunks/16a78f5a82f5ca163816.js +0 -1
  380. package/assets/esri/core/workers/chunks/19ae76283a0cb0fe4dee.js +0 -346
  381. package/assets/esri/core/workers/chunks/1cc30073f8200b67cff6.js +0 -1
  382. package/assets/esri/core/workers/chunks/242b216d61940aebe8e1.js +0 -1
  383. package/assets/esri/core/workers/chunks/32756905bcf11699b3f7.js +0 -1
  384. package/assets/esri/core/workers/chunks/35d238a5a6501f89bed7.js +0 -1
  385. package/assets/esri/core/workers/chunks/3fcd73ba832cb53d3a07.js +0 -1
  386. package/assets/esri/core/workers/chunks/40c1d65039c8f1d6afa0.js +0 -1
  387. package/assets/esri/core/workers/chunks/496e02cfe3d84010f675.js +0 -1
  388. package/assets/esri/core/workers/chunks/49dce142ad1ea4c01d00.js +0 -1
  389. package/assets/esri/core/workers/chunks/4b89d5b9e35bf79b321e.js +0 -1
  390. package/assets/esri/core/workers/chunks/54a49a25845897a15ab1.js +0 -1
  391. package/assets/esri/core/workers/chunks/573a8393bec916dcf16f.js +0 -1
  392. package/assets/esri/core/workers/chunks/576e408fb0834f3948e8.js +0 -1
  393. package/assets/esri/core/workers/chunks/5e805c9e9012dd39ec86.js +0 -1
  394. package/assets/esri/core/workers/chunks/6136bf09950adc46bc33.js +0 -1
  395. package/assets/esri/core/workers/chunks/666afe669866c44830bd.js +0 -1
  396. package/assets/esri/core/workers/chunks/6a0fbc54638f7de138c1.js +0 -1
  397. package/assets/esri/core/workers/chunks/81006d9eed65bbb82962.js +0 -1
  398. package/assets/esri/core/workers/chunks/843b6029d4c13115e1ac.js +0 -1
  399. package/assets/esri/core/workers/chunks/86d6007c45f2aa643ac8.js +0 -1
  400. package/assets/esri/core/workers/chunks/8ea34878a1ef24b4ded3.js +0 -1
  401. package/assets/esri/core/workers/chunks/8eea6251aa09725e654e.js +0 -1
  402. package/assets/esri/core/workers/chunks/90145d49a0cec902435c.js +0 -1
  403. package/assets/esri/core/workers/chunks/916691122d7fb38497d6.js +0 -1
  404. package/assets/esri/core/workers/chunks/9ae18a17f62d91167202.js +0 -1
  405. package/assets/esri/core/workers/chunks/9c510df592befb9ff892.js +0 -1
  406. package/assets/esri/core/workers/chunks/9f91d519da67714f915f.js +0 -1
  407. package/assets/esri/core/workers/chunks/a6a7279b09d7962147ec.js +0 -1
  408. package/assets/esri/core/workers/chunks/aba520714efc01bead36.js +0 -1
  409. package/assets/esri/core/workers/chunks/acb9c166259872828646.js +0 -1
  410. package/assets/esri/core/workers/chunks/accff253af360c34e8a8.js +0 -1
  411. package/assets/esri/core/workers/chunks/ad3871f497ecea1a08c9.js +0 -1
  412. package/assets/esri/core/workers/chunks/ae6eed26fc932bc08356.js +0 -1
  413. package/assets/esri/core/workers/chunks/b4bb461955a4c2bce072.js +0 -1
  414. package/assets/esri/core/workers/chunks/b98279213f45a0c27600.js +0 -1
  415. package/assets/esri/core/workers/chunks/ba5b24beebeb703b5919.js +0 -1
  416. package/assets/esri/core/workers/chunks/bd7d19ba0c7d9143a455.js +0 -1
  417. package/assets/esri/core/workers/chunks/bffaf1f20f18c75fad4e.js +0 -1
  418. package/assets/esri/core/workers/chunks/c4f8da6c238eb5e91f91.js +0 -1
  419. package/assets/esri/core/workers/chunks/cd64181298d82c8d0e9d.js +0 -1
  420. package/assets/esri/core/workers/chunks/cdabea4718a7e7d34cb8.js +0 -1
  421. package/assets/esri/core/workers/chunks/ce7155ae63e7bb74be00.js +0 -1
  422. package/assets/esri/core/workers/chunks/d45383d76ba99718b6d9.js +0 -1
  423. package/assets/esri/core/workers/chunks/d915d0a30d9beb24bd3a.js +0 -1
  424. package/assets/esri/core/workers/chunks/dc6538a2d5a1e60d0209.js +0 -1
  425. package/assets/esri/core/workers/chunks/dca633ae3bfd4a3f9bb3.js +0 -1
  426. package/assets/esri/core/workers/chunks/def8a854a05f17d3538e.js +0 -1
  427. package/assets/esri/core/workers/chunks/dfa7976085f7408a366c.js +0 -1
  428. package/assets/esri/core/workers/chunks/e0a5b499b3ae38c21278.js +0 -1
  429. package/assets/esri/core/workers/chunks/e1a20ba7d6279f59adc0.js +0 -1
  430. package/assets/esri/core/workers/chunks/e49a135a2933306a6105.js +0 -1
  431. package/assets/esri/core/workers/chunks/e9a9174c4d1a0a9effb6.js +0 -1
  432. package/assets/esri/core/workers/chunks/edead1a123860cc74b1b.js +0 -1
  433. package/assets/esri/core/workers/chunks/f3d5d92e0aefc2593208.js +0 -1
  434. package/assets/esri/core/workers/chunks/f90573c9dc36e51cd588.js +0 -1
  435. package/assets/esri/core/workers/chunks/fa9658dbfb921f9c13af.js +0 -1
  436. package/assets/esri/core/workers/chunks/fb5e2b1ced03eef28e96.js +0 -1
  437. package/assets/esri/core/workers/chunks/fd8f4eabb8bbc593dd9c.js +0 -1
  438. package/layers/graphics/controllers/StreamController.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.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{isSome as s}from"../../../../core/arrayUtils.js";import has from"../../../../core/has.js";import r from"../../../../core/Identifiable.js";import{assertIsSome as i}from"../../../../core/maybe.js";import{ignoreAbortErrors as o,throwIfAborted as a}from"../../../../core/promiseUtils.js";import{watch as n}from"../../../../core/reactiveUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as d}from"../../../../core/accessorSupport/decorators/subclass.js";import{create as c}from"../../../../geometry/support/aaBoundingRect.js";import{isPolyline as l,isPolygon as p,isExtent as u,getJsonType as m}from"../../../../geometry/support/jsonUtils.js";import g from"../../../../layers/support/FieldsIndex.js";import{symbolToCIM as f,CIMSymbolHelper as y}from"../../../../symbols/cim/CIMSymbolHelper.js";import{OverrideHelper as _}from"../../../../symbols/cim/OverrideHelper.js";import{errorPointSymbol2D as b,errorPolylineSymbol2D as w,errorPolygonSymbol2D as S}from"../../../../symbols/support/defaults.js";import{filterFlag0 as I}from"../../engine/webgl/definitions.js";import{FeatureTile as v}from"../../engine/webgl/FeatureTile.js";import{MeshData as T}from"../../engine/webgl/mesh/MeshData.js";import{ResourceProxy as M}from"../../engine/webgl/mesh/factories/ResourceProxy.js";import{createGraphicSymbolMeshSchemas as R}from"../../engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js";import{createStorageSchema as j}from"../features/schema/processor/StorageSchema.js";import{AttributeStore as x}from"../features/support/AttributeStore.js";import{ComputedAttributeStorage as U}from"../features/support/ComputedAttributeStorage.js";import{GraphicsMetadata as C}from"../features/support/FeatureMetadata.js";import{GraphicsReader as q}from"../features/support/GraphicsReader.js";import G from"./GraphicStore.js";import{FeatureCommandQueue as k}from"../support/FeatureCommandQueue.js";import{UpdateTracking2D as P}from"../support/UpdateTracking2D.js";class F{static getOrCreate(e,t,s){let r=t.get(e.id);return r||(r=new F(e,s),t.set(e.id,r)),r}static fromItems(e,t,s){const r=new F(e,s);for(const i of t)r.append(i);return r}constructor(e,t){this.tile=e,this.metadata=t,this.addedOrModified=[],this.removed=[],this.objectIdMap=null}get reader(){return this._reader||(this._reader=q.from(this.addedOrModified,this.tile,this.metadata)),this._reader}append(e){this.addedOrModified.push(e),e.hasAnimations&&(this.objectIdMap=this.objectIdMap||{},this.objectIdMap[e.displayId]=e.objectId)}}let O=class extends(r.IdentifiableMixin(t)){constructor(e){super(e),this._attached=!1,this._tiles=new Map,this._controller=new AbortController,this._hashToSymbolInfo=new Map,this._lastCleanup=performance.now(),this._cleanupRequired=!0,this.lastUpdateId=-1,this.renderer=null,this._updateTracking=new P({debugName:"GraphicsView2D"}),this.updateRequested=!1,this.defaultPointSymbolEnabled=!0,this._commandQueue=new k({process:e=>{if("update"===e.type)return this._update();throw new Error("InternalError: Unsupported command")}}),this.graphicUpdateHandler=this.graphicUpdateHandler.bind(this)}destroy(){this.container.destroy(),this.view=null,this.renderer=null,this._set("graphics",null),this._controller.abort(),this._graphicStore.clear(),this._graphicStore.destroy(),this._attributeStore=null,this._hashToSymbolInfo.clear(),this._updateTracking.destroy(),this._commandQueue.destroy()}_initAttributeStore(){this._storage=new U({spatialReference:this.view.spatialReference,fields:new g}),this._attributeStore=new x({isLocal:!0,update:e=>{has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView2D.AttributeStoreView.updateStart`,{message:e}),this.container.attributeView.requestUpdate(e),this.container.requestRender(),has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView2D.AttributeStoreView.updateEnd`,{message:e})}});const e=j(null,[]);this._attributeStore.update(e,this._storage,null),this.container.checkHighlight=()=>this._attributeStore.hasHighlight}initialize(){this._initAttributeStore(),this._metadata=C.createGraphics(this.view.spatialReference),this._resourceProxy=new M({fetch:e=>Promise.all(e.map(e=>this.view.stage.textureManager.rasterizeItem(e))),fetchDictionary:e=>{throw new Error("InternalError: Graphics do not support Dictionary requests")}}),this.addHandles([n(()=>this._effectiveRenderer,()=>this._pushUpdate()),this.view.graphicsTileStore.on("update",this._onTileUpdate.bind(this)),this.container.on("attach",()=>{this.addHandles([this.graphics.on("change",()=>this._pushUpdate())]),this._graphicStore?.destroy(),this._graphicStore=new G(this.view.spatialReference,this._cimResourceManager,this.view.featuresTilingScheme,this.view.state.scale,this._attributeStore),this._attached=!0,this.requestUpdate(),this._pushUpdate()})]),this._updateTracking.addUpdateTracking("CommandQueue",this._commandQueue.updateTracking);const e=this.view.graphicsTileStore.tiles;this._onTileUpdate({added:e,removed:[]})}get _effectiveRenderer(){return"function"==typeof this.renderer?this.renderer():this.renderer}get _cimResourceManager(){return this.view.stage.textureManager.resourceManager}get updating(){const e=!this._attached||this._updateTracking.updating;return has("esri-2d-log-updating")&&console.log(`Updating GraphicsView2D: ${e}\n -> attaching ${!this._attached}\n -> updateTracking ${this._updateTracking.updating}`),e}hitTest(e){if(!this.view||this.view.suspended)return[];const{resolution:t,rotation:r}=this.view.state,i=this._graphicStore.hitTest(e.x,e.y,2,t,r),o=new Set(i),a=this.graphics.items.reduce((e,t)=>(o.has(t.uid)&&e.set(t.uid,t),e),new Map);return i.map(e=>a.get(e)).filter(s)}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.requestUpdateCallback()),this.notifyChange("updating")}processUpdate(e){this.updateRequested&&(this.updateRequested=!1,this.update(e))}viewChange(){this.requestUpdate()}setHighlight(e){const t=[];for(const{objectId:s,highlightFlags:r}of e){const e=this._graphicStore.getItem(s)?.displayId;t.push({objectId:s,highlightFlags:r,displayId:e})}this._attributeStore.setHighlight(t,e),this._pushUpdate()}graphicUpdateHandler(e){this._pushUpdate()}update(e){this.updateRequested=!1,this._attached&&this._graphicStore.updateLevel(e.state.resolution)&&this.pushUpdate()}pushUpdate(){this._pushUpdate()}_pushUpdate(){o(this._commandQueue.push({type:"update"}))}async _update(){try{has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView._update start`);const e=await this._graphicStore.update(this.graphics,e=>this._getSymbolForGraphic(e),e=>this._ensureSymbolResource(e));for(const s of e.updated)this.container.restartAnimation(s.objectId);if(!e.hasAnyUpdate())return void this._attributeStore.sendUpdates();e.removed.length&&(this._cleanupRequired=!0),has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView updateMessage`,e);const t=this._createTileMessages(e);await this._densifyItemsForDisplay(t),await this._fetchResources(t),this._write(t);for(const s of e.added)this._setFilterState(s);for(const s of e.updated)this._setFilterState(s);has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView sendUpdate`,e),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView sendUpdate.await`,e)}catch(e){}this._cleanupSharedResources()}_createTileMessages(e){const t=new Map;for(const s of e.added){const e=this.view.graphicsTileStore.getIntersectingTiles(s.symbolBounds);for(const r of e){F.getOrCreate(r,t,this._metadata).append(s)}}for(const s of e.updated){const e=this.view.graphicsTileStore.getIntersectingTiles(s.prevSymbolBounds),r=this.view.graphicsTileStore.getIntersectingTiles(s.symbolBounds);for(const i of e){F.getOrCreate(i,t,this._metadata).removed.push(s.displayId)}for(const i of r){F.getOrCreate(i,t,this._metadata).append(s)}}for(const s of e.removed){const e=this.view.graphicsTileStore.getIntersectingTiles(s.symbolBounds);for(const r of e){F.getOrCreate(r,t,this._metadata).removed.push(s.displayId)}}return Array.from(t.values())}async _densifyItemsForDisplay(e){const t=new Map;for(const s of e)for(const e of s.addedOrModified)t.has(e)||t.set(e,e.densifyCurvedGeometryForDisplay(this.view.spatialReference));await Promise.all(t.values())}async _fetchResources(e){const t={timeZone:null,timeExtent:null};for(const{tile:s,reader:r}of e){has("esri-2d-update-debug")&&console.debug(`Id[${this.layerId}] Tile[${s.id}] GraphicsView fetchResources`,e);const i=r.getCursor();for(;i.next();)for(const e of i.getMeshWriters())e.enqueueRequest(this._resourceProxy,i,s.createArcadeEvaluationOptions(t))}await this._resourceProxy.fetchEnqueuedResources()}_write(e){for(const t of e){has("esri-2d-update-debug")&&console.debug(`Id[${this.layerId}] Tile[${t.tile.id}] GraphicsView write`,t);const e=this._writeMeshes(t);let s=this._tiles.get(t.tile.key);s||(s=this._createFeatureTile(t.tile.key)),has("esri-2d-update-debug")&&console.debug(`Id[${this.layerId}] Tile[${t.tile.id}] GraphicsView onTileData`,t),this.container.onTileData(s,{type:"update",modify:e,remove:t.removed,end:!1,attributeEpoch:this._attributeStore.epoch,objectIdMap:t.objectIdMap}),this.container.requestRender()}}_writeMeshes(e){const t={timeZone:null,timeExtent:null},s=new T(e.tile.id),r=e.reader.getCursor();for(;r.next();){s.entityStart(r.getDisplayId(),r.getZOrder());for(const i of r.getMeshWriters())i.write(s,this._resourceProxy,r,e.tile.createArcadeEvaluationOptions(t),e.tile.level);s.entityEnd()}return{...s.serialize().message,tileId:e.tile.id}}_setFilterState(e){const t=e.displayId,s=this._attributeStore.getHighlightFlags(e.objectId);this._attributeStore.setData(t,0,0,s|(e.visible?I:0))}_getSymbolForGraphic(e){return null!=e.symbol?e.symbol:null!=this._effectiveRenderer?this._effectiveRenderer.getSymbol(e):this._getNullSymbol(e)}async _ensureSymbolResource(e){if(!e.symbol)return;const t=await this._getSymbolInfo(e.symbol);if(!t)return;const s=t.linearCIM.filter(e=>"text"===e.type);if(s.length>0){const r=await this._getTextResources(e,s);e.symbolResource={symbolInfo:t,textInfo:r}}else e.symbolResource={symbolInfo:t}}_getSymbolInfo(e){const t=e.hash();return this._hashToSymbolInfo.has(t)||this._hashToSymbolInfo.set(t,this._createSymbolInfo(t,e).catch(e=>null)),this._hashToSymbolInfo.get(t)}async _createSymbolInfo(e,t){const s=await this._convertToCIMSymbol(t),r=await this._createLinearCIM(s);return{hash:e,cimSymbol:s,linearCIM:r,meshWriters:await this._createMeshWriters(s,r)}}async _convertToCIMSymbol(e){const t=f(e);return"web-style"===t.type?this._convertToCIMSymbol(await t.fetchSymbol({acceptedFormats:["cim","web"]})):t}async _createLinearCIM(e){return await Promise.all(y.fetchResources(e.symbol,this._cimResourceManager,[])),this.view.stage.cimAnalyzer.analyzeSymbolReference(e,!1)}async _createMeshWriters(e,t){a(this._controller.signal);const s=this.container.instanceStore,r=this.view.stage.meshWriterRegistry,i=await R(e,t,s);return Promise.all(i.map(e=>r.createMeshWriter(this._storage,this._resourceProxy,{tileInfo:this.view.featuresTilingScheme.tileInfo},e,null)))}_onTileUpdate(e){if(e.added&&e.added.length>0)for(const t of e.added)this._updateTracking.addPromise(this._addTile(t));if(e.removed&&e.removed.length>0)for(const t of e.removed)this._removeTile(t.key)}_createFeatureTile(e){const t=this.view.featuresTilingScheme.getTileBounds(c(),e),s=this.view.featuresTilingScheme.getTileResolution(e.level),r=new v(e,s,t[0],t[3]);return this._tiles.set(e,r),this.container.addChild(r),r}async _addTile(e){if(!this._attached)return;const t=this._graphicStore.queryItems(e);if(!t.length)return;const s=this._createFeatureTile(e.key),r=F.fromItems(e,t,this._metadata);await this._densifyItemsForDisplay([r]),await this._fetchResources([r]);const i=this._writeMeshes(r);s.onMessage({type:"append",append:i,clear:!1,end:!0,attributeEpoch:this._attributeStore.epoch,objectIdMap:r.objectIdMap})}_removeTile(e){if(!this._tiles.has(e))return;const t=this._tiles.get(e);this.container.removeChild(t),t.destroy(),this._tiles.delete(e)}_getNullSymbol(e){const t=e.geometry;return t?l(t)?w:p(t)||u(t)?S:this.defaultPointSymbolEnabled?b:null:this.defaultPointSymbolEnabled?b:null}async _getTextResources(e,t){const s=new Array,r=new Array;for(let i=0;i<t.length;i++){const o=t[i],{resource:a,overrides:n}=o.textRasterizationParam;if(n?.length>0){const t=_.resolveSymbolOverrides({type:"CIMSymbolReference",primitiveOverrides:n,symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,size:a.symbol.height,anchorPointUnits:"Relative",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:a.symbol,textString:a.textString}],scaleSymbolsProportionally:!0,respectFrame:!0}]}},e,this.view.spatialReference,null,m(e.projectedGeometry),null,null);t.then(e=>{const t=e.symbolLayers[0],{textString:s}=t.markerGraphics[0];r.push({type:"cim-rasterization-info",resource:{type:"text",textString:s||"",font:a.font}}),o.text=a.textString=s||""}),s.push(t)}else r.push({type:"cim-rasterization-info",resource:a})}s.length>0&&await Promise.all(s);const o=r.map(e=>this.view.stage.textureManager.rasterizeItem(e)),a=await Promise.all(o);i(a);const n=new Map;for(let i=0;i<t.length;i++){const e=t[i];n.set(e.textRasterizationParam.resource.symbol,{text:e.text,glyphMosaicItems:a[i]})}return n}_cleanupSharedResources(){if(!this._cleanupRequired)return;const e=performance.now();if(e-this._lastCleanup<5e3)return;this._cleanupRequired=!1,this._lastCleanup=e;const t=new Set;for(const r of this._graphicStore.items()){const e=r.symbolResource?.symbolInfo.hash;t.add(e)}const s=new Set(this._hashToSymbolInfo.keys());for(const r of s.values())t.has(r)||this._hashToSymbolInfo.delete(r)}};e([h()],O.prototype,"_effectiveRenderer",null),e([h({constructOnly:!0})],O.prototype,"layerId",void 0),e([h({constructOnly:!0})],O.prototype,"requestUpdateCallback",void 0),e([h()],O.prototype,"container",void 0),e([h({constructOnly:!0})],O.prototype,"graphics",void 0),e([h()],O.prototype,"renderer",void 0),e([h()],O.prototype,"_updateTracking",void 0),e([h()],O.prototype,"updating",null),e([h()],O.prototype,"view",void 0),e([h()],O.prototype,"updateRequested",void 0),e([h()],O.prototype,"defaultPointSymbolEnabled",void 0),O=e([d("esri.views.2d.layers.graphics.GraphicsView2D")],O);export{O as default};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{isSome as s}from"../../../../core/arrayUtils.js";import has from"../../../../core/has.js";import r from"../../../../core/Identifiable.js";import{assertIsSome as i}from"../../../../core/maybe.js";import{ignoreAbortErrors as o,throwIfAborted as a}from"../../../../core/promiseUtils.js";import{watch as n}from"../../../../core/reactiveUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as d}from"../../../../core/accessorSupport/decorators/subclass.js";import{create as c}from"../../../../geometry/support/aaBoundingRect.js";import{isPolyline as l,isPolygon as p,isExtent as u,getJsonType as m}from"../../../../geometry/support/jsonUtils.js";import g from"../../../../layers/support/FieldsIndex.js";import{symbolToCIM as f,CIMSymbolHelper as y}from"../../../../symbols/cim/CIMSymbolHelper.js";import{OverrideHelper as _}from"../../../../symbols/cim/OverrideHelper.js";import{errorPointSymbol2D as b,errorPolylineSymbol2D as w,errorPolygonSymbol2D as S}from"../../../../symbols/support/defaults.js";import{filterFlag0 as I}from"../../engine/webgl/definitions.js";import{FeatureTile as v}from"../../engine/webgl/FeatureTile.js";import{MeshData as T}from"../../engine/webgl/mesh/MeshData.js";import{ResourceProxy as M}from"../../engine/webgl/mesh/factories/ResourceProxy.js";import{createGraphicSymbolMeshSchemas as R}from"../../engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js";import{createStorageSchema as j}from"../features/schema/processor/StorageSchema.js";import{AttributeStore as x}from"../features/support/AttributeStore.js";import{ComputedAttributeStorage as U}from"../features/support/ComputedAttributeStorage.js";import{GraphicsMetadata as C}from"../features/support/FeatureMetadata.js";import{GraphicsReader as q}from"../features/support/GraphicsReader.js";import G from"./GraphicStore.js";import{FeatureCommandQueue as k}from"../support/FeatureCommandQueue.js";import{UpdateTracking2D as P}from"../support/UpdateTracking2D.js";class F{static getOrCreate(e,t,s){let r=t.get(e.id);return r||(r=new F(e,s),t.set(e.id,r)),r}static fromItems(e,t,s){const r=new F(e,s);for(const i of t)r.append(i);return r}constructor(e,t){this.tile=e,this.metadata=t,this.addedOrModified=[],this.removed=[],this.objectIdMap=null}get reader(){return this._reader||(this._reader=q.from(this.addedOrModified,this.tile,this.metadata)),this._reader}append(e){this.addedOrModified.push(e),e.hasAnimations&&(this.objectIdMap=this.objectIdMap||{},this.objectIdMap[e.displayId]=e.objectId)}}let O=class extends(r.IdentifiableMixin(t)){constructor(e){super(e),this._attached=!1,this._tiles=new Map,this._controller=new AbortController,this._hashToSymbolInfo=new Map,this._lastCleanup=performance.now(),this._cleanupRequired=!0,this.lastUpdateId=-1,this.renderer=null,this._updateTracking=new P({debugName:"GraphicsView2D"}),this.updateRequested=!1,this.defaultPointSymbolEnabled=!0,this._commandQueue=new k({process:e=>{if("update"===e.type)return this._update();throw new Error("InternalError: Unsupported command")}}),this.graphicUpdateHandler=this.graphicUpdateHandler.bind(this)}destroy(){this.container.destroy(),this.view=null,this.renderer=null,this._set("graphics",null),this._controller.abort(),this._graphicStore.clear(),this._graphicStore.destroy(),this._attributeStore=null,this._hashToSymbolInfo.clear(),this._updateTracking.destroy(),this._commandQueue.destroy()}_initAttributeStore(){this._storage=new U({spatialReference:this.view.spatialReference,fields:new g}),this._attributeStore=new x({isLocal:!0,update:e=>{has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView2D.AttributeStoreView.updateStart`,{message:e}),this.container.attributeView.requestUpdate(e),this.container.requestRender(),has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView2D.AttributeStoreView.updateEnd`,{message:e})}});const e=j(null,[]);this._attributeStore.update(e,this._storage,null),this.container.checkHighlight=()=>this._attributeStore.hasHighlight}initialize(){this._initAttributeStore(),this._metadata=C.createGraphics(this.view.spatialReference),this._resourceProxy=new M({fetch:e=>Promise.all(e.map(e=>this.view.stage.textureManager.rasterizeItem(e))),fetchDictionary:e=>{throw new Error("InternalError: Graphics do not support Dictionary requests")}}),this.addHandles([n(()=>this._effectiveRenderer,()=>this._pushUpdate()),this.view.graphicsTileStore.on("update",this._onTileUpdate.bind(this)),this.container.on("attach",()=>{this.addHandles([this.graphics.on("change",()=>this._pushUpdate())]),this._graphicStore?.destroy(),this._graphicStore=new G(this.view.spatialReference,this._cimResourceManager,this.view.featuresTilingScheme,this.view.state.scale,this._attributeStore),this._attached=!0,this.requestUpdate(),this._pushUpdate()})]),this._updateTracking.addUpdateTracking("CommandQueue",this._commandQueue.updateTracking);const e=this.view.graphicsTileStore.tiles;this._onTileUpdate({added:e,removed:[]})}get _effectiveRenderer(){return"function"==typeof this.renderer?this.renderer():this.renderer}get _cimResourceManager(){return this.view.stage.textureManager.resourceManager}get updating(){const e=!this._attached||this._updateTracking.updating;return has("esri-2d-log-updating")&&console.log(`Updating GraphicsView2D: ${e}\n -> attaching ${!this._attached}\n -> updateTracking ${this._updateTracking.updating}`),e}hitTest(e){if(!this.view||this.view.suspended)return[];const{resolution:t,rotation:r}=this.view.state,i=this._graphicStore.hitTest(e.x,e.y,2,t,r),o=new Set(i),a=this.graphics.items.reduce((e,t)=>(o.has(t.uid)&&e.set(t.uid,t),e),new Map);return i.map(e=>a.get(e)).filter(s)}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.requestUpdateCallback()),this.notifyChange("updating")}processUpdate(e){this.updateRequested&&(this.updateRequested=!1,this.update(e))}viewChange(){this.requestUpdate()}setHighlight(e){const t=[];for(const{objectId:s,highlightFlags:r}of e){const e=this._graphicStore.getItem(s)?.displayId;t.push({objectId:s,highlightFlags:r,displayId:e})}this._attributeStore.setHighlight(t,e),this._pushUpdate()}graphicUpdateHandler(e){this._pushUpdate()}update(e){this.updateRequested=!1,this._attached&&this._graphicStore.updateLevel(e.state.resolution)&&this.pushUpdate()}pushUpdate(){this._pushUpdate()}_pushUpdate(){o(this._commandQueue.push({type:"update"}))}async _update(){try{has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView._update start`);const e=await this._graphicStore.update(this.graphics,e=>this._getSymbolForGraphic(e),e=>this._ensureSymbolResource(e));for(const s of e.updated)this.container.restartAnimation(s.objectId);if(!e.hasAnyUpdate())return void this._attributeStore.sendUpdates();e.removed.length&&(this._cleanupRequired=!0),has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView updateMessage`,e);const t=this._createTileMessages(e);await this._densifyItemsForDisplay(t),await this._fetchResources(t),this._write(t);for(const s of e.added)this._setFilterState(s);for(const s of e.updated)this._setFilterState(s);has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView sendUpdate`,e),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView sendUpdate.await`,e)}catch(e){}this._cleanupSharedResources()}_createTileMessages(e){const t=new Map;for(const s of e.added){const e=this.view.graphicsTileStore.getIntersectingTiles(s.symbolBounds);for(const r of e){F.getOrCreate(r,t,this._metadata).append(s)}}for(const s of e.updated){const e=this.view.graphicsTileStore.getIntersectingTiles(s.prevSymbolBounds),r=this.view.graphicsTileStore.getIntersectingTiles(s.symbolBounds);for(const i of e){F.getOrCreate(i,t,this._metadata).removed.push(s.displayId)}for(const i of r){F.getOrCreate(i,t,this._metadata).append(s)}}for(const s of e.removed){const e=this.view.graphicsTileStore.getIntersectingTiles(s.symbolBounds);for(const r of e){F.getOrCreate(r,t,this._metadata).removed.push(s.displayId)}}return Array.from(t.values())}async _densifyItemsForDisplay(e){const t=new Map;for(const s of e)for(const e of s.addedOrModified)t.has(e)||t.set(e,e.densifyCurvedGeometryForDisplay(this.view.spatialReference));await Promise.all(t.values())}async _fetchResources(e){const t={timeZone:null,timeExtent:null};for(const{tile:s,reader:r}of e){has("esri-2d-update-debug")&&console.debug(`Id[${this.layerId}] Tile[${s.id}] GraphicsView fetchResources`,e);const i=r.getCursor();for(;i.next();)for(const e of i.getMeshWriters())e.enqueueRequest(this._resourceProxy,i,s.createArcadeEvaluationOptions(t))}await this._resourceProxy.fetchEnqueuedResources()}_write(e){for(const t of e){has("esri-2d-update-debug")&&console.debug(`Id[${this.layerId}] Tile[${t.tile.id}] GraphicsView write`,t);const e=this._writeMeshes(t);let s=this._tiles.get(t.tile.key);s||(s=this._createFeatureTile(t.tile.key)),has("esri-2d-update-debug")&&console.debug(`Id[${this.layerId}] Tile[${t.tile.id}] GraphicsView onTileData`,t),this.container.onTileData(s,{type:"update",modify:e,remove:t.removed,end:!1,attributeEpoch:this._attributeStore.epoch,objectIdMap:t.objectIdMap}),this.container.requestRender()}}_writeMeshes(e){const t={timeZone:null,timeExtent:null},s=new T(e.tile.id),r=e.reader.getCursor();for(;r.next();){s.entityStart(r.getDisplayId(),r.getZOrder());for(const i of r.getMeshWriters())i.write(s,this._resourceProxy,r,e.tile.createArcadeEvaluationOptions(t),e.tile.level);s.entityEnd()}return{...s.serialize().message,tileId:e.tile.id}}_setFilterState(e){const t=e.displayId,s=this._attributeStore.getHighlightFlags(e.objectId);this._attributeStore.setData(t,0,0,s|(e.visible?I:0))}_getSymbolForGraphic(e){return null!=e.symbol?e.symbol:null!=this._effectiveRenderer?this._effectiveRenderer.getSymbol(e):this._getNullSymbol(e)}async _ensureSymbolResource(e){if(!e.symbol)return;const t=await this._getSymbolInfo(e.symbol);if(!t)return;const s=t.linearCIM.filter(e=>"text"===e.type);if(s.length>0){const r=await this._getTextResources(e,s);return void(e.symbolResource={symbolInfo:t,textInfo:r})}e.symbolResource={symbolInfo:t}}_getSymbolInfo(e){const t=e.hash();return this._hashToSymbolInfo.has(t)||this._hashToSymbolInfo.set(t,this._createSymbolInfo(t,e).catch(e=>null)),this._hashToSymbolInfo.get(t)}async _createSymbolInfo(e,t){const s=await this._convertToCIMSymbol(t),r=await this._createLinearCIM(s);return{hash:e,cimSymbol:s,linearCIM:r,meshWriters:await this._createMeshWriters(s,r)}}async _convertToCIMSymbol(e){const t=f(e);return"web-style"===t.type?this._convertToCIMSymbol(await t.fetchSymbol({acceptedFormats:["cim","web"]})):t}async _createLinearCIM(e){return await Promise.all(y.fetchResources(e.symbol,this._cimResourceManager,[])),this.view.stage.cimAnalyzer.analyzeSymbolReference(e,!1)}async _createMeshWriters(e,t){a(this._controller.signal);const s=this.container.instanceStore,r=this.view.stage.meshWriterRegistry,i=await R(e,t,s);return Promise.all(i.map(e=>r.createMeshWriter(this._storage,this._resourceProxy,{tileInfo:this.view.featuresTilingScheme.tileInfo},e,null)))}_onTileUpdate(e){if(e.added&&e.added.length>0)for(const t of e.added)this._updateTracking.addPromise(this._addTile(t));if(e.removed&&e.removed.length>0)for(const t of e.removed)this._removeTile(t.key)}_createFeatureTile(e){const t=this.view.featuresTilingScheme.getTileBounds(c(),e),s=this.view.featuresTilingScheme.getTileResolution(e.level),r=new v(e,s,t[0],t[3]);return this._tiles.set(e,r),this.container.addChild(r),r}async _addTile(e){if(!this._attached)return;const t=this._graphicStore.queryItems(e);if(!t.length)return;const s=this._createFeatureTile(e.key),r=F.fromItems(e,t,this._metadata);await this._densifyItemsForDisplay([r]),await this._fetchResources([r]);const i=this._writeMeshes(r);s.onMessage({type:"append",append:i,clear:!1,end:!0,attributeEpoch:this._attributeStore.epoch,objectIdMap:r.objectIdMap})}_removeTile(e){if(!this._tiles.has(e))return;const t=this._tiles.get(e);this.container.removeChild(t),t.destroy(),this._tiles.delete(e)}_getNullSymbol(e){const t=e.geometry;return t?l(t)?w:p(t)||u(t)?S:this.defaultPointSymbolEnabled?b:null:this.defaultPointSymbolEnabled?b:null}async _getTextResources(e,t){const s=new Array,r=new Array;for(let i=0;i<t.length;i++){const o=t[i],{resource:a,overrides:n}=o.textRasterizationParam;if(n?.length>0){const t=_.resolveSymbolOverrides({type:"CIMSymbolReference",primitiveOverrides:n,symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,size:a.symbol.height,anchorPointUnits:"Relative",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:a.symbol,textString:a.textString}],scaleSymbolsProportionally:!0,respectFrame:!0}]}},e,this.view.spatialReference,null,m(e.projectedGeometry),null,null);t.then(e=>{const t=e.symbolLayers[0],{textString:s}=t.markerGraphics[0];r.push({type:"cim-rasterization-info",resource:{type:"text",textString:s||"",font:a.font}}),o.text=a.textString=s||""}),s.push(t)}else r.push({type:"cim-rasterization-info",resource:a})}s.length>0&&await Promise.all(s);const o=r.map(e=>this.view.stage.textureManager.rasterizeItem(e)),a=await Promise.all(o);i(a);const n=new Map;for(let i=0;i<t.length;i++){const e=t[i];n.set(e.textRasterizationParam.resource.symbol,{text:e.text,glyphMosaicItems:a[i]})}return n}_cleanupSharedResources(){if(!this._cleanupRequired)return;const e=performance.now();if(e-this._lastCleanup<5e3)return;this._cleanupRequired=!1,this._lastCleanup=e;const t=new Set;for(const r of this._graphicStore.items()){const e=r.symbolResource?.symbolInfo.hash;t.add(e)}const s=new Set(this._hashToSymbolInfo.keys());for(const r of s.values())t.has(r)||this._hashToSymbolInfo.delete(r)}};e([h()],O.prototype,"_effectiveRenderer",null),e([h({constructOnly:!0})],O.prototype,"layerId",void 0),e([h({constructOnly:!0})],O.prototype,"requestUpdateCallback",void 0),e([h()],O.prototype,"container",void 0),e([h({constructOnly:!0})],O.prototype,"graphics",void 0),e([h()],O.prototype,"renderer",void 0),e([h()],O.prototype,"_updateTracking",void 0),e([h()],O.prototype,"updating",null),e([h()],O.prototype,"view",void 0),e([h()],O.prototype,"updateRequested",void 0),e([h()],O.prototype,"defaultPointSymbolEnabled",void 0),O=e([d("esri.views.2d.layers.graphics.GraphicsView2D")],O);export{O 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.34/esri/copyright.txt for details.
4
4
  */
5
- import{disposeMaybe as e}from"../../../../core/maybe.js";import{identity as t,translate as r,scale as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{BufferObject as i}from"../../../webgl/BufferObject.js";import"../../../webgl/FramebufferObject.js";import"../../../../core/has.js";import"../../../webgl/checkWebGLError.js";import{DataType as o,BlendFactor as n,PrimitiveType as m,Usage as f}from"../../../webgl/enums.js";import"../../../webgl/FBOAttachmentType.js";import"../../../webgl/Texture.js";import{VertexArrayObject as c}from"../../../webgl/VertexArrayObject.js";import{DisplayObject as h}from"../../engine/DisplayObject.js";import{VertexElementDescriptor as l}from"../../../webgl/VertexElementDescriptor.js";const p=new Map([["geometry",[new l("a_PositionAndFlags",3,o.SHORT,0,6)]]]),_=new Map;_.set("a_PositionAndFlags",0);const g={vsPath:"debug/overlay",fsPath:"debug/overlay",attributes:_};class d extends h{constructor(e){super(),this._conf=e}static makeFlags(e,t){return e|t<<2}_createTransforms(){return{displayViewScreenMat3:a()}}doRender(e){this._updateTransforms(e),this._ensureResources(e);const{context:t}=e;t.useProgram(this._program),this._program.setUniformMatrix3fv("u_dvsMat3",this.transforms.displayViewScreenMat3),this._program.setUniform4fv("u_colors",this._conf.getColors(e)),this._program.setUniform1fv("u_opacities",this._conf.getOpacities(e));const{vertexData:r,indexData:s}=this._conf.getMesh(e);this._vertexBuffer.setData(r),this._indexBuffer.setData(s),t.bindVAO(this._vertexArray),t.setBlendingEnabled(!0),t.setBlendFunction(n.ONE,n.ONE_MINUS_SRC_ALPHA),t.setDepthTestEnabled(!1),t.setStencilTestEnabled(!1),t.setColorMask(!0,!0,!0,!0),t.drawElements(m.TRIANGLES,s.length,o.UNSIGNED_INT,0)}onDetach(){this._vertexArray=e(this._vertexArray)}_updateTransforms(e){t(this.transforms.displayViewScreenMat3),r(this.transforms.displayViewScreenMat3,this.transforms.displayViewScreenMat3,[-1,1]),s(this.transforms.displayViewScreenMat3,this.transforms.displayViewScreenMat3,[2/e.state.size[0],-2/e.state.size[1],1])}_ensureResources(e){const{context:t}=e;this._program||(this._program=e.painter.materialManager.getProgram(g)),this._vertexBuffer||(this._vertexBuffer=i.createVertex(t,f.STREAM_DRAW)),this._indexBuffer||(this._indexBuffer=i.createIndex(t,f.STREAM_DRAW)),this._vertexArray||(this._vertexArray=new c(t,_,p,new Map([["geometry",this._vertexBuffer]]),this._indexBuffer))}}export{d as default};
5
+ import{disposeMaybe as e}from"../../../../core/maybe.js";import{identity as t,translate as r,scale as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{BufferObject as i}from"../../../webgl/BufferObject.js";import"../../../webgl/FramebufferObject.js";import"../../../webgl/Program.js";import"../../../../core/has.js";import"../../../webgl/Renderbuffer.js";import"../../../webgl/Texture.js";import{VertexArrayObject as o}from"../../../webgl/VertexArrayObject.js";import{DisplayObject as n}from"../../engine/DisplayObject.js";import{DataType as m,BlendFactor as f,PrimitiveType as c,Usage as l}from"../../../webgl/enums.js";import{VertexElementDescriptor as h}from"../../../webgl/VertexElementDescriptor.js";const p=new Map([["geometry",[new h("a_PositionAndFlags",3,m.SHORT,0,6)]]]),_=new Map;_.set("a_PositionAndFlags",0);const g={vsPath:"debug/overlay",fsPath:"debug/overlay",attributes:_};class d extends n{constructor(e){super(),this._conf=e}static makeFlags(e,t){return e|t<<2}_createTransforms(){return{displayViewScreenMat3:a()}}doRender(e){this._updateTransforms(e),this._ensureResources(e);const{context:t}=e;t.useProgram(this._program),this._program.setUniformMatrix3fv("u_dvsMat3",this.transforms.displayViewScreenMat3),this._program.setUniform4fv("u_colors",this._conf.getColors(e)),this._program.setUniform1fv("u_opacities",this._conf.getOpacities(e));const{vertexData:r,indexData:s}=this._conf.getMesh(e);this._vertexBuffer.setData(r),this._indexBuffer.setData(s),t.bindVAO(this._vertexArray),t.setBlendingEnabled(!0),t.setBlendFunction(f.ONE,f.ONE_MINUS_SRC_ALPHA),t.setDepthTestEnabled(!1),t.setStencilTestEnabled(!1),t.setColorMask(!0,!0,!0,!0),t.drawElements(c.TRIANGLES,s.length,m.UNSIGNED_INT,0)}onDetach(){this._vertexArray=e(this._vertexArray)}_updateTransforms(e){t(this.transforms.displayViewScreenMat3),r(this.transforms.displayViewScreenMat3,this.transforms.displayViewScreenMat3,[-1,1]),s(this.transforms.displayViewScreenMat3,this.transforms.displayViewScreenMat3,[2/e.state.size[0],-2/e.state.size[1],1])}_ensureResources(e){const{context:t}=e;this._program||(this._program=e.painter.materialManager.getProgram(g)),this._vertexBuffer||(this._vertexBuffer=i.createVertex(t,l.STREAM_DRAW)),this._indexBuffer||(this._indexBuffer=i.createIndex(t,l.STREAM_DRAW)),this._vertexArray||(this._vertexArray=new o(t,_,p,new Map([["geometry",this._vertexBuffer]]),this._indexBuffer))}}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.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{makeHandle as t}from"../../../core/handleUtils.js";import r from"../../../core/Promise.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";const s=s=>{let n=class extends(r.EsriPromiseMixin(s)){constructor(){super(...arguments),this.parent=null,this._userInteractive=!1,this._interactiveViewModelCount=0}get interactive(){return this._interactiveViewModelCount>0||this._userInteractive}set interactive(e){this._userInteractive=e}get updating(){return!1}get visible(){return null==this.parent||this.parent.visible&&!this.parent.suspended}set visible(e){this._overrideIfSome("visible",e)}forceInteractive(){return this._interactiveViewModelCount++,t(()=>this._interactiveViewModelCount--)}};return e([i({constructOnly:!0})],n.prototype,"parent",void 0),e([i({constructOnly:!0})],n.prototype,"view",void 0),e([i({type:Boolean})],n.prototype,"interactive",null),e([i()],n.prototype,"_userInteractive",void 0),e([i({readOnly:!0})],n.prototype,"updating",null),e([i()],n.prototype,"visible",null),e([i()],n.prototype,"_interactiveViewModelCount",void 0),n=e([o("esri.views.3d.analysis.AnalysisView3D")],n),n};export{s as AnalysisView3D};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{makeHandle as t}from"../../../core/handleUtils.js";import r from"../../../core/Promise.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";const s=s=>{const n=r.EsriPromiseMixin(s);let p=class extends n{constructor(){super(...arguments),this.parent=null,this._userInteractive=!1,this._interactiveViewModelCount=0}get interactive(){return this._interactiveViewModelCount>0||this._userInteractive}set interactive(e){this._userInteractive=e}get updating(){return!1}get visible(){return null==this.parent||this.parent.visible&&!this.parent.suspended}set visible(e){this._overrideIfSome("visible",e)}forceInteractive(){return this._interactiveViewModelCount++,t(()=>this._interactiveViewModelCount--)}};return e([i({constructOnly:!0})],p.prototype,"parent",void 0),e([i({constructOnly:!0})],p.prototype,"view",void 0),e([i({type:Boolean})],p.prototype,"interactive",null),e([i()],p.prototype,"_userInteractive",void 0),e([i({readOnly:!0})],p.prototype,"updating",null),e([i()],p.prototype,"visible",null),e([i()],p.prototype,"_interactiveViewModelCount",void 0),p=e([o("esri.views.3d.analysis.AnalysisView3D")],p),p};export{s as AnalysisView3D};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import{VolumeMeasureType as t}from"../../../../analysis/VolumeMeasurement/volumeMeasurementUtils.js";import i from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{syncAndInitial as s,watch as r}from"../../../../core/reactiveUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import{projectOrLoad as p}from"../../../../geometry/projectionUtils.js";import{projectBoundingRect as d}from"../../../../geometry/projection/projectBoundingRect.js";import{fromExtent as m,empty as c,intersects as u}from"../../../../geometry/support/aaBoundingRect.js";import{logFailedGeometryProjectionError as y}from"../support/projectionUtils.js";import{getElevationAtPoint as g}from"../../support/ElevationProvider.js";let h=class extends i{constructor(e){super(e),this._updatingHandles=new l}initialize(){this._updatingHandles.add(()=>({geometry:this.analysis.geometry,projectedGeometry:p(this.analysis.geometry,this.view.spatialReference)}),({geometry:e,projectedGeometry:t})=>{null==t.pending?this._onGeometryChange(e,t.geometry):this._updatingHandles.addPromise(t.pending)},s),this.addHandles([this._createElevationUpdateHandle(),r(()=>[this.analysis.measureType,this.analysisViewData.elevationAlignedGeometry,this.analysisViewData.effectiveTargetElevation],()=>this._updateTargetGeometry())])}destroy(){this._updatingHandles.destroy()}get updating(){return this._updatingHandles.updating}_createElevationUpdateHandle(){const e=t=>{const i=this.analysis.geometry;if(null==i)return;const o=p(i,this.view.spatialReference);if(null!=o.pending)return this._updatingHandles.addPromise(o.pending),void o.pending.finally(()=>e(t));const s=o.geometry;null!=s&&null!=s.extent&&(d(t.extent,t.spatialReference,f,this.view.spatialReference),m(s.extent,j),u(f,j)&&this._onGeometryChange(i,s))};return this.view.elevationProvider.on("elevation-change",t=>e(t))}_onGeometryChange(e,t){const{elevationProvider:i}=this.view;if(null==e)return void(this.analysisViewData.elevationAlignedGeometry=null);if(null==t)return y(this.analysis,e.spatialReference,o.getLogger(this)),void(this.analysisViewData.elevationAlignedGeometry=null);const s=t.clone();v(i,s),this.analysisViewData.elevationAlignedGeometry=s}_updateTargetGeometry(){const{measureType:e}=this.analysis,{elevationAlignedGeometry:i,effectiveTargetElevation:o}=this.analysisViewData;if(!i)return void(this.analysisViewData.targetGeometry=null);if(e===t.Stockpile||!o)return void(this.analysisViewData.targetGeometry=i);const s=i.clone();s.rings[0].forEach(e=>{e[2]=o}),this.analysisViewData.targetGeometry=s}};function v(e,t){t.rings[0].forEach(t=>{t[2]=g(e,t,"ground")??0})}e([a({constructOnly:!0})],h.prototype,"analysis",void 0),e([a({constructOnly:!0})],h.prototype,"analysisViewData",void 0),e([a({constructOnly:!0})],h.prototype,"view",void 0),e([a()],h.prototype,"updating",null),e([a({readOnly:!0})],h.prototype,"_updatingHandles",void 0),h=e([n("esri.views.3d.analysis.VolumeMeasurement.CutFillVolumeMeasurementController")],h);const f=c(),j=c();export{h as CutFillVolumeMeasurementController};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as s}from"../../../chunks/tslib.es6.js";import o from"../../../core/Accessor.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as t}from"./AnalysisView3D.js";let l=class extends(t(o)){constructor(s){super(s),this.type="volume-measurement-view-3d",this.analysis=null}get result(){return null}};s([r({readOnly:!0})],l.prototype,"type",void 0),s([r({constructOnly:!0,nonNullable:!0})],l.prototype,"analysis",void 0),s([r()],l.prototype,"result",null),l=s([e("esri.views.3d.analysis.VolumeMeasurementAnalysisView3D")],l);const p=l;export{p as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{destroyMaybe as o}from"../../../core/maybe.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as l}from"./AnalysisView3D.js";import{CutFillVolumeMeasurementController as i}from"./VolumeMeasurement/CutFillVolumeMeasurementController.js";let n=class extends(l(t)){constructor(e){super(e),this.type="volume-measurement-view-3d",this.analysis=null,this.elevationAlignedGeometry=null,this.targetGeometry=null}initialize(){const{analysis:e,view:t}=this;this._analysisController=new i({view:t,analysis:e,analysisViewData:this})}destroy(){this._analysisController=o(this._analysisController)}get result(){return null}get effectiveTargetElevation(){const{targetElevation:e}=this.analysis.cutFillOptions;if(null!=e)return e;const t=this.elevationAlignedGeometry?.extent;return t&&t.zmin&&t.zmax?(t.zmax+t.zmin)/2:null}get updating(){return null!=this._analysisController&&this._analysisController.updating}};e([r({readOnly:!0})],n.prototype,"type",void 0),e([r({constructOnly:!0,nonNullable:!0})],n.prototype,"analysis",void 0),e([r()],n.prototype,"result",null),e([r()],n.prototype,"elevationAlignedGeometry",void 0),e([r({type:Number})],n.prototype,"effectiveTargetElevation",null),e([r()],n.prototype,"targetGeometry",void 0),e([r()],n.prototype,"updating",null),n=e([s("esri.views.3d.analysis.VolumeMeasurementAnalysisView3D")],n);const a=n;export{a 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.34/esri/copyright.txt for details.
4
4
  */
5
- const I="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1NiIgaGVpZ2h0PSI1NiIgZmlsbD0ibm9uZSIgdmVyc2lvbj0iMi4wIj48c3R5bGUgaWQ9InRoZW1lLXN0eWxlIj4uY29udHJhc3QtZmlsbHtmaWxsOiNmZmZ9LmNvbnRyYXN0LXN0cm9rZXtzdHJva2U6I2ZmZn0uYWNjZW50LWZpbGx7ZmlsbDojZmY3ZjAwO2ZpbGwtb3BhY2l0eTouNX08L3N0eWxlPjxwYXRoIGQ9Ik0yOCAwYTI4IDI4IDAgMSAxIDAgNTYgMjggMjggMCAwIDEgMC01NiIgY2xhc3M9ImFjY2VudC1maWxsIi8+PHBhdGggc3Ryb2tlLXdpZHRoPSI0Ljk5IiBkPSJNMjAuMDUgNDAuODZhMTUuMDUgMTUuMDUgMCAwIDAgMTcuMTQtMS41IDE1LjA1IDE1LjA1IDAgMCAwIDQuNDctMTYuNjUgMTUuMDUgMTUuMDUgMCAwIDAtMjIuNzItNy4xNSAxNS4wNSAxNS4wNSAwIDAgMC01LjUgNy4xNSIgY2xhc3M9ImNvbnRyYXN0LXN0cm9rZSIvPjxwYXRoIGQ9Im0xMC45NyAzNS41NyA1LjM4IDEyLjA3IDcuNzktMTMuNDd6IiBjbGFzcz0iY29udHJhc3QtZmlsbCIvPjwvc3ZnPg==";export{I as default};
5
+ const I="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1NiIgaGVpZ2h0PSI1NiIgZmlsbD0ibm9uZSI+PHN0eWxlIGlkPSJ0aGVtZS1zdHlsZSI+LmNvbnRyYXN0LWZpbGx7ZmlsbDojZmZmfS5jb250cmFzdC1zdHJva2V7c3Ryb2tlOiNmZmZ9LmFjY2VudC1maWxse2ZpbGw6I2ZmN2YwMDtmaWxsLW9wYWNpdHk6LjV9PC9zdHlsZT48cGF0aCBkPSJNMjggMGEyOCAyOCAwIDEgMSAwIDU2IDI4IDI4IDAgMCAxIDAtNTYiIGNsYXNzPSJhY2NlbnQtZmlsbCIvPjxwYXRoIHN0cm9rZS13aWR0aD0iNC45OSIgZD0iTTIwLjA1IDQwLjg2YTE1LjA1IDE1LjA1IDAgMCAwIDE3LjE0LTEuNSAxNS4wNSAxNS4wNSAwIDAgMCA0LjQ3LTE2LjY1IDE1LjA1IDE1LjA1IDAgMCAwLTIyLjcyLTcuMTUgMTUuMDUgMTUuMDUgMCAwIDAtNS41IDcuMTUiIGNsYXNzPSJjb250cmFzdC1zdHJva2UiLz48cGF0aCBkPSJtMTAuOTcgMzUuNTcgNS4zOCAxMi4wNyA3Ljc5LTEzLjQ3eiIgY2xhc3M9ImNvbnRyYXN0LWZpbGwiLz48L3N2Zz4=";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.34/esri/copyright.txt for details.
4
4
  */
5
- const I="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1NiIgaGVpZ2h0PSI1NiIgZmlsbD0ibm9uZSIgdmVyc2lvbj0iMi4wIj48c3R5bGUgaWQ9InRoZW1lLXN0eWxlIj4uY29udHJhc3QtZmlsbHtmaWxsOiNmZmZ9LmNvbnRyYXN0LXN0cm9rZXtzdHJva2U6I2ZmZn0uYWNjZW50LWZpbGx7ZmlsbDojZmY3ZjAwO2ZpbGwtb3BhY2l0eTouNX08L3N0eWxlPjxjaXJjbGUgY3g9IjM5LjQ3OCIgY3k9IjMuMDc4IiByPSIyOCIgY2xhc3M9ImFjY2VudC1maWxsIiB0cmFuc2Zvcm09InJvdGF0ZSg0MC41NDIpIi8+PHBhdGggc3Ryb2tlLXdpZHRoPSI1IiBkPSJtNy4wNzQgMzAuMDUzIDI5LjM5NyAxMS45ODUtMy42NzMtMzMuNDkzIiBjbGFzcz0iY29udHJhc3Qtc3Ryb2tlIi8+PHBhdGggc3Ryb2tlLXdpZHRoPSIyLjk5NiIgZD0iTTI0LjUwNCAyMy4yMDdhMTEuOTggMTEuOTggMCAwIDAtOS44IDcuNTA3IiBjbGFzcz0iY29udHJhc3Qtc3Ryb2tlIGNvbnRyYXN0LWZpbGwiLz48cGF0aCBkPSJtMjkuODE4IDIyLjgwOC02LjE4NCA0LjYtLjU0MS04LjM2NHoiIGNsYXNzPSJjb250cmFzdC1maWxsIi8+PC9zdmc+";export{I as default};
5
+ const I="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1NiIgaGVpZ2h0PSI1NiIgZmlsbD0ibm9uZSI+PHN0eWxlIGlkPSJ0aGVtZS1zdHlsZSI+LmNvbnRyYXN0LWZpbGx7ZmlsbDojZmZmfS5jb250cmFzdC1zdHJva2V7c3Ryb2tlOiNmZmZ9LmFjY2VudC1maWxse2ZpbGw6I2ZmN2YwMDtmaWxsLW9wYWNpdHk6LjV9PC9zdHlsZT48Y2lyY2xlIGN4PSIzOS40NzgiIGN5PSIzLjA3OCIgcj0iMjgiIGNsYXNzPSJhY2NlbnQtZmlsbCIgdHJhbnNmb3JtPSJyb3RhdGUoNDAuNTQyKSIvPjxwYXRoIHN0cm9rZS13aWR0aD0iNSIgZD0ibTcuMDc0IDMwLjA1MyAyOS4zOTcgMTEuOTg1LTMuNjczLTMzLjQ5MyIgY2xhc3M9ImNvbnRyYXN0LXN0cm9rZSIvPjxwYXRoIHN0cm9rZS13aWR0aD0iMi45OTYiIGQ9Ik0yNC41MDQgMjMuMjA3YTExLjk4IDExLjk4IDAgMCAwLTkuOCA3LjUwNyIgY2xhc3M9ImNvbnRyYXN0LXN0cm9rZSBjb250cmFzdC1maWxsIi8+PHBhdGggZD0ibTI5LjgxOCAyMi44MDgtNi4xODQgNC42LS41NDEtOC4zNjR6IiBjbGFzcz0iY29udHJhc3QtZmlsbCIvPjwvc3ZnPg==";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.34/esri/copyright.txt for details.
4
4
  */
5
- import r from"../../../request.js";import{result as e}from"../../../core/asyncUtils.js";import t from"../../../core/Error.js";import{throwIfAborted as a,throwIfAbortError as o}from"../../../core/promiseUtils.js";import{isDataProtocol as s,dataToArrayBuffer as i}from"../../../core/urlUtils.js";class n{constructor(r){this._streamDataRequester=r}async loadJSON(r,e){return this._load("json",r,e)}async loadBinary(r,e){return s(r)?(a(e),i(r)):this._load("binary",r,e)}async loadImage(r,e){return this._load("image",r,e)}async _load(a,s,i){if(null==this._streamDataRequester)return(await r(s,{responseType:m[a]})).data;const n=await e(this._streamDataRequester.request(s,a,i));if(!0===n.ok)return n.value;throw o(n.error),new t("glt-loader-request-error",`Request for resource failed: ${n.error}`)}}const m={image:"image",binary:"array-buffer",json:"json","image+type":void 0};export{n as DefaultLoadingContext};
5
+ import r from"../../../request.js";import{result as e}from"../../../core/asyncUtils.js";import t from"../../../core/Error.js";import{throwIfAborted as o,throwIfAbortError as s}from"../../../core/promiseUtils.js";import{isDataProtocol as a,dataToArrayBuffer as i}from"../../../core/urlUtils.js";import{DocType as n}from"../support/index.js";class u{constructor(r){this._streamDataRequester=r}async loadJSON(r,e){return this._load(n.JSON,r,e)}async loadBinary(r,e){return a(r)?(o(e),i(r)):this._load(n.BINARY,r,e)}async loadImage(r,e){return this._load(n.IMAGE,r,e)}async _load(o,a,i){if(null==this._streamDataRequester)return(await r(a,{responseType:l[o]})).data;const n=await e(this._streamDataRequester.request(a,o,i));if(!0===n.ok)return n.value;throw s(n.error),new t("glt-loader-request-error",`Request for resource failed: ${n.error}`)}}const l={[n.IMAGE]:"image",[n.BINARY]:"array-buffer",[n.JSON]:"json",[n.IMAGE_AND_TYPE]:void 0};export{u as DefaultLoadingContext};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{unitRGBAFromColor as t}from"../../../../../core/colorUtils.js";import{handlesGroup as i,makeHandle as s}from"../../../../../core/handleUtils.js";import{destroyMaybe as r}from"../../../../../core/maybe.js";import{watch as o,syncAndInitial as n,initial as a,when as l}from"../../../../../core/reactiveUtils.js";import{property as c}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as m}from"../../../../../core/accessorSupport/decorators/subclass.js";import{i as p}from"../../../../../chunks/vec32.js";import{create as h}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEffectiveElevationInfo as u,getEffectiveElevationMode as d}from"../../../../../support/elevationInfoUtils.js";import v from"../../../../../symbols/support/ElevationInfo.js";import{SegmentLabels3D as f}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as g}from"../../SnappingVisualizer3D.js";import{meshTransformFastUpdateHandles as w}from"../meshFastUpdateUtils.js";import{Settings as y}from"../settings.js";import{ExtendedLineVisualElement as V}from"../../visualElements/ExtendedLineVisualElement.js";import{OutlineVisualElement as E}from"../../visualElements/OutlineVisualElement.js";import{VerticesVisualElement as _}from"../../visualElements/VerticesVisualElement.js";import{evaluateElevationAlignmentAtPoint as j}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as L}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as I}from"../../../layers/graphics/GraphicState.js";import{RenderOccludedFlag as S}from"../../../webgl-engine/lib/Material.js";import{DrawGraphicTool as D,geometryTypeToDrawOperationGeometryType as G}from"../../../../draw/DrawGraphicTool.js";import{DrawOperation as x}from"../../../../draw/DrawOperation.js";import{ElevationDrawSurface as C,SceneDrawSurface as O}from"../../../../draw/drawSurfaces.js";import{updateMeshTransformFromTooltipInfo as T}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{autorun as b}from"../../../../../core/accessorSupport/trackingUtils.js";let z=class extends D{constructor(e){super(e),this._activeVertexVisualElement=null,this._createGraphicState=null,this._outlineVisualElement=null,this._verticesVisualElement=null,this._verticalLineVisualElement=null,this._settings=new y({getTheme:()=>this.view.effectiveTheme}),this.geometryType=null,this.type="draw-3d"}initialize(){const{mode:e,offset:t,unit:i}=this.elevationInfo;this.internalGraphicsLayer.elevationInfo=new v({mode:e,offset:t,unit:i})}normalizeCtorArgs(e){if(!e.elevationInfo){const t=e.hasZ??!0;return{...e,elevationInfo:u(t)}}return e}initializeGraphic(e){const{view:t}=this,s=this._createGraphicState=new I({graphic:e});return i([t.maskOccludee(e),t.trackGraphicState(s),o(()=>({element:this._outlineVisualElement,isDraped:s.isDraped}),({element:e,isDraped:t})=>{e&&(e.isDraped=t)},n),b(()=>{T(this.tooltipInfos.mesh,this.geometryToPlace)}),this._setupLoadingIndicator(s),...w(s)])}makeDrawOperation(){const{geometryType:e}=this,t="circle"!==e&&"rectangle"!==e;return new x({view:this.view,manipulators:this.manipulators,geometryType:G(e),drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,drawSurface:new O(this.view,this.elevationInfo,[this.internalGraphicsLayer]),elevationDrawSurface:new C(this.elevationInfo,this.defaultZ,this.view,this.internalGraphicsLayer),hasM:!1,elevationInfo:this.elevationInfo,snappingManager:this.snappingManager,snappingVisualizer:new g,segmentLabels:t?new f:null,labelOptions:this.sketchOptions.labels,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===d(this.hasZ,this.elevationInfo),cursor:this.cursor,constraintsEnabled:!0,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils})}onActiveVertexChanged(e){const{view:n}=this;if(this._activeVertexVisualElement)return this._activeVertexVisualElement.vertices=[e],this._activeVertexVisualElement.recreate(),this._updateVerticalLineVisualElement(e),s();const l=this._settings,c=l.manipulators.vertex,m=new _({view:n,spatialReference:n.spatialReference,vertices:[e],elevationInfo:this.internalGraphicsLayer.elevationInfo,size:c.size,outlineSize:c.outlineSize,renderOccluded:c.renderOccluded,attached:!1,isDecoration:!0});this._activeVertexVisualElement=m;const p=l.visualElements.zVerticalLine,h=new V({view:n,extensionType:p.extensionType,innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:S.OccludeAndTransparent,isDecoration:!0});this._verticalLineVisualElement=h;const u=i([o(()=>l.visualElements.zVerticalLine,e=>e.apply(h),a),o(()=>({selectedColor:t(l.colors.selected),outlineColor:t(l.manipulators.vertex.outlineColor)}),({selectedColor:e,outlineColor:t})=>{m.color=e,m.outlineColor=t},a),s(()=>{this._activeVertexVisualElement=r(this._activeVertexVisualElement),this._verticalLineVisualElement=r(this._verticalLineVisualElement)})]);return m.attached=!0,this._updateVerticalLineVisualElement(e),u}_updateVerticalLineVisualElement(e){const t=this._verticalLineVisualElement;if(!t)return;const{renderCoordsHelper:i,elevationProvider:s}=this.view;p(A,e[0],e[1],e[2]),U.setFromElevationInfo(this.elevationInfo),A[2]=j(A,s,U,i);i.toRenderCoords(A,this.view.spatialReference,A)?(t.setStartEndFromWorldDownAtLocation(A),t.attached=!0):t.attached=!1}onOutlineChanged(e){if(this._outlineVisualElement)return this._outlineVisualElement.geometry=e,s();const t=this.internalGraphicsLayer.elevationInfo,{view:n}=this,l=this._settings,c=new E({view:n,geometry:e,elevationInfo:t,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===d(this.hasZ,t),attached:!1,isDecoration:!0});this._outlineVisualElement=c;const m=i([o(()=>l.visualElements.lineObjects.outline,e=>e.apply(c),a),o(()=>l.visualElements.lineObjects.shadowStyle,e=>e.apply(c),a),s(()=>{this._outlineVisualElement=r(this._outlineVisualElement)})]);return c.attached=!0,c.laserlineEnabled=!0,m}onRegularVerticesChanged(e){if(this._verticesVisualElement)return this._verticesVisualElement.vertices=e,s();const{view:n}=this,l=this._settings,c=l.manipulators.vertex,m=new _({view:n,spatialReference:n.spatialReference,vertices:e,elevationInfo:this.internalGraphicsLayer.elevationInfo,size:c.size,outlineSize:c.outlineSize,renderOccluded:c.renderOccluded,attached:!1,isDecoration:!0}),p=i([o(()=>({color:t(l.manipulators.vertex.color),outlineColor:t(l.manipulators.vertex.outlineColor)}),({color:e,outlineColor:t})=>{m.color=e,m.outlineColor=t},a),s(()=>{this._verticesVisualElement=r(this._verticesVisualElement)})]);return m.attached=!0,this._verticesVisualElement=m,p}updateGraphicGeometry(e){if("mesh"!==this.geometryType||"point"!==e?.type)super.updateGraphicGeometry(e);else{const t=this.geometryToPlace;t?.centerAt(e),T(this.tooltipInfos.mesh,t);const i=this._graphic;t&&i.geometry===t||(i.geometry=t)}}_setupLoadingIndicator(e){const{drawOperation:t}=this;if(!this.geometryToPlace)return t.loading=!1,null;t.loading=!0;const r=s(()=>{t.loading=!1});let o;const a=()=>o&&cancelAnimationFrame(o);return i([l(()=>e.displaying,()=>{a(),o=requestAnimationFrame(()=>r.remove())},{...n,once:!0}),s(a),r])}};e([c({constructOnly:!0})],z.prototype,"elevationInfo",void 0),e([c({constructOnly:!0})],z.prototype,"geometryType",void 0),e([c()],z.prototype,"type",void 0),e([c({constructOnly:!0})],z.prototype,"view",void 0),z=e([m("esri.views.3d.interactive.editingTools.draw.DrawGraphicTool3D")],z);const U=new L,A=h();export{z as DrawGraphicTool3D};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{unitRGBAFromColor as t}from"../../../../../core/colorUtils.js";import{handlesGroup as i,makeHandle as r}from"../../../../../core/handleUtils.js";import{destroyMaybe as s}from"../../../../../core/maybe.js";import{watch as o,syncAndInitial as n,initial as a,when as l}from"../../../../../core/reactiveUtils.js";import{property as c}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as m}from"../../../../../core/accessorSupport/decorators/subclass.js";import{i as p}from"../../../../../chunks/vec32.js";import{create as h}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEffectiveElevationInfo as u,getEffectiveElevationMode as d}from"../../../../../support/elevationInfoUtils.js";import v from"../../../../../symbols/support/ElevationInfo.js";import{SegmentLabels3D as f}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as g}from"../../SnappingVisualizer3D.js";import{meshTransformFastUpdateHandles as w}from"../meshFastUpdateUtils.js";import{Settings as y}from"../settings.js";import{ExtendedLineVisualElement as V}from"../../visualElements/ExtendedLineVisualElement.js";import{OutlineVisualElement as E}from"../../visualElements/OutlineVisualElement.js";import{VerticesVisualElement as _}from"../../visualElements/VerticesVisualElement.js";import{evaluateElevationAlignmentAtPoint as j}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as L}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as I}from"../../../layers/graphics/GraphicState.js";import{RenderOccludedFlag as S}from"../../../webgl-engine/lib/Material.js";import{DrawGraphicTool as D,geometryTypeToDrawOperationGeometryType as G}from"../../../../draw/DrawGraphicTool.js";import{DrawOperation as x}from"../../../../draw/DrawOperation.js";import{ElevationDrawSurface as C,SceneDrawSurface as O}from"../../../../draw/drawSurfaces.js";import{updateMeshTransformFromTooltipInfo as T}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{autorun as b}from"../../../../../core/accessorSupport/trackingUtils.js";let z=class extends D{constructor(e){super(e),this._activeVertexVisualElement=null,this._createGraphicState=null,this._outlineVisualElement=null,this._verticesVisualElement=null,this._verticalLineVisualElement=null,this._settings=new y({getTheme:()=>this.view.effectiveTheme}),this.geometryType=null,this.type="draw-3d"}initialize(){const{mode:e,offset:t,unit:i}=this.elevationInfo;this.internalGraphicsLayer.elevationInfo=new v({mode:e,offset:t,unit:i})}normalizeCtorArgs(e){if(!e.elevationInfo){const t=e.hasZ??!0;return{...e,elevationInfo:u(t)}}return e}initializeGraphic(e){const{view:t}=this,r=this._createGraphicState=new I({graphic:e});return i([t.maskOccludee(e),t.trackGraphicState(r),o(()=>({element:this._outlineVisualElement,isDraped:r.isDraped}),({element:e,isDraped:t})=>{e&&(e.isDraped=t)},n),b(()=>{T(this.tooltipInfos.mesh,this.geometryToPlace)}),this._setupLoadingIndicator(r),...w(r)])}makeDrawOperation(){const{geometryType:e}=this,t="circle"!==e&&"rectangle"!==e;return new x({view:this.view,manipulators:this.manipulators,geometryType:G(e),drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,drawSurface:new O(this.view,this.elevationInfo,[this.internalGraphicsLayer]),elevationDrawSurface:new C(this.elevationInfo,this.defaultZ,this.view,this.internalGraphicsLayer),hasM:!1,elevationInfo:this.elevationInfo,snappingManager:this.snappingManager,snappingVisualizer:new g,segmentLabels:t?new f:null,labelOptions:this.sketchOptions.labels,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===d(this.hasZ,this.elevationInfo),cursor:this.cursor,constraintsEnabled:!0,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils})}onActiveVertexChanged(e){const{view:n}=this;if(this._activeVertexVisualElement)return this._activeVertexVisualElement.vertices=[e],this._activeVertexVisualElement.recreate(),this._updateVerticalLineVisualElement(e),r();const l=this._settings,c=l.manipulators.vertex,m=new _({view:n,spatialReference:n.spatialReference,vertices:[e],elevationInfo:this.internalGraphicsLayer.elevationInfo,size:c.size,outlineSize:c.outlineSize,renderOccluded:c.renderOccluded,attached:!1,isDecoration:!0});this._activeVertexVisualElement=m;const p=l.visualElements.zVerticalLine,h=new V({view:n,extensionType:p.extensionType,innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:S.OccludeAndTransparent,isDecoration:!0});this._verticalLineVisualElement=h;const u=i([o(()=>l.visualElements.zVerticalLine,e=>e.apply(h),a),o(()=>({selectedColor:t(l.colors.selected),outlineColor:t(l.manipulators.vertex.outlineColor)}),({selectedColor:e,outlineColor:t})=>{m.color=e,m.outlineColor=t},a),r(()=>{this._activeVertexVisualElement=s(this._activeVertexVisualElement),this._verticalLineVisualElement=s(this._verticalLineVisualElement)})]);return m.attached=!0,this._updateVerticalLineVisualElement(e),u}_updateVerticalLineVisualElement(e){const t=this._verticalLineVisualElement;if(!t)return;const{renderCoordsHelper:i,elevationProvider:r}=this.view;p(A,e[0],e[1],e[2]),U.setFromElevationInfo(this.elevationInfo),A[2]=j(A,r,U,i);i.toRenderCoords(A,this.view.spatialReference,A)?(t.setStartEndFromWorldDownAtLocation(A),t.attached=!0):t.attached=!1}onOutlineChanged(e){if(this._outlineVisualElement)return this._outlineVisualElement.geometry=e,r();const t=this.internalGraphicsLayer.elevationInfo,{view:n}=this,l=this._settings,c=new E({view:n,geometry:e,elevationInfo:t,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===d(this.hasZ,t),attached:!1,isDecoration:!0});this._outlineVisualElement=c;const m=i([o(()=>l.visualElements.lineObjects.outline,e=>e.apply(c),a),o(()=>l.visualElements.lineObjects.shadowStyle,e=>e.apply(c),a),r(()=>{this._outlineVisualElement=s(this._outlineVisualElement)})]);return c.attached=!0,c.laserlineEnabled=!0,m}onRegularVerticesChanged(e){if(this._verticesVisualElement)return this._verticesVisualElement.vertices=e,r();const{view:n}=this,l=this._settings,c=l.manipulators.vertex,m=new _({view:n,spatialReference:n.spatialReference,vertices:e,elevationInfo:this.internalGraphicsLayer.elevationInfo,size:c.size,outlineSize:c.outlineSize,renderOccluded:c.renderOccluded,attached:!1,isDecoration:!0}),p=i([o(()=>({color:t(l.manipulators.vertex.color),outlineColor:t(l.manipulators.vertex.outlineColor)}),({color:e,outlineColor:t})=>{m.color=e,m.outlineColor=t},a),r(()=>{this._verticesVisualElement=s(this._verticesVisualElement)})]);return m.attached=!0,this._verticesVisualElement=m,p}updateGraphicGeometry(e){if("mesh"===this.geometryType&&"point"===e?.type){const t=this.geometryToPlace;t?.centerAt(e),T(this.tooltipInfos.mesh,t);const i=this._graphic;return void(t&&i.geometry===t||(i.geometry=t))}super.updateGraphicGeometry(e)}_setupLoadingIndicator(e){const{drawOperation:t}=this;if(!this.geometryToPlace)return t.loading=!1,null;t.loading=!0;const s=r(()=>{t.loading=!1});let o;const a=()=>o&&cancelAnimationFrame(o);return i([l(()=>e.displaying,()=>{a(),o=requestAnimationFrame(()=>s.remove())},{...n,once:!0}),r(a),s])}};e([c({constructOnly:!0})],z.prototype,"elevationInfo",void 0),e([c({constructOnly:!0})],z.prototype,"geometryType",void 0),e([c()],z.prototype,"type",void 0),e([c({constructOnly:!0})],z.prototype,"view",void 0),z=e([m("esri.views.3d.interactive.editingTools.draw.DrawGraphicTool3D")],z);const U=new L,A=h();export{z as DrawGraphicTool3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../chunks/tslib.es6.js";import"../../../../../core/has.js";import{destroyMaybe as e}from"../../../../../core/maybe.js";import{memoize as i}from"../../../../../core/memoize.js";import{ignoreAbortErrors as a}from"../../../../../core/promiseUtils.js";import{syncAndInitial as n,when as s}from"../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as p}from"../../../../../core/support/UpdatingHandles.js";import l from"../../../../../geometry/Point.js";import{clonePoint as h}from"../../../../../layers/graphics/hydratedFeatures.js";import{isPrimaryPointerAction as g}from"../../../analysis/support/measurementUtils.js";import{SnappingVisualizer3D as m}from"../../SnappingVisualizer3D.js";import{hideManipulatorWhileDragging as d,screenToMap3D as u}from"../../editingTools/dragEventPipeline3D.js";import c from"./AreaMeasurement3DView.js";import{PickRequest as y}from"../support/PickRequest.js";import{AnalysisToolBase as v}from"../../../../interactive/AnalysisToolBase.js";import{createCoordinateHelper as w}from"../../../../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as _}from"../../../../interactive/dragEventPipeline.js";import{sketchKeys as f}from"../../../../interactive/keybindings.js";import{ManipulatorCollection as S}from"../../../../interactive/ManipulatorCollection.js";import{EditGeometry as P}from"../../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as V}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as D}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as j}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquire as M}from"../../../../interactive/snapping/SnappingManagerPool.js";import{SnappingOperation as x}from"../../../../interactive/snapping/SnappingOperation.js";import{setupSnappingToggleHandles as k}from"../../../../interactive/snapping/snappingUtils.js";import{createScreenPointFromEvent as O}from"../../../../support/screenUtils.js";let b=class extends v{constructor(t){super(t),this._updatingHandles=new p,this.polygonState="initial",this.removeIncompleteOnCancel=!1,this.manipulators=new S,this._getSnappingContext=i(t=>new D({elevationInfo:{mode:"absolute-height",offset:0},pointer:t,editGeometryOperations:new V(new P("point",w(!0,!1,this.view.spatialReference)),this.view.state.viewingMode),visualizer:new m}))}initialize(){const{view:t,analysisViewData:e,manipulators:i,visible:o}=this;this.measurementView=new c({view:t,analysisViewData:e,toolState:this,manipulators:i,visible:o});const r=M(t);this._snappingManagerResult=r,this.addHandles(r),this._snappingOperation=new x({view:t}),this._updatingHandles.add(()=>this.stagedPoint,t=>{this.analysisViewData.stagedPoint=null!=t?h(t,new l):null},n),k(this,()=>{const t=this.view.inputManager.latestPointerType??"mouse",e=this._getSnappingContext(t);this._updatingHandles.addPromise(a(this._snappingOperation.snapAgainNearPreviousMapPoint(this._snappingManager,e)))}),this._setupManipulators(),this.addHandles([s(()=>"measured"===this.state,()=>this.finishToolCreation(),n),this.analysisViewData.path.on("change",()=>{const t=this.analysisViewData.path;"initial"!==this.polygonState||t.isEmptyPolygon||(t.isValidPolygon?this.polygonState="measured":this.polygonState="drawing")})])}destroy(){this.measurementView.destroy(),this._set("measurementView",null),this._updatingHandles=e(this._updatingHandles)}get _snappingManager(){return this._snappingManagerResult.snappingManager}get state(){return 0===this.analysisViewData.path.numVertices?"ready":this.analysisViewData.path.isValidPolygon&&"editing"!==this.polygonState?"measured":"measuring"}get cursor(){return this.active&&"measured"!==this.polygonState?"crosshair":null}get updating(){return this._updatingHandles.updating||this._snappingManager.updating}get stagedPoint(){return this._snappingOperation.stagedPoint}set stagedPoint(t){this._snappingOperation.stagedPoint=t}get snappingOptions(){return this._snappingManager.options}finishMeasurement(){const{path:t}=this.analysisViewData;t.numVertices<=2||(t.close(),this.polygonState="measured",this._resetSnappingState(),this.active&&(this.view.activeTool=null))}resetCreated(){super.resetCreated(),this._resetSnappingState(),this.polygonState="initial","measured"===this.state&&this.finishToolCreation()}onShow(){this.measurementView.show()}onHide(){this.measurementView.hide()}onDeactivate(){this._resetSnappingState()}onInputEvent(t){switch(t.type){case"immediate-double-click":this._handleImmediateDoubleClick(t);break;case"immediate-click":this._handleImmediateClick(t);break;case"pointer-move":this._handlePointerMove(t);break;case"drag":this._handleDrag(t);break;case"key-down":this._handleKeyDown(t)}}_setupManipulators(){const t=t=>t.events.on("grab-changed",()=>{if(this.analysisViewData.path.isValidPolygon){const t=this.manipulators.some(t=>t.manipulator.grabbing);this.polygonState=t?"editing":"measured"}}),e=e=>{this.addHandles([_(e,(t,e,i,a)=>{const n=d(t),s=t.metadata,o=this._snappingManager,r=this._getSnappingContext(a),p=this._updatingHandles,{snappingStep:l,cancelSnapping:g}=j({snappingManager:o,snappingContext:r,updatingHandles:p});i=i.next(n).next(e=>(this.analysisViewData.lastDraggedVertex=null,this.analysisViewData.path.setVertexPosition(s,m),t.location=m,e)).next(g),e.next(n).next(u(this.view)).next(...l).next(e=>{t.location=e.mapEnd,this.analysisViewData.lastDraggedVertex="end"===e.action?null:s,this.analysisViewData.path.setVertexPosition(s,h(e.mapEnd))});const m=h(this.analysisViewData.path.getVertexPositionAsPoint(s))}),t(e)],e)};this.manipulators.forEach(({manipulator:t})=>{e(t)}),this.addHandles([this.manipulators.on("after-add",({item:{manipulator:t}})=>{e(t)}),this.manipulators.on("after-remove",({item:{manipulator:t}})=>this.removeHandles(t))])}_handleImmediateDoubleClick(t){g(t)&&("drawing"===this.polygonState&&this.finishMeasurement(),t.stopPropagation())}_handleDrag(t){"editing"===this.polygonState&&t.stopPropagation()}_handleImmediateClick(t){if(!g(t))return;const e=O(t),{pointerType:i}=t;if(this.active)switch(this.polygonState){case"initial":if(this._addVertexAt(e,i))return this.stagedPoint=null,this.polygonState="drawing",void t.stopPropagation();break;case"drawing":{const a=this.measurementView.vertexHandleAt(e,i);if(null==a){if(this._addVertexAt(e,i))return this.stagedPoint=null,void t.stopPropagation()}else 0===a.index&&(this.finishMeasurement(),t.stopPropagation());break}}"mouse"===t.pointerType&&this._hoverAt(e)}_handlePointerMove(t){if("mouse"===t.pointerType){const e=O(t);this._hoverAt(e)}}_handleKeyDown(t){const{path:e}=this.analysisViewData;t.key===f.complete&&"drawing"===this.polygonState&&e.numVertices>=3&&(this.stagedPoint=null,this.finishMeasurement(),t.stopPropagation())}_hoverAt(t){const{polygonState:e}=this;if(this.active&&("initial"===e||"drawing"===e)){const e=this._pick(t);if(null!=e?.mapPoint){const t=this._getSnappingContext("mouse");this._updatingHandles.addPromise(a(this._snappingOperation.snap({point:e.mapPoint},this._snappingManager,t)))}}else this.stagedPoint=null}_addVertexAt(t,e){const i=this._pick(t),a=i?.mapPoint;if(null==a)return!1;this.analysis.valid&&"initial"===this.polygonState&&(this.analysis.clear(),this._set("created",!1),this.polygonState="initial");const n=this._getSnappingContext(e),s=this._snappingOperation.update({point:a},this._snappingManager,n),o=h(s,new l);return this.analysisViewData.path.add(o),!0}_pick(t){const e=new y(t);return this.measurementView.pick(e)}_resetSnappingState(){this._snappingManager.doneSnapping(),this._snappingOperation.abort(),this._snappingOperation.stagedPoint=null}get test(){}};t([o({readOnly:!0})],b.prototype,"state",null),t([o()],b.prototype,"polygonState",void 0),t([o({readOnly:!0})],b.prototype,"cursor",null),t([o()],b.prototype,"measurementView",void 0),t([o()],b.prototype,"removeIncompleteOnCancel",void 0),t([o({constructOnly:!0})],b.prototype,"view",void 0),t([o({constructOnly:!0})],b.prototype,"analysis",void 0),t([o({constructOnly:!0})],b.prototype,"analysisViewData",void 0),t([o({readOnly:!0})],b.prototype,"manipulators",void 0),t([o()],b.prototype,"updating",null),t([o()],b.prototype,"stagedPoint",null),t([o()],b.prototype,"snappingOptions",null),b=t([r("esri.views.3d.interactive.measurementTools.areaMeasurement3D.AreaMeasurement3DTool")],b);export{b as default};
5
+ import{_ as t}from"../../../../../chunks/tslib.es6.js";import"../../../../../core/has.js";import{destroyMaybe as e}from"../../../../../core/maybe.js";import{memoize as i}from"../../../../../core/memoize.js";import{ignoreAbortErrors as a}from"../../../../../core/promiseUtils.js";import{syncAndInitial as n,when as s}from"../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as p}from"../../../../../core/support/UpdatingHandles.js";import l from"../../../../../geometry/Point.js";import{clonePoint as h}from"../../../../../layers/graphics/hydratedFeatures.js";import{isPrimaryPointerAction as g}from"../../../analysis/support/measurementUtils.js";import{SnappingVisualizer3D as m}from"../../SnappingVisualizer3D.js";import{hideManipulatorWhileDragging as d,screenToMap3D as u}from"../../editingTools/dragEventPipeline3D.js";import c from"./AreaMeasurement3DView.js";import{PickRequest as y}from"../support/PickRequest.js";import{AnalysisToolBase as w}from"../../../../interactive/AnalysisToolBase.js";import{createCoordinateHelper as v}from"../../../../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as _}from"../../../../interactive/dragEventPipeline.js";import{sketchKeys as f}from"../../../../interactive/keybindings.js";import{ManipulatorCollection as S}from"../../../../interactive/ManipulatorCollection.js";import{EditGeometry as P}from"../../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as V}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as D}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as j}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquire as M}from"../../../../interactive/snapping/SnappingManagerPool.js";import{SnappingOperation as x}from"../../../../interactive/snapping/SnappingOperation.js";import{setupSnappingToggleHandles as k}from"../../../../interactive/snapping/snappingUtils.js";import{createScreenPointFromEvent as O}from"../../../../support/screenUtils.js";let b=class extends w{constructor(t){super(t),this._updatingHandles=new p,this.polygonState="initial",this.removeIncompleteOnCancel=!1,this.manipulators=new S,this._getSnappingContext=i(t=>new D({elevationInfo:{mode:"absolute-height",offset:0},pointer:t,editGeometryOperations:new V(new P("point",v(!0,!1,this.view.spatialReference)),this.view.state.viewingMode),visualizer:new m}))}initialize(){const{view:t,analysisViewData:e,manipulators:i,visible:o}=this;this.measurementView=new c({view:t,analysisViewData:e,toolState:this,manipulators:i,visible:o});const r=M(t);this._snappingManagerResult=r,this.addHandles(r),this._snappingOperation=new x({view:t}),this._updatingHandles.add(()=>this.stagedPoint,t=>{this.analysisViewData.stagedPoint=null!=t?h(t,new l):null},n),k(this,()=>{const t=this.view.inputManager.latestPointerType??"mouse",e=this._getSnappingContext(t);this._updatingHandles.addPromise(a(this._snappingOperation.snapAgainNearPreviousMapPoint(this._snappingManager,e)))}),this._setupManipulators(),this.addHandles([s(()=>"measured"===this.state,()=>this.finishToolCreation(),n),this.analysisViewData.path.on("change",()=>{const t=this.analysisViewData.path;"initial"!==this.polygonState||t.isEmptyPolygon||(t.isValidPolygon?this.polygonState="measured":this.polygonState="drawing")})])}destroy(){this.measurementView.destroy(),this._set("measurementView",null),this._updatingHandles=e(this._updatingHandles)}get _snappingManager(){return this._snappingManagerResult.snappingManager}get state(){return 0===this.analysisViewData.path.numVertices?"ready":this.analysisViewData.path.isValidPolygon&&"editing"!==this.polygonState?"measured":"measuring"}get cursor(){return this.active?"crosshair":null}get updating(){return this._updatingHandles.updating||this._snappingManager.updating}get stagedPoint(){return this._snappingOperation.stagedPoint}set stagedPoint(t){this._snappingOperation.stagedPoint=t}get snappingOptions(){return this._snappingManager.options}finishMeasurement(){const{path:t}=this.analysisViewData;t.numVertices<=2||(t.close(),this.polygonState="measured",this._resetSnappingState(),this.active&&(this.view.activeTool=null))}resetCreated(){super.resetCreated(),this._resetSnappingState(),this.polygonState="initial","measured"===this.state&&(this.polygonState="measured",this.finishToolCreation())}onShow(){this.measurementView.show()}onHide(){this.measurementView.hide()}onDeactivate(){this._resetSnappingState()}onInputEvent(t){switch(t.type){case"immediate-double-click":this._handleImmediateDoubleClick(t);break;case"immediate-click":this._handleImmediateClick(t);break;case"pointer-move":this._handlePointerMove(t);break;case"drag":this._handleDrag(t);break;case"key-down":this._handleKeyDown(t)}}_setupManipulators(){const t=t=>t.events.on("grab-changed",()=>{if(this.analysisViewData.path.isValidPolygon){const t=this.manipulators.some(t=>t.manipulator.grabbing);this.polygonState=t?"editing":"measured"}}),e=e=>{this.addHandles([_(e,(t,e,i,a)=>{const n=d(t),s=t.metadata,o=this._snappingManager,r=this._getSnappingContext(a),p=this._updatingHandles,{snappingStep:l,cancelSnapping:g}=j({snappingManager:o,snappingContext:r,updatingHandles:p});i=i.next(n).next(e=>(this.analysisViewData.lastDraggedVertex=null,this.analysisViewData.path.setVertexPosition(s,m),t.location=m,e)).next(g),e.next(n).next(u(this.view)).next(...l).next(e=>{t.location=e.mapEnd,this.analysisViewData.lastDraggedVertex="end"===e.action?null:s,this.analysisViewData.path.setVertexPosition(s,h(e.mapEnd))});const m=h(this.analysisViewData.path.getVertexPositionAsPoint(s))}),t(e)],e)};this.manipulators.forEach(({manipulator:t})=>{e(t)}),this.addHandles([this.manipulators.on("after-add",({item:{manipulator:t}})=>{e(t)}),this.manipulators.on("after-remove",({item:{manipulator:t}})=>this.removeHandles(t))])}_handleImmediateDoubleClick(t){g(t)&&("drawing"===this.polygonState&&this.finishMeasurement(),t.stopPropagation())}_handleDrag(t){"editing"===this.polygonState&&t.stopPropagation()}_handleImmediateClick(t){if(!g(t))return;const e=O(t),{pointerType:i}=t;if(this.active)switch(this.polygonState){case"initial":case"measured":if(this._addVertexAt(e,i))return this.stagedPoint=null,this.polygonState="drawing",void t.stopPropagation();break;case"drawing":{const a=this.measurementView.vertexHandleAt(e,i);if(null==a){if(this._addVertexAt(e,i))return this.stagedPoint=null,void t.stopPropagation()}else 0===a.index&&(this.finishMeasurement(),t.stopPropagation());break}}"mouse"===t.pointerType&&this._hoverAt(e)}_handlePointerMove(t){if("mouse"===t.pointerType){const e=O(t);this._hoverAt(e)}}_handleKeyDown(t){const{path:e}=this.analysisViewData;t.key===f.complete&&"drawing"===this.polygonState&&e.numVertices>=3&&(this.stagedPoint=null,this.finishMeasurement(),t.stopPropagation())}_hoverAt(t){const{polygonState:e}=this;if(this.active&&C.has(e)){const e=this._pick(t);if(null!=e?.mapPoint){const t=this._getSnappingContext("mouse");this._updatingHandles.addPromise(a(this._snappingOperation.snap({point:e.mapPoint},this._snappingManager,t)))}}else this.stagedPoint=null}_addVertexAt(t,e){const i=this._pick(t),a=i?.mapPoint;if(null==a)return!1;this.analysis.valid&&"measured"===this.polygonState&&(this.analysis.clear(),this._set("created",!1),this.polygonState="initial");const n=this._getSnappingContext(e),s=this._snappingOperation.update({point:a},this._snappingManager,n),o=h(s,new l);return this.analysisViewData.path.add(o),!0}_pick(t){const e=new y(t);return this.measurementView.pick(e)}_resetSnappingState(){this._snappingManager.doneSnapping(),this._snappingOperation.abort(),this._snappingOperation.stagedPoint=null}get test(){}};t([o({readOnly:!0})],b.prototype,"state",null),t([o()],b.prototype,"polygonState",void 0),t([o({readOnly:!0})],b.prototype,"cursor",null),t([o()],b.prototype,"measurementView",void 0),t([o()],b.prototype,"removeIncompleteOnCancel",void 0),t([o({constructOnly:!0})],b.prototype,"view",void 0),t([o({constructOnly:!0})],b.prototype,"analysis",void 0),t([o({constructOnly:!0})],b.prototype,"analysisViewData",void 0),t([o({readOnly:!0})],b.prototype,"manipulators",void 0),t([o()],b.prototype,"updating",null),t([o()],b.prototype,"stagedPoint",null),t([o()],b.prototype,"snappingOptions",null),b=t([r("esri.views.3d.interactive.measurementTools.areaMeasurement3D.AreaMeasurement3DTool")],b);const C=new Set(["initial","drawing","measured"]);export{b 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.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Evented.js";import t from"../../../core/Identifiable.js";import i from"../../../core/Promise.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";const p=(p,n)=>{let l=class extends(i.EsriPromiseMixin(t.IdentifiableMixin(r.EventedMixin(p)))){constructor(e){super(e)}initialize(){}get suspended(){return!this.canResume()}get updating(){return!this.suspended&&this.isUpdating()}get visible(){return!!this.sublayer?.visible}set visible(e){this._overrideIfSome("visible",e)}get fullOpacity(){const e=e=>null!=e?e:1;return e(this.sublayer?.opacity)*e(this.parent?.fullOpacity)}canResume(){return!this.parent?.suspended&&this.view?.ready&&this.visible||!1}isUpdating(){return!1}};return e([s()],l.prototype,"sublayer",void 0),e([s()],l.prototype,"parent",void 0),e([s()],l.prototype,"view",void 0),e([s({readOnly:!0})],l.prototype,"suspended",null),e([s({type:Boolean,readOnly:!0})],l.prototype,"updating",null),e([s()],l.prototype,"visible",null),e([s()],l.prototype,"fullOpacity",null),l=e([o("esri.views.3d.layers.BuildingSublayerView3D")],l),l};export{p as BuildingSublayerView3DMixin};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Evented.js";import t from"../../../core/Identifiable.js";import i from"../../../core/Promise.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";const p=(p,n)=>{const l=i.EsriPromiseMixin(t.IdentifiableMixin(r.EventedMixin(p)));let a=class extends l{constructor(e){super(e)}initialize(){}get suspended(){return!this.canResume()}get updating(){return!this.suspended&&this.isUpdating()}get visible(){return!!this.sublayer?.visible}set visible(e){this._overrideIfSome("visible",e)}get fullOpacity(){const e=e=>null!=e?e:1;return e(this.sublayer?.opacity)*e(this.parent?.fullOpacity)}canResume(){return!this.parent?.suspended&&this.view?.ready&&this.visible||!1}isUpdating(){return!1}};return e([s()],a.prototype,"sublayer",void 0),e([s()],a.prototype,"parent",void 0),e([s()],a.prototype,"view",void 0),e([s({readOnly:!0})],a.prototype,"suspended",null),e([s({type:Boolean,readOnly:!0})],a.prototype,"updating",null),e([s()],a.prototype,"visible",null),e([s()],a.prototype,"fullOpacity",null),a=e([o("esri.views.3d.layers.BuildingSublayerView3D")],a),a};export{p as BuildingSublayerView3DMixin};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import o from"../../../core/Error.js";import i from"../../../core/Logger.js";import{releaseMaybe as t}from"../../../core/maybe.js";import{isAborted as r}from"../../../core/promiseUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{ElevationTileData as n}from"../../../layers/support/ElevationTileData.js";import{acquireDecoder as l}from"../../../layers/support/LercDecoder.js";import{ElevationLayerView3DModifications as c,ElevationLayerView3DModification as m}from"./ElevationLayerView3DModifications.js";import{LayerView3D as p}from"./LayerView3D.js";import{TiledLayerView3D as d}from"./TiledLayerView3D.js";import{elevationNoDataValue as y}from"../terrain/TerrainConst.js";import{useFetchTileForLayer as f}from"../terrain/terrainUtils.js";import h from"../../layers/LayerView.js";let g=class extends(d(p(h))){constructor(){super(...arguments),this.type="elevation-3d",this.modifications=new c}get tileInfo(){return this.layer.tileInfo}initialize(){const e=this.view,i=e.map?.allLayers,t=i&&i.includes(this.layer),r=e.map?.ground?.layers,s=r&&r.includes(this.layer);if(t&&!s){const e=new o("layerview:elevation-layer-only",`3D elevation layer '${this.layer.id}' can only be added to layers in map.ground`);this.addResolvingPromise(Promise.reject(e))}this._lercDecoder=l(e.resourceController),this._addTilingSchemeMatchPromise()}destroy(){this._lercDecoder=t(this._lercDecoder)}async fetchElevationTile(e,o){const i=await this._fetchTileData(e.lij,o);if(!r(o))return i&&await this.modifications.apply(i,e,o.signal),i}async _fetchTileData(e,o){const t=this.layer;if(f(t)){const s=await t.fetchTile(e[0],e[1],e[2],{noDataValue:y,signal:o.signal});return r(o)?void i.getLogger(this).warnOnce("A call to fetchTile resolved even though the request was aborted. fetchTile should not resolve if options.signal.aborted is true."):s}const s=this.getTileUrl(e),a=await o.requester.request(s,"binary",o),l=await this._lercDecoder.decode(a,{noDataValue:y},o.signal);if(l)return new n(l);throw new Error("LERC decoding failed")}async setModifications(e){if(this.modifications.modifications.length=0,!e||0===e.length)return;this._simplifyOperatorPromise??=import("../../../geometry/operators/simplifyOperator.js");const o=await this._simplifyOperatorPromise;for(const t of e){const e=t.geometry;if("polygon"===e?.type){const r=o.execute(e);if("polygon"===r?.type){const e=new m(t.type,r);this.modifications.modifications.push(e)}else i.getLogger(this).warn("Failed to simplify modification polygon")}else i.getLogger(this).warn("Invalid modification added to elevation layer: "+(e?`non polygon geometry ${e.type}`:"no geometry"))}}};e([s()],g.prototype,"layer",void 0),e([s()],g.prototype,"tileInfo",null),e([s()],g.prototype,"modifications",void 0),g=e([a("esri.views.3d.layers.ElevationLayerView3D")],g);const u=g;export{u as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import o from"../../../core/Error.js";import t from"../../../core/Logger.js";import{releaseMaybe as i}from"../../../core/maybe.js";import{isAborted as r}from"../../../core/promiseUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{ElevationTileData as n}from"../../../layers/support/ElevationTileData.js";import{acquireDecoder as l}from"../../../layers/support/LercDecoder.js";import{DocType as c}from"../support/index.js";import{ElevationLayerView3DModifications as m,ElevationLayerView3DModification as p}from"./ElevationLayerView3DModifications.js";import{LayerView3D as d}from"./LayerView3D.js";import{TiledLayerView3D as f}from"./TiledLayerView3D.js";import{elevationNoDataValue as y}from"../terrain/TerrainConst.js";import{useFetchTileForLayer as h}from"../terrain/terrainUtils.js";import g from"../../layers/LayerView.js";let u=class extends(f(d(g))){constructor(){super(...arguments),this.type="elevation-3d",this.modifications=new m}get tileInfo(){return this.layer.tileInfo}initialize(){const e=this.view,t=e.map?.allLayers,i=t&&t.includes(this.layer),r=e.map?.ground?.layers,s=r&&r.includes(this.layer);if(i&&!s){const e=new o("layerview:elevation-layer-only",`3D elevation layer '${this.layer.id}' can only be added to layers in map.ground`);this.addResolvingPromise(Promise.reject(e))}this._lercDecoder=l(e.resourceController),this._addTilingSchemeMatchPromise()}destroy(){this._lercDecoder=i(this._lercDecoder)}async fetchElevationTile(e,o){const t=await this._fetchTileData(e.lij,o);if(!r(o))return t&&await this.modifications.apply(t,e,o.signal),t}async _fetchTileData(e,o){const i=this.layer;if(h(i)){const s=await i.fetchTile(e[0],e[1],e[2],{noDataValue:y,signal:o.signal});return r(o)?void t.getLogger(this).warnOnce("A call to fetchTile resolved even though the request was aborted. fetchTile should not resolve if options.signal.aborted is true."):s}const s=this.getTileUrl(e),a=await o.requester.request(s,c.BINARY,o),l=await this._lercDecoder.decode(a,{noDataValue:y},o.signal);if(l)return new n(l);throw new Error("LERC decoding failed")}async setModifications(e){if(this.modifications.modifications.length=0,!e||0===e.length)return;this._simplifyOperatorPromise??=import("../../../geometry/operators/simplifyOperator.js");const o=await this._simplifyOperatorPromise;for(const i of e){const e=i.geometry;if("polygon"===e?.type){const r=o.execute(e);if("polygon"===r?.type){const e=new p(i.type,r);this.modifications.modifications.push(e)}else t.getLogger(this).warn("Failed to simplify modification polygon")}else t.getLogger(this).warn("Invalid modification added to elevation layer: "+(e?`non polygon geometry ${e.type}`:"no geometry"))}}};e([s()],u.prototype,"layer",void 0),e([s()],u.prototype,"tileInfo",null),e([s()],u.prototype,"modifications",void 0),u=e([a("esri.views.3d.layers.ElevationLayerView3D")],u);const w=u;export{w 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.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import i from"../../../core/Error.js";import{makeHandle as r}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{destroyMaybe as s}from"../../../core/maybe.js";import n from"../../../core/ReactiveMap.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{hydrateGraphic as a}from"../../../layers/graphics/hydratedFeatures.js";import{combineTimeExtent as p}from"../../../layers/support/timeSupport.js";import h from"../../../rest/support/Query.js";import{isQuery as u,isGraphic as g}from"../../../support/guards.js";import{attributeLookup as c}from"./support/attributeUtils.js";import{normalizeHighlightTargetExceptQuery as y,emptyHighlightHandle as d,isObjectId as m}from"./support/highlightUtils.js";import{UpdatePolicy as f}from"../webgl-engine/lib/UpdatePolicy.js";import{defaultHighlightName as P}from"../../support/HighlightDefaults.js";import{isInEffectiveScaleRange as b,hasLayerBasedScaleVisibility as v}from"../../support/layerViewUtils.js";import{projectWithZConversionSilent as w}from"../../support/projectionUtils.js";const j=j=>{let I=class extends j{constructor(){super(...arguments),this.highlightOptions=null,this.updatePolicy=f.SYNC,this.slicePlaneEnabled=!1,this._highlightCounter=new n,this.fullExtentInLocalViewSpatialReference=null,this.supportsHeightUnitConversion=!0}initialize(){const e=this.layer;"isTable"in e&&e.isTable?this.addResolvingPromise(Promise.reject(new i("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e}))):(this.addResolvingPromise(this._validateGeometryType()),this.addResolvingPromise((async()=>{if(this.destroyed)return;this.fullExtentInLocalViewSpatialReference="local"===this.view.viewingMode?await w(this.layer.fullExtent,this.view.spatialReference):null;const e=await this.createGraphicsPipeline();this.destroyed?e.destroy():(this.graphicsPipeline=e,await e.when())})()),this.notifyChange("updating"))}destroy(){this.graphicsPipeline=s(this.graphicsPipeline)}get dataUpdating(){return!!this.graphicsPipeline?.dataUpdating}get legendEnabled(){return this.canResume()&&this.graphicsPipeline?.legendEnabled}get visibleAtCurrentScale(){return v()?b(this.layer.effectiveScaleRange,this.view.scale):!this.graphicsPipeline?.scaleVisibilitySuspended}get symbologySnappingSupported(){return this.graphicsPipeline.symbologySnappingSupported}get hasAllFeatures(){return this.graphicsPipeline.hasAllFeatures}get hasAllFeaturesInView(){return this.graphicsPipeline.hasAllFeaturesInView}get hasFullGeometries(){return this.graphicsPipeline.hasFullGeometries}get timeExtent(){return p(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get highlightIds(){return Array.from(this._highlightCounter.keys())}get hasHighlight(){return this._highlightCounter.size>0}getHit(e){if(has("feature-pipeline-3d-test"))return this._getHitMock(e);const t=this.graphicsPipeline.findGraphic(t=>t.uid===e);if(null==t)return null;const i=a(t,this.layer);return{type:"graphic",graphic:i,layer:i.layer}}_getHitMock(e){const i=this.layer,r={};r[this.layer.objectIdField]=e;const s=new t({layer:i,sourceLayer:i,visible:!0,symbol:null,attributes:r,geometry:null});return{type:"graphic",graphic:s,layer:s.layer}}whenGraphicBounds(e,t){return this.graphicsPipeline?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsPipeline?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,t){return this.graphicsPipeline.elevationAlignPointsInFeatures(e,t)}async queryForSymbologySnapping(e,t){return this.graphicsPipeline.graphicsQuery.queryForSymbologySnapping(e,t)}queryFeatures(e,t){return this.graphicsPipeline.graphicsQuery.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return null==e?this.createQuery():h.from(e)}_addHighlightIds(e){for(const t of e){const e=this._highlightCounter.get(t)??0;this._highlightCounter.set(t,e+1)}}_removeHighlightIds(e){for(const t of e){let e=this._highlightCounter.get(t);null!=e&&(e--,e>0?this._highlightCounter.set(t,e):this._highlightCounter.delete(t))}}highlight(e,t){const i=t?.name??P,s=this.layer.objectIdField;if(u(e))return this.graphicsPipeline.highlightByQuery(e,i);const n=y(e);if(0===n.length)return d;if(g(n[0])){const e=n;if(null!=c(this.layer.fieldsIndex,e[0].attributes,s)){const t=e.map(e=>c(this.layer.fieldsIndex,e.attributes,s)),n=this.graphicsPipeline.highlightByObjectIds(t,i);return this._addHighlightIds(t),r(()=>{this._removeHighlightIds(t),n.remove()})}return this.graphicsPipeline.highlightByGraphics(e,i)}if(m(n[0])){const e=n;this._addHighlightIds(e);const t=this.graphicsPipeline.highlightByObjectIds(e,i);return r(()=>{t.remove(),this._removeHighlightIds(e)})}return d}maskOccludee(e){return this.graphicsPipeline.maskOccludee(e)}getSuspendInfo(){return{...super.getSuspendInfo(),...this.graphicsPipeline.suspendInfo}}isUpdating(){return!(!this.graphicsPipeline||this.graphicsPipeline.destroyed)&&!(!this.graphicsPipeline?.updating&&this.view?.basemapTerrain?.ready)}async _validateGeometryType(){switch(this.layer.geometryType){case"multipatch":case"multipoint":throw new i("featurelayerview3d:unsupported-geometry-type","Unsupported geometry type ${geometryType}",{geometryType:this.layer.geometryType})}}get performanceInfo(){return this.graphicsPipeline.performanceInfo}queryAttributeBins(){throw new Error("Not implemented")}queryAggregates(){throw new Error("Not implemented")}};return e([o()],I.prototype,"graphicsPipeline",void 0),e([o({readOnly:!0})],I.prototype,"dataUpdating",null),e([o()],I.prototype,"highlightOptions",void 0),e([o()],I.prototype,"suspended",void 0),e([o({readOnly:!0})],I.prototype,"legendEnabled",null),e([o({readOnly:!0})],I.prototype,"visibleAtCurrentScale",null),e([o()],I.prototype,"updating",void 0),e([o({readOnly:!0})],I.prototype,"updatePolicy",void 0),e([o({type:Boolean})],I.prototype,"slicePlaneEnabled",void 0),e([o({readOnly:!0})],I.prototype,"suspendInfo",void 0),e([o()],I.prototype,"symbologySnappingSupported",null),e([o({readOnly:!0})],I.prototype,"hasAllFeatures",null),e([o({readOnly:!0})],I.prototype,"hasAllFeaturesInView",null),e([o({readOnly:!0})],I.prototype,"hasFullGeometries",null),e([o({readOnly:!0})],I.prototype,"timeExtent",null),I=e([l("esri.views.3d.layers.FeatureLikeLayerView3D")],I),I};export{j as FeatureLikeLayerView3D};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import i from"../../../core/Error.js";import{makeHandle as r}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{destroyMaybe as s}from"../../../core/maybe.js";import n from"../../../core/ReactiveMap.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{hydrateGraphic as a}from"../../../layers/graphics/hydratedFeatures.js";import{combineTimeExtent as p}from"../../../layers/support/timeSupport.js";import h from"../../../rest/support/Query.js";import{isQuery as u,isGraphic as g}from"../../../support/guards.js";import{attributeLookup as c}from"./support/attributeUtils.js";import{normalizeHighlightTargetExceptQuery as y,emptyHighlightHandle as d,isObjectId as m}from"./support/highlightUtils.js";import{UpdatePolicy as f}from"../webgl-engine/lib/UpdatePolicy.js";import{defaultHighlightName as P}from"../../support/HighlightDefaults.js";import{isInEffectiveScaleRange as b,hasLayerBasedScaleVisibility as v}from"../../support/layerViewUtils.js";import{projectWithZConversionSilent as w}from"../../support/projectionUtils.js";const j=j=>{const I=j;let _=class extends I{constructor(){super(...arguments),this.highlightOptions=null,this.updatePolicy=f.SYNC,this.slicePlaneEnabled=!1,this._highlightCounter=new n,this.fullExtentInLocalViewSpatialReference=null,this.supportsHeightUnitConversion=!0}initialize(){const e=this.layer;"isTable"in e&&e.isTable?this.addResolvingPromise(Promise.reject(new i("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e}))):(this.addResolvingPromise(this._validateGeometryType()),this.addResolvingPromise((async()=>{if(this.destroyed)return;this.fullExtentInLocalViewSpatialReference="local"===this.view.viewingMode?await w(this.layer.fullExtent,this.view.spatialReference):null;const e=await this.createGraphicsPipeline();this.destroyed?e.destroy():(this.graphicsPipeline=e,await e.when())})()),this.notifyChange("updating"))}destroy(){this.graphicsPipeline=s(this.graphicsPipeline)}get dataUpdating(){return!!this.graphicsPipeline?.dataUpdating}get legendEnabled(){return this.canResume()&&this.graphicsPipeline?.legendEnabled}get visibleAtCurrentScale(){return v()?b(this.layer.effectiveScaleRange,this.view.scale):!this.graphicsPipeline?.scaleVisibilitySuspended}get symbologySnappingSupported(){return this.graphicsPipeline.symbologySnappingSupported}get hasAllFeatures(){return this.graphicsPipeline.hasAllFeatures}get hasAllFeaturesInView(){return this.graphicsPipeline.hasAllFeaturesInView}get hasFullGeometries(){return this.graphicsPipeline.hasFullGeometries}get timeExtent(){return p(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get highlightIds(){return Array.from(this._highlightCounter.keys())}get hasHighlight(){return this._highlightCounter.size>0}getHit(e){if(has("feature-pipeline-3d-test"))return this._getHitMock(e);const t=this.graphicsPipeline.findGraphic(t=>t.uid===e);if(null==t)return null;const i=a(t,this.layer);return{type:"graphic",graphic:i,layer:i.layer}}_getHitMock(e){const i=this.layer,r={};r[this.layer.objectIdField]=e;const s=new t({layer:i,sourceLayer:i,visible:!0,symbol:null,attributes:r,geometry:null});return{type:"graphic",graphic:s,layer:s.layer}}whenGraphicBounds(e,t){return this.graphicsPipeline?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsPipeline?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,t){return this.graphicsPipeline.elevationAlignPointsInFeatures(e,t)}async queryForSymbologySnapping(e,t){return this.graphicsPipeline.graphicsQuery.queryForSymbologySnapping(e,t)}queryFeatures(e,t){return this.graphicsPipeline.graphicsQuery.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return null==e?this.createQuery():h.from(e)}_addHighlightIds(e){for(const t of e){const e=this._highlightCounter.get(t)??0;this._highlightCounter.set(t,e+1)}}_removeHighlightIds(e){for(const t of e){let e=this._highlightCounter.get(t);null!=e&&(e--,e>0?this._highlightCounter.set(t,e):this._highlightCounter.delete(t))}}highlight(e,t){const i=t?.name??P,s=this.layer.objectIdField;if(u(e))return this.graphicsPipeline.highlightByQuery(e,i);const n=y(e);if(0===n.length)return d;if(g(n[0])){const e=n;if(null!=c(this.layer.fieldsIndex,e[0].attributes,s)){const t=e.map(e=>c(this.layer.fieldsIndex,e.attributes,s)),n=this.graphicsPipeline.highlightByObjectIds(t,i);return this._addHighlightIds(t),r(()=>{this._removeHighlightIds(t),n.remove()})}return this.graphicsPipeline.highlightByGraphics(e,i)}if(m(n[0])){const e=n;this._addHighlightIds(e);const t=this.graphicsPipeline.highlightByObjectIds(e,i);return r(()=>{t.remove(),this._removeHighlightIds(e)})}return d}maskOccludee(e){return this.graphicsPipeline.maskOccludee(e)}getSuspendInfo(){return{...super.getSuspendInfo(),...this.graphicsPipeline.suspendInfo}}isUpdating(){return!(!this.graphicsPipeline||this.graphicsPipeline.destroyed)&&!(!this.graphicsPipeline?.updating&&this.view?.basemapTerrain?.ready)}async _validateGeometryType(){switch(this.layer.geometryType){case"multipatch":case"multipoint":throw new i("featurelayerview3d:unsupported-geometry-type","Unsupported geometry type ${geometryType}",{geometryType:this.layer.geometryType})}}get performanceInfo(){return this.graphicsPipeline.performanceInfo}queryAttributeBins(){throw new Error("Not implemented")}queryAggregates(){throw new Error("Not implemented")}};return e([o()],_.prototype,"graphicsPipeline",void 0),e([o({readOnly:!0})],_.prototype,"dataUpdating",null),e([o()],_.prototype,"highlightOptions",void 0),e([o()],_.prototype,"suspended",void 0),e([o({readOnly:!0})],_.prototype,"legendEnabled",null),e([o({readOnly:!0})],_.prototype,"visibleAtCurrentScale",null),e([o()],_.prototype,"updating",void 0),e([o({readOnly:!0})],_.prototype,"updatePolicy",void 0),e([o({type:Boolean})],_.prototype,"slicePlaneEnabled",void 0),e([o({readOnly:!0})],_.prototype,"suspendInfo",void 0),e([o()],_.prototype,"symbologySnappingSupported",null),e([o({readOnly:!0})],_.prototype,"hasAllFeatures",null),e([o({readOnly:!0})],_.prototype,"hasAllFeaturesInView",null),e([o({readOnly:!0})],_.prototype,"hasFullGeometries",null),e([o({readOnly:!0})],_.prototype,"timeExtent",null),_=e([l("esri.views.3d.layers.FeatureLikeLayerView3D")],_),_};export{j as FeatureLikeLayerView3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../core/has.js";import{abortMaybe as t}from"../../../core/maybe.js";import{debounce as r,throwIfAborted as o,ignoreAbortErrors as s}from"../../../core/promiseUtils.js";import{watch as i}from"../../../core/reactiveUtils.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{projectOrLoad as a}from"../../../geometry/projectionUtils.js";import{fromExtent as u,toExtent as d}from"../../../geometry/support/aaBoundingRect.js";import p from"../../../symbols/support/ElevationInfo.js";import{simulationSettingsEqual as c,getFlowSimulationSettings as h}from"../../2d/engine/flow/utils.js";import m from"./SubView3D.js";import{boundingRectOfTiles as f}from"../support/flow/loadUtils.js";import g from"../support/flow/VisualQuery3D.js";let y=class extends m{constructor(e){super(e),this.type="flow",this.renderedTiles=null,this._abortController=null,this._overrideSimulationSettings=null,this._debouncedLoad=r(async e=>{const{view:t}=this;if(0===e.size)return;const r=this._computeExtent(e);if(null==r)return;const s=new g(r,this.layer.timeExtent,this._viewSizeWithEqualRatio(r),t.state.contentPixelRatio);null==this._abortController&&(this._abortController=new AbortController);const i=this._abortController,l=await this.load(s,i.signal);o(i.signal),null!=l&&(this._resources?.detach(),l.attach(t.stage),this._resources=l)}),this._debugStopLoading=!1}initialize(){const{surface:e}=this;this.addHandles([i(()=>this.simulationSettings,()=>this.triggerLoad(),{sync:!0,equals:(e,t)=>null==e&&null==t||null!=e&&null!=t&&c(e,t)}),e.on("tiles-changed",({allTiles:e})=>{this._updateRenderedTiles(e)})]),this._updateRenderedTiles(e.allTiles)}destroy(){this.abort(),this.clear()}abort(){this._abortController=t(this._abortController)}get _dataBounds(){const e=a(this.layer.fullExtent,this.surface.spatialReference).geometry;return null==e?null:u(e)}get elevationInfo(){return this.layer.elevationInfo??_}get _flowRenderer(){const e=this.layer.renderer;return"flow"!==e?.type?null:e}get layer(){return this.layerView.layer}get simulationSettings(){const{_flowRenderer:e,_overrideSimulationSettings:t}=this;if(null==e)return null;let r=h(e);return null!=t&&(r={...r,...t}),r}get surface(){return this.view.basemapTerrain}doRefresh(){return this.triggerLoad()}clear(){this._resources?.detach(),this._resources=null}async triggerLoad(){const{renderedTiles:e}=this;if(null==e||0===e.size||this._debugStopLoading)return;const t=this._debouncedLoad(e);return this.updatingHandles.addPromise(s(t))}async load(e,t){return null}_computeExtent(e){const{_dataBounds:t,surface:{spatialReference:r}}=this;if(null==r||null==t)return null;const o=f(e,t);return null==o?null:d(o,r)}_updateRenderedTiles(e){this.renderedTiles=new Set(e.filter(e=>e.rendered&&e.visible))}_viewSizeWithEqualRatio(e){const t=(e.xmax-e.xmin)/(e.ymax-e.ymin),[r,o]=this.view.size;return r<o?[r,Math.floor(r/t)]:[Math.floor(o*t),o]}get test(){}};e([l()],y.prototype,"type",void 0),e([l()],y.prototype,"renderedTiles",void 0),e([l()],y.prototype,"_dataBounds",null),e([l()],y.prototype,"elevationInfo",null),e([l()],y.prototype,"_flowRenderer",null),e([l()],y.prototype,"layer",null),e([l()],y.prototype,"_overrideSimulationSettings",void 0),e([l()],y.prototype,"simulationSettings",null),e([l()],y.prototype,"surface",null),y=e([n("esri.views.3d.layers.FlowSubView3D")],y);const _=new p({mode:"relative-to-ground",offset:100});export{y as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../core/has.js";import{abortMaybe as t}from"../../../core/maybe.js";import{debounce as r,throwIfAborted as o,ignoreAbortErrors as s}from"../../../core/promiseUtils.js";import{watch as i}from"../../../core/reactiveUtils.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{projectOrLoad as a}from"../../../geometry/projectionUtils.js";import{fromExtent as u,toExtent as d}from"../../../geometry/support/aaBoundingRect.js";import p from"../../../symbols/support/ElevationInfo.js";import{simulationSettingsEqual as c,getFlowSimulationSettings as h}from"../../2d/engine/flow/utils.js";import m from"./SubView3D.js";import{materialParametersFromRenderer as f,createFlowGeometry as g}from"../support/flow/geometryUtils.js";import{boundingRectOfTiles as y}from"../support/flow/loadUtils.js";import _ from"../support/flow/VisualQuery3D.js";let w=class extends m{constructor(e){super(e),this.type="flow",this.renderedTiles=null,this._abortController=null,this._overrideSimulationSettings=null,this._debouncedLoad=r(async e=>{const{view:t}=this;if(0===e.size)return;const r=this._computeExtent(e);if(null==r)return;const s=new _(r,this.layer.timeExtent,this._viewSizeWithEqualRatio(r),t.state.contentPixelRatio);null==this._abortController&&(this._abortController=new AbortController);const i=this._abortController,l=await this.load(s,i.signal);o(i.signal),null!=l&&(this._resources?.detach(),l.attach(t.stage),this._resources=l)}),this._debugStopLoading=!1}initialize(){const{surface:e}=this;this.addHandles([i(()=>this.simulationSettings,()=>this.triggerLoad(),{sync:!0,equals:(e,t)=>null==e&&null==t||null!=e&&null!=t&&c(e,t)}),i(()=>f(this._flowRenderer),e=>this._resources?.setMaterialParameters(e)),e.on("tiles-changed",({allTiles:e})=>{this._updateRenderedTiles(e)})]),this._updateRenderedTiles(e.allTiles)}destroy(){this.abort(),this.clear()}abort(){this._abortController=t(this._abortController)}get _dataBounds(){const e=a(this.layer.fullExtent,this.surface.spatialReference).geometry;return null==e?null:u(e)}get elevationInfo(){return this.layer.elevationInfo??b}get _flowRenderer(){const e=this.layer.renderer;return"flow"!==e?.type?null:e}get layer(){return this.layerView.layer}get simulationSettings(){const{_flowRenderer:e,_overrideSimulationSettings:t}=this;if(null==e)return null;let r=h(e);return null!=t&&(r={...r,...t}),r}get surface(){return this.view.basemapTerrain}doRefresh(){return this.triggerLoad()}clear(){this._resources?.detach(),this._resources=null}async triggerLoad(){const{renderedTiles:e}=this;if(null==e||0===e.size||this._debugStopLoading)return;const t=this._debouncedLoad(e);return this.updatingHandles.addPromise(s(t))}createGeometry(e,t){return g(this.view,e,t,this.elevationInfo,this._flowRenderer)}async load(e,t){return null}_computeExtent(e){const{_dataBounds:t,surface:{spatialReference:r}}=this;if(null==r||null==t)return null;const o=y(e,t);return null==o?null:d(o,r)}_updateRenderedTiles(e){this.renderedTiles=new Set(e.filter(e=>e.rendered&&e.visible))}_viewSizeWithEqualRatio(e){const t=(e.xmax-e.xmin)/(e.ymax-e.ymin),[r,o]=this.view.size;return r<o?[r,Math.floor(r/t)]:[Math.floor(o*t),o]}get test(){}};e([l()],w.prototype,"type",void 0),e([l()],w.prototype,"renderedTiles",void 0),e([l()],w.prototype,"_dataBounds",null),e([l()],w.prototype,"elevationInfo",null),e([l()],w.prototype,"_flowRenderer",null),e([l()],w.prototype,"layer",null),e([l()],w.prototype,"_overrideSimulationSettings",void 0),e([l()],w.prototype,"simulationSettings",null),e([l()],w.prototype,"surface",null),w=e([n("esri.views.3d.layers.FlowSubView3D")],w);const b=new p({mode:"relative-to-ground",offset:100});export{w as default};