@arcgis/core 5.1.0-next.104 → 5.1.0-next.106

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 (461) hide show
  1. package/analysis/AreaMeasurementAnalysis.d.ts +5 -5
  2. package/analysis/DimensionAnalysis.d.ts +3 -3
  3. package/analysis/DimensionSimpleStyle.d.ts +2 -2
  4. package/analysis/DirectLineMeasurementAnalysis.d.ts +4 -4
  5. package/analysis/DistanceMeasurementAnalysis.d.ts +4 -4
  6. package/analysis/ElevationProfileAnalysis.d.ts +3 -3
  7. package/analysis/LengthDimension.d.ts +2 -2
  8. package/analysis/LineOfSightAnalysis.d.ts +4 -4
  9. package/analysis/ShadowCast/DiscreteOptions.d.ts +7 -3
  10. package/analysis/ShadowCast/MinDurationOptions.d.ts +5 -1
  11. package/analysis/ShadowCast/TotalDurationOptions.d.ts +7 -3
  12. package/analysis/ShadowCast/types.d.ts +1 -1
  13. package/analysis/ShadowCastAnalysis.d.ts +90 -66
  14. package/analysis/SliceAnalysis.d.ts +4 -4
  15. package/analysis/SlicePlane.d.ts +3 -3
  16. package/analysis/Viewshed.d.ts +2 -2
  17. package/analysis/ViewshedAnalysis.d.ts +3 -3
  18. package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +1 -1
  19. package/analysis/VolumeMeasurementAnalysis.d.ts +3 -3
  20. package/applications/Components/imageryUtils.d.ts +24 -0
  21. package/applications/Components/layerUtils.d.ts +21 -0
  22. package/applications/Components/layerUtils.js +2 -0
  23. package/applications/Components/templateUtils.d.ts +11 -1
  24. package/applications/Components/templateUtils.js +1 -1
  25. package/arcgisGlobal.d.ts +1 -0
  26. package/assets/components/assets/icon/buttons16.json +1 -0
  27. package/assets/components/assets/icon/buttons24.json +1 -0
  28. package/assets/components/assets/icon/buttons32.json +1 -0
  29. package/assets/components/assets/icon/entityTypes16.json +1 -0
  30. package/assets/components/assets/icon/entityTypes24.json +1 -0
  31. package/assets/components/assets/icon/entityTypes32.json +1 -0
  32. package/assets/esri/core/t9n/Units.json +1 -1
  33. package/assets/esri/core/t9n/Units_ar.json +1 -1
  34. package/assets/esri/core/t9n/Units_bg.json +1 -1
  35. package/assets/esri/core/t9n/Units_bs.json +1 -1
  36. package/assets/esri/core/t9n/Units_ca.json +1 -1
  37. package/assets/esri/core/t9n/Units_cs.json +1 -1
  38. package/assets/esri/core/t9n/Units_da.json +1 -1
  39. package/assets/esri/core/t9n/Units_de.json +1 -1
  40. package/assets/esri/core/t9n/Units_el.json +1 -1
  41. package/assets/esri/core/t9n/Units_en.json +1 -1
  42. package/assets/esri/core/t9n/Units_es.json +1 -1
  43. package/assets/esri/core/t9n/Units_et.json +1 -1
  44. package/assets/esri/core/t9n/Units_fi.json +1 -1
  45. package/assets/esri/core/t9n/Units_fr.json +1 -1
  46. package/assets/esri/core/t9n/Units_he.json +1 -1
  47. package/assets/esri/core/t9n/Units_hr.json +1 -1
  48. package/assets/esri/core/t9n/Units_hu.json +1 -1
  49. package/assets/esri/core/t9n/Units_id.json +1 -1
  50. package/assets/esri/core/t9n/Units_it.json +1 -1
  51. package/assets/esri/core/t9n/Units_ja.json +1 -1
  52. package/assets/esri/core/t9n/Units_ko.json +1 -1
  53. package/assets/esri/core/t9n/Units_lt.json +1 -1
  54. package/assets/esri/core/t9n/Units_lv.json +1 -1
  55. package/assets/esri/core/t9n/Units_nl.json +1 -1
  56. package/assets/esri/core/t9n/Units_no.json +1 -1
  57. package/assets/esri/core/t9n/Units_pl.json +1 -1
  58. package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
  59. package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
  60. package/assets/esri/core/t9n/Units_ro.json +1 -1
  61. package/assets/esri/core/t9n/Units_ru.json +1 -1
  62. package/assets/esri/core/t9n/Units_sk.json +1 -1
  63. package/assets/esri/core/t9n/Units_sl.json +1 -1
  64. package/assets/esri/core/t9n/Units_sr.json +1 -1
  65. package/assets/esri/core/t9n/Units_sv.json +1 -1
  66. package/assets/esri/core/t9n/Units_th.json +1 -1
  67. package/assets/esri/core/t9n/Units_tr.json +1 -1
  68. package/assets/esri/core/t9n/Units_uk.json +1 -1
  69. package/assets/esri/core/t9n/Units_vi.json +1 -1
  70. package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
  71. package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
  72. package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
  73. package/assets/esri/core/workers/RemoteClient.js +1 -1
  74. package/assets/esri/core/workers/chunks/01c70c27aa3a955e2928.js +262 -0
  75. package/assets/esri/core/workers/chunks/{7d571845292b1b7769c2.js → 065dd2fdc834146423c7.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{f5bd0a4f82df5e942b70.js → 093f27e4e4781870b431.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{2a5f6a8d282f2c391591.js → 15920af0c4f46773b06e.js} +1 -1
  78. package/assets/esri/core/workers/chunks/179c9fe4ac83b42e5976.js +1 -0
  79. package/assets/esri/core/workers/chunks/1d1929f98d941179be29.js +2 -0
  80. package/assets/esri/core/workers/chunks/{24247ee93f43fff5e596.js.LICENSE.txt → 1d1929f98d941179be29.js.LICENSE.txt} +1 -3
  81. package/assets/esri/core/workers/chunks/1ebb613bbe09fcf274d8.js +1 -0
  82. package/assets/esri/core/workers/chunks/24b43fb12fc3009fdc30.js +1 -0
  83. package/assets/esri/core/workers/chunks/2b9661700743d1f9717e.js +1 -0
  84. package/assets/esri/core/workers/chunks/2f0a3b22fc46d832e240.js +1 -0
  85. package/assets/esri/core/workers/chunks/340f2c996f62f7f5ceae.js +1 -0
  86. package/assets/esri/core/workers/chunks/466c250537415f12eb59.js +1 -0
  87. package/assets/esri/core/workers/chunks/549d348ca181d06aefb7.js +2 -0
  88. package/assets/esri/core/workers/chunks/{0cb8bc6dbbbe3b212712.js → 558606a1af22e4a0d536.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{7485d59d60d61737d662.js → 55b765c72d13b3b911f9.js} +1 -1
  90. package/assets/esri/core/workers/chunks/5cdf87e7a59ace38df87.js +1 -0
  91. package/assets/esri/core/workers/chunks/622bdd1b9d5d292ec12b.js +1 -0
  92. package/assets/esri/core/workers/chunks/{bff0c4094c14cb97b18f.js → 63ea4191d441efd2f146.js} +1 -1
  93. package/assets/esri/core/workers/chunks/69c9eb93553b006b640d.js +2 -0
  94. package/assets/esri/core/workers/chunks/6d20d741b8ae1a45b422.js +1 -0
  95. package/assets/esri/core/workers/chunks/{b63cbf6c2c9ec1b02b9a.js → 6e21675bbd7a44070771.js} +1 -1
  96. package/assets/esri/core/workers/chunks/702a3ef9e1b3442cbee7.js +1 -0
  97. package/assets/esri/core/workers/chunks/762e23466308f22d7076.js +1 -0
  98. package/assets/esri/core/workers/chunks/{52219561c144e5cb4442.js → 770611659b38066a6228.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{c476f4979048e558baa7.js → 7ce60331f94ee0a5d674.js} +57 -75
  100. package/assets/esri/core/workers/chunks/7e02e5c6979090fe3ea7.js +1 -0
  101. package/assets/esri/core/workers/chunks/825db2ea15308ee6e5dc.js +1 -0
  102. package/assets/esri/core/workers/chunks/{bf2c202dec5ab7bc770b.js → 829a0583b8a228c65379.js} +1 -1
  103. package/assets/esri/core/workers/chunks/8330302096d4312a4393.js +1 -0
  104. package/assets/esri/core/workers/chunks/885eac78a76184efa1e5.js +1 -0
  105. package/assets/esri/core/workers/chunks/{79dc7045d9a2d43ba8df.js → 890b7a1153b7f65eba9a.js} +1 -1
  106. package/assets/esri/core/workers/chunks/8a1751187a20b6578875.js +1 -0
  107. package/assets/esri/core/workers/chunks/{d610f517fb3c6cb24365.js → 8ade869fa9bae446266a.js} +1 -1
  108. package/assets/esri/core/workers/chunks/{44636ef119c6a576470b.js → 94eab215bab3e4e0e5b5.js} +1 -1
  109. package/assets/esri/core/workers/chunks/95dee5853c6e89f15ea9.js +1 -0
  110. package/assets/esri/core/workers/chunks/a5b9ae4c93f9af7589f2.js +1 -0
  111. package/assets/esri/core/workers/chunks/{95798e3de3419fdda6ac.js → a8ae00e06f98e04aee8e.js} +1 -1
  112. package/assets/esri/core/workers/chunks/aaad0d3e82ed917d3886.js +1 -0
  113. package/assets/esri/core/workers/chunks/b3e8ab68fc38306f13c6.js +1 -0
  114. package/assets/esri/core/workers/chunks/b7a81fd4994eabba1869.js +640 -0
  115. package/assets/esri/core/workers/chunks/{9542ef3f6c2bc7c14d85.js → b9850fe7dcdaed0c327c.js} +1 -1
  116. package/assets/esri/core/workers/chunks/{f7e386ece75afb6e4be5.js → bc249bb667f0564ad093.js} +1 -1
  117. package/assets/esri/core/workers/chunks/bd59cb5abc67e46f1b2c.js +2 -0
  118. package/assets/esri/core/workers/chunks/{f3a9100518b044e79501.js → be817be7c81fb630122f.js} +1 -1
  119. package/assets/esri/core/workers/chunks/{3c9482764c9e4f8bcbb0.js → c187bc997bad61b6c6e9.js} +1 -1
  120. package/assets/esri/core/workers/chunks/c4872cf3b71d00f450e1.js +1 -0
  121. package/assets/esri/core/workers/chunks/c5ab346a226df1894302.js +1 -0
  122. package/assets/esri/core/workers/chunks/{ce0c7070eeb723a718e7.js → d859c046a3ea42530bff.js} +1 -1
  123. package/assets/esri/core/workers/chunks/da29cf0e64065631a470.js +1 -0
  124. package/assets/esri/core/workers/chunks/{bb04aff0b4947408592c.js → dcba6c766eee8b90381a.js} +1 -1
  125. package/assets/esri/core/workers/chunks/ddebc1dc10a2d207389f.js +1 -0
  126. package/assets/esri/core/workers/chunks/e393fd61deb2e7f22ee6.js +1 -0
  127. package/assets/esri/core/workers/chunks/ea2bf7c543cc536400b7.js +30 -0
  128. package/assets/esri/core/workers/chunks/ece30bfd5c49b8d99752.js +1 -0
  129. package/assets/esri/core/workers/chunks/ecf4d07917efc97eb991.js +1 -0
  130. package/assets/esri/core/workers/chunks/ee56290e600cbeb25a00.js +1 -0
  131. package/assets/esri/core/workers/chunks/f52c6efc5a2abf5ac845.js +1 -0
  132. package/assets/esri/core/workers/chunks/{5cffc7b49966201eccdb.js → f75295cdd5e84eb97d5a.js} +1 -1
  133. package/assets/esri/core/workers/chunks/f7fe17a22390a24d6df8.js +2 -0
  134. package/assets/esri/core/workers/chunks/f9324420f2c6ac240f63.js +1 -0
  135. package/assets/esri/core/workers/chunks/{855bf811cd79b97c169a.js → fae2c8f053927559fff0.js} +1 -1
  136. package/assets/esri/core/workers/chunks/{64e268ebac0b62076f81.js → fbb23db01f3cf629d32e.js} +1 -1
  137. package/assets/esri/core/workers/chunks/fc1fe1f58a65a1694c09.js +1 -0
  138. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +84 -1
  139. package/assets/esri/themes/dark/main.css +1 -1
  140. package/assets/esri/themes/light/main.css +1 -1
  141. package/assets/esri/themes/light/view.css +1 -1
  142. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  143. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  144. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  145. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  146. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  147. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  148. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  149. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  150. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  151. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  152. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  153. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  154. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  155. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  156. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  157. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  158. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  159. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  160. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  161. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  162. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  163. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  164. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  165. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  166. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  167. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  168. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  169. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  170. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  171. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  172. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  173. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  174. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  175. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  176. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  177. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  178. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  179. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  180. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  181. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  182. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  183. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  184. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  185. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  186. package/chunks/ChapmanAtmosphere.glsl.js +14 -19
  187. package/chunks/ComponentShader.glsl.js +11 -15
  188. package/chunks/Compositing.glsl.js +4 -4
  189. package/chunks/GaussianSplatShadow.glsl.js +7 -7
  190. package/chunks/GlobalIllumination.glsl.js +27 -50
  191. package/chunks/GlobalIlluminationBlur.glsl.js +16 -11
  192. package/chunks/Terrain.glsl.js +1 -1
  193. package/config.js +1 -1
  194. package/core/ReactiveSet.js +1 -1
  195. package/core/generatorUtils.js +2 -0
  196. package/core/libs/gl-matrix-2/factories/vec2f64.js +1 -1
  197. package/core/libs/gl-matrix-2/math/vec2.js +1 -1
  198. package/core/mathUtils.js +1 -1
  199. package/core/typedArrayUtil.js +1 -1
  200. package/geometry/HeightModelInfo.js +1 -1
  201. package/geometry/geometryEngine.d.ts +2 -2
  202. package/geometry/support/buffer/BufferView.js +1 -1
  203. package/geometry/support/vcsData.js +1 -1
  204. package/geometry/support/vcsLookup.js +1 -1
  205. package/kernel.js +1 -1
  206. package/layers/DimensionLayer.d.ts +5 -5
  207. package/layers/FeatureLayer.d.ts +2 -2
  208. package/layers/GaussianSplatLayer.d.ts +3 -3
  209. package/layers/LineOfSightLayer.d.ts +5 -5
  210. package/layers/ParquetLayer.d.ts +6 -4
  211. package/layers/SubtypeGroupLayer.d.ts +2 -2
  212. package/layers/VideoLayer.js +1 -1
  213. package/layers/ViewshedLayer.d.ts +3 -3
  214. package/layers/graphics/sources/ParquetSource.js +1 -1
  215. package/layers/graphics/sources/parquet/FileProvider.js +2 -0
  216. package/layers/graphics/sources/parquet/PortalParquetFileProvider.js +2 -0
  217. package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +2 -0
  218. package/layers/graphics/sources/parquet/UrlsFileProvider.js +2 -0
  219. package/layers/graphics/sources/parquet/createFileProvider.js +2 -0
  220. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  221. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  222. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
  223. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  224. package/layers/knowledgeGraph/layerUtils.js +1 -1
  225. package/layers/orientedImagery/core/utils.js +1 -1
  226. package/layers/raster/datasets/ImageAuxRaster.js +1 -1
  227. package/layers/raster/datasets/pixelReader.js +1 -1
  228. package/layers/raster/formats/JpgPlus.js +1 -1
  229. package/layers/raster/formats/RasterCodec.js +1 -1
  230. package/layers/raster/functions/clipUtils.js +1 -1
  231. package/layers/support/AggregateField.d.ts +2 -1
  232. package/layers/support/LayerContingentValuesCache.js +1 -1
  233. package/layers/support/SubtypeSublayer.d.ts +4 -4
  234. package/layers/support/parquetUtils.d.ts +18 -7
  235. package/layers/support/parquetUtils.js +1 -1
  236. package/layers/support/rasterFunctionUtils.d.ts +2 -2
  237. package/layers/video/VideoController.js +1 -1
  238. package/libs/parquet/parquet.js +1 -1
  239. package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
  240. package/networks/CircuitManager.d.ts +3 -3
  241. package/networks/UnitIdentifierManager.d.ts +1 -1
  242. package/networks/UnitIdentifierManager.js +1 -1
  243. package/networks/UtilityNetwork.d.ts +2 -2
  244. package/networks/UtilityNetwork.js +1 -1
  245. package/networks/support/Circuit.d.ts +1 -1
  246. package/networks/support/CircuitLocation.d.ts +1 -1
  247. package/networks/support/CircuitSection.d.ts +1 -1
  248. package/networks/support/Subcircuit.d.ts +1 -1
  249. package/networks/support/TraceJobInfo.js +1 -1
  250. package/networks/support/jsonTypes.d.ts +10 -3
  251. package/package.json +3 -3
  252. package/popup/FieldInfo.d.ts +4 -2
  253. package/popup/support/FieldInfoFormat.d.ts +3 -2
  254. package/rest/featureService/FeatureService.d.ts +1 -1
  255. package/rest/knowledgeGraph/FieldIndex.d.ts +1 -1
  256. package/rest/knowledgeGraph/GraphObjectType.d.ts +2 -2
  257. package/rest/knowledgeGraph/GraphSearch.d.ts +1 -1
  258. package/rest/knowledgeGraph/GraphSearchStreaming.d.ts +1 -1
  259. package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +19 -1
  260. package/rest/networks/circuits/support/ExportCircuitsResult.js +1 -1
  261. package/rest/networks/circuits/support/VerifyCircuitsParameters.d.ts +18 -10
  262. package/rest/networks/circuits/support/VerifyCircuitsParameters.js +1 -1
  263. package/rest/networks/support/TraceParameters.js +1 -1
  264. package/rest/networks/support/TraceResult.js +1 -1
  265. package/rest/networks/trace.js +1 -1
  266. package/rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParameters.js +1 -1
  267. package/rest/support/AreasAndLengthsParameters.d.ts +1 -1
  268. package/rest/support/GeneralizeParameters.d.ts +1 -1
  269. package/rest/support/Query.d.ts +1 -1
  270. package/rest/support/RelationParameters.d.ts +1 -1
  271. package/rest/support/types.d.ts +1 -1
  272. package/support/revision.js +1 -1
  273. package/symbols/CIMSymbol.d.ts +1 -1
  274. package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +1 -0
  275. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  276. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  277. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  278. package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
  279. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  280. package/views/2d/layers/features/sources/strategies/chunks/ParquetSnapshotSourceChunk.js +1 -1
  281. package/views/2d/layers/features/sources/strategies/chunks/ParquetSourceChunk.js +1 -1
  282. package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +1 -0
  283. package/views/3d/analysis/DimensionAnalysisView3D.d.ts +7 -6
  284. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.d.ts +2 -0
  285. package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +2 -1
  286. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +14 -6
  287. package/views/3d/analysis/SliceAnalysisView3D.d.ts +4 -3
  288. package/views/3d/analysis/Viewshed/ViewshedDrawToolRenderer.js +2 -0
  289. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  290. package/views/3d/analysis/Viewshed/ViewshedInteractionVisuals.js +2 -0
  291. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +2 -0
  292. package/views/3d/analysis/Viewshed/ViewshedPlacementOperation.js +2 -0
  293. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +2 -0
  294. package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +2 -0
  295. package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +2 -0
  296. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  297. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  298. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  299. package/views/3d/analysis/Viewshed/ViewshedTool2.js +1 -1
  300. package/views/3d/analysis/Viewshed/analysisViewRegister.js +1 -1
  301. package/views/3d/analysis/Viewshed/placementUtils.js +2 -0
  302. package/views/3d/analysis/Viewshed/toolLifecycleUtils.js +2 -0
  303. package/views/3d/analysis/Viewshed/viewshedSubToolUtils.js +1 -1
  304. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  305. package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +4 -3
  306. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  307. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  308. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  309. package/views/3d/layers/FlowSubView3D.js +1 -1
  310. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  311. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  312. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  313. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  314. package/views/3d/layers/support/UVWorkspace.js +2 -0
  315. package/views/3d/layers/support/patternUtils.js +1 -1
  316. package/views/3d/layers/support/uvUtils.js +1 -1
  317. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  318. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  319. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  320. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  321. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  322. package/views/3d/support/meshProcessing.js +1 -1
  323. package/views/3d/terrain/TerrainRenderer.js +1 -1
  324. package/views/3d/terrain/TileCompositor.js +1 -1
  325. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  326. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  327. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +8 -8
  328. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +13 -9
  329. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +63 -49
  330. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  331. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.glsl.js +1 -1
  332. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
  333. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechnique.js +1 -1
  334. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  335. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  336. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  337. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  338. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  339. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
  340. package/views/3d/webgl-engine/lib/AttributeArray.js +1 -1
  341. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  342. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  343. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  344. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  345. package/views/3d/webgl-engine/lib/PathCapBuilder.js +1 -1
  346. package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
  347. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  348. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  349. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  350. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  351. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  352. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  353. package/views/3d/webgl-engine/materials/PathLayouts.js +2 -0
  354. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  355. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  356. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  357. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  358. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  359. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  360. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  361. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  362. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  363. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  364. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  365. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  366. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  367. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  368. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  369. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  370. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +2 -3
  371. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  372. package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +1 -1
  373. package/views/PopupView.d.ts +77 -1
  374. package/views/PopupView.js +1 -1
  375. package/views/layers/DimensionLayerView.d.ts +2 -1
  376. package/views/layers/FeatureLikeLayerView.js +1 -1
  377. package/views/layers/LineOfSightLayerView.d.ts +2 -1
  378. package/views/layers/ViewshedLayerView.d.ts +2 -1
  379. package/webscene/Slide.js +1 -1
  380. package/widgets/Attachments/types.d.ts +1 -1
  381. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +38 -5
  382. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  383. package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +2 -0
  384. package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
  385. package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
  386. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  387. package/widgets/BatchAttributeForm/css.js +1 -1
  388. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +11 -0
  389. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  390. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +77 -0
  391. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  392. package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +1 -1
  393. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  394. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  395. package/widgets/BatchAttributeForm/interfaceUtils.js +2 -0
  396. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  397. package/widgets/BatchAttributeForm/types.d.ts +30 -2
  398. package/widgets/BatchAttributeForm.d.ts +52 -1
  399. package/widgets/BatchAttributeForm.js +1 -1
  400. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  401. package/widgets/Editor.d.ts +1 -1
  402. package/widgets/FeatureTable/FieldColumn.js +1 -1
  403. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  404. package/widgets/LayerList/LayerListItem.js +1 -1
  405. package/widgets/OrientedImageryViewer/components/VideoEnhancementTools.js +1 -1
  406. package/widgets/OrientedImageryViewer.js +1 -1
  407. package/widgets/TableList/TableListViewModel.js +1 -1
  408. package/widgets/TimeSlider.d.ts +3 -3
  409. package/widgets/Track/TrackViewModel.d.ts +1 -0
  410. package/widgets/Track/TrackViewModel.js +1 -1
  411. package/widgets/Track.js +1 -1
  412. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +10 -0
  413. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  414. package/widgets/support/ContingentValuesManager.js +1 -1
  415. package/widgets/support/GeolocationPositioning.d.ts +1 -0
  416. package/widgets/support/GeolocationPositioning.js +1 -1
  417. package/widgets/support/forms/formUtils.js +1 -1
  418. package/assets/esri/core/workers/chunks/037b36d415ae27e987f9.js +0 -1
  419. package/assets/esri/core/workers/chunks/11b0d3a825fe50dd1e84.js +0 -1
  420. package/assets/esri/core/workers/chunks/1a3426276dc82a8a80f2.js +0 -1
  421. package/assets/esri/core/workers/chunks/1c83e61fd9a4f8fc8372.js +0 -1
  422. package/assets/esri/core/workers/chunks/1cb0c4fc315bbc2bd00b.js +0 -1
  423. package/assets/esri/core/workers/chunks/24247ee93f43fff5e596.js +0 -2
  424. package/assets/esri/core/workers/chunks/276cb6a1cdd26d0e1444.js +0 -1
  425. package/assets/esri/core/workers/chunks/29b00d07d3e1d095c590.js +0 -2
  426. package/assets/esri/core/workers/chunks/2f903bd3a2611e7f0946.js +0 -30
  427. package/assets/esri/core/workers/chunks/2fda38219d778f0447b5.js +0 -1
  428. package/assets/esri/core/workers/chunks/35fdd62277fd06468a29.js +0 -2
  429. package/assets/esri/core/workers/chunks/38d7430d2370b69334d7.js +0 -1
  430. package/assets/esri/core/workers/chunks/39d6032d79720935910d.js +0 -1
  431. package/assets/esri/core/workers/chunks/40caf5e09e4382d81104.js +0 -640
  432. package/assets/esri/core/workers/chunks/4213aa844900fcf95287.js +0 -1
  433. package/assets/esri/core/workers/chunks/594e1f633527749d92d7.js +0 -1
  434. package/assets/esri/core/workers/chunks/5dafd35801dca4229aed.js +0 -1
  435. package/assets/esri/core/workers/chunks/642be1619c0e76355cb6.js +0 -1
  436. package/assets/esri/core/workers/chunks/6d66dc77af8d112c33c6.js +0 -1
  437. package/assets/esri/core/workers/chunks/7b3642195d6d3ea9b830.js +0 -1
  438. package/assets/esri/core/workers/chunks/7e57029ec958f6423d5d.js +0 -2
  439. package/assets/esri/core/workers/chunks/8042e001545e2782499c.js +0 -1
  440. package/assets/esri/core/workers/chunks/881234f25c7814de8753.js +0 -1
  441. package/assets/esri/core/workers/chunks/8a7682071941c35f05c1.js +0 -1
  442. package/assets/esri/core/workers/chunks/8e986167d4a393ee41ea.js +0 -1
  443. package/assets/esri/core/workers/chunks/8fdd57e2a0af647f1e3e.js +0 -1
  444. package/assets/esri/core/workers/chunks/90ea570f6b6ce8ca693b.js +0 -1
  445. package/assets/esri/core/workers/chunks/9373daa677dc767d7cf0.js +0 -1
  446. package/assets/esri/core/workers/chunks/95df6d2ebacc43ac5fa3.js +0 -1
  447. package/assets/esri/core/workers/chunks/a02ebdcb802d128c8eee.js +0 -1
  448. package/assets/esri/core/workers/chunks/adf72d87f0114aeade0e.js +0 -1
  449. package/assets/esri/core/workers/chunks/b1a21a4d7d73ad7d0e47.js +0 -1
  450. package/assets/esri/core/workers/chunks/b75e090a7e935ff870a3.js +0 -1
  451. package/assets/esri/core/workers/chunks/bacf0c9d5d3e084dea61.js +0 -1
  452. package/assets/esri/core/workers/chunks/c0e4fd6fa1d765275248.js +0 -2
  453. package/assets/esri/core/workers/chunks/cc8d55d1830d7542c3f5.js +0 -262
  454. package/assets/esri/core/workers/chunks/cf3c0bee919bb509cd4f.js +0 -1
  455. package/assets/esri/core/workers/chunks/cfaa6e205bfc0c94a1b1.js +0 -1
  456. package/assets/esri/core/workers/chunks/dcb7a3ff59677b1cf0f1.js +0 -1
  457. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechniqueConfiguration.js +0 -2
  458. /package/assets/esri/core/workers/chunks/{7e57029ec958f6423d5d.js.LICENSE.txt → 549d348ca181d06aefb7.js.LICENSE.txt} +0 -0
  459. /package/assets/esri/core/workers/chunks/{29b00d07d3e1d095c590.js.LICENSE.txt → 69c9eb93553b006b640d.js.LICENSE.txt} +0 -0
  460. /package/assets/esri/core/workers/chunks/{35fdd62277fd06468a29.js.LICENSE.txt → bd59cb5abc67e46f1b2c.js.LICENSE.txt} +0 -0
  461. /package/assets/esri/core/workers/chunks/{c0e4fd6fa1d765275248.js.LICENSE.txt → f7fe17a22390a24d6df8.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import t from"../../../../../../core/Error.js";import{handlesGroup as e}from"../../../../../../core/handleUtils.js";import"../../../../../../core/has.js";import{getOrCreateMapValue as s}from"../../../../../../core/MapUtils.js";import{notDeepEqual as i}from"../../../../../../core/object.js";import{throwIfAborted as r,onAbort as a}from"../../../../../../core/promiseUtils.js";import{QueueProcessor as o}from"../../../../../../core/QueueProcessor.js";import{difference as l}from"../../../../../../core/SetUtils.js";import{openWithPorts as n}from"../../../../../../core/workers/workers.js";import{loadParquetModule as h}from"../../../../../../libs/parquet/loadParquetModule.js";import{ALoadStrategy as d}from"./ALoadStrategy.js";import{fetchQueueConcurrency as u}from"./constants.js";import{ParquetSourceChunk as c}from"./chunks/ParquetSourceChunk.js";import{FeatureSetReaderParquet as p}from"../../support/FeatureSetReaderParquet.js";const m=2,_=4;class f{constructor(t,s){this.subscription=t,this.chunks=[],this.ids=[],this._controller=new AbortController,this._handles=e([a(t.signal,()=>this._controller.abort()),a(s,()=>this._controller.abort())])}destroy(){this._controller.abort(),this._handles.remove()}get options(){return{signal:this._controller.signal}}addBinaryData(t){this.chunks.push(t)}addSourceChunkId(t){this.ids.push(t)}}class y extends d{constructor(t,e,s,i){if(super(t.metadata,e,s),this._service=t,this._loadStates=new Map,this._files=new Map,this._queue=new o({concurrency:u,process:t=>this._loadTile(t)}),!t.geometryInfo.displayOptimization)throw new Error("InternalError: ParquetTileLoadStrategy only supports XZ-enabled parquet files");this._loaded=this._load(i)}destroy(){super.destroy(),this._loaded.finally(()=>{this._client.close(),this._client=null;for(const t of this._ports)t.close()}).catch(()=>{})}get about(){return{willQueryAllFeatures:!0,willQueryFullResolutionGeometry:!0}}get availableFields(){return this._schema.partial.availableFields}get definitionExpression(){return this._schema.full.definitionExpression}async tryUpdate(e,s){await this._loaded;let r=!0;if(i(this.availableFields,s.availableFields)&&await this._updateFields(s.availableFields),i(this._schema.partial.urls,s.urls)){for(const t of s.urls)this._files.has(t)||(r=!1,await this._insert(t));for(const e of this._files.keys())if(!s.urls.includes(e))throw new t("unsupported","Removing parquet files is not supported",{previous:this._schema.partial.urls,next:s.urls})}return this._schema.partial=s,r}async load(t){return await this._loaded,s(this._loadStates,t.key.id,()=>new f(t,this._options)),this._queue.push(t)}unload(t){const e=this._loadStates.get(t.tile.id);if(null!=e){for(const t of e.ids)this.store.removeById(t);e.destroy(),this._loadStates.delete(t.tile.id)}}async _load(t){const e=this._schema.partial.urls;this._ports=await t.layerView.openMemoryPorts(),this._client=await n(this._ports,{maxNumberOfConcurrentJobs:20}),this._proxy=this._client.createInvokeProxy(),this._indexMap=await this._proxy.getIndexMap(),await Promise.all(e.map(t=>this._insert(t)))}async _insert(t){this._files.set(t,this._files.size)}_onOverride(){}async _updateFields(t){const e=new Set(t),s=l(e,new Set(this.availableFields));if(null!=this._service.metadata.fieldsIndex&&s.size){const t=Array.from(this.store.insertedChunks()).map(t=>t.updateFields(this._proxy,Array.from(s),this._options));await Promise.all(t)}}async _loadTile(t){const e=t.tile,s=t.signal,i=this._loadStates.get(e.id),a=new o({process:async e=>{const s=await this._proxy.getFileId(e);return this._downloadFileData(t,e,s)},concurrency:m});await Promise.allSettled(Array.from(this._files.keys()).map(t=>a.push(t))),r(s);const l=new c(this.metadata,null,e,null,null,0,!0);i.addSourceChunkId(l.chunkId),this.store.insert(l)}async _downloadFileData(t,e,s){const i=await h(),a=t.tile,o=t.signal,l=this._loadStates.get(a.id),n=await this._proxy.queryStream(e,{type:"tile",extent:a.extent,transform:a.normalizedTransform,outFields:Array.from(this.availableFields),returnGeometry:!0,outSpatialReference:this.metadata.outSpatialReference.toJSON(),scale:a.scale,where:this.definitionExpression},{signal:o});let d=0;const u=[],m=async(t=0)=>{const h=await this._proxy.getStreamNext(e,n,{signal:o});if(r(o),null==h)return;const u=i.ParquetChunk.deserialize(new Uint8Array(h)),_=new p(this.metadata,this._indexMap,u,s),f=new c(this.metadata,_,a,s,e,d++,!1);return l.addBinaryData({data:u,fileUrl:e}),l.addSourceChunkId(f.chunkId),this.store.insert(f),m(t+1)};for(let r=0;r<_;r++)u.push(m());await Promise.all(u)}}export{y as ParquetTileLoadStrategy};
2
+ import t from"../../../../../../core/Error.js";import{handlesGroup as e}from"../../../../../../core/handleUtils.js";import"../../../../../../core/has.js";import{getOrCreateMapValue as s}from"../../../../../../core/MapUtils.js";import{notDeepEqual as i}from"../../../../../../core/object.js";import{throwIfAborted as r,onAbort as a}from"../../../../../../core/promiseUtils.js";import{QueueProcessor as o}from"../../../../../../core/QueueProcessor.js";import{equals as l,difference as n}from"../../../../../../core/SetUtils.js";import{openWithPorts as d}from"../../../../../../core/workers/workers.js";import{loadParquetModule as h}from"../../../../../../libs/parquet/loadParquetModule.js";import{ALoadStrategy as c}from"./ALoadStrategy.js";import{fetchQueueConcurrency as u}from"./constants.js";import{ParquetSourceChunk as p}from"./chunks/ParquetSourceChunk.js";import{FeatureSetReaderParquet as m}from"../../support/FeatureSetReaderParquet.js";const _=2,f=4;class y{constructor(t,s){this.subscription=t,this.chunks=[],this.ids=[],this._controller=new AbortController,this._handles=e([a(t.signal,()=>this._controller.abort()),a(s,()=>this._controller.abort())])}destroy(){this._controller.abort(),this._handles.remove()}get options(){return{signal:this._controller.signal}}addBinaryData(t){this.chunks.push(t)}addSourceChunkId(t){this.ids.push(t)}}class w extends c{constructor(t,e,s,i){if(super(t.metadata,e,s),this._service=t,this._loadStates=new Map,this._fileIds=new Set,this._queue=new o({concurrency:u,process:t=>this._loadTile(t)}),!t.geometryInfo.displayOptimization)throw new Error("InternalError: ParquetTileLoadStrategy only supports XZ-enabled parquet files");this._loaded=this._load(i)}destroy(){super.destroy(),this._loaded.finally(()=>{this._client.close(),this._client=null;for(const t of this._ports)t.close()}).catch(()=>{})}get about(){return{willQueryAllFeatures:!0,willQueryFullResolutionGeometry:!0}}get availableFields(){return this._schema.partial.availableFields}get definitionExpression(){return this._schema.full.definitionExpression}async tryUpdate(e,s){await this._loaded;let r=!0;if(i(this.availableFields,s.availableFields)&&await this._updateFields(s.availableFields),this._schema.partial.dataSourceHash!==s.dataSourceHash){const e=new Set(await this._proxy.getFilesIds());if(!l(e,this._fileIds)){for(const t of e)this._fileIds.has(t)||(r=!1,this._insert(t));for(const s of this._fileIds.keys())if(!e.has(s))throw new t("unsupported","Removing parquet files is not supported",{previous:this._fileIds,next:e})}}return this._schema.partial=s,r}async load(t){return await this._loaded,s(this._loadStates,t.key.id,()=>new y(t,this._options)),this._queue.push(t)}unload(t){const e=this._loadStates.get(t.tile.id);if(null!=e){for(const t of e.ids)this.store.removeById(t);e.destroy(),this._loadStates.delete(t.tile.id)}}async _load(t){this._ports=await t.layerView.openMemoryPorts(),this._client=await d(this._ports,{maxNumberOfConcurrentJobs:20}),this._proxy=this._client.createInvokeProxy(),this._indexMap=await this._proxy.getIndexMap();const e=await this._proxy.getFilesIds();for(const s of e)this._insert(s)}_insert(t){this._fileIds.add(t)}_onOverride(){}async _updateFields(t){const e=new Set(t),s=n(e,new Set(this.availableFields));if(null!=this._service.metadata.fieldsIndex&&s.size){const t=Array.from(this.store.insertedChunks()).map(t=>t.updateFields(this._proxy,Array.from(s),this._options));await Promise.all(t)}}async _loadTile(t){const e=t.tile,s=t.signal,i=this._loadStates.get(e.id),a=new o({process:async e=>this._downloadFileData(t,e),concurrency:_});await Promise.allSettled(Array.from(this._fileIds.keys()).map(t=>a.push(t))),r(s);const l=new p(this.metadata,null,e,null,0,!0);i.addSourceChunkId(l.chunkId),this.store.insert(l)}async _downloadFileData(t,e){const s=await h(),i=t.tile,a=t.signal,o=this._loadStates.get(i.id),l=await this._proxy.queryStream(e,{type:"tile",extent:i.extent,transform:i.normalizedTransform,outFields:Array.from(this.availableFields),returnGeometry:!0,outSpatialReference:this.metadata.outSpatialReference.toJSON(),scale:i.scale,where:this.definitionExpression},{signal:a});let n=0;const d=[],c=async(t=0)=>{const d=await this._proxy.getStreamNext(e,l,{signal:a});if(r(a),null==d)return;const h=s.ParquetChunk.deserialize(new Uint8Array(d)),u=new m(this.metadata,this._indexMap,h,e),_=new p(this.metadata,u,i,e,n++,!1);return o.addBinaryData({data:h,fileId:e}),o.addSourceChunkId(_.chunkId),this.store.insert(_),c(t+1)};for(let r=0;r<f;r++)d.push(c());await Promise.all(d)}}export{w as ParquetTileLoadStrategy};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{ASourceChunk as e}from"./ASourceChunk.js";import{FeatureSetReaderJSON as t}from"../../../support/FeatureSetReaderJSON.js";class s extends e{constructor(e,t,s,r,i,n){super(),this._metadata=e,this._reader=t,this._page=s,this._end=r,this._fileIndex=i,this._fileUrl=n,this.chunkId=`${this._fileIndex}.${this._page}${this.end?"e":""}`,this.normalizedChunkId=this.chunkId}get reader(){return this._reader??t.empty(this._metadata)}get first(){return 0===this._page}get end(){return this._end}get queryInfo(){return{type:"snapshot",chunkId:this.chunkId,page:this._page,size:this.size(),end:this.end}}get isTiled(){return!1}async updateFields(e,t,s){return this._reader?.updateFields(e,this._fileUrl,t,s)}getTileReader(e){const t=this.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}export{s as ParquetSnapshotSourceChunk};
2
+ import{ASourceChunk as e}from"./ASourceChunk.js";import{FeatureSetReaderJSON as t}from"../../../support/FeatureSetReaderJSON.js";class s extends e{constructor(e,t,s,r,i){super(),this._metadata=e,this._reader=t,this._page=s,this._end=r,this._fileId=i,this.chunkId=`${this._fileId}.${this._page}${this.end?"e":""}`,this.normalizedChunkId=this.chunkId}get reader(){return this._reader??t.empty(this._metadata)}get first(){return 0===this._page}get end(){return this._end}get queryInfo(){return{type:"snapshot",chunkId:this.chunkId,page:this._page,size:this.size(),end:this.end}}get isTiled(){return!1}async updateFields(e,t,s){if(null!=this._fileId)return this._reader?.updateFields(e,this._fileId,t,s)}getTileReader(e){const t=this.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}export{s as ParquetSnapshotSourceChunk};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{ASourceChunk as e}from"./ASourceChunk.js";import{FeatureSetReaderJSON as t}from"../../../support/FeatureSetReaderJSON.js";class i extends e{constructor(e,t,i,r,s,d,h){super(),this._metadata=e,this._reader=t,this._tile=i,this._fileId=r,this._fileUrl=s,this._page=d,this._end=h,this.chunkId=`${this._tile.key.id}.${this._fileId}.${this._page}${this.end?"e":""}`,this.normalizedChunkId=`${this._tile.key.normalizedId}.${this._fileId}.${this._page}${this.end?"e":""}`}get reader(){return this._reader??t.empty(this._metadata)}get first(){return 0===this._page}get end(){return this._end}get tile(){return this._tile}get queryInfo(){return{type:"parquet",chunkId:this.chunkId,queryJSON:null,page:this._page,size:this.size(),tileId:this._tile.id,end:this.end}}get isTiled(){return!0}async updateFields(e,t,i){return this._reader?.updateFields(e,this._fileUrl,t,i)}getTileReader(e){return this._tile.key.id===e.key.id?this.reader:null}}export{i as ParquetSourceChunk};
2
+ import{ASourceChunk as e}from"./ASourceChunk.js";import{FeatureSetReaderJSON as t}from"../../../support/FeatureSetReaderJSON.js";class i extends e{constructor(e,t,i,s,r,d){super(),this._metadata=e,this._reader=t,this._tile=i,this._fileId=s,this._page=r,this._end=d,this.chunkId=`${this._tile.key.id}.${this._fileId}.${this._page}${this.end?"e":""}`,this.normalizedChunkId=`${this._tile.key.normalizedId}.${this._fileId}.${this._page}${this.end?"e":""}`}get reader(){return this._reader??t.empty(this._metadata)}get first(){return 0===this._page}get end(){return this._end}get tile(){return this._tile}get queryInfo(){return{type:"parquet",chunkId:this.chunkId,queryJSON:null,page:this._page,size:this.size(),tileId:this._tile.id,end:this.end}}get isTiled(){return!0}async updateFields(e,t,i){if(null!=this._fileId)return this._reader?.updateFields(e,this._fileId,t,i)}getTileReader(e){return this._tile.key.id===e.key.id?this.reader:null}}export{i as ParquetSourceChunk};
@@ -35,6 +35,7 @@ import type { AreaMeasurementPlacementResult, AreaMeasurementResult } from "../.
35
35
  * @see [Area Measurement 3D component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-area-measurement-3d/)
36
36
  * @see [Sample - Area measurement analysis object](https://developers.arcgis.com/javascript/latest/sample-code/analysis-area-measurement/)
37
37
  * @see [Sample - Analysis objects](https://developers.arcgis.com/javascript/latest/sample-code/analysis-objects/)
38
+ * @see [Async cancellation with AbortController](https://developers.arcgis.com/javascript/latest/async-cancellation-with-abortcontroller/)
38
39
  */
39
40
  export default abstract class AreaMeasurementAnalysisView3D extends AnalysisView3D {
40
41
  /**
@@ -27,11 +27,11 @@ export interface DimensionAnalysisView3DProperties extends Partial<Pick<Dimensio
27
27
  *
28
28
  * ```js
29
29
  * // create new analysis and add it to the view
30
- * const dimensionAnalysis = new DimensionAnalysis();
31
- * view.analyses.add(dimensionAnalysis);
30
+ * const analysis = new DimensionAnalysis();
31
+ * view.analyses.add(analysis);
32
32
  *
33
33
  * // retrieve analysis view for the analysis
34
- * const dimensionAnalysisView = await view.whenAnalysisView(dimensionAnalysis);
34
+ * const analysisView = await view.whenAnalysisView(analysis);
35
35
  * ```
36
36
  *
37
37
  * > [!WARNING]
@@ -50,6 +50,7 @@ export interface DimensionAnalysisView3DProperties extends Partial<Pick<Dimensio
50
50
  * @see [DimensionLayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/DimensionLayerView/)
51
51
  * @see [Sample - Length dimensioning](https://developers.arcgis.com/javascript/latest/sample-code/layers-dimension/)
52
52
  * @see [Sample - Analysis objects](https://developers.arcgis.com/javascript/latest/sample-code/analysis-objects/)
53
+ * @see [Async cancellation with AbortController](https://developers.arcgis.com/javascript/latest/async-cancellation-with-abortcontroller/)
53
54
  */
54
55
  export default class DimensionAnalysisView3D extends AnalysisView3D {
55
56
  constructor(properties?: DimensionAnalysisView3DProperties);
@@ -69,14 +70,14 @@ export default class DimensionAnalysisView3D extends AnalysisView3D {
69
70
  * so if the index of the dimension is known the collection can be indexed directly:
70
71
  *
71
72
  * ```js
72
- * const dimensionAnalysisView = await view.whenAnalysisView(dimensionAnalysis);
73
- * const result = dimensionAnalysisView.results.at(dimensionIdx);
73
+ * const analysisView = await view.whenAnalysisView(analysis);
74
+ * const result = analysisView.results.at(dimensionIdx);
74
75
  * ```
75
76
  *
76
77
  * Given a [dimension](https://developers.arcgis.com/javascript/latest/references/core/analysis/LengthDimension/) object, the results collection can also be searched:
77
78
  *
78
79
  * ```js
79
- * const result = dimensionAnalysisView.results.find((result) => result.dimension === dimensionObject);
80
+ * const result = analysisView.results.find((result) => result.dimension === dimensionObject);
80
81
  * ```
81
82
  */
82
83
  get results(): ReadonlyCollection<LengthDimensionResult>;
@@ -33,7 +33,9 @@ import type { DirectLineMeasurementAnalysisResult, DirectLineMeasurementPlacemen
33
33
  *
34
34
  * @see [DirectLineMeasurementAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/DirectLineMeasurementAnalysis/)
35
35
  * @see [Direct Line Measurement 3D component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-direct-line-measurement-3d/)
36
+ * @see [Sample - View themes](https://developers.arcgis.com/javascript/latest/sample-code/view-theme/)
36
37
  * @see [Sample - Analysis objects](https://developers.arcgis.com/javascript/latest/sample-code/analysis-objects/)
38
+ * @see [Async cancellation with AbortController](https://developers.arcgis.com/javascript/latest/async-cancellation-with-abortcontroller/)
37
39
  */
38
40
  export default abstract class DirectLineMeasurementAnalysisView3D extends AnalysisView3D {
39
41
  /**
@@ -33,6 +33,7 @@ import type { LineOfSightPlacementResult } from "./LineOfSight/types.js";
33
33
  * @see [Line Of Sight component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-line-of-sight/)
34
34
  * @see [Sample - Analysis objects](https://developers.arcgis.com/javascript/latest/sample-code/analysis-objects/)
35
35
  * @see [Sample - Line of sight component](https://developers.arcgis.com/javascript/latest/sample-code/line-of-sight/)
36
+ * @see [Async cancellation with AbortController](https://developers.arcgis.com/javascript/latest/async-cancellation-with-abortcontroller/)
36
37
  */
37
38
  export default abstract class LineOfSightAnalysisView3D extends AnalysisView3D {
38
39
  /**
@@ -61,7 +62,7 @@ export default abstract class LineOfSightAnalysisView3D extends AnalysisView3D {
61
62
  * indexed directly:
62
63
  *
63
64
  * ```js
64
- * const analysisView = await view.whenAnalysisView(lineOfSightAnalysis);
65
+ * const analysisView = await view.whenAnalysisView(analysis);
65
66
  * const result = analysisView.results.at(targetIdx);
66
67
  * ```
67
68
  *
@@ -7,10 +7,13 @@ import type { ScreenPoint } from "../../../core/types.js";
7
7
  * [SceneView.analyses](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#analyses).
8
8
  *
9
9
  * The ShadowCastAnalysisView3D is responsible for rendering a [ShadowCastAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/)
10
- * using custom visualizations. The [methods](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ShadowCastAnalysisView3D/#getDurationAtScreen)
11
- * on the analysis view provide developers with the ability to obtain the specific shadow or sunlight duration at a
10
+ * using custom visualizations. The [getDurationAtScreen()](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ShadowCastAnalysisView3D/#getDurationAtScreen) method
11
+ * on the analysis view provides developers with the ability to obtain the specific shadow or sunlight duration at a
12
12
  * certain [point](https://developers.arcgis.com/javascript/latest/references/core/core/types/#ScreenPoint) on the screen or to [disable](#interactive) the tooltip attached to the cursor.
13
13
  *
14
+ * This analysis view controls the shadow or sunlight overlay produced by [ShadowCastAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/). It does
15
+ * not control the scene's illumination. To change the scene lighting itself, use [SunLighting](https://developers.arcgis.com/javascript/latest/references/core/views/3d/environment/SunLighting/).
16
+ *
14
17
  * The view for an analysis can be retrieved using [SceneView.whenAnalysisView()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#whenAnalysisView)
15
18
  * similar to how layer views are retrieved for layers using [SceneView.whenLayerView()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#whenLayerView).
16
19
  * ```js
@@ -25,7 +28,9 @@ import type { ScreenPoint } from "../../../core/types.js";
25
28
  * @see [DiscreteOptions](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/DiscreteOptions/)
26
29
  * @see [MinDurationOptions](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/MinDurationOptions/)
27
30
  * @see [TotalDurationOptions](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/TotalDurationOptions/)
31
+ * @see [SunLighting](https://developers.arcgis.com/javascript/latest/references/core/views/3d/environment/SunLighting/)
28
32
  * @see [Sample - Shadow Cast analysis object](https://developers.arcgis.com/javascript/latest/sample-code/analysis-shadow-cast/)
33
+ * @see [Sample - Sunlight analysis](https://developers.arcgis.com/javascript/latest/sample-code/analysis-sunlight/)
29
34
  * @see [Sample - Analysis objects](https://developers.arcgis.com/javascript/latest/sample-code/analysis-objects/)
30
35
  * @see [Shadow Cast component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-shadow-cast/)
31
36
  */
@@ -37,7 +42,7 @@ export default abstract class ShadowCastAnalysisView3D extends AnalysisView3D {
37
42
  */
38
43
  get analysis(): ShadowCastAnalysis;
39
44
  /**
40
- * Displays the shadow tooltip attached to the cursor. Set to `false` to disable it.
45
+ * Displays the shadow or sunlight tooltip attached to the cursor. Set to `false` to disable it.
41
46
  *
42
47
  * @default true
43
48
  * @since 5.0
@@ -66,15 +71,17 @@ export default abstract class ShadowCastAnalysisView3D extends AnalysisView3D {
66
71
  */
67
72
  accessor visible: boolean;
68
73
  /**
69
- * Returns the time (in milliseconds) spent in shadow for a certain point on the screen. When
74
+ * Returns the duration (in milliseconds) for a certain point on the screen based on the current analysis settings.
75
+ * By default, this method returns the time spent in shadow. When
70
76
  * [ShadowCastAnalysis.visualizeSunlight](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/#visualizeSunlight) is `true`, this method returns the time spent in sunlight.
71
77
  *
72
- * @param point - The point on the screen for which shadow cast is calculated.
78
+ * @param point - The point on the screen for which the shadow or sunlight duration is calculated.
73
79
  * @returns A promise that resolves to the duration (in milliseconds) spent in shadow or sunlight for the given screen point.
74
80
  * @since 5.0
75
81
  * @example
82
+ * ```js
76
83
  * // use getDurationAtScreen method from the analysis view once available
77
- * const analysisView = await view.whenAnalysisView(shadowCastAnalysis);
84
+ * const analysisView = await view.whenAnalysisView(analysis);
78
85
  *
79
86
  * // get shadow or sunlight duration at the pointer location
80
87
  * view.on("pointer-move", async (event) => {
@@ -82,6 +89,7 @@ export default abstract class ShadowCastAnalysisView3D extends AnalysisView3D {
82
89
  * const duration = await analysisView.getDurationAtScreen({ x: event.x, y: event.y });
83
90
  * // ... do something with the duration
84
91
  * });
92
+ * ```
85
93
  */
86
94
  getDurationAtScreen(point: ScreenPoint): Promise<number>;
87
95
  }
@@ -24,15 +24,16 @@ import type { SlicePlacementResult } from "./Slice/types.js";
24
24
  *
25
25
  * ```js
26
26
  * // retrieve analysis view for analysis
27
- * const sliceAnalysis = new SliceAnalysis();
28
- * view.analyses.add(sliceAnalysis); // add to the scene view
29
- * const sliceAnalysisView = await view.whenAnalysisView(sliceAnalysis);
27
+ * const analysis = new SliceAnalysis();
28
+ * view.analyses.add(analysis); // add to the scene view
29
+ * const analysisView = await view.whenAnalysisView(analysis);
30
30
  * ```
31
31
  *
32
32
  * @see [SliceAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/SliceAnalysis/)
33
33
  * @see [SlicePlane](https://developers.arcgis.com/javascript/latest/references/core/analysis/SlicePlane/)
34
34
  * @see [Slice component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-slice/)
35
35
  * @see [Sample - Analysis objects](https://developers.arcgis.com/javascript/latest/sample-code/analysis-objects/)
36
+ * @see [Async cancellation with AbortController](https://developers.arcgis.com/javascript/latest/async-cancellation-with-abortcontroller/)
36
37
  */
37
38
  export default abstract class SliceAnalysisView3D extends AnalysisView3D {
38
39
  /**
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as t}from"tslib";import i from"../../../../core/Accessor.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import s from"../../../../core/ReactiveMap.js";import{property as o,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{copy as n}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ViewshedInteractionVisuals as l}from"./ViewshedInteractionVisuals.js";let c=class extends i{constructor(t){super(t),this._active=!1,this.analysisVisible=!0,this._visuals=new s,this._placementLocation=a(),this._hasPlacementLocation=!1,this._interactionVisuals=null}initialize(){this._interactionVisuals=new l({view:this.view})}destroy(){this._visuals.clear(),this._interactionVisuals=e(this._interactionVisuals)}get _interactionPoint(){let t=null;for(const i of this._visuals.values()){const e=u(i.geometry);if(null!=e){if("cursor"===i.role&&"active"===i.state)return e;("cursor"===i.role||null==t&&"outputGeometry"===i.role)&&(t=e)}}return t}activate(){this._active=!0,this._refreshInteractionVisuals()}deactivate(){this._active=!1,this._interactionVisuals?.setVisibility(!1)}addOrUpdateGraphic(t,i){}updatePlacementLocation(t){const i=null!=t;this._hasPlacementLocation=i,i&&n(this._placementLocation,t),this._refreshInteractionVisuals()}addOrUpdateVisual(t,i){this._visuals.set(t,p(i,this._visuals.get(t))),this._refreshInteractionVisuals()}removeGraphic(t){}removeVisual(t){this._visuals.delete(t),this._refreshInteractionVisuals()}hitTestVisualDistance(t,i){return null}_refreshInteractionVisuals(){const t=this._getInteractionLocation(m);this._interactionVisuals?.update({location:t,laserlineVisible:this._active&&this.analysisVisible})}_getInteractionLocation(t){if(this._hasPlacementLocation)return this._placementLocation;const i=this._interactionPoint;return null!=i&&this.view.renderCoordsHelper.toRenderCoords(i,t)?t:null}};function u(t){if(!t)return null;switch(t.type){case"point":return t;case"multipoint":return h(t);default:return null}}function h(t){return 0===t.points.length?null:t.getPoint(t.points.length-1)}function p(t,i={geometry:null,role:"outputGeometry",state:"idle"}){return{...i,...t}}t([o({constructOnly:!0})],c.prototype,"view",void 0),t([o()],c.prototype,"_active",void 0),t([o()],c.prototype,"analysisVisible",void 0),t([o()],c.prototype,"_interactionPoint",null),c=t([r("esri.views.3d.analysis.Viewshed.ViewshedDrawToolRenderer")],c);const m=a();export{c as ViewshedDrawToolRenderer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Collection.js";import"../../../../core/has.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{watch as o,sync as i,initial as l}from"../../../../core/reactiveUtils.js";import{property as n,subclass as a}from"../../../../core/accessorSupport/decorators.js";import{createSubToolHandles as r,findSubTool as d}from"./viewshedSubToolUtils.js";import{InteractiveToolBase as u}from"../../../interactive/InteractiveToolBase.js";import{sketchKeys as c}from"../../../interactive/keybindings.js";let h=class extends u{constructor(e){super(e),this.subToolHandles=new t,this._selectedManipulator=null}initialize(){this.subToolHandles=r({analysis:this.analysis,analysisViewData:this.analysisViewData,onBeforeSubToolRemove:e=>{this.selectedViewshed===e&&(this.selectedViewshed=null)},parentTool:this,view:this.view,viewshedComputedDataHandles:this.analysisViewData.viewshedComputedDataHandles}),this.addHandles([o(()=>this.firstGrabbedManipulator,e=>{null==e?this._selectedSubTool?.onManipulatorSelectionChanged():this.selectedViewshed=this._findSubTool(e)?.viewshed??null},i),o(()=>this.selectedViewshed,e=>this._syncSelectedManipulator(e),l)])}destroy(){this._selectManipulator(null),this.view.activeTool===this&&(this.view.activeTool=null),this.view.tools.includes(this)&&this.view.tools.remove(this),s(this.subToolHandles)}get updating(){return this.subToolHandles.some(({subTool:e})=>e.updating)}get cursor(){return null}get creating(){return!1}get isPlacingTarget(){return!1}get selectedViewshed(){return this.analysisViewData.selectedViewshed}set selectedViewshed(e){this.analysisViewData.selectedViewshed=e}get selectedViewshedComputedData(){return this._selectedSubTool?.viewshedComputedData}onManipulatorSelectionChanged(){this.subToolHandles.forEach(({subTool:e})=>e.onManipulatorSelectionChanged())}updateInteractionVisualsVisibility(e=!1){}onInputEvent(e){if("key-down"===e.type)this._onKeyDown(e)}_onKeyDown(e){if(c.cancel!==e.key)return;this.subToolHandles.some(({subTool:e})=>e.grabbing)||(this.selectedViewshed=null,e.stopPropagation())}get _selectedSubTool(){return this._findSubTool(this.selectedViewshed)}_findSubTool(e){return d(this.subToolHandles,e)}_selectManipulator(e){const t=this._selectedManipulator;t!==e&&(this._selectedManipulator=e,null!=t&&(t.selected=!1),null!=e&&(e.selected=!0),this._findSubTool(t)?.onManipulatorSelectionChanged(),this._selectedSubTool?.onManipulatorSelectionChanged())}_syncSelectedManipulator(e){if(null==e)return void this._selectManipulator(null);const t=this._selectedSubTool;if(null==t)return;const s=this._selectedManipulator,o=null!=s&&t.hasManipulator(s)?s:t.discManipulator;o!==s&&this._selectManipulator(o)}get test(){}};e([n({constructOnly:!0})],h.prototype,"analysis",void 0),e([n({constructOnly:!0})],h.prototype,"analysisViewData",void 0),e([n({constructOnly:!0})],h.prototype,"view",void 0),e([n()],h.prototype,"subToolHandles",void 0),e([n()],h.prototype,"_selectedManipulator",void 0),e([n()],h.prototype,"updating",null),e([n()],h.prototype,"cursor",null),e([n()],h.prototype,"creating",null),e([n()],h.prototype,"isPlacingTarget",null),e([n()],h.prototype,"selectedViewshed",null),e([n()],h.prototype,"selectedViewshedComputedData",null),e([n()],h.prototype,"_selectedSubTool",null),h=e([a("esri.views.3d.analysis.Viewshed.ViewshedEditTool")],h);export{h as ViewshedEditTool};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Collection.js";import"../../../../core/has.js";import{mapCollection as i}from"../../../../core/mapCollectionUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{watch as o,sync as n,initial as a}from"../../../../core/reactiveUtils.js";import{property as l,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ViewshedInteractionVisuals as d}from"./ViewshedInteractionVisuals.js";import{ViewshedSnappingController as c}from"./ViewshedSnappingController.js";import{ViewshedSubTool as u}from"./ViewshedSubTool.js";import{findSubTool as p}from"./viewshedSubToolUtils.js";import{InteractiveToolBase as h}from"../../../interactive/InteractiveToolBase.js";import{sketchKeys as g}from"../../../interactive/keybindings.js";let b=class extends h{constructor(e){super(e),this.subToolHandles=new t,this.removeIncompleteOnCancel=!1,this.automaticManipulatorSelection=!1,this.creating=!1,this.isPlacingTarget=!1,this._selectedManipulator=null}initialize(){this._interactionVisuals=new d({view:this.view}),this._snappingController=new c({view:this.view});const e=this.analysisViewData.viewshedComputedDataHandles;this.subToolHandles=i(()=>e,({viewshedComputedData:e})=>{const t=new u({analysis:this.analysis,analysisViewData:this.analysisViewData,parentTool:this,view:this.view,viewshedComputedData:e});return{subTool:t,remove:()=>{this.selectedViewshed===e.viewshed&&(this.selectedViewshed=null),t.destroy()}}}),this.addHandles([o(()=>this.firstGrabbedManipulator,e=>{if(null!=e){const t=this._findSubTool(e)?.viewshed;this.selectedViewshed=t,this._selectManipulator(e)}else this._selectedSubTool?.onManipulatorSelectionChanged()},n),o(()=>{const e=this.selectedViewshedComputedData;return null==e?null:{subTool:this._selectedSubTool,observer:e.elevationAlignedObserverRenderSpace,target:e.elevationAlignedTargetRenderSpace}},e=>{if(null==e)return;const{subTool:t,observer:i,target:s}=e;t?.moveInteractionState.dragging?this._updateInteractionVisualsLocation(i,!0):t?.scaleOrientInteractionState.dragging&&this._updateInteractionVisualsLocation(s,!1)},a),o(()=>this.analysisViewData.visible,()=>this.updateInteractionVisualsVisibility(),a),o(()=>this.selectedViewshed,e=>{const t=this._selectedManipulator,i=this._selectedSubTool;null==e?this._selectManipulator(null):null!=t&&i.hasManipulator(t)||this._selectManipulator(i.discManipulator)},a)])}destroy(){this._selectManipulator(null),s(this._interactionVisuals),s(this.subToolHandles),s(this._snappingController)}get updating(){return this.subToolHandles.some(({subTool:e})=>e.updating)||this._snappingController?.updating}get grabbing(){return this.subToolHandles.some(({subTool:e})=>e.grabbing)}get cursor(){return null}get selectedViewshed(){return this.analysisViewData.selectedViewshed}set selectedViewshed(e){this.analysisViewData.selectedViewshed=e}get selectedViewshedComputedData(){return this._selectedSubTool?.viewshedComputedData}onManipulatorSelectionChanged(){this.subToolHandles.forEach(({subTool:e})=>e.onManipulatorSelectionChanged())}updateInteractionVisualsVisibility(e=!1){const t=this._selectedSubTool,i=this.selectedViewshedComputedData;if(null==t||null==i)return void this._interactionVisuals?.setVisibility(!1);const s=t.moveInteractionState,o=e?s.grabbing:s.dragging,n=t.scaleOrientInteractionState,a=e?n.grabbing:n.dragging;if(!(this.analysisViewData.visible&&(o||a)))return void this._interactionVisuals?.setVisibility(!1);const l=o?i.elevationAlignedObserverRenderSpace:i.elevationAlignedTargetRenderSpace;this._interactionVisuals?.update({location:l,laserlineVisible:!0,verticalLineVisible:o,intersectsWorldUp:o})}createObserverMoveSnappingPipeline(e,t,i){return this._snappingController.createObserverMoveSnappingPipeline(e,t,i)}onInputEvent(e){switch(e.type){case"key-down":this._onKeyDown(e);break;case"hold":this.updateInteractionVisualsVisibility(!0)}}_updateInteractionVisualsLocation(e,t){this._interactionVisuals?.updateLocation(e,t)}_onKeyDown(e){g.cancel===e.key&&(this.grabbing||(this.selectedViewshed=null,e.stopPropagation()))}get _selectedSubTool(){return this._findSubTool(this.selectedViewshed)}_findSubTool(e){return p(this.subToolHandles,e)}_selectManipulator(e){const t=this._selectedManipulator;t!==e&&(this._selectedManipulator=e,null!=t&&(t.selected=!1),null!=e&&(e.selected=!0),this._findSubTool(t)?.onManipulatorSelectionChanged(),this._selectedSubTool?.onManipulatorSelectionChanged())}get test(){}};e([l({constructOnly:!0})],b.prototype,"analysis",void 0),e([l({constructOnly:!0})],b.prototype,"analysisViewData",void 0),e([l({constructOnly:!0})],b.prototype,"view",void 0),e([l()],b.prototype,"subToolHandles",void 0),e([l()],b.prototype,"removeIncompleteOnCancel",void 0),e([l()],b.prototype,"automaticManipulatorSelection",void 0),e([l()],b.prototype,"creating",void 0),e([l()],b.prototype,"isPlacingTarget",void 0),e([l()],b.prototype,"_selectedManipulator",void 0),e([l()],b.prototype,"_interactionVisuals",void 0),e([l()],b.prototype,"_snappingController",void 0),e([l()],b.prototype,"updating",null),e([l()],b.prototype,"grabbing",null),e([l()],b.prototype,"cursor",null),e([l()],b.prototype,"selectedViewshed",null),e([l()],b.prototype,"selectedViewshedComputedData",null),e([l()],b.prototype,"_selectedSubTool",null),b=e([r("esri.views.3d.analysis.Viewshed.ViewshedEditTool")],b);export{b as ViewshedEditTool};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{makeHandle as i}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{watch as s,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as n,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{Settings as r}from"../../interactive/editingTools/settings.js";import{ExtendedLineVisualElement as a}from"../../interactive/visualElements/ExtendedLineVisualElement.js";import{LaserlineVisualElement as c}from"../../interactive/visualElements/LaserlineVisualElement.js";const d=Symbol("visualElements");let h=class extends t{constructor(e){super(e),this._settings=new r({getTheme:()=>this.view.effectiveTheme}),this._visualElements=null}initialize(){this._createVisuals()}destroy(){this.removeHandles(d)}update({location:e,laserlineVisible:t,verticalLineVisible:i=!1,intersectsWorldUp:s=!1}){this.updateLocation(e,s),this.setVisibility(t,i)}updateLocation(e,t){const i=this._visualElements;if(null==i)return;const{laserline:s,verticalLine:l}=i;s.heightManifoldTarget=e,s.intersectsWorldUpAtLocation=t?e:null,null!=e&&l.setStartEndFromWorldDownAtLocation(e)}setVisibility(e,t=!1){const i=this._visualElements;null!=i&&(i.laserline.attached=e,i.verticalLine.attached=t)}get test(){}_createVisuals(){const e=this._settings.visualElements,t=new c({view:this.view,attached:!1,style:{glowWidth:e.heightPlane.glowWidth,innerWidth:e.heightPlane.innerWidth},isDecoration:!0}),n=new a({view:this.view,extensionType:e.zVerticalLine.extensionType,attached:!1,innerWidth:1,writeDepthEnabled:!1,renderOccluded:4,isDecoration:!0});this._visualElements={laserline:t,verticalLine:n},this.addHandles([s(()=>e.zVerticalLine,e=>e.apply(n),l),s(()=>e.heightPlane,e=>e.apply(t),l),i(()=>{t.destroy(),n.destroy(),this._visualElements=null})],d)}};e([n({constructOnly:!0})],h.prototype,"view",void 0),e([n()],h.prototype,"_settings",void 0),e([n()],h.prototype,"_visualElements",void 0),h=e([o("esri.views.3d.analysis.Viewshed.ViewshedInteractionVisuals")],h);export{h as ViewshedInteractionVisuals};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import t from"../../../../analysis/Viewshed.js";import i from"../../../../core/Accessor.js";import"../../../../core/has.js";import{createAbortError as a,throwIfAborted as o,onAbort as s}from"../../../../core/promiseUtils.js";import{watch as n,sync as r}from"../../../../core/reactiveUtils.js";import{property as l,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{createDrawTool as h,createPlacementResult as d}from"./placementUtils.js";import{detachToolFromView as p}from"./toolLifecycleUtils.js";import{creationElevationInfo as m}from"./ViewshedConfiguration.js";import _ from"./ViewshedPlacementOperation.js";import{createViewshedPlacementRootPluginConfiguration as u}from"./ViewshedPlacementRootPlugin.js";import{computeParametersFromTargetPoint as w}from"./viewshedToolUtils.js";import{Manipulator3D as v}from"../../interactive/Manipulator3D.js";import{ViewEventPriorities as P}from"../../../input/InputManager.js";import{sketchKeys as g}from"../../../interactive/keybindings.js";import y from"../../../interactive/sketch/SketchOptions.js";const O="multiple",b=new y({tooltips:{enabled:!0}}),C=Symbol("hiddenManipulatorHandle");let T=class extends i{constructor(e){super(e),this.placementMode=O,this.creationState=null,this.stagedViewshed=null,this._placeOperation=null,this._drawTool=null,this._renderer=null}initialize(){this.addHandles([this.view.on("key-down",e=>this._handleKeyDown(e),P.DEFAULT),n(()=>{const{stagedViewshed:e}=this;return{stagedViewshed:e,stagedViewshedInAnalysis:null!=e&&this.analysis.viewsheds.includes(e)}},({stagedViewshed:e,stagedViewshedInAnalysis:t})=>{null==e||t||this.analysis.viewsheds.add(e)},r)])}destroy(){this._cancelPlacementOperation()}get updating(){return!!this._drawTool?.updating}get active(){return!!this._drawTool?.active}startPlaceOperation(e,t){this._removeStaged(),this.creationState=null,this._rejectPlaceOperation(a()),o(t);const{resolve:i,reject:n,promise:r}=Promise.withResolvers(),l=s(t,()=>this._cancelPlacementOperation());return this._placeOperation=new _({abortHandle:l,reject:n,resolve:i}),this.place(e),r}place(e){this.callbacks.setSelectedViewshed(null),this.placementMode=e,this._startObserverPlacement()}cancelPlaceOperation(){null==this.creationState&&null==this._placeOperation||(this._cancelPlacementOperation(),this.callbacks.cancelTool())}_handleDeleteDuringCreation(){return null!=this.creationState&&(this._destroyDrawTool(),this._removeStaged(),this.callbacks.setSelectedViewshed(null),this._startObserverPlacement(),!0)}_handleKeyDown(e){null!=this.creationState&&(g.cancel===e.key?(this._handleCancelDuringCreation(),e.stopPropagation(),e.preventDefault()):g.delete.includes(e.key)&&(this._handleDeleteDuringCreation(),e.stopPropagation(),e.preventDefault()))}_handleCancelDuringCreation(){if(this._removeStaged()&&"multiple"===this.placementMode)return this.callbacks.setSelectedViewshed(null),void this._startObserverPlacement();this._destroyDrawTool(),this._abortCreation()}_removeStaged(){const{stagedViewshed:e}=this;return this.stagedViewshed=null,!!e&&(this.analysis.viewsheds.remove(e),!0)}_cancelPlacementOperation(){this._destroyDrawTool(),this._removeStaged(),this.creationState=null,this._finishPlaceOperation()}_abortCreation(){this.callbacks.cancelTool(),this.creationState=null,this._finishPlaceOperation()}_handleObserverPlacementComplete(e){const i=new t({observer:e.mapPoint.clone(),elevationInfo:m.clone(),feature:e.feature});this.analysis.viewsheds.add(i),this.stagedViewshed=i,this.creationState="placing-target",this._updateStagedViewshed(e.scenePoint),this.callbacks.setSelectedViewshed(null)}_onCancel(e){const t=this._removeStaged();return"placing-observer"===this.creationState?t&&"multiple"===this.placementMode?(this.callbacks.setSelectedViewshed(null),void this._startObserverPlacement()):(this._destroyDrawTool(e),void this._abortCreation()):t?(this.creationState="placing-observer",this.callbacks.setSelectedViewshed(null),void("multiple"!==this.placementMode?(this._destroyDrawTool(e),this._abortCreation()):this._startPointPlacement())):(this._destroyDrawTool(e),void this._abortCreation())}_handleTargetPlacementComplete(e){this._updateStagedViewshed(e.scenePoint);const t=this.stagedViewshed;this._placeOperation?.markPlacedViewshed(),this.stagedViewshed=null,this.callbacks.setSelectedViewshed(t),"multiple"!==this.placementMode||(this.creationState="placing-observer")}_handleTargetPlacementPreview(e){this._updateStagedViewshed(e.scenePoint)}_resolvePlaceOperation(){this._clearPlaceOperationAndRun(e=>e?.resolve())}_finishPlaceOperation(){this._clearPlaceOperationAndRun(e=>e?.finish())}_rejectPlaceOperation(e){this._clearPlaceOperationAndRun(t=>t?.reject(e))}_clearPlaceOperationAndRun(e){const t=this._placeOperation;this._placeOperation=null,e(t)}_startObserverPlacement(){this.creationState="placing-observer",this._startPointPlacement()}_startPointPlacement(){this._drawTool&&this._destroyDrawTool(this._drawTool);const{drawTool:e,intersector:t,renderer:i}=h({analysisViewData:this.analysisViewData,view:this.view,sketchOptions:b,onCancel:e=>this._onCancel(e),onComplete:e=>this._onComplete(e),onManipulatorCountChange:e=>this._onManipulatorCountChange(e)});this._drawTool=e,this._renderer=i;try{this.view.addAndActivateTool(e),e.begin([u({mode:this.placementMode,onObserverComplete:i=>this._onObserverMapPointComplete(e,t,i),onTargetComplete:i=>this._onTargetMapPointComplete(e,t,i),onTargetPreview:i=>this._onTargetMapPointPreview(e,t,i)})])}catch(a){this._destroyDrawTool(e),this._rejectPlaceOperation(a instanceof Error?a:new Error(String(a)))}}_onComplete(e){this._removeStaged(),this._resolvePlaceOperation(),this._destroyDrawTool(e),this.creationState=null}_onObserverMapPointComplete(e,t,i){const a=d({drawTool:e,intersector:t,mapPoint:i,view:this.view});a?(this._renderer?.updatePlacementLocation(a.scenePoint),this._handleObserverPlacementComplete(a)):this._onCancel(e)}_onTargetMapPointComplete(e,t,i){const a=d({drawTool:e,intersector:t,mapPoint:i,view:this.view});a?(this._renderer?.updatePlacementLocation(a.scenePoint),this._handleTargetPlacementComplete(a),"multiple"===this.placementMode&&this._renderer?.updatePlacementLocation(null)):this._onCancel(e)}_onTargetMapPointPreview(e,t,i){const a=d({drawTool:e,intersector:t,mapPoint:i,view:this.view});a&&(this._renderer?.updatePlacementLocation(a.scenePoint),this._handleTargetPlacementPreview(a))}_onManipulatorCountChange(e){e.removeHandles(C);const t=[];e.manipulators.forEach(({manipulator:e})=>{e instanceof v&&t.push(e.disableDisplay())}),e.addHandles(t,C)}_destroyDrawTool(e=this._drawTool){this._drawTool=null,this._renderer=null,e&&p(this.view,e)}_updateStagedViewshed(e){const t=this.stagedViewshed;if(!t)return;const i=this.callbacks.findViewshedComputedData(t);if(!i)return;const{heading:a,tilt:o,farDistance:s}=w(this.view,i,e);t.farDistance=s,t.tilt=o,t.heading=a}get test(){}};e([l({constructOnly:!0})],T.prototype,"analysis",void 0),e([l({constructOnly:!0})],T.prototype,"analysisViewData",void 0),e([l({constructOnly:!0})],T.prototype,"view",void 0),e([l({constructOnly:!0})],T.prototype,"callbacks",void 0),e([l()],T.prototype,"placementMode",void 0),e([l()],T.prototype,"creationState",void 0),e([l()],T.prototype,"stagedViewshed",void 0),e([l()],T.prototype,"_placeOperation",void 0),e([l()],T.prototype,"_drawTool",void 0),e([l()],T.prototype,"_renderer",void 0),e([l()],T.prototype,"updating",null),e([l()],T.prototype,"active",null),T=e([c("esri.views.3d.analysis.Viewshed.ViewshedPlacementController")],T);export{T as ViewshedPlacementController};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import s from"../../../../core/Accessor.js";import{createAbortError as r}from"../../../../core/promiseUtils.js";import{property as t,subclass as o}from"../../../../core/accessorSupport/decorators.js";let a=class extends s{constructor(e){super(),this.hasPlacedViewshed=!1,this._abortHandle=null,this._abortHandle=e.abortHandle,this._reject=e.reject,this._resolve=e.resolve}markPlacedViewshed(){this.hasPlacedViewshed=!0}reject(e){this._clearAbortHandle(),this._reject(e)}resolve(){this._clearAbortHandle(),this._resolve()}finish(){this.hasPlacedViewshed?this.resolve():this.reject(r())}_clearAbortHandle(){this._abortHandle?.remove(),this._abortHandle=null}};e([t()],a.prototype,"hasPlacedViewshed",void 0),e([t()],a.prototype,"_abortHandle",void 0),a=e([o("esri.views.3d.analysis.Viewshed.ViewshedPlacementOperation")],a);export{a as default};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as t}from"tslib";import{watch as e,sync as i}from"../../../../core/reactiveUtils.js";import{property as o,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{PluginBase as n}from"../../../draw/plugins/PluginBase.js";var a;const p=Symbol("viewshed-placement-point-plugin-marker");let r=class extends n{static{a=p}constructor(t){super(t),this[a]=!0,this.defaultCaptureMode="capture-always",this.inputMapPosition=null,this.outputMapPosition=null,this.hasCommittedPoint=!1,this._vertexId=Symbol("viewshed-placement-point-vertex")}start(t){super.start(t);const{positionOfLastUserInput:e,session:i}=t,o=this._getInitialMapPoint(e);!o||"grabbable-object"!==this.defaultCaptureMode&&this._interactiveHandle||(i.appendOrReplacePoint(this._vertexId,o),this.outputMapPosition=o.clone()),this._ensureInteractiveHandle(t,o)}completeStep(){this.hasCommittedPoint=!0,this._context?.requestComplete()}_ensureInteractiveHandle(t,o){this._interactiveHandle||(this._interactiveHandle=t.createInteractiveHandle({defaultCaptureMode:this.defaultCaptureMode,inputMapPosition:"grabbable-object"===this.defaultCaptureMode?o:void 0}),this.addHandles(e(()=>this._interactiveHandle?.outputMapPosition,t=>{this.outputMapPosition=t?.clone(),t&&!this._isComplete&&this._session?.appendOrReplacePoint(this._vertexId,t)},i),this._ownHandlesKey))}_getInitialMapPoint(t){return"grabbable-object"===this.defaultCaptureMode?this.inputMapPosition??this._interactiveHandle?.outputMapPosition??t:this.inputMapPosition??t}};function d(t){return{uniqueId:Symbol(`viewshed-${t}-plugin`),kind:["vertex"],geometryType:"point",hidden:!0,localizationKey:"leaf-point-segment",icon:"point",create:()=>new r({step:t})}}t([o({constructOnly:!0})],r.prototype,"step",void 0),t([o()],r.prototype,"defaultCaptureMode",void 0),t([o()],r.prototype,"inputMapPosition",void 0),t([o()],r.prototype,"outputMapPosition",void 0),t([o()],r.prototype,"hasCommittedPoint",void 0),t([o()],r.prototype,"_interactiveHandle",void 0),r=t([s("esri.views.3d.analysis.Viewshed.ViewshedPlacementPointPlugin")],r);export{r as ViewshedPlacementPointPlugin,d as createViewshedPlacementPointPluginConfiguration};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as t}from"tslib";import{watch as e,sync as o}from"../../../../core/reactiveUtils.js";import{property as s,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{createViewshedPlacementPointPluginConfiguration as i}from"./ViewshedPlacementPointPlugin.js";import{PluginBase as n}from"../../../draw/plugins/PluginBase.js";let l=class extends n{constructor(t){super(t),this._downstreamPlugin=null,this._step="observer"}start(t){super.start(t),t.session.appendOrReplacePart(null,[]),this._restartDownstreamPlugin()}beforeAttachPlugin(t){return{geometryType:"point",useStandaloneSession:!0}}beforeComplete(){return{downstreamPluginCompletionMode:"target"===this._step&&this._downstreamPlugin?.hasCommittedPoint?"complete":"cancel"}}attachPlugin(t){this._downstreamPlugin=t,"target"===t.step&&this.addHandles([e(()=>t.outputMapPosition,t=>{null==t||this._isComplete||this.onTargetPreview(t)},o)],this._downstreamHandlesKey)}detachPlugin(t,e){if(this._downstreamPlugin===t&&(this._downstreamPlugin=null),this.removeHandles(this._downstreamHandlesKey),"complete"!==e)return;const o=t.outputMapPosition;if(null!=o){if("observer"===t.step)return this.onObserverComplete(o),this._step="target",void this._restartDownstreamPlugin();if(this.onTargetComplete(o),"multiple"===this.mode)return this._step="observer",void this._restartDownstreamPlugin();this._context?.requestComplete()}}_restartDownstreamPlugin(){const t=i(this._step);this._context?.requestBeginDownstreamPlugin(t,{cancelExisting:!0})}};function a(t){return{uniqueId:Symbol("viewshed-placement-root-plugin"),kind:["multipart"],geometryType:"multipoint",hidden:!0,localizationKey:"viewshed-root",icon:"point",create:()=>new l(t)}}t([s({constructOnly:!0})],l.prototype,"mode",void 0),t([s({constructOnly:!0})],l.prototype,"onObserverComplete",void 0),t([s({constructOnly:!0})],l.prototype,"onTargetComplete",void 0),t([s({constructOnly:!0})],l.prototype,"onTargetPreview",void 0),t([s()],l.prototype,"_downstreamPlugin",void 0),t([s()],l.prototype,"_step",void 0),l=t([r("esri.views.3d.analysis.Viewshed.ViewshedPlacementRootPlugin")],l);export{a as createViewshedPlacementRootPluginConfiguration};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as n}from"tslib";import e from"../../../../core/Accessor.js";import{property as t,subclass as i}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as a}from"../../../../core/support/UpdatingHandles.js";import{absoluteHeightElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{SnappingVisualizer3D as r}from"../../interactive/SnappingVisualizer3D.js";import{SnappingContext as s}from"../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as o}from"../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquire as g}from"../../../interactive/snapping/SnappingManagerPool.js";let l=class extends e{constructor(n){super(n),this._updatingHandles=new a,this._snappingManagerResult=null}get updating(){return this._updatingHandles.updating||!!this._snappingManager?.updating}get _snappingManager(){return this._snappingManagerResult?.snappingManager}destroy(){this._updatingHandles.destroy()}createObserverMoveSnappingPipeline(n,e,t){if(0!==n)return null;const i=new s({elevationInfo:p,pointer:t,editGeometryOperations:e,visualizer:new r});return o({snappingContext:i,snappingManager:this._ensureSnappingManager(),updatingHandles:this._updatingHandles})}_ensureSnappingManager(){if(null==this._snappingManagerResult){const n=g(this.view);this._snappingManagerResult=n,this.addHandles(n)}return this._snappingManagerResult.snappingManager}};n([t({constructOnly:!0})],l.prototype,"view",void 0),n([t()],l.prototype,"updating",null),n([t()],l.prototype,"_snappingManager",null),n([t()],l.prototype,"_snappingManagerResult",void 0),l=n([i("esri.views.3d.analysis.Viewshed.ViewshedSnappingController")],l);export{l as ViewshedSnappingController};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import i from"../../../../core/Accessor.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{createTask as a}from"../../../../core/asyncUtils.js";import{cyclicalDegrees as n,Cyclical as o}from"../../../../core/Cyclical.js";import{handlesGroup as r}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{deg2rad as s}from"../../../../core/mathUtils.js";import{abortMaybe as l,destroyMaybe as p}from"../../../../core/maybe.js";import{after as h,throwIfAborted as u}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as c,initial as v}from"../../../../core/reactiveUtils.js";import{property as m,subclass as g}from"../../../../core/accessorSupport/decorators.js";import{sub as f,len as M,dot as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{tryProject as w}from"../../../../geometry/projectionUtils.js";import{viewingModeFromString as O}from"../../../ViewingMode.js";import{viewshedToolManipulatorConfiguration as V}from"./ViewshedConfiguration.js";import{ViewshedFieldOfViewManipulation as y,isSideHorizontal as T,flipSide as D}from"./ViewshedFieldOfViewManipulation.js";import{ViewshedScaleOrientManipulation as H}from"./ViewshedScaleOrientManipulation.js";import{ViewshedObserverManipulator as C}from"./viewshedToolManipulatorUtils.js";import{discRadiusSmall as j}from"../../interactive/editingTools/manipulations/config.js";import{MoveManipulation as F}from"../../interactive/editingTools/manipulations/MoveManipulation.js";import{resetProperties as S,dragManipulatedObject as A}from"../../../interactive/dragEventPipeline.js";import{EditGeometryOperations as P}from"../../../interactive/editGeometry/EditGeometryOperations.js";const k=Symbol("dragHandles"),x=Symbol("hideManipulators"),E=Symbol("hideFoVManipulators"),z=Symbol("hideObserverManipulator");let U=class extends i{constructor(e){super(e),this._moveManipulation=null,this._observerManipulator=null,this._fieldOfViewManipulation=null,this._scaleOrientManipulation=null,this._forceHoveringTask=null,this._forceHoveringTestPromise=null,this._grabbing=!1,this.viewshedComputedData=null}initialize(){this._moveManipulation=this._createMoveManipulation(),this._fieldOfViewManipulation=new y({view:this.view,tool:this.parentTool}),this._scaleOrientManipulation=new H({view:this.view,tool:this.parentTool}),this._observerManipulator=new C(this.view,this.parentTool),this.addHandles([d(()=>this.elevationAlignedObserverRenderSpace,e=>{null!=e&&(this._moveManipulation.renderLocation=e,this._observerManipulator.renderLocation=e)},c),d(()=>this.viewshedComputedData?.heading,e=>{e&&(this._moveManipulation.angle=s(90-e))},v),d(()=>{const{viewshedComputedData:e}=this;return{viewshedComputedData:e,observer:this.elevationAlignedObserverRenderSpace}},({viewshedComputedData:e,observer:i},a)=>{this._grabbing&&i!==a?.observer||(this.removeHandles(k),e?.valid&&this.addHandles([this._buildObserverDragPipeline(e),this._buildFOVDragPipeline(e),this._buildScaleOrientDragPipeline(e)].filter(t),k))},v),d(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,target:e.elevationAlignedTargetRenderSpace,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorsTransform(e.viewshedCompData)},v),d(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView,tilt:e.tilt}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorVisuals(e.viewshedCompData)},v),d(()=>{const e=this.analysisViewData.visible&&(this.viewshedComputedData?.valid??!1),i=this.parentTool.selectedViewshedComputedData===this.viewshedComputedData;return{fovManipulationAvailable:e&&!this.parentTool.isPlacingTarget,nonFOVManipulationAvailable:e&&(!this.parentTool.creating||i)}},({fovManipulationAvailable:e,nonFOVManipulationAvailable:i})=>{this._moveManipulation.available=i,this._scaleOrientManipulation.available=i,this._observerManipulator.available=i,this._fieldOfViewManipulation.available=e},v),d(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const{observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}=e;return{viewshedCompData:e,observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}},e=>{null!=e&&this._scaleOrientManipulation.updateManipulators(e.viewshedCompData)},v)]);const e=e=>{this.addHandles([e.events.on("focus-changed",()=>{const e=this._someManipulatorHovering();e&&this.parentTool.subToolHandles.forEach(({subTool:e})=>{e._resetHoveringTask()}),this._someManipulatorSelected()||e||(this._forceHoveringTask=a(async e=>{await(this._forceHoveringTestPromise??h(V.hoverTimeoutMilliseconds,e)),u(e),this._forceHoveringTask=null,this._updateManipulatorVisibility()}))}),e.events.on("grab-changed",i=>{this._grabbing="start"===i.action,"end"===i.action&&this.parentTool.updateInteractionVisualsVisibility(),this.parentTool.subToolHandles.forEach(({subTool:e})=>{e!==this&&e._setInteractive(!this._grabbing)}),this._setInteractive(i=>i.hasManipulator(e)||!this._grabbing)}),e.events.on("drag",e=>{"start"===e.action&&this.parentTool.updateInteractionVisualsVisibility()})])};this._forEachManipulator(e)}destroy(){this._forceHoveringTask=l(this._forceHoveringTask),this._moveManipulation=p(this._moveManipulation),this._fieldOfViewManipulation=p(this._fieldOfViewManipulation),this._scaleOrientManipulation=p(this._scaleOrientManipulation),this.parentTool.manipulators.remove(this._observerManipulator),this._observerManipulator=p(this._observerManipulator)}get updating(){return null!=this._forceHoveringTask&&!this._forceHoveringTask.finished}get viewshed(){return this.viewshedComputedData?.viewshed}get grabbing(){return this._grabbing}get observer(){return this.viewshed?.observer}set observer(e){const i=this.viewshed;null!=i&&(i.observer=e)}get elevationAlignedObserverRenderSpace(){return this.viewshedComputedData?.elevationAlignedObserverRenderSpace}get discManipulator(){return this._moveManipulation.xyManipulation.discManipulator}get moveInteractionState(){const{dragging:e,grabbing:i}=this._moveManipulation;return{dragging:e,grabbing:i}}get scaleOrientInteractionState(){const{dragging:e,grabbing:i}=this._scaleOrientManipulation;return{dragging:e,grabbing:i}}_setInteractive(e){const i="boolean"==typeof e;this._forEachManipulation(t=>t.interactive=i?e:e(t))}onManipulatorSelectionChanged(){if(this._updateManipulatorVisibility(),!this._someManipulatorSelected()){this.analysisViewData.selectedViewshed===this.viewshed&&(this.analysisViewData.selectedViewshed=null),this._resetHoveringTask()}}hasManipulator(e){let i=!1;return this._forEachManipulator(t=>{i=i||t===e}),i}_someManipulatorSelected(){return this._moveManipulation.selected||this._fieldOfViewManipulation.selected||this._scaleOrientManipulation.selected}_someManipulatorHovering(){return this._moveManipulation.hovering||this._fieldOfViewManipulation.hovering||this._scaleOrientManipulation.hovering}_createMoveManipulation(){return new F({view:this.view,tool:this.parentTool,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:j})}_buildObserverDragPipeline(e){const i={mode:"absolute-height",offset:0},t=e.observer;if(null==t)return null;const a=this.view.spatialReference;return this._moveManipulation.createDragPipeline((e,i,n,o,r)=>{o=o.next(S(this,["observer"]));const s=w(t,a);if(null==s)return{steps:n,cancel:o};const l=P.fromGeometry(s,O(this.view.viewingMode));return{steps:n.next(A({operations:l})).next(e=>(this.observer=l.data.geometry,e)),cancel:o}},i,a,void 0)}_buildFOVDragPipeline(e){let i=0,t=0;return this._fieldOfViewManipulation.createDragPipeline((a,o,r)=>{if(null==e)return{steps:o,cancel:r};const s=e.viewshed;let l=null;r=r.next(S(s,["horizontalFieldOfView","verticalFieldOfView"]));return{steps:o.next(a=>{"start"===a.action&&(l=null,i=e.horizontalFieldOfView,t=e.verticalFieldOfView);const o=a.deltaAngle;if(null==l&&0!==o){const e="bottom"===a.side||"left"===a.side?o>0:o<0;l=T(a.side)?0===i&&e||360===i&&!e:0===t&&e}const r=l?D(a.side):a.side;let p=0;switch(r){case"left":p=i/2-o;break;case"right":p=i/2+o;break;case"top":p=t+2*o;break;case"bottom":p=t-2*o}return T(r)?(p=n.normalize(p),p=p>270?0:p>180?180:p,s.horizontalFieldOfView=2*p):s.verticalFieldOfView=p,a}),cancel:r}},e)}_buildScaleOrientDragPipeline(e){let i=0,t=0;const a=(i,t)=>(a,n,o)=>{if(null==e)return{steps:n,cancel:o};const r=e.viewshed;return o=o.next(S(r,[i])),{steps:n=n.next(t(r,e)),cancel:o}};return r([this._scaleOrientManipulation.createHeadingDragPipeline(a("heading",(i,a)=>a=>("start"===a.action&&(t=e.heading),i.heading=n.normalize(t+a.deltaAngle),a)),e),this._scaleOrientManipulation.createTiltDragPipeline(a("tilt",(t,a)=>a=>{"start"===a.action&&(i=e.tilt);let n=i+a.deltaAngle;return n<-90?n=180:n>270&&(n=0),t.tilt=I.clamp(n),a}),e),this._scaleOrientManipulation.createDistanceDragPipeline(a("farDistance",(e,i)=>t=>{const a=f(R,t.renderEnd,i.elevationAlignedObserverRenderSpace),n=M(a)*i.metersPerUnit,o=b(a,i.targetDirection)<0?V.scaleOrientMinDistance:n;return e.farDistance=o,t}),e)])}_updateManipulatorVisibility(){const e=this._someManipulatorSelected(),i=null!=this._forceHoveringTask||this._someManipulatorHovering(),t=this._fieldOfViewManipulation.hovering,a=this.parentTool.creating;let n=[];const o=e=>{n.push(e.disableDisplay())};e||!a&&i?this.removeHandles(x):(this._scaleOrientManipulation.forEachManipulator(o),this._moveManipulation.forEachManipulator(o),this.addHandles(n,x),n=[]),e||!a&&i||a&&t?this.removeHandles(E):(this._fieldOfViewManipulation.forEachManipulator(o),this.addHandles(n,E)),e||!a?this.removeHandles(z):this.addHandles(this._observerManipulator.disableDisplay(),z)}_resetHoveringTask(){this._forceHoveringTask=l(this._forceHoveringTask),this._updateManipulatorVisibility()}_forEachManipulator(e){this._forEachManipulation(i=>{i.forEachManipulator(e)}),e(this._observerManipulator)}_forEachManipulation(e){e(this._moveManipulation),e(this._fieldOfViewManipulation),e(this._scaleOrientManipulation)}get test(){return{moveManipulation:this._moveManipulation,fieldOfViewManipulation:this._fieldOfViewManipulation,scaleOrientManipulation:this._scaleOrientManipulation,viewshedComputedData:this.viewshedComputedData,setHoveringTimeoutPromise:e=>{this._forceHoveringTestPromise=e}}}};e([m({constructOnly:!0})],U.prototype,"analysis",void 0),e([m({constructOnly:!0})],U.prototype,"analysisViewData",void 0),e([m({constructOnly:!0})],U.prototype,"parentTool",void 0),e([m({constructOnly:!0,nonNullable:!0})],U.prototype,"view",void 0),e([m()],U.prototype,"_forceHoveringTask",void 0),e([m()],U.prototype,"updating",null),e([m()],U.prototype,"viewshed",null),e([m()],U.prototype,"_grabbing",void 0),e([m()],U.prototype,"grabbing",null),e([m()],U.prototype,"viewshedComputedData",void 0),e([m()],U.prototype,"observer",null),e([m()],U.prototype,"elevationAlignedObserverRenderSpace",null),U=e([g("esri.views.3d.analysis.Viewshed.ViewshedSubTool")],U);const R=_(),I=new o(0,180);export{U as ViewshedSubTool};
2
+ import{__decorate as e}from"tslib";import i from"../../../../core/Accessor.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{createTask as a}from"../../../../core/asyncUtils.js";import{cyclicalDegrees as n,Cyclical as o}from"../../../../core/Cyclical.js";import{handlesGroup as r}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{deg2rad as s}from"../../../../core/mathUtils.js";import{abortMaybe as l,destroyMaybe as p}from"../../../../core/maybe.js";import{after as h,throwIfAborted as u}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as c,initial as v}from"../../../../core/reactiveUtils.js";import{property as g,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{sub as f,len as b,dot as M}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{tryProject as w}from"../../../../geometry/projectionUtils.js";import{viewingModeFromString as O}from"../../../ViewingMode.js";import{viewshedToolManipulatorConfiguration as V}from"./ViewshedConfiguration.js";import{ViewshedFieldOfViewManipulation as y,isSideHorizontal as T,flipSide as D}from"./ViewshedFieldOfViewManipulation.js";import{ViewshedScaleOrientManipulation as H}from"./ViewshedScaleOrientManipulation.js";import{ViewshedObserverManipulator as S}from"./viewshedToolManipulatorUtils.js";import{discRadiusSmall as C}from"../../interactive/editingTools/manipulations/config.js";import{MoveManipulation as j}from"../../interactive/editingTools/manipulations/MoveManipulation.js";import{resetProperties as F,sceneSnappingAtLocation as x,dragManipulatedObject as A}from"../../../interactive/dragEventPipeline.js";import{EditGeometryOperations as P}from"../../../interactive/editGeometry/EditGeometryOperations.js";const k=Symbol("dragHandles"),E=Symbol("hideManipulators"),z=Symbol("hideFoVManipulators"),U=Symbol("hideObserverManipulator");let R=class extends i{constructor(e){super(e),this._moveManipulation=null,this._observerManipulator=null,this._fieldOfViewManipulation=null,this._scaleOrientManipulation=null,this._forceHoveringTask=null,this._forceHoveringTestPromise=null,this._grabbing=!1,this.viewshedComputedData=null}initialize(){this._moveManipulation=this._createMoveManipulation(),this._fieldOfViewManipulation=new y({view:this.view,tool:this.parentTool}),this._scaleOrientManipulation=new H({view:this.view,tool:this.parentTool}),this._observerManipulator=new S(this.view,this.parentTool),this.addHandles([d(()=>this.elevationAlignedObserverRenderSpace,e=>{null!=e&&(this._moveManipulation.renderLocation=e,this._observerManipulator.renderLocation=e)},c),d(()=>this.viewshedComputedData?.heading,e=>{e&&(this._moveManipulation.angle=s(90-e))},v),d(()=>{const{viewshedComputedData:e}=this;return{viewshedComputedData:e,observer:this.elevationAlignedObserverRenderSpace}},({viewshedComputedData:e,observer:i},a)=>{this._grabbing&&i!==a?.observer||(this.removeHandles(k),e?.valid&&this.addHandles([this._buildObserverDragPipeline(e),this._buildFOVDragPipeline(e),this._buildScaleOrientDragPipeline(e)].filter(t),k))},v),d(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,target:e.elevationAlignedTargetRenderSpace,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorsTransform(e.viewshedCompData)},v),d(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView,tilt:e.tilt}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorVisuals(e.viewshedCompData)},v),d(()=>{const e=this.analysisViewData.visible&&(this.viewshedComputedData?.valid??!1),i=this.parentTool.selectedViewshedComputedData===this.viewshedComputedData,{creating:t,isPlacingTarget:a}=this.parentTool;return{fovManipulationAvailable:e&&!a,nonFOVManipulationAvailable:e&&(!t||i)}},({fovManipulationAvailable:e,nonFOVManipulationAvailable:i})=>{this._moveManipulation.available=i,this._scaleOrientManipulation.available=i,this._observerManipulator.available=i,this._fieldOfViewManipulation.available=e},v),d(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const{observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}=e;return{viewshedCompData:e,observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}},e=>{null!=e&&this._scaleOrientManipulation.updateManipulators(e.viewshedCompData)},v)]);const e=e=>{this.addHandles([e.events.on("focus-changed",()=>{const e=this._someManipulatorHovering();e&&this.parentTool.subToolHandles.forEach(({subTool:e})=>{e._resetHoveringTask()}),this._someManipulatorSelected()||e||(this._forceHoveringTask=a(async e=>{await(this._forceHoveringTestPromise??h(V.hoverTimeoutMilliseconds,e)),u(e),this._forceHoveringTask=null,this._updateManipulatorVisibility()}))}),e.events.on("grab-changed",i=>{this._grabbing="start"===i.action,"end"===i.action&&this.parentTool.updateInteractionVisualsVisibility(),this.parentTool.subToolHandles.forEach(({subTool:e})=>{e!==this&&e._setInteractive(!this._grabbing)}),this._setInteractive(i=>i.hasManipulator(e)||!this._grabbing)}),e.events.on("drag",e=>{"start"===e.action&&this.parentTool.updateInteractionVisualsVisibility()})])};this._forEachManipulator(e)}destroy(){this._forceHoveringTask=l(this._forceHoveringTask),this._moveManipulation=p(this._moveManipulation),this._fieldOfViewManipulation=p(this._fieldOfViewManipulation),this._scaleOrientManipulation=p(this._scaleOrientManipulation),this.parentTool.manipulators.remove(this._observerManipulator),this._observerManipulator=p(this._observerManipulator)}get updating(){return null!=this._forceHoveringTask&&!this._forceHoveringTask.finished}get viewshed(){return this.viewshedComputedData?.viewshed}get grabbing(){return this._grabbing}get observer(){return this.viewshed?.observer}set observer(e){const i=this.viewshed;null!=i&&(i.observer=e)}get elevationAlignedObserverRenderSpace(){return this.viewshedComputedData?.elevationAlignedObserverRenderSpace}get discManipulator(){return this._moveManipulation.xyManipulation.discManipulator}get moveInteractionState(){const{dragging:e,grabbing:i}=this._moveManipulation;return{dragging:e,grabbing:i}}get scaleOrientInteractionState(){const{dragging:e,grabbing:i}=this._scaleOrientManipulation;return{dragging:e,grabbing:i}}_setInteractive(e){const i="boolean"==typeof e;this._forEachManipulation(t=>t.interactive=i?e:e(t))}onManipulatorSelectionChanged(){if(this._updateManipulatorVisibility(),!this._someManipulatorSelected()){this.analysisViewData.selectedViewshed===this.viewshed&&(this.analysisViewData.selectedViewshed=null),this._resetHoveringTask()}}hasManipulator(e){let i=!1;return this._forEachManipulator(t=>{i=i||t===e}),i}_someManipulatorSelected(){return this._moveManipulation.selected||this._fieldOfViewManipulation.selected||this._scaleOrientManipulation.selected}_someManipulatorHovering(){return this._moveManipulation.hovering||this._fieldOfViewManipulation.hovering||this._scaleOrientManipulation.hovering}_createMoveManipulation(){return new j({view:this.view,tool:this.parentTool,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:C})}_buildObserverDragPipeline(e){const i={mode:"absolute-height",offset:0},t=e.observer;if(null==t)return null;const a=this.view.spatialReference;return this._moveManipulation.createDragPipeline((n,o,r,s,l)=>{s=s.next(F(this,["observer"]));const p=w(t,a),h=w(e.elevationAlignedObserver,a);if(null==p||null==h)return{steps:r,cancel:s};const u=P.fromGeometry(p,O(this.view.viewingMode)),d=P.fromGeometry(h,O(this.view.viewingMode)),c=this.parentTool.createObserverMoveSnappingPipeline?.(n,d,l);if(null!=c){const{snappingStep:e,cancelSnapping:t}=c,{coordinateHelper:a}=d.data;s=s.next(t);return{steps:r.next(e=>({...e,snapOrigin:a.pointToVector(h)})).next(x(this.view,i)).next(...e).next(A({operations:u})).next(e=>(this.observer=u.data.geometry,e)),cancel:s}}return{steps:r.next(A({operations:u})).next(e=>(this.observer=u.data.geometry,e)),cancel:s}},i,a,void 0)}_buildFOVDragPipeline(e){let i=0,t=0;return this._fieldOfViewManipulation.createDragPipeline((a,o,r)=>{if(null==e)return{steps:o,cancel:r};const s=e.viewshed;let l=null;r=r.next(F(s,["horizontalFieldOfView","verticalFieldOfView"]));return{steps:o.next(a=>{"start"===a.action&&(l=null,i=e.horizontalFieldOfView,t=e.verticalFieldOfView);const o=a.deltaAngle;if(null==l&&0!==o){const e="bottom"===a.side||"left"===a.side?o>0:o<0;l=T(a.side)?0===i&&e||360===i&&!e:0===t&&e}const r=l?D(a.side):a.side;let p=0;switch(r){case"left":p=i/2-o;break;case"right":p=i/2+o;break;case"top":p=t+2*o;break;case"bottom":p=t-2*o}return T(r)?(p=n.normalize(p),p=p>270?0:p>180?180:p,s.horizontalFieldOfView=2*p):s.verticalFieldOfView=p,a}),cancel:r}},e)}_buildScaleOrientDragPipeline(e){let i=0,t=0;const a=(i,t)=>(a,n,o)=>{if(null==e)return{steps:n,cancel:o};const r=e.viewshed;return o=o.next(F(r,[i])),{steps:n=n.next(t(r,e)),cancel:o}};return r([this._scaleOrientManipulation.createHeadingDragPipeline(a("heading",(i,a)=>a=>("start"===a.action&&(t=e.heading),i.heading=n.normalize(t+a.deltaAngle),a)),e),this._scaleOrientManipulation.createTiltDragPipeline(a("tilt",(t,a)=>a=>{"start"===a.action&&(i=e.tilt);let n=i+a.deltaAngle;return n<-90?n=180:n>270&&(n=0),t.tilt=G.clamp(n),a}),e),this._scaleOrientManipulation.createDistanceDragPipeline(a("farDistance",(e,i)=>t=>{const a=f(I,t.renderEnd,i.elevationAlignedObserverRenderSpace),n=b(a)*i.metersPerUnit,o=M(a,i.targetDirection)<0?V.scaleOrientMinDistance:n;return e.farDistance=o,t}),e)])}_updateManipulatorVisibility(){const e=this._someManipulatorSelected(),i=null!=this._forceHoveringTask||this._someManipulatorHovering(),t=this._fieldOfViewManipulation.hovering,a=this.parentTool.creating;let n=[];const o=e=>{n.push(e.disableDisplay())};e||!a&&i?this.removeHandles(E):(this._scaleOrientManipulation.forEachManipulator(o),this._moveManipulation.forEachManipulator(o),this.addHandles(n,E),n=[]),e||!a&&i||a&&t?this.removeHandles(z):(this._fieldOfViewManipulation.forEachManipulator(o),this.addHandles(n,z)),e||!a?this.removeHandles(U):this.addHandles(this._observerManipulator.disableDisplay(),U)}_resetHoveringTask(){this._forceHoveringTask=l(this._forceHoveringTask),this._updateManipulatorVisibility()}_forEachManipulator(e){this._forEachManipulation(i=>{i.forEachManipulator(e)}),e(this._observerManipulator)}_forEachManipulation(e){e(this._moveManipulation),e(this._fieldOfViewManipulation),e(this._scaleOrientManipulation)}get test(){return{moveManipulation:this._moveManipulation,fieldOfViewManipulation:this._fieldOfViewManipulation,scaleOrientManipulation:this._scaleOrientManipulation,viewshedComputedData:this.viewshedComputedData,setHoveringTimeoutPromise:e=>{this._forceHoveringTestPromise=e}}}};e([g({constructOnly:!0})],R.prototype,"analysis",void 0),e([g({constructOnly:!0})],R.prototype,"analysisViewData",void 0),e([g({constructOnly:!0})],R.prototype,"parentTool",void 0),e([g({constructOnly:!0,nonNullable:!0})],R.prototype,"view",void 0),e([g()],R.prototype,"_forceHoveringTask",void 0),e([g()],R.prototype,"updating",null),e([g()],R.prototype,"viewshed",null),e([g()],R.prototype,"_grabbing",void 0),e([g()],R.prototype,"grabbing",null),e([g()],R.prototype,"viewshedComputedData",void 0),e([g()],R.prototype,"observer",null),e([g()],R.prototype,"elevationAlignedObserverRenderSpace",null),R=e([m("esri.views.3d.analysis.Viewshed.ViewshedSubTool")],R);const I=_(),G=new o(0,180);export{R as ViewshedSubTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- 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 r}from"../../../../core/maybe.js";import{watch as o,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{transformMat4 as m,set as d,sub as u,len as p,normalize as _,scale as V,angle as f,negate as v,copy as w,add as E}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as b,clone as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isOtherViewshedToolCreating as A}from"./analysisViewRegister.js";import{viewshedVisualizationConfiguration as C,arcAnglePerSegment as L}from"./ViewshedConfiguration.js";import{ViewshedShapeVisualElement as D}from"./ViewshedShapeVisualElement.js";import{LineVisualElement as y}from"../../interactive/visualElements/LineVisualElement.js";import{PointVisualElement as j}from"../../interactive/visualElements/PointVisualElement.js";import{createStipplePatternSimple as O}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:O(2)};this._observerVisualElement=new j({...e,...C.observerPointConfiguration}),this._shapeVisualElement=new D({...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([o(()=>{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}),o(()=>{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),o(()=>{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 r=t||i;this._shapeVisualElement.visible=e,this._topArcVisualElement.visible=e,this._bottomArcVisualElement.visible=e,this._frameLinesVisualElement.visible=e&&s;const o=e&&(t||s);this._leftArcVisualElement.visible=o,this._rightArcVisualElement.visible=o,this._forEachLineVisualElement(e=>{e.width=r?C.frameWidthSelected:C.frameWidthNotSelected,e.renderOccluded=t?4:1}),[this._centralLatitude,this._centralLongitude].forEach(i=>{i.width=2*(r?C.frameWidthSelected:C.frameWidthNotSelected),i.visible=e&&t})},a),o(()=>{const{analysisViewData:{interactive:e,tool:t},_selected:i,visible:s}=this,r=!t?.active&&A(this.view,this.analysisViewData);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,r=e.viewshed===i.tool?.stagedViewshed;return(s&&(t||r)?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=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:r}=e;this._observerVisualElement.geometry=t.elevationAlignedObserver,this._shapeVisualElement.updateTransform(),this._updateFrameLines(t,i),this._updateFrameArcs(t,i,r),this._updateCentralHelperArcs(t,s)}_updateFrameLines(e,t){const i=e.elevationAlignedObserverRenderSpace;this._frameLinesVisualElement.geometry=[[i,t.topLeft],[i,t.topRight],[i,t.bottomLeft],[i,t.bottomRight]]}_updateFrameArcs(e,t,i){const{elevationAlignedObserverRenderSpace:r,rightVector:o,horizontalFieldOfView:a,tiltedUpVector:l}=e,n=s(a),u=b(),p=c();h(p,n/2,l),m(u,o,p),F(this._leftArcVisualElement,r,t.bottomLeft,t.topLeft,"forward",u),h(p,-n/2,l),d(u,0,0,0),m(u,o,p),F(this._rightArcVisualElement,r,t.bottomRight,t.topRight,"forward",u);const _=a>180?"backward":"forward";F(this._topArcVisualElement,i.top,t.topRight,t.topLeft,_,l),F(this._bottomArcVisualElement,i.bottom,t.bottomRight,t.bottomLeft,_,l)}_updateCentralHelperArcs(e,t){const i=e.elevationAlignedObserverRenderSpace,s=e.horizontalFieldOfView>=180?"backward":"forward";F(this._centralLatitude,i,t.right,t.left,s,e.tiltedUpVector),F(this._centralLongitude,i,t.top,t.bottom,"forward",e.leftVector)}get test(){}};function F(e,t,i,s,r,o,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 A=f(l,d);const C=g(o);"backward"===r&&(v(C,C),A=-(2*Math.PI-A));const D=[],y=Math.ceil(Math.abs(A)/a),j=c();h(j,A/y,C);const O=b();w(O,l);const R=b();w(R,i);for(let h=0;h<y;h++){const e=b();w(e,R),m(O,O,j),E(R,t,O);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
+ 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 r}from"../../../../core/maybe.js";import{watch as o,initial as a}from"../../../../core/reactiveUtils.js";import{property as l,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{fromRotation as c}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as m,set as d,sub as u,len as p,normalize as _,scale as f,angle as V,negate as v,copy as w,add as E}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as b,clone as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isOtherViewshedToolCreating as A}from"./analysisViewRegister.js";import{viewshedVisualizationConfiguration as C,arcAnglePerSegment as L}from"./ViewshedConfiguration.js";import{ViewshedShapeVisualElement as D}from"./ViewshedShapeVisualElement.js";import{LineVisualElement as y}from"../../interactive/visualElements/LineVisualElement.js";import{PointVisualElement as j}from"../../interactive/visualElements/PointVisualElement.js";import{createStipplePatternSimple as O}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:O(2)};this._observerVisualElement=new j({...e,...C.observerPointConfiguration}),this._shapeVisualElement=new D({...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([o(()=>{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}),o(()=>{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),o(()=>{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 r=t||i;this._shapeVisualElement.visible=e,this._topArcVisualElement.visible=e,this._bottomArcVisualElement.visible=e,this._frameLinesVisualElement.visible=e&&s;const o=e&&(t||s);this._leftArcVisualElement.visible=o,this._rightArcVisualElement.visible=o,this._forEachLineVisualElement(e=>{e.width=r?C.frameWidthSelected:C.frameWidthNotSelected,e.renderOccluded=t?4:1}),[this._centralLatitude,this._centralLongitude].forEach(i=>{i.width=2*(r?C.frameWidthSelected:C.frameWidthNotSelected),i.visible=e&&t})},a),o(()=>{const{analysisViewData:{interactive:e,effectiveTool:t},_selected:i,visible:s}=this,r=!t?.active&&A(this.view,this.analysisViewData);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.effectiveTool?.active||i.interactive,r=e.viewshed===i.stagedViewshed;return(s&&(t||r)?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:e,viewshedComputedData:t}=this,{effectiveTool:i}=e;return null!=i&&i.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:r}=e;this._observerVisualElement.geometry=t.elevationAlignedObserver,this._shapeVisualElement.updateTransform(),this._updateFrameLines(t,i),this._updateFrameArcs(t,i,r),this._updateCentralHelperArcs(t,s)}_updateFrameLines(e,t){const i=e.elevationAlignedObserverRenderSpace;this._frameLinesVisualElement.geometry=[[i,t.topLeft],[i,t.topRight],[i,t.bottomLeft],[i,t.bottomRight]]}_updateFrameArcs(e,t,i){const{elevationAlignedObserverRenderSpace:r,rightVector:o,horizontalFieldOfView:a,tiltedUpVector:l}=e,n=s(a),u=b(),p=h();c(p,n/2,l),m(u,o,p),F(this._leftArcVisualElement,r,t.bottomLeft,t.topLeft,"forward",u),c(p,-n/2,l),d(u,0,0,0),m(u,o,p),F(this._rightArcVisualElement,r,t.bottomRight,t.topRight,"forward",u);const _=a>180?"backward":"forward";F(this._topArcVisualElement,i.top,t.topRight,t.topLeft,_,l),F(this._bottomArcVisualElement,i.bottom,t.bottomRight,t.bottomLeft,_,l)}_updateCentralHelperArcs(e,t){const i=e.elevationAlignedObserverRenderSpace,s=e.horizontalFieldOfView>=180?"backward":"forward";F(this._centralLatitude,i,t.right,t.left,s,e.tiltedUpVector),F(this._centralLongitude,i,t.top,t.bottom,"forward",e.leftVector)}get test(){}};function F(e,t,i,s,r,o,a=L){const l=b();u(l,i,t);const n=p(l),d=b();u(d,s,t),_(d,d),f(d,d,n);let A=V(l,d);const C=g(o);"backward"===r&&(v(C,C),A=-(2*Math.PI-A));const D=[],y=Math.ceil(Math.abs(A)/a),j=h();c(j,A/y,C);const O=b();w(O,l);const R=b();w(R,i);for(let c=0;c<y;c++){const e=b();w(e,R),m(O,O,j),E(R,t,O);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};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../analysis/Viewshed.js";import{makeHandle as i}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{mapCollection as s}from"../../../../core/mapCollectionUtils.js";import{destroyMaybe as n}from"../../../../core/maybe.js";import{when as a,syncAndInitial as o,watch as l,sync as r,initial as d}from"../../../../core/reactiveUtils.js";import{property as c,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import p from"../../../../geometry/Point.js";import{creationElevationInfo as g}from"./ViewshedConfiguration.js";import{ViewshedSubTool as m}from"./ViewshedSubTool.js";import{computeParametersFromTargetPoint as v}from"./viewshedToolUtils.js";import{Manipulator3D as w}from"../../interactive/Manipulator3D.js";import{Settings as _}from"../../interactive/editingTools/settings.js";import{ExtendedLineVisualElement as V}from"../../interactive/visualElements/ExtendedLineVisualElement.js";import{LaserlineVisualElement as b}from"../../interactive/visualElements/LaserlineVisualElement.js";import{toGraphic as f}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{AnalysisToolBase as y}from"../../../interactive/AnalysisToolBase.js";import{sketchKeys as S}from"../../../interactive/keybindings.js";import{newToolIntersector as T}from"../../../interactive/ToolIntersector.js";import{createScreenPointArrayFromEvent as C}from"../../../support/screenUtils.js";const D=Symbol("interactionVisuals");let M=class extends y{constructor(e){super(e),this.removeIncompleteOnCancel=!1,this.automaticManipulatorSelection=!1,this.multiTouchEnabled=!1,this._stagedViewshed=null,this._stagedViewshedComputedData=null,this._placementMode=I,this._creationState=!1,this._interactionVisualElements=null,this._settings=new _({getTheme:()=>this.view.effectiveTheme}),this._selectedManipulator=null}initialize(){this._intersector=T(this.view.state.viewingMode),this._createInteractionVisuals();const e=this.analysisViewData.viewshedComputedDataHandles;this.subToolHandles=s(()=>e,({viewshedComputedData:e})=>{const t=new m({analysis:this.analysis,analysisViewData:this.analysisViewData,parentTool:this,view:this.view,viewshedComputedData:e});return{subTool:t,remove:()=>{this.selectedViewshed===e.viewshed&&(this.selectedViewshed=null),t.destroy()}}}),this.addHandles([a(()=>this._valid,()=>this.finishToolCreation(),o),l(()=>this._stagedViewshed,e=>{const t=this.analysisViewData.viewshedComputedDataHandles;this._stagedViewshedComputedData=null!=e&&null!=t?this._findSubTool(e)?.viewshedComputedData:null},o),this.analysis.viewsheds.on("after-remove",e=>{const t=this._stagedViewshed;null!=t&&e.item===t&&this.analysis.viewsheds.add(t)}),l(()=>this.firstGrabbedManipulator,e=>{if(null!=e){const t=this._findSubTool(e)?.viewshed;this.selectedViewshed=t,this._selectManipulator(e)}else this._selectedSubTool?.onManipulatorSelectionChanged()},r),l(()=>this.view.activeTool,e=>{e!==this&&null!=e&&(this.selectedViewshed=null)}),a(()=>{const e=this.selectedViewshedComputedData;return null==e?null:{subTool:this._selectedSubTool,observer:e.elevationAlignedObserverRenderSpace,target:e.elevationAlignedTargetRenderSpace}},e=>{const{subTool:t,observer:i,target:s}=e;t?.moveInteractionState.dragging?this._updateInteractionVisualsLocation(i,!0):t?.scaleOrientInteractionState.dragging&&this._updateInteractionVisualsLocation(s,!1)},d),l(()=>this.creating,()=>this.updateInteractionVisualsVisibility()),l(()=>this.selectedViewshed,e=>{const t=this._selectedManipulator,i=this._selectedSubTool;null==e?this._selectManipulator(null):null!=t&&i.hasManipulator(t)||this._selectManipulator(i.discManipulator)},d)])}destroy(){this.subToolHandles=n(this.subToolHandles),this.removeHandles(D)}onDeactivate(){this.removeStaged(),this._creationState=!1}get updating(){return this.subToolHandles.some(({subTool:e})=>e.updating)}get _valid(){return this.analysisViewData.viewshedComputedDataHandles?.some(e=>e.viewshedComputedData.valid)??!1}get cursor(){return this.creating?"crosshair":null}get _selectedSubTool(){return this._findSubTool(this.selectedViewshed)}_selectManipulator(e){const t=this._selectedManipulator;t!==e&&(this._selectedManipulator=e,null!=t&&(t.selected=!1),null!=e&&(e.selected=!0),this._findSubTool(t)?.onManipulatorSelectionChanged(),this._selectedSubTool?.onManipulatorSelectionChanged())}get selectedViewshed(){return this.analysisViewData.selectedViewshed}set selectedViewshed(e){this.analysisViewData.selectedViewshed=e}get selectedViewshedComputedData(){return this._selectedSubTool?.viewshedComputedData}get stagedViewshed(){return this._stagedViewshed}get grabbing(){return this.subToolHandles.some(({subTool:e})=>e.grabbing)}get creating(){return this._creationState&&this.active}get isPlacingTarget(){return"placing-target"===this._creationState}place(e){this.selectedViewshed=null,this._placementMode=e,this._creationState="placing-observer",this._finishToolCreationIfValid()}onManipulatorSelectionChanged(){this.subToolHandles.forEach(e=>e.subTool.onManipulatorSelectionChanged())}onInputEvent(e){switch(e.type){case"immediate-double-click":this._doubleClickHandler(e);break;case"pointer-move":this._pointerMoveHandler(e);break;case"key-down":S.cancel===e.key?this._cancelKeyHandler(e):S.delete.includes(e.key)&&this._deleteKeyHandler();break;case"hold":this.updateInteractionVisualsVisibility(!0)}}onInputEventAfter(e){if("immediate-click"===e.type)this._clickPlacementHandler(e)}onActivate(){this._placementMode=I}_clickPlacementHandler(e){if(!this.creating||this.hasFocusedManipulators)return;const i=this._intersectScreen(e,H);if(null!=i){if("placing-observer"===this._creationState){const e=new t({observer:i.mapPoint.clone(),elevationInfo:g.clone(),feature:i.feature});this.analysis.viewsheds.add(e),this._stagedViewshed=e,this._creationState="placing-target",this._updateStagedViewshed(i.scenePoint)}else if("placing-target"===this._creationState){this._updateStagedViewshed(i.scenePoint);const e=this._stagedViewshed;this._stagedViewshed=null,"multiple"===this._placementMode?this._creationState="placing-observer":(this._creationState=!1,this._stagedViewshed=null,this._finishToolCreationIfValid(),this.view.activeTool=null),this.selectedViewshed=e}e.stopPropagation()}}_doubleClickHandler(e){this.creating&&(this.removeStaged(),this._creationState=!1,this.view.activeTool=null,e.stopPropagation())}_pointerMoveHandler(e){if(!this.creating)return;const t=this._intersectScreen(e,H);null!=t&&(this._updateInteractionVisualsLocation(t.scenePoint,!1),this._updateStagedViewshed(t.scenePoint))}_cancelKeyHandler(e){this.creating?this._onCancelWhileCreating(e):this.grabbing||(this.selectedViewshed=null,e.stopPropagation())}_onCancelWhileCreating(e){const t=this.removeStaged();this._finishToolCreationIfValid(),t?(this._creationState="placing-observer",this.selectedViewshed=null,"multiple"===this._placementMode&&e.stopPropagation()):this._creationState=!1}_deleteKeyHandler(){this.creating&&(this.removeStaged(),this._creationState="placing-observer"),null!=this.selectedViewshed&&this.analysis.viewsheds.remove(this.selectedViewshed)}_finishToolCreationIfValid(){this._valid&&this.finishToolCreation()}_updateStagedViewshed(e){const t=this._stagedViewshed,i=this._stagedViewshedComputedData;if(null==t||null==i)return;const{heading:s,tilt:n,farDistance:a}=v(this.view,i,e);t.farDistance=a,t.tilt=n,t.heading=s}removeStaged(){const e=this._stagedViewshed;return null!=e&&(this._stagedViewshed=null,this.analysis.viewsheds.remove(e),!0)}_intersectScreen(e,t){const i=C(e);this.view.sceneIntersectionHelper.intersectToolIntersectorScreen(i,this._intersector);const s=this._intersector.results.min,n=t.scenePoint;if(!s.getIntersectionPoint(n))return null;const a=t.mapPoint;return a.spatialReference=this.view.spatialReference,this.view.renderCoordsHelper.fromRenderCoords(n,a),null==a?null:(t.feature=f(s,this.view),t)}_createInteractionVisuals(){this.removeHandles(D);const e=this._settings.visualElements,t=new b({view:this.view,attached:!1,style:{glowWidth:e.heightPlane.glowWidth,innerWidth:e.heightPlane.innerWidth},isDecoration:!0}),s=new V({view:this.view,extensionType:e.zVerticalLine.extensionType,attached:!1,innerWidth:1,writeDepthEnabled:!1,renderOccluded:4,isDecoration:!0});this._interactionVisualElements={laserline:t,verticalLine:s},this.addHandles([l(()=>e.zVerticalLine,e=>e.apply(s),o),l(()=>e.heightPlane,e=>e.apply(t),o),i(()=>{t.destroy(),s.destroy(),this._interactionVisualElements=null})],D)}updateInteractionVisualsVisibility(e=!1){const t=this.creating,i=this.analysisViewData.visible,s=this._selectedSubTool,n=this.selectedViewshedComputedData,a=(e,t)=>{const i=this._interactionVisualElements;null!=i&&(i.verticalLine.attached=t,i.laserline.attached=e)};if(t)return void a(i,!1);if(null==s||null==n)return void a(!1,!1);const o=s.moveInteractionState,l=e?o.grabbing:o.dragging,r=s.scaleOrientInteractionState,d=e?r.grabbing:r.dragging,c=i&&(l||d);if(a(c,l),c){const e=l?n.elevationAlignedObserverRenderSpace:n.elevationAlignedTargetRenderSpace;this._updateInteractionVisualsLocation(e,l)}}_updateInteractionVisualsLocation(e,t){const i=this._interactionVisualElements;if(null==i)return;const{laserline:s,verticalLine:n}=i;s.heightManifoldTarget=e,s.intersectsWorldUpAtLocation=t?e:null,null!=e&&n.setStartEndFromWorldDownAtLocation(e)}_findSubTool(e){if(null==e)return null;const t=e instanceof w?t=>t.subTool.hasManipulator(e):t=>t.subTool.viewshed===e;return this.subToolHandles?.find(t)?.subTool}get test(){}};e([c()],M.prototype,"updating",null),e([c({constructOnly:!0})],M.prototype,"view",void 0),e([c()],M.prototype,"analysisViewData",void 0),e([c()],M.prototype,"removeIncompleteOnCancel",void 0),e([c()],M.prototype,"automaticManipulatorSelection",void 0),e([c()],M.prototype,"multiTouchEnabled",void 0),e([c({constructOnly:!0})],M.prototype,"analysis",void 0),e([c()],M.prototype,"subToolHandles",void 0),e([c()],M.prototype,"_stagedViewshed",void 0),e([c()],M.prototype,"_stagedViewshedComputedData",void 0),e([c()],M.prototype,"_placementMode",void 0),e([c()],M.prototype,"_creationState",void 0),e([c()],M.prototype,"_valid",null),e([c({readOnly:!0})],M.prototype,"cursor",null),e([c()],M.prototype,"_selectedManipulator",void 0),e([c()],M.prototype,"_selectedSubTool",null),e([c()],M.prototype,"selectedViewshed",null),e([c()],M.prototype,"selectedViewshedComputedData",null),e([c()],M.prototype,"stagedViewshed",null),e([c()],M.prototype,"grabbing",null),e([c()],M.prototype,"creating",null),e([c()],M.prototype,"isPlacingTarget",null),M=e([h("esri.views.3d.analysis.Viewshed.ViewshedTool")],M);const H={mapPoint:new p,scenePoint:u(),feature:null},I="multiple";export{M as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../../analysis/Viewshed.js";import{makeHandle as i}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{mapCollection as s}from"../../../../core/mapCollectionUtils.js";import{destroyMaybe as n}from"../../../../core/maybe.js";import{when as a,syncAndInitial as o,watch as l,sync as r,initial as d}from"../../../../core/reactiveUtils.js";import{property as c,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import p from"../../../../geometry/Point.js";import{creationElevationInfo as g}from"./ViewshedConfiguration.js";import{ViewshedSubTool as m}from"./ViewshedSubTool.js";import{computeParametersFromTargetPoint as v}from"./viewshedToolUtils.js";import{Manipulator3D as w}from"../../interactive/Manipulator3D.js";import{Settings as _}from"../../interactive/editingTools/settings.js";import{ExtendedLineVisualElement as V}from"../../interactive/visualElements/ExtendedLineVisualElement.js";import{LaserlineVisualElement as b}from"../../interactive/visualElements/LaserlineVisualElement.js";import{toGraphic as f}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{AnalysisToolBase as y}from"../../../interactive/AnalysisToolBase.js";import{sketchKeys as S}from"../../../interactive/keybindings.js";import{newToolIntersector as T}from"../../../interactive/ToolIntersector.js";import{createScreenPointArrayFromEvent as C}from"../../../support/screenUtils.js";const D=Symbol("interactionVisuals");let M=class extends y{constructor(e){super(e),this.removeIncompleteOnCancel=!1,this.automaticManipulatorSelection=!1,this.multiTouchEnabled=!1,this._stagedViewshed=null,this._stagedViewshedComputedData=null,this._placementMode=H,this._creationState=!1,this._interactionVisualElements=null,this._settings=new _({getTheme:()=>this.view.effectiveTheme}),this._selectedManipulator=null}initialize(){this._intersector=T(this.view.state.viewingMode),this._createInteractionVisuals();const e=this.analysisViewData.viewshedComputedDataHandles;this.subToolHandles=s(()=>e,({viewshedComputedData:e})=>{const t=new m({analysis:this.analysis,analysisViewData:this.analysisViewData,parentTool:this,view:this.view,viewshedComputedData:e});return{subTool:t,remove:()=>{this.selectedViewshed===e.viewshed&&(this.selectedViewshed=null),t.destroy()}}}),this.addHandles([a(()=>this._valid,()=>this.finishToolCreation(),o),l(()=>this._stagedViewshed,e=>{const t=this.analysisViewData.viewshedComputedDataHandles;this._stagedViewshedComputedData=null!=e&&null!=t?this._findSubTool(e)?.viewshedComputedData:null},o),this.analysis.viewsheds.on("after-remove",e=>{const t=this._stagedViewshed;null!=t&&e.item===t&&this.analysis.viewsheds.add(t)}),l(()=>this.firstGrabbedManipulator,e=>{if(null!=e){const t=this._findSubTool(e)?.viewshed;this.selectedViewshed=t,this._selectManipulator(e)}else this._selectedSubTool?.onManipulatorSelectionChanged()},r),l(()=>this.view.activeTool,e=>{e!==this&&null!=e&&(this.selectedViewshed=null)}),a(()=>{const e=this.selectedViewshedComputedData;return null==e?null:{subTool:this._selectedSubTool,observer:e.elevationAlignedObserverRenderSpace,target:e.elevationAlignedTargetRenderSpace}},e=>{const{subTool:t,observer:i,target:s}=e;t?.moveInteractionState.dragging?this._updateInteractionVisualsLocation(i,!0):t?.scaleOrientInteractionState.dragging&&this._updateInteractionVisualsLocation(s,!1)},d),l(()=>this.creating,()=>this.updateInteractionVisualsVisibility()),l(()=>this.selectedViewshed,e=>{const t=this._selectedManipulator,i=this._selectedSubTool;null==e?this._selectManipulator(null):null!=t&&i.hasManipulator(t)||this._selectManipulator(i.discManipulator)},d)])}destroy(){n(this.subToolHandles),this.removeHandles(D)}onDeactivate(){this.removeStaged(),this._creationState=!1}get updating(){return this.subToolHandles.some(({subTool:e})=>e.updating)}get _valid(){return this.analysisViewData.viewshedComputedDataHandles?.some(e=>e.viewshedComputedData.valid)??!1}get cursor(){return this.creating?"crosshair":null}get _selectedSubTool(){return this._findSubTool(this.selectedViewshed)}_selectManipulator(e){const t=this._selectedManipulator;t!==e&&(this._selectedManipulator=e,null!=t&&(t.selected=!1),null!=e&&(e.selected=!0),this._findSubTool(t)?.onManipulatorSelectionChanged(),this._selectedSubTool?.onManipulatorSelectionChanged())}get selectedViewshed(){return this.analysisViewData.selectedViewshed}set selectedViewshed(e){this.analysisViewData.selectedViewshed=e}get selectedViewshedComputedData(){return this._selectedSubTool?.viewshedComputedData}get stagedViewshed(){return this._stagedViewshed}get grabbing(){return this.subToolHandles.some(({subTool:e})=>e.grabbing)}get creating(){return this._creationState&&this.active}get isPlacingTarget(){return"placing-target"===this._creationState}place(e){this.selectedViewshed=null,this._placementMode=e,this._creationState="placing-observer",this._finishToolCreationIfValid()}onManipulatorSelectionChanged(){this.subToolHandles.forEach(e=>e.subTool.onManipulatorSelectionChanged())}onInputEvent(e){switch(e.type){case"immediate-double-click":this._doubleClickHandler(e);break;case"pointer-move":this._pointerMoveHandler(e);break;case"key-down":S.cancel===e.key?this._cancelKeyHandler(e):S.delete.includes(e.key)&&this._deleteKeyHandler();break;case"hold":this.updateInteractionVisualsVisibility(!0)}}onInputEventAfter(e){if("immediate-click"===e.type)this._clickPlacementHandler(e)}onActivate(){this._placementMode=H}_clickPlacementHandler(e){if(!this.creating||this.hasFocusedManipulators)return;const i=this._intersectScreen(e,I);if(null!=i){if("placing-observer"===this._creationState){const e=new t({observer:i.mapPoint.clone(),elevationInfo:g.clone(),feature:i.feature});this.analysis.viewsheds.add(e),this._stagedViewshed=e,this._creationState="placing-target",this._updateStagedViewshed(i.scenePoint)}else if("placing-target"===this._creationState){this._updateStagedViewshed(i.scenePoint);const e=this._stagedViewshed;this._stagedViewshed=null,"multiple"===this._placementMode?this._creationState="placing-observer":(this._creationState=!1,this._stagedViewshed=null,this._finishToolCreationIfValid(),this.view.activeTool=null),this.selectedViewshed=e}e.stopPropagation()}}_doubleClickHandler(e){this.creating&&(this.removeStaged(),this._creationState=!1,this.view.activeTool=null,e.stopPropagation())}_pointerMoveHandler(e){if(!this.creating)return;const t=this._intersectScreen(e,I);null!=t&&(this._updateInteractionVisualsLocation(t.scenePoint,!1),this._updateStagedViewshed(t.scenePoint))}_cancelKeyHandler(e){this.creating?this._onCancelWhileCreating(e):this.grabbing||(this.selectedViewshed=null,e.stopPropagation())}_onCancelWhileCreating(e){const t=this.removeStaged();this._finishToolCreationIfValid(),t?(this._creationState="placing-observer",this.selectedViewshed=null,"multiple"===this._placementMode&&e.stopPropagation()):this._creationState=!1}_deleteKeyHandler(){this.creating&&(this.removeStaged(),this._creationState="placing-observer"),null!=this.selectedViewshed&&this.analysis.viewsheds.remove(this.selectedViewshed)}_finishToolCreationIfValid(){this._valid&&this.finishToolCreation()}_updateStagedViewshed(e){const t=this._stagedViewshed,i=this._stagedViewshedComputedData;if(null==t||null==i)return;const{heading:s,tilt:n,farDistance:a}=v(this.view,i,e);t.farDistance=a,t.tilt=n,t.heading=s}removeStaged(){const e=this._stagedViewshed;return null!=e&&(this._stagedViewshed=null,this.analysis.viewsheds.remove(e),!0)}_intersectScreen(e,t){const i=C(e);this.view.sceneIntersectionHelper.intersectToolIntersectorScreen(i,this._intersector);const s=this._intersector.results.min,n=t.scenePoint;if(!s.getIntersectionPoint(n))return null;const a=t.mapPoint;return a.spatialReference=this.view.spatialReference,this.view.renderCoordsHelper.fromRenderCoords(n,a),null==a?null:(t.feature=f(s,this.view),t)}_createInteractionVisuals(){this.removeHandles(D);const e=this._settings.visualElements,t=new b({view:this.view,attached:!1,style:{glowWidth:e.heightPlane.glowWidth,innerWidth:e.heightPlane.innerWidth},isDecoration:!0}),s=new V({view:this.view,extensionType:e.zVerticalLine.extensionType,attached:!1,innerWidth:1,writeDepthEnabled:!1,renderOccluded:4,isDecoration:!0});this._interactionVisualElements={laserline:t,verticalLine:s},this.addHandles([l(()=>e.zVerticalLine,e=>e.apply(s),o),l(()=>e.heightPlane,e=>e.apply(t),o),i(()=>{t.destroy(),s.destroy(),this._interactionVisualElements=null})],D)}updateInteractionVisualsVisibility(e=!1){const t=this.creating,i=this.analysisViewData.visible,s=this._selectedSubTool,n=this.selectedViewshedComputedData,a=(e,t)=>{const i=this._interactionVisualElements;null!=i&&(i.verticalLine.attached=t,i.laserline.attached=e)};if(t)return void a(i,!1);if(null==s||null==n)return void a(!1,!1);const o=s.moveInteractionState,l=e?o.grabbing:o.dragging,r=s.scaleOrientInteractionState,d=e?r.grabbing:r.dragging,c=i&&(l||d);if(a(c,l),c){const e=l?n.elevationAlignedObserverRenderSpace:n.elevationAlignedTargetRenderSpace;this._updateInteractionVisualsLocation(e,l)}}_updateInteractionVisualsLocation(e,t){const i=this._interactionVisualElements;if(null==i)return;const{laserline:s,verticalLine:n}=i;s.heightManifoldTarget=e,s.intersectsWorldUpAtLocation=t?e:null,null!=e&&n.setStartEndFromWorldDownAtLocation(e)}_findSubTool(e){if(null==e)return null;const t=e instanceof w?t=>t.subTool.hasManipulator(e):t=>t.subTool.viewshed===e;return this.subToolHandles?.find(t)?.subTool}get test(){}};e([c()],M.prototype,"updating",null),e([c({constructOnly:!0})],M.prototype,"view",void 0),e([c()],M.prototype,"analysisViewData",void 0),e([c()],M.prototype,"removeIncompleteOnCancel",void 0),e([c()],M.prototype,"automaticManipulatorSelection",void 0),e([c()],M.prototype,"multiTouchEnabled",void 0),e([c({constructOnly:!0})],M.prototype,"analysis",void 0),e([c()],M.prototype,"subToolHandles",void 0),e([c()],M.prototype,"_stagedViewshed",void 0),e([c()],M.prototype,"_stagedViewshedComputedData",void 0),e([c()],M.prototype,"_placementMode",void 0),e([c()],M.prototype,"_creationState",void 0),e([c()],M.prototype,"_valid",null),e([c({readOnly:!0})],M.prototype,"cursor",null),e([c()],M.prototype,"_selectedManipulator",void 0),e([c()],M.prototype,"_selectedSubTool",null),e([c()],M.prototype,"selectedViewshed",null),e([c()],M.prototype,"selectedViewshedComputedData",null),e([c()],M.prototype,"stagedViewshed",null),e([c()],M.prototype,"grabbing",null),e([c()],M.prototype,"creating",null),e([c()],M.prototype,"isPlacingTarget",null),M=e([h("esri.views.3d.analysis.Viewshed.ViewshedTool")],M);const I={mapPoint:new p,scenePoint:u(),feature:null},H="multiple";export{M as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{watch as s,syncAndInitial as a}from"../../../../core/reactiveUtils.js";import{property as o,subclass as d}from"../../../../core/accessorSupport/decorators.js";import{ViewshedEditTool as l}from"./ViewshedEditTool.js";let n=class extends t{constructor(e){super(e),this._editTool=null}initialize(){const{view:e}=this;this.addHandles([s(()=>({interactive:this.analysisViewData.interactive,selectedViewshed:this.analysisViewData.selectedViewshed,selectedViewshedComputedData:this._selectedViewshedComputedData}),({interactive:t,selectedViewshed:s,selectedViewshedComputedData:a})=>{t?null==s||null!=a?this._editTool||(this._editTool=new l({analysis:this.analysis,analysisViewData:this.analysisViewData,view:e}),e.addAndActivateTool(this._editTool)):this.analysisViewData.selectedViewshed=null:this._editTool=i(this._editTool)},a),s(()=>e.activeTool,e=>{null!=e&&e!==this._editTool&&(this.analysisViewData.selectedViewshed=null)})])}destroy(){this._editTool=i(this._editTool)}get selectedViewshedComputedData(){return this._selectedViewshedComputedData}async place(e,t){if(this.analysisViewData.interactive=!0,"single"===e)return{}}get _selectedViewshedComputedData(){const e=this.analysisViewData.selectedViewshed;return null==e?null:this._findViewshedComputedData(e)}_findViewshedComputedData(e){return this.analysisViewData.viewshedComputedDataHandles?.find(t=>t.viewshedComputedData.viewshed===e)?.viewshedComputedData}};e([o({constructOnly:!0})],n.prototype,"view",void 0),e([o({constructOnly:!0})],n.prototype,"analysis",void 0),e([o({constructOnly:!0})],n.prototype,"analysisViewData",void 0),e([o()],n.prototype,"_editTool",void 0),e([o()],n.prototype,"selectedViewshedComputedData",null),e([o()],n.prototype,"_selectedViewshedComputedData",null),n=e([d("esri.views.3d.analysis.Viewshed.ViewshedTool2")],n);export{n as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import"../../../../core/has.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{watch as s,syncAndInitial as a}from"../../../../core/reactiveUtils.js";import{property as o,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{detachToolFromView as d}from"./toolLifecycleUtils.js";import{ViewshedEditTool as n}from"./ViewshedEditTool.js";import{ViewshedPlacementController as r}from"./ViewshedPlacementController.js";let c=class extends t{constructor(e){super(e),this._editTool=null}initialize(){const{view:e}=this;this._placementController=new r({analysis:this.analysis,analysisViewData:this.analysisViewData,view:e,callbacks:{cancelTool:()=>{null!=e.activeTool&&(e.activeTool=null)},findViewshedComputedData:e=>this._findViewshedComputedData(e),isToolDestroyed:()=>this.destroyed,setSelectedViewshed:e=>{this.analysisViewData.selectedViewshed=e}}}),this.addHandles([s(()=>({creationState:this._placementController.creationState,interactive:this.analysisViewData.interactive,selectedViewshed:this.analysisViewData.selectedViewshed,selectedViewshedComputedData:this._selectedViewshedComputedData}),({creationState:t,interactive:i,selectedViewshed:s,selectedViewshedComputedData:a})=>{if(!i)return this._placementController.cancelPlaceOperation(),this.analysisViewData.selectedViewshed=null,void this._destroyEditTool();null==s||null!=a?null==t?this._editTool||(this._editTool=new n({analysis:this.analysis,analysisViewData:this.analysisViewData,view:e}),e.tools.add(this._editTool)):this._destroyEditTool():this.analysisViewData.selectedViewshed=null},a),s(()=>e.activeTool,e=>{null!=e&&e!==this._editTool&&null==this._placementController.creationState&&(this.analysisViewData.selectedViewshed=null)})])}destroy(){this._destroyEditTool(),i(this._placementController)}get selectedViewshedComputedData(){return this._selectedViewshedComputedData}get stagedViewshed(){return this._placementController.stagedViewshed}get active(){return this._placementController.active||(this._editTool?.active??!1)}get updating(){return this._placementController.updating||!!this._editTool?.updating}get creating(){return null!=this._placementController.creationState}async place(e,t){if(this.analysisViewData.interactive=!0,this._destroyEditTool(),await this._placementController.startPlaceOperation(e,t),"single"===e)return{}}get _selectedViewshedComputedData(){const e=this.analysisViewData.selectedViewshed;return null==e?null:this._findViewshedComputedData(e)}_findViewshedComputedData(e){return this.analysisViewData.viewshedComputedDataHandles?.find(t=>t.viewshedComputedData.viewshed===e)?.viewshedComputedData}_destroyEditTool(){const e=this._editTool;this._editTool=null,null!=e&&(d(this.view,e),i(e))}get test(){}};e([o({constructOnly:!0})],c.prototype,"view",void 0),e([o({constructOnly:!0})],c.prototype,"analysis",void 0),e([o({constructOnly:!0})],c.prototype,"analysisViewData",void 0),e([o()],c.prototype,"_placementController",void 0),e([o()],c.prototype,"_editTool",void 0),e([o()],c.prototype,"selectedViewshedComputedData",null),e([o()],c.prototype,"stagedViewshed",null),e([o()],c.prototype,"active",null),e([o()],c.prototype,"updating",null),e([o()],c.prototype,"creating",null),e([o()],c.prototype,"_selectedViewshedComputedData",null),c=e([l("esri.views.3d.analysis.Viewshed.ViewshedTool2")],c);export{c as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{createAnalysisViewRegister as e}from"../support/analysisViewRegister.js";const r=e();function t(e,t){return r.register(e,t)}function n(e,t){r.forEveryOther(e,t,e=>{e.interactive&&(e.selectedViewshed=null)})}function i(e,t){let n=!1;return r.forEveryOther(e,t,e=>{n||=e.tool?.creating??!1}),n}export{i as isOtherViewshedToolCreating,t as registerAnalysisView,n as unselectViewshedInOtherAnalysisViews};
2
+ import{createAnalysisViewRegister as e}from"../support/analysisViewRegister.js";const r=e();function t(e,t){return r.register(e,t)}function n(e,t){r.forEveryOther(e,t,e=>{e.interactive&&(e.selectedViewshed=null)})}function i(e,t){let n=!1;return r.forEveryOther(e,t,e=>{n||=e.creating??!1}),n}export{i as isOtherViewshedToolCreating,t as registerAnalysisView,n as unselectViewshedInOtherAnalysisViews};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{destroyHandle as e}from"../../../../core/handleUtils.js";import{watch as n,sync as t,initial as r}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as o}from"../../../../core/screenUtils.js";import{clone as i,create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import s from"../../../../geometry/Point.js";import{pointEquals as l}from"../../../../layers/graphics/dehydratedFeatureComparison.js";import{makeDehydratedPoint as c}from"../../../../layers/graphics/dehydratedPoint.js";import{absoluteHeightElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{ViewshedDrawToolRenderer as d}from"./ViewshedDrawToolRenderer.js";import{Intersector as m}from"../../webgl-engine/lib/Intersector.js";import{toGraphic as u}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{DrawTool as f}from"../../../draw/DrawTool.js";import{acquire as g}from"../../../interactive/snapping/SnappingManagerPool.js";function j(o){const{analysisViewData:i,view:a,sketchOptions:s,onCancel:l,onComplete:c,onManipulatorCountChange:u}=o,j=new d({view:a}),P=g(a),w=new m(a.state.viewingMode),b=new f({elevationInfo:p,enableVertexVisuals:!1,hasZ:!0,renderer:j,sketchOptions:s,snappingManager:P.snappingManager,view:a});return b.addHandles([P,e(j),b.on("cancel",()=>l(b)),b.on("complete",()=>c(b)),n(()=>b.manipulators.length,()=>u(b),t),n(()=>i.visible,e=>j.analysisVisible=e,r)]),{drawTool:b,intersector:w,renderer:j}}function P({drawTool:e,intersector:n,mapPoint:t,view:r}){const{interactiveHandleManager:o,lastScreenPosition:s}=e,l=e.getVertexSnappingCandidates(),c=a();if(!r.renderCoordsHelper.toRenderCoords(t,c))return null;const p=o?.capturingHandle??o?.allhandles?.at(0),d=p?.screenPosition??s,m=null!=p?w({handle:p,spatialReference:r.spatialReference,vertexSnappingCandidates:l}):null,u=null!=d?v(d,r,n):null;return{mapPoint:(u?.mapPoint??t).clone(),scenePoint:u?.scenePoint?i(u.scenePoint):c,feature:null!=m?h(m):u?.feature}}function w({handle:e,spatialReference:n,vertexSnappingCandidates:t}){const r=e.selectedSnappingResult;if(!r)return null;const o=r.spatialReference??n;return t.find(({targetPoint:e})=>l(r,c(e.x,e.y,e.z,o)))}const b={mapPoint:new s,scenePoint:a(),feature:null};function v(e,n,t){n.sceneIntersectionHelper.intersectToolIntersectorScreen(o(e.x,e.y),t);const r=b,i=t.results.min;return i.getIntersectionPoint(r.scenePoint)?(r.mapPoint.spatialReference=n.spatialReference,n.renderCoordsHelper.fromRenderCoords(r.scenePoint,r.mapPoint),r.feature=u(i,n),r):null}function h(e){const n={id:e.layer.id,objectIdField:"objectIdField"in e.layer?e.layer.objectIdField:void 0};return{attributes:{[n.objectIdField??"ObjectId"]:e.objectId},layer:n,objectId:e.objectId,uid:null}}export{j as createDrawTool,P as createPlacementResult};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ function o(o,l){o.activeTool===l&&(o.activeTool=null),o.tools.includes(l)&&o.tools.remove(l)}export{o as detachToolFromView};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import o from"../../../../core/Collection.js";import{mapCollection as e}from"../../../../core/mapCollectionUtils.js";import{ViewshedSubTool as t}from"./ViewshedSubTool.js";import{Manipulator3D as a}from"../../interactive/Manipulator3D.js";function i({analysis:a,analysisViewData:i,onBeforeSubToolRemove:n,parentTool:s,view:l,viewshedComputedDataHandles:r}){return null==r?new o:e(()=>r,({viewshedComputedData:o})=>{const e=new t({analysis:a,analysisViewData:i,parentTool:s,view:l,viewshedComputedData:o});return{subTool:e,remove:()=>{n(o.viewshed),e.destroy()}}})}function n(o,e){return e?o.find(e instanceof a?({subTool:o})=>o.hasManipulator(e):({subTool:o})=>o.viewshed===e)?.subTool??null:null}export{i as createSubToolHandles,n as findSubTool};
2
+ import{Manipulator3D as o}from"../../interactive/Manipulator3D.js";function n(n,i){return i?n.find(i instanceof o?({subTool:o})=>o.hasManipulator(i):({subTool:o})=>o.viewshed===i)?.subTool??null:null}export{n as findSubTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{rad2deg as e,clamp as r}from"../../../../core/mathUtils.js";import{fromRotation as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as i,normalize as o,copy as a,angle as s,dot as c,sub as m,add as l,scale as d,len as p,set as f}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as u,getNormal as h,fromPositionAndNormal as b,projectPoint as j}from"../../../../geometry/support/plane.js";import{viewshedToolManipulatorConfiguration as v}from"./ViewshedConfiguration.js";import{calculateTranslateRotateFromBases as x,calculateInputRotationTransform as S}from"../../interactive/manipulatorUtils.js";import{screenToRenderPlane as A}from"../../interactive/editingTools/dragEventPipeline3D.js";import{headingTiltToDirectionUp as R}from"../../support/cameraUtils.js";import{createDirectionUp as U}from"../../support/cameraUtilsInternal.js";function C({tiltedUpVector:e,rightVector:r,elevationAlignedObserverRenderSpace:t},n){const i=x(e,r,t,n);return i[12]=0,i[13]=0,i[14]=0,i}function D(t,n,i,s){const p=g(),f=h(i.plane),j=E(n,f);let x;if(Math.abs(j)>v.viewAngleThreshold)x=t.next(A(n,i.plane));else{const e=b(s.elevationAlignedTargetRenderSpace,i.basis1,u()),a=o(T,i.basis1),p=o(V,i.basis2);x=t.next(A(n,e)).next(e=>{const t=e=>{const t=c(m(w,e,i.origin),p),n=Math.acos(r(t/s.farDistanceRenderSpace,-1,1)),o=Math.sin(n)*s.farDistanceRenderSpace;return l(g(),i.origin,l(g(),d(w,a,o),d(H,p,t)))},n=t(e.renderStart),o=t(e.renderEnd);return{...e,renderStart:n,renderEnd:o}})}return x.next(r=>{"start"===r.action&&a(p,r.renderStart);const t=e(S(p,r.renderEnd,i.origin,f));return{...r,deltaAngle:t}})}function E(r,t){const n=T;r.renderCoordsHelper.toRenderCoords(r.camera.position,n);const i=R(r,n,r.camera.heading,r.camera.tilt,U()).direction;return e(s(i,t))-90}function M(e,r,n,o){return t(O,n,o),i(e,r,O)}function P(r,t,n){const i=t.elevationAlignedObserverRenderSpace,o=m(y,n,i),a=p(o)*t.metersPerUnit,l=r.renderCoordsHelper.basisMatrixAtPosition(i,B),d=f(I,l[8],l[9],l[10]),g=b(i,d,F),u=j(g,n,k),h=m(u,u,i),v=(p(h)<1e-4?90:e(s(o,h)))*(c(d,o)<0?-1:1)+90,x=f(q,l[4],l[5],l[6]),S=e(s(x,h)),A=f(z,l[0],l[1],l[2]);return{heading:c(h,A)<0?360-S:S,tilt:v,farDistance:a}}const T=g(),V=g(),w=g(),H=g(),O=n(),y=g(),I=g(),k=g(),q=g(),z=g(),B=n(),F=u();export{P as computeParametersFromTargetPoint,C as getViewshedRotationMatrix,M as rotateBy,D as screenToCircleAngle};
2
+ import{rad2deg as e,clamp as r}from"../../../../core/mathUtils.js";import{fromRotation as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as i,sub as o,len as a,set as s,angle as c,dot as m,normalize as l,copy as d,add as p,scale as f}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromPositionAndNormal as u,projectPoint as h,create as b,getNormal as j}from"../../../../geometry/support/plane.js";import{viewshedToolManipulatorConfiguration as v}from"./ViewshedConfiguration.js";import{calculateTranslateRotateFromBases as x,calculateInputRotationTransform as S}from"../../interactive/manipulatorUtils.js";import{screenToRenderPlane as A}from"../../interactive/editingTools/dragEventPipeline3D.js";import{headingTiltToDirectionUp as R}from"../../support/cameraUtils.js";import{createDirectionUp as U}from"../../support/cameraUtilsInternal.js";function C({tiltedUpVector:e,rightVector:r,elevationAlignedObserverRenderSpace:t},n){const i=x(e,r,t,n);return i[12]=0,i[13]=0,i[14]=0,i}function D(t,n,i,a){const s=g(),c=j(i.plane),h=E(n,c);let x;if(Math.abs(h)>v.viewAngleThreshold)x=t.next(A(n,i.plane));else{const e=u(a.elevationAlignedTargetRenderSpace,i.basis1,b()),s=l(T,i.basis1),c=l(V,i.basis2);x=t.next(A(n,e)).next(e=>{const t=e=>{const t=m(o(w,e,i.origin),c),n=Math.acos(r(t/a.farDistanceRenderSpace,-1,1)),l=Math.sin(n)*a.farDistanceRenderSpace;return p(g(),i.origin,p(g(),f(w,s,l),f(H,c,t)))},n=t(e.renderStart),l=t(e.renderEnd);return{...e,renderStart:n,renderEnd:l}})}return x.next(r=>{"start"===r.action&&d(s,r.renderStart);const t=e(S(s,r.renderEnd,i.origin,c));return{...r,deltaAngle:t}})}function E(r,t){const n=T;r.renderCoordsHelper.toRenderCoords(r.camera.position,n);const i=R(r,n,r.camera.heading,r.camera.tilt,U()).direction;return e(c(i,t))-90}function M(e,r,n,o){return t(O,n,o),i(e,r,O)}function P(r,t,n){const i=t.elevationAlignedObserverRenderSpace,l=o(y,n,i),d=a(l)*t.metersPerUnit,p=r.renderCoordsHelper.basisMatrixAtPosition(i,B),f=s(I,p[8],p[9],p[10]),g=u(i,f,F),b=h(g,n,k),j=o(b,b,i),v=(a(j)<1e-4?90:e(c(l,j)))*(m(f,l)<0?-1:1)+90,x=s(q,p[4],p[5],p[6]),S=e(c(x,j)),A=s(z,p[0],p[1],p[2]);return{heading:m(j,A)<0?360-S:S,tilt:v,farDistance:d}}const T=g(),V=g(),w=g(),H=g(),O=n(),y=g(),I=g(),k=g(),q=g(),z=g(),B=n(),F=b();export{P as computeParametersFromTargetPoint,C as getViewshedRotationMatrix,M as rotateBy,D as screenToCircleAngle};