@arcgis/core 4.34.0-next.57 → 4.34.0-next.59

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 (462) hide show
  1. package/Basemap.js +1 -1
  2. package/LICENSE.md +19 -0
  3. package/README.md +2 -18
  4. package/applications/KnowledgeStudio/reshape.d.ts +5 -0
  5. package/applications/KnowledgeStudio/reshape.js +5 -0
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/03fe4164abd12abc7921.js +1 -0
  8. package/assets/esri/core/workers/chunks/{893e5eb5c028c4704317.js → 0427f66b56ec6601deb0.js} +1 -1
  9. package/assets/esri/core/workers/chunks/06b65105b15abf4d0fbf.js +1 -0
  10. package/assets/esri/core/workers/chunks/{02902303e5585a16ebea.js → 0b53bc76d38e85902748.js} +1 -1
  11. package/assets/esri/core/workers/chunks/0cb2f7172190babb4139.js +1 -0
  12. package/assets/esri/core/workers/chunks/0e28cb5d8d89ae29cdd0.js +1 -0
  13. package/assets/esri/core/workers/chunks/{1776ef96c9f4636f8838.js → 138c11b5eca621e51396.js} +1 -1
  14. package/assets/esri/core/workers/chunks/14c6461ffd36319e1d74.js +1 -0
  15. package/assets/esri/core/workers/chunks/1612d1c1d78c122dfef6.js +1 -0
  16. package/assets/esri/core/workers/chunks/17abab49db1813d3e192.js +1 -0
  17. package/assets/esri/core/workers/chunks/182383fd00008606bfaa.js +1 -0
  18. package/assets/esri/core/workers/chunks/18f878ec695617650a96.js +1 -0
  19. package/assets/esri/core/workers/chunks/{d578c3880eaf2dd62324.js → 19e5e011f929b6b940fe.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{57c438bb0da6410df525.js → 1bf17c6548ac4cd5a166.js} +1 -1
  21. package/assets/esri/core/workers/chunks/1c61cf137a989bc52bb8.js +1 -0
  22. package/assets/esri/core/workers/chunks/{043bb97e38e3a54aa2ab.js → 1ed7a8f4a0058d3b69ef.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{dd2b5f115d156b5b212e.js → 22ec2b0a853911692dc8.js} +1 -1
  24. package/assets/esri/core/workers/chunks/232c76f122b1f519e099.js +1 -0
  25. package/assets/esri/core/workers/chunks/{827bebb4bcdde23adc91.js → 251b7f2e295ce191eb62.js} +1 -1
  26. package/assets/esri/core/workers/chunks/27334cda1b877abcba1b.js +1 -0
  27. package/assets/esri/core/workers/chunks/{02a31483e09652a1a1a2.js → 2b7f9a57a2cfbc108673.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{9fef330b241f958b55df.js → 2cd27b06226e30aec5da.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{7c86af4f60cea383ed96.js → 39a1f361bb69073af765.js} +1 -1
  30. package/assets/esri/core/workers/chunks/3a7ac10a6614fe5745f7.js +1 -0
  31. package/assets/esri/core/workers/chunks/{70cf81ec5a901782d2db.js → 3e7c9a43e52ed6a1b018.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{8257352421f453a669e9.js → 3f634580055b30dbfc8e.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{0e8d3d38e9b1f6abf6f2.js → 3fd09a7c05583a57a317.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{52917b753c5ceab0c1f7.js → 4050ddb580d364d9e205.js} +7 -7
  35. package/assets/esri/core/workers/chunks/{8c79945909069733558f.js → 4094cebc4b92c52f4e27.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{82de1b50ae286f1e6c44.js → 451761c7bd2da530e1d0.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{cc748d4f4adb9c584aa4.js → 45aeff2f751f124f8e53.js} +1 -1
  38. package/assets/esri/core/workers/chunks/462b30fc40a5f337ba10.js +1 -0
  39. package/assets/esri/core/workers/chunks/{d20af70b23f175fb5442.js → 48b9ba825856a0c843ff.js} +1 -1
  40. package/assets/esri/core/workers/chunks/497214e9e82b936fc94e.js +1 -0
  41. package/assets/esri/core/workers/chunks/4ac127cefa3aa5e93e78.js +1 -0
  42. package/assets/esri/core/workers/chunks/4b1daffa97fd90a554a0.js +1 -0
  43. package/assets/esri/core/workers/chunks/4d7fcec769369c576847.js +1 -0
  44. package/assets/esri/core/workers/chunks/4dee2f05508e90410f13.js +1 -0
  45. package/assets/esri/core/workers/chunks/516864fb68025acc7db6.js +1 -0
  46. package/assets/esri/core/workers/chunks/{d630fc3acd2552c98dc0.js → 547af4ffbeeccba9d187.js} +1 -1
  47. package/assets/esri/core/workers/chunks/54b43876ae6fb078eb38.js +1 -0
  48. package/assets/esri/core/workers/chunks/{cf699b9bb530b87be14c.js → 58422c616a824ab49218.js} +1 -1
  49. package/assets/esri/core/workers/chunks/589a0e244ef5f1b84ab6.js +1 -0
  50. package/assets/esri/core/workers/chunks/5b7e5ec6aea1f7f9b005.js +1 -0
  51. package/assets/esri/core/workers/chunks/{fe55833c80cf59df9c2b.js → 5cb238318a24b70d5ac3.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{2c7e7895c4dda176220e.js → 5d4b24c864ebb68ae61e.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{88a5e7415f8858c454f7.js → 5de7c2a80bd9c81cefe2.js} +1 -1
  54. package/assets/esri/core/workers/chunks/5e1afea05b624b315d9f.js +1 -0
  55. package/assets/esri/core/workers/chunks/5ed7e139c72cd2b3ddba.js +1 -0
  56. package/assets/esri/core/workers/chunks/6531f33d6710960079e9.js +1 -0
  57. package/assets/esri/core/workers/chunks/{a1ff4c252012d5026133.js → 65eb183b5d001dfc42c8.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{f1b6d6ee03635d985c3e.js → 6688efc71d9d8f4d2559.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{d5faf3ddf9a39de826be.js → 672c04d48aa51f16e9b7.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{1cbd59918c60a1a21494.js → 700b5a536f97233bc4af.js} +1 -1
  61. package/assets/esri/core/workers/chunks/7597ef10d1699e7088e5.js +1 -0
  62. package/assets/esri/core/workers/chunks/781e424a383c71ca904d.js +1 -0
  63. package/assets/esri/core/workers/chunks/79933271a76a1756584f.js +1 -0
  64. package/assets/esri/core/workers/chunks/{17e203e4680c07bd02f1.js → 7aa7aff6d42be7c2d1d2.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{c2f184e9f579152aa29a.js → 7b17f52019762aa21af8.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{549e073fe276363a9896.js → 7db105f6b688b6da8106.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{945c5a477940ebd23a4c.js → 7f0c78bcba0aed3c4eff.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{a249e56a0be8cef33ba8.js → 81eb7785d626aa975033.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{3eb792863a789b97ec58.js → 831a69e5a87e92830fbe.js} +1 -1
  70. package/assets/esri/core/workers/chunks/8374d87176486c1fc90e.js +1 -0
  71. package/assets/esri/core/workers/chunks/83dfaa6e3bd58d544f35.js +1 -0
  72. package/assets/esri/core/workers/chunks/{5691d504ffe5592bc40f.js → 897f9775f06ddbf6486f.js} +1 -1
  73. package/assets/esri/core/workers/chunks/8bbae8ac586e5c0819d2.js +1 -0
  74. package/assets/esri/core/workers/chunks/8c0e11f781607239749d.js +1 -0
  75. package/assets/esri/core/workers/chunks/90540fdfb0c5f68aa959.js +1 -0
  76. package/assets/esri/core/workers/chunks/9280edff80fd87860a5e.js +1 -0
  77. package/assets/esri/core/workers/chunks/{9275313e0f1f521b2658.js → 9325000c87295c473291.js} +1 -1
  78. package/assets/esri/core/workers/chunks/94b9948ec628187c19fc.js +1 -0
  79. package/assets/esri/core/workers/chunks/94f1005222bff1870ef1.js +1 -0
  80. package/assets/esri/core/workers/chunks/{aab349d4624b78ef429f.js → 96102a9296afd1bfe1a9.js} +1 -1
  81. package/assets/esri/core/workers/chunks/981275b6f008431c983a.js +1 -0
  82. package/assets/esri/core/workers/chunks/{4d2473e680324dc17cfa.js → 997a2a1a51039ce7e4e3.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{07d5e0633cc2f765037f.js → 9f4e23bae621ff3ecea3.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{4e2b125e6e3945985a54.js → 9f93513037a6e87433c4.js} +1 -1
  85. package/assets/esri/core/workers/chunks/a16b471c3706ee37f9b6.js +1 -0
  86. package/assets/esri/core/workers/chunks/{989251f5e0d6a08b1afa.js → a17ed7ce97e69466d730.js} +1 -1
  87. package/assets/esri/core/workers/chunks/a2150baf0661e2f28011.js +1 -0
  88. package/assets/esri/core/workers/chunks/a244afea77127e54dd3a.js +1 -0
  89. package/assets/esri/core/workers/chunks/{ab3c018c406dcd81ef9e.js → a2f4b6d8da93f106852c.js} +1 -1
  90. package/assets/esri/core/workers/chunks/a532614aa65fb52dee7b.js +1 -0
  91. package/assets/esri/core/workers/chunks/{3b51b61a7b8a1ef87c9b.js → a700f57af6856cb5313c.js} +1 -1
  92. package/assets/esri/core/workers/chunks/{319fe6a02ec630a827ea.js → a7ea2e3895046e566bc6.js} +1 -1
  93. package/assets/esri/core/workers/chunks/abe60d92e0219ee97036.js +1 -0
  94. package/assets/esri/core/workers/chunks/{a7530dcb08b43e37bbb2.js → ae1cb4c65d72217ae4d4.js} +1 -1
  95. package/assets/esri/core/workers/chunks/af5ae7c36e1178077cbc.js +1 -0
  96. package/assets/esri/core/workers/chunks/{7f80bbbd0897082c1af3.js → b29144ee58b43f769d9a.js} +1 -1
  97. package/assets/esri/core/workers/chunks/b30de4936caa654d7817.js +1 -0
  98. package/assets/esri/core/workers/chunks/{4193691ca076948f4f90.js → b53008c1461dd6bacc63.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{1d234c057a6671acc59f.js → b605dfdfed8ff8eda4f3.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{76ff7ccfe583927918f3.js → b68b54be3d67595a9446.js} +18 -18
  101. package/assets/esri/core/workers/chunks/b6c6f82df3b60c2f831f.js +1 -0
  102. package/assets/esri/core/workers/chunks/{7eda1c400658b6a99be8.js → ba0c7339fa19cc7cbde7.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{fae6030a81cb91a91b69.js → bafd9b0f6e817252cb31.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{c80c032c5b7a11db177a.js → bb2ab663e3e5597f2104.js} +1 -1
  105. package/assets/esri/core/workers/chunks/{724de82d101eb59c2834.js → bd451668c4ce9f7d7128.js} +1 -1
  106. package/assets/esri/core/workers/chunks/{91ede8c62a7b1e8b8023.js → be06c8a58c217a17451b.js} +1 -1
  107. package/assets/esri/core/workers/chunks/bf6b76027c60b4ffa507.js +1 -0
  108. package/assets/esri/core/workers/chunks/{08c0c016787caa169492.js → c24214666d10cb648428.js} +1 -1
  109. package/assets/esri/core/workers/chunks/c34a164a8ece4cb33e81.js +1 -0
  110. package/assets/esri/core/workers/chunks/{a3a23a56df4e5ee86bb2.js → c5fe356fc5b8b7be0d31.js} +1 -1
  111. package/assets/esri/core/workers/chunks/c696615cae5daefa2d98.js +1 -0
  112. package/assets/esri/core/workers/chunks/{e982cf44906eb26164f2.js → c75b0243e5bb84738419.js} +1 -1
  113. package/assets/esri/core/workers/chunks/{64fab4e1e28c06c83403.js → c779c8b98e07fa881c1d.js} +1 -1
  114. package/assets/esri/core/workers/chunks/{4a0257c449f31bdadf26.js → cef9ff811221a7c3812c.js} +1 -1
  115. package/assets/esri/core/workers/chunks/{b1982490762972ae023d.js → d0296368ae143de4d5ce.js} +1 -1
  116. package/assets/esri/core/workers/chunks/{3d5954478864a975e65e.js → d07d3b0e06f12aee4a8b.js} +1 -1
  117. package/assets/esri/core/workers/chunks/{e1472dbf0795d737d6f8.js → d2371f5034b2a32e2523.js} +1 -1
  118. package/assets/esri/core/workers/chunks/{2f65081bfedeab44d6cb.js → d35cadfb78ac9803069b.js} +1 -1
  119. package/assets/esri/core/workers/chunks/{80a69897fa3ce1eaa6e7.js → d707538b150d79050336.js} +1 -1
  120. package/assets/esri/core/workers/chunks/d7ce68667bb355ef8e5d.js +1 -0
  121. package/assets/esri/core/workers/chunks/d823277612f971a9c2f0.js +1 -0
  122. package/assets/esri/core/workers/chunks/d83bdc13c3cad3eee7be.js +1 -0
  123. package/assets/esri/core/workers/chunks/d91b80aa4f847c2e2a33.js +1 -0
  124. package/assets/esri/core/workers/chunks/{a96ac5c68d84122e7751.js → db7678104b18534482e3.js} +1 -1
  125. package/assets/esri/core/workers/chunks/dbcef57073075e9cfdfe.js +1 -0
  126. package/assets/esri/core/workers/chunks/{c4ceb267d4004d8da8cc.js → e0bbfbe1ed39c82f1bd4.js} +1 -1
  127. package/assets/esri/core/workers/chunks/e36d538915261ee0373f.js +1 -0
  128. package/assets/esri/core/workers/chunks/e58c5c8639aa837c84d1.js +1 -0
  129. package/assets/esri/core/workers/chunks/{a24762e976c1459b12de.js → e689a4849f5af3f2f641.js} +1 -1
  130. package/assets/esri/core/workers/chunks/e97250ae8da4bd0d6bc9.js +1 -0
  131. package/assets/esri/core/workers/chunks/{ef85cd0e82d59db8a26f.js → eacc7fccdc3fb670ac8f.js} +2 -2
  132. package/assets/esri/core/workers/chunks/{0df1f56df6d47dfbb6ea.js → eada3483116a5ea8baed.js} +1 -1
  133. package/assets/esri/core/workers/chunks/ed8863c3d334f438b625.js +1 -0
  134. package/assets/esri/core/workers/chunks/{47682247910271077333.js → ee78a38a0cacb19b2fd4.js} +1 -1
  135. package/assets/esri/core/workers/chunks/{f4061587ff5789fa4e1f.js → f594df2f5ce6ca41a254.js} +1 -1
  136. package/assets/esri/core/workers/chunks/{d7b3e81cc313fd0a33b0.js → f5c821ca2911a5103c9a.js} +1 -1
  137. package/assets/esri/core/workers/chunks/f636ca5c811c3a2a962f.js +1 -0
  138. package/assets/esri/core/workers/chunks/{a3ee76b7e46d3fba7cf7.js → f6d91256c4e5f8a0d5c0.js} +1 -1
  139. package/assets/esri/core/workers/chunks/f711aeba1a2c184ddb43.js +1 -0
  140. package/assets/esri/core/workers/chunks/f718f630a8b81496c646.js +1 -0
  141. package/assets/esri/core/workers/chunks/{cac060a187f3a27a19ba.js → fa0f94318173db2034de.js} +1 -1
  142. package/assets/esri/core/workers/chunks/fdae43a97537093e4b97.js +1 -0
  143. package/assets/esri/core/workers/chunks/{b6a201e86f9caef45ff0.js → ff2614d96ca5228e9685.js} +1 -1
  144. package/assets/esri/themes/base/widgets/_Editor.scss +5 -3
  145. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +6 -0
  146. package/assets/esri/themes/dark/main.css +1 -1
  147. package/assets/esri/themes/light/main.css +1 -1
  148. package/assets/esri/themes/light/view.css +1 -1
  149. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar.json +1 -1
  150. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_en.json +1 -1
  151. package/chunks/BloomComposition.glsl.js +36 -18
  152. package/chunks/ColorMaterial.glsl.js +1 -1
  153. package/chunks/ComponentShader.glsl.js +3 -3
  154. package/chunks/CompositeGeographicTransformation.js +1 -1
  155. package/chunks/CutFillDepth.glsl.js +15 -0
  156. package/chunks/CutFillReduction.glsl.js +12 -0
  157. package/chunks/CutFillTargetDepth.glsl.js +6 -0
  158. package/chunks/DefaultMaterial.glsl.js +2 -2
  159. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
  160. package/chunks/GeographicTransformation.js +1 -1
  161. package/chunks/HUDMaterial.glsl.js +4 -4
  162. package/chunks/ImageMaterial.glsl.js +2 -2
  163. package/chunks/MultiPathImpl.js +1 -1
  164. package/chunks/NativeLine.glsl.js +1 -1
  165. package/chunks/OperatorGeodesicBuffer.js +1 -1
  166. package/chunks/OperatorGeodeticArea.js +1 -1
  167. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  168. package/chunks/OperatorGeodeticLength.js +1 -1
  169. package/chunks/OperatorProximityGeodesic.js +1 -1
  170. package/chunks/OperatorShapePreservingLength.js +1 -1
  171. package/chunks/OperatorShapePreservingProject.js +1 -1
  172. package/chunks/Path.glsl.js +7 -7
  173. package/chunks/Pattern.glsl.js +1 -1
  174. package/chunks/Point2D.js +1 -1
  175. package/chunks/ProjectionTransformation.js +1 -1
  176. package/chunks/RealisticTree.glsl.js +2 -2
  177. package/chunks/RibbonLine.glsl.js +2 -2
  178. package/chunks/ShadedColorMaterial.glsl.js +1 -1
  179. package/chunks/SimpleAtmosphere.glsl.js +1 -1
  180. package/chunks/SpatialReference.js +1 -1
  181. package/chunks/Terrain.glsl.js +4 -4
  182. package/chunks/UnitFactory.js +1 -1
  183. package/chunks/WaterSurface.glsl.js +3 -3
  184. package/chunks/offsetOperator.js +1 -1
  185. package/chunks/sphere.js +1 -1
  186. package/chunks/vec42.js +1 -1
  187. package/config.js +1 -1
  188. package/copyright.txt +2 -20
  189. package/core/Clonable.js +1 -1
  190. package/core/accessorSupport/layerContainerType.js +1 -1
  191. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  192. package/core/libs/gl-matrix-2/math/vec4.js +1 -1
  193. package/core/quantityFormatUtils.js +1 -1
  194. package/core/unitFormatUtils.js +1 -1
  195. package/editing/geometry/coordUtils.js +5 -0
  196. package/editing/geometry/lineUtils.js +5 -0
  197. package/editing/sharedTemplates/executor/builders/equallySpaced.js +1 -1
  198. package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
  199. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  200. package/editing/sharedTemplates/executor/builders/support/offsetUtils.js +1 -1
  201. package/editing/sharedTemplates/executor/builders/support/shapeUtils.js +1 -1
  202. package/effects/FocusArea.js +1 -1
  203. package/geometry/coordinateFormatter.js +1 -1
  204. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  205. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  206. package/geometry/operators/gx/operatorOffset.js +1 -1
  207. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  208. package/geometry/operators/offsetOperator.js +1 -1
  209. package/geometry/operators/support/apiConverter.js +1 -1
  210. package/geometry/operators/support/initNoPeFactory.js +1 -1
  211. package/geometry/operators/support/jsonConverter.js +1 -1
  212. package/geometry/support/sphere.js +1 -1
  213. package/graphic/KnowledgeGraphGraphicOrigin.js +1 -1
  214. package/graphic/LinkChartGraphicOrigin.js +5 -0
  215. package/graphic/isLinkChartGraphicOrigin.js +5 -0
  216. package/interfaces.d.ts +131 -12
  217. package/kernel.js +1 -1
  218. package/layers/FeatureLayer.js +1 -1
  219. package/layers/GroundLayer.js +1 -1
  220. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  221. package/layers/IntegratedMeshLayer.js +1 -1
  222. package/layers/ParquetLayer.js +1 -1
  223. package/layers/PointCloudLayer.js +1 -1
  224. package/layers/SceneLayer.js +1 -1
  225. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  226. package/layers/catalog/catalogUtils.js +1 -1
  227. package/layers/graphics/hydratedFeatures.js +1 -1
  228. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  229. package/layers/knowledgeGraph/nodeMovementUtils.js +5 -0
  230. package/layers/mixins/ImageryTileMixin.js +1 -1
  231. package/layers/mixins/operationalLayers.js +1 -1
  232. package/layers/support/RasterStorageInfo.js +1 -1
  233. package/layers/support/SceneFilter.js +1 -1
  234. package/layers/support/Sublayer.js +1 -1
  235. package/layers/support/layersCreator.js +1 -1
  236. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  237. package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
  238. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  239. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  240. package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
  241. package/package.json +2 -2
  242. package/portal/schemas/definitions.js +1 -1
  243. package/renderers/support/RasterSymbolizer.js +1 -1
  244. package/support/basemapUtils.js +1 -1
  245. package/support/revision.js +1 -1
  246. package/views/2d/engine/Stage.js +1 -1
  247. package/views/2d/engine/webgl/Profiler.js +1 -1
  248. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  249. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  250. package/views/3d/camera/constraintUtils/distance.js +1 -1
  251. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  252. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  253. package/views/3d/layers/CSVLayerView3D.js +1 -1
  254. package/views/3d/layers/FeatureLayerView3D.js +1 -1
  255. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  256. package/views/3d/layers/GeoJSONLayerView3D.js +1 -1
  257. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  258. package/views/3d/layers/GraphicsView3D.js +1 -1
  259. package/views/3d/layers/I3SMeshView3D.js +1 -1
  260. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  261. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  262. package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
  263. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  264. package/views/3d/layers/RouteLayerView3D.js +1 -1
  265. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  266. package/views/3d/layers/SceneLayerView3D.js +1 -1
  267. package/views/3d/layers/StreamLayerView3D.js +1 -1
  268. package/views/3d/layers/WFSLayerView3D.js +1 -1
  269. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  270. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  271. package/views/3d/layers/graphics/ElevationContext.js +1 -1
  272. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  273. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  274. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  275. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  276. package/views/3d/layers/graphics/Labeler.js +1 -1
  277. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  278. package/views/3d/layers/graphics/StreamController.js +1 -1
  279. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  280. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  281. package/views/3d/layers/graphics/pointUtils.js +1 -1
  282. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  283. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  284. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  285. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  286. package/views/3d/layers/support/FlowTileTree3DDebugger.js +1 -1
  287. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  288. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  289. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  290. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  291. package/views/3d/state/utils/navigationUtils.js +1 -1
  292. package/views/3d/support/CombinedElevationProvider.js +1 -1
  293. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  294. package/views/3d/terrain/OverlayManager.js +1 -1
  295. package/views/3d/terrain/OverlayRenderTargets.js +1 -1
  296. package/views/3d/terrain/OverlayRenderer.js +1 -1
  297. package/views/3d/terrain/SphericalPatch.js +1 -1
  298. package/views/3d/terrain/TerrainRenderer.js +1 -1
  299. package/views/3d/terrain/TerrainSurface.js +1 -1
  300. package/views/3d/terrain/Tile.js +1 -1
  301. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  302. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  303. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +2 -2
  304. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  305. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  306. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  307. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  308. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutputConfiguration.js +1 -1
  309. package/views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js +1 -1
  310. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +4 -4
  311. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +2 -0
  312. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
  313. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js +1 -1
  314. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +2 -4
  315. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
  316. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  317. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  318. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
  319. package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechniqueConfiguration.js +5 -0
  320. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  321. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  322. package/views/3d/webgl-engine/effects/geometry/ObjectAndLayerIDRenderNode.js +1 -1
  323. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  324. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  325. package/views/3d/webgl-engine/lib/CutFillDepth.js +5 -0
  326. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  327. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  328. package/views/3d/webgl-engine/lib/Material.js +1 -1
  329. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  330. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  331. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  332. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  333. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  334. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  335. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  336. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  337. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  338. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  339. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  340. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  341. package/views/3d/webgl-engine/lib/octreeUtils.js +1 -1
  342. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  343. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  344. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  345. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  346. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  347. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  348. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  349. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  350. package/views/3d/webgl-engine/shaders/CutFillDepth.glsl.js +5 -0
  351. package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +5 -0
  352. package/views/3d/webgl-engine/shaders/CutFillReduction.glsl.js +5 -0
  353. package/views/3d/webgl-engine/shaders/CutFillReductionTechnique.js +5 -0
  354. package/views/3d/webgl-engine/shaders/CutFillTargetDepth.glsl.js +5 -0
  355. package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +5 -0
  356. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  357. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +1 -1
  358. package/views/3d/webgl.js +1 -1
  359. package/views/LinkChartView.js +1 -1
  360. package/views/draw/DrawOperation.js +1 -1
  361. package/views/draw/support/GraphicMover.js +1 -1
  362. package/views/draw/support/HighlightHelper.js +1 -1
  363. package/views/draw/support/Reshape.js +1 -1
  364. package/views/draw/support/drawUtils.js +1 -1
  365. package/views/interactive/Tooltip.js +1 -1
  366. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  367. package/views/interactive/sketch/SketchLabelOptions.js +1 -1
  368. package/views/interactive/sketch/SketchOptions.js +1 -1
  369. package/views/interactive/sketch/SketchTooltipOptions.js +1 -1
  370. package/views/interactive/sketch/SketchTooltipVisibleElements.js +1 -1
  371. package/views/interactive/sketch/SketchValueOptions.js +1 -1
  372. package/views/interactive/sketch/Units.js +1 -1
  373. package/views/interactive/sketch/constraints.js +1 -1
  374. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  375. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  376. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  377. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  378. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  379. package/views/interactive/tooltip/fields/fields.js +1 -1
  380. package/views/interactive/tooltip/fields/parsingAndFormattingUtils.js +1 -1
  381. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  382. package/views/support/angularMeasurementUtils.js +1 -1
  383. package/webdoc/support/writeUtils.js +1 -1
  384. package/webscene/spec-certification/api.js +1 -1
  385. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
  386. package/widgets/Editor/EditorViewModel.js +1 -1
  387. package/widgets/Editor/support/splitFeatureUtils.js +5 -0
  388. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  389. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  390. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  391. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  392. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  393. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  394. package/widgets/OrientedImageryViewer.js +1 -1
  395. package/widgets/Sketch.js +1 -1
  396. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  397. package/widgets/support/SelectionToolbar/VisibleElements.js +1 -1
  398. package/widgets/support/SelectionToolbar.js +1 -1
  399. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  400. package/EULA.pdf +0 -0
  401. package/assets/esri/core/workers/chunks/0390f3aa624e3f380ce2.js +0 -1
  402. package/assets/esri/core/workers/chunks/0569698a3e4eaf2bac8e.js +0 -1
  403. package/assets/esri/core/workers/chunks/06d2251d6f6b3e44800a.js +0 -1
  404. package/assets/esri/core/workers/chunks/07eea90733834313e9fa.js +0 -1
  405. package/assets/esri/core/workers/chunks/08393d9cc2ed846dd5b4.js +0 -1
  406. package/assets/esri/core/workers/chunks/094c741fa8139c3f40cf.js +0 -1
  407. package/assets/esri/core/workers/chunks/0f51e51db83f303ce5a6.js +0 -1
  408. package/assets/esri/core/workers/chunks/171ce8c64f322cd5d6d1.js +0 -1
  409. package/assets/esri/core/workers/chunks/184d3c88ac2fc1d7e2c3.js +0 -1
  410. package/assets/esri/core/workers/chunks/1ae15163af8875148fb8.js +0 -1
  411. package/assets/esri/core/workers/chunks/1eee7cf11df01a52c1bf.js +0 -1
  412. package/assets/esri/core/workers/chunks/27197b0a2ffb2b6104ea.js +0 -1
  413. package/assets/esri/core/workers/chunks/2c0241a5958aef9cda61.js +0 -1
  414. package/assets/esri/core/workers/chunks/2ded2446700f89155ccd.js +0 -1
  415. package/assets/esri/core/workers/chunks/3264d58aeef8cf074b86.js +0 -1
  416. package/assets/esri/core/workers/chunks/3445ffd752262673fb13.js +0 -1
  417. package/assets/esri/core/workers/chunks/38f09e36e174792646bd.js +0 -1
  418. package/assets/esri/core/workers/chunks/3c57b2e13628b5c1f6de.js +0 -1
  419. package/assets/esri/core/workers/chunks/4162c633efefc63c5506.js +0 -1
  420. package/assets/esri/core/workers/chunks/435169b455fd2846799b.js +0 -1
  421. package/assets/esri/core/workers/chunks/44dc7ec52c4abb700783.js +0 -1
  422. package/assets/esri/core/workers/chunks/4558f2e3e77831758fdc.js +0 -1
  423. package/assets/esri/core/workers/chunks/4fc267552939583a81a0.js +0 -1
  424. package/assets/esri/core/workers/chunks/527557b603400189d49a.js +0 -1
  425. package/assets/esri/core/workers/chunks/53873f26a2c24cd75e4a.js +0 -1
  426. package/assets/esri/core/workers/chunks/554c789f4e875d7e6fd5.js +0 -1
  427. package/assets/esri/core/workers/chunks/561a2078458bc0339f83.js +0 -1
  428. package/assets/esri/core/workers/chunks/5f28470304b57e24d94c.js +0 -1
  429. package/assets/esri/core/workers/chunks/61a294f9411bf884f2ab.js +0 -1
  430. package/assets/esri/core/workers/chunks/6acffacbb4a03af52e3b.js +0 -1
  431. package/assets/esri/core/workers/chunks/719450ccd455f503d81a.js +0 -1
  432. package/assets/esri/core/workers/chunks/71cac356874b36f9a383.js +0 -1
  433. package/assets/esri/core/workers/chunks/7388e8c905d93dea1c05.js +0 -1
  434. package/assets/esri/core/workers/chunks/749c7159e0902388e828.js +0 -1
  435. package/assets/esri/core/workers/chunks/7714228825fb44d506df.js +0 -1
  436. package/assets/esri/core/workers/chunks/77ee4afaa4a1c7047940.js +0 -1
  437. package/assets/esri/core/workers/chunks/790e97ddbe318bc75415.js +0 -1
  438. package/assets/esri/core/workers/chunks/8762928d10c3821738ad.js +0 -1
  439. package/assets/esri/core/workers/chunks/8ead467a5af0d9bba804.js +0 -1
  440. package/assets/esri/core/workers/chunks/91e04d03b0013bcaad82.js +0 -1
  441. package/assets/esri/core/workers/chunks/92b60d4fb09711919601.js +0 -1
  442. package/assets/esri/core/workers/chunks/9940e59033a8a1eff2a9.js +0 -1
  443. package/assets/esri/core/workers/chunks/998c38974372720b1c52.js +0 -1
  444. package/assets/esri/core/workers/chunks/9b10e70f28873cff44f5.js +0 -1
  445. package/assets/esri/core/workers/chunks/9b5e04d87116ce2b68b2.js +0 -1
  446. package/assets/esri/core/workers/chunks/9d920f3488d59e7f276c.js +0 -1
  447. package/assets/esri/core/workers/chunks/a999f804fc2f00b2e7ae.js +0 -1
  448. package/assets/esri/core/workers/chunks/acf13a64df2991a4cb6b.js +0 -1
  449. package/assets/esri/core/workers/chunks/b457b7dd907f06278bee.js +0 -1
  450. package/assets/esri/core/workers/chunks/b5640f9623a9c9ded92a.js +0 -1
  451. package/assets/esri/core/workers/chunks/b8158c681456d4cf2395.js +0 -1
  452. package/assets/esri/core/workers/chunks/bbdbb618a18542f7a4a2.js +0 -1
  453. package/assets/esri/core/workers/chunks/bead38898c3f4d4d3569.js +0 -1
  454. package/assets/esri/core/workers/chunks/c51e2a048df152abd901.js +0 -1
  455. package/assets/esri/core/workers/chunks/c86e339e45900c54c9f5.js +0 -1
  456. package/assets/esri/core/workers/chunks/ca7c9756802214e41c56.js +0 -1
  457. package/assets/esri/core/workers/chunks/cb8f2ce22274990b359c.js +0 -1
  458. package/assets/esri/core/workers/chunks/d6ab4d55f1023ee6ec6a.js +0 -1
  459. package/assets/esri/core/workers/chunks/db2b8d8cf7131554cf7e.js +0 -1
  460. package/assets/esri/core/workers/chunks/e7ccf067bea8f4766424.js +0 -1
  461. package/assets/esri/core/workers/chunks/f1c50f37a81c672263a1.js +0 -1
  462. package/assets/esri/core/workers/chunks/ff323db554c9e09749e8.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{k as n,a as t}from"../../../../chunks/sphere.js";import{Octree as r}from"./Octree.js";function s(e){const n={numNodes:0,numObjects:0,numTerminals:0,numResidents:0,numOutsiders:0,numInnerNodes:0,numTerminalNodes:0,maximumDepth:0,maxNumTerminals:0,maxNumResidents:0,maxNumObjects:0};return e.forEachNode((t,r,s)=>{null===t.residents?n.numInnerNodes++:n.numTerminalNodes++,n.numTerminals+=t.terminals.length,n.maxNumTerminals=Math.max(t.terminals.length,n.maxNumTerminals);let i=t.terminals.length;null!==t.residents&&(n.numResidents+=t.residents.length,n.maxNumResidents=Math.max(t.residents.length,n.maxNumResidents),i+=t.residents.length),n.maxNumObjects=Math.max(i,n.maxNumObjects);const m=Math.round(Math.log(2*e.halfSize/s)*Math.LOG2E);return n.maximumDepth=Math.max(n.maximumDepth,m),!0}),n.numObjects=n.numOutsiders+n.numTerminals+n.numResidents,n.numNodes=n.numInnerNodes+n.numTerminalNodes,n}function i(t,s=!1){const m=t instanceof r?t.root:t,a={};return t instanceof r&&s&&(a.center=n(t.bounds,e()),a.size=2*t.halfSize),m.terminals.length>0&&(a.terminals=m.terminals.map(e=>e.id)),null!==m.residents&&m.residents.length>0&&(a.residents=m.residents.map(e=>e.id)),null===m.residents&&m.children.forEach((e,n)=>{e&&(a["child"+n]=i(e))}),a}function m(n,r){return n.forEachNode((s,i,m)=>{const l=o(t(i),-m,e()),d=o(t(i),m,e());if(s.terminals.forAll(e=>a(r(e),l,d,!0)),null!==s.residents){if(s.residents.length>n.maximumObjectsPerNode)throw new Error("[Octree Validation] Number of objects "+s.residents.length+" exceeds maximum allowed ("+n.maximumObjectsPerNode+")");s.residents.forAll(e=>a(r(e),l,d,!1))}let u=!1;if(s.children.forEach(e=>{if(e&&(u=!0,null!==s.residents))throw new Error("[Octree Validation] Node has residents and children")}),!u&&(null===s.residents||0===s.residents.length)&&0===s.terminals.length)throw new Error("[Octree Validation] dangling empty node");return!0}),!0}function a(e,n,t,r){for(let i=0;i<3;i++)if(e[i]<n[i]||e[i]>t[i])throw new Error("[Octree Validation] Object is not within node bounds");const s=.25*(t[0]-n[0]);if(r&&e[3]<s)throw new Error("[Octree Validation] Object is too small to be a terminal");if(!r&&e[3]>s)throw new Error("[Octree Validation] Object is too large to be a resident")}function o(e,n,t){return t[0]=e[0]+n,t[1]=e[1]+n,t[2]=e[2]+n,t}export{m as assert,i as debugDump,s as stats};
5
+ import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{n,a as t}from"../../../../chunks/sphere.js";import{Octree as r}from"./Octree.js";function s(e){const n={numNodes:0,numObjects:0,numTerminals:0,numResidents:0,numOutsiders:0,numInnerNodes:0,numTerminalNodes:0,maximumDepth:0,maxNumTerminals:0,maxNumResidents:0,maxNumObjects:0};return e.forEachNode((t,r,s)=>{null===t.residents?n.numInnerNodes++:n.numTerminalNodes++,n.numTerminals+=t.terminals.length,n.maxNumTerminals=Math.max(t.terminals.length,n.maxNumTerminals);let i=t.terminals.length;null!==t.residents&&(n.numResidents+=t.residents.length,n.maxNumResidents=Math.max(t.residents.length,n.maxNumResidents),i+=t.residents.length),n.maxNumObjects=Math.max(i,n.maxNumObjects);const m=Math.round(Math.log(2*e.halfSize/s)*Math.LOG2E);return n.maximumDepth=Math.max(n.maximumDepth,m),!0}),n.numObjects=n.numOutsiders+n.numTerminals+n.numResidents,n.numNodes=n.numInnerNodes+n.numTerminalNodes,n}function i(t,s=!1){const m=t instanceof r?t.root:t,a={};return t instanceof r&&s&&(a.center=n(t.bounds,e()),a.size=2*t.halfSize),m.terminals.length>0&&(a.terminals=m.terminals.map(e=>e.id)),null!==m.residents&&m.residents.length>0&&(a.residents=m.residents.map(e=>e.id)),null===m.residents&&m.children.forEach((e,n)=>{e&&(a["child"+n]=i(e))}),a}function m(n,r){return n.forEachNode((s,i,m)=>{const l=o(t(i),-m,e()),d=o(t(i),m,e());if(s.terminals.forAll(e=>a(r(e),l,d,!0)),null!==s.residents){if(s.residents.length>n.maximumObjectsPerNode)throw new Error("[Octree Validation] Number of objects "+s.residents.length+" exceeds maximum allowed ("+n.maximumObjectsPerNode+")");s.residents.forAll(e=>a(r(e),l,d,!1))}let u=!1;if(s.children.forEach(e=>{if(e&&(u=!0,null!==s.residents))throw new Error("[Octree Validation] Node has residents and children")}),!u&&(null===s.residents||0===s.residents.length)&&0===s.terminals.length)throw new Error("[Octree Validation] dangling empty node");return!0}),!0}function a(e,n,t,r){for(let i=0;i<3;i++)if(e[i]<n[i]||e[i]>t[i])throw new Error("[Octree Validation] Object is not within node bounds");const s=.25*(t[0]-n[0]);if(r&&e[3]<s)throw new Error("[Octree Validation] Object is too small to be a terminal");if(!r&&e[3]>s)throw new Error("[Octree Validation] Object is too large to be a resident")}function o(e,n,t){return t[0]=e[0]+n,t[1]=e[1]+n,t[2]=e[2]+n,t}export{m as assert,i as debugDump,s as stats};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColorOrColorEmissionOrOID as r,isDepth as e,is2DGeometryOutput as s,isColorOrColorEmission as i}from"../core/shaderLibrary/ShaderOutput.js";import a from"../lib/GLMaterial.js";import{OITPolygonOffsetLimit as o}from"../lib/OrderIndependentTransparency.js";import{DefaultBufferWriter as n}from"./DefaultBufferWriter.js";import{TriangleMaterial as h}from"./TriangleMaterial.js";import{VisualVariablePassParameters as p}from"./VisualVariablePassParameters.js";import{getLayout as u,ColorMaterialTechnique as c}from"../shaders/ColorMaterialTechnique.js";import{ColorMaterialTechniqueConfiguration as l}from"../shaders/ColorMaterialTechniqueConfiguration.js";import{alphaCutoff as f}from"../../../../webscene/support/AlphaCutoff.js";class m extends h{constructor(t){super(t,_),this._configuration=new l,this.supportsEdges=!0,this.produces=new Map([[2,t=>this._isOpaqueMaterialPass(t)],[3,t=>this._isOpaqueNoSSAODepthPass(t)],[4,t=>r(t)&&this._transparent&&this.parameters.writeDepth],[5,t=>e(t)&&this._transparent&&this.parameters.writeDepth],[8,t=>r(t)&&this._transparent&&!this.parameters.writeDepth],[18,t=>s(t)]])}getConfiguration(t,r){return super.getConfiguration(t,r,this._configuration),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this._transparent,this._configuration.discardInvisibleFragments=this._transparent&&!this._isOpaquePass(t)&&this.parameters.discardInvisibleFragments,this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasOccludees=r.hasOccludees,this._configuration.oitPass=r.oitPass,this._configuration.enableOffset=r.camera.relativeElevation<o,this._configuration.terrainDepthTest=r.terrainDepthTest&&i(t),this._configuration.cullAboveTerrain=r.cullAboveTerrain,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.draped=this.parameters.draped,this._configuration}get visible(){return this.parameters.color[3]>=f}get _transparent(){return this.parameters.color[3]<1||this.parameters.forceTransparentMode}_isOpaquePass(t){return this._isOpaqueMaterialPass(t)||this._isOpaqueNoSSAODepthPass(t)}_isOpaqueMaterialPass(t){return 8===t||r(t)&&!this._transparent}_isOpaqueNoSSAODepthPass(t){return e(t)&&this.parameters.writeDepth&&!this._transparent}createGLMaterial(t){return new g(t)}createBufferWriter(){return new n(u(this.parameters))}}class g extends a{beginSlot(t){return this.getTechnique(c,t)}}class _ extends p{constructor(){super(...arguments),this.color=t,this.forceTransparentMode=!1,this.writeDepth=!0,this.hasVertexColors=!1,this.polygonOffset=!1,this.hasSlicePlane=!1,this.cullFace=0,this.draped=!1,this.discardInvisibleFragments=!1}}export{m as ColorMaterial,_ as Parameters};
5
+ import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColorOrColorEmissionOrOID as r,isDepth as e,is2DGeometryOutput as s,isColorOrColorEmission as i}from"../core/shaderLibrary/ShaderOutput.js";import a from"../lib/GLMaterial.js";import{OITPolygonOffsetLimit as o}from"../lib/OrderIndependentTransparency.js";import{DefaultBufferWriter as n}from"./DefaultBufferWriter.js";import{TriangleMaterial as h}from"./TriangleMaterial.js";import{VisualVariablePassParameters as p}from"./VisualVariablePassParameters.js";import{getLayout as u,ColorMaterialTechnique as c}from"../shaders/ColorMaterialTechnique.js";import{ColorMaterialTechniqueConfiguration as l}from"../shaders/ColorMaterialTechniqueConfiguration.js";import{alphaCutoff as f}from"../../../../webscene/support/AlphaCutoff.js";class m extends h{constructor(t){super(t,_),this._configuration=new l,this.supportsEdges=!0,this.produces=new Map([[2,t=>this._isOpaqueMaterialPass(t)],[3,t=>this._isOpaqueNoSSAODepthPass(t)],[4,t=>r(t)&&this._transparent&&this.parameters.writeDepth],[5,t=>e(t)&&this._transparent&&this.parameters.writeDepth],[8,t=>r(t)&&this._transparent&&!this.parameters.writeDepth],[18,t=>s(t)]])}getConfiguration(t,r){return super.getConfiguration(t,r,this._configuration),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this._transparent,this._configuration.discardInvisibleFragments=this._transparent&&!this._isOpaquePass(t)&&this.parameters.discardInvisibleFragments,this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasOccludees=r.hasOccludees,this._configuration.oitPass=r.oitPass,this._configuration.enableOffset=r.camera.relativeElevation<o,this._configuration.terrainDepthTest=r.terrainDepthTest&&i(t),this._configuration.cullAboveTerrain=r.cullAboveTerrain,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.draped=this.parameters.draped,this._configuration}get visible(){return this.parameters.color[3]>=f}get _transparent(){return this.parameters.color[3]<1||this.parameters.forceTransparentMode}_isOpaquePass(t){return this._isOpaqueMaterialPass(t)||this._isOpaqueNoSSAODepthPass(t)}_isOpaqueMaterialPass(t){return 9===t||r(t)&&!this._transparent}_isOpaqueNoSSAODepthPass(t){return e(t)&&this.parameters.writeDepth&&!this._transparent}createGLMaterial(t){return new g(t)}createBufferWriter(){return new n(u(this.parameters))}}class g extends a{beginSlot(t){return this.getTechnique(c,t)}}class _ extends p{constructor(){super(...arguments),this.color=t,this.forceTransparentMode=!1,this.writeDepth=!0,this.hasVertexColors=!1,this.polygonOffset=!1,this.hasSlicePlane=!1,this.cullFace=0,this.draped=!1,this.discardInvisibleFragments=!1}}export{m as ColorMaterial,_ as Parameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{InstancedDoubleConfiguration as i}from"../core/shaderLibrary/attributes/InstancedDoubleConfiguration.js";import{parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class e extends i{constructor(){super(...arguments),this.output=0,this.oitPass=0,this.hasSlicePlane=!1,this.hasHighlightMixTexture=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0}}t([o({count:10})],e.prototype,"output",void 0),t([o({count:3})],e.prototype,"oitPass",void 0),t([o()],e.prototype,"hasSlicePlane",void 0),t([o()],e.prototype,"hasHighlightMixTexture",void 0);export{e as DefaultTechniqueConfiguration};
5
+ import{__decorate as t}from"tslib";import{InstancedDoubleConfiguration as i}from"../core/shaderLibrary/attributes/InstancedDoubleConfiguration.js";import{parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class e extends i{constructor(){super(...arguments),this.output=0,this.oitPass=0,this.hasSlicePlane=!1,this.hasHighlightMixTexture=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0}}t([o({count:11})],e.prototype,"output",void 0),t([o({count:3})],e.prototype,"oitPass",void 0),t([o()],e.prototype,"hasSlicePlane",void 0),t([o()],e.prototype,"hasHighlightMixTexture",void 0);export{e as DefaultTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{i as e,G as t,t as r}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{makeFloat16Array as s}from"../../../../geometry/support/float16.js";import{isColor as a,isDepth as o,isColorHighlightOrDepth as n,isColorOrColorEmission as h}from"../core/shaderLibrary/ShaderOutput.js";import c from"../lib/GLMaterial.js";import{Material as p}from"../lib/Material.js";import{VisualVariablePassParameters as m}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as l}from"./internal/bufferWriterUtils.js";import{getLayout as u,LineMarkerTechnique as d}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as f}from"../shaders/LineMarkerTechniqueConfiguration.js";import{alphaCutoff as g}from"../../../../webscene/support/AlphaCutoff.js";class _ extends p{constructor(e){super(e,b),this._configuration=new f,this.produces=new Map([[2,e=>8===e||a(e)&&8===this.parameters.renderOccluded],[3,e=>o(e)],[10,e=>n(e)&&8===this.parameters.renderOccluded],[11,e=>n(e)&&8===this.parameters.renderOccluded],[4,e=>a(e)&&this.parameters.writeDepth],[8,e=>a(e)&&!this.parameters.writeDepth],[18,e=>h(e)||8===e]]),this.intersectDraped=void 0}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.space=18===t.slot?0:this.parameters.worldSpace?2:1,this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=0!==this.parameters.cap,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasOccludees=t.hasOccludees,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.occluder=8===this.parameters.renderOccluded,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&h(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=g}intersect(){}createBufferWriter(){return new w(u(this.parameters),this.parameters)}createGLMaterial(e){return new v(e)}}class v extends c{dispose(){super.dispose(),this._markerTextures?.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){const t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this.getTechnique(d,e)}}class b extends m{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive="arrow",this.placement="end",this.cap=0,this.anchor=0,this.hasTip=!1,this.worldSpace=!1,this.hideOnShortSegments=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.markerTexture=null}}class w{constructor(e,t){this.layout=e,this._parameters=t}elementCount(){return"begin-end"===this._parameters.placement?12:6}write(i,a,o,n,h,c){const p=o.get("position").data,m=p.length/3;let u=[1,0,0];const d=o.get("normal");this._parameters.worldSpace&&null!=d&&(u=d.data);let f=1,g=0;this._parameters.vvSize?g=o.get("sizeFeatureAttribute").data[0]:o.has("size")&&(f=o.get("size").data[0]);let _=[1,1,1,1],v=0;this._parameters.vvColor?v=o.get("colorFeatureAttribute").data[0]:o.has("color")&&(_=o.get("color").data);let b=0;this._parameters.vvOpacity&&(b=o.get("opacityFeatureAttribute").data[0]);const w=new Float32Array(h.buffer),P=s(h.buffer),k=new Uint8Array(h.buffer);let O=c*(this.layout.stride/4);const V=w.BYTES_PER_ELEMENT/P.BYTES_PER_ELEMENT,j=4/V,y=(e,t,r,i)=>{w[O++]=e[0],w[O++]=e[1],w[O++]=e[2],l(t,e,P,O*V),O+=j;let s=O*V;if(P[s++]=r[0],P[s++]=r[1],O=Math.ceil(s/V),this._parameters.vvColor)w[O++]=v;else{const e=Math.min(4*i,_.length-4),t=4*O++;k[t]=255*_[e],k[t+1]=255*_[e+1],k[t+2]=255*_[e+2],k[t+3]=255*_[e+3]}this._parameters.vvOpacity&&(w[O++]=b),s=O*V,this._parameters.vvSize?(w[O++]=g,s+=2):P[s++]=f,this._parameters.worldSpace&&(P[s++]=u[0],P[s++]=u[1],P[s++]=u[2]),O=Math.ceil(s/V)},M=(s,a)=>{const o=e(S,p[3*s],p[3*s+1],p[3*s+2]),n=T;let h=s+a;do{e(n,p[3*h],p[3*h+1],p[3*h+2]),h+=a}while(t(o,n)&&h>=0&&h<m);i&&(r(o,o,i),r(n,n,i)),y(o,n,[-1,-1],s),y(o,n,[1,-1],s),y(o,n,[1,1],s),y(o,n,[-1,-1],s),y(o,n,[1,1],s),y(o,n,[-1,1],s)},C=this._parameters.placement;return"begin"!==C&&"begin-end"!==C||M(0,1),"end"!==C&&"begin-end"!==C||M(m-1,-1),null}}const S=i(),T=i();export{_ as LineMarkerMaterial,b as Parameters};
5
+ import{i as e,G as t,t as r}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{makeFloat16Array as s}from"../../../../geometry/support/float16.js";import{isColor as a,isDepth as o,isColorHighlightOrDepth as n,isColorOrColorEmission as h}from"../core/shaderLibrary/ShaderOutput.js";import c from"../lib/GLMaterial.js";import{Material as p}from"../lib/Material.js";import{VisualVariablePassParameters as m}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as l}from"./internal/bufferWriterUtils.js";import{getLayout as u,LineMarkerTechnique as d}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as f}from"../shaders/LineMarkerTechniqueConfiguration.js";import{alphaCutoff as g}from"../../../../webscene/support/AlphaCutoff.js";class _ extends p{constructor(e){super(e,b),this._configuration=new f,this.produces=new Map([[2,e=>9===e||a(e)&&8===this.parameters.renderOccluded],[3,e=>o(e)],[10,e=>n(e)&&8===this.parameters.renderOccluded],[11,e=>n(e)&&8===this.parameters.renderOccluded],[4,e=>a(e)&&this.parameters.writeDepth],[8,e=>a(e)&&!this.parameters.writeDepth],[18,e=>h(e)||9===e]]),this.intersectDraped=void 0}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.space=18===t.slot?0:this.parameters.worldSpace?2:1,this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=0!==this.parameters.cap,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasOccludees=t.hasOccludees,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.occluder=8===this.parameters.renderOccluded,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&h(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=g}intersect(){}createBufferWriter(){return new w(u(this.parameters),this.parameters)}createGLMaterial(e){return new v(e)}}class v extends c{dispose(){super.dispose(),this._markerTextures?.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){const t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this.getTechnique(d,e)}}class b extends m{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive="arrow",this.placement="end",this.cap=0,this.anchor=0,this.hasTip=!1,this.worldSpace=!1,this.hideOnShortSegments=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.markerTexture=null}}class w{constructor(e,t){this.layout=e,this._parameters=t}elementCount(){return"begin-end"===this._parameters.placement?12:6}write(i,a,o,n,h,c){const p=o.get("position").data,m=p.length/3;let u=[1,0,0];const d=o.get("normal");this._parameters.worldSpace&&null!=d&&(u=d.data);let f=1,g=0;this._parameters.vvSize?g=o.get("sizeFeatureAttribute").data[0]:o.has("size")&&(f=o.get("size").data[0]);let _=[1,1,1,1],v=0;this._parameters.vvColor?v=o.get("colorFeatureAttribute").data[0]:o.has("color")&&(_=o.get("color").data);let b=0;this._parameters.vvOpacity&&(b=o.get("opacityFeatureAttribute").data[0]);const w=new Float32Array(h.buffer),P=s(h.buffer),k=new Uint8Array(h.buffer);let O=c*(this.layout.stride/4);const V=w.BYTES_PER_ELEMENT/P.BYTES_PER_ELEMENT,j=4/V,y=(e,t,r,i)=>{w[O++]=e[0],w[O++]=e[1],w[O++]=e[2],l(t,e,P,O*V),O+=j;let s=O*V;if(P[s++]=r[0],P[s++]=r[1],O=Math.ceil(s/V),this._parameters.vvColor)w[O++]=v;else{const e=Math.min(4*i,_.length-4),t=4*O++;k[t]=255*_[e],k[t+1]=255*_[e+1],k[t+2]=255*_[e+2],k[t+3]=255*_[e+3]}this._parameters.vvOpacity&&(w[O++]=b),s=O*V,this._parameters.vvSize?(w[O++]=g,s+=2):P[s++]=f,this._parameters.worldSpace&&(P[s++]=u[0],P[s++]=u[1],P[s++]=u[2]),O=Math.ceil(s/V)},M=(s,a)=>{const o=e(S,p[3*s],p[3*s+1],p[3*s+2]),n=T;let h=s+a;do{e(n,p[3*h],p[3*h+1],p[3*h+2]),h+=a}while(t(o,n)&&h>=0&&h<m);i&&(r(o,o,i),r(n,n,i)),y(o,n,[-1,-1],s),y(o,n,[1,-1],s),y(o,n,[1,1],s),y(o,n,[-1,-1],s),y(o,n,[1,1],s),y(o,n,[-1,1],s)},C=this._parameters.placement;return"begin"!==C&&"begin-end"!==C||M(0,1),"end"!==C&&"begin-end"!==C||M(m-1,-1),null}}const S=i(),T=i();export{_ as LineMarkerMaterial,b as Parameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../../core/Logger.js";import{clamp as e}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as i}from"../../../../core/screenUtils.js";import{secondsFromMilliseconds as r}from"../../../../core/time.js";import{copy as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as a,d as o,e as n,g as l,f as h,c as p,l as m,j as c,t as u}from"../../../../chunks/vec32.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as d}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeFloat16Array as g}from"../../../../geometry/support/float16.js";import{distance2 as b,fromPoints as _,create as S,closestLineSegmentPoint as v}from"../../../../geometry/support/lineSegment.js";import{fromPoints as P,create as y,signedDistance as j,getNormal as E}from"../../../../geometry/support/plane.js";import{isHighlightOrOID as w,isColorOrColorEmission as A,isDepth as T,isColorEmissionHighlightOIDOrDepth as z,is2DGeometryOutput as C}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as L}from"../effects/geometry/olidUtils.js";import M from"../lib/GLMaterial.js";import{Material as O}from"../lib/Material.js";import{isTranslationMatrix as V}from"../lib/Util.js";import{VisualVariablePassParameters as R}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as x}from"./internal/bufferWriterUtils.js";import{r as F}from"../../../../chunks/RibbonLine.glsl.js";import{getLayout as N,RibbonLineTechnique as k}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as U}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as D}from"../../../../webscene/support/AlphaCutoff.js";class B extends O{constructor(t){super(t,J),this._configuration=new U,this.produces=new Map([[2,t=>w(t)||A(t)&&8===this.parameters.renderOccluded],[3,t=>T(t)],[10,t=>z(t)&&8===this.parameters.renderOccluded],[11,t=>z(t)&&8===this.parameters.renderOccluded],[4,t=>A(t)&&this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[8,t=>A(t)&&!this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[18,t=>C(t)]])}getConfiguration(t,e){super.getConfiguration(t,e,this._configuration),this._configuration.oitPass=e.oitPass,this._configuration.draped=18===e.slot;const i=null!=this.parameters.stipplePattern&&8!==t;return this._configuration.stippleEnabled=i,this._configuration.stippleOffColorEnabled=i&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=i&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&G(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=e.hasOccludees,this._configuration.occluder=8===this.parameters.renderOccluded,this._configuration.terrainDepthTest=e.terrainDepthTest&&A(t),this._configuration.cullAboveTerrain=e.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration.animation=this.parameters.animation,this._configuration.emissionSource=this.hasEmissions?1:0,this._configuration}get visible(){return this.parameters.color[3]>=D||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>D}setParameters(t,e){t.animation=this.parameters.animation,super.setParameters(t,e)}intersectDraped({attributes:t,screenToWorldRatio:i},r,s,a,o){if(!r.options.selectionMode)return;const n=t.get("size");let l=this.parameters.width;if(this.parameters.vvSize){const i=t.get("sizeFeatureAttribute").data[0];Number.isNaN(i)?l*=this.parameters.vvSize.fallback[0]:l*=e(this.parameters.vvSize.offset[0]+i*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else n&&(l*=n.data[0]);const h=s[0],p=s[1],m=(l/2+4)*i;let c=Number.MAX_VALUE,u=0;const f=t.get("position").data,d=X(this.parameters,t)?f.length-2:f.length-5;for(let g=0;g<d;g+=3){const t=f[g],i=f[g+1],r=(g+3)%f.length,s=h-t,a=p-i,o=f[r]-t,n=f[r+1]-i,l=e((o*s+n*a)/(o*o+n*n),0,1),m=o*l-s,d=n*l-a,b=m*m+d*d;b<c&&(c=b,u=g/3)}c<m*m&&a(o.distance,o.normal,u)}intersect(i,r,u,f,d,g){const{options:S,camera:y,rayBegin:w,rayEnd:A}=u;if(!S.selectionMode||!i.visible||!y)return;if(!V(r))return void t.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const T=i.attributes,z=T.get("position").data;let C=this.parameters.width;if(this.parameters.vvSize){const t=T.get("sizeFeatureAttribute").data[0];Number.isNaN(t)||(C*=e(this.parameters.vvSize.offset[0]+t*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else T.has("size")&&(C*=T.get("size").data[0]);const L=Z;s(L,u.point);const M=C*y.pixelRatio/2+4*y.pixelRatio;a(ht[0],L[0]-M,L[1]+M,0),a(ht[1],L[0]+M,L[1]+M,0),a(ht[2],L[0]+M,L[1]-M,0),a(ht[3],L[0]-M,L[1]-M,0);for(let t=0;t<4;t++)if(!y.unprojectFromRenderScreen(ht[t],pt[t]))return;P(y.eye,pt[0],pt[1],mt),P(y.eye,pt[1],pt[2],ct),P(y.eye,pt[2],pt[3],ut),P(y.eye,pt[3],pt[0],ft);let O=Number.MAX_VALUE,R=0;const x=X(this.parameters,T)?z.length-2:z.length-5;for(let t=0;t<x;t+=3){H[0]=z[t]+r[12],H[1]=z[t+1]+r[13],H[2]=z[t+2]+r[14];const e=(t+3)%z.length;if(I[0]=z[e]+r[12],I[1]=z[e+1]+r[13],I[2]=z[e+2]+r[14],j(mt,H)<0&&j(mt,I)<0||j(ct,H)<0&&j(ct,I)<0||j(ut,H)<0&&j(ut,I)<0||j(ft,H)<0&&j(ft,I)<0)continue;if(y.projectToRenderScreen(H,$),y.projectToRenderScreen(I,tt),$[2]<0&&tt[2]>0){o(K,H,I);const t=y.frustum,e=-j(t[4],H)/n(K,E(t[4]));l(K,K,e),h(H,H,K),y.projectToRenderScreen(H,$)}else if($[2]>0&&tt[2]<0){o(K,I,H);const t=y.frustum,e=-j(t[4],I)/n(K,E(t[4]));l(K,K,e),h(I,I,K),y.projectToRenderScreen(I,tt)}else if($[2]<0&&tt[2]<0)continue;$[2]=0,tt[2]=0;const i=b(_($,tt,rt),L);i<O&&(O=i,p(et,H),p(it,I),R=t/3)}if(O<M*M){let t=Number.MAX_VALUE;if(v(_(et,it,rt),_(w,A,st),Q)){o(Q,Q,w);const e=m(Q);l(Q,Q,1/e),t=e/c(w,A)}g(t,Q,R)}}get hasEmissions(){return this.parameters.emissiveStrength>0}createBufferWriter(){return new Y(N(this.parameters),this.parameters)}createGLMaterial(t){return new W(t)}validateParameters(t){"miter"!==t.join&&(t.miterLimit=0),null!=t.markerParameters&&(t.markerScale=t.markerParameters.width/t.width)}update(t){const{hasAnimation:e,animationSpeed:i}=this.parameters;return!!e&&(this.setParameters({timeElapsed:r(t.time)*i},!1),0!==t.dt)}}class W extends M{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures?.release(this._stipplePattern),this._stipplePattern=null}beginSlot(t){const e=this._material.parameters.stipplePattern;return this._stipplePattern!==e&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(e,this._stipplePattern)}),this._stipplePattern=e),this.getTechnique(k,t)}}class J extends R{constructor(){super(...arguments),this.width=0,this.color=d,this.join="miter",this.cap=0,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1,this.timeElapsed=0,this.animation=0,this.animationSpeed=1,this.trailLength=1,this.emissiveStrength=0}get transparent(){return this.color[3]<1||this.hasAnimation||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}get hasAnimation(){return 0!==this.animation}}class Y{constructor(t,e){this.layout=t,this._parameters=e;const i=e.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=i;break;case"round":this.numJoinSubdivisions=F+i}}_isClosed(t){return X(this._parameters,t)}allocate(t){return this.layout.createBuffer(t)}elementCount(t){const e=2,i=t.get("position").indices.length/2+1,r=this._isClosed(t);let s=r?2:2*e;return s+=((r?i:i-1)-(r?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(t,e,i,r,s,o){const n=i.get("position"),l=n.indices,h=n.data.length/3,m=i.get("distanceToStart")?.data;l&&l.length!==2*(h-1)&&console.warn("RibbonLineMaterial does not support indices");const f=(this.layout.fields.has("sizeFeatureAttribute")?i.get("sizeFeatureAttribute")?.data[0]:i.get("size")?.data[0])??1;let d=[1,1,1,1],b=0;const _=this.layout.fields.has("colorFeatureAttribute");_?b=i.get("colorFeatureAttribute").data[0]:i.has("color")&&(d=i.get("color").data);const S=i.get("timeStamps")?.data,v=S&&this.layout.fields.has("timeStamps"),P=this.layout.fields.has("opacityFeatureAttribute"),y=P?i.get("opacityFeatureAttribute").data[0]:0,j=new Float32Array(s.buffer),E=g(s.buffer),w=new Uint8Array(s.buffer),A=this.layout.stride/4;let T=o*A;const z=T;let C=0;const M=m?(t,e,i)=>C=m[i]:(t,e,i)=>C+=c(t,e),O=j.BYTES_PER_ELEMENT/E.BYTES_PER_ELEMENT,V=4/O,R=(t,e,i,s,a,o,n,l)=>{j[T++]=e[0],j[T++]=e[1],j[T++]=e[2],x(t,e,E,T*O),T+=V,x(i,e,E,T*O),T+=V,j[T++]=l;let h=T*O;if(E[h++]=a,E[h++]=o,T=Math.ceil(h/O),_)j[T]=b;else{const t=Math.min(4*n,d.length-4),e=4*T;w[e]=255*d[t],w[e+1]=255*d[t+1],w[e+2]=255*d[t+2],w[e+3]=255*d[t+3]}if(T++,j[T++]=f,P&&(j[T++]=y),L()){let t=4*T;r?(w[t++]=r[0],w[t++]=r[1],w[t++]=r[2],w[t++]=r[3]):(w[t++]=0,w[t++]=0,w[t++]=0,w[t++]=0),T=Math.ceil(.25*t)}v&&(h=T*O,E[h++]=s[0],E[h++]=s[1],E[h++]=s[2],T=Math.ceil(h/O))};T+=A,a(ot,n.data[0],n.data[1],n.data[2]),v&&a(lt,S[0],S[1],S[2]),t&&u(ot,ot,t);const F=this._isClosed(i);if(F){const e=n.data.length-3;a(at,n.data[e],n.data[e+1],n.data[e+2]),t&&u(at,at,t)}else a(nt,n.data[3],n.data[4],n.data[5]),t&&u(nt,nt,t),R(ot,ot,nt,lt,1,-4,0,0),R(ot,ot,nt,lt,1,4,0,0),p(at,ot),p(ot,nt),v&&a(lt,S[3],S[4],S[5]);const N=F?0:1,k=F?h:h-1;for(let c=N;c<k;c++){const e=(c+1)%h*3;a(nt,n.data[e],n.data[e+1],n.data[e+2]),t&&u(nt,nt,t),M(at,ot,c),R(at,ot,nt,lt,0,-1,c,C),R(at,ot,nt,lt,0,1,c,C);const i=this.numJoinSubdivisions;for(let t=0;t<i;++t){const e=(t+1)/(i+1);R(at,ot,nt,lt,e,-1,c,C),R(at,ot,nt,lt,e,1,c,C)}R(at,ot,nt,lt,1,-2,c,C),R(at,ot,nt,lt,1,2,c,C),p(at,ot),p(ot,nt),v&&a(lt,S[e],S[e+1],S[e+2])}F?(a(nt,n.data[3],n.data[4],n.data[5]),t&&u(nt,nt,t),C=M(at,ot,k),R(at,ot,nt,lt,0,-1,N,C),R(at,ot,nt,lt,0,1,N,C)):(C=M(at,ot,k),R(at,ot,ot,lt,0,-5,k,C),R(at,ot,ot,lt,0,5,k,C)),q(j,z+A,j,z,A);return T=q(j,T-A,j,T,A),this._parameters.wireframe&&this._addWireframeVertices(s,z,T,A),null}_addWireframeVertices(t,e,i,r){const s=new Float32Array(t.buffer,i*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(t.buffer,e*Float32Array.BYTES_PER_ELEMENT,i-e);let o=0;const n=t=>o=q(a,t,s,o,r);for(let l=0;l<a.length-1;l+=2*r)n(l),n(l+2*r),n(l+1*r),n(l+2*r),n(l+1*r),n(l+3*r)}}function q(t,e,i,r,s){for(let a=0;a<s;a++)i[r++]=t[e++];return r}function X(t,e){if(!t.isClosed)return!1;return e.get("position").indices.length>2}function G(t){return 1===t.anchor&&t.hideOnShortSegments&&"begin-end"===t.placement&&t.worldSpace}const H=f(),I=f(),K=f(),Q=f(),Z=f(),$=i(),tt=i(),et=f(),it=f(),rt=S(),st=S(),at=f(),ot=f(),nt=f(),lt=f(),ht=[i(),i(),i(),i()],pt=[f(),f(),f(),f()],mt=y(),ct=y(),ut=y(),ft=y();export{J as Parameters,B as RibbonLineMaterial};
5
+ import t from"../../../../core/Logger.js";import{clamp as e}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as i}from"../../../../core/screenUtils.js";import{secondsFromMilliseconds as r}from"../../../../core/time.js";import{copy as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as a,d as o,e as n,g as l,f as h,c as p,l as m,j as c,t as u}from"../../../../chunks/vec32.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as d}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeFloat16Array as g}from"../../../../geometry/support/float16.js";import{distance2 as b,fromPoints as _,create as S,closestLineSegmentPoint as v}from"../../../../geometry/support/lineSegment.js";import{fromPoints as P,create as y,signedDistance as j,getNormal as E}from"../../../../geometry/support/plane.js";import{isHighlightOrOID as w,isColorOrColorEmission as A,isDepth as T,isColorEmissionHighlightOIDOrDepth as z,is2DGeometryOutput as C}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as L}from"../effects/geometry/olidUtils.js";import M from"../lib/GLMaterial.js";import{Material as O}from"../lib/Material.js";import{isTranslationMatrix as V}from"../lib/Util.js";import{VisualVariablePassParameters as R}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as x}from"./internal/bufferWriterUtils.js";import{r as F}from"../../../../chunks/RibbonLine.glsl.js";import{getLayout as N,RibbonLineTechnique as k}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as U}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as D}from"../../../../webscene/support/AlphaCutoff.js";class B extends O{constructor(t){super(t,J),this._configuration=new U,this.produces=new Map([[2,t=>w(t)||A(t)&&8===this.parameters.renderOccluded],[3,t=>T(t)],[10,t=>z(t)&&8===this.parameters.renderOccluded],[11,t=>z(t)&&8===this.parameters.renderOccluded],[4,t=>A(t)&&this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[8,t=>A(t)&&!this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[18,t=>C(t)]])}getConfiguration(t,e){super.getConfiguration(t,e,this._configuration),this._configuration.oitPass=e.oitPass,this._configuration.draped=18===e.slot;const i=null!=this.parameters.stipplePattern&&9!==t;return this._configuration.stippleEnabled=i,this._configuration.stippleOffColorEnabled=i&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=i&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&G(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=e.hasOccludees,this._configuration.occluder=8===this.parameters.renderOccluded,this._configuration.terrainDepthTest=e.terrainDepthTest&&A(t),this._configuration.cullAboveTerrain=e.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration.animation=this.parameters.animation,this._configuration.emissionSource=this.hasEmissions?1:0,this._configuration}get visible(){return this.parameters.color[3]>=D||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>D}setParameters(t,e){t.animation=this.parameters.animation,super.setParameters(t,e)}intersectDraped({attributes:t,screenToWorldRatio:i},r,s,a,o){if(!r.options.selectionMode)return;const n=t.get("size");let l=this.parameters.width;if(this.parameters.vvSize){const i=t.get("sizeFeatureAttribute").data[0];Number.isNaN(i)?l*=this.parameters.vvSize.fallback[0]:l*=e(this.parameters.vvSize.offset[0]+i*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else n&&(l*=n.data[0]);const h=s[0],p=s[1],m=(l/2+4)*i;let c=Number.MAX_VALUE,u=0;const f=t.get("position").data,d=X(this.parameters,t)?f.length-2:f.length-5;for(let g=0;g<d;g+=3){const t=f[g],i=f[g+1],r=(g+3)%f.length,s=h-t,a=p-i,o=f[r]-t,n=f[r+1]-i,l=e((o*s+n*a)/(o*o+n*n),0,1),m=o*l-s,d=n*l-a,b=m*m+d*d;b<c&&(c=b,u=g/3)}c<m*m&&a(o.distance,o.normal,u)}intersect(i,r,u,f,d,g){const{options:S,camera:y,rayBegin:w,rayEnd:A}=u;if(!S.selectionMode||!i.visible||!y)return;if(!V(r))return void t.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const T=i.attributes,z=T.get("position").data;let C=this.parameters.width;if(this.parameters.vvSize){const t=T.get("sizeFeatureAttribute").data[0];Number.isNaN(t)||(C*=e(this.parameters.vvSize.offset[0]+t*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else T.has("size")&&(C*=T.get("size").data[0]);const L=Z;s(L,u.point);const M=C*y.pixelRatio/2+4*y.pixelRatio;a(ht[0],L[0]-M,L[1]+M,0),a(ht[1],L[0]+M,L[1]+M,0),a(ht[2],L[0]+M,L[1]-M,0),a(ht[3],L[0]-M,L[1]-M,0);for(let t=0;t<4;t++)if(!y.unprojectFromRenderScreen(ht[t],pt[t]))return;P(y.eye,pt[0],pt[1],mt),P(y.eye,pt[1],pt[2],ct),P(y.eye,pt[2],pt[3],ut),P(y.eye,pt[3],pt[0],ft);let O=Number.MAX_VALUE,R=0;const x=X(this.parameters,T)?z.length-2:z.length-5;for(let t=0;t<x;t+=3){H[0]=z[t]+r[12],H[1]=z[t+1]+r[13],H[2]=z[t+2]+r[14];const e=(t+3)%z.length;if(I[0]=z[e]+r[12],I[1]=z[e+1]+r[13],I[2]=z[e+2]+r[14],j(mt,H)<0&&j(mt,I)<0||j(ct,H)<0&&j(ct,I)<0||j(ut,H)<0&&j(ut,I)<0||j(ft,H)<0&&j(ft,I)<0)continue;if(y.projectToRenderScreen(H,$),y.projectToRenderScreen(I,tt),$[2]<0&&tt[2]>0){o(K,H,I);const t=y.frustum,e=-j(t[4],H)/n(K,E(t[4]));l(K,K,e),h(H,H,K),y.projectToRenderScreen(H,$)}else if($[2]>0&&tt[2]<0){o(K,I,H);const t=y.frustum,e=-j(t[4],I)/n(K,E(t[4]));l(K,K,e),h(I,I,K),y.projectToRenderScreen(I,tt)}else if($[2]<0&&tt[2]<0)continue;$[2]=0,tt[2]=0;const i=b(_($,tt,rt),L);i<O&&(O=i,p(et,H),p(it,I),R=t/3)}if(O<M*M){let t=Number.MAX_VALUE;if(v(_(et,it,rt),_(w,A,st),Q)){o(Q,Q,w);const e=m(Q);l(Q,Q,1/e),t=e/c(w,A)}g(t,Q,R)}}get hasEmissions(){return this.parameters.emissiveStrength>0}createBufferWriter(){return new Y(N(this.parameters),this.parameters)}createGLMaterial(t){return new W(t)}validateParameters(t){"miter"!==t.join&&(t.miterLimit=0),null!=t.markerParameters&&(t.markerScale=t.markerParameters.width/t.width)}update(t){const{hasAnimation:e,animationSpeed:i}=this.parameters;return!!e&&(this.setParameters({timeElapsed:r(t.time)*i},!1),0!==t.dt)}}class W extends M{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures?.release(this._stipplePattern),this._stipplePattern=null}beginSlot(t){const e=this._material.parameters.stipplePattern;return this._stipplePattern!==e&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(e,this._stipplePattern)}),this._stipplePattern=e),this.getTechnique(k,t)}}class J extends R{constructor(){super(...arguments),this.width=0,this.color=d,this.join="miter",this.cap=0,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1,this.timeElapsed=0,this.animation=0,this.animationSpeed=1,this.trailLength=1,this.emissiveStrength=0}get transparent(){return this.color[3]<1||this.hasAnimation||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}get hasAnimation(){return 0!==this.animation}}class Y{constructor(t,e){this.layout=t,this._parameters=e;const i=e.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=i;break;case"round":this.numJoinSubdivisions=F+i}}_isClosed(t){return X(this._parameters,t)}allocate(t){return this.layout.createBuffer(t)}elementCount(t){const e=2,i=t.get("position").indices.length/2+1,r=this._isClosed(t);let s=r?2:2*e;return s+=((r?i:i-1)-(r?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(t,e,i,r,s,o){const n=i.get("position"),l=n.indices,h=n.data.length/3,m=i.get("distanceToStart")?.data;l&&l.length!==2*(h-1)&&console.warn("RibbonLineMaterial does not support indices");const f=(this.layout.fields.has("sizeFeatureAttribute")?i.get("sizeFeatureAttribute")?.data[0]:i.get("size")?.data[0])??1;let d=[1,1,1,1],b=0;const _=this.layout.fields.has("colorFeatureAttribute");_?b=i.get("colorFeatureAttribute").data[0]:i.has("color")&&(d=i.get("color").data);const S=i.get("timeStamps")?.data,v=S&&this.layout.fields.has("timeStamps"),P=this.layout.fields.has("opacityFeatureAttribute"),y=P?i.get("opacityFeatureAttribute").data[0]:0,j=new Float32Array(s.buffer),E=g(s.buffer),w=new Uint8Array(s.buffer),A=this.layout.stride/4;let T=o*A;const z=T;let C=0;const M=m?(t,e,i)=>C=m[i]:(t,e,i)=>C+=c(t,e),O=j.BYTES_PER_ELEMENT/E.BYTES_PER_ELEMENT,V=4/O,R=(t,e,i,s,a,o,n,l)=>{j[T++]=e[0],j[T++]=e[1],j[T++]=e[2],x(t,e,E,T*O),T+=V,x(i,e,E,T*O),T+=V,j[T++]=l;let h=T*O;if(E[h++]=a,E[h++]=o,T=Math.ceil(h/O),_)j[T]=b;else{const t=Math.min(4*n,d.length-4),e=4*T;w[e]=255*d[t],w[e+1]=255*d[t+1],w[e+2]=255*d[t+2],w[e+3]=255*d[t+3]}if(T++,j[T++]=f,P&&(j[T++]=y),L()){let t=4*T;r?(w[t++]=r[0],w[t++]=r[1],w[t++]=r[2],w[t++]=r[3]):(w[t++]=0,w[t++]=0,w[t++]=0,w[t++]=0),T=Math.ceil(.25*t)}v&&(h=T*O,E[h++]=s[0],E[h++]=s[1],E[h++]=s[2],T=Math.ceil(h/O))};T+=A,a(ot,n.data[0],n.data[1],n.data[2]),v&&a(lt,S[0],S[1],S[2]),t&&u(ot,ot,t);const F=this._isClosed(i);if(F){const e=n.data.length-3;a(at,n.data[e],n.data[e+1],n.data[e+2]),t&&u(at,at,t)}else a(nt,n.data[3],n.data[4],n.data[5]),t&&u(nt,nt,t),R(ot,ot,nt,lt,1,-4,0,0),R(ot,ot,nt,lt,1,4,0,0),p(at,ot),p(ot,nt),v&&a(lt,S[3],S[4],S[5]);const N=F?0:1,k=F?h:h-1;for(let c=N;c<k;c++){const e=(c+1)%h*3;a(nt,n.data[e],n.data[e+1],n.data[e+2]),t&&u(nt,nt,t),M(at,ot,c),R(at,ot,nt,lt,0,-1,c,C),R(at,ot,nt,lt,0,1,c,C);const i=this.numJoinSubdivisions;for(let t=0;t<i;++t){const e=(t+1)/(i+1);R(at,ot,nt,lt,e,-1,c,C),R(at,ot,nt,lt,e,1,c,C)}R(at,ot,nt,lt,1,-2,c,C),R(at,ot,nt,lt,1,2,c,C),p(at,ot),p(ot,nt),v&&a(lt,S[e],S[e+1],S[e+2])}F?(a(nt,n.data[3],n.data[4],n.data[5]),t&&u(nt,nt,t),C=M(at,ot,k),R(at,ot,nt,lt,0,-1,N,C),R(at,ot,nt,lt,0,1,N,C)):(C=M(at,ot,k),R(at,ot,ot,lt,0,-5,k,C),R(at,ot,ot,lt,0,5,k,C)),q(j,z+A,j,z,A);return T=q(j,T-A,j,T,A),this._parameters.wireframe&&this._addWireframeVertices(s,z,T,A),null}_addWireframeVertices(t,e,i,r){const s=new Float32Array(t.buffer,i*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(t.buffer,e*Float32Array.BYTES_PER_ELEMENT,i-e);let o=0;const n=t=>o=q(a,t,s,o,r);for(let l=0;l<a.length-1;l+=2*r)n(l),n(l+2*r),n(l+1*r),n(l+2*r),n(l+1*r),n(l+3*r)}}function q(t,e,i,r,s){for(let a=0;a<s;a++)i[r++]=t[e++];return r}function X(t,e){if(!t.isClosed)return!1;return e.get("position").indices.length>2}function G(t){return 1===t.anchor&&t.hideOnShortSegments&&"begin-end"===t.placement&&t.worldSpace}const H=f(),I=f(),K=f(),Q=f(),Z=f(),$=i(),tt=i(),et=f(),it=f(),rt=S(),st=S(),at=f(),ot=f(),nt=f(),lt=f(),ht=[i(),i(),i(),i()],pt=[f(),f(),f(),f()],mt=y(),ct=y(),ut=y(),ft=y();export{J as Parameters,B as RibbonLineMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{n as e,i as t,g as r,f as s}from"../../../../chunks/vec32.js";import{fromValues as i,create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as n}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{center as o,scale as p}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as c}from"../../../../geometry/support/buffer/BufferView.js";import{isColorOrOID as h,isColorOrColorEmission as l}from"../core/shaderLibrary/ShaderOutput.js";import u from"../lib/GLMaterial.js";import{Material as f,MaterialParameters as m}from"../lib/Material.js";import{intersectTriangleGeometry as g}from"../lib/RayIntersections.js";import{assert as d}from"../lib/Util.js";import{writeAttributes as b,writePosition as _}from"./internal/bufferWriterUtils.js";import{getLayout as S,ShadedColorMaterialTechnique as j}from"../shaders/ShadedColorMaterialTechnique.js";import{ShadedColorMaterialTechniqueConfiguration as w}from"../shaders/ShadedColorMaterialTechniqueConfiguration.js";import{alphaCutoff as T}from"../../../../webscene/support/AlphaCutoff.js";class x extends f{constructor(e){super(e,D),this._configuration=new w,this.supportsEdges=!0,this._pp0=i(0,0,1),this._pp1=i(0,0,0),this.produces=new Map([[2,e=>8===e||h(e)&&!this.parameters.transparent],[4,e=>h(e)&&this.parameters.transparent&&this.parameters.writeDepth],[8,e=>h(e)&&this.parameters.transparent&&!this.parameters.writeDepth]])}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.screenSizeEnabled=this.parameters.screenSizeEnabled,this._configuration.shadingEnabled=this.parameters.shadingEnabled,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&l(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=T}intersect(e,t,r,s,i,a){this._intersect(e,r,s,i,a)}intersectDraped(e,t,r,s){return this._pp0[0]=this._pp1[0]=r[0],this._pp0[1]=this._pp1[1]=r[1],this._intersect(e,t,this._pp0,this._pp1,s)}_intersect(e,i,a,n,c){if(this.parameters.screenSizeEnabled){const h=e.attributes.get("offset"),l={applyToVertex:(e,a,n,o)=>{const p=t(E,h.data[3*o],h.data[3*o+1],h.data[3*o+2]),c=t(M,e,a,n);return r(p,p,this.parameters.screenSizeScale*(i.camera?.computeScreenPixelSizeAt(p)??1)),s(c,c,p),[c[0],c[1],c[2]]},applyToAabb:e=>{const t=o(e,E);return p(e,this.parameters.screenSizeScale*(i.camera?.computeScreenPixelSizeAt(t)??1))}};g(e,i,a,n,l,c)}else g(e,i,a,n,void 0,c)}createGLMaterial(e){return new z(e)}createBufferWriter(){return new y(S(this.parameters))}}class z extends u{beginSlot(e){return this.getTechnique(j,e)}}class D extends m{constructor(){super(...arguments),this.color=n(1,1,1,1),this.shadingTint=n(0,0,0,.25),this.shadingDirection=e(a(),[.5,-.5,-.5]),this.screenSizeScale=14,this.forceTransparentMode=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.cullFace=0,this.screenSizeEnabled=!1,this.shadingEnabled=!0}get transparent(){return this.color[3]<1||this.forceTransparentMode}}class y{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,s,i,a){const n=b(r,s,this.layout,e,t,i,a),o=i.getField("offset",c);if(o&&r.has("offset")){const e=r.get("offset");d(3===e.size),_(e,t,o,a)}return n}}const E=a(),M=a();export{D as Parameters,x as ShadedColorMaterial};
5
+ import{n as e,i as t,g as r,f as s}from"../../../../chunks/vec32.js";import{fromValues as i,create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as n}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{center as o,scale as p}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as c}from"../../../../geometry/support/buffer/BufferView.js";import{isColorOrOID as h,isColorOrColorEmission as l}from"../core/shaderLibrary/ShaderOutput.js";import u from"../lib/GLMaterial.js";import{Material as f,MaterialParameters as m}from"../lib/Material.js";import{intersectTriangleGeometry as g}from"../lib/RayIntersections.js";import{assert as d}from"../lib/Util.js";import{writeAttributes as b,writePosition as _}from"./internal/bufferWriterUtils.js";import{getLayout as S,ShadedColorMaterialTechnique as j}from"../shaders/ShadedColorMaterialTechnique.js";import{ShadedColorMaterialTechniqueConfiguration as w}from"../shaders/ShadedColorMaterialTechniqueConfiguration.js";import{alphaCutoff as T}from"../../../../webscene/support/AlphaCutoff.js";class x extends f{constructor(e){super(e,D),this._configuration=new w,this.supportsEdges=!0,this._pp0=i(0,0,1),this._pp1=i(0,0,0),this.produces=new Map([[2,e=>9===e||h(e)&&!this.parameters.transparent],[4,e=>h(e)&&this.parameters.transparent&&this.parameters.writeDepth],[8,e=>h(e)&&this.parameters.transparent&&!this.parameters.writeDepth]])}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.screenSizeEnabled=this.parameters.screenSizeEnabled,this._configuration.shadingEnabled=this.parameters.shadingEnabled,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&l(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=T}intersect(e,t,r,s,i,a){this._intersect(e,r,s,i,a)}intersectDraped(e,t,r,s){return this._pp0[0]=this._pp1[0]=r[0],this._pp0[1]=this._pp1[1]=r[1],this._intersect(e,t,this._pp0,this._pp1,s)}_intersect(e,i,a,n,c){if(this.parameters.screenSizeEnabled){const h=e.attributes.get("offset"),l={applyToVertex:(e,a,n,o)=>{const p=t(E,h.data[3*o],h.data[3*o+1],h.data[3*o+2]),c=t(M,e,a,n);return r(p,p,this.parameters.screenSizeScale*(i.camera?.computeScreenPixelSizeAt(p)??1)),s(c,c,p),[c[0],c[1],c[2]]},applyToAabb:e=>{const t=o(e,E);return p(e,this.parameters.screenSizeScale*(i.camera?.computeScreenPixelSizeAt(t)??1))}};g(e,i,a,n,l,c)}else g(e,i,a,n,void 0,c)}createGLMaterial(e){return new z(e)}createBufferWriter(){return new y(S(this.parameters))}}class z extends u{beginSlot(e){return this.getTechnique(j,e)}}class D extends m{constructor(){super(...arguments),this.color=n(1,1,1,1),this.shadingTint=n(0,0,0,.25),this.shadingDirection=e(a(),[.5,-.5,-.5]),this.screenSizeScale=14,this.forceTransparentMode=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.cullFace=0,this.screenSizeEnabled=!1,this.shadingEnabled=!0}get transparent(){return this.color[3]<1||this.forceTransparentMode}}class y{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,s,i,a){const n=b(r,s,this.layout,e,t,i,a),o=i.getField("offset",c);if(o&&r.has("offset")){const e=r.get("offset");d(3===e.size),_(e,t,o,a)}return n}}const E=a(),M=a();export{D as Parameters,x as ShadedColorMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{WaterDistortionPassParameters as e}from"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import{ReloadableShaderModule as r}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as s}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as o,getDrawBuffers as a,depthWrite as i,oitDepthTest as n,blending as l}from"../lib/OrderIndependentTransparency.js";import{PositionUvf32OlidLayout as d,PositionUvf32Layout as c}from"./DefaultLayouts.js";import{W as p}from"../../../../chunks/WaterSurface.glsl.js";import{makePipelineState as f,defaultColorWrite as m}from"../../../webgl/renderState.js";class u extends e{}class h extends t{constructor(e,t){super(e,t,new r(p,()=>import("../shaders/WaterSurface.glsl.js")),s()?d.locations:c.locations)}initializePipeline(e){const{oitPass:r,output:t,transparent:s,draped:d}=e;return f({blending:3!==t&&8!==t&&9!==t&&s?l(r):null,depthTest:d?null:{func:n(r)},depthWrite:i(e),drawBuffers:a(r,t),colorWrite:m,polygonOffset:o(e)})}}export{u as WaterMaterialPassParameters,h as WaterTechnique};
5
+ import{WaterDistortionPassParameters as e}from"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import{ReloadableShaderModule as r}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as s}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as o,getDrawBuffers as a,depthWrite as i,oitDepthTest as n,blending as l}from"../lib/OrderIndependentTransparency.js";import{PositionUvf32OlidLayout as d,PositionUvf32Layout as c}from"./DefaultLayouts.js";import{W as p}from"../../../../chunks/WaterSurface.glsl.js";import{makePipelineState as f,defaultColorWrite as m}from"../../../webgl/renderState.js";class u extends e{}class h extends t{constructor(e,t){super(e,t,new r(p,()=>import("../shaders/WaterSurface.glsl.js")),s()?d.locations:c.locations)}initializePipeline(e){const{oitPass:r,output:t,transparent:s,draped:d}=e;return f({blending:3!==t&&9!==t&&10!==t&&s?l(r):null,depthTest:d?null:{func:n(r)},depthWrite:i(e),drawBuffers:a(r,t),colorWrite:m,polygonOffset:o(e)})}}export{u as WaterMaterialPassParameters,h as WaterTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as t}from"../../../../../core/accessorSupport/decorators/subclass.js";import{SyncRenderPlugin as i}from"../../effects/RenderPlugin.js";import{MergedBuffer as s}from"./MergedBuffer.js";import{VaoRenderer as a}from"./VaoRenderer.js";let n=class extends i{constructor(e){super(e),this._dataByOrigin=new Map,this._buffer=null,this._renderer=null,this.drapedPriority=0}initialize(){this._buffer=new s({material:this.material,dataByOrigin:this._dataByOrigin,highlightOrderMap:this.highlightOrderMap}),this._renderer=new a({material:this.material,dataByOrigin:this._dataByOrigin})}destroy(){for(const e of this._dataByOrigin.values())e.dispose();this._dataByOrigin.clear(),this._buffer.destroy(),this._renderer.destroy()}hasHighlight(e){return this._renderer.hasHighlight(e)}initializeRenderContext(e){this._buffer.initializeRenderContext(e),this._renderer.initializeRenderContext(e)}uninitializeRenderContext(){this._buffer.uninitializeRenderContext(),this._renderer.uninitializeRenderContext()}get produces(){return this._renderer.produces}get hasOccludees(){return this._buffer.hasOccludees}get hasOnlyOccluders(){return!!(-2&this.renderOccludedFlags)}get hasEmissions(){return this.material.hasEmissions}get isDecoration(){return this.material.parameters.isDecoration}get renderOccludedFlags(){return this.material.renderOccludedFlags}get numGeometries(){let e=0;return this._dataByOrigin.forEach(r=>e+=r.buffers.reduce((e,r)=>e+r.instances.size,0)),e}get usedMemory(){let e=0;return this._dataByOrigin.forEach(r=>e+=r.buffers.reduce((e,r)=>e+r.vao.cachedMemory,0)),e}forEachGeometry(e){this._dataByOrigin.forEach(r=>r.buffers.forEach(r=>r.instances.forEach(({geometry:r})=>e(r))))}modify(e,r){this._buffer.modify(e,r),this._renderer.updateHighlights()}get canCompact(){return this._buffer.canCompact}compact(e){return this._buffer.compact(e)}updateHighlights(e){this.highlightOrderMap=e,this._buffer.updateHighlights(e),this._renderer.updateHighlights()}updateAnimation(e){return this.material.update(e)}acquireTechniques(e){return this._renderer.acquireTechniques(e)}render(e,r){return this._renderer.render(e,r)}static prune(){s.prune()}get test(){}};e([r({constructOnly:!0})],n.prototype,"material",void 0),e([r()],n.prototype,"highlightOrderMap",void 0),n=e([t("esri.views.3d.webgl-engine.materials.renderers.MergedRenderer")],n);export{n as MergedRenderer};
5
+ import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as t}from"../../../../../core/accessorSupport/decorators/subclass.js";import{SyncRenderPlugin as i}from"../../effects/RenderPlugin.js";import{MergedBuffer as s}from"./MergedBuffer.js";import{VaoRenderer as a}from"./VaoRenderer.js";let n=class extends i{constructor(e){super(e),this._dataByOrigin=new Map,this._buffer=null,this._renderer=null,this.drapedPriority=0}initialize(){this._buffer=new s({material:this.material,dataByOrigin:this._dataByOrigin,highlightOrderMap:this.highlightOrderMap}),this._renderer=new a({material:this.material,dataByOrigin:this._dataByOrigin})}destroy(){for(const e of this._dataByOrigin.values())e.dispose();this._dataByOrigin.clear(),this._buffer.destroy(),this._renderer.destroy()}hasHighlight(e){return this._renderer.hasHighlight(e)}initializeRenderContext(e){this._buffer.initializeRenderContext(e),this._renderer.initializeRenderContext(e)}uninitializeRenderContext(){this._buffer.uninitializeRenderContext(),this._renderer.uninitializeRenderContext()}get produces(){return this._renderer.produces}get hasOccludees(){return this._buffer.hasOccludees}get hasOnlyOccluders(){return!!(-2&this.renderOccludedFlags)}get hasEmitters(){return this.material.hasEmissions}get isDecoration(){return this.material.parameters.isDecoration}get renderOccludedFlags(){return this.material.renderOccludedFlags}get numGeometries(){let e=0;return this._dataByOrigin.forEach(r=>e+=r.buffers.reduce((e,r)=>e+r.instances.size,0)),e}get usedMemory(){let e=0;return this._dataByOrigin.forEach(r=>e+=r.buffers.reduce((e,r)=>e+r.vao.cachedMemory,0)),e}forEachGeometry(e){this._dataByOrigin.forEach(r=>r.buffers.forEach(r=>r.instances.forEach(({geometry:r})=>e(r))))}modify(e,r){this._buffer.modify(e,r),this._renderer.updateHighlights()}get canCompact(){return this._buffer.canCompact}compact(e){return this._buffer.compact(e)}updateHighlights(e){this.highlightOrderMap=e,this._buffer.updateHighlights(e),this._renderer.updateHighlights()}updateAnimation(e){return this.material.update(e)}acquireTechniques(e){return this._renderer.acquireTechniques(e)}render(e,r){return this._renderer.render(e,r)}static prune(){s.prune()}get test(){}};e([r({constructOnly:!0})],n.prototype,"material",void 0),e([r()],n.prototype,"highlightOrderMap",void 0),n=e([t("esri.views.3d.webgl-engine.materials.renderers.MergedRenderer")],n);export{n as MergedRenderer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import i from"../../../../../core/Accessor.js";import"../../../../../core/has.js";import{disposeMaybe as e}from"../../../../../core/maybe.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import{GLMaterials as a}from"../../lib/GLMaterials.js";import{DrawParameters as o}from"../DrawParameters.js";import{defaultHighlightName as n}from"../../../../support/HighlightDefaults.js";let h=class extends i{constructor(t){super(t),this._glMaterials=null,this._drawParameters=new o,this._highlightNames=new Set,this._produces=new Map}initialize(){this._updateProduces()}destroy(){this.uninitializeRenderContext()}get _hasHighlights(){return this._highlightNames.size>0}hasHighlight(t){return this._highlightNames.has(t)}get produces(){return this._produces}_updateProduces(){this.material.produces.forEach((t,i)=>{this._produces.set(i,i=>!(0===this.dataByOrigin.size||!(8!==i&&5!==i||this._hasHighlights))&&t(i))})}initializeRenderContext(t){this._glMaterials=new a(this.material,t.materials)}uninitializeRenderContext(){this._glMaterials=e(this._glMaterials)}acquireTechniques(t){if(!this.material.shouldRender(t))return null;const{output:i,bind:e}=t,s=this.material.produces.get(e.slot);if(!s?.(i))return null;const{highlight:r,slot:a}=e,o=5===i,h=8===i,l=h||o,g=r?.name;if(l&&(0===this._highlightNames.size||h&&g&&!this._highlightNames.has(g)))return null;const d=t=>h&&!!g&&!t.has(g),m=6===i,u=!(l||m);for(const{buffers:c}of this.dataByOrigin.values())for(const s of c){if(d(s.highlightNames))continue;const r=o?s.drawCommandsHighlights.get(n):l?g?s.drawCommandsHighlights.get(g):s.drawCommandsHighlights.size>0:((m&&s.needsMultipleCommands?s.drawCommandsShadowHighlightRest:s.drawCommandsDefault)||null)?.length??!1,h=u&&s.drawCommandsOccludees||null;if(r||h?.length){const s=this._glMaterials.load(t.rctx,a,i),r=s?.beginSlot(e);if(r)return r}}return null}render(t,i){const{output:e,bind:s}=t,{slot:r,highlight:a}=s,o=8===e,h=a?.name??"";if(o&&!a)return;const l=5===e,g=o||l,d=6===e,m=!(g||d),u=10===r||11===r?r:null,{rctx:c}=t;c.runAppleAmdDriverHelper();const p=c.bindTechnique(i,s,this.material.parameters);for(const f of this.dataByOrigin.values())for(const t of f.buffers){if(o&&(!t.hasHighlights||!t.drawCommandsHighlights.has(h)))continue;if(l&&(!t.hasHighlights||!t.drawCommandsHighlights.has(n)))continue;const e=g&&!l?t.drawCommandsHighlights.get(h)??null:null,r=l?t.drawCommandsHighlights.get(n):g?e:d&&t.needsMultipleCommands?t.drawCommandsShadowHighlightRest:t.drawCommandsDefault,a=null!=r,w=m&&t.drawCommandsOccludees||null;if(a||w?.length){if(this._drawParameters.origin=f.origin,p.bindDraw(s,this.material.parameters,this._drawParameters),i.ensureAttributeLocations(t.vao),c.bindVAO(t.vao),a)for(const t of r)c.setPipelineState(i.getPipeline(!1,u)),c.drawArrays(i.primitiveType,t.first,t.count);if(w?.length){c.setPipelineState(i.getPipeline(!0,u));for(const t of w)c.drawArrays(i.primitiveType,t.first,t.count)}}}}updateHighlights(){const{_highlightNames:t}=this;t.clear();for(const i of this.dataByOrigin.values())for(const e of i.buffers)for(const i of e.highlightNames)t.add(i);this._updateProduces()}get test(){}};t([s({constructOnly:!0})],h.prototype,"material",void 0),t([s({constructOnly:!0})],h.prototype,"dataByOrigin",void 0),h=t([r("esri.views.3d.webgl-engine.materials.renderers.VaoRenderer")],h);export{h as VaoRenderer};
5
+ import{__decorate as t}from"tslib";import i from"../../../../../core/Accessor.js";import"../../../../../core/has.js";import{disposeMaybe as e}from"../../../../../core/maybe.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import{GLMaterials as a}from"../../lib/GLMaterials.js";import{DrawParameters as o}from"../DrawParameters.js";import{defaultHighlightName as n}from"../../../../support/HighlightDefaults.js";let h=class extends i{constructor(t){super(t),this._glMaterials=null,this._drawParameters=new o,this._highlightNames=new Set,this._produces=new Map}initialize(){this._updateProduces()}destroy(){this.uninitializeRenderContext()}get _hasHighlights(){return this._highlightNames.size>0}hasHighlight(t){return this._highlightNames.has(t)}get produces(){return this._produces}_updateProduces(){this.material.produces.forEach((t,i)=>{this._produces.set(i,i=>!(0===this.dataByOrigin.size||!(9!==i&&5!==i||this._hasHighlights))&&t(i))})}initializeRenderContext(t){this._glMaterials=new a(this.material,t.materials)}uninitializeRenderContext(){this._glMaterials=e(this._glMaterials)}acquireTechniques(t){if(!this.material.shouldRender(t))return null;const{output:i,bind:e}=t,s=this.material.produces.get(e.slot);if(!s?.(i))return null;const{highlight:r,slot:a}=e,o=5===i,h=9===i,l=h||o,g=r?.name;if(l&&(0===this._highlightNames.size||h&&g&&!this._highlightNames.has(g)))return null;const d=t=>h&&!!g&&!t.has(g),m=6===i,u=!(l||m);for(const{buffers:c}of this.dataByOrigin.values())for(const s of c){if(d(s.highlightNames))continue;const r=o?s.drawCommandsHighlights.get(n):l?g?s.drawCommandsHighlights.get(g):s.drawCommandsHighlights.size>0:((m&&s.needsMultipleCommands?s.drawCommandsShadowHighlightRest:s.drawCommandsDefault)||null)?.length??!1,h=u&&s.drawCommandsOccludees||null;if(r||h?.length){const s=this._glMaterials.load(t.rctx,a,i),r=s?.beginSlot(e);if(r)return r}}return null}render(t,i){const{output:e,bind:s}=t,{slot:r,highlight:a}=s,o=9===e,h=a?.name??"";if(o&&!a)return;const l=5===e,g=o||l,d=6===e,m=!(g||d),u=10===r||11===r?r:null,{rctx:c}=t;c.runAppleAmdDriverHelper();const p=c.bindTechnique(i,s,this.material.parameters);for(const f of this.dataByOrigin.values())for(const t of f.buffers){if(o&&(!t.hasHighlights||!t.drawCommandsHighlights.has(h)))continue;if(l&&(!t.hasHighlights||!t.drawCommandsHighlights.has(n)))continue;const e=g&&!l?t.drawCommandsHighlights.get(h)??null:null,r=l?t.drawCommandsHighlights.get(n):g?e:d&&t.needsMultipleCommands?t.drawCommandsShadowHighlightRest:t.drawCommandsDefault,a=null!=r,w=m&&t.drawCommandsOccludees||null;if(a||w?.length){if(this._drawParameters.origin=f.origin,p.bindDraw(s,this.material.parameters,this._drawParameters),i.ensureAttributeLocations(t.vao),c.bindVAO(t.vao),a)for(const t of r)c.setPipelineState(i.getPipeline(!1,u)),c.drawArrays(i.primitiveType,t.first,t.count);if(w?.length){c.setPipelineState(i.getPipeline(!0,u));for(const t of w)c.drawArrays(i.primitiveType,t.first,t.count)}}}}updateHighlights(){const{_highlightNames:t}=this;t.clear();for(const i of this.dataByOrigin.values())for(const e of i.buffers)for(const i of e.highlightNames)t.add(i);this._updateProduces()}get test(){}};t([s({constructOnly:!0})],h.prototype,"material",void 0),t([s({constructOnly:!0})],h.prototype,"dataByOrigin",void 0),h=t([r("esri.views.3d.webgl-engine.materials.renderers.VaoRenderer")],h);export{h as VaoRenderer};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderLibrary/output/ReadDepth.glsl.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{C as CutFillDepthParameters,b as build}from"../../../../chunks/CutFillDepth.glsl.js";
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import{ReloadableShaderModule as e}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../core/shaderTechnique/ShaderTechnique.js";import{Pos2Locations as t}from"../lib/DefaultVertexBufferLayouts.js";import{a as o}from"../../../../chunks/CutFillDepth.glsl.js";import{makePipelineState as i,defaultColorWrite as l}from"../../../webgl/renderState.js";class s extends r{constructor(r,i){super(r,i,new e(o,()=>import("./CutFillDepth.glsl.js")),t)}initializePipeline(){return i({colorWrite:l})}}export{s as CutFillDepthTechnique};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{C as CutFillReductionParameters,b as build}from"../../../../chunks/CutFillReduction.glsl.js";
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import{ReloadableShaderModule as e}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../core/shaderTechnique/ShaderTechnique.js";import{Pos2Locations as o}from"../lib/DefaultVertexBufferLayouts.js";import{a as t}from"../../../../chunks/CutFillReduction.glsl.js";import{makePipelineState as i,defaultColorWrite as l}from"../../../webgl/renderState.js";class s extends r{constructor(r,i){super(r,i,new e(t,()=>import("./CutFillReduction.glsl.js")),o)}initializePipeline(){return i({colorWrite:l})}}export{s as CutFillReductionTechnique};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/output/OutputDepth.glsl.js";import"../core/shaderModules/Float2PassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4PassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{C as CutFillTargetDepthParameters,b as build}from"../../../../chunks/CutFillTargetDepth.glsl.js";
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import{ReloadableShaderModule as e}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../core/shaderTechnique/ShaderTechnique.js";import{Pos3Locations as t}from"../lib/DefaultVertexBufferLayouts.js";import{a as o}from"../../../../chunks/CutFillTargetDepth.glsl.js";import{makePipelineState as i,defaultDepthWrite as s,defaultColorWrite as l}from"../../../webgl/renderState.js";class a extends r{constructor(r,i){super(r,i,new e(o,()=>import("./CutFillTargetDepth.glsl.js")),t)}initializePipeline(){return i({colorWrite:l,depthWrite:s,depthTest:{func:519}})}}export{a as CutFillTargetDepthTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{newLayout as e}from"../../support/buffer/InterleavedLayout.js";import{isColorOrColorEmission as r}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as o}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as s}from"../effects/geometry/olidUtils.js";import{getDrawBuffers as i,oitBlending as n}from"../lib/OrderIndependentTransparency.js";import{H as l}from"../../../../chunks/HUDMaterial.glsl.js";import{PrimitiveType as a}from"../../../webgl/enums.js";import{makePipelineState as c,defaultColorWrite as f,defaultDepthWrite as u,premultipliedAlpha as p}from"../../../webgl/renderState.js";class d extends t{constructor(e,r){super(e,r,new o(l,()=>import("./HUDMaterial.glsl.js")),(s()?v:h).locations),this.primitiveType=r.occlusionPass?a.POINTS:a.TRIANGLES}initializePipeline(e){const{oitPass:o,hasPolygonOffset:t,draped:s,output:l,depthTestEnabled:a,occlusionPass:d}=e,h=0===o,v=a&&!s&&!(1===o)&&!d&&!(8===l);return c({blending:r(l)?h?p:n(o):null,depthTest:a&&!s?{func:515}:null,depthWrite:v?u:null,drawBuffers:i(o,l),colorWrite:f,polygonOffset:t?m:null})}}const m={factor:0,units:-4},h=e().vec3f("position").vec3f("normal").vec2i16("uvi").vec4u8("color").vec2f("size").f32("rotation").vec4f("centerOffsetAndDistance").vec4f("featureAttribute"),v=h.clone().vec4u8("olidColor");export{d as HUDMaterialTechnique,h as layout,v as olidLayout};
5
+ import{newLayout as e}from"../../support/buffer/InterleavedLayout.js";import{isColorOrColorEmission as r}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as o}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as s}from"../effects/geometry/olidUtils.js";import{getDrawBuffers as i,oitBlending as n}from"../lib/OrderIndependentTransparency.js";import{H as l}from"../../../../chunks/HUDMaterial.glsl.js";import{PrimitiveType as a}from"../../../webgl/enums.js";import{makePipelineState as c,defaultColorWrite as f,defaultDepthWrite as u,premultipliedAlpha as p}from"../../../webgl/renderState.js";class d extends t{constructor(e,r){super(e,r,new o(l,()=>import("./HUDMaterial.glsl.js")),(s()?v:h).locations),this.primitiveType=r.occlusionPass?a.POINTS:a.TRIANGLES}initializePipeline(e){const{oitPass:o,hasPolygonOffset:t,draped:s,output:l,depthTestEnabled:a,occlusionPass:d}=e,h=0===o,v=a&&!s&&!(1===o)&&!d&&!(9===l);return c({blending:r(l)?h?p:n(o):null,depthTest:a&&!s?{func:515}:null,depthWrite:v?u:null,drawBuffers:i(o,l),colorWrite:f,polygonOffset:t?m:null})}}const m={factor:0,units:-4},h=e().vec3f("position").vec3f("normal").vec2i16("uvi").vec4u8("color").vec2f("size").f32("rotation").vec4f("centerOffsetAndDistance").vec4f("featureAttribute"),v=h.clone().vec4u8("olidColor");export{d as HUDMaterialTechnique,h as layout,v as olidLayout};
@@ -2,7 +2,7 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{isColorOrColorEmission as o,isColorEmission as r}from"../core/shaderLibrary/ShaderOutput.js";import{Emissions as l}from"../core/shaderLibrary/output/Emissions.glsl.js";import{OutputHighlight as i}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{ColorConversion as s}from"../core/shaderLibrary/util/ColorConversion.glsl.js";import{If as a,glsl as t}from"../core/shaderModules/glsl.js";import{alphaCutoff as e}from"../../../../webscene/support/AlphaCutoff.js";function n(n,u){n.include(i,u),n.include(l,u),n.fragment.include(s);const{output:f,oitPass:d,discardInvisibleFragments:m,snowCover:p}=u,c=9===f,g=r(f),C=o(f)&&1===d,h=o(f)&&1!==d;let v=0;(h||g||C)&&n.outputs.add("fragColor","vec4",v++),g&&n.outputs.add("fragEmission","vec4",v++),C&&n.outputs.add("fragAlpha","float",v++),n.fragment.code.add(t`
5
+ import{isColorOrColorEmission as o,isColorEmission as r}from"../core/shaderLibrary/ShaderOutput.js";import{Emissions as l}from"../core/shaderLibrary/output/Emissions.glsl.js";import{OutputHighlight as i}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{ColorConversion as s}from"../core/shaderLibrary/util/ColorConversion.glsl.js";import{If as a,glsl as t}from"../core/shaderModules/glsl.js";import{alphaCutoff as e}from"../../../../webscene/support/AlphaCutoff.js";function n(n,u){n.include(i,u),n.include(l,u),n.fragment.include(s);const{output:f,oitPass:d,discardInvisibleFragments:m,snowCover:p}=u,c=10===f,g=r(f),C=o(f)&&1===d,h=o(f)&&1!==d;let v=0;(h||g||C)&&n.outputs.add("fragColor","vec4",v++),g&&n.outputs.add("fragEmission","vec4",v++),C&&n.outputs.add("fragAlpha","float",v++),n.fragment.code.add(t`
6
6
  void outputColorHighlightOID(vec4 finalColor, const in vec3 vWorldPosition, vec3 emissiveSymbolColor ${a(p,", float snow")}) {
7
7
  ${a(c,"finalColor.a = 1.0;")}
8
8
 
package/views/3d/webgl.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import o from"../../Camera.js";import{rad2deg as e,deg2rad as r}from"../../core/mathUtils.js";import{create as t}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{g as n,f as i}from"../../chunks/vec32.js";import{create as c}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import a from"../../geometry/Point.js";import l from"../../geometry/SpatialReference.js";import{computeTranslationToOriginAndRotation as s}from"../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as m}from"../../geometry/projection/projectBuffer.js";import{projectPointToVector as p}from"../../geometry/projection/projectPointToVector.js";import{projectVectorToVector as f}from"../../geometry/projection/projectVectorToVector.js";import{cameraOnContentAlongViewDirection as u}from"./camera/intersectionUtils.js";import{directionToHeadingTilt as d,viewModeDependentUtil as R}from"./support/viewingModeUtils.js";const g={OPAQUE:"opaque-color",TRANSPARENT:"transparent-color",COMPOSITE:"composite-color",FINAL:"final-color"},j={SSAO:"ssao",LASERLINES:"laserline-color",ANTIALIASING:"aa-color",HIGHLIGHTS:"highlight-color",MAGNIFIER:"magnifier-color",OCCLUDED:"occluded-color",VIEWSHED:"viewshed-color",OPAQUE_TERRAIN:"opaque-terrain-color",OPAQUE_ENVIRONMENT:"opaque-environment-color",TRANSPARENT_ENVIRONMENT:"transparent-environment-color",FOCUSAREA:"focusarea",FOCUSAREA_COLOR:"focusarea-color"};function A(o,e,r,t,n,i,c){return t=t||o.spatialReference,m(e,t,r,n,o.renderCoordsHelper.spatialReference,i,c)?n:null}function E(o,e,r,t,n,i,c){return i=i||o.spatialReference,m(e,o.renderCoordsHelper.spatialReference,r,t,i,n,c)?t:null}function y(o,e,r,n){return n||(n=t()),r=r||o.spatialReference,s(r,e,n,o.renderCoordsHelper.spatialReference)?n:null}function N(r,t,n){const i=r.renderSpatialReference,c=d(r,t.eye,t.viewForward,t.up,w);let s=r.spatialReference;return f(t.eye,i,T,s)||(s=l.WGS84,f(t.eye,i,T,s)),null==n?n=new o(new a(T,s),c.heading,c.tilt,e(t.fov)):(n.position.x=T[0],n.position.y=T[1],n.position.z=T[2],n.position.spatialReference=s,n.heading=c.heading,n.tilt=c.tilt,n.fov=e(t.fov)),n.layout.row=t.row,n.layout.rows=t.rows,n.layout.column=t.column,n.layout.columns=t.columns,n}function S(o,e){if(!e)return null;const t=o.renderSpatialReference,a=R(o).headingTiltToDirectionUp,l=c();if(!p(e.position,l,t))return null;const s=a(l,e.heading,e.tilt);n(s.direction,s.direction,o.state.camera.distance),i(s.direction,s.direction,l);const m=u(o,l,s.direction,s.up);return m.fov=r(e.fov),m.row=e.layout.row,m.rows=e.layout.rows,m.column=e.layout.column,m.columns=e.layout.columns,m}const T=c(),w={heading:0,tilt:0};export{j as InternalRenderCategory,g as RenderCategory,N as fromRenderCamera,E as fromRenderCoordinates,y as renderCoordinateTransformAt,S as toRenderCamera,A as toRenderCoordinates};
5
+ import o from"../../Camera.js";import{rad2deg as e,deg2rad as r}from"../../core/mathUtils.js";import{create as t}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{g as i,f as n}from"../../chunks/vec32.js";import{create as c}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import l from"../../geometry/Point.js";import a from"../../geometry/SpatialReference.js";import{computeTranslationToOriginAndRotation as s}from"../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as p}from"../../geometry/projection/projectBuffer.js";import{projectPointToVector as m}from"../../geometry/projection/projectPointToVector.js";import{projectVectorToVector as f}from"../../geometry/projection/projectVectorToVector.js";import{cameraOnContentAlongViewDirection as u}from"./camera/intersectionUtils.js";import{directionToHeadingTilt as d,viewModeDependentUtil as R}from"./support/viewingModeUtils.js";const g={OPAQUE:"opaque-color",TRANSPARENT:"transparent-color",COMPOSITE:"composite-color",FINAL:"final-color"},j={SSAO:"ssao",LASERLINES:"laserline-color",ANTIALIASING:"aa-color",HIGHLIGHTS:"highlight-color",MAGNIFIER:"magnifier-color",OCCLUDED:"occluded-color",VIEWSHED:"viewshed-color",CUTFILL_DEPTH:"cutfill-depth",OPAQUE_TERRAIN:"opaque-terrain-color",OPAQUE_ENVIRONMENT:"opaque-environment-color",TRANSPARENT_ENVIRONMENT:"transparent-environment-color",FOCUSAREA:"focusarea",FOCUSAREA_COLOR:"focusarea-color"};function A(o,e,r,t,i,n,c){return t=t||o.spatialReference,p(e,t,r,i,o.renderCoordsHelper.spatialReference,n,c)?i:null}function E(o,e,r,t,i,n,c){return n=n||o.spatialReference,p(e,o.renderCoordsHelper.spatialReference,r,t,n,i,c)?t:null}function y(o,e,r,i){return i||(i=t()),r=r||o.spatialReference,s(r,e,i,o.renderCoordsHelper.spatialReference)?i:null}function T(r,t,i){const n=r.renderSpatialReference,c=d(r,t.eye,t.viewForward,t.up,I);let s=r.spatialReference;return f(t.eye,n,S,s)||(s=a.WGS84,f(t.eye,n,S,s)),null==i?i=new o(new l(S,s),c.heading,c.tilt,e(t.fov)):(i.position.x=S[0],i.position.y=S[1],i.position.z=S[2],i.position.spatialReference=s,i.heading=c.heading,i.tilt=c.tilt,i.fov=e(t.fov)),i.layout.row=t.row,i.layout.rows=t.rows,i.layout.column=t.column,i.layout.columns=t.columns,i}function N(o,e){if(!e)return null;const t=o.renderSpatialReference,l=R(o).headingTiltToDirectionUp,a=c();if(!m(e.position,a,t))return null;const s=l(a,e.heading,e.tilt);i(s.direction,s.direction,o.state.camera.distance),n(s.direction,s.direction,a);const p=u(o,a,s.direction,s.up);return p.fov=r(e.fov),p.row=e.layout.row,p.rows=e.layout.rows,p.column=e.layout.column,p.columns=e.layout.columns,p}const S=c(),I={heading:0,tilt:0};export{j as InternalRenderCategory,g as RenderCategory,T as fromRenderCamera,E as fromRenderCoordinates,y as renderCoordinateTransformAt,N as toRenderCamera,A as toRenderCoordinates};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as r}from"tslib";import e from"../WebLinkChart.js";import{watch as t}from"../core/reactiveUtils.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import i from"../geometry/SpatialReference.js";import s from"./View2D.js";let p=class extends s{constructor(r){super(r),this.map=null,this.view2dType="linkchart";const e=r=>{this.spatialReference="geographic-organic-standard"===r?this.map.basemap?.spatialReference??i.WebMercator:i.WGS84};let o=null;this.addHandles(t(()=>this.map,r=>{r&&(o&&o.remove(),o=t(()=>r.linkChartProperties.layoutType,e),this.addHandles(o))},{initial:!0}))}get inGeographicLayout(){return"geographic-organic-standard"===this.map?.linkChartProperties.layoutType}};r([o()],p.prototype,"inGeographicLayout",null),r([o({type:e})],p.prototype,"map",void 0),r([o({readOnly:!0})],p.prototype,"view2dType",void 0),p=r([a("esri.views.LinkChartView")],p);const c=p;export{c as default};
5
+ import{__decorate as e}from"tslib";import t from"../WebLinkChart.js";import r from"../core/Collection.js";import i from"../core/Error.js";import{watch as a}from"../core/reactiveUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";import{project as n}from"../geometry/projectionUtils.js";import p from"../geometry/SpatialReference.js";import{MeasuredGrid as c}from"../grids/MeasuredGrid.js";import{startNodeMovement as h}from"../layers/knowledgeGraph/nodeMovementUtils.js";import d from"./View2D.js";import g from"./interactive/snapping/FeatureSnappingLayerSource.js";import{SnappingManager as m}from"./interactive/snapping/SnappingManager.js";import l from"./interactive/snapping/SnappingOptions.js";let u=class extends d{constructor(e){super(e),this.map=null,this.view2dType="linkchart",this._isReshapeActive=!1,this._previousGridSettings=void 0,this._cachedSnappingManager=void 0;const t=e=>{this.spatialReference="geographic-organic-standard"===e?this.map.basemap?.spatialReference??p.WebMercator:p.WGS84};let r=null;this.addHandles(a(()=>this.map,e=>{e&&(r&&r.remove(),r=a(()=>e.linkChartProperties.layoutType,t),this.addHandles(r))},{initial:!0}))}get inGeographicLayout(){return"geographic-organic-standard"===this.map?.linkChartProperties.layoutType}async startNodeMovement(e,t,a){if(this._isReshapeActive)throw new i("LinkChartView:reshape-already-active","Node movement reshape is already active");this._isReshapeActive=!0;const s=new r;for(const r of this.map?.activeLinkChartLayer?.layers??[])if("relationship"===r.graphType){const e=new g({layer:r});s.add(e)}try{let r;a?.useSnappingGrid&&(this._previousGridSettings=this.grid,this.grid||(this.grid=new c({units:"feet",center:this.center,rotateWithMap:!0})),this._cachedSnappingManager?(r=this._cachedSnappingManager,r.options.gridEnabled=a?.useSnappingGrid):(r=new m({options:new l({enabled:!0,featureSources:s,gridEnabled:a?.useSnappingGrid}),view:this}),this._cachedSnappingManager=r));const o=await h({targetEntityId:e,targetEntityType:t,view:this,snappingManager:r});return{commitNodeMovement:async()=>{if(!this._isReshapeActive)throw new i("LinkChartView:reshape-not-active","Node movement reshape is not active");this._isReshapeActive=!1;const t=o.currentReshapeGraphic.sourceLayer?.parent,r=t.getCurrentNodeLocations(),a=n(o.currentReshapeGraphic.geometry,{wkid:4326});return r.set(e,a),await t.applyNewLinkChartLayout(this.map.activeLinkChartLayer?.getCurrentLayout(),{lockedNodeLocations:r}),o.teardownHandle.remove(),this.grid=this._previousGridSettings,a},cancelNodeMovement:()=>{if(!this._isReshapeActive)return;this._isReshapeActive=!1;const e=[];for(const t of o.localEdits.values())t.graphic.geometry=void 0,"knowledge-graph-sublayer"===t.graphic.sourceLayer?.type&&"relationship"===t.graphic.sourceLayer?.graphType&&(t.graphic.sourceLayer.parent.relationshipLinkChartDiagramLookup.set(t.graphic.attributes.ESRI__ID,o.originalRelationshipGeometries.get(t.graphic.attributes.ESRI__ID)??null),e.push(t.graphic.sourceLayer));for(const t of e)t.refreshCachedQueryEngine().then(()=>{t?.emit("refresh",{dataChanged:!0})});o.teardownHandle.remove(),this.grid=this._previousGridSettings}}}catch(o){throw this._isReshapeActive=!1,o}}};e([s()],u.prototype,"inGeographicLayout",null),e([s({type:t})],u.prototype,"map",void 0),e([s({readOnly:!0})],u.prototype,"view2dType",void 0),u=e([o("esri.views.LinkChartView")],u);const y=u;export{y as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{EventedAccessor as e}from"../../core/Evented.js";import{clone as i}from"../../core/lang.js";import{equalsMaybe as n,destroyMaybe as r}from"../../core/maybe.js";import{memoize as s}from"../../core/memoize.js";import{ignoreAbortErrors as o}from"../../core/promiseUtils.js";import a from"../../core/ReactiveSet.js";import{watch as p,syncAndInitial as c}from"../../core/reactiveUtils.js";import{createScreenPoint as l}from"../../core/screenUtils.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";import{diff as u}from"../../core/accessorSupport/diffUtils.js";import{UpdatingHandles as g}from"../../core/support/UpdatingHandles.js";import{pointEquals as m,pointNear as y}from"../../layers/graphics/dehydratedFeatureComparison.js";import{getEffectiveElevationInfo as _}from"../../support/elevationInfoUtils.js";import{defaultDrawingMode as v}from"./DrawingMode.js";import{LegacyDrawManipulator as f}from"./LegacyDrawManipulator.js";import{createCoordinateHelper as x}from"../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as P,sceneSnappingAtLocation as b}from"../interactive/dragEventPipeline.js";import{EditGeometry as T,Part as S}from"../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as C}from"../interactive/editGeometry/EditGeometryOperations.js";import{isPoint as V}from"../interactive/sketch/constraints.js";import{pointToConstraintSpace as w,constraintSpaceToPoint as O,getPointConstraint as M,getPolylineOrPolygonConstraint as D}from"../interactive/sketch/constraintUtils.js";import E from"../interactive/sketch/SketchLabelOptions.js";import{SnappingContext as I}from"../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as H}from"../interactive/snapping/SnappingDragPipelineStep.js";import{SnappingOperation as j}from"../interactive/snapping/SnappingOperation.js";import{setupSnappingToggleHandles as G}from"../interactive/snapping/snappingUtils.js";const k="crosshair",Z="progress",L=Symbol(),U=Symbol();let A=class extends e{constructor(t){super(t),this._createOperationCompleted=!1,this._hideDefaultCursor=!1,this._pointerDownStates=new a,this._stagedScreenPoint=null,this._stagedPointerType=null,this._updatingHandles=new g,this._stagedPointerId=null,this.constraintsEnabled=!1,this.constraints=void 0,this._getPointConstraint=s(M),this._getPolylineOrPolygonConstraint=s(D),this.constraintZ=null,this.defaultZ=null,this.isDraped=!0,this.labelOptions=new E,this.cursor=null,this.loading=!1,this.snapToSceneEnabled=null,this.firstVertex=null,this.lastVertex=null,this.secondToLastVertex=null,null==t.elevationInfo&&(this.elevationInfo=_(!!t.hasZ))}initializePointer(){const t=this.view.inputManager?.latestPointerInfo;null!=t&&this._updatePointer(t.location,t.id,t.type)}initialize(){const{geometryType:t,view:e}=this,i=e.spatialReference,r="viewingMode"in e.state?e.state.viewingMode:2,s="segment"===t||"multipoint"===t?"polyline":t;this.coordinateHelper=x(this.hasZ,this.hasM,i),this._editGeometryOperations=new C(new T(s,this.coordinateHelper),r),this._snappingOperation=new j({view:e}),this.addHandles([p(()=>({stagedPoint:this._snappingOperation.stagedPoint,constraint:this._constraint}),({stagedPoint:t,constraint:e},i)=>{const{snappingOptions:n}=this;n&&(n.forceDisabled=null!=e&&V(e));if(null!=i&&t===i.stagedPoint&&e!==i.constraint)return this._onKeyboardBasedChange();this._processCursor(t??this._screenToMap(this._stagedScreenPoint))},{equals:(t,e)=>t.stagedPoint===e.stagedPoint&&n(t.constraint,e.constraint)}),p(()=>this.view.viewpoint,(t,e)=>{t&&e&&u(t,e)&&this._onKeyboardBasedChange()})]),this._activePart=new S(i,r),this._editGeometryOperations.data.parts.push(this._activePart);const a=this.segmentLabels;null!=a&&(a.context={view:e,editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,labelOptions:this.labelOptions,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils},this.addHandles(p(()=>this.labelOptions.enabled,t=>{a.visible=t},c))),this.addHandles(this._editGeometryOperations.on(["vertex-add","vertex-update","vertex-remove"],t=>{const e=t.vertices.map(t=>({componentIndex:0,vertexIndex:t.index,coordinates:this.coordinateHelper.vectorToArray(t.pos)})),i=e.map(t=>t.coordinates),n=this.coordinateHelper.vectorToDehydratedPoint(this._activePart.getFirstVertex()?.pos)??null;m(n,this.firstVertex)||(this.firstVertex=n);const r=this.coordinateHelper.vectorToDehydratedPoint(this._activePart.getLastVertex()?.pos)??null;m(r,this.lastVertex)||(this.lastVertex=r);const s=this.coordinateHelper.vectorToDehydratedPoint(this._activePart.segments.at(-1)?.leftVertex?.pos)??null;switch(m(s,this.secondToLastVertex)||(this.secondToLastVertex=s),this._processCursor(this.cursorVertex),t.type){case"vertex-add":this.emit(t.type,{...t,added:i,vertices:e});break;case"vertex-update":this.emit(t.type,{...t,updated:i,vertices:e});break;case"vertex-remove":this.emit(t.type,{...t,removed:i,vertices:e})}}));const l=this._manipulator=new f({consumesClicks:!1,grabbableForEvent:t=>"click"!==this.drawingMode||"touch"===t.pointerType&&this._snappingEnabled&&1===this._pointerDownStates.size});this.manipulators.add(l),l.grabbable="point"!==t&&"multipoint"!==t,this.addHandles([l.events.on("immediate-click",t=>this._onImmediateClick(t)),l.events.on("immediate-double-click",t=>this._onImmediateDoubleClick(t)),p(()=>this.drawingMode,()=>{this.removeHandles(L),this.addHandles(this._createManipulatorDragPipeline(l),L)},c),p(()=>({effectiveCursor:this.effectiveCursor}),({effectiveCursor:t})=>{l.cursor=t},c)]),G(this,()=>{const t=this.view.inputManager.latestPointerInfo?.type??"mouse",e=this._getSnappingContext(t);if(null!=this.snappingManager){const t=this._snappingOperation.snapAgainNearPreviousMapPoint(this.snappingManager,e);this._updatingHandles.addPromise(o(t))}})}destroy(){r(this.segmentLabels),r(this._snappingOperation),this._editGeometryOperations=r(this._editGeometryOperations),this._updatingHandles.destroy()}get _isDragging(){const{_stagedPointerId:t,_manipulator:e}=this;return null!=t&&this._pointerDownStates.has(t)||e.grabbing||!e.interactive}get _snappingEnabled(){return null!=this.snappingManager&&this.snappingManager.options.effectiveEnabled}get _requiresScenePoint(){const t=this._updateAndGetEffectiveDrawSurface();return"3d"===this.view.type&&this.drawSurface!==t}get canRedo(){return this._editGeometryOperations.canRedo}get canUndo(){return this._editGeometryOperations.canUndo}get committedVertices(){return this._activePart.vertices.map(t=>this.coordinateHelper.vectorToArray(t.pos))}get _constraint(){const{constraints:t,constraintsEnabled:e}=this;if(t&&e)switch(this.geometryType){case"point":case"multipoint":return this._getPointConstraint(t);case"polygon":case"polyline":return this._getPolylineOrPolygonConstraint(this.lastVertex,this.secondToLastVertex,t)}}set drawingMode(t){this._set("drawingMode",t??v)}get effectiveCursor(){return this.loading?Z:this._hideDefaultCursor?null:this.cursor||k}get interactive(){return this._manipulator.interactive}set interactive(t){this._manipulator.interactive=t}get isCompleted(){return this._createOperationCompleted}get numCommittedVertices(){return this._activePart.vertices.length}get snappingOptions(){return null!=this.snappingManager?this.snappingManager.options:null}get cursorVertex(){return this._get("cursorVertex")}get visualizationCursorVertex(){return"mouse"===this._stagedPointerType?this.cursorVertex:null}get committableVertex(){const{cursorVertex:t,lastVertex:e,firstVertex:i,geometryType:n}=this;return"polygon"===n&&y(t,i)||y(t,e)?null:t}get updating(){return this._updatingHandles.updating}get geometryIncludingUncommittedVertices(){const{committedVertices:t,committableVertex:e,coordinateHelper:i}=this,n=t.slice();return null!=e&&n.push(i.pointToArray(e)),n}cancel(){this.complete({aborted:!0})}commitStagedVertex(){this._snappingOperation.abort();const{committableVertex:t}=this;null!=t&&this._editGeometryOperations.appendVertex(this.coordinateHelper.pointToVector(t),this._activePart)}complete(t){const e=t?.aborted||!1;this._snappingOperation.abort(),this.snappingManager?.doneSnapping();const{geometryType:i,numCommittedVertices:n}=this,r="multipoint"===i&&0===n||"polyline"===i&&n<2||"polygon"===i&&n<3;"segment"!==i&&"point"!==i||this.commitStagedVertex(),this._createOperationCompleted=!r,(this.isCompleted||e)&&(this._stagedScreenPoint=null,this._stagedPointerId=null,this._stagedPointerType=null,this._processCursor(null),this.emit("complete",{vertices:this.committedVertices.map((t,e)=>({componentIndex:0,vertexIndex:e,coordinates:t})),aborted:e,type:"complete"}))}onInputEvent(t){switch(t.type){case"pointer-down":this._pointerDownStates.add(t.pointerId);break;case"pointer-up":this._pointerDownStates.delete(t.pointerId)}switch(t.type){case"pointer-move":return this._onPointerMove(t);case"hold":return this._onHold(t)}}redo(){this._editGeometryOperations.redo()}undo(){null!=this.snappingManager&&this.snappingManager.doneSnapping(),this._editGeometryOperations.undo()}_processCursor(t){const e=i(this.cursorVertex),n=i(t),r=n&&(this._updateAndGetEffectiveDrawSurface()?.constrainZ(n)??n),s=this._snapToClosingVertex(r),o=this._applyConstraints(s);y(e,o)||(this._set("cursorVertex",o),this.segmentLabels?.set("stagedVertex",null!=o?this.coordinateHelper.pointToVector(o):null),null==o||"mouse"!==this._stagedPointerType?this.emit("cursor-remove"):this.emit("cursor-update",{updated:null,vertices:[{componentIndex:0,vertexIndex:this._activePart.vertices.length,coordinates:this.coordinateHelper.pointToArray(o)}],operation:"apply",type:"vertex-update"}))}_snapToClosingVertex(t){if(null==t||this._isDragging||"polygon"!==this.geometryType||this.numCommittedVertices<=2)return t;const e=this._mapToScreen(t);if(!e)return t;const i=this._activePart;return this._vertexWithinPointerDistance(i.vertices[0].pos,e)?this.firstVertex:this._vertexWithinPointerDistance(i.vertices.at(-1).pos,e)?this.lastVertex:t}_createManipulatorDragPipeline(t){switch(this.drawingMode){case"click":return this._createManipulatorDragPipelineClick(t);case"freehand":return this._createManipulatorDragPipelineFreehand(t);case"hybrid":return this._createManipulatorDragPipelineHybrid(t)}}_createManipulatorDragPipelineClick(t){return P(t,(t,e,i,n)=>{const r="touch"===n&&this._snappingEnabled;if(this.isCompleted||!r)return;const{snappingStep:s,cancelSnapping:o}=H({predicate:()=>r,snappingManager:this.snappingManager,snappingContext:new I({editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,feature:this.graphic,pointer:n,visualizer:this.snappingVisualizer,drawConstraints:this.constraints}),updatingHandles:this._updatingHandles,useZ:!this._requiresScenePoint});i=i.next(t=>(r&&null!=this.snappingManager&&this.snappingManager.doneSnapping(),t)).next(o),e.next(this._screenToMapDragEventStep()).next(t=>("start"===t.action&&(this._processCursor(t.mapStart),("segment"===this.geometryType||r&&!this.numCommittedVertices)&&this.commitStagedVertex()),t)).next(b(this.view,this.elevationInfo)).next(...s).next(t=>(r&&(this._processCursor(t.mapEnd),"end"===t.action&&this.commitStagedVertex()),t)).next(t=>("end"===t.action&&("mouse"!==this._stagedPointerType&&this._snappingOperation.abort(),"segment"!==this.geometryType&&"point"!==this.geometryType||this.complete()),t))})}_createManipulatorDragPipelineFreehand(t){return P(t,(t,e)=>{this.isCompleted||e.next(this._screenToMapDragEventStep()).next(t=>("start"===t.action&&(this._snappingOperation.abort(),null==this.committableVertex&&this._processCursor(t.mapStart),"segment"===this.geometryType&&this.commitStagedVertex()),t)).next(t=>{switch(t.action){case"start":case"update":this._processCursor(t.mapEnd),"polygon"!==this.geometryType&&"polyline"!==this.geometryType||this.commitStagedVertex();break;case"end":this.complete()}return t})})}_createManipulatorDragPipelineHybrid(t){return P(t,(t,e)=>{this.isCompleted||e.next(this._screenToMapDragEventStep()).next(t=>("start"===t.action&&(this._snappingOperation.abort(),this.addHandles(this._editGeometryOperations.createUndoGroup(),U),this._processCursor(t.mapStart),this.commitStagedVertex()),t)).next(t=>{switch(t.action){case"start":case"update":this._processCursor(t.mapEnd),"polygon"!==this.geometryType&&"polyline"!==this.geometryType||this.commitStagedVertex();break;case"end":"mouse"!==this._stagedPointerType&&this._snappingOperation.abort(),this.removeHandles(U),"segment"!==this.geometryType&&"point"!==this.geometryType||this.complete()}return t})})}get _drawAtFixedElevation(){const{constraintsEnabled:t,constraintZ:e,geometryType:i,numCommittedVertices:n}=this;return t?null!=e||"segment"===i&&n>0:("segment"===i||"polygon"===i)&&n>0}_updateAndGetEffectiveDrawSurface(){const{constraintsEnabled:t,coordinateHelper:e,drawSurface:i,elevationDrawSurface:n,snapToSceneEnabled:r}=this;if(null==n)return i;if(!this.hasZ)return n.defaultZ=null,n;const s=this.elevationInfo?.mode;let o=this.defaultZ,a=t||"absolute-height"===s;if(null!=r&&(a=r),"on-the-ground"===s&&(a=!1),this._drawAtFixedElevation){o=(t?this.constraintZ:null)??e.getZ(this._activePart.vertices[0].pos),a=!1}return a?i:(n.defaultZ=o,n)}_mapToScreen(t){return this._updateAndGetEffectiveDrawSurface()?.mapToScreen(t)}_onHold(t){this._snappingOperation.abort(),"click"===this.drawingMode&&"touch"===t.pointerType&&this._snappingEnabled&&this._processCursor(t.mapPoint),t.stopPropagation()}_onImmediateClick(t){if(!("mouse"===t.pointerType&&2===t.button||this._manipulator.dragging))try{const{drawingMode:e,geometryType:i}=this;this._stagedPointerType=t.pointerType,this._stagedScreenPoint=t.screenPoint;const n=this._screenToMap(t.screenPoint);if(null==n)return;if(null==n||"freehand"===e&&"point"!==i&&"multipoint"!==i)return;if(this._snappingEnabled&&null!=this.cursorVertex||this._processCursor(n),null==this.committableVertex)return void this.complete();this.commitStagedVertex(),"mouse"!==t.pointerType&&this._processCursor(null),("freehand"===e&&"multipoint"!==this.geometryType||"point"===i||"segment"===i&&2===this.numCommittedVertices||"segment"===i&&"hybrid"===e&&1===this.numCommittedVertices)&&this.complete()}finally{t.stopPropagation()}}_onImmediateDoubleClick(t){this._manipulator.dragging||"point"===this.geometryType||(this.complete(),t.stopPropagation())}_onPointerMove(t){const e=l(t.x,t.y);this._updatePointer(e,t.pointerId,t.pointerType)&&t.stopPropagation()}_updatePointer(t,e,i){return this._stagedScreenPoint=t,this._stagedPointerType=i,this._stagedPointerId=e,this._isDragging?(this._snappingOperation.abort(),!1):(this._processCursorMovementRelativeToSurface(t,i),!0)}_onKeyboardBasedChange(){"mouse"===this._stagedPointerType&&this._stagedScreenPoint&&null!=this._stagedPointerId&&!this._isDragging?this._processCursorMovementRelativeToSurface(this._stagedScreenPoint,this._stagedPointerType):this._snappingOperation.abort()}_processCursorMovementRelativeToSurface(t,e){const i=this._snappingOperation,n=this._screenToMap(t),r=this._requiresScenePoint?this.drawSurface?.screenToMap(t):null;if(null==n)return this._hideDefaultCursor=!0,this._processCursor(null),void i.abort();this._hideDefaultCursor=!1;const s=this.snappingManager;if(null==s)return this._processCursor(n),void i.abort();const a=this._getSnappingContext(e);this._updatingHandles.addPromise(o(i.snap({point:n,scenePoint:r},s,a)))}_applyConstraints(t){const{_constraint:e,constraints:i}=this;if(!t||!i||!e)return t;const{context:n}=i,r=w(t,n),s=r?e.closestTo(r):void 0;if(!s)return t;const o=O(s,t,n),a="2d"===this.view.type||"absolute-height"!==n.elevationInfo.mode;return null!=o&&a&&null!=this.constraintZ&&this.hasZ&&(o.z=this.constraintZ),o}_screenToMap(t){return t?this._updateAndGetEffectiveDrawSurface()?.screenToMap(t):null}_screenToMapDragEventStep(){let t=null;return e=>{if("start"===e.action&&(t=this._screenToMap(e.screenStart)),null==t)return null;const i=this._screenToMap(e.screenEnd);return null!=i?{...e,mapStart:t,mapEnd:i}:null}}_vertexWithinPointerDistance(t,e){const i=25,n=this._mapToScreen(this.coordinateHelper.vectorToDehydratedPoint(t));return null!=n&&z(n,e,i)}_getSnappingContext(t){const e=this._drawAtFixedElevation?this.elevationDrawSurface?.defaultZ:null;return new I({editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,pointer:t,feature:this.graphic,visualizer:this.snappingVisualizer,selfSnappingZ:null!=e?{value:e,elevationInfo:this.elevationInfo}:null,drawConstraints:this.constraints})}};function z(t,e,i){const n=t.x-e.x,r=t.y-e.y;return n*n+r*r<=i}t([d()],A.prototype,"_hideDefaultCursor",void 0),t([d()],A.prototype,"_stagedPointerId",void 0),t([d()],A.prototype,"_isDragging",null),t([d()],A.prototype,"_snappingOperation",void 0),t([d()],A.prototype,"_snappingEnabled",null),t([d({constructOnly:!0})],A.prototype,"graphic",void 0),t([d()],A.prototype,"constraintsEnabled",void 0),t([d()],A.prototype,"constraints",void 0),t([d()],A.prototype,"_constraint",null),t([d()],A.prototype,"constraintZ",void 0),t([d()],A.prototype,"defaultZ",void 0),t([d()],A.prototype,"isDraped",void 0),t([d({constructOnly:!0})],A.prototype,"automaticLengthMeasurementUtils",void 0),t([d({value:v})],A.prototype,"drawingMode",null),t([d({constructOnly:!0})],A.prototype,"elevationDrawSurface",void 0),t([d({constructOnly:!0})],A.prototype,"elevationInfo",void 0),t([d({constructOnly:!0,type:E})],A.prototype,"labelOptions",void 0),t([d({constructOnly:!0})],A.prototype,"geometryType",void 0),t([d({constructOnly:!0})],A.prototype,"hasM",void 0),t([d({constructOnly:!0})],A.prototype,"hasZ",void 0),t([d()],A.prototype,"cursor",void 0),t([d()],A.prototype,"effectiveCursor",null),t([d()],A.prototype,"loading",void 0),t([d({constructOnly:!0})],A.prototype,"manipulators",void 0),t([d({constructOnly:!0})],A.prototype,"drawSurface",void 0),t([d({constructOnly:!0})],A.prototype,"segmentLabels",void 0),t([d({constructOnly:!0})],A.prototype,"snappingManager",void 0),t([d({constructOnly:!0})],A.prototype,"snappingVisualizer",void 0),t([d()],A.prototype,"snapToSceneEnabled",void 0),t([d({readOnly:!0})],A.prototype,"cursorVertex",null),t([d({readOnly:!0})],A.prototype,"visualizationCursorVertex",null),t([d()],A.prototype,"committableVertex",null),t([d()],A.prototype,"firstVertex",void 0),t([d()],A.prototype,"lastVertex",void 0),t([d()],A.prototype,"secondToLastVertex",void 0),t([d()],A.prototype,"updating",null),t([d({constructOnly:!0})],A.prototype,"view",void 0),A=t([h("esri.views.draw.DrawOperation")],A);export{A as DrawOperation,k as defaultCursor,Z as defaultLoadingCursor};
5
+ import{__decorate as t}from"tslib";import{EventedAccessor as e}from"../../core/Evented.js";import{clone as i}from"../../core/lang.js";import{equalsMaybe as n,destroyMaybe as r}from"../../core/maybe.js";import{memoize as s}from"../../core/memoize.js";import{ignoreAbortErrors as o}from"../../core/promiseUtils.js";import a from"../../core/ReactiveSet.js";import{watch as p,syncAndInitial as c}from"../../core/reactiveUtils.js";import{createScreenPoint as l}from"../../core/screenUtils.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";import{diff as u}from"../../core/accessorSupport/diffUtils.js";import{UpdatingHandles as g}from"../../core/support/UpdatingHandles.js";import{pointEquals as m,pointNear as y}from"../../layers/graphics/dehydratedFeatureComparison.js";import{getEffectiveElevationInfo as _}from"../../support/elevationInfoUtils.js";import{defaultDrawingMode as v}from"./DrawingMode.js";import{LegacyDrawManipulator as f}from"./LegacyDrawManipulator.js";import{createCoordinateHelper as x}from"../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as P,sceneSnappingAtLocation as b}from"../interactive/dragEventPipeline.js";import{EditGeometry as T,Part as S}from"../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as C}from"../interactive/editGeometry/EditGeometryOperations.js";import{isPoint as V}from"../interactive/sketch/constraints.js";import{getPointConstraint as w,getPolylineOrPolygonConstraint as O,pointToConstraintSpace as M,constraintSpaceToPoint as D}from"../interactive/sketch/constraintUtils.js";import E from"../interactive/sketch/SketchLabelOptions.js";import{SnappingContext as I}from"../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as H}from"../interactive/snapping/SnappingDragPipelineStep.js";import{SnappingOperation as j}from"../interactive/snapping/SnappingOperation.js";import{setupSnappingToggleHandles as G}from"../interactive/snapping/snappingUtils.js";const k="crosshair",Z="progress",L=Symbol(),U=Symbol();let A=class extends e{constructor(t){super(t),this._createOperationCompleted=!1,this._hideDefaultCursor=!1,this._pointerDownStates=new a,this._stagedScreenPoint=null,this._stagedPointerType=null,this._updatingHandles=new g,this._stagedPointerId=null,this.constraintsEnabled=!1,this.constraints=void 0,this._getPointConstraint=s(w),this._getPolylineOrPolygonConstraint=s(O),this.constraintZ=null,this.defaultZ=null,this.isDraped=!0,this.labelOptions=new E,this.cursor=null,this.loading=!1,this.snapToSceneEnabled=null,this.firstVertex=null,this.lastVertex=null,this.secondToLastVertex=null,null==t.elevationInfo&&(this.elevationInfo=_(!!t.hasZ))}initializePointer(){const t=this.view.inputManager?.latestPointerInfo;null!=t&&this._updatePointer(t.location,t.id,t.type)}initialize(){const{geometryType:t,view:e}=this,i=e.spatialReference,r="viewingMode"in e.state?e.state.viewingMode:2,s="segment"===t||"multipoint"===t?"polyline":t;this.coordinateHelper=x(this.hasZ,this.hasM,i),this._editGeometryOperations=new C(new T(s,this.coordinateHelper),r),this._snappingOperation=new j({view:e}),this.addHandles([p(()=>({stagedPoint:this._snappingOperation.stagedPoint,constraint:this._constraint}),({stagedPoint:t,constraint:e},i)=>{const{snappingOptions:n}=this;n&&(n.forceDisabled=null!=e&&V(e));if(null!=i&&t===i.stagedPoint&&e!==i.constraint)return this._onKeyboardBasedChange();this._processCursor(t??this._screenToMap(this._stagedScreenPoint))},{equals:(t,e)=>t.stagedPoint===e.stagedPoint&&n(t.constraint,e.constraint)}),p(()=>this.view.viewpoint,(t,e)=>{t&&e&&u(t,e)&&this._onKeyboardBasedChange()})]),this._activePart=new S(i,r),this._editGeometryOperations.data.parts.push(this._activePart);const a=this.segmentLabels;null!=a&&(a.context={view:e,editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,labelOptions:this.labelOptions,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils},this.addHandles(p(()=>this.labelOptions.enabled,t=>{a.visible=t},c))),this.addHandles(this._editGeometryOperations.on(["vertex-add","vertex-update","vertex-remove"],t=>{const e=t.vertices.map(t=>({componentIndex:0,vertexIndex:t.index,coordinates:this.coordinateHelper.vectorToArray(t.pos)})),i=e.map(t=>t.coordinates),n=this.coordinateHelper.vectorToDehydratedPoint(this._activePart.getFirstVertex()?.pos)??null;m(n,this.firstVertex)||(this.firstVertex=n);const r=this.coordinateHelper.vectorToDehydratedPoint(this._activePart.getLastVertex()?.pos)??null;m(r,this.lastVertex)||(this.lastVertex=r);const s=this.coordinateHelper.vectorToDehydratedPoint(this._activePart.segments.at(-1)?.leftVertex?.pos)??null;switch(m(s,this.secondToLastVertex)||(this.secondToLastVertex=s),this._processCursor(this.cursorVertex),t.type){case"vertex-add":this.emit(t.type,{...t,added:i,vertices:e});break;case"vertex-update":this.emit(t.type,{...t,updated:i,vertices:e});break;case"vertex-remove":this.emit(t.type,{...t,removed:i,vertices:e})}}));const l=this._manipulator=new f({consumesClicks:!1,grabbableForEvent:t=>"click"!==this.drawingMode||"touch"===t.pointerType&&this._snappingEnabled&&1===this._pointerDownStates.size});this.manipulators.add(l),l.grabbable="point"!==t&&"multipoint"!==t,this.addHandles([l.events.on("immediate-click",t=>this._onImmediateClick(t)),l.events.on("immediate-double-click",t=>this._onImmediateDoubleClick(t)),p(()=>this.drawingMode,()=>{this.removeHandles(L),this.addHandles(this._createManipulatorDragPipeline(l),L)},c),p(()=>({effectiveCursor:this.effectiveCursor}),({effectiveCursor:t})=>{l.cursor=t},c)]),G(this,()=>{const t=this.view.inputManager.latestPointerInfo?.type??"mouse",e=this._getSnappingContext(t);if(null!=this.snappingManager){const t=this._snappingOperation.snapAgainNearPreviousMapPoint(this.snappingManager,e);this._updatingHandles.addPromise(o(t))}})}destroy(){r(this.segmentLabels),r(this._snappingOperation),this._editGeometryOperations=r(this._editGeometryOperations),this._updatingHandles.destroy()}get _isDragging(){const{_stagedPointerId:t,_manipulator:e}=this;return null!=t&&this._pointerDownStates.has(t)||e.grabbing||!e.interactive}get _snappingEnabled(){return null!=this.snappingManager&&this.snappingManager.options.effectiveEnabled}get _requiresScenePoint(){const t=this._updateAndGetEffectiveDrawSurface();return"3d"===this.view.type&&this.drawSurface!==t}get canRedo(){return this._editGeometryOperations.canRedo}get canUndo(){return this._editGeometryOperations.canUndo}get committedVertices(){return this._activePart.vertices.map(t=>this.coordinateHelper.vectorToArray(t.pos))}get _constraint(){const{constraints:t,constraintsEnabled:e}=this;if(t&&e)switch(this.geometryType){case"point":case"multipoint":return this._getPointConstraint(t);case"polygon":case"polyline":return this._getPolylineOrPolygonConstraint(this.lastVertex,this.secondToLastVertex,t)}}set drawingMode(t){this._set("drawingMode",t??v)}get effectiveCursor(){return this.loading?Z:this._hideDefaultCursor?null:this.cursor||k}get interactive(){return this._manipulator.interactive}set interactive(t){this._manipulator.interactive=t}get isCompleted(){return this._createOperationCompleted}get numCommittedVertices(){return this._activePart.vertices.length}get snappingOptions(){return null!=this.snappingManager?this.snappingManager.options:null}get cursorVertex(){return this._get("cursorVertex")}get visualizationCursorVertex(){return"mouse"===this._stagedPointerType?this.cursorVertex:null}get committableVertex(){const{cursorVertex:t,lastVertex:e,firstVertex:i,geometryType:n}=this;return"polygon"===n&&y(t,i)||y(t,e)?null:t}get updating(){return this._updatingHandles.updating}get geometryIncludingUncommittedVertices(){const{committedVertices:t,committableVertex:e,coordinateHelper:i}=this,n=t.slice();return null!=e&&n.push(i.pointToArray(e)),n}cancel(){this.complete({aborted:!0})}commitStagedVertex(){this._snappingOperation.abort();const{committableVertex:t}=this;null!=t&&this._editGeometryOperations.appendVertex(this.coordinateHelper.pointToVector(t),this._activePart)}complete(t){const e=t?.aborted||!1;this._snappingOperation.abort(),this.snappingManager?.doneSnapping();const{geometryType:i,numCommittedVertices:n}=this,r="multipoint"===i&&0===n||"polyline"===i&&n<2||"polygon"===i&&n<3;"segment"!==i&&"point"!==i||this.commitStagedVertex(),this._createOperationCompleted=!r,(this.isCompleted||e)&&(this._stagedScreenPoint=null,this._stagedPointerId=null,this._stagedPointerType=null,this._processCursor(null),this.emit("complete",{vertices:this.committedVertices.map((t,e)=>({componentIndex:0,vertexIndex:e,coordinates:t})),aborted:e,type:"complete"}))}onInputEvent(t){switch(t.type){case"pointer-down":this._pointerDownStates.add(t.pointerId);break;case"pointer-up":this._pointerDownStates.delete(t.pointerId)}switch(t.type){case"pointer-move":return this._onPointerMove(t);case"hold":return this._onHold(t)}}redo(){this._editGeometryOperations.redo()}undo(){null!=this.snappingManager&&this.snappingManager.doneSnapping(),this._editGeometryOperations.undo()}_processCursor(t){const e=i(this.cursorVertex),n=i(t),r=n&&(this._updateAndGetEffectiveDrawSurface()?.constrainZ(n)??n),s=this._snapToClosingVertex(r),o=this._applyConstraints(s);y(e,o)||(this._set("cursorVertex",o),this.segmentLabels?.set("stagedVertex",null!=o?this.coordinateHelper.pointToVector(o):null),null==o||"mouse"!==this._stagedPointerType?this.emit("cursor-remove"):this.emit("cursor-update",{updated:null,vertices:[{componentIndex:0,vertexIndex:this._activePart.vertices.length,coordinates:this.coordinateHelper.pointToArray(o)}],operation:"apply",type:"vertex-update"}))}_snapToClosingVertex(t){if(null==t||this._isDragging||"polygon"!==this.geometryType||this.numCommittedVertices<=2)return t;const e=this._mapToScreen(t);if(!e)return t;const i=this._activePart;return this._vertexWithinPointerDistance(i.vertices[0].pos,e)?this.firstVertex:this._vertexWithinPointerDistance(i.vertices.at(-1).pos,e)?this.lastVertex:t}_createManipulatorDragPipeline(t){switch(this.drawingMode){case"click":return this._createManipulatorDragPipelineClick(t);case"freehand":return this._createManipulatorDragPipelineFreehand(t);case"hybrid":return this._createManipulatorDragPipelineHybrid(t)}}_createManipulatorDragPipelineClick(t){return P(t,(t,e,i,n)=>{const r="touch"===n&&this._snappingEnabled;if(this.isCompleted||!r)return;const{snappingStep:s,cancelSnapping:o}=H({predicate:()=>r,snappingManager:this.snappingManager,snappingContext:new I({editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,feature:this.graphic,pointer:n,visualizer:this.snappingVisualizer,drawConstraints:this.constraints}),updatingHandles:this._updatingHandles,useZ:!this._requiresScenePoint});i=i.next(t=>(r&&null!=this.snappingManager&&this.snappingManager.doneSnapping(),t)).next(o),e.next(this._screenToMapDragEventStep()).next(t=>("start"===t.action&&(this._processCursor(t.mapStart),("segment"===this.geometryType||r&&!this.numCommittedVertices)&&this.commitStagedVertex()),t)).next(b(this.view,this.elevationInfo)).next(...s).next(t=>(r&&(this._processCursor(t.mapEnd),"end"===t.action&&this.commitStagedVertex()),t)).next(t=>("end"===t.action&&("mouse"!==this._stagedPointerType&&this._snappingOperation.abort(),"segment"!==this.geometryType&&"point"!==this.geometryType||this.complete()),t))})}_createManipulatorDragPipelineFreehand(t){return P(t,(t,e)=>{this.isCompleted||e.next(this._screenToMapDragEventStep()).next(t=>("start"===t.action&&(this._snappingOperation.abort(),null==this.committableVertex&&this._processCursor(t.mapStart),"segment"===this.geometryType&&this.commitStagedVertex()),t)).next(t=>{switch(t.action){case"start":case"update":this._processCursor(t.mapEnd),"polygon"!==this.geometryType&&"polyline"!==this.geometryType||this.commitStagedVertex();break;case"end":this.complete()}return t})})}_createManipulatorDragPipelineHybrid(t){return P(t,(t,e)=>{this.isCompleted||e.next(this._screenToMapDragEventStep()).next(t=>("start"===t.action&&(this._snappingOperation.abort(),this.addHandles(this._editGeometryOperations.createUndoGroup(),U),this._processCursor(t.mapStart),this.commitStagedVertex()),t)).next(t=>{switch(t.action){case"start":case"update":this._processCursor(t.mapEnd),"polygon"!==this.geometryType&&"polyline"!==this.geometryType||this.commitStagedVertex();break;case"end":"mouse"!==this._stagedPointerType&&this._snappingOperation.abort(),this.removeHandles(U),"segment"!==this.geometryType&&"point"!==this.geometryType||this.complete()}return t})})}get _drawAtFixedElevation(){const{constraintsEnabled:t,constraintZ:e,geometryType:i,numCommittedVertices:n}=this;return t?null!=e||"segment"===i&&n>0:("segment"===i||"polygon"===i)&&n>0}_updateAndGetEffectiveDrawSurface(){const{constraintsEnabled:t,coordinateHelper:e,drawSurface:i,elevationDrawSurface:n,snapToSceneEnabled:r}=this;if(null==n)return i;if(!this.hasZ)return n.defaultZ=null,n;const s=this.elevationInfo?.mode;let o=this.defaultZ,a=t||"absolute-height"===s;if(null!=r&&(a=r),"on-the-ground"===s&&(a=!1),this._drawAtFixedElevation){o=(t?this.constraintZ:null)??e.getZ(this._activePart.vertices[0].pos),a=!1}return a?i:(n.defaultZ=o,n)}_mapToScreen(t){return this._updateAndGetEffectiveDrawSurface()?.mapToScreen(t)}_onHold(t){this._snappingOperation.abort(),"click"===this.drawingMode&&"touch"===t.pointerType&&this._snappingEnabled&&this._processCursor(t.mapPoint),t.stopPropagation()}_onImmediateClick(t){if(!("mouse"===t.pointerType&&2===t.button||this._manipulator.dragging))try{const{drawingMode:e,geometryType:i}=this;this._stagedPointerType=t.pointerType,this._stagedScreenPoint=t.screenPoint;const n=this._screenToMap(t.screenPoint);if(null==n)return;if(null==n||"freehand"===e&&"point"!==i&&"multipoint"!==i)return;if(this._snappingEnabled&&null!=this.cursorVertex||this._processCursor(n),null==this.committableVertex)return void this.complete();this.commitStagedVertex(),"mouse"!==t.pointerType&&this._processCursor(null),("freehand"===e&&"multipoint"!==this.geometryType||"point"===i||"segment"===i&&2===this.numCommittedVertices||"segment"===i&&"hybrid"===e&&1===this.numCommittedVertices)&&this.complete()}finally{t.stopPropagation()}}_onImmediateDoubleClick(t){this._manipulator.dragging||"point"===this.geometryType||(this.complete(),t.stopPropagation())}_onPointerMove(t){const e=l(t.x,t.y);this._updatePointer(e,t.pointerId,t.pointerType)&&t.stopPropagation()}_updatePointer(t,e,i){return this._stagedScreenPoint=t,this._stagedPointerType=i,this._stagedPointerId=e,this._isDragging?(this._snappingOperation.abort(),!1):(this._processCursorMovementRelativeToSurface(t,i),!0)}_onKeyboardBasedChange(){"mouse"===this._stagedPointerType&&this._stagedScreenPoint&&null!=this._stagedPointerId&&!this._isDragging?this._processCursorMovementRelativeToSurface(this._stagedScreenPoint,this._stagedPointerType):this._snappingOperation.abort()}_processCursorMovementRelativeToSurface(t,e){const i=this._snappingOperation,n=this._screenToMap(t),r=this._requiresScenePoint?this.drawSurface?.screenToMap(t):null;if(null==n)return this._hideDefaultCursor=!0,this._processCursor(null),void i.abort();this._hideDefaultCursor=!1;const s=this.snappingManager;if(null==s)return this._processCursor(n),void i.abort();const a=this._getSnappingContext(e);this._updatingHandles.addPromise(o(i.snap({point:n,scenePoint:r},s,a)))}_applyConstraints(t){const{_constraint:e,constraints:i}=this;if(!t||!i||!e)return t;const{context:n}=i,r=M(t,n),s=r?e.closestTo(r):void 0;if(!s)return t;const o=D(s,t,n),a="2d"===this.view.type||"absolute-height"!==n.elevationInfo.mode;return null!=o&&a&&null!=this.constraintZ&&this.hasZ&&(o.z=this.constraintZ),o}_screenToMap(t){return t?this._updateAndGetEffectiveDrawSurface()?.screenToMap(t):null}_screenToMapDragEventStep(){let t=null;return e=>{if("start"===e.action&&(t=this._screenToMap(e.screenStart)),null==t)return null;const i=this._screenToMap(e.screenEnd);return null!=i?{...e,mapStart:t,mapEnd:i}:null}}_vertexWithinPointerDistance(t,e){const i=25,n=this._mapToScreen(this.coordinateHelper.vectorToDehydratedPoint(t));return null!=n&&z(n,e,i)}_getSnappingContext(t){const e=this._drawAtFixedElevation?this.elevationDrawSurface?.defaultZ:null;return new I({editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,pointer:t,feature:this.graphic,visualizer:this.snappingVisualizer,selfSnappingZ:null!=e?{value:e,elevationInfo:this.elevationInfo}:null,drawConstraints:this.constraints})}};function z(t,e,i){const n=t.x-e.x,r=t.y-e.y;return n*n+r*r<=i}t([d()],A.prototype,"_hideDefaultCursor",void 0),t([d()],A.prototype,"_stagedPointerId",void 0),t([d()],A.prototype,"_isDragging",null),t([d()],A.prototype,"_snappingOperation",void 0),t([d()],A.prototype,"_snappingEnabled",null),t([d({constructOnly:!0})],A.prototype,"graphic",void 0),t([d()],A.prototype,"constraintsEnabled",void 0),t([d()],A.prototype,"constraints",void 0),t([d()],A.prototype,"_constraint",null),t([d()],A.prototype,"constraintZ",void 0),t([d()],A.prototype,"defaultZ",void 0),t([d()],A.prototype,"isDraped",void 0),t([d({constructOnly:!0})],A.prototype,"automaticLengthMeasurementUtils",void 0),t([d({value:v})],A.prototype,"drawingMode",null),t([d({constructOnly:!0})],A.prototype,"elevationDrawSurface",void 0),t([d({constructOnly:!0})],A.prototype,"elevationInfo",void 0),t([d({constructOnly:!0,type:E})],A.prototype,"labelOptions",void 0),t([d({constructOnly:!0})],A.prototype,"geometryType",void 0),t([d({constructOnly:!0})],A.prototype,"hasM",void 0),t([d({constructOnly:!0})],A.prototype,"hasZ",void 0),t([d()],A.prototype,"cursor",void 0),t([d()],A.prototype,"effectiveCursor",null),t([d()],A.prototype,"loading",void 0),t([d({constructOnly:!0})],A.prototype,"manipulators",void 0),t([d({constructOnly:!0})],A.prototype,"drawSurface",void 0),t([d({constructOnly:!0})],A.prototype,"segmentLabels",void 0),t([d({constructOnly:!0})],A.prototype,"snappingManager",void 0),t([d({constructOnly:!0})],A.prototype,"snappingVisualizer",void 0),t([d()],A.prototype,"snapToSceneEnabled",void 0),t([d({readOnly:!0})],A.prototype,"cursorVertex",null),t([d({readOnly:!0})],A.prototype,"visualizationCursorVertex",null),t([d()],A.prototype,"committableVertex",null),t([d()],A.prototype,"firstVertex",void 0),t([d()],A.prototype,"lastVertex",void 0),t([d()],A.prototype,"secondToLastVertex",void 0),t([d()],A.prototype,"updating",null),t([d({constructOnly:!0})],A.prototype,"view",void 0),A=t([h("esri.views.draw.DrawOperation")],A);export{A as DrawOperation,k as defaultCursor,Z as defaultLoadingCursor};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as i}from"tslib";import{EventedAccessor as t}from"../../../core/Evented.js";import{clone as e}from"../../../core/lang.js";import{watch as s,when as r}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import a from"../../../layers/GraphicsLayer.js";import n from"../../../symbols/SimpleFillSymbol.js";import c from"../../../symbols/SimpleLineSymbol.js";import l from"../../../symbols/SimpleMarkerSymbol.js";import{cloneMove as p}from"./drawUtils.js";import d from"./HighlightHelper.js";import{addUniqueLayer as g,findLayerView as v}from"./layerUtils.js";import{GraphicClickEvent as m,GraphicDoubleClickEvent as _,GraphicPointerDownEvent as y,GraphicPointerUpEvent as f,GraphicPointerOutEvent as u,GraphicPointerOverEvent as w,GraphicMoveStartEvent as G,GraphicMoveEvent as b,GraphicMoveStopEvent as k}from"./input/GraphicMoverEvents.js";import{ViewEventPriorities as O}from"../../input/InputManager.js";import{GraphicManipulator as x}from"../../interactive/GraphicManipulator.js";import{createScreenPointFromEvent as H}from"../../support/screenUtils.js";const M="indicator-symbols";let E=class extends t{constructor(i){super(i),this._activeGraphic=null,this._dragEvent=null,this._hoverGraphic=null,this._indicators=[],this._initialDragGeometry=null,this._manipulators=[],this._layerViews=null,this.type="graphic-mover",this.callbacks={onGraphicClick(){},onGraphicDoubleClick(){},onGraphicMoveStart(){},onGraphicMove(){},onGraphicMoveStop(){},onGraphicPointerOver(){},onGraphicPointerOut(){},onGraphicPointerDown(){},onGraphicPointerUp(){}},this.enableMoveAllGraphics=!1,this.graphics=[],this.highlightName=null,this.highlightsEnabled=!1,this.indicatorsEnabled=!1,this._defaultLayer=new a({listMode:"hide",internal:!0,title:"GraphicMover highlight layer"}),this.layer=this._defaultLayer,this.view=null}initialize(){g(this.view,this.layer),this._highlightHelper=new d({view:this.view}),this.refresh(),this.addHandles([s(()=>this.graphics.length,()=>this.refresh()),r(()=>this.view?.ready,()=>{this.addHandles([this.view.on("immediate-click",i=>this._clickHandler(i),O.TOOL),this.view.on("double-click",i=>this._doubleClickHandler(i),O.TOOL),this.view.on("pointer-down",i=>this._pointerDownHandler(i),O.TOOL),this.view.on("pointer-move",i=>this._pointerMoveHandler(i),O.TOOL),this.view.on("pointer-up",i=>this._pointerUpHandler(i),O.TOOL),this.view.on("drag",i=>this._dragHandler(i),O.TOOL),this.view.on("key-down",i=>this._keyDownHandler(i),O.TOOL)])},{once:!0,initial:!0}),s(()=>this.view,i=>{this._highlightHelper.removeAll(),this._highlightHelper.view=i}),s(()=>[this.highlightsEnabled,this.highlightName],()=>{this._highlightHelper?.removeAll(),this._setUpHighlights()})])}destroy(){this._removeIndicators(),this.view.map?.remove(this.layer),this._defaultLayer.destroy(),this.reset(),this._manipulators.forEach(i=>i.destroy()),this._manipulators=null}get state(){const i=this.view.ready,t=this.graphics.length>0,e=this._activeGraphic;return i&&t?e?"moving":"active":i?"ready":"disabled"}refresh(){this.reset(),this._setup()}reset(){this._activeGraphic=null,this._hoverGraphic=null,this._dragEvent=null,this._highlightHelper.removeAll()}updateGeometry(i,t){const e=this.graphics[i];e&&(e.set("geometry",t),this._setUpIndicators())}_setup(){this._setUpHighlights(),this._setUpIndicators(),this._setUpManipulators(),this._syncLayerViews()}_clickHandler(i){const t=this._findTargetGraphic(H(i));if(t){const e=new m(t,this.graphics.indexOf(t),i.x,i.y,i);this.emit("graphic-click",e),this.callbacks.onGraphicClick?.(e)}}_doubleClickHandler(i){const t=this._findTargetGraphic(H(i));if(t){const e=new _(t,this.graphics.indexOf(t),i.x,i.y,i);this.emit("graphic-double-click",e),this.callbacks.onGraphicDoubleClick?.(e)}}_pointerDownHandler(i){const t=this._findTargetGraphic(H(i));if(t){this._activeGraphic=t;const{x:e,y:s}=i,r=new y(t,this.graphics.indexOf(t),e,s,i);this.emit("graphic-pointer-down",r),this.callbacks.onGraphicPointerDown?.(r)}else this._activeGraphic=null}_pointerUpHandler(i){if(this._activeGraphic){const{x:t,y:e}=i,s=this.graphics.indexOf(this._activeGraphic),r=new f(this._activeGraphic,s,t,e,i);this.emit("graphic-pointer-up",r),this.callbacks.onGraphicPointerUp?.(r),this._hoverGraphic=this._activeGraphic}}_pointerMoveHandler(i){if(this._dragEvent)return;const t=this._findTargetGraphic(H(i));if(t){const{x:e,y:s}=i;if(this._hoverGraphic){if(this._hoverGraphic===t)return;const r=this.graphics.indexOf(this._hoverGraphic),h=new u(this.graphics[r],r,e,s,i);this._hoverGraphic=null,this.emit("graphic-pointer-out",h),this.callbacks.onGraphicPointerOut?.(h)}const r=this.graphics.indexOf(t),h=new w(t,r,e,s,i);return this._hoverGraphic=t,this.emit("graphic-pointer-over",h),void this.callbacks.onGraphicPointerOver?.(h)}if(this._hoverGraphic){const{x:t,y:e}=i,s=this.graphics.indexOf(this._hoverGraphic),r=new u(this.graphics[s],s,t,e,i);this._hoverGraphic=null,this.emit("graphic-pointer-out",r),this.callbacks.onGraphicPointerOut?.(r)}}_dragHandler(i){if("start"!==i.action&&!this._dragEvent||!this._activeGraphic?.geometry)return;"start"===i.action&&this._removeIndicators(),i.stopPropagation();const{action:t,x:s,y:r}=i,h=this.graphics.indexOf(this._activeGraphic),o=this._dragEvent?s-this._dragEvent.x:0,a=this._dragEvent?r-this._dragEvent.y:0,n=s-i.origin.x,c=r-i.origin.y,l="start"===t?this._activeGraphic.geometry:this._initialDragGeometry,d=p(l,n,c,this.view);if(this._activeGraphic.geometry=d,this.enableMoveAllGraphics&&this.graphics.forEach(i=>{i!==this._activeGraphic&&(i.geometry=p(i.geometry,o,a,this.view))}),this._dragEvent=i,"start"===t){this._initialDragGeometry=e(l);const t=new G(this._activeGraphic,this.graphics,h,s,r,o,a,n,c,i);this.emit("graphic-move-start",t),this.callbacks.onGraphicMoveStart?.(t),t.defaultPrevented&&this._activeGraphic.set("geometry",l)}else if("update"===t){const t=new b(this._activeGraphic,this.graphics,h,s,r,o,a,n,c,i);this.emit("graphic-move",t),this.callbacks.onGraphicMove?.(t),t.defaultPrevented&&(this._activeGraphic.geometry=l)}else{const t=new k(this._activeGraphic,this.graphics,h,s,r,o,a,n,c,i);this._dragEvent=null,this._activeGraphic=null,this._setUpIndicators(),this.emit("graphic-move-stop",t),this.callbacks.onGraphicMoveStop?.(t),t.defaultPrevented&&(this.graphics[h].set("geometry",this._initialDragGeometry),this._setUpIndicators()),this._initialDragGeometry=null}}_keyDownHandler(i){"a"!==i.key&&"d"!==i.key&&"n"!==i.key||"moving"!==this.state||i.stopPropagation()}_findTargetGraphic(i){const t=this.view.toMap(i),e=this.graphics;let s=null,r=Number.MAX_VALUE;this._syncLayerViews();const h=this._layerViews.flatMap(i=>"graphicsViews"in i?Array.from(i.graphicsViews(),i=>i.hitTest(t)).flat():i.graphicsView.hitTest(t)).filter(i=>e.includes(i)).sort((i,t)=>e.indexOf(i)-e.indexOf(t));return h.length?h[0]:(this._manipulators.forEach(t=>{const e=t.intersectionDistance(i);null!=e&&e<r&&(r=e,s=t.graphic)}),s)}_syncLayerViews(){this._layerViews=[];const i=new Set;for(const t of this.graphics){const e=v(this.view,t.layer);e&&i.add(e)}this._layerViews=[...i]}_setUpManipulators(){const{graphics:i,view:t}=this;this._manipulators.forEach(i=>i.destroy()),this._manipulators=i.length?i.map(i=>new x({graphic:i,view:t})):[]}_setUpHighlights(){this.highlightsEnabled&&this.graphics.length&&this._highlightHelper.add(this.graphics,this.highlightName)}_setUpIndicators(){if(this._removeIndicators(),this.indicatorsEnabled){for(const i of this.graphics){const t=i.clone();t.symbol=U(i),this._indicators.push(t),this.addHandles(s(()=>i.symbol,()=>this._setUpIndicators()),M)}this.layer.addMany(this._indicators)}}_removeIndicators(){this.removeHandles(M),this._indicators.length&&(this.layer.removeMany(this._indicators),this._indicators.forEach(i=>i.destroy()),this._indicators=[])}};function U(i){const t=12;if(null==i.symbol)return null;switch(i.symbol.type){case"cim":return new l({style:"circle",size:t,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}});case"picture-marker":{const{xoffset:t,yoffset:e,height:s,width:r}=i.symbol,h=s===r?r:Math.max(s,r);return new l({xoffset:t,yoffset:e,size:h,style:"square",color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}case"simple-marker":{const{xoffset:t,yoffset:e,size:s,style:r}=i.symbol;return new l({xoffset:t,yoffset:e,style:"circle"===r?"circle":"square",size:s+2,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}case"simple-fill":return new n({color:[0,0,0,0],outline:{style:"dash",color:[255,127,0,1],width:1}});case"simple-line":return new c({color:[255,127,0,1],style:"dash",width:1});case"text":{const{xoffset:e,yoffset:s}=i.symbol;return new l({xoffset:e,yoffset:s,size:t,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}default:return null}}i([h()],E.prototype,"_activeGraphic",void 0),i([h({readOnly:!0})],E.prototype,"type",void 0),i([h()],E.prototype,"callbacks",void 0),i([h()],E.prototype,"enableMoveAllGraphics",void 0),i([h()],E.prototype,"graphics",void 0),i([h()],E.prototype,"highlightName",void 0),i([h()],E.prototype,"highlightsEnabled",void 0),i([h()],E.prototype,"indicatorsEnabled",void 0),i([h()],E.prototype,"_defaultLayer",void 0),i([h()],E.prototype,"layer",void 0),i([h({readOnly:!0})],E.prototype,"state",null),i([h()],E.prototype,"view",void 0),E=i([o("esri.views.draw.support.GraphicMover")],E);export{E as default};
5
+ import{__decorate as i}from"tslib";import{EventedAccessor as t}from"../../../core/Evented.js";import{clone as e}from"../../../core/lang.js";import{watch as s,when as r}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import a from"../../../layers/GraphicsLayer.js";import n from"../../../symbols/SimpleFillSymbol.js";import c from"../../../symbols/SimpleLineSymbol.js";import l from"../../../symbols/SimpleMarkerSymbol.js";import{cloneMove as p}from"./drawUtils.js";import d from"./HighlightHelper.js";import{addUniqueLayer as g,findLayerView as v}from"./layerUtils.js";import{GraphicClickEvent as m,GraphicDoubleClickEvent as _,GraphicPointerDownEvent as y,GraphicPointerUpEvent as f,GraphicPointerOutEvent as u,GraphicPointerOverEvent as w,GraphicMoveStartEvent as G,GraphicMoveEvent as b,GraphicMoveStopEvent as k}from"./input/GraphicMoverEvents.js";import{ViewEventPriorities as O}from"../../input/InputManager.js";import{GraphicManipulator as x}from"../../interactive/GraphicManipulator.js";import{createScreenPointFromEvent as H}from"../../support/screenUtils.js";const M="indicator-symbols";let E=class extends t{constructor(i){super(i),this._activeGraphic=null,this._dragEvent=null,this._hoverGraphic=null,this._indicators=[],this._initialDragGeometry=null,this._manipulators=[],this._layerViews=null,this.type="graphic-mover",this.callbacks={onGraphicClick(){},onGraphicDoubleClick(){},onGraphicMoveStart(){},onGraphicMove(){},onGraphicMoveStop(){},onGraphicPointerOver(){},onGraphicPointerOut(){},onGraphicPointerDown(){},onGraphicPointerUp(){}},this.enableMoveAllGraphics=!1,this.graphics=[],this.highlightName=null,this.highlightsEnabled=!1,this.indicatorsEnabled=!1,this._defaultLayer=new a({listMode:"hide",internal:!0,title:"GraphicMover highlight layer"}),this.layer=this._defaultLayer,this.view=null}initialize(){g(this.view,this.layer),this._highlightHelper=new d({view:this.view}),this.refresh(),this.addHandles([s(()=>this.graphics.length,()=>this.refresh()),r(()=>this.view?.ready,()=>{this.addHandles([this.view.on("immediate-click",i=>this._clickHandler(i),O.TOOL),this.view.on("double-click",i=>this._doubleClickHandler(i),O.TOOL),this.view.on("pointer-down",i=>this._pointerDownHandler(i),O.TOOL),this.view.on("pointer-move",i=>this._pointerMoveHandler(i),O.TOOL),this.view.on("pointer-up",i=>this._pointerUpHandler(i),O.TOOL),this.view.on("drag",i=>this._dragHandler(i),O.TOOL),this.view.on("key-down",i=>this._keyDownHandler(i),O.TOOL)])},{once:!0,initial:!0}),s(()=>this.view,i=>{this._highlightHelper.removeAll(),this._highlightHelper.view=i}),s(()=>[this.highlightsEnabled,this.highlightName],()=>{this._highlightHelper?.removeAll(),this._setUpHighlights()})])}destroy(){this._removeIndicators(),this.view.map?.remove(this.layer),this._defaultLayer.destroy(),this.reset(),this._manipulators.forEach(i=>i.destroy()),this._manipulators=null}get state(){const i=this.view.ready,t=this.graphics.length>0,e=this._activeGraphic;return i&&t?e?"moving":"active":i?"ready":"disabled"}refresh(){this.reset(),this._setup()}reset(){this._activeGraphic=null,this._hoverGraphic=null,this._dragEvent=null,this._highlightHelper.removeAll()}updateGeometry(i,t){const e=this.graphics[i];e&&(e.set("geometry",t),this._setUpIndicators())}_setup(){this._setUpHighlights(),this._setUpIndicators(),this._setUpManipulators(),this._syncLayerViews()}_clickHandler(i){const t=this._findTargetGraphic(H(i));if(t){const e=new m(t,this.graphics.indexOf(t),i.x,i.y,i);this.emit("graphic-click",e),this.callbacks.onGraphicClick?.(e)}}_doubleClickHandler(i){const t=this._findTargetGraphic(H(i));if(t){const e=new _(t,this.graphics.indexOf(t),i.x,i.y,i);this.emit("graphic-double-click",e),this.callbacks.onGraphicDoubleClick?.(e)}}_pointerDownHandler(i){const t=this._findTargetGraphic(H(i));if(t){this._activeGraphic=t;const{x:e,y:s}=i,r=new y(t,this.graphics.indexOf(t),e,s,i);this.emit("graphic-pointer-down",r),this.callbacks.onGraphicPointerDown?.(r)}else this._activeGraphic=null}_pointerUpHandler(i){if(this._activeGraphic){const{x:t,y:e}=i,s=this.graphics.indexOf(this._activeGraphic),r=new f(this._activeGraphic,s,t,e,i);this.emit("graphic-pointer-up",r),this.callbacks.onGraphicPointerUp?.(r),this._hoverGraphic=this._activeGraphic}}_pointerMoveHandler(i){if(this._dragEvent)return;const t=this._findTargetGraphic(H(i));if(t){const{x:e,y:s}=i;if(this._hoverGraphic){if(this._hoverGraphic===t)return;const r=this.graphics.indexOf(this._hoverGraphic),h=new u(this.graphics[r],r,e,s,i);this._hoverGraphic=null,this.emit("graphic-pointer-out",h),this.callbacks.onGraphicPointerOut?.(h)}const r=this.graphics.indexOf(t),h=new w(t,r,e,s,i);return this._hoverGraphic=t,this.emit("graphic-pointer-over",h),void this.callbacks.onGraphicPointerOver?.(h)}if(this._hoverGraphic){const{x:t,y:e}=i,s=this.graphics.indexOf(this._hoverGraphic),r=new u(this.graphics[s],s,t,e,i);this._hoverGraphic=null,this.emit("graphic-pointer-out",r),this.callbacks.onGraphicPointerOut?.(r)}}_dragHandler(i){if("start"!==i.action&&!this._dragEvent||!this._activeGraphic?.geometry)return;"start"===i.action&&this._removeIndicators(),i.stopPropagation();const{action:t,x:s,y:r}=i,h=this.graphics.indexOf(this._activeGraphic),o=this._dragEvent?s-this._dragEvent.x:0,a=this._dragEvent?r-this._dragEvent.y:0,n=s-i.origin.x,c=r-i.origin.y,l="start"===t?this._activeGraphic.geometry:this._initialDragGeometry,d=p(l,n,c,this.view);if(this._activeGraphic.geometry=d,this.enableMoveAllGraphics&&this.graphics.forEach(i=>{i!==this._activeGraphic&&(i.geometry=p(i.geometry,o,a,this.view))}),this._dragEvent=i,"start"===t){this._initialDragGeometry=e(l);const t=new G(this._activeGraphic,this.graphics,h,s,r,o,a,n,c,i);this.emit("graphic-move-start",t),this.callbacks.onGraphicMoveStart?.(t),t.defaultPrevented&&this._activeGraphic.set("geometry",l)}else if("update"===t){const t=new b(this._activeGraphic,this.graphics,h,s,r,o,a,n,c,i);this.emit("graphic-move",t),this.callbacks.onGraphicMove?.(t),t.defaultPrevented&&(this._activeGraphic.geometry=l)}else{const t=new k(this._activeGraphic,this.graphics,h,s,r,o,a,n,c,i);this._dragEvent=null,this._activeGraphic=null,this._setUpIndicators(),this.emit("graphic-move-stop",t),this.callbacks.onGraphicMoveStop?.(t),t.defaultPrevented&&(this.graphics[h].set("geometry",this._initialDragGeometry),this._setUpIndicators()),this._initialDragGeometry=null}}_keyDownHandler(i){"a"!==i.key&&"d"!==i.key&&"n"!==i.key||"moving"!==this.state||i.stopPropagation()}_findTargetGraphic(i){const t=this.view.toMap(i),e=this.graphics;let s=null,r=Number.MAX_VALUE;this._syncLayerViews();const h=this._layerViews.flatMap(i=>"graphicsViews"in i?Array.from(i.graphicsViews(),i=>i.hitTest(t)).flat():i.graphicsView.hitTest(t)).filter(i=>e.includes(i)).sort((i,t)=>e.indexOf(i)-e.indexOf(t));return h.length?h[0]:(this._manipulators.forEach(t=>{const e=t.intersectionDistance(i);null!=e&&e<r&&(r=e,s=t.graphic)}),s)}_syncLayerViews(){this._layerViews=[];const i=new Set;for(const t of this.graphics){const e=v(this.view,t.layer);e&&i.add(e)}this._layerViews=[...i]}_setUpManipulators(){const{graphics:i,view:t}=this;this._manipulators.forEach(i=>i.destroy()),this._manipulators=i.length?i.map(i=>new x({graphic:i,view:t})):[]}_setUpHighlights(){this.highlightsEnabled&&this.graphics.length&&this._highlightHelper.add(this.graphics,this.highlightName)}_setUpIndicators(){if(this._removeIndicators(),this.indicatorsEnabled){for(const i of this.graphics){const t=i.clone();t.symbol=U(i),this._indicators.push(t),this.addHandles(s(()=>i.symbol,()=>this._setUpIndicators()),M)}this.layer.addMany(this._indicators)}}_removeIndicators(){this.removeHandles(M),this._indicators.length&&(this.layer.removeMany(this._indicators),this._indicators.forEach(i=>i.destroy()),this._indicators=[])}};function U(i){const t=12;if(null==i.symbol)return null;switch(i.symbol.type){case"cim":return new l({style:"circle",size:t,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}});case"picture-marker":{const{xoffset:t,yoffset:e,height:s,width:r}=i.symbol,h=s===r?r:Math.max(s,r);return new l({xoffset:t,yoffset:e,size:h,style:"square",color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}case"simple-marker":{const{xoffset:t,yoffset:e,size:s,style:r}=i.symbol;return new l({xoffset:t,yoffset:e,style:"circle"===r?"circle":"square",size:s+2,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}case"simple-fill":return new n({color:[0,0,0,0],outline:{style:"dash",color:[255,127,0,1],width:1}});case"simple-line":return new c({color:[255,127,0,1],style:"dash",width:1});case"text":{const{xoffset:e,yoffset:s}=i.symbol;return new l({xoffset:e,yoffset:s,size:t,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}default:return null}}i([h()],E.prototype,"_activeGraphic",void 0),i([h({readOnly:!0})],E.prototype,"type",void 0),i([h()],E.prototype,"callbacks",void 0),i([h()],E.prototype,"enableMoveAllGraphics",void 0),i([h()],E.prototype,"graphics",void 0),i([h()],E.prototype,"highlightName",void 0),i([h()],E.prototype,"highlightsEnabled",void 0),i([h()],E.prototype,"indicatorsEnabled",void 0),i([h()],E.prototype,"_defaultLayer",void 0),i([h()],E.prototype,"layer",void 0),i([h({readOnly:!0})],E.prototype,"state",null),i([h()],E.prototype,"view",void 0),E=i([o("esri.views.draw.support.GraphicMover")],E);const j=E;export{j as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import r from"../../../core/Accessor.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{findLayerView as o}from"./layerUtils.js";import{defaultHighlightName as s}from"../../support/HighlightDefaults.js";import{highlightsSupported as h}from"../../support/layerViewUtils.js";let a=class extends r{constructor(e){super(e),this._layerViewCache=new Map,this.highlightName=s,this.view=null}add(e,r){const t=!e||Array.isArray(e)?e:[e];if(!t?.length)return;const i=r??this.highlightName;t.forEach(e=>this._highlight(e,i))}getKeyForFeature(e){const r=e.getObjectId();return null!=r?`oid:${r}`:`uid:${e.uid}`}remove(e){const r=!e||Array.isArray(e)?e:[e];r?.length&&r.forEach(e=>e&&this._removeHighlight(this.getKeyForFeature(e)))}removeByKey(e){e?.forEach(e=>e&&this._removeHighlight(e))}removeAll(){this.removeAllHandles()}update(e,r){this.remove(e),this.add(e,r)}_highlight(e,r){const t=e.layer??e.sourceLayer;if(!t)return;const i=this._layerViewCache.get(t);if(i)return void this.addHandles(i.highlight(e,{name:r}),this.getKeyForFeature(e));const s=o(this.view,t);h(s)&&(this._layerViewCache.set(t,s),this.addHandles(s.highlight(e,{name:r}),this.getKeyForFeature(e)))}_removeHighlight(e){this.removeHandles(e)}};e([t()],a.prototype,"_layerViewCache",void 0),e([t()],a.prototype,"highlightName",void 0),e([t()],a.prototype,"view",void 0),a=e([i("esri.views.draw.support.HighlightHelper")],a);export{a as default};
5
+ import{__decorate as e}from"tslib";import r from"../../../core/Accessor.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{findLayerView as o}from"./layerUtils.js";import{defaultHighlightName as s}from"../../support/HighlightDefaults.js";import{highlightsSupported as h}from"../../support/layerViewUtils.js";let a=class extends r{constructor(e){super(e),this._layerViewCache=new Map,this.highlightName=s,this.view=null}add(e,r){const t=!e||Array.isArray(e)?e:[e];if(!t?.length)return;const i=r??this.highlightName;t.forEach(e=>this._highlight(e,i))}getKeyForFeature(e){const r=e.getObjectId();return null!=r?`oid:${r}`:`uid:${e.uid}`}remove(e){const r=!e||Array.isArray(e)?e:[e];r?.length&&r.forEach(e=>e&&this._removeHighlight(this.getKeyForFeature(e)))}removeByKey(e){e?.forEach(e=>e&&this._removeHighlight(e))}removeAll(){this.removeAllHandles()}update(e,r){this.remove(e),this.add(e,r)}_highlight(e,r){const t=e.layer??e.sourceLayer;if(!t)return;const i=this._layerViewCache.get(t);if(i)return void this.addHandles(i.highlight(e,{name:r}),this.getKeyForFeature(e));const s=o(this.view,t);h(s)&&(this._layerViewCache.set(t,s),this.addHandles(s.highlight(e,{name:r}),this.getKeyForFeature(e)))}_removeHighlight(e){this.removeHandles(e)}};e([t()],a.prototype,"_layerViewCache",void 0),e([t()],a.prototype,"highlightName",void 0),e([t()],a.prototype,"view",void 0),a=e([i("esri.views.draw.support.HighlightHelper")],a);const l=a;export{l as default};