@arcgis/core 5.1.0-next.87 → 5.1.0-next.89

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 (255) hide show
  1. package/Graphic.js +1 -1
  2. package/analysis/LineOfSightAnalysisObserver.d.ts +2 -2
  3. package/analysis/LineOfSightAnalysisTarget.d.ts +2 -2
  4. package/applications/Components/arcadeUtils.d.ts +23 -0
  5. package/applications/Components/arcadeUtils.js +2 -0
  6. package/arcade/validation/arcadeValidator.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/00e9e25269d5776f8645.js +1 -0
  9. package/assets/esri/core/workers/chunks/015fc0a17b17d69cc3bb.js +1 -0
  10. package/assets/esri/core/workers/chunks/0840e7dd62643c56ae9e.js +1 -0
  11. package/assets/esri/core/workers/chunks/0a6df243b18acae471be.js +1 -0
  12. package/assets/esri/core/workers/chunks/0cc4b3100a7a453bd058.js +1 -0
  13. package/assets/esri/core/workers/chunks/{b14c4c3f295970f731ab.js → 0e3dcf99382478181366.js} +1 -1
  14. package/assets/esri/core/workers/chunks/10cf6a70bf79f04a7208.js +1 -0
  15. package/assets/esri/core/workers/chunks/169ca3724053fc046d1b.js +1 -0
  16. package/assets/esri/core/workers/chunks/{aae40d70eb01249c1bab.js → 1e4e7111d43f01c149b3.js} +1 -1
  17. package/assets/esri/core/workers/chunks/206bdfd868a9ef88f3a8.js +1 -0
  18. package/assets/esri/core/workers/chunks/2343b1105bc4c1b4a086.js +1 -0
  19. package/assets/esri/core/workers/chunks/{2549a07f403447482f4e.js → 2dcfc4d7e76c922bcbf9.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{f89b7b0ccfbd1e5f9a0f.js → 3092184350d66c79f610.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{1ab66600579fa4232d7b.js → 3397eae416622c64e628.js} +1 -1
  22. package/assets/esri/core/workers/chunks/3469df5c4846b0cee012.js +1 -0
  23. package/assets/esri/core/workers/chunks/{26f804c92077c11c626d.js → 394812e19b6915d560b0.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{b9e163f4a898e50cc854.js → 39d6032d79720935910d.js} +1 -1
  25. package/assets/esri/core/workers/chunks/3feec3d08424b94e1bcf.js +1 -0
  26. package/assets/esri/core/workers/chunks/{d05a7ce6c1d4b883ed4c.js → 41cbde4738ae4adf973d.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{ce4dfc3a470230ddc9e4.js → 43f58604ba4a94a9167c.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{ff57a071156d8a7e47be.js → 456d269e3982c437010a.js} +1 -1
  29. package/assets/esri/core/workers/chunks/46b16501db6681dc467b.js +1 -0
  30. package/assets/esri/core/workers/chunks/48549d3d7bf0154c0afa.js +1 -0
  31. package/assets/esri/core/workers/chunks/{a401d44a5b45c05072c2.js → 4b9b9e6136c11d5d7901.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{fc6ca7ffb9f1b875059c.js → 51716e411fad624ac21c.js} +1 -1
  33. package/assets/esri/core/workers/chunks/5409369d0d637cb30257.js +1 -0
  34. package/assets/esri/core/workers/chunks/54c035cdc171998d0776.js +1 -0
  35. package/assets/esri/core/workers/chunks/{b23e677c33db6f9bac8a.js → 566f6319ded0634769e0.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{defac06f9e2b43090677.js → 73af4c947e8151d411c1.js} +2 -2
  37. package/assets/esri/core/workers/chunks/752f4e0e2961fc315dca.js +1 -0
  38. package/assets/esri/core/workers/chunks/{01bd1b86ba899c6aa4c0.js → 75c09a2fa4c34b4844c5.js} +1 -1
  39. package/assets/esri/core/workers/chunks/7ba67f1d7831a5576a5a.js +1 -0
  40. package/assets/esri/core/workers/chunks/{b2983f521d8c96becd8a.js → 7ed5b669010db58845f8.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{186bfde8c552e3b42302.js → 7ef51b0ebd560113ae7e.js} +1 -1
  42. package/assets/esri/core/workers/chunks/7f0f10946f05a09b5654.js +1 -0
  43. package/assets/esri/core/workers/chunks/81d761c837b7456ec99f.js +1 -0
  44. package/assets/esri/core/workers/chunks/83f1871d04c979fa23b7.js +1 -0
  45. package/assets/esri/core/workers/chunks/85da2987e17b6755a94e.js +1 -0
  46. package/assets/esri/core/workers/chunks/8a5a827ee557d9f9a66e.js +1 -0
  47. package/assets/esri/core/workers/chunks/{7185486c6dc28fc367a1.js → 90a8dfb03a437fe8a6e7.js} +1 -1
  48. package/assets/esri/core/workers/chunks/9c09097e390985bbac58.js +1 -0
  49. package/assets/esri/core/workers/chunks/{c9065cee85eb8dde6a42.js → a2159df718a7f2f59271.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{fce2306a1b31c6680f90.js → a232d05c0a055f398c6e.js} +1 -1
  51. package/assets/esri/core/workers/chunks/a432219de6a873f88776.js +1 -0
  52. package/assets/esri/core/workers/chunks/a508104179e08f0f268c.js +2 -0
  53. package/assets/esri/core/workers/chunks/{455d08294e0f5c5509ff.js → a6b75576d598ec161cc4.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{713ab619060bd5087479.js → adfa5c136c72c1e65770.js} +182 -157
  55. package/assets/esri/core/workers/chunks/{004af103a94d21cb4889.js → aefeb5a17bb481c95da3.js} +1 -1
  56. package/assets/esri/core/workers/chunks/b2662bfdbd1e3623ceb9.js +1 -0
  57. package/assets/esri/core/workers/chunks/b4bac22467e96be7a974.js +1 -0
  58. package/assets/esri/core/workers/chunks/{5166f204fd078dced5db.js → baea6f86b2dbe067940e.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{164ee62f2211987ad850.js → bb8d596f15fd3a0d783a.js} +1 -1
  60. package/assets/esri/core/workers/chunks/bea2fd831d7a864e5995.js +596 -0
  61. package/assets/esri/core/workers/chunks/c3e89c7c7b677bd18557.js +1 -0
  62. package/assets/esri/core/workers/chunks/cb81d524f12edcadb9bb.js +1 -0
  63. package/assets/esri/core/workers/chunks/cc0f3b9b153a0c232afe.js +1 -0
  64. package/assets/esri/core/workers/chunks/cd0c232f4e3868d91a05.js +1 -0
  65. package/assets/esri/core/workers/chunks/{3cf77b7a61f78f9bcd62.js → ceff78c9e31e3572a082.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{5cc38ac051d3d0557920.js → cfaa6e205bfc0c94a1b1.js} +1 -1
  67. package/assets/esri/core/workers/chunks/d5ad036d282df54b9ddc.js +1 -0
  68. package/assets/esri/core/workers/chunks/{475394218caaa4cd3e86.js → d7e7f3efd1d28617b808.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{9bd713d96502ddc2ce25.js → d8ccc713c5ad93e7a0c3.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{e66b9d00d02fc08cbb2d.js → da008d6a3afb30d18392.js} +1 -1
  71. package/assets/esri/core/workers/chunks/dde94664110ff231a52d.js +1 -0
  72. package/assets/esri/core/workers/chunks/de3e5d82502ee15b7eae.js +1 -0
  73. package/assets/esri/core/workers/chunks/e6fe8b5fbe95de01453b.js +1 -0
  74. package/assets/esri/core/workers/chunks/ee7e9bca57160694b3c4.js +1 -0
  75. package/assets/esri/core/workers/chunks/{f37e4ae0e9be80210db0.js → f2c11f54255fd506655e.js} +1 -1
  76. package/assets/esri/core/workers/chunks/f36345ebb9851ab92453.js +1 -0
  77. package/assets/esri/core/workers/chunks/{c503c79ba5761f7abbeb.js → fa869bfe4366f7f49cca.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{d8de7fe49dba9ed589df.js → fade7b878a9498382bb2.js} +1 -1
  79. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  80. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  81. package/assets/esri/libs/text/pkg/bundle_bg.wasm +0 -0
  82. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ar.json +1 -1
  83. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bg.json +1 -1
  84. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bs.json +1 -1
  85. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ca.json +1 -1
  86. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_cs.json +1 -1
  87. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_da.json +1 -1
  88. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_de.json +1 -1
  89. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_el.json +1 -1
  90. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_es.json +1 -1
  91. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_et.json +1 -1
  92. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fi.json +1 -1
  93. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
  94. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_he.json +1 -1
  95. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hr.json +1 -1
  96. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hu.json +1 -1
  97. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_id.json +1 -1
  98. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_it.json +1 -1
  99. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ja.json +1 -1
  100. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ko.json +1 -1
  101. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lt.json +1 -1
  102. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lv.json +1 -1
  103. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_nl.json +1 -1
  104. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_no.json +1 -1
  105. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pl.json +1 -1
  106. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-BR.json +1 -1
  107. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-PT.json +1 -1
  108. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ro.json +1 -1
  109. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ru.json +1 -1
  110. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sk.json +1 -1
  111. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sl.json +1 -1
  112. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sr.json +1 -1
  113. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sv.json +1 -1
  114. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_th.json +1 -1
  115. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_tr.json +1 -1
  116. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_uk.json +1 -1
  117. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_vi.json +1 -1
  118. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-CN.json +1 -1
  119. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-HK.json +1 -1
  120. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-TW.json +1 -1
  121. package/chunks/ComponentShader.glsl.js +3 -3
  122. package/chunks/GlobalIllumination.glsl.js +25 -17
  123. package/chunks/GlowBlur.glsl.js +11 -8
  124. package/chunks/OITBlend.glsl.js +1 -1
  125. package/chunks/bundle2.js +1 -1
  126. package/chunks/index.js +1 -1
  127. package/config.js +1 -1
  128. package/core/has.js +1 -1
  129. package/interfaces.d.ts +7 -3
  130. package/kernel.js +1 -1
  131. package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
  132. package/layers/graphics/data/QueryEngineResult.js +1 -1
  133. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  134. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  135. package/layers/mixins/ArcGISImageService.js +1 -1
  136. package/layers/support/SubtypeSublayer.js +1 -1
  137. package/layers/support/capabilities.js +1 -1
  138. package/layers/support/layerUtils.js +1 -1
  139. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  140. package/networks/CircuitManager.d.ts +33 -25
  141. package/networks/CircuitManager.js +1 -1
  142. package/networks/support/typeUtils.d.ts +4 -1
  143. package/networks/support/typeUtils.js +1 -1
  144. package/package.json +2 -2
  145. package/renderers/ClassBreaksRenderer.js +1 -1
  146. package/renderers/UniqueValueRenderer.js +1 -1
  147. package/renderers/support/scaleDependentSymbolUtils.js +2 -0
  148. package/rest/networks/circuits/queryCircuits.js +1 -1
  149. package/rest/networks/circuits/support/QueryCircuitsParameters.d.ts +21 -15
  150. package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
  151. package/rest/query/operations/query.js +1 -1
  152. package/rest/support/Query.js +1 -1
  153. package/support/revision.js +1 -1
  154. package/third-party-notices.txt +19 -12
  155. package/views/2d/engine/webgl/GlyphSDFCreator.js +1 -1
  156. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  157. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringStore.js +2 -0
  158. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +2 -0
  159. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  160. package/views/3d/analysis/LineOfSight/LineOfSightDrawToolRenderer.js +2 -0
  161. package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +2 -0
  162. package/views/3d/analysis/LineOfSight/LineOfSightPlacementTool.js +2 -0
  163. package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +2 -0
  164. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +2 -0
  165. package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
  166. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  167. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  168. package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
  169. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  170. package/views/3d/layers/support/IntegratedMesh3DTilesVertexProcessing.js +1 -1
  171. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  172. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +3 -3
  173. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +22 -16
  174. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +149 -0
  175. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +2 -2
  176. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
  177. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  178. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  179. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  180. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
  181. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  182. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  183. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  184. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  185. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  186. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  187. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  188. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  189. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  190. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  191. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  192. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  193. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  194. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  195. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  196. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  197. package/views/3d/webgl-engine/materials/renderers/TextureBufferCache.js +1 -1
  198. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  199. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  200. package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +2 -0
  201. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  202. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  203. package/webmap/utils.js +1 -1
  204. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  205. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  206. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +64 -0
  207. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +2 -0
  208. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +3 -0
  209. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  210. package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +2 -1
  211. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  212. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  213. package/widgets/BatchAttributeForm/inputs/types.d.ts +4 -2
  214. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  215. package/assets/esri/core/workers/chunks/0c074c46d106ca4d3bad.js +0 -1
  216. package/assets/esri/core/workers/chunks/1f16bc8c02d8c4b2f693.js +0 -1
  217. package/assets/esri/core/workers/chunks/29878b52aa12b3815230.js +0 -1
  218. package/assets/esri/core/workers/chunks/2c916b93d8a6e6b9c0d7.js +0 -1
  219. package/assets/esri/core/workers/chunks/3e72bd6dbfc52d956c06.js +0 -1
  220. package/assets/esri/core/workers/chunks/3ea5a18b264628dc37f0.js +0 -1
  221. package/assets/esri/core/workers/chunks/41913575dd45c65d645e.js +0 -1
  222. package/assets/esri/core/workers/chunks/46e622857ba92a72a317.js +0 -1
  223. package/assets/esri/core/workers/chunks/49e8144effc299dfcd66.js +0 -1
  224. package/assets/esri/core/workers/chunks/4d0f793dee4ad919221b.js +0 -1
  225. package/assets/esri/core/workers/chunks/65ac73de5bb133c6bf89.js +0 -1
  226. package/assets/esri/core/workers/chunks/67ec1694d6e18b7c234c.js +0 -1
  227. package/assets/esri/core/workers/chunks/6e526c06825ecc6c99c0.js +0 -1
  228. package/assets/esri/core/workers/chunks/6f7aaba26773fe416ac2.js +0 -1
  229. package/assets/esri/core/workers/chunks/7acf82763aeba44049d0.js +0 -1
  230. package/assets/esri/core/workers/chunks/88eb1e4320c4ada01711.js +0 -1
  231. package/assets/esri/core/workers/chunks/8af9a78cf316581ea482.js +0 -1
  232. package/assets/esri/core/workers/chunks/96bba4d93a32ad34a1c8.js +0 -1
  233. package/assets/esri/core/workers/chunks/97719271a3e4c9f2b2c9.js +0 -1
  234. package/assets/esri/core/workers/chunks/9ea23cd4b2664c08b670.js +0 -1
  235. package/assets/esri/core/workers/chunks/a1a12552d34ea9eea130.js +0 -1
  236. package/assets/esri/core/workers/chunks/a429355534bf6cbd8304.js +0 -1
  237. package/assets/esri/core/workers/chunks/ac5999c88c27b49cd760.js +0 -1
  238. package/assets/esri/core/workers/chunks/b575292013bceef9b015.js +0 -1
  239. package/assets/esri/core/workers/chunks/bbc27d9285162696d089.js +0 -1
  240. package/assets/esri/core/workers/chunks/bc8a74da48b08309875f.js +0 -1
  241. package/assets/esri/core/workers/chunks/cd7159600ce132e32d04.js +0 -1
  242. package/assets/esri/core/workers/chunks/ce66c551b7083913eee5.js +0 -1
  243. package/assets/esri/core/workers/chunks/cf7acf5acb6d322fd996.js +0 -1
  244. package/assets/esri/core/workers/chunks/d00dddc3881fa29446e1.js +0 -1
  245. package/assets/esri/core/workers/chunks/d9c3f14eee4db7a7137b.js +0 -1
  246. package/assets/esri/core/workers/chunks/db3c484bfa607dec6050.js +0 -1
  247. package/assets/esri/core/workers/chunks/dcc719e15b2e0cce1f3b.js +0 -1
  248. package/assets/esri/core/workers/chunks/f43d628d47eec7d530c7.js +0 -1
  249. package/assets/esri/core/workers/chunks/f9fe3c9867b0bdb2aec6.js +0 -596
  250. package/assets/esri/core/workers/chunks/fae147d03ed723ab234d.js +0 -1
  251. package/assets/esri/core/workers/chunks/fcf51697c361e0075cc2.js +0 -1
  252. package/assets/esri/core/workers/chunks/fe30e61652716fcccf16.js +0 -2
  253. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +0 -132
  254. /package/assets/esri/core/workers/chunks/{defac06f9e2b43090677.js.LICENSE.txt → 73af4c947e8151d411c1.js.LICENSE.txt} +0 -0
  255. /package/assets/esri/core/workers/chunks/{fe30e61652716fcccf16.js.LICENSE.txt → a508104179e08f0f268c.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{subtract as e,length as t,scale as f}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isOrthoNormal as r,hasIdentityRotation as i}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{BufferViewVec4u8 as n,BufferViewVec3f16 as s,BufferViewVec3f as c,BufferViewVec4f16 as l,BufferViewVec4f as d,BufferViewFloat as u,BufferViewVec2i16 as a,BufferViewVec2f16 as p,BufferViewVec2f as g}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as m}from"../../lib/Util.js";function y(e,t,f,o=1){const{data:r,indices:i}=e,n=t.typedBuffer,s=t.typedBufferStride,c=i.length;if(f*=s,1===o)for(let l=0;l<c;++l)n[f]=r[i[l]],f+=s;else for(let l=0;l<c;++l){const e=r[i[l]];for(let t=0;t<o;t++)n[f]=e,f+=s}}function b(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,n=t.typedBufferStride,s=r.length;f*=n;for(let c=0;c<s;++c){const e=2*r[c];i[f]=o[e],i[f+1]=o[e+1],f+=n}}function B(e,t,f,o=1){const{data:r,indices:i}=e,n=t.typedBuffer,s=t.typedBufferStride,c=i.length;if(f*=s,1===o)for(let l=0;l<c;++l){const e=3*i[l];n[f]=r[e],n[f+1]=r[e+1],n[f+2]=r[e+2],f+=s}else for(let l=0;l<c;++l){const e=3*i[l];for(let t=0;t<o;++t)n[f]=r[e],n[f+1]=r[e+1],n[f+2]=r[e+2],f+=s}}function h(e,t,f,o=1){const{data:r,indices:i}=e,n=t.typedBuffer,s=t.typedBufferStride,c=i.length;if(f*=s,1===o)for(let l=0;l<c;++l){const e=4*i[l];n[f]=r[e],n[f+1]=r[e+1],n[f+2]=r[e+2],n[f+3]=r[e+3],f+=s}else for(let l=0;l<c;++l){const e=4*i[l];for(let t=0;t<o;++t)n[f]=r[e],n[f+1]=r[e+1],n[f+2]=r[e+2],n[f+3]=r[e+3],f+=s}}function F(e,t,f){const o=e.typedBuffer,r=e.typedBufferStride,i=e.elementCount;t*=r;for(let n=0;n<f;++n){for(let e=0;e<i;++e)o[t+e]=0;t+=r}}function v(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,n=t.typedBufferStride,s=r.length;f*=n;for(let c=0;c<s;++c){const e=9*r[c];for(let t=0;t<9;++t)i[f+t]=o[e+t];f+=n}}function w(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,n=t.typedBufferStride,s=r.length;f*=n;for(let c=0;c<s;++c){const e=16*r[c];for(let t=0;t<16;++t)i[f+t]=o[e+t];f+=n}}function z(e,t,f,o,r=1){if(!t)return void B(e,f,o,r);const{data:n,indices:s}=e,c=f.typedBuffer,l=f.typedBufferStride,d=s.length,u=t[0],a=t[1],p=t[2],g=t[4],m=t[5],y=t[6],b=t[8],h=t[9],F=t[10],v=t[12],w=t[13],z=t[14];o*=l;let S=0,k=0,N=0;const $=i(t)?e=>{S=n[e]+v,k=n[e+1]+w,N=n[e+2]+z}:e=>{const t=n[e],f=n[e+1],o=n[e+2];S=u*t+g*f+b*o+v,k=a*t+m*f+h*o+w,N=p*t+y*f+F*o+z};if(1===r)for(let i=0;i<d;++i)$(3*s[i]),c[o]=S,c[o+1]=k,c[o+2]=N,o+=l;else for(let i=0;i<d;++i){$(3*s[i]);for(let e=0;e<r;++e)c[o]=S,c[o+1]=k,c[o+2]=N,o+=l}}function S(e,t,f,o,n=1){if(!t)return void B(e,f,o,n);const{data:s,indices:c}=e,l=t,d=f.typedBuffer,u=f.typedBufferStride,a=c.length,p=l[0],g=l[1],m=l[2],y=l[4],b=l[5],h=l[6],F=l[8],v=l[9],w=l[10],z=!r(l),S=1e-6,k=1-S;o*=u;let N=0,$=0,x=0;const A=i(l)?e=>{N=s[e],$=s[e+1],x=s[e+2]}:e=>{const t=s[e],f=s[e+1],o=s[e+2];N=p*t+y*f+F*o,$=g*t+b*f+v*o,x=m*t+h*f+w*o};if(1===n)if(z)for(let r=0;r<a;++r){A(3*c[r]);const e=N*N+$*$+x*x;if(e<k&&e>S){const t=1/Math.sqrt(e);d[o]=N*t,d[o+1]=$*t,d[o+2]=x*t}else d[o]=N,d[o+1]=$,d[o+2]=x;o+=u}else for(let r=0;r<a;++r)A(3*c[r]),d[o]=N,d[o+1]=$,d[o+2]=x,o+=u;else for(let r=0;r<a;++r){if(A(3*c[r]),z){const e=N*N+$*$+x*x;if(e<k&&e>S){const t=1/Math.sqrt(e);N*=t,$*=t,x*=t}}for(let e=0;e<n;++e)d[o]=N,d[o+1]=$,d[o+2]=x,o+=u}}function k(e,t,f,o,i=1){if(!t)return void h(e,f,o,i);const{data:n,indices:s}=e,c=t,l=f.typedBuffer,d=f.typedBufferStride,u=s.length,a=c[0],p=c[1],g=c[2],m=c[4],y=c[5],b=c[6],B=c[8],F=c[9],v=c[10],w=!r(c),z=1e-6,S=1-z;if(o*=d,1===i)for(let r=0;r<u;++r){const e=4*s[r],t=n[e],f=n[e+1],i=n[e+2],c=n[e+3];let u=a*t+m*f+B*i,h=p*t+y*f+F*i,k=g*t+b*f+v*i;if(w){const e=u*u+h*h+k*k;if(e<S&&e>z){const t=1/Math.sqrt(e);u*=t,h*=t,k*=t}}l[o]=u,l[o+1]=h,l[o+2]=k,l[o+3]=c,o+=d}else for(let r=0;r<u;++r){const e=4*s[r],t=n[e],f=n[e+1],c=n[e+2],u=n[e+3];let h=a*t+m*f+B*c,k=p*t+y*f+F*c,N=g*t+b*f+v*c;if(w){const e=h*h+k*k+N*N;if(e<S&&e>z){const t=1/Math.sqrt(e);h*=t,k*=t,N*=t}}for(let r=0;r<i;++r)l[o]=h,l[o+1]=k,l[o+2]=N,l[o+3]=u,o+=d}}function N(e,t,f,o,r=1){const{data:i,indices:n}=e,s=f.typedBuffer,c=f.typedBufferStride,l=n.length;if(o*=c,t===i.length&&4===t){s[o]=i[0],s[o+1]=i[1],s[o+2]=i[2],s[o+3]=i[3];const e=new Uint32Array(f.typedBuffer.buffer,f.start),t=c/4,n=e[o/=4];o+=t;const d=l*r;for(let f=1;f<d;++f)e[o]=n,o+=t;return}if(1!==r)if(4!==t)for(let d=0;d<l;++d){const e=3*n[d];for(let t=0;t<r;++t)s[o]=i[e],s[o+1]=i[e+1],s[o+2]=i[e+2],s[o+3]=255,o+=c}else for(let d=0;d<l;++d){const e=4*n[d];for(let t=0;t<r;++t)s[o]=i[e],s[o+1]=i[e+1],s[o+2]=i[e+2],s[o+3]=i[e+3],o+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*n[e];s[o]=i[t],s[o+1]=i[t+1],s[o+2]=i[t+2],s[o+3]=i[t+3],o+=c}return}for(let e=0;e<l;++e){const t=3*n[e];s[o]=i[t],s[o+1]=i[t+1],s[o+2]=i[t+2],s[o+3]=255,o+=c}}}function $(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,n=t.typedBufferStride,s=r.length,c=o[0];f*=n;for(let l=0;l<s;++l)i[f]=c,f+=n}function x(o,r,i,n){e(A,o,r);const s=Math.max(Math.sqrt(t(A)),1e-4);f(A,A,1/s),i[n++]=A[0],i[n++]=A[1],i[n++]=A[2],i[n++]=s}const A=o();function M(e,t,f,o,r=1){const i=t.typedBuffer,n=t.typedBufferStride;if(o*=n,1===r)for(let s=0;s<f;++s)i[o]=e[0],i[o+1]=e[1],i[o+2]=e[2],i[o+3]=e[3],o+=n;else for(let s=0;s<f;++s)for(let t=0;t<r;++t)i[o]=e[0],i[o+1]=e[1],i[o+2]=e[2],i[o+3]=e[3],o+=n}function j(e,t,f,o,r,i,s){let c={numItems:0,numVerticesPerItem:0};for(const l of f.fields.keys()){const f=e.get(l),d=f?.indices;if(f&&d)"position"===l&&(c={numItems:1,numVerticesPerItem:d.length}),q(l,f,o,r,i,s);else if("olidColor"===l&&null!=t){const f=e.get("position")?.indices;if(f){const e=f.length;M(t,i.getField(l,n),e,s)}}}return c}function q(e,t,f,o,r,i){switch(e){case"position":{m(3===t.size);const o=r.getField(e,c);m(!!o,`No buffer view for ${e}`),z(t,f,o,i);break}case"normal":{m(3===t.size);const f=r.getField(e,c);m(!!f,`No buffer view for ${e}`),S(t,o,f,i);break}case"normalCompressed":case"profileRight":case"profileUp":{m(2===t.size);const f=r.getField(e,a);m(!!f,`No buffer view for ${e}`),b(t,f,i);break}case"uv0":{m(2===t.size);const f=r.getField(e,p)??r.getField(e,g);m(!!f,`No buffer view for ${e}`),b(t,f,i);break}case"uvi":{m(2===t.size);const f=r.getField(e,a);m(!!f,`No buffer view for ${e}`),b(t,f,i);break}case"color":case"symbolColor":{const f=r.getField(e,n);m(!!f,`No buffer view for ${e}`),m(3===t.size||4===t.size),N(t,t.size,f,i);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const f=r.getField(e,u)??r.getField(e,u);m(!!f,`No buffer view for ${e}`),m(1===t.size),$(t,f,i);break}case"tangent":{m(4===t.size);const o=r.getField(e,d);m(!!o,`No buffer view for ${e}`),k(t,f,o,i);break}case"profileVertexAndNormal":{m(4===t.size);const f=r.getField(e,l)??r.getField(e,d);m(!!f,`No buffer view for ${e}`),h(t,f,i);break}case"profileAuxData":{m(3===t.size);const f=r.getField(e,s)??r.getField(e,c);m(!!f,`No buffer view for ${e}`),B(t,f,i);break}}}export{q as writeAttribute,j as writeAttributes,y as writeBufferFloat,v as writeBufferMat3f,w as writeBufferMat4f,b as writeBufferVec2,B as writeBufferVec3,h as writeBufferVec4,F as writeBufferZeros,N as writeColor,x as writeDeltaF16Vector,S as writeNormal,M as writeOlidColor,z as writePosition,k as writeTangent,$ as writeVVFeatureAttribute};
2
+ import{subtract as e,length as t,scale as f}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isOrthoNormal as r,hasIdentityRotation as i}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{BufferViewVec4u8 as s,BufferViewVec3f16 as n,BufferViewVec3f as c,BufferViewVec4f16 as l,BufferViewVec4f as d,BufferViewFloat as u,BufferViewVec2i16 as a,BufferViewVec2f16 as p,BufferViewVec2f as g}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as y}from"../../lib/Util.js";function b(e,t,f,o=1){const{data:r,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===o)for(let l=0;l<c;++l)s[f]=r[i[l]],f+=n;else for(let l=0;l<c;++l){const e=r[i[l]];for(let t=0;t<o;t++)s[f]=e,f+=n}}function B(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length;f*=s;for(let c=0;c<n;++c){const e=2*r[c];i[f]=o[e],i[f+1]=o[e+1],f+=s}}function m(e,t,f,o=1){const{data:r,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===o)for(let l=0;l<c;++l){const e=3*i[l];s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],f+=n}else for(let l=0;l<c;++l){const e=3*i[l];for(let t=0;t<o;++t)s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],f+=n}}function h(e,t,f,o=1){const{data:r,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===o)for(let l=0;l<c;++l){const e=4*i[l];s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],s[f+3]=r[e+3],f+=n}else for(let l=0;l<c;++l){const e=4*i[l];for(let t=0;t<o;++t)s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],s[f+3]=r[e+3],f+=n}}function F(e,t,f){const o=e.typedBuffer,r=e.typedBufferStride,i=e.elementCount;t*=r;for(let s=0;s<f;++s){for(let e=0;e<i;++e)o[t+e]=0;t+=r}}function v(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length;f*=s;for(let c=0;c<n;++c){const e=9*r[c];for(let t=0;t<9;++t)i[f+t]=o[e+t];f+=s}}function w(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length;f*=s;for(let c=0;c<n;++c){const e=16*r[c];for(let t=0;t<16;++t)i[f+t]=o[e+t];f+=s}}function z(e,t,f,o,r=1){if(!t)return void m(e,f,o,r);const{data:s,indices:n}=e,c=f.typedBuffer,l=f.typedBufferStride,d=n.length,u=t[0],a=t[1],p=t[2],g=t[4],y=t[5],b=t[6],B=t[8],h=t[9],F=t[10],v=t[12],w=t[13],z=t[14];o*=l;let S=0,k=0,N=0;const $=i(t)?e=>{S=s[e]+v,k=s[e+1]+w,N=s[e+2]+z}:e=>{const t=s[e],f=s[e+1],o=s[e+2];S=u*t+g*f+B*o+v,k=a*t+y*f+h*o+w,N=p*t+b*f+F*o+z};if(1===r)for(let i=0;i<d;++i)$(3*n[i]),c[o]=S,c[o+1]=k,c[o+2]=N,o+=l;else for(let i=0;i<d;++i){$(3*n[i]);for(let e=0;e<r;++e)c[o]=S,c[o+1]=k,c[o+2]=N,o+=l}}function S(e,t,f,o,s=1){if(!t)return void m(e,f,o,s);const{data:n,indices:c}=e,l=t,d=f.typedBuffer,u=f.typedBufferStride,a=c.length,p=l[0],g=l[1],y=l[2],b=l[4],B=l[5],h=l[6],F=l[8],v=l[9],w=l[10],z=!r(l),S=1e-6,k=1-S;o*=u;let N=0,$=0,x=0;const A=i(l)?e=>{N=n[e],$=n[e+1],x=n[e+2]}:e=>{const t=n[e],f=n[e+1],o=n[e+2];N=p*t+b*f+F*o,$=g*t+B*f+v*o,x=y*t+h*f+w*o};if(1===s)if(z)for(let r=0;r<a;++r){A(3*c[r]);const e=N*N+$*$+x*x;if(e<k&&e>S){const t=1/Math.sqrt(e);d[o]=N*t,d[o+1]=$*t,d[o+2]=x*t}else d[o]=N,d[o+1]=$,d[o+2]=x;o+=u}else for(let r=0;r<a;++r)A(3*c[r]),d[o]=N,d[o+1]=$,d[o+2]=x,o+=u;else for(let r=0;r<a;++r){if(A(3*c[r]),z){const e=N*N+$*$+x*x;if(e<k&&e>S){const t=1/Math.sqrt(e);N*=t,$*=t,x*=t}}for(let e=0;e<s;++e)d[o]=N,d[o+1]=$,d[o+2]=x,o+=u}}function k(e,t,f,o,i=1){if(!t)return void h(e,f,o,i);const{data:s,indices:n}=e,c=t,l=f.typedBuffer,d=f.typedBufferStride,u=n.length,a=c[0],p=c[1],g=c[2],y=c[4],b=c[5],B=c[6],m=c[8],F=c[9],v=c[10],w=!r(c),z=1e-6,S=1-z;if(o*=d,1===i)for(let r=0;r<u;++r){const e=4*n[r],t=s[e],f=s[e+1],i=s[e+2],c=s[e+3];let u=a*t+y*f+m*i,h=p*t+b*f+F*i,k=g*t+B*f+v*i;if(w){const e=u*u+h*h+k*k;if(e<S&&e>z){const t=1/Math.sqrt(e);u*=t,h*=t,k*=t}}l[o]=u,l[o+1]=h,l[o+2]=k,l[o+3]=c,o+=d}else for(let r=0;r<u;++r){const e=4*n[r],t=s[e],f=s[e+1],c=s[e+2],u=s[e+3];let h=a*t+y*f+m*c,k=p*t+b*f+F*c,N=g*t+B*f+v*c;if(w){const e=h*h+k*k+N*N;if(e<S&&e>z){const t=1/Math.sqrt(e);h*=t,k*=t,N*=t}}for(let r=0;r<i;++r)l[o]=h,l[o+1]=k,l[o+2]=N,l[o+3]=u,o+=d}}function N(e,t,f,o,r=1){const{data:i,indices:s}=e,n=f.typedBuffer,c=f.typedBufferStride,l=s.length;if(o*=c,t===i.length&&4===t){n[o]=i[0],n[o+1]=i[1],n[o+2]=i[2],n[o+3]=i[3];const e=new Uint32Array(f.typedBuffer.buffer,f.start),t=c/4,s=e[o/=4];o+=t;const d=l*r;for(let f=1;f<d;++f)e[o]=s,o+=t;return}if(1!==r)if(4!==t)for(let d=0;d<l;++d){const e=3*s[d];for(let t=0;t<r;++t)n[o]=i[e],n[o+1]=i[e+1],n[o+2]=i[e+2],n[o+3]=255,o+=c}else for(let d=0;d<l;++d){const e=4*s[d];for(let t=0;t<r;++t)n[o]=i[e],n[o+1]=i[e+1],n[o+2]=i[e+2],n[o+3]=i[e+3],o+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*s[e];n[o]=i[t],n[o+1]=i[t+1],n[o+2]=i[t+2],n[o+3]=i[t+3],o+=c}return}for(let e=0;e<l;++e){const t=3*s[e];n[o]=i[t],n[o+1]=i[t+1],n[o+2]=i[t+2],n[o+3]=255,o+=c}}}function $(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length,c=o[0];f*=s;for(let l=0;l<n;++l)i[f]=c,f+=s}function x(o,r,i,s){e(A,o,r);const n=Math.max(Math.sqrt(t(A)),1e-4);f(A,A,1/n),i[s++]=A[0],i[s++]=A[1],i[s++]=A[2],i[s++]=n}const A=o();function M(e,t,f,o,r=1){const i=t.typedBuffer,s=t.typedBufferStride;if(o*=s,1===r)for(let n=0;n<f;++n)i[o]=e[0],i[o+1]=e[1],i[o+2]=e[2],i[o+3]=e[3],o+=s;else for(let n=0;n<f;++n)for(let t=0;t<r;++t)i[o]=e[0],i[o+1]=e[1],i[o+2]=e[2],i[o+3]=e[3],o+=s}function j(e,t,f,o,r,i){const{buffer:n,offset:c}=i;for(const l of f.fields.keys()){const f=e.get(l),i=f?.indices;if(f&&i)q(l,f,o,r,n,c);else if("olidColor"===l&&null!=t){const f=e.get("position")?.indices;if(f){const e=f.length;M(t,n.getField(l,s),e,c)}}}}function q(e,t,f,o,r,i){switch(e){case"position":{y(3===t.size);const o=r.getField(e,c);y(!!o,`No buffer view for ${e}`),z(t,f,o,i);break}case"normal":{y(3===t.size);const f=r.getField(e,c);y(!!f,`No buffer view for ${e}`),S(t,o,f,i);break}case"normalCompressed":case"profileRight":case"profileUp":{y(2===t.size);const f=r.getField(e,a);y(!!f,`No buffer view for ${e}`),B(t,f,i);break}case"uv0":{y(2===t.size);const f=r.getField(e,p)??r.getField(e,g);y(!!f,`No buffer view for ${e}`),B(t,f,i);break}case"uvi":{y(2===t.size);const f=r.getField(e,a);y(!!f,`No buffer view for ${e}`),B(t,f,i);break}case"color":case"symbolColor":{const f=r.getField(e,s);y(!!f,`No buffer view for ${e}`),y(3===t.size||4===t.size),N(t,t.size,f,i);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const f=r.getField(e,u)??r.getField(e,u);y(!!f,`No buffer view for ${e}`),y(1===t.size),$(t,f,i);break}case"tangent":{y(4===t.size);const o=r.getField(e,d);y(!!o,`No buffer view for ${e}`),k(t,f,o,i);break}case"profileVertexAndNormal":{y(4===t.size);const f=r.getField(e,l)??r.getField(e,d);y(!!f,`No buffer view for ${e}`),h(t,f,i);break}case"profileAuxData":{y(3===t.size);const f=r.getField(e,n)??r.getField(e,c);y(!!f,`No buffer view for ${e}`),m(t,f,i);break}}}export{q as writeAttribute,j as writeAttributes,b as writeBufferFloat,v as writeBufferMat3f,w as writeBufferMat4f,B as writeBufferVec2,m as writeBufferVec3,h as writeBufferVec4,F as writeBufferZeros,N as writeColor,x as writeDeltaF16Vector,S as writeNormal,M as writeOlidColor,z as writePosition,k as writeTangent,$ as writeVVFeatureAttribute};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{TextureBuffer as e}from"../../lib/TextureBackedBuffer/TextureBuffer.js";import{BufferCache as r}from"./BufferCache.js";class f{constructor(f,t){this._cache=new r(f.newCache,r=>new e(f,t,r),"TextureBufferCache")}dispose(){this._cache.dispose()}newTextureBuffer(e){return this._cache.newBuffer(e)}deleteTextureBuffer(e){return this._cache.deleteBuffer(e)}}export{f as TextureBufferCache};
2
+ import{TextureBuffer as e}from"../../lib/TextureBackedBuffer/TextureBuffer.js";import{BufferCache as t}from"./BufferCache.js";class r{constructor(r,f){this._layout=f,this._cache=new t(r.newCache,t=>new e(r,f,Math.floor(t/this._layout.byteStride)),"TextureBufferCache")}dispose(){this._cache.dispose()}newTextureBuffer(e){return this._cache.newBuffer(e*this._layout.byteStride)}deleteTextureBuffer(e){return this._cache.deleteBuffer(e)}}export{r as TextureBufferCache};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{nextHighestPowerOfTwo as e,roundUpToNearest as t}from"../../../../../core/mathUtils.js";import{copy as r,invert as s,transpose as o}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{glLayout as a}from"../../../support/buffer/glUtil.js";import{assert as i}from"../../lib/Util.js";import{VertexArrayObject as f}from"../../lib/VertexArrayObject.js";import{getMaxItemCount as u,getMaxByteSize as c}from"../../lib/TextureBackedBuffer/TextureBackedBufferUtils.js";import{bufferRangePool as l}from"./BufferRange.js";import{DrawCommand as h}from"./DrawCommand.js";import{getIndexLayoutForMaxIndex as g,getIndexLayoutForDataType as m}from"./IndexLayout.js";import{BaseInstanceData as y}from"./PerBaseInstanceData.js";import{VertexBuffer as d}from"../../../../webgl/VertexBuffer.js";class x{constructor(e,t){this._rctx=t,this._vaoCacheValue=null,this._instanceVboCacheValue=null,this._textureBufferCacheValue=null,this._vboCacheValue=null;const r=e.createBufferWriter();this._bufferWriter=r;const s=["geometry"],o="textureBufferLayout"in r&&null!=r.textureBufferLayout;this.useTextureBuffer=o,o&&s.push("texture"),this.useIndexing=e.useIndexing,this.useIndexing&&s.push("index"),this.targetBuffers=s}get _vaoCache(){return this._vaoCacheValue??=this._rctx.getVaoCache(a(this._bufferWriter.layout)),this._vaoCacheValue}get _instanceVboCache(){return this._instanceVboCacheValue??=this._rctx.getVboCache(a(this._bufferWriter.layout,1)),this._instanceVboCacheValue}get _textureBufferCache(){return this.useTextureBuffer?(this._textureBufferCacheValue??=this._rctx.getTextureBufferCache(this._bufferWriter.textureBufferLayout),this._textureBufferCacheValue):null}get _vboCache(){return this._vboCacheValue??=this._rctx.getVboCache(a(this._bufferWriter.layout)),this._vboCacheValue}maxElements(e){if("texture"===e){const e=this._targetLayout("texture");return null==e?0:u(this._rctx,e)}const t=Math.floor(C/this._targetStrideBytes("geometry"));if("index"===e){const e=g(t-1).dataType;return Math.floor(C/this._targetStrideBytes("index",e))}return t}_targetStrideBytes(e,t){return this._targetLayout(e,t)?.stride??0}_targetLayout(e,t){return"geometry"===e?this._bufferWriter.layout:"baseInstance"===e?this._bufferWriter.baseInstanceLayout:"index"===e?m(t):this._bufferWriter.textureBufferLayout}evaluateBufferAllocation(e,t,r,s){const o=this._targetStrideBytes("geometry"),n=t.reduce((e,{geometry:t})=>e+this.vertexElementCount(t),0),a=r.reduce((e,{geometry:t})=>e+this.vertexElementCount(t),0),i=Math.min((e+n-a)*o,C),f=s.vao?.buffer("geometry"),u=f?.sizeBytes??0;return i>b&&i<u/2?0:i>u?1:2}deleteBuffer(e){e.isInstanced?(e.instancedCommandVAOs?.dispose(),this._instanceVboCache.deleteVbo(e.vao?.mutableBuffer("geometry")),e.vao?.disposeVAOOnly()):this.useIndexing?(this._vboCache.deleteVbo(e.vao?.mutableBuffer("geometry")),this._rctx.indexBufferCache.deleteIndexBuffer(e.vao?.indexBuffer),e.vao?.disposeVAOOnly()):this._vaoCache.deleteVao(e.vao),this._textureBufferCache?.deleteTextureBuffer(e.textureBuffer),e.vao=null,e.textureBuffer=null,e.endElements.geometry=0,e.endElements.texture=0,e.endElements.index=0}createBaseInstanceData(e){const{_bufferWriter:t}=this;if(null==e||null==t.baseInstanceLayout||null==t.writeBaseInstance||null==t.elementCountBaseInstance)return null;const r=this._targetLayout("baseInstance"),s=t.elementCountBaseInstance(e.attributes),o=s*r.stride,n=new d(this._rctx,a(r));n.setSize(Math.ceil(o));const i=V(o),f=r.createView(i.buffer);t.writeBaseInstance(e.attributes,f),n.setSubData(i,0,0,o);const u=new h;return u.first=0,u.count=s,new y(e,n,u)}reallocateBuffer(e,t,r){if(this.deleteBuffer(t),null!=e){i(!this.useIndexing,"Instanced indexed rendering is not supported");const s=e.baseInstanceBuffer,o=r.geometry*this._targetStrideBytes("geometry"),n=this._instanceVboCache.newVbo(I(o));t.vao=new f(this._rctx,new Map([["baseInstance",s],["geometry",n]]))}else if(this.useIndexing){const e=r.geometry*this._targetStrideBytes("geometry"),s=this._vboCache.newVbo(I(e)),o=Math.floor(s.sizeBytes/this._bufferWriter.layout.stride)-1,n=g(o),a=r.index*n.stride,i=Math.ceil(I(a)/n.stride),u=this._rctx.indexBufferCache.newIndexBuffer(i,n.dataType);t.vao=new f(this._rctx,s,u)}else{const e=r.geometry*this._targetStrideBytes("geometry");t.vao=this._vaoCache.newVao(I(e))}const s=this._targetLayout("texture"),o=this._textureBufferCache;if(null!=s&&null!=o){const e=I(r.texture*s.stride),n=Math.ceil(e/s.stride);t.textureBuffer=o.newTextureBuffer(n)}t.endElements.geometry=Math.floor((t.vao?.getByteLength("geometry")??0)/this._targetStrideBytes("geometry")),t.endElements.texture=t.textureBuffer?.itemCount??0,t.endElements.index=t.vao?.indexBuffer?.size??0}elementCount(e,t){const{attributes:r}=e;return"geometry"===t?this._bufferWriter.elementCount(r):"baseInstance"===t?this._bufferWriter.elementCountBaseInstance?.(r)??0:"index"===t?e.drawIndices?.length??0:this._bufferWriter.elementCountTextureBuffer?.(r)??0}vertexElementCount(e){return this._bufferWriter.elementCount(e.attributes)}canGrow(e,t){const r=this.targetBuffers.map(r=>this._evaluateTargetBufferGrowth(r,e,t));return r.every(({canGrow:e})=>e)&&r.some(({needsToGrow:e})=>e)}_evaluateTargetBufferGrowth(e,t,r){const s=this._targetLayout(e,t.indexType),o=t.getTargetBuffer(e);if(null==s||null==o)return{needsToGrow:null!=s,canGrow:!0};return{needsToGrow:r[e]*s.stride>o.sizeBytes,canGrow:"geometry"===e||"index"===e?o.sizeBytes<I(C-b):o.sizeBytes<c(this._rctx,s)}}clearHoles(e,t){const{indexType:r}=t;for(const s of this.targetBuffers){const o=this._targetStrideBytes(s,r),n=e[s],a=n.reduce((e,t)=>Math.max(e,t.numElements),0)*o,i=V(a);i.fill(0,0,a);for(const e of n)this._setTargetSubData(s,t,o,e,i)}}clearHolesMetal(e,t,r){const{indexType:s}=r,{targetBuffers:o}=this,n={};let a=0;for(const u of o){const e=t[u].numElements*this._targetStrideBytes(u,s);n[u]=a,a+=p(e)}const i=V(a);i.fill(0,0,a);const f={};for(const u of o)f[u]=this._targetLayout(u,s)?.createView(i.buffer,n[u]);for(const u of e){const e=u.targetRanges.geometry;if(!(e.from>=t.geometry.from&&e.to<=t.geometry.to))continue;const r={};for(const s of o)r[s]=u.targetRanges[s].from-t[s].from;this._writeGeometry(u.geometry,f,r,u.targetRanges)}for(const u of o)this._setTargetSubData(u,r,this._targetStrideBytes(u,s),t[u],i,n[u])}writeRandomInstances(e,t,r){const{indexType:s}=r,{targetBuffers:o}=this,n={},a={},i={},f={};let u=0;for(const g of o)n[g]=e[g]*this._targetStrideBytes(g,s),a[g]=u,i[g]=0,f[g]=l.acquire(0,0),u+=p(n[g]);const c=V(u),h={};for(const l of o)h[l]=this._targetLayout(l,s)?.createView(c.buffer,a[l]);for(const l of t){for(const e of o){const t=l.targetRanges[e],o=f[e];o.to===t.from||(o.numElements>0&&this._setTargetSubData(e,r,this._targetStrideBytes(e,s),f[e],c,a[e]),o.from=t.from,i[e]=0)}this._writeGeometry(l.geometry,h,i,l.targetRanges);for(const e of o){const t=l.targetRanges[e];i[e]+=t.numElements,f[e].to=t.to}}for(const g of o){const e=f[g];e.numElements>0&&this._setTargetSubData(g,r,this._targetStrideBytes(g,s),e,c,a[g]),l.release(f[g])}}writeInstanceRangeMetal(e,t,r){const{indexType:s}=r,{targetBuffers:o}=this,n={},a={};let i=0;for(const c of o)n[c]=e[c].numElements*this._targetStrideBytes(c,s),a[c]=i,i+=p(n[c]);const f=V(i),u={};for(const c of o)u[c]=this._targetLayout(c,s)?.createView(f.buffer,a[c]);f.fill(0,0,i);for(const c of t){const t=c.targetRanges.geometry;if(!(t.from>=e.geometry.from&&t.to<=e.geometry.to))continue;const r={},s={};for(const n of o){const t=c.targetRanges[n];r[n]=t.from-e[n].from,s[n]=t}this._writeGeometry(c.geometry,u,r,s)}for(const c of o)e[c].numElements>0&&this._setTargetSubData(c,r,this._targetStrideBytes(c,s),e[c],f,a[c])}rebuildInstances(e,t,r){const{indexType:s}=r,{targetBuffers:o}=this,n={},a={},i={};let f=0;for(const l of o)n[l]=e[l]*this._targetStrideBytes(l,s),a[l]=f,f+=p(n[l]),i[l]=0;const u=V(f),c={};for(const l of o)c[l]=this._targetLayout(l,s)?.createView(u.buffer,a[l]);for(const l of t){const e={},t={};for(const r of o){e[r]=i[r],i[r]+=this.elementCount(l.geometry.geometry,r);const s=l.targetRanges[r];s.from=e[r],s.to=i[r],t[r]=s}this._writeGeometry(l.geometry,c,e,t)}for(const h of o){const e=l.acquire(0,i[h]);this._setTargetSubData(h,r,this._targetStrideBytes(h,s),e,u,a[h]),l.release(e)}return i}updateInstance(e,t){const{indexType:r}=t,{targetBuffers:s}=this,o={},n={};let a=0;for(const c of s){const t=this._targetStrideBytes(c,r);o[c]=this.elementCount(e.geometry.geometry,c)*t,n[c]=a,a+=p(o[c])}const i=V(a),f={},u={};for(const c of s)u[c]=0,f[c]=this._targetLayout(c,r)?.createView(i.buffer,n[c]);this._writeGeometry(e.geometry,f,u,e.targetRanges);for(const c of s)this._setTargetSubData(c,t,this._targetStrideBytes(c,r),e.targetRanges[c],i,n[c])}updateInstancesMetal(e){const{targetBuffers:t}=this;for(const[r,s]of e){const e={};for(const r of t)e[r]=l.acquire(1/0,-1/0);for(const r of s)for(const s of t){const t=e[s],o=r.targetRanges[s];t.from=Math.min(t.from,o.from),t.to=Math.max(t.to,o.to)}this.writeInstanceRangeMetal(e,r.instances.values(),r);for(const r of t)l.release(e[r])}}_writeGeometry(e,t,n,a){const{_bufferWriter:f}=this;if(null!=f&&(r(_,e.transformation),_[12]-=e.localOrigin.vec3[0],_[13]-=e.localOrigin.vec3[1],_[14]-=e.localOrigin.vec3[2],s(B,_),o(B,B),f.write(_,B,e.geometry.attributes,e.geometry.olidColor,t.geometry,n.geometry,a.texture),null!=t.texture&&f.writeTextureBuffer&&f.writeTextureBuffer(_,B,e.geometry.attributes,t.texture,n.texture),this.useIndexing)){const r=e.geometry.drawIndices;i(null!=t.index,"Should have an indexed view when using indexing"),i(null!=r,"Material requires vertex indices"),this._writeIndexBuffer(a.geometry,t.index,n,r)}}_writeIndexBuffer(e,t,r,s){const o=e.from,n=t,a=r.index;for(let i=0;i<s.length;++i)n[a+i]=s[i]+o}_setTargetSubData(e,t,r,s,o,n=0){if("geometry"===e){const a=t.getTargetBuffer(e);a?.setSubData(o,s.from*r,n,n+s.numElements*r)}else if("texture"===e){const r=t.getTargetBuffer(e);r?.setSubData(o.buffer,s.from,n,s.numElements)}else if("index"===e){const a=t.getTargetBuffer(e);a?.setSubData(o,s.from*r,n,n+s.numElements*r)}}static prune(){v=new Uint8Array(b)}}const _=n(),B=n(),b=262144,w=1024,C=16777216;let v=new Uint8Array(b);function V(e){return v.byteLength<e&&(v=new Uint8Array(e)),v}function p(e){return t(e,4)}function I(t){return t<=w?w:t<b?e(t):Math.max(Math.min(Math.ceil(1.5*t/b)*b,C),t)}export{x as VaoWriter};
2
+ import{nextHighestPowerOfTwo as e,roundUpToNearest as t}from"../../../../../core/mathUtils.js";import{copy as r,invert as s,transpose as o}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{glLayout as a}from"../../../support/buffer/glUtil.js";import{assert as i}from"../../lib/Util.js";import{VertexArrayObject as f}from"../../lib/VertexArrayObject.js";import{getMaxItemCount as u,getMaxByteSize as c}from"../../lib/TextureBackedBuffer/TextureBackedBufferUtils.js";import{bufferRangePool as l}from"./BufferRange.js";import{DrawCommand as h}from"./DrawCommand.js";import{getIndexLayoutForMaxIndex as g,getIndexLayoutForDataType as m}from"./IndexLayout.js";import{BaseInstanceData as d}from"./PerBaseInstanceData.js";import{VertexBuffer as y}from"../../../../webgl/VertexBuffer.js";class x{constructor(e,t){this._rctx=t,this._vaoCacheValue=null,this._instanceVboCacheValue=null,this._textureBufferCacheValue=null,this._vboCacheValue=null;const r=e.createBufferWriter();this._bufferWriter=r;const s=["geometry"],o="textureBufferLayout"in r&&null!=r.textureBufferLayout;this.useTextureBuffer=o,o&&s.push("texture"),this.useIndexing=e.useIndexing,this.useIndexing&&s.push("index"),this.targetBuffers=s}get _vaoCache(){return this._vaoCacheValue??=this._rctx.getVaoCache(a(this._bufferWriter.layout)),this._vaoCacheValue}get _instanceVboCache(){return this._instanceVboCacheValue??=this._rctx.getVboCache(a(this._bufferWriter.layout,1)),this._instanceVboCacheValue}get _textureBufferCache(){return this.useTextureBuffer?(this._textureBufferCacheValue??=this._rctx.getTextureBufferCache(this._bufferWriter.textureBufferLayout),this._textureBufferCacheValue):null}get _vboCache(){return this._vboCacheValue??=this._rctx.getVboCache(a(this._bufferWriter.layout)),this._vboCacheValue}maxElements(e){if("texture"===e){const e=this._targetLayout("texture");return null==e?0:u(this._rctx,e)}const t=Math.floor(C/this._targetStrideBytes("geometry"));if("index"===e){const e=g(t-1).dataType;return Math.floor(C/this._targetStrideBytes("index",e))}return t}_targetStrideBytes(e,t){return this._targetLayout(e,t)?.stride??0}_targetLayout(e,t){return"geometry"===e?this._bufferWriter.layout:"baseInstance"===e?this._bufferWriter.baseInstanceLayout:"index"===e?m(t):this._bufferWriter.textureBufferLayout}evaluateBufferAllocation(e,t,r,s){const o=this._targetStrideBytes("geometry"),n=t.reduce((e,{geometry:t})=>e+this.vertexElementCount(t),0),a=r.reduce((e,{geometry:t})=>e+this.vertexElementCount(t),0),i=Math.min((e+n-a)*o,C),f=s.vao?.buffer("geometry"),u=f?.sizeBytes??0;return i>b&&i<u/2?0:i>u?1:2}deleteBuffer(e){e.isInstanced?(e.instancedCommandVAOs?.dispose(),this._instanceVboCache.deleteVbo(e.vao?.mutableBuffer("geometry")),e.vao?.disposeVAOOnly()):this.useIndexing?(this._vboCache.deleteVbo(e.vao?.mutableBuffer("geometry")),this._rctx.indexBufferCache.deleteIndexBuffer(e.vao?.indexBuffer),e.vao?.disposeVAOOnly()):this._vaoCache.deleteVao(e.vao),this._textureBufferCache?.deleteTextureBuffer(e.textureBuffer),e.vao=null,e.textureBuffer=null,e.endElements.geometry=0,e.endElements.texture=0,e.endElements.index=0}createBaseInstanceData(e){const{_bufferWriter:t}=this;if(null==e||null==t.baseInstanceLayout||null==t.writeBaseInstance||null==t.elementCountBaseInstance)return null;const r=this._targetLayout("baseInstance"),s=t.elementCountBaseInstance(e.attributes),o=s*r.stride,n=new y(this._rctx,a(r));n.setSize(Math.ceil(o));const i=V(o),f=r.createView(i.buffer);t.writeBaseInstance(e.attributes,f),n.setSubData(i,0,0,o);const u=new h;return u.first=0,u.count=s,new d(e,n,u)}reallocateBuffer(e,t,r){if(this.deleteBuffer(t),null!=e){i(!this.useIndexing,"Instanced indexed rendering is not supported");const s=e.baseInstanceBuffer,o=r.geometry*this._targetStrideBytes("geometry"),n=this._instanceVboCache.newVbo(I(o));t.vao=new f(this._rctx,new Map([["baseInstance",s],["geometry",n]]))}else if(this.useIndexing){const e=r.geometry*this._targetStrideBytes("geometry"),s=this._vboCache.newVbo(I(e)),o=Math.floor(s.sizeBytes/this._bufferWriter.layout.stride)-1,n=g(o),a=r.index*n.stride,i=Math.ceil(I(a)/n.stride),u=this._rctx.indexBufferCache.newIndexBuffer(i,n.dataType);t.vao=new f(this._rctx,s,u)}else{const e=r.geometry*this._targetStrideBytes("geometry");t.vao=this._vaoCache.newVao(I(e))}const s=this._targetLayout("texture"),o=this._textureBufferCache;if(null!=s&&null!=o){const e=I(r.texture*s.stride),n=Math.ceil(e/s.stride);t.textureBuffer=o.newTextureBuffer(n)}t.endElements.geometry=Math.floor((t.vao?.getByteLength("geometry")??0)/this._targetStrideBytes("geometry")),t.endElements.texture=t.textureBuffer?.itemCount??0,t.endElements.index=t.vao?.indexBuffer?.size??0}elementCount(e,t){const{attributes:r}=e;switch(t){case"geometry":return this._bufferWriter.elementCount(r);case"baseInstance":return this._bufferWriter.elementCountBaseInstance?.(r)??0;case"index":return e.drawIndices?.length??0;case"texture":return this._bufferWriter.elementCountTextureBuffer?.(r)??0;default:throw new Error(`Unhandled target: ${t}`)}}vertexElementCount(e){return this._bufferWriter.elementCount(e.attributes)}canGrow(e,t){const r=this.targetBuffers.map(r=>this._evaluateTargetBufferGrowth(r,e,t));return r.every(({canGrow:e})=>e)&&r.some(({needsToGrow:e})=>e)}_evaluateTargetBufferGrowth(e,t,r){const s=this._targetLayout(e,t.indexType),o=t.getTargetBuffer(e);if(null==s||null==o)return{needsToGrow:null!=s,canGrow:!0};return{needsToGrow:r[e]*s.stride>o.sizeBytes,canGrow:"geometry"===e||"index"===e?o.sizeBytes<I(C-b):o.sizeBytes<c(this._rctx,s)}}clearHoles(e,t){const{indexType:r}=t;for(const s of this.targetBuffers){const o=this._targetStrideBytes(s,r),n=e[s],a=n.reduce((e,t)=>Math.max(e,t.numElements),0)*o,i=V(a);i.fill(0,0,a);for(const e of n)this._setTargetSubData(s,t,o,e,i)}}clearHolesMetal(e,t,r){const{indexType:s}=r,{targetBuffers:o}=this,n={};let a=0;for(const u of o){const e=t[u].numElements*this._targetStrideBytes(u,s);n[u]=a,a+=p(e)}const i=V(a);i.fill(0,0,a);const f={};for(const u of o)f[u]=this._targetLayout(u,s)?.createView(i.buffer,n[u]);for(const u of e){const e=u.targetRanges.geometry;if(!(e.from>=t.geometry.from&&e.to<=t.geometry.to))continue;const r={};for(const s of o)r[s]=u.targetRanges[s].from-t[s].from;this._writeGeometry(u.geometry,f,r,u.targetRanges)}for(const u of o)this._setTargetSubData(u,r,this._targetStrideBytes(u,s),t[u],i,n[u])}writeRandomInstances(e,t,r){const{indexType:s}=r,{targetBuffers:o}=this,n={},a={},i={},f={};let u=0;for(const g of o)n[g]=e[g]*this._targetStrideBytes(g,s),a[g]=u,i[g]=0,f[g]=l.acquire(0,0),u+=p(n[g]);const c=V(u),h={};for(const l of o)h[l]=this._targetLayout(l,s)?.createView(c.buffer,a[l]);for(const l of t){for(const e of o){const t=l.targetRanges[e],o=f[e];o.to===t.from||(o.numElements>0&&this._setTargetSubData(e,r,this._targetStrideBytes(e,s),f[e],c,a[e]),o.from=t.from,i[e]=0)}this._writeGeometry(l.geometry,h,i,l.targetRanges);for(const e of o){const t=l.targetRanges[e];i[e]+=t.numElements,f[e].to=t.to}}for(const g of o){const e=f[g];e.numElements>0&&this._setTargetSubData(g,r,this._targetStrideBytes(g,s),e,c,a[g]),l.release(f[g])}}writeInstanceRangeMetal(e,t,r){const{indexType:s}=r,{targetBuffers:o}=this,n={},a={};let i=0;for(const c of o)n[c]=e[c].numElements*this._targetStrideBytes(c,s),a[c]=i,i+=p(n[c]);const f=V(i),u={};for(const c of o)u[c]=this._targetLayout(c,s)?.createView(f.buffer,a[c]);f.fill(0,0,i);for(const c of t){const t=c.targetRanges.geometry;if(!(t.from>=e.geometry.from&&t.to<=e.geometry.to))continue;const r={},s={};for(const n of o){const t=c.targetRanges[n];r[n]=t.from-e[n].from,s[n]=t}this._writeGeometry(c.geometry,u,r,s)}for(const c of o)e[c].numElements>0&&this._setTargetSubData(c,r,this._targetStrideBytes(c,s),e[c],f,a[c])}rebuildInstances(e,t,r){const{indexType:s}=r,{targetBuffers:o}=this,n={},a={},i={};let f=0;for(const l of o)n[l]=e[l]*this._targetStrideBytes(l,s),a[l]=f,f+=p(n[l]),i[l]=0;const u=V(f),c={};for(const l of o)c[l]=this._targetLayout(l,s)?.createView(u.buffer,a[l]);for(const l of t){const e={},t={};for(const r of o){e[r]=i[r],i[r]+=this.elementCount(l.geometry.geometry,r);const s=l.targetRanges[r];s.from=e[r],s.to=i[r],t[r]=s}this._writeGeometry(l.geometry,c,e,t)}for(const h of o){const e=l.acquire(0,i[h]);this._setTargetSubData(h,r,this._targetStrideBytes(h,s),e,u,a[h]),l.release(e)}return i}updateInstance(e,t){const{indexType:r}=t,{targetBuffers:s}=this,o={},n={};let a=0;for(const c of s){const t=this._targetStrideBytes(c,r);o[c]=this.elementCount(e.geometry.geometry,c)*t,n[c]=a,a+=p(o[c])}const i=V(a),f={},u={};for(const c of s)u[c]=0,f[c]=this._targetLayout(c,r)?.createView(i.buffer,n[c]);this._writeGeometry(e.geometry,f,u,e.targetRanges);for(const c of s)this._setTargetSubData(c,t,this._targetStrideBytes(c,r),e.targetRanges[c],i,n[c])}updateInstancesMetal(e){const{targetBuffers:t}=this;for(const[r,s]of e){const e={};for(const r of t)e[r]=l.acquire(1/0,-1/0);for(const r of s)for(const s of t){const t=e[s],o=r.targetRanges[s];t.from=Math.min(t.from,o.from),t.to=Math.max(t.to,o.to)}this.writeInstanceRangeMetal(e,r.instances.values(),r);for(const r of t)l.release(e[r])}}_writeGeometry(e,t,n,a){const{_bufferWriter:f}=this;if(null==f)return;r(_,e.transformation),_[12]-=e.localOrigin.vec3[0],_[13]-=e.localOrigin.vec3[1],_[14]-=e.localOrigin.vec3[2],s(B,_),o(B,B);const u={buffer:t.geometry,offset:n.geometry},c=null!=t.texture?{buffer:t.texture,offset:n.texture,textureBufferRange:a.texture}:null;if(f.write(_,B,e.geometry.attributes,e.geometry.olidColor,u,c),this.useIndexing){const r=e.geometry.drawIndices;i(null!=t.index,"Should have an indexed view when using indexing"),i(null!=r,"Material requires vertex indices"),this._writeIndexBuffer(a.geometry,t.index,n,r)}}_writeIndexBuffer(e,t,r,s){const o=e.from,n=t,a=r.index;for(let i=0;i<s.length;++i)n[a+i]=s[i]+o}_setTargetSubData(e,t,r,s,o,n=0){if("geometry"===e){const a=t.getTargetBuffer(e);a?.setSubData(o,s.from*r,n,n+s.numElements*r)}else if("texture"===e){const r=t.getTargetBuffer(e);r?.setSubData(o.buffer,s.from,n,s.numElements)}else if("index"===e){const a=t.getTargetBuffer(e);a?.setSubData(o,s.from*r,n,n+s.numElements*r)}}static prune(){v=new Uint8Array(b)}}const _=n(),B=n(),b=262144,w=1024,C=16777216;let v=new Uint8Array(b);function V(e){return v.byteLength<e&&(v=new Uint8Array(e)),v}function p(e){return t(e,4)}function I(t){return t<=w?w:t<b?e(t):Math.max(Math.min(Math.ceil(1.5*t/b)*b,C),t)}export{x as VaoWriter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as r}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as s}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{when as a,initial as h,watch as d,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{addFrameTask as c}from"../../../../core/scheduling.js";import{Milliseconds as p}from"../../../../core/time.js";import{property as m,subclass as f}from"../../../../core/accessorSupport/decorators.js";import{isMoon as u,isMars as g}from"../../../../geometry/ellipsoidUtils.js";import{ComponentObjectCollection as w}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as _}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as v}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ChapmanAtmosphere as x}from"../effects/atmosphere/ChapmanAtmosphere.js";import{LocalAtmosphere as j}from"../effects/atmosphere/LocalAtmosphere.js";import{MarsAtmosphere as y}from"../effects/atmosphere/MarsAtmosphere.js";import{CloudsComposition as R}from"../effects/clouds/CloudsComposition.js";import{Fog as b}from"../effects/fog/Fog.js";import{ObjectAndLayerIDRenderNode as A}from"../effects/geometry/ObjectAndLayerIDRenderNode.js";import{olidEnabled as C}from"../effects/geometry/olidUtils.js";import{RenderOccludedRenderNode as S}from"../effects/geometry/RenderOccludedRenderNode.js";import{GlobalIllumination as T}from"../effects/globalIllumination/GlobalIllumination.js";import{Glow as O}from"../effects/glow/Glow.js";import{Haze as U}from"../effects/haze/Haze.js";import{Highlight as q}from"../effects/highlight/Highlight.js";import{ShadowHighlight as M}from"../effects/highlight/ShadowHighlight.js";import{ShadowHighlightBuffer as L}from"../effects/highlight/ShadowHighlightBuffer.js";import{Magnifier as D}from"../effects/magnifier/Magnifier.js";import{SMAA as k}from"../effects/smaa/SMAA.js";import{SSAO as F}from"../effects/ssao/SSAO.js";import{Stars as W}from"../effects/stars/Stars.js";import{GLMaterialRepository as B}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as H}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as E}from"../lib/Renderer.js";import{RenderingContext as I}from"../lib/RenderingContext.js";import{RenderingContextOptions as G}from"../lib/RenderingContextOptions.js";import{TextureRepository as N}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as P}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as z}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as V}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as X}from"./contextCache.js";import{removeLoadedShaderModules as Q}from"./renderUtils.js";import{ScreenshotManager as J,ScreenshotContext as K}from"./ScreenshotManager.js";import{contextCache as Y}from"./testUtils.js";import{noBudget as Z}from"../../../support/Scheduler.js";import{checkWebGLError as $}from"../../../webgl/checkWebGLError.js";let ee=class extends t{constructor(e,t){super(e),this.olidRenderHelper=C()?new H:null,this.waterTextures=new V,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this.glow=null,this.fog=null,this.test=null,this._initializeContext(t);const{memoryController:r}=t.view.resourceController;this.stippleTextures=z(this._rctx,r),this.markerTextures=P(this._rctx,r),this.techniques=new v(new _(this._rctx,this.stippleTextures,this.waterTextures,this.markerTextures)),this.textures=new N(t),this.addHandles(this.textures.events.on("changed",e=>this.requestRender(e)));const s=new B(this.textures,this.techniques,()=>this.requestRender(),()=>this.requestRender());this.renderer=new E(t,s,this.techniques,this._rctx,e=>this.requestRender(e)),this.addHandles([a(()=>t.view.ready,()=>this._createRenderNodes(),h),d(()=>this.waterTextures.updating,()=>this.requestRender(),h),d(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),l)]);const i={renderScene:(e,t,r,s)=>this.renderer.render(e,t,r,s),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,s)=>t.options.screenshot.renderOverlay(e,r,s)};this._screenshotManager=new J(this._rctx,i,e=>t.view.overlayManager.updateOverlays(Z,e.camera,0)),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this.techniques.destroy(),this._componentObjectCollection=o(this._componentObjectCollection),this._screenshotManager.destroy(),this.renderer.destroy(),this.textures.destroy(),this.waterTextures.destroy(),this.markerTextures.destroy(),this.stippleTextures.destroy(),this._canvas=null,this._rctx=o(this._rctx),this.test?.destroy()}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;if(new W({view:e}),u(e.spatialReference)||(this.glow=new O({view:e}),2===t?new j({view:e}):g(e.spatialReference)?new y({view:e}):(new x({view:e}),new R({view:e}),new U({view:e}),this.fog=new b({view:e}))),has("global-illumination")){const t=new T({view:e});this.test&&(this.test.globalIllumination=t)}else new F({view:e});new k({view:e,isEnabled:()=>this.renderer.hasSMAA}),new D({view:e}),new q({view:e}),new L({view:e}),new M({view:e,viewingMode:t}),new S({view:e}),C()&&new A({view:e})}requestRender(e=1){switch(e){case 2:this.view.state.fading=!0;case 1:this._needsUpdate=!0;case 0:this._needsRender=!0}}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this.textures.updating||this.waterTextures.updating}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(r(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,n,o=n){const a=i.constrainWindowSize(t,r,n*i.pixelRatio,o*i.pixelRatio),h=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,h);const d=(e,t,r)=>s(t,e)*(r[1]-r[0])+r[0];let l=Number.MAX_VALUE;for(let s=0;s<a[2]*a[3];s++){const e=d(4*s,h,i.nearFar);l>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(l=e)}if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&l>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(l=s)}return l===Number.MAX_VALUE?void 0:l}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){Q(),await this.techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,s=0,i=!1;const n={preRender:({time:i})=>{r=this.updating,s=this._needsUpdate?1:0,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),i=this.test?.time??i;const n=p(i-this._lastAnimationUpdate);this.view.state.animationsEnabled&&(n>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(0),this._lastAnimationUpdate=i)},render:({time:e})=>{if((this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const r=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,e=this.test?.time??e,this.renderer.render(t,e,0),i=!0,r&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this.view.state.animationsEnabled&&this.textures.update();const r=new K(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{i&&(this.renderer.finish(2===t.mode?s:1),i=!1)}};this._frameTask=c(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const s={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",s);if(null==n)return void i.getLogger(this).error("A WebGL2 context could not be created.");$(n,!0),this._rctx=te(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}get stage(){return this.view.stage}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return this._componentObjectCollection??=new w(this.renderer.renderPassManager,this._viewingMode,this.view.spatialReference.isWebMercator),this._componentObjectCollection}updateQualitySettings(e){null!=this.test?.time&&null!=e.fadeDuration&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=p(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.view.qualitySettings.maxTexturePixels})}};function te(e,t){const r=new G(t);if(Y.enabled){let t=re.get(e);return 1===t?.refCount?(t.configure(r),t.ref(),t):(t=new I(e,r),re.set(e,t),t.ref(),t)}return new I(e,r)}e([m({type:Boolean,readOnly:!0})],ee.prototype,"updating",null),e([m({constructOnly:!0})],ee.prototype,"view",void 0),e([m({readOnly:!0})],ee.prototype,"componentObjectCollection",null),e([m()],ee.prototype,"_componentObjectCollection",void 0),e([m()],ee.prototype,"_needsUpdate",void 0),e([m()],ee.prototype,"_needsWaterReflectionUpdate",void 0),ee=e([f("esri.views.3d.webgl-engine.parts.RenderView")],ee);const re=X();export{ee as RenderView};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as r}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as s}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{when as a,initial as h,watch as l,syncAndInitial as d}from"../../../../core/reactiveUtils.js";import{addFrameTask as c}from"../../../../core/scheduling.js";import{Milliseconds as p}from"../../../../core/time.js";import{property as m,subclass as u}from"../../../../core/accessorSupport/decorators.js";import{isMoon as f,isMars as g}from"../../../../geometry/ellipsoidUtils.js";import{ComponentObjectCollection as w}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as _}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as v}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ChapmanAtmosphere as x}from"../effects/atmosphere/ChapmanAtmosphere.js";import{LocalAtmosphere as j}from"../effects/atmosphere/LocalAtmosphere.js";import{MarsAtmosphere as y}from"../effects/atmosphere/MarsAtmosphere.js";import{CloudsComposition as R}from"../effects/clouds/CloudsComposition.js";import{Fog as b}from"../effects/fog/Fog.js";import{ObjectAndLayerIDRenderNode as A}from"../effects/geometry/ObjectAndLayerIDRenderNode.js";import{olidEnabled as C}from"../effects/geometry/olidUtils.js";import{RenderOccludedRenderNode as S}from"../effects/geometry/RenderOccludedRenderNode.js";import{GlobalIllumination as T}from"../effects/globalIllumination/GlobalIllumination.js";import{Glow as O}from"../effects/glow/Glow.js";import{Haze as U}from"../effects/haze/Haze.js";import{Highlight as q}from"../effects/highlight/Highlight.js";import{ShadowHighlight as M}from"../effects/highlight/ShadowHighlight.js";import{ShadowHighlightBuffer as L}from"../effects/highlight/ShadowHighlightBuffer.js";import{Magnifier as D}from"../effects/magnifier/Magnifier.js";import{SMAA as k}from"../effects/smaa/SMAA.js";import{SSAO as F}from"../effects/ssao/SSAO.js";import{Stars as W}from"../effects/stars/Stars.js";import{GLMaterialRepository as B}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as H}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as E}from"../lib/Renderer.js";import{RenderingContext as I}from"../lib/RenderingContext.js";import{RenderingContextOptions as G}from"../lib/RenderingContextOptions.js";import{TextureRepository as N}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as P}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as z}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as V}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as X}from"./contextCache.js";import{removeLoadedShaderModules as Q}from"./renderUtils.js";import{ScreenshotManager as J,ScreenshotContext as K}from"./ScreenshotManager.js";import{contextCache as Y}from"./testUtils.js";import{noBudget as Z}from"../../../support/Scheduler.js";import{checkWebGLError as $}from"../../../webgl/checkWebGLError.js";let ee=class extends t{constructor(e,t){super(e),this.olidRenderHelper=C()?new H:null,this.waterTextures=new V,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this.glow=null,this.fog=null,this.globalIllumination=null,this.test=null,this._initializeContext(t);const{memoryController:r}=t.view.resourceController;this.stippleTextures=z(this._rctx,r),this.markerTextures=P(this._rctx,r),this.techniques=new v(new _(this._rctx,this.stippleTextures,this.waterTextures,this.markerTextures)),this.textures=new N(t),this.addHandles(this.textures.events.on("changed",e=>this.requestRender(e)));const s=new B(this.textures,this.techniques,()=>this.requestRender(),()=>this.requestRender());this.renderer=new E(t,s,this.techniques,this._rctx,e=>this.requestRender(e)),this.addHandles([a(()=>t.view.ready,()=>this._createRenderNodes(),h),l(()=>this.waterTextures.updating,()=>this.requestRender(),h),l(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),d)]);const i={renderScene:(e,t,r,s)=>this.renderer.render(e,t,r,s),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,s)=>t.options.screenshot.renderOverlay(e,r,s)};this._screenshotManager=new J(this._rctx,i,e=>t.view.overlayManager.updateOverlays(Z,e.camera,0)),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this.techniques.destroy(),this._componentObjectCollection=o(this._componentObjectCollection),this._screenshotManager.destroy(),this.renderer.destroy(),this.textures.destroy(),this.waterTextures.destroy(),this.markerTextures.destroy(),this.stippleTextures.destroy(),this._canvas=null,this._rctx=o(this._rctx),this.test?.destroy()}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;new W({view:e}),f(e.spatialReference)||(this.glow=new O({view:e}),2===t?new j({view:e}):g(e.spatialReference)?new y({view:e}):(new x({view:e}),new R({view:e}),new U({view:e}),this.fog=new b({view:e}))),has("global-illumination")?this.globalIllumination=new T({view:e}):new F({view:e}),new k({view:e,isEnabled:()=>this.renderer.hasSMAA}),new D({view:e}),new q({view:e}),new L({view:e}),new M({view:e,viewingMode:t}),new S({view:e}),C()&&new A({view:e})}requestRender(e=1){switch(e){case 2:this.view.state.fading=!0;case 1:this._needsUpdate=!0;case 0:this._needsRender=!0}}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this.textures.updating||this.waterTextures.updating}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(r(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,n,o=n){const a=i.constrainWindowSize(t,r,n*i.pixelRatio,o*i.pixelRatio),h=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,h);const l=(e,t,r)=>s(t,e)*(r[1]-r[0])+r[0];let d=Number.MAX_VALUE;for(let s=0;s<a[2]*a[3];s++){const e=l(4*s,h,i.nearFar);d>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(d=e)}if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&d>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(d=s)}return d===Number.MAX_VALUE?void 0:d}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){Q(),await this.techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,s=0,i=!1;const n={preRender:({time:i})=>{r=this.updating,s=this._needsUpdate?1:0,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),i=this.test?.time??i;const n=p(i-this._lastAnimationUpdate);this.view.state.animationsEnabled&&(n>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(0),this._lastAnimationUpdate=i)},render:({time:e})=>{if((this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const r=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,e=this.test?.time??e,this.renderer.render(t,e,0),i=!0,r&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this.view.state.animationsEnabled&&this.textures.update();const r=new K(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{i&&(this.renderer.finish(2===t.mode?s:1),i=!1)}};this._frameTask=c(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const s={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",s);if(null==n)return void i.getLogger(this).error("A WebGL2 context could not be created.");$(n,!0),this._rctx=te(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}get stage(){return this.view.stage}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return this._componentObjectCollection??=new w(this.renderer.renderPassManager,this._viewingMode,this.view.spatialReference.isWebMercator),this._componentObjectCollection}updateQualitySettings(e){null!=this.test?.time&&null!=e.fadeDuration&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=p(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.view.qualitySettings.maxTexturePixels})}};function te(e,t){const r=new G(t);if(Y.enabled){let t=re.get(e);return 1===t?.refCount?(t.configure(r),t.ref(),t):(t=new I(e,r),re.set(e,t),t.ref(),t)}return new I(e,r)}e([m({type:Boolean,readOnly:!0})],ee.prototype,"updating",null),e([m({constructOnly:!0})],ee.prototype,"view",void 0),e([m({readOnly:!0})],ee.prototype,"componentObjectCollection",null),e([m()],ee.prototype,"_componentObjectCollection",void 0),e([m()],ee.prototype,"_needsUpdate",void 0),e([m()],ee.prototype,"_needsWaterReflectionUpdate",void 0),ee=e([u("esri.views.3d.webgl-engine.parts.RenderView")],ee);const re=X();export{ee as RenderView};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{newLayout as e}from"../../support/buffer/InterleavedLayout.js";import{olidEnabled as t}from"../effects/geometry/olidUtils.js";function o(o){const r=e().vec3f("position").vec4f16("previousDelta").vec4f16("nextDelta").f32("u0").vec2f16("lineParameters");return o.hasVVColor?r.f32("colorFeatureAttribute"):r.vec4u8("color",{glNormalized:!0}),o.hasVVSize?r.f32("sizeFeatureAttribute"):r.f32("size"),o.hasVVOpacity&&r.f32("opacityFeatureAttribute"),t()&&r.vec4u8("olidColor"),o.hasAnimation&&r.vec4f16("timeStamps"),r}export{o as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as l}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as n}from"../effects/geometry/olidUtils.js";import{depthWrite as o,depthTest as c,blending as u}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as p,stencilBaseAllZeros as a,stencilWriteMaskOn as d,stencilToolTransparentOccluder as f,depthCompareAlways as m,stencilToolMaskOccluder as h,stencilWriteMaskOff as g,depthCompareLess as b}from"../lib/StencilUtils.js";import{getRibbonLineLayerPolygonOffset as P}from"../materials/PolygonOffset.js";import{R as T}from"../../../../chunks/RibbonLine.glsl.js";import{PrimitiveType as W}from"../../../webgl/enums.js";import{makePipelineState as j,defaultColorWrite as v,unpremultipliedAlphaToPremultipliedAlpha as S}from"../../../webgl/renderState.js";let _=class extends s{constructor(e,t){super(e,t,i(y(t))),this.shader=new l(T,()=>import("./RibbonLine.glsl.js")),this.ignoreUnused=!0,this.primitiveType=t.wireframe?W.LINES:W.TRIANGLE_STRIP}_makePipelineState(e,t){const{output:i,hasOccludees:r}=e;return j({blending:u(i,!1,e.emissionDimmingPass),depthTest:c(i),depthWrite:o(e),colorWrite:v,stencilWrite:r?d:null,stencilTest:r?t?p:a:null,polygonOffset:P(e)})}initializePipeline(e){if(e.occluder){const{hasOccludees:t}=e;this._occluderPipelineTransparent=j({blending:S,polygonOffset:P(e),depthTest:m,depthWrite:null,colorWrite:v,stencilWrite:null,stencilTest:t?f:null}),this._occluderPipelineOpaque=j({blending:S,polygonOffset:P(e),depthTest:t?m:b,depthWrite:null,colorWrite:v,stencilWrite:t?g:null,stencilTest:t?h:null}),this._occluderPipelineMaskWrite=j({blending:null,polygonOffset:P(e),depthTest:b,depthWrite:null,colorWrite:null,stencilWrite:t?d:null,stencilTest:t?p:null})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){if(t)return this._occludeePipeline;switch(e.occluder){case 11:return this._occluderPipelineTransparent??super.getPipeline(e);case 10:return this._occluderPipelineOpaque??super.getPipeline(e);default:e.occluder;case void 0:case null:return this._occluderPipelineMaskWrite??super.getPipeline(e)}}};function y(e){const t=r().vec3f("position").vec4f16("previousDelta").vec4f16("nextDelta").f32("u0").vec2f16("lineParameters");return e.hasVVColor?t.f32("colorFeatureAttribute"):t.vec4u8("color",{glNormalized:!0}),e.hasVVSize?t.f32("sizeFeatureAttribute"):t.f32("size"),e.hasVVOpacity&&t.f32("opacityFeatureAttribute"),n()&&t.vec4u8("olidColor"),e.hasAnimation&&t.vec4f16("timeStamps"),t}_=e([t("esri.views.3d.webgl-engine.shaders.RibbonLineTechnique")],_);export{_ as RibbonLineTechnique,y as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as i}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as s,depthTest as n,blending as o}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as c,stencilBaseAllZeros as p,stencilWriteMaskOn as u,stencilToolTransparentOccluder as a,depthCompareAlways as d,stencilToolMaskOccluder as h,stencilWriteMaskOff as m,depthCompareLess as f}from"../lib/StencilUtils.js";import{getRibbonLineLayerPolygonOffset as g}from"../materials/PolygonOffset.js";import{R as b}from"../../../../chunks/RibbonLine.glsl.js";import{getLayout as P}from"./RibbonLineLayouts.js";import{PrimitiveType as T}from"../../../webgl/enums.js";import{makePipelineState as W,defaultColorWrite as j,unpremultipliedAlphaToPremultipliedAlpha as _}from"../../../webgl/renderState.js";let O=class extends l{constructor(e,i){super(e,i,t(P(i))),this.shader=new r(b,()=>import("./RibbonLine.glsl.js")),this.ignoreUnused=!0,this.primitiveType=i.wireframe?T.LINES:T.TRIANGLE_STRIP}_makePipelineState(e,i){const{output:t,hasOccludees:r}=e;return W({blending:o(t,!1,e.emissionDimmingPass),depthTest:n(t),depthWrite:s(e),colorWrite:j,stencilWrite:r?u:null,stencilTest:r?i?c:p:null,polygonOffset:g(e)})}initializePipeline(e){if(e.occluder){const{hasOccludees:i}=e;this._occluderPipelineTransparent=W({blending:_,polygonOffset:g(e),depthTest:d,depthWrite:null,colorWrite:j,stencilWrite:null,stencilTest:i?a:null}),this._occluderPipelineOpaque=W({blending:_,polygonOffset:g(e),depthTest:i?d:f,depthWrite:null,colorWrite:j,stencilWrite:i?m:null,stencilTest:i?h:null}),this._occluderPipelineMaskWrite=W({blending:null,polygonOffset:g(e),depthTest:f,depthWrite:null,colorWrite:null,stencilWrite:i?u:null,stencilTest:i?c:null})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,i){if(i)return this._occludeePipeline;switch(e.occluder){case 11:return this._occluderPipelineTransparent??super.getPipeline(e);case 10:return this._occluderPipelineOpaque??super.getPipeline(e);default:e.occluder;case void 0:case null:return this._occluderPipelineMaskWrite??super.getPipeline(e)}}};O=e([i("esri.views.3d.webgl-engine.shaders.RibbonLineTechnique")],O);export{O as RibbonLineTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.spherical=e,this.overlayMode=0,this.tileBlendInput=0,this.transparencyMode=0,this.pbrMode=5,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.textureFadingEnabled=!1,this.renderOccluded=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.tileBorders=!1,this.normalType=1,this.textureCoordinateType=1,this.emissionSource=0,this.highStepCount=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!0,this.draped=!1,this.discardInvisibleFragments=!0,this.oitPremultipliedAlpha=!0,this.snowCover=!1}get overlayEnabled(){return 0!==this.overlayMode}get hasWater(){return 11!==this.output}}e([t({count:3})],i.prototype,"overlayMode",void 0),e([t({count:3})],i.prototype,"tileBlendInput",void 0),e([t({count:4})],i.prototype,"transparencyMode",void 0),e([t({count:7})],i.prototype,"pbrMode",void 0),e([t()],i.prototype,"receiveShadows",void 0),e([t()],i.prototype,"hasShadowHighlights",void 0),e([t()],i.prototype,"textureFadingEnabled",void 0),e([t()],i.prototype,"renderOccluded",void 0),e([t()],i.prototype,"screenSpaceReflections",void 0),e([t()],i.prototype,"cloudReflections",void 0),e([t()],i.prototype,"receiveAmbientOcclusion",void 0),e([t()],i.prototype,"receiveGlobalIllumination",void 0),e([t()],i.prototype,"tileBorders",void 0);export{i as TerrainTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.spherical=e,this.overlayMode=0,this.tileBlendInput=0,this.transparencyMode=0,this.pbrMode=5,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.textureFadingEnabled=!1,this.renderOccluded=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.tileBorders=!1,this.normalType=1,this.textureCoordinateType=1,this.emissionSource=0,this.rayMarchMaxReach=1,this.rayMarchMaxSteps=75,this.useProjectedRayLength=!1,this.clampRayToScreen=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!0,this.draped=!1,this.discardInvisibleFragments=!0,this.oitPremultipliedAlpha=!0,this.snowCover=!1}get overlayEnabled(){return 0!==this.overlayMode}get hasWater(){return 11!==this.output}}e([t({count:3})],i.prototype,"overlayMode",void 0),e([t({count:3})],i.prototype,"tileBlendInput",void 0),e([t({count:4})],i.prototype,"transparencyMode",void 0),e([t({count:7})],i.prototype,"pbrMode",void 0),e([t()],i.prototype,"receiveShadows",void 0),e([t()],i.prototype,"hasShadowHighlights",void 0),e([t()],i.prototype,"textureFadingEnabled",void 0),e([t()],i.prototype,"renderOccluded",void 0),e([t()],i.prototype,"screenSpaceReflections",void 0),e([t()],i.prototype,"cloudReflections",void 0),e([t()],i.prototype,"receiveAmbientOcclusion",void 0),e([t()],i.prototype,"receiveGlobalIllumination",void 0),e([t()],i.prototype,"tileBorders",void 0);export{i as TerrainTechniqueConfiguration};
package/webmap/utils.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../core/Version.js";function r(e){return null!=e&&"object"==typeof e&&"declaredClass"in e&&"esri.WebMap"===e.declaredClass}const o=new e(2,36,"webmap");export{o as currentVersion,r as isWebMap};
2
+ import e from"../core/Version.js";function r(e){return null!=e&&"object"==typeof e&&"declaredClass"in e&&"esri.WebMap"===e.declaredClass}const o=new e(2,37,"webmap");export{o as currentVersion,r as isWebMap};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{createTask as t}from"../../core/asyncUtils.js";import s from"../../core/Collection.js";import i from"../../core/Error.js";import{EventedAccessor as r}from"../../core/Evented.js";import a from"../../core/Logger.js";import{getOrCreateMapValue as o}from"../../core/MapUtils.js";import{abortMaybe as n,destroyMaybe as p}from"../../core/maybe.js";import{throwIfAborted as l,isAbortError as u}from"../../core/promiseUtils.js";import h from"../../core/ReactiveMap.js";import{on as m,sync as c,watch as d,whenOnce as f}from"../../core/reactiveUtils.js";import{property as y,subclass as v}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as g}from"../../core/support/UpdatingHandles.js";import F from"../../geometry/SpatialReference.js";import{getGraphicLayer as _}from"../../graphic/graphicOriginUtils.js";import{system as x}from"../../time/constants.js";import{createReactiveGraphic as w,isAttributeFormSupportedLayerWithAttachments as I,layerSupportsQueryAttachments as b,queryAttachmentsForElements as A}from"./batchAttributeFormUtils.js";import{ArcadeExecutorProvider as M}from"./expressions/ArcadeExecutorProvider.js";import{ExpressionsManager as E}from"./expressions/ExpressionsManager.js";import{ExpressionsModel as k}from"./expressions/ExpressionsModel.js";import C from"./inputs/BatchFormInputs.js";import{createBatchFormInputsFromBatchFormTemplate as T}from"./inputs/support/createBatchFormInputs.js";import{isGroupInput as V,isFieldInput as j}from"./inputs/support/inputUtils.js";import H from"./templates/BatchFormTemplate.js";import{getLayerContingentValuesMetaData as L}from"./templates/support/contingentValuesUtils.js";import{createBatchFormTemplate as B}from"./templates/support/createBatchFormTemplate.js";import{isExcludedFromSharedForm as G,isGroupElementTemplate as R,isAttachmentElementTemplate as U}from"./templates/support/templateUtils.js";function Z(e,t){return e?.find(e=>e.layer===t)}let S=class extends r{constructor(e){super(e),this._attachmentCache=new h,this.activeFeatureIndex=-1,this.disabled=!1,this.editType="NA",this.features=new s,this._hasAsyncArcadeExpressions=!1,this.maximumFeatureCount=2e3,this.maximumFeatureCountWithComplexForms=50,this.map=null,this.readOnly=!1,this.spatialReference=null,this.submitHasBeenAttempted=!1,this.timeZone=null,this.userHasChangedValues=!1,this.layerInfos=null,this._arcadeExecutorProvider=new M,this._activeFormInputsByElementId=new Map,this._emptyForm=new C({inputs:[]}),this._emptyFormTemplate=new H({elements:[]}),this._featureFormMap=new Map,this._prepareTask=null,this._reactiveGraphicLookup=new h,this._updatingHandles=new g,this._layerTemplateMap=new h,this._layerContingentValuesMap=new h,this._workingFeatures=new s,this._expressionsManager=new E({arcadeContext:{editType:"NA",spatialReference:null,map:null,timeZone:x}}),this.sharedForm=this._emptyForm,this.sharedFormTemplate=this._emptyFormTemplate}initialize(){this.addHandles([m(()=>this.features,"after-changes",()=>{this.notifyChange("layers"),this._prepare()},c),d(()=>[this.features,this.map,this.timeZone,this.editType],()=>this._prepare(),c),d(()=>this.activeForm,()=>this._activeFormInputsByElementId.clear(),c),d(()=>[this.activeFeature,this.activeLayer,this.activeForm],()=>{this._syncAttachments()},c)]),this._prepare()}destroy(){this._prepareTask=n(this._prepareTask),this._workingFeatures.destroyAll(),p(this._expressionsManager),this._updatingHandles.destroy(),this._reactiveGraphicLookup=new h,this._emptyForm.destroy(),this._emptyFormTemplate.destroy()}get _effectiveTimeZone(){return this.timeZone??"system"}get activeFeature(){const e=this.activeFeatureIndex;return e<0?null:this.features.at(e)}get activeForm(){if("batch"===this.mode)return this.sharedForm;const e=this._workingFeatures.at(this.activeFeatureIndex);if(!e)return this._emptyForm;const t=this._featureFormMap.get(e);if(t)return t;const s=this._makeBatchFormInputsForFeature(e);return s!==this._emptyForm&&this._featureFormMap.set(e,s),s}get activeLayer(){const{activeFeature:e}=this;if(!e)return null;return _(e)??null}get calculating(){return this._expressionsManager.calculating}get expressionEvaluationFailed(){return this._expressionsManager.expressionEvaluationFailed}get hasNonActiveInvalidFeatures(){if("batch"===this.mode)return!1;const{activeFeature:e}=this;return this.invalidFeatures.some(t=>t!==e)}get hasAsyncArcadeExpressions(){return this._hasAsyncArcadeExpressions}get hasTooManyFeatures(){return this._workingFeatures.length>this.maximumFeatureCount}get hasTooManyComplexFeatures(){return this._workingFeatures.length>this.maximumFeatureCountWithComplexForms&&this.hasAsyncArcadeExpressions}get invalidFeatures(){return this.sharedForm.invalidFeatures}get hasVisibleInputs(){return this.visibleInputs.length>0}get hasLayersWithContingentValues(){for(const e of this.layers){const t=this._layerContingentValuesMap.get(e);if(t&&t.size>0)return!0}return!1}get visibleInputs(){return this.activeForm.inputs.filter(e=>e.visible)}get noVisibleElementsReason(){if(this.hasVisibleInputs)return null;if(0===this.activeForm.inputs.length)return"noElements";const e=new Set;for(const t of this.activeForm.inputs)switch(t.visibilityCode){case"hidden:not-in-all-layers":case"hidden:no-domain-in-common":e.add("noElementsInCommon");break;case"hidden:field-definition":case"hidden:group-visibility-expression:all-features":case"hidden:visibility-expression:all-features":e.add("allElementsHidden");break;case"hidden:group-visibility-expression:some-features":case"hidden:visibility-expression:some-features":return"elementsHiddenInSome"}return e.has("allElementsHidden")?"allElementsHidden":"noElementsInCommon"}get status(){const e=this._prepareTask;return null==e?"not-loaded":e.finished?null!=e.error?"failed":"loaded":"loading"}get submittable(){return this.valid,!0}get updating(){return this._updatingHandles.updating||this.calculating}get valid(){return this.sharedForm.valid}get layers(){const e=new Set;return this.features.forEach(t=>{const s=_(t);s&&e.add(s)}),Array.from(e)}get mode(){return this.activeFeatureIndex>-1?"single":"batch"}submit(){this.submitHasBeenAttempted=!0,this.emit("submit",{name:"submit",results:this._makeSubmitResults(),valid:this.valid})}findFieldInput(e){if(null==e)return;const t=this._activeFormInputsByElementId;if(t.has(e))return t.get(e);const s=this.activeForm.allFieldInputs.find(t=>t.template.elementId===e);return void 0!==s?(t.set(e,s),s):void 0}getFirstVisibleInvalidFieldInput(){if(this.hasVisibleInputs&&!this.activeForm.valid)for(const e of this.visibleInputs){if(V(e)){const t=e.inputs.find(e=>j(e)&&!e.valid);if(t)return{input:t,groupInput:e}}if(j(e)&&!e.valid)return{input:e}}}getFieldInputValue(e){return this.findFieldInput(e)?.value}getValues(e){const t=this._reactiveGraphicLookup.get(e);if(!t)throw new i("feature-not-found","The given feature is not present in the BatchAttributeForm");return{...t.attributes}}notifyGeometriesChanged(e){const t=[];for(const s of e){const e=this._reactiveGraphicLookup.get(s);e&&(t.push(e),e.geometry=s.geometry)}this._expressionsManager.runGeometryDependentExpressions(t)}async setFieldInputValue(e,t){const s=new Set(this.invalidFeatures);await e.setValueFromUser(t),this.userHasChangedValues=!0,this._trackValidityChange(s),this.emit("value-change",{features:e.features.toArray().map(e=>e.source),fieldName:e.fieldName,name:"value-change",value:t})}async setValue(e,t){const s=this.findFieldInput(e);if(null==s)throw new i("no-FieldInput-found",`Cannot set the value of FieldInput with ID: ${e} because none was found in the active form`);await this.setFieldInputValue(s,t)}userChangesHaveMadeFeatureInvalid(e){return!!this._reactiveGraphicLookup.get(e)?.userChangesHaveMadeInvalid}async _trackValidityChange(e){await f(()=>!1===this.calculating);const t=this.invalidFeatures;for(const s of t)!1===e.has(s)&&this._reactiveGraphicLookup.has(s)&&(this._reactiveGraphicLookup.get(s).userChangesHaveMadeInvalid=!0)}validate(){return!1}_makeBatchFormInputsForFeature(e){const t=this._layerTemplateMap.get(e.layer);return t?T(t,new s([e]),this._expressionsManager):this._emptyForm}_makeSubmitResults(){const e=new Map;for(const[t,s]of this._reactiveGraphicLookup)e.set(t,{feature:t,values:{...s.attributes},invalidFields:[]});for(const t of this.sharedForm.allFieldInputs)for(const s of t.invalidFeatures)e.get(s)?.invalidFields.push(t.fieldName);return Array.from(e.values())}_prepare(){this._hasAsyncArcadeExpressions=!1,this._prepareTask=n(this._prepareTask),this._updateWorkingFeatures(),p(this._expressionsManager),this.userHasChangedValues=!1,this._expressionsManager=new E({arcadeContext:{editType:this.editType,spatialReference:this.spatialReference??F.WebMercator,map:this.map,timeZone:this._effectiveTimeZone}});const{layers:e}=this;if(0===e.length)return;const s=t(async t=>{try{l(t);const s=new Map;for(const i of e){const e=await L(i);if(l(t),e){const t=e.fieldGroups.flatMap(e=>e.fields);this._layerContingentValuesMap.set(i,new Set(t))}else this._layerContingentValuesMap.set(i,new Set);const r=Z(this.layerInfos,i),a=await B(i,{arcadeExecutorProvider:this._arcadeExecutorProvider,formTimeZone:this._effectiveTimeZone},r?.formTemplate);l(t),this._layerTemplateMap.set(i,a);const o=a.getExpressionExecutorsForLayer(i);if(this._expressionsManager.layerExpressionsModelMap.set(i,new k({preserveFieldValuesWhenHidden:a.preserveFieldValuesWhenHidden,executorMap:o})),!this._hasAsyncArcadeExpressions)for(const t of o.keys()){const e=o.get(t);if(this._hasAsyncArcadeExpressions=!0===(e.editableExpression?.isAsync||e.requiredExpression?.isAsync||e.valueExpression?.isAsync||e.visibilityExpression?.isAsync),this._hasAsyncArcadeExpressions)break}for(const t of a.elements){if(G(t))continue;const e=t.clone();R(e)&&(e.elements=e.elements.filter(e=>!G(e)));const{elementId:i}=e;s.has(i)?s.get(i).foldIn(e):s.set(i,e)}}if(this.hasTooManyComplexFeatures)throw new i("too-many-features-with-complex-forms","There are too many features to load into the form with the configured complexity");if(this.hasTooManyFeatures)throw new i("too-many-features","There are too many features to load into the form.");const r=new H({elements:Array.from(s.values())});this.sharedFormTemplate=r,this.sharedForm=T(r,this._workingFeatures,this._expressionsManager),await this._expressionsManager.runAllExpressions(this._workingFeatures.toArray())}catch(s){throw u(s)||a.getLogger(this).error("Failed preparing form",s),s}});this._updatingHandles.consumePromise(s.promise),this._prepareTask=s}_updateWorkingFeatures(){this._workingFeatures.destroyAll();const{features:e}=this;if(this._reactiveGraphicLookup=new h,0!==e.length){this._workingFeatures.addMany(e.map(w));for(const e of this._workingFeatures)this._reactiveGraphicLookup.set(e.source,e)}}async _syncAttachments(){const{activeFeature:e,activeLayer:t,activeForm:s}=this;if(!(e&&s&&I(t)&&b(t)))return;const i=e.getObjectId();if(null==i)return;const r=this._attachmentCache.get(t);if(r){if(r.get(i))return}const a=s.template?.elements.filter(U)??[];if(!a.length)return;const n=await A(t,i,a);o(this._attachmentCache,t,()=>new h).set(i,n)}};e([y()],S.prototype,"_effectiveTimeZone",null),e([y()],S.prototype,"_attachmentCache",void 0),e([y({readOnly:!0})],S.prototype,"activeFeature",null),e([y()],S.prototype,"activeFeatureIndex",void 0),e([y({readOnly:!0})],S.prototype,"activeForm",null),e([y({readOnly:!0})],S.prototype,"activeLayer",null),e([y()],S.prototype,"disabled",void 0),e([y()],S.prototype,"calculating",null),e([y()],S.prototype,"editType",void 0),e([y()],S.prototype,"features",void 0),e([y()],S.prototype,"expressionEvaluationFailed",null),e([y()],S.prototype,"hasNonActiveInvalidFeatures",null),e([y()],S.prototype,"hasAsyncArcadeExpressions",null),e([y()],S.prototype,"_hasAsyncArcadeExpressions",void 0),e([y()],S.prototype,"invalidFeatures",null),e([y()],S.prototype,"hasVisibleInputs",null),e([y()],S.prototype,"hasLayersWithContingentValues",null),e([y()],S.prototype,"maximumFeatureCount",void 0),e([y()],S.prototype,"maximumFeatureCountWithComplexForms",void 0),e([y()],S.prototype,"visibleInputs",null),e([y()],S.prototype,"map",void 0),e([y()],S.prototype,"noVisibleElementsReason",null),e([y()],S.prototype,"readOnly",void 0),e([y()],S.prototype,"spatialReference",void 0),e([y()],S.prototype,"submitHasBeenAttempted",void 0),e([y()],S.prototype,"timeZone",void 0),e([y()],S.prototype,"updating",null),e([y()],S.prototype,"valid",null),e([y()],S.prototype,"layers",null),e([y()],S.prototype,"mode",null),e([y()],S.prototype,"sharedForm",void 0),e([y()],S.prototype,"sharedFormTemplate",void 0),e([y()],S.prototype,"userHasChangedValues",void 0),e([y()],S.prototype,"layerInfos",void 0),e([y()],S.prototype,"_arcadeExecutorProvider",void 0),e([y()],S.prototype,"_prepareTask",void 0),e([y()],S.prototype,"_reactiveGraphicLookup",void 0),e([y()],S.prototype,"_layerTemplateMap",void 0),e([y()],S.prototype,"_layerContingentValuesMap",void 0),e([y()],S.prototype,"_workingFeatures",void 0),e([y()],S.prototype,"_expressionsManager",void 0),S=e([v("esri.widgets.BatchAttributeForm.BatchAttributeFormViewModel")],S);const W=S;export{W as default};
2
+ import{__decorate as e}from"tslib";import{createTask as t}from"../../core/asyncUtils.js";import s from"../../core/Collection.js";import r from"../../core/Error.js";import{EventedAccessor as i}from"../../core/Evented.js";import a from"../../core/Logger.js";import{getOrCreateMapValue as o}from"../../core/MapUtils.js";import{abortMaybe as n,destroyMaybe as p}from"../../core/maybe.js";import{throwIfAborted as l,isAbortError as u}from"../../core/promiseUtils.js";import h from"../../core/ReactiveMap.js";import{on as m,sync as c,watch as d,whenOnce as f}from"../../core/reactiveUtils.js";import{property as y,subclass as v}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as g}from"../../core/support/UpdatingHandles.js";import F from"../../geometry/SpatialReference.js";import{getGraphicLayer as _}from"../../graphic/graphicOriginUtils.js";import{system as x}from"../../time/constants.js";import{createReactiveGraphic as w,isAttributeFormSupportedLayerWithAttachments as I,layerSupportsQueryAttachments as b,queryAttachmentsForElements as A}from"./batchAttributeFormUtils.js";import{ArcadeExecutorProvider as M}from"./expressions/ArcadeExecutorProvider.js";import{ExpressionsManager as k}from"./expressions/ExpressionsManager.js";import{ExpressionsModel as C}from"./expressions/ExpressionsModel.js";import E from"./inputs/BatchFormInputs.js";import{createBatchFormInputsFromBatchFormTemplate as T}from"./inputs/support/createBatchFormInputs.js";import{isGroupInput as V,isFieldInput as j}from"./inputs/support/inputUtils.js";import L from"./templates/BatchFormTemplate.js";import{getLayerContingentValuesMetaData as H}from"./templates/support/contingentValuesUtils.js";import{createBatchFormTemplate as B}from"./templates/support/createBatchFormTemplate.js";import{isExcludedFromSharedForm as G,isGroupElementTemplate as R}from"./templates/support/templateUtils.js";function U(e,t){return e?.find(e=>e.layer===t)}let Z=class extends i{constructor(e){super(e),this._attachmentCache=new h,this.activeFeatureIndex=-1,this.disabled=!1,this.editType="NA",this.features=new s,this._hasAsyncArcadeExpressions=!1,this.maximumFeatureCount=2e3,this.maximumFeatureCountWithComplexForms=50,this.map=null,this.readOnly=!1,this.spatialReference=null,this.submitHasBeenAttempted=!1,this.timeZone=null,this.userHasChangedValues=!1,this.layerInfos=null,this._arcadeExecutorProvider=new M,this._activeFormInputsByElementId=new Map,this._emptyForm=new E({inputs:[]}),this._emptyFormTemplate=new L({elements:[]}),this._featureFormMap=new Map,this._prepareTask=null,this._reactiveGraphicLookup=new h,this._updatingHandles=new g,this._layerTemplateMap=new h,this._layerContingentValuesMap=new h,this._workingFeatures=new s,this._expressionsManager=new k({arcadeContext:{editType:"NA",spatialReference:null,map:null,timeZone:x}}),this.sharedForm=this._emptyForm,this.sharedFormTemplate=this._emptyFormTemplate}initialize(){this.addHandles([m(()=>this.features,"after-changes",()=>{this.notifyChange("layers"),this._prepare()},c),d(()=>[this.features,this.map,this.timeZone,this.editType],()=>this._prepare(),c),d(()=>this.activeForm,()=>this._activeFormInputsByElementId.clear(),c),d(()=>[this.activeFeature,this.activeLayer,this.activeForm],()=>{this._syncAttachments()},c)]),this._prepare()}destroy(){this._prepareTask=n(this._prepareTask),this._workingFeatures.destroyAll(),p(this._expressionsManager),this._updatingHandles.destroy(),this._reactiveGraphicLookup=new h,this._emptyForm.destroy(),this._emptyFormTemplate.destroy()}get _effectiveTimeZone(){return this.timeZone??"system"}get activeFeature(){const e=this.activeFeatureIndex;return e<0?null:this.features.at(e)}get activeForm(){if("batch"===this.mode)return this.sharedForm;const e=this._workingFeatures.at(this.activeFeatureIndex);if(!e)return this._emptyForm;const t=this._featureFormMap.get(e);if(t)return t;const s=this._makeBatchFormInputsForFeature(e);return s!==this._emptyForm&&this._featureFormMap.set(e,s),s}get activeLayer(){const{activeFeature:e}=this;if(!e)return null;return _(e)??null}get calculating(){return this._expressionsManager.calculating}get expressionEvaluationFailed(){return this._expressionsManager.expressionEvaluationFailed}get hasNonActiveInvalidFeatures(){if("batch"===this.mode)return!1;const{activeFeature:e}=this;return this.invalidFeatures.some(t=>t!==e)}get hasAsyncArcadeExpressions(){return this._hasAsyncArcadeExpressions}get hasTooManyFeatures(){return this._workingFeatures.length>this.maximumFeatureCount}get hasTooManyComplexFeatures(){return this._workingFeatures.length>this.maximumFeatureCountWithComplexForms&&this.hasAsyncArcadeExpressions}get invalidFeatures(){return this.sharedForm.invalidFeatures}get hasVisibleInputs(){return this.visibleInputs.length>0}get hasLayersWithContingentValues(){for(const e of this.layers){const t=this._layerContingentValuesMap.get(e);if(t&&t.size>0)return!0}return!1}get visibleInputs(){return this.activeForm.inputs.filter(e=>e.visible)}get noVisibleElementsReason(){if(this.hasVisibleInputs)return null;if(0===this.activeForm.inputs.length)return"noElements";const e=new Set;for(const t of this.activeForm.inputs)switch(t.visibilityCode){case"hidden:not-in-all-layers":case"hidden:no-domain-in-common":e.add("noElementsInCommon");break;case"hidden:field-definition":case"hidden:group-visibility-expression:all-features":case"hidden:visibility-expression:all-features":e.add("allElementsHidden");break;case"hidden:group-visibility-expression:some-features":case"hidden:visibility-expression:some-features":return"elementsHiddenInSome"}return e.has("allElementsHidden")?"allElementsHidden":"noElementsInCommon"}get status(){const e=this._prepareTask;return null==e?"not-loaded":e.finished?null!=e.error?"failed":"loaded":"loading"}get submittable(){return this.valid,!0}get updating(){return this._updatingHandles.updating||this.calculating}get valid(){return this.sharedForm.valid}get layers(){const e=new Set;return this.features.forEach(t=>{const s=_(t);s&&e.add(s)}),Array.from(e)}get mode(){return this.activeFeatureIndex>-1?"single":"batch"}submit(){this.submitHasBeenAttempted=!0,this.emit("submit",{name:"submit",results:this._makeSubmitResults(),valid:this.valid})}findFieldInput(e){if(null==e)return;const t=this._activeFormInputsByElementId;if(t.has(e))return t.get(e);const s=this.activeForm.allFieldInputs.find(t=>t.template.elementId===e);return void 0!==s?(t.set(e,s),s):void 0}getFirstVisibleInvalidFieldInput(){if(this.hasVisibleInputs&&!this.activeForm.valid)for(const e of this.visibleInputs){if(V(e)){const t=e.inputs.find(e=>j(e)&&!e.valid);if(t)return{input:t,groupInput:e}}if(j(e)&&!e.valid)return{input:e}}}getFieldInputValue(e){return this.findFieldInput(e)?.value}getValues(e){const t=this._reactiveGraphicLookup.get(e);if(!t)throw new r("feature-not-found","The given feature is not present in the BatchAttributeForm");return{...t.attributes}}notifyGeometriesChanged(e){const t=[];for(const s of e){const e=this._reactiveGraphicLookup.get(s);e&&(t.push(e),e.geometry=s.geometry)}this._expressionsManager.runGeometryDependentExpressions(t)}async setFieldInputValue(e,t){const s=new Set(this.invalidFeatures);await e.setValueFromUser(t),this.userHasChangedValues=!0,this._trackValidityChange(s),this.emit("value-change",{features:e.features.toArray().map(e=>e.source),fieldName:e.fieldName,name:"value-change",value:t})}async setValue(e,t){const s=this.findFieldInput(e);if(null==s)throw new r("no-FieldInput-found",`Cannot set the value of FieldInput with ID: ${e} because none was found in the active form`);await this.setFieldInputValue(s,t)}userChangesHaveMadeFeatureInvalid(e){return!!this._reactiveGraphicLookup.get(e)?.userChangesHaveMadeInvalid}async _trackValidityChange(e){await f(()=>!1===this.calculating);const t=this.invalidFeatures;for(const s of t)!1===e.has(s)&&this._reactiveGraphicLookup.has(s)&&(this._reactiveGraphicLookup.get(s).userChangesHaveMadeInvalid=!0)}validate(){return!1}_makeBatchFormInputsForFeature(e){const t=this._layerTemplateMap.get(e.layer);return t?T(t,new s([e]),this._expressionsManager):this._emptyForm}_makeSubmitResults(){const e=new Map;for(const[t,s]of this._reactiveGraphicLookup)e.set(t,{feature:t,values:{...s.attributes},invalidFields:[]});for(const t of this.sharedForm.allFieldInputs)for(const s of t.invalidFeatures)e.get(s)?.invalidFields.push(t.fieldName);return Array.from(e.values())}_prepare(){this._hasAsyncArcadeExpressions=!1,this._prepareTask=n(this._prepareTask),this._updateWorkingFeatures(),p(this._expressionsManager),this.userHasChangedValues=!1,this._expressionsManager=new k({arcadeContext:{editType:this.editType,spatialReference:this.spatialReference??F.WebMercator,map:this.map,timeZone:this._effectiveTimeZone}});const{layers:e}=this;if(0===e.length)return;const s=t(async t=>{try{l(t);const s=new Map;for(const r of e){const e=await H(r);if(l(t),e){const t=e.fieldGroups.flatMap(e=>e.fields);this._layerContingentValuesMap.set(r,new Set(t))}else this._layerContingentValuesMap.set(r,new Set);const i=U(this.layerInfos,r),a=await B(r,{arcadeExecutorProvider:this._arcadeExecutorProvider,formTimeZone:this._effectiveTimeZone},i?.formTemplate);l(t),this._layerTemplateMap.set(r,a);const o=a.getExpressionExecutorsForLayer(r);if(this._expressionsManager.layerExpressionsModelMap.set(r,new C({preserveFieldValuesWhenHidden:a.preserveFieldValuesWhenHidden,executorMap:o})),!this._hasAsyncArcadeExpressions)for(const t of o.keys()){const e=o.get(t);if(this._hasAsyncArcadeExpressions=!0===(e.editableExpression?.isAsync||e.requiredExpression?.isAsync||e.valueExpression?.isAsync||e.visibilityExpression?.isAsync),this._hasAsyncArcadeExpressions)break}for(const t of a.elements){if(G(t))continue;const e=t.clone();R(e)&&(e.elements=e.elements.filter(e=>!G(e)));const{elementId:r}=e;s.has(r)?s.get(r).foldIn(e):s.set(r,e)}}if(this.hasTooManyComplexFeatures)throw new r("too-many-features-with-complex-forms","There are too many features to load into the form with the configured complexity");if(this.hasTooManyFeatures)throw new r("too-many-features","There are too many features to load into the form.");const i=new L({elements:Array.from(s.values())});this.sharedFormTemplate=i,this.sharedForm=T(i,this._workingFeatures,this._expressionsManager),await this._expressionsManager.runAllExpressions(this._workingFeatures.toArray())}catch(s){throw u(s)||a.getLogger(this).error("Failed preparing form",s),s}});this._updatingHandles.consumePromise(s.promise),this._prepareTask=s}_updateWorkingFeatures(){this._workingFeatures.destroyAll();const{features:e}=this;if(this._reactiveGraphicLookup=new h,0!==e.length){this._workingFeatures.addMany(e.map(w));for(const e of this._workingFeatures)this._reactiveGraphicLookup.set(e.source,e)}}async _syncAttachments(){const{activeFeature:e,activeLayer:t,activeForm:s}=this;if(!(e&&s&&I(t)&&b(t)))return;const r=e.getObjectId();if(null==r)return;const i=this._attachmentCache.get(t),a=s.allAttachmentElementInputs;if(!a.length)return;let n;if(i){const e=i.get(r);e&&(n=e)}if(!n){n=await A(t,r,a);o(this._attachmentCache,t,()=>new h).set(r,n)}for(const o of a)o.attachments=W(o,n)}};e([y()],Z.prototype,"_effectiveTimeZone",null),e([y()],Z.prototype,"_attachmentCache",void 0),e([y({readOnly:!0})],Z.prototype,"activeFeature",null),e([y()],Z.prototype,"activeFeatureIndex",void 0),e([y({readOnly:!0})],Z.prototype,"activeForm",null),e([y({readOnly:!0})],Z.prototype,"activeLayer",null),e([y()],Z.prototype,"disabled",void 0),e([y()],Z.prototype,"calculating",null),e([y()],Z.prototype,"editType",void 0),e([y()],Z.prototype,"features",void 0),e([y()],Z.prototype,"expressionEvaluationFailed",null),e([y()],Z.prototype,"hasNonActiveInvalidFeatures",null),e([y()],Z.prototype,"hasAsyncArcadeExpressions",null),e([y()],Z.prototype,"_hasAsyncArcadeExpressions",void 0),e([y()],Z.prototype,"invalidFeatures",null),e([y()],Z.prototype,"hasVisibleInputs",null),e([y()],Z.prototype,"hasLayersWithContingentValues",null),e([y()],Z.prototype,"maximumFeatureCount",void 0),e([y()],Z.prototype,"maximumFeatureCountWithComplexForms",void 0),e([y()],Z.prototype,"visibleInputs",null),e([y()],Z.prototype,"map",void 0),e([y()],Z.prototype,"noVisibleElementsReason",null),e([y()],Z.prototype,"readOnly",void 0),e([y()],Z.prototype,"spatialReference",void 0),e([y()],Z.prototype,"submitHasBeenAttempted",void 0),e([y()],Z.prototype,"timeZone",void 0),e([y()],Z.prototype,"updating",null),e([y()],Z.prototype,"valid",null),e([y()],Z.prototype,"layers",null),e([y()],Z.prototype,"mode",null),e([y()],Z.prototype,"sharedForm",void 0),e([y()],Z.prototype,"sharedFormTemplate",void 0),e([y()],Z.prototype,"userHasChangedValues",void 0),e([y()],Z.prototype,"layerInfos",void 0),e([y()],Z.prototype,"_arcadeExecutorProvider",void 0),e([y()],Z.prototype,"_prepareTask",void 0),e([y()],Z.prototype,"_reactiveGraphicLookup",void 0),e([y()],Z.prototype,"_layerTemplateMap",void 0),e([y()],Z.prototype,"_layerContingentValuesMap",void 0),e([y()],Z.prototype,"_workingFeatures",void 0),e([y()],Z.prototype,"_expressionsManager",void 0),Z=e([v("esri.widgets.BatchAttributeForm.BatchAttributeFormViewModel")],Z);const S=Z;function W(e,t){const s="attachment"===e.input?.type?e.input.attachmentAssociationType:"exact",r=e.attachmentKeyword,i=null!=r&&r.length>0;if("any"===s)return t;if("exactOrNone"===s){if(!i)return t.filter(e=>O(e.keywords));const e=r.toLowerCase();return t.filter(t=>O(t.keywords)||P(t,e))}if(!i)return t;const a=r.toLowerCase();return t.filter(e=>P(e,a))}function N(e){return null!=e&&e.trim().length>0}function O(e){return!N(e)}function P(e,t){const s=e.keywords;return null!=s&&s.toLowerCase()===t.toLowerCase()}export{S as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{substitute as e}from"../../intl.js";import t from"../../rest/support/AttachmentQuery.js";import{ReactiveGraphic as i}from"./ReactiveGraphic.js";import{getIntlOptionsForField as n}from"../support/dateUtils.js";import{isEmptyValue as r,getRangeErrorMessage as o,shouldUseScientificNotation as a,scientificNumberFormatOptions as s,numberFormatOptions as l}from"../support/forms/formUtils.js";const d=(e,t)=>null!=e&&e.input?.type===t;function u(e){return new i({source:e})}function c(t,i,r,d){const{dataType:u,minLength:c}=t,f=r?.validationErrors;if(!f||!i)return null;if("batch-attribute-form-validation::features-have-different-errors"===i)return f.invalidBatchFormType;if("input-validation-error::cannot-be-empty"===i)return f.cannotBeNull;if("domain-validation-error::value-out-of-range"===i||"numeric-range-validation-error::out-of-range"===i){const{field:i,range:r}=t,c={type:"date",intlOptions:{timeZone:"date"===i.type&&d?d:void 0,...n(i)}},p=o(r,f);return e(p,r,{format:{max:"date"===u?c:null!=r.max&&a(r.max)?s:l,min:"date"===u?c:null!=r.min&&a(r.min)?s:l}})}return"domain-validation-error::invalid-coded-value"===i?f.invalidCodedValue:"type-validation-error::invalid-type"===i?f.invalidType:"length-validation-error::too-short"===i?e(f.tooShort,{min:c}):null}function f(e,t,i){const n=i?.validationErrors;if(!n)return null;let r=null;for(const o of e.invalidHiddenInputs)switch(o.effectiveVisibilityCode){case"hidden:visibility-expression:all-features":case"hidden:group-visibility-expression:all-features":case"hidden:field-definition":return"single"===t?n.nonVisibleError_changeValues:n.nonVisibleError_checkIndividualFeatures;case"hidden:no-domain-in-common":case"hidden:visibility-expression:some-features":case"hidden:group-visibility-expression:some-features":case"hidden:not-in-all-layers":r=n.nonVisibleError_checkIndividualFeatures;break;case"visible":continue;default:o.effectiveVisibilityCode}return r}function p(e){return null!=e&&"object"==typeof e&&"type"in e&&("feature"===e.type||"geojson"===e.type||"knowledge-graph-sublayer"===e.type||"oriented-imagery"===e.type||"scene"===e.type||"subtype-sublayer"===e.type)}function m(e){return!!p(e)||!!(null!=e&&"object"==typeof e&&"type"in e&&e.type&&"id"in e&&e.id&&"fields"in e&&e.fields&&"fieldsIndex"in e&&e.fieldsIndex&&"objectIdField"in e&&e.objectIdField&&"capabilities"in e&&"getField"in e&&e.getField)}function y(e){return m(e)&&"queryAttachments"in e}function h(e){if(!y(e))return!1;const t=e?.effectiveCapabilities??e?.capabilities;return!(!t?.data?.supportsAttachment||!t.operations.supportsQueryAttachments)}async function v(e,i,n){const o=new Set;let a=!1;for(const t of n){if(r(t.attachmentKeyword)){a=!0;break}o.add(t.attachmentKeyword)}const s=o.size&&!a?Array.from(o):void 0,l=new t({objectIds:[i],where:"1=1",returnMetadata:!0,keywords:s});e.capabilities?.query?.supportsCacheHint&&(l.cacheHint=!0);return(await e.queryAttachments(l))[i]??[]}function b(e,t,i,n){const r=e.get(t)?.get(i)??[];if(!n?.length)return r;const o=new Set(n.map(e=>e.toLowerCase()));return r.filter(e=>o.has(e.keywords.toLowerCase()))}export{u as createReactiveGraphic,b as getAttachmentsForKeywords,f as getHiddenFieldsValidationErrorMessage,c as getVisibleFieldInputValidationErrorMessage,m as isAttributeFormSupportedLayer,p as isAttributeFormSupportedLayerUnion,y as isAttributeFormSupportedLayerWithAttachments,d as isElementTemplateWithInputType,h as layerSupportsQueryAttachments,v as queryAttachmentsForElements};
2
+ import{substitute as e}from"../../intl.js";import t from"../../rest/support/AttachmentQuery.js";import{ReactiveGraphic as i}from"./ReactiveGraphic.js";import{getIntlOptionsForField as n}from"../support/dateUtils.js";import{isEmptyValue as r,getRangeErrorMessage as o,shouldUseScientificNotation as a,scientificNumberFormatOptions as s,numberFormatOptions as l}from"../support/forms/formUtils.js";const d=(e,t)=>null!=e&&e.input?.type===t;function u(e){return new i({source:e})}function c(t,i,r,d){const{dataType:u,minLength:c}=t,p=r?.validationErrors;if(!p||!i)return null;if("batch-attribute-form-validation::features-have-different-errors"===i)return p.invalidBatchFormType;if("input-validation-error::cannot-be-empty"===i)return p.cannotBeNull;if("domain-validation-error::value-out-of-range"===i||"numeric-range-validation-error::out-of-range"===i){const{field:i,range:r}=t,c={type:"date",intlOptions:{timeZone:"date"===i.type&&d?d:void 0,...n(i)}},f=o(r,p);return e(f,r,{format:{max:"date"===u?c:null!=r.max&&a(r.max)?s:l,min:"date"===u?c:null!=r.min&&a(r.min)?s:l}})}return"domain-validation-error::invalid-coded-value"===i?p.invalidCodedValue:"type-validation-error::invalid-type"===i?p.invalidType:"length-validation-error::too-short"===i?e(p.tooShort,{min:c}):null}function p(e,t,i){const n=i?.validationErrors;if(!n)return null;let r=null;for(const o of e.invalidHiddenInputs)switch(o.effectiveVisibilityCode){case"hidden:visibility-expression:all-features":case"hidden:group-visibility-expression:all-features":case"hidden:field-definition":return"single"===t?n.nonVisibleError_changeValues:n.nonVisibleError_checkIndividualFeatures;case"hidden:no-domain-in-common":case"hidden:visibility-expression:some-features":case"hidden:group-visibility-expression:some-features":case"hidden:not-in-all-layers":r=n.nonVisibleError_checkIndividualFeatures;break;case"visible":continue;default:o.effectiveVisibilityCode}return r}function f(e){return null!=e&&"object"==typeof e&&"type"in e&&("feature"===e.type||"geojson"===e.type||"knowledge-graph-sublayer"===e.type||"oriented-imagery"===e.type||"scene"===e.type||"subtype-sublayer"===e.type)}function m(e){return!!f(e)||!!(null!=e&&"object"==typeof e&&"type"in e&&e.type&&"id"in e&&e.id&&"fields"in e&&e.fields&&"fieldsIndex"in e&&e.fieldsIndex&&"objectIdField"in e&&e.objectIdField&&"capabilities"in e&&"getField"in e&&e.getField)}function y(e){return m(e)&&"queryAttachments"in e}function h(e){if(!y(e))return!1;const t=e?.effectiveCapabilities??e?.capabilities;return!(!t?.data?.supportsAttachment||!t.operations.supportsQueryAttachments)}async function v(e,i,n){const o=new Set;let a=!1;for(const t of n){if("attachment"===t.input?.type&&("any"===t.input.attachmentAssociationType||"exactOrNone"===t.input.attachmentAssociationType)){a=!0;break}if(r(t.attachmentKeyword)){a=!0;break}o.add(t.attachmentKeyword)}const s=o.size&&!a?Array.from(o):void 0,l=new t({objectIds:[i],where:"1=1",returnMetadata:!0,keywords:s});e.capabilities?.query?.supportsCacheHint&&(l.cacheHint=!0);return(await e.queryAttachments(l))[i]??[]}function b(e,t,i,n){const r=e.get(t)?.get(i)??[];if(!n?.length)return r;const o=new Set(n.map(e=>e.toLowerCase()));return r.filter(e=>o.has(e.keywords.toLowerCase()))}export{u as createReactiveGraphic,b as getAttachmentsForKeywords,p as getHiddenFieldsValidationErrorMessage,c as getVisibleFieldInputValidationErrorMessage,m as isAttributeFormSupportedLayer,f as isAttributeFormSupportedLayerUnion,y as isAttributeFormSupportedLayerWithAttachments,d as isElementTemplateWithInputType,h as layerSupportsQueryAttachments,v as queryAttachmentsForElements};
@@ -0,0 +1,64 @@
1
+ import type Graphic from "../../../Graphic.js";
2
+ import type AttachmentInfo from "../../../rest/query/support/AttachmentInfo.js";
3
+ import type EditableInput from "./EditableInput.js";
4
+ import type GroupInput from "./GroupInput.js";
5
+ import type { AttachmentInputUnion } from "../../../form/elements/inputs/attachments/types.js";
6
+ import type { AttributeFormSupportedLayerUnion } from "../types.js";
7
+ import type { EditableInputProperties } from "./EditableInput.js";
8
+
9
+ /** @since 5.1 */
10
+ export interface AttachmentElementInputProperties extends EditableInputProperties, Partial<Pick<AttachmentElementInput, "attachments">> {}
11
+
12
+ /**
13
+ * This is a read-only support class that represents an [attachment element](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) in a [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/).
14
+ *
15
+ * @since 5.1
16
+ * @see [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/)
17
+ * @see [BatchAttributeFormViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/BatchAttributeFormViewModel/)
18
+ * @see [BatchFormInputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/BatchFormInputs/)
19
+ */
20
+ export default class AttachmentElementInput extends EditableInput<any> {
21
+ constructor(properties: AttachmentElementInputProperties);
22
+ /** Indicates if the input allows users to rename attachments. */
23
+ get allowUserRename(): boolean | null | undefined;
24
+ /** The input's attachment keyword. This is used to filter attachments associated with the active feature. */
25
+ get attachmentKeyword(): string | null | undefined;
26
+ /** The attachments applicable to this input. */
27
+ accessor attachments: AttachmentInfo[];
28
+ /** Indicates if the attachment filename should be displayed. */
29
+ get displayFilename(): boolean | null | undefined;
30
+ /**
31
+ * The single feature associated with this attachment element.
32
+ *
33
+ * @since 5.1
34
+ * @see [BatchAttributeFormViewModel.features](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/BatchAttributeFormViewModel/#features)
35
+ */
36
+ get feature(): Graphic | null | undefined;
37
+ /** The group containing the attachment element input. */
38
+ get group(): GroupInput | null;
39
+ /** The configured attachment input for this element. */
40
+ get input(): AttachmentInputUnion | null | undefined;
41
+ /**
42
+ * Identifies the single feature layer associated with this attachment element. The layer must support feature editing and field access.
43
+ *
44
+ * The following layer types are supported:
45
+ * - [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/)
46
+ * - [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/)
47
+ * - [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/) (with `featureLayer` property)
48
+ * - [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/)
49
+ * - [OrientedImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/)
50
+ * - [KnowledgeGraphSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/knowledgeGraph/KnowledgeGraphSublayer/)
51
+ *
52
+ * @since 5.1
53
+ * @see [BatchAttributeFormViewModel.layers](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/BatchAttributeFormViewModel/#layers)
54
+ */
55
+ get layer(): AttributeFormSupportedLayerUnion | null | undefined;
56
+ /** The maximum number of attachments allowed. */
57
+ get maxAttachmentCount(): number | null | undefined;
58
+ /** The minimum number of attachments required. */
59
+ get minAttachmentCount(): number | null | undefined;
60
+ /** The type of input. */
61
+ get type(): "attachment";
62
+ /** Indicates if the original filename should be used when creating attachments. */
63
+ get useOriginalFilename(): boolean | null | undefined;
64
+ }
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as t}from"tslib";import{property as e,subclass as n}from"../../../core/accessorSupport/decorators.js";import r from"./EditableInput.js";import a from"./SingleFeatureInputAdapter.js";let o=class extends r{constructor(t){super(t),this.attachments=[],this.group=null,this.single=new a({input:this}),this.type="attachment"}get allowUserRename(){return this.template.allowUserRename}get attachmentKeyword(){return this.template.attachmentKeyword?.trim()}get displayFilename(){return this.template.displayFilename}get feature(){return this.single.feature}get input(){return this.template.input}get layer(){return this.single.layer}get maxAttachmentCount(){return this.template.maxAttachmentCount}get minAttachmentCount(){return this.template.minAttachmentCount}get useOriginalFilename(){return this.template.useOriginalFilename}};t([e()],o.prototype,"allowUserRename",null),t([e()],o.prototype,"attachmentKeyword",null),t([e()],o.prototype,"attachments",void 0),t([e()],o.prototype,"displayFilename",null),t([e()],o.prototype,"feature",null),t([e()],o.prototype,"group",void 0),t([e()],o.prototype,"input",null),t([e()],o.prototype,"layer",null),t([e()],o.prototype,"maxAttachmentCount",null),t([e()],o.prototype,"minAttachmentCount",null),t([e({readOnly:!0})],o.prototype,"single",void 0),t([e({readOnly:!0})],o.prototype,"type",void 0),t([e()],o.prototype,"useOriginalFilename",null),o=t([n("esri.widgets.BatchAttributeForm.inputs.AttachmentElementInput")],o);const l=o;export{l as default};
@@ -1,5 +1,6 @@
1
1
  import type Graphic from "../../../Graphic.js";
2
2
  import type Accessor from "../../../core/Accessor.js";
3
+ import type AttachmentElementInput from "./AttachmentElementInput.js";
3
4
  import type FieldInput from "./FieldInput.js";
4
5
  import type { FormInput } from "./types.js";
5
6
 
@@ -12,6 +13,8 @@ export interface BatchFormInputsProperties {}
12
13
  */
13
14
  export default class BatchFormInputs extends Accessor {
14
15
  constructor(properties?: BatchFormInputsProperties);
16
+ /** Returns an array of all the attachment element inputs in the form, including those in groups. */
17
+ get allAttachmentElementInputs(): AttachmentElementInput[];
15
18
  /** Returns an array of all the field inputs in the form, including those in groups. */
16
19
  get allFieldInputs(): FieldInput[];
17
20
  /** The description for the form. */
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{property as i,subclass as l}from"../../../core/accessorSupport/decorators.js";import{isFieldInput as r,isGroupInput as s}from"./support/inputUtils.js";let n=class extends e{constructor(t){super(t),this.inputs=[],this.template=null}get allFieldInputs(){const t=[];for(const e of this.inputs)r(e)?t.push(e):s(e)&&t.push(...e.inputs.filter(r));return t}get description(){return this.template?.description??null}get hasInvalidHiddenInputs(){return this.invalidHiddenInputs.length>0}get invalidFeatures(){return Array.from(new Set(this.allFieldInputs.flatMap(t=>t.invalidFeatures)))}get invalidHiddenInputs(){return this.allFieldInputs.filter(t=>!t.valid&&!t.effectiveVisible)}get title(){return this.template?.title??null}get valid(){return this.allFieldInputs.every(t=>t.valid)}};t([i()],n.prototype,"allFieldInputs",null),t([i()],n.prototype,"description",null),t([i()],n.prototype,"inputs",void 0),t([i()],n.prototype,"hasInvalidHiddenInputs",null),t([i()],n.prototype,"invalidFeatures",null),t([i()],n.prototype,"invalidHiddenInputs",null),t([i()],n.prototype,"template",void 0),t([i()],n.prototype,"title",null),t([i()],n.prototype,"valid",null),n=t([l("esri.widgets.BatchAttributeForm.inputs.BatchFormInputs")],n);const p=n;export{p as default};
2
+ import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{property as l,subclass as i}from"../../../core/accessorSupport/decorators.js";import{isFieldInput as n,isGroupInput as s,isAttachmentElementInput as r}from"./support/inputUtils.js";let p=class extends e{constructor(t){super(t),this.inputs=[],this.template=null}get allFieldInputs(){const t=[];for(const e of this.inputs)n(e)?t.push(e):s(e)&&t.push(...e.inputs.filter(n));return t}get allAttachmentElementInputs(){const t=[];for(const e of this.inputs)r(e)?t.push(e):s(e)&&t.push(...e.inputs.filter(r));return t}get description(){return this.template?.description??null}get hasInvalidHiddenInputs(){return this.invalidHiddenInputs.length>0}get invalidFeatures(){return Array.from(new Set(this.allFieldInputs.flatMap(t=>t.invalidFeatures)))}get invalidHiddenInputs(){return this.allFieldInputs.filter(t=>!t.valid&&!t.effectiveVisible)}get title(){return this.template?.title??null}get valid(){return this.allFieldInputs.every(t=>t.valid)}};t([l()],p.prototype,"allFieldInputs",null),t([l()],p.prototype,"allAttachmentElementInputs",null),t([l()],p.prototype,"description",null),t([l()],p.prototype,"inputs",void 0),t([l()],p.prototype,"hasInvalidHiddenInputs",null),t([l()],p.prototype,"invalidFeatures",null),t([l()],p.prototype,"invalidHiddenInputs",null),t([l()],p.prototype,"template",void 0),t([l()],p.prototype,"title",null),t([l()],p.prototype,"valid",null),p=t([i("esri.widgets.BatchAttributeForm.inputs.BatchFormInputs")],p);const o=p;export{o as default};
@@ -13,10 +13,11 @@ export interface GroupInputProperties extends InputBaseProperties {}
13
13
  * @see [FieldInput](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/FieldInput/)
14
14
  * @see [RelationshipElementInput](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/RelationshipElementInput/)
15
15
  * @see [TextElementInput](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/TextElementInput/)
16
+ * @see [AttachmentElementInput](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/AttachmentElementInput/)
16
17
  */
17
18
  export default class GroupInput extends InputBase<any> {
18
19
  constructor(properties: GroupInputProperties);
19
- /** An array of [field inputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/FieldInput/), [relationship element inputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/RelationshipElementInput/), and [text element inputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/TextElementInput/) contained within the group. */
20
+ /** An array of [field inputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/FieldInput/), [relationship element inputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/RelationshipElementInput/), [text element inputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/TextElementInput/), and [attachment element inputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/AttachmentElementInput/) contained within the group. */
20
21
  get inputs(): ReadonlyArray<GroupableInput>;
21
22
  /**
22
23
  * Indicates whether the group should be expanded or collapsed.
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../core/Error.js";import t from"../BatchFormInputs.js";import r from"../FieldInput.js";import s from"../GroupInput.js";import n from"../RelationshipElementInput.js";import o from"../TextElementInput.js";import p from"../UtilityNetworkAssociationsElementInput.js";import{isAttachmentElementTemplate as a,isFieldElementTemplate as i,isGroupElementTemplate as m,isRelationshipElementTemplate as l,isTextElementTemplate as u,isUtilityNetworkAssociationsElementTemplate as f}from"../../templates/support/templateUtils.js";function x(e,r,s){const n=e.elements.filter(e=>!a(e)).map(e=>I(e,r,s));return new t({inputs:n,template:e})}function I(t,a,x){const w=new Set(t.layers),c=a.filter(e=>w.has(e.layer)),y=c.length===a.length;if(i(t))return new r({existsInAllLayers:y,features:c,template:t,expressionsManager:x});if(m(t)){const e=t.elements.map(e=>I(e,a,x));return new s({existsInAllLayers:y,features:c,inputs:e,template:t,expressionsManager:x})}if(l(t))return new n({existsInAllLayers:y,features:c,template:t,expressionsManager:x});if(u(t))return new o({existsInAllLayers:y,features:c,template:t,expressionsManager:x});if(f(t))return new p({existsInAllLayers:y,features:c,template:t,expressionsManager:x});throw new e("batch-attribute-form:unsupported-element-template","The type of form element template provided is not supported")}export{x as createBatchFormInputsFromBatchFormTemplate};
2
+ import e from"../../../../core/Error.js";import t from"../AttachmentElementInput.js";import r from"../BatchFormInputs.js";import s from"../FieldInput.js";import n from"../GroupInput.js";import p from"../RelationshipElementInput.js";import o from"../TextElementInput.js";import a from"../UtilityNetworkAssociationsElementInput.js";import{isFieldElementTemplate as i,isGroupElementTemplate as m,isRelationshipElementTemplate as l,isTextElementTemplate as u,isAttachmentElementTemplate as f,isUtilityNetworkAssociationsElementTemplate as x}from"../../templates/support/templateUtils.js";function I(e,t,s){const n=e.elements.map(e=>w(e,t,s));return new r({inputs:n,template:e})}function w(r,I,c){const y=new Set(r.layers),h=I.filter(e=>y.has(e.layer)),j=h.length===I.length;if(i(r))return new s({existsInAllLayers:j,features:h,template:r,expressionsManager:c});if(m(r)){const e=r.elements.map(e=>w(e,I,c));return new n({existsInAllLayers:j,features:h,inputs:e,template:r,expressionsManager:c})}if(l(r))return new p({existsInAllLayers:j,features:h,template:r,expressionsManager:c});if(u(r))return new o({existsInAllLayers:j,features:h,template:r,expressionsManager:c});if(f(r))return new t({existsInAllLayers:j,features:h,template:r,expressionsManager:c});if(x(r))return new a({existsInAllLayers:j,features:h,template:r,expressionsManager:c});throw new e("batch-attribute-form:unsupported-element-template","The type of form element template provided is not supported")}export{I as createBatchFormInputsFromBatchFormTemplate};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- const t="esri_BatchAttributeForm_different_values";function n(t){return"visible"===t}function e(t){return"field"===t.type}function r(t){return"group"===t.type}function o(t){return"relationship"===t.type}function u(t){return"text"===t.type}function i(t){return"utilityNetworkAssociations"===t.type}function s(t){const n=`${t.elementId}:${t.executorPurpose}`;return null!=t.textExpressionIndex?`${n}:${t.textExpressionIndex}`:n}const c=t=>null!=t&&(p(t,"combo-box")||p(t,"radio-buttons"));function p(t,n){return t?.type===n}export{t as differentValuesString,e as isFieldInput,c as isFieldInputWithShowNoValueOptionInput,r as isGroupInput,p as isInputWithInputType,o as isRelationshipElementInput,u as isTextElementInput,i as isUtilityNetworkAssociationsElementInput,s as makeUseId,n as visibilityCodeToBoolean};
2
+ const t="esri_BatchAttributeForm_different_values";function n(t){return"visible"===t}function e(t){return"field"===t.type}function r(t){return"group"===t.type}function o(t){return"relationship"===t.type}function u(t){return"text"===t.type}function i(t){return"attachment"===t.type}function c(t){return"utilityNetworkAssociations"===t.type}function s(t){const n=`${t.elementId}:${t.executorPurpose}`;return null!=t.textExpressionIndex?`${n}:${t.textExpressionIndex}`:n}const p=t=>null!=t&&(f(t,"combo-box")||f(t,"radio-buttons"));function f(t,n){return t?.type===n}export{t as differentValuesString,i as isAttachmentElementInput,e as isFieldInput,p as isFieldInputWithShowNoValueOptionInput,r as isGroupInput,f as isInputWithInputType,o as isRelationshipElementInput,u as isTextElementInput,c as isUtilityNetworkAssociationsElementInput,s as makeUseId,n as visibilityCodeToBoolean};
@@ -1,3 +1,4 @@
1
+ import type AttachmentElementInput from "./AttachmentElementInput.js";
1
2
  import type FieldInput from "./FieldInput.js";
2
3
  import type GroupInput from "./GroupInput.js";
3
4
  import type RelationshipElementInput from "./RelationshipElementInput.js";
@@ -8,16 +9,17 @@ import type UtilityNetworkAssociationsElementInput from "./UtilityNetworkAssocia
8
9
  * Input types that can be nested within a [group input](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/GroupInput/). This includes
9
10
  * [field inputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/FieldInput/),
10
11
  * [relationship element inputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/RelationshipElementInput/),
12
+ * [attachment element inputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/AttachmentElementInput/),
11
13
  * [utility network associations element inputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput/), and
12
14
  * [text element inputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/TextElementInput/). Group inputs may not be nested within other group inputs.
13
15
  *
14
16
  * @since 5.0
15
17
  */
16
- export type GroupableInput = FieldInput | RelationshipElementInput | TextElementInput | UtilityNetworkAssociationsElementInput;
18
+ export type GroupableInput = FieldInput | RelationshipElementInput | AttachmentElementInput | TextElementInput | UtilityNetworkAssociationsElementInput;
17
19
 
18
20
  /**
19
21
  * Input types that are supported by [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/).
20
22
  *
21
23
  * @since 5.0
22
24
  */
23
- export type FormInput = GroupInput | FieldInput | RelationshipElementInput | TextElementInput | UtilityNetworkAssociationsElementInput;
25
+ export type FormInput = GroupInput | FieldInput | RelationshipElementInput | AttachmentElementInput | TextElementInput | UtilityNetworkAssociationsElementInput;