@arcgis/core 5.0.0-next.53 → 5.0.0-next.55

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 (812) hide show
  1. package/Basemap.d.ts +1 -1
  2. package/Color.js +1 -1
  3. package/Ground.d.ts +4 -6
  4. package/Ground.js +1 -1
  5. package/PopupTemplate.d.ts +2 -2
  6. package/WebLinkChart.d.ts +1 -1
  7. package/WebScene.js +1 -1
  8. package/applications/Components/QuantityFormatter.d.ts +7 -7
  9. package/applications/Components/analysisUtils.d.ts +28 -53
  10. package/applications/Components/baUtils.d.ts +8 -0
  11. package/applications/Components/drawUtils.d.ts +8 -1
  12. package/applications/Components/featureUtils.d.ts +1 -1
  13. package/applications/Components/imageryUtils.d.ts +2 -2
  14. package/applications/Components/layerOriginUtils.d.ts +3 -3
  15. package/applications/Components/reactiveUtils.d.ts +24 -5
  16. package/applications/Excalibur/videoViewUtils.d.ts +2 -2
  17. package/applications/ExperienceBuilder/sketchUtils.d.ts +6 -6
  18. package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +7 -13
  19. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +7 -7
  20. package/applications/KnowledgeStudio/reshape.d.ts +6 -15
  21. package/applications/MapViewer/mediaUtils.d.ts +4 -4
  22. package/applications/MapViewer/templateUtils.d.ts +3 -3
  23. package/applications/PortalApp/layerUtils.d.ts +10 -0
  24. package/applications/PortalApp/layerUtils.js +5 -0
  25. package/applications/SceneViewer/sceneViewerUtils.d.ts +1 -2
  26. package/arcade/featureSetUtils.js +1 -1
  27. package/arcade/featureset/support/shared.js +1 -1
  28. package/arcade.d.ts +33 -17
  29. package/assets/esri/core/workers/RemoteClient.js +1 -1
  30. package/assets/esri/core/workers/chunks/{5aa354854219361f722b.js → 0099f4729c94c779ba35.js} +1 -1
  31. package/assets/esri/core/workers/chunks/00e407d262c49890afa8.js +1 -0
  32. package/assets/esri/core/workers/chunks/{15a0750c10b510564a42.js → 01d38a9ca9e88c38aab9.js} +1 -1
  33. package/assets/esri/core/workers/chunks/087cf25ca211836a084a.js +1 -0
  34. package/assets/esri/core/workers/chunks/{a3f23f08337e101e4e64.js → 097001462d93b78b64f4.js} +1 -1
  35. package/assets/esri/core/workers/chunks/0a39c6dc57bd60d5587e.js +1 -0
  36. package/assets/esri/core/workers/chunks/0d1e8d5d9abee38e275e.js +316 -0
  37. package/assets/esri/core/workers/chunks/{cef873da468668eb95cb.js → 14765f98b8ea447498a1.js} +6 -7
  38. package/assets/esri/core/workers/chunks/{da922e861d5845ae0979.js → 1ab98591d2f2bc604505.js} +1 -1
  39. package/assets/esri/core/workers/chunks/1b2e17c04c34cfa671a1.js +1 -0
  40. package/assets/esri/core/workers/chunks/211837df0edada4414c5.js +1 -0
  41. package/assets/esri/core/workers/chunks/22b07c54a5fcc27771b0.js +1 -0
  42. package/assets/esri/core/workers/chunks/{cd8fec3500e6503ae020.js → 23a9dd9454d5249bbd59.js} +1 -1
  43. package/assets/esri/core/workers/chunks/311c4914a4f69f3c1525.js +1 -0
  44. package/assets/esri/core/workers/chunks/{108675a17e432a02cf66.js → 35cbc61a006351620ead.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{1bf4b5e5402790ccb450.js → 369f37060608342a4262.js} +1 -1
  46. package/assets/esri/core/workers/chunks/3b5e71b156244789f624.js +1 -0
  47. package/assets/esri/core/workers/chunks/3f0959b1abafe516146e.js +1 -0
  48. package/assets/esri/core/workers/chunks/{308fb48d080e01499a26.js → 436f206898306df019ac.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{553ca1e55e9f1359839c.js → 44c228388a95fa958827.js} +1 -1
  50. package/assets/esri/core/workers/chunks/454c15367cccbf63af7a.js +1 -0
  51. package/assets/esri/core/workers/chunks/{11ab10668632648b2ba7.js → 492d575894c7905bb70c.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{f3d8d5fe15501220792d.js → 495b11fdecc3ba90d454.js} +1 -1
  53. package/assets/esri/core/workers/chunks/4f33a2ecb154a2c2449c.js +1 -0
  54. package/assets/esri/core/workers/chunks/{b1d3d2c93c189e215f67.js → 5047acfd66539eefe353.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{cddce67919e13e2f365e.js → 51fd6662245b920af652.js} +1 -1
  56. package/assets/esri/core/workers/chunks/52726458f590e726d52c.js +1 -0
  57. package/assets/esri/core/workers/chunks/5873c7b65d0fb04998fb.js +1 -0
  58. package/assets/esri/core/workers/chunks/{d677b378449257103ec4.js → 58cf5b9a6aa685fc3367.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{395a0773ccafd1f24c4d.js → 5d31fbabaa875f8627c0.js} +1 -1
  60. package/assets/esri/core/workers/chunks/67a45faa80316f43c51b.js +1 -0
  61. package/assets/esri/core/workers/chunks/6d09965ab2bff9da88b6.js +1 -0
  62. package/assets/esri/core/workers/chunks/{521aac8a665e98e4ca78.js → 700122f775b98a7ed353.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{a92c1171314a68504c1b.js → 7353d78feba7e6302b6e.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{13ce8e8d45779b11ee12.js → 7f4fa2f2e85863d3cfb9.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{a4f89568205d78d91cfe.js → 80c36f1786ae0be00962.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{549f4ab9e285deaf04fb.js → 81d89107ff82604a3ea0.js} +1 -1
  67. package/assets/esri/core/workers/chunks/8208c073e606973ea1ad.js +1 -0
  68. package/assets/esri/core/workers/chunks/{62ed6b45482e39d67785.js → 893a5ab0c2df9262efd8.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{1f0c7ab33e466a37c7f9.js → 8c1f1eb36198ce40ef13.js} +1 -1
  70. package/assets/esri/core/workers/chunks/92928c56b312e1514600.js +1 -0
  71. package/assets/esri/core/workers/chunks/94929cf2b9fc66a93882.js +1 -0
  72. package/assets/esri/core/workers/chunks/94f02082a006003ef5a9.js +1 -0
  73. package/assets/esri/core/workers/chunks/951e3c911a3486b1e609.js +1 -0
  74. package/assets/esri/core/workers/chunks/{54666586754949bfa584.js → 983356eb4fd0a0dcf3fd.js} +1 -1
  75. package/assets/esri/core/workers/chunks/a16e75ff5cd9b22be197.js +1 -0
  76. package/assets/esri/core/workers/chunks/{36d9208895abd1ba4ff1.js → a623676c74745e040a2a.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{1065fd655bb7cee243fd.js → a624dd283d264dce35a8.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{2dfaead2ec6434513d45.js → a6742abe3ebe371e85f1.js} +1 -1
  79. package/assets/esri/core/workers/chunks/acc7ff44bfcb5c195114.js +1 -0
  80. package/assets/esri/core/workers/chunks/ad92427bf597a6e0a299.js +1 -0
  81. package/assets/esri/core/workers/chunks/{640085b5ade5c7f16228.js → b285de471ca90f38ec25.js} +1 -1
  82. package/assets/esri/core/workers/chunks/b8f83a272fc41765031d.js +1 -0
  83. package/assets/esri/core/workers/chunks/{19270a2de33f2662005b.js → b93f2bd6429879f92143.js} +1 -1
  84. package/assets/esri/core/workers/chunks/be6cc8a1485961f22372.js +1 -0
  85. package/assets/esri/core/workers/chunks/{bf5a120bc0c4851dbb69.js → bef2a70d382515b3c84e.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{e2973e5626e5039209f9.js → c448540065690cac0744.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{95057105f1b3bf805140.js → cd2ea924cb91cdb6dde9.js} +1 -1
  88. package/assets/esri/core/workers/chunks/d199deff988eaefe18b4.js +1 -0
  89. package/assets/esri/core/workers/chunks/{2ef4c0092c59a98a5532.js → d54988c21ea5667d00b7.js} +1 -1
  90. package/assets/esri/core/workers/chunks/d94a2ad5a91de7086fbe.js +1 -0
  91. package/assets/esri/core/workers/chunks/d9736c783513e9c9b22f.js +1 -0
  92. package/assets/esri/core/workers/chunks/{23396a6318edf9264c1f.js → dcf6f7001f470f76bd3e.js} +1 -1
  93. package/assets/esri/core/workers/chunks/dd99b77a7c0a052507bb.js +33 -0
  94. package/assets/esri/core/workers/chunks/{cd39a53ef74f47604977.js → e03c706e327f4989280a.js} +1 -1
  95. package/assets/esri/core/workers/chunks/e47535f795b15608a6cb.js +1 -0
  96. package/assets/esri/core/workers/chunks/e572ffc1d000e4e6325f.js +1 -0
  97. package/assets/esri/core/workers/chunks/ed38c1043e6a83f49f93.js +1 -0
  98. package/assets/esri/core/workers/chunks/f44f358db5c56d5bbc0c.js +1 -0
  99. package/assets/esri/core/workers/chunks/fa95c9248fbfab338f2e.js +1 -0
  100. package/chunks/ChapmanAtmosphere.glsl.js +12 -9
  101. package/chunks/ComponentShader.glsl.js +29 -29
  102. package/chunks/GlowComposition.glsl.js +1 -1
  103. package/chunks/Haze.glsl.js +15 -21
  104. package/chunks/RasterColorizer.glsl.js +10 -10
  105. package/chunks/Viewshed.glsl.js +1 -1
  106. package/config.d.ts +1 -1
  107. package/config.js +1 -1
  108. package/core/Collection.d.ts +1 -1
  109. package/core/Error.d.ts +1 -1
  110. package/core/Evented.d.ts +1 -1
  111. package/core/accessorSupport/decorators.d.ts +1 -1
  112. package/core/colorUtils.js +1 -1
  113. package/editing/sharedTemplates/SharedTemplate.d.ts +1 -1
  114. package/editing/sharedTemplates/SharedTemplateMetadata.d.ts +1 -1
  115. package/geometry/Mesh.d.ts +1 -2
  116. package/geometry/coordinateFormatter.d.ts +1 -1
  117. package/geometry/projection/projectPointToVector.js +1 -1
  118. package/geometry/projectionUtils.js +1 -1
  119. package/geometry/support/MeshMaterial.d.ts +1 -1
  120. package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
  121. package/geometry/support/MeshTexture.d.ts +1 -1
  122. package/geometry/support/meshUtils/{interfaces.d.ts → types.d.ts} +10 -1
  123. package/geometry/support/meshUtils.d.ts +1 -1
  124. package/geometry/support/normalizeUtils.d.ts +1 -1
  125. package/geometry/support/typeUtils.d.ts +3 -1
  126. package/geometry/support/typeUtils.js +1 -1
  127. package/{views/3d/glTF/internal/resourceUtils.d.ts → geometry/types.d.ts} +5 -1
  128. package/interfaces.d.ts +779 -812
  129. package/intl/date.d.ts +1 -1
  130. package/kernel.js +1 -1
  131. package/layers/CSVLayer.d.ts +3 -3
  132. package/layers/CatalogLayer.d.ts +1 -1
  133. package/layers/FeatureLayer.d.ts +7 -4
  134. package/layers/GaussianSplatLayer.d.ts +22 -0
  135. package/layers/GeoJSONLayer.d.ts +3 -3
  136. package/layers/ImageryTileLayer.d.ts +9 -9
  137. package/layers/MapImageLayer.d.ts +2 -2
  138. package/layers/OrientedImageryLayer.d.ts +2 -2
  139. package/layers/ParquetLayer.d.ts +1 -1
  140. package/layers/RouteLayer.d.ts +3 -3
  141. package/layers/SceneLayer.d.ts +3 -3
  142. package/layers/SubtypeGroupLayer.d.ts +1 -1
  143. package/layers/VectorTileLayer.d.ts +3 -3
  144. package/layers/VideoLayer.d.ts +2 -2
  145. package/layers/WCSLayer.d.ts +1 -1
  146. package/layers/WFSLayer.d.ts +3 -3
  147. package/layers/catalog/CatalogFootprintLayer.d.ts +3 -3
  148. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  149. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  150. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  151. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
  152. package/layers/knowledgeGraph/layerUtils.js +1 -1
  153. package/layers/mixins/ArcGISImageService.d.ts +7 -7
  154. package/layers/mixins/BlendLayer.d.ts +2 -2
  155. package/layers/mixins/EditBusLayer.d.ts +6 -0
  156. package/layers/mixins/FeatureLayerBase.d.ts +2 -2
  157. package/layers/mixins/ImageryTileMixin.d.ts +4 -4
  158. package/layers/mixins/properties/ILayerWithGetFeatureTitle.d.ts +1 -1
  159. package/layers/ogc/wcsUtils.d.ts +1 -1
  160. package/layers/orientedImagery/transformations/imageToWorld.d.ts +2 -2
  161. package/layers/orientedImagery/transformations/{interfaces.d.ts → types.d.ts} +1 -1
  162. package/layers/orientedImagery/transformations/worldToImage.d.ts +2 -2
  163. package/layers/raster/datasets/wcsCapabilitiesParser.d.ts +1 -1
  164. package/layers/raster/datasets/wcsCoverageParser.d.ts +1 -1
  165. package/layers/raster/functions/creators/createAppearenceFunctions.d.ts +2 -2
  166. package/layers/raster/functions/creators/createBandIndexFunctions.d.ts +1 -1
  167. package/layers/raster/functions/creators/createChangeFunctions.d.ts +1 -1
  168. package/layers/raster/functions/creators/createConversionFunctions.d.ts +1 -1
  169. package/layers/raster/functions/creators/createDataManagementFunctions.d.ts +2 -2
  170. package/layers/raster/functions/creators/createLocalFunctions.d.ts +1 -1
  171. package/layers/raster/functions/creators/createMultiRasterAnalysisFunctions.d.ts +1 -1
  172. package/layers/raster/functions/creators/createStatisticsFunctions.d.ts +1 -1
  173. package/layers/raster/functions/creators/createSurfaceFunctions.d.ts +1 -1
  174. package/layers/support/ControlPoint.d.ts +3 -3
  175. package/layers/support/ControlPointsGeoreference.d.ts +6 -6
  176. package/layers/support/EditingCapabilities.d.ts +2 -2
  177. package/layers/support/FeatureEffect.d.ts +3 -3
  178. package/layers/support/LabelClass.d.ts +1 -1
  179. package/layers/support/RasterInfo.d.ts +1 -1
  180. package/layers/support/SpriteSource.d.ts +1 -1
  181. package/layers/support/StreamConnection.d.ts +1 -1
  182. package/layers/support/Sublayer.d.ts +1 -1
  183. package/layers/support/SubtypeSublayer.d.ts +15 -2
  184. package/layers/support/TimeInfo.d.ts +1 -1
  185. package/layers/support/capabilities.js +1 -1
  186. package/layers/support/layerUtils.js +1 -1
  187. package/layers/support/rasterFunctionUtils.d.ts +1 -1
  188. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  189. package/layers/support/{interfaces.d.ts → types.d.ts} +6 -6
  190. package/layers/{interfaces.d.ts → types.d.ts} +18 -1
  191. package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
  192. package/linkChart/OrganicLayoutSettings.d.ts +1 -1
  193. package/networks/Network.d.ts +4 -4
  194. package/networks/UtilityNetwork.d.ts +8 -8
  195. package/networks/support/TopologyValidationJobInfo.d.ts +1 -1
  196. package/networks/support/TraceJobInfo.d.ts +1 -1
  197. package/package.json +1 -1
  198. package/popup/content/CustomContent.d.ts +1 -1
  199. package/portal/PortalItem.d.ts +1 -1
  200. package/portal/PortalItemResource.d.ts +1 -1
  201. package/portal/PortalUser.d.ts +2 -2
  202. package/renderers/FlowRenderer.d.ts +1 -1
  203. package/renderers/RasterStretchRenderer.d.ts +2 -2
  204. package/renderers/Renderer.d.ts +1 -1
  205. package/renderers/VectorFieldRenderer.d.ts +1 -1
  206. package/renderers/mixins/VisualVariablesMixin.d.ts +3 -3
  207. package/renderers/support/AuthoringInfo.d.ts +1 -1
  208. package/renderers/support/rasterRendererHelper.d.ts +1 -1
  209. package/renderers/support/renderingInfoUtils.js +1 -1
  210. package/renderers/{interfaces.d.ts → types.d.ts} +3 -1
  211. package/renderers/visualVariables/SizeVariable.d.ts +1 -1
  212. package/renderers/visualVariables/VisualVariable.d.ts +1 -1
  213. package/request/{interfaces.d.ts → types.d.ts} +10 -10
  214. package/request.d.ts +4 -4
  215. package/rest/closestFacility.d.ts +1 -1
  216. package/rest/featureService/FeatureService.d.ts +1 -1
  217. package/rest/featureService/FeatureService.js +1 -1
  218. package/rest/featureService/{interfaces.d.ts → types.d.ts} +16 -3
  219. package/rest/featureService/utils.d.ts +1 -1
  220. package/rest/find.d.ts +1 -1
  221. package/rest/geometryService.d.ts +1 -1
  222. package/rest/geoprocessor.d.ts +1 -1
  223. package/rest/identify.d.ts +1 -1
  224. package/rest/imageService.d.ts +5 -5
  225. package/rest/knowledgeGraphService.d.ts +19 -19
  226. package/rest/lastMileDelivery.d.ts +1 -1
  227. package/rest/locator.d.ts +1 -1
  228. package/rest/networkService.d.ts +1 -1
  229. package/rest/networks/queryAssociations.d.ts +1 -1
  230. package/rest/networks/synthesizeAssociationGeometries.d.ts +1 -1
  231. package/rest/networks/trace.d.ts +1 -1
  232. package/rest/places.d.ts +1 -1
  233. package/rest/print.d.ts +2 -2
  234. package/rest/query.d.ts +2 -2
  235. package/rest/route.d.ts +1 -1
  236. package/rest/serviceArea.d.ts +1 -1
  237. package/rest/support/AddressToLocationsParameters.d.ts +1 -1
  238. package/rest/support/AddressesToLocationsParameters.d.ts +1 -1
  239. package/rest/support/AttributeBinsQuery.d.ts +3 -3
  240. package/rest/support/JobInfo.d.ts +2 -2
  241. package/rest/support/LastMileDeliveryParameters.d.ts +1 -1
  242. package/rest/support/LocationToAddressParameters.d.ts +1 -1
  243. package/rest/support/ParameterValue.d.ts +1 -1
  244. package/rest/support/ProjectParameters.d.ts +1 -1
  245. package/rest/symbolService.d.ts +3 -3
  246. package/smartMapping/heuristics/binLevel.d.ts +1 -1
  247. package/smartMapping/heuristics/scaleRange.d.ts +1 -1
  248. package/smartMapping/heuristics/sizeRange.d.ts +1 -1
  249. package/smartMapping/heuristics/{interfaces.d.ts → types.d.ts} +1 -1
  250. package/smartMapping/labels/clusters.d.ts +1 -1
  251. package/smartMapping/popup/clusters.d.ts +1 -1
  252. package/smartMapping/popup/templates.d.ts +1 -1
  253. package/smartMapping/raster/renderers/classBreaks.d.ts +2 -2
  254. package/smartMapping/raster/renderers/colormap.d.ts +1 -1
  255. package/smartMapping/raster/renderers/flow.d.ts +4 -4
  256. package/smartMapping/raster/renderers/rgb.d.ts +2 -2
  257. package/smartMapping/raster/renderers/shadedRelief.d.ts +1 -1
  258. package/smartMapping/raster/renderers/stretch.d.ts +2 -2
  259. package/smartMapping/raster/renderers/{interfaces.d.ts → types.d.ts} +1 -1
  260. package/smartMapping/raster/renderers/uniqueValue.d.ts +1 -1
  261. package/smartMapping/raster/renderers/vectorField.d.ts +1 -1
  262. package/smartMapping/raster/support/utils.d.ts +1 -1
  263. package/smartMapping/renderers/color.d.ts +4 -4
  264. package/smartMapping/renderers/dotDensity.d.ts +3 -3
  265. package/smartMapping/renderers/heatmap.d.ts +3 -3
  266. package/smartMapping/renderers/location.d.ts +2 -2
  267. package/smartMapping/renderers/opacity.d.ts +3 -3
  268. package/smartMapping/renderers/pieChart.d.ts +3 -3
  269. package/smartMapping/renderers/predominance.d.ts +2 -2
  270. package/smartMapping/renderers/relationship.d.ts +4 -4
  271. package/smartMapping/renderers/size.d.ts +4 -4
  272. package/smartMapping/renderers/support/rendererUtils.d.ts +1 -1
  273. package/smartMapping/renderers/type.d.ts +3 -3
  274. package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
  275. package/smartMapping/statistics/classBreaks.d.ts +2 -2
  276. package/smartMapping/statistics/heatmapStatistics.d.ts +2 -2
  277. package/smartMapping/statistics/histogram.d.ts +1 -2
  278. package/smartMapping/statistics/predominantCategories.d.ts +2 -2
  279. package/smartMapping/statistics/summaryStatistics.d.ts +2 -2
  280. package/smartMapping/statistics/summaryStatisticsForAge.d.ts +1 -1
  281. package/smartMapping/statistics/support/ageUtils.d.ts +1 -1
  282. package/smartMapping/statistics/types.d.ts +571 -0
  283. package/smartMapping/statistics/uniqueValues.d.ts +2 -2
  284. package/smartMapping/symbology/color.d.ts +1 -1
  285. package/smartMapping/symbology/dotDensity.d.ts +1 -1
  286. package/smartMapping/symbology/flow.d.ts +1 -1
  287. package/smartMapping/symbology/heatmap.d.ts +1 -1
  288. package/smartMapping/symbology/location.d.ts +1 -1
  289. package/smartMapping/symbology/pieChart.d.ts +1 -1
  290. package/smartMapping/symbology/predominance.d.ts +1 -1
  291. package/smartMapping/symbology/relationship.d.ts +1 -1
  292. package/smartMapping/symbology/size.d.ts +1 -1
  293. package/smartMapping/symbology/support/colorRamps.d.ts +1 -1
  294. package/smartMapping/symbology/type.d.ts +1 -1
  295. package/smartMapping/types.d.ts +18 -0
  296. package/support/groundUtils.js +1 -1
  297. package/support/revision.js +1 -1
  298. package/support/tests/setupServiceMocksMesh.js +1 -1
  299. package/support/timeUtils.d.ts +1 -1
  300. package/symbols/LineStyleMarker3D.d.ts +1 -1
  301. package/symbols/LineSymbol3DLayer.d.ts +1 -1
  302. package/symbols/LineSymbolMarker.d.ts +1 -1
  303. package/symbols/PathSymbol3DLayer.d.ts +1 -1
  304. package/symbols/SimpleLineSymbol.d.ts +1 -1
  305. package/symbols/patterns/LineStylePattern3D.d.ts +1 -1
  306. package/symbols/patterns/StylePattern3D.d.ts +1 -1
  307. package/symbols/support/ElevationInfo.d.ts +1 -1
  308. package/symbols/support/Symbol3DOutline.d.ts +1 -1
  309. package/symbols/support/symbolUtils.d.ts +2 -2
  310. package/time/TimeExtent.d.ts +1 -1
  311. package/unionTypes.d.ts +3 -3
  312. package/versionManagement/VersionManagementService.d.ts +1 -1
  313. package/versionManagement/VersionManager.d.ts +3 -3
  314. package/versionManagement/VersioningState.d.ts +1 -1
  315. package/versionManagement/utils.d.ts +1 -1
  316. package/versionManagement/versionAdapters/utils.d.ts +7 -7
  317. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  318. package/views/2d/analysis/ElevationProfile/ElevationProfileVisualization2D.js +1 -1
  319. package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +1 -2
  320. package/views/2d/engine/vectorTiles/style/StyleProperty.js +1 -1
  321. package/views/2d/layers/BaseLayerView2D.d.ts +2 -2
  322. package/views/2d/layers/BaseLayerViewGL2D.d.ts +9 -9
  323. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  324. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  325. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  326. package/views/2d/layers/types.d.ts +6 -0
  327. package/views/2d/{layers/support/interfaces.d.ts → types.d.ts} +71 -2
  328. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  329. package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
  330. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  331. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  332. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  333. package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
  334. package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
  335. package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +1 -2
  336. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  337. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  338. package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
  339. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +2 -2
  340. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  341. package/views/3d/analysis/Slice/ResizeManipulator.js +1 -1
  342. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  343. package/views/3d/analysis/Slice/ShiftManipulator.js +1 -1
  344. package/views/3d/analysis/Viewshed/ViewshedArrowManipulator.js +1 -1
  345. package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
  346. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  347. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  348. package/views/3d/analysis/Viewshed/viewshedToolManipulatorUtils.js +1 -1
  349. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  350. package/views/3d/environment/ChapmanApproximation.glsl.js +9 -10
  351. package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
  352. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  353. package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
  354. package/views/3d/environment/ChapmanRaymarching.glsl.js +7 -9
  355. package/views/3d/environment/CloudsParameters.js +1 -1
  356. package/views/3d/environment/EnvironmentManager.js +1 -1
  357. package/views/3d/environment/PrecipitationTechnique.js +1 -1
  358. package/views/3d/environment/SceneViewEnvironment.d.ts +1 -1
  359. package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
  360. package/views/3d/environment/types.d.ts +13 -0
  361. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  362. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  363. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  364. package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
  365. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  366. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  367. package/views/3d/interactive/editingTools/settings.js +1 -1
  368. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  369. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  370. package/views/3d/layers/I3SMeshView3D.js +1 -1
  371. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  372. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  373. package/views/3d/layers/SceneLayerWorker.js +1 -1
  374. package/views/3d/layers/{I3SMeshWorkerHandle.js → SceneLayerWorkerHandle.js} +1 -1
  375. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  376. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  377. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  378. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  379. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  380. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  381. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  382. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  383. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  384. package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
  385. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
  386. package/views/3d/layers/support/edgeUtils.js +1 -1
  387. package/views/3d/support/flow/geometryUtils.js +1 -1
  388. package/views/3d/support/viewpointUtils.js +1 -1
  389. package/views/3d/terrain/BlendLayersTechnique.js +1 -1
  390. package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
  391. package/views/3d/terrain/TerrainRenderer.js +1 -1
  392. package/views/3d/webgl/ManagedFBO.d.ts +4 -5
  393. package/views/3d/webgl/RenderNode.d.ts +1 -1
  394. package/views/3d/{webgl-engine/lighting/SceneLighting.d.ts → webgl/types.d.ts} +4 -6
  395. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  396. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  397. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  398. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  399. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +2 -2
  400. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
  401. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +1 -2
  402. package/views/3d/webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js +1 -1
  403. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
  404. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +18 -27
  405. package/views/3d/webgl-engine/core/shaderModules/Float4sPassUniform.js +1 -1
  406. package/views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js +1 -1
  407. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  408. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  409. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
  410. package/views/3d/webgl-engine/effects/focusArea/FocusAreaOutlineItem.js +1 -1
  411. package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
  412. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  413. package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
  414. package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
  415. package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
  416. package/views/3d/webgl-engine/effects/highlight/HighlightToSingleTechnique.js +1 -1
  417. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  418. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathData.js +1 -1
  419. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
  420. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  421. package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
  422. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  423. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  424. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  425. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
  426. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  427. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  428. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  429. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  430. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  431. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  432. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  433. package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
  434. package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +1 -1
  435. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  436. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  437. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  438. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  439. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  440. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  441. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  442. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  443. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  444. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  445. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  446. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  447. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  448. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +5 -5
  449. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  450. package/views/LinkChartView.d.ts +5 -5
  451. package/views/Magnifier.d.ts +1 -1
  452. package/views/MapView.d.ts +11 -12
  453. package/views/PopupView.d.ts +1 -1
  454. package/views/SceneView.d.ts +19 -23
  455. package/views/VideoView.d.ts +1 -2
  456. package/views/View.d.ts +2 -3
  457. package/views/View2D.d.ts +8 -9
  458. package/views/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +1 -1
  459. package/views/analysis/ElevationProfile/ElevationProfileResult.d.ts +1 -1
  460. package/views/analysis/ElevationProfile/types.d.ts +68 -0
  461. package/views/analysis/types.d.ts +2 -2
  462. package/views/draw/Draw.d.ts +1 -1
  463. package/views/draw/DrawAction.d.ts +1 -1
  464. package/views/draw/DrawOperation.js +1 -1
  465. package/views/draw/PolygonDrawAction.d.ts +1 -1
  466. package/views/draw/PolygonDrawAction.js +1 -1
  467. package/views/draw/PolylineDrawAction.d.ts +1 -1
  468. package/views/draw/PolylineDrawAction.js +1 -1
  469. package/views/draw/support/GraphicMover.js +1 -1
  470. package/views/draw/{interfaces.d.ts → types.d.ts} +3 -1
  471. package/views/input/IViewEvents.d.ts +1 -1
  472. package/views/interactive/Tooltip.d.ts +1 -1
  473. package/views/interactive/sketch/SketchValueOptions.d.ts +1 -1
  474. package/views/interactive/sketch/Units.d.ts +5 -1
  475. package/views/interactive/tooltip/types.d.ts +4 -0
  476. package/views/layers/BuildingComponentSublayerView.d.ts +1 -1
  477. package/views/layers/BuildingSceneLayerView.d.ts +1 -1
  478. package/views/layers/ImageryLayerViewMixin.d.ts +3 -4
  479. package/views/layers/PointCloudLayerView.d.ts +1 -1
  480. package/views/layers/support/highlightUtils.js +1 -1
  481. package/views/navigation/NavigationActionMap.d.ts +1 -1
  482. package/views/support/colorUtils.d.ts +1 -1
  483. package/views/{interfaces.d.ts → types.d.ts} +160 -6
  484. package/views/ui/DefaultUI.d.ts +1 -1
  485. package/views/ui/UI.d.ts +1 -1
  486. package/views/ui/{interfaces.d.ts → types.d.ts} +12 -1
  487. package/webdoc/widgets/FloorFilter.d.ts +2 -2
  488. package/webdoc/widgets/TimeSlider.d.ts +5 -5
  489. package/webmap/InitialViewProperties.d.ts +2 -2
  490. package/webscene/Environment.d.ts +5 -5
  491. package/webscene/InitialViewProperties.d.ts +0 -1
  492. package/webscene/Slide.d.ts +36 -4
  493. package/webscene/Slide.js +1 -1
  494. package/webscene/support/FeatureReference.d.ts +1 -1
  495. package/webscene/support/SlidePopupInfo.d.ts +2 -2
  496. package/webscene/types.d.ts +5 -1
  497. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +1 -1
  498. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +7 -1
  499. package/widgets/AreaMeasurement3D.d.ts +1 -0
  500. package/widgets/Attachments/AttachmentsViewModel.d.ts +1 -1
  501. package/widgets/Attachments.d.ts +1 -1
  502. package/widgets/Attribution/AttributionViewModel.d.ts +2 -2
  503. package/widgets/BasemapGallery/support/LocalBasemapsSource.d.ts +1 -1
  504. package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +1 -1
  505. package/widgets/BasemapGallery.d.ts +1 -1
  506. package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +3 -3
  507. package/widgets/BasemapLayerList.d.ts +2 -2
  508. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +4 -4
  509. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +1 -1
  510. package/widgets/BatchAttributeForm/inputs/EditableInput.d.ts +1 -1
  511. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +1 -1
  512. package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +1 -1
  513. package/widgets/BatchAttributeForm/inputs/InputBase.d.ts +1 -1
  514. package/widgets/BatchAttributeForm/inputs/SingleFeatureInput.d.ts +1 -1
  515. package/widgets/BatchAttributeForm.d.ts +2 -2
  516. package/widgets/Bookmarks/BookmarksViewModel.d.ts +5 -5
  517. package/widgets/Bookmarks/{interfaces.d.ts → types.d.ts} +1 -1
  518. package/widgets/Bookmarks.d.ts +6 -7
  519. package/widgets/BuildingExplorer/BuildingExplorerViewModel.d.ts +1 -0
  520. package/widgets/BuildingExplorer/BuildingLevel.d.ts +1 -0
  521. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.d.ts +1 -0
  522. package/widgets/BuildingExplorer/BuildingPhase.d.ts +1 -0
  523. package/widgets/BuildingExplorer.d.ts +4 -1
  524. package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +3 -3
  525. package/widgets/CatalogLayerList.d.ts +2 -2
  526. package/widgets/Compass/CompassViewModel.d.ts +1 -1
  527. package/widgets/Compass.d.ts +1 -1
  528. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +4 -4
  529. package/widgets/CoordinateConversion/support/Conversion.d.ts +1 -1
  530. package/widgets/CoordinateConversion/support/Format.d.ts +2 -2
  531. package/widgets/CoordinateConversion.d.ts +2 -3
  532. package/widgets/Daylight/DaylightViewModel.d.ts +3 -1
  533. package/widgets/Daylight/VisibleElements.d.ts +3 -0
  534. package/widgets/Daylight/types.d.ts +6 -0
  535. package/widgets/Daylight.d.ts +5 -3
  536. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +7 -1
  537. package/widgets/DirectLineMeasurement3D.d.ts +1 -0
  538. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +1 -2
  539. package/widgets/DirectionalPad/{utils.d.ts → types.d.ts} +3 -1
  540. package/widgets/Directions/DirectionsViewModel.d.ts +3 -3
  541. package/widgets/Directions.d.ts +4 -5
  542. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +1 -1
  543. package/widgets/Editor/CreateFeaturesWorkflow.d.ts +1 -1
  544. package/widgets/Editor/CreateFeaturesWorkflowData.d.ts +2 -2
  545. package/widgets/Editor/EditorViewModel.d.ts +5 -6
  546. package/widgets/Editor/MergeFeaturesWorkflow.d.ts +1 -1
  547. package/widgets/Editor/SplitFeatureWorkflow.d.ts +1 -2
  548. package/widgets/Editor/SplitFeatureWorkflowData.d.ts +2 -2
  549. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  550. package/widgets/Editor/UpdateFeaturesWorkflow.d.ts +1 -1
  551. package/widgets/Editor/UpdateFeaturesWorkflowData.d.ts +1 -1
  552. package/widgets/Editor/UpdateWorkflow.d.ts +1 -1
  553. package/widgets/Editor/Workflow.d.ts +1 -1
  554. package/widgets/Editor/support/EditorEditingCapabilities.d.ts +9 -9
  555. package/widgets/Editor/support/EditorItem.d.ts +4 -4
  556. package/widgets/Editor/support/SketchController.js +1 -1
  557. package/widgets/Editor/{interfaces.d.ts → types.d.ts} +9 -2
  558. package/widgets/Editor/workflowUtils.js +1 -1
  559. package/widgets/Editor.d.ts +10 -11
  560. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -1
  561. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +1 -0
  562. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +1 -0
  563. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -1
  564. package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +2 -0
  565. package/widgets/ElevationProfile/ElevationProfileViewModel.d.ts +3 -5
  566. package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +3 -0
  567. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  568. package/widgets/ElevationProfile/types.d.ts +149 -0
  569. package/widgets/ElevationProfile.d.ts +6 -5
  570. package/widgets/Expand/ExpandViewModel.d.ts +1 -1
  571. package/widgets/Expand.d.ts +2 -2
  572. package/widgets/Feature/FeatureViewModel.d.ts +5 -5
  573. package/widgets/Feature/{interfaces.d.ts → types.d.ts} +5 -1
  574. package/widgets/Feature.d.ts +3 -3
  575. package/widgets/FeatureForm/EditableInput.d.ts +1 -1
  576. package/widgets/FeatureForm/FeatureFormViewModel.d.ts +3 -3
  577. package/widgets/FeatureForm/FieldInput.d.ts +1 -1
  578. package/widgets/FeatureForm/GroupInput.d.ts +1 -1
  579. package/widgets/FeatureForm.d.ts +3 -3
  580. package/widgets/FeatureTable/AttachmentsColumn.d.ts +1 -1
  581. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +3 -4
  582. package/widgets/FeatureTable/Grid/Column.d.ts +2 -3
  583. package/widgets/FeatureTable/Grid/{support/interfaces.d.ts → types.d.ts} +57 -0
  584. package/widgets/FeatureTable/RelationshipColumn.d.ts +1 -1
  585. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +2 -3
  586. package/widgets/FeatureTable/support/interfaces.d.ts +2 -3
  587. package/widgets/FeatureTable.d.ts +3 -4
  588. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +4 -4
  589. package/widgets/FeatureTemplates/TemplateItem.d.ts +1 -1
  590. package/widgets/FeatureTemplates/{interfaces.d.ts → types.d.ts} +1 -1
  591. package/widgets/FeatureTemplates.d.ts +4 -4
  592. package/widgets/Features/FeaturesViewModel.d.ts +12 -12
  593. package/widgets/Features.d.ts +11 -12
  594. package/widgets/FloorFilter.d.ts +1 -1
  595. package/widgets/Histogram/HistogramViewModel.d.ts +3 -3
  596. package/widgets/Histogram.d.ts +3 -3
  597. package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.d.ts +3 -3
  598. package/widgets/HistogramRangeSlider.d.ts +11 -11
  599. package/widgets/Home.d.ts +1 -1
  600. package/widgets/LayerList/LayerListViewModel.d.ts +1 -1
  601. package/widgets/LayerList/ListItem.d.ts +1 -1
  602. package/widgets/LayerList/ListItemPanel.d.ts +1 -1
  603. package/widgets/LayerList/{interfaces.d.ts → types.d.ts} +2 -2
  604. package/widgets/LayerList.d.ts +2 -2
  605. package/widgets/Legend/LegendViewModel.d.ts +1 -1
  606. package/widgets/Legend/support/ActiveLayerInfo.d.ts +1 -1
  607. package/widgets/Legend.d.ts +2 -2
  608. package/widgets/LineOfSight/LineOfSightTarget.d.ts +1 -0
  609. package/widgets/LineOfSight/LineOfSightViewModel.d.ts +1 -0
  610. package/widgets/LineOfSight.d.ts +1 -0
  611. package/widgets/Locate/LocateViewModel.d.ts +1 -1
  612. package/widgets/Locate.d.ts +2 -2
  613. package/widgets/Measurement/MeasurementViewModel.d.ts +2 -2
  614. package/widgets/Measurement.d.ts +1 -1
  615. package/widgets/Popup/{interfaces.d.ts → types.d.ts} +2 -0
  616. package/widgets/Popup.d.ts +8 -9
  617. package/widgets/Print/CustomTemplate.d.ts +1 -1
  618. package/widgets/Print/PrintViewModel.d.ts +2 -2
  619. package/widgets/Print.d.ts +2 -2
  620. package/widgets/ScaleRangeSlider.d.ts +2 -2
  621. package/widgets/Search/LocatorSearchSource.d.ts +2 -2
  622. package/widgets/Search/SearchSource.d.ts +3 -3
  623. package/widgets/Search/types.d.ts +64 -0
  624. package/widgets/Search.d.ts +2 -2
  625. package/widgets/ShadowCast/DurationOptions.d.ts +1 -1
  626. package/widgets/ShadowCast/ShadowCastViewModel.d.ts +2 -2
  627. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  628. package/widgets/ShadowCast/{ShadowVisualizationType.d.ts → types.d.ts} +4 -1
  629. package/widgets/ShadowCast.d.ts +1 -1
  630. package/widgets/Sketch/SketchViewModel.d.ts +5 -5
  631. package/widgets/Sketch/{support/interfaces.d.ts → types.d.ts} +17 -17
  632. package/widgets/Sketch.d.ts +1 -1
  633. package/widgets/Slice/SliceViewModel.d.ts +1 -0
  634. package/widgets/Slice.d.ts +2 -1
  635. package/widgets/Slider/SliderViewModel.d.ts +3 -3
  636. package/widgets/Slider/{interfaces.d.ts → types.d.ts} +2 -2
  637. package/widgets/Slider.d.ts +4 -4
  638. package/widgets/Swipe/SwipeViewModel.d.ts +1 -1
  639. package/widgets/Swipe.d.ts +1 -1
  640. package/widgets/TableList/ListItem.d.ts +1 -1
  641. package/widgets/TableList/TableListViewModel.d.ts +2 -2
  642. package/widgets/TableList.d.ts +2 -2
  643. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +5 -5
  644. package/widgets/TimeSlider.d.ts +14 -15
  645. package/widgets/TimeZoneLabel.d.ts +1 -2
  646. package/widgets/Track/TrackViewModel.d.ts +1 -1
  647. package/widgets/Track.d.ts +1 -1
  648. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  649. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +3 -3
  650. package/widgets/UtilityNetworkTrace/{support/ResultAreaHandler.d.ts → types.d.ts} +2 -2
  651. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  652. package/widgets/ValuePicker/ValuePickerSlider.d.ts +1 -1
  653. package/widgets/ValuePicker.d.ts +2 -2
  654. package/widgets/VersionManagement/VersionManagementViewModel.d.ts +3 -3
  655. package/widgets/Weather/VisibleElements.d.ts +3 -0
  656. package/widgets/Weather/WeatherViewModel.d.ts +4 -3
  657. package/widgets/Weather/types.d.ts +9 -0
  658. package/widgets/Weather.d.ts +2 -1
  659. package/widgets/Widget.d.ts +2 -1
  660. package/widgets/smartMapping/BinaryColorSizeSlider.d.ts +0 -3
  661. package/widgets/smartMapping/ClassedColorSlider/ClassedColorSliderViewModel.d.ts +1 -3
  662. package/widgets/smartMapping/ClassedColorSlider.d.ts +2 -2
  663. package/widgets/smartMapping/ClassedSizeSlider/ClassedSizeSliderViewModel.d.ts +1 -2
  664. package/widgets/smartMapping/ClassedSizeSlider.d.ts +2 -2
  665. package/widgets/smartMapping/ColorSizeSlider/ColorSizeSliderViewModel.d.ts +5 -5
  666. package/widgets/smartMapping/ColorSizeSlider.d.ts +3 -2
  667. package/widgets/smartMapping/ColorSlider/ColorSliderViewModel.d.ts +1 -1
  668. package/widgets/smartMapping/ColorSlider.d.ts +1 -1
  669. package/widgets/smartMapping/HeatmapSlider/HeatmapSliderViewModel.d.ts +2 -4
  670. package/widgets/smartMapping/HeatmapSlider.d.ts +2 -4
  671. package/widgets/smartMapping/OpacitySlider/OpacitySliderViewModel.d.ts +1 -1
  672. package/widgets/smartMapping/OpacitySlider.d.ts +1 -1
  673. package/widgets/smartMapping/SizeSlider.d.ts +2 -2
  674. package/widgets/smartMapping/SmartMappingPrimaryHandleSliderViewModel.d.ts +2 -2
  675. package/widgets/smartMapping/SmartMappingSliderBase.d.ts +11 -14
  676. package/widgets/smartMapping/SmartMappingSliderViewModel.d.ts +5 -6
  677. package/widgets/smartMapping/{support/interfaces.d.ts → types.d.ts} +52 -5
  678. package/widgets/support/GeolocationPositioning.d.ts +1 -1
  679. package/widgets/support/GoTo.d.ts +1 -1
  680. package/widgets/support/GridControls/GridControlsViewModel.d.ts +1 -1
  681. package/widgets/support/forms/types.d.ts +4 -0
  682. package/widgets/support/{goToUtils.d.ts → types.d.ts} +9 -2
  683. package/widgets/{interfaces.d.ts → types.d.ts} +71 -15
  684. package/arcade/featureset/support/shared.d.ts +0 -16
  685. package/assets/esri/core/workers/chunks/0359ac6d938e0df936d0.js +0 -1
  686. package/assets/esri/core/workers/chunks/1db058f91a8e17b24db6.js +0 -1
  687. package/assets/esri/core/workers/chunks/1e286fb7bb833f00dd88.js +0 -1
  688. package/assets/esri/core/workers/chunks/262232437d37a7460b11.js +0 -1
  689. package/assets/esri/core/workers/chunks/2d6fa00273a73d44297d.js +0 -1
  690. package/assets/esri/core/workers/chunks/2fae37f34b28a46841e3.js +0 -1
  691. package/assets/esri/core/workers/chunks/3b1471f908fdecec2815.js +0 -1
  692. package/assets/esri/core/workers/chunks/48b3906ac3ec57253d90.js +0 -1
  693. package/assets/esri/core/workers/chunks/49b581782f63abb6dd9f.js +0 -1
  694. package/assets/esri/core/workers/chunks/4abe2c56aecc9e9b8e86.js +0 -1
  695. package/assets/esri/core/workers/chunks/51b78eca012eac92dd07.js +0 -1
  696. package/assets/esri/core/workers/chunks/5ce524e0060053f35592.js +0 -316
  697. package/assets/esri/core/workers/chunks/5d244fcf5c075afccdc6.js +0 -1
  698. package/assets/esri/core/workers/chunks/6b8c15f3970289e73a47.js +0 -1
  699. package/assets/esri/core/workers/chunks/6cfcfebe9a4c491e453a.js +0 -1
  700. package/assets/esri/core/workers/chunks/710b29729f252f11115d.js +0 -1
  701. package/assets/esri/core/workers/chunks/72a520802b8accfd4512.js +0 -1
  702. package/assets/esri/core/workers/chunks/73892ac79b24b05e6863.js +0 -33
  703. package/assets/esri/core/workers/chunks/75d8244b725a2aee2003.js +0 -1
  704. package/assets/esri/core/workers/chunks/93b139be6488a1b4ba19.js +0 -1
  705. package/assets/esri/core/workers/chunks/a5e7c9517939f762c518.js +0 -1
  706. package/assets/esri/core/workers/chunks/a63ff3e9a9f3853d12f3.js +0 -1
  707. package/assets/esri/core/workers/chunks/a81a7cba815adb575c36.js +0 -1
  708. package/assets/esri/core/workers/chunks/a8fd635d1165db8616ab.js +0 -1
  709. package/assets/esri/core/workers/chunks/b638ce18b93d3cfb9967.js +0 -1
  710. package/assets/esri/core/workers/chunks/ba7e97b1e324118b8156.js +0 -1
  711. package/assets/esri/core/workers/chunks/c0d6336c10b4081c4e32.js +0 -1
  712. package/assets/esri/core/workers/chunks/cc4ae105e727d9211d82.js +0 -1
  713. package/assets/esri/core/workers/chunks/d7a62504e00989202c45.js +0 -1
  714. package/assets/esri/core/workers/chunks/e25be3b6b67ce6b03011.js +0 -1
  715. package/assets/esri/core/workers/chunks/e5ac9b048b16fef9840c.js +0 -1
  716. package/assets/esri/core/workers/chunks/ec7e6427d99cf3148a61.js +0 -1
  717. package/assets/esri/core/workers/chunks/efa95c50d1ed8e74219f.js +0 -1
  718. package/assets/esri/core/workers/chunks/f379fd459a103f42d447.js +0 -1
  719. package/assets/esri/core/workers/chunks/ffcdc7ae03b0570e0db8.js +0 -1
  720. package/geometry/interfaces.d.ts +0 -2
  721. package/geometry/support/interfaces.d.ts +0 -3
  722. package/geometry/support/meshUtils/exporters/gltf/interfaces.d.ts +0 -11
  723. package/renderers/support/interfaces.d.ts +0 -2
  724. package/smartMapping/statistics/interfaces.d.ts +0 -571
  725. package/smartMapping/support/adapters/interfaces.d.ts +0 -18
  726. package/views/2d/ViewStateManager.d.ts +0 -2
  727. package/views/2d/interfaces.d.ts +0 -67
  728. package/views/2d/layers/support/clusterUtils.d.ts +0 -6
  729. package/views/3d/environment/lightingUtils.d.ts +0 -4
  730. package/views/3d/environment/weather.d.ts +0 -9
  731. package/views/3d/interactive/visualElements/DrapedVisualElementResources.d.ts +0 -2
  732. package/views/3d/support/QualityProfile.d.ts +0 -2
  733. package/views/SceneViewHitTestResult.d.ts +0 -64
  734. package/views/ViewingMode.d.ts +0 -2
  735. package/views/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +0 -5
  736. package/views/analysis/ElevationProfile/interfaces.d.ts +0 -73
  737. package/views/draw/DrawingMode.d.ts +0 -2
  738. package/views/draw/support/drawUtils.d.ts +0 -7
  739. package/views/interactive/sketch/interfaces.d.ts +0 -2
  740. package/views/interactive/tooltip/interfaces.d.ts +0 -2
  741. package/views/support/interfaces.d.ts +0 -87
  742. package/views/ui/Padding.d.ts +0 -11
  743. package/views/viewType.d.ts +0 -2
  744. package/views/webgl/enums.d.ts +0 -38
  745. package/webscene/support/featureReferenceUtils.d.ts +0 -4
  746. package/widgets/Daylight/support/daylightUtils.d.ts +0 -4
  747. package/widgets/DirectionalPad/constants.d.ts +0 -2
  748. package/widgets/Editor/support/splitFeatureUtils.d.ts +0 -7
  749. package/widgets/ElevationProfile/ElevationProfileInteraction.d.ts +0 -13
  750. package/widgets/ElevationProfile/elevationProfileLineTypes.d.ts +0 -6
  751. package/widgets/ElevationProfile/interfaces.d.ts +0 -103
  752. package/widgets/ElevationProfile/support/constants.d.ts +0 -14
  753. package/widgets/Feature/support/arcadeFeatureUtils.d.ts +0 -4
  754. package/widgets/FeatureTable/Grid/interfaces.d.ts +0 -57
  755. package/widgets/Popup/actions.d.ts +0 -4
  756. package/widgets/Search/support/interfaces.d.ts +0 -67
  757. package/widgets/ShadowCast/DurationMode.d.ts +0 -3
  758. package/widgets/Weather/enums.d.ts +0 -9
  759. package/widgets/smartMapping/ClassedColorSlider/interfaces.d.ts +0 -19
  760. package/widgets/smartMapping/ClassedSizeSlider/interfaces.d.ts +0 -18
  761. package/widgets/smartMapping/interfaces.d.ts +0 -13
  762. package/widgets/support/Heading.d.ts +0 -7
  763. package/widgets/support/forms/formUtils.d.ts +0 -2
  764. package/widgets/support/forms/interfaces.d.ts +0 -2
  765. package/widgets/support/interfaces.d.ts +0 -56
  766. /package/analysis/{interfaces.d.ts → types.d.ts} +0 -0
  767. /package/core/accessorSupport/{interfaces.d.ts → types.d.ts} +0 -0
  768. /package/core/{interfaces.d.ts → types.d.ts} +0 -0
  769. /package/editing/sharedTemplates/{interfaces.d.ts → types.d.ts} +0 -0
  770. /package/editing/{interfaces.d.ts → types.d.ts} +0 -0
  771. /package/layers/effects/{interfaces.d.ts → types.d.ts} +0 -0
  772. /package/layers/orientedImagery/{interfaces.d.ts → types.d.ts} +0 -0
  773. /package/layers/raster/datasets/{interfaces.d.ts → types.d.ts} +0 -0
  774. /package/layers/raster/functions/{interfaces.d.ts → types.d.ts} +0 -0
  775. /package/linkChart/{interfaces.d.ts → types.d.ts} +0 -0
  776. /package/popup/{interfaces.d.ts → types.d.ts} +0 -0
  777. /package/rest/lastMileDelivery/{interfaces.d.ts → types.d.ts} +0 -0
  778. /package/rest/{interfaces.d.ts → types.d.ts} +0 -0
  779. /package/smartMapping/popup/{interfaces.d.ts → types.d.ts} +0 -0
  780. /package/smartMapping/raster/support/adapters/{interfaces.d.ts → types.d.ts} +0 -0
  781. /package/smartMapping/symbology/{interfaces.d.ts → types.d.ts} +0 -0
  782. /package/statistics/{interfaces.d.ts → types.d.ts} +0 -0
  783. /package/symbols/support/{interfaces.d.ts → types.d.ts} +0 -0
  784. /package/symbols/{interfaces.d.ts → types.d.ts} +0 -0
  785. /package/time/{interfaces.d.ts → types.d.ts} +0 -0
  786. /package/versionManagement/versionAdapters/{interfaces.d.ts → types.d.ts} +0 -0
  787. /package/views/2d/analysis/{interfaces.d.ts → types.d.ts} +0 -0
  788. /package/views/3d/analysis/{interfaces.d.ts → types.d.ts} +0 -0
  789. /package/views/3d/{interfaces.d.ts → types.d.ts} +0 -0
  790. /package/views/animation/{easing.d.ts → types.d.ts} +0 -0
  791. /package/views/draw/{DrawingMode.js → drawingModes.js} +0 -0
  792. /package/views/input/{interfaces.d.ts → types.d.ts} +0 -0
  793. /package/views/navigation/{interfaces.d.ts → types.d.ts} +0 -0
  794. /package/widgets/Attachments/{interfaces.d.ts → types.d.ts} +0 -0
  795. /package/widgets/BasemapGallery/{interfaces.d.ts → types.d.ts} +0 -0
  796. /package/widgets/BasemapLayerList/{interfaces.d.ts → types.d.ts} +0 -0
  797. /package/widgets/BatchAttributeForm/inputs/{interfaces.d.ts → types.d.ts} +0 -0
  798. /package/widgets/BatchAttributeForm/{interfaces.d.ts → types.d.ts} +0 -0
  799. /package/widgets/CatalogLayerList/{interfaces.d.ts → types.d.ts} +0 -0
  800. /package/widgets/FeatureForm/{interfaces.d.ts → types.d.ts} +0 -0
  801. /package/widgets/Histogram/{interfaces.d.ts → types.d.ts} +0 -0
  802. /package/widgets/HistogramRangeSlider/{interfaces.d.ts → types.d.ts} +0 -0
  803. /package/widgets/Measurement/{interfaces.d.ts → types.d.ts} +0 -0
  804. /package/widgets/OrientedImageryViewer/{interfaces.d.ts → types.d.ts} +0 -0
  805. /package/widgets/Print/{interfaces.d.ts → types.d.ts} +0 -0
  806. /package/widgets/ScaleRangeSlider/{interfaces.d.ts → types.d.ts} +0 -0
  807. /package/widgets/Swipe/{interfaces.d.ts → types.d.ts} +0 -0
  808. /package/widgets/TableList/{interfaces.d.ts → types.d.ts} +0 -0
  809. /package/widgets/TimeSlider/{interfaces.d.ts → types.d.ts} +0 -0
  810. /package/widgets/Track/{interfaces.d.ts → types.d.ts} +0 -0
  811. /package/widgets/ValuePicker/{interfaces.d.ts → types.d.ts} +0 -0
  812. /package/widgets/support/GridControls/{interfaces.d.ts → types.d.ts} +0 -0
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../Color.js";import i from"../../../../analysis/LineOfSightAnalysisObserver.js";import a from"../../../../analysis/LineOfSightAnalysisTarget.js";import n from"../../../../core/Handles.js";import"../../../../core/has.js";import r from"../../../../core/Logger.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{when as o,syncAndInitial as l,initial as u}from"../../../../core/reactiveUtils.js";import{property as h,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as d}from"../../../../core/support/UpdatingHandles.js";import{create as p,fromPoints as g}from"../../../../geometry/support/lineSegment.js";import{getGraphicEffectiveElevationInfo as _,getConvertedElevation as m}from"../../../../support/elevationInfoUtils.js";import v from"../../../../symbols/support/ElevationInfo.js";import{getLaserLineColors as b,laserLineConfiguration as y}from"./LineOfSightConfiguration.js";import{LineOfSightTargetManipulator as f,LineOfSightObserverManipulator as T}from"./LineOfSightManipulators.js";import{LineOfSightRayIntersector as L}from"./LineOfSightRayIntersector.js";import{LaserlineVisualElement as M}from"../../interactive/visualElements/LaserlineVisualElement.js";import{MouseButton as w}from"../../../input/IViewEvents.js";import{AnalysisToolBase as k}from"../../../interactive/AnalysisToolBase.js";import{createManipulatorDragEventPipeline as C}from"../../../interactive/dragEventPipeline.js";import{createScreenPointFromEvent as H}from"../../../support/screenUtils.js";let V=class extends k{constructor(e){super(e),this._creationMode=!1,this.removeIncompleteOnCancel=!1,this.analysisViewData=null,this._latestPointerMovePointerType=null,this._laserlineVisualElement=null,this._grabbedManipulator=null,this._analysisHandles=new n,this._updatingHandles=new d,this._manipulatorHandles=new n,this._targetTrackerManipulator=null}initialize(){this._intersector=new L({view:this.view}),this.addHandles(o(()=>"created"===this.state,()=>this.finishToolCreation(),l)),this._observerManipulator=this._createObserverManipulator(),this._createLaserLine(),this.addHandles([this._updatingHandles.add(()=>this.analysisViewData?.elevationAlignedObserver,e=>this._onObserverLocationChange(e),u),this._updatingHandles.add(()=>b(this.view.effectiveTheme),({glowColor:e,innerColor:t,globalAlpha:i})=>this._updateLaserLineStyle(e,t,i),u),this._updatingHandles.add(()=>this._laserLineRendererDependencies(),e=>this._updateLaserLineRenderer(e)),this._connectComputations(),this._updatingHandles.addWhen(()=>!this._shouldRenderTracker,()=>this._clearCursorTracker(),u),this._updatingHandles.add(()=>({active:this.active,hasGrabbedManipulators:this.hasGrabbedManipulators}),({active:e,hasGrabbedManipulators:t})=>{this._creationMode=!!e&&(this._creationMode||!t)},u)])}destroy(){this._updatingHandles=s(this._updatingHandles),this._manipulatorHandles=s(this._manipulatorHandles),this._analysisHandles=s(this._analysisHandles),this._observerManipulator=null,this._clearCursorTracker(),this._removeLaserLine(),this._intersector=null,this._set("analysis",null)}get state(){return this.active?!this.hasGrabbedManipulators||this._creationMode?"creating":"created":null!=this.analysis.observer?.position?"created":"ready"}get cursor(){return this.active&&this._showTracker?"crosshair":null}get updating(){return null!=this.analysisViewData&&this.analysisViewData.updating||this._updatingHandles.updating}get _showTracker(){return this.active&&"mouse"===this._latestPointerMovePointerType}get _shouldRenderTracker(){return this._showTracker&&null!=this.analysis.observer?.position&&!this.hasGrabbedManipulators}continue(){this.view.activeTool=this}stop(){this.view.activeTool=null}onEditableChange(){this.analysisViewData.editable=this.internallyEditable}onInputEvent(e){switch(e.type){case"immediate-double-click":this._doubleClickHandler(e);break;case"pointer-move":this._pointerMoveHandler(e)}}onInputEventAfter(e){if("immediate-click"===e.type)this._clickHandler(e)}onShow(){}onHide(){}onDeactivate(){this._clearCursorTracker()}_connectComputations(){return this._updatingHandles.addOnCollectionChange(()=>this.analysisViewData.computations,e=>this._onComputationsCollectionChange(e),{initial:!0,final:!0})}_onComputationsCollectionChange({added:e,removed:t}){for(const i of t)this._disconnectComputation(i);for(const i of e)this._connectComputation(i)}_connectComputation(e){if(this.destroyed)return void r.getLogger(this).warn("Attempting to connect an analysis to a destroyed LineOfSight tool. Ignoring.");const t=this._analysisHandles;if(t.has(e))return;const i=this._createTargetManipulator(e.target);null==this._targetTrackerManipulator&&i.metadata.target===this.analysisViewData.cursorTarget&&(this._targetTrackerManipulator=i,this._targetTrackerManipulator.available=!1,this._targetTrackerManipulator.interactive=!1,this._updateLaserLineRenderer()),t.add([this._updatingHandles.add(()=>D(e),()=>O(i,e),u),this._updatingHandles.add(()=>e.elevationAlignedTargetLocation,e=>this._onTargetLocationChange(e,i),u)],e)}_disconnectComputation(e){if(this.destroyed)return void r.getLogger(this).warn("Attempting to disconnect an analysis from a destroyed LineOfSight tool. Ignoring.");this._analysisHandles.remove(e);const t=this._getTargetManipulator(e.target);null!=t&&(this.manipulators.remove(t),this._manipulatorHandles.remove(t),null!=this._targetTrackerManipulator&&this._targetTrackerManipulator===t&&(this._targetTrackerManipulator=null))}_clearCursorTracker(){this.analysisViewData.cursorTarget=s(this.analysisViewData.cursorTarget)}_createTargetManipulator(e){const t={target:e,type:"target"},i=new f(this.view,t);return this._manipulatorHandles.add([this._createTargetManipulatorDragPipeline(i),i.events.on("grab-changed",e=>this._manipulatorGrabChanged(i,e)),i.events.on("immediate-click",e=>this._manipulatorClick(i,e))],i),this.manipulators.add(i),null!=e.position?i.elevationAlignedLocation=e.position:i.available=!1,i}_getTargetManipulator(e){let t=null;return this.manipulators.forEach(i=>{const a=i.manipulator;null==t&&"target"===a.metadata.type&&a.metadata.target===e&&(t=a)}),t}_createObserverManipulator(){const e=new T(this.view,{type:"observer",intersection:null});return this._manipulatorHandles.add([this._createObserverManipulatorDragPipeline(e),e.events.on("grab-changed",t=>this._manipulatorGrabChanged(e,t)),e.events.on("immediate-click",t=>this._manipulatorClick(e,t))],e),this.manipulators.add(e),e}_screenToIntersection(){return e=>{const t=this._intersector.getScreenPointIntersection(e.screenEnd);return null==t?null:{...e,intersection:t}}}_createTargetManipulatorDragPipeline(e){return C(e,(t,i,a)=>{i.next(this._screenToIntersection()).next(this._updateTargetDragStep(e)).next(()=>this._updateLaserLineRenderer()),a.next(P(e.metadata.target)).next(()=>this._updateLaserLineRenderer())})}_createObserverManipulatorDragPipeline(e){return C(e,(e,t,i)=>{t.next(this._screenToIntersection()).next(this._updateObserverDragStep()).next(()=>this._updateLaserLineRenderer()),i.next(this._cancelObserverDragStep()).next(()=>this._updateLaserLineRenderer())})}_updateObserverDragStep(){return e=>(null!=e.intersection.mapPoint?(null==this.analysis.observer&&(this.analysis.observer=new i),this._updateFromIntersection(this.analysis.observer,e.intersection)):this.analysis.observer=null,e)}_cancelObserverDragStep(){const e=null!=this.analysis.observer?.position?this.analysis.observer.clone():null;return t=>(this.analysis.observer=e,t)}_updateTargetDragStep(e){return t=>{this._updateFromIntersection(e.metadata.target,t.intersection);const i=t.intersection.mapPoint;return null!=i&&(e.elevationAlignedLocation=i),t}}_manipulatorGrabChanged(e,t){switch(t.action){case"start":this._grabbedManipulator=e;break;case"end":this._grabbedManipulator===e&&(this._grabbedManipulator=null)}}_laserLineRendererDependencies(){return{laserlineVisualElement:this._laserlineVisualElement,grabbedManipulator:this._grabbedManipulator,shouldRenderTracker:this._shouldRenderTracker,observerPosition:null!=this.analysis.observer?this.analysis.observer.position:null,visible:this.visible}}_updateLaserLineRenderer(e=this._laserLineRendererDependencies()){const{laserlineVisualElement:t,grabbedManipulator:i,shouldRenderTracker:a,observerPosition:n,visible:r}=e;if(null==t)return;const s=null!=i?i:a&&null!=n?this._targetTrackerManipulator:null;null!=s&&r?(t.visible=!0,t.heightManifoldTarget=s.renderLocation,s!==this._observerManipulator?t.lineVerticalPlaneSegment=g(this._observerManipulator.renderLocation,s.renderLocation,I):t.lineVerticalPlaneSegment=null):(t.visible=!1,t.heightManifoldTarget=null,t.lineVerticalPlaneSegment=null)}_createLaserLine(){this._removeLaserLine();const{glowWidth:e,innerWidth:t}=y;this._laserlineVisualElement=new M({view:this.view,attached:!0,visible:this.visible,style:{glowWidth:e,innerWidth:t},isDecoration:!0})}_removeLaserLine(){null!=this._laserlineVisualElement&&(this._laserlineVisualElement.destroy(),this._laserlineVisualElement=null)}_updateLaserLineStyle(e,i,a){const n=this._laserlineVisualElement;if(null==n)return;const r=n.style;n.style={...r,glowColor:t.toUnitRGB(e),innerColor:t.toUnitRGB(i),globalAlpha:a}}_onObserverLocationChange(e){null!=e?(this._observerManipulator.metadata.intersection=null,this._observerManipulator.available=!0,this._observerManipulator.elevationAlignedLocation=e):this._observerManipulator.available=!1}_onTargetLocationChange(e,t){null!=e?(t.elevationAlignedLocation=e,t!==this._targetTrackerManipulator&&(t.available=!0)):t.available=!1}_addPointFromClickEvent(e){const t=this._intersector.getScreenPointIntersection(e);if(null!=t?.mapPoint)if(null!=this.analysis.observer?.position){this._clearCursorTracker();const e=new a;this._updateFromIntersection(e,t),this.analysis.targets.add(e)}else{const e=new i;this._updateFromIntersection(e,t),this.analysis.observer=e}}_clickHandler(e){this.active&&e.button!==w.Right&&(this._addPointFromClickEvent(H(e)),e.stopPropagation())}_doubleClickHandler(e){this.active&&e.button!==w.Right&&(this.stop(),e.stopPropagation())}_pointerMoveHandler(e){if(this.hasGrabbedManipulators)return;if(this._latestPointerMovePointerType=e.pointerType,this._updateLaserLineRenderer(),!this._showTracker||null==this.analysis.observer?.position)return;const t=H(e),i=this._intersector.getScreenPointIntersection(t);null!=i?.mapPoint&&(null==this.analysisViewData.cursorTarget&&(this.analysisViewData.cursorTarget=new a),this._updateFromIntersection(this.analysisViewData.cursorTarget,i),this._updateLaserLineRenderer())}_updateFromIntersection(e,t){if(null==t.mapPoint)return e.position=null,e.elevationInfo=null,void(e.feature=null);switch(t.context?.type){case"graphic":{const i=t.context.graphic,a=_(i);"on-the-ground"===a.mode&&(a.mode="relative-to-ground",a.offset=0),e.elevationInfo=new v(a),e.feature=i}break;case"ground":e.elevationInfo=new v({mode:"on-the-ground"}),e.feature=null;break;default:e.elevationInfo=null,e.feature=null}const i=t.mapPoint.clone();i.z=m(this.view,i,{mode:"absolute-height",offset:0},e.elevationInfo),e.position=i}_manipulatorClick(e,t){if("observer"===e.metadata.type||e.grabbing||e.dragging||t.button!==w.Right||this.analysis.targets.length<=1)return;const{target:i}=e.metadata;this.analysis.targets.remove(i),t.stopPropagation()}get testInfo(){}};function P(e){const t=e.position?.clone();return i=>(e.position=t,i)}function O(e,t){const{isValid:i,isTargetVisible:a}=t.computationResult;e.state=i?a?16:32:64}function D(e){const{isValid:t,isTargetVisible:i}=e.computationResult;return{isValid:t,isTargetVisible:i}}e([h({constructOnly:!0})],V.prototype,"view",void 0),e([h({constructOnly:!0})],V.prototype,"analysis",void 0),e([h()],V.prototype,"_creationMode",void 0),e([h({readOnly:!0})],V.prototype,"state",null),e([h({readOnly:!0})],V.prototype,"cursor",null),e([h()],V.prototype,"removeIncompleteOnCancel",void 0),e([h({readOnly:!0})],V.prototype,"updating",null),e([h({constructOnly:!0})],V.prototype,"analysisViewData",void 0),e([h({readOnly:!0})],V.prototype,"_showTracker",null),e([h()],V.prototype,"_latestPointerMovePointerType",void 0),e([h()],V.prototype,"_shouldRenderTracker",null),e([h()],V.prototype,"_laserlineVisualElement",void 0),e([h()],V.prototype,"_grabbedManipulator",void 0),V=e([c("esri.views.3d.analysis.LineOfSight.LineOfSightTool")],V);const I=p();export{V as LineOfSightTool};
5
+ import{__decorate as e}from"tslib";import t from"../../../../analysis/LineOfSightAnalysisObserver.js";import i from"../../../../analysis/LineOfSightAnalysisTarget.js";import a from"../../../../core/Handles.js";import"../../../../core/has.js";import n from"../../../../core/Logger.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{when as s,syncAndInitial as o,initial as l}from"../../../../core/reactiveUtils.js";import{property as u,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as c}from"../../../../core/support/UpdatingHandles.js";import{create as d,fromPoints as p}from"../../../../geometry/support/lineSegment.js";import{getGraphicEffectiveElevationInfo as g,getConvertedElevation as _}from"../../../../support/elevationInfoUtils.js";import m from"../../../../symbols/support/ElevationInfo.js";import{getLaserLineColors as v,laserLineConfiguration as b}from"./LineOfSightConfiguration.js";import{LineOfSightTargetManipulator as y,LineOfSightObserverManipulator as f}from"./LineOfSightManipulators.js";import{LineOfSightRayIntersector as T}from"./LineOfSightRayIntersector.js";import{LaserlineVisualElement as L}from"../../interactive/visualElements/LaserlineVisualElement.js";import{MouseButton as M}from"../../../input/IViewEvents.js";import{AnalysisToolBase as w}from"../../../interactive/AnalysisToolBase.js";import{createManipulatorDragEventPipeline as k}from"../../../interactive/dragEventPipeline.js";import{createScreenPointFromEvent as C}from"../../../support/screenUtils.js";let H=class extends w{constructor(e){super(e),this._creationMode=!1,this.removeIncompleteOnCancel=!1,this.analysisViewData=null,this._latestPointerMovePointerType=null,this._laserlineVisualElement=null,this._grabbedManipulator=null,this._analysisHandles=new a,this._updatingHandles=new c,this._manipulatorHandles=new a,this._targetTrackerManipulator=null}initialize(){this._intersector=new T({view:this.view}),this.addHandles(s(()=>"created"===this.state,()=>this.finishToolCreation(),o)),this._observerManipulator=this._createObserverManipulator(),this._createLaserLine(),this.addHandles([this._updatingHandles.add(()=>this.analysisViewData?.elevationAlignedObserver,e=>this._onObserverLocationChange(e),l),this._updatingHandles.add(()=>v(this.view.effectiveTheme),({glowColor:e,innerColor:t,globalAlpha:i})=>this._updateLaserLineStyle(e,t,i),l),this._updatingHandles.add(()=>this._laserLineRendererDependencies(),e=>this._updateLaserLineRenderer(e)),this._connectComputations(),this._updatingHandles.addWhen(()=>!this._shouldRenderTracker,()=>this._clearCursorTracker(),l),this._updatingHandles.add(()=>({active:this.active,hasGrabbedManipulators:this.hasGrabbedManipulators}),({active:e,hasGrabbedManipulators:t})=>{this._creationMode=!!e&&(this._creationMode||!t)},l)])}destroy(){this._updatingHandles=r(this._updatingHandles),this._manipulatorHandles=r(this._manipulatorHandles),this._analysisHandles=r(this._analysisHandles),this._observerManipulator=null,this._clearCursorTracker(),this._removeLaserLine(),this._intersector=null,this._set("analysis",null)}get state(){return this.active?!this.hasGrabbedManipulators||this._creationMode?"creating":"created":null!=this.analysis.observer?.position?"created":"ready"}get cursor(){return this.active&&this._showTracker?"crosshair":null}get updating(){return null!=this.analysisViewData&&this.analysisViewData.updating||this._updatingHandles.updating}get _showTracker(){return this.active&&"mouse"===this._latestPointerMovePointerType}get _shouldRenderTracker(){return this._showTracker&&null!=this.analysis.observer?.position&&!this.hasGrabbedManipulators}continue(){this.view.activeTool=this}stop(){this.view.activeTool=null}onEditableChange(){this.analysisViewData.editable=this.internallyEditable}onInputEvent(e){switch(e.type){case"immediate-double-click":this._doubleClickHandler(e);break;case"pointer-move":this._pointerMoveHandler(e)}}onInputEventAfter(e){if("immediate-click"===e.type)this._clickHandler(e)}onShow(){}onHide(){}onDeactivate(){this._clearCursorTracker()}_connectComputations(){return this._updatingHandles.addOnCollectionChange(()=>this.analysisViewData.computations,e=>this._onComputationsCollectionChange(e),{initial:!0,final:!0})}_onComputationsCollectionChange({added:e,removed:t}){for(const i of t)this._disconnectComputation(i);for(const i of e)this._connectComputation(i)}_connectComputation(e){if(this.destroyed)return void n.getLogger(this).warn("Attempting to connect an analysis to a destroyed LineOfSight tool. Ignoring.");const t=this._analysisHandles;if(t.has(e))return;const i=this._createTargetManipulator(e.target);null==this._targetTrackerManipulator&&i.metadata.target===this.analysisViewData.cursorTarget&&(this._targetTrackerManipulator=i,this._targetTrackerManipulator.available=!1,this._targetTrackerManipulator.interactive=!1,this._updateLaserLineRenderer()),t.add([this._updatingHandles.add(()=>O(e),()=>P(i,e),l),this._updatingHandles.add(()=>e.elevationAlignedTargetLocation,e=>this._onTargetLocationChange(e,i),l)],e)}_disconnectComputation(e){if(this.destroyed)return void n.getLogger(this).warn("Attempting to disconnect an analysis from a destroyed LineOfSight tool. Ignoring.");this._analysisHandles.remove(e);const t=this._getTargetManipulator(e.target);null!=t&&(this.manipulators.remove(t),this._manipulatorHandles.remove(t),null!=this._targetTrackerManipulator&&this._targetTrackerManipulator===t&&(this._targetTrackerManipulator=null))}_clearCursorTracker(){this.analysisViewData.cursorTarget=r(this.analysisViewData.cursorTarget)}_createTargetManipulator(e){const t={target:e,type:"target"},i=new y(this.view,t);return this._manipulatorHandles.add([this._createTargetManipulatorDragPipeline(i),i.events.on("grab-changed",e=>this._manipulatorGrabChanged(i,e)),i.events.on("immediate-click",e=>this._manipulatorClick(i,e))],i),this.manipulators.add(i),null!=e.position?i.elevationAlignedLocation=e.position:i.available=!1,i}_getTargetManipulator(e){let t=null;return this.manipulators.forEach(i=>{const a=i.manipulator;null==t&&"target"===a.metadata.type&&a.metadata.target===e&&(t=a)}),t}_createObserverManipulator(){const e=new f(this.view,{type:"observer",intersection:null});return this._manipulatorHandles.add([this._createObserverManipulatorDragPipeline(e),e.events.on("grab-changed",t=>this._manipulatorGrabChanged(e,t)),e.events.on("immediate-click",t=>this._manipulatorClick(e,t))],e),this.manipulators.add(e),e}_screenToIntersection(){return e=>{const t=this._intersector.getScreenPointIntersection(e.screenEnd);return null==t?null:{...e,intersection:t}}}_createTargetManipulatorDragPipeline(e){return k(e,(t,i,a)=>{i.next(this._screenToIntersection()).next(this._updateTargetDragStep(e)).next(()=>this._updateLaserLineRenderer()),a.next(V(e.metadata.target)).next(()=>this._updateLaserLineRenderer())})}_createObserverManipulatorDragPipeline(e){return k(e,(e,t,i)=>{t.next(this._screenToIntersection()).next(this._updateObserverDragStep()).next(()=>this._updateLaserLineRenderer()),i.next(this._cancelObserverDragStep()).next(()=>this._updateLaserLineRenderer())})}_updateObserverDragStep(){return e=>(null!=e.intersection.mapPoint?(null==this.analysis.observer&&(this.analysis.observer=new t),this._updateFromIntersection(this.analysis.observer,e.intersection)):this.analysis.observer=null,e)}_cancelObserverDragStep(){const e=null!=this.analysis.observer?.position?this.analysis.observer.clone():null;return t=>(this.analysis.observer=e,t)}_updateTargetDragStep(e){return t=>{this._updateFromIntersection(e.metadata.target,t.intersection);const i=t.intersection.mapPoint;return null!=i&&(e.elevationAlignedLocation=i),t}}_manipulatorGrabChanged(e,t){switch(t.action){case"start":this._grabbedManipulator=e;break;case"end":this._grabbedManipulator===e&&(this._grabbedManipulator=null)}}_laserLineRendererDependencies(){return{laserlineVisualElement:this._laserlineVisualElement,grabbedManipulator:this._grabbedManipulator,shouldRenderTracker:this._shouldRenderTracker,observerPosition:null!=this.analysis.observer?this.analysis.observer.position:null,visible:this.visible}}_updateLaserLineRenderer(e=this._laserLineRendererDependencies()){const{laserlineVisualElement:t,grabbedManipulator:i,shouldRenderTracker:a,observerPosition:n,visible:r}=e;if(null==t)return;const s=null!=i?i:a&&null!=n?this._targetTrackerManipulator:null;null!=s&&r?(t.visible=!0,t.heightManifoldTarget=s.renderLocation,s!==this._observerManipulator?t.lineVerticalPlaneSegment=p(this._observerManipulator.renderLocation,s.renderLocation,D):t.lineVerticalPlaneSegment=null):(t.visible=!1,t.heightManifoldTarget=null,t.lineVerticalPlaneSegment=null)}_createLaserLine(){this._removeLaserLine();const{glowWidth:e,innerWidth:t}=b;this._laserlineVisualElement=new L({view:this.view,attached:!0,visible:this.visible,style:{glowWidth:e,innerWidth:t},isDecoration:!0})}_removeLaserLine(){null!=this._laserlineVisualElement&&(this._laserlineVisualElement.destroy(),this._laserlineVisualElement=null)}_updateLaserLineStyle(e,t,i){const a=this._laserlineVisualElement;if(null==a)return;const n=a.style;a.style={...n,glowColor:e.toUnitRGB(),innerColor:t.toUnitRGB(),globalAlpha:i}}_onObserverLocationChange(e){null!=e?(this._observerManipulator.metadata.intersection=null,this._observerManipulator.available=!0,this._observerManipulator.elevationAlignedLocation=e):this._observerManipulator.available=!1}_onTargetLocationChange(e,t){null!=e?(t.elevationAlignedLocation=e,t!==this._targetTrackerManipulator&&(t.available=!0)):t.available=!1}_addPointFromClickEvent(e){const a=this._intersector.getScreenPointIntersection(e);if(null!=a?.mapPoint)if(null!=this.analysis.observer?.position){this._clearCursorTracker();const e=new i;this._updateFromIntersection(e,a),this.analysis.targets.add(e)}else{const e=new t;this._updateFromIntersection(e,a),this.analysis.observer=e}}_clickHandler(e){this.active&&e.button!==M.Right&&(this._addPointFromClickEvent(C(e)),e.stopPropagation())}_doubleClickHandler(e){this.active&&e.button!==M.Right&&(this.stop(),e.stopPropagation())}_pointerMoveHandler(e){if(this.hasGrabbedManipulators)return;if(this._latestPointerMovePointerType=e.pointerType,this._updateLaserLineRenderer(),!this._showTracker||null==this.analysis.observer?.position)return;const t=C(e),a=this._intersector.getScreenPointIntersection(t);null!=a?.mapPoint&&(null==this.analysisViewData.cursorTarget&&(this.analysisViewData.cursorTarget=new i),this._updateFromIntersection(this.analysisViewData.cursorTarget,a),this._updateLaserLineRenderer())}_updateFromIntersection(e,t){if(null==t.mapPoint)return e.position=null,e.elevationInfo=null,void(e.feature=null);switch(t.context?.type){case"graphic":{const i=t.context.graphic,a=g(i);"on-the-ground"===a.mode&&(a.mode="relative-to-ground",a.offset=0),e.elevationInfo=new m(a),e.feature=i}break;case"ground":e.elevationInfo=new m({mode:"on-the-ground"}),e.feature=null;break;default:e.elevationInfo=null,e.feature=null}const i=t.mapPoint.clone();i.z=_(this.view,i,{mode:"absolute-height",offset:0},e.elevationInfo),e.position=i}_manipulatorClick(e,t){if("observer"===e.metadata.type||e.grabbing||e.dragging||t.button!==M.Right||this.analysis.targets.length<=1)return;const{target:i}=e.metadata;this.analysis.targets.remove(i),t.stopPropagation()}get testInfo(){}};function V(e){const t=e.position?.clone();return i=>(e.position=t,i)}function P(e,t){const{isValid:i,isTargetVisible:a}=t.computationResult;e.state=i?a?16:32:64}function O(e){const{isValid:t,isTargetVisible:i}=e.computationResult;return{isValid:t,isTargetVisible:i}}e([u({constructOnly:!0})],H.prototype,"view",void 0),e([u({constructOnly:!0})],H.prototype,"analysis",void 0),e([u()],H.prototype,"_creationMode",void 0),e([u({readOnly:!0})],H.prototype,"state",null),e([u({readOnly:!0})],H.prototype,"cursor",null),e([u()],H.prototype,"removeIncompleteOnCancel",void 0),e([u({readOnly:!0})],H.prototype,"updating",null),e([u({constructOnly:!0})],H.prototype,"analysisViewData",void 0),e([u({readOnly:!0})],H.prototype,"_showTracker",null),e([u()],H.prototype,"_latestPointerMovePointerType",void 0),e([u()],H.prototype,"_shouldRenderTracker",null),e([u()],H.prototype,"_laserlineVisualElement",void 0),e([u()],H.prototype,"_grabbedManipulator",void 0),H=e([h("esri.views.3d.analysis.LineOfSight.LineOfSightTool")],H);const D=d();export{H as LineOfSightTool};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as i}from"tslib";import t from"../../../../Color.js";import e from"../../../../core/Accessor.js";import o from"../../../../core/Handles.js";import{makeHandle as n}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{initial as r}from"../../../../core/reactiveUtils.js";import{property as a,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{e as d}from"../../../../chunks/vec32.js";import{create as u,fromArray as m}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as h}from"../../../../core/support/UpdatingHandles.js";import{lineOfSightConfiguration as p}from"./LineOfSightConfiguration.js";import{LineOfSightVisualElement as v}from"./LineOfSightVisualElement.js";import{LineVisualElement as g}from"../../interactive/visualElements/LineVisualElement.js";import{PointVisualElement as f}from"../../interactive/visualElements/PointVisualElement.js";let b=class extends e{constructor(i){super(i),this._lineOfSightVisualElements=new Array,this._computationHandles=new o,this._updatingHandles=new h}initialize(){this.addHandles(this._connectComputations()),this._createObserverVisualization()}destroy(){this._updatingHandles=s(this._updatingHandles),this._computationHandles=s(this._computationHandles),this._observerVisualElement=s(this._observerVisualElement)}get visible(){return this.analysisViewData.visible}get updating(){return this._updatingHandles.updating}get interactiveAndEditable(){return this.analysisViewData.interactive&&this.analysisViewData.editable}get test(){}_createLineOfSightVisualization(){const i=p,e=this.view,o=this.isDecoration,n={view:e,attached:!0,width:i.outerWidth,innerWidth:i.innerWidth,isDecoration:o},s=t.toUnitRGBA(i.visibleOuterColor),r=t.toUnitRGBA(i.visibleInnerColor),a=t.toUnitRGBA(i.occludedOuterColor),l=t.toUnitRGBA(i.occludedInnerColor),c=t.toUnitRGBA(i.undefinedOuterColor),d=t.toUnitRGBA(i.undefinedInnerColor),u=new g({...n,color:s,innerColor:r}),m=new g({...n,color:a,innerColor:l}),h=new g({...n,color:c,innerColor:d}),b=new f({view:e,attached:!0,..._,size:8,isDecoration:o}),y=new v(u,m,h,b);return this._lineOfSightVisualElements.push(y),y}_destroyLineOfSightVisualization(i){i.destroy(),this._lineOfSightVisualElements.splice(this._lineOfSightVisualElements.indexOf(i),1)}_updateLineOfSightVisualization(i,e,o){const n=p,{computationResult:s,inputPoints:r}=i,{start:a,end:l,intersection:c,isValid:u,isTargetVisible:h}=s,{observer:v}=r,g=V;g[12]=v[0],g[13]=v[1],g[14]=v[2];const f=d(y,a,v),b=d(O,l,v),_=d(C,c,v),{visibleLineVisualElement:A,occludedLineVisualElement:E,undefinedLineVisualElement:w,targetVisualElement:S}=e,L=null==this.analysisViewData.elevationAlignedObserver||null==i.elevationAlignedTargetLocation,j=this.visible&&!L;A.visible=j,E.visible=j,w.visible=j,S.visible=j,S.attached=!o.interactiveAndEditable,j&&(A.geometry=null,E.geometry=null,w.geometry=null,S.geometry=i.elevationAlignedTargetLocation,u?h?(A.geometry=[[m(f),m(b)]],A.transform=g,A.color=t.toUnitRGBA(n.visibleOuterColor),S.color=t.toUnitRGBA(n.visibleInnerColor)):(A.geometry=[[m(f),m(_)]],A.transform=g,A.color=t.toUnitRGBA(n.occludedOuterColor),E.geometry=[[m(_),m(b)]],E.transform=g,S.color=t.toUnitRGBA(n.occludedInnerColor)):(w.geometry=[[m(f),m(b)]],w.transform=g,S.color=t.toUnitRGBA(n.undefinedInnerColor)))}_getLineOfSightVisualizationDependencies(i){const{computationResult:t}=i,{occludedOuterColor:e,visibleOuterColor:o}=p;return{computationResult:t,occludedOuterColor:e,visibleOuterColor:o,visible:this.visible,interactiveAndEditable:this.interactiveAndEditable}}_connectComputation(i){const t=this._computationHandles;if(t.has(i))return;const e=this._createLineOfSightVisualization();t.add([this._updatingHandles.add(()=>this._getLineOfSightVisualizationDependencies(i),t=>this._updateLineOfSightVisualization(i,e,t),{initial:!0,equals:()=>!1}),n(()=>this._destroyLineOfSightVisualization(e))],i)}_disconnectComputation(i){this._computationHandles.remove(i)}_connectComputations(){return this._updatingHandles.addOnCollectionChange(()=>this.analysisViewData.computations,i=>this._onComputationsCollectionChange(i),{initial:!0,final:!0})}_onComputationsCollectionChange({added:i,removed:t}){for(const e of t)this._disconnectComputation(e);for(const e of i)this._connectComputation(e)}_createObserverVisualization(){const i=t.toUnitRGBA(p.visibleInnerColor),e=new f({view:this.view,color:i,..._,isDecoration:this.isDecoration});this._observerVisualElement=e,this.addHandles(this._updatingHandles.add(()=>({observer:this.analysisViewData.elevationAlignedObserver,interactiveAndEditable:this.interactiveAndEditable,visible:this.visible}),({observer:i,interactiveAndEditable:t,visible:o})=>{null!=i&&!t&&o?(e.geometry=i,this._observerVisualElement.attached=!0):e.attached=!1},r))}};i([a({constructOnly:!0})],b.prototype,"analysis",void 0),i([a({constructOnly:!0})],b.prototype,"analysisViewData",void 0),i([a({constructOnly:!0})],b.prototype,"view",void 0),i([a({readOnly:!0})],b.prototype,"visible",null),i([a({constructOnly:!0})],b.prototype,"isDecoration",void 0),i([a()],b.prototype,"updating",null),i([a()],b.prototype,"interactiveAndEditable",null),i([a()],b.prototype,"test",null),b=i([l("esri.views.3d.analysis.LineOfSight.LineOfSightVisualization")],b);const _={size:6,pixelSnappingEnabled:!1,primitive:"circle",elevationInfo:{mode:"absolute-height",offset:0},outlineSize:0},y=u(),O=u(),C=u(),V=c();export{b as LineOfSightVisualization};
5
+ import{__decorate as i}from"tslib";import t from"../../../../core/Accessor.js";import e from"../../../../core/Handles.js";import{makeHandle as o}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{destroyMaybe as n}from"../../../../core/maybe.js";import{initial as s}from"../../../../core/reactiveUtils.js";import{property as r,subclass as a}from"../../../../core/accessorSupport/decorators.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{e as c}from"../../../../chunks/vec32.js";import{create as d,fromArray as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as m}from"../../../../core/support/UpdatingHandles.js";import{lineOfSightConfiguration as h}from"./LineOfSightConfiguration.js";import{LineOfSightVisualElement as p}from"./LineOfSightVisualElement.js";import{LineVisualElement as v}from"../../interactive/visualElements/LineVisualElement.js";import{PointVisualElement as g}from"../../interactive/visualElements/PointVisualElement.js";let f=class extends t{constructor(i){super(i),this._lineOfSightVisualElements=new Array,this._computationHandles=new e,this._updatingHandles=new m}initialize(){this.addHandles(this._connectComputations()),this._createObserverVisualization()}destroy(){this._updatingHandles=n(this._updatingHandles),this._computationHandles=n(this._computationHandles),this._observerVisualElement=n(this._observerVisualElement)}get visible(){return this.analysisViewData.visible}get updating(){return this._updatingHandles.updating}get interactiveAndEditable(){return this.analysisViewData.interactive&&this.analysisViewData.editable}get test(){}_createLineOfSightVisualization(){const i=h,t=this.view,e=this.isDecoration,o={view:t,attached:!0,width:i.outerWidth,innerWidth:i.innerWidth,isDecoration:e},n=i.visibleOuterColor.toUnitRGBA(),s=i.visibleInnerColor.toUnitRGBA(),r=i.occludedOuterColor.toUnitRGBA(),a=i.occludedInnerColor.toUnitRGBA(),l=i.undefinedOuterColor.toUnitRGBA(),c=i.undefinedInnerColor.toUnitRGBA(),d=new v({...o,color:n,innerColor:s}),u=new v({...o,color:r,innerColor:a}),m=new v({...o,color:l,innerColor:c}),f=new g({view:t,attached:!0,...b,size:8,isDecoration:e}),_=new p(d,u,m,f);return this._lineOfSightVisualElements.push(_),_}_destroyLineOfSightVisualization(i){i.destroy(),this._lineOfSightVisualElements.splice(this._lineOfSightVisualElements.indexOf(i),1)}_updateLineOfSightVisualization(i,t,e){const o=h,{computationResult:n,inputPoints:s}=i,{start:r,end:a,intersection:l,isValid:d,isTargetVisible:m}=n,{observer:p}=s,v=V;v[12]=p[0],v[13]=p[1],v[14]=p[2];const g=c(_,r,p),f=c(y,a,p),b=c(O,l,p),{visibleLineVisualElement:C,occludedLineVisualElement:A,undefinedLineVisualElement:E,targetVisualElement:w}=t,S=null==this.analysisViewData.elevationAlignedObserver||null==i.elevationAlignedTargetLocation,L=this.visible&&!S;C.visible=L,A.visible=L,E.visible=L,w.visible=L,w.attached=!e.interactiveAndEditable,L&&(C.geometry=null,A.geometry=null,E.geometry=null,w.geometry=i.elevationAlignedTargetLocation,d?m?(C.geometry=[[u(g),u(f)]],C.transform=v,C.color=o.visibleOuterColor.toUnitRGBA(),w.color=o.visibleInnerColor.toUnitRGBA()):(C.geometry=[[u(g),u(b)]],C.transform=v,C.color=o.occludedOuterColor.toUnitRGBA(),A.geometry=[[u(b),u(f)]],A.transform=v,w.color=o.occludedInnerColor.toUnitRGBA()):(E.geometry=[[u(g),u(f)]],E.transform=v,w.color=o.undefinedInnerColor.toUnitRGBA()))}_getLineOfSightVisualizationDependencies(i){const{computationResult:t}=i,{occludedOuterColor:e,visibleOuterColor:o}=h;return{computationResult:t,occludedOuterColor:e,visibleOuterColor:o,visible:this.visible,interactiveAndEditable:this.interactiveAndEditable}}_connectComputation(i){const t=this._computationHandles;if(t.has(i))return;const e=this._createLineOfSightVisualization();t.add([this._updatingHandles.add(()=>this._getLineOfSightVisualizationDependencies(i),t=>this._updateLineOfSightVisualization(i,e,t),{initial:!0,equals:()=>!1}),o(()=>this._destroyLineOfSightVisualization(e))],i)}_disconnectComputation(i){this._computationHandles.remove(i)}_connectComputations(){return this._updatingHandles.addOnCollectionChange(()=>this.analysisViewData.computations,i=>this._onComputationsCollectionChange(i),{initial:!0,final:!0})}_onComputationsCollectionChange({added:i,removed:t}){for(const e of t)this._disconnectComputation(e);for(const e of i)this._connectComputation(e)}_createObserverVisualization(){const i=h.visibleInnerColor.toUnitRGBA(),t=new g({view:this.view,color:i,...b,isDecoration:this.isDecoration});this._observerVisualElement=t,this.addHandles(this._updatingHandles.add(()=>({observer:this.analysisViewData.elevationAlignedObserver,interactiveAndEditable:this.interactiveAndEditable,visible:this.visible}),({observer:i,interactiveAndEditable:e,visible:o})=>{null!=i&&!e&&o?(t.geometry=i,this._observerVisualElement.attached=!0):t.attached=!1},s))}};i([r({constructOnly:!0})],f.prototype,"analysis",void 0),i([r({constructOnly:!0})],f.prototype,"analysisViewData",void 0),i([r({constructOnly:!0})],f.prototype,"view",void 0),i([r({readOnly:!0})],f.prototype,"visible",null),i([r({constructOnly:!0})],f.prototype,"isDecoration",void 0),i([r()],f.prototype,"updating",null),i([r()],f.prototype,"interactiveAndEditable",null),i([r()],f.prototype,"test",null),f=i([a("esri.views.3d.analysis.LineOfSight.LineOfSightVisualization")],f);const b={size:6,pixelSnappingEnabled:!1,primitive:"circle",elevationInfo:{mode:"absolute-height",offset:0},outlineSize:0},_=d(),y=d(),O=d(),V=l();export{f as LineOfSightVisualization};
@@ -1,5 +1,5 @@
1
1
  import type ShadowCastAnalysis from "../../../analysis/ShadowCastAnalysis.js";
2
- import type { ScreenPoint } from "../../../core/interfaces.js";
2
+ import type { ScreenPoint } from "../../../core/types.js";
3
3
  import type { AnalysisView3D } from "./AnalysisView3D.js";
4
4
 
5
5
  /**
@@ -9,7 +9,7 @@ import type { AnalysisView3D } from "./AnalysisView3D.js";
9
9
  * The ShadowCastAnalysisView3D is responsible for rendering a [ShadowCastAnalysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ShadowCastAnalysis.html)
10
10
  * using custom visualizations. The [methods](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ShadowCastAnalysisView3D.html#getDurationAtScreen)
11
11
  * on the analysis view provide developers with the ability to obtain the specific shadow duration at the certain
12
- * [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-interfaces.html#ScreenPoint) on the screen.
12
+ * [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-types.html#ScreenPoint) on the screen.
13
13
  *
14
14
  * The view for an analysis can be retrieved using [SceneView#whenAnalysisView()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#whenAnalysisView)
15
15
  * similar to how layer views are retrieved for layers using [SceneView#whenLayerView()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#whenLayerView).
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../../Color.js";import{isSome as i}from"../../../core/arrayUtils.js";import{createTask as r}from"../../../core/asyncUtils.js";import"../../../core/has.js";import{abortMaybe as s,destroyMaybe as n}from"../../../core/maybe.js";import{after as o,throwIfAborted as a}from"../../../core/promiseUtils.js";import{watch as l,syncAndInitial as u}from"../../../core/reactiveUtils.js";import{createScreenPointArray as c,createRenderScreenPointArray as p}from"../../../core/screenUtils.js";import{offsetDateUTC as h,convertTime as d}from"../../../core/timeUtils.js";import{property as m,subclass as _}from"../../../core/accessorSupport/decorators.js";import{create as v}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{AnalysisView3D as f}from"./AnalysisView3D.js";import{registerAnalysisView as g,hideOtherAnalysisViews as y}from"./ShadowCast/analysisViewRegister.js";import{ShadowCastTooltip as w}from"./ShadowCast/ShadowCastTooltip.js";import{longitudeToTimezone as D}from"../support/earthUtils.js";import{computeDirectionsOverTime as C}from"../support/sunUtils.js";import{breadthFirstBinaryPartitioning as P}from"../../../widgets/support/traversalUtils.js";let b=class extends f{constructor(t){super(t),this.type="shadow-cast-view-3d",this.analysis=null,this._stopPreviewingTask=null,this._forcePreview=!1,this._autoRestoreForcePreviewEnabled=!0,this._tooltip=null}initialize(){this.addHandles([g(this.view,this),l(()=>this._forcePreviewDependencies,()=>{s(this._stopPreviewingTask),this._forcePreview=!0,this._autoRestoreForcePreviewEnabled&&(this._stopPreviewingTask=r(async t=>{await o(x,t),a(t),this._forcePreview=!1}))},u),l(()=>({renderer:this._renderer,visible:this.visible}),({renderer:t,visible:e})=>{e&&y(this.view,this),t?.setParameters({shadowCast:{enabled:e}})},u),l(()=>({renderer:this._renderer,parameters:this._visualizationParameters,visible:this.visible}),({renderer:t,parameters:e,visible:i})=>{U(t,i,e)},u),l(()=>({renderer:this._renderer,lightDirections:this._lightDirections,lightDirectionsContext:this._lightDirectionsContext,visible:this.visible}),({renderer:t,lightDirections:e,lightDirectionsContext:i,visible:r})=>{U(t,r,{lightDirections:e,lightDirectionsContext:i})},u),l(()=>({renderer:this._renderer,previewing:this._previewing,visible:this.visible}),({renderer:t,previewing:e,visible:i})=>{U(t,i,{previewing:e})},u)]),this.interactive=!0,this._tooltip=new w({getDuration:this.getDurationAtScreen.bind(this),isVisible:()=>this.interactive&&this.visible,view:this.view})}destroy(){this.visible&&U(this._renderer,!0,{enabled:!1}),this._tooltip=n(this._tooltip)}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get updating(){return this._previewing||null!=this._stopPreviewingTask&&!this._stopPreviewingTask.finished||!0===this._tooltip?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get _previewing(){const{view:t}=this;if(null==t?.allLayerViews)return!0;const{stationary:e,allLayerViews:i,graphicsView:r}=t;return this._forcePreview||!e||i.some(t=>O(t)&&t.updating)||!r?.suspended&&!!r?.updating}get _effectiveUtcOffset(){return this.analysis.utcOffset??this._utcOffsetAuto}get _utcOffsetAuto(){const t=this._referencePosition;return null!=t?D(t[0],!1):0}get _dateUTCOffset(){let t=this.analysis.date;return t=h(t,-t.getTimezoneOffset(),"minutes"),t=h(t,-this._effectiveUtcOffset,"hours"),t}get _startDateTimeUTC(){return h(this._dateUTCOffset,this.analysis.startTimeOfDay)}get _endDateTimeUTC(){return h(this._dateUTCOffset,this.analysis.endTimeOfDay)}get _referencePosition(){return this.view?.environmentManager?.referencePositionGeographic}get _totalDurationInterval(){return this._totalDuration>0?Math.floor(this._totalDuration/(z-1)):z}get _interval(){const t=this._totalDurationInterval;switch(this.analysis.mode){case"min-duration":return this._totalDuration>0?t:0;case"total-duration":return t;case"discrete":return this.analysis.discreteOptions.interval||t}}get _intervalContext(){const{mode:t,minDurationOptions:e}=this.analysis;return"min-duration"===t&&e.contextEnabled?e.contextOptions.interval||this._totalDurationInterval:-1}get _totalDurationSampleCount(){return this._lightDirections.length}get _totalDuration(){const{startTimeOfDay:t,endTimeOfDay:e}=this.analysis;return e-t}get _lightDirections(){return this._calculateLightDirections(this._interval)}get _lightDirectionsContext(){return this._calculateLightDirections(this._intervalContext)}_calculateLightDirections(t){const{view:e}=this;if(t<=0)return[];const i="global"===e.viewingMode?j:this._referencePosition;if(null==i)return[];const r=C(this._startDateTimeUTC,this._endDateTimeUTC,t,i,e.state.viewingMode,z),s=r.length;A.length=0;const n=P(0,s,A),o=new Array(s);for(let a=0;a<s;++a)o[a]=r[n[a]];return o}get _visualizationParameters(){if(!this.visible)return null;switch(this.analysis.mode){case"min-duration":return this._minDurationVisualizationParameters;case"total-duration":return this._durationVisualizationParameters;case"discrete":return this._discreteVisualizationParameters}}get _minDurationVisualizationParameters(){const{minDuration:t,color:i}=this.analysis.minDurationOptions,r=this._totalDuration;return{visualization:2,thresholdColor:e.toUnitRGBA(i),threshold:r>0?t/this._totalDuration:0,...this._minDurationContextVisualizationParameters}}get _minDurationContextVisualizationParameters(){const{minDurationOptions:t}=this.analysis;return t.contextEnabled?{visualization:3,gradientColor:e.toUnitRGBA(t.contextOptions.color)}:{}}get _durationVisualizationParameters(){const{color:t,mode:i}=this.analysis.totalDurationOptions,r=this._totalDuration,s=r>0&&"hourly"===i?V/r:0,n=e.toUnitRGBA(t);return 0===s?{...this._discreteVisualizationParameters,gradientColor:n}:{bandedGradientColor:n,visualization:1,bandSize:s}}get _discreteVisualizationParameters(){return{gradientColor:e.toUnitRGBA(this.analysis.discreteOptions.color),visualization:0}}get _forcePreviewDependencies(){const{view:t}=this,e=t.slice.plane,r=t.allLayerViews.toArray().filter(O),s=r.map(t=>t.layer).filter(i),n=r.map(t=>t.suspended),o=s.map(t=>t.visible),a=s.map(t=>t.opacity),l=!!t.graphicsView?.suspended,u=s.filter(t=>"definitionExpression"in t).map(t=>t.definitionExpression),c=r.filter(t=>"filter"in t).map(t=>t.filter);return{slicePlane:e,startDateUTC:this._startDateTimeUTC,endDateUTC:this._endDateTimeUTC,layerViewSuspended:n,graphicsViewSuspended:l,layerVisibilities:o,layerOpacities:a,filters:c,definitionExpressions:u}}get _renderer(){return this.view?.stage?.renderer}get testData(){}async getDurationAtScreen(t){const{_renderer:e,_totalDurationSampleCount:i}=this;if(null==e||0===i)return 0;const r=this.view.state.camera.screenToRender(c(t.x,t.y),p());return e.readAccumulatedShadow(r)*this._totalDuration}};t([m({readOnly:!0,type:["shadow-cast-view-3d"]})],b.prototype,"type",void 0),t([m({constructOnly:!0,nonNullable:!0})],b.prototype,"analysis",void 0),t([m({readOnly:!0})],b.prototype,"updating",null),t([m()],b.prototype,"_stopPreviewingTask",void 0),t([m()],b.prototype,"_forcePreview",void 0),t([m()],b.prototype,"_autoRestoreForcePreviewEnabled",void 0),t([m()],b.prototype,"_tooltip",void 0),t([m()],b.prototype,"_previewing",null),t([m()],b.prototype,"_effectiveUtcOffset",null),t([m()],b.prototype,"_utcOffsetAuto",null),t([m()],b.prototype,"_dateUTCOffset",null),t([m()],b.prototype,"_startDateTimeUTC",null),t([m()],b.prototype,"_endDateTimeUTC",null),t([m()],b.prototype,"_referencePosition",null),t([m()],b.prototype,"_interval",null),t([m()],b.prototype,"_intervalContext",null),t([m()],b.prototype,"_totalDurationSampleCount",null),t([m()],b.prototype,"_totalDuration",null),t([m()],b.prototype,"_lightDirections",null),t([m()],b.prototype,"_lightDirectionsContext",null),t([m()],b.prototype,"_visualizationParameters",null),t([m()],b.prototype,"_minDurationVisualizationParameters",null),t([m()],b.prototype,"_minDurationContextVisualizationParameters",null),t([m()],b.prototype,"_durationVisualizationParameters",null),t([m()],b.prototype,"_discreteVisualizationParameters",null),t([m()],b.prototype,"_forcePreviewDependencies",null),t([m()],b.prototype,"_renderer",null),b=t([_("esri.views.3d.analysis.ShadowCastAnalysisView3D")],b);const T=b;function U(t,e,i){e&&null!=i&&t?.setParameters({shadowCast:i})}function O(t){if(t.suspended)return!1;switch(t.type){case"building-scene-3d":case"csv-3d":case"elevation-3d":case"feature-3d":case"geojson-3d":case"graphics-3d":case"integrated-mesh-3d":case"integrated-mesh-3dtiles":case"ogc-feature-3d":case"route-3d":case"scene-layer-3d":case"scene-layer-graphics-3d":case"stream-3d":case"wms-3d":case"catalog-footprint-3d":return!0;default:return!1}}const V=d(1,"hours","milliseconds"),x=500,z=255,j=v(),A=[];export{T as default};
5
+ import{__decorate as t}from"tslib";import{isSome as e}from"../../../core/arrayUtils.js";import{createTask as i}from"../../../core/asyncUtils.js";import"../../../core/has.js";import{abortMaybe as r,destroyMaybe as s}from"../../../core/maybe.js";import{after as n,throwIfAborted as o}from"../../../core/promiseUtils.js";import{watch as a,syncAndInitial as l}from"../../../core/reactiveUtils.js";import{createScreenPointArray as u,createRenderScreenPointArray as c}from"../../../core/screenUtils.js";import{offsetDateUTC as p,convertTime as h}from"../../../core/timeUtils.js";import{property as d,subclass as m}from"../../../core/accessorSupport/decorators.js";import{create as _}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{AnalysisView3D as v}from"./AnalysisView3D.js";import{registerAnalysisView as f,hideOtherAnalysisViews as g}from"./ShadowCast/analysisViewRegister.js";import{ShadowCastTooltip as y}from"./ShadowCast/ShadowCastTooltip.js";import{longitudeToTimezone as w}from"../support/earthUtils.js";import{computeDirectionsOverTime as D}from"../support/sunUtils.js";import{breadthFirstBinaryPartitioning as P}from"../../../widgets/support/traversalUtils.js";let C=class extends v{constructor(t){super(t),this.type="shadow-cast-view-3d",this.analysis=null,this._stopPreviewingTask=null,this._forcePreview=!1,this._autoRestoreForcePreviewEnabled=!0,this._tooltip=null}initialize(){this.addHandles([f(this.view,this),a(()=>this._forcePreviewDependencies,()=>{r(this._stopPreviewingTask),this._forcePreview=!0,this._autoRestoreForcePreviewEnabled&&(this._stopPreviewingTask=i(async t=>{await n(V,t),o(t),this._forcePreview=!1}))},l),a(()=>({renderer:this._renderer,visible:this.visible}),({renderer:t,visible:e})=>{e&&g(this.view,this),t?.setParameters({shadowCast:{enabled:e}})},l),a(()=>({renderer:this._renderer,parameters:this._visualizationParameters,visible:this.visible}),({renderer:t,parameters:e,visible:i})=>{T(t,i,e)},l),a(()=>({renderer:this._renderer,lightDirections:this._lightDirections,lightDirectionsContext:this._lightDirectionsContext,visible:this.visible}),({renderer:t,lightDirections:e,lightDirectionsContext:i,visible:r})=>{T(t,r,{lightDirections:e,lightDirectionsContext:i})},l),a(()=>({renderer:this._renderer,previewing:this._previewing,visible:this.visible}),({renderer:t,previewing:e,visible:i})=>{T(t,i,{previewing:e})},l)]),this.interactive=!0,this._tooltip=new y({getDuration:this.getDurationAtScreen.bind(this),isVisible:()=>this.interactive&&this.visible,view:this.view})}destroy(){this.visible&&T(this._renderer,!0,{enabled:!1}),this._tooltip=s(this._tooltip)}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get updating(){return this._previewing||null!=this._stopPreviewingTask&&!this._stopPreviewingTask.finished||!0===this._tooltip?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get _previewing(){const{view:t}=this;if(null==t?.allLayerViews)return!0;const{stationary:e,allLayerViews:i,graphicsView:r}=t;return this._forcePreview||!e||i.some(t=>U(t)&&t.updating)||!r?.suspended&&!!r?.updating}get _effectiveUtcOffset(){return this.analysis.utcOffset??this._utcOffsetAuto}get _utcOffsetAuto(){const t=this._referencePosition;return null!=t?w(t[0],!1):0}get _dateUTCOffset(){let t=this.analysis.date;return t=p(t,-t.getTimezoneOffset(),"minutes"),t=p(t,-this._effectiveUtcOffset,"hours"),t}get _startDateTimeUTC(){return p(this._dateUTCOffset,this.analysis.startTimeOfDay)}get _endDateTimeUTC(){return p(this._dateUTCOffset,this.analysis.endTimeOfDay)}get _referencePosition(){return this.view?.environmentManager?.referencePositionGeographic}get _totalDurationInterval(){return this._totalDuration>0?Math.floor(this._totalDuration/(x-1)):x}get _interval(){const t=this._totalDurationInterval;switch(this.analysis.mode){case"min-duration":return this._totalDuration>0?t:0;case"total-duration":return t;case"discrete":return this.analysis.discreteOptions.interval||t}}get _intervalContext(){const{mode:t,minDurationOptions:e}=this.analysis;return"min-duration"===t&&e.contextEnabled?e.contextOptions.interval||this._totalDurationInterval:-1}get _totalDurationSampleCount(){return this._lightDirections.length}get _totalDuration(){const{startTimeOfDay:t,endTimeOfDay:e}=this.analysis;return e-t}get _lightDirections(){return this._calculateLightDirections(this._interval)}get _lightDirectionsContext(){return this._calculateLightDirections(this._intervalContext)}_calculateLightDirections(t){const{view:e}=this;if(t<=0)return[];const i="global"===e.viewingMode?z:this._referencePosition;if(null==i)return[];const r=D(this._startDateTimeUTC,this._endDateTimeUTC,t,i,e.state.viewingMode,x),s=r.length;j.length=0;const n=P(0,s,j),o=new Array(s);for(let a=0;a<s;++a)o[a]=r[n[a]];return o}get _visualizationParameters(){if(!this.visible)return null;switch(this.analysis.mode){case"min-duration":return this._minDurationVisualizationParameters;case"total-duration":return this._durationVisualizationParameters;case"discrete":return this._discreteVisualizationParameters}}get _minDurationVisualizationParameters(){const{minDuration:t,color:e}=this.analysis.minDurationOptions,i=this._totalDuration;return{visualization:2,thresholdColor:e.toUnitRGBA(),threshold:i>0?t/this._totalDuration:0,...this._minDurationContextVisualizationParameters}}get _minDurationContextVisualizationParameters(){const{minDurationOptions:t}=this.analysis;return t.contextEnabled?{visualization:3,gradientColor:t.contextOptions.color.toUnitRGBA()}:{}}get _durationVisualizationParameters(){const{color:t,mode:e}=this.analysis.totalDurationOptions,i=this._totalDuration,r=i>0&&"hourly"===e?O/i:0,s=t.toUnitRGBA();return 0===r?{...this._discreteVisualizationParameters,gradientColor:s}:{bandedGradientColor:s,visualization:1,bandSize:r}}get _discreteVisualizationParameters(){return{gradientColor:this.analysis.discreteOptions.color.toUnitRGBA(),visualization:0}}get _forcePreviewDependencies(){const{view:t}=this,i=t.slice.plane,r=t.allLayerViews.toArray().filter(U),s=r.map(t=>t.layer).filter(e),n=r.map(t=>t.suspended),o=s.map(t=>t.visible),a=s.map(t=>t.opacity),l=!!t.graphicsView?.suspended,u=s.filter(t=>"definitionExpression"in t).map(t=>t.definitionExpression),c=r.filter(t=>"filter"in t).map(t=>t.filter);return{slicePlane:i,startDateUTC:this._startDateTimeUTC,endDateUTC:this._endDateTimeUTC,layerViewSuspended:n,graphicsViewSuspended:l,layerVisibilities:o,layerOpacities:a,filters:c,definitionExpressions:u}}get _renderer(){return this.view?.stage?.renderer}get testData(){}async getDurationAtScreen(t){const{_renderer:e,_totalDurationSampleCount:i}=this;if(null==e||0===i)return 0;const r=this.view.state.camera.screenToRender(u(t.x,t.y),c());return e.readAccumulatedShadow(r)*this._totalDuration}};t([d({readOnly:!0,type:["shadow-cast-view-3d"]})],C.prototype,"type",void 0),t([d({constructOnly:!0,nonNullable:!0})],C.prototype,"analysis",void 0),t([d({readOnly:!0})],C.prototype,"updating",null),t([d()],C.prototype,"_stopPreviewingTask",void 0),t([d()],C.prototype,"_forcePreview",void 0),t([d()],C.prototype,"_autoRestoreForcePreviewEnabled",void 0),t([d()],C.prototype,"_tooltip",void 0),t([d()],C.prototype,"_previewing",null),t([d()],C.prototype,"_effectiveUtcOffset",null),t([d()],C.prototype,"_utcOffsetAuto",null),t([d()],C.prototype,"_dateUTCOffset",null),t([d()],C.prototype,"_startDateTimeUTC",null),t([d()],C.prototype,"_endDateTimeUTC",null),t([d()],C.prototype,"_referencePosition",null),t([d()],C.prototype,"_interval",null),t([d()],C.prototype,"_intervalContext",null),t([d()],C.prototype,"_totalDurationSampleCount",null),t([d()],C.prototype,"_totalDuration",null),t([d()],C.prototype,"_lightDirections",null),t([d()],C.prototype,"_lightDirectionsContext",null),t([d()],C.prototype,"_visualizationParameters",null),t([d()],C.prototype,"_minDurationVisualizationParameters",null),t([d()],C.prototype,"_minDurationContextVisualizationParameters",null),t([d()],C.prototype,"_durationVisualizationParameters",null),t([d()],C.prototype,"_discreteVisualizationParameters",null),t([d()],C.prototype,"_forcePreviewDependencies",null),t([d()],C.prototype,"_renderer",null),C=t([m("esri.views.3d.analysis.ShadowCastAnalysisView3D")],C);const b=C;function T(t,e,i){e&&null!=i&&t?.setParameters({shadowCast:i})}function U(t){if(t.suspended)return!1;switch(t.type){case"building-scene-3d":case"csv-3d":case"elevation-3d":case"feature-3d":case"geojson-3d":case"graphics-3d":case"integrated-mesh-3d":case"integrated-mesh-3dtiles":case"ogc-feature-3d":case"route-3d":case"scene-layer-3d":case"scene-layer-graphics-3d":case"stream-3d":case"wms-3d":case"catalog-footprint-3d":return!0;default:return!1}}const O=h(1,"hours","milliseconds"),V=500,x=255,z=_(),j=[];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/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../Color.js";import{watch as t,initial as r}from"../../../../core/reactiveUtils.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{resizeHandleCornerWidth as i,resizeHandleEdgeWidth as s,displayFocusMultiplier as a,resizeHandleCornerInputRadius as l,resizeHandleEdgeInputRadius as n}from"./sliceToolConfig.js";import{isDiagonalResizeHandle as c,resizeNormal as m,resizeOutlineOnly as f}from"./sliceToolUtils.js";import{Manipulator3D as d}from"../../interactive/Manipulator3D.js";import{worldScaledManipulatorSettings as p}from"../../interactive/manipulatorUtils.js";import{RenderObject as u}from"../../interactive/RenderObject.js";import{createPolylineGeometry as j}from"../../webgl-engine/lib/GeometryUtil.js";import{RibbonLineMaterial as w}from"../../webgl-engine/materials/RibbonLineMaterial.js";class b extends d{constructor(o,l){const n=c(l),m=n?i:s,f=m*a,d=s,u={renderOccluded:4,isDecoration:!0},j=new w({...u,width:m},o.state.isGlobal),b=new w({...u,width:f},o.state.isGlobal),v=new w({...u,width:d},o.state.isGlobal);super({view:o,...p,...h({isCorner:n,unfocusedMaterial:j,focusedMaterial:b,outlineMaterial:v})}),this._themeHandle=t(()=>o.effectiveTheme.accentColor,t=>{const r=e.toUnitRGBA(t);j.setParameters({color:r}),b.setParameters({color:r}),v.setParameters({color:r})},r)}destroy(){this._themeHandle.remove(),super.destroy()}}function h({isCorner:e,unfocusedMaterial:t,focusedMaterial:r,outlineMaterial:i}){const s=e?[o(1,0,0),o(0,0,0),o(0,1,0)]:[o(1,0,0),o(-1,0,0)];return{renderObjects:[new u(j(t,s),1|m),new u(j(r,s),2|m),new u(j(i,s),f)],collisionType:{type:"line",paths:[s]},radius:e?l:n,state:m}}export{b as ResizeManipulator};
5
+ import{watch as e,initial as t}from"../../../../core/reactiveUtils.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{resizeHandleCornerWidth as o,resizeHandleEdgeWidth as i,displayFocusMultiplier as s,resizeHandleCornerInputRadius as a,resizeHandleEdgeInputRadius as l}from"./sliceToolConfig.js";import{isDiagonalResizeHandle as n,resizeNormal as c,resizeOutlineOnly as m}from"./sliceToolUtils.js";import{Manipulator3D as f}from"../../interactive/Manipulator3D.js";import{worldScaledManipulatorSettings as d}from"../../interactive/manipulatorUtils.js";import{RenderObject as p}from"../../interactive/RenderObject.js";import{createPolylineGeometry as u}from"../../webgl-engine/lib/GeometryUtil.js";import{RibbonLineMaterial as w}from"../../webgl-engine/materials/RibbonLineMaterial.js";class b extends f{constructor(r,a){const l=n(a),c=l?o:i,m=c*s,f=i,p={renderOccluded:4,isDecoration:!0},u=new w({...p,width:c},r.state.isGlobal),b=new w({...p,width:m},r.state.isGlobal),h=new w({...p,width:f},r.state.isGlobal);super({view:r,...d,...j({isCorner:l,unfocusedMaterial:u,focusedMaterial:b,outlineMaterial:h})}),this._themeHandle=e(()=>r.effectiveTheme.accentColor,e=>{const t=e.toUnitRGBA();u.setParameters({color:t}),b.setParameters({color:t}),h.setParameters({color:t})},t)}destroy(){this._themeHandle.remove(),super.destroy()}}function j({isCorner:e,unfocusedMaterial:t,focusedMaterial:o,outlineMaterial:i}){const s=e?[r(1,0,0),r(0,0,0),r(0,1,0)]:[r(1,0,0),r(-1,0,0)];return{renderObjects:[new p(u(t,s),1|c),new p(u(o,s),2|c),new p(u(i,s),m)],collisionType:{type:"line",paths:[s]},radius:e?a:l,state:c}}export{b as ResizeManipulator};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../Color.js";import{multiplyOpacity as t,getContrast as r}from"../../../../core/colorUtils.js";import{releaseMaybe as i}from"../../../../core/maybe.js";import{watch as o,initial as a}from"../../../../core/reactiveUtils.js";import{DidPointerMoveRecentlyFlag as s}from"./sliceToolUtils.js";import{Manipulator3D as l}from"../../interactive/Manipulator3D.js";import{rotateManipulatorDefaults as n}from"../../interactive/manipulatorUtils.js";import{RenderObject as m}from"../../interactive/RenderObject.js";import{Attribute as c}from"../../webgl-engine/lib/Attribute.js";import{Geometry as d}from"../../webgl-engine/lib/Geometry.js";import{createPolylineGeometry as u}from"../../webgl-engine/lib/GeometryUtil.js";import{ImageMaterial as p}from"../../webgl-engine/materials/ImageMaterial.js";import{RibbonLineMaterial as f}from"../../webgl-engine/materials/RibbonLineMaterial.js";class h extends l{constructor(i,s){const l=t(i.effectiveTheme.accentColor,.5),m=r(i.effectiveTheme.accentColor),c=s(l,m),d=new p({draped:!1,managedTexture:c.managedTexture,writeDepth:!1,renderOccluded:16,isDecoration:!0}),u=n.calloutWidth,h=new f({width:u,renderOccluded:4,isDecoration:!0},i.state.isGlobal);super({view:i,...g({imageMaterial:d,calloutMaterial:h})}),this._material=d,this._textureHandle=c,this._themeHandle=o(()=>i.effectiveTheme.accentColor,i=>{const o=t(i,.5),a=r(i),l=this._textureHandle;this._textureHandle=s(o,a),d.setParameters({managedTexture:this._textureHandle.managedTexture}),l?.release(),h.setParameters({color:e.toUnitRGBA(i)})},a)}destroy(){this._textureHandle=i(this._textureHandle),this._themeHandle.remove(),this._material.dispose(),super.destroy()}}function g({imageMaterial:e,calloutMaterial:t}){const{focusMultiplier:r,calloutLength:i,discRadius:o}=n,a=o*r,l=(e,t)=>{const r=[0,1,2,2,3,0];return new d(t,[["position",new c([i-e,-e,0,i+e,-e,0,i+e,e,0,i-e,e,0],r,3,!0)],["uv0",new c([0,0,1,0,1,1,0,1],r,2,!0)]])},p=u(t,[[0,0,0],[i-o,0,0]]),f=u(t,[[0,0,0],[i-a,0,0]]),h=s;return{autoScaleRenderObjects:!1,collisionPriority:1,collisionType:{type:"disc",direction:[0,0,1],offset:[i,0,0]},focusMultiplier:r,radius:o,renderObjects:[new m(l(o,e),1|h),new m(p,1|h),new m(l(a,e),2|h),new m(f,2|h)],state:h}}export{h as RotateManipulator};
5
+ import{multiplyOpacity as e,getContrast as t}from"../../../../core/colorUtils.js";import{releaseMaybe as r}from"../../../../core/maybe.js";import{watch as i,initial as o}from"../../../../core/reactiveUtils.js";import{DidPointerMoveRecentlyFlag as a}from"./sliceToolUtils.js";import{Manipulator3D as s}from"../../interactive/Manipulator3D.js";import{rotateManipulatorDefaults as n}from"../../interactive/manipulatorUtils.js";import{RenderObject as l}from"../../interactive/RenderObject.js";import{Attribute as c}from"../../webgl-engine/lib/Attribute.js";import{Geometry as m}from"../../webgl-engine/lib/Geometry.js";import{createPolylineGeometry as d}from"../../webgl-engine/lib/GeometryUtil.js";import{ImageMaterial as u}from"../../webgl-engine/materials/ImageMaterial.js";import{RibbonLineMaterial as p}from"../../webgl-engine/materials/RibbonLineMaterial.js";class f extends s{constructor(r,a){const s=e(r.effectiveTheme.accentColor,.5),l=t(r.effectiveTheme.accentColor),c=a(s,l),m=new u({draped:!1,managedTexture:c.managedTexture,writeDepth:!1,renderOccluded:16,isDecoration:!0}),d=n.calloutWidth,f=new p({width:d,renderOccluded:4,isDecoration:!0},r.state.isGlobal);super({view:r,...h({imageMaterial:m,calloutMaterial:f})}),this._material=m,this._textureHandle=c,this._themeHandle=i(()=>r.effectiveTheme.accentColor,r=>{const i=e(r,.5),o=t(r),s=this._textureHandle;this._textureHandle=a(i,o),m.setParameters({managedTexture:this._textureHandle.managedTexture}),s?.release(),f.setParameters({color:r.toUnitRGBA()})},o)}destroy(){this._textureHandle=r(this._textureHandle),this._themeHandle.remove(),this._material.dispose(),super.destroy()}}function h({imageMaterial:e,calloutMaterial:t}){const{focusMultiplier:r,calloutLength:i,discRadius:o}=n,s=o*r,u=(e,t)=>{const r=[0,1,2,2,3,0];return new m(t,[["position",new c([i-e,-e,0,i+e,-e,0,i+e,e,0,i-e,e,0],r,3,!0)],["uv0",new c([0,0,1,0,1,1,0,1],r,2,!0)]])},p=d(t,[[0,0,0],[i-o,0,0]]),f=d(t,[[0,0,0],[i-s,0,0]]),h=a;return{autoScaleRenderObjects:!1,collisionPriority:1,collisionType:{type:"disc",direction:[0,0,1],offset:[i,0,0]},focusMultiplier:r,radius:o,renderObjects:[new l(u(o,e),1|h),new l(p,1|h),new l(u(s,e),2|h),new l(f,2|h)],state:h}}export{f as RotateManipulator};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../../Color.js";import{getContrast as e}from"../../../../core/colorUtils.js";import{watch as o,initial as r}from"../../../../core/reactiveUtils.js";import{identity as a,translate as i,scale as s,fromQuat as n,multiply as c}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{rotationTo as m}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{e as p,n as u,j as f,i as d,h as g}from"../../../../chunks/vec32.js";import{create as h,fromValues as b}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as j,sm4d as M,sq4d as w}from"../../../../geometry/support/vectorStacks.js";import{shiftRestartOffsetDistance as v,shiftRestartTipRadius as O,shiftRestartTipLength as U,shiftRestartArrowOutlineWidth as y,shiftRestartArrowLength as D,shiftRestartTubeRadius as P,shiftRestartTubeFocusMultiplier as R,shiftRestartTipFocusMultiplier as x}from"./sliceToolConfig.js";import{DidPointerMoveRecentlyFlag as C,IsShiftEdgeOnScreenFlag as G}from"./sliceToolUtils.js";import{Manipulator3D as A}from"../../interactive/Manipulator3D.js";import{RenderObject as B}from"../../interactive/RenderObject.js";import{createPolylineGeometry as F,createConeGeometry as T,createPathExtrusionGeometry as k}from"../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as H}from"../../webgl-engine/materials/ColorMaterial.js";import{RibbonLineMaterial as S}from"../../webgl-engine/materials/RibbonLineMaterial.js";class _ extends A{constructor(a,i){const s=new S({width:1,renderOccluded:4,isDecoration:!0},a.state.isGlobal),n=new H({cullFace:2,renderOccluded:16,isDecoration:!0}),c=new H({cullFace:2,renderOccluded:16,isDecoration:!0}),l=new H({cullFace:2,renderOccluded:16,isDecoration:!0}),m=new H({writeDepth:!1,cullFace:1,renderOccluded:2,isDecoration:!0});super({view:a,...q({offsetMode:i,tubeMaterial:n,tipMaterial:c,capMaterial:l,outlineMaterial:m,calloutMaterial:s})}),this._themeHandle=o(()=>a.effectiveTheme.accentColor,o=>{const r=e(o),a=t.toUnitRGBA(o),i=t.toUnitRGBA(r),p=t.toUnitRGBA(t.blendColors(r,o,.4)),u=t.toUnitRGBA(t.blendColors(r,o,.14));s.setParameters({color:a}),n.setParameters({color:u}),c.setParameters({color:i}),l.setParameters({color:p}),m.setParameters({color:a})},r)}destroy(){this._themeHandle.remove(),super.destroy()}}function q({offsetMode:t,tubeMaterial:e,tipMaterial:o,capMaterial:r,outlineMaterial:a,calloutMaterial:i}){const s=0===t?v:0,n=[b(s,0,-D/2),b(s,0,D/2)],c=z(n),l=I({vertices:n,padding:0,materials:{tube:e,tip:o,cap:r}}),m=I({vertices:n,padding:y,materials:{tube:a,tip:a,cap:a}}),p=F(i,[[s,0,0],[s-v,0,0]]),u=F(i,[[s,0,0],[s-v,0,0]]);return{renderObjects:[...l.normal.map(t=>new B(t,1|C)),...m.normal.map(t=>new B(t,1|C)),new B(p,1|C|G),...l.focused.map(t=>new B(t,2|C)),...m.focused.map(t=>new B(t,2|C)),new B(u,2|C|G)],autoScaleRenderObjects:!1,collisionType:{type:"line",paths:[c]},collisionPriority:1,radius:O,state:C}}function I({vertices:t,padding:e,materials:o}){const r=r=>{const v=t.slice(),y=p(j.get(),v[0],v[1]);u(y,y);const D=p(j.get(),v[v.length-1],v[v.length-2]);if(u(D,D),e>0){const t=f(h(),D,-e);v[v.length-1]=d(t,t,v[v.length-1]);const o=f(h(),y,-e);v[0]=d(o,o,v[0])}const C=r?x:1,G=U*C,A=O*C,B=a(M.get());if(e>0){const t=G/4,o=g(j.get(),0,t,0),r=1+e/t;i(B,B,o),s(B,B,g(j.get(),r,r,r)),i(B,B,f(o,o,-1/r))}const F=a(l()),k=b(0,1,0),H=n(l(),m(w.get(),k,D));H[12]=v[v.length-1][0],H[13]=v[v.length-1][1],H[14]=v[v.length-1][2],c(H,H,B);const S=o.tube,_=L(P*(r?R:1)+e,v,S);_.transformation=F;const q=[_],I=o.tip,z=T(I,G,A,24,!1,!1,!0);z.transformation=H,q.push(z);const E=o.cap,J=T(E,G,A,24,!1,!0,!1);J.transformation=H,q.push(J);const K=n(l(),m(w.get(),k,y));return K[12]=v[0][0],K[13]=v[0][1],K[14]=v[0][2],c(K,K,B),q.push(z.instantiate({transformation:K})),q.push(J.instantiate({transformation:K})),q};return{normal:r(!1),focused:r(!0)}}function L(t,e,o){const r=[],a=12;for(let i=0;i<a;i++){const e=i/a*2*Math.PI;r.push([Math.cos(e)*t,Math.sin(e)*t])}return k(o,r,e,[],[],!1)}function z(t,e){const o=p(h(),t[t.length-1],t[t.length-2]);u(o,o),f(o,o,U),d(o,o,t[t.length-1]);{const e=p(h(),t[0],t[1]);return u(e,e),f(e,e,U),d(e,e,t[0]),[e,...t,o]}}export{_ as ShiftManipulator};
5
+ import t from"../../../../Color.js";import{getContrast as e}from"../../../../core/colorUtils.js";import{watch as o,initial as r}from"../../../../core/reactiveUtils.js";import{identity as a,translate as i,scale as s,fromQuat as n,multiply as c}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{rotationTo as m}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{e as p,n as u,j as f,i as d,h as g}from"../../../../chunks/vec32.js";import{create as h,fromValues as b}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as j,sm4d as M,sq4d as w}from"../../../../geometry/support/vectorStacks.js";import{shiftRestartOffsetDistance as v,shiftRestartTipRadius as O,shiftRestartTipLength as U,shiftRestartArrowOutlineWidth as y,shiftRestartArrowLength as D,shiftRestartTubeRadius as P,shiftRestartTubeFocusMultiplier as R,shiftRestartTipFocusMultiplier as x}from"./sliceToolConfig.js";import{DidPointerMoveRecentlyFlag as C,IsShiftEdgeOnScreenFlag as G}from"./sliceToolUtils.js";import{Manipulator3D as A}from"../../interactive/Manipulator3D.js";import{RenderObject as B}from"../../interactive/RenderObject.js";import{createPolylineGeometry as F,createConeGeometry as T,createPathExtrusionGeometry as k}from"../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as H}from"../../webgl-engine/materials/ColorMaterial.js";import{RibbonLineMaterial as S}from"../../webgl-engine/materials/RibbonLineMaterial.js";class _ extends A{constructor(a,i){const s=new S({width:1,renderOccluded:4,isDecoration:!0},a.state.isGlobal),n=new H({cullFace:2,renderOccluded:16,isDecoration:!0}),c=new H({cullFace:2,renderOccluded:16,isDecoration:!0}),l=new H({cullFace:2,renderOccluded:16,isDecoration:!0}),m=new H({writeDepth:!1,cullFace:1,renderOccluded:2,isDecoration:!0});super({view:a,...q({offsetMode:i,tubeMaterial:n,tipMaterial:c,capMaterial:l,outlineMaterial:m,calloutMaterial:s})}),this._themeHandle=o(()=>a.effectiveTheme.accentColor,o=>{const r=e(o),a=o.toUnitRGBA(),i=r.toUnitRGBA(),p=t.blendColors(r,o,.4).toUnitRGBA(),u=t.blendColors(r,o,.14).toUnitRGBA();s.setParameters({color:a}),n.setParameters({color:u}),c.setParameters({color:i}),l.setParameters({color:p}),m.setParameters({color:a})},r)}destroy(){this._themeHandle.remove(),super.destroy()}}function q({offsetMode:t,tubeMaterial:e,tipMaterial:o,capMaterial:r,outlineMaterial:a,calloutMaterial:i}){const s=0===t?v:0,n=[b(s,0,-D/2),b(s,0,D/2)],c=z(n),l=I({vertices:n,padding:0,materials:{tube:e,tip:o,cap:r}}),m=I({vertices:n,padding:y,materials:{tube:a,tip:a,cap:a}}),p=F(i,[[s,0,0],[s-v,0,0]]),u=F(i,[[s,0,0],[s-v,0,0]]);return{renderObjects:[...l.normal.map(t=>new B(t,1|C)),...m.normal.map(t=>new B(t,1|C)),new B(p,1|C|G),...l.focused.map(t=>new B(t,2|C)),...m.focused.map(t=>new B(t,2|C)),new B(u,2|C|G)],autoScaleRenderObjects:!1,collisionType:{type:"line",paths:[c]},collisionPriority:1,radius:O,state:C}}function I({vertices:t,padding:e,materials:o}){const r=r=>{const v=t.slice(),y=p(j.get(),v[0],v[1]);u(y,y);const D=p(j.get(),v[v.length-1],v[v.length-2]);if(u(D,D),e>0){const t=f(h(),D,-e);v[v.length-1]=d(t,t,v[v.length-1]);const o=f(h(),y,-e);v[0]=d(o,o,v[0])}const C=r?x:1,G=U*C,A=O*C,B=a(M.get());if(e>0){const t=G/4,o=g(j.get(),0,t,0),r=1+e/t;i(B,B,o),s(B,B,g(j.get(),r,r,r)),i(B,B,f(o,o,-1/r))}const F=a(l()),k=b(0,1,0),H=n(l(),m(w.get(),k,D));H[12]=v[v.length-1][0],H[13]=v[v.length-1][1],H[14]=v[v.length-1][2],c(H,H,B);const S=o.tube,_=L(P*(r?R:1)+e,v,S);_.transformation=F;const q=[_],I=o.tip,z=T(I,G,A,24,!1,!1,!0);z.transformation=H,q.push(z);const E=o.cap,J=T(E,G,A,24,!1,!0,!1);J.transformation=H,q.push(J);const K=n(l(),m(w.get(),k,y));return K[12]=v[0][0],K[13]=v[0][1],K[14]=v[0][2],c(K,K,B),q.push(z.instantiate({transformation:K})),q.push(J.instantiate({transformation:K})),q};return{normal:r(!1),focused:r(!0)}}function L(t,e,o){const r=[],a=12;for(let i=0;i<a;i++){const e=i/a*2*Math.PI;r.push([Math.cos(e)*t,Math.sin(e)*t])}return k(o,r,e,[],[],!1)}function z(t,e){const o=p(h(),t[t.length-1],t[t.length-2]);u(o,o),f(o,o,U),d(o,o,t[t.length-1]);{const e=p(h(),t[0],t[1]);return u(e,e),f(e,e,U),d(e,e,t[0]),[e,...t,o]}}export{_ as ShiftManipulator};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../Color.js";import t from"../../../../core/Handles.js";import{watch as r,initial as o}from"../../../../core/reactiveUtils.js";import{fromTranslation as i,mul as s,fromXRotation as a,fromYRotation as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{p as c}from"../../../../chunks/vec32.js";import{fromValues as m}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{displayFocusMultiplier as p}from"../Slice/sliceToolConfig.js";import{viewshedToolManipulatorConfiguration as f}from"./ViewshedConfiguration.js";import{Manipulator3D as h}from"../../interactive/Manipulator3D.js";import{RenderObject as d}from"../../interactive/RenderObject.js";import{createTubeGeometry as u,createExtrudedTriangle as j}from"../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as g}from"../../webgl-engine/materials/ColorMaterial.js";class w extends h{constructor(e,r){super({view:e,autoScaleRenderObjects:!1,worldSized:!1,radius:f.collisionRadius}),this._handles=new t,this._setupManipulatorVisual(r)}destroy(){this._handles.remove(),super.destroy()}_setupManipulatorVisual(e){const t=this._createMaterial(),r=1,o=[m(0,0,0),m(0,0,r)],h=u(t,o,e,16,!1),j=u(t,o,e*p,16,!1),g=b(!1,t,e),w=b(!0,t,e),M=l();i(M,o[o.length-1]),s(M,M,a(v,Math.PI/2)),s(M,M,n(v,Math.PI/2)),g.transformation=M,w.transformation=M,this.renderObjects=[new d(h,1),new d(j,2),new d(g,1),new d(w,2)];const _=m(0,f.getScaleOrientArrowTipLength(!0),0),O=c(_,_,M),x=[...o,O];this.collisionType={type:"line",paths:[x]}}_createMaterial(){const t=new g({cullFace:2,renderOccluded:4,isDecoration:!0});return this._handles.add(r(()=>e.toUnitRGBA(this.view.effectiveTheme.accentColor),e=>t.setParameters({color:e}),o)),t}}function b(e,t,r){const o=f.getScaleOrientArrowTipLength(e);let i=2*r;e&&(i*=p);const s=o/2;return j(t,o,s,s,i,0)}const v=l();export{w as ViewshedArrowManipulator};
5
+ import e from"../../../../core/Handles.js";import{watch as t,initial as r}from"../../../../core/reactiveUtils.js";import{fromTranslation as i,mul as o,fromXRotation as s,fromYRotation as a}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{p as l}from"../../../../chunks/vec32.js";import{fromValues as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{displayFocusMultiplier as m}from"../Slice/sliceToolConfig.js";import{viewshedToolManipulatorConfiguration as p}from"./ViewshedConfiguration.js";import{Manipulator3D as f}from"../../interactive/Manipulator3D.js";import{RenderObject as h}from"../../interactive/RenderObject.js";import{createTubeGeometry as d,createExtrudedTriangle as u}from"../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as j}from"../../webgl-engine/materials/ColorMaterial.js";class g extends f{constructor(t,r){super({view:t,autoScaleRenderObjects:!1,worldSized:!1,radius:p.collisionRadius}),this._handles=new e,this._setupManipulatorVisual(r)}destroy(){this._handles.remove(),super.destroy()}_setupManipulatorVisual(e){const t=this._createMaterial(),r=1,f=[c(0,0,0),c(0,0,r)],u=d(t,f,e,16,!1),j=d(t,f,e*m,16,!1),g=w(!1,t,e),v=w(!0,t,e),M=n();i(M,f[f.length-1]),o(M,M,s(b,Math.PI/2)),o(M,M,a(b,Math.PI/2)),g.transformation=M,v.transformation=M,this.renderObjects=[new h(u,1),new h(j,2),new h(g,1),new h(v,2)];const _=c(0,p.getScaleOrientArrowTipLength(!0),0),O=l(_,_,M),x=[...f,O];this.collisionType={type:"line",paths:[x]}}_createMaterial(){const e=new j({cullFace:2,renderOccluded:4,isDecoration:!0});return this._handles.add(t(()=>this.view.effectiveTheme.accentColor.toUnitRGBA(),t=>e.setParameters({color:t}),r)),e}}function w(e,t,r){const i=p.getScaleOrientArrowTipLength(e);let o=2*r;e&&(o*=m);const s=i/2;return u(t,i,s,s,o,0)}const b=n();export{g as ViewshedArrowManipulator};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../Color.js";import{deg2rad as i}from"../../../../core/mathUtils.js";const t=2,r=4,s=i(2),o=1.5;class c{constructor(){this.collisionRadius=5,this.fovUnfocusedArcWidth=r,this.fovFocusedArcWidth=t*this.fovUnfocusedArcWidth,this.scaleOrientSize=90,this.scaleOrientHandleRadius=.025,this.scaleOrientMinDistance=1,this.scaleOrientArrowTipLength=.3,this.scaleOrientArrowTipFocusMultiplier=t/1.5,this.observerSize=5,this.hoverTimeoutMilliseconds=1e3,this.viewAngleThreshold=10}getFovArcWidth(e){return e?this.fovFocusedArcWidth:this.fovUnfocusedArcWidth}getScaleOrientArrowTipLength(e){return this.scaleOrientArrowTipLength*(e?this.scaleOrientArrowTipFocusMultiplier:1)}}const n=new c;class h{constructor(){this.frameWidthNotSelected=.3,this.frameWidthSelected=1,this.frameColor=new e([255,255,255,.99]),this.observerPointConfiguration={size:6,pixelSnappingEnabled:!1,primitive:"circle",elevationInfo:{mode:"absolute-height",offset:0},outlineSize:0,color:e.toUnitRGBA(new e([3,252,111,1]))},this.shapeMaterialParameters={color:[.33,.33,.33,.25],renderOccluded:1,cullFace:2,writeDepth:!1}}}const l=new h;export{s as arcAnglePerSegment,o as creationVerticalOffset,n as viewshedToolManipulatorConfiguration,l as viewshedVisualizationConfiguration};
5
+ import e from"../../../../Color.js";import{deg2rad as i}from"../../../../core/mathUtils.js";const t=2,r=4,s=i(2),o=1.5;class c{constructor(){this.collisionRadius=5,this.fovUnfocusedArcWidth=r,this.fovFocusedArcWidth=t*this.fovUnfocusedArcWidth,this.scaleOrientSize=90,this.scaleOrientHandleRadius=.025,this.scaleOrientMinDistance=1,this.scaleOrientArrowTipLength=.3,this.scaleOrientArrowTipFocusMultiplier=t/1.5,this.observerSize=5,this.hoverTimeoutMilliseconds=1e3,this.viewAngleThreshold=10}getFovArcWidth(e){return e?this.fovFocusedArcWidth:this.fovUnfocusedArcWidth}getScaleOrientArrowTipLength(e){return this.scaleOrientArrowTipLength*(e?this.scaleOrientArrowTipFocusMultiplier:1)}}const n=new c;class h{constructor(){this.frameWidthNotSelected=.3,this.frameWidthSelected=1,this.frameColor=new e([255,255,255,.99]),this.observerPointConfiguration={size:6,pixelSnappingEnabled:!1,primitive:"circle",elevationInfo:{mode:"absolute-height",offset:0},outlineSize:0,color:new e([3,252,111,1]).toUnitRGBA()},this.shapeMaterialParameters={color:[.33,.33,.33,.25],renderOccluded:1,cullFace:2,writeDepth:!1}}}const l=new h;export{s as arcAnglePerSegment,o as creationVerticalOffset,n as viewshedToolManipulatorConfiguration,l as viewshedVisualizationConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../../Color.js";import r from"../../../../core/Handles.js";import{handlesGroup as e}from"../../../../core/handleUtils.js";import{deg2rad as a,clamp as i}from"../../../../core/mathUtils.js";import{destroyMaybe as o}from"../../../../core/maybe.js";import{watch as n,initial as s}from"../../../../core/reactiveUtils.js";import{fromYRotation as l,fromXRotation as c,fromScaling as u,fromZRotation as p,fromRotation as m,multiply as h}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as d,a as _,j as g}from"../../../../chunks/vec32.js";import{create as M,fromValues as b}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{f as v}from"../../../../chunks/boundedPlane.js";import{viewshedToolManipulatorConfiguration as j}from"./ViewshedConfiguration.js";import{getViewshedRotationMatrix as w,screenToCircleAngle as A}from"./viewshedToolUtils.js";import{Manipulator3D as V}from"../../interactive/Manipulator3D.js";import{RenderObject as O}from"../../interactive/RenderObject.js";import{InteractiveManipulation as E}from"../../interactive/editingTools/manipulations/InteractiveManipulation.js";import{createPolylineGeometry as y}from"../../webgl-engine/lib/GeometryUtil.js";import{assert as R}from"../../webgl-engine/lib/Util.js";import{RibbonLineMaterial as T}from"../../webgl-engine/materials/RibbonLineMaterial.js";import{createManipulatorDragEventPipeline as U}from"../../../interactive/dragEventPipeline.js";class x extends E{constructor(t){super(),this._handles=new r,this._tool=t.tool,this._view=t.view,this._focusedArcMaterial=this._createArcMaterial(!0),this._unfocusedArcMaterial=this._createArcMaterial(!1),this._createManipulators(),this.forEachManipulator(t=>this._tool.manipulators.add(t))}destroy(){this._handles=o(this._handles),this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()}),this._tool=null,this._view=null,this._manipulators=null}createDragPipeline(t,r){const a=Object.values(this._manipulators);return e(a.map(({manipulator:e,side:a})=>U(e,(e,i,o,n,s)=>{const l=G(a,r),c=i.next(t=>({...t,manipulatorType:2,side:a})),u=A(c,this._view,l,r);t(e,u,o)})))}updateManipulatorsTransform(t){t.arcCentersPoints(H),this._forEachManipulatorInfo(r=>this._updateArcManipulatorTransform(r,t,H[r.side]))}updateManipulatorVisuals(t){this._forEachManipulatorInfo(r=>this._updateArcManipulatorVisuals(r,t))}_updateArcManipulatorVisuals({manipulator:t,side:r},e){const a=[];if(null!=e){const[i,o]=P(r,e,this._unfocusedArcMaterial);a.push(new O(i,1),new O(i.instantiate({material:this._focusedArcMaterial}),2)),t.collisionType={type:"line",paths:[o]}}t.renderObjects=a,t.radius=j.collisionRadius}_updateArcManipulatorTransform({manipulator:t,side:r},e,i){const o=e.horizontalFieldOfView,n=a(e.verticalFieldOfView/2),s=a(o/2),_=I(r);t.renderLocation=i;const g=f(),M=t=>{h(g,t,g)};M(l(k,a(-90))),_||M(c(k,n));const b=e.farDistanceRenderSpace;let v,j;M(u(k,d(L,b,b,b))),M(p(k,F(r))),M(w(e,k)),_?(v=s,j=e.tiltedUpVector):(j=e.rightVector,v=n),v*="right"===r||"bottom"===r?-1:1;const A=m(k,v,j);null!=A&&M(A),t.modelTransform=g}_createManipulators(){const t=this._createArcManipulator("left"),r=this._createArcManipulator("right"),e=this._createArcManipulator("top"),a=this._createArcManipulator("bottom");this._manipulators={left:t,right:r,top:e,bottom:a};[[a.manipulator,e.manipulator],[t.manipulator,r.manipulator]].forEach(([t,r])=>{t.metadata={pairedManipulator:r},r.metadata={pairedManipulator:t}})}_createArcManipulator(t){const r=new V({view:this._view,autoScaleRenderObjects:!1,worldSized:!0}),e={manipulator:r,side:t};return this._updateArcManipulatorVisuals(e),this._handles.add(r.events.on(["focus-changed","grab-changed"],t=>{const e=r.metadata?.pairedManipulator;null!=e&&(e.hovering!==r.hovering&&(e.hovering=r.hovering),e.grabbing!==r.grabbing&&(e.grabbing=r.grabbing))})),e}_createArcMaterial(r){const e=j.getFovArcWidth(r),a=new T({renderOccluded:4,isDecoration:!0,width:e},this._view.state.isGlobal);return this._handles.add(n(()=>t.toUnitRGBA(this._view.effectiveTheme.accentColor),t=>a.setParameters({color:t}),s)),a}forEachManipulator(t){Object.values(this._manipulators).forEach(({manipulator:r})=>t(r,2))}_forEachManipulatorInfo(t){Object.values(this._manipulators).forEach(r=>t(r))}get test(){return{manipulators:this._manipulators}}}function P(t,r,e){const{horizontalFieldOfView:o,verticalFieldOfView:n}=r,s=I(t),l=a(i((s?n:o)/2,0,15)),c=S(-l/2,l/2,s?1:Math.max(Math.sin(a(90-n/2)),.1));return[y(e,c),c]}function S(t,r,e,a=10){R(a>1,"createArcPolylineGeometry() needs at least 2 for numVertices");const i=r-t;if(i<=0||e<=0){const t=.01;return[b(0,0,t),b(0,0,-t)]}const o=[],n=i/a;for(let s=0;s<a;s++){let i=t+s*n;s===a-1&&(i=r);const l=Math.cos(i)*e,c=Math.sin(i)*e,u=b(l-e,0,c);o.push(u)}return o}function D(t){switch(t){case"left":return 0;case"bottom":return 1;case"right":return 2;case"top":return 3}}function F(t){return D(t)*z}function I(t){return"left"===t||"right"===t}function C(t){return"left"===t?"right":"right"===t?"left":"top"===t?"bottom":"top"}function G(t,{observerRenderSpace:r,targetRenderSpace:e,tiltedUpVector:a,rightVector:i,farDistanceRenderSpace:o}){const n=_(L,e,r),s=I(t)?i:a,l=g(B,s,o);return v(r,n,l)}const z=Math.PI/2,k=f(),L=M(),B=M(),H={top:M(),bottom:M(),left:M(),right:M()};export{x as ViewshedFieldOfViewManipulation,S as createArcPolylineVertices,C as flipSide,I as isSideHorizontal,F as sideToRad};
5
+ import t from"../../../../core/Handles.js";import{handlesGroup as r}from"../../../../core/handleUtils.js";import{deg2rad as e,clamp as a}from"../../../../core/mathUtils.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{watch as o,initial as n}from"../../../../core/reactiveUtils.js";import{fromYRotation as s,fromXRotation as l,fromScaling as c,fromZRotation as u,fromRotation as p,multiply as h}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as d,a as f,j as _}from"../../../../chunks/vec32.js";import{create as g,fromValues as M}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{f as b}from"../../../../chunks/boundedPlane.js";import{viewshedToolManipulatorConfiguration as v}from"./ViewshedConfiguration.js";import{getViewshedRotationMatrix as j,screenToCircleAngle as w}from"./viewshedToolUtils.js";import{Manipulator3D as A}from"../../interactive/Manipulator3D.js";import{RenderObject as V}from"../../interactive/RenderObject.js";import{InteractiveManipulation as O}from"../../interactive/editingTools/manipulations/InteractiveManipulation.js";import{createPolylineGeometry as E}from"../../webgl-engine/lib/GeometryUtil.js";import{assert as y}from"../../webgl-engine/lib/Util.js";import{RibbonLineMaterial as R}from"../../webgl-engine/materials/RibbonLineMaterial.js";import{createManipulatorDragEventPipeline as T}from"../../../interactive/dragEventPipeline.js";class U extends O{constructor(r){super(),this._handles=new t,this._tool=r.tool,this._view=r.view,this._focusedArcMaterial=this._createArcMaterial(!0),this._unfocusedArcMaterial=this._createArcMaterial(!1),this._createManipulators(),this.forEachManipulator(t=>this._tool.manipulators.add(t))}destroy(){this._handles=i(this._handles),this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()}),this._tool=null,this._view=null,this._manipulators=null}createDragPipeline(t,e){const a=Object.values(this._manipulators);return r(a.map(({manipulator:r,side:a})=>T(r,(r,i,o,n,s)=>{const l=G(a,e),c=i.next(t=>({...t,manipulatorType:2,side:a})),u=w(c,this._view,l,e);t(r,u,o)})))}updateManipulatorsTransform(t){t.arcCentersPoints(B),this._forEachManipulatorInfo(r=>this._updateArcManipulatorTransform(r,t,B[r.side]))}updateManipulatorVisuals(t){this._forEachManipulatorInfo(r=>this._updateArcManipulatorVisuals(r,t))}_updateArcManipulatorVisuals({manipulator:t,side:r},e){const a=[];if(null!=e){const[i,o]=x(r,e,this._unfocusedArcMaterial);a.push(new V(i,1),new V(i.instantiate({material:this._focusedArcMaterial}),2)),t.collisionType={type:"line",paths:[o]}}t.renderObjects=a,t.radius=v.collisionRadius}_updateArcManipulatorTransform({manipulator:t,side:r},a,i){const o=a.horizontalFieldOfView,n=e(a.verticalFieldOfView/2),f=e(o/2),_=F(r);t.renderLocation=i;const g=m(),M=t=>{h(g,t,g)};M(s(C,e(-90))),_||M(l(C,n));const b=a.farDistanceRenderSpace;let v,w;M(c(C,d(k,b,b,b))),M(u(C,D(r))),M(j(a,C)),_?(v=f,w=a.tiltedUpVector):(w=a.rightVector,v=n),v*="right"===r||"bottom"===r?-1:1;const A=p(C,v,w);null!=A&&M(A),t.modelTransform=g}_createManipulators(){const t=this._createArcManipulator("left"),r=this._createArcManipulator("right"),e=this._createArcManipulator("top"),a=this._createArcManipulator("bottom");this._manipulators={left:t,right:r,top:e,bottom:a};[[a.manipulator,e.manipulator],[t.manipulator,r.manipulator]].forEach(([t,r])=>{t.metadata={pairedManipulator:r},r.metadata={pairedManipulator:t}})}_createArcManipulator(t){const r=new A({view:this._view,autoScaleRenderObjects:!1,worldSized:!0}),e={manipulator:r,side:t};return this._updateArcManipulatorVisuals(e),this._handles.add(r.events.on(["focus-changed","grab-changed"],t=>{const e=r.metadata?.pairedManipulator;null!=e&&(e.hovering!==r.hovering&&(e.hovering=r.hovering),e.grabbing!==r.grabbing&&(e.grabbing=r.grabbing))})),e}_createArcMaterial(t){const r=v.getFovArcWidth(t),e=new R({renderOccluded:4,isDecoration:!0,width:r},this._view.state.isGlobal);return this._handles.add(o(()=>this._view.effectiveTheme.accentColor.toUnitRGBA(),t=>e.setParameters({color:t}),n)),e}forEachManipulator(t){Object.values(this._manipulators).forEach(({manipulator:r})=>t(r,2))}_forEachManipulatorInfo(t){Object.values(this._manipulators).forEach(r=>t(r))}get test(){return{manipulators:this._manipulators}}}function x(t,r,i){const{horizontalFieldOfView:o,verticalFieldOfView:n}=r,s=F(t),l=e(a((s?n:o)/2,0,15)),c=P(-l/2,l/2,s?1:Math.max(Math.sin(e(90-n/2)),.1));return[E(i,c),c]}function P(t,r,e,a=10){y(a>1,"createArcPolylineGeometry() needs at least 2 for numVertices");const i=r-t;if(i<=0||e<=0){const t=.01;return[M(0,0,t),M(0,0,-t)]}const o=[],n=i/a;for(let s=0;s<a;s++){let i=t+s*n;s===a-1&&(i=r);const l=Math.cos(i)*e,c=Math.sin(i)*e,u=M(l-e,0,c);o.push(u)}return o}function S(t){switch(t){case"left":return 0;case"bottom":return 1;case"right":return 2;case"top":return 3}}function D(t){return S(t)*z}function F(t){return"left"===t||"right"===t}function I(t){return"left"===t?"right":"right"===t?"left":"top"===t?"bottom":"top"}function G(t,{observerRenderSpace:r,targetRenderSpace:e,tiltedUpVector:a,rightVector:i,farDistanceRenderSpace:o}){const n=f(k,e,r),s=F(t)?i:a,l=_(L,s,o);return b(r,n,l)}const z=Math.PI/2,C=m(),k=g(),L=g(),B={top:g(),bottom:g(),left:g(),right:g()};export{U as ViewshedFieldOfViewManipulation,P as createArcPolylineVertices,I as flipSide,F as isSideHorizontal,D as sideToRad};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../Color.js";import i from"../../../../core/Accessor.js";import"../../../../core/has.js";import{equals as s}from"../../../../core/lang.js";import{deg2rad as o}from"../../../../core/mathUtils.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{watch as a,initial as l}from"../../../../core/reactiveUtils.js";import{property as n,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{fromRotation as c}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{p as d,h as u,a as p,u as _,n as V,j as f,k as v,q as w,d as E,i as b}from"../../../../chunks/vec32.js";import{create as g,clone as C}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewshedVisualizationConfiguration as L,arcAnglePerSegment as A}from"./ViewshedConfiguration.js";import{ViewshedShapeVisualElement as D}from"./ViewshedShapeVisualElement.js";import y from"./ViewshedTool.js";import{LineVisualElement as j}from"../../interactive/visualElements/LineVisualElement.js";import{PointVisualElement as F}from"../../interactive/visualElements/PointVisualElement.js";import{createStipplePatternSimple as R}from"../../webgl-engine/materials/lineStippleUtils.js";let S=class extends i{constructor(e){super(e),this.visible=!0,this._viewshedCorners={topLeft:g(),topRight:g(),bottomLeft:g(),bottomRight:g()},this._arcCenterPoints={top:g(),bottom:g(),left:g(),right:g()},this._parallelCenters={top:g(),bottom:g()}}initialize(){const e={view:this.view,isDecoration:!0},t={...e,color:this._color,renderOccluded:4},i={...t,stipplePattern:R(2)};this._observerVisualElement=new F({...e,...L.observerPointConfiguration}),this._shapeVisualElement=new D({...e,isDecoration:this.isDecoration}),this._frameLinesVisualElement=new j(t),this._leftArcVisualElement=new j(t),this._rightArcVisualElement=new j(t),this._topArcVisualElement=new j(t),this._bottomArcVisualElement=new j(t),this._centralLongitude=new j(i),this._centralLatitude=new j(i),this.addHandles([a(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const t=this._viewshedCorners,i=this._arcCenterPoints,s=this._parallelCenters;return e.cornerPoints(t),e.arcCentersPoints(i),e.parallelCenterPoints(s),{viewshedComputedData:e,corners:t,arcCenters:i,parallelCenters:s,interactive:this.analysisViewData.interactive,selected:this._selected}},e=>{const t=null!=e;this._forEachVisualElement(e=>e.attached=t),t&&this._updateVisualElements(e)},{initial:!0,equals:s}),a(()=>{const{viewshedComputedData:e}=this,{horizontalFieldOfView:t,verticalFieldOfView:i}=e??{};return{viewshedComputedData:e,horizontalFieldOfView:t,verticalFieldOfView:i}},({viewshedComputedData:e})=>{const{_shapeVisualElement:t}=this;e!==t.viewshedComputedData&&(t.viewshedComputedData=e),this._shapeVisualElement.recreateGeometry()},l),a(()=>{const{interactive:e}=this.analysisViewData;return{visible:this.visible,selected:e&&this._selected,staged:e&&this._staged,horFovNot360:360!==this.viewshedComputedData?.horizontalFieldOfView}},({visible:e,selected:t,staged:i,horFovNot360:s})=>{const o=t||i;this._shapeVisualElement.visible=e,this._topArcVisualElement.visible=e,this._bottomArcVisualElement.visible=e,this._frameLinesVisualElement.visible=e&&s;const r=e&&(t||s);this._leftArcVisualElement.visible=r,this._rightArcVisualElement.visible=r,this._forEachLineVisualElement(e=>{e.width=o?L.frameWidthSelected:L.frameWidthNotSelected,e.renderOccluded=t?4:1}),[this._centralLatitude,this._centralLongitude].forEach(i=>{i.width=2*(o?L.frameWidthSelected:L.frameWidthNotSelected),i.visible=e&&t})},l),a(()=>{const{analysisViewData:{interactive:e,tool:t},_selected:i,visible:s}=this,o=this.view.activeTool,r=!t?.active&&o instanceof y&&o.creating;return{observerVisible:s&&!i&&(!e||(t?.creating??!1)||r),color:this._color}},({observerVisible:e,color:t})=>{this._observerVisualElement.visible=e,this._forEachLineVisualElement(e=>e.color=t)},l)])}get _color(){const{viewshedComputedData:e,_selected:i,analysisViewData:s}=this;if(null==e)return t.toUnitRGBA(L.frameColor);const o=s.tool?.active||s.interactive,r=e.viewshed===s.tool?.stagedViewshed,a=o&&(i||r)?this.view.effectiveTheme.accentColor:L.frameColor;return t.toUnitRGBA(a)}get _selected(){const{viewshedComputedData:e,analysisViewData:{selectedViewshedComputedData:t}}=this;return null!=e&&e===t}get _staged(){const{analysisViewData:{tool:e},viewshedComputedData:t}=this;return null!=e&&e.creating&&e.stagedViewshed===t?.viewshed}destroy(){this._observerVisualElement=r(this._observerVisualElement),this._shapeVisualElement=r(this._shapeVisualElement),this._frameLinesVisualElement=r(this._frameLinesVisualElement),this._leftArcVisualElement=r(this._leftArcVisualElement),this._rightArcVisualElement=r(this._rightArcVisualElement),this._topArcVisualElement=r(this._topArcVisualElement),this._bottomArcVisualElement=r(this._bottomArcVisualElement),this._centralLongitude=r(this._centralLongitude),this._centralLatitude=r(this._centralLatitude)}_forEachLineVisualElement(e){[this._frameLinesVisualElement,this._leftArcVisualElement,this._rightArcVisualElement,this._topArcVisualElement,this._bottomArcVisualElement,this._centralLatitude,this._centralLongitude].forEach(e)}_forEachVisualElement(e){this._forEachLineVisualElement(e),e(this._observerVisualElement),e(this._shapeVisualElement)}_updateVisualElements(e){const{viewshedComputedData:t,corners:i,arcCenters:s,parallelCenters:o}=e,r=C(t.observerRenderSpace);this._observerVisualElement.geometry=t.observer,this._shapeVisualElement.updateTransform(),this._updateFrameLines(r,i),this._updateFrameArcs(t,i,o),this._updateCentralHelperArcs(t,s)}_updateFrameLines(e,t){this._frameLinesVisualElement.geometry=[[e,t.topLeft],[e,t.topRight],[e,t.bottomLeft],[e,t.bottomRight]]}_updateFrameArcs(e,t,i){const{observerRenderSpace:s,rightVector:r,horizontalFieldOfView:a,tiltedUpVector:l}=e,n=o(a),h=g(),p=m();c(p,n/2,l),d(h,r,p),O(this._leftArcVisualElement,s,t.bottomLeft,t.topLeft,"forward",h),c(p,-n/2,l),u(h,0,0,0),d(h,r,p),O(this._rightArcVisualElement,s,t.bottomRight,t.topRight,"forward",h);const _=a>180?"backward":"forward";O(this._topArcVisualElement,i.top,t.topRight,t.topLeft,_,l),O(this._bottomArcVisualElement,i.bottom,t.bottomRight,t.bottomLeft,_,l)}_updateCentralHelperArcs(e,t){const i=e.observerRenderSpace,s=e.horizontalFieldOfView>=180?"backward":"forward";O(this._centralLatitude,i,t.right,t.left,s,e.tiltedUpVector),O(this._centralLongitude,i,t.top,t.bottom,"forward",e.leftVector)}get test(){}};function O(e,t,i,s,o,r,a=A){const l=g();p(l,i,t);const n=_(l),h=g();p(h,s,t),V(h,h),f(h,h,n);let u=v(l,h);const L=C(r);"backward"===o&&(w(L,L),u=-(2*Math.PI-u));const D=[],y=Math.ceil(Math.abs(u)/a),j=m();c(j,u/y,L);const F=g();E(F,l);const R=g();E(R,i);for(let c=0;c<y;c++){const e=g();E(e,R),d(F,F,j),b(R,t,F);const i=g();E(i,R),D.push([e,i])}e.geometry=D}e([n()],S.prototype,"view",void 0),e([n({constructOnly:!0})],S.prototype,"isDecoration",void 0),e([n()],S.prototype,"analysisViewData",void 0),e([n()],S.prototype,"viewshedComputedData",void 0),e([n()],S.prototype,"visible",void 0),e([n()],S.prototype,"_color",null),e([n()],S.prototype,"_selected",null),e([n()],S.prototype,"_staged",null),S=e([h("esri.views.3d.analysis.Viewshed.ViewshedSubVisualization")],S);export{S as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import"../../../../core/has.js";import{equals as i}from"../../../../core/lang.js";import{deg2rad as s}from"../../../../core/mathUtils.js";import{destroyMaybe as o}from"../../../../core/maybe.js";import{watch as r,initial as a}from"../../../../core/reactiveUtils.js";import{property as l,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{fromRotation as h}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{p as m,h as d,a as u,u as p,n as _,j as V,k as f,q as v,d as w,i as E}from"../../../../chunks/vec32.js";import{create as b,clone as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewshedVisualizationConfiguration as C,arcAnglePerSegment as L}from"./ViewshedConfiguration.js";import{ViewshedShapeVisualElement as A}from"./ViewshedShapeVisualElement.js";import D from"./ViewshedTool.js";import{LineVisualElement as y}from"../../interactive/visualElements/LineVisualElement.js";import{PointVisualElement as j}from"../../interactive/visualElements/PointVisualElement.js";import{createStipplePatternSimple as F}from"../../webgl-engine/materials/lineStippleUtils.js";let R=class extends t{constructor(e){super(e),this.visible=!0,this._viewshedCorners={topLeft:b(),topRight:b(),bottomLeft:b(),bottomRight:b()},this._arcCenterPoints={top:b(),bottom:b(),left:b(),right:b()},this._parallelCenters={top:b(),bottom:b()}}initialize(){const e={view:this.view,isDecoration:!0},t={...e,color:this._color,renderOccluded:4},s={...t,stipplePattern:F(2)};this._observerVisualElement=new j({...e,...C.observerPointConfiguration}),this._shapeVisualElement=new A({...e,isDecoration:this.isDecoration}),this._frameLinesVisualElement=new y(t),this._leftArcVisualElement=new y(t),this._rightArcVisualElement=new y(t),this._topArcVisualElement=new y(t),this._bottomArcVisualElement=new y(t),this._centralLongitude=new y(s),this._centralLatitude=new y(s),this.addHandles([r(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const t=this._viewshedCorners,i=this._arcCenterPoints,s=this._parallelCenters;return e.cornerPoints(t),e.arcCentersPoints(i),e.parallelCenterPoints(s),{viewshedComputedData:e,corners:t,arcCenters:i,parallelCenters:s,interactive:this.analysisViewData.interactive,selected:this._selected}},e=>{const t=null!=e;this._forEachVisualElement(e=>e.attached=t),t&&this._updateVisualElements(e)},{initial:!0,equals:i}),r(()=>{const{viewshedComputedData:e}=this,{horizontalFieldOfView:t,verticalFieldOfView:i}=e??{};return{viewshedComputedData:e,horizontalFieldOfView:t,verticalFieldOfView:i}},({viewshedComputedData:e})=>{const{_shapeVisualElement:t}=this;e!==t.viewshedComputedData&&(t.viewshedComputedData=e),this._shapeVisualElement.recreateGeometry()},a),r(()=>{const{interactive:e}=this.analysisViewData;return{visible:this.visible,selected:e&&this._selected,staged:e&&this._staged,horFovNot360:360!==this.viewshedComputedData?.horizontalFieldOfView}},({visible:e,selected:t,staged:i,horFovNot360:s})=>{const o=t||i;this._shapeVisualElement.visible=e,this._topArcVisualElement.visible=e,this._bottomArcVisualElement.visible=e,this._frameLinesVisualElement.visible=e&&s;const r=e&&(t||s);this._leftArcVisualElement.visible=r,this._rightArcVisualElement.visible=r,this._forEachLineVisualElement(e=>{e.width=o?C.frameWidthSelected:C.frameWidthNotSelected,e.renderOccluded=t?4:1}),[this._centralLatitude,this._centralLongitude].forEach(i=>{i.width=2*(o?C.frameWidthSelected:C.frameWidthNotSelected),i.visible=e&&t})},a),r(()=>{const{analysisViewData:{interactive:e,tool:t},_selected:i,visible:s}=this,o=this.view.activeTool,r=!t?.active&&o instanceof D&&o.creating;return{observerVisible:s&&!i&&(!e||(t?.creating??!1)||r),color:this._color}},({observerVisible:e,color:t})=>{this._observerVisualElement.visible=e,this._forEachLineVisualElement(e=>e.color=t)},a)])}get _color(){const{viewshedComputedData:e,_selected:t,analysisViewData:i}=this;if(null==e)return C.frameColor.toUnitRGBA();const s=i.tool?.active||i.interactive,o=e.viewshed===i.tool?.stagedViewshed;return(s&&(t||o)?this.view.effectiveTheme.accentColor:C.frameColor).toUnitRGBA()}get _selected(){const{viewshedComputedData:e,analysisViewData:{selectedViewshedComputedData:t}}=this;return null!=e&&e===t}get _staged(){const{analysisViewData:{tool:e},viewshedComputedData:t}=this;return null!=e&&e.creating&&e.stagedViewshed===t?.viewshed}destroy(){this._observerVisualElement=o(this._observerVisualElement),this._shapeVisualElement=o(this._shapeVisualElement),this._frameLinesVisualElement=o(this._frameLinesVisualElement),this._leftArcVisualElement=o(this._leftArcVisualElement),this._rightArcVisualElement=o(this._rightArcVisualElement),this._topArcVisualElement=o(this._topArcVisualElement),this._bottomArcVisualElement=o(this._bottomArcVisualElement),this._centralLongitude=o(this._centralLongitude),this._centralLatitude=o(this._centralLatitude)}_forEachLineVisualElement(e){[this._frameLinesVisualElement,this._leftArcVisualElement,this._rightArcVisualElement,this._topArcVisualElement,this._bottomArcVisualElement,this._centralLatitude,this._centralLongitude].forEach(e)}_forEachVisualElement(e){this._forEachLineVisualElement(e),e(this._observerVisualElement),e(this._shapeVisualElement)}_updateVisualElements(e){const{viewshedComputedData:t,corners:i,arcCenters:s,parallelCenters:o}=e,r=g(t.observerRenderSpace);this._observerVisualElement.geometry=t.observer,this._shapeVisualElement.updateTransform(),this._updateFrameLines(r,i),this._updateFrameArcs(t,i,o),this._updateCentralHelperArcs(t,s)}_updateFrameLines(e,t){this._frameLinesVisualElement.geometry=[[e,t.topLeft],[e,t.topRight],[e,t.bottomLeft],[e,t.bottomRight]]}_updateFrameArcs(e,t,i){const{observerRenderSpace:o,rightVector:r,horizontalFieldOfView:a,tiltedUpVector:l}=e,n=s(a),u=b(),p=c();h(p,n/2,l),m(u,r,p),S(this._leftArcVisualElement,o,t.bottomLeft,t.topLeft,"forward",u),h(p,-n/2,l),d(u,0,0,0),m(u,r,p),S(this._rightArcVisualElement,o,t.bottomRight,t.topRight,"forward",u);const _=a>180?"backward":"forward";S(this._topArcVisualElement,i.top,t.topRight,t.topLeft,_,l),S(this._bottomArcVisualElement,i.bottom,t.bottomRight,t.bottomLeft,_,l)}_updateCentralHelperArcs(e,t){const i=e.observerRenderSpace,s=e.horizontalFieldOfView>=180?"backward":"forward";S(this._centralLatitude,i,t.right,t.left,s,e.tiltedUpVector),S(this._centralLongitude,i,t.top,t.bottom,"forward",e.leftVector)}get test(){}};function S(e,t,i,s,o,r,a=L){const l=b();u(l,i,t);const n=p(l),d=b();u(d,s,t),_(d,d),V(d,d,n);let C=f(l,d);const A=g(r);"backward"===o&&(v(A,A),C=-(2*Math.PI-C));const D=[],y=Math.ceil(Math.abs(C)/a),j=c();h(j,C/y,A);const F=b();w(F,l);const R=b();w(R,i);for(let h=0;h<y;h++){const e=b();w(e,R),m(F,F,j),E(R,t,F);const i=b();w(i,R),D.push([e,i])}e.geometry=D}e([l()],R.prototype,"view",void 0),e([l({constructOnly:!0})],R.prototype,"isDecoration",void 0),e([l()],R.prototype,"analysisViewData",void 0),e([l()],R.prototype,"viewshedComputedData",void 0),e([l()],R.prototype,"visible",void 0),e([l()],R.prototype,"_color",null),e([l()],R.prototype,"_selected",null),e([l()],R.prototype,"_staged",null),R=e([n("esri.views.3d.analysis.Viewshed.ViewshedSubVisualization")],R);export{R 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/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import r from"../../../../Color.js";import o from"../../../../core/Handles.js";import{watch as t,initial as i}from"../../../../core/reactiveUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators.js";import{viewshedToolManipulatorConfiguration as a}from"./ViewshedConfiguration.js";import{Manipulator3D as c}from"../../interactive/Manipulator3D.js";import{createManipulatorMaterial as n}from"../../interactive/manipulatorUtils.js";import{RenderObject as m}from"../../interactive/RenderObject.js";import{createSphereGeometry as l}from"../../webgl-engine/lib/GeometryUtil.js";class p extends c{constructor(e,r){super({view:e,autoScaleRenderObjects:!1,worldSized:!1,radius:a.observerSize,interactive:!1}),this._handles=new o;const s=n(this._color);this.renderObjects=[new m(l(s,a.observerSize,32,32))],r.manipulators.add(this),this._handles.add([t(()=>this._color,e=>{s.setParameters({color:e})},i)])}destroy(){this._handles.remove(),super.destroy()}get _color(){return r.toUnitRGBA(this.view.effectiveTheme.accentColor)}}e([s()],p.prototype,"_color",null);export{p as ViewshedObserverManipulator};
5
+ import{__decorate as e}from"tslib";import r from"../../../../core/Handles.js";import{watch as t,initial as o}from"../../../../core/reactiveUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators.js";import{viewshedToolManipulatorConfiguration as s}from"./ViewshedConfiguration.js";import{Manipulator3D as a}from"../../interactive/Manipulator3D.js";import{createManipulatorMaterial as c}from"../../interactive/manipulatorUtils.js";import{RenderObject as n}from"../../interactive/RenderObject.js";import{createSphereGeometry as l}from"../../webgl-engine/lib/GeometryUtil.js";class m extends a{constructor(e,i){super({view:e,autoScaleRenderObjects:!1,worldSized:!1,radius:s.observerSize,interactive:!1}),this._handles=new r;const a=c(this._color);this.renderObjects=[new n(l(a,s.observerSize,32,32))],i.manipulators.add(this),this._handles.add([t(()=>this._color,e=>{a.setParameters({color:e})},o)])}destroy(){this._handles.remove(),super.destroy()}get _color(){return this.view.effectiveTheme.accentColor.toUnitRGBA()}}e([i()],m.prototype,"_color",null);export{m as ViewshedObserverManipulator};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../Color.js";import{onLocaleChange as i,substitute as s,fetchMessageBundle as o}from"../../../../intl.js";import{volumeMeasurementConfiguration as r}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import l from"../../../../core/Accessor.js";import{equals as n}from"../../../../core/arrayUtils.js";import{cyclicalPI as a}from"../../../../core/Cyclical.js";import{destroyMaybe as c}from"../../../../core/maybe.js";import{formatDecimal as u}from"../../../../core/quantityFormatUtils.js";import{watch as m,initial as d}from"../../../../core/reactiveUtils.js";import{adaptiveVolumeUnit as h}from"../../../../core/units.js";import{property as p,subclass as y}from"../../../../core/accessorSupport/decorators.js";import{e as g}from"../../../../chunks/earcut.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as f,n as v,e as j,f as L,g as b}from"../../../../chunks/vec32.js";import{create as C,fromValues as w}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as G}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{newDoubleArray as P}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as V}from"../../../../geometry/support/Indices.js";import{angleAroundAxis as R}from"../../../../geometry/support/vector.js";import{t as F}from"../../../../chunks/vec3.js";import A from"../../../../symbols/support/ElevationInfo.js";import{LabelVisualElement as O}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as x}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as D}from"../../interactive/visualElements/OutlineVisualElement.js";import{EuclideanSegment as M}from"../../interactive/visualElements/support/Segment.js";import{ElevationContext as S}from"../../layers/graphics/ElevationContext.js";import{extrudePolygon as U}from"../../layers/graphics/Graphics3DExtrudeSymbolLayer.js";import{polygonToRenderInfo as E}from"../../support/renderInfoUtils/polygon.js";import{CutFillColor as B,VolumeGeometry as N}from"../../webgl-engine/lib/CutFillColor.js";import{createStipplePatternSimple as T}from"../../webgl-engine/materials/lineStippleUtils.js";let H=class extends l{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}get updating(){return this.loadingMessages}get hasUnsupportedError(){const{error:e}=this.analysisViewData;return!!e&&["unsupported-coordinate-system","unsupported-layer-transparency"].includes(e.name)}constructor(e){super(e),this.unitsMessages=null,this.messages=null,this.loadingMessages=!0,this._elevationContext=S.fromElevationInfo(new A({mode:"absolute-height"})),this._extrusionHeight=r.targetElevationRange,this._projectionLines=[]}initialize(){const{view:e}=this,s={view:e,isDecoration:!0},o=r,l={...s,width:o.geometryOutlineWidth};this._elevationAlignedGeometry=new D({...l,isDraped:!0,color:t.toUnitRGBA(o.geometryOutlineColor)}),this._targetGeometry=new D(l);const n={...s,attached:!0,width:o.projectionLineWidth,renderOccluded:4,polygonOffset:!0},a={...n,stipplePattern:T(o.projectionLineStippleSize)},c=t.toUnitRGBA(o.cutProjectionLineColor),u=t.toUnitRGBA(o.fillProjectionLineColor);this._cutProjectionLines=new x({...n,color:c}),this._occludedCutProjectionLines=new x({...a,color:c}),this._fillProjectionLines=new x({...n,color:u}),this._occludedFillProjectionLines=new x({...a,color:u});const h={...s,attached:!0};this._cutVolumeLabel=new O(h),this._fillVolumeLabel=new O(h),this._cutFillRenderNode=new B({view:e,cutColor:o.cutColor,fillColor:o.fillColor,borderColor:o.geometryOutlineColor}),this.addHandles([m(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry}),({elevationAlignedGeometry:e,targetGeometry:t})=>{this._elevationAlignedGeometry.geometry=e,this._targetGeometry.geometry=t},d),m(()=>({interactive:this.analysisViewData.interactive,measureType:this.analysis.measureType,visible:this.visible}),({visible:e,interactive:t,measureType:i})=>{this._elevationAlignedGeometry.visible=e&&!t,this._targetGeometry.visible=e&&"cut-fill"===i,this._cutFillRenderNode.measureType=i},d),m(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry,visible:this.visible}),({elevationAlignedGeometry:e,targetGeometry:t,visible:i})=>this._updateProjectionLines(e,t,i),d),m(()=>({interactive:this.analysisViewData.interactive,accentColor:this.view.effectiveTheme.accentColor,hasResult:!!this.analysisViewData.result}),({interactive:e,accentColor:t,hasResult:i})=>{this._updateColors(e,t,i)},d),m(()=>this.analysisViewData.targetGeometry,()=>this._updateCutFillGeometry(),d),m(()=>this.visible&&!this.hasUnsupportedError,e=>this._updateCutFillVisibility(e),d),m(()=>{const{messages:e,unitsMessages:t,visible:i,analysisViewData:s}=this;return{labelAnchors:s.labelAnchors,effectiveDisplayUnits:s.effectiveDisplayUnits,messages:e,unitsMessages:t,result:s.result,visible:i&&!!s.result}},e=>this._updateLabels(e)),m(()=>this.view.state.camera,e=>this._updateProjectionLineOcclusion(e),d),i(()=>this._updateMessageBundle())]),this._updateMessageBundle()}destroy(){this._elevationAlignedGeometry=c(this._elevationAlignedGeometry),this._targetGeometry=c(this._targetGeometry),this._cutProjectionLines=c(this._cutProjectionLines),this._occludedCutProjectionLines=c(this._occludedCutProjectionLines),this._fillProjectionLines=c(this._fillProjectionLines),this._occludedFillProjectionLines=c(this._occludedFillProjectionLines),this._cutVolumeLabel=c(this._cutVolumeLabel),this._fillVolumeLabel=c(this._fillVolumeLabel),this._cutFillRenderNode.destroy()}_updateProjectionLines(e,t,i){if(this._cutProjectionLines.visible=i,this._occludedCutProjectionLines.visible=i,this._fillProjectionLines.visible=i,this._occludedFillProjectionLines.visible=i,!e||!t)return;const{renderCoordsHelper:s}=this.view,o=[],r=e.spatialReference,l=e.rings[0],a=l.length>1&&n(l[0],l[l.length-1]),c=l.length-(a?1:0);for(let n=0;n<c;++n){const e=l[n],i=f(C(),e[0],e[1],e[2]);s.toRenderCoords(i,r,i);const a=t.rings[0][n],c=f(C(),a[0],a[1],a[2]);s.toRenderCoords(c,r,c);const u=new M(i,c);o.push(u)}e.isClockwise(l)||o.reverse();const u=[],m=[],d=[],h=[],p=[],y=this.view.state.camera;for(let n=0;n<o.length;++n){const i=o[n],s=o[0===n?o.length-1:n-1],r=o[n===o.length-1?0:n+1],l=e.rings[0][n],a=t.rings[0][n],c=l[2]>a[2],g=new I(i,s,r,c);u.push(g),g.updateOccluded(y);const _=g.isOccluded;c?(_?d:m).push(i):(_?p:h).push(i)}this._projectionLines=u,this._cutProjectionLines.setGeometryFromSegments(m),this._occludedCutProjectionLines.setGeometryFromSegments(d),this._fillProjectionLines.setGeometryFromSegments(h),this._occludedFillProjectionLines.setGeometryFromSegments(p)}_updateProjectionLineOcclusion(e){const t=[],i=[],s=[],o=[];let r=!1,l=!1;for(const n of this._projectionLines){n.updateOccluded(e)&&(r||=n.isCut,l||=!n.isCut);const a=n.isOccluded;(n.isCut?a?i:t:a?o:s).push(n.segment)}l&&(this._fillProjectionLines.setGeometryFromSegments(s),this._occludedFillProjectionLines.setGeometryFromSegments(o)),r&&(this._cutProjectionLines.setGeometryFromSegments(t),this._occludedCutProjectionLines.setGeometryFromSegments(i))}_updateColors(e,i,s){const{geometryOutlineColor:o,cutColor:l,fillColor:n,cutColorMuted:a,fillColorMuted:c,cutProjectionLineColor:u,fillProjectionLineColor:m}=r;if(this._cutFillRenderNode.cutColor=s?l:a,this._cutFillRenderNode.fillColor=s?n:c,e){const e=t.toUnitRGBA(i);this._targetGeometry.color=e,this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e,this._fillProjectionLines.color=e,this._occludedFillProjectionLines.color=e,this._cutFillRenderNode.borderColor=i}else{this._targetGeometry.color=t.toUnitRGBA(o);const e=t.toUnitRGBA(s?u:a);this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e;const i=t.toUnitRGBA(s?m:c);this._fillProjectionLines.color=i,this._occludedFillProjectionLines.color=i,this._cutFillRenderNode.borderColor=o}}_updateLabels(e){const{labelDistance:t}=r,{effectiveDisplayUnits:i,labelAnchors:o,messages:l,unitsMessages:n,result:a,visible:c}=e;if(this._cutVolumeLabel.visible=c,this._fillVolumeLabel.visible=c,this._cutVolumeLabel.geometry=o.cut?{type:"point",point:o.cut,callout:{distance:t,offset:0}}:null,this._fillVolumeLabel.geometry=o.fill?{type:"point",point:o.fill,callout:{distance:-t,offset:0}}:null,null==a||null==l||null==n)return this._cutVolumeLabel.text="-",void(this._fillVolumeLabel.text="-");const u=i.volume,m=s(l.labels.cut,{volume:k(n,a.cutVolume,u)}),d=s(l.labels.fill,{volume:k(n,a.fillVolume,u)});this._cutVolumeLabel.text=m,this._fillVolumeLabel.text=d}_updateCutFillVisibility(e){e?this._cutFillRenderNode.enable():this._cutFillRenderNode.disable()}_updateCutFillGeometry(){const{renderCoordsHelper:e}=this.view,{targetGeometry:t}=this.analysisViewData;if(!t?.extent)return;const{center:i}=t.extent,s=w(i.x,i.y,0),o=C();e.toRenderCoords(s,t.spatialReference,o);const r=this._getExtrudedVolume(t,this._extrusionHeight,s,o),l=this._getExtrudedVolume(t,-this._extrusionHeight,s,o);this._cutFillRenderNode.updateGeometries(r,l,o)}_getExtrudedVolume(e,t,i,s){const{renderCoordsHelper:o,spatialReference:r,elevationProvider:l}=this.view,n=C(),a=1===o.viewingMode;o.worldUpAtPosition(s,n);const c=E(e,l,o,this._elevationContext),{polygons:u,mapPositions:m,position:d}=c,h=u[0],p=h.count,y=g(h.mapPositions,h.holeIndices,3),f=y.length,v=6*p,j=V(v+f),L=V(f),b=P(3*v),w=P(3*v);U(d,m,y,h,b,null,w,null,j,L,t,n,a);const R=_(),A=_();if(G(r,i,R,o.spatialReference),A[12]=-R[12],A[13]=-R[13],A[14]=-R[14],F(b,b,A),"stockpile"===this.analysis.measureType)for(let g=0;g<w.length;g+=3)w[g]=n[0],w[g+1]=n[1],w[g+2]=n[2];return new N(b,L,j,w)}async _updateMessageBundle(){this.loadingMessages=!0;try{this.unitsMessages=await o("esri/core/t9n/Units"),this.messages=await o("esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis")}finally{this.loadingMessages=!1}}};function k(e,t,i){if(!t||!e)return null;const s=h(t.value,t.unit,i),o=r.labelPrecisions[s];return u(e,t,s,o)}e([p({constructOnly:!0})],H.prototype,"view",void 0),e([p({constructOnly:!0})],H.prototype,"analysis",void 0),e([p({constructOnly:!0})],H.prototype,"analysisViewData",void 0),e([p()],H.prototype,"unitsMessages",void 0),e([p()],H.prototype,"messages",void 0),e([p()],H.prototype,"loadingMessages",void 0),e([p({readOnly:!0})],H.prototype,"visible",null),e([p()],H.prototype,"updating",null),e([p()],H.prototype,"hasUnsupportedError",null),H=e([y("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],H);class I{constructor(e,t,i,s){this.segment=e,this.previous=t,this.next=i,this.isCut=s,this._isOccluded=!1,this._n1=C(),this._n2=C();const o=v(z,j(z,e.endRenderSpace,e.startRenderSpace));v(this._n1,L(this._n1,o,v(W,j(W,t.startRenderSpace,e.startRenderSpace)))),v(this._n2,L(this._n2,o,v(W,j(W,e.startRenderSpace,i.startRenderSpace)))),this._isConvex=a.normalize(R(this._n1,this._n2,o))<0}get isOccluded(){return this._isOccluded}updateOccluded(e){j(z,this.segment.startRenderSpace,e.eye);const t=b(this._n1,z)<0,i=b(this._n2,z)<0,s=this._isOccluded;return this._isOccluded=this._isConvex?t&&i:t||i,this._isOccluded!==s}}const z=C(),W=C();export{H as VolumeMeasurementCutFillVisualization};
5
+ import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../../../intl.js";import{volumeMeasurementConfiguration as o}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import l from"../../../../core/Accessor.js";import{equals as r}from"../../../../core/arrayUtils.js";import{cyclicalPI as n}from"../../../../core/Cyclical.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{formatDecimal as c}from"../../../../core/quantityFormatUtils.js";import{watch as u,initial as m}from"../../../../core/reactiveUtils.js";import{adaptiveVolumeUnit as d}from"../../../../core/units.js";import{property as h,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{e as y}from"../../../../chunks/earcut.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as _,n as f,e as v,f as j,g as L}from"../../../../chunks/vec32.js";import{create as b,fromValues as C}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as w}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{newDoubleArray as G}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as P}from"../../../../geometry/support/Indices.js";import{angleAroundAxis as V}from"../../../../geometry/support/vector.js";import{t as R}from"../../../../chunks/vec3.js";import F from"../../../../symbols/support/ElevationInfo.js";import{LabelVisualElement as A}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as O}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as x}from"../../interactive/visualElements/OutlineVisualElement.js";import{EuclideanSegment as D}from"../../interactive/visualElements/support/Segment.js";import{ElevationContext as M}from"../../layers/graphics/ElevationContext.js";import{extrudePolygon as S}from"../../layers/graphics/Graphics3DExtrudeSymbolLayer.js";import{polygonToRenderInfo as U}from"../../support/renderInfoUtils/polygon.js";import{CutFillColor as E,VolumeGeometry as B}from"../../webgl-engine/lib/CutFillColor.js";import{createStipplePatternSimple as N}from"../../webgl-engine/materials/lineStippleUtils.js";let T=class extends l{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}get updating(){return this.loadingMessages}get hasUnsupportedError(){const{error:e}=this.analysisViewData;return!!e&&["unsupported-coordinate-system","unsupported-layer-transparency"].includes(e.name)}constructor(e){super(e),this.unitsMessages=null,this.messages=null,this.loadingMessages=!0,this._elevationContext=M.fromElevationInfo(new F({mode:"absolute-height"})),this._extrusionHeight=o.targetElevationRange,this._projectionLines=[]}initialize(){const{view:e}=this,i={view:e,isDecoration:!0},s=o,l={...i,width:s.geometryOutlineWidth};this._elevationAlignedGeometry=new x({...l,isDraped:!0,color:s.geometryOutlineColor.toUnitRGBA()}),this._targetGeometry=new x(l);const r={...i,attached:!0,width:s.projectionLineWidth,renderOccluded:4,polygonOffset:!0},n={...r,stipplePattern:N(s.projectionLineStippleSize)},a=s.cutProjectionLineColor.toUnitRGBA(),c=s.fillProjectionLineColor.toUnitRGBA();this._cutProjectionLines=new O({...r,color:a}),this._occludedCutProjectionLines=new O({...n,color:a}),this._fillProjectionLines=new O({...r,color:c}),this._occludedFillProjectionLines=new O({...n,color:c});const d={...i,attached:!0};this._cutVolumeLabel=new A(d),this._fillVolumeLabel=new A(d),this._cutFillRenderNode=new E({view:e,cutColor:s.cutColor,fillColor:s.fillColor,borderColor:s.geometryOutlineColor}),this.addHandles([u(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry}),({elevationAlignedGeometry:e,targetGeometry:t})=>{this._elevationAlignedGeometry.geometry=e,this._targetGeometry.geometry=t},m),u(()=>({interactive:this.analysisViewData.interactive,measureType:this.analysis.measureType,visible:this.visible}),({visible:e,interactive:t,measureType:i})=>{this._elevationAlignedGeometry.visible=e&&!t,this._targetGeometry.visible=e&&"cut-fill"===i,this._cutFillRenderNode.measureType=i},m),u(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry,visible:this.visible}),({elevationAlignedGeometry:e,targetGeometry:t,visible:i})=>this._updateProjectionLines(e,t,i),m),u(()=>({interactive:this.analysisViewData.interactive,accentColor:this.view.effectiveTheme.accentColor,hasResult:!!this.analysisViewData.result}),({interactive:e,accentColor:t,hasResult:i})=>{this._updateColors(e,t,i)},m),u(()=>this.analysisViewData.targetGeometry,()=>this._updateCutFillGeometry(),m),u(()=>this.visible&&!this.hasUnsupportedError,e=>this._updateCutFillVisibility(e),m),u(()=>{const{messages:e,unitsMessages:t,visible:i,analysisViewData:s}=this;return{labelAnchors:s.labelAnchors,effectiveDisplayUnits:s.effectiveDisplayUnits,messages:e,unitsMessages:t,result:s.result,visible:i&&!!s.result}},e=>this._updateLabels(e)),u(()=>this.view.state.camera,e=>this._updateProjectionLineOcclusion(e),m),t(()=>this._updateMessageBundle())]),this._updateMessageBundle()}destroy(){this._elevationAlignedGeometry=a(this._elevationAlignedGeometry),this._targetGeometry=a(this._targetGeometry),this._cutProjectionLines=a(this._cutProjectionLines),this._occludedCutProjectionLines=a(this._occludedCutProjectionLines),this._fillProjectionLines=a(this._fillProjectionLines),this._occludedFillProjectionLines=a(this._occludedFillProjectionLines),this._cutVolumeLabel=a(this._cutVolumeLabel),this._fillVolumeLabel=a(this._fillVolumeLabel),this._cutFillRenderNode.destroy()}_updateProjectionLines(e,t,i){if(this._cutProjectionLines.visible=i,this._occludedCutProjectionLines.visible=i,this._fillProjectionLines.visible=i,this._occludedFillProjectionLines.visible=i,!e||!t)return;const{renderCoordsHelper:s}=this.view,o=[],l=e.spatialReference,n=e.rings[0],a=n.length>1&&r(n[0],n[n.length-1]),c=n.length-(a?1:0);for(let r=0;r<c;++r){const e=n[r],i=_(b(),e[0],e[1],e[2]);s.toRenderCoords(i,l,i);const a=t.rings[0][r],c=_(b(),a[0],a[1],a[2]);s.toRenderCoords(c,l,c);const u=new D(i,c);o.push(u)}e.isClockwise(n)||o.reverse();const u=[],m=[],d=[],h=[],p=[],y=this.view.state.camera;for(let r=0;r<o.length;++r){const i=o[r],s=o[0===r?o.length-1:r-1],l=o[r===o.length-1?0:r+1],n=e.rings[0][r],a=t.rings[0][r],c=n[2]>a[2],g=new k(i,s,l,c);u.push(g),g.updateOccluded(y);const _=g.isOccluded;c?(_?d:m).push(i):(_?p:h).push(i)}this._projectionLines=u,this._cutProjectionLines.setGeometryFromSegments(m),this._occludedCutProjectionLines.setGeometryFromSegments(d),this._fillProjectionLines.setGeometryFromSegments(h),this._occludedFillProjectionLines.setGeometryFromSegments(p)}_updateProjectionLineOcclusion(e){const t=[],i=[],s=[],o=[];let l=!1,r=!1;for(const n of this._projectionLines){n.updateOccluded(e)&&(l||=n.isCut,r||=!n.isCut);const a=n.isOccluded;(n.isCut?a?i:t:a?o:s).push(n.segment)}r&&(this._fillProjectionLines.setGeometryFromSegments(s),this._occludedFillProjectionLines.setGeometryFromSegments(o)),l&&(this._cutProjectionLines.setGeometryFromSegments(t),this._occludedCutProjectionLines.setGeometryFromSegments(i))}_updateColors(e,t,i){const{geometryOutlineColor:s,cutColor:l,fillColor:r,cutColorMuted:n,fillColorMuted:a,cutProjectionLineColor:c,fillProjectionLineColor:u}=o;if(this._cutFillRenderNode.cutColor=i?l:n,this._cutFillRenderNode.fillColor=i?r:a,e){const e=t.toUnitRGBA();this._targetGeometry.color=e,this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e,this._fillProjectionLines.color=e,this._occludedFillProjectionLines.color=e,this._cutFillRenderNode.borderColor=t}else{this._targetGeometry.color=s.toUnitRGBA();const e=(i?c:n).toUnitRGBA();this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e;const t=(i?u:a).toUnitRGBA();this._fillProjectionLines.color=t,this._occludedFillProjectionLines.color=t,this._cutFillRenderNode.borderColor=s}}_updateLabels(e){const{labelDistance:t}=o,{effectiveDisplayUnits:s,labelAnchors:l,messages:r,unitsMessages:n,result:a,visible:c}=e;if(this._cutVolumeLabel.visible=c,this._fillVolumeLabel.visible=c,this._cutVolumeLabel.geometry=l.cut?{type:"point",point:l.cut,callout:{distance:t,offset:0}}:null,this._fillVolumeLabel.geometry=l.fill?{type:"point",point:l.fill,callout:{distance:-t,offset:0}}:null,null==a||null==r||null==n)return this._cutVolumeLabel.text="-",void(this._fillVolumeLabel.text="-");const u=s.volume,m=i(r.labels.cut,{volume:H(n,a.cutVolume,u)}),d=i(r.labels.fill,{volume:H(n,a.fillVolume,u)});this._cutVolumeLabel.text=m,this._fillVolumeLabel.text=d}_updateCutFillVisibility(e){e?this._cutFillRenderNode.enable():this._cutFillRenderNode.disable()}_updateCutFillGeometry(){const{renderCoordsHelper:e}=this.view,{targetGeometry:t}=this.analysisViewData;if(!t?.extent)return;const{center:i}=t.extent,s=C(i.x,i.y,0),o=b();e.toRenderCoords(s,t.spatialReference,o);const l=this._getExtrudedVolume(t,this._extrusionHeight,s,o),r=this._getExtrudedVolume(t,-this._extrusionHeight,s,o);this._cutFillRenderNode.updateGeometries(l,r,o)}_getExtrudedVolume(e,t,i,s){const{renderCoordsHelper:o,spatialReference:l,elevationProvider:r}=this.view,n=b(),a=1===o.viewingMode;o.worldUpAtPosition(s,n);const c=U(e,r,o,this._elevationContext),{polygons:u,mapPositions:m,position:d}=c,h=u[0],p=h.count,_=y(h.mapPositions,h.holeIndices,3),f=_.length,v=6*p,j=P(v+f),L=P(f),C=G(3*v),V=G(3*v);S(d,m,_,h,C,null,V,null,j,L,t,n,a);const F=g(),A=g();if(w(l,i,F,o.spatialReference),A[12]=-F[12],A[13]=-F[13],A[14]=-F[14],R(C,C,A),"stockpile"===this.analysis.measureType)for(let y=0;y<V.length;y+=3)V[y]=n[0],V[y+1]=n[1],V[y+2]=n[2];return new B(C,L,j,V)}async _updateMessageBundle(){this.loadingMessages=!0;try{this.unitsMessages=await s("esri/core/t9n/Units"),this.messages=await s("esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis")}finally{this.loadingMessages=!1}}};function H(e,t,i){if(!t||!e)return null;const s=d(t.value,t.unit,i),l=o.labelPrecisions[s];return c(e,t,s,l)}e([h({constructOnly:!0})],T.prototype,"view",void 0),e([h({constructOnly:!0})],T.prototype,"analysis",void 0),e([h({constructOnly:!0})],T.prototype,"analysisViewData",void 0),e([h()],T.prototype,"unitsMessages",void 0),e([h()],T.prototype,"messages",void 0),e([h()],T.prototype,"loadingMessages",void 0),e([h({readOnly:!0})],T.prototype,"visible",null),e([h()],T.prototype,"updating",null),e([h()],T.prototype,"hasUnsupportedError",null),T=e([p("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],T);class k{constructor(e,t,i,s){this.segment=e,this.previous=t,this.next=i,this.isCut=s,this._isOccluded=!1,this._n1=b(),this._n2=b();const o=f(I,v(I,e.endRenderSpace,e.startRenderSpace));f(this._n1,j(this._n1,o,f(z,v(z,t.startRenderSpace,e.startRenderSpace)))),f(this._n2,j(this._n2,o,f(z,v(z,e.startRenderSpace,i.startRenderSpace)))),this._isConvex=n.normalize(V(this._n1,this._n2,o))<0}get isOccluded(){return this._isOccluded}updateOccluded(e){v(I,this.segment.startRenderSpace,e.eye);const t=L(this._n1,I)<0,i=L(this._n2,I)<0,s=this._isOccluded;return this._isOccluded=this._isConvex?t&&i:t||i,this._isOccluded!==s}}const I=b(),z=b();export{T as VolumeMeasurementCutFillVisualization};
@@ -2,7 +2,7 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{create as e}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{earth as r}from"../../../geometry/support/Ellipsoid.js";import{Float2PassUniform as a}from"../webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3BindUniform as s}from"../webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float4PassUniform as i}from"../webgl-engine/core/shaderModules/Float4PassUniform.js";import{glsl as o}from"../webgl-engine/core/shaderModules/glsl.js";import{NoParameters as n}from"../../webgl/NoParameters.js";class c extends n{constructor(){super(...arguments),this.radii=e(),this.heightParameters=t()}}function h(e){e.code.add(o`float chapmanApproximation(float thickness, float height, float cosZenith) {
5
+ import{clamp as e}from"../../../core/mathUtils.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{F as r}from"../../../chunks/vec32.js";import{earth as s}from"../../../geometry/support/Ellipsoid.js";import{Float2PassUniform as a}from"../webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3BindUniform as o}from"../webgl-engine/core/shaderModules/Float3BindUniform.js";import{FloatsPassUniform as i}from"../webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as n}from"../webgl-engine/core/shaderModules/glsl.js";import{SphereIntersect as c}from"../webgl-engine/shaders/SphereIntersect.glsl.js";import{NoParameters as h}from"../../webgl/NoParameters.js";class l extends h{constructor(){super(...arguments),this.radii=t()}}function m(e){e.code.add(n`float chapmanApproximation(float thickness, float height, float cosZenith) {
6
6
  float c = sqrt(thickness + height);
7
7
  float cExpH = c * exp(-height);
8
8
  if (cosZenith >= 0.0) {
@@ -12,13 +12,12 @@ float x0 = sqrt(1.0 - cosZenith * cosZenith) * (thickness + height);
12
12
  float c0 = sqrt(x0);
13
13
  return 2.0 * c0 * exp(thickness - x0) - cExpH / (1.0 - c * cosZenith);
14
14
  }
15
- }`),e.constants.add("scaleHeight","float",r.scaleHeight*r.atmosphereHeight).uniforms.add(new a("radii",e=>e.radii)).code.add(o`float getOpticalDepth(vec3 position, vec3 dir, float h) {
15
+ }`),e.constants.add("scaleHeight","float",s.scaleHeight*s.atmosphereHeight).uniforms.add(new a("radii",e=>e.radii)).code.add(n`float getOpticalDepth(vec3 position, vec3 dir, float h) {
16
16
  return scaleHeight * chapmanApproximation(radii[0] / scaleHeight, h, dot(normalize(position), dir));
17
- }`),e.uniforms.add(new i("heightParameters",e=>e.heightParameters),new s("cameraPosition",e=>e.camera.eye)).code.add(o`vec4 planetIntersect(vec3 rayDir) {
18
- float reducedPlanetRadius = radii[0] - 20000.0;
19
- float rayPlanetDistance = heightParameters[1] - reducedPlanetRadius * reducedPlanetRadius;
20
- vec2 rayPlanetIntersect = sphereIntersect(cameraPosition, rayDir, rayPlanetDistance);
21
- vec2 rayAtmosphereIntersect = sphereIntersect(cameraPosition, rayDir, heightParameters[2]);
17
+ }`),e.include(c),e.constants.add("planetRadiusReduction","float",p).uniforms.add(new i("heightParameters",5,(e,t)=>d(t,e)),new o("cameraPosition",e=>e.camera.eye)).code.add(n`vec4 planetIntersect(vec3 rayDir) {
18
+ float rayPlanetDistanceReduced = heightParameters[4];
19
+ vec2 rayPlanetIntersect = sphereIntersect(cameraPosition, rayDir, rayPlanetDistanceReduced);
20
+ vec2 rayAtmosphereIntersect = sphereIntersect(cameraPosition, rayDir, heightParameters[1]);
22
21
  bool hitsAtmosphere = (rayAtmosphereIntersect.x <= rayAtmosphereIntersect.y) && rayAtmosphereIntersect.x > 0.0;
23
22
  bool insideAtmosphere = heightParameters[0] < radii[1];
24
23
  if (!hitsAtmosphere && !insideAtmosphere) {
@@ -26,12 +25,12 @@ return vec4(1.0, 0.0, 0.0, 0.0);
26
25
  }
27
26
  bool hitsPlanet = (rayPlanetIntersect.x <= rayPlanetIntersect.y) && rayPlanetIntersect.x > 0.0;
28
27
  float start = insideAtmosphere ? 0.0 : rayAtmosphereIntersect.x;
29
- if (heightParameters[0] < reducedPlanetRadius) {
30
- if (dot(rayDir, normalize(cameraPosition)) < -0.025) {
28
+ if (heightParameters[0] < radii[0] - planetRadiusReduction) {
29
+ if (dot(rayDir, normalize(cameraPosition)) < -0.01) {
31
30
  return vec4(1.0, 0.0, 0.0, 0.0);
32
31
  }
33
32
  start = rayPlanetIntersect.y;
34
33
  }
35
34
  float end = hitsPlanet ? rayPlanetIntersect.x : rayAtmosphereIntersect.y;
36
35
  return vec4(0.0, hitsPlanet ? 1.0 : 0.0, start, end);
37
- }`)}export{h as ChapmanApproximation,c as ChapmanApproximationParameters};
36
+ }`)}function d({camera:t},{radii:a}){const o=r(t.eye),i=Math.sqrt(o);return f[0]=i,f[1]=o-a[1]**2,f[2]=e((o-a[0])/s.atmosphereHeight,0,1),f[3]=o-a[0]**2,f[4]=o-(a[0]-p)**2,f}const p=2e4,f=new Array;export{m as ChapmanApproximation,l as ChapmanApproximationPassParameters,d as getHeightParameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"./ChapmanRaymarching.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import"../webgl-engine/core/shaderModules/Float2PassUniform.js";import"../webgl-engine/core/shaderModules/Float3BindUniform.js";import"../webgl-engine/core/shaderModules/Float3PassUniform.js";import"../webgl-engine/core/shaderModules/Float4PassUniform.js";import"../webgl-engine/core/shaderModules/FloatPassUniform.js";import"../webgl-engine/core/shaderModules/glsl.js";import"../webgl-engine/core/shaderModules/Texture2DBindUniform.js";import"../webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import"../webgl-engine/shaders/SphereIntersect.glsl.js";import"../webgl-engine/shaders/ToneMapping.glsl.js";import"../../webgl/ShaderBuilder.js";export{b as build}from"../../../chunks/ChapmanAtmosphere.glsl.js";
5
+ import"./ChapmanApproximation.glsl.js";import"./ChapmanRaymarching.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import"../webgl-engine/core/shaderModules/Float2PassUniform.js";import"../webgl-engine/core/shaderModules/Float3BindUniform.js";import"../webgl-engine/core/shaderModules/Float3PassUniform.js";import"../webgl-engine/core/shaderModules/Float4PassUniform.js";import"../webgl-engine/core/shaderModules/FloatPassUniform.js";import"../webgl-engine/core/shaderModules/FloatsPassUniform.js";import"../webgl-engine/core/shaderModules/glsl.js";import"../webgl-engine/core/shaderModules/Texture2DBindUniform.js";import"../webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import"../webgl-engine/shaders/SphereIntersect.glsl.js";import"../webgl-engine/shaders/ToneMapping.glsl.js";import"../../webgl/ShaderBuilder.js";export{b as build}from"../../../chunks/ChapmanAtmosphere.glsl.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{unitRGBAFromColor as t}from"../../../core/colorUtils.js";import{clamp as r,lerp as s}from"../../../core/mathUtils.js";import{disposeMaybe as i}from"../../../core/maybe.js";import{watch as a,syncAndInitial as o}from"../../../core/reactiveUtils.js";import{subclass as n}from"../../../core/accessorSupport/decorators.js";import{set as m}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{h,b as c,F as p}from"../../../chunks/vec32.js";import{c as d}from"../../../chunks/vec42.js";import{ZEROS as u}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{earth as f}from"../../../geometry/support/Ellipsoid.js";import{InternalRenderCategory as l}from"../webgl.js";import{innerAtmosphereDepth as g,computeInnerAltitudeFade as b}from"./atmosphereUtils.js";import{ChapmanAtmospherePassParameters as _,ChapmanAtmosphereTechnique as P}from"./ChapmanAtmosphereTechnique.js";import{ChapmanAtmosphereTechniqueConfiguration as w}from"./ChapmanAtmosphereTechniqueConfiguration.js";import{OpaqueEnvironment as j}from"../webgl-engine/effects/OpaqueEnvironment.js";import{createQuadVAO as v}from"../webgl-engine/lib/glUtil3D.js";import{applyTextureResizeModulo as q}from"../webgl-engine/lib/textureUtils.js";import{A}from"../../../chunks/AtmosphereCompositing.glsl.js";import{AtmosphereCompositingTechnique as T}from"../webgl-engine/shaders/AtmosphereCompositingTechnique.js";import{DepthStencilAttachment as x,PrimitiveType as C}from"../../webgl/enums.js";import y from"../../../webscene/background/ColorBackground.js";let M=class extends j{constructor(){super(...arguments),this.requireGeometryDepth=!0,this._compositingPassParameters=new A,this._vao=null,this._passParameters=new _,this._configuration=new w}initialize(){this.techniques.precompile(P,this._configuration),this.techniques.precompile(T),this._configuration.reduced=!0,this.techniques.precompile(P,this._configuration),this._configuration.reduced=!1,this.addHandles([a(()=>this.view.environment.background,e=>{const r=e instanceof y?t(e.color):u;h(this._passParameters.backgroundColor,r[0]*r[3],r[1]*r[3],r[2]*r[3])},o),a(()=>this.view.stage?.renderer?.highResolutionAtmosphere,e=>this._configuration.reduced=!e,o),a(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),o)])}destroy(){this._vao=i(this._vao)}render(e){const t=e.find(({name:e})=>e===l.OPAQUE_ENVIRONMENT);if(!this.bindParameters.mainDepth)return t;const r=this.renderingContext;this._vao??=v(r,1);const i=t.getAttachment(x);this._update();const a=this.techniques.get(P,this._configuration);if(!a.compiled)return this.requestRender(1),t;if(!this._configuration.reduced)return t.detachDepth(),r.bindFramebuffer(t.fbo),r.bindTechnique(a,this.bindParameters,this._passParameters),r.bindVAO(this._vao),r.drawArrays(C.TRIANGLE_STRIP,0,4),t.attachDepth(i),t;const o=this.techniques.get(T);if(!o.compiled)return this.requestRender(1),t;const n=r.getViewport(),m=this.bindParameters.camera,h=c(m.eye)-f.radius;let p;const d=f.atmosphereHeight;if(h<d){const e=Math.min(1,Math.max(0,h/d));p=s(.2,.3,e)}else{const e=Math.min(1,Math.max(0,(h-d)/(15*d)));p=s(.3,.6,e)}const u=this.renderingContext.parameters.maxTextureSize,g=q(Math.round(p*m.fullViewport[2]),u),b=q(Math.round(p*m.fullViewport[3]),u);r.setViewport(0,0,g,b);const _=this.fboCache.acquire(g,b,"chapman",5);return r.bindFramebuffer(_.fbo),r.clearFramebuffer([0,0,0,1],!0,!0),r.bindTechnique(a,this.bindParameters,this._passParameters),r.bindVAO(this._vao),r.drawArrays(C.TRIANGLE_STRIP,0,4),r.setViewport(n.x,n.y,n.width,n.height),this._compositingPassParameters.color=_.getTexture(),t.detachDepth(),r.bindFramebuffer(t.fbo),r.bindTechnique(o,this.bindParameters,this._compositingPassParameters),r.screen.draw(),t.attachDepth(i),_.release(),t}_update(){const e=this.bindParameters.camera,t=p(e.eye),s=Math.sqrt(t),i=t-this._passParameters.radii[1]**2,a=r((s-this._passParameters.radii[0])/f.atmosphereHeight,0,1);d(this._passParameters.heightParameters,s,t,i,a);const o=this.view.basemapTerrain?.getLowerBoundRadius()??0;m(this._passParameters.radii,o,o+f.atmosphereHeight),this._passParameters.innerFadeDistance=2*Math.sqrt((2*o-g)*g),this._passParameters.altitudeFade=b(s-o)}};M=e([n("esri.views.3d.environment.ChapmanAtmosphere")],M);export{M as ChapmanAtmosphere};
5
+ import{__decorate as e}from"tslib";import{lerp as t}from"../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../core/maybe.js";import{watch as s,syncAndInitial as i,initial as o}from"../../../core/reactiveUtils.js";import{subclass as a}from"../../../core/accessorSupport/decorators.js";import{set as n}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{h as m,b as h}from"../../../chunks/vec32.js";import{ZEROS as c}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{earth as p}from"../../../geometry/support/Ellipsoid.js";import{InternalRenderCategory as d}from"../webgl.js";import{computeInnerAltitudeFade as u,innerAtmosphereDepth as l}from"./atmosphereUtils.js";import{ChapmanAtmospherePassParameters as f,ChapmanAtmosphereTechnique as g}from"./ChapmanAtmosphereTechnique.js";import{ChapmanAtmosphereTechniqueConfiguration as b}from"./ChapmanAtmosphereTechniqueConfiguration.js";import{OpaqueEnvironment as _}from"../webgl-engine/effects/OpaqueEnvironment.js";import{createQuadVAO as w}from"../webgl-engine/lib/glUtil3D.js";import{applyTextureResizeModulo as P}from"../webgl-engine/lib/textureUtils.js";import{A as v}from"../../../chunks/AtmosphereCompositing.glsl.js";import{AtmosphereCompositingTechnique as j}from"../webgl-engine/shaders/AtmosphereCompositingTechnique.js";import{DepthStencilAttachment as q,PrimitiveType as A}from"../../webgl/enums.js";import T from"../../../webscene/background/ColorBackground.js";let x=class extends _{constructor(){super(...arguments),this.requireGeometryDepth=!0,this._compositingPassParameters=new v,this._vao=null,this._passParameters=new f,this._configuration=new b}initialize(){this.addHandles([s(()=>this.view.environment.background,e=>{const t=e instanceof T?e.color.toUnitRGBA():c;m(this._passParameters.backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3])},i),s(()=>this.view.stage?.renderer?.highResolutionAtmosphere,e=>this._configuration.reduced=!e,i),s(()=>this.view.map.ground.undergroundColor,e=>{this._passParameters.undergroundColor=e?.toUnitRGBA()??c,this.requestRender(1)},o),s(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),i)])}destroy(){this._vao=r(this._vao)}precompile(){this.techniques.precompile(g,this._configuration),this.techniques.precompile(j)}render(e){const r=e.find(({name:e})=>e===d.OPAQUE_ENVIRONMENT);if(!this.bindParameters.mainDepth)return r;const s=this.renderingContext;this._vao??=w(s,1);const i=r.getAttachment(q);this._update();const o=this.techniques.get(g,this._configuration);if(!o.compiled)return this.requestRender(1),r;if(!this._configuration.reduced)return r.detachDepth(),s.bindFramebuffer(r.fbo),s.bindTechnique(o,this.bindParameters,this._passParameters),s.bindVAO(this._vao),s.drawArrays(A.TRIANGLE_STRIP,0,4),r.attachDepth(i),r;const a=this.techniques.get(j);if(!a.compiled)return this.requestRender(1),r;const n=s.getViewport(),m=this.bindParameters.camera,c=h(m.eye)-p.radius;let u;const l=p.atmosphereHeight;if(c<l){const e=Math.min(1,Math.max(0,c/l));u=t(.2,.3,e)}else{const e=Math.min(1,Math.max(0,(c-l)/(15*l)));u=t(.3,.6,e)}const f=this.renderingContext.parameters.maxTextureSize,b=P(Math.round(u*m.fullViewport[2]),f),_=P(Math.round(u*m.fullViewport[3]),f);s.setViewport(0,0,b,_);const v=this.fboCache.acquire(b,_,"chapman",5);return s.bindFramebuffer(v.fbo),s.clearFramebuffer([0,0,0,1],!0,!0),s.bindTechnique(o,this.bindParameters,this._passParameters),s.bindVAO(this._vao),s.drawArrays(A.TRIANGLE_STRIP,0,4),s.setViewport(n.x,n.y,n.width,n.height),this._compositingPassParameters.color=v.getTexture(),r.detachDepth(),s.bindFramebuffer(r.fbo),s.bindTechnique(a,this.bindParameters,this._compositingPassParameters),s.screen.draw(),r.attachDepth(i),v.release(),r}_update(){const e=this.view.basemapTerrain?.getLowerBoundRadius()??0;n(this._passParameters.radii,e,e+p.atmosphereHeight);const t=h(this.bindParameters.camera.eye);this._passParameters.altitudeFade=u(t-e),this._passParameters.innerFadeDistance=2*Math.sqrt((2*e-l)*l)}};x=e([a("esri.views.3d.environment.ChapmanAtmosphere")],x);export{x as ChapmanAtmosphere};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ChapmanApproximationParameters as o}from"./ChapmanApproximation.glsl.js";import{C as s}from"../../../chunks/ChapmanAtmosphere.glsl.js";import{ReloadableShader as i}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Pos2TexF16 as a}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{makePipelineState as m,defaultColorWrite as c,copySource as l,simpleBlendingParams as p}from"../../webgl/renderState.js";import{fromLayout as h}from"../../webgl/VertexAttributeLocations.js";class d extends o{constructor(){super(...arguments),this.innerFadeDistance=0,this.altitudeFade=0,this.backgroundColor=t()}}let u=class extends n{constructor(e,r){super(e,r,h(a)),this.shader=new i(s,()=>import("./ChapmanAtmosphere.glsl.js"))}initializePipeline(e){return m({blending:e.reduced?l:p(770,771),depthTest:{func:e.reduced?519:515},colorWrite:c})}};u=e([r("esri.views.3d.environment.ChapmanAtmosphereTechnique")],u);export{d as ChapmanAtmospherePassParameters,u as ChapmanAtmosphereTechnique};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import{create as o}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ChapmanApproximationPassParameters as t}from"./ChapmanApproximation.glsl.js";import{C as i}from"../../../chunks/ChapmanAtmosphere.glsl.js";import{ReloadableShader as n}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as a}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Pos2TexF16 as m}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{makePipelineState as c,defaultColorWrite as l,copySource as p,simpleBlendingParams as d}from"../../webgl/renderState.js";class h extends t{constructor(){super(...arguments),this.innerFadeDistance=0,this.altitudeFade=0,this.backgroundColor=o(),this.undergroundColor=s()}}let u=class extends a{constructor(e,r){super(e,r,m),this.shader=new n(i,()=>import("./ChapmanAtmosphere.glsl.js"))}initializePipeline(e){return c({blending:e.reduced?p:d(770,771),depthTest:{func:e.reduced?519:515},colorWrite:l})}};u=e([r("esri.views.3d.environment.ChapmanAtmosphereTechnique")],u);export{h as ChapmanAtmospherePassParameters,u as ChapmanAtmosphereTechnique};