@arcgis/core 6.0.0-next.55 → 6.0.0-next.57

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 (298) hide show
  1. package/arcgisGlobal.d.ts +1 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/00c227bcecc28fe278bb.js +1 -0
  4. package/assets/esri/core/workers/chunks/033b9fcd9833db3b6e7d.js +1 -0
  5. package/assets/esri/core/workers/chunks/0978e12dd6a1cbc50b80.js +1 -0
  6. package/assets/esri/core/workers/chunks/{88df1b8b295d3aed649f.js → 10499abb7678e95d9f05.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{e956845255bce0910944.js → 1507297550c3cd1268e2.js} +1 -1
  8. package/assets/esri/core/workers/chunks/1afc8820c283ef785729.js +1 -0
  9. package/assets/esri/core/workers/chunks/1c0f5c42331fb6fc26cb.js +1 -0
  10. package/assets/esri/core/workers/chunks/1c874f86bfd0963aa3d2.js +1 -0
  11. package/assets/esri/core/workers/chunks/2a84c9a81ec2bed3d4e5.js +1 -0
  12. package/assets/esri/core/workers/chunks/2cd2fcf4a37d180d5d5c.js +1 -0
  13. package/assets/esri/core/workers/chunks/2f31766bc0f9d1d70c5a.js +1 -0
  14. package/assets/esri/core/workers/chunks/2f9adf0b809ce8797ebf.js +1 -0
  15. package/assets/esri/core/workers/chunks/35109db6a6be66f895f7.js +1 -0
  16. package/assets/esri/core/workers/chunks/373b140f92eda3857f82.js +1 -0
  17. package/assets/esri/core/workers/chunks/38bba952c38af5a150e7.js +1 -0
  18. package/assets/esri/core/workers/chunks/3982409149571a827390.js +1 -0
  19. package/assets/esri/core/workers/chunks/3aea09191b737dc1de70.js +1 -0
  20. package/assets/esri/core/workers/chunks/3d851710f7fcc27c5b60.js +2 -0
  21. package/assets/esri/core/workers/chunks/3e8d70039800f2395d66.js +1 -0
  22. package/assets/esri/core/workers/chunks/3fc4b7d0ee460fc96176.js +1 -0
  23. package/assets/esri/core/workers/chunks/457bd1bd37c67b61efe8.js +1 -0
  24. package/assets/esri/core/workers/chunks/4d8539674fc2e4fea03c.js +1 -0
  25. package/assets/esri/core/workers/chunks/{e61082f56c08abe54b3a.js → 5954f02c3901b28d8e73.js} +1 -1
  26. package/assets/esri/core/workers/chunks/5ba6007c3c49a8153256.js +1 -0
  27. package/assets/esri/core/workers/chunks/5bdd95eeb8f34dbf26f2.js +2 -0
  28. package/assets/esri/core/workers/chunks/{ced5dfb2bf46fc5eac8c.js → 5e47026c681238038955.js} +2 -2
  29. package/assets/esri/core/workers/chunks/{2baf35b1b19482d603b5.js → 5f7505ada0991cfbdd84.js} +1 -1
  30. package/assets/esri/core/workers/chunks/601d668e70c5d72fe58c.js +1 -0
  31. package/assets/esri/core/workers/chunks/651e33be8bb3995d749f.js +1 -0
  32. package/assets/esri/core/workers/chunks/{542a9c414c99d84d52ab.js → 6a202ef9ba9b89e09153.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{0826feebdca8a31eb630.js → 6ba6fece5c11fe2a6ace.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{5eb69e2895e5aec81051.js → 6fd10891506925560443.js} +1 -1
  35. package/assets/esri/core/workers/chunks/721f43554b9654481de7.js +1 -0
  36. package/assets/esri/core/workers/chunks/75274ac3ddf7c45f47d7.js +1 -0
  37. package/assets/esri/core/workers/chunks/7b6fd287e7043ad50f4e.js +1 -0
  38. package/assets/esri/core/workers/chunks/7baa49055bc31618b56e.js +1 -0
  39. package/assets/esri/core/workers/chunks/80d1267606383ae537f2.js +1 -0
  40. package/assets/esri/core/workers/chunks/8570e3df90fb76a8741a.js +1 -0
  41. package/assets/esri/core/workers/chunks/{c3c0f24a9e0047232ae1.js → 8679dfc0c53355b6feb0.js} +1 -1
  42. package/assets/esri/core/workers/chunks/8920d0b11951b57d6a66.js +1 -0
  43. package/assets/esri/core/workers/chunks/8a636dc51372e14c98f5.js +1 -0
  44. package/assets/esri/core/workers/chunks/{14259910f44c08fd5bbd.js → 9117c9b720c9ba6e7a6e.js} +1 -1
  45. package/assets/esri/core/workers/chunks/92d97e0fcc20dd5f5ac4.js +1 -0
  46. package/assets/esri/core/workers/chunks/9ca84fa9423654061d05.js +1 -0
  47. package/assets/esri/core/workers/chunks/9e372af03d62fa5ad10e.js +1 -0
  48. package/assets/esri/core/workers/chunks/a22458e5272332d86cb9.js +1 -0
  49. package/assets/esri/core/workers/chunks/{3ea480cebf8ee56228a5.js → a7dfca326883384d2751.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{723d8316f5d4b6ce2942.js → a9539393e2f1812a973a.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{be0b8bb4f09aae6ff5de.js → ab784764ddf9d7f693a1.js} +1 -1
  52. package/assets/esri/core/workers/chunks/b10c534cbe311d17b7d5.js +1 -0
  53. package/assets/esri/core/workers/chunks/b38b6fe08a367e9de4f5.js +1 -0
  54. package/assets/esri/core/workers/chunks/{4e651869e9a196494694.js → b6e628b5d2643af4c19b.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{b37ab6b1cb4cfc85cd9d.js → b7828d7e2c5b75644057.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{ec465abb0344ad719e9d.js → bd8e329ec74d921d311a.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{9e508f930086d2ef5f22.js → be0133fa63c5d6545a7f.js} +40 -41
  58. package/assets/esri/core/workers/chunks/{56e6e70aa40e51827290.js → c3f94024c6c9eed9f273.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{6d17b45022dfd2548098.js → c5ddf8b347c31fe772a3.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{ee9af58ae202b803bba7.js → c7a0c4ca37ebd1d98cf1.js} +1 -1
  61. package/assets/esri/core/workers/chunks/cb0e3614b78c78040662.js +1 -0
  62. package/assets/esri/core/workers/chunks/d22e3b5d836dffdf91cc.js +1 -0
  63. package/assets/esri/core/workers/chunks/d7763c42754152510e13.js +2 -0
  64. package/assets/esri/core/workers/chunks/e0341def2d81e679a200.js +1 -0
  65. package/assets/esri/core/workers/chunks/e42e9dd3c933f5f864ab.js +1 -0
  66. package/assets/esri/core/workers/chunks/e566102c7ed7a8ebf89e.js +1 -0
  67. package/assets/esri/core/workers/chunks/e74586b074d0fa6abb4b.js +1 -0
  68. package/assets/esri/core/workers/chunks/e7dff025780726d5feae.js +1 -0
  69. package/assets/esri/core/workers/chunks/e96fa029acba59c04e4e.js +2 -0
  70. package/assets/esri/core/workers/chunks/f4fcf87da4495584223d.js +1 -0
  71. package/assets/esri/core/workers/chunks/f989588dfdbb69056491.js +1 -0
  72. package/assets/esri/core/workers/chunks/fc5b920f9756e11c2f88.js +1 -0
  73. package/assets/esri/core/workers/chunks/fdfbd201be372d3796bf.js +2 -0
  74. package/assets/esri/core/workers/chunks/ff0a0819bba5e8264c47.js +1 -0
  75. package/chunks/BlendLayers.glsl.js +1 -1
  76. package/chunks/ColorMaterial.glsl.js +14 -14
  77. package/chunks/Component.glsl.js +38 -37
  78. package/chunks/DefaultMaterial.glsl.js +15 -15
  79. package/chunks/GlobalIllumination.glsl.js +12 -11
  80. package/chunks/GlobalIlluminationBlur.glsl.js +6 -4
  81. package/chunks/HUDMaterial.glsl.js +3 -3
  82. package/chunks/Path.glsl.js +15 -15
  83. package/chunks/Pattern.glsl.js +20 -20
  84. package/chunks/RasterColorizer.glsl.js +1 -1
  85. package/chunks/ShadowHighlight.glsl.js +1 -1
  86. package/chunks/Terrain.glsl.js +28 -27
  87. package/chunks/Water.glsl.js +30 -20
  88. package/chunks/pdf.js +57 -0
  89. package/config.js +1 -1
  90. package/core/accessorSupport/write.js +1 -1
  91. package/core/memoryEstimations.js +1 -1
  92. package/core/scheduling.js +1 -1
  93. package/interfaces.d.ts +0 -1
  94. package/kernel.js +1 -1
  95. package/layers/LinkChartLayer.js +1 -1
  96. package/layers/VoxelWasmPerSceneView.js +1 -1
  97. package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
  98. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -56
  99. package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
  100. package/layers/geospatialPDF/parserUtils.js +2 -0
  101. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  102. package/layers/graphics/dehydratedFeatures.js +1 -1
  103. package/layers/graphics/transferFeatures.js +1 -1
  104. package/layers/support/ControlPoint.js +1 -1
  105. package/layers/support/ControlPointsGeoreference.js +1 -1
  106. package/layers/support/commonProperties.js +1 -1
  107. package/layers/support/fieldUtils.d.ts +129 -57
  108. package/layers/support/fieldUtils.js +1 -1
  109. package/layers/support/geospatialPDFUtils.d.ts +63 -0
  110. package/layers/support/geospatialPDFUtils.js +2 -0
  111. package/networks/Network.js +1 -1
  112. package/networks/support/TopologyValidationJobInfo.js +1 -1
  113. package/package.json +5 -5
  114. package/symbols/CIMSymbol.d.ts +9 -9
  115. package/symbols/PathSymbol3DLayer.d.ts +1 -1
  116. package/symbols/WaterSymbol3DLayer.d.ts +13 -1
  117. package/symbols/WaterSymbol3DLayer.js +1 -1
  118. package/views/3d/GroundView3D.js +1 -1
  119. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  120. package/views/3d/analysis/Viewshed/ViewshedObserverManipulatedObject3D.js +1 -1
  121. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  122. package/views/3d/camera/intersectionUtils.js +1 -1
  123. package/views/3d/environment/EnvironmentView.js +1 -1
  124. package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
  125. package/views/3d/interactive/Manipulator3D.js +1 -1
  126. package/views/3d/interactive/Manipulator3DBase.js +1 -1
  127. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  128. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  129. package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
  130. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  131. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  132. package/views/3d/layers/DrapedSubView3D.js +1 -1
  133. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  134. package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
  135. package/views/3d/layers/FlowSubView3D.js +1 -1
  136. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  137. package/views/3d/layers/I3SMeshView3D.js +1 -1
  138. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  139. package/views/3d/layers/RouteLayerView3D.js +1 -1
  140. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  141. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  142. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  143. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  144. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  145. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  146. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  147. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  148. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  149. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  150. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  151. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  152. package/views/3d/layers/support/Tiles3DBVH.js +1 -1
  153. package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
  154. package/views/3d/layers/support/createTileBVHForLayer.js +1 -1
  155. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  156. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  157. package/views/3d/state/controllers/RotateController.js +1 -1
  158. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  159. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  160. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  161. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  162. package/views/3d/state/utils/navigationUtils.js +1 -1
  163. package/views/3d/support/GroundAndIMSurface.js +1 -1
  164. package/views/3d/support/QualityProfile.js +1 -1
  165. package/views/3d/support/QualitySettings.js +1 -1
  166. package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
  167. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  168. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  169. package/views/3d/terrain/BlendLayersTechniqueConfiguration.js +1 -1
  170. package/views/3d/terrain/OverlayManager.js +1 -1
  171. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  172. package/views/3d/terrain/RasterColorizerTechniqueConfiguration.js +1 -1
  173. package/views/3d/terrain/TerrainRenderer.js +1 -1
  174. package/views/3d/terrain/TerrainSurface.js +1 -1
  175. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  176. package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +1 -1
  177. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  178. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  179. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  180. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  181. package/views/3d/webgl-engine/core/shaderLibrary/clampShadowPosition.glsl.js +2 -0
  182. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +14 -14
  183. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +1 -1
  184. package/views/3d/webgl-engine/core/shaderLibrary/lastFrameUniforms.js +1 -1
  185. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +15 -12
  186. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +2 -3
  187. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  188. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  189. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  190. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  191. package/views/3d/webgl-engine/effects/globalIllumination/globalIlluminationUniforms.js +1 -1
  192. package/views/3d/webgl-engine/lib/BufferGeometry.js +1 -1
  193. package/views/3d/webgl-engine/lib/BufferObject3D.js +1 -1
  194. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  195. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  196. package/views/3d/webgl-engine/lib/Program.js +1 -1
  197. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  198. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  199. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  200. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  201. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  202. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  203. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  204. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  205. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  206. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  207. package/views/3d/webgl-engine/materials/getWaterColor.glsl.js +89 -0
  208. package/views/3d/webgl-engine/parts/Model.js +1 -1
  209. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  210. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  211. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  212. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  213. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  214. package/views/Attribution.js +5 -5
  215. package/views/DOMContainer.d.ts +2 -1
  216. package/views/SceneView.js +1 -1
  217. package/views/draw/DrawGraphicTool.js +1 -1
  218. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  219. package/views/webgl/Program.js +3 -3
  220. package/views/webgl/ShaderBuilder.js +23 -23
  221. package/webscene/Slide.js +1 -1
  222. package/webscene/VirtualLighting.d.ts +2 -4
  223. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +17 -1
  224. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  225. package/widgets/BatchAttributeForm/inputs/support/inputUtils.d.ts +7 -0
  226. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  227. package/widgets/BatchAttributeForm.js +1 -1
  228. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  229. package/widgets/Sketch/SketchViewModel.js +1 -1
  230. package/widgets/Weather/WeatherViewModel.js +1 -1
  231. package/widgets/support/ContingentValuesManager.js +1 -1
  232. package/widgets/support/forms/types.d.ts +23 -1
  233. package/assets/esri/core/workers/chunks/144f18a3dd2c8cf07cf7.js +0 -1
  234. package/assets/esri/core/workers/chunks/193a73a2c7f4f8482c21.js +0 -1
  235. package/assets/esri/core/workers/chunks/20acb6f3ed5140b6c6c6.js +0 -1
  236. package/assets/esri/core/workers/chunks/23fc1c1ed483ed3b2298.js +0 -1
  237. package/assets/esri/core/workers/chunks/249a687ce1b6d0815242.js +0 -1
  238. package/assets/esri/core/workers/chunks/2634927d26cb1139c6d0.js +0 -1
  239. package/assets/esri/core/workers/chunks/2d1b8154ee40afc9d40b.js +0 -1
  240. package/assets/esri/core/workers/chunks/2d4788be418a4e5f6606.js +0 -1
  241. package/assets/esri/core/workers/chunks/333140b18aeb5a50b654.js +0 -1
  242. package/assets/esri/core/workers/chunks/4401b3f8ebb658abe789.js +0 -1
  243. package/assets/esri/core/workers/chunks/4761cd436abceee858bf.js +0 -1
  244. package/assets/esri/core/workers/chunks/4a41bf3d1e2e9bb79771.js +0 -2
  245. package/assets/esri/core/workers/chunks/4de08ead94660025075b.js +0 -1
  246. package/assets/esri/core/workers/chunks/56f227e1a9e51d1fd742.js +0 -1
  247. package/assets/esri/core/workers/chunks/5bd451c7db17ee8f0315.js +0 -1
  248. package/assets/esri/core/workers/chunks/5c34d49a6c9cc34b7626.js +0 -1
  249. package/assets/esri/core/workers/chunks/5f324d88785ffcb73ae0.js +0 -1
  250. package/assets/esri/core/workers/chunks/703373f529c1c334cfad.js +0 -1
  251. package/assets/esri/core/workers/chunks/70695e0fb53018d48e7b.js +0 -2
  252. package/assets/esri/core/workers/chunks/723c9ad4c25be2b82476.js +0 -1
  253. package/assets/esri/core/workers/chunks/733c32d8091427d84de7.js +0 -1
  254. package/assets/esri/core/workers/chunks/766a1357be2ed7f4e125.js +0 -1
  255. package/assets/esri/core/workers/chunks/844c593754b2692257f4.js +0 -1
  256. package/assets/esri/core/workers/chunks/846248697c398468d8e6.js +0 -1
  257. package/assets/esri/core/workers/chunks/860552f49f17de2f3353.js +0 -1
  258. package/assets/esri/core/workers/chunks/89e55895683369b5277a.js +0 -1
  259. package/assets/esri/core/workers/chunks/8c94e987754b3919181e.js +0 -1
  260. package/assets/esri/core/workers/chunks/919115788da38049aea7.js +0 -2
  261. package/assets/esri/core/workers/chunks/976303f47c342b9d1cc0.js +0 -1
  262. package/assets/esri/core/workers/chunks/9b727f45dfea84357b57.js +0 -1
  263. package/assets/esri/core/workers/chunks/a05a2c2aaf0c288f9681.js +0 -1
  264. package/assets/esri/core/workers/chunks/a116dd204921e7464944.js +0 -1
  265. package/assets/esri/core/workers/chunks/ab76170c374fd67ce8cd.js +0 -1
  266. package/assets/esri/core/workers/chunks/aebd12488b4004e207a3.js +0 -1
  267. package/assets/esri/core/workers/chunks/b33e7e74cf8fa3926617.js +0 -1
  268. package/assets/esri/core/workers/chunks/bb2af16e55cb39163827.js +0 -1
  269. package/assets/esri/core/workers/chunks/c7b1c6d57603fa385c54.js +0 -1
  270. package/assets/esri/core/workers/chunks/cd8181600623e18f511c.js +0 -1
  271. package/assets/esri/core/workers/chunks/cef537fa9705dd1cf685.js +0 -1
  272. package/assets/esri/core/workers/chunks/d33403d578fbeecaf844.js +0 -1
  273. package/assets/esri/core/workers/chunks/d5bb9f9b7b341c671525.js +0 -1
  274. package/assets/esri/core/workers/chunks/d96e63d66f7b1f4ea54a.js +0 -2
  275. package/assets/esri/core/workers/chunks/ddbfa664e69612295785.js +0 -1
  276. package/assets/esri/core/workers/chunks/ded81c504bf44806ca7d.js +0 -1
  277. package/assets/esri/core/workers/chunks/e0466387b2ab54d706ca.js +0 -1
  278. package/assets/esri/core/workers/chunks/e3bcd2e356f75afc316a.js +0 -1
  279. package/assets/esri/core/workers/chunks/e80526571f1a34de3278.js +0 -1
  280. package/assets/esri/core/workers/chunks/ea71850ba87ae6038000.js +0 -1
  281. package/assets/esri/core/workers/chunks/ee70be138831cc2a0f56.js +0 -1
  282. package/assets/esri/core/workers/chunks/f23c4fd014126ea7abc6.js +0 -1
  283. package/assets/esri/core/workers/chunks/f537a5e808dc546813c7.js +0 -1
  284. package/assets/esri/core/workers/chunks/f6e40f3faf0c80cf1b3a.js +0 -1
  285. package/assets/esri/core/workers/chunks/fe811d651d201f698b8f.js +0 -2
  286. package/chunks/NativeLine.glsl.js +0 -8
  287. package/layers/geospatialPDF/geospatialPDFParserUtils.js +0 -2
  288. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +0 -70
  289. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +0 -2
  290. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +0 -2
  291. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +0 -2
  292. package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +0 -2
  293. /package/assets/esri/core/workers/chunks/{919115788da38049aea7.js.LICENSE.txt → 3d851710f7fcc27c5b60.js.LICENSE.txt} +0 -0
  294. /package/assets/esri/core/workers/chunks/{fe811d651d201f698b8f.js.LICENSE.txt → 5bdd95eeb8f34dbf26f2.js.LICENSE.txt} +0 -0
  295. /package/assets/esri/core/workers/chunks/{ced5dfb2bf46fc5eac8c.js.LICENSE.txt → 5e47026c681238038955.js.LICENSE.txt} +0 -0
  296. /package/assets/esri/core/workers/chunks/{4a41bf3d1e2e9bb79771.js.LICENSE.txt → d7763c42754152510e13.js.LICENSE.txt} +0 -0
  297. /package/assets/esri/core/workers/chunks/{d96e63d66f7b1f4ea54a.js.LICENSE.txt → e96fa029acba59c04e4e.js.LICENSE.txt} +0 -0
  298. /package/assets/esri/core/workers/chunks/{70695e0fb53018d48e7b.js.LICENSE.txt → fdfbd201be372d3796bf.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../core/accessorSupport/decorators.js";import{createTask as r}from"../../core/asyncUtils.js";import{makeHandle as i}from"../../core/handleUtils.js";import{destroyMaybe as a}from"../../core/maybe.js";import{watch as o,syncAndInitial as s,sync as c}from"../../core/reactiveUtils.js";import{UpdatingHandles as l}from"../../core/support/UpdatingHandles.js";import{load as u}from"../../geometry/coordinateFormatter.js";import d from"../../Graphic.js";import{pointEquals as f}from"../../layers/graphics/dehydratedFeatureComparison.js";import p from"../../layers/GraphicsLayer.js";import{UndoRedo as m}from"../../UndoRedo.js";import{InteractiveToolBase as h}from"../interactive/InteractiveToolBase.js";import g from"../interactive/options/InteractiveToolOptions.js";import{makeTooltip as _,pasteLocation as v,enterInputModeIfAvailable as y}from"../interactive/tooltip/tooltipCommonUtils.js";import{GeometryWorkerHandle as b}from"../support/GeometryWorkerHandle.js";import{CreateOperationGeometry as x}from"./support/CreateOperationGeometry.js";import{createCircle as S,createEllipse as C,createSquare as w,createRectangle as T,createPolygon as E,createPolyline as D,createMultipoint as O}from"./support/createUtils.js";import{createViewAlignedCoordinateSystem as k}from"./support/surfaceCoordinateSystems.js";import{createTooltipInfos as A,initializeConstraints as j,updateTooltipInfo as M,getConstraintZ as N,unlockConstraintsOnVertexAddOrRemove as P,lockElevationOnVertexAdd as F,getActiveTooltipInfo as I}from"./support/tooltipUtils.js";import{autorun as L}from"../../core/accessorSupport/trackingUtils.js";let R=class extends h{constructor(e){super(e),this._graphic=null,this._coordinateFormatterLoadTask=null,this._createOperationGeometry=null,this.defaultZ=0,this.directionOptions=null,this.elevationLockOnVertexAddDisabled=!1,this.geometryType=null,this.hasZ=!0,this.geometryToPlace=null,this.snappingManager=null,this.snapToScene=!1,this.toolOptions=new g,this._updatingHandles=new l,this._measurementWorker=new b({preloadGeodetic:!0})}initialize(){let{view:e}=this;this.internalGraphicsLayer=new p({listMode:`hide`,internal:!0,title:`DrawGraphicTool layer`}),this.view.map.layers.add(this.internalGraphicsLayer);let t=this.drawOperation=this.makeDrawOperation();this.tooltipInfos=A(e.type,this.toolOptions);let n=_(()=>({view:e,options:this.toolOptions.tooltips}));this.tooltip=n,j(this._tooltipsContext),this._coordinateFormatterLoadTask=r(()=>u()),this.addHandles([t.on(`vertex-add`,e=>this.onVertexAdd(e)),t.on(`vertex-remove`,e=>this.onVertexRemove(e)),t.on(`vertex-update`,e=>this.onVertexUpdate(e)),t.on(`cursor-update`,e=>this.onCursorUpdate(e)),t.on(`cursor-remove`,()=>this._updateGraphic()),t.on(`complete`,e=>this.onComplete(e)),this._coordinateFormatterLoadTask,n.on(`paste`,e=>v(e,this.activeTooltipInfo)),o(()=>this.cursor,e=>{t.cursor=e},s),L(()=>{let{activeTooltipInfo:e,toolOptions:t}=this;M(e,this._tooltipsContext,this._updatingHandles),n.info=t.tooltips.effectiveEnabled?e:null}),L(()=>{t.constraintZ=N(this._tooltipsContext)},c)]),this.finishToolCreation(),t.initializePointer()}destroy(){this.drawOperation=a(this.drawOperation),this.tooltip=a(this.tooltip),this._destroyAllVisualizations(),this.view.map.remove(this.internalGraphicsLayer),this.internalGraphicsLayer=a(this.internalGraphicsLayer),this._updatingHandles.destroy(),this._measurementWorker.destroy(),this._set(`view`,null)}get _drawSpatialReference(){return this.drawOperation.coordinateHelper.spatialReference}get _tooltipsContext(){let{defaultZ:e,directionOptions:t,drawOperation:n,forceUniformSize:r,geometryType:i,graphic:a,toolOptions:o,tooltipInfos:s,view:c,_measurementWorker:l}=this;return{createOperationGeometry:this._createOperationGeometry,defaultZ:e,directionOptions:t,drawOperation:n,forceUniformSize:r,geometryType:i,graphic:a,toolOptions:o,tooltipInfos:s,view:c,measurementWorker:l}}get canRedo(){return this.drawOperation.canRedo}get canUndo(){return this.drawOperation.canUndo}set centered(e){this._set(`centered`,e),this._updateGraphic()}get cursor(){return this._get(`cursor`)}set cursor(e){this._set(`cursor`,e)}set enabled(e){this.drawOperation.interactive=e,this._set(`enabled`,e)}set forceUniformSize(e){this._set(`forceUniformSize`,e),this._updateGraphic()}get graphic(){return this._graphic}set graphicSymbol(e){this._set(`graphicSymbol`,e),this._graphic!=null&&(this._graphic.symbol=e)}set mode(e){let t=this.drawOperation;t&&(t.drawingMode=e),this._set(`mode`,e)}get updating(){return(this._updatingHandles.updating||this.drawOperation?.updating)??!1}get undoRedo(){let{view:{type:e,map:t}}=this;return e===`2d`&&t&&`undoRedo`in t&&t.undoRedo instanceof m?t.undoRedo:null}set undoRedo(e){this._override(`undoRedo`,e)}completeCreateOperation(){this.drawOperation.complete()}onInputEvent(e){this.destroyed||y(e,this.tooltip)||this.drawOperation.onInputEvent(e)}redo(){this.drawOperation.redo()}reset(){}undo(){this.drawOperation.undo(),this.drawOperation.numCommittedVertices===0&&j(this._tooltipsContext)}_destroyAllVisualizations(){this.removeHandles(B.outline),this.removeHandles(B.regularVertices),this.removeHandles(B.activeVertex),this.removeHandles(B.activeEdge),this.removeHandles(z)}_createOrUpdateGraphic(e){if(this._graphic!=null)return this.updateGraphicGeometry(e),this._graphic;let t=new d({...this.graphicProperties,symbol:this.graphicSymbol});return this._graphic=t,this.updateGraphicGeometry(e),this.internalGraphicsLayer.add(t),this.addHandles(this.initializeGraphic(t)),this.notifyChange(`graphic`),this.addHandles(i(()=>{this.internalGraphicsLayer.remove(t),this._graphic===t&&(this._graphic=null)}),z),t}updateGraphicGeometry(e){this._graphic.geometry=e}_getCreateOperationGeometry(e={operationComplete:!1}){if(this.drawOperation==null)return;let{coordinateHelper:t,view:n,visualizationCursorVertex:r,lastVertex:i,committedVertices:a,geometryIncludingUncommittedVertices:o,numCommittedVertices:s}=this.drawOperation;if(!(s>0||r!=null))return;let c=e.operationComplete?a:o,l=c.length,u=r==null?null:t.pointToArray(r),d=this._drawSpatialReference,p=n.type===`3d`&&n.viewingMode===`global`,m=new x;m.committedVertices=a,m.cursorVertex=u;let{geometryType:h}=this;switch(h){case`point`:case`mesh`:m.full=t.arrayToPoint(c[0]);break;case`multipoint`:m.full=l>0?O(c,d):null;break;case`polyline`:case`polygon`:l>0&&(m.full=h===`polygon`?E([c],d,p,!0):D([c],d,p),m.cursorEdge=u!=null&&i&&!f(r,i)?D([[u,t.pointToArray(i)]],d,p):null,m.outline=l>1?m.full:null);break;case`circle`:case`rectangle`:{if(m.committedVertices=m.cursorVertex=null,!l)break;let t=k(n,c[0]),r=c[0],i=t.makeMapPoint(r[0]+H*n.resolution,r[1]);h===`circle`?l===1&&e.operationComplete?m.circle=S([r,i],t,!0):l===2&&(this.forceUniformSize?m.circle=S(c,t,this.centered):m.rectangle=C(c,t,this.centered)):l===1&&e.operationComplete?m.rectangle=w([r,i],t,!0):l===2&&(m.rectangle=this.forceUniformSize?w(c,t,this.centered):T(c,t,this.centered)),m.full=m.circle==null?m.rectangle?.geometry:m.circle.geometry,m.outline=m.full?.type===`polygon`?m.full:null;break}default:return null}return m}initializeGraphic(e){return i()}onComplete(e){if(!this.drawOperation)return;this._updateGraphic();let t=null;if(this.drawOperation.isCompleted){let e=this._getCreateOperationGeometry({operationComplete:!0});e!=null&&(t=this._createOrUpdateGraphic(e.full))}this._createOperationGeometry=null,this.emit(`complete`,{graphic:t,...e})}onCursorUpdate(e){this._updateGraphic(),this.emit(`cursor-update`,e)}onDeactivate(){let{drawOperation:e}=this;e&&(e.isCompleted||e.cancel())}onOutlineChanged(e){return i()}onCursorEdgeChanged(e){return i()}onVertexAdd(e){P(this._tooltipsContext),this._updateGraphic(),this.elevationLockOnVertexAddDisabled||F(e.vertices.at(0)?.coordinates,this._tooltipsContext),this.emit(`vertex-add`,e)}onVertexRemove(e){P(this._tooltipsContext),this._updateGraphic(),this.emit(`vertex-remove`,e)}onVertexUpdate(e){this._updateGraphic(),this.emit(`vertex-update`,e)}_updateGraphic(){let e=this._getCreateOperationGeometry();this._createOperationGeometry=e,e==null?this._destroyAllVisualizations():(e.cursorEdge==null?this.removeHandles(B.activeEdge):this.addHandles(this.onCursorEdgeChanged(e.cursorEdge),B.activeEdge),e.outline==null?this.removeHandles(B.outline):this.addHandles(this.onOutlineChanged(e.outline),B.outline),e.committedVertices==null?this.removeHandles(B.regularVertices):this.addHandles(this.onRegularVerticesChanged(e.committedVertices),B.regularVertices),e.cursorVertex==null?this.removeHandles(B.activeVertex):this.addHandles(this.onActiveVertexChanged(e.cursorVertex),B.activeVertex),e.full==null?this.removeHandles(z):this._createOrUpdateGraphic(e.full))}get activeTooltipInfo(){return this._coordinateFormatterLoadTask?.finished?I(this._tooltipsContext):null}};e([t()],R.prototype,`_coordinateFormatterLoadTask`,void 0),e([t()],R.prototype,`_createOperationGeometry`,void 0),e([t()],R.prototype,`_tooltipsContext`,null),e([t({value:!0})],R.prototype,`centered`,null),e([t()],R.prototype,`cursor`,null),e([t({nonNullable:!0})],R.prototype,`defaultZ`,void 0),e([t({constructOnly:!0})],R.prototype,`directionOptions`,void 0),e([t()],R.prototype,`drawOperation`,void 0),e([t()],R.prototype,`elevationLockOnVertexAddDisabled`,void 0),e([t({value:!0})],R.prototype,`enabled`,null),e([t({value:!0})],R.prototype,`forceUniformSize`,null),e([t({constructOnly:!0})],R.prototype,`geometryType`,void 0),e([t()],R.prototype,`graphic`,null),e([t({constructOnly:!0})],R.prototype,`graphicProperties`,void 0),e([t()],R.prototype,`graphicSymbol`,null),e([t({constructOnly:!0})],R.prototype,`hasZ`,void 0),e([t({constructOnly:!0})],R.prototype,`geometryToPlace`,void 0),e([t()],R.prototype,`mode`,null),e([t()],R.prototype,`snappingManager`,void 0),e([t()],R.prototype,`snapToScene`,void 0),e([t()],R.prototype,`tooltip`,void 0),e([t()],R.prototype,`tooltipInfos`,void 0),e([t({constructOnly:!0,type:g})],R.prototype,`toolOptions`,void 0),e([t()],R.prototype,`updating`,null),e([t({constructOnly:!0,nonNullable:!0})],R.prototype,`view`,void 0),e([t({constructOnly:!0})],R.prototype,`undoRedo`,null),e([t()],R.prototype,`activeTooltipInfo`,null),R=e([n(`esri.views.draw.DrawGraphicTool`)],R);const z=Symbol(`create-operation-graphic`),B={outline:Symbol(`outline-visual`),regularVertices:Symbol(`regular-vertices-visual`),activeVertex:Symbol(`active-vertex-visual`),activeEdge:Symbol(`active-edge-visual`)};function V(e){switch(e){case`point`:case`polyline`:case`polygon`:case`multipoint`:return e;case`circle`:case`rectangle`:return`segment`;case`mesh`:return`point`}}const H=48;export{R as DrawGraphicTool,V as geometryTypeToDrawOperationGeometryType};
2
+ import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../core/accessorSupport/decorators.js";import{createTask as r}from"../../core/asyncUtils.js";import{makeHandle as i}from"../../core/handleUtils.js";import{destroyMaybe as a}from"../../core/maybe.js";import{watch as o,syncAndInitial as s,sync as c}from"../../core/reactiveUtils.js";import{UpdatingHandles as l}from"../../core/support/UpdatingHandles.js";import{load as u}from"../../geometry/coordinateFormatter.js";import d from"../../Graphic.js";import{pointEquals as f}from"../../layers/graphics/dehydratedFeatureComparison.js";import p from"../../layers/GraphicsLayer.js";import{UndoRedo as m}from"../../UndoRedo.js";import{InteractiveToolBase as h}from"../interactive/InteractiveToolBase.js";import g from"../interactive/options/InteractiveToolOptions.js";import{makeTooltip as _,pasteLocation as v,enterInputModeIfAvailable as y}from"../interactive/tooltip/tooltipCommonUtils.js";import{GeometryWorkerHandle as b}from"../support/GeometryWorkerHandle.js";import{CreateOperationGeometry as x}from"./support/CreateOperationGeometry.js";import{createCircle as S,createEllipse as C,createSquare as w,createRectangle as T,createPolygon as E,createPolyline as D,createMultipoint as O}from"./support/createUtils.js";import{createViewAlignedCoordinateSystem as k}from"./support/surfaceCoordinateSystems.js";import{createTooltipInfos as A,initializeConstraints as j,updateTooltipInfo as M,getConstraintZ as N,unlockConstraintsOnVertexAddOrRemove as P,lockElevationOnVertexAdd as F,getActiveTooltipInfo as I}from"./support/tooltipUtils.js";import{autorun as L}from"../../core/accessorSupport/trackingUtils.js";let R=class extends h{constructor(e){super(e),this._graphic=null,this._coordinateFormatterLoadTask=null,this._createOperationGeometry=null,this.defaultZ=0,this.directionOptions=null,this.elevationLockOnVertexAddDisabled=!1,this.geometryType=null,this.hasZ=!0,this.geometryToPlace=null,this.snappingManager=null,this.snapToScene=!1,this.toolOptions=new g,this._updatingHandles=new l,this._measurementWorker=new b({preloadGeodetic:!0})}initialize(){let{view:e}=this;this.internalGraphicsLayer=new p({listMode:`hide`,internal:!0,title:`DrawGraphicTool layer`}),this.view.map.layers.add(this.internalGraphicsLayer);let t=this.drawOperation=this.makeDrawOperation();this.tooltipInfos=A(e.type,this.toolOptions);let n=_(()=>({view:e,options:this.toolOptions.tooltips}));this.tooltip=n,j(this._tooltipsContext),this._coordinateFormatterLoadTask=r(()=>u()),this.addHandles([t.on(`vertex-add`,e=>this.onVertexAdd(e)),t.on(`vertex-remove`,e=>this.onVertexRemove(e)),t.on(`vertex-update`,e=>this.onVertexUpdate(e)),t.on(`cursor-update`,e=>this.onCursorUpdate(e)),t.on(`cursor-remove`,()=>this._updateGraphic()),t.on(`complete`,e=>this.onComplete(e)),this._coordinateFormatterLoadTask,n.on(`paste`,e=>v(e,this.activeTooltipInfo)),o(()=>this.cursor,e=>{t.cursor=e},s),L(()=>{let{activeTooltipInfo:e,toolOptions:t}=this;M(e,this._tooltipsContext,this._updatingHandles),n.info=t.tooltips.effectiveEnabled?e:null}),L(()=>{t.constraintZ=N(this._tooltipsContext)},c)]),this.finishToolCreation(),t.initializePointer()}destroy(){this.drawOperation=a(this.drawOperation),this.tooltip=a(this.tooltip),this._destroyAllVisualizations(),this.view.map.remove(this.internalGraphicsLayer),this.internalGraphicsLayer=a(this.internalGraphicsLayer),this._updatingHandles.destroy(),this._measurementWorker.destroy(),this._set(`view`,null)}get _drawSpatialReference(){return this.drawOperation.coordinateHelper.spatialReference}get _tooltipsContext(){let{defaultZ:e,directionOptions:t,drawOperation:n,forceUniformSize:r,geometryType:i,graphic:a,toolOptions:o,tooltipInfos:s,view:c,_measurementWorker:l}=this;return{createOperationGeometry:this._createOperationGeometry,defaultZ:e,directionOptions:t,drawOperation:n,forceUniformSize:r,geometryType:i,graphic:a,toolOptions:o,tooltipInfos:s,view:c,measurementWorker:l}}get canRedo(){return this.drawOperation.canRedo}get canUndo(){return this.drawOperation.canUndo}set centered(e){this._set(`centered`,e),this._updateGraphic()}get cursor(){return this._get(`cursor`)}set cursor(e){this._set(`cursor`,e)}set enabled(e){this.drawOperation.interactive=e,this._set(`enabled`,e)}set forceUniformSize(e){this._set(`forceUniformSize`,e),this._updateGraphic()}get graphic(){return this._graphic}set graphicSymbol(e){this._set(`graphicSymbol`,e),this._graphic!=null&&(this._graphic.symbol=e)}set mode(e){let t=this.drawOperation;t&&(t.drawingMode=e),this._set(`mode`,e)}get updating(){return(this._updatingHandles.updating||this.drawOperation?.updating)??!1}get undoRedo(){let{view:{type:e,map:t}}=this;return e===`2d`&&t&&`undoRedo`in t&&t.undoRedo instanceof m?t.undoRedo:null}set undoRedo(e){this._override(`undoRedo`,e)}completeCreateOperation(){this.drawOperation.complete()}onInputEvent(e){this.destroyed||y(e,this.tooltip)||this.drawOperation.onInputEvent(e)}redo(){this.drawOperation.redo()}reset(){}undo(){this.drawOperation.undo(),this.drawOperation.numCommittedVertices===0&&j(this._tooltipsContext)}_destroyAllVisualizations(){this.removeHandles(B.outline),this.removeHandles(B.regularVertices),this.removeHandles(B.activeVertex),this.removeHandles(B.activeEdge),this.removeHandles(z)}_createOrUpdateGraphic(e){if(this._graphic!=null)return this.updateGraphicGeometry(e),this._graphic;let t=new d({...this.graphicProperties,symbol:this.graphicSymbol});return this._graphic=t,this.updateGraphicGeometry(e),this.internalGraphicsLayer.add(t),this.addHandles(this.initializeGraphic(t)),this.notifyChange(`graphic`),this.addHandles(i(()=>{this.internalGraphicsLayer.remove(t),this._graphic===t&&(this._graphic=null)}),z),t}updateGraphicGeometry(e){this._graphic.geometry=e}_getCreateOperationGeometry(e={operationComplete:!1}){if(this.drawOperation==null)return;let{coordinateHelper:t,view:n,visualizationCursorVertex:r,lastVertex:i,committedVertices:a,geometryIncludingUncommittedVertices:o,numCommittedVertices:s}=this.drawOperation;if(!(s>0||r!=null))return;let c=e.operationComplete?a:o,l=c.length,u=r==null?null:t.pointToArray(r),d=this._drawSpatialReference,p=n.type===`3d`&&n.state.isGlobal,m=new x;m.committedVertices=a,m.cursorVertex=u;let{geometryType:h}=this;switch(h){case`point`:case`mesh`:m.full=t.arrayToPoint(c[0]);break;case`multipoint`:m.full=l>0?O(c,d):null;break;case`polyline`:case`polygon`:l>0&&(m.full=h===`polygon`?E([c],d,p,!0):D([c],d,p),m.cursorEdge=u!=null&&i&&!f(r,i)?D([[u,t.pointToArray(i)]],d,p):null,m.outline=l>1?m.full:null);break;case`circle`:case`rectangle`:{if(m.committedVertices=m.cursorVertex=null,!l)break;let t=k(n,c[0]),r=c[0],i=t.makeMapPoint(r[0]+H*n.resolution,r[1]);h===`circle`?l===1&&e.operationComplete?m.circle=S([r,i],t,!0):l===2&&(this.forceUniformSize?m.circle=S(c,t,this.centered):m.rectangle=C(c,t,this.centered)):l===1&&e.operationComplete?m.rectangle=w([r,i],t,!0):l===2&&(m.rectangle=this.forceUniformSize?w(c,t,this.centered):T(c,t,this.centered)),m.full=m.circle==null?m.rectangle?.geometry:m.circle.geometry,m.outline=m.full?.type===`polygon`?m.full:null;break}default:return null}return m}initializeGraphic(e){return i()}onComplete(e){if(!this.drawOperation)return;this._updateGraphic();let t=null;if(this.drawOperation.isCompleted){let e=this._getCreateOperationGeometry({operationComplete:!0});e!=null&&(t=this._createOrUpdateGraphic(e.full))}this._createOperationGeometry=null,this.emit(`complete`,{graphic:t,...e})}onCursorUpdate(e){this._updateGraphic(),this.emit(`cursor-update`,e)}onDeactivate(){let{drawOperation:e}=this;e&&(e.isCompleted||e.cancel())}onOutlineChanged(e){return i()}onCursorEdgeChanged(e){return i()}onVertexAdd(e){P(this._tooltipsContext),this._updateGraphic(),this.elevationLockOnVertexAddDisabled||F(e.vertices.at(0)?.coordinates,this._tooltipsContext),this.emit(`vertex-add`,e)}onVertexRemove(e){P(this._tooltipsContext),this._updateGraphic(),this.emit(`vertex-remove`,e)}onVertexUpdate(e){this._updateGraphic(),this.emit(`vertex-update`,e)}_updateGraphic(){let e=this._getCreateOperationGeometry();this._createOperationGeometry=e,e==null?this._destroyAllVisualizations():(e.cursorEdge==null?this.removeHandles(B.activeEdge):this.addHandles(this.onCursorEdgeChanged(e.cursorEdge),B.activeEdge),e.outline==null?this.removeHandles(B.outline):this.addHandles(this.onOutlineChanged(e.outline),B.outline),e.committedVertices==null?this.removeHandles(B.regularVertices):this.addHandles(this.onRegularVerticesChanged(e.committedVertices),B.regularVertices),e.cursorVertex==null?this.removeHandles(B.activeVertex):this.addHandles(this.onActiveVertexChanged(e.cursorVertex),B.activeVertex),e.full==null?this.removeHandles(z):this._createOrUpdateGraphic(e.full))}get activeTooltipInfo(){return this._coordinateFormatterLoadTask?.finished?I(this._tooltipsContext):null}};e([t()],R.prototype,`_coordinateFormatterLoadTask`,void 0),e([t()],R.prototype,`_createOperationGeometry`,void 0),e([t()],R.prototype,`_tooltipsContext`,null),e([t({value:!0})],R.prototype,`centered`,null),e([t()],R.prototype,`cursor`,null),e([t({nonNullable:!0})],R.prototype,`defaultZ`,void 0),e([t({constructOnly:!0})],R.prototype,`directionOptions`,void 0),e([t()],R.prototype,`drawOperation`,void 0),e([t()],R.prototype,`elevationLockOnVertexAddDisabled`,void 0),e([t({value:!0})],R.prototype,`enabled`,null),e([t({value:!0})],R.prototype,`forceUniformSize`,null),e([t({constructOnly:!0})],R.prototype,`geometryType`,void 0),e([t()],R.prototype,`graphic`,null),e([t({constructOnly:!0})],R.prototype,`graphicProperties`,void 0),e([t()],R.prototype,`graphicSymbol`,null),e([t({constructOnly:!0})],R.prototype,`hasZ`,void 0),e([t({constructOnly:!0})],R.prototype,`geometryToPlace`,void 0),e([t()],R.prototype,`mode`,null),e([t()],R.prototype,`snappingManager`,void 0),e([t()],R.prototype,`snapToScene`,void 0),e([t()],R.prototype,`tooltip`,void 0),e([t()],R.prototype,`tooltipInfos`,void 0),e([t({constructOnly:!0,type:g})],R.prototype,`toolOptions`,void 0),e([t()],R.prototype,`updating`,null),e([t({constructOnly:!0,nonNullable:!0})],R.prototype,`view`,void 0),e([t({constructOnly:!0})],R.prototype,`undoRedo`,null),e([t()],R.prototype,`activeTooltipInfo`,null),R=e([n(`esri.views.draw.DrawGraphicTool`)],R);const z=Symbol(`create-operation-graphic`),B={outline:Symbol(`outline-visual`),regularVertices:Symbol(`regular-vertices-visual`),activeVertex:Symbol(`active-vertex-visual`),activeEdge:Symbol(`active-edge-visual`)};function V(e){switch(e){case`point`:case`polyline`:case`polygon`:case`multipoint`:return e;case`circle`:case`rectangle`:return`segment`;case`mesh`:return`point`}}const H=48;export{R as DrawGraphicTool,V as geometryTypeToDrawOperationGeometryType};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{isSome as e}from"../../../core/arrayUtils.js";import{invert as t}from"../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as n,clone as r}from"../../../core/libs/gl-matrix-2/factories/mat2df64.js";import{rotationTo as i,invert as a}from"../../../core/libs/gl-matrix-2/math/quat.js";import{create as o}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{scale as s,dot as c,subtract as l,normalize as u,cross as d,transformQuat as f}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import m from"../../../geometry/Point.js";function h(e,t,n=null){return n==null?[e,t]:[e,t,n]}function g(e,t,n=null){return n==null?{x:e,y:t}:{x:e,y:t,z:n}}class _{constructor(e){this.spatialReference=e}mapToLocalMultiple(t){return t.map(e=>this.mapToLocal(e)).filter(e)}get doUnnormalization(){return!1}}class v extends _{constructor(e,i,a=null){super(i),this._defaultZ=a,this.transform=n(),this.transformInv=n(),this.transform=r(e),t(this.transformInv,this.transform)}makeMapPoint(e,t){return h(e,t,this._defaultZ)}mapToLocal(e){return g(this.transform[0]*e[0]+this.transform[2]*e[1]+this.transform[4],this.transform[1]*e[0]+this.transform[3]*e[1]+this.transform[5])}localToMap(e){return h(this.transformInv[0]*e.x+this.transformInv[2]*e.y+this.transformInv[4],this.transformInv[1]*e.x+this.transformInv[3]*e.y+this.transformInv[5],this._defaultZ)}}class y extends _{constructor(e,t){super(e.spatialReference),this.view=e,this.defaultZ=null,this.pWS=p(),this.tangentFrameUpWS=p(),this.tangentFrameRightWS=p(),this.tangentFrameForwardWS=p(),this.localFrameRightWS=p(),this.localFrameUpWS=p(),this.worldToLocalTransform=o(),this.localToWorldTransform=o(),this.scale=1,this.scale=e.resolution,this.referenceMapPoint=t,this.defaultZ=t.hasZ?t.z:null;let n=e.state.camera.viewRight;this.view.renderCoordsHelper.toRenderCoords(this.referenceMapPoint,this.pWS),this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,0,this.tangentFrameRightWS),this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,1,this.tangentFrameUpWS),this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,2,this.tangentFrameForwardWS);let r=p();s(r,this.tangentFrameForwardWS,c(n,this.tangentFrameForwardWS)),l(this.localFrameRightWS,n,r),u(this.localFrameRightWS,this.localFrameRightWS),d(this.localFrameUpWS,this.tangentFrameForwardWS,this.localFrameRightWS),i(this.worldToLocalTransform,this.localFrameRightWS,this.tangentFrameRightWS),a(this.localToWorldTransform,this.worldToLocalTransform)}get doUnnormalization(){return this.view.viewingMode===`global`}makeMapPoint(e,t){return h(e,t,this.defaultZ)}mapToLocal(e){let t=p();this.view.renderCoordsHelper.toRenderCoords(new m({x:e[0],y:e[1],spatialReference:this.spatialReference}),t),f(t,t,this.worldToLocalTransform);let n=this.view.renderCoordsHelper.fromRenderCoords(t,new m({spatialReference:this.view.spatialReference}));return n==null?null:g(n.x/this.scale,n.y/this.scale)}localToMap(e){let t=p();this.view.renderCoordsHelper.toRenderCoords(new m({x:e.x*this.scale,y:e.y*this.scale,spatialReference:this.spatialReference}),t),f(t,t,this.localToWorldTransform);let n=this.view.renderCoordsHelper.fromRenderCoords(t,new m({spatialReference:this.view.spatialReference}));return n==null?null:h(n.x,n.y,this.defaultZ)}}function b(e,t){if(e.type===`2d`)return new v(e.state.transform,e.spatialReference,t.length>2?t[2]:null);if(e.type===`3d`){let n=t.length>2?new m({x:t[0],y:t[1],z:t[2],spatialReference:e.spatialReference}):new m({x:t[0],y:t[1],spatialReference:e.spatialReference});return new y(e,n)}return null}export{v as AffineCoordinateSystem,y as SceneViewCoordinateSystem,_ as SurfaceCoordinateSystem,b as createViewAlignedCoordinateSystem,h as makeMapPoint,g as makeSurfacePoint};
2
+ import{isSome as e}from"../../../core/arrayUtils.js";import{invert as t}from"../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as n,clone as r}from"../../../core/libs/gl-matrix-2/factories/mat2df64.js";import{rotationTo as i,invert as a}from"../../../core/libs/gl-matrix-2/math/quat.js";import{create as o}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{scale as s,dot as c,subtract as l,normalize as u,cross as d,transformQuat as f}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import m from"../../../geometry/Point.js";function h(e,t,n=null){return n==null?[e,t]:[e,t,n]}function g(e,t,n=null){return n==null?{x:e,y:t}:{x:e,y:t,z:n}}class _{constructor(e){this.spatialReference=e}mapToLocalMultiple(t){return t.map(e=>this.mapToLocal(e)).filter(e)}get doUnnormalization(){return!1}}class v extends _{constructor(e,i,a=null){super(i),this._defaultZ=a,this.transform=n(),this.transformInv=n(),this.transform=r(e),t(this.transformInv,this.transform)}makeMapPoint(e,t){return h(e,t,this._defaultZ)}mapToLocal(e){return g(this.transform[0]*e[0]+this.transform[2]*e[1]+this.transform[4],this.transform[1]*e[0]+this.transform[3]*e[1]+this.transform[5])}localToMap(e){return h(this.transformInv[0]*e.x+this.transformInv[2]*e.y+this.transformInv[4],this.transformInv[1]*e.x+this.transformInv[3]*e.y+this.transformInv[5],this._defaultZ)}}class y extends _{constructor(e,t){super(e.spatialReference),this.view=e,this.defaultZ=null,this.pWS=p(),this.tangentFrameUpWS=p(),this.tangentFrameRightWS=p(),this.tangentFrameForwardWS=p(),this.localFrameRightWS=p(),this.localFrameUpWS=p(),this.worldToLocalTransform=o(),this.localToWorldTransform=o(),this.scale=1,this.scale=e.resolution,this.referenceMapPoint=t,this.defaultZ=t.hasZ?t.z:null;let n=e.state.camera.viewRight;this.view.renderCoordsHelper.toRenderCoords(this.referenceMapPoint,this.pWS),this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,0,this.tangentFrameRightWS),this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,1,this.tangentFrameUpWS),this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,2,this.tangentFrameForwardWS);let r=p();s(r,this.tangentFrameForwardWS,c(n,this.tangentFrameForwardWS)),l(this.localFrameRightWS,n,r),u(this.localFrameRightWS,this.localFrameRightWS),d(this.localFrameUpWS,this.tangentFrameForwardWS,this.localFrameRightWS),i(this.worldToLocalTransform,this.localFrameRightWS,this.tangentFrameRightWS),a(this.localToWorldTransform,this.worldToLocalTransform)}get doUnnormalization(){return this.view.state.isGlobal}makeMapPoint(e,t){return h(e,t,this.defaultZ)}mapToLocal(e){let t=p();this.view.renderCoordsHelper.toRenderCoords(new m({x:e[0],y:e[1],spatialReference:this.spatialReference}),t),f(t,t,this.worldToLocalTransform);let n=this.view.renderCoordsHelper.fromRenderCoords(t,new m({spatialReference:this.view.spatialReference}));return n==null?null:g(n.x/this.scale,n.y/this.scale)}localToMap(e){let t=p();this.view.renderCoordsHelper.toRenderCoords(new m({x:e.x*this.scale,y:e.y*this.scale,spatialReference:this.spatialReference}),t),f(t,t,this.localToWorldTransform);let n=this.view.renderCoordsHelper.fromRenderCoords(t,new m({spatialReference:this.view.spatialReference}));return n==null?null:h(n.x,n.y,this.defaultZ)}}function b(e,t){if(e.type===`2d`)return new v(e.state.transform,e.spatialReference,t.length>2?t[2]:null);if(e.type===`3d`){let n=t.length>2?new m({x:t[0],y:t[1],z:t[2],spatialReference:e.spatialReference}):new m({x:t[0],y:t[1],spatialReference:e.spatialReference});return new y(e,n)}return null}export{v as AffineCoordinateSystem,y as SceneViewCoordinateSystem,_ as SurfaceCoordinateSystem,b as createViewAlignedCoordinateSystem,h as makeMapPoint,g as makeSurfacePoint};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{update as e}from"../../core/arrayUtils.js";import has from"../../core/has.js";import{webglValidateShadersEnabled as t,webglDebugEnabled as n}from"./checkWebGLError.js";import{ResourceType as r}from"./enums.js";import{transpileShader as i}from"./ShaderTranspiler.js";const a=!!has(`esri-tests-disable-gpu-memory-measurements`);class o{constructor(e,n,o,c,l=new Map,u=[]){this._context=e,this._compiled=!1,this._linesOfCode=0,this._nameToUniformLocation=new Map,this._nameToUniform1=new Map,this._nameToUniform1v=new Map,this._nameToUniform2=new Map,this._nameToUniform3=new Map,this._nameToUniform4=new Map,this._nameToUniformMatrix3=new Map,this._nameToUniformMatrix4=new Map,e||console.error(`RenderingContext isn't initialized!`),n.length===0&&console.error(`Shaders source should not be empty!`),n=i(n,35633),o=i(o,35632),this._vShader=s(this._context,35633,n),this._fShader=s(this._context,35632,o),d.enabled&&(this._linesOfCode=n.match(/\n/g).length+o.match(/\n/g).length+2,e.instanceCounter.increment(r.LinesOfCode,this._vShader,this._linesOfCode)),this._vShader&&this._fShader||console.error(`Error loading shaders!`),e.instanceCounter.increment(r.Shader,this),t()&&(this.vertexShader=n,this.fragmentShader=o),this.usedMemory=a?0:n.length+o.length;let f=this._context.gl,p=f.createProgram();f.attachShader(p,this._vShader),f.attachShader(p,this._fShader),c.forEach((e,t)=>f.bindAttribLocation(p,e,t)),this.hasTransformFeedbackVaryings=!!u?.length,this.hasTransformFeedbackVaryings&&f.transformFeedbackVaryings(p,u,f.SEPARATE_ATTRIBS),f.linkProgram(p),t()&&!f.getProgramParameter(p,f.LINK_STATUS)&&console.error(`Could not link shader
3
- validated: ${f.getProgramParameter(p,f.VALIDATE_STATUS)}, gl error ${f.getError()}, vertex: ${f.getShaderParameter(this._vShader,f.COMPILE_STATUS)}, fragment: ${f.getShaderParameter(this._fShader,f.COMPILE_STATUS)}, info log: ${f.getProgramInfoLog(p)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`);for(let[e,t]of l){let n=f.getUniformBlockIndex(p,e);n<0xffffffff&&f.uniformBlockBinding(p,n,t)}this._glName=p,e.instanceCounter.increment(r.Program,this)}get glName(){return this._glName}get hasGLName(){return this._glName!=null}get compiled(){return this._compiled?!0:!this._context.capabilities.parallelShaderCompile||this.glName==null?(this._compiled=!0,!0):(this._compiled=!!this._context.gl.getProgramParameter(this.glName,37297),this._compiled)}dispose(){let e=this._context.gl,t=this._context.instanceCounter;this._nameToUniformLocation.forEach(e=>e&&t.decrement(r.Uniform,e)),this._nameToUniformLocation.clear(),this._vShader&&(this._linesOfCode>0&&(t.decrement(r.LinesOfCode,this._vShader,this._linesOfCode),this._linesOfCode=0),e.deleteShader(this._vShader),this._vShader=null,t.decrement(r.Shader,this)),this._fShader&&=(e.deleteShader(this._fShader),null),this._glName&&(e.deleteProgram(this._glName),this._glName=null,t.decrement(r.Program,this))}_getUniformLocation(e){let t=this._nameToUniformLocation.get(e);if(t!==void 0)return t;if(this.glName){let t=this._context.gl.getUniformLocation(this.glName,e);return this._nameToUniformLocation.set(e,t),t&&this._context.instanceCounter.increment(r.Uniform,t),t}return null}hasUniform(e){return this._getUniformLocation(e)!=null}setUniform1i(e,t,n){f(n,t);let r=this._nameToUniform1.get(e);(r===void 0||t!==r)&&(this._context.gl.uniform1i(this._getUniformLocation(e),t),this._nameToUniform1.set(e,t))}setUniform1iv(e,t,n){p(n,t),u(this._nameToUniform1v,e,t)&&this._context.gl.uniform1iv(this._getUniformLocation(e),t)}setUniform2iv(e,t,n){p(n,t),u(this._nameToUniform2,e,t)&&this._context.gl.uniform2iv(this._getUniformLocation(e),t)}setUniform3iv(e,t,n){p(n,t),u(this._nameToUniform3,e,t)&&this._context.gl.uniform3iv(this._getUniformLocation(e),t)}setUniform4iv(e,t,n){p(n,t),u(this._nameToUniform4,e,t)&&this._context.gl.uniform4iv(this._getUniformLocation(e),t)}setUniform1f(e,t,n){f(n,t);let r=this._nameToUniform1.get(e);(r===void 0||t!==r)&&(this._context.gl.uniform1f(this._getUniformLocation(e),t),this._nameToUniform1.set(e,t))}setUniform1fv(e,t,n){p(n,t),u(this._nameToUniform1v,e,t)&&this._context.gl.uniform1fv(this._getUniformLocation(e),t)}setUniform2f(e,t,n,r){f(r,t,n);let i=this._nameToUniform2.get(e);i===void 0?(this._context.gl.uniform2f(this._getUniformLocation(e),t,n),this._nameToUniform2.set(e,[t,n])):(t!==i[0]||n!==i[1])&&(this._context.gl.uniform2f(this._getUniformLocation(e),t,n),i[0]=t,i[1]=n)}setUniform2fv(e,t,n){p(n,t),u(this._nameToUniform2,e,t)&&this._context.gl.uniform2fv(this._getUniformLocation(e),t)}setUniform3f(e,t,n,r,i){f(i,t,n,r);let a=this._nameToUniform3.get(e);a===void 0?(this._context.gl.uniform3f(this._getUniformLocation(e),t,n,r),this._nameToUniform3.set(e,[t,n,r])):(t!==a[0]||n!==a[1]||r!==a[2])&&(this._context.gl.uniform3f(this._getUniformLocation(e),t,n,r),a[0]=t,a[1]=n,a[2]=r)}setUniform3fv(e,t,n){p(n,t);let r=this._getUniformLocation(e);r!=null&&u(this._nameToUniform3,e,t)&&this._context.gl.uniform3fv(r,t)}setUniform4f(e,t,n,r,i,a){f(a,t,n,r,i);let o=this._nameToUniform4.get(e);o===void 0?(this._context.gl.uniform4f(this._getUniformLocation(e),t,n,r,i),this._nameToUniform4.set(e,[t,n,r,i])):(o===void 0||t!==o[0]||n!==o[1]||r!==o[2]||i!==o[3])&&(this._context.gl.uniform4f(this._getUniformLocation(e),t,n,r,i),o[0]=t,o[1]=n,o[2]=r,o[3]=i)}setUniform4fv(e,t,n){p(n,t);let r=this._getUniformLocation(e);r!=null&&u(this._nameToUniform4,e,t)&&this._context.gl.uniform4fv(r,t)}setUniformMatrix3fv(e,t,n=!1,r){p(r,t);let i=this._getUniformLocation(e);i!=null&&u(this._nameToUniformMatrix3,e,t)&&this._context.gl.uniformMatrix3fv(i,n,t)}setUniformMatrix4fv(e,t,n=!1,r){p(r,t);let i=this._getUniformLocation(e);if(i!=null){let r=this._nameToUniformMatrix4,a=r.get(e),o=!1;if(!a)r.set(e,Array.from(t)),o=!0;else{let n=t.length;if(a.length!==n)r.set(e,Array.from(t)),o=!0;else for(let e=0;e<n;++e){let r=t[e];if(a[e]!==r){for(a[e]=r;e<n;++e)a[e]=t[e];o=!0;break}}}o&&this._context.gl.uniformMatrix4fv(i,n,t)}}setUniformMatrices4fv(e,t,n=!1,r){p(r,t);let i=this._getUniformLocation(e);i!=null&&u(this._nameToUniformMatrix4,e,t)&&this._context.gl.uniformMatrix4fv(i,n,t)}stop(){}}function s(e,n,r){let i=e.gl,a=i.createShader(n);return i.shaderSource(a,r),i.compileShader(a),t()&&!i.getShaderParameter(a,i.COMPILE_STATUS)&&(console.error(`Compile error in ${n===35633?`vertex`:`fragment`} shader`),console.error(i.getShaderInfoLog(a)),console.error(c(r))),a}function c(e){let t=2;return e.replaceAll(`
2
+ import{update as e}from"../../core/arrayUtils.js";import has from"../../core/has.js";import t from"../../core/Logger.js";import{webglValidateShadersEnabled as n,webglDebugEnabled as r}from"./checkWebGLError.js";import{ResourceType as i}from"./enums.js";import{transpileShader as a}from"./ShaderTranspiler.js";const o=()=>t.getLogger(`esri.views.webgl.Program`),s=!!has(`esri-tests-disable-gpu-memory-measurements`);class c{constructor(e,t,r,c,u=new Map,d=[]){this._context=e,this._compiled=!1,this._linesOfCode=0,this._nameToUniformLocation=new Map,this._nameToUniform1=new Map,this._nameToUniform1v=new Map,this._nameToUniform2=new Map,this._nameToUniform3=new Map,this._nameToUniform4=new Map,this._nameToUniformMatrix3=new Map,this._nameToUniformMatrix4=new Map,e||o().error(`RenderingContext isn't initialized!`),t.length===0&&o().error(`Shaders source should not be empty!`),t=a(t,35633),r=a(r,35632),this._vShader=l(this._context,35633,t),this._fShader=l(this._context,35632,r),p.enabled&&(this._linesOfCode=t.match(/\n/g).length+r.match(/\n/g).length+2,e.instanceCounter.increment(i.LinesOfCode,this._vShader,this._linesOfCode)),this._vShader&&this._fShader||o().error(`Error loading shaders!`),e.instanceCounter.increment(i.Shader,this),n()&&(this.vertexShader=t,this.fragmentShader=r),this.usedMemory=s?0:t.length+r.length;let f=this._context.gl,m=f.createProgram();f.attachShader(m,this._vShader),f.attachShader(m,this._fShader),c.forEach((e,t)=>f.bindAttribLocation(m,e,t)),this.hasTransformFeedbackVaryings=!!d?.length,this.hasTransformFeedbackVaryings&&f.transformFeedbackVaryings(m,d,f.SEPARATE_ATTRIBS),f.linkProgram(m),n()&&!f.getProgramParameter(m,f.LINK_STATUS)&&o().error(`Could not link shader
3
+ validated: ${f.getProgramParameter(m,f.VALIDATE_STATUS)}, gl error ${f.getError()}, vertex: ${f.getShaderParameter(this._vShader,f.COMPILE_STATUS)}, fragment: ${f.getShaderParameter(this._fShader,f.COMPILE_STATUS)}, info log: ${f.getProgramInfoLog(m)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`);for(let[e,t]of u){let n=f.getUniformBlockIndex(m,e);n<0xffffffff&&f.uniformBlockBinding(m,n,t)}this._glName=m,e.instanceCounter.increment(i.Program,this)}get glName(){return this._glName}get hasGLName(){return this._glName!=null}get compiled(){return this._compiled?!0:!this._context.capabilities.parallelShaderCompile||this.glName==null?(this._compiled=!0,!0):(this._compiled=!!this._context.gl.getProgramParameter(this.glName,37297),this._compiled)}dispose(){let e=this._context.gl,t=this._context.instanceCounter;this._nameToUniformLocation.forEach(e=>e&&t.decrement(i.Uniform,e)),this._nameToUniformLocation.clear(),this._vShader&&(this._linesOfCode>0&&(t.decrement(i.LinesOfCode,this._vShader,this._linesOfCode),this._linesOfCode=0),e.deleteShader(this._vShader),this._vShader=null,t.decrement(i.Shader,this)),this._fShader&&=(e.deleteShader(this._fShader),null),this._glName&&(e.deleteProgram(this._glName),this._glName=null,t.decrement(i.Program,this))}_getUniformLocation(e){let t=this._nameToUniformLocation.get(e);if(t!==void 0)return t;if(this.glName){let t=this._context.gl.getUniformLocation(this.glName,e);return this._nameToUniformLocation.set(e,t),t&&this._context.instanceCounter.increment(i.Uniform,t),t}return null}hasUniform(e){return this._getUniformLocation(e)!=null}setUniform1i(e,t,n){m(n,t);let r=this._nameToUniform1.get(e);(r===void 0||t!==r)&&(this._context.gl.uniform1i(this._getUniformLocation(e),t),this._nameToUniform1.set(e,t))}setUniform1iv(e,t,n){h(n,t),f(this._nameToUniform1v,e,t)&&this._context.gl.uniform1iv(this._getUniformLocation(e),t)}setUniform2iv(e,t,n){h(n,t),f(this._nameToUniform2,e,t)&&this._context.gl.uniform2iv(this._getUniformLocation(e),t)}setUniform3iv(e,t,n){h(n,t),f(this._nameToUniform3,e,t)&&this._context.gl.uniform3iv(this._getUniformLocation(e),t)}setUniform4iv(e,t,n){h(n,t),f(this._nameToUniform4,e,t)&&this._context.gl.uniform4iv(this._getUniformLocation(e),t)}setUniform1f(e,t,n){m(n,t);let r=this._nameToUniform1.get(e);(r===void 0||t!==r)&&(this._context.gl.uniform1f(this._getUniformLocation(e),t),this._nameToUniform1.set(e,t))}setUniform1fv(e,t,n){h(n,t),f(this._nameToUniform1v,e,t)&&this._context.gl.uniform1fv(this._getUniformLocation(e),t)}setUniform2f(e,t,n,r){m(r,t,n);let i=this._nameToUniform2.get(e);i===void 0?(this._context.gl.uniform2f(this._getUniformLocation(e),t,n),this._nameToUniform2.set(e,[t,n])):(t!==i[0]||n!==i[1])&&(this._context.gl.uniform2f(this._getUniformLocation(e),t,n),i[0]=t,i[1]=n)}setUniform2fv(e,t,n){h(n,t),f(this._nameToUniform2,e,t)&&this._context.gl.uniform2fv(this._getUniformLocation(e),t)}setUniform3f(e,t,n,r,i){m(i,t,n,r);let a=this._nameToUniform3.get(e);a===void 0?(this._context.gl.uniform3f(this._getUniformLocation(e),t,n,r),this._nameToUniform3.set(e,[t,n,r])):(t!==a[0]||n!==a[1]||r!==a[2])&&(this._context.gl.uniform3f(this._getUniformLocation(e),t,n,r),a[0]=t,a[1]=n,a[2]=r)}setUniform3fv(e,t,n){h(n,t);let r=this._getUniformLocation(e);r!=null&&f(this._nameToUniform3,e,t)&&this._context.gl.uniform3fv(r,t)}setUniform4f(e,t,n,r,i,a){m(a,t,n,r,i);let o=this._nameToUniform4.get(e);o===void 0?(this._context.gl.uniform4f(this._getUniformLocation(e),t,n,r,i),this._nameToUniform4.set(e,[t,n,r,i])):(o===void 0||t!==o[0]||n!==o[1]||r!==o[2]||i!==o[3])&&(this._context.gl.uniform4f(this._getUniformLocation(e),t,n,r,i),o[0]=t,o[1]=n,o[2]=r,o[3]=i)}setUniform4fv(e,t,n){h(n,t);let r=this._getUniformLocation(e);r!=null&&f(this._nameToUniform4,e,t)&&this._context.gl.uniform4fv(r,t)}setUniformMatrix3fv(e,t,n=!1,r){h(r,t);let i=this._getUniformLocation(e);i!=null&&f(this._nameToUniformMatrix3,e,t)&&this._context.gl.uniformMatrix3fv(i,n,t)}setUniformMatrix4fv(e,t,n=!1,r){h(r,t);let i=this._getUniformLocation(e);if(i!=null){let r=this._nameToUniformMatrix4,a=r.get(e),o=!1;if(!a)r.set(e,Array.from(t)),o=!0;else{let n=t.length;if(a.length!==n)r.set(e,Array.from(t)),o=!0;else for(let e=0;e<n;++e){let r=t[e];if(a[e]!==r){for(a[e]=r;e<n;++e)a[e]=t[e];o=!0;break}}}o&&this._context.gl.uniformMatrix4fv(i,n,t)}}setUniformMatrices4fv(e,t,n=!1,r){h(r,t);let i=this._getUniformLocation(e);i!=null&&f(this._nameToUniformMatrix4,e,t)&&this._context.gl.uniformMatrix4fv(i,n,t)}stop(){}}function l(e,t,r){let i=e.gl,a=i.createShader(t);return i.shaderSource(a,r),i.compileShader(a),n()&&!i.getShaderParameter(a,i.COMPILE_STATUS)&&(o().error(`Compile error in ${t===35633?`vertex`:`fragment`} shader`),o().error(i.getShaderInfoLog(a)),o().error(u(r))),a}function u(e){let t=2;return e.replaceAll(`
4
4
  `,()=>`
5
- `+l(t++)+`:`)}function l(e){return e>=1e3?e.toString():(` `+e).slice(-3)}function u(t,n,r){let i=t.get(n);return i===void 0?(t.set(n,Array.from(r)),!0):e(i,r)}const d={enabled:!1},f=n()?(e,...t)=>p(e,t):()=>{},p=n()?(e,t)=>{if(e?.supportsNaN)return;let n=t.length;for(let e=0;e<n;++e){let n=t[e];Number.isNaN(n)&&console.error(`Got ${n} as uniform value from ${Error().stack}`)}}:()=>{};export{o as DisposableProgram,d as test};
5
+ `+d(t++)+`:`)}function d(e){return e>=1e3?e.toString():(` `+e).slice(-3)}function f(t,n,r){let i=t.get(n);return i===void 0?(t.set(n,Array.from(r)),!0):e(i,r)}const p={enabled:!1},m=r()?(e,...t)=>h(e,t):()=>{},h=r()?(e,t)=>{if(e?.supportsNaN)return;let n=t.length;for(let e=0;e<n;++e){let n=t[e];Number.isNaN(n)&&o().error(`Got ${n} as uniform value from ${Error().stack}`)}}:()=>{};export{c as DisposableProgram,p as test};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../core/Error.js";import"../../core/has.js";import t from"../../core/Logger.js";const n=()=>t.getLogger(`esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder`);class r{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class i extends r{constructor(){super(...arguments),this.vertex=new l,this.fragment=new l,this.attributes=new u,this.varyings=new d,this.outputs=new f}get attributeNames(){return this.attributes.names}get builder(){return this}generate(e,t=!1){let n=this.attributes.generateSource(e),r=this.varyings.generateSource(e),i=e===`vertex`?this.vertex:this.fragment,a=i.uniforms.generateSource(),o=i.code.generateSource(),s=i.main.generateSource(t),c=this.debugName?`// ${this.debugName}\n`:``,l=e===`vertex`?h:m,u=i.constants.generateSource(),d=this.outputs.generateSource(e);return`#version 300 es
2
+ import{filterInPlace as e}from"../../core/arrayUtils.js";import t from"../../core/Error.js";import"../../core/has.js";import n from"../../core/Logger.js";const r=()=>n.getLogger(`esri.views.3d.webgl-engine.core.shaderModules.ShaderBuilder`);class i{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class a extends i{constructor(){super(...arguments),this.vertex=new u,this.fragment=new u,this.attributes=new d,this.varyings=new f,this.outputs=new p}get attributeNames(){return this.attributes.names}get builder(){return this}generate(e,t=!1){let n=this.attributes.generateSource(e),r=this.varyings.generateSource(e),i=e===`vertex`?this.vertex:this.fragment,a=i.uniforms.generateSource(),o=i.code.generateSource(),s=i.main.generateSource(t),c=this.debugName?`// ${this.debugName}\n`:``,l=e===`vertex`?g:h,u=i.constants.generateSource(),d=this.outputs.generateSource(e);return`#version 300 es
3
3
  ${c}
4
4
  ${l}
5
5
  ${u.join(`
@@ -15,26 +15,26 @@ ${d.join(`
15
15
  ${o.join(`
16
16
  `)}
17
17
  ${s.join(`
18
- `)}`}generateBind(e){let t=new Map;this.vertex.uniforms.entries.forEach(e=>{let n=e.bind[0];n&&t.set(e.name,n)}),this.fragment.uniforms.entries.forEach(e=>{let n=e.bind[0];n&&t.set(e.name,n)});let n=Array.from(t.values()),r=n.length;return t=>{for(let i=0;i<r;++i)n[i](e,t)}}generateBindPass(e){let t=new Map;this.vertex.uniforms.entries.forEach(e=>{let n=e.bind[1];n&&t.set(e.name,n)}),this.fragment.uniforms.entries.forEach(e=>{let n=e.bind[1];n&&t.set(e.name,n)});let n=Array.from(t.values()),r=n.length;return(t,i)=>{for(let a=0;a<r;++a)n[a](e,i,t)}}generateBindDraw(e){let t=new Map;this.vertex.uniforms.entries.forEach(e=>{let n=e.bind[2];n&&t.set(e.name,n)}),this.fragment.uniforms.entries.forEach(e=>{let n=e.bind[2];n&&t.set(e.name,n)});let n=Array.from(t.values()),r=n.length;return(t,i,a)=>{for(let o=0;o<r;++o)n[o](e,a,t,i)}}}class a{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(let t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(t){if(t==null)n().error(`Trying to add null Uniform from ${Error().stack}.`);else{if(this._entries.has(t.name)&&!this._entries.get(t.name).equals(t))throw new e(`shaderbuilder:duplicate-uniform`,`Duplicate uniform name ${t.name} for different uniform type`);this._entries.set(t.name,t)}}generateSource(){return Array.from(this._entries.values()).map(({name:e,arraySize:t,type:n})=>t==null?`uniform ${n} ${e};`:`uniform ${n} ${e}[${t}];`)}get entries(){return Array.from(this._entries.values())}}class o{constructor(){this._entries=new Map}add(t,n){if(this._entries.has(t))throw new e(`shaderbuilder:duplicate-input`,`Duplicate input for ${t}`);this._entries.set(t,n)}get(t){let n=this._entries.get(t);if(n==null)throw new e(`shaderbuilder:input-resolver-error`,`No resolver for input ${t} found.`);return n()}}class s{constructor(e){this._stage=e,this._bodies=[]}add(e){return this._bodies.push(e),this._stage}generateSource(t){if(this._bodies.length>0){let e=[];for(let t of this._bodies)typeof t==`string`?e.push(t):e.push(...t());return[`void main() {\n ${e.join(`
19
- `)||``} \n}`]}if(t)throw new e(`shaderbuilder:missing-main`,`Shader does not contain main function body.`);return[]}}class c{constructor(e){this._stage=e,this._entries=[]}add(e){return this._entries.push(e),this._stage}generateSource(){let e=[];for(let t of this._entries)typeof t==`string`?e.push(t):e.push(...t());return e}}class l extends r{constructor(){super(...arguments),this.uniforms=new a(this),this.main=new s(this),this.code=new c(this),this.constants=new p(this),this.inputs=new o}get builder(){return this}}class u{constructor(){this._entries=[]}add(e,t){this._entries.push([e,t])}generateSource(e){return e===`fragment`?[]:this._entries.map(e=>`in ${e[1]} ${e[0]};`)}get names(){return this._entries.map(([e])=>e)}}class d{constructor(){this._entries=new Map}add(e,t,r){this._entries.has(e)?n().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,flat:r?.flat??!1,invariant:r?.invariant??!1})}generateSource(e){let t=[];return this._entries.forEach((n,r)=>t.push((n.invariant&&e===`vertex`?`invariant `:``)+(n.flat?`flat `:``)+(e===`vertex`?`out`:`in`)+` ${n.type} ${r};`)),t}}class f{constructor(){this._entries=new Map}add(e,t,r=0){let i=this._entries.get(r);i?.name===e&&i?.type===t?n().warn(`Fragment shader output location ${r} occupied`):this._entries.set(r,{name:e,type:t})}static{this.DEFAULT_TYPE=`vec4`}static{this.DEFAULT_NAME=`fragColor`}generateSource(e){if(e===`vertex`)return[];this._entries.size===0&&this._entries.set(0,{name:f.DEFAULT_NAME,type:f.DEFAULT_TYPE});let t=[];return this._entries.forEach((e,n)=>t.push(`layout(location = ${n}) out ${e.type} ${e.name};`)),t}}class p{constructor(e){this._stage=e,this._entries=new Set}add(e,t,n){let r=`ERROR_CONSTRUCTOR_STRING`;switch(t){case`float`:r=p._numberToFloatStr(n);break;case`int`:r=p._numberToIntStr(n);break;case`uint`:r=p._numberToUintStr(n);break;case`bool`:r=n.toString();break;case`vec2`:r=`vec2(${p._numberToFloatStr(n[0])},\
20
- ${p._numberToFloatStr(n[1])})`;break;case`vec3`:r=`vec3(${p._numberToFloatStr(n[0])},\
21
- ${p._numberToFloatStr(n[1])},\
22
- ${p._numberToFloatStr(n[2])})`;break;case`vec4`:r=`vec4(${p._numberToFloatStr(n[0])},\
23
- ${p._numberToFloatStr(n[1])},\
24
- ${p._numberToFloatStr(n[2])},\
25
- ${p._numberToFloatStr(n[3])})`;break;case`ivec2`:r=`ivec2(${p._numberToIntStr(n[0])},\
26
- ${p._numberToIntStr(n[1])})`;break;case`ivec3`:r=`ivec3(${p._numberToIntStr(n[0])},\
27
- ${p._numberToIntStr(n[1])},\
28
- ${p._numberToIntStr(n[2])})`;break;case`ivec4`:r=`ivec4(${p._numberToIntStr(n[0])},\
29
- ${p._numberToIntStr(n[1])},\
30
- ${p._numberToIntStr(n[2])},\
31
- ${p._numberToIntStr(n[3])})`;break;case`uvec2`:r=`uvec2(${p._numberToUintStr(n[0])},\
32
- ${p._numberToUintStr(n[1])})`;break;case`uvec3`:r=`uvec3(${p._numberToUintStr(n[0])},\
33
- ${p._numberToUintStr(n[1])},\
34
- ${p._numberToUintStr(n[2])})`;break;case`uvec4`:r=`uvec4(${p._numberToUintStr(n[0])},\
35
- ${p._numberToUintStr(n[1])},\
36
- ${p._numberToUintStr(n[2])},\
37
- ${p._numberToUintStr(n[3])})`;break;case`mat2`:case`mat3`:case`mat4`:r=`${t}(${Array.prototype.map.call(n,e=>p._numberToFloatStr(e)).join(`, `)})`}return this._entries.add(`const ${t} ${e} = ${r};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToUintStr(e){return`${e.toFixed(0)}u`}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const m=`#ifdef GL_FRAGMENT_PRECISION_HIGH
18
+ `)}`}generateBind(t){let n=new Map;this.vertex.uniforms.entries.forEach(e=>{let t=e.bind[0];t&&n.set(e.name,t)}),this.fragment.uniforms.entries.forEach(e=>{let t=e.bind[0];t&&n.set(e.name,t)});let r=Array.from(n.keys()),i=Array.from(n.values()),a=i.length;return n=>{r&&=(e(i,(e,n)=>t.hasUniform(r[n])),a=i.length,null);for(let e=0;e<a;++e)i[e](t,n)}}generateBindPass(e){let t=new Map;this.vertex.uniforms.entries.forEach(e=>{let n=e.bind[1];n&&t.set(e.name,n)}),this.fragment.uniforms.entries.forEach(e=>{let n=e.bind[1];n&&t.set(e.name,n)});let n=Array.from(t.values()),r=n.length;return(t,i)=>{for(let a=0;a<r;++a)n[a](e,i,t)}}generateBindDraw(e){let t=new Map;this.vertex.uniforms.entries.forEach(e=>{let n=e.bind[2];n&&t.set(e.name,n)}),this.fragment.uniforms.entries.forEach(e=>{let n=e.bind[2];n&&t.set(e.name,n)});let n=Array.from(t.values()),r=n.length;return(t,i,a)=>{for(let o=0;o<r;++o)n[o](e,a,t,i)}}}class o{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(let t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(e==null)r().error(`Trying to add null Uniform from ${Error().stack}.`);else{if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new t(`shaderbuilder:duplicate-uniform`,`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}}generateSource(){return Array.from(this._entries.values()).map(({name:e,arraySize:t,type:n})=>t==null?`uniform ${n} ${e};`:`uniform ${n} ${e}[${t}];`)}get entries(){return Array.from(this._entries.values())}}class s{constructor(){this._entries=new Map}add(e,n){if(this._entries.has(e))throw new t(`shaderbuilder:duplicate-input`,`Duplicate input for ${e}`);this._entries.set(e,n)}get(e){let n=this._entries.get(e);if(n==null)throw new t(`shaderbuilder:input-resolver-error`,`No resolver for input ${e} found.`);return n()}}class c{constructor(e){this._stage=e,this._bodies=[]}add(e){return this._bodies.push(e),this._stage}generateSource(e){if(this._bodies.length>0){let e=[];for(let t of this._bodies)typeof t==`string`?e.push(t):e.push(...t());return[`void main() {\n ${e.join(`
19
+ `)||``} \n}`]}if(e)throw new t(`shaderbuilder:missing-main`,`Shader does not contain main function body.`);return[]}}class l{constructor(e){this._stage=e,this._entries=[]}add(e){return this._entries.push(e),this._stage}generateSource(){let e=[];for(let t of this._entries)typeof t==`string`?e.push(t):e.push(...t());return e}}class u extends i{constructor(){super(...arguments),this.uniforms=new o(this),this.main=new c(this),this.code=new l(this),this.constants=new m(this),this.inputs=new s}get builder(){return this}}class d{constructor(){this._entries=[]}add(e,t){this._entries.push([e,t])}generateSource(e){return e===`fragment`?[]:this._entries.map(e=>`in ${e[1]} ${e[0]};`)}get names(){return this._entries.map(([e])=>e)}}class f{constructor(){this._entries=new Map}add(e,t,n){this._entries.has(e)?r().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,flat:n?.flat??!1,invariant:n?.invariant??!1})}generateSource(e){let t=[];return this._entries.forEach((n,r)=>t.push((n.invariant&&e===`vertex`?`invariant `:``)+(n.flat?`flat `:``)+(e===`vertex`?`out`:`in`)+` ${n.type} ${r};`)),t}}class p{constructor(){this._entries=new Map}add(e,t,n=0){let i=this._entries.get(n);i?.name===e&&i?.type===t?r().warn(`Fragment shader output location ${n} occupied`):this._entries.set(n,{name:e,type:t})}static{this.DEFAULT_TYPE=`vec4`}static{this.DEFAULT_NAME=`fragColor`}generateSource(e){if(e===`vertex`)return[];this._entries.size===0&&this._entries.set(0,{name:p.DEFAULT_NAME,type:p.DEFAULT_TYPE});let t=[];return this._entries.forEach((e,n)=>t.push(`layout(location = ${n}) out ${e.type} ${e.name};`)),t}}class m{constructor(e){this._stage=e,this._entries=new Set}add(e,t,n){let r=`ERROR_CONSTRUCTOR_STRING`;switch(t){case`float`:r=m._numberToFloatStr(n);break;case`int`:r=m._numberToIntStr(n);break;case`uint`:r=m._numberToUintStr(n);break;case`bool`:r=n.toString();break;case`vec2`:r=`vec2(${m._numberToFloatStr(n[0])},\
20
+ ${m._numberToFloatStr(n[1])})`;break;case`vec3`:r=`vec3(${m._numberToFloatStr(n[0])},\
21
+ ${m._numberToFloatStr(n[1])},\
22
+ ${m._numberToFloatStr(n[2])})`;break;case`vec4`:r=`vec4(${m._numberToFloatStr(n[0])},\
23
+ ${m._numberToFloatStr(n[1])},\
24
+ ${m._numberToFloatStr(n[2])},\
25
+ ${m._numberToFloatStr(n[3])})`;break;case`ivec2`:r=`ivec2(${m._numberToIntStr(n[0])},\
26
+ ${m._numberToIntStr(n[1])})`;break;case`ivec3`:r=`ivec3(${m._numberToIntStr(n[0])},\
27
+ ${m._numberToIntStr(n[1])},\
28
+ ${m._numberToIntStr(n[2])})`;break;case`ivec4`:r=`ivec4(${m._numberToIntStr(n[0])},\
29
+ ${m._numberToIntStr(n[1])},\
30
+ ${m._numberToIntStr(n[2])},\
31
+ ${m._numberToIntStr(n[3])})`;break;case`uvec2`:r=`uvec2(${m._numberToUintStr(n[0])},\
32
+ ${m._numberToUintStr(n[1])})`;break;case`uvec3`:r=`uvec3(${m._numberToUintStr(n[0])},\
33
+ ${m._numberToUintStr(n[1])},\
34
+ ${m._numberToUintStr(n[2])})`;break;case`uvec4`:r=`uvec4(${m._numberToUintStr(n[0])},\
35
+ ${m._numberToUintStr(n[1])},\
36
+ ${m._numberToUintStr(n[2])},\
37
+ ${m._numberToUintStr(n[3])})`;break;case`mat2`:case`mat3`:case`mat4`:r=`${t}(${Array.prototype.map.call(n,e=>m._numberToFloatStr(e)).join(`, `)})`}return this._entries.add(`const ${t} ${e} = ${r};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToUintStr(e){return`${e.toFixed(0)}u`}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const h=`#ifdef GL_FRAGMENT_PRECISION_HIGH
38
38
  precision highp float;
39
39
  precision highp int;
40
40
  precision highp sampler2D;
@@ -48,7 +48,7 @@ ${s.join(`
48
48
  precision mediump usampler2D;
49
49
  precision mediump sampler2DArray;
50
50
  precision mediump sampler2DShadow;
51
- #endif`,h=`precision highp float;
51
+ #endif`,g=`precision highp float;
52
52
  precision highp int;
53
53
  precision highp sampler2D;
54
54
  precision highp usampler2D;
@@ -57,4 +57,4 @@ ${s.join(`
57
57
 
58
58
 
59
59
  invariant gl_Position;
60
- `;export{c as Code,r as Includes,o as Inputs,s as Main,i as ShaderBuilder,l as Stage,a as Uniforms};
60
+ `;export{l as Code,i as Includes,s as Inputs,c as Main,a as ShaderBuilder,u as Stage,o as Uniforms};
package/webscene/Slide.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Basemap.js";import{property as n,cast as r,subclass as i}from"../core/accessorSupport/decorators.js";import{ensureType as a}from"../core/accessorSupport/ensureType.js";import{result as o}from"../core/asyncUtils.js";import{ClonableMixin as s}from"../core/Clonable.js";import c from"../core/Collection.js";import{referenceSetter as l}from"../core/collectionUtils.js";import{EventedMixin as u}from"../core/Evented.js";import{JSONSupport as d}from"../core/JSONSupport.js";import{squaredDistance as f}from"../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import m from"../core/Logger.js";import{moduloPositive as h}from"../core/mathUtils.js";import{destroyMaybe as g,removeMaybe as _}from"../core/maybe.js";import{onAbortOrThrow as v,createAbortError as y,isAbortError as b}from"../core/promiseUtils.js";import{whenOnce as x,when as S}from"../core/reactiveUtils.js";import{Milliseconds as C,Seconds as w}from"../core/time.js";import T from"../layers/Layer.js";import{basemapEnsureType as E,clonePreservingTiledLayers as D}from"../support/basemapEnsureType.js";import O from"../Viewpoint.js";import{TaskPriority as k}from"../views/support/Scheduler.js";import A from"../webdoc/support/SlideThumbnail.js";import{timeExtent as j}from"../webdoc/support/timeProperties.js";import M from"./SunLighting.js";import N from"./support/Description.js";import P from"./support/SlideElements.js";import F from"./support/SlideEnvironment.js";import I from"./support/SlideGround.js";import L from"./support/SlideVisibleLayer.js";import R from"./support/Title.js";import z from"./VirtualLighting.js";let B=0;const V=c.ofType(L),H=[`caption`,`cover`,`none`];let U=class extends s(u(d)){constructor(e){super(e),this.id=Date.now().toString(16)+`-slide-`+B++,this.hidden=!1,this.viewpoint=null,this.ground=null,this.layout=`caption`,this.enabledFocusAreas=null,this.environment=new F,this.timeExtent=null,this.timeZone=null,this.elements=new P,this.title=new R,this.description=new N,this.thumbnail=new A,this.visibleLayers=new V}destroy(){this.visibleLayers.removeAll(),this.enabledFocusAreas=null,this.basemap=null,this.thumbnail=g(this.thumbnail),this.description=null,this.title=null,this.thumbnail=null,this.elements.destroy()}get title(){return this._get(`title`)}set title(e){e=typeof e==`string`?new R({text:e}):a(R,e),this._set(`title`,e)}get description(){return this._get(`description`)}set description(e){e=typeof e==`string`?new N({text:e}):a(N,e),this._set(`description`,e)}get thumbnail(){return this._get(`thumbnail`)}set thumbnail(e){e=typeof e==`string`?new A({url:e}):a(A,e),this._set(`thumbnail`,e)}get basemap(){return this._get(`basemap`)}set basemap(e){this._set(`basemap`,E(e))}set visibleLayers(e){this._set(`visibleLayers`,l(e,this._get(`visibleLayers`),V))}castVisibleLayers(e){return!e||typeof e.map!=`function`?null:e.map(e=>{if(typeof e==`string`)return{id:e};if(e instanceof T){let t=K(e);return{id:e.id,sublayerIds:t}}return e.id?{id:e.id,sublayerIds:`sublayerIds`in e?e.sublayerIds:void 0}:(m.getLogger(this).warn(`Invalid visible layer, expected { id }, Layer or "id"`),e)})}async _updateVisibleLayers(e){let t=[];await Promise.allSettled(this._getLayers(e.map).map(n=>e.whenLayerView(n).then(e=>{if(e.visible){let r=K(n);t.push(new L({id:e.layer.id,sublayerIds:r}))}})).toArray()),this.visibleLayers.removeAll(),this.visibleLayers.addMany(t)}async updateFrom(e,t){let n={format:`png`,quality:80,width:120,height:75,disableDecorations:!0,...t?.screenshot};await e.when(),this.viewpoint=e.viewpoint.clone(),this.environment.lighting=e.environment.lighting.type===`virtual`?z.prototype.clone.apply(e.environment.lighting):M.prototype.clone.apply(e.environment.lighting),this.environment.weather=e.environment.weather.clone(),this.enabledFocusAreas=new c(e.focusAreasView?.enabledAreas.map(({id:e})=>e)??[]),this.basemap=e.map.basemap?.clone()||null,this.ground=e.map.ground?I.fromGround(e.map.ground):null,this.timeExtent=e.timeExtent?.clone()??null,this.timeZone=e.timeZone,this.elements.analyses.updateFrom(e),await this._updateVisibleLayers(e);let r=await e.takeScreenshot(n);return this.thumbnail=new A({url:r.dataUrl}),this}async applyTo(e,t){this.emit(`apply-slide-start`),this._applyToController!=null&&this._applyToController.abort();let n=new AbortController;this._applyToController=n;let r=v(t,()=>n?.abort()),i=()=>{this._applyToController===n&&(this._applyToController=null),n=null,r?.remove()};try{await x(()=>e.ready,n.signal)}catch(e){throw i(),e}if(n.signal.aborted)throw i(),this.emit(`apply-slide-cancel`),y();let a=e.resourceController.scheduler.registerTask(k.SLIDE),s=!1,c={animate:!0,...t,signal:this._applyToController.signal},l=await o(e.addUpdatingPromise((async()=>{await Promise.all([a.schedule(async()=>s=await this._setViewpointOfInterest(e,c)),a.schedule(()=>this._applyBasemap(e,c),c.signal),a.schedule(()=>this._loadLayersWithSublayerVisibility(e))]),await Promise.all([a.schedule(()=>this._applyLayerVisibility(e),c.signal),a.schedule(()=>this._applyFocusAreaEnabled(e.map?.focusAreas.areas)),a.schedule(()=>this._applyGround(e),c.signal),a.schedule(()=>this.elements.analyses.applyTo(e),c.signal),a.schedule(()=>this._applyViewpoint(e,c),c.signal),a.schedule(()=>e.timeExtent=this.timeExtent?.clone()??null,c.signal),a.schedule(()=>{this.timeZone!=null&&(e.timeZone=this.timeZone)},c.signal),a.schedule(()=>e.environment.weather=this.environment.weather.clone())])})()));if(s&&(e.contentCamera=null),a.remove(),i(),l.ok===!1)throw this.emit(`apply-slide-cancel`),l.error;return this.emit(`apply-slide-complete`),this}async _applyBasemap(e,t){if(this.basemap){try{await this.basemap.load(t)}catch(e){if(b(e))throw e}e.map.basemap=D(this.basemap,e.map.basemap)}}_applyGround(e){this.ground&&(e.map.ground=this.ground.cloneAndApplyTo(e.map.ground))}_applyFocusAreaEnabled(e){if(e&&this.enabledFocusAreas)for(let t of e)t.enabled=this.enabledFocusAreas.includes(t.id)}_getLayers(e){let t=new c;return this._collectLayers(e,t),this._collectLayers(e.ground,t),t}_collectLayers(e,t){e.layers.forEach(e=>{e.persistenceEnabled&&(t.add(e),`layers`in e&&this._collectLayers(e,t))})}async _loadLayersWithSublayerVisibility(e){this.visibleLayers&&await Promise.allSettled(this._getLayers(e.map).items.map(e=>this.visibleLayers.find(t=>t.id===e.id)?.sublayerIds?e.load():null))}_applyLayerVisibility(e){this.visibleLayers&&this._getLayers(e.map).forEach(e=>{let t=this.visibleLayers.find(t=>t.id===e.id);e.visible=t!=null;let n=t?.sublayerIds,r=G(e);n&&r&&r.forEach(e=>e.visible=n.includes(e.id))})}async _setViewpointOfInterest(e,t){if(e.state.fixedContentCamera||!this.viewpoint||t?.ignoreViewpoint||!t?.useDestinationCamera)return!1;let{toCameraAsync:n}=await import(`../views/3d/support/viewpointUtils.js`),r=await n(e,this.viewpoint);return e.contentCamera=r,r!=null}async _applyViewpoint(e,t){if(this._applyCachedCameraTrackingEnabled(e),this.viewpoint&&!t.ignoreViewpoint){let n=this.environment.lighting;if(t.animate&&n.type===`sun`&&n.date)return this._animateToLighting(e,t);t.animate&&(e.environment.applyLighting(n.clone()),await e.goTo(this.viewpoint,t)),e.viewpoint=this.viewpoint}e.environment.applyLighting(this.environment.lighting.clone())}async _animateToLighting(e,t){let n=null;return e.environment.lighting.type!==`virtual`&&this.environment.lighting.type!==`virtual`&&(e.viewingMode===`global`&&(n=this._animateLightingWithCamera(e,e.environment.lighting,this.environment.lighting)),e.environment.cachedCameraTrackingEnabled=e.environment.lighting.cameraTrackingEnabled,e.environment.lighting.cameraTrackingEnabled=!1),e.environment.lighting.glow=this.environment.lighting.glow,e.environment.lighting.directShadowsEnabled=this.environment.lighting.directShadowsEnabled,this.environment.lighting.type===`virtual`||e.environment.lighting.type===`virtual`?(e.environment.applyLighting(this.environment.lighting.clone()),e.environment.lighting.type!==`virtual`&&(e.environment.cachedCameraTrackingEnabled=e.environment.lighting.cameraTrackingEnabled,e.environment.lighting.cameraTrackingEnabled=!1)):this.environment.lighting.displayUTCOffset!=null&&(e.environment.lighting.displayUTCOffset=this.environment.lighting.displayUTCOffset),e.goTo(this.viewpoint,t).then(()=>{this._applyCachedCameraTrackingEnabled(e),e.environment.applyLighting(this.environment.lighting.clone())}).catch(t=>{throw e.animation??this._applyCachedCameraTrackingEnabled(e),t}).finally(()=>{_(n)})}_applyCachedCameraTrackingEnabled(e){e.environment.cachedCameraTrackingEnabled!=null&&(e.environment.lighting.cameraTrackingEnabled=e.environment.cachedCameraTrackingEnabled,e.environment.cachedCameraTrackingEnabled=null)}_getTime(e){return[C(e.getTime()),w(e.getUTCHours()*3600+e.getUTCMinutes()*60+e.getUTCSeconds())]}_setTime(e,t,n){return e.setTime(t),e.setUTCHours(n/3600),e.setUTCMinutes(n%3600/60),e.setUTCSeconds(n%3600%60),e}_animateLightingWithCamera(e,t,n){let r=new Date(t.date.toString()),[i,a]=this._getTime(r),[o,s]=this._getTime(n.date),c=Y(a,s),l=e.renderCoordsHelper,u=p();l.toRenderCoords(e.camera.position,u);let d=p(),m=p();this.viewpoint.camera!=null&&l.toRenderCoords(this.viewpoint.camera.position,d);let h=new Date;return S(()=>e.camera,e=>{l.toRenderCoords(e.position,m);let n=f(u,m),r=f(d,m),s=0;n+r!==0&&(s=n/(n+r));let p=i+(o-i)*s,g=X(a,w(c*s));t.date=this._setTime(h,p,g)})}write(e,t){t?.origin||(t={origin:`web-scene`,...t});let n=super.write(e,t);return n?.elements&&Object.keys(n.elements).length===0&&delete n.elements,n}read(e,t){t?.origin||(t={origin:`web-scene`,...t}),super.read(e,t)}static createFrom(e,t){return new this().updateFrom(e,t)}};e([n({type:String,json:{write:{isRequired:!0}}})],U.prototype,`id`,void 0),e([n({type:R,useTypeForAutocast:!1,json:{default:()=>new R({text:``}),write:{isRequired:!0}}})],U.prototype,`title`,null),e([n({type:N,useTypeForAutocast:!1,json:{write:{overridePolicy(e){return{enabled:!!(e&&e.text)}}}}})],U.prototype,`description`,null),e([n({type:Boolean,nonNullable:!0,json:{write:!0,default:!1}})],U.prototype,`hidden`,void 0),e([n({type:A,useTypeForAutocast:!1,json:{default:()=>new A({url:``}),write:{isRequired:!0}}})],U.prototype,`thumbnail`,null),e([n({type:O,nonNullable:!0,json:{write:{isRequired:!0}}})],U.prototype,`viewpoint`,void 0),e([n({type:t,useTypeForAutocast:!1,json:{read:{source:`baseMap`},write:{target:`baseMap`}}})],U.prototype,`basemap`,null),e([n({type:I,json:{write:!0}})],U.prototype,`ground`,void 0),e([n({type:H,json:{write:!0,default:`caption`},nonNullable:!0})],U.prototype,`layout`,void 0),e([n({type:V,json:{write:{isRequired:!0}}})],U.prototype,`visibleLayers`,null),e([r(`visibleLayers`)],U.prototype,`castVisibleLayers`,null),e([n({type:c.ofType(String),json:{write:!0},clonable:e=>e?new c(e.items):null})],U.prototype,`enabledFocusAreas`,void 0),e([n({type:F,json:{write:!0}})],U.prototype,`environment`,void 0),e([n(j)],U.prototype,`timeExtent`,void 0),e([n({type:String,json:{read:!0,write:!0}})],U.prototype,`timeZone`,void 0),e([n({type:P,nonNullable:!0,json:{write:!0}})],U.prototype,`elements`,void 0),U=e([i(`esri.webscene.Slide`)],U);const W=U;function G(e){if(e.type===`building-scene`||e.type===`map-image`)return e.allSublayers.toArray()}function K(e){let t=G(e);if(t)return t.filter(e=>e.visible).map(e=>e.id)}const q=w(86400),J=w(43200);function Y(e,t){let n=t-e;return n>J&&(n-=q),n<-J&&(n+=q),w(n)}function X(e,t){return w(h(e+t,q))}export{W as default};
2
+ import{__decorate as e}from"tslib";import t from"../Basemap.js";import{property as n,cast as r,subclass as i}from"../core/accessorSupport/decorators.js";import{ensureType as a}from"../core/accessorSupport/ensureType.js";import{result as o}from"../core/asyncUtils.js";import{ClonableMixin as s}from"../core/Clonable.js";import c from"../core/Collection.js";import{referenceSetter as l}from"../core/collectionUtils.js";import{EventedMixin as u}from"../core/Evented.js";import{JSONSupport as d}from"../core/JSONSupport.js";import{squaredDistance as f}from"../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import m from"../core/Logger.js";import{moduloPositive as h}from"../core/mathUtils.js";import{destroyMaybe as g,removeMaybe as _}from"../core/maybe.js";import{onAbortOrThrow as v,createAbortError as y,isAbortError as b}from"../core/promiseUtils.js";import{whenOnce as x,when as S}from"../core/reactiveUtils.js";import{Milliseconds as C,Seconds as w}from"../core/time.js";import T from"../layers/Layer.js";import{basemapEnsureType as E,clonePreservingTiledLayers as D}from"../support/basemapEnsureType.js";import O from"../Viewpoint.js";import{TaskPriority as k}from"../views/support/Scheduler.js";import A from"../webdoc/support/SlideThumbnail.js";import{timeExtent as j}from"../webdoc/support/timeProperties.js";import M from"./SunLighting.js";import N from"./support/Description.js";import P from"./support/SlideElements.js";import F from"./support/SlideEnvironment.js";import I from"./support/SlideGround.js";import L from"./support/SlideVisibleLayer.js";import R from"./support/Title.js";import z from"./VirtualLighting.js";let B=0;const V=c.ofType(L),H=[`caption`,`cover`,`none`];let U=class extends s(u(d)){constructor(e){super(e),this.id=Date.now().toString(16)+`-slide-`+B++,this.hidden=!1,this.viewpoint=null,this.ground=null,this.layout=`caption`,this.enabledFocusAreas=null,this.environment=new F,this.timeExtent=null,this.timeZone=null,this.elements=new P,this.title=new R,this.description=new N,this.thumbnail=new A,this.visibleLayers=new V}destroy(){this.visibleLayers.removeAll(),this.enabledFocusAreas=null,this.basemap=null,this.thumbnail=g(this.thumbnail),this.description=null,this.title=null,this.thumbnail=null,this.elements.destroy()}get title(){return this._get(`title`)}set title(e){e=typeof e==`string`?new R({text:e}):a(R,e),this._set(`title`,e)}get description(){return this._get(`description`)}set description(e){e=typeof e==`string`?new N({text:e}):a(N,e),this._set(`description`,e)}get thumbnail(){return this._get(`thumbnail`)}set thumbnail(e){e=typeof e==`string`?new A({url:e}):a(A,e),this._set(`thumbnail`,e)}get basemap(){return this._get(`basemap`)}set basemap(e){this._set(`basemap`,E(e))}set visibleLayers(e){this._set(`visibleLayers`,l(e,this._get(`visibleLayers`),V))}castVisibleLayers(e){return!e||typeof e.map!=`function`?null:e.map(e=>{if(typeof e==`string`)return{id:e};if(e instanceof T){let t=K(e);return{id:e.id,sublayerIds:t}}return e.id?{id:e.id,sublayerIds:`sublayerIds`in e?e.sublayerIds:void 0}:(m.getLogger(this).warn(`Invalid visible layer, expected { id }, Layer or "id"`),e)})}async _updateVisibleLayers(e){let t=[];await Promise.allSettled(this._getLayers(e.map).map(n=>e.whenLayerView(n).then(e=>{if(e.visible){let r=K(n);t.push(new L({id:e.layer.id,sublayerIds:r}))}})).toArray()),this.visibleLayers.removeAll(),this.visibleLayers.addMany(t)}async updateFrom(e,t){let n={format:`png`,quality:80,width:120,height:75,disableDecorations:!0,...t?.screenshot};await e.when(),this.viewpoint=e.viewpoint.clone(),this.environment.lighting=e.environment.lighting.type===`virtual`?z.prototype.clone.apply(e.environment.lighting):M.prototype.clone.apply(e.environment.lighting),this.environment.weather=e.environment.weather.clone(),this.enabledFocusAreas=new c(e.focusAreasView?.enabledAreas.map(({id:e})=>e)??[]),this.basemap=e.map.basemap?.clone()||null,this.ground=e.map.ground?I.fromGround(e.map.ground):null,this.timeExtent=e.timeExtent?.clone()??null,this.timeZone=e.timeZone,this.elements.analyses.updateFrom(e),await this._updateVisibleLayers(e);let r=await e.takeScreenshot(n);return this.thumbnail=new A({url:r.dataUrl}),this}async applyTo(e,t){this.emit(`apply-slide-start`),this._applyToController!=null&&this._applyToController.abort();let n=new AbortController;this._applyToController=n;let r=v(t,()=>n?.abort()),i=()=>{this._applyToController===n&&(this._applyToController=null),n=null,r?.remove()};try{await x(()=>e.ready,n.signal)}catch(e){throw i(),e}if(n.signal.aborted)throw i(),this.emit(`apply-slide-cancel`),y();let a=e.resourceController.scheduler.registerTask(k.SLIDE),s=!1,c={animate:!0,...t,signal:this._applyToController.signal},l=await o(e.addUpdatingPromise((async()=>{await Promise.all([a.schedule(async()=>s=await this._setViewpointOfInterest(e,c)),a.schedule(()=>this._applyBasemap(e,c),c.signal),a.schedule(()=>this._loadLayersWithSublayerVisibility(e))]),await Promise.all([a.schedule(()=>this._applyLayerVisibility(e),c.signal),a.schedule(()=>this._applyFocusAreaEnabled(e.map?.focusAreas.areas)),a.schedule(()=>this._applyGround(e),c.signal),a.schedule(()=>this.elements.analyses.applyTo(e),c.signal),a.schedule(()=>this._applyViewpoint(e,c),c.signal),a.schedule(()=>e.timeExtent=this.timeExtent?.clone()??null,c.signal),a.schedule(()=>{this.timeZone!=null&&(e.timeZone=this.timeZone)},c.signal),a.schedule(()=>e.environment.weather=this.environment.weather.clone())])})()));if(s&&(e.contentCamera=null),a.remove(),i(),l.ok===!1)throw this.emit(`apply-slide-cancel`),l.error;return this.emit(`apply-slide-complete`),this}async _applyBasemap(e,t){if(this.basemap){try{await this.basemap.load(t)}catch(e){if(b(e))throw e}e.map.basemap=D(this.basemap,e.map.basemap)}}_applyGround(e){this.ground&&(e.map.ground=this.ground.cloneAndApplyTo(e.map.ground))}_applyFocusAreaEnabled(e){if(e&&this.enabledFocusAreas)for(let t of e)t.enabled=this.enabledFocusAreas.includes(t.id)}_getLayers(e){let t=new c;return this._collectLayers(e,t),this._collectLayers(e.ground,t),t}_collectLayers(e,t){e.layers.forEach(e=>{e.persistenceEnabled&&(t.add(e),`layers`in e&&this._collectLayers(e,t))})}async _loadLayersWithSublayerVisibility(e){this.visibleLayers&&await Promise.allSettled(this._getLayers(e.map).items.map(e=>this.visibleLayers.find(t=>t.id===e.id)?.sublayerIds?e.load():null))}_applyLayerVisibility(e){this.visibleLayers&&this._getLayers(e.map).forEach(e=>{let t=this.visibleLayers.find(t=>t.id===e.id);e.visible=t!=null;let n=t?.sublayerIds,r=G(e);n&&r&&r.forEach(e=>e.visible=n.includes(e.id))})}async _setViewpointOfInterest(e,t){if(e.state.fixedContentCamera||!this.viewpoint||t?.ignoreViewpoint||!t?.useDestinationCamera)return!1;let{toCameraAsync:n}=await import(`../views/3d/support/viewpointUtils.js`),r=await n(e,this.viewpoint);return e.contentCamera=r,r!=null}async _applyViewpoint(e,t){if(this._applyCachedCameraTrackingEnabled(e),this.viewpoint&&!t.ignoreViewpoint){let n=this.environment.lighting;if(t.animate&&n.type===`sun`&&n.date)return this._animateToLighting(e,t);t.animate&&(e.environment.applyLighting(n.clone()),await e.goTo(this.viewpoint,t)),e.viewpoint=this.viewpoint}e.environment.applyLighting(this.environment.lighting.clone())}async _animateToLighting(e,t){let n=null;return e.environment.lighting.type!==`virtual`&&this.environment.lighting.type!==`virtual`&&(e.state.isGlobal&&(n=this._animateLightingWithCamera(e,e.environment.lighting,this.environment.lighting)),e.environment.cachedCameraTrackingEnabled=e.environment.lighting.cameraTrackingEnabled,e.environment.lighting.cameraTrackingEnabled=!1),e.environment.lighting.glow=this.environment.lighting.glow,e.environment.lighting.directShadowsEnabled=this.environment.lighting.directShadowsEnabled,this.environment.lighting.type===`virtual`||e.environment.lighting.type===`virtual`?(e.environment.applyLighting(this.environment.lighting.clone()),e.environment.lighting.type!==`virtual`&&(e.environment.cachedCameraTrackingEnabled=e.environment.lighting.cameraTrackingEnabled,e.environment.lighting.cameraTrackingEnabled=!1)):this.environment.lighting.displayUTCOffset!=null&&(e.environment.lighting.displayUTCOffset=this.environment.lighting.displayUTCOffset),e.goTo(this.viewpoint,t).then(()=>{this._applyCachedCameraTrackingEnabled(e),e.environment.applyLighting(this.environment.lighting.clone())}).catch(t=>{throw e.animation??this._applyCachedCameraTrackingEnabled(e),t}).finally(()=>{_(n)})}_applyCachedCameraTrackingEnabled(e){e.environment.cachedCameraTrackingEnabled!=null&&(e.environment.lighting.cameraTrackingEnabled=e.environment.cachedCameraTrackingEnabled,e.environment.cachedCameraTrackingEnabled=null)}_getTime(e){return[C(e.getTime()),w(e.getUTCHours()*3600+e.getUTCMinutes()*60+e.getUTCSeconds())]}_setTime(e,t,n){return e.setTime(t),e.setUTCHours(n/3600),e.setUTCMinutes(n%3600/60),e.setUTCSeconds(n%3600%60),e}_animateLightingWithCamera(e,t,n){let r=new Date(t.date.toString()),[i,a]=this._getTime(r),[o,s]=this._getTime(n.date),c=Y(a,s),l=e.renderCoordsHelper,u=p();l.toRenderCoords(e.camera.position,u);let d=p(),m=p();this.viewpoint.camera!=null&&l.toRenderCoords(this.viewpoint.camera.position,d);let h=new Date;return S(()=>e.camera,e=>{l.toRenderCoords(e.position,m);let n=f(u,m),r=f(d,m),s=0;n+r!==0&&(s=n/(n+r));let p=i+(o-i)*s,g=X(a,w(c*s));t.date=this._setTime(h,p,g)})}write(e,t){t?.origin||(t={origin:`web-scene`,...t});let n=super.write(e,t);return n?.elements&&Object.keys(n.elements).length===0&&delete n.elements,n}read(e,t){t?.origin||(t={origin:`web-scene`,...t}),super.read(e,t)}static createFrom(e,t){return new this().updateFrom(e,t)}};e([n({type:String,json:{write:{isRequired:!0}}})],U.prototype,`id`,void 0),e([n({type:R,useTypeForAutocast:!1,json:{default:()=>new R({text:``}),write:{isRequired:!0}}})],U.prototype,`title`,null),e([n({type:N,useTypeForAutocast:!1,json:{write:{overridePolicy(e){return{enabled:!!(e&&e.text)}}}}})],U.prototype,`description`,null),e([n({type:Boolean,nonNullable:!0,json:{write:!0,default:!1}})],U.prototype,`hidden`,void 0),e([n({type:A,useTypeForAutocast:!1,json:{default:()=>new A({url:``}),write:{isRequired:!0}}})],U.prototype,`thumbnail`,null),e([n({type:O,nonNullable:!0,json:{write:{isRequired:!0}}})],U.prototype,`viewpoint`,void 0),e([n({type:t,useTypeForAutocast:!1,json:{read:{source:`baseMap`},write:{target:`baseMap`}}})],U.prototype,`basemap`,null),e([n({type:I,json:{write:!0}})],U.prototype,`ground`,void 0),e([n({type:H,json:{write:!0,default:`caption`},nonNullable:!0})],U.prototype,`layout`,void 0),e([n({type:V,json:{write:{isRequired:!0}}})],U.prototype,`visibleLayers`,null),e([r(`visibleLayers`)],U.prototype,`castVisibleLayers`,null),e([n({type:c.ofType(String),json:{write:!0},clonable:e=>e?new c(e.items):null})],U.prototype,`enabledFocusAreas`,void 0),e([n({type:F,json:{write:!0}})],U.prototype,`environment`,void 0),e([n(j)],U.prototype,`timeExtent`,void 0),e([n({type:String,json:{read:!0,write:!0}})],U.prototype,`timeZone`,void 0),e([n({type:P,nonNullable:!0,json:{write:!0}})],U.prototype,`elements`,void 0),U=e([i(`esri.webscene.Slide`)],U);const W=U;function G(e){if(e.type===`building-scene`||e.type===`map-image`)return e.allSublayers.toArray()}function K(e){let t=G(e);if(t)return t.filter(e=>e.visible).map(e=>e.id)}const q=w(86400),J=w(43200);function Y(e,t){let n=t-e;return n>J&&(n-=q),n<-J&&(n+=q),w(n)}function X(e,t){return w(h(e+t,q))}export{W as default};
@@ -30,10 +30,8 @@ export default class VirtualLighting extends JSONSupport {
30
30
  * Shadows are only displayed for real world 3D objects. Terrain doesn't cast shadows. In local scenes at small zoom
31
31
  * levels, shadows are not displayed. For more control on which 3D objects cast shadows use the `castShadows`
32
32
  * property available on [ObjectSymbol3DLayer.castShadows](https://developers.arcgis.com/javascript/latest/references/core/symbols/ObjectSymbol3DLayer/#castShadows),
33
- *
34
- * [FillSymbol3DLayer.castShadows](https://developers.arcgis.com/javascript/latest/references/core/symbols/FillSymbol3DLayer/#castShadows),
35
- * [ExtrudeSymbol3DLayer.castShadows](https://developers.arcgis.com/javascript/latest/references/core/symbols/ExtrudeSymbol3DLayer/#castShadows),
36
- * and [PathSymbol3DLayer.castShadows](https://developers.arcgis.com/javascript/latest/references/core/symbols/PathSymbol3DLayer/#castShadows).
33
+ * [FillSymbol3DLayer.castShadows](https://developers.arcgis.com/javascript/latest/references/core/symbols/FillSymbol3DLayer/#castShadows), [ExtrudeSymbol3DLayer.castShadows](https://developers.arcgis.com/javascript/latest/references/core/symbols/ExtrudeSymbol3DLayer/#castShadows),
34
+ * [WaterSymbol3DLayer.castShadows](https://developers.arcgis.com/javascript/latest/references/core/symbols/WaterSymbol3DLayer/#castShadows), and [PathSymbol3DLayer.castShadows](https://developers.arcgis.com/javascript/latest/references/core/symbols/PathSymbol3DLayer/#castShadows).
37
35
  *
38
36
  * @default false
39
37
  */
@@ -6,7 +6,7 @@ import type { InputUnion } from "../../../form/elements/inputs/types.js";
6
6
  import type { FieldValue } from "../../../layers/support/fieldUtils.js";
7
7
  import type { NumericRange } from "../../../layers/support/NumericRange.js";
8
8
  import type { DomainUnion as Domain } from "../../../layers/support/types.js";
9
- import type { FieldInputDataTypes } from "../../support/forms/types.js";
9
+ import type { FieldInputDataTypes, FieldValueOptionSet } from "../../support/forms/types.js";
10
10
  import type { EditableInputProperties } from "./EditableInput.js";
11
11
  import type { FieldInputMessage } from "./types.js";
12
12
  import type { InputController } from "./support/controllerUtils.js";
@@ -30,6 +30,8 @@ export default class FieldInput extends EditableInput<any> {
30
30
  * [BatchAttributeFormViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/BatchAttributeFormViewModel/)
31
31
  */
32
32
  constructor(properties: FieldInputProperties);
33
+ /** @internal */
34
+ get codedValueOptions(): FieldValueOptionSet;
33
35
  /**
34
36
  * The type of data displayed by the field input. Possible values are listed below.
35
37
  *
@@ -73,6 +75,12 @@ export default class FieldInput extends EditableInput<any> {
73
75
  accessor inputController: InputController | null;
74
76
  /** An array of features that do not have a valid value for this field. */
75
77
  get invalidFeatures(): Graphic[];
78
+ /**
79
+ * Indicates whether the field is a subtype field for any of the layers associated with this input.
80
+ *
81
+ * @internal
82
+ */
83
+ get isSubtypeField(): boolean;
76
84
  /** The input's label. */
77
85
  get label(): string;
78
86
  /** The maximum length of the input. If no length is specified, the value is `-1`. */
@@ -107,6 +115,14 @@ export default class FieldInput extends EditableInput<any> {
107
115
  get range(): NumericRange;
108
116
  /** Indicates whether the field is required. This property will be true if it is required for any associated layers of the input. */
109
117
  get required(): boolean;
118
+ /**
119
+ * Indicates whether the "No Value" option is enabled for the field input.
120
+ * This property takes into account whether the field is required and whether
121
+ * the input's `showNoValue` property is set`.
122
+ *
123
+ * @internal
124
+ */
125
+ get showNoValueOptionEnabled(): boolean;
110
126
  /**
111
127
  * The status of the field input.
112
128
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../core/accessorSupport/decorators.js";import{isSome as r}from"../../../core/arrayUtils.js";import i from"../../../core/Logger.js";import{destroyMaybe as a}from"../../../core/maybe.js";import{isDynamicChoiceInput as o,isMultipleChoiceInput as s}from"../../../form/elements/inputs/inputUtils.js";import c from"../../../layers/support/CodedValue.js";import l from"../../../layers/support/CodedValueDomain.js";import{getDomainRange as u,validateDomainValue as d,dateTimeFieldValuesToNumericRange as f,isDomainValidForField as p}from"../../../layers/support/domainUtils.js";import{getFieldRange as m,isDateOnlyField as h,isTimeOnlyField as g,isTimestampOffsetField as _}from"../../../layers/support/fieldUtils.js";import{supportsFieldConfiguration as v}from"../../../layers/support/layerUtils.js";import y from"../../../layers/support/RangeDomain.js";import{isNumber as b}from"../../../support/guards.js";import{timeResolutionToStepMap as x}from"../../support/dateUtils.js";import{valuesAreEquivalent as S,getMaxLength as C,getMinLength as w,dateIsValid as T,validateFormValue as E}from"../../support/forms/formUtils.js";import D from"./EditableInput.js";import{isMultipleChoiceController as O}from"./support/controllerUtils.js";import k from"./support/DynamicChoiceController.js";import{MultiFeatureError as A,getFieldInputDataType as j,visibilityCodeToBoolean as M,isFieldInputWithShowNoValueOptionInput as N,isWarning as P,isContingentValuesError as F,FormValidationWarning as I,differentValuesString as L}from"./support/inputUtils.js";import R from"./support/MultipleChoiceController.js";import{otherChoiceCheckedPlaceholderValue as z}from"./support/multipleChoiceInputUtils.js";let B=class extends D{constructor(e){super(e),this.getExternalErrorForFeature=null,this.getFieldValueOptionsForFeature=null,this.group=null,this.inputController=null,this.touched=!1,this.type=`field`,this.userHasChangedValue=!1,this._hasIntersectionWithElementFieldDomain=!1}destroy(){this.inputController=a(this.inputController)}initialize(){if(this.input){if(o(this.input)){let{requestDeferredExpressionEvaluation:e}=this;e?this.inputController=new k({fieldInput:this,requestDeferredExpressionEvaluation:e}):i.getLogger(this).error(`requestDeferredExpressionEvaluation callback is required for dynamic choice inputs.`)}s(this.input)&&(this.inputController=new R({fieldInput:this}))}}get compositeError(){if(this.valid)return null;let{errors:e}=this;if(e.length<this.features.length)return A.DIFFERENT_ERRORS;let t=e[0];for(let n of e)if(n.error!==t.error)return A.DIFFERENT_ERRORS;return t.error}get dataType(){return j(this.field)}get domain(){let e=this._allDomains.toArray();return this.calculateDomain(e)}get distinctValues(){if(this.featuresHaveSameValue)return[this.value];let e=new Set;for(let t of this.features)e.add(t.getAttribute(this.fieldName));return Array.from(e)}get editable(){return this.field.editable?this._evaluatedEditableExpression??!0:!1}get label(){let{label:e}=this.template,t=this._computeStringLiteralText(e);if(t)return t;let{field:n,layers:r}=this;if(r.length===1){let e=r[0];if(v(e)){let t=e.getFieldAlias(n.name);if(t!=null&&t!==``)return t}}return n.alias||n.name}get effectiveVisible(){return M(this.effectiveVisibilityCode)}get effectiveVisibilityCode(){let{visibilityCode:e}=this;if(e!==`visible`)return e;let{group:t}=this;if(t==null)return e;let n=t.visibilityCode;return n===`hidden:visibility-expression:all-features`?`hidden:group-visibility-expression:all-features`:n===`hidden:visibility-expression:some-features`?`hidden:group-visibility-expression:some-features`:e}get errors(){return this._validate()}get featuresHaveSameValue(){let{fieldName:e}=this,t=this.features.at(0)?.getAttribute(e);return this.features.every(n=>S(n.getAttribute(e),t))}get field(){return this.template.field}get fieldName(){return this.field.name}get input(){return this.template.input}get invalidFeatures(){return this.errors.map(e=>e.feature)}get isSubtypeField(){return this.layers.some(e=>{if(e&&`subtypeField`in e){let{subtypeField:t,fieldsIndex:n}=e;return(n.get(t)?.name??t)===this.fieldName}return!1})}get showNoValueOptionEnabled(){let{input:e}=this;return this.required?!1:!N(e)||e?.showNoValueOption===!0}get showNoValueLabel(){let{input:e}=this;return N(e)?e?.noValueOptionLabel:null}get includeTime(){let{template:e,field:t}=this;return this.dataType===`date`?t.type===`time-only`?!0:t.type===`date-only`?!1:e.input?.type!==`datetime-picker`||e.input.includeTime:!1}get includeTimeOffset(){if(this.field.type!==`timestamp-offset`)return!1;let{input:e}=this;return!e||e.type===`timestampoffset-picker`&&e.includeTimeOffset}get inputType(){return this.input?.type}get maxLength(){return C({dataType:this.dataType,field:this.field,input:this.input})}get minLength(){return w({dataType:this.dataType,field:this.field,input:this.input})}get multipleChoiceOtherChoiceCheckboxState(){return H(this.inputController)?.otherChoiceCheckboxState??{checked:!1,indeterminate:!1}}get placeholder(){return this.template.hint}get range(){if(this.dataType===`date`)return this._dateRange;let{domain:e,field:t}=this;if(e){let n=u(t,e);return{max:n?.max,min:n?.min}}let n=this._allDomains.toArray().every(e=>!e)?m(t):null;return{max:n?.max===Number.MAX_VALUE?null:n?.max??null,min:n?.min===-Number.MAX_VALUE?null:n?.min??null}}get required(){if(!this.editable)return!1;if(!this.field.nullable||this.isSubtypeField)return!0;let e=this.visible&&this.group?.visible!==!1,t=this._evaluatedRequiredExpression;return e&&t!=null?t:!1}get status(){let{validationMessage:e}=this;return e?P(e)?`idle`:`invalid`:this.valid?`valid`:`idle`}get timeResolution(){let e=this.input;if(!(!e||e.type!==`timestampoffset-picker`&&e.type!==`time-picker`))return e.timeResolution??`minutes`}get timeStep(){return this.timeResolution==null?void 0:x.get(this.timeResolution)}get userInvalid(){return this.errors.some(({error:e})=>F(e))?!0:!this.valid&&this.touched}get valid(){return this.errors.length===0||!this.editable}get validationMessage(){return this.valueIsOutOfDomain&&this.touched?I.OUT_OF_SUBTYPE_DOMAIN:this.userInvalid?this.compositeError??void 0:void 0}get value(){return this.featuresHaveSameValue?this.features.at(0)?.getAttribute(this.fieldName)??null:L}get valueIsOutOfDomain(){let{domain:e,value:t,field:n}=this;return!e||t==null?!1:d(n,t,e)!==null}get visibilityCode(){return this.field.visible?this._fieldShouldHaveDomain&&this.domain==null?`hidden:no-domain-in-common`:this._baseVisibilityCode:`hidden:field-definition`}get codedValueDomainOptions(){return this.domain?.type===`coded-value`?this.domain.codedValues.map(({name:e,code:t})=>({name:e,value:t})):[]}getExplicitMultipleChoiceOtherChoiceCheckedState(){return H(this.inputController)?.getExplicitOtherChoiceCheckedState()}getMultipleChoiceOtherChoiceRenderState(e){let t=H(this.inputController)?.otherChoiceRenderState;return t?{...t,label:t.label??e}:{fieldName:void 0,hint:``,label:e,shouldShow:!1,checkboxState:{checked:!1,indeterminate:!1},value:null,normalizedValue:null,maxLength:void 0,status:`idle`}}hasExplicitMultipleChoiceOtherChoiceCheckedState(){return H(this.inputController)?.hasExplicitOtherChoiceCheckedState()??!1}initializeExplicitMultipleChoiceOtherChoiceCheckedState(){H(this.inputController)?.initializeExplicitOtherChoiceCheckedState()}setExplicitMultipleChoiceOtherChoiceCheckedState(e){H(this.inputController)?.setExplicitOtherChoiceCheckedState(e)}get codedValueOptions(){let{getFieldValueOptionsForFeature:e}=this;if(this.features.length===1&&e){let t=this.features.at(0);return e({domain:this.domain??void 0,feature:t,fieldName:this.fieldName,layer:t.layer})}let t=this.codedValueDomainOptions,{value:n}=this;return{recommended:t,other:[],unsupported:n!=null&&n!==L&&!t.some(e=>e.value===n)?[{name:`${n}`,value:n}]:[],containsEmptyOption:!1}}get _evaluatedRequiredExpression(){let e=!1,t=!0,n=this.template;for(let r of this.features){if(n.getExpressionExecutorsForLayer(r.layer)?.requiredExpression==null)continue;t=!1;let i=this._lookupEvaluatedExpression(r,`requiredExpression`);i?.status===`success`?e||=i.result===!0:e=!0}return t?null:e}get _allDomains(){let e=this.template.domain;return this.features.map(t=>{let n=t.layer.getFieldDomain(this.fieldName,{feature:t.plainGraphic});return n?.type===`range`||e?.type===`range`?n??this.template.domain:n})}get _fieldShouldHaveDomain(){return this._hasIntersectionWithElementFieldDomain?!0:this._allDomains.some(r)}get _dateFormRange(){if(this.dataType!==`date`)return{};let{input:e}=this;if(!e)return{};let{type:t}=e,n={};if((t===`date-picker`||t===`time-picker`||t===`timestampoffset-picker`)&&(n=f(this.field,e.max,e.min)),t===`datetime-picker`){let{max:t,min:r}=e;n={max:t!=null&&T(t)?t.getTime():null,min:r!=null&&T(r)?r.getTime():null}}return{min:n.min,max:n.max,rawMax:n?.rawMax??null,rawMin:n?.rawMin??null}}get _dateRange(){let{_dateFormRange:e,template:t,field:n,domain:r}=this;if(this.dataType!==`date`)return{};if(!r)return this._fieldShouldHaveDomain?{}:e;let i=u(n,r);if(!i)return e;let{max:a,min:o,rawMax:s,rawMin:c}=e,{type:l}=t.field;if(l===`date`){let{max:e,min:t}=i;return{max:b(a)&&(e===null||e!=null&&a<=e)?a:e??null,min:b(o)&&(t===null||t!=null&&o>=t)?o:t??null}}if(l===`date-only`||l===`time-only`||l===`timestamp-offset`){let{max:e,min:t,rawMax:n,rawMin:r}=i,l=b(a)&&s&&(e==null||a<e),u=b(o)&&c&&(t==null||o>t);return{max:l?a:e,min:u?o:t,rawMax:l?s:n,rawMin:u?c:r}}return{}}touch(){this.touched=!0}_validate(){let{dataType:e,fieldName:t,maxLength:n,minLength:r,range:i}=this,a=[],o=O(this.inputController)?this.inputController:void 0,s=o?.input;for(let c of this.features){let{layer:l}=c,u=l.getField(t)??this.field,d=l.getFieldDomain(t,{feature:c.plainGraphic}),f=this.calculateDomain([d]),p=!f||f.type===`coded-value`?null:f,m=this._requiredForFeature(c),h=c.getAttribute(t),g=E(h,{dataType:e,domain:p,field:u,maxLength:n,minLength:r,multipleChoice:s,range:i,required:m})??this.getExternalErrorForFeature?.(c,t);if(!g&&s&&o){let{otherChoice:e}=s,t=o.otherChoiceFieldName,n=o.shouldShowOtherChoice,r=o.otherChoiceEffectiveCheckboxState;if(n&&e&&t&&r.checked){let e=l.getField(t),n=c.getAttribute(t),r=n===z?null:n;if(e){let t=j(e);g=E(r,{dataType:t,domain:e.domain,field:e,maxLength:C({dataType:t,field:e,input:null}),minLength:w({dataType:t,field:e,input:null}),multipleChoice:null,range:{max:void 0,min:void 0},required:!0})}}}g&&a.push({error:g,feature:c.source})}return a}_editableForFeature(e){if(!this.field.editable)return!1;if(this.template.getExpressionExecutorsForLayer(e.layer)?.editableExpression==null)return!0;let t=this._lookupEvaluatedExpression(e,`editableExpression`);return t?.status===`success`&&t.result===!0}_effectiveVisibleFeature(e){if(this.group&&!this.group.visibleForFeature(e))return!1;if(this.template.getExpressionExecutorsForLayer(e.layer)?.visibilityExpression==null)return!0;let t=this._lookupEvaluatedExpression(e,`visibilityExpression`);return t?.status===`success`&&t.result===!0}_requiredForFeature(e){if(!this._editableForFeature(e))return!1;if(!this.field.nullable||this.isSubtypeField)return!0;let t=this._effectiveVisibleFeature(e);if(this.template.getExpressionExecutorsForLayer(e.layer)?.requiredExpression==null)return!1;let n=this._lookupEvaluatedExpression(e,`requiredExpression`);return n?.status===`success`?t&&n.result===!0:t}calculateDomain(e){let t=e.find(e=>e!=null),n=this.template.domain;if(!t)return n&&p(this.field,n)?n:null;switch(t.type){case`coded-value`:if(e.some(e=>!e)){if(!n)return null;e=e.filter(e=>e!==null)}break;case`range`:e=e.filter(e=>e!==null)}if(!e.every(e=>e?.type===t?.type))return null;let r=null;switch(t?.type){case`range`:r=this._intersectRangeDomains(e);break;case`coded-value`:r=this._intersectCodedValueDomains(e)}return r}_intersectCodedValueDomains(e){if(!e.length)return null;let t=new Map(e[0].codedValues.map(({code:e,name:t})=>[e,t])),n=this.template.domain?new Map(this.template.domain.codedValues.map(({code:e,name:t})=>[e,t])):null;for(let n of e)for(let[e,r]of t)n.codedValues.some(t=>t.code===e&&t.name===r)||t.delete(e);let r=t;if(n){r=new Map;for(let[e,i]of n)t.has(e)&&r.set(e,i)}let i=Array.from(r.entries()).map(([e,t])=>new c({code:e,name:t}));return i.length?new l({codedValues:i}):null}_intersectRangeDomains(e){if(!e.length)return null;let t=e[0];for(let n=1;n<e.length;n++){if(!t)return null;t=this._findMinMaxValuesBetweenTwoDomains(t,e[n])}if(t&&!p(this.field,t))return null;let{domain:n}=this.template;if(t&&n&&n instanceof y){let e=this._findMinMaxValuesBetweenTwoDomains(t,n);return this._hasIntersectionWithElementFieldDomain=!!e,e}return t}_getMinMaxFromRangeDomain(e){let t=e.minValue,n=e.maxValue,{field:r}=this;return h(r)||g(r)||_(r)?f(r,n,t):{min:t!=null&&typeof t==`number`?t:null,max:n!=null&&typeof n==`number`?n:null}}_findMinMaxValuesBetweenTwoDomains(e,t){let n=new y,r=this._getMinMaxFromRangeDomain(e),i=this._getMinMaxFromRangeDomain(t),{field:a}=this,o=this._getValidRangeValue(r.min,-1/0),s=this._getValidRangeValue(r.max,1/0),c=this._getValidRangeValue(i.min,-1/0),l=this._getValidRangeValue(i.max,1/0);return n.minValue=Math.max(o,c),n.maxValue=Math.min(s,l),n.minValue===-1/0||n.maxValue===1/0||n.minValue>n.maxValue?null:((h(a)||g(a)||_(a))&&(n.minValue=Number(r.min)>Number(i.min)?r.rawMin:i.rawMin,n.maxValue=Number(r.max)<Number(i.max)?r.rawMax:i.rawMax),n.name=`intersection`,n)}_getValidRangeValue(e,t){return b(e)?e:t}};e([t()],B.prototype,`dataType`,null),e([t()],B.prototype,`domain`,null),e([t()],B.prototype,`distinctValues`,null),e([t()],B.prototype,`editable`,null),e([t()],B.prototype,`label`,null),e([t()],B.prototype,`effectiveVisible`,null),e([t()],B.prototype,`effectiveVisibilityCode`,null),e([t()],B.prototype,`errors`,null),e([t()],B.prototype,`featuresHaveSameValue`,null),e([t()],B.prototype,`field`,null),e([t()],B.prototype,`fieldName`,null),e([t()],B.prototype,`getExternalErrorForFeature`,void 0),e([t()],B.prototype,`getFieldValueOptionsForFeature`,void 0),e([t()],B.prototype,`group`,void 0),e([t()],B.prototype,`input`,null),e([t()],B.prototype,`inputController`,void 0),e([t()],B.prototype,`invalidFeatures`,null),e([t()],B.prototype,`isSubtypeField`,null),e([t()],B.prototype,`showNoValueOptionEnabled`,null),e([t()],B.prototype,`showNoValueLabel`,null),e([t()],B.prototype,`includeTime`,null),e([t()],B.prototype,`includeTimeOffset`,null),e([t({readOnly:!0})],B.prototype,`inputType`,null),e([t()],B.prototype,`maxLength`,null),e([t()],B.prototype,`minLength`,null),e([t()],B.prototype,`multipleChoiceOtherChoiceCheckboxState`,null),e([t()],B.prototype,`placeholder`,null),e([t()],B.prototype,`range`,null),e([t()],B.prototype,`requestDeferredExpressionEvaluation`,void 0),e([t()],B.prototype,`required`,null),e([t()],B.prototype,`status`,null),e([t()],B.prototype,`timeResolution`,null),e([t()],B.prototype,`timeStep`,null),e([t()],B.prototype,`touched`,void 0),e([t({readOnly:!0})],B.prototype,`type`,void 0),e([t()],B.prototype,`userHasChangedValue`,void 0),e([t()],B.prototype,`userInvalid`,null),e([t()],B.prototype,`valid`,null),e([t()],B.prototype,`validationMessage`,null),e([t()],B.prototype,`value`,null),e([t()],B.prototype,`valueIsOutOfDomain`,null),e([t()],B.prototype,`visibilityCode`,null),e([t()],B.prototype,`codedValueDomainOptions`,null),e([t()],B.prototype,`codedValueOptions`,null),e([t()],B.prototype,`_evaluatedRequiredExpression`,null),e([t()],B.prototype,`_hasIntersectionWithElementFieldDomain`,void 0),e([t()],B.prototype,`_allDomains`,null),e([t()],B.prototype,`_fieldShouldHaveDomain`,null),e([t()],B.prototype,`_dateFormRange`,null),e([t()],B.prototype,`_dateRange`,null),B=e([n(`esri.widgets.BatchAttributeForm.inputs.FieldInput`)],B);const V=B;function H(e){return O(e)?e:null}export{V as default};
2
+ import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../core/accessorSupport/decorators.js";import{isSome as r}from"../../../core/arrayUtils.js";import i from"../../../core/Logger.js";import{destroyMaybe as a}from"../../../core/maybe.js";import{isDynamicChoiceInput as o,isMultipleChoiceInput as s}from"../../../form/elements/inputs/inputUtils.js";import c from"../../../layers/support/CodedValue.js";import l from"../../../layers/support/CodedValueDomain.js";import{getDomainRange as u,validateDomainValue as d,dateTimeFieldValuesToNumericRange as f,isDomainValidForField as p}from"../../../layers/support/domainUtils.js";import{getFieldRange as m,isDateOnlyField as h,isTimeOnlyField as g,isTimestampOffsetField as _}from"../../../layers/support/fieldUtils.js";import{supportsFieldConfiguration as v}from"../../../layers/support/layerUtils.js";import y from"../../../layers/support/RangeDomain.js";import{isNumber as b}from"../../../support/guards.js";import{timeResolutionToStepMap as x}from"../../support/dateUtils.js";import{valuesAreEquivalent as S,getMaxLength as C,getMinLength as w,dateIsValid as T,validateFormValue as E}from"../../support/forms/formUtils.js";import D from"./EditableInput.js";import{isMultipleChoiceController as O}from"./support/controllerUtils.js";import k from"./support/DynamicChoiceController.js";import{MultiFeatureError as A,getFieldInputDataType as j,visibilityCodeToBoolean as M,isFieldInputWithShowNoValueOptionInput as N,isWarning as P,isContingentValuesError as F,FormValidationWarning as I,differentValuesString as L,noValueString as R}from"./support/inputUtils.js";import z from"./support/MultipleChoiceController.js";import{otherChoiceCheckedPlaceholderValue as B}from"./support/multipleChoiceInputUtils.js";let V=class extends D{constructor(e){super(e),this.getExternalErrorForFeature=null,this.getFieldValueOptionsForFeature=null,this.group=null,this.inputController=null,this.touched=!1,this.type=`field`,this.userHasChangedValue=!1,this._hasIntersectionWithElementFieldDomain=!1}destroy(){this.inputController=a(this.inputController)}initialize(){if(this.input){if(o(this.input)){let{requestDeferredExpressionEvaluation:e}=this;e?this.inputController=new k({fieldInput:this,requestDeferredExpressionEvaluation:e}):i.getLogger(this).error(`requestDeferredExpressionEvaluation callback is required for dynamic choice inputs.`)}s(this.input)&&(this.inputController=new z({fieldInput:this}))}}get compositeError(){if(this.valid)return null;let{errors:e}=this;if(e.length<this.features.length)return A.DIFFERENT_ERRORS;let t=e[0];for(let n of e)if(n.error!==t.error)return A.DIFFERENT_ERRORS;return t.error}get dataType(){return j(this.field)}get domain(){let e=this._allDomains.toArray();return this.calculateDomain(e)}get distinctValues(){if(this.featuresHaveSameValue)return[this.value];let e=new Set;for(let t of this.features)e.add(t.getAttribute(this.fieldName));return Array.from(e)}get editable(){return this.field.editable?this._evaluatedEditableExpression??!0:!1}get label(){let{label:e}=this.template,t=this._computeStringLiteralText(e);if(t)return t;let{field:n,layers:r}=this;if(r.length===1){let e=r[0];if(v(e)){let t=e.getFieldAlias(n.name);if(t!=null&&t!==``)return t}}return n.alias||n.name}get effectiveVisible(){return M(this.effectiveVisibilityCode)}get effectiveVisibilityCode(){let{visibilityCode:e}=this;if(e!==`visible`)return e;let{group:t}=this;if(t==null)return e;let n=t.visibilityCode;return n===`hidden:visibility-expression:all-features`?`hidden:group-visibility-expression:all-features`:n===`hidden:visibility-expression:some-features`?`hidden:group-visibility-expression:some-features`:e}get errors(){return this._validate()}get featuresHaveSameValue(){let{fieldName:e}=this,t=this.features.at(0)?.getAttribute(e);return this.features.every(n=>S(n.getAttribute(e),t))}get field(){return this.template.field}get fieldName(){return this.field.name}get input(){return this.template.input}get invalidFeatures(){return this.errors.map(e=>e.feature)}get isSubtypeField(){return this.layers.some(e=>{if(e&&`subtypeField`in e){let{subtypeField:t,fieldsIndex:n}=e;return(n.get(t)?.name??t)===this.fieldName}return!1})}get showNoValueOptionEnabled(){let{input:e}=this;return this.required?!1:!N(e)||e?.showNoValueOption===!0}get showNoValueLabel(){let{input:e}=this;return N(e)?e?.noValueOptionLabel:null}get includeTime(){let{template:e,field:t}=this;return this.dataType===`date`?t.type===`time-only`?!0:t.type===`date-only`?!1:e.input?.type!==`datetime-picker`||e.input.includeTime:!1}get includeTimeOffset(){if(this.field.type!==`timestamp-offset`)return!1;let{input:e}=this;return!e||e.type===`timestampoffset-picker`&&e.includeTimeOffset}get inputType(){return this.input?.type}get maxLength(){return C({dataType:this.dataType,field:this.field,input:this.input})}get minLength(){return w({dataType:this.dataType,field:this.field,input:this.input})}get multipleChoiceOtherChoiceCheckboxState(){return U(this.inputController)?.otherChoiceCheckboxState??{checked:!1,indeterminate:!1}}get placeholder(){return this.template.hint}get range(){if(this.dataType===`date`)return this._dateRange;let{domain:e,field:t}=this;if(e){let n=u(t,e);return{max:n?.max,min:n?.min}}let n=this._allDomains.toArray().every(e=>!e)?m(t):null;return{max:n?.max===Number.MAX_VALUE?null:n?.max??null,min:n?.min===-Number.MAX_VALUE?null:n?.min??null}}get required(){if(!this.editable)return!1;if(!this.field.nullable||this.isSubtypeField)return!0;let e=this.visible&&this.group?.visible!==!1,t=this._evaluatedRequiredExpression;return e&&t!=null?t:!1}get status(){let{validationMessage:e}=this;return e?P(e)?`idle`:`invalid`:this.valid?`valid`:`idle`}get timeResolution(){let e=this.input;if(!(!e||e.type!==`timestampoffset-picker`&&e.type!==`time-picker`))return e.timeResolution??`minutes`}get timeStep(){return this.timeResolution==null?void 0:x.get(this.timeResolution)}get userInvalid(){return this.errors.some(({error:e})=>F(e))?!0:!this.valid&&this.touched}get valid(){return this.errors.length===0||!this.editable}get validationMessage(){return this.valueIsOutOfDomain&&this.touched?I.OUT_OF_SUBTYPE_DOMAIN:this.userInvalid?this.compositeError??void 0:void 0}get value(){return this.featuresHaveSameValue?this.features.at(0)?.getAttribute(this.fieldName)??null:L}get valueIsOutOfDomain(){let{domain:e,value:t,field:n}=this;return!e||t==null?!1:d(n,t,e)!==null}get visibilityCode(){return this.field.visible?this._fieldShouldHaveDomain&&this.domain==null?`hidden:no-domain-in-common`:this._baseVisibilityCode:`hidden:field-definition`}getExplicitMultipleChoiceOtherChoiceCheckedState(){return U(this.inputController)?.getExplicitOtherChoiceCheckedState()}getMultipleChoiceOtherChoiceRenderState(e){let t=U(this.inputController)?.otherChoiceRenderState;return t?{...t,label:t.label??e}:{fieldName:void 0,hint:``,label:e,shouldShow:!1,checkboxState:{checked:!1,indeterminate:!1},value:null,normalizedValue:null,maxLength:void 0,status:`idle`}}hasExplicitMultipleChoiceOtherChoiceCheckedState(){return U(this.inputController)?.hasExplicitOtherChoiceCheckedState()??!1}initializeExplicitMultipleChoiceOtherChoiceCheckedState(){U(this.inputController)?.initializeExplicitOtherChoiceCheckedState()}setExplicitMultipleChoiceOtherChoiceCheckedState(e){U(this.inputController)?.setExplicitOtherChoiceCheckedState(e)}get codedValueOptions(){let{getFieldValueOptionsForFeature:e,features:t}=this;if(t.length===1&&e){let t=this.features.at(0);return e({domain:this.domain??void 0,feature:t,fieldName:this.fieldName,layer:t.layer,includeEmptyOption:this.showNoValueOptionEnabled,emptyString:this.showNoValueLabel??R})}return this._ownCodedValueOptions}get _evaluatedRequiredExpression(){let e=!1,t=!0,n=this.template;for(let r of this.features){if(n.getExpressionExecutorsForLayer(r.layer)?.requiredExpression==null)continue;t=!1;let i=this._lookupEvaluatedExpression(r,`requiredExpression`);i?.status===`success`?e||=i.result===!0:e=!0}return t?null:e}get _allDomains(){let e=this.template.domain;return this.features.map(t=>{let n=t.layer.getFieldDomain(this.fieldName,{feature:t.plainGraphic});return n?.type===`range`||e?.type===`range`?n??this.template.domain:n})}get _fieldShouldHaveDomain(){return this._hasIntersectionWithElementFieldDomain?!0:this._allDomains.some(r)}get _dateFormRange(){if(this.dataType!==`date`)return{};let{input:e}=this;if(!e)return{};let{type:t}=e,n={};if((t===`date-picker`||t===`time-picker`||t===`timestampoffset-picker`)&&(n=f(this.field,e.max,e.min)),t===`datetime-picker`){let{max:t,min:r}=e;n={max:t!=null&&T(t)?t.getTime():null,min:r!=null&&T(r)?r.getTime():null}}return{min:n.min,max:n.max,rawMax:n?.rawMax??null,rawMin:n?.rawMin??null}}get _dateRange(){let{_dateFormRange:e,template:t,field:n,domain:r}=this;if(this.dataType!==`date`)return{};if(!r)return this._fieldShouldHaveDomain?{}:e;let i=u(n,r);if(!i)return e;let{max:a,min:o,rawMax:s,rawMin:c}=e,{type:l}=t.field;if(l===`date`){let{max:e,min:t}=i;return{max:b(a)&&(e===null||e!=null&&a<=e)?a:e??null,min:b(o)&&(t===null||t!=null&&o>=t)?o:t??null}}if(l===`date-only`||l===`time-only`||l===`timestamp-offset`){let{max:e,min:t,rawMax:n,rawMin:r}=i,l=b(a)&&s&&(e==null||a<e),u=b(o)&&c&&(t==null||o>t);return{max:l?a:e,min:u?o:t,rawMax:l?s:n,rawMin:u?c:r}}return{}}get _ownCodedValueOptions(){let e=this.domain?.type===`coded-value`?this.domain.codedValues.map(({name:e,code:t})=>({name:e,value:t})):[],t=this.value,n=t!=null&&t!==L&&!e.some(e=>e.value===t)?[{name:`${t}`,value:t}]:[],r=this.showNoValueOptionEnabled;return r&&e.unshift({name:this.showNoValueLabel??R,value:``}),{recommended:e,other:[],unsupported:n,containsEmptyOption:r}}touch(){this.touched=!0}_validate(){let{dataType:e,fieldName:t,maxLength:n,minLength:r,range:i}=this,a=[],o=O(this.inputController)?this.inputController:void 0,s=o?.input;for(let c of this.features){let{layer:l}=c,u=l.getField(t)??this.field,d=l.getFieldDomain(t,{feature:c.plainGraphic}),f=this.calculateDomain([d]),p=!f||f.type===`coded-value`?null:f,m=this._requiredForFeature(c),h=c.getAttribute(t),g=E(h,{dataType:e,domain:p,field:u,maxLength:n,minLength:r,multipleChoice:s,range:i,required:m})??this.getExternalErrorForFeature?.(c,t);if(!g&&s&&o){let{otherChoice:e}=s,t=o.otherChoiceFieldName,n=o.shouldShowOtherChoice,r=o.otherChoiceEffectiveCheckboxState;if(n&&e&&t&&r.checked){let e=l.getField(t),n=c.getAttribute(t),r=n===B?null:n;if(e){let t=j(e);g=E(r,{dataType:t,domain:e.domain,field:e,maxLength:C({dataType:t,field:e,input:null}),minLength:w({dataType:t,field:e,input:null}),multipleChoice:null,range:{max:void 0,min:void 0},required:!0})}}}g&&a.push({error:g,feature:c.source})}return a}_editableForFeature(e){if(!this.field.editable)return!1;if(this.template.getExpressionExecutorsForLayer(e.layer)?.editableExpression==null)return!0;let t=this._lookupEvaluatedExpression(e,`editableExpression`);return t?.status===`success`&&t.result===!0}_effectiveVisibleFeature(e){if(this.group&&!this.group.visibleForFeature(e))return!1;if(this.template.getExpressionExecutorsForLayer(e.layer)?.visibilityExpression==null)return!0;let t=this._lookupEvaluatedExpression(e,`visibilityExpression`);return t?.status===`success`&&t.result===!0}_requiredForFeature(e){if(!this._editableForFeature(e))return!1;if(!this.field.nullable||this.isSubtypeField)return!0;let t=this._effectiveVisibleFeature(e);if(this.template.getExpressionExecutorsForLayer(e.layer)?.requiredExpression==null)return!1;let n=this._lookupEvaluatedExpression(e,`requiredExpression`);return n?.status===`success`?t&&n.result===!0:t}calculateDomain(e){let t=e.find(e=>e!=null),n=this.template.domain;if(!t)return n&&p(this.field,n)?n:null;switch(t.type){case`coded-value`:if(e.some(e=>!e)){if(!n)return null;e=e.filter(e=>e!==null)}break;case`range`:e=e.filter(e=>e!==null)}if(!e.every(e=>e?.type===t?.type))return null;let r=null;switch(t?.type){case`range`:r=this._intersectRangeDomains(e);break;case`coded-value`:r=this._intersectCodedValueDomains(e)}return r}_intersectCodedValueDomains(e){if(!e.length)return null;let t=new Map(e[0].codedValues.map(({code:e,name:t})=>[e,t])),n=this.template.domain?new Map(this.template.domain.codedValues.map(({code:e,name:t})=>[e,t])):null;for(let n of e)for(let[e,r]of t)n.codedValues.some(t=>t.code===e&&t.name===r)||t.delete(e);let r=t;if(n){r=new Map;for(let[e,i]of n)t.has(e)&&r.set(e,i)}let i=Array.from(r.entries()).map(([e,t])=>new c({code:e,name:t}));return i.length?new l({codedValues:i}):null}_intersectRangeDomains(e){if(!e.length)return null;let t=e[0];for(let n=1;n<e.length;n++){if(!t)return null;t=this._findMinMaxValuesBetweenTwoDomains(t,e[n])}if(t&&!p(this.field,t))return null;let{domain:n}=this.template;if(t&&n&&n instanceof y){let e=this._findMinMaxValuesBetweenTwoDomains(t,n);return this._hasIntersectionWithElementFieldDomain=!!e,e}return t}_getMinMaxFromRangeDomain(e){let t=e.minValue,n=e.maxValue,{field:r}=this;return h(r)||g(r)||_(r)?f(r,n,t):{min:t!=null&&typeof t==`number`?t:null,max:n!=null&&typeof n==`number`?n:null}}_findMinMaxValuesBetweenTwoDomains(e,t){let n=new y,r=this._getMinMaxFromRangeDomain(e),i=this._getMinMaxFromRangeDomain(t),{field:a}=this,o=this._getValidRangeValue(r.min,-1/0),s=this._getValidRangeValue(r.max,1/0),c=this._getValidRangeValue(i.min,-1/0),l=this._getValidRangeValue(i.max,1/0);return n.minValue=Math.max(o,c),n.maxValue=Math.min(s,l),n.minValue===-1/0||n.maxValue===1/0||n.minValue>n.maxValue?null:((h(a)||g(a)||_(a))&&(n.minValue=Number(r.min)>Number(i.min)?r.rawMin:i.rawMin,n.maxValue=Number(r.max)<Number(i.max)?r.rawMax:i.rawMax),n.name=`intersection`,n)}_getValidRangeValue(e,t){return b(e)?e:t}};e([t()],V.prototype,`dataType`,null),e([t()],V.prototype,`domain`,null),e([t()],V.prototype,`distinctValues`,null),e([t()],V.prototype,`editable`,null),e([t()],V.prototype,`label`,null),e([t()],V.prototype,`effectiveVisible`,null),e([t()],V.prototype,`effectiveVisibilityCode`,null),e([t()],V.prototype,`errors`,null),e([t()],V.prototype,`featuresHaveSameValue`,null),e([t()],V.prototype,`field`,null),e([t()],V.prototype,`fieldName`,null),e([t()],V.prototype,`getExternalErrorForFeature`,void 0),e([t()],V.prototype,`getFieldValueOptionsForFeature`,void 0),e([t()],V.prototype,`group`,void 0),e([t()],V.prototype,`input`,null),e([t()],V.prototype,`inputController`,void 0),e([t()],V.prototype,`invalidFeatures`,null),e([t()],V.prototype,`isSubtypeField`,null),e([t()],V.prototype,`showNoValueOptionEnabled`,null),e([t()],V.prototype,`showNoValueLabel`,null),e([t()],V.prototype,`includeTime`,null),e([t()],V.prototype,`includeTimeOffset`,null),e([t({readOnly:!0})],V.prototype,`inputType`,null),e([t()],V.prototype,`maxLength`,null),e([t()],V.prototype,`minLength`,null),e([t()],V.prototype,`multipleChoiceOtherChoiceCheckboxState`,null),e([t()],V.prototype,`placeholder`,null),e([t()],V.prototype,`range`,null),e([t()],V.prototype,`requestDeferredExpressionEvaluation`,void 0),e([t()],V.prototype,`required`,null),e([t()],V.prototype,`status`,null),e([t()],V.prototype,`timeResolution`,null),e([t()],V.prototype,`timeStep`,null),e([t()],V.prototype,`touched`,void 0),e([t({readOnly:!0})],V.prototype,`type`,void 0),e([t()],V.prototype,`userHasChangedValue`,void 0),e([t()],V.prototype,`userInvalid`,null),e([t()],V.prototype,`valid`,null),e([t()],V.prototype,`validationMessage`,null),e([t()],V.prototype,`value`,null),e([t()],V.prototype,`valueIsOutOfDomain`,null),e([t()],V.prototype,`visibilityCode`,null),e([t()],V.prototype,`codedValueOptions`,null),e([t()],V.prototype,`_evaluatedRequiredExpression`,null),e([t()],V.prototype,`_hasIntersectionWithElementFieldDomain`,void 0),e([t()],V.prototype,`_allDomains`,null),e([t()],V.prototype,`_fieldShouldHaveDomain`,null),e([t()],V.prototype,`_dateFormRange`,null),e([t()],V.prototype,`_dateRange`,null),e([t()],V.prototype,`_ownCodedValueOptions`,null),V=e([n(`esri.widgets.BatchAttributeForm.inputs.FieldInput`)],V);const H=V;function U(e){return O(e)?e:null}export{H as default};
@@ -4,6 +4,13 @@
4
4
  */
5
5
  export const differentValuesString: "esri_BatchAttributeForm_different_values";
6
6
 
7
+ /**
8
+ * Used as the name of the "no value" option when the form template does not
9
+ * specify it. In views, it should be substituted for a localized string. For
10
+ * example, in English it might be displayed as "No value".
11
+ */
12
+ export const noValueString: "esri_BatchAttributeForm_no_value";
13
+
7
14
  /** @internal */
8
15
  export type MultiFeatureError = "batch-attribute-form-validation::features-have-different-errors";
9
16
 
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{isNumericField as e,isStringField as t,isTimeOnlyField as n,isGuidField as r}from"../../../../layers/support/fieldUtils.js";import{isAnyDateField as i}from"../../../../smartMapping/support/utils.js";import{ContingentValuesValidationError as a}from"../../../support/forms/formUtils.js";const o=`esri_BatchAttributeForm_different_values`,s={DIFFERENT_ERRORS:`batch-attribute-form-validation::features-have-different-errors`},c={OUT_OF_SUBTYPE_DOMAIN:`batch-attribute-form-validation::out-of-subtype-domain`};function l(e){return e===`visible`}function u(e){return e===c.OUT_OF_SUBTYPE_DOMAIN}function d(e){return e.type===`field`}function f(e){return d(e)&&e.input?.type===`multiple-choice`}function p(e){return e.type===`group`}function m(e){return e.type===`relationship`}function h(e){return e.type===`text`}function g(e){return e.type===`attachment`}function _(e){return d(e)||g(e)||m(e)||b(e)}function v(e){return d(e)||g(e)||m(e)||b(e)||h(e)}function y(e){return v(e)&&e.group!=null}function b(e){return e.type===`utilityNetworkAssociations`}function x(e){let t=`${e.elementId}:${e.executorPurpose}`;return e.textExpressionIndex==null?t:`${t}:${e.textExpressionIndex}`}const S=e=>e!=null&&(C(e,`combo-box`)||C(e,`dynamic-choice`)||C(e,`radio-buttons`));function C(e,t){return e?.type===t}function w(e,t,n=[]){for(let r of e)t(r)?n.push(r):p(r)&&w(r.inputs,t,n);return n}function T(e,t){return e.layers[0]?.getField(t)?.name??t}function E(a){return e(a)?`number`:t(a)?`text`:i(a)||n(a)?`date`:r(a)?`guid`:`unsupported`}function D(e){return e===a.CONTINGENCY_VIOLATION_ERROR||e===a.CONTINGENCY_VIOLATION_WARNING}export{c as FormValidationWarning,s as MultiFeatureError,w as deepFilterInputs,o as differentValuesString,E as getFieldInputDataType,T as getNormalizedFieldName,g as isAttachmentElementInput,D as isContingentValuesError,_ as isEditableInput,d as isFieldInput,S as isFieldInputWithShowNoValueOptionInput,p as isGroupInput,v as isGroupableInput,y as isGroupedInput,C as isInputWithInputType,f as isMultipleChoiceFieldInput,m as isRelationshipElementInput,h as isTextElementInput,b as isUtilityNetworkAssociationsElementInput,u as isWarning,x as makeUseId,l as visibilityCodeToBoolean};
2
+ import{isNumericField as e,isStringField as t,isTimeOnlyField as n,isGuidField as r}from"../../../../layers/support/fieldUtils.js";import{isAnyDateField as i}from"../../../../smartMapping/support/utils.js";import{ContingentValuesValidationError as a}from"../../../support/forms/formUtils.js";const o=`esri_BatchAttributeForm_different_values`,s=`esri_BatchAttributeForm_no_value`,c={DIFFERENT_ERRORS:`batch-attribute-form-validation::features-have-different-errors`},l={OUT_OF_SUBTYPE_DOMAIN:`batch-attribute-form-validation::out-of-subtype-domain`};function u(e){return e===`visible`}function d(e){return e===l.OUT_OF_SUBTYPE_DOMAIN}function f(e){return e.type===`field`}function p(e){return f(e)&&e.input?.type===`multiple-choice`}function m(e){return e.type===`group`}function h(e){return e.type===`relationship`}function g(e){return e.type===`text`}function _(e){return e.type===`attachment`}function v(e){return f(e)||_(e)||h(e)||x(e)}function y(e){return f(e)||_(e)||h(e)||x(e)||g(e)}function b(e){return y(e)&&e.group!=null}function x(e){return e.type===`utilityNetworkAssociations`}function S(e){let t=`${e.elementId}:${e.executorPurpose}`;return e.textExpressionIndex==null?t:`${t}:${e.textExpressionIndex}`}const C=e=>e!=null&&(w(e,`combo-box`)||w(e,`dynamic-choice`)||w(e,`radio-buttons`));function w(e,t){return e?.type===t}function T(e,t,n=[]){for(let r of e)t(r)?n.push(r):m(r)&&T(r.inputs,t,n);return n}function E(e,t){return e.layers[0]?.getField(t)?.name??t}function D(a){return e(a)?`number`:t(a)?`text`:i(a)||n(a)?`date`:r(a)?`guid`:`unsupported`}function O(e){return e===a.CONTINGENCY_VIOLATION_ERROR||e===a.CONTINGENCY_VIOLATION_WARNING}export{l as FormValidationWarning,c as MultiFeatureError,T as deepFilterInputs,o as differentValuesString,D as getFieldInputDataType,E as getNormalizedFieldName,_ as isAttachmentElementInput,O as isContingentValuesError,v as isEditableInput,f as isFieldInput,C as isFieldInputWithShowNoValueOptionInput,m as isGroupInput,y as isGroupableInput,b as isGroupedInput,w as isInputWithInputType,p as isMultipleChoiceFieldInput,h as isRelationshipElementInput,g as isTextElementInput,x as isUtilityNetworkAssociationsElementInput,d as isWarning,S as makeUseId,s as noValueString,u as visibilityCodeToBoolean};