@arcgis/core 6.0.0-next.15 → 6.0.0-next.16

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 (337) hide show
  1. package/analysis/LineOfSightAnalysis.d.ts +49 -32
  2. package/analysis/LineOfSightAnalysisObserver.d.ts +19 -3
  3. package/analysis/LineOfSightAnalysisTarget.d.ts +19 -3
  4. package/analysis/Viewshed.d.ts +23 -3
  5. package/analysis/ViewshedAnalysis.d.ts +33 -13
  6. package/arcade/geometry/operatorsWorkerConnection.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/00d66e3fba5ab4d2aa3c.js +1 -0
  9. package/assets/esri/core/workers/chunks/{d994bcf0a65d1c07160f.js → 0320cbd825f9a4222042.js} +1 -1
  10. package/assets/esri/core/workers/chunks/14d5d219e7fe017f23f0.js +1 -0
  11. package/assets/esri/core/workers/chunks/164e74d586297946a717.js +1 -0
  12. package/assets/esri/core/workers/chunks/{1bca39e0e651426bdbb5.js → 1b1d3f6916d2cb751435.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{ed6e9d7f71bfd2691717.js → 1c77de1e79860f8d2228.js} +1 -1
  14. package/assets/esri/core/workers/chunks/1e40a26dcce4d1dadc28.js +1 -0
  15. package/assets/esri/core/workers/chunks/237a1f68a0efbfe5b77c.js +1 -0
  16. package/assets/esri/core/workers/chunks/23c43f09c4a4749516e1.js +1 -0
  17. package/assets/esri/core/workers/chunks/{3418877328f4f0830300.js → 24dac4970526a4e0ae63.js} +1 -1
  18. package/assets/esri/core/workers/chunks/26ceb0ff8d93dbb9b84f.js +1 -0
  19. package/assets/esri/core/workers/chunks/2acf2952cef69e382a35.js +1 -0
  20. package/assets/esri/core/workers/chunks/{481589c3eddad6e026ad.js → 369780276b2755361f7d.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{4df6cb1bee5d0720a43e.js → 36cbd614454581aaf334.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{1e0d2715d603f48a7e0b.js → 370aad23df597db80d65.js} +1 -1
  23. package/assets/esri/core/workers/chunks/3baa4a9c52f41bfd6abb.js +1 -0
  24. package/assets/esri/core/workers/chunks/42d44c7d532df5ee70e9.js +1 -0
  25. package/assets/esri/core/workers/chunks/42e985a576d7aaeed0cf.js +1 -0
  26. package/assets/esri/core/workers/chunks/{6400446b7615b97c3521.js → 45f826554499c38968c6.js} +1 -1
  27. package/assets/esri/core/workers/chunks/48cc58890fddbcf69cef.js +1 -0
  28. package/assets/esri/core/workers/chunks/494bd434fee9032e1d02.js +1 -0
  29. package/assets/esri/core/workers/chunks/{33e4ff228a8c81b99022.js → 4abd3753cd9b80e4d937.js} +1 -1
  30. package/assets/esri/core/workers/chunks/4bbe1f28f5f16a6bef05.js +1 -0
  31. package/assets/esri/core/workers/chunks/4c389472b8cdb0c55154.js +1 -0
  32. package/assets/esri/core/workers/chunks/4e4f747de424941a0bfa.js +1 -0
  33. package/assets/esri/core/workers/chunks/5529831dd891382c79df.js +1 -0
  34. package/assets/esri/core/workers/chunks/576248e9ae2654569420.js +1 -0
  35. package/assets/esri/core/workers/chunks/5acb422fe3cf693d9d4f.js +1 -0
  36. package/assets/esri/core/workers/chunks/{aeaaff7a4b1a99540f52.js → 5cb26bbaa08114aec5ce.js} +1 -1
  37. package/assets/esri/core/workers/chunks/661c6324529dd17b297e.js +1 -0
  38. package/assets/esri/core/workers/chunks/68dd1fd2025c7125ead1.js +1 -0
  39. package/assets/esri/core/workers/chunks/{89e76de5ae3328d821a4.js → 69f6d5997b8ff1326e39.js} +1 -1
  40. package/assets/esri/core/workers/chunks/6a8dd8b18b0b825b0c1b.js +1 -0
  41. package/assets/esri/core/workers/chunks/{a40b6d8b5c73e06e14d4.js → 6c255c029d67423e4dac.js} +1 -1
  42. package/assets/esri/core/workers/chunks/7446d0dfebf93e86c098.js +1 -0
  43. package/assets/esri/core/workers/chunks/{688f2dbf784e66082308.js → 74c866e0b66e61751861.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{3ffda5bf0b91700dc308.js → 78643f116677950ea29a.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{916b363c342b61ba5461.js → 787c1a8bda7d745633f2.js} +1 -1
  46. package/assets/esri/core/workers/chunks/7b5f3c79e0605c32b267.js +1 -0
  47. package/assets/esri/core/workers/chunks/7bbfe9ff352afc566367.js +1 -0
  48. package/assets/esri/core/workers/chunks/{ac5a6603f7fa78d3e4c8.js → 7e8611cb709f105946f5.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{05cd33d41d91f8d09633.js → 7fb7493f483cd9878bfa.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{acfa03c65ba3ca6c5685.js → 8715661a838361d4211a.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{601e1d020b8115497944.js → 8a485130781b49dbf608.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{0ccab50877b24f862d6e.js → 8ac2098ecdc40ad41055.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{a655ebdb4bf0660615a2.js → 8b4e9fd88c0c313416d4.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{4e544de61f07ca660236.js → 8c12269d26f5a4c753cb.js} +1 -1
  55. package/assets/esri/core/workers/chunks/91dd65cf877c8f2e01a7.js +1 -0
  56. package/assets/esri/core/workers/chunks/{46b4fb6a7fe4877b0efc.js → 94baa354e50c03b82b25.js} +2 -2
  57. package/assets/esri/core/workers/chunks/950d4578dc450467404c.js +1 -0
  58. package/assets/esri/core/workers/chunks/{68be3fb88ca61f82fb90.js → 95dbbddac6581b9d671f.js} +1 -1
  59. package/assets/esri/core/workers/chunks/98be2f621801e230aa01.js +1 -0
  60. package/assets/esri/core/workers/chunks/9b051745d24d1f43480b.js +1 -0
  61. package/assets/esri/core/workers/chunks/9d61740ef8bdcc162be1.js +1 -0
  62. package/assets/esri/core/workers/chunks/{eb04e1717a1002cda3ab.js → 9f06ec95bdf0d0b52b41.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{fafb92ca2c5e4b0b2c23.js → a09d2e1e2540921e4717.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{3b3e519f15ed52c83f0c.js → a49fe94933b65b4b64f8.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{1819c45655c836b9a8d7.js → a4d3944700f1cc240176.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{90bdf86f553e2742d67c.js → a7bd5ba4d7d97411fd33.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{900181f68449d8f82eeb.js → aa1ac7954e4f0fefe15b.js} +1 -1
  68. package/assets/esri/core/workers/chunks/ac24b4370dc7194a3107.js +1 -0
  69. package/assets/esri/core/workers/chunks/{b8337492e2b753aefac4.js → ace41659a5ca0e5abfc3.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{3c0ed15b544df6fb0903.js → b48952e1fb4cb7360dd0.js} +1 -1
  71. package/assets/esri/core/workers/chunks/b5e7475cc5fbf31289d3.js +1 -0
  72. package/assets/esri/core/workers/chunks/{f3da30d7300b92bd8bb0.js → befa32b9e7b3fbdd431e.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{0f617980c7dd9ad0444f.js → bf35927979fc5e7e0478.js} +1 -1
  74. package/assets/esri/core/workers/chunks/c4ddac23bd649d24f3f2.js +1 -0
  75. package/assets/esri/core/workers/chunks/{4e6f40cbdb8c508e6df1.js → c5a9e77977e867a75ff2.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{25f19fc929f25ddd628c.js → c79934cd6883307203f8.js} +1 -1
  77. package/assets/esri/core/workers/chunks/cddc3e285f763ccf33c2.js +1 -0
  78. package/assets/esri/core/workers/chunks/d08ff41e2a9bcd58b64a.js +1 -0
  79. package/assets/esri/core/workers/chunks/d311ff96a5a2791d8cfc.js +1 -0
  80. package/assets/esri/core/workers/chunks/d62afb71f4ece4283994.js +1 -0
  81. package/assets/esri/core/workers/chunks/dc1761cba0454fda3cf9.js +1 -0
  82. package/assets/esri/core/workers/chunks/{4ac1d3e49e242e373a92.js → e0650b1408197d3ac862.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{3ff6d1ed3c0f1285f3e7.js → e0d9dc97985561320bd4.js} +1 -1
  84. package/assets/esri/core/workers/chunks/eaddffcc7004101fc230.js +1 -0
  85. package/assets/esri/core/workers/chunks/eb2652ec48faa78de3c5.js +1 -0
  86. package/assets/esri/core/workers/chunks/eca44e53bcee9b08d70a.js +1 -0
  87. package/assets/esri/core/workers/chunks/f00458654c7c34c369ef.js +1 -0
  88. package/assets/esri/core/workers/chunks/f3cd610084e3f4d8656b.js +1 -0
  89. package/assets/esri/core/workers/chunks/f47fe4433b05fca5c3ad.js +1 -0
  90. package/assets/esri/core/workers/chunks/f7bfa3d33b05b250ce33.js +1 -0
  91. package/assets/esri/core/workers/chunks/f91bc1cb1014e05be763.js +1 -0
  92. package/assets/esri/core/workers/chunks/{ae31fd416bbb41a81392.js → f9c5aa0bbf23e780fecc.js} +1 -1
  93. package/assets/esri/core/workers/chunks/f9ff27cfcf0538ac5e26.js +1 -0
  94. package/assets/esri/core/workers/chunks/{19676b2c5f8b0a5ee680.js → facd1ff23203fed67686.js} +1 -1
  95. package/assets/esri/core/workers/chunks/{40a584cb952e94326e9e.js → fcb86d24fc7e0666b564.js} +1 -1
  96. package/chunks/Distance2DCalculator-DjIp2uQi.js +1 -1
  97. package/chunks/Envelope.js +1 -1
  98. package/chunks/MultiPathImpl.js +1 -1
  99. package/chunks/OperatorGeodeticArea.js +1 -1
  100. package/chunks/OperatorShapePreservingLength.js +1 -1
  101. package/chunks/OperatorShapePreservingProject.js +1 -1
  102. package/chunks/UnitFactory.js +1 -1
  103. package/chunks/basis_encoder.js +1 -1
  104. package/chunks/basis_transcoder.js +1 -1
  105. package/chunks/index.js +1 -1
  106. package/chunks/lclayout.js +1 -1
  107. package/config.d.ts +2 -0
  108. package/config.js +1 -1
  109. package/core/accessorSupport/DefaultsStore.js +1 -1
  110. package/core/accessorSupport/MultiOriginStore.js +1 -1
  111. package/core/accessorSupport/Store.js +1 -1
  112. package/core/accessorSupport/decorators/reader.js +1 -1
  113. package/core/accessorSupport/decorators/writer.js +1 -1
  114. package/core/workers/WorkerOwner.js +1 -1
  115. package/core/workers/workerFactory.js +1 -1
  116. package/core/workers/workers.js +2 -2
  117. package/core/workers.d.ts +9 -0
  118. package/form/elements/inputs/DynamicChoiceInput.d.ts +4 -2
  119. package/geometry/Mesh.js +1 -1
  120. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  121. package/geometry/operators/gx/operatorOffset.js +1 -1
  122. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  123. package/geometry/operators/support/jsonConverter.js +1 -1
  124. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  125. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  126. package/geometry/support/meshUtils/merge.js +1 -1
  127. package/geometry/support/meshUtils/rotate.js +1 -1
  128. package/geometry/support/polygonExtentClipping.js +1 -1
  129. package/identity/Credential.js +1 -1
  130. package/kernel.js +1 -1
  131. package/layers/AnnotationFeatureLayer.d.ts +2 -2
  132. package/layers/AnnotationFeatureLayer.js +1 -1
  133. package/layers/CatalogLayer.d.ts +2 -2
  134. package/layers/CatalogLayer.js +1 -1
  135. package/layers/DimensionFeatureLayer.d.ts +2 -2
  136. package/layers/DimensionFeatureLayer.js +1 -1
  137. package/layers/FeatureLayer.d.ts +4 -4
  138. package/layers/FeatureLayer.js +1 -1
  139. package/layers/ImageryTileLayer.js +1 -1
  140. package/layers/LineOfSightLayer.d.ts +10 -8
  141. package/layers/SceneLayer.js +1 -1
  142. package/layers/SubtypeGroupLayer.d.ts +2 -2
  143. package/layers/SubtypeGroupLayer.js +1 -1
  144. package/layers/ViewshedLayer.d.ts +1 -1
  145. package/layers/VoxelLayer.js +1 -1
  146. package/layers/WMSLayer.js +1 -1
  147. package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
  148. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +9 -9
  149. package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
  150. package/layers/geospatialPDF/LGIDictMapFrame.js +1 -1
  151. package/layers/geospatialPDF/ViewportMeasureFrame.js +1 -1
  152. package/layers/geospatialPDF/geospatialPDFParserUtils.js +1 -1
  153. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  154. package/layers/graphics/data/QueryEngineResult.js +1 -1
  155. package/layers/graphics/sources/connections/WebSocketConnection.js +1 -1
  156. package/layers/graphics/sources/parquet/FileProvider.js +1 -1
  157. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  158. package/layers/mixins/{FeatureLayerReload.d.ts → ReloadableLayer.d.ts} +5 -3
  159. package/layers/mixins/ReloadableLayer.js +2 -0
  160. package/layers/raster/datasets/BaseRaster.js +1 -1
  161. package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
  162. package/layers/raster/datasets/ImageAuxRaster.js +2 -2
  163. package/layers/raster/datasets/ImageServerRaster.js +1 -1
  164. package/layers/raster/datasets/InMemoryRaster.js +1 -1
  165. package/layers/raster/datasets/MRFRaster.js +1 -1
  166. package/layers/raster/datasets/TIFFRaster.js +1 -1
  167. package/layers/raster/datasets/WCSRaster.js +1 -1
  168. package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
  169. package/layers/raster/formats/RasterCodec.js +1 -1
  170. package/layers/raster/formats/TiffDecoder.js +1 -1
  171. package/layers/raster/formats/Zlib.js +1 -1
  172. package/layers/raster/functions/stretchUtils.js +1 -1
  173. package/layers/raster/functions/vectorFieldUtils.js +1 -1
  174. package/layers/support/FieldsIndex.js +1 -1
  175. package/layers/support/RasterWorker.js +1 -1
  176. package/layers/support/featureReductionProperties.js +1 -1
  177. package/layers/support/kmlUtils.js +1 -1
  178. package/layers/video/VideoController.js +10 -10
  179. package/libs/maquette/projection.js +1 -1
  180. package/networks/UtilityNetworkTraceAnalysis.js +1 -1
  181. package/package.json +5 -5
  182. package/popup/FeatureModel.js +1 -1
  183. package/popup/FeaturesModel.js +1 -1
  184. package/portal/Portal.js +1 -1
  185. package/request/process.js +1 -1
  186. package/request/types.d.ts +7 -0
  187. package/rest/knowledgeGraphService.js +1 -1
  188. package/rest/networks/trace.js +1 -1
  189. package/rest/query/executeQuery.js +1 -1
  190. package/smartMapping/raster/renderers/shadedRelief.js +1 -1
  191. package/smartMapping/renderers/univariateColorSize.js +1 -1
  192. package/smartMapping/statistics/support/statsWorker.js +1 -1
  193. package/smartMapping/statistics/support/utils.js +1 -1
  194. package/smartMapping/support/clusterUtils.js +1 -1
  195. package/statistics/utils.js +1 -1
  196. package/symbols/cim/CIMCursor.js +1 -1
  197. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  198. package/symbols/cim/cimAnalyzer.js +1 -1
  199. package/symbols/support/ElevationInfo.d.ts +4 -3
  200. package/undoredo/support/Services.js +1 -1
  201. package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +2 -2
  202. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  203. package/views/2d/grid/GridView2D.js +1 -1
  204. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  205. package/views/2d/layers/features/sources/strategies/FeatureHybridTileLoadStrategy.js +1 -1
  206. package/views/2d/layers/features/sources/strategies/FeaturePagedTileLoadStrategy.js +1 -1
  207. package/views/2d/layers/features/sources/strategies/FeatureSnapshotLoadStrategy.js +1 -1
  208. package/views/2d/viewpointUtils.js +1 -1
  209. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  210. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  211. package/views/3d/analysis/LineOfSight/types.d.ts +14 -3
  212. package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +39 -13
  213. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  214. package/views/3d/analysis/Viewshed/types.d.ts +7 -0
  215. package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +43 -15
  216. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  217. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  218. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  219. package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
  220. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  221. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  222. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  223. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  224. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  225. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  226. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  227. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  228. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  229. package/views/3d/layers/graphics/SpatialIndex2D.js +1 -1
  230. package/views/3d/layers/i3s/I3SNode.js +1 -1
  231. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  232. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  233. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  234. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  235. package/views/3d/layers/support/FeatureTileFetcher3DDebugger.js +1 -1
  236. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  237. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  238. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  239. package/views/3d/support/elevationUpdateExtentUtils.js +1 -1
  240. package/views/3d/support/elevationUpdateUtils.js +1 -1
  241. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  242. package/views/3d/support/sphereExtentUtils.js +2 -0
  243. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  244. package/views/3d/terrain/OverlayRenderer.js +1 -1
  245. package/views/3d/terrain/PatchRenderData.js +1 -1
  246. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  247. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  248. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  249. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  250. package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
  251. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  252. package/views/SceneView.js +1 -1
  253. package/views/ToolViewManager.js +1 -1
  254. package/views/draw/DrawOperation.js +1 -1
  255. package/views/draw/support/InteractiveHandle.js +1 -1
  256. package/views/draw/support/Reshape.js +1 -1
  257. package/views/draw/support/createUtils.js +1 -1
  258. package/views/draw/support/editingSessionUtils.js +1 -1
  259. package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
  260. package/views/interactive/SegmentLabels.js +1 -1
  261. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  262. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  263. package/views/interactive/editGeometry/operations/SetAllVertexPositions.js +1 -1
  264. package/views/interactive/editGeometry/operations/UndoGroup.js +1 -1
  265. package/views/interactive/options/TooltipOptions.d.ts +2 -0
  266. package/views/interactive/sketch/SketchTooltipOptions.d.ts +2 -0
  267. package/views/interactive/sketch/constraintUtils.js +1 -1
  268. package/views/interactive/snapping/SnappingDragPipelineStep.js +1 -1
  269. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  270. package/views/layers/LayerView.js +1 -1
  271. package/views/layers/LineOfSightLayerView.d.ts +35 -13
  272. package/views/layers/SketchLayerView.d.ts +1 -0
  273. package/views/layers/ViewshedLayerView.d.ts +36 -12
  274. package/views/webgl/Program.js +1 -1
  275. package/views/webgl/Texture.js +1 -1
  276. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  277. package/widgets/Directions.js +1 -1
  278. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  279. package/widgets/Editor/legacy/CreateFeaturesWorkflow.js +1 -1
  280. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  281. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  282. package/widgets/FeatureTable/support/GroupColumnTemplate.js +1 -1
  283. package/widgets/FeatureTable/support/TableTemplate.js +1 -1
  284. package/widgets/Print.js +1 -1
  285. package/widgets/Slice.js +1 -1
  286. package/widgets/UtilityNetworkTraceAnalysis/UtilityNetworkTraceAnalysisViewModel.js +1 -1
  287. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  288. package/widgets/support/SelectionList.js +1 -1
  289. package/widgets/support/componentsUtils.js +1 -1
  290. package/assets/esri/core/workers/chunks/024b44c0c8876627f904.js +0 -1
  291. package/assets/esri/core/workers/chunks/02c5d027bdaee67869cf.js +0 -1
  292. package/assets/esri/core/workers/chunks/03261b9451e293a0fac8.js +0 -1
  293. package/assets/esri/core/workers/chunks/0c8c01097847617261b9.js +0 -1
  294. package/assets/esri/core/workers/chunks/0d931c7579b6409a696d.js +0 -1
  295. package/assets/esri/core/workers/chunks/12c154342fff876f2f1e.js +0 -1
  296. package/assets/esri/core/workers/chunks/1e11d2e97d17685b878a.js +0 -1
  297. package/assets/esri/core/workers/chunks/1f339247b68b061ab0a4.js +0 -1
  298. package/assets/esri/core/workers/chunks/21ddb26526bcb2b122c3.js +0 -1
  299. package/assets/esri/core/workers/chunks/2eae542fe7f0f6576ac1.js +0 -1
  300. package/assets/esri/core/workers/chunks/444e5f214abce3d607cd.js +0 -1
  301. package/assets/esri/core/workers/chunks/46a7da93a63663878583.js +0 -1
  302. package/assets/esri/core/workers/chunks/4a1e23e021bac37a88ab.js +0 -1
  303. package/assets/esri/core/workers/chunks/4c4117e28ea358a32088.js +0 -1
  304. package/assets/esri/core/workers/chunks/54b18559280a7d2a8d93.js +0 -1
  305. package/assets/esri/core/workers/chunks/59b216b60464611742d4.js +0 -1
  306. package/assets/esri/core/workers/chunks/62ac588f7dd1d24d0c9d.js +0 -1
  307. package/assets/esri/core/workers/chunks/62c8c9ad09e0166207fd.js +0 -1
  308. package/assets/esri/core/workers/chunks/62d6e101e9bd9557a410.js +0 -1
  309. package/assets/esri/core/workers/chunks/6558488ea96620439f34.js +0 -1
  310. package/assets/esri/core/workers/chunks/665e31c494d2af505acc.js +0 -1
  311. package/assets/esri/core/workers/chunks/6f4e6022a52de0c54aab.js +0 -1
  312. package/assets/esri/core/workers/chunks/7267b17de212207142c9.js +0 -1
  313. package/assets/esri/core/workers/chunks/7ef182e24cad50815b4e.js +0 -1
  314. package/assets/esri/core/workers/chunks/8293600f94553afc8c38.js +0 -1
  315. package/assets/esri/core/workers/chunks/8431ca60ad33d594e323.js +0 -1
  316. package/assets/esri/core/workers/chunks/876f7633c15f1e31078d.js +0 -1
  317. package/assets/esri/core/workers/chunks/8ca9648eacb894283513.js +0 -1
  318. package/assets/esri/core/workers/chunks/91ebb2ccab1889eb7e81.js +0 -1
  319. package/assets/esri/core/workers/chunks/94e427040edb469d58ad.js +0 -1
  320. package/assets/esri/core/workers/chunks/9ce91a909eccc4dfe388.js +0 -1
  321. package/assets/esri/core/workers/chunks/9e1a3b6a08c96dcefdde.js +0 -1
  322. package/assets/esri/core/workers/chunks/9e3e442a9874ed23a043.js +0 -1
  323. package/assets/esri/core/workers/chunks/ad76f7ab2f3e6d5a5b3c.js +0 -1
  324. package/assets/esri/core/workers/chunks/aff32980d91dab07dfb7.js +0 -1
  325. package/assets/esri/core/workers/chunks/bbf993dba74850bbf9d7.js +0 -1
  326. package/assets/esri/core/workers/chunks/d8f1cefcad02d7353d4b.js +0 -1
  327. package/assets/esri/core/workers/chunks/d938987344bce83cc660.js +0 -1
  328. package/assets/esri/core/workers/chunks/ddf0671976648f621269.js +0 -1
  329. package/assets/esri/core/workers/chunks/de02f60258e6985ef676.js +0 -1
  330. package/assets/esri/core/workers/chunks/e10b57aefcc89671116e.js +0 -1
  331. package/assets/esri/core/workers/chunks/e65dfa19f030ec298437.js +0 -1
  332. package/assets/esri/core/workers/chunks/ed8786fed345718ed684.js +0 -1
  333. package/assets/esri/core/workers/chunks/f122c18af10e56f9ec2b.js +0 -1
  334. package/assets/esri/core/workers/chunks/f92364afaefbac7e8f77.js +0 -1
  335. package/assets/esri/core/workers/chunks/fd9663952d5a94f3a83f.js +0 -1
  336. package/assets/esri/core/workers/chunks/fe9879ecd69ac4329291.js +0 -1
  337. package/layers/mixins/FeatureLayerReload.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{createTask as e}from"../../../core/asyncUtils.js";import{throwIfAborted as t,isAborted as n,isAbortError as r}from"../../../core/promiseUtils.js";import{whenOnce as i}from"../../../core/reactiveUtils.js";import{diff as a}from"../../../core/accessorSupport/diffUtils.js";import{isGraphicsLayer as o,isSceneLayer as s}from"../../../layers/support/layerUtils.js";import{getDisplayedSymbol as c}from"../../../symbols/support/symbolUtils.js";import{GraphicState as l}from"../../3d/layers/graphics/GraphicState.js";async function u(e,n,r,i){let a=n.createQuery();a.objectIds=e,a.outFields=[`*`],a.returnM=n.capabilities.data.supportsM,a.returnZ=n.capabilities.data.supportsZ,a.returnGeometry=!0,(!s(n)||n.infoFor3D==null)&&(a.outSpatialReference=r),!s(n)&&n.capabilities?.data.supportsTrueCurve&&(a.returnTrueCurves=!0);let o=await n.queryFeatures(a,{signal:i});return t(i),o.features}async function d(e,n,r){let i=await c(e,{useSourceLayer:!0,ignoreGraphicSymbol:!0,scale:n});t(r),a(e.symbol,i)!=null&&(e.symbol=i)}async function f(a,s,c,l,u){t(u),a.graphics.includes(l)||a.add(l);let d=c.sourceLayer,f=c.layer??d,h=c.getObjectId(),g=null,_=null;function v(r){return g?.abort(),o(f)?(c.visible=r,Promise.resolve()):(g=e(async e=>{let i=await p(s,f);if(t(e),!(!i||s.destroyed||i.destroyed))try{h!=null&&typeof h==`number`&&`setVisibility`in i&&i.setVisibility?.(h,r)}catch(t){if(n(e)||s.destroyed||i.destroyed)return;throw t}}),g.promise)}async function y(){return _||(_=(async()=>{try{await v(!0);let e=s.destroyed?null:await p(s,f).catch(()=>{});e&&!e.destroyed&&await i(()=>!e.updating)}catch(e){if(e&&!r(e))throw e}finally{a.remove(l)}})(),s.addUpdatingPromise(_).catch(()=>{}),_)}try{await m(s,l,u),t(u),v(!1).catch(()=>{})}catch(e){throw await y(),e}let b=async()=>y().catch(()=>{});return{remove:b,[Symbol.asyncDispose](){return b()}}}async function p(e,t){if(!t||t.type===`building-component`)return;let n=t.type===`subtype-sublayer`?t.parent:t;return n?e.whenLayerView(n):void 0}async function m(e,t,n){if(e.type===`3d`){let r=new l({graphic:t}),a=e.trackGraphicState(r);try{await i(()=>r.displaying||r.error,n)}finally{a.remove()}}else await i(()=>t.visible,n)}export{u as fetchFullFeaturesByObjectId,f as swapForEditingSession,d as updateGraphicSymbolWhenRequired};
2
+ import{createTask as e}from"../../../core/asyncUtils.js";import{throwIfAborted as t,isAborted as n,isAbortError as r}from"../../../core/promiseUtils.js";import{whenOnce as i}from"../../../core/reactiveUtils.js";import{diff as a}from"../../../core/accessorSupport/diffUtils.js";import{isGraphicsLayer as o,isSceneLayer as s}from"../../../layers/support/layerUtils.js";import{getDisplayedSymbol as c}from"../../../symbols/support/symbolUtils.js";import{GraphicState as l}from"../../3d/layers/graphics/GraphicState.js";async function u(e,n,r,i){let a=n.createQuery();a.objectIds=e,a.outFields=[`*`],a.returnM=n.capabilities.data.supportsM,a.returnZ=n.capabilities.data.supportsZ,a.returnGeometry=!0,s(n)&&n.infoFor3D!=null||(a.outSpatialReference=r),!s(n)&&n.capabilities?.data.supportsTrueCurve&&(a.returnTrueCurves=!0);let o=await n.queryFeatures(a,{signal:i});return t(i),o.features}async function d(e,n,r){let i=await c(e,{useSourceLayer:!0,ignoreGraphicSymbol:!0,scale:n});t(r),a(e.symbol,i)!=null&&(e.symbol=i)}async function f(a,s,c,l,u){t(u),a.graphics.includes(l)||a.add(l);let d=c.sourceLayer,f=c.layer??d,h=c.getObjectId(),g=null,_=null;function v(r){return g?.abort(),o(f)?(c.visible=r,Promise.resolve()):(g=e(async e=>{let i=await p(s,f);if(t(e),!(!i||s.destroyed||i.destroyed))try{h!=null&&typeof h==`number`&&`setVisibility`in i&&i.setVisibility?.(h,r)}catch(t){if(n(e)||s.destroyed||i.destroyed)return;throw t}}),g.promise)}async function y(){return _||(_=(async()=>{try{await v(!0);let e=s.destroyed?null:await p(s,f).catch(()=>{});e&&!e.destroyed&&await i(()=>!e.updating)}catch(e){if(e&&!r(e))throw e}finally{a.remove(l)}})(),s.addUpdatingPromise(_).catch(()=>{}),_)}try{await m(s,l,u),t(u),v(!1).catch(()=>{})}catch(e){throw await y(),e}let b=async()=>y().catch(()=>{});return{remove:b,[Symbol.asyncDispose](){return b()}}}async function p(e,t){if(!t||t.type===`building-component`)return;let n=t.type===`subtype-sublayer`?t.parent:t;return n?e.whenLayerView(n):void 0}async function m(e,t,n){if(e.type===`3d`){let r=new l({graphic:t}),a=e.trackGraphicState(r);try{await i(()=>r.displaying||r.error,n)}finally{a.remove()}}else await i(()=>t.visible,n)}export{u as fetchFullFeaturesByObjectId,f as swapForEditingSession,d as updateGraphicSymbolWhenRequired};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import n from"../../../../core/Collection.js";import{getOrCreateMapValue as r}from"../../../../core/MapUtils.js";import i from"../../../../core/ReactiveMap.js";import{watch as a}from"../../../../core/reactiveUtils.js";import{createScreenPoint as o}from"../../../../core/screenUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{DrawManipulator as l}from"../../DrawManipulator.js";import{InteractiveHandle as u}from"../InteractiveHandle.js";import{ManipulatorCollection as d}from"../../../interactive/ManipulatorCollection.js";const f=Symbol(`manipulator-handle-watch`);let p=class extends t{constructor(e){super(e),this._pluginConstraintRegistry=new i,this._pluginHandleRegistry=new i,this._handleManipulatorMap=new n,this.renderer=null,this.manipulators=new d,this.view=null,this.capturingHandle=null}initialize(){super.initialize()}destroy(){this._pluginConstraintRegistry.clear(),this._pluginHandleRegistry.forEach(e=>e.drain(e=>e.destroy())),this._pluginHandleRegistry.clear(),this._handleManipulatorMap.removeAll()}get customConstraints(){return Array.from(this._pluginConstraintRegistry.values()).flatMap(e=>Array.from(e.values()))}get focusedHandle(){return this.capturingHandle??this._handleManipulatorMap.find(({handle:e,manipulator:t})=>e.dragging||t.grabbing||t.selected||t.hovering)?.handle}get handleCount(){return this._handleManipulatorMap.length}get allhandles(){return this._handleManipulatorMap.map(({handle:e})=>e).toArray()}cycleManipulator(e){let{capturingHandle:t,_handleManipulatorMap:n}=this;if(!t){this.followHandle(n.at(0)?.handle);return}let r=n.findIndex(({handle:e})=>e===t),i=e===`forward`?r+1:r-1;this.followHandle(n.at(i%n.length)?.handle)}toggleFollow(){let e=this.capturingHandle;if(e)return this.releaseHandle(e),!0;let t=this._handleManipulatorMap.find(e=>e.handle.defaultCaptureMode!==`grabbable-object`)?.handle;return t?(this.followHandle(t),!0):!1}shouldCaptureInput(e=null,t=null){let n=this.capturingHandle;return!n||!(e!=null&&n.activePointerId!=null&&n.activePointerId!==e||t===`touch`&&n.activePointerType===`pen`)}notePointerDown(e=null,t=null){this.shouldCaptureInput(e,t)&&this.capturingHandle?.notePointerDown(e,t)}notePointerUp(e=null,t=null){this.capturingHandle?.notePointerUp(e,t)}releaseHandle(e){e&&(e.captureMode=`grabbable-object`,e.drawToolDragging=!1),(!e||e===this.capturingHandle)&&(this.capturingHandle&&(this.capturingHandle.drawToolDragging=!1,this.capturingHandle.captureMode=`grabbable-object`),this.capturingHandle=null)}followHandle(e){this._handleManipulatorMap.forEach(({handle:e})=>{e.captureMode!==`grabbable-object`&&(e.captureMode=`grabbable-object`)}),e&&(e.captureMode=e.defaultCaptureMode===`grabbable-object`?`capture-always`:e.defaultCaptureMode),e?.captureMode!==`grabbable-object`&&(this.capturingHandle=e)}findHandleByManipulator(e,t){let n=null,r=Number.MAX_VALUE;return this._handleManipulatorMap.forEach(({handle:i,manipulator:a})=>{if(i.captureMode!==`grabbable-object`||!a.interactive)return;let o=a.intersectionDistance(e,t);o!=null&&o<r&&(r=o,n=i)}),n}findHandleDragging(){return this._handleManipulatorMap.find(({handle:e})=>e.dragging)?.handle}async setupManipulatorForHandle(e,t,n){let{view:r}=this,{surfaceManager:i}=n,s=n.editGeometryOperations?.data.coordinateHelper;if(!r||!i||!s)return;let c=await this._createManipulator(r,this.renderer,e);if(this.destroyed||e.destroyed){c.destroy();return}this._handleManipulatorMap.push({handle:e,manipulator:c}),this.manipulators.add(c),e.addHandles([a(()=>c.dragging,t=>{e.manipulatorDragging=t,t||this.releaseHandle(e)})],f),e.following&&(this.capturingHandle=e);let l=(e.inputMapPosition&&i.mapToScreen(e.inputMapPosition,{firstPointZ:e.firstPointZ}))??e.screenPosition??t??o(r?.width/2,r.height/2);await e?.moveTo(l,{...n,pointerType:`mouse`})}removeManipulatorForHandle(e){let t=this._handleManipulatorMap.find(t=>t.handle===e);t&&(this.manipulators.remove(t.manipulator),this._handleManipulatorMap.remove(t),t.manipulator.destroy()),e.removeHandles(f)}registerHandle(e,t){let i=r(this._pluginHandleRegistry,e,()=>new n),a=new u(t);return i.push(a),a}unregisterHandle(e,t){let n=this._pluginHandleRegistry.get(e);n&&(t?(n.remove(t),this.removeManipulatorForHandle(t),t.destroy()):(n.drain(e=>{this.removeManipulatorForHandle(e),e.destroy()}),this._pluginHandleRegistry.delete(e)))}registerCustomConstraint(e,t,n){r(this._pluginConstraintRegistry,e,()=>new i).set(t,n)}unregisterCustomConstraint(e,t){t?this._pluginConstraintRegistry.get(e)?.delete(t):(this._pluginConstraintRegistry.get(e)?.clear(),this._pluginConstraintRegistry.delete(e))}replaceEditSessions(e,t){let n=this._pluginHandleRegistry.get(e);if(n)for(let e of n)e.editSession=t}updateAllScreenPositions(e=null){let{view:t}=this;this._handleManipulatorMap.forEach(({handle:n})=>{let r=n.outputMapPosition;r&&(n.screenPosition=e?.mapToScreen(r,{firstPointZ:n.firstPointZ})??t?.toScreen(r))})}reapplyPositions(e){this._handleManipulatorMap.forEach(({handle:t})=>t.refreshConstraint(e))}async _createManipulator(e,t,n){if(e.type===`3d`){let{DrawManipulator3D:r}=await import(`../../DrawManipulator3D.js`);return new r({view:e,renderer:t,managedHandle:n})}return new l({renderer:t,managedHandle:n})}};e([s({constructOnly:!0})],p.prototype,`renderer`,void 0),e([s({readOnly:!0})],p.prototype,`manipulators`,void 0),e([s({constructOnly:!0})],p.prototype,`view`,void 0),e([s()],p.prototype,`capturingHandle`,void 0),e([s()],p.prototype,`customConstraints`,null),e([s()],p.prototype,`focusedHandle`,null),e([s()],p.prototype,`handleCount`,null),e([s()],p.prototype,`allhandles`,null),p=e([c(`esri.views.draw.support.managers.InteractiveHandleManager`)],p);export{p as InteractiveHandleManager};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import n from"../../../../core/Collection.js";import{getOrCreateMapValue as r}from"../../../../core/MapUtils.js";import i from"../../../../core/ReactiveMap.js";import{watch as a}from"../../../../core/reactiveUtils.js";import{createScreenPoint as o}from"../../../../core/screenUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{DrawManipulator as l}from"../../DrawManipulator.js";import{InteractiveHandle as u}from"../InteractiveHandle.js";import{ManipulatorCollection as d}from"../../../interactive/ManipulatorCollection.js";const f=Symbol(`manipulator-handle-watch`);let p=class extends t{constructor(e){super(e),this._pluginConstraintRegistry=new i,this._pluginHandleRegistry=new i,this._handleManipulatorMap=new n,this.renderer=null,this.manipulators=new d,this.view=null,this.capturingHandle=null}initialize(){super.initialize()}destroy(){this._pluginConstraintRegistry.clear(),this._pluginHandleRegistry.forEach(e=>e.drain(e=>e.destroy())),this._pluginHandleRegistry.clear(),this._handleManipulatorMap.removeAll()}get customConstraints(){return Array.from(this._pluginConstraintRegistry.values()).flatMap(e=>Array.from(e.values()))}get focusedHandle(){return this.capturingHandle??this._handleManipulatorMap.find(({handle:e,manipulator:t})=>e.dragging||t.grabbing||t.selected||t.hovering)?.handle}get handleCount(){return this._handleManipulatorMap.length}get allhandles(){return this._handleManipulatorMap.map(({handle:e})=>e).toArray()}cycleManipulator(e){let{capturingHandle:t,_handleManipulatorMap:n}=this;if(!t){this.followHandle(n.at(0)?.handle);return}let r=n.findIndex(({handle:e})=>e===t),i=e===`forward`?r+1:r-1;this.followHandle(n.at(i%n.length)?.handle)}toggleFollow(){let e=this.capturingHandle;if(e)return this.releaseHandle(e),!0;let t=this._handleManipulatorMap.find(e=>e.handle.defaultCaptureMode!==`grabbable-object`)?.handle;return t?(this.followHandle(t),!0):!1}shouldCaptureInput(e=null,t=null){let n=this.capturingHandle;return!n||!(e!=null&&n.activePointerId!=null&&n.activePointerId!==e||t===`touch`&&n.activePointerType===`pen`)}notePointerDown(e=null,t=null){this.shouldCaptureInput(e,t)&&this.capturingHandle?.notePointerDown(e,t)}notePointerUp(e=null,t=null){this.capturingHandle?.notePointerUp(e,t)}releaseHandle(e){e&&(e.captureMode=`grabbable-object`,e.drawToolDragging=!1),e&&e!==this.capturingHandle||(this.capturingHandle&&(this.capturingHandle.drawToolDragging=!1,this.capturingHandle.captureMode=`grabbable-object`),this.capturingHandle=null)}followHandle(e){this._handleManipulatorMap.forEach(({handle:e})=>{e.captureMode!==`grabbable-object`&&(e.captureMode=`grabbable-object`)}),e&&(e.captureMode=e.defaultCaptureMode===`grabbable-object`?`capture-always`:e.defaultCaptureMode),e?.captureMode!==`grabbable-object`&&(this.capturingHandle=e)}findHandleByManipulator(e,t){let n=null,r=Number.MAX_VALUE;return this._handleManipulatorMap.forEach(({handle:i,manipulator:a})=>{if(i.captureMode!==`grabbable-object`||!a.interactive)return;let o=a.intersectionDistance(e,t);o!=null&&o<r&&(r=o,n=i)}),n}findHandleDragging(){return this._handleManipulatorMap.find(({handle:e})=>e.dragging)?.handle}async setupManipulatorForHandle(e,t,n){let{view:r}=this,{surfaceManager:i}=n,s=n.editGeometryOperations?.data.coordinateHelper;if(!r||!i||!s)return;let c=await this._createManipulator(r,this.renderer,e);if(this.destroyed||e.destroyed){c.destroy();return}this._handleManipulatorMap.push({handle:e,manipulator:c}),this.manipulators.add(c),e.addHandles([a(()=>c.dragging,t=>{e.manipulatorDragging=t,t||this.releaseHandle(e)})],f),e.following&&(this.capturingHandle=e);let l=(e.inputMapPosition&&i.mapToScreen(e.inputMapPosition,{firstPointZ:e.firstPointZ}))??e.screenPosition??t??o(r?.width/2,r.height/2);await e?.moveTo(l,{...n,pointerType:`mouse`})}removeManipulatorForHandle(e){let t=this._handleManipulatorMap.find(t=>t.handle===e);t&&(this.manipulators.remove(t.manipulator),this._handleManipulatorMap.remove(t),t.manipulator.destroy()),e.removeHandles(f)}registerHandle(e,t){let i=r(this._pluginHandleRegistry,e,()=>new n),a=new u(t);return i.push(a),a}unregisterHandle(e,t){let n=this._pluginHandleRegistry.get(e);n&&(t?(n.remove(t),this.removeManipulatorForHandle(t),t.destroy()):(n.drain(e=>{this.removeManipulatorForHandle(e),e.destroy()}),this._pluginHandleRegistry.delete(e)))}registerCustomConstraint(e,t,n){r(this._pluginConstraintRegistry,e,()=>new i).set(t,n)}unregisterCustomConstraint(e,t){t?this._pluginConstraintRegistry.get(e)?.delete(t):(this._pluginConstraintRegistry.get(e)?.clear(),this._pluginConstraintRegistry.delete(e))}replaceEditSessions(e,t){let n=this._pluginHandleRegistry.get(e);if(n)for(let e of n)e.editSession=t}updateAllScreenPositions(e=null){let{view:t}=this;this._handleManipulatorMap.forEach(({handle:n})=>{let r=n.outputMapPosition;r&&(n.screenPosition=e?.mapToScreen(r,{firstPointZ:n.firstPointZ})??t?.toScreen(r))})}reapplyPositions(e){this._handleManipulatorMap.forEach(({handle:t})=>t.refreshConstraint(e))}async _createManipulator(e,t,n){if(e.type===`3d`){let{DrawManipulator3D:r}=await import(`../../DrawManipulator3D.js`);return new r({view:e,renderer:t,managedHandle:n})}return new l({renderer:t,managedHandle:n})}};e([s({constructOnly:!0})],p.prototype,`renderer`,void 0),e([s({readOnly:!0})],p.prototype,`manipulators`,void 0),e([s({constructOnly:!0})],p.prototype,`view`,void 0),e([s()],p.prototype,`capturingHandle`,void 0),e([s()],p.prototype,`customConstraints`,null),e([s()],p.prototype,`focusedHandle`,null),e([s()],p.prototype,`handleCount`,null),e([s()],p.prototype,`allhandles`,null),p=e([c(`esri.views.draw.support.managers.InteractiveHandleManager`)],p);export{p as InteractiveHandleManager};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../Color.js";import{onLocaleChange as n}from"../../intl.js";import r from"../../core/Accessor.js";import{createTask as i}from"../../core/asyncUtils.js";import{multiplyOpacity as a,getContrast as o}from"../../core/colorUtils.js";import{makeHandle as s}from"../../core/handleUtils.js";import"../../core/has.js";import{getOrCreateMapValue as c}from"../../core/MapUtils.js";import{deg2rad as l}from"../../core/mathUtils.js";import{debounce as u}from"../../core/promiseUtils.js";import{formatLength as d}from"../../core/quantityFormatUtils.js";import{on as f}from"../../core/reactiveUtils.js";import{createScreenPointArray as p}from"../../core/screenUtils.js";import{getMetersPerUnit as m,getMetersPerVerticalUnitForSR as h}from"../../core/units.js";import{property as g,subclass as _}from"../../core/accessorSupport/decorators.js";import{squaredDistance as v,set as y,normalize as b,scale as x,add as S,lerp as C}from"../../core/libs/gl-matrix-2/math/vec2.js";import{create as w}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";import{clone as T}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isVec3 as E}from"../../core/libs/gl-matrix-2/types/vec3.js";import{UpdatingHandles as D}from"../../core/support/UpdatingHandles.js";import O from"../../geometry/Polyline.js";import{isClockwise as k}from"../../geometry/support/coordsUtils.js";import{getEndpoint as A,isCoordinate as j,cloneCurve as M}from"../../geometry/support/curves/curveUtils.js";import{interpolate2D as N}from"../../geometry/support/curves/interpolateCurve.js";import{fetchMessageBundle as P}from"../../intl/messages.js";import{getConvertedElevationFromVector as F,absoluteHeightElevationInfo as I}from"../../support/elevationInfoUtils.js";import{getDefaultUnitForView as L}from"../../support/getDefaultUnitForView.js";import R from"../overlay/TextOverlayItem.js";import{GeometryWorkerHandle as z}from"../support/GeometryWorkerHandle.js";const B={default:15,far:25};let V=class extends r{constructor(e){super(e),this.context=null,this.stagedVertex=null,this.visible=!0,this.edgeDistance=`default`,this._updatingHandles=new D,this._messageUnitsTask=null,this._labelInfos=[],this._nextLabelIndex=0,this._debouncedLabelUpdates=new Map,this._measurementWorker=new z({preloadGeodetic:!0})}initialize(){this.addHandles([this._updatingHandles.add(()=>[this.context!=null&&this.getCameraOrExtent(this.context),this.visible,this._edgeDistancePixels,this.stagedVertex,this._messagesUnits],()=>this._update()),f(()=>this.context?.editGeometryOperations,[`vertex-add`,`vertex-remove`],()=>this._update()),f(()=>this.context?.editGeometryOperations,`vertex-update`,e=>this._update(e.vertices)),this._updatingHandles.add(()=>this._colors,e=>this._updateStyle(e)),n(()=>this._refreshMessages()),s(()=>this._messageUnitsTask?.abort())]),this._refreshMessages()}destroy(){for(this._nextLabelIndex=0;this._labelInfos.length;)this._destroyLabel(this._labelInfos.pop());this._measurementWorker.destroy(),this._updatingHandles.destroy()}get updating(){return!this._messageUnitsTask?.finished||this._updatingHandles.updating}get test(){}get _messagesUnits(){return this._messageUnitsTask?.value}get _edgeDistancePixels(){return B[this.edgeDistance]}get _colors(){let e=this.context?.view.effectiveTheme.textColor??t.fromArray([255,255,255]);return{textColor:e,backgroundColor:a(o(e,160),.6)}}_update(e){if(this.destroyed)return;this._nextLabelIndex=0;let{context:t,stagedVertex:n}=this;if(!t)return this._destroyUnusedLabels();let r=t.editGeometryOperations.data,{parts:i,geometry:a,coordinateHelper:o}=r;if(!a)return this._destroyUnusedLabels();let s=i.length;for(let i=0;i<s;++i){let c=this.getRing(a,r,n,o,i),l=c.map(e=>E(e)?e:o.arrayToXYZ(A(e)));if(c.length<2||!H(c,t.view,t.elevationInfo,o.spatialReference))continue;let u=s===1&&!k(l),d=K,f=q;this.toScreenPointArray(t,l[0],d);for(let n=1;n<c.length;++n){let r=l[n-1],a=l[n],o=c[n];this.toScreenPointArray(t,a,f);let s=n===l.length-1,p=!(!e?.length||e.some(({index:e,part:t})=>t.index===i&&(e===n-1||e===n||s&&e===0)));this._addLabel(t,r,d,a,E(o)?null:o,f,u,p),[d,f]=[f,d]}}this._destroyUnusedLabels()}_updateStyle({textColor:e,backgroundColor:t}){let n=this._nextLabelIndex,r=this._labelInfos;for(let i=0;i<n;++i){let{label:n}=r[i];n.textColor=e,n.backgroundColor=t}}_updateLabelMeasurement(e,t,n,r,i){return c(this._debouncedLabelUpdates,r,()=>u(async(e,t,n,r,i)=>{let{spatialReference:a,coordinateHelper:o}=e.editGeometryOperations.data,s=await(!i||j(i)?this._measurementWorker.autoDistance2DBetweenPoints(o.arrayToPoint(t),o.arrayToPoint(n)):this._measurementWorker.autoLength2D(new O({spatialReference:a,curvePaths:[[[t[0],t[1]],i]]})));if(r.destroyed)return;let c=this._messagesUnits,l=L(e.view);r.text=c!=null&&s!=null&&!Number.isNaN(s.value)?d(c,s,l):``}))(e,T(t),T(n),r,i?M(i):void 0)}_addLabel(e,t,n,r,i,a,o,s=!1){let{label:c,wasReused:l}=this._getOrCreateLabel(e);if(!this.visible||v(n,a)<3025){c.visible=!1;return}let{coordinateHelper:u}=e.editGeometryOperations.data;(!s||!l)&&this._updatingHandles.consumePromise(this._updateLabelMeasurement(e,t,r,c,i)),c.visible=!0;let d=a[0]-n[0],f=a[1]-n[1];if(o?y(W,-f,d):y(W,f,-d),b(W,W),x(W,W,this._edgeDistancePixels),i&&!j(i)){let n=u.arrayToXYZ(N(t,i,.5)),r=this.toScreenPointArray(e,n);S(G,r,W)}else C(G,n,a,.5),S(G,G,W);c.position=[G[0],G[1]],c.anchor=Math.abs(W[0])>Math.abs(W[1])?W[0]>0?`left`:`right`:-W[1]<0?`top`:`bottom`}_getOrCreateLabel(e){let t=this._labelInfos.length>this._nextLabelIndex,{textColor:n,backgroundColor:r}=this._colors;if(t){let e=this._labelInfos[this._nextLabelIndex++],{label:t}=e;return t.textColor=n,t.backgroundColor=r,e.wasReused=!0,e}let i=new R({anchor:`center`,fontSize:8,textColor:n,backgroundColor:r});e.view.overlay?.items.add(i);let a={label:i,wasReused:!1};return this._labelInfos.push(a),this._nextLabelIndex=this._labelInfos.length,a}_destroyUnusedLabels(){for(;this._labelInfos.length>this._nextLabelIndex;)this._destroyLabel(this._labelInfos.pop())}_destroyLabel({label:e}){this.context?.view.overlay?.items.remove(e),e.destroy(),this._debouncedLabelUpdates.delete(e)}_refreshMessages(){this._messageUnitsTask?.abort(),this._messageUnitsTask=i(()=>P(`esri/core/t9n/Units`))}};e([g()],V.prototype,`context`,void 0),e([g()],V.prototype,`stagedVertex`,void 0),e([g()],V.prototype,`visible`,void 0),e([g()],V.prototype,`edgeDistance`,void 0),e([g()],V.prototype,`updating`,null),e([g()],V.prototype,`_messageUnitsTask`,void 0),e([g()],V.prototype,`_messagesUnits`,null),e([g()],V.prototype,`_edgeDistancePixels`,null),e([g()],V.prototype,`_colors`,null),V=e([_(`esri.views.interactive.SegmentLabels`)],V);function H(e,t,n,r){if(t.type===`2d`)return!0;let i=m(r)??1,a=h(r),o=e=>F(t,e,r,n,I)??0;for(let t=1;t<e.length;++t){let n=e[t-1],r=e[t];if(!E(n)||!E(r))return!1;let s=(r[0]-n[0])*i,c=(r[1]-n[1])*i,l=(o(r)-o(n))*a;if(Math.abs(l)/Math.sqrt(s*s+c*c)>U)return!1}return!0}const U=l(5),W=w(),G=w(),K=p(),q=p();export{V as SegmentLabels};
2
+ import{__decorate as e}from"tslib";import t from"../../Color.js";import{onLocaleChange as n}from"../../intl.js";import r from"../../core/Accessor.js";import{createTask as i}from"../../core/asyncUtils.js";import{multiplyOpacity as a,getContrast as o}from"../../core/colorUtils.js";import{makeHandle as s}from"../../core/handleUtils.js";import"../../core/has.js";import{getOrCreateMapValue as c}from"../../core/MapUtils.js";import{deg2rad as l}from"../../core/mathUtils.js";import{debounce as u}from"../../core/promiseUtils.js";import{formatLength as d}from"../../core/quantityFormatUtils.js";import{on as f}from"../../core/reactiveUtils.js";import{createScreenPointArray as p}from"../../core/screenUtils.js";import{getMetersPerUnit as m,getMetersPerVerticalUnitForSR as h}from"../../core/units.js";import{property as g,subclass as _}from"../../core/accessorSupport/decorators.js";import{squaredDistance as v,set as y,normalize as b,scale as x,add as S,lerp as C}from"../../core/libs/gl-matrix-2/math/vec2.js";import{create as w}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";import{clone as T}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isVec3 as E}from"../../core/libs/gl-matrix-2/types/vec3.js";import{UpdatingHandles as D}from"../../core/support/UpdatingHandles.js";import O from"../../geometry/Polyline.js";import{isClockwise as k}from"../../geometry/support/coordsUtils.js";import{getEndpoint as A,isCoordinate as j,cloneCurve as M}from"../../geometry/support/curves/curveUtils.js";import{interpolate2D as N}from"../../geometry/support/curves/interpolateCurve.js";import{fetchMessageBundle as P}from"../../intl/messages.js";import{getConvertedElevationFromVector as F,absoluteHeightElevationInfo as I}from"../../support/elevationInfoUtils.js";import{getDefaultUnitForView as L}from"../../support/getDefaultUnitForView.js";import R from"../overlay/TextOverlayItem.js";import{GeometryWorkerHandle as z}from"../support/GeometryWorkerHandle.js";const B={default:15,far:25};let V=class extends r{constructor(e){super(e),this.context=null,this.stagedVertex=null,this.visible=!0,this.edgeDistance=`default`,this._updatingHandles=new D,this._messageUnitsTask=null,this._labelInfos=[],this._nextLabelIndex=0,this._debouncedLabelUpdates=new Map,this._measurementWorker=new z({preloadGeodetic:!0})}initialize(){this.addHandles([this._updatingHandles.add(()=>[this.context!=null&&this.getCameraOrExtent(this.context),this.visible,this._edgeDistancePixels,this.stagedVertex,this._messagesUnits],()=>this._update()),f(()=>this.context?.editGeometryOperations,[`vertex-add`,`vertex-remove`],()=>this._update()),f(()=>this.context?.editGeometryOperations,`vertex-update`,e=>this._update(e.vertices)),this._updatingHandles.add(()=>this._colors,e=>this._updateStyle(e)),n(()=>this._refreshMessages()),s(()=>this._messageUnitsTask?.abort())]),this._refreshMessages()}destroy(){for(this._nextLabelIndex=0;this._labelInfos.length;)this._destroyLabel(this._labelInfos.pop());this._measurementWorker.destroy(),this._updatingHandles.destroy()}get updating(){return!this._messageUnitsTask?.finished||this._updatingHandles.updating}get test(){}get _messagesUnits(){return this._messageUnitsTask?.value}get _edgeDistancePixels(){return B[this.edgeDistance]}get _colors(){let e=this.context?.view.effectiveTheme.textColor??t.fromArray([255,255,255]);return{textColor:e,backgroundColor:a(o(e,160),.6)}}_update(e){if(this.destroyed)return;this._nextLabelIndex=0;let{context:t,stagedVertex:n}=this;if(!t)return this._destroyUnusedLabels();let r=t.editGeometryOperations.data,{parts:i,geometry:a,coordinateHelper:o}=r;if(!a)return this._destroyUnusedLabels();let s=i.length;for(let i=0;i<s;++i){let c=this.getRing(a,r,n,o,i),l=c.map(e=>E(e)?e:o.arrayToXYZ(A(e)));if(c.length<2||!H(c,t.view,t.elevationInfo,o.spatialReference))continue;let u=s===1&&!k(l),d=K,f=q;this.toScreenPointArray(t,l[0],d);for(let n=1;n<c.length;++n){let r=l[n-1],a=l[n],o=c[n];this.toScreenPointArray(t,a,f);let s=n===l.length-1,p=!(!e?.length||e.some(({index:e,part:t})=>t.index===i&&(e===n-1||e===n||s&&e===0)));this._addLabel(t,r,d,a,E(o)?null:o,f,u,p),[d,f]=[f,d]}}this._destroyUnusedLabels()}_updateStyle({textColor:e,backgroundColor:t}){let n=this._nextLabelIndex,r=this._labelInfos;for(let i=0;i<n;++i){let{label:n}=r[i];n.textColor=e,n.backgroundColor=t}}_updateLabelMeasurement(e,t,n,r,i){return c(this._debouncedLabelUpdates,r,()=>u(async(e,t,n,r,i)=>{let{spatialReference:a,coordinateHelper:o}=e.editGeometryOperations.data,s=await(!i||j(i)?this._measurementWorker.autoDistance2DBetweenPoints(o.arrayToPoint(t),o.arrayToPoint(n)):this._measurementWorker.autoLength2D(new O({spatialReference:a,curvePaths:[[[t[0],t[1]],i]]})));if(r.destroyed)return;let c=this._messagesUnits,l=L(e.view);r.text=c!=null&&s!=null&&!Number.isNaN(s.value)?d(c,s,l):``}))(e,T(t),T(n),r,i?M(i):void 0)}_addLabel(e,t,n,r,i,a,o,s=!1){let{label:c,wasReused:l}=this._getOrCreateLabel(e);if(!this.visible||v(n,a)<3025){c.visible=!1;return}let{coordinateHelper:u}=e.editGeometryOperations.data;s&&l||this._updatingHandles.consumePromise(this._updateLabelMeasurement(e,t,r,c,i)),c.visible=!0;let d=a[0]-n[0],f=a[1]-n[1];if(o?y(W,-f,d):y(W,f,-d),b(W,W),x(W,W,this._edgeDistancePixels),i&&!j(i)){let n=u.arrayToXYZ(N(t,i,.5)),r=this.toScreenPointArray(e,n);S(G,r,W)}else C(G,n,a,.5),S(G,G,W);c.position=[G[0],G[1]],c.anchor=Math.abs(W[0])>Math.abs(W[1])?W[0]>0?`left`:`right`:-W[1]<0?`top`:`bottom`}_getOrCreateLabel(e){let t=this._labelInfos.length>this._nextLabelIndex,{textColor:n,backgroundColor:r}=this._colors;if(t){let e=this._labelInfos[this._nextLabelIndex++],{label:t}=e;return t.textColor=n,t.backgroundColor=r,e.wasReused=!0,e}let i=new R({anchor:`center`,fontSize:8,textColor:n,backgroundColor:r});e.view.overlay?.items.add(i);let a={label:i,wasReused:!1};return this._labelInfos.push(a),this._nextLabelIndex=this._labelInfos.length,a}_destroyUnusedLabels(){for(;this._labelInfos.length>this._nextLabelIndex;)this._destroyLabel(this._labelInfos.pop())}_destroyLabel({label:e}){this.context?.view.overlay?.items.remove(e),e.destroy(),this._debouncedLabelUpdates.delete(e)}_refreshMessages(){this._messageUnitsTask?.abort(),this._messageUnitsTask=i(()=>P(`esri/core/t9n/Units`))}};e([g()],V.prototype,`context`,void 0),e([g()],V.prototype,`stagedVertex`,void 0),e([g()],V.prototype,`visible`,void 0),e([g()],V.prototype,`edgeDistance`,void 0),e([g()],V.prototype,`updating`,null),e([g()],V.prototype,`_messageUnitsTask`,void 0),e([g()],V.prototype,`_messagesUnits`,null),e([g()],V.prototype,`_edgeDistancePixels`,null),e([g()],V.prototype,`_colors`,null),V=e([_(`esri.views.interactive.SegmentLabels`)],V);function H(e,t,n,r){if(t.type===`2d`)return!0;let i=m(r)??1,a=h(r),o=e=>F(t,e,r,n,I)??0;for(let t=1;t<e.length;++t){let n=e[t-1],r=e[t];if(!E(n)||!E(r))return!1;let s=(r[0]-n[0])*i,c=(r[1]-n[1])*i,l=(o(r)-o(n))*a;if(Math.abs(l)/Math.sqrt(s*s+c*c)>U)return!1}return!0}const U=l(5),W=w(),G=w(),K=p(),q=p();export{V as SegmentLabels};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{equals as e,pushIfSome as t}from"../../../core/arrayUtils.js";import{Evented as n}from"../../../core/Evented.js";import r from"../../../geometry/Multipoint.js";import i from"../../../geometry/Polygon.js";import a from"../../../geometry/Polyline.js";import{getEndpoint as o,isCoordinate as s,isBezierCurve as c,isCircularArc as l,isEllipticArc4 as u}from"../../../geometry/support/curves/curveUtils.js";import{createCoordinateHelper as d}from"../coordinateHelper.js";import{unnormalize as f}from"../../support/unnormalizationUtils.js";class p{constructor(e){this.part=e,this.leftSegment=null,this.rightSegment=null,this.type=`vertex`,this.index=null}get pos(){return this._pos}set pos(e){this._pos=e,this.part.unnormalizeVertexPositions()}}class m{constructor(e,t,n){this.part=e,this.leftVertex=t,this.rightVertex=n,this.type=`line`,t.rightSegment=this,n.leftSegment=this}toCurveOrCoordinate(){return[...this.rightVertex.pos]}}class h{constructor(e,t,n,r){this.part=e,this.leftVertex=t,this.rightVertex=n,this.curveDefinition=r,this.type=`bezier`,t.rightSegment=this,n.leftSegment=this}toCurveOrCoordinate(){return{b:[[...this.rightVertex.pos],[...this.curveDefinition.controlPoint1],[...this.curveDefinition.controlPoint2]]}}}class g{constructor(e,t,n,r){this.part=e,this.leftVertex=t,this.rightVertex=n,this.curveDefinition=r,this.type=`circular-arc`,t.rightSegment=this,n.leftSegment=this}toCurveOrCoordinate(){let e=this.rightVertex.pos,{interiorPoint:t}=this.curveDefinition;return{c:[[...e],[...t]]}}}class _{constructor(e,t,n,r){this.part=e,this.leftVertex=t,this.rightVertex=n,this.curveDefinition=r,this.type=`elliptic-arc-4`,t.rightSegment=this,n.leftSegment=this}toCurveOrCoordinate(){let e=this.rightVertex.pos,{centerPoint:t,sweep:n,orientation:r}=this.curveDefinition;return{a:[[...e],[...t],n,r]}}}class v{constructor(e,t,n,r){this.part=e,this.leftVertex=t,this.rightVertex=n,this.curveDefinition=r,this.type=`elliptic-arc-7`,t.rightSegment=this,n.leftSegment=this}toCurveOrCoordinate(){let e=this.rightVertex.pos,{centerPoint:t,sweep:n,orientation:r,rotation:i,semiMajorAxisLength:a,minorMajorAxisRatio:o}=this.curveDefinition;return{a:[[...e],t,n,r,i,a,o]}}}class y{constructor(e,t,n=!1){this._spatialReference=e,this._viewingMode=t,this.autoClose=n,this.vertices=[],this.segments=[],this.index=null}unnormalizeVertexPositions(){this.vertices.length<=1||this._viewingMode===1&&f(this.vertices,this._spatialReference)}updateVertexIndex(e,t){let{vertices:n}=this;if(n.length===0)return;let r=n[0],i=null,a=e,o=t;do i=a,i.index=o++,a=i.rightSegment?i.rightSegment.rightVertex:null;while(a!=null&&a!==r);i.leftSegment&&i!==n[n.length-1]&&this.swapVertices(n.indexOf(i),n.length-1)}getFirstVertex(){return this.vertices.at(0)}getLastVertex(){return this.vertices.at(-1)}isClosed(){return this.getFirstVertex()?.leftSegment!=null}swapVertices(e,t){let{vertices:n}=this,r=n[e];n[e]=n[t],n[t]=r}*iterateVertices(){let e=this.getFirstVertex(),t=e;if(t)do yield t,t=t.rightSegment?.rightVertex;while(t!==e&&t!=null)}}class b extends n{constructor(e,t){super(),this.type=e,this.coordinateHelper=t,this._geometry=null,this._dirty=!0,this.parts=[]}get geometry(){if(this._dirty){switch(this.type){case`point`:this._geometry=this._toPoint();break;case`multipoint`:this._geometry=this._toMultipoint();break;case`polyline`:this._geometry=this._toPolyline();break;case`polygon`:this._geometry=this._toPolygon();break;case`mesh`:break;default:this.type}this._dirty=!1}return this._geometry}get spatialReference(){return this.coordinateHelper.spatialReference}get allVerticesUnordered(){return Array.from(this.iterateVerticesUnordered())}*iterateVerticesUnordered(){for(let e of this.parts)for(let t of e.vertices)yield t}get allVertices(){return Array.from(this.iterateVertices())}*iterateVertices(){for(let e of this.parts)yield*e.iterateVertices()}notifyChanges(e){this._dirty=!0,this.emit(`change`,e)}getPartialGeometry(e,t,n){let{parts:r,hasCurves:i}=w(this,{startingVertex:e,endingVertexInclusive:t,geometryType:n});return C(r,i,n,this.coordinateHelper)}_toPoint(){let{parts:e,coordinateHelper:t}=this;return e.at(0)?.vertices.length?t.vectorToPoint(e[0].vertices[0].pos):null}_toMultipoint(){let e=[],{coordinateHelper:t,parts:n,spatialReference:i}=this;for(let r of n){let n=r.getFirstVertex();n&&e.push(t.arrayToVector(n.pos))}return new r({hasM:t.hasM(),hasZ:t.hasZ(),spatialReference:i,points:e})}_toPolyline(){let e=[],t=!1;for(let n of this.parts){if(n.vertices.length<1)continue;let r=n.vertices[0],i=[];i.push(r.pos);let a=r.rightSegment;for(;a;)t||=a.type!==`line`,i.push(a.toCurveOrCoordinate()),a=a.rightVertex.rightSegment;e.push(i)}return new a({paths:t?void 0:e,curvePaths:t?e:void 0,spatialReference:this.spatialReference,hasZ:this.coordinateHelper.hasZ(),hasM:this.coordinateHelper.hasM()})}_toPolygon(){let t=[],n=!1;for(let r of this.parts){if(r.vertices.length<1)continue;let i=r.vertices[0],a=[];a.push(i.pos);let c=i.rightSegment;for(;c&&(n||=c.type!==`line`,a.push(c.toCurveOrCoordinate()),c=c.rightVertex.rightSegment,c?.leftVertex!==i););if(r.autoClose&&a.length>1){let t=a.at(-1),n=o(a[0]),r=o(t);(a.length!==2||!s(t))&&!e(n,r)&&a.push(n)}t.push(a)}return new i({rings:n?void 0:t,curveRings:n?t:void 0,spatialReference:this.spatialReference,hasZ:this.coordinateHelper.hasZ(),hasM:this.coordinateHelper.hasM()})}static fromGeometry(e,t,n){let r=e.spatialReference,i=d(e.hasZ,e.hasM,r),a=new b(e.type,i);switch(e.type){case`polygon`:T(a,e,t,n?.allowCurves??!1);break;case`polyline`:E(a,e,t,n?.allowCurves??!1);break;case`point`:D(a,e,t);break;case`multipoint`:O(a,e,t);break;case`mesh`:D(a,e.origin,t),a._geometry=e,a._dirty=!1}return a}}function x(e,t,n,r){let i=new p(e);e.vertices.push(i);let a=o(r);return i.pos=t.arrayToVector(a),i.index=e.vertices.length-1,n&&e.segments.push(S(e,n,i,r)),i}function S(e,t,n,r){if(s(r))return new m(e,t,n);if(c(r)){let[,i,a]=r.b;return new h(e,t,n,{controlPoint1:[...i],controlPoint2:[...a]})}if(l(r)){let[,i]=r.c;return new g(e,t,n,{interiorPoint:[...i]})}if(u(r)){let[,i,a,o]=r.a;return new _(e,t,n,{centerPoint:[...i],sweep:a,orientation:o})}let[,i,a,o,d,f,p]=r.a;return new v(e,t,n,{centerPoint:[...i],sweep:a,orientation:o,rotation:d,semiMajorAxisLength:f,minorMajorAxisRatio:p})}function C(e,t,n,s){let{spatialReference:c}=s;if(n===`point`){let t=e.at(0)?.at(0);return t?s.arrayToPoint(o(t)):null}return n===`polygon`?new i({rings:t?void 0:e,curveRings:t?e:void 0,spatialReference:c,hasZ:s.hasZ(),hasM:s.hasM()}):n===`multipoint`?new r({spatialReference:c,points:e.flatMap(e=>e.map(e=>o(e))),hasM:s.hasM(),hasZ:s.hasZ()}):new a({paths:t?void 0:e,curvePaths:t?e:void 0,spatialReference:c,hasZ:s.hasZ(),hasM:s.hasM()})}function w(n,r){let i=(r?.geometryType??n.type)===`polygon`,a=[],c=!1,l=!1,u=!1;for(let d of n.parts){let n=null;if(u)break;if(d.vertices.length<1)continue;if(r?.startingVertex){if(d!==r.startingVertex.part&&!l)continue;l=!0}let f=d===r?.startingVertex?.part?r.startingVertex:d.vertices.at(0),p=[];if(t(p,f?.pos),f===r?.endingVertexInclusive){u=!0,n=f,a.push(p);break}let m=f?.rightSegment;for(;m;){if(c||=m.type!==`line`,p.push(m.toCurveOrCoordinate()),n=m.rightVertex,m.rightVertex===r?.endingVertexInclusive){u=!0;break}if(m=m.rightVertex.rightSegment,m?.leftVertex===f)break}let h=p.at(-1),g=d.getFirstVertex(),_=d.getLastVertex();i&&d.autoClose&&h&&n===_&&f===g&&(p.length>2||p.length===2&&!s(h))&&f?.pos&&!e(o(h),f.pos)&&p.push([...f.pos]),a.push(p)}return{parts:a,hasCurves:c}}function T(t,n,r,i){let a=n.spatialReference,s=t.coordinateHelper,{rings:c,curveRings:l}=n,u=l&&i?l:c;for(let n=0;n<u.length;++n){let i=u[n],c=new y(a,r);if(c.index=n,t.parts.push(c),i.length<1)continue;let l=null,d=null;for(let e=0;e<i.length-1;++e)d=x(c,s,d,i[e]),l??=d;i.length>1&&e(o(i[i.length-1]),l?.pos)?d&&l&&c.segments.push(S(c,d,l,i[i.length-1])):d=x(c,s,d,i[i.length-1])}}function E(e,t,n,r){let i=t.spatialReference,a=e.coordinateHelper,{curvePaths:o,paths:s}=t,c=o&&r?o:s;for(let t=0;t<c.length;++t){let r=c[t],o=new y(i,n);if(o.index=t,e.parts.push(o),r.length<1)continue;let s=null;for(let e=0;e<r.length;++e)s=x(o,a,s,r[e])}}function D(e,t,n){let r=t.spatialReference,i=e.coordinateHelper,a=new y(r,n);a.index=0;let o=new p(a);o.index=0,o.pos=i.pointToVector(t),a.vertices.push(o),e.parts.push(a)}function O(e,t,n){let r=t.spatialReference,{coordinateHelper:i,parts:a}=e,o=t.points.map(e=>i.arrayToVector(e));for(let e=0;e<o.length;e++){let t=new y(r,n);t.index=e,a.push(t);let i=new p(t);i.pos=o[e],i.index=0,t.vertices.push(i)}}function k(e){return e.type===`mesh`}function A(e,t){if(e.type!==t.type||e.parts.length!==t.parts.length)return!1;for(let n=0;n<e.parts.length;n++){let r=e.parts[n],i=t.parts[n];if(r.vertices.length!==i.vertices.length)return!1}let n=e.allVertices,r=t.allVertices;for(let e=0;e<n.length;e++)if(n[e].leftSegment?.type!==r[e].leftSegment?.type)return!1;return!0}export{h as BezierSegment,g as CircularArcSegment,b as EditGeometry,_ as EllipticArc4Segment,v as EllipticArc7Segment,m as LineSegment,y as Part,p as Vertex,x as addVertexAndConnectingSegment,S as createConnectingSegment,A as haveCompatibleTopologies,k as isMeshEditGeometry,C as partialCoordsToGeometry,w as toPartialCoords};
2
+ import{equals as e,pushIfSome as t}from"../../../core/arrayUtils.js";import{Evented as n}from"../../../core/Evented.js";import r from"../../../geometry/Multipoint.js";import i from"../../../geometry/Polygon.js";import a from"../../../geometry/Polyline.js";import{getEndpoint as o,isCoordinate as s,isBezierCurve as c,isCircularArc as l,isEllipticArc4 as u}from"../../../geometry/support/curves/curveUtils.js";import{createCoordinateHelper as d}from"../coordinateHelper.js";import{unnormalize as f}from"../../support/unnormalizationUtils.js";class p{constructor(e){this.part=e,this.leftSegment=null,this.rightSegment=null,this.type=`vertex`,this.index=null}get pos(){return this._pos}set pos(e){this._pos=e,this.part.unnormalizeVertexPositions()}}class m{constructor(e,t,n){this.part=e,this.leftVertex=t,this.rightVertex=n,this.type=`line`,t.rightSegment=this,n.leftSegment=this}toCurveOrCoordinate(){return[...this.rightVertex.pos]}}class h{constructor(e,t,n,r){this.part=e,this.leftVertex=t,this.rightVertex=n,this.curveDefinition=r,this.type=`bezier`,t.rightSegment=this,n.leftSegment=this}toCurveOrCoordinate(){return{b:[[...this.rightVertex.pos],[...this.curveDefinition.controlPoint1],[...this.curveDefinition.controlPoint2]]}}}class g{constructor(e,t,n,r){this.part=e,this.leftVertex=t,this.rightVertex=n,this.curveDefinition=r,this.type=`circular-arc`,t.rightSegment=this,n.leftSegment=this}toCurveOrCoordinate(){let e=this.rightVertex.pos,{interiorPoint:t}=this.curveDefinition;return{c:[[...e],[...t]]}}}class _{constructor(e,t,n,r){this.part=e,this.leftVertex=t,this.rightVertex=n,this.curveDefinition=r,this.type=`elliptic-arc-4`,t.rightSegment=this,n.leftSegment=this}toCurveOrCoordinate(){let e=this.rightVertex.pos,{centerPoint:t,sweep:n,orientation:r}=this.curveDefinition;return{a:[[...e],[...t],n,r]}}}class v{constructor(e,t,n,r){this.part=e,this.leftVertex=t,this.rightVertex=n,this.curveDefinition=r,this.type=`elliptic-arc-7`,t.rightSegment=this,n.leftSegment=this}toCurveOrCoordinate(){let e=this.rightVertex.pos,{centerPoint:t,sweep:n,orientation:r,rotation:i,semiMajorAxisLength:a,minorMajorAxisRatio:o}=this.curveDefinition;return{a:[[...e],t,n,r,i,a,o]}}}class y{constructor(e,t,n=!1){this._spatialReference=e,this._viewingMode=t,this.autoClose=n,this.vertices=[],this.segments=[],this.index=null}unnormalizeVertexPositions(){this.vertices.length<=1||this._viewingMode===1&&f(this.vertices,this._spatialReference)}updateVertexIndex(e,t){let{vertices:n}=this;if(n.length===0)return;let r=n[0],i=null,a=e,o=t;do i=a,i.index=o++,a=i.rightSegment?i.rightSegment.rightVertex:null;while(a!=null&&a!==r);i.leftSegment&&i!==n[n.length-1]&&this.swapVertices(n.indexOf(i),n.length-1)}getFirstVertex(){return this.vertices.at(0)}getLastVertex(){return this.vertices.at(-1)}isClosed(){return this.getFirstVertex()?.leftSegment!=null}swapVertices(e,t){let{vertices:n}=this,r=n[e];n[e]=n[t],n[t]=r}*iterateVertices(){let e=this.getFirstVertex(),t=e;if(t)do yield t,t=t.rightSegment?.rightVertex;while(t!==e&&t!=null)}}class b extends n{constructor(e,t){super(),this.type=e,this.coordinateHelper=t,this._geometry=null,this._dirty=!0,this.parts=[]}get geometry(){if(this._dirty){switch(this.type){case`point`:this._geometry=this._toPoint();break;case`multipoint`:this._geometry=this._toMultipoint();break;case`polyline`:this._geometry=this._toPolyline();break;case`polygon`:this._geometry=this._toPolygon();break;case`mesh`:break;default:this.type}this._dirty=!1}return this._geometry}get spatialReference(){return this.coordinateHelper.spatialReference}get allVerticesUnordered(){return Array.from(this.iterateVerticesUnordered())}*iterateVerticesUnordered(){for(let e of this.parts)for(let t of e.vertices)yield t}get allVertices(){return Array.from(this.iterateVertices())}*iterateVertices(){for(let e of this.parts)yield*e.iterateVertices()}notifyChanges(e){this._dirty=!0,this.emit(`change`,e)}getPartialGeometry(e,t,n){let{parts:r,hasCurves:i}=w(this,{startingVertex:e,endingVertexInclusive:t,geometryType:n});return C(r,i,n,this.coordinateHelper)}_toPoint(){let{parts:e,coordinateHelper:t}=this;return e.at(0)?.vertices.length?t.vectorToPoint(e[0].vertices[0].pos):null}_toMultipoint(){let e=[],{coordinateHelper:t,parts:n,spatialReference:i}=this;for(let r of n){let n=r.getFirstVertex();n&&e.push(t.arrayToVector(n.pos))}return new r({hasM:t.hasM(),hasZ:t.hasZ(),spatialReference:i,points:e})}_toPolyline(){let e=[],t=!1;for(let n of this.parts){if(n.vertices.length<1)continue;let r=n.vertices[0],i=[];i.push(r.pos);let a=r.rightSegment;for(;a;)t||=a.type!==`line`,i.push(a.toCurveOrCoordinate()),a=a.rightVertex.rightSegment;e.push(i)}return new a({paths:t?void 0:e,curvePaths:t?e:void 0,spatialReference:this.spatialReference,hasZ:this.coordinateHelper.hasZ(),hasM:this.coordinateHelper.hasM()})}_toPolygon(){let t=[],n=!1;for(let r of this.parts){if(r.vertices.length<1)continue;let i=r.vertices[0],a=[];a.push(i.pos);let c=i.rightSegment;for(;c&&(n||=c.type!==`line`,a.push(c.toCurveOrCoordinate()),c=c.rightVertex.rightSegment,c?.leftVertex!==i););if(r.autoClose&&a.length>1){let t=a.at(-1),n=o(a[0]),r=o(t);a.length===2&&s(t)||e(n,r)||a.push(n)}t.push(a)}return new i({rings:n?void 0:t,curveRings:n?t:void 0,spatialReference:this.spatialReference,hasZ:this.coordinateHelper.hasZ(),hasM:this.coordinateHelper.hasM()})}static fromGeometry(e,t,n){let r=e.spatialReference,i=d(e.hasZ,e.hasM,r),a=new b(e.type,i);switch(e.type){case`polygon`:T(a,e,t,n?.allowCurves??!1);break;case`polyline`:E(a,e,t,n?.allowCurves??!1);break;case`point`:D(a,e,t);break;case`multipoint`:O(a,e,t);break;case`mesh`:D(a,e.origin,t),a._geometry=e,a._dirty=!1}return a}}function x(e,t,n,r){let i=new p(e);e.vertices.push(i);let a=o(r);return i.pos=t.arrayToVector(a),i.index=e.vertices.length-1,n&&e.segments.push(S(e,n,i,r)),i}function S(e,t,n,r){if(s(r))return new m(e,t,n);if(c(r)){let[,i,a]=r.b;return new h(e,t,n,{controlPoint1:[...i],controlPoint2:[...a]})}if(l(r)){let[,i]=r.c;return new g(e,t,n,{interiorPoint:[...i]})}if(u(r)){let[,i,a,o]=r.a;return new _(e,t,n,{centerPoint:[...i],sweep:a,orientation:o})}let[,i,a,o,d,f,p]=r.a;return new v(e,t,n,{centerPoint:[...i],sweep:a,orientation:o,rotation:d,semiMajorAxisLength:f,minorMajorAxisRatio:p})}function C(e,t,n,s){let{spatialReference:c}=s;if(n===`point`){let t=e.at(0)?.at(0);return t?s.arrayToPoint(o(t)):null}return n===`polygon`?new i({rings:t?void 0:e,curveRings:t?e:void 0,spatialReference:c,hasZ:s.hasZ(),hasM:s.hasM()}):n===`multipoint`?new r({spatialReference:c,points:e.flatMap(e=>e.map(e=>o(e))),hasM:s.hasM(),hasZ:s.hasZ()}):new a({paths:t?void 0:e,curvePaths:t?e:void 0,spatialReference:c,hasZ:s.hasZ(),hasM:s.hasM()})}function w(n,r){let i=(r?.geometryType??n.type)===`polygon`,a=[],c=!1,l=!1,u=!1;for(let d of n.parts){let n=null;if(u)break;if(d.vertices.length<1)continue;if(r?.startingVertex){if(d!==r.startingVertex.part&&!l)continue;l=!0}let f=d===r?.startingVertex?.part?r.startingVertex:d.vertices.at(0),p=[];if(t(p,f?.pos),f===r?.endingVertexInclusive){u=!0,n=f,a.push(p);break}let m=f?.rightSegment;for(;m;){if(c||=m.type!==`line`,p.push(m.toCurveOrCoordinate()),n=m.rightVertex,m.rightVertex===r?.endingVertexInclusive){u=!0;break}if(m=m.rightVertex.rightSegment,m?.leftVertex===f)break}let h=p.at(-1),g=d.getFirstVertex(),_=d.getLastVertex();i&&d.autoClose&&h&&n===_&&f===g&&(p.length>2||p.length===2&&!s(h))&&f?.pos&&!e(o(h),f.pos)&&p.push([...f.pos]),a.push(p)}return{parts:a,hasCurves:c}}function T(t,n,r,i){let a=n.spatialReference,s=t.coordinateHelper,{rings:c,curveRings:l}=n,u=l&&i?l:c;for(let n=0;n<u.length;++n){let i=u[n],c=new y(a,r);if(c.index=n,t.parts.push(c),i.length<1)continue;let l=null,d=null;for(let e=0;e<i.length-1;++e)d=x(c,s,d,i[e]),l??=d;i.length>1&&e(o(i[i.length-1]),l?.pos)?d&&l&&c.segments.push(S(c,d,l,i[i.length-1])):d=x(c,s,d,i[i.length-1])}}function E(e,t,n,r){let i=t.spatialReference,a=e.coordinateHelper,{curvePaths:o,paths:s}=t,c=o&&r?o:s;for(let t=0;t<c.length;++t){let r=c[t],o=new y(i,n);if(o.index=t,e.parts.push(o),r.length<1)continue;let s=null;for(let e=0;e<r.length;++e)s=x(o,a,s,r[e])}}function D(e,t,n){let r=t.spatialReference,i=e.coordinateHelper,a=new y(r,n);a.index=0;let o=new p(a);o.index=0,o.pos=i.pointToVector(t),a.vertices.push(o),e.parts.push(a)}function O(e,t,n){let r=t.spatialReference,{coordinateHelper:i,parts:a}=e,o=t.points.map(e=>i.arrayToVector(e));for(let e=0;e<o.length;e++){let t=new y(r,n);t.index=e,a.push(t);let i=new p(t);i.pos=o[e],i.index=0,t.vertices.push(i)}}function k(e){return e.type===`mesh`}function A(e,t){if(e.type!==t.type||e.parts.length!==t.parts.length)return!1;for(let n=0;n<e.parts.length;n++){let r=e.parts[n],i=t.parts[n];if(r.vertices.length!==i.vertices.length)return!1}let n=e.allVertices,r=t.allVertices;for(let e=0;e<n.length;e++)if(n[e].leftSegment?.type!==r[e].leftSegment?.type)return!1;return!0}export{h as BezierSegment,g as CircularArcSegment,b as EditGeometry,_ as EllipticArc4Segment,v as EllipticArc7Segment,m as LineSegment,y as Part,p as Vertex,x as addVertexAndConnectingSegment,S as createConnectingSegment,A as haveCompatibleTopologies,k as isMeshEditGeometry,C as partialCoordsToGeometry,w as toPartialCoords};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{Evented as e}from"../../../core/Evented.js";import{makeHandle as t}from"../../../core/handleUtils.js";import{clone as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isMeshEditGeometry as r,Part as i,EditGeometry as a,haveCompatibleTopologies as o}from"./EditGeometry.js";import{AppendVertex as s}from"./operations/AppendVertex.js";import{UpdateVertices as c}from"./operations/UpdateVertices.js";import{RemoveVertices as l}from"./operations/RemoveVertices.js";import{SplitSegment as u}from"./operations/SplitSegment.js";import{SetVertexPosition as d}from"./operations/SetVertexPosition.js";import{ClosePart as f}from"./operations/ClosePart.js";import{AddOrUpdatePart as p}from"./operations/AddOrUpdatePart.js";import{MoveMesh as m}from"./operations/MoveMesh.js";import{MoveVertex as h}from"./operations/MoveVertex.js";import{OffsetEdgeVertex as g}from"./operations/OffsetEdgeVertex.js";import{RotateVertex as _}from"./operations/RotateVertex.js";import{ScaleVertex as v}from"./operations/ScaleVertex.js";import{SetAllVertexPositions as y}from"./operations/SetAllVertexPositions.js";import{UndoGroup as b}from"./operations/UndoGroup.js";class x extends e{constructor(e,t,n=!1){super(),this.data=e,this.viewingMode=t,this.allowCurves=n,this._undoStack=[],this._redoStack=[],this.disableDefaultRedoBehavior=!1,this._listener=this.data.on(`change`,e=>{e.addedVertices&&this.emit(`vertex-add`,{type:`vertex-add`,vertices:e.addedVertices,operation:e.operation}),e.removedVertices&&this.emit(`vertex-remove`,{type:`vertex-remove`,vertices:e.removedVertices,operation:e.operation}),e.updatedVertices&&this.emit(`vertex-update`,{type:`vertex-update`,vertices:e.updatedVertices,operation:e.operation})})}destroy(){super.destroy(),this._listener.remove()}splitSegment(e,t){return this._apply(new u(this.data,e,t))}updateVertices(e,t,n=1){return this._apply(new c(this.data,e,t),n)}move(e,t,n,i=1){return r(this.data)?this._apply(new m(this.data,e,t,n),i):this.moveVertices(this.data.allVerticesUnordered,e,t,n,i)}moveVertices(e,t,n,i,a=1){return r(this.data)?this._apply(new m(this.data,t,n,i),a):this.updateVertices(e,new h(this.data.coordinateHelper,t,n,i),a)}scale(e,t,n,r,i=1,a=0){return this.scaleVertices(this.data.allVerticesUnordered,e,t,n,r,i,a)}scaleVertices(e,t,n,r,i,a=1,o=0){return this.updateVertices(e,new v(t,n,r,i,o),a)}rotate(e,t,n=1,r=0){return this.rotateVertices(this.data.allVerticesUnordered,e,t,n,r)}rotateVertices(e,t,n,r=1,i=0){return this.updateVertices(e,new _(t,n,i),r)}removeVertices(e){return this._apply(new l(this.data,e,this._minNumVerticesPerType))}appendVertex(e,t,n){return t??=new i(this.data.spatialReference,this.viewingMode,n),this._apply(new s(this.data,t,e))}appendVertexToFirstPart(e){let t=this.data.parts.at(0);return t?this._apply(new s(this.data,t,e)):null}addOrUpdatePart(e,t){return this._apply(new p(this.data,e,t,this.viewingMode))}setVertexPosition(e,t){return this._apply(new d(this.data,e,t))}offsetEdge(e,t,n,r=1){return this.updateVertices([t.leftVertex,t.rightVertex],new g(this.data.coordinateHelper,e,t,n),r)}trySetGeometry(e,t=1){let{data:n}=this,{coordinateHelper:i}=n;if(n.type!==e.type||!n.spatialReference.equals(e.spatialReference)||i.hasZ()!==e.hasZ||i.hasM()!==e.hasM||r(n))return;let s=a.fromGeometry(e,this.viewingMode,{allowCurves:this.allowCurves});if(o(n,s))return this.overwriteGeometryDataInPlace(s,t)}overwriteGeometryDataInPlace(e,t=1){return this._apply(new y(this.data,e),t)}createResetState(){if(r(this.data))return this._createResetStateMesh();let e=this.data.geometry.clone();return t(()=>this.trySetGeometry(e))}closePart(e){return this.data.parts.includes(e)?this._apply(new f(this.data,e)):null}canRemoveVertex(e){return e.vertices.length>this._minNumVerticesPerType}createUndoGroup(){let e=new b;return this._apply(e),t(()=>e.close())}groupOperations(e){let t=[],{_undoStack:n}=this;for(;n.length>0;){let r=n.at(-1);if(!r||!e(r))break;n.pop(),t.push(r)}if(t.length>0){let e=new b(t.reverse());return this.recordUndo(e,!0),{group:e,operations:t}}return null}recordUndo(e,t){let n=this.canUndo;this._undoStack.push(e),t&&this.resetRedoStack(),this.emit(`can-redo-change`,{type:`can-redo-change`,canRedo:this.canRedo}),n!==this.canUndo&&this.emit(`can-undo-change`,{type:`can-undo-change`,canUndo:this.canUndo})}recordRedo(e){if(this.disableDefaultRedoBehavior)return;let t=this.canRedo;this._redoStack.push(e),t||this.emit(`can-redo-change`,{type:`can-redo-change`,canRedo:!0})}undo(){if(this._undoStack.length>0){let e=this.canUndo,t=this._undoStack.pop();return t.undo(),this.recordRedo(t),e!==this.canUndo&&this.emit(`can-undo-change`,{type:`can-undo-change`,canUndo:this.canUndo}),t}return null}redo(){if(this._redoStack.length>0){let e=this._redoStack.pop();return e.apply(),this.recordUndo(e,!1),e}return null}resetRedoStack(){this.disableDefaultRedoBehavior||(this._redoStack=[],this.emit(`redo-reset`,{type:`redo-reset`}))}undoHas(e){return this._undoStack.includes(e)}get canUndo(){return this._undoStack.length>0}get canRedo(){return this._redoStack.length>0}get lastOperation(){return this._undoStack.length>0?this._undoStack[this._undoStack.length-1]:null}get nextOperation(){return this._redoStack.length>0?this._redoStack[this._redoStack.length-1]:null}get test(){return{undoLength:this._undoStack.length,redoLength:this._redoStack.length}}get _minNumVerticesPerType(){switch(this.data.type){case`point`:return 1;case`polyline`:return 2;case`polygon`:return 3;default:return 0}}_apply(e,t=1){return(t===0||!this.lastOperation?.accumulate(e))&&(e.apply(),this.recordUndo(e,!0)),e}_createResetStateMesh(){if(!r(this.data))return t();let e=this.data.geometry,{vertexSpace:i}=e;if(i.origin){let r=n(i.origin);return t(()=>{e.vertexSpace.origin=r})}let a=e.vertexAttributes.clonePositional();return t(()=>{e.vertexAttributes=a,e.vertexAttributesChanged()})}static fromGeometry(e,t,n){return new x(a.fromGeometry(e,t,n),t,n?.allowCurves)}}export{x as EditGeometryOperations};
2
+ import{Evented as e}from"../../../core/Evented.js";import{makeHandle as t}from"../../../core/handleUtils.js";import{clone as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isMeshEditGeometry as r,Part as i,EditGeometry as a,haveCompatibleTopologies as o}from"./EditGeometry.js";import{AppendVertex as s}from"./operations/AppendVertex.js";import{UpdateVertices as c}from"./operations/UpdateVertices.js";import{RemoveVertices as l}from"./operations/RemoveVertices.js";import{SplitSegment as u}from"./operations/SplitSegment.js";import{SetVertexPosition as d}from"./operations/SetVertexPosition.js";import{ClosePart as f}from"./operations/ClosePart.js";import{AddOrUpdatePart as p}from"./operations/AddOrUpdatePart.js";import{MoveMesh as m}from"./operations/MoveMesh.js";import{MoveVertex as h}from"./operations/MoveVertex.js";import{OffsetEdgeVertex as g}from"./operations/OffsetEdgeVertex.js";import{RotateVertex as _}from"./operations/RotateVertex.js";import{ScaleVertex as v}from"./operations/ScaleVertex.js";import{SetAllVertexPositions as y}from"./operations/SetAllVertexPositions.js";import{UndoGroup as b}from"./operations/UndoGroup.js";class x extends e{constructor(e,t,n=!1){super(),this.data=e,this.viewingMode=t,this.allowCurves=n,this._undoStack=[],this._redoStack=[],this.disableDefaultRedoBehavior=!1,this._listener=this.data.on(`change`,e=>{e.addedVertices&&this.emit(`vertex-add`,{type:`vertex-add`,vertices:e.addedVertices,operation:e.operation}),e.removedVertices&&this.emit(`vertex-remove`,{type:`vertex-remove`,vertices:e.removedVertices,operation:e.operation}),e.updatedVertices&&this.emit(`vertex-update`,{type:`vertex-update`,vertices:e.updatedVertices,operation:e.operation})})}destroy(){super.destroy(),this._listener.remove()}splitSegment(e,t){return this._apply(new u(this.data,e,t))}updateVertices(e,t,n=1){return this._apply(new c(this.data,e,t),n)}move(e,t,n,i=1){return r(this.data)?this._apply(new m(this.data,e,t,n),i):this.moveVertices(this.data.allVerticesUnordered,e,t,n,i)}moveVertices(e,t,n,i,a=1){return r(this.data)?this._apply(new m(this.data,t,n,i),a):this.updateVertices(e,new h(this.data.coordinateHelper,t,n,i),a)}scale(e,t,n,r,i=1,a=0){return this.scaleVertices(this.data.allVerticesUnordered,e,t,n,r,i,a)}scaleVertices(e,t,n,r,i,a=1,o=0){return this.updateVertices(e,new v(t,n,r,i,o),a)}rotate(e,t,n=1,r=0){return this.rotateVertices(this.data.allVerticesUnordered,e,t,n,r)}rotateVertices(e,t,n,r=1,i=0){return this.updateVertices(e,new _(t,n,i),r)}removeVertices(e){return this._apply(new l(this.data,e,this._minNumVerticesPerType))}appendVertex(e,t,n){return t??=new i(this.data.spatialReference,this.viewingMode,n),this._apply(new s(this.data,t,e))}appendVertexToFirstPart(e){let t=this.data.parts.at(0);return t?this._apply(new s(this.data,t,e)):null}addOrUpdatePart(e,t){return this._apply(new p(this.data,e,t,this.viewingMode))}setVertexPosition(e,t){return this._apply(new d(this.data,e,t))}offsetEdge(e,t,n,r=1){return this.updateVertices([t.leftVertex,t.rightVertex],new g(this.data.coordinateHelper,e,t,n),r)}trySetGeometry(e,t=1){let{data:n}=this,{coordinateHelper:i}=n;if(n.type!==e.type||!n.spatialReference.equals(e.spatialReference)||i.hasZ()!==e.hasZ||i.hasM()!==e.hasM||r(n))return;let s=a.fromGeometry(e,this.viewingMode,{allowCurves:this.allowCurves});if(o(n,s))return this.overwriteGeometryDataInPlace(s,t)}overwriteGeometryDataInPlace(e,t=1){return this._apply(new y(this.data,e),t)}createResetState(){if(r(this.data))return this._createResetStateMesh();let e=this.data.geometry.clone();return t(()=>this.trySetGeometry(e))}closePart(e){return this.data.parts.includes(e)?this._apply(new f(this.data,e)):null}canRemoveVertex(e){return e.vertices.length>this._minNumVerticesPerType}createUndoGroup(){let e=new b;return this._apply(e),t(()=>e.close())}groupOperations(e){let t=[],{_undoStack:n}=this;for(;n.length>0;){let r=n.at(-1);if(!r||!e(r))break;n.pop(),t.push(r)}if(t.length>0){let e=new b(t.reverse());return this.recordUndo(e,!0),{group:e,operations:t}}return null}recordUndo(e,t){let n=this.canUndo;this._undoStack.push(e),t&&this.resetRedoStack(),this.emit(`can-redo-change`,{type:`can-redo-change`,canRedo:this.canRedo}),n!==this.canUndo&&this.emit(`can-undo-change`,{type:`can-undo-change`,canUndo:this.canUndo})}recordRedo(e){if(this.disableDefaultRedoBehavior)return;let t=this.canRedo;this._redoStack.push(e),t||this.emit(`can-redo-change`,{type:`can-redo-change`,canRedo:!0})}undo(){if(this._undoStack.length>0){let e=this.canUndo,t=this._undoStack.pop();return t.undo(),this.recordRedo(t),e!==this.canUndo&&this.emit(`can-undo-change`,{type:`can-undo-change`,canUndo:this.canUndo}),t}return null}redo(){if(this._redoStack.length>0){let e=this._redoStack.pop();return e.apply(),this.recordUndo(e,!1),e}return null}resetRedoStack(){this.disableDefaultRedoBehavior||(this._redoStack=[],this.emit(`redo-reset`,{type:`redo-reset`}))}undoHas(e){return this._undoStack.includes(e)}get canUndo(){return this._undoStack.length>0}get canRedo(){return this._redoStack.length>0}get lastOperation(){return this._undoStack.length>0?this._undoStack[this._undoStack.length-1]:null}get nextOperation(){return this._redoStack.length>0?this._redoStack[this._redoStack.length-1]:null}get test(){return{undoLength:this._undoStack.length,redoLength:this._redoStack.length}}get _minNumVerticesPerType(){switch(this.data.type){case`point`:return 1;case`polyline`:return 2;case`polygon`:return 3;default:return 0}}_apply(e,t=1){return t!==0&&this.lastOperation?.accumulate(e)||(e.apply(),this.recordUndo(e,!0)),e}_createResetStateMesh(){if(!r(this.data))return t();let e=this.data.geometry,{vertexSpace:i}=e;if(i.origin){let r=n(i.origin);return t(()=>{e.vertexSpace.origin=r})}let a=e.vertexAttributes.clonePositional();return t(()=>{e.vertexAttributes=a,e.vertexAttributesChanged()})}static fromGeometry(e,t,n){return new x(a.fromGeometry(e,t,n),t,n?.allowCurves)}}export{x as EditGeometryOperations};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{equals as e}from"../../../../core/arrayUtils.js";import{notDeepEqual as t}from"../../../../core/object.js";class n{constructor(e,t){this._editGeometry=e,this._newPositions=[],this._newSegments=[];for(let{pos:e,leftSegment:n}of t.allVertices)this._newPositions.push(e),this._newSegments.push(r(n))}apply(){let e=this._originalPositions==null?`apply`:`redo`;if(!this._originalPositions){let e=this._editGeometry.coordinateHelper;this._originalPositions=[],this._originalSegments=[];for(let{pos:t,leftSegment:n}of this._editGeometry.iterateVertices())this._originalPositions.push(e.clone(t)),this._originalSegments.push(r(n))}this._apply(e,this._newPositions,this._newSegments)}undo(){this._originalPositions&&this._originalSegments&&this._apply(`undo`,this._originalPositions,this._originalSegments)}accumulate(e){return e instanceof n&&(this._newPositions=e._newPositions,this._newSegments=e._newSegments,this._apply(`apply`,this._newPositions,this._newSegments),!0)}_apply(t,n,a){let o=this._editGeometry.coordinateHelper,s=this._editGeometry.allVertices,c=[];for(let t=0;t<s.length;t++){let l=s[t],u=n[t],d=a[t];(!e(l.pos,u)||!i(r(l.leftSegment),d))&&(c.push(s[t]),o.copy(u,l.pos),l.leftSegment&&`curveDefinition`in l.leftSegment&&d&&(l.leftSegment.curveDefinition={...d}))}this._editGeometry.parts.forEach(e=>e.unnormalizeVertexPositions()),c.length&&this._editGeometry.notifyChanges({operation:t,updatedVertices:c})}}function r(e){if(e&&e.type!==`line`)return{...e.curveDefinition}}function i(e,n){return e==null&&n==null||!!e&&!!n&&!t(e,n)}export{n as SetAllVertexPositions};
2
+ import{equals as e}from"../../../../core/arrayUtils.js";import{notDeepEqual as t}from"../../../../core/object.js";class n{constructor(e,t){this._editGeometry=e,this._newPositions=[],this._newSegments=[];for(let{pos:e,leftSegment:n}of t.allVertices)this._newPositions.push(e),this._newSegments.push(r(n))}apply(){let e=this._originalPositions==null?`apply`:`redo`;if(!this._originalPositions){let e=this._editGeometry.coordinateHelper;this._originalPositions=[],this._originalSegments=[];for(let{pos:t,leftSegment:n}of this._editGeometry.iterateVertices())this._originalPositions.push(e.clone(t)),this._originalSegments.push(r(n))}this._apply(e,this._newPositions,this._newSegments)}undo(){this._originalPositions&&this._originalSegments&&this._apply(`undo`,this._originalPositions,this._originalSegments)}accumulate(e){return e instanceof n&&(this._newPositions=e._newPositions,this._newSegments=e._newSegments,this._apply(`apply`,this._newPositions,this._newSegments),!0)}_apply(t,n,a){let o=this._editGeometry.coordinateHelper,s=this._editGeometry.allVertices,c=[];for(let t=0;t<s.length;t++){let l=s[t],u=n[t],d=a[t];e(l.pos,u)&&i(r(l.leftSegment),d)||(c.push(s[t]),o.copy(u,l.pos),l.leftSegment&&`curveDefinition`in l.leftSegment&&d&&(l.leftSegment.curveDefinition={...d}))}this._editGeometry.parts.forEach(e=>e.unnormalizeVertexPositions()),c.length&&this._editGeometry.notifyChanges({operation:t,updatedVertices:c})}}function r(e){if(e&&e.type!==`line`)return{...e.curveDefinition}}function i(e,n){return e==null&&n==null||!!e&&!!n&&!t(e,n)}export{n as SetAllVertexPositions};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- var e;const t=Symbol();class n{static{e=t}constructor(t){this._operations=[],this._closed=!1,this[e]=!0,t&&(this._operations=t,this._closed=!0)}close(){this._closed=!0}apply(){for(let e of this._operations)e.apply()}undo(){for(let e=this._operations.length-1;e>=0;e--)this._operations[e].undo()}accumulate(e){if(this._closed)return!1;let t=this._operations.length?this._operations[this._operations.length-1]:null;return(!t||!t.accumulate(e))&&(this._operations.push(e),e.apply()),!0}}export{n as UndoGroup};
2
+ var e;const t=Symbol();class n{static{e=t}constructor(t){this._operations=[],this._closed=!1,this[e]=!0,t&&(this._operations=t,this._closed=!0)}close(){this._closed=!0}apply(){for(let e of this._operations)e.apply()}undo(){for(let e=this._operations.length-1;e>=0;e--)this._operations[e].undo()}accumulate(e){if(this._closed)return!1;let t=this._operations.length?this._operations[this._operations.length-1]:null;return t&&t.accumulate(e)||(this._operations.push(e),e.apply()),!0}}export{n as UndoGroup};
@@ -90,6 +90,8 @@ export interface TooltipOptionsProperties extends Partial<Pick<TooltipOptions, "
90
90
  * `Esc` | Closes the input mode but keeps any applied constraints. |
91
91
  * Left-click-drag (on tooltip header) | Allows to change the position of the tooltip in input mode. |
92
92
  *
93
+ * Numeric inputs accept simple math expressions with two values and one operator: `+`, `-`, `*`, or `/`.
94
+ *
93
95
  * @since 5.2
94
96
  * @see [LabelOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/LabelOptions/)
95
97
  * @see [ValueOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ValueOptions/)
@@ -69,6 +69,8 @@ export interface SketchTooltipOptionsProperties extends TooltipOptionsProperties
69
69
  * `Esc` | Closes the input mode but keeps any applied constraints. |
70
70
  * Left-click-drag (on tooltip header) | Allows to change the position of the tooltip in input mode. |
71
71
  *
72
+ * Numeric inputs accept simple math expressions with two values and one operator: `+`, `-`, `*`, or `/`.
73
+ *
72
74
  * @deprecated since 5.2. Use [TooltipOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/TooltipOptions/) instead.
73
75
  * @since 4.24
74
76
  * @see [Sketch](https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{valueInUnit as e,createAngle as t,createLength as n}from"../../../core/quantity.js";import{lengthUnitFromSpatialReference as r,verticalLengthUnitFromSpatialReference as i}from"../../../core/units.js";import{subtract as a,copy as o,add as s}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{geodesicCompatibleSpatialReference as c}from"../../../geometry/geodesicUtils.js";import l from"../../../geometry/SpatialReference.js";import{projectVectorToVector as u}from"../../../geometry/projection/projectVectorToVector.js";import{makeDehydratedPoint as d}from"../../../layers/graphics/dehydratedPoint.js";import{getConvertedElevationFromXYZ as f}from"../../../support/elevationInfoUtils.js";import{CoordinateConstraint as p,VerticalCylinderConstraint as m,constraintOrSet as h,HorizontalPlaneConstraint as g,VerticalHalfPlaneConstraint as _,GeodesicConstraint as v,PointConstraint as y}from"./constraints.js";import{fromPoint as b,createWritable as x,toElevationAlignedDehydratedPoint as S}from"./normalizedPoint.js";import{getDegreesGeographic as C,directionBetweenPoints as w,pointFromDistanceAlongAzimuth as T}from"../../support/angularMeasurementUtils.js";function E(e,t,n,r,i,a){let o=`geodesic`,s=c(n),l=x();return b(e,t,r,l),l[2]=0,(!s||!u(l,n,l,s))&&(o=`euclidean`,s=n),{mode:o,view:t,elevationInfo:r,hasZ:i,directionMode:a,spatialReference:e.spatialReference,measurementSR:s,origin:l}}function D(t,n,i){if(n==null||t==null)return;let a=r(i.measurementSR);if(a==null)return;let o=I(t,i);if(o==null)return;let s=e(n,a);return new m(o,s)}function O(e,n,r,i){if(r==null||e==null)return;let a=I(e,i);if(a==null)return;let o=C(r),s=e=>{if(e==null)return;let n=x(),r=t(e,`degrees`,`geographic`);if(T(n,a,i.measurementSR,10,r,i.mode))return new _(a,n)},c=()=>{if(n!=null&&e!=null)return C(w(n,e))};switch(i.directionMode){case`absolute`:return s(o);case`relative`:{let e=c();return e==null?void 0:s(e+o)}case`relative-bilateral`:{let e=c();return e==null?void 0:h([s(e+o),s(e-o)])}}}function k(e,t){let n=R(e,t);return n==null?void 0:new g(n)}function A(e,t,n){let{context:r,longitude:i,latitude:a,direction:o,distance:s,elevation:c}=n;if(i!=null||a!=null||s!=null||c!=null||o!=null){if(i!=null||a!=null){let e=C(i),t=C(a),n=R(c,r);return new p(e,t,n)}return j(e,t,n)}}function j(t,n,{context:r,direction:i,distance:a,elevation:o}){if(n==null)return k(o,r);let{view:s,elevationInfo:c,measurementSR:l}=r,d=b(n,s,c);if(!l||!u(d,n.spatialReference,B,l))return;let[f,p]=B,m=a==null?void 0:e(a,`meters`),g=C(i),_=R(o,r),x=e=>{let t=new v([f,p],l,m,_,e);return m!=null&&e!=null&&(_!=null||!r.hasZ)?new y(t.closestTo(d)):t};if(g==null)return x(void 0);let S=()=>{if(t!=null&&n!=null)return C(w(t,n))};switch(r.directionMode){case`absolute`:return x(g);case`relative`:{let e=S();return e==null?void 0:x(e+g)}case`relative-bilateral`:{let e=S();return e==null?void 0:h([x(e+g),x(e-g)])}}}function M(e){return e.context.mode===`geodesic`?A(null,null,e):P(e)}function N(e,t,n){let{context:r,x:i,y:a,distance:o,direction:s,elevation:c}=n;return r.mode===`geodesic`?A(t,e,n):i!=null||a!=null?P(n):F([D(e,o,r),O(e,t,s,r),k(c,r)])}function P({x:e,y:t,elevation:n,context:r}){U.x=e?.value??0,U.y=t?.value??0,U.spatialReference=r.spatialReference;let i=I(U,r,V);return new p(e!=null&&i!=null?i[0]:void 0,t!=null&&i!=null?i[1]:void 0,R(n,r))}function F(e){let t;for(let n of e)n&&(t=t?.intersect(n)??n);return t}function I(e,t,n=x()){let{view:r,elevationInfo:i,measurementSR:o,origin:s,mode:c}=t;if(b(e,r,i,n),u(n,e.spatialReference,n,o))return c!==`geodesic`&&a(n,n,s),n}function L(e,t,n,r){let{view:i,measurementSR:a,spatialReference:c,origin:l,mode:d}=n;if(d===`geodesic`?o(H,e):s(H,e,l),u(H,a,H,c))return S(H,i,t,n,r)}function R(e,t){return z(e,t)?.value??void 0}function z(t,{view:r,origin:a,elevationInfo:o,hasZ:s,measurementSR:c}){if(t==null||!s)return;let l=i(c);if(l==null)return;let[u,d]=a,p=e(t,l),m=r?.type===`3d`?f(r,u,d,p,c,o):p;if(m!=null)return n(m,l)}const B=x(),V=x(),H=x(),U=d(0,0,0,l.WGS84);export{L as constraintSpaceToPoint,E as getConstraintContext,A as getGeodesicConstraint,M as getPointConstraint,N as getPolylineOrPolygonConstraint,F as intersectAll,I as pointToConstraintSpace};
2
+ import{valueInUnit as e,createAngle as t,createLength as n}from"../../../core/quantity.js";import{lengthUnitFromSpatialReference as r,verticalLengthUnitFromSpatialReference as i}from"../../../core/units.js";import{subtract as a,copy as o,add as s}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{geodesicCompatibleSpatialReference as c}from"../../../geometry/geodesicUtils.js";import l from"../../../geometry/SpatialReference.js";import{projectVectorToVector as u}from"../../../geometry/projection/projectVectorToVector.js";import{makeDehydratedPoint as d}from"../../../layers/graphics/dehydratedPoint.js";import{getConvertedElevationFromXYZ as f}from"../../../support/elevationInfoUtils.js";import{CoordinateConstraint as p,VerticalCylinderConstraint as m,constraintOrSet as h,HorizontalPlaneConstraint as g,VerticalHalfPlaneConstraint as _,GeodesicConstraint as v,PointConstraint as y}from"./constraints.js";import{fromPoint as b,createWritable as x,toElevationAlignedDehydratedPoint as S}from"./normalizedPoint.js";import{getDegreesGeographic as C,directionBetweenPoints as w,pointFromDistanceAlongAzimuth as T}from"../../support/angularMeasurementUtils.js";function E(e,t,n,r,i,a){let o=`geodesic`,s=c(n),l=x();return b(e,t,r,l),l[2]=0,s&&u(l,n,l,s)||(o=`euclidean`,s=n),{mode:o,view:t,elevationInfo:r,hasZ:i,directionMode:a,spatialReference:e.spatialReference,measurementSR:s,origin:l}}function D(t,n,i){if(n==null||t==null)return;let a=r(i.measurementSR);if(a==null)return;let o=I(t,i);if(o==null)return;let s=e(n,a);return new m(o,s)}function O(e,n,r,i){if(r==null||e==null)return;let a=I(e,i);if(a==null)return;let o=C(r),s=e=>{if(e==null)return;let n=x(),r=t(e,`degrees`,`geographic`);if(T(n,a,i.measurementSR,10,r,i.mode))return new _(a,n)},c=()=>{if(n!=null&&e!=null)return C(w(n,e))};switch(i.directionMode){case`absolute`:return s(o);case`relative`:{let e=c();return e==null?void 0:s(e+o)}case`relative-bilateral`:{let e=c();return e==null?void 0:h([s(e+o),s(e-o)])}}}function k(e,t){let n=R(e,t);return n==null?void 0:new g(n)}function A(e,t,n){let{context:r,longitude:i,latitude:a,direction:o,distance:s,elevation:c}=n;if(i!=null||a!=null||s!=null||c!=null||o!=null){if(i!=null||a!=null){let e=C(i),t=C(a),n=R(c,r);return new p(e,t,n)}return j(e,t,n)}}function j(t,n,{context:r,direction:i,distance:a,elevation:o}){if(n==null)return k(o,r);let{view:s,elevationInfo:c,measurementSR:l}=r,d=b(n,s,c);if(!l||!u(d,n.spatialReference,B,l))return;let[f,p]=B,m=a==null?void 0:e(a,`meters`),g=C(i),_=R(o,r),x=e=>{let t=new v([f,p],l,m,_,e);return m!=null&&e!=null&&(_!=null||!r.hasZ)?new y(t.closestTo(d)):t};if(g==null)return x(void 0);let S=()=>{if(t!=null&&n!=null)return C(w(t,n))};switch(r.directionMode){case`absolute`:return x(g);case`relative`:{let e=S();return e==null?void 0:x(e+g)}case`relative-bilateral`:{let e=S();return e==null?void 0:h([x(e+g),x(e-g)])}}}function M(e){return e.context.mode===`geodesic`?A(null,null,e):P(e)}function N(e,t,n){let{context:r,x:i,y:a,distance:o,direction:s,elevation:c}=n;return r.mode===`geodesic`?A(t,e,n):i!=null||a!=null?P(n):F([D(e,o,r),O(e,t,s,r),k(c,r)])}function P({x:e,y:t,elevation:n,context:r}){U.x=e?.value??0,U.y=t?.value??0,U.spatialReference=r.spatialReference;let i=I(U,r,V);return new p(e!=null&&i!=null?i[0]:void 0,t!=null&&i!=null?i[1]:void 0,R(n,r))}function F(e){let t;for(let n of e)n&&(t=t?.intersect(n)??n);return t}function I(e,t,n=x()){let{view:r,elevationInfo:i,measurementSR:o,origin:s,mode:c}=t;if(b(e,r,i,n),u(n,e.spatialReference,n,o))return c!==`geodesic`&&a(n,n,s),n}function L(e,t,n,r){let{view:i,measurementSR:a,spatialReference:c,origin:l,mode:d}=n;if(d===`geodesic`?o(H,e):s(H,e,l),u(H,a,H,c))return S(H,i,t,n,r)}function R(e,t){return z(e,t)?.value??void 0}function z(t,{view:r,origin:a,elevationInfo:o,hasZ:s,measurementSR:c}){if(t==null||!s)return;let l=i(c);if(l==null)return;let[u,d]=a,p=e(t,l),m=r?.type===`3d`?f(r,u,d,p,c,o):p;if(m!=null)return n(m,l)}const B=x(),V=x(),H=x(),U=d(0,0,0,l.WGS84);export{L as constraintSpaceToPoint,E as getConstraintContext,A as getGeodesicConstraint,M as getPointConstraint,N as getPolylineOrPolygonConstraint,F as intersectAll,I as pointToConstraintSpace};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{abortMaybe as e,removeMaybe as t}from"../../../core/maybe.js";import{ignoreAbortErrors as n,debounce as r}from"../../../core/promiseUtils.js";import{watch as i}from"../../../core/reactiveUtils.js";import{pointEquals as a}from"../../../layers/graphics/dehydratedFeatureComparison.js";import{clonePoint as o}from"../../../layers/graphics/hydratedFeatures.js";import{absoluteHeightElevationInfo as s}from"../../../support/elevationInfoUtils.js";import{EventPipeline as c}from"../dragEventPipeline.js";import{SnappingContext as l}from"./SnappingContext.js";import{ImmediateTask as u,TaskPriority as d}from"../../support/Scheduler.js";function f({predicate:r=()=>!0,snappingManager:a,snappingContext:o,updatingHandles:l,useZ:u=!0}){let d=new c;if(a==null)return{snappingStep:[x,d],cancelSnapping:x};let f=null,S=null,C,w=null,T=()=>{f=e(f),a.doneSnapping(),S?.frameTask.remove(),S=null,C=t(C),w=null},E=p(a,u,d),D=null,O=null,k=null;return{snappingStep:[e=>{if(!r(e))return e;let{action:t}=e;if(t===`start`){let{info:t}=e;if(S=h(o,e,m(a.view)),S.context.selfSnappingZ=null,!u&&t!=null){let e=b(o.coordinateHelper,t.handle.part);e!=null&&(S.context.selfSnappingZ={value:e,elevationInfo:o.elevationInfo??s})}}if(S!=null){let{context:r,originalScenePos:o,originalPos:s}=S,{mapEnd:c,mapStart:d,scenePoints:p}=e,m=g(s,v(c,d)),h=v(d,s),b={...e,action:`update`},x=S.context,T=_(o,p),A=a.update({point:m,scenePoint:T,context:r});if(k=A,y(c,A,h,u),D=m,O=T,t!==`end`){let{frameTask:e}=S;f??=new AbortController,w=t=>{l.consumePromise(n(E({frameTask:e,event:b,context:x,point:m,scenePoint:T,delta:h,getLastState:()=>({point:D,scenePoint:O,updatePoint:t.forceUpdate?null:k})},f.signal)))},w({forceUpdate:!1}),C??=i(()=>a.options.effectiveEnabled,()=>w?.({forceUpdate:!0}))}}return t===`end`&&T(),e},d],cancelSnapping:e=>(T(),e)}}function p(e,t,n){return r(async({frameTask:r,point:i,scenePoint:o,context:s,event:c,delta:l,getLastState:u},d)=>{let f=await r.schedule(()=>e.snap({point:i,scenePoint:o,context:s,signal:d}),d);if(f.valid){let o=await r.schedule(()=>f.apply(),d),p=u();p.point!=null&&i!==p.point&&(o=e.update({point:p.point,scenePoint:p.scenePoint,context:s})),(p.updatePoint==null||!a(o,p.updatePoint))&&(y(c.mapEnd,o,l,t),n.execute(c))}})}function m(e){return e.type===`3d`?e.resourceController.scheduler.registerTask(d.SNAPPING):u}function h(e,t,n){return{context:new l({editGeometryOperations:e.editGeometryOperations,elevationInfo:e.elevationInfo,pointer:e.pointer,vertexHandle:t.info==null?null:t.info.handle,excludeFeature:e.excludeFeature,feature:e.feature,visualizer:e.visualizer}),originalPos:t.snapOrigin==null?t.mapStart:e.coordinateHelper.vectorToDehydratedPoint(t.snapOrigin),originalScenePos:t.scenePoints==null?null:t.scenePoints.sceneStart,frameTask:n}}function g(e,[t,n,r]){let i=o(e);return i.x+=t,i.y+=n,i.hasZ&&(i.z+=r),i}function _(e,t){return e==null||t==null?null:g(e,v(t.sceneEnd,t.sceneStart))}function v(e,t){let n=e.hasZ&&t.hasZ?e.z-t.z:0;return[e.x-t.x,e.y-t.y,n]}function y(e,t,[n,r,i],a){e.x=t.x+n,e.y=t.y+r,a&&e.hasZ&&t.hasZ&&(e.z=t.z+i)}function b(e,t){if(!e.hasZ())return null;let n=t.vertices,r=null;for(let t of n){let n=e.getZ(t.pos);if(r!=null&&n!=null&&Math.abs(n-r)>1e-6)return null;r??=n}return r}function x(e){return e}export{f as createSnapDragEventPipelineStep};
2
+ import{abortMaybe as e,removeMaybe as t}from"../../../core/maybe.js";import{ignoreAbortErrors as n,debounce as r}from"../../../core/promiseUtils.js";import{watch as i}from"../../../core/reactiveUtils.js";import{pointEquals as a}from"../../../layers/graphics/dehydratedFeatureComparison.js";import{clonePoint as o}from"../../../layers/graphics/hydratedFeatures.js";import{absoluteHeightElevationInfo as s}from"../../../support/elevationInfoUtils.js";import{EventPipeline as c}from"../dragEventPipeline.js";import{SnappingContext as l}from"./SnappingContext.js";import{ImmediateTask as u,TaskPriority as d}from"../../support/Scheduler.js";function f({predicate:r=()=>!0,snappingManager:a,snappingContext:o,updatingHandles:l,useZ:u=!0}){let d=new c;if(a==null)return{snappingStep:[x,d],cancelSnapping:x};let f=null,S=null,C,w=null,T=()=>{f=e(f),a.doneSnapping(),S?.frameTask.remove(),S=null,C=t(C),w=null},E=p(a,u,d),D=null,O=null,k=null;return{snappingStep:[e=>{if(!r(e))return e;let{action:t}=e;if(t===`start`){let{info:t}=e;if(S=h(o,e,m(a.view)),S.context.selfSnappingZ=null,!u&&t!=null){let e=b(o.coordinateHelper,t.handle.part);e!=null&&(S.context.selfSnappingZ={value:e,elevationInfo:o.elevationInfo??s})}}if(S!=null){let{context:r,originalScenePos:o,originalPos:s}=S,{mapEnd:c,mapStart:d,scenePoints:p}=e,m=g(s,v(c,d)),h=v(d,s),b={...e,action:`update`},x=S.context,T=_(o,p),A=a.update({point:m,scenePoint:T,context:r});if(k=A,y(c,A,h,u),D=m,O=T,t!==`end`){let{frameTask:e}=S;f??=new AbortController,w=t=>{l.consumePromise(n(E({frameTask:e,event:b,context:x,point:m,scenePoint:T,delta:h,getLastState:()=>({point:D,scenePoint:O,updatePoint:t.forceUpdate?null:k})},f.signal)))},w({forceUpdate:!1}),C??=i(()=>a.options.effectiveEnabled,()=>w?.({forceUpdate:!0}))}}return t===`end`&&T(),e},d],cancelSnapping:e=>(T(),e)}}function p(e,t,n){return r(async({frameTask:r,point:i,scenePoint:o,context:s,event:c,delta:l,getLastState:u},d)=>{let f=await r.schedule(()=>e.snap({point:i,scenePoint:o,context:s,signal:d}),d);if(f.valid){let o=await r.schedule(()=>f.apply(),d),p=u();p.point!=null&&i!==p.point&&(o=e.update({point:p.point,scenePoint:p.scenePoint,context:s})),p.updatePoint!=null&&a(o,p.updatePoint)||(y(c.mapEnd,o,l,t),n.execute(c))}})}function m(e){return e.type===`3d`?e.resourceController.scheduler.registerTask(d.SNAPPING):u}function h(e,t,n){return{context:new l({editGeometryOperations:e.editGeometryOperations,elevationInfo:e.elevationInfo,pointer:e.pointer,vertexHandle:t.info==null?null:t.info.handle,excludeFeature:e.excludeFeature,feature:e.feature,visualizer:e.visualizer}),originalPos:t.snapOrigin==null?t.mapStart:e.coordinateHelper.vectorToDehydratedPoint(t.snapOrigin),originalScenePos:t.scenePoints==null?null:t.scenePoints.sceneStart,frameTask:n}}function g(e,[t,n,r]){let i=o(e);return i.x+=t,i.y+=n,i.hasZ&&(i.z+=r),i}function _(e,t){return e==null||t==null?null:g(e,v(t.sceneEnd,t.sceneStart))}function v(e,t){let n=e.hasZ&&t.hasZ?e.z-t.z:0;return[e.x-t.x,e.y-t.y,n]}function y(e,t,[n,r,i],a){e.x=t.x+n,e.y=t.y+r,a&&e.hasZ&&t.hasZ&&(e.z=t.z+i)}function b(e,t){if(!e.hasZ())return null;let n=t.vertices,r=null;for(let t of n){let n=e.getZ(t.pos);if(r!=null&&n!=null&&Math.abs(n-r)>1e-6)return null;r??=n}return r}function x(e){return e}export{f as createSnapDragEventPipelineStep};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{waitAnimationFrame as n}from"../../../../core/scheduling.js";import{property as r,subclass as i}from"../../../../core/accessorSupport/decorators.js";import{tooltipKeys as a}from"../../keybindings.js";import{notAvailableString as o}from"../constants.js";import{base as s}from"../css.js";import{ElevationModeSelect as c}from"./ElevationModeSelect.js";import l from"../../../../widgets/Widget.js";import{loadCalciteComponents as u}from"../../../../widgets/support/componentsUtils.js";import{tsx as d,tsxFragment as f}from"../../../../widgets/support/widget.js";const p=`${s}-editable-field`,m={base:p,inputMode:`${p}--input`,feedbackMode:`${p}--feedback`,readOnly:`${p}--read-only`,locked:`${p}--locked`,title:`${p}__title`,value:`${p}__value`,valueContent:`${p}__value__content`,valueContentReadOnly:`${p}__value__content--read-only`,lockIcon:`${p}__lock-icon`,input:`${p}__input`,inputWrapper:`${p}__input-wrapper`,inputAction:`${p}__input-action`,inputMessage:`${p}__input-message`,inputSuffix:`${p}__input-suffix`,button:`${p}__button`},h={lock:`lock`,unlock:`unlock`};let g=class extends l{constructor(){super(...arguments),this._input=null,this._lock=null,this._onLockClick=()=>{this.field.toggleLock(this.context)},this._onLockAfterCreate=e=>{this._lock=e},this._onLockAfterRemoved=()=>{this._lock=null},this._onKeyDown=e=>{e.key===a.discard&&this.mode===`input`&&this._input&&this.context.onDiscard(this._input)},this._onInputKeyDown=e=>{let t=this._input;if(t&&e.target===t)switch(e.key){case a.commit:return this.field.onCommit(`commit-and-exit`,t,this.context);case a.next:{e.preventDefault(),e.stopPropagation();let n=e.shiftKey?`commit-and-previous`:`commit-and-next`;return this.field.onCommit(n,t,this.context)}}},this._onInput=e=>{this.field.onInput(e.currentTarget.value)},this._onInputBlur=e=>{let t=this._input;t&&e.relatedTarget!==this._lock&&this.field.onCommit(`commit-on-blur`,t,this.context)},this._selectText=()=>{let e=()=>{(this._input===document.activeElement||this._input===document.activeElement?.shadowRoot?.activeElement)&&this._input?.selectText()};e(),n().then(e)},this._onAfterCreate=e=>{this._input=e,e.addEventListener(`paste`,this._onPaste),e.addEventListener(`beforeinput`,this._onBeforeInput)},this._onAfterRemoved=e=>{e.removeEventListener(`paste`,this._onPaste),e.removeEventListener(`beforeinput`,this._onBeforeInput),this._input===e&&(this._input=null)},this._onPaste=e=>{let t=e.clipboardData?.getData(`text`);t&&this.field.parse(t,this.context)!=null&&(e.stopPropagation(),this.field.onInput(t))},this._onBeforeInput=e=>{(e.inputType===`historyUndo`||e.inputType===`historyRedo`)&&!this.field.dirty&&e.preventDefault()}}initialize(){this.addHandles(t(()=>this._rawDisplayValue,()=>{let{committed:e,inputValue:t}=this.field;!e&&!t&&this._input===document.activeElement&&this._selectText()}))}loadDependencies(){return u({button:()=>import(`@esri/calcite-components/dist/components/calcite-button`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),input:()=>import(`@esri/calcite-components/dist/components/calcite-input`),notice:()=>import(`@esri/calcite-components/dist/components/calcite-notice`)})}render(){let{field:e,mode:t}=this,n=t===`input`;return d(`div`,{class:this.classes({[m.base]:!0,[m.feedbackMode]:t===`feedback`,[m.inputMode]:t===`input`,[m.locked]:e.locked,[m.readOnly]:e.readOnly})},d(`div`,{class:m.title,key:`title`},this._title),d(`div`,{class:m.value,key:`value`,onkeydown:this._onKeyDown},n?this._renderValueInputMode():this._renderValueFeedbackMode()))}get _formattedValue(){return this.field.getFormattedValue(this.context)||o}get _rawDisplayValue(){return this.field.getRawDisplayValue(this.context)}get _suffix(){return this.field.getSuffix(this.context)}get _title(){let{title:e}=this.field;return typeof e==`string`?e:e(this.context)}get _messages(){return this.context?.messages.sketch??{}}get _elevationModeSelect(){return this.field.name===`elevation`&&this.context.elevationModeContext&&this.context.toolOptions.tooltips.visibleElements.elevationMode?d(c,{context:this.context,key:`elevation-mode`,mode:this.mode}):null}_renderValueFeedbackMode(){return d(f,null,d(`div`,{class:m.valueContent,key:`value-feedback`},this._formattedValue,this._elevationModeSelect),this.field.locked&&this.mode!==`input`?d(`calcite-icon`,{class:m.lockIcon,icon:h.lock,key:`icon`,scale:`s`}):null)}_renderValueInputMode(){return this.field.readOnly?this._renderValueReadOnly():this._renderValueWritable()}_renderValueReadOnly(){return d(`div`,{class:this.classes(m.valueContent,m.valueContentReadOnly),key:`value-read-only`},this._formattedValue,this._elevationModeSelect)}_renderValueWritable(){let{field:e}=this,t=this._messages,{name:n}=e,r=e.invalid;return d(f,null,d(`div`,{class:m.inputWrapper,key:`value-input`},d(`calcite-input`,{afterCreate:this._onAfterCreate,afterRemoved:this._onAfterRemoved,class:m.input,"data-field-id":e.id,"data-field-name":n,"data-testid":`tooltip-field-${n}`,key:`input`,scale:`s`,status:r?`invalid`:`idle`,type:`text`,value:this._rawDisplayValue??o,onblur:this._onInputBlur,onCalciteInputInput:this._onInput,onfocus:this._selectText,onkeydown:this._onInputKeyDown},this._elevationModeSelect?d(`div`,{class:m.inputAction,slot:`action`},this._elevationModeSelect):null)),d(`div`,{class:m.inputSuffix,key:`suffix`},this._suffix),this._renderedLockButton,r?d(`calcite-notice`,{appearance:`transparent`,class:m.inputMessage,key:`input-message`,kind:`danger`,open:!0,role:`alert`,scale:`s`},d(`span`,{slot:`message`},t.invalidValue)):null)}get _renderedLockButton(){let{lockDisabled:e,locked:t,lockable:n,name:r}=this.field;if(!n)return d(`div`,{key:`no-lock-button`});let i=this._messages,a=t?i.unlockConstraint:i.lockConstraint;return d(`calcite-button`,{afterCreate:this._onLockAfterCreate,afterRemoved:this._onLockAfterRemoved,alignment:`center`,appearance:`transparent`,class:m.button,"data-testid":`tooltip-field-${r}-lock`,disabled:e,iconStart:t?h.lock:h.unlock,key:`lock-button`,kind:`neutral`,label:a,scale:`s`,tabIndex:-1,title:a,onclick:this._onLockClick})}};e([r()],g.prototype,`field`,void 0),e([r()],g.prototype,`context`,void 0),e([r()],g.prototype,`mode`,void 0),e([r()],g.prototype,`_input`,void 0),e([r()],g.prototype,`_lock`,void 0),e([r()],g.prototype,`_formattedValue`,null),e([r()],g.prototype,`_rawDisplayValue`,null),e([r()],g.prototype,`_suffix`,null),e([r()],g.prototype,`_title`,null),e([r()],g.prototype,`_messages`,null),e([r()],g.prototype,`_elevationModeSelect`,null),e([r()],g.prototype,`_renderedLockButton`,null),g=e([i(`esri.views.interactive.tooltip.components.TooltipEditableField`)],g);export{g as TooltipEditableField};
2
+ import{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{waitAnimationFrame as n}from"../../../../core/scheduling.js";import{property as r,subclass as i}from"../../../../core/accessorSupport/decorators.js";import{tooltipKeys as a}from"../../keybindings.js";import{notAvailableString as o}from"../constants.js";import{base as s}from"../css.js";import{ElevationModeSelect as c}from"./ElevationModeSelect.js";import l from"../../../../widgets/Widget.js";import{loadCalciteComponents as u}from"../../../../widgets/support/componentsUtils.js";import{tsx as d,tsxFragment as f}from"../../../../widgets/support/widget.js";const p=`${s}-editable-field`,m={base:p,inputMode:`${p}--input`,feedbackMode:`${p}--feedback`,readOnly:`${p}--read-only`,locked:`${p}--locked`,title:`${p}__title`,value:`${p}__value`,valueContent:`${p}__value__content`,valueContentReadOnly:`${p}__value__content--read-only`,lockIcon:`${p}__lock-icon`,input:`${p}__input`,inputWrapper:`${p}__input-wrapper`,inputAction:`${p}__input-action`,inputMessage:`${p}__input-message`,inputSuffix:`${p}__input-suffix`,button:`${p}__button`},h={lock:`lock`,unlock:`unlock`};let g=class extends l{constructor(){super(...arguments),this._input=null,this._lock=null,this._onLockClick=()=>{this.field.toggleLock(this.context)},this._onLockAfterCreate=e=>{this._lock=e},this._onLockAfterRemoved=()=>{this._lock=null},this._onKeyDown=e=>{e.key===a.discard&&this.mode===`input`&&this._input&&this.context.onDiscard(this._input)},this._onInputKeyDown=e=>{let t=this._input;if(t&&e.target===t)switch(e.key){case a.commit:return this.field.onCommit(`commit-and-exit`,t,this.context);case a.next:{e.preventDefault(),e.stopPropagation();let n=e.shiftKey?`commit-and-previous`:`commit-and-next`;return this.field.onCommit(n,t,this.context)}}},this._onInput=e=>{this.field.onInput(e.currentTarget.value)},this._onInputBlur=e=>{let t=this._input;t&&e.relatedTarget!==this._lock&&this.field.onCommit(`commit-on-blur`,t,this.context)},this._selectText=()=>{let e=()=>{(this._input===document.activeElement||this._input===document.activeElement?.shadowRoot?.activeElement)&&this._input?.selectText()};e(),n().then(e)},this._onAfterCreate=e=>{this._input=e,e.addEventListener(`paste`,this._onPaste),e.addEventListener(`beforeinput`,this._onBeforeInput)},this._onAfterRemoved=e=>{e.removeEventListener(`paste`,this._onPaste),e.removeEventListener(`beforeinput`,this._onBeforeInput),this._input===e&&(this._input=null)},this._onPaste=e=>{let t=e.clipboardData?.getData(`text`);t&&this.field.parse(t,this.context)!=null&&(e.stopPropagation(),this.field.onInput(t))},this._onBeforeInput=e=>{e.inputType!==`historyUndo`&&e.inputType!==`historyRedo`||this.field.dirty||e.preventDefault()}}initialize(){this.addHandles(t(()=>this._rawDisplayValue,()=>{let{committed:e,inputValue:t}=this.field;!e&&!t&&this._input===document.activeElement&&this._selectText()}))}loadDependencies(){return u({button:()=>import(`@esri/calcite-components/dist/components/calcite-button`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),input:()=>import(`@esri/calcite-components/dist/components/calcite-input`),notice:()=>import(`@esri/calcite-components/dist/components/calcite-notice`)})}render(){let{field:e,mode:t}=this,n=t===`input`;return d(`div`,{class:this.classes({[m.base]:!0,[m.feedbackMode]:t===`feedback`,[m.inputMode]:t===`input`,[m.locked]:e.locked,[m.readOnly]:e.readOnly})},d(`div`,{class:m.title,key:`title`},this._title),d(`div`,{class:m.value,key:`value`,onkeydown:this._onKeyDown},n?this._renderValueInputMode():this._renderValueFeedbackMode()))}get _formattedValue(){return this.field.getFormattedValue(this.context)||o}get _rawDisplayValue(){return this.field.getRawDisplayValue(this.context)}get _suffix(){return this.field.getSuffix(this.context)}get _title(){let{title:e}=this.field;return typeof e==`string`?e:e(this.context)}get _messages(){return this.context?.messages.sketch??{}}get _elevationModeSelect(){return this.field.name===`elevation`&&this.context.elevationModeContext&&this.context.toolOptions.tooltips.visibleElements.elevationMode?d(c,{context:this.context,key:`elevation-mode`,mode:this.mode}):null}_renderValueFeedbackMode(){return d(f,null,d(`div`,{class:m.valueContent,key:`value-feedback`},this._formattedValue,this._elevationModeSelect),this.field.locked&&this.mode!==`input`?d(`calcite-icon`,{class:m.lockIcon,icon:h.lock,key:`icon`,scale:`s`}):null)}_renderValueInputMode(){return this.field.readOnly?this._renderValueReadOnly():this._renderValueWritable()}_renderValueReadOnly(){return d(`div`,{class:this.classes(m.valueContent,m.valueContentReadOnly),key:`value-read-only`},this._formattedValue,this._elevationModeSelect)}_renderValueWritable(){let{field:e}=this,t=this._messages,{name:n}=e,r=e.invalid;return d(f,null,d(`div`,{class:m.inputWrapper,key:`value-input`},d(`calcite-input`,{afterCreate:this._onAfterCreate,afterRemoved:this._onAfterRemoved,class:m.input,"data-field-id":e.id,"data-field-name":n,"data-testid":`tooltip-field-${n}`,key:`input`,scale:`s`,status:r?`invalid`:`idle`,type:`text`,value:this._rawDisplayValue??o,onblur:this._onInputBlur,onCalciteInputInput:this._onInput,onfocus:this._selectText,onkeydown:this._onInputKeyDown},this._elevationModeSelect?d(`div`,{class:m.inputAction,slot:`action`},this._elevationModeSelect):null)),d(`div`,{class:m.inputSuffix,key:`suffix`},this._suffix),this._renderedLockButton,r?d(`calcite-notice`,{appearance:`transparent`,class:m.inputMessage,key:`input-message`,kind:`danger`,open:!0,role:`alert`,scale:`s`},d(`span`,{slot:`message`},t.invalidValue)):null)}get _renderedLockButton(){let{lockDisabled:e,locked:t,lockable:n,name:r}=this.field;if(!n)return d(`div`,{key:`no-lock-button`});let i=this._messages,a=t?i.unlockConstraint:i.lockConstraint;return d(`calcite-button`,{afterCreate:this._onLockAfterCreate,afterRemoved:this._onLockAfterRemoved,alignment:`center`,appearance:`transparent`,class:m.button,"data-testid":`tooltip-field-${r}-lock`,disabled:e,iconStart:t?h.lock:h.unlock,key:`lock-button`,kind:`neutral`,label:a,scale:`s`,tabIndex:-1,title:a,onclick:this._onLockClick})}};e([r()],g.prototype,`field`,void 0),e([r()],g.prototype,`context`,void 0),e([r()],g.prototype,`mode`,void 0),e([r()],g.prototype,`_input`,void 0),e([r()],g.prototype,`_lock`,void 0),e([r()],g.prototype,`_formattedValue`,null),e([r()],g.prototype,`_rawDisplayValue`,null),e([r()],g.prototype,`_suffix`,null),e([r()],g.prototype,`_title`,null),e([r()],g.prototype,`_messages`,null),e([r()],g.prototype,`_elevationModeSelect`,null),e([r()],g.prototype,`_renderedLockButton`,null),g=e([i(`esri.views.interactive.tooltip.components.TooltipEditableField`)],g);export{g as TooltipEditableField};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{equals as t}from"../../core/arrayUtils.js";import{createTask as n}from"../../core/asyncUtils.js";import{EventedAccessor as r}from"../../core/Evented.js";import{IdentifiableMixin as i}from"../../core/Identifiable.js";import a from"../../core/Logger.js";import{destroyMaybe as o,removeMaybe as s}from"../../core/maybe.js";import{EsriPromiseMixin as c}from"../../core/Promise.js";import{throwIfAborted as l}from"../../core/promiseUtils.js";import{property as u,subclass as d}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as f}from"../../core/support/UpdatingHandles.js";import{validateScaleRange as p}from"../../geometry/support/scaleUtils.js";import{getAttributionItemFromUserCopyright as m,isDynamicAttributionLayer as h,createAttributionIndex as g,getAttributionItemsFromIndex as _,getAttributionItemFromAccessInformation as v,getAttributionItemFromLayerCopyright as y}from"../support/attributionUtils.js";let b=class extends i(c(r)){get spatialReferenceSupported(){return!0}constructor(e){super(e),this._updatingHandles=new f,this._attributionIndexTask=null,this.layer=null,this.parent=null}initialize(){this.when().catch(e=>{if(e?.name!==`layerview:create-error`){let t=this.layer&&this.layer.id||`no id`,n=this.layer?.title||`no title`;a.getLogger(this).error(`#resolve()`,`Failed to resolve layer view (layer title: '${n}', id: '${t}')`,e)}})}destroy(){this._updatingHandles=o(this._updatingHandles),this._attributionIndexTask=s(this._attributionIndexTask),this._set(`parent`,null)}get attributionItems(){let e=this._get(`attributionItems`)??[];if(this.suspended||!this.layer?.attributionVisible)return e.length===0?e:[];if(!this.view.stationary)return e;let n=this.getAttributionItems();return t(e,n,(e,t)=>e.text===t.text)?e:n}get attributionUpdating(){return this._attributionIndexTask?!this._attributionIndexTask.finished:!1}get fullOpacity(){return(this.layer?.opacity??1)*(this.parent?.fullOpacity??1)}get suspended(){return this.destroyed||!this.canResume()}get suspendInfo(){return this.getSuspendInfo()}get legendEnabled(){return!this.suspended&&this.layer?.legendEnabled===!0}get updating(){return!!(this._updatingHandles?.updating||this.isUpdating())}get updatingProgress(){return+!this.updating}get updateSuspended(){return this.suspended}get visible(){return this.layer?.visible===!0}set visible(e){this._overrideIfSome(`visible`,e)}get visibleAtCurrentScale(){return!0}get visibleAtCurrentTimeExtent(){let e=this.view.timeExtent,t=this.layer?.visibilityTimeExtent;return!e||!t||!e.intersection(t).isEmpty}canResume(){let e=this.layer&&`effectiveScaleRange`in this.layer?this.layer.effectiveScaleRange:null;return this.visible&&this.layer?.loaded&&this.parent&&!this.parent.suspended&&this.view?.ready&&p(e)&&this.visibleAtCurrentScale&&this.visibleAtCurrentTimeExtent||!1}getSuspendInfo(){let e=this.parent?.suspended?this.parent.suspendInfo:{};this.view?.ready||(e.viewNotReady=!0),(!this.layer||!this.layer.loaded)&&(e.layerNotLoaded=!0);let t=this.layer&&`effectiveScaleRange`in this.layer?this.layer.effectiveScaleRange:null;return(!p(t)||!this.visibleAtCurrentScale)&&(e.outsideScaleRange=!0),this.visibleAtCurrentTimeExtent||(e.outsideVisibilityTimeExtent=!0),this.visible||(e.layerInvisible=!0),e}isUpdating(){return!1}getAttributionItems(){let e=m(this.layer);if(e)return[e];if(h(this.layer)&&(this._attributionIndexTask||(this._attributionIndexTask=n(async e=>{let t=await this.layer.fetchAttributionData();return l(e),g(t)}),this._updatingHandles.consumePromise(this._attributionIndexTask.promise)),this._attributionIndexTask?.finished&&this._attributionIndexTask.value))return _(this._attributionIndexTask.value,this.layer.tileInfo,this.view.scale,this.view.extent);let t=v(this.layer);if(t)return[t];let r=y(this.layer);return r?[r]:[]}};e([u({readOnly:!0})],b.prototype,`spatialReferenceSupported`,null),e([u()],b.prototype,`view`,void 0),e([u({readOnly:!0})],b.prototype,`attributionItems`,null),e([u({readOnly:!0})],b.prototype,`attributionUpdating`,null),e([u()],b.prototype,`fullOpacity`,null),e([u()],b.prototype,`layer`,void 0),e([u()],b.prototype,`parent`,void 0),e([u({readOnly:!0})],b.prototype,`suspended`,null),e([u({readOnly:!0})],b.prototype,`suspendInfo`,null),e([u({readOnly:!0})],b.prototype,`legendEnabled`,null),e([u({type:Boolean,readOnly:!0})],b.prototype,`updating`,null),e([u({readOnly:!0})],b.prototype,`updatingProgress`,null),e([u()],b.prototype,`updateSuspended`,null),e([u()],b.prototype,`visible`,null),e([u({readOnly:!0})],b.prototype,`visibleAtCurrentScale`,null),e([u({readOnly:!0})],b.prototype,`visibleAtCurrentTimeExtent`,null),b=e([d(`esri.views.layers.LayerView`)],b);export{b as default};
2
+ import{__decorate as e}from"tslib";import{equals as t}from"../../core/arrayUtils.js";import{createTask as n}from"../../core/asyncUtils.js";import{EventedAccessor as r}from"../../core/Evented.js";import{IdentifiableMixin as i}from"../../core/Identifiable.js";import a from"../../core/Logger.js";import{destroyMaybe as o,removeMaybe as s}from"../../core/maybe.js";import{EsriPromiseMixin as c}from"../../core/Promise.js";import{throwIfAborted as l}from"../../core/promiseUtils.js";import{property as u,subclass as d}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as f}from"../../core/support/UpdatingHandles.js";import{validateScaleRange as p}from"../../geometry/support/scaleUtils.js";import{getAttributionItemFromUserCopyright as m,isDynamicAttributionLayer as h,createAttributionIndex as g,getAttributionItemsFromIndex as _,getAttributionItemFromAccessInformation as v,getAttributionItemFromLayerCopyright as y}from"../support/attributionUtils.js";let b=class extends i(c(r)){get spatialReferenceSupported(){return!0}constructor(e){super(e),this._updatingHandles=new f,this._attributionIndexTask=null,this.layer=null,this.parent=null}initialize(){this.when().catch(e=>{if(e?.name!==`layerview:create-error`){let t=this.layer&&this.layer.id||`no id`,n=this.layer?.title||`no title`;a.getLogger(this).error(`#resolve()`,`Failed to resolve layer view (layer title: '${n}', id: '${t}')`,e)}})}destroy(){this._updatingHandles=o(this._updatingHandles),this._attributionIndexTask=s(this._attributionIndexTask),this._set(`parent`,null)}get attributionItems(){let e=this._get(`attributionItems`)??[];if(this.suspended||!this.layer?.attributionVisible)return e.length===0?e:[];if(!this.view.stationary)return e;let n=this.getAttributionItems();return t(e,n,(e,t)=>e.text===t.text)?e:n}get attributionUpdating(){return this._attributionIndexTask?!this._attributionIndexTask.finished:!1}get fullOpacity(){return(this.layer?.opacity??1)*(this.parent?.fullOpacity??1)}get suspended(){return this.destroyed||!this.canResume()}get suspendInfo(){return this.getSuspendInfo()}get legendEnabled(){return!this.suspended&&this.layer?.legendEnabled===!0}get updating(){return!!(this._updatingHandles?.updating||this.isUpdating())}get updatingProgress(){return+!this.updating}get updateSuspended(){return this.suspended}get visible(){return this.layer?.visible===!0}set visible(e){this._overrideIfSome(`visible`,e)}get visibleAtCurrentScale(){return!0}get visibleAtCurrentTimeExtent(){let e=this.view.timeExtent,t=this.layer?.visibilityTimeExtent;return!e||!t||!e.intersection(t).isEmpty}canResume(){let e=this.layer&&`effectiveScaleRange`in this.layer?this.layer.effectiveScaleRange:null;return this.visible&&this.layer?.loaded&&this.parent&&!this.parent.suspended&&this.view?.ready&&p(e)&&this.visibleAtCurrentScale&&this.visibleAtCurrentTimeExtent||!1}getSuspendInfo(){let e=this.parent?.suspended?this.parent.suspendInfo:{};this.view?.ready||(e.viewNotReady=!0),this.layer&&this.layer.loaded||(e.layerNotLoaded=!0);let t=this.layer&&`effectiveScaleRange`in this.layer?this.layer.effectiveScaleRange:null;return p(t)&&this.visibleAtCurrentScale||(e.outsideScaleRange=!0),this.visibleAtCurrentTimeExtent||(e.outsideVisibilityTimeExtent=!0),this.visible||(e.layerInvisible=!0),e}isUpdating(){return!1}getAttributionItems(){let e=m(this.layer);if(e)return[e];if(h(this.layer)&&(this._attributionIndexTask||(this._attributionIndexTask=n(async e=>{let t=await this.layer.fetchAttributionData();return l(e),g(t)}),this._updatingHandles.consumePromise(this._attributionIndexTask.promise)),this._attributionIndexTask?.finished&&this._attributionIndexTask.value))return _(this._attributionIndexTask.value,this.layer.tileInfo,this.view.scale,this.view.extent);let t=v(this.layer);if(t)return[t];let r=y(this.layer);return r?[r]:[]}};e([u({readOnly:!0})],b.prototype,`spatialReferenceSupported`,null),e([u()],b.prototype,`view`,void 0),e([u({readOnly:!0})],b.prototype,`attributionItems`,null),e([u({readOnly:!0})],b.prototype,`attributionUpdating`,null),e([u()],b.prototype,`fullOpacity`,null),e([u()],b.prototype,`layer`,void 0),e([u()],b.prototype,`parent`,void 0),e([u({readOnly:!0})],b.prototype,`suspended`,null),e([u({readOnly:!0})],b.prototype,`suspendInfo`,null),e([u({readOnly:!0})],b.prototype,`legendEnabled`,null),e([u({type:Boolean,readOnly:!0})],b.prototype,`updating`,null),e([u({readOnly:!0})],b.prototype,`updatingProgress`,null),e([u()],b.prototype,`updateSuspended`,null),e([u()],b.prototype,`visible`,null),e([u({readOnly:!0})],b.prototype,`visibleAtCurrentScale`,null),e([u({readOnly:!0})],b.prototype,`visibleAtCurrentTimeExtent`,null),b=e([d(`esri.views.layers.LayerView`)],b);export{b as default};
@@ -28,23 +28,35 @@ export interface LineOfSightLayerViewProperties extends LayerViewProperties, Par
28
28
  * const layerView = await view.whenLayerView(lineOfSightLayer);
29
29
  * ```
30
30
  *
31
+ * > [!WARNING]
32
+ * >
33
+ * > **Things to consider:**
34
+ * > * Snapping, tooltips, display units, and input units used during interactive placement and editing are inherited from
35
+ * [ViewOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/).
36
+ * > * Snapping is enabled by default. This can be temporarily disabled by holding the `CTRL` key.
37
+ * > * Layer types currently supported for snapping are: [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/), [GraphicsLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GraphicsLayer/) (except Mesh geometries),
38
+ * > [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/), [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/), [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
39
+ * > [3D Object SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/), and [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/BuildingSceneLayer/).
40
+ *
31
41
  * @see [LineOfSightLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/LineOfSightLayer/)
32
42
  * @see [LineOfSightAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysis/)
33
43
  * @see [LineOfSightAnalysisTarget](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisTarget/)
34
44
  * @see [LineOfSightAnalysisObserver](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisObserver/)
35
45
  * @see [LineOfSightAnalysisView3D](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/)
46
+ * @see [ViewOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/)
36
47
  * @see [Line Of Sight component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-line-of-sight/)
37
48
  * @see [Async cancellation with AbortController](https://developers.arcgis.com/javascript/latest/async-cancellation-with-abortcontroller/)
38
49
  */
39
50
  export default abstract class LineOfSightLayerView extends LayerView {
40
51
  /**
41
- * Enables interactivity for the [layer](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LineOfSightLayerView/#layer). When set to `true`, manipulators will be displayed,
42
- * allowing users to click and drag to edit the layer's
43
- * [LineOfSightLayer.analysis](https://developers.arcgis.com/javascript/latest/references/core/layers/LineOfSightLayer/#analysis) if it has a valid
44
- * [LineOfSightAnalysis.observer](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysis/#observer) and
45
- * [LineOfSightAnalysis.targets](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysis/#targets). Right-clicking a target will remove it.
52
+ * Enables interactivity for the [layer](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LineOfSightLayerView/#layer).
53
+ * When set to `true`, and the layer includes a valid [LineOfSightLayer.observer](https://developers.arcgis.com/javascript/latest/references/core/layers/LineOfSightLayer/#observer) and any
54
+ * [LineOfSightLayer.targets](https://developers.arcgis.com/javascript/latest/references/core/layers/LineOfSightLayer/#targets), they become selectable and editable and the manipulators will be displayed.
55
+ *
56
+ * Targets can be removed by right-clicking on them or with the `Delete` key.
57
+ * The observer and the last target cannot be deleted interactively.
46
58
  *
47
- * This property is automatically set to `true` when the analysis is assigned to a
59
+ * This property is automatically set to `true` when the [LineOfSightLayer.analysis](https://developers.arcgis.com/javascript/latest/references/core/layers/LineOfSightLayer/#analysis) is assigned to a
48
60
  * [Line Of Sight component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-line-of-sight/).
49
61
  *
50
62
  * @default false
@@ -72,20 +84,26 @@ export default abstract class LineOfSightLayerView extends LayerView {
72
84
  */
73
85
  get results(): Collection<LineOfSightAnalysisResult | null | undefined>;
74
86
  /**
75
- * Starts the interactive placement of an observer and/or targets on the [layer](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LineOfSightLayerView/#layer)'s
87
+ * Starts the interactive placement of an observer and targets on the [layer](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LineOfSightLayerView/#layer)'s
76
88
  * [LineOfSightLayer.analysis](https://developers.arcgis.com/javascript/latest/references/core/layers/LineOfSightLayer/#analysis).
77
89
  *
78
- * If the analysis does not have a valid observer yet, this method will allow placing an observer, which can be followed
79
- * by zero or more targets. Otherwise, if it already has a valid observer, it will allow placing targets.
90
+ * If the layer does not have a valid [LineOfSightLayer.observer](https://developers.arcgis.com/javascript/latest/references/core/layers/LineOfSightLayer/#observer) yet, this method will allow placing an observer,
91
+ * which can be followed by zero or more targets. Otherwise, if it already has a valid observer, it will allow placing targets.
92
+ * An observer is valid when it has a position. Placing an observer without any targets is a productive operation.
80
93
  *
81
- * The placement operation will finish when the user presses the escape key.
94
+ * The placement operation will finish when the user presses the escape key. Pressing escape after placing an observer
95
+ * or target finalizes a productive operation. Pressing escape before a valid observer is placed rejects the promise.
82
96
  * To stop the placing programmatically, pass an abort signal as an argument when calling the method.
83
- * The promise resolves when the operation is productive, i.e. an oberver or any targets were added.
97
+ * The promise resolves when the operation is productive, i.e. an observer or any targets were added.
84
98
  * Otherwise, if nothing was added or signal was aborted, the promise is rejected.
85
99
  *
100
+ * By default, the observer and targets are created at absolute height.
101
+ * Optionally, by specifying the options of the method,
102
+ * you can change the [elevation info](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/ElevationInfo/).
103
+ *
86
104
  * Calling this method sets [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LineOfSightLayerView/#interactive) to `true`.
87
105
  *
88
- * @param options - Additional placement options, including elevation information and an abort signal.
106
+ * @param options - An object specifying additional placement options, including elevation information and an abort signal.
89
107
  * @returns A promise
90
108
  * which resolves when the operation is completed successfully - i.e. the user places an observer and/or target(s),
91
109
  * leaving the analysis in a valid state. Otherwise, the promise is rejected.
@@ -94,7 +112,11 @@ export default abstract class LineOfSightLayerView extends LayerView {
94
112
  * const abortController = new AbortController();
95
113
  *
96
114
  * try {
97
- * await layerView.place({ signal: abortController.signal });
115
+ * await layerView.place({
116
+ * signal: abortController.signal,
117
+ * // optional elevation info
118
+ * elevationInfo: { mode: "relative-to-ground", offset: 1.5 },
119
+ * });
98
120
  * } catch (error) {
99
121
  * if (error.name === "AbortError") {
100
122
  * console.log("Placement operation was cancelled.");
@@ -10,6 +10,7 @@ import type { LayerViewHighlightOptions } from "./types.js";
10
10
  * Represents the view of a [SketchLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SketchLayer/) in a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
11
11
  *
12
12
  * @since 5.2
13
+ * @beta
13
14
  * @see [SketchLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SketchLayer/)
14
15
  */
15
16
  export default abstract class SketchLayerView extends LayerView {
@@ -15,7 +15,7 @@ export interface ViewshedLayerViewProperties extends LayerViewProperties, Partia
15
15
  *
16
16
  * It allows to create new viewsheds interactively using the [place()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ViewshedLayerView/#place) method,
17
17
  * or to make existing viewsheds selectable and editable by enabling the [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ViewshedLayerView/#interactive) property.
18
- * To select a viewshed, hover and click on any of its manipulators.
18
+ * To select a viewshed, hover and click on its observer.
19
19
  *
20
20
  * The view for the layer can be retrieved using [SceneView.whenLayerView()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#whenLayerView).
21
21
  *
@@ -28,6 +28,16 @@ export interface ViewshedLayerViewProperties extends LayerViewProperties, Partia
28
28
  * const layerView = await view.whenLayerView(viewshedLayer);
29
29
  * ```
30
30
  *
31
+ * > [!WARNING]
32
+ * >
33
+ * > **Things to consider:**
34
+ * > * Snapping, tooltips, display units, and input units used during interactive placement and editing are inherited from
35
+ * [ViewOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/).
36
+ * > * Snapping is enabled by default. This can be temporarily disabled by holding the `CTRL` key.
37
+ * > * Layer types currently supported for snapping are: [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/), [GraphicsLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GraphicsLayer/) (except Mesh geometries),
38
+ * > [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/), [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/), [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
39
+ * > [3D Object SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/), and [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/BuildingSceneLayer/).
40
+ *
31
41
  * @since 4.31
32
42
  * @see [ViewshedLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ViewshedLayer/)
33
43
  * @see [Viewshed](https://developers.arcgis.com/javascript/latest/references/core/analysis/Viewshed/)
@@ -39,8 +49,10 @@ export interface ViewshedLayerViewProperties extends LayerViewProperties, Partia
39
49
  export default abstract class ViewshedLayerView extends LayerView {
40
50
  /**
41
51
  * Enables interactivity for the [layer](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ViewshedLayerView/#layer). When set to `true` and the layer's
42
- * [ViewshedLayer.source](https://developers.arcgis.com/javascript/latest/references/core/layers/ViewshedLayer/#source) includes any
43
- * valid [ViewshedAnalysis.viewsheds](https://developers.arcgis.com/javascript/latest/references/core/analysis/ViewshedAnalysis/#viewsheds), they become selectable and editable.
52
+ * [ViewshedLayer.source](https://developers.arcgis.com/javascript/latest/references/core/layers/ViewshedLayer/#source) includes any valid [viewsheds](https://developers.arcgis.com/javascript/latest/references/core/analysis/Viewshed/),
53
+ * they become selectable and editable.
54
+ *
55
+ * Viewsheds can be removed with the `Delete` key.
44
56
  *
45
57
  * @default false
46
58
  */
@@ -55,19 +67,23 @@ export default abstract class ViewshedLayerView extends LayerView {
55
67
  */
56
68
  accessor selectedViewshed: Viewshed | null | undefined;
57
69
  /**
58
- * Starts the interactive creation of new viewsheds and adds them to the layer
59
- * [ViewshedLayer.source](https://developers.arcgis.com/javascript/latest/references/core/layers/ViewshedLayer/#source).
70
+ * Starts the interactive creation of new viewsheds and adds them to the
71
+ * [ViewshedLayer.source](https://developers.arcgis.com/javascript/latest/references/core/layers/ViewshedLayer/#source) of the associated [layer](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ViewshedLayerView/#layer).
60
72
  *
61
- * The first click in the scene places the observer point and the second sets the viewshed's orientation.
73
+ * The first click in the scene places the observer point and the second sets the viewshed's orientation and distance.
62
74
  *
63
75
  * The creation process will finish when the user double-clicks the mouse or presses the escape key.
64
76
  * To stop the creation programmatically, pass an abort signal as an argument when calling the method.
65
77
  *
66
78
  * This method is similar to the [place()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ViewshedLayerView/#place) method, but it allows to create multiple viewsheds in a row.
67
79
  *
80
+ * By default, the observer is created at absolute height.
81
+ * Optionally, by specifying the options of the method,
82
+ * you can change the [elevation info](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/ElevationInfo/).
83
+ *
68
84
  * Calling this method sets [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ViewshedLayerView/#interactive) to `true`.
69
85
  *
70
- * @param options - Additional placement options, including elevation information and an abort signal.
86
+ * @param options - An object specifying additional placement options, including elevation information and an abort signal.
71
87
  * @returns A promise which resolves when creation is completed successfully or rejected if it is
72
88
  * canceled.
73
89
  * @example
@@ -86,17 +102,21 @@ export default abstract class ViewshedLayerView extends LayerView {
86
102
  */
87
103
  createViewsheds(options?: ViewshedPlacementOptions | null | undefined): Promise<void>;
88
104
  /**
89
- * Starts the interactive placement of a single viewshed, adding it to the [layer](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ViewshedLayerView/#layer)'s
90
- * [ViewshedLayer.source](https://developers.arcgis.com/javascript/latest/references/core/layers/ViewshedLayer/#source).
105
+ * Starts the interactive placement of a single viewshed, adding it to the
106
+ * [ViewshedLayer.source](https://developers.arcgis.com/javascript/latest/references/core/layers/ViewshedLayer/#source) of the associated [layer](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ViewshedLayerView/#layer).
91
107
  *
92
- * The first click in the scene places the observer point and the second sets the viewshed's orientation.
108
+ * The first click in the scene places the observer point and the second sets the viewshed's orientation and distance.
93
109
  *
94
110
  * The placement operation will finish when the user presses the escape key.
95
111
  * To stop the placing programmatically, pass an abort signal as an argument when calling the method.
96
112
  *
113
+ * By default, the observer is created at absolute height.
114
+ * Optionally, by specifying the options of the method,
115
+ * you can change the [elevation info](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/ElevationInfo/).
116
+ *
97
117
  * Calling this method sets [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ViewshedLayerView/#interactive) to `true`.
98
118
  *
99
- * @param options - Additional placement options, including elevation information and an abort signal.
119
+ * @param options - An object specifying additional placement options, including elevation information and an abort signal.
100
120
  * @returns A promise which
101
121
  * resolves when the operation is completed successfully or rejected if it is canceled.
102
122
  * @since 4.33
@@ -104,7 +124,11 @@ export default abstract class ViewshedLayerView extends LayerView {
104
124
  * const abortController = new AbortController();
105
125
  *
106
126
  * try {
107
- * await viewshedLayerView.place({ signal: abortController.signal });
127
+ * await layerView.place({
128
+ * signal: abortController.signal,
129
+ * // optional elevation info
130
+ * elevationInfo: { mode: "relative-to-ground", offset: 1.5 },
131
+ * });
108
132
  * } catch (error) {
109
133
  * if (error.name === "AbortError") {
110
134
  * console.log("Placement operation was cancelled.");
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{numbersEquals as e}from"../../core/arrayUtils.js";import has from"../../core/has.js";import{webglValidateShadersEnabled as t,webglDebugEnabled as n}from"./checkWebGLError.js";import{ResourceType as r}from"./enums.js";import{transpileShader as i}from"./ShaderTranspiler.js";const a=!!has(`esri-tests-disable-gpu-memory-measurements`);class o{constructor(e,n,o,c,l=new Map,u=[]){this._context=e,this._compiled=!1,this._linesOfCode=0,this._nameToUniformLocation=new Map,this._nameToUniform1=new Map,this._nameToUniform1v=new Map,this._nameToUniform2=new Map,this._nameToUniform3=new Map,this._nameToUniform4=new Map,this._nameToUniformMatrix3=new Map,this._nameToUniformMatrix4=new Map,e||console.error(`RenderingContext isn't initialized!`),n.length===0&&console.error(`Shaders source should not be empty!`),n=i(n,35633),o=i(o,35632),this._vShader=s(this._context,35633,n),this._fShader=s(this._context,35632,o),d.enabled&&(this._linesOfCode=n.match(/\n/g).length+o.match(/\n/g).length+2,e.instanceCounter.increment(r.LinesOfCode,this._vShader,this._linesOfCode)),(!this._vShader||!this._fShader)&&console.error(`Error loading shaders!`),e.instanceCounter.increment(r.Shader,this),t()&&(this.vertexShader=n,this.fragmentShader=o),this.usedMemory=a?0:n.length+o.length;let f=this._context.gl,p=f.createProgram();f.attachShader(p,this._vShader),f.attachShader(p,this._fShader),c.forEach((e,t)=>f.bindAttribLocation(p,e,t)),this.hasTransformFeedbackVaryings=!!u?.length,this.hasTransformFeedbackVaryings&&f.transformFeedbackVaryings(p,u,f.SEPARATE_ATTRIBS),f.linkProgram(p),t()&&!f.getProgramParameter(p,f.LINK_STATUS)&&console.error(`Could not link shader
2
+ import{numbersEquals as e}from"../../core/arrayUtils.js";import has from"../../core/has.js";import{webglValidateShadersEnabled as t,webglDebugEnabled as n}from"./checkWebGLError.js";import{ResourceType as r}from"./enums.js";import{transpileShader as i}from"./ShaderTranspiler.js";const a=!!has(`esri-tests-disable-gpu-memory-measurements`);class o{constructor(e,n,o,c,l=new Map,u=[]){this._context=e,this._compiled=!1,this._linesOfCode=0,this._nameToUniformLocation=new Map,this._nameToUniform1=new Map,this._nameToUniform1v=new Map,this._nameToUniform2=new Map,this._nameToUniform3=new Map,this._nameToUniform4=new Map,this._nameToUniformMatrix3=new Map,this._nameToUniformMatrix4=new Map,e||console.error(`RenderingContext isn't initialized!`),n.length===0&&console.error(`Shaders source should not be empty!`),n=i(n,35633),o=i(o,35632),this._vShader=s(this._context,35633,n),this._fShader=s(this._context,35632,o),d.enabled&&(this._linesOfCode=n.match(/\n/g).length+o.match(/\n/g).length+2,e.instanceCounter.increment(r.LinesOfCode,this._vShader,this._linesOfCode)),this._vShader&&this._fShader||console.error(`Error loading shaders!`),e.instanceCounter.increment(r.Shader,this),t()&&(this.vertexShader=n,this.fragmentShader=o),this.usedMemory=a?0:n.length+o.length;let f=this._context.gl,p=f.createProgram();f.attachShader(p,this._vShader),f.attachShader(p,this._fShader),c.forEach((e,t)=>f.bindAttribLocation(p,e,t)),this.hasTransformFeedbackVaryings=!!u?.length,this.hasTransformFeedbackVaryings&&f.transformFeedbackVaryings(p,u,f.SEPARATE_ATTRIBS),f.linkProgram(p),t()&&!f.getProgramParameter(p,f.LINK_STATUS)&&console.error(`Could not link shader
3
3
  validated: ${f.getProgramParameter(p,f.VALIDATE_STATUS)}, gl error ${f.getError()}, vertex: ${f.getShaderParameter(this._vShader,f.COMPILE_STATUS)}, fragment: ${f.getShaderParameter(this._fShader,f.COMPILE_STATUS)}, info log: ${f.getProgramInfoLog(p)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`);for(let[e,t]of l){let n=f.getUniformBlockIndex(p,e);n<4294967295&&f.uniformBlockBinding(p,n,t)}this._glName=p,e.instanceCounter.increment(r.Program,this)}get glName(){return this._glName}get hasGLName(){return this._glName!=null}get compiled(){return this._compiled?!0:!this._context.capabilities.parallelShaderCompile||this.glName==null?(this._compiled=!0,!0):(this._compiled=!!this._context.gl.getProgramParameter(this.glName,37297),this._compiled)}dispose(){let e=this._context.gl,t=this._context.instanceCounter;this._nameToUniformLocation.forEach(e=>e&&t.decrement(r.Uniform,e)),this._nameToUniformLocation.clear(),this._vShader&&(this._linesOfCode>0&&(t.decrement(r.LinesOfCode,this._vShader,this._linesOfCode),this._linesOfCode=0),e.deleteShader(this._vShader),this._vShader=null,t.decrement(r.Shader,this)),this._fShader&&=(e.deleteShader(this._fShader),null),this._glName&&(e.deleteProgram(this._glName),this._glName=null,t.decrement(r.Program,this))}_getUniformLocation(e){let t=this._nameToUniformLocation.get(e);if(t!==void 0)return t;if(this.glName){let t=this._context.gl.getUniformLocation(this.glName,e);return this._nameToUniformLocation.set(e,t),t&&this._context.instanceCounter.increment(r.Uniform,t),t}return null}hasUniform(e){return this._getUniformLocation(e)!=null}setUniform1i(e,t,n){f(n,t);let r=this._nameToUniform1.get(e);(r===void 0||t!==r)&&(this._context.gl.uniform1i(this._getUniformLocation(e),t),this._nameToUniform1.set(e,t))}setUniform1iv(e,t,n){p(n,t),u(this._nameToUniform1v,e,t)&&this._context.gl.uniform1iv(this._getUniformLocation(e),t)}setUniform2iv(e,t,n){p(n,t),u(this._nameToUniform2,e,t)&&this._context.gl.uniform2iv(this._getUniformLocation(e),t)}setUniform3iv(e,t,n){p(n,t),u(this._nameToUniform3,e,t)&&this._context.gl.uniform3iv(this._getUniformLocation(e),t)}setUniform4iv(e,t,n){p(n,t),u(this._nameToUniform4,e,t)&&this._context.gl.uniform4iv(this._getUniformLocation(e),t)}setUniform1f(e,t,n){f(n,t);let r=this._nameToUniform1.get(e);(r===void 0||t!==r)&&(this._context.gl.uniform1f(this._getUniformLocation(e),t),this._nameToUniform1.set(e,t))}setUniform1fv(e,t,n){p(n,t),u(this._nameToUniform1v,e,t)&&this._context.gl.uniform1fv(this._getUniformLocation(e),t)}setUniform2f(e,t,n,r){f(r,t,n);let i=this._nameToUniform2.get(e);i===void 0?(this._context.gl.uniform2f(this._getUniformLocation(e),t,n),this._nameToUniform2.set(e,[t,n])):(t!==i[0]||n!==i[1])&&(this._context.gl.uniform2f(this._getUniformLocation(e),t,n),i[0]=t,i[1]=n)}setUniform2fv(e,t,n){p(n,t),u(this._nameToUniform2,e,t)&&this._context.gl.uniform2fv(this._getUniformLocation(e),t)}setUniform3f(e,t,n,r,i){f(i,t,n,r);let a=this._nameToUniform3.get(e);a===void 0?(this._context.gl.uniform3f(this._getUniformLocation(e),t,n,r),this._nameToUniform3.set(e,[t,n,r])):(t!==a[0]||n!==a[1]||r!==a[2])&&(this._context.gl.uniform3f(this._getUniformLocation(e),t,n,r),a[0]=t,a[1]=n,a[2]=r)}setUniform3fv(e,t,n){p(n,t);let r=this._getUniformLocation(e);r!=null&&u(this._nameToUniform3,e,t)&&this._context.gl.uniform3fv(r,t)}setUniform4f(e,t,n,r,i,a){f(a,t,n,r,i);let o=this._nameToUniform4.get(e);o===void 0?(this._context.gl.uniform4f(this._getUniformLocation(e),t,n,r,i),this._nameToUniform4.set(e,[t,n,r,i])):(o===void 0||t!==o[0]||n!==o[1]||r!==o[2]||i!==o[3])&&(this._context.gl.uniform4f(this._getUniformLocation(e),t,n,r,i),o[0]=t,o[1]=n,o[2]=r,o[3]=i)}setUniform4fv(e,t,n){p(n,t);let r=this._getUniformLocation(e);r!=null&&u(this._nameToUniform4,e,t)&&this._context.gl.uniform4fv(r,t)}setUniformMatrix3fv(e,t,n=!1,r){p(r,t);let i=this._getUniformLocation(e);i!=null&&u(this._nameToUniformMatrix3,e,t)&&this._context.gl.uniformMatrix3fv(i,n,t)}setUniformMatrix4fv(e,t,n=!1,r){p(r,t);let i=this._getUniformLocation(e);if(i!=null){let r=this._nameToUniformMatrix4,a=r.get(e),o=!1;if(!a)r.set(e,Array.from(t)),o=!0;else{let n=t.length;if(a.length!==n)r.set(e,Array.from(t)),o=!0;else for(let e=0;e<n;++e){let r=t[e];if(a[e]!==r){for(a[e]=r;e<n;++e)a[e]=t[e];o=!0;break}}}o&&this._context.gl.uniformMatrix4fv(i,n,t)}}setUniformMatrices4fv(e,t,n=!1,r){p(r,t);let i=this._getUniformLocation(e);i!=null&&u(this._nameToUniformMatrix4,e,t)&&this._context.gl.uniformMatrix4fv(i,n,t)}stop(){}}function s(e,n,r){let i=e.gl,a=i.createShader(n);return i.shaderSource(a,r),i.compileShader(a),t()&&!i.getShaderParameter(a,i.COMPILE_STATUS)&&(console.error(`Compile error in ${n===35633?`vertex`:`fragment`} shader`),console.error(i.getShaderInfoLog(a)),console.error(c(r))),a}function c(e){let t=2;return e.replaceAll(`
4
4
  `,()=>`
5
5
  `+l(t++)+`:`)}function l(e){return e>=1e3?e.toString():(` `+e).slice(-3)}function u(t,n,r){let i=t.get(n);return!e(i,r)&&(t.set(n,Array.from(r)),!0)}const d={enabled:!1},f=n()?(e,...t)=>p(e,t):()=>{},p=n()?(e,t)=>{if(e?.supportsNaN)return;let n=t.length;for(let e=0;e<n;++e){let n=t[e];Number.isNaN(n)&&console.error(`Got ${n} as uniform value from ${Error().stack}`)}}:()=>{};export{o as DisposableProgram,d as test};