@arcgis/core 4.27.0-next.20230317 → 4.27.0-next.20230321

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 (300) hide show
  1. package/TimeExtent.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/05e47e78e258dd5ab6ea.js +1 -0
  4. package/assets/esri/core/workers/chunks/{b661d2c785333429aad3.js → 0b005e3502dd97562701.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{8812629e07e5bf46caa7.js → 1d2271a36641f6834401.js} +1 -1
  6. package/assets/esri/core/workers/chunks/1d65a2bc91774fdbd690.js +1 -0
  7. package/assets/esri/core/workers/chunks/273a894ab44b76ee4488.js +1 -0
  8. package/assets/esri/core/workers/chunks/29ee4f14602caf6967e4.js +1 -0
  9. package/assets/esri/core/workers/chunks/{56ddde83f40cda0a8a5c.js → 2c0775541cfec9d43acb.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{48a1b8be3c2a59c4c925.js → 32f9b488915a4a8864e5.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{790d62ea3c90ca076095.js → 403c18eaa30673b096fe.js} +1 -1
  12. package/assets/esri/core/workers/chunks/41bbf58417f4085657f4.js +1 -0
  13. package/assets/esri/core/workers/chunks/{c36efbdd0a84fe851bbb.js → 433686dfda9e2ff1f98b.js} +1 -1
  14. package/assets/esri/core/workers/chunks/4be7647605300e07e843.js +1 -0
  15. package/assets/esri/core/workers/chunks/5cc99e9e974fec32b597.js +1 -0
  16. package/assets/esri/core/workers/chunks/6062bc79ebd5047a473a.js +1 -0
  17. package/assets/esri/core/workers/chunks/{57aa75a10fb8bb3fa517.js → 622139ef8f7181e48cd0.js} +1 -1
  18. package/assets/esri/core/workers/chunks/6b14673a4afd6ef81487.js +1 -0
  19. package/assets/esri/core/workers/chunks/70ea44365021b665c213.js +1 -0
  20. package/assets/esri/core/workers/chunks/{7727e6a4338c831f272f.js → 7570ec6a64a88ddc0fdd.js} +1 -1
  21. package/assets/esri/core/workers/chunks/81a6f4b43e047c3395c0.js +1 -0
  22. package/assets/esri/core/workers/chunks/87edeb09a948122fa030.js +1 -0
  23. package/assets/esri/core/workers/chunks/8daa0523d49653cc5861.js +1 -0
  24. package/assets/esri/core/workers/chunks/{3ff3d67f1bc6e2b2f48e.js → 90e12cff7672f3d92ced.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{f150bd21c3b9e098da57.js → 92951b85676df776961f.js} +56 -56
  26. package/assets/esri/core/workers/chunks/983b26414cc46d9c3105.js +1 -0
  27. package/assets/esri/core/workers/chunks/{19355af765993931a7c0.js → 9b196a726c6d175ca60f.js} +1 -1
  28. package/assets/esri/core/workers/chunks/a27951dbe83c63f9d01a.js +1 -0
  29. package/assets/esri/core/workers/chunks/bc002e4dff8859571a7a.js +1 -0
  30. package/assets/esri/core/workers/chunks/bfc2b40f1892970281c6.js +1 -0
  31. package/assets/esri/core/workers/chunks/c162d1e27e779732d494.js +1 -0
  32. package/assets/esri/core/workers/chunks/c5d872adce711ec61ede.js +1 -0
  33. package/assets/esri/core/workers/chunks/c5dd23d11fa91b0f318e.js +1 -0
  34. package/assets/esri/core/workers/chunks/{e97c4beb3a6cf1d91310.js → c6c2f771bca0e303b5c0.js} +1 -1
  35. package/assets/esri/core/workers/chunks/c8f019d13f6b22481f2e.js +1 -0
  36. package/assets/esri/core/workers/chunks/d34dbb49508a95588423.js +1 -0
  37. package/assets/esri/core/workers/chunks/e637e47000f4dc48054d.js +1 -0
  38. package/assets/esri/core/workers/chunks/e7093d27a31345953dca.js +1 -0
  39. package/assets/esri/core/workers/chunks/f1ab86dbbd5b04e2a96c.js +1 -0
  40. package/assets/esri/core/workers/chunks/f85a01429959e60a8713.js +1 -0
  41. package/assets/esri/core/workers/chunks/ff9efa829497557ec26a.js +1 -0
  42. package/assets/esri/themes/base/widgets/_Bookmarks.scss +3 -0
  43. package/assets/esri/themes/base/widgets/_Editor.scss +18 -0
  44. package/assets/esri/themes/base/widgets/_ItemList.scss +13 -33
  45. package/assets/esri/themes/dark/main.css +1 -1
  46. package/assets/esri/themes/light/main.css +1 -1
  47. package/assets/esri/themes/light/view.css +1 -1
  48. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  49. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  50. package/assets/esri/widgets/Slice/t9n/Slice_ar.json +1 -1
  51. package/assets/esri/widgets/Slice/t9n/Slice_bg.json +1 -1
  52. package/assets/esri/widgets/Slice/t9n/Slice_bs.json +1 -1
  53. package/assets/esri/widgets/Slice/t9n/Slice_ca.json +1 -1
  54. package/assets/esri/widgets/Slice/t9n/Slice_cs.json +1 -1
  55. package/assets/esri/widgets/Slice/t9n/Slice_da.json +1 -1
  56. package/assets/esri/widgets/Slice/t9n/Slice_de.json +1 -1
  57. package/assets/esri/widgets/Slice/t9n/Slice_el.json +1 -1
  58. package/assets/esri/widgets/Slice/t9n/Slice_es.json +1 -1
  59. package/assets/esri/widgets/Slice/t9n/Slice_et.json +1 -1
  60. package/assets/esri/widgets/Slice/t9n/Slice_fi.json +1 -1
  61. package/assets/esri/widgets/Slice/t9n/Slice_fr.json +1 -1
  62. package/assets/esri/widgets/Slice/t9n/Slice_he.json +1 -1
  63. package/assets/esri/widgets/Slice/t9n/Slice_hr.json +1 -1
  64. package/assets/esri/widgets/Slice/t9n/Slice_hu.json +1 -1
  65. package/assets/esri/widgets/Slice/t9n/Slice_id.json +1 -1
  66. package/assets/esri/widgets/Slice/t9n/Slice_it.json +1 -1
  67. package/assets/esri/widgets/Slice/t9n/Slice_ja.json +1 -1
  68. package/assets/esri/widgets/Slice/t9n/Slice_ko.json +1 -1
  69. package/assets/esri/widgets/Slice/t9n/Slice_lt.json +1 -1
  70. package/assets/esri/widgets/Slice/t9n/Slice_lv.json +1 -1
  71. package/assets/esri/widgets/Slice/t9n/Slice_nb.json +1 -1
  72. package/assets/esri/widgets/Slice/t9n/Slice_nl.json +1 -1
  73. package/assets/esri/widgets/Slice/t9n/Slice_pl.json +1 -1
  74. package/assets/esri/widgets/Slice/t9n/Slice_pt-BR.json +1 -1
  75. package/assets/esri/widgets/Slice/t9n/Slice_pt-PT.json +1 -1
  76. package/assets/esri/widgets/Slice/t9n/Slice_ro.json +1 -1
  77. package/assets/esri/widgets/Slice/t9n/Slice_ru.json +1 -1
  78. package/assets/esri/widgets/Slice/t9n/Slice_sk.json +1 -1
  79. package/assets/esri/widgets/Slice/t9n/Slice_sl.json +1 -1
  80. package/assets/esri/widgets/Slice/t9n/Slice_sr.json +1 -1
  81. package/assets/esri/widgets/Slice/t9n/Slice_sv.json +1 -1
  82. package/assets/esri/widgets/Slice/t9n/Slice_th.json +1 -1
  83. package/assets/esri/widgets/Slice/t9n/Slice_tr.json +1 -1
  84. package/assets/esri/widgets/Slice/t9n/Slice_uk.json +1 -1
  85. package/assets/esri/widgets/Slice/t9n/Slice_vi.json +1 -1
  86. package/assets/esri/widgets/Slice/t9n/Slice_zh-CN.json +1 -1
  87. package/assets/esri/widgets/Slice/t9n/Slice_zh-HK.json +1 -1
  88. package/assets/esri/widgets/Slice/t9n/Slice_zh-TW.json +1 -1
  89. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ar.json +1 -1
  90. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bg.json +1 -1
  91. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bs.json +1 -1
  92. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ca.json +1 -1
  93. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_cs.json +1 -1
  94. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_da.json +1 -1
  95. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_de.json +1 -1
  96. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_el.json +1 -1
  97. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_es.json +1 -1
  98. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_et.json +1 -1
  99. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fi.json +1 -1
  100. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fr.json +1 -1
  101. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_he.json +1 -1
  102. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hr.json +1 -1
  103. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hu.json +1 -1
  104. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_id.json +1 -1
  105. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_it.json +1 -1
  106. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ja.json +1 -1
  107. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ko.json +1 -1
  108. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lt.json +1 -1
  109. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lv.json +1 -1
  110. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nb.json +1 -1
  111. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nl.json +1 -1
  112. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pl.json +1 -1
  113. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-BR.json +1 -1
  114. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-PT.json +1 -1
  115. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ro.json +1 -1
  116. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ru.json +1 -1
  117. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sk.json +1 -1
  118. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sl.json +1 -1
  119. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sr.json +1 -1
  120. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sv.json +1 -1
  121. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_th.json +1 -1
  122. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_tr.json +1 -1
  123. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_uk.json +1 -1
  124. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_vi.json +1 -1
  125. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-CN.json +1 -1
  126. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-HK.json +1 -1
  127. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-TW.json +1 -1
  128. package/chunks/ColorMaterial.glsl.js +16 -14
  129. package/core/domUtils.js +1 -1
  130. package/core/maybe.js +1 -1
  131. package/core/urlUtils.js +1 -1
  132. package/geohash/GeohashTree.js +1 -1
  133. package/interfaces.d.ts +12 -214
  134. package/layers/SceneLayer.js +1 -1
  135. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  136. package/layers/support/FieldsIndex.js +1 -1
  137. package/layers/support/fieldType.js +1 -1
  138. package/layers/support/fieldUtils.js +1 -1
  139. package/layers/support/rasterFunctionConstants.js +1 -1
  140. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  141. package/layers/support/rasterFunctions/CurvatureFunction.js +5 -0
  142. package/layers/support/rasterFunctions/CurvatureFunctionArguments.js +5 -0
  143. package/layers/support/rasterFunctions/SlopeFunction.js +1 -1
  144. package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
  145. package/layers/support/rasterFunctions/surfaceUtils.js +1 -1
  146. package/package.json +1 -1
  147. package/portal/schemas/definitions.js +1 -1
  148. package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
  149. package/support/revision.js +1 -1
  150. package/views/2d/engine/imagery/processor/curvatureProcessor.js +5 -0
  151. package/views/2d/engine/imagery/processor/rasterProcessor.js +1 -1
  152. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  153. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  154. package/views/2d/layers/features/support/BinStore.js +1 -1
  155. package/views/2d/layers/features/support/ClusterStore.js +1 -1
  156. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  157. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  158. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  159. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  160. package/views/2d/layers/features/support/FeatureSetReaderPBFIndirect.js +1 -1
  161. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  162. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  163. package/views/3d/environment/CloudsData.js +1 -1
  164. package/views/3d/environment/CloudsGenerator.js +1 -1
  165. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  166. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  167. package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
  168. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
  169. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateObjectSymbol3DAdapter.js +1 -1
  170. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  171. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  172. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  173. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  174. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  175. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  176. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  177. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  178. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  179. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  180. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  181. package/views/3d/layers/graphics/interfaces.js +1 -1
  182. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  183. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  184. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  185. package/views/3d/support/buffer/glUtil.js +1 -1
  186. package/views/3d/support/buffer/workerHelper.js +1 -1
  187. package/views/3d/support/engineContent/line.js +1 -1
  188. package/views/3d/terrain/PatchRenderData.js +1 -1
  189. package/views/3d/terrain/TerrainSurface.js +1 -1
  190. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +2 -2
  191. package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +1 -1
  192. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  193. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  194. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  195. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  196. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  197. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  198. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  199. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  200. package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
  201. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  202. package/views/interactive/tooltip/TransformTooltipInfos.js +1 -1
  203. package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
  204. package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
  205. package/widgets/Bookmarks/css.js +1 -1
  206. package/widgets/Bookmarks.js +1 -1
  207. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  208. package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
  209. package/widgets/Editor/EditorViewModel.js +1 -1
  210. package/widgets/Editor/Upload.js +5 -0
  211. package/widgets/Editor/UploadState.js +4 -0
  212. package/widgets/Editor/workflowUtils.js +1 -1
  213. package/widgets/Editor.js +1 -1
  214. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  215. package/widgets/FeatureForm/{InputField.js → FieldInput.js} +1 -1
  216. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  217. package/widgets/FeatureForm/GroupInput.js +5 -0
  218. package/widgets/FeatureForm/css.js +1 -1
  219. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  220. package/widgets/FeatureForm.js +1 -1
  221. package/widgets/FeatureTable/FieldColumn.js +1 -1
  222. package/widgets/FeatureTemplates/ItemList.js +1 -1
  223. package/widgets/FeatureTemplates/TemplateItem.js +1 -1
  224. package/widgets/FeatureTemplates.js +1 -1
  225. package/widgets/Fullscreen/FullscreenViewModel.js +1 -1
  226. package/widgets/LayerList/LayerListViewModel.js +1 -1
  227. package/widgets/LayerList.js +1 -1
  228. package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
  229. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  230. package/assets/esri/core/workers/chunks/009348f65fab440f7752.js +0 -1
  231. package/assets/esri/core/workers/chunks/075ecd53fb229dfee53c.js +0 -1
  232. package/assets/esri/core/workers/chunks/1c77b92063ee36421914.js +0 -1
  233. package/assets/esri/core/workers/chunks/1ee774c3f29d8074da12.js +0 -1
  234. package/assets/esri/core/workers/chunks/262b6de5a29c713b4010.js +0 -1
  235. package/assets/esri/core/workers/chunks/281c0f936b5645a673ab.js +0 -1
  236. package/assets/esri/core/workers/chunks/2883a59fc1fc9e4d71af.js +0 -1
  237. package/assets/esri/core/workers/chunks/2e032a58ac6717313227.js +0 -1
  238. package/assets/esri/core/workers/chunks/4d4cbfe72835c0460b09.js +0 -1
  239. package/assets/esri/core/workers/chunks/5504dff4113dd74d2fa7.js +0 -1
  240. package/assets/esri/core/workers/chunks/5bded2588008117d0c35.js +0 -1
  241. package/assets/esri/core/workers/chunks/6caf8a0b49bd01906f32.js +0 -1
  242. package/assets/esri/core/workers/chunks/9cab04c71d8bccf0156d.js +0 -1
  243. package/assets/esri/core/workers/chunks/9f02a0670ad73718d8f9.js +0 -1
  244. package/assets/esri/core/workers/chunks/a265e454461edb306e2d.js +0 -1
  245. package/assets/esri/core/workers/chunks/a50ca44a62434bf18664.js +0 -1
  246. package/assets/esri/core/workers/chunks/bd090f9ec6cfe08e19a3.js +0 -1
  247. package/assets/esri/core/workers/chunks/c3338bdce8368731c4e9.js +0 -1
  248. package/assets/esri/core/workers/chunks/c54df59b2b3f73828a44.js +0 -1
  249. package/assets/esri/core/workers/chunks/ddebf3b5a131a6da5419.js +0 -1
  250. package/assets/esri/core/workers/chunks/de461c30aa24ec8bb212.js +0 -1
  251. package/assets/esri/core/workers/chunks/e23f56bee694a38da5b9.js +0 -1
  252. package/assets/esri/core/workers/chunks/ec73d16ef169adfc34fb.js +0 -1
  253. package/assets/esri/core/workers/chunks/ef884e2833868234c13c.js +0 -1
  254. package/assets/esri/core/workers/chunks/f3c99525fb1b0f719fe0.js +0 -1
  255. package/assets/esri/core/workers/chunks/fe314feede84dd688010.js +0 -1
  256. package/assets/esri/core/workers/chunks/ff15557dc7b74162ed75.js +0 -1
  257. package/assets/esri/widgets/Directions/t9n/Printout.json +0 -1
  258. package/assets/esri/widgets/Directions/t9n/Printout_ar.json +0 -1
  259. package/assets/esri/widgets/Directions/t9n/Printout_bg.json +0 -1
  260. package/assets/esri/widgets/Directions/t9n/Printout_bs.json +0 -1
  261. package/assets/esri/widgets/Directions/t9n/Printout_ca.json +0 -1
  262. package/assets/esri/widgets/Directions/t9n/Printout_cs.json +0 -1
  263. package/assets/esri/widgets/Directions/t9n/Printout_da.json +0 -1
  264. package/assets/esri/widgets/Directions/t9n/Printout_de.json +0 -1
  265. package/assets/esri/widgets/Directions/t9n/Printout_el.json +0 -1
  266. package/assets/esri/widgets/Directions/t9n/Printout_en.json +0 -1
  267. package/assets/esri/widgets/Directions/t9n/Printout_es.json +0 -1
  268. package/assets/esri/widgets/Directions/t9n/Printout_et.json +0 -1
  269. package/assets/esri/widgets/Directions/t9n/Printout_fi.json +0 -1
  270. package/assets/esri/widgets/Directions/t9n/Printout_fr.json +0 -1
  271. package/assets/esri/widgets/Directions/t9n/Printout_he.json +0 -1
  272. package/assets/esri/widgets/Directions/t9n/Printout_hr.json +0 -1
  273. package/assets/esri/widgets/Directions/t9n/Printout_hu.json +0 -1
  274. package/assets/esri/widgets/Directions/t9n/Printout_id.json +0 -1
  275. package/assets/esri/widgets/Directions/t9n/Printout_it.json +0 -1
  276. package/assets/esri/widgets/Directions/t9n/Printout_ja.json +0 -1
  277. package/assets/esri/widgets/Directions/t9n/Printout_ko.json +0 -1
  278. package/assets/esri/widgets/Directions/t9n/Printout_lt.json +0 -1
  279. package/assets/esri/widgets/Directions/t9n/Printout_lv.json +0 -1
  280. package/assets/esri/widgets/Directions/t9n/Printout_nb.json +0 -1
  281. package/assets/esri/widgets/Directions/t9n/Printout_nl.json +0 -1
  282. package/assets/esri/widgets/Directions/t9n/Printout_pl.json +0 -1
  283. package/assets/esri/widgets/Directions/t9n/Printout_pt-BR.json +0 -1
  284. package/assets/esri/widgets/Directions/t9n/Printout_pt-PT.json +0 -1
  285. package/assets/esri/widgets/Directions/t9n/Printout_ro.json +0 -1
  286. package/assets/esri/widgets/Directions/t9n/Printout_ru.json +0 -1
  287. package/assets/esri/widgets/Directions/t9n/Printout_sk.json +0 -1
  288. package/assets/esri/widgets/Directions/t9n/Printout_sl.json +0 -1
  289. package/assets/esri/widgets/Directions/t9n/Printout_sr.json +0 -1
  290. package/assets/esri/widgets/Directions/t9n/Printout_sv.json +0 -1
  291. package/assets/esri/widgets/Directions/t9n/Printout_th.json +0 -1
  292. package/assets/esri/widgets/Directions/t9n/Printout_tr.json +0 -1
  293. package/assets/esri/widgets/Directions/t9n/Printout_uk.json +0 -1
  294. package/assets/esri/widgets/Directions/t9n/Printout_vi.json +0 -1
  295. package/assets/esri/widgets/Directions/t9n/Printout_zh-CN.json +0 -1
  296. package/assets/esri/widgets/Directions/t9n/Printout_zh-HK.json +0 -1
  297. package/assets/esri/widgets/Directions/t9n/Printout_zh-TW.json +0 -1
  298. package/widgets/FeatureForm/InputField.d.ts +0 -4
  299. package/widgets/FeatureForm/InputFieldGroup.d.ts +0 -4
  300. package/widgets/FeatureForm/InputFieldGroup.js +0 -5
package/interfaces.d.ts CHANGED
@@ -552,7 +552,7 @@ declare namespace __esri {
552
552
  */
553
553
  startPoint: Point;
554
554
  /**
555
- * Length dimension enables the measurement of linear distances between the specified start and ending points.
555
+ * LengthDimension enables the measurement of linear distances between the specified [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LengthDimension.html#startPoint) and [end](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LengthDimension.html#endPoint) points.
556
556
  *
557
557
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LengthDimension.html)
558
558
  */
@@ -89039,11 +89039,19 @@ declare namespace __esri {
89039
89039
  */
89040
89040
  formTemplate: FormTemplate;
89041
89041
  /**
89042
- * The input fields and/or grouped field rendered by the [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html) widget.
89042
+ * The field and/or group inputs that make up the form [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html) widget.
89043
+ *
89044
+ * @deprecated since version 4.27. Instead use {@link module:esri/widgets/FeatureFormViewModel#inputs inputs}.
89043
89045
  *
89044
89046
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html#inputFields)
89045
89047
  */
89046
- readonly inputFields: InputField[] | InputFieldGroup[];
89048
+ readonly inputFields: any[] | any[];
89049
+ /**
89050
+ * The field and/or group inputs that make up the form [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html) widget.
89051
+ *
89052
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html#inputs)
89053
+ */
89054
+ readonly inputs: any[] | any[];
89047
89055
  /**
89048
89056
  * Layer containing the editable feature attributes.
89049
89057
  *
@@ -89081,7 +89089,7 @@ declare namespace __esri {
89081
89089
  *
89082
89090
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html#findField)
89083
89091
  */
89084
- findField(fieldName: string): InputField;
89092
+ findField(fieldName: string): any;
89085
89093
  /**
89086
89094
  * Returns all of the field values, regardless of whether or not they were updated.
89087
89095
  *
@@ -89429,216 +89437,6 @@ declare namespace __esri {
89429
89437
  visibilityExpression?: string;
89430
89438
  }
89431
89439
 
89432
- export class InputField extends Accessor {
89433
- /**
89434
- * The field's description.
89435
- *
89436
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#description)
89437
- */
89438
- readonly description: string;
89439
- /**
89440
- * The input value's domain.
89441
- *
89442
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#domain)
89443
- */
89444
- readonly domain: CodedValueDomain | RangeDomain;
89445
- /**
89446
- * When true, the field can be edited.
89447
- *
89448
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#editable)
89449
- */
89450
- readonly editable: boolean;
89451
- /**
89452
- * The type of editor used when working with `string` fields.
89453
- *
89454
- * @default text-box
89455
- *
89456
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#editorType)
89457
- */
89458
- readonly editorType: "text-box" | "text-area";
89459
- /**
89460
- * If the input field's value is invalid, this property returns validation error code.
89461
- *
89462
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#error)
89463
- */
89464
- readonly error: string;
89465
- /**
89466
- * A user-friendly formatted error message based on the [validation error code](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#error).
89467
- *
89468
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#errorMessage)
89469
- */
89470
- readonly errorMessage: string;
89471
- /**
89472
- * The group this input field belongs to.
89473
- *
89474
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#group)
89475
- */
89476
- readonly group: InputFieldGroup;
89477
- /**
89478
- * A hint for the field's value.
89479
- *
89480
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#hint)
89481
- */
89482
- readonly hint: string;
89483
- /**
89484
- * For date inputs, this enables the time input part.
89485
- *
89486
- * @default {true}
89487
- *
89488
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#includeTime)
89489
- */
89490
- readonly includeTime: string;
89491
- /**
89492
- * The field's label.
89493
- *
89494
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#label)
89495
- */
89496
- readonly label: string;
89497
- /**
89498
- * Restricts the input length.
89499
- *
89500
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#maxLength)
89501
- */
89502
- readonly maxLength: number;
89503
- /**
89504
- * Restricts the input length.
89505
- *
89506
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#minLength)
89507
- */
89508
- readonly minLength: number;
89509
- /**
89510
- * The associated field name.
89511
- *
89512
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#name)
89513
- */
89514
- readonly name: string;
89515
- /**
89516
- * Indicates whether the field is required.
89517
- *
89518
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#required)
89519
- */
89520
- readonly required: boolean;
89521
- /**
89522
- * When true, this value can be submitted without _introducing_ data validation issues.
89523
- *
89524
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#submittable)
89525
- */
89526
- readonly submittable: boolean;
89527
- /**
89528
- * The type of input field.
89529
- *
89530
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#type)
89531
- */
89532
- readonly type: "number" | "text" | "date" | "unsupported";
89533
- /**
89534
- * If this `InputField` has a value defined for `valueExpression` or `editableExpression`, this property will be true whenever one or both of these expressions is currently being executed; otherwise, it will be false.
89535
- *
89536
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#updating)
89537
- */
89538
- readonly updating: boolean;
89539
- /**
89540
- * When `true`, the input value is valid.
89541
- *
89542
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#valid)
89543
- */
89544
- readonly valid: boolean;
89545
- /**
89546
- * The input's value.
89547
- *
89548
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#value)
89549
- */
89550
- readonly value: number | string | null;
89551
- /**
89552
- * When `true`, the field is displayed.
89553
- *
89554
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html#visible)
89555
- */
89556
- readonly visible: boolean;
89557
- /**
89558
- * This is a read-only support class that represents an input field.
89559
- *
89560
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputField.html)
89561
- */
89562
- constructor(properties?: InputFieldProperties);
89563
- }
89564
-
89565
- /** @deprecated Import the InputField class instead. */
89566
- export type InputFieldConstructor = typeof InputField;
89567
-
89568
- interface InputFieldProperties {
89569
- }
89570
-
89571
- export class InputFieldGroup extends Accessor {
89572
- /**
89573
- * The group's description.
89574
- *
89575
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#description)
89576
- */
89577
- description: string;
89578
- /**
89579
- * The result of `visibilityExpression`.
89580
- *
89581
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#evaluatedVisibilityExpression)
89582
- */
89583
- readonly evaluatedVisibilityExpression: boolean;
89584
- /**
89585
- * The input fields belonging to this group.
89586
- *
89587
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#inputFields)
89588
- */
89589
- readonly inputFields: InputField[];
89590
- /**
89591
- * The group's label.
89592
- *
89593
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#label)
89594
- */
89595
- readonly label: string;
89596
- state: "expanded" | "collapsed";
89597
- /**
89598
- * Arcade expression to determine whether this group is visible or not.
89599
- *
89600
- * @default null
89601
- * @deprecated Since 4.23. Use {@link esri/form/elements/GroupElement#visibilityExpression groupElement.visibilityExpression}
89602
- *
89603
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#visibilityExpression)
89604
- */
89605
- visibilityExpression: string;
89606
- /**
89607
- * The group's visibility.
89608
- *
89609
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#visible)
89610
- */
89611
- readonly visible: boolean;
89612
- /**
89613
- * This is a read-only support class that represents a group of input fields.
89614
- *
89615
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html)
89616
- */
89617
- constructor(properties?: InputFieldGroupProperties);
89618
- }
89619
-
89620
- /** @deprecated Import the InputFieldGroup class instead. */
89621
- export type InputFieldGroupConstructor = typeof InputFieldGroup;
89622
-
89623
- interface InputFieldGroupProperties {
89624
- /**
89625
- * The group's description.
89626
- *
89627
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#description)
89628
- */
89629
- description?: string;
89630
- state?: "expanded" | "collapsed";
89631
- /**
89632
- * Arcade expression to determine whether this group is visible or not.
89633
- *
89634
- * @default null
89635
- * @deprecated Since 4.23. Use {@link esri/form/elements/GroupElement#visibilityExpression groupElement.visibilityExpression}
89636
- *
89637
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#visibilityExpression)
89638
- */
89639
- visibilityExpression?: string;
89640
- }
89641
-
89642
89440
  export interface FeatureFormSubmitEvent {
89643
89441
  invalid: string[];
89644
89442
  valid: string[];
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import"../renderers/support/jsonUtils.js";import{webSceneRendererTypes as s}from"../renderers/support/types.js";import i from"../request.js";import o from"../core/Collection.js";import a from"../core/Error.js";import n from"../core/Logger.js";import{MultiOriginJSONMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as p,isAbortError as d}from"../core/promiseUtils.js";import{whenOnce as u}from"../core/reactiveUtils.js";import{join as y}from"../core/urlUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{getProperties as h}from"../core/accessorSupport/utils.js";import{reader as f}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as g}from"../core/accessorSupport/PropertyOrigin.js";import v from"./Layer.js";import{APIKeyMixin as b}from"./mixins/APIKeyMixin.js";import{ArcGISService as I}from"./mixins/ArcGISService.js";import{EditBusLayer as w}from"./mixins/EditBusLayer.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{PortalLayer as L}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{SceneService as F,SaveOperationType as O}from"./mixins/SceneService.js";import{zeroCapabilities as T}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as A,legendEnabled as P,popupEnabled as _,screenSizePerspectiveEnabled as x}from"./support/commonProperties.js";import{FeatureReduction as D}from"./support/FeatureReduction.js";import U from"./support/FeatureReductionSelection.js";import{FetchAssociatedFeatureLayer as R}from"./support/FetchAssociatedFeatureLayer.js";import{defineFieldProperties as C}from"./support/fieldProperties.js";import q from"./support/FieldsIndex.js";import{fixRendererFields as Q,unpackFieldNames as N}from"./support/fieldUtils.js";import{I3SNodePageDefinition as k,I3SMaterialDefinition as G,I3STextureSetDefinition as V,I3SGeometryDefinition as K}from"./support/I3SLayerDefinitions.js";import M from"./support/LabelClass.js";import{reader as $}from"./support/labelingInfo.js";import W from"./support/LayerFloorInfo.js";import{RangeInfo as z}from"./support/RangeInfo.js";import B from"./support/SceneFilter.js";import{loadStyleRenderer as H}from"../renderers/support/styleUtils.js";import Z from"../rest/support/Query.js";import{sceneLayerEditingEnabled as J}from"../support/featureFlags.js";import{createPopupTemplate as X}from"../support/popupUtils.js";import{queryAttributesFromCachedAttributesId as Y}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as ee,getFetchPopupTemplate as te}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as re}from"../webdoc/support/opacityUtils.js";const se=["3DObject","Point"],ie=C();let oe=class extends(w(F(I(j(L(S(l(b(v))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new o,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return null!=e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get formTemplate(){return null!=this.associatedLayer?this.associatedLayer.formTemplate:null}get fieldsIndex(){return new q(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:k.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get geometryType(){return ne[this.profile]||"mesh"}set renderer(e){Q(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:T,{query:t,editing:{supportsGlobalId:r,supportsRollbackOnFailure:s,supportsUploadWithItemId:i,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:n,supportsM:l,isVersioned:p,supportsAttachment:d},operations:{supportsEditing:u,supportsAdd:y,supportsUpdate:c,supportsDelete:h,supportsQuery:f,supportsQueryAttachments:m}}=e,g=e.operations.supportsChangeTracking,v=null!=this.associatedLayer&&null!=this.associatedLayer.infoFor3D&&J();return{query:t,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:v&&o,supportsUploadWithItemId:i},data:{supportsAttachment:d,supportsZ:n,supportsM:l,isVersioned:p},operations:{supportsQuery:f,supportsQueryAttachments:m,supportsEditing:u&&g,supportsAdd:v&&y&&g,supportsDelete:v&&h&&g,supportsUpdate:c&&g}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return null!=this.associatedLayer?this.associatedLayer.infoFor3D:null}get defaultPopupTemplate(){return null!=this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:null}readProfile(e,t){const r=t.store.profile;return null!=r&&ae[r]?ae[r]:(n.getLogger(this.declaredClass).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(p).then((()=>this._fetchService(t))).then((()=>Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),null!=this.filter?this.filter.loadGeometries(this.spatialReference):null]))).then((()=>this._validateElevationInfo())).then((()=>this._applyAssociatedLayerOverrides())).then((()=>this._populateFieldUsageInfo())).then((()=>H(this,{origin:"service"},t))).then((()=>Q(this.renderer,this.fieldsIndex))).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}async beforeSave(){null!=this.filter&&await this.load()}createQuery(){const e=new Z;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryCachedAttributes(e,t){const r=N(this.fieldsIndex,await ee(this,te(this)));return Y(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,r){const s=await this.queryCachedAttributes(e,[r]);if(!s||0===s.length)throw new a("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new t;return i.attributes=s[0],i.layer=this,i.sourceLayer=this,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this.declaredClass).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return X(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new a("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new a("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const s of this.statisticsInfo)if(s.name===r.name){const e=y(this.parsedUrl.path,s.href);return i(e,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new a("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(O.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(O.SAVE,e)}async applyEdits(e,t){const r=await import("./graphics/editingSupport.js");if(await this.load(),null==this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),r.applyEdits(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}validateLayer(e){if(e.layerType&&!se.includes(e.layerType))throw new a("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new a("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,s=!1;if(null==e)r=!0,s=!0;else{const i=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,s=i;break;case"vertex-reference-frame":r=!0,s=!i;break;default:r=!1}}if(!r)throw new a("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!s)throw new a("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new a("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!(null==this.associatedLayer||!this.associatedLayer.fields||!this.associatedLayer.fields.some((t=>t&&e.name===t.name))),s={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=s}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides()}_applyAssociatedLayerFieldsOverrides(){if(null==this.associatedLayer||!this.associatedLayer.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(null==this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=h(this);for(let r=0;r<e.length;r++){const s=e[r],i=this.originIdOf(s),o=this.associatedLayer.originIdOf(s);i<o&&(o===g.SERVICE||o===g.PORTAL_ITEM)&&t.setAtOrigin(s,this.associatedLayer[s],o)}}async _setAssociatedFeatureLayer(e){if(!["mesh-pyramids","points"].includes(this.profile))return;const t=new R(this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedLayer=await t.fetch()}catch(r){d(r)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await u((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this.declaredClass).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):n.getLogger(this.declaredClass).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;e&&("mesh-pyramids"===this.profile&&"relative-to-scene"===e.mode&&n.getLogger(this.declaredClass).warn(".elevationInfo=","Mesh scene layers don't support relative-to-scene elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&n.getLogger(this.declaredClass).warn(".elevationInfo=","Scene layers do not support featureExpressionInfo"))}};e([c({types:{key:"type",base:D,typeMap:{selection:U}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],oe.prototype,"featureReduction",void 0),e([c({type:[z],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],oe.prototype,"rangeInfos",void 0),e([c({json:{read:!1}})],oe.prototype,"associatedLayer",void 0),e([c({type:["show","hide"]})],oe.prototype,"listMode",void 0),e([c({type:["ArcGISSceneServiceLayer"]})],oe.prototype,"operationalLayerType",void 0),e([c({json:{read:!1},readOnly:!0})],oe.prototype,"type",void 0),e([c({...ie.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],oe.prototype,"fields",void 0),e([c()],oe.prototype,"types",null),e([c()],oe.prototype,"typeIdField",null),e([c()],oe.prototype,"formTemplate",null),e([c({readOnly:!0})],oe.prototype,"fieldsIndex",null),e([c({type:W,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],oe.prototype,"floorInfo",void 0),e([c(ie.outFields)],oe.prototype,"outFields",void 0),e([c({type:k,readOnly:!0,json:{read:!1}})],oe.prototype,"nodePages",void 0),e([f("service","nodePages",["nodePages","pointNodePages"])],oe.prototype,"readNodePages",null),e([c({type:[G],readOnly:!0})],oe.prototype,"materialDefinitions",void 0),e([c({type:[V],readOnly:!0})],oe.prototype,"textureSetDefinitions",void 0),e([c({type:[K],readOnly:!0})],oe.prototype,"geometryDefinitions",void 0),e([c({readOnly:!0})],oe.prototype,"serviceUpdateTimeStamp",void 0),e([c({readOnly:!0})],oe.prototype,"attributeStorageInfo",void 0),e([c({readOnly:!0})],oe.prototype,"statisticsInfo",void 0),e([c({type:o.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],oe.prototype,"excludeObjectIds",void 0),e([c({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],oe.prototype,"definitionExpression",void 0),e([c({type:B,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],oe.prototype,"filter",void 0),e([c({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],oe.prototype,"path",void 0),e([c(E)],oe.prototype,"elevationInfo",null),e([c({type:String})],oe.prototype,"geometryType",null),e([c(A)],oe.prototype,"labelsVisible",void 0),e([c({type:[M],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:$},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:$},write:!0}})],oe.prototype,"labelingInfo",void 0),e([c(P)],oe.prototype,"legendEnabled",void 0),e([c({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?re(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],oe.prototype,"opacity",void 0),e([c({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],oe.prototype,"priority",void 0),e([c({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],oe.prototype,"semantic",void 0),e([c({types:s,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],oe.prototype,"renderer",null),e([c({json:{read:!1}})],oe.prototype,"cachedDrawingInfo",void 0),e([f("service","cachedDrawingInfo")],oe.prototype,"readCachedDrawingInfo",null),e([c({readOnly:!0,json:{read:!1}})],oe.prototype,"capabilities",null),e([c({type:Boolean,json:{read:!1}})],oe.prototype,"editingEnabled",null),e([c({readOnly:!0,json:{write:!1,read:!1}})],oe.prototype,"infoFor3D",null),e([c(_)],oe.prototype,"popupEnabled",void 0),e([c({type:r,json:{name:"popupInfo",write:!0}})],oe.prototype,"popupTemplate",void 0),e([c({readOnly:!0,json:{read:!1}})],oe.prototype,"defaultPopupTemplate",null),e([c({type:String,json:{read:!1}})],oe.prototype,"objectIdField",void 0),e([f("service","objectIdField",["objectIdField","fields"])],oe.prototype,"readObjectIdField",null),e([c({type:String,json:{read:!1}})],oe.prototype,"globalIdField",void 0),e([f("service","globalIdField",["globalIdField","fields"])],oe.prototype,"readGlobalIdField",null),e([c({readOnly:!0,type:String,json:{read:!1}})],oe.prototype,"displayField",null),e([c({type:String,json:{read:!1}})],oe.prototype,"profile",void 0),e([f("service","profile",["store.profile"])],oe.prototype,"readProfile",null),e([c({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],oe.prototype,"normalReferenceFrame",void 0),e([c(x)],oe.prototype,"screenSizePerspectiveEnabled",void 0),oe=e([m("esri.layers.SceneLayer")],oe);const ae={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},ne={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},le=oe;export{le as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import"../renderers/support/jsonUtils.js";import{webSceneRendererTypes as s}from"../renderers/support/types.js";import o from"../request.js";import i from"../core/Collection.js";import a from"../core/Error.js";import n from"../core/Logger.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as l,isAbortError as d}from"../core/promiseUtils.js";import{whenOnce as u}from"../core/reactiveUtils.js";import{join as y}from"../core/urlUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{getProperties as f}from"../core/accessorSupport/utils.js";import{reader as h}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as g}from"../core/accessorSupport/PropertyOrigin.js";import v from"./Layer.js";import{APIKeyMixin as b}from"./mixins/APIKeyMixin.js";import{ArcGISService as I}from"./mixins/ArcGISService.js";import{EditBusLayer as w}from"./mixins/EditBusLayer.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{PortalLayer as L}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{SceneService as F,SaveOperationType as O}from"./mixins/SceneService.js";import{zeroCapabilities as T}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as A,legendEnabled as P,popupEnabled as _,screenSizePerspectiveEnabled as x}from"./support/commonProperties.js";import{FeatureReduction as D}from"./support/FeatureReduction.js";import U from"./support/FeatureReductionSelection.js";import{FetchAssociatedFeatureLayer as R}from"./support/FetchAssociatedFeatureLayer.js";import{defineFieldProperties as C}from"./support/fieldProperties.js";import q from"./support/FieldsIndex.js";import{fixRendererFields as Q,unpackFieldNames as N}from"./support/fieldUtils.js";import{I3SNodePageDefinition as k,I3SMaterialDefinition as G,I3STextureSetDefinition as V,I3SGeometryDefinition as K}from"./support/I3SLayerDefinitions.js";import M from"./support/LabelClass.js";import{reader as $}from"./support/labelingInfo.js";import W from"./support/LayerFloorInfo.js";import{RangeInfo as z}from"./support/RangeInfo.js";import B from"./support/SceneFilter.js";import{loadStyleRenderer as H}from"../renderers/support/styleUtils.js";import Z from"../rest/support/Query.js";import{sceneLayerEditingEnabled as J}from"../support/featureFlags.js";import{createPopupTemplate as X}from"../support/popupUtils.js";import{queryAttributesFromCachedAttributesId as Y}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as ee,getFetchPopupTemplate as te}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as re}from"../webdoc/support/opacityUtils.js";const se=["3DObject","Point"],oe=C();let ie=class extends(w(F(I(j(L(S(p(b(v))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new i,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new q(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:k.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get geometryType(){return ne[this.profile]||"mesh"}set renderer(e){Q(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){const e=this.associatedLayer?.capabilities??T,{query:t,editing:{supportsGlobalId:r,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:i,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:n,supportsM:p,isVersioned:l,supportsAttachment:d},operations:{supportsEditing:u,supportsAdd:y,supportsUpdate:c,supportsDelete:f,supportsQuery:h,supportsQueryAttachments:m}}=e,g=e.operations.supportsChangeTracking,v=!!this.associatedLayer?.infoFor3D&&J();return{query:t,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:v&&i,supportsUploadWithItemId:o},data:{supportsAttachment:d,supportsZ:n,supportsM:p,isVersioned:l},operations:{supportsQuery:h,supportsQueryAttachments:m,supportsEditing:u&&g,supportsAdd:v&&y&&g,supportsDelete:v&&f&&g,supportsUpdate:c&&g}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&ae[r]?ae[r]:(n.getLogger(this.declaredClass).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l).then((()=>this._fetchService(t))).then((()=>Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),null!=this.filter?this.filter.loadGeometries(this.spatialReference):null]))).then((()=>this._validateElevationInfo())).then((()=>this._applyAssociatedLayerOverrides())).then((()=>this._populateFieldUsageInfo())).then((()=>H(this,{origin:"service"},t))).then((()=>Q(this.renderer,this.fieldsIndex))).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}async beforeSave(){null!=this.filter&&await this.load()}createQuery(){const e=new Z;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryCachedAttributes(e,t){const r=N(this.fieldsIndex,await ee(this,te(this)));return Y(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,r){const s=await this.queryCachedAttributes(e,[r]);if(!s||0===s.length)throw new a("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const o=new t;return o.attributes=s[0],o.layer=this,o.sourceLayer=this,o}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this.declaredClass).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return X(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new a("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new a("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const s of this.statisticsInfo)if(s.name===r.name){const e=y(this.parsedUrl.path,s.href);return o(e,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new a("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(O.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(O.SAVE,e)}async applyEdits(e,t){const r=await import("./graphics/editingSupport.js");if(await this.load(),!this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),r.applyEdits(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}validateLayer(e){if(e.layerType&&!se.includes(e.layerType))throw new a("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new a("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,s=!1;if(null==e)r=!0,s=!0;else{const o=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,s=o;break;case"vertex-reference-frame":r=!0,s=!o;break;default:r=!1}}if(!r)throw new a("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!s)throw new a("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new a("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),s={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=s}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=f(this);for(let r=0;r<e.length;r++){const s=e[r],o=this.originIdOf(s),i=this.associatedLayer.originIdOf(s);o<i&&(i===g.SERVICE||i===g.PORTAL_ITEM)&&t.setAtOrigin(s,this.associatedLayer[s],i)}}async _setAssociatedFeatureLayer(e){if(!["mesh-pyramids","points"].includes(this.profile))return;const t=new R(this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedLayer=await t.fetch()}catch(r){d(r)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await u((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this.declaredClass).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):n.getLogger(this.declaredClass).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;e&&("mesh-pyramids"===this.profile&&"relative-to-scene"===e.mode&&n.getLogger(this.declaredClass).warn(".elevationInfo=","Mesh scene layers don't support relative-to-scene elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&n.getLogger(this.declaredClass).warn(".elevationInfo=","Scene layers do not support featureExpressionInfo"))}};e([c({types:{key:"type",base:D,typeMap:{selection:U}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],ie.prototype,"featureReduction",void 0),e([c({type:[z],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],ie.prototype,"rangeInfos",void 0),e([c({json:{read:!1}})],ie.prototype,"associatedLayer",void 0),e([c({type:["show","hide"]})],ie.prototype,"listMode",void 0),e([c({type:["ArcGISSceneServiceLayer"]})],ie.prototype,"operationalLayerType",void 0),e([c({json:{read:!1},readOnly:!0})],ie.prototype,"type",void 0),e([c({...oe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ie.prototype,"fields",void 0),e([c()],ie.prototype,"types",null),e([c()],ie.prototype,"typeIdField",null),e([c()],ie.prototype,"templates",null),e([c()],ie.prototype,"formTemplate",null),e([c({readOnly:!0})],ie.prototype,"fieldsIndex",null),e([c({type:W,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],ie.prototype,"floorInfo",void 0),e([c(oe.outFields)],ie.prototype,"outFields",void 0),e([c({type:k,readOnly:!0,json:{read:!1}})],ie.prototype,"nodePages",void 0),e([h("service","nodePages",["nodePages","pointNodePages"])],ie.prototype,"readNodePages",null),e([c({type:[G],readOnly:!0})],ie.prototype,"materialDefinitions",void 0),e([c({type:[V],readOnly:!0})],ie.prototype,"textureSetDefinitions",void 0),e([c({type:[K],readOnly:!0})],ie.prototype,"geometryDefinitions",void 0),e([c({readOnly:!0})],ie.prototype,"serviceUpdateTimeStamp",void 0),e([c({readOnly:!0})],ie.prototype,"attributeStorageInfo",void 0),e([c({readOnly:!0})],ie.prototype,"statisticsInfo",void 0),e([c({type:i.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],ie.prototype,"excludeObjectIds",void 0),e([c({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ie.prototype,"definitionExpression",void 0),e([c({type:B,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],ie.prototype,"filter",void 0),e([c({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ie.prototype,"path",void 0),e([c(E)],ie.prototype,"elevationInfo",null),e([c({type:String})],ie.prototype,"geometryType",null),e([c(A)],ie.prototype,"labelsVisible",void 0),e([c({type:[M],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:$},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:$},write:!0}})],ie.prototype,"labelingInfo",void 0),e([c(P)],ie.prototype,"legendEnabled",void 0),e([c({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?re(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],ie.prototype,"opacity",void 0),e([c({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ie.prototype,"priority",void 0),e([c({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ie.prototype,"semantic",void 0),e([c({types:s,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],ie.prototype,"renderer",null),e([c({json:{read:!1}})],ie.prototype,"cachedDrawingInfo",void 0),e([h("service","cachedDrawingInfo")],ie.prototype,"readCachedDrawingInfo",null),e([c({readOnly:!0,json:{read:!1}})],ie.prototype,"capabilities",null),e([c({type:Boolean,json:{read:!1}})],ie.prototype,"editingEnabled",null),e([c({readOnly:!0,json:{write:!1,read:!1}})],ie.prototype,"infoFor3D",null),e([c(_)],ie.prototype,"popupEnabled",void 0),e([c({type:r,json:{name:"popupInfo",write:!0}})],ie.prototype,"popupTemplate",void 0),e([c({readOnly:!0,json:{read:!1}})],ie.prototype,"defaultPopupTemplate",null),e([c({type:String,json:{read:!1}})],ie.prototype,"objectIdField",void 0),e([h("service","objectIdField",["objectIdField","fields"])],ie.prototype,"readObjectIdField",null),e([c({type:String,json:{read:!1}})],ie.prototype,"globalIdField",void 0),e([h("service","globalIdField",["globalIdField","fields"])],ie.prototype,"readGlobalIdField",null),e([c({readOnly:!0,type:String,json:{read:!1}})],ie.prototype,"displayField",null),e([c({type:String,json:{read:!1}})],ie.prototype,"profile",void 0),e([h("service","profile",["store.profile"])],ie.prototype,"readProfile",null),e([c({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],ie.prototype,"normalReferenceFrame",void 0),e([c(x)],ie.prototype,"screenSizePerspectiveEnabled",void 0),ie=e([m("esri.layers.SceneLayer")],ie);const ae={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},ne={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},pe=ie;export{pe as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import"../../../core/has.js";import s from"../../../core/Error.js";import a from"../../../core/Handles.js";import{clone as l}from"../../../core/lang.js";import n from"../../../core/Logger.js";import{destroyMaybe as o,removeMaybe as h,abortMaybe as c}from"../../../core/maybe.js";import{EsriPromiseMixin as u}from"../../../core/Promise.js";import{createAbortError as d,isAbortError as m,eachAlways as p}from"../../../core/promiseUtils.js";import{initial as _,whenOnce as f,watch as y,syncAndInitial as g,sync as x}from"../../../core/reactiveUtils.js";import{property as F}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as v}from"../../../core/accessorSupport/decorators/subclass.js";import{WatchUpdatingTracking as T}from"../../../core/support/WatchUpdatingTracking.js";import{isHostedAgolService as E}from"../../support/arcgisLayerUrl.js";import{getEffectiveLayerCapabilities as w}from"../../support/layerUtils.js";import{projectGeometry as C}from"../../../portal/support/geometryServiceUtils.js";import D from"../../../rest/support/StatisticDefinition.js";import{FeatureTileFetcher3D as b}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as S}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import O from"../../../views/3d/support/debugFlags.js";let I=class extends(u(t)){set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void n.getLogger(this.declaredClass).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(null!=this._tileFetcher&&this._tileFetcher.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles&&this.layerView.view.featureTiles.updating||this._watchUpdatingTracking&&this._watchUpdatingTracking.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return null!=this._tileFetcher?this._tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get maximumNumberOfFeatures(){return null!=this.displayFeatureLimit?this.displayFeatureLimit.maximumNumberOfFeatures:0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if(!1===this.layerView.view.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===P.NO_SERVICE_DATA_COUNT||this.vertexLimitExceeded)return"tiles";const t=this.layerView.view,i=t&&t.featureTiles,r=i&&i.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&r){const t=this._approximateExtentSizeAtScale(e.minScale,r);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>P.MAX_SNAPSHOT_MIN_SCALE_FACTOR)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&null!=this._tileFetcher&&this._tileFetcher.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){return"snapshot"===this.mode?new r([{id:"dummy-tile-full-extent",lij:[0,0,0]}]):this.layerView.view.featureTiles?this.layerView.view.featureTiles.tiles:new r}get test(){return{fetchDataInfoPromise:this._fetchDataInfoPromise,tileFetcher:this._tileFetcher}}constructor(e){super(e),this.type="feature-tile-3d",this._watchUpdatingTracking=new T,this.serviceDataExtent=null,this.serviceDataCount=P.NO_SERVICE_DATA_COUNT,this.vertexLimitExceeded=!1,this.displayFeatureLimit=null,this._suspended=!1,this._tileFetcher=null,this._handles=new a,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._watchUpdatingTracking.add((()=>this.vertexLimitInfo),(()=>this._watchUpdatingTracking.addPromise(this._updateVertexLimitExceeded(null,this._lifeCycleAbortController.signal)))),this._watchUpdatingTracking.add((()=>this.mode),(()=>this._modeChanged()),_),this.addResolvingPromise(Promise.resolve().then((()=>this._verifyCapabilities())).then((()=>this._watchUpdatingTracking.addPromise(this._fetchServiceDataInfo()))).then((()=>this._initializeTileFetcher())))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!w(e)?.operations.supportsQuery)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=o(this._tileFetcher),this._handles=o(this._handles),this._tilesHandle=h(this._tilesHandle),this._lifeCycleAbortController=c(this._lifeCycleAbortController),this._watchUpdatingTracking.destroy(),this._set("_watchUpdatingTracking",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._watchUpdatingTracking.addPromise(this._fetchServiceDataInfo().then(e,e))}refetch(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.refetch()};this._watchUpdatingTracking.addPromise(this._fetchServiceDataInfo().then(e,e))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const t=f((()=>e.featureTiles?.tilingScheme),this._lifeCycleAbortController.signal);this._watchUpdatingTracking.addPromise(t),t.then((()=>{const{layerView:t,tileDescriptors:i}=this,r=t.layer,s=new b({context:this.context,filterExtent:this.extent,tileDescriptors:i,features:this.graphics});this._tileFetcher=s,this._suspended?this._tileFetcher.suspend():this._tileFetcher.resume();const a=this.layerView.view.resourceController;a&&this._handles.add(y((()=>a.memoryController.memoryFactor),(e=>s.memoryFactor=e),g));const l="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;l&&this._handles.add(y((()=>this.layerView.view?.qualitySettings?.graphics3D?.[l]),(e=>s.lodFactor=e||1),_));const n=e=>{s.maximumNumberOfFeatures=e,s.useTileCount=this.serviceDataCount>e},o=e=>s.useTileCount=e>this.maximumNumberOfFeatures;"ogc-feature"!==r.type&&this._watchUpdatingTracking.add((()=>r.createQueryVersion),(()=>this._dataFilterChanged())),this._watchUpdatingTracking.add((()=>t.availableFields),((e,t)=>this._availableFieldsChanged(t,e))),this._watchUpdatingTracking.add((()=>t.requiredFields),((e,t)=>this._requiredFieldsChanged(t,e))),this._handles.add([r.on("apply-edits",(e=>this._applyEdits(e))),y((()=>this.extent),(e=>s.filterExtent=e),x),y((()=>this.tileDescriptors),(e=>s.tileDescriptors=e),x),y((()=>this.maximumNumberOfFeatures),n,g),y((()=>this.serviceDataCount),o,g),y((()=>O.FEATURE_TILE_FETCH_SHOW_TILES),(t=>{t&&s&&!s.debugger?(s.debugger=new S(s,e.featureTiles.tilingScheme.toTileInfo(),e),s.debugger.update()):!t&&this._tileFetcher&&s.debugger&&(s.debugger.destroy(),s.debugger=null)}),g)]),this._supportsExceedsLimitQuery||this._watchUpdatingTracking.add((()=>this.maxTotalSnapshotVertices),(()=>this._watchUpdatingTracking.addPromise(this._updateVertexLimitExceeded(null,this._lifeCycleAbortController.signal))))})).catch((()=>{}))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.featureTiles.addClient());break;default:n.getLogger(this.declaredClass).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this.refetch()}_applyEdits(e){null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then((e=>{if(e){if(!this._lifeCycleAbortController)throw d();(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._watchUpdatingTracking.addPromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}})).catch((e=>{if(!m(e))throw e}))}_availableFieldsChanged(e,t){null!=this._tileFetcher&&L(this._tileFetcher.availableFields,t)&&this.refetch()}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&L(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.outStatistics=[new D({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=e.createQuery();return t.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(t.cacheHint=!0),t}_fullExtentIsAccurate(){const e=this.layerView.layer;if(e.definitionExpression)return!1;switch(e.type){case"feature":case"oriented-imagery":return E(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){m(t)||this._set("serviceDataExtent",l(this.layerView.fullExtentInLocalViewSpatialReference))}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities?.query.supportsExtent??!1,s=l(t.fullExtentInLocalViewSpatialReference),a=i.fullExtent,n=this._fullExtentIsAccurate(),o=this.serviceDataCount;if(r&&o<=P.MAX_FEATURE_COUNT_FOR_EXTENT&&(!s||!n)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:P.QUERY_EXTENT_TIMEOUT,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(null!=a){const r="portalItem"in i?i.portalItem:null,s=await C(a,t.view.spatialReference,r,e);this._set("serviceDataExtent",s)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t))return void this._set("serviceDataCount",P.NO_SERVICE_DATA_COUNT);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:P.QUERY_STATISTICS_TIMEOUT,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(m(r.error))throw r.error;this._set("serviceDataCount",P.NO_SERVICE_DATA_COUNT)}}get vertexLimitInfo(){if(null==this.displayFeatureLimit||null==this.displayFeatureLimit.averageSymbolComplexity)return null;const{averageSymbolComplexity:e,maximumTotalNumberOfPrimitives:t}=this.displayFeatureLimit,{primitivesPerCoordinate:i,primitivesPerFeature:r}=e,s=this._get("vertexLimitInfo");return null==s||s.maximumTotalNumberOfPrimitives!==t||s.primitivesPerCoordinate!==i||s.primitivesPerFeature!==r?{primitivesPerCoordinate:i,primitivesPerFeature:r,maximumTotalNumberOfPrimitives:t}:s}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateVertexLimitExceeded(e,t){const r=this.vertexLimitInfo;if(null==r)return void this._set("vertexLimitExceeded",!1);const s=r.primitivesPerFeature<=0,a=this._minimumNumberOfVerticesForGeometry>1;if(!s&&!a)return void this._set("vertexLimitExceeded",!1);const{primitivesPerFeature:l,primitivesPerCoordinate:n,maximumTotalNumberOfPrimitives:o}=r;let h;0!==l&&null!=e&&await e;const c=this.serviceDataCount,u=c!==P.NO_SERVICE_DATA_COUNT;if(h=u?Math.ceil((o-c*l)/(n||1)):Math.ceil(o/(n||1)),a&&(h=Math.min(h,N)),u&&this._minimumNumberOfVerticesForGeometry*c>h)return void this._set("vertexLimitExceeded",!0);if(!this._supportsExceedsLimitQuery)return void this._set("vertexLimitExceeded",this.maxTotalSnapshotVertices>h);const d=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(h),{timeout:P.QUERY_STATISTICS_TIMEOUT,signal:t}));if(!1===d.ok){if(m(d.error))throw d.error;return void this._set("vertexLimitExceeded",!1)}const p=d.value.features[0];p&&p.attributes?this._set("vertexLimitExceeded",!!p.attributes.exceedslimit):this._set("vertexLimitExceeded",!1)}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo();let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=p([i,this._updateVertexLimitExceeded(i,t)]),s=r.then((()=>this._updateServiceDataExtent(t))).catch((e=>{m(e)||n.getLogger(this.declaredClass).error("#fetchServiceDataInfo()",e)})).then((()=>{s===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null}));return e&&(this._fetchDataInfoPromise=s),this._fetchDataInfoAbortController=e,r.then((()=>{}),(()=>{}))}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get debug(){return{storedFeatures:null!=this._tileFetcher?this._tileFetcher.storedFeatures:0,totalFeatures:null!=this._tileFetcher?this._tileFetcher.totalFeatures:0,totalVertices:null!=this._tileFetcher?this._tileFetcher.totalVertices:0,missingTiles:null!=this._tileFetcher?this._tileFetcher.missingTiles:0}}};e([F({readOnly:!0})],I.prototype,"type",void 0),e([F({constructOnly:!0})],I.prototype,"graphics",void 0),e([F({constructOnly:!0})],I.prototype,"layerView",void 0),e([F({constructOnly:!0})],I.prototype,"context",void 0),e([F()],I.prototype,"extent",null),e([F()],I.prototype,"updating",null),e([F({readOnly:!0})],I.prototype,"_watchUpdatingTracking",void 0),e([F()],I.prototype,"updatingTotal",null),e([F()],I.prototype,"updatingRemaining",null),e([F()],I.prototype,"expectedFeatureDiff",null),e([F()],I.prototype,"memoryForUnusedFeatures",null),e([F()],I.prototype,"maximumNumberOfFeaturesExceeded",null),e([F({readOnly:!0})],I.prototype,"serviceDataExtent",void 0),e([F({readOnly:!0})],I.prototype,"serviceDataCount",void 0),e([F({readOnly:!0})],I.prototype,"vertexLimitExceeded",void 0),e([F()],I.prototype,"displayFeatureLimit",void 0),e([F({type:Number})],I.prototype,"maximumNumberOfFeatures",null),e([F({readOnly:!0})],I.prototype,"mode",null),e([F({readOnly:!0})],I.prototype,"maxTotalSnapshotVertices",null),e([F({readOnly:!0,dependsOn:["mode"]})],I.prototype,"tileDescriptors",null),e([F()],I.prototype,"_tileFetcher",void 0),e([F()],I.prototype,"_fetchDataInfoPromise",void 0),e([F({readOnly:!0})],I.prototype,"vertexLimitInfo",null),I=e([v("esri.layers.graphics.controllers.FeatureTileController3D")],I);const V=1e4,U=12e3,A=1e4,N=5e6;function L(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}var P;!function(e){function t(){e.MAX_FEATURE_COUNT_FOR_EXTENT=V,e.QUERY_STATISTICS_TIMEOUT=U,e.QUERY_EXTENT_TIMEOUT=A}e.NO_SERVICE_DATA_COUNT=1/0,e.MAX_SNAPSHOT_MIN_SCALE_FACTOR=5,e.reset=t}(P||(P={})),P.reset();export{I as FeatureTileController3D,P as FeatureTileController3DConstants};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import"../../../core/has.js";import s from"../../../core/Error.js";import a from"../../../core/Handles.js";import{clone as l}from"../../../core/lang.js";import n from"../../../core/Logger.js";import{destroyMaybe as o,removeMaybe as h,abortMaybe as c}from"../../../core/maybe.js";import{EsriPromiseMixin as u}from"../../../core/Promise.js";import{createAbortError as d,isAbortError as m,eachAlways as p}from"../../../core/promiseUtils.js";import{initial as _,whenOnce as f,watch as y,syncAndInitial as g,sync as x}from"../../../core/reactiveUtils.js";import{property as F}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as v}from"../../../core/accessorSupport/decorators/subclass.js";import{WatchUpdatingTracking as T}from"../../../core/support/WatchUpdatingTracking.js";import{isHostedAgolService as E}from"../../support/arcgisLayerUrl.js";import{getEffectiveLayerCapabilities as w}from"../../support/layerUtils.js";import{projectGeometry as C}from"../../../portal/support/geometryServiceUtils.js";import D from"../../../rest/support/StatisticDefinition.js";import{FeatureTileFetcher3D as b}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as S}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import O from"../../../views/3d/support/debugFlags.js";let I=class extends(u(t)){set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void n.getLogger(this.declaredClass).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(null!=this._tileFetcher&&this._tileFetcher.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles&&this.layerView.view.featureTiles.updating||this._watchUpdatingTracking&&this._watchUpdatingTracking.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return null!=this._tileFetcher?this._tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get maximumNumberOfFeatures(){return null!=this.displayFeatureLimit?this.displayFeatureLimit.maximumNumberOfFeatures:0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if(!1===this.layerView.view.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===P.NO_SERVICE_DATA_COUNT||this.vertexLimitExceeded)return"tiles";const t=this.layerView.view,i=t&&t.featureTiles,r=i&&i.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&r){const t=this._approximateExtentSizeAtScale(e.minScale,r);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>P.MAX_SNAPSHOT_MIN_SCALE_FACTOR)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&null!=this._tileFetcher&&this._tileFetcher.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){return"snapshot"===this.mode?new r([{id:"dummy-tile-full-extent",lij:[0,0,0]}]):this.layerView.view.featureTiles?this.layerView.view.featureTiles.tiles:new r}get test(){return{fetchDataInfoPromise:this._fetchDataInfoPromise,tileFetcher:this._tileFetcher}}constructor(e){super(e),this.type="feature-tile-3d",this._watchUpdatingTracking=new T,this.serviceDataExtent=null,this.serviceDataCount=P.NO_SERVICE_DATA_COUNT,this.vertexLimitExceeded=!1,this.displayFeatureLimit=null,this._suspended=!1,this._tileFetcher=null,this._handles=new a,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._watchUpdatingTracking.add((()=>this.vertexLimitInfo),(()=>this._watchUpdatingTracking.addPromise(this._updateVertexLimitExceeded(null,this._lifeCycleAbortController.signal)))),this._watchUpdatingTracking.add((()=>this.mode),(()=>this._modeChanged()),_),this.addResolvingPromise(Promise.resolve().then((()=>this._verifyCapabilities())).then((()=>this._watchUpdatingTracking.addPromise(this._fetchServiceDataInfo()))).then((()=>this._initializeTileFetcher())))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!w(e)?.operations.supportsQuery)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=o(this._tileFetcher),this._handles=o(this._handles),this._tilesHandle=h(this._tilesHandle),this._lifeCycleAbortController=c(this._lifeCycleAbortController),this._watchUpdatingTracking.destroy(),this._set("_watchUpdatingTracking",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._watchUpdatingTracking.addPromise(this._fetchServiceDataInfo().then(e,e))}refetch(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.refetch()};this._watchUpdatingTracking.addPromise(this._fetchServiceDataInfo().then(e,e))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const t=f((()=>e.featureTiles?.tilingScheme),this._lifeCycleAbortController.signal);this._watchUpdatingTracking.addPromise(t),t.then((()=>{const{layerView:t,tileDescriptors:i}=this,r=t.layer,s=new b({context:this.context,filterExtent:this.extent,tileDescriptors:i,features:this.graphics});this._tileFetcher=s,this._suspended?this._tileFetcher.suspend():this._tileFetcher.resume();const a=this.layerView.view.resourceController;a&&this._handles.add(y((()=>a.memoryController?.memoryFactor),(e=>s.memoryFactor=e),g));const l="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;l&&this._handles.add(y((()=>this.layerView.view?.qualitySettings?.graphics3D?.[l]),(e=>s.lodFactor=e||1),_));const n=e=>{s.maximumNumberOfFeatures=e,s.useTileCount=this.serviceDataCount>e},o=e=>s.useTileCount=e>this.maximumNumberOfFeatures;"ogc-feature"!==r.type&&this._watchUpdatingTracking.add((()=>r.createQueryVersion),(()=>this._dataFilterChanged())),this._watchUpdatingTracking.add((()=>t.availableFields),((e,t)=>this._availableFieldsChanged(t,e))),this._watchUpdatingTracking.add((()=>t.requiredFields),((e,t)=>this._requiredFieldsChanged(t,e))),this._handles.add([r.on("apply-edits",(e=>this._applyEdits(e))),y((()=>this.extent),(e=>s.filterExtent=e),x),y((()=>this.tileDescriptors),(e=>s.tileDescriptors=e),x),y((()=>this.maximumNumberOfFeatures),n,g),y((()=>this.serviceDataCount),o,g),y((()=>O.FEATURE_TILE_FETCH_SHOW_TILES),(t=>{t&&s&&!s.debugger?(s.debugger=new S(s,e.featureTiles.tilingScheme.toTileInfo(),e),s.debugger.update()):!t&&this._tileFetcher&&s.debugger&&(s.debugger.destroy(),s.debugger=null)}),g)]),this._supportsExceedsLimitQuery||this._watchUpdatingTracking.add((()=>this.maxTotalSnapshotVertices),(()=>this._watchUpdatingTracking.addPromise(this._updateVertexLimitExceeded(null,this._lifeCycleAbortController.signal))))})).catch((()=>{}))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.featureTiles.addClient());break;default:n.getLogger(this.declaredClass).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this.refetch()}_applyEdits(e){null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then((e=>{if(e){if(!this._lifeCycleAbortController)throw d();(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._watchUpdatingTracking.addPromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}})).catch((e=>{if(!m(e))throw e}))}_availableFieldsChanged(e,t){null!=this._tileFetcher&&L(this._tileFetcher.availableFields,t)&&this.refetch()}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&L(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.outStatistics=[new D({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=e.createQuery();return t.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(t.cacheHint=!0),t}_fullExtentIsAccurate(){const e=this.layerView.layer;if(e.definitionExpression)return!1;switch(e.type){case"feature":case"oriented-imagery":return E(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){m(t)||this._set("serviceDataExtent",l(this.layerView.fullExtentInLocalViewSpatialReference))}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities?.query.supportsExtent??!1,s=l(t.fullExtentInLocalViewSpatialReference),a=i.fullExtent,n=this._fullExtentIsAccurate(),o=this.serviceDataCount;if(r&&o<=P.MAX_FEATURE_COUNT_FOR_EXTENT&&(!s||!n)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:P.QUERY_EXTENT_TIMEOUT,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(null!=a){const r="portalItem"in i?i.portalItem:null,s=await C(a,t.view.spatialReference,r,e);this._set("serviceDataExtent",s)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t))return void this._set("serviceDataCount",P.NO_SERVICE_DATA_COUNT);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:P.QUERY_STATISTICS_TIMEOUT,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(m(r.error))throw r.error;this._set("serviceDataCount",P.NO_SERVICE_DATA_COUNT)}}get vertexLimitInfo(){if(null==this.displayFeatureLimit||null==this.displayFeatureLimit.averageSymbolComplexity)return null;const{averageSymbolComplexity:e,maximumTotalNumberOfPrimitives:t}=this.displayFeatureLimit,{primitivesPerCoordinate:i,primitivesPerFeature:r}=e,s=this._get("vertexLimitInfo");return null==s||s.maximumTotalNumberOfPrimitives!==t||s.primitivesPerCoordinate!==i||s.primitivesPerFeature!==r?{primitivesPerCoordinate:i,primitivesPerFeature:r,maximumTotalNumberOfPrimitives:t}:s}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateVertexLimitExceeded(e,t){const r=this.vertexLimitInfo;if(null==r)return void this._set("vertexLimitExceeded",!1);const s=r.primitivesPerFeature<=0,a=this._minimumNumberOfVerticesForGeometry>1;if(!s&&!a)return void this._set("vertexLimitExceeded",!1);const{primitivesPerFeature:l,primitivesPerCoordinate:n,maximumTotalNumberOfPrimitives:o}=r;let h;0!==l&&null!=e&&await e;const c=this.serviceDataCount,u=c!==P.NO_SERVICE_DATA_COUNT;if(h=u?Math.ceil((o-c*l)/(n||1)):Math.ceil(o/(n||1)),a&&(h=Math.min(h,N)),u&&this._minimumNumberOfVerticesForGeometry*c>h)return void this._set("vertexLimitExceeded",!0);if(!this._supportsExceedsLimitQuery)return void this._set("vertexLimitExceeded",this.maxTotalSnapshotVertices>h);const d=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(h),{timeout:P.QUERY_STATISTICS_TIMEOUT,signal:t}));if(!1===d.ok){if(m(d.error))throw d.error;return void this._set("vertexLimitExceeded",!1)}const p=d.value.features[0];p&&p.attributes?this._set("vertexLimitExceeded",!!p.attributes.exceedslimit):this._set("vertexLimitExceeded",!1)}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo();let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=p([i,this._updateVertexLimitExceeded(i,t)]),s=r.then((()=>this._updateServiceDataExtent(t))).catch((e=>{m(e)||n.getLogger(this.declaredClass).error("#fetchServiceDataInfo()",e)})).then((()=>{s===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null}));return e&&(this._fetchDataInfoPromise=s),this._fetchDataInfoAbortController=e,r.then((()=>{}),(()=>{}))}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get debug(){return{storedFeatures:null!=this._tileFetcher?this._tileFetcher.storedFeatures:0,totalFeatures:null!=this._tileFetcher?this._tileFetcher.totalFeatures:0,totalVertices:null!=this._tileFetcher?this._tileFetcher.totalVertices:0,missingTiles:null!=this._tileFetcher?this._tileFetcher.missingTiles:0}}};e([F({readOnly:!0})],I.prototype,"type",void 0),e([F({constructOnly:!0})],I.prototype,"graphics",void 0),e([F({constructOnly:!0})],I.prototype,"layerView",void 0),e([F({constructOnly:!0})],I.prototype,"context",void 0),e([F()],I.prototype,"extent",null),e([F()],I.prototype,"updating",null),e([F({readOnly:!0})],I.prototype,"_watchUpdatingTracking",void 0),e([F()],I.prototype,"updatingTotal",null),e([F()],I.prototype,"updatingRemaining",null),e([F()],I.prototype,"expectedFeatureDiff",null),e([F()],I.prototype,"memoryForUnusedFeatures",null),e([F()],I.prototype,"maximumNumberOfFeaturesExceeded",null),e([F({readOnly:!0})],I.prototype,"serviceDataExtent",void 0),e([F({readOnly:!0})],I.prototype,"serviceDataCount",void 0),e([F({readOnly:!0})],I.prototype,"vertexLimitExceeded",void 0),e([F()],I.prototype,"displayFeatureLimit",void 0),e([F({type:Number})],I.prototype,"maximumNumberOfFeatures",null),e([F({readOnly:!0})],I.prototype,"mode",null),e([F({readOnly:!0})],I.prototype,"maxTotalSnapshotVertices",null),e([F({readOnly:!0,dependsOn:["mode"]})],I.prototype,"tileDescriptors",null),e([F()],I.prototype,"_tileFetcher",void 0),e([F()],I.prototype,"_fetchDataInfoPromise",void 0),e([F({readOnly:!0})],I.prototype,"vertexLimitInfo",null),I=e([v("esri.layers.graphics.controllers.FeatureTileController3D")],I);const V=1e4,U=12e3,A=1e4,N=5e6;function L(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}var P;!function(e){function t(){e.MAX_FEATURE_COUNT_FOR_EXTENT=V,e.QUERY_STATISTICS_TIMEOUT=U,e.QUERY_EXTENT_TIMEOUT=A}e.NO_SERVICE_DATA_COUNT=1/0,e.MAX_SNAPSHOT_MIN_SCALE_FACTOR=5,e.reset=t}(P||(P={})),P.reset();export{I as FeatureTileController3D,P as FeatureTileController3DConstants};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{isNumericField as e,getFieldDefaultValue as i,normalizeFieldName as t}from"./fieldUtils.js";function s(e){return"date"===e.type||"esriFieldTypeDate"===e.type}function l(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function d(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class r{constructor(i=[]){if(this.fields=[],this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!i)return;this.fields=i;const t=[];for(const r of i){const i=r?.name,u=a(r?.name);if(i&&u){const a=n(i);this._fieldsMap.set(i,r),this._fieldsMap.set(a,r),this._normalizedFieldsMap.set(u,r),t.push(a),s(r)?(this.dateFields.push(r),this._dateFieldsSet.add(r)):e(r)&&(this._numericFieldsSet.add(r),this.numericFields.push(r)),l(r)||d(r)||(r.editable=null==r.editable||!!r.editable,r.nullable=null==r.nullable||!!r.nullable)}}t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)l(e)||d(e)||e.nullable||void 0!==i(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){if(!e)return;let i=this._fieldsMap.get(e);return i||(i=this._fieldsMap.get(n(e))??this._normalizedFieldsMap.get(a(e)),i&&this._fieldsMap.set(e,i),i)}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){const i=this.get(e);if(i)return i.name??void 0}}function n(e){return e.trim().toLowerCase()}function a(e){return t(e)?.toLowerCase()??""}export{r as default};
5
+ import{isNumericField as e,getFieldDefaultValue as i,normalizeFieldName as t}from"./fieldUtils.js";function s(e){return"date"===e.type||"esriFieldTypeDate"===e.type||"date-only"===e.type||"esriFieldTypeDateOnly"===e.type||"timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type}function l(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function d(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class r{constructor(i=[]){if(this.fields=[],this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!i)return;this.fields=i;const t=[];for(const r of i){const i=r?.name,u=a(r?.name);if(i&&u){const a=n(i);this._fieldsMap.set(i,r),this._fieldsMap.set(a,r),this._normalizedFieldsMap.set(u,r),t.push(a),s(r)?(this.dateFields.push(r),this._dateFieldsSet.add(r)):e(r)&&(this._numericFieldsSet.add(r),this.numericFields.push(r)),l(r)||d(r)||(r.editable=null==r.editable||!!r.editable,r.nullable=null==r.nullable||!!r.nullable)}}t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)l(e)||d(e)||e.nullable||void 0!==i(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){if(!e)return;let i=this._fieldsMap.get(e);return i||(i=this._fieldsMap.get(n(e))??this._normalizedFieldsMap.get(a(e)),i&&this._fieldsMap.set(e,i),i)}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){const i=this.get(e);if(i)return i.name??void 0}}function n(e){return e.trim().toLowerCase()}function a(e){return t(e)?.toLowerCase()??""}export{r as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{JSONMap as e}from"../../core/jsonMap.js";const i=new e({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"});export{i as kebabDict};
5
+ import{JSONMap as e}from"../../core/jsonMap.js";const i=new e({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"});export{i as kebabDict};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{validateDomainValue as t,getDomainRange as r,DomainValidationError as l}from"./domainUtils.js";import{loadArcade as o}from"../../support/arcadeOnDemand.js";const s=/^([0-9])/,a=/[^a-z0-9_\u0080-\uffff]/gi,u=/_{2,}/g,f=/^_/,c=/_$/;function d(e){if(null==e)return null;return e.trim().replace(a,"_").replace(u,"_").replace(f,"").replace(c,"").replace(s,"F$1")||null}const m=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],p=["field","normalizationField"];function y(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(g(m,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)g(p,e,n)}function g(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function F(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const I=new Set;function x(e,n){return e&&n?(I.clear(),b(I,e,n),Array.from(I).sort()):[]}function b(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)T(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function T(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function h(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map((e=>e.name)):n}function w(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=x(e,n);return t.length/e.fields.length>=i?["*"]:t}async function v(e,n,i){if(!i)return;const{arcadeUtils:t}=await o(),r=t.extractFieldNames(i,n?.fields?.map((e=>e.name)));for(const l of r)T(e,n,l)}async function A(n,i,t){if(t&&"1=1"!==t){const r=(await import("../../core/sql/WhereClause.js")).WhereClause.create(t,i);if(!r.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});b(n,i,r.fieldNames)}}function S({displayField:e,fields:n}){return e||(n&&n.length?E(n,"name-or-title")||E(n,"unique-identifier")||E(n,"type-or-category")||_(n):null)}function _(e){for(const n of e){if(!n||!n.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function E(e,n){for(const i of e)if(i&&i.valueType&&i.valueType===n)return i.name;return null}async function N(e){if(!e)return[];const n=new Set;return await $(n,e),Array.from(n).sort()}async function $(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function V(e,n,i){i.onStatisticExpression?v(e,n,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function D(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(L(e,n,r)),i.fields&&t.push(...i.fields.map((async i=>V(e,n.fieldsIndex,i)))),await Promise.all(t)}async function L(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map((i=>v(e,n.fieldsIndex,i.expression))));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(v(e,n.fieldsIndex,l.expressionInfo.expression));await Promise.all(t)}async function O(e,n,i){n&&(n.timeInfo&&null!=i&&i.timeExtent&&b(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&b(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i&&null!=i.where&&await A(e,n.fieldsIndex,i.where))}async function U(e,n,i){n&&i&&await Promise.all(i.map((i=>z(e,n,i))))}async function z(e,n,i){n&&i&&(i.valueExpression?await v(e,n.fieldsIndex,i.valueExpression):i.field&&T(e,n.fieldsIndex,i.field))}async function P(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?x(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function j(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;return n?x(e.fieldsIndex,[n&&n.creatorField,n&&n.creationDateField,n&&n.editorField,n&&n.editDateField]):[]}function k(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?x(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}async function C(e){if(!e)return[];const n=new Set;return await R(n,e),Array.from(n).sort()}async function R(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i&&i.length&&await Promise.all(i.map((n=>G(e,t,n))))}async function G(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await v(e,n,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach((i=>{T(e,n,i.slice(1,-1))}))}await A(e,n,r)}function W(e){const n=e.defaultValue;return void 0!==n&&K(e,n)?n:e.nullable?null:void 0}function q(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function M(e){return null===e||q(e)}const Y="isInteger"in Number?Number.isInteger:e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e;function J(e){return null===e||Y(e)}function X(e){return null!=e&&"string"==typeof e}function B(e){return null===e||X(e)}function H(){return!0}function K(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":i=e.nullable?J:Y;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?M:q;break;case"string":case"esriFieldTypeString":i=e.nullable?B:X;break;default:i=H}return 1===arguments.length?i:i(n)}const Q=["integer","small-integer","single","double"],Z=new Set([...Q,"esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]);function ee(e){return null!=e&&Z.has(e.type)}function ne(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function ie(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function te(e,n){return null===se(e,n)}var re,le;function oe(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function se(e,n){return null==e||e.nullable&&null===n?null:ee(e)&&!ae(e.type,Number(n))?re.OUT_OF_RANGE:K(e,n)?e.domain?t(e.domain,n):null:le.INVALID_TYPE}function ae(e,n){const i="string"==typeof e?fe(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Y(n)&&n>=t&&n<=r:n>=t&&n<=r}function ue(e){const n=r(e.domain);return n||(ee(e)?fe(e.type):void 0)}function fe(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return de;case"esriFieldTypeInteger":case"integer":return me;case"esriFieldTypeSingle":case"single":return pe;case"esriFieldTypeDouble":case"double":return ye}}function ce(e){if(!q(e))return null;if(Y(e)){if(e>=de.min&&e<=de.max)return"esriFieldTypeSmallInteger";if(e>=me.min&&e<=me.max)return"esriFieldTypeInteger"}return e>=pe.min&&e<=pe.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(re||(re={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(le||(le={}));const de={min:-32768,max:32767,isInteger:!0},me={min:-2147483648,max:2147483647,isInteger:!0},pe={min:-34e37,max:12e37,isInteger:!1},ye={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};function ge(e,n,i){switch(e){case l.INVALID_CODED_VALUE:return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case l.VALUE_OUT_OF_RANGE:return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case le.INVALID_TYPE:return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case re.OUT_OF_RANGE:{const{min:e,max:t}=fe(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function Fe(e,n){return!Ie(e,n,null)}function Ie(e,n,i){if(!n||!n.attributes||!e){if(null!=i)for(const n of e??[])i.add(n);return!0}const t=n.attributes;let r=!1;for(const l of e)if(!(l in t)){if(r=!0,null==i)break;i.add(l)}return r}async function xe(e,n){const i=new Set;for(const t of n)await v(i,e.fieldsIndex,t);return Array.from(i).sort()}function be(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((n=>e.toLowerCase().startsWith(n)))}export{re as NumericRangeValidationError,le as TypeValidationError,v as collectArcadeFieldNames,$ as collectElevationFields,D as collectFeatureReductionFields,T as collectField,b as collectFields,O as collectFilterFields,R as collectLabelingFields,U as collectOrderByInfos,L as collectPopupTemplateFields,ye as doubleRange,Fe as featureHasFields,x as fixFields,y as fixRendererFields,F as fixTimeInfoFields,S as getDisplayFieldName,N as getElevationFields,xe as getExpressionFields,j as getFeatureEditFields,k as getFeatureGeometryFields,W as getFieldDefaultValue,ue as getFieldRange,C as getLabelingFields,ce as getNumericTypeForValue,P as getTimeFields,me as integerRange,ie as isDateField,ae as isNumberInRange,ee as isNumericField,be as isRasterPixelValueField,ne as isStringField,te as isValidFieldValue,K as isValueMatchingFieldType,d as normalizeFieldName,Q as numericTypes,w as packFields,Ie as populateMissingFields,m as rendererFields,oe as sanitizeNullFieldValue,pe as singleRange,de as smallIntegerRange,h as unpackFieldNames,se as validateFieldValue,ge as validationErrorToString,p as visualVariableFields};
5
+ import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{validateDomainValue as t,getDomainRange as r,DomainValidationError as l}from"./domainUtils.js";import{loadArcade as o}from"../../support/arcadeOnDemand.js";const s=/^([0-9])/,a=/[^a-z0-9_\u0080-\uffff]/gi,u=/_{2,}/g,f=/^_/,c=/_$/;function d(e){if(null==e)return null;return e.trim().replace(a,"_").replace(u,"_").replace(f,"").replace(c,"").replace(s,"F$1")||null}const m=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],p=["field","normalizationField"];function y(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(g(m,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)g(p,e,n)}function g(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function F(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const I=new Set;function x(e,n){return e&&n?(I.clear(),b(I,e,n),Array.from(I).sort()):[]}function b(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)T(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function T(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function h(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map((e=>e.name)):n}function w(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=x(e,n);return t.length/e.fields.length>=i?["*"]:t}async function A(e,n,i){if(!i)return;const{arcadeUtils:t}=await o(),r=t.extractFieldNames(i,n?.fields?.map((e=>e.name)));for(const l of r)T(e,n,l)}async function E(n,i,t){if(t&&"1=1"!==t){const r=(await import("../../core/sql/WhereClause.js")).WhereClause.create(t,i);if(!r.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});b(n,i,r.fieldNames)}}function _({displayField:e,fields:n}){return e||(n&&n.length?N(n,"name-or-title")||N(n,"unique-identifier")||N(n,"type-or-category")||v(n):null)}function v(e){for(const n of e){if(!n||!n.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function N(e,n){for(const i of e)if(i&&i.valueType&&i.valueType===n)return i.name;return null}async function S(e){if(!e)return[];const n=new Set;return await $(n,e),Array.from(n).sort()}async function $(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function V(e,n,i){i.onStatisticExpression?A(e,n,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function D(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(L(e,n,r)),i.fields&&t.push(...i.fields.map((async i=>V(e,n.fieldsIndex,i)))),await Promise.all(t)}async function L(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map((i=>A(e,n.fieldsIndex,i.expression))));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(A(e,n.fieldsIndex,l.expressionInfo.expression));await Promise.all(t)}async function O(e,n,i){n&&(n.timeInfo&&null!=i&&i.timeExtent&&b(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&b(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i&&null!=i.where&&await E(e,n.fieldsIndex,i.where))}async function U(e,n,i){n&&i&&await Promise.all(i.map((i=>z(e,n,i))))}async function z(e,n,i){n&&i&&(i.valueExpression?await A(e,n.fieldsIndex,i.valueExpression):i.field&&T(e,n.fieldsIndex,i.field))}async function P(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?x(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function R(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;return n?x(e.fieldsIndex,[n&&n.creatorField,n&&n.creationDateField,n&&n.editorField,n&&n.editDateField]):[]}function j(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?x(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}async function G(e){if(!e)return[];const n=new Set;return await k(n,e),Array.from(n).sort()}async function k(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i&&i.length&&await Promise.all(i.map((n=>C(e,t,n))))}async function C(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await A(e,n,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach((i=>{T(e,n,i.slice(1,-1))}))}await E(e,n,r)}function M(e){const n=e.defaultValue;return void 0!==n&&K(e,n)?n:e.nullable?null:void 0}function W(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function X(e){return null===e||W(e)}const q="isInteger"in Number?Number.isInteger:e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e;function Y(e){return null===e||q(e)}function J(e){return null!=e&&"string"==typeof e}function B(e){return null===e||J(e)}function H(){return!0}function K(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":i=e.nullable?Y:q;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?X:W;break;case"string":case"esriFieldTypeString":i=e.nullable?B:J;break;default:i=H}return 1===arguments.length?i:i(n)}const Q=["integer","small-integer","single","double"],Z=new Set([...Q,"esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]);function ee(e){return null!=e&&Z.has(e.type)}function ne(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function ie(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function te(e,n){return null===se(e,n)}var re,le;function oe(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function se(e,n){return null==e||e.nullable&&null===n?null:ee(e)&&!ae(e.type,Number(n))?re.OUT_OF_RANGE:K(e,n)?e.domain?t(e.domain,n):null:le.INVALID_TYPE}function ae(e,n){const i="string"==typeof e?fe(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?q(n)&&n>=t&&n<=r:n>=t&&n<=r}function ue(e){const n=r(e.domain);return n||(ee(e)?fe(e.type):void 0)}function fe(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return de;case"esriFieldTypeInteger":case"integer":return me;case"esriFieldTypeBigInteger":case"big-integer":return pe;case"esriFieldTypeSingle":case"single":return ye;case"esriFieldTypeDouble":case"double":return ge}}function ce(e){if(!W(e))return null;if(q(e)){if(e>=de.min&&e<=de.max)return"esriFieldTypeSmallInteger";if(e>=me.min&&e<=me.max)return"esriFieldTypeInteger"}return e>=ye.min&&e<=ye.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(re||(re={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(le||(le={}));const de={min:-32768,max:32767,isInteger:!0},me={min:-2147483648,max:2147483647,isInteger:!0},pe={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0},ye={min:-34e37,max:12e37,isInteger:!1},ge={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};function Fe(e,n,i){switch(e){case l.INVALID_CODED_VALUE:return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case l.VALUE_OUT_OF_RANGE:return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case le.INVALID_TYPE:return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case re.OUT_OF_RANGE:{const{min:e,max:t}=fe(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function Ie(e,n){return!xe(e,n,null)}function xe(e,n,i){if(!n||!n.attributes||!e){if(null!=i)for(const n of e??[])i.add(n);return!0}const t=n.attributes;let r=!1;for(const l of e)if(!(l in t)){if(r=!0,null==i)break;i.add(l)}return r}async function be(e,n){const i=new Set;for(const t of n)await A(i,e.fieldsIndex,t);return Array.from(i).sort()}function Te(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((n=>e.toLowerCase().startsWith(n)))}export{re as NumericRangeValidationError,le as TypeValidationError,pe as bigIntegerRange,A as collectArcadeFieldNames,$ as collectElevationFields,D as collectFeatureReductionFields,T as collectField,b as collectFields,O as collectFilterFields,k as collectLabelingFields,U as collectOrderByInfos,L as collectPopupTemplateFields,ge as doubleRange,Ie as featureHasFields,x as fixFields,y as fixRendererFields,F as fixTimeInfoFields,_ as getDisplayFieldName,S as getElevationFields,be as getExpressionFields,R as getFeatureEditFields,j as getFeatureGeometryFields,M as getFieldDefaultValue,ue as getFieldRange,G as getLabelingFields,ce as getNumericTypeForValue,P as getTimeFields,me as integerRange,ie as isDateField,ae as isNumberInRange,ee as isNumericField,Te as isRasterPixelValueField,ne as isStringField,te as isValidFieldValue,K as isValueMatchingFieldType,d as normalizeFieldName,Q as numericTypes,w as packFields,xe as populateMissingFields,m as rendererFields,oe as sanitizeNullFieldValue,ye as singleRange,de as smallIntegerRange,h as unpackFieldNames,se as validateFieldValue,Fe as validationErrorToString,p as visualVariableFields};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- const e={degree:1,percentRise:2,adjusted:3},r={userDefined:0,NDVI:1,SAVI:2,TSAVI:3,MSAVI:4,GEMI:5,PVI:6,GVITM:7,Sultan:8,VARI:9,GNDVI:10,SR:11,NDVIRe:12,SRRe:13,MTVI2:14,RTVICore:15,CIRe:16,CIG:17,NDWI:18,EVI:19,ironOxide:20,ferrousMinerals:21,clayMinerals:22,WNDWI:23,BAI:24,NBR:25,NDBI:26,NDMI:27,NDSI:28,MNDWI:29},i={random:"Random",NDVI:"NDVI",NDVI2:"NDVI2",NDVI3:"NDVI3",elevation:"Elevation",gray:"Gray",hillshade:"Hillshade"},t={aspect:"Aspect",blackToWhite:"Black to White",blueBright:"Blue Bright",blueLightToDark:"Blue Light to Dark",blueGreenBright:"Blue-Green Bright",blueGreenLightToDark:"Blue-Green Light to Dark",brownLightToDark:"Brown Light to Dark",brownToBlueGreenDivergingRight:"Brown to Blue Green Diverging, Bright",brownToBlueGreenDiverging:"Brown to Blue Green Diverging, Dark",coefficientBias:"Coefficient Bias",coldToHotDiverging:"Cold to Hot Diverging",conditionNumber:"Condition Number",cyanToPurple:"Cyan to Purple",cyanLightToBlueDark:"Cyan-Light to Blue-Dark",distance:"Distance",elevation1:"Elevation #1",elevation2:"Elevation #2",errors:"Errors",grayLightToDark:"Gray Light to Dark",greenBright:"Green Bright",greenLightToDark:"Green Light to Dark",greenToBlue:"Green to Blue",orangeBright:"Orange Bright",orangeLightToDark:"Orange Light to Dark",partialSpectrum:"Partial Spectrum",partialSpectrum1Diverging:"Partial Spectrum 1 Diverging",partialSpectrum2Diverging:"Partial Spectrum 2 Diverging",pinkToYellowGreenDivergingBright:"Pink to YellowGreen Diverging, Bright",pinkToYellowGreenDivergingDark:"Pink to YellowGreen Diverging, Dark",precipitation:"Precipitation",prediction:"Prediction",purpleBright:"Purple Bright",purpleToGreenDivergingBright:"Purple to Green Diverging, Bright",purpleToGreenDivergingDark:"Purple to Green Diverging, Dark",purpleBlueBright:"Purple-Blue Bright",purpleBlueLightToDark:"Purple-Blue Light to Dark",purpleRedBright:"Purple-Red Bright",purpleRedLightToDark:"Purple-Red Light to Dark",redBright:"Red Bright",redLightToDark:"Red Light to Dark",redToBlueDivergingBright:"Red to Blue Diverging, Bright",redToBlueDivergingDark:"Red to Blue Diverging, Dark",redToGreen:"Red to Green",redToGreenDivergingBright:"Red to Green Diverging, Bright",redToGreenDivergingDark:"Red to Green Diverging, Dark",slope:"Slope",spectrumFullBright:"Spectrum-Full Bright",spectrumFullDark:"Spectrum-Full Dark",spectrumFullLight:"Spectrum-Full Light",surface:"Surface",temperature:"Temperature",whiteToBlack:"White to Black",yellowToDarkRed:"Yellow to Dark Red",yellowToGreenToDarkBlue:"Yellow to Green to Dark Blue",yellowToRed:"Yellow to Red",yellowGreenBright:"Yellow-Green Bright",yellowGreenLightToDark:"Yellow-Green Light to Dark"},o={bestMatch:0,fail:1},n={matchAny:0,matchAll:1},a={userDefined:-1,lineDetectionHorizontal:0,lineDetectionVertical:1,lineDetectionLeftDiagonal:2,lineDetectionRightDiagonal:3,gradientNorth:4,gradientWest:5,gradientEast:6,gradientSouth:7,gradientNorthEast:8,gradientNorthWest:9,smoothArithmeticMean:10,smoothing3x3:11,smoothing5x5:12,sharpening3x3:13,sharpening5x5:14,laplacian3x3:15,laplacian5x5:16,sobelHorizontal:17,sobelVertical:18,sharpen:19,sharpen2:20,pointSpread:21,none:255},l={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9},g={plus:1,minus:2,times:3,sqrt:4,power:5,abs:10,divide:23,exp:25,exp10:26,exp2:27,int:30,float:32,ln:35,log10:36,log2:37,mod:44,negate:45,roundDown:48,roundUp:49,square:53,floatDivide:64,floorDivide:65},D={bitwiseAnd:11,bitwiseLeftShift:12,bitwiseNot:13,bitwiseOr:14,bitwiseRightShift:15,bitwiseXOr:16,booleanAnd:17,booleanNot:18,booleanOr:19,booleanXOr:20,equalTo:24,greaterThan:28,greaterThanEqual:29,lessThan:33,lessThanEqual:34,isNull:31,notEqual:46},h={acos:6,asin:7,atan:8,atanh:9,cos:21,cosh:22,sin:51,sinh:52,tan:56,tanh:57,acosh:59,asinh:60,atan2:61},u={majority:38,max:39,mean:40,med:41,min:42,minority:43,range:47,stddev:54,sum:55,variety:58,majorityIgnoreNoData:66,maxIgnoreNoData:67,meanIgnoreNoData:68,medIgnoreNoData:69,minIgnoreNoData:70,minorityIgnoreNoData:71,rangeIgnoreNoData:72,stddevIgnoreNoData:73,sumIgnoreNoData:74,varietyIgnoreNoData:75},s={setNull:50,conditional:78},p={...g,...D,...h,...u,...s};export{r as bandIndexType,u as cellStatisticalOperation,t as colorRampName,i as colormapName,a as convolutionKernel,g as localArithmeticOperation,s as localConditionalOperation,D as localLogicalOperation,p as localOperators,h as localTrigonometricOperation,o as missingBandAction,n as noDataInterpretation,e as slopeType,l as stretchType};
5
+ const e={degree:1,percentRise:2,adjusted:3},r={standard:0,platform:1,profile:2},i={userDefined:0,NDVI:1,SAVI:2,TSAVI:3,MSAVI:4,GEMI:5,PVI:6,GVITM:7,Sultan:8,VARI:9,GNDVI:10,SR:11,NDVIRe:12,SRRe:13,MTVI2:14,RTVICore:15,CIRe:16,CIG:17,NDWI:18,EVI:19,ironOxide:20,ferrousMinerals:21,clayMinerals:22,WNDWI:23,BAI:24,NBR:25,NDBI:26,NDMI:27,NDSI:28,MNDWI:29},t={random:"Random",NDVI:"NDVI",NDVI2:"NDVI2",NDVI3:"NDVI3",elevation:"Elevation",gray:"Gray",hillshade:"Hillshade"},o={aspect:"Aspect",blackToWhite:"Black to White",blueBright:"Blue Bright",blueLightToDark:"Blue Light to Dark",blueGreenBright:"Blue-Green Bright",blueGreenLightToDark:"Blue-Green Light to Dark",brownLightToDark:"Brown Light to Dark",brownToBlueGreenDivergingRight:"Brown to Blue Green Diverging, Bright",brownToBlueGreenDiverging:"Brown to Blue Green Diverging, Dark",coefficientBias:"Coefficient Bias",coldToHotDiverging:"Cold to Hot Diverging",conditionNumber:"Condition Number",cyanToPurple:"Cyan to Purple",cyanLightToBlueDark:"Cyan-Light to Blue-Dark",distance:"Distance",elevation1:"Elevation #1",elevation2:"Elevation #2",errors:"Errors",grayLightToDark:"Gray Light to Dark",greenBright:"Green Bright",greenLightToDark:"Green Light to Dark",greenToBlue:"Green to Blue",orangeBright:"Orange Bright",orangeLightToDark:"Orange Light to Dark",partialSpectrum:"Partial Spectrum",partialSpectrum1Diverging:"Partial Spectrum 1 Diverging",partialSpectrum2Diverging:"Partial Spectrum 2 Diverging",pinkToYellowGreenDivergingBright:"Pink to YellowGreen Diverging, Bright",pinkToYellowGreenDivergingDark:"Pink to YellowGreen Diverging, Dark",precipitation:"Precipitation",prediction:"Prediction",purpleBright:"Purple Bright",purpleToGreenDivergingBright:"Purple to Green Diverging, Bright",purpleToGreenDivergingDark:"Purple to Green Diverging, Dark",purpleBlueBright:"Purple-Blue Bright",purpleBlueLightToDark:"Purple-Blue Light to Dark",purpleRedBright:"Purple-Red Bright",purpleRedLightToDark:"Purple-Red Light to Dark",redBright:"Red Bright",redLightToDark:"Red Light to Dark",redToBlueDivergingBright:"Red to Blue Diverging, Bright",redToBlueDivergingDark:"Red to Blue Diverging, Dark",redToGreen:"Red to Green",redToGreenDivergingBright:"Red to Green Diverging, Bright",redToGreenDivergingDark:"Red to Green Diverging, Dark",slope:"Slope",spectrumFullBright:"Spectrum-Full Bright",spectrumFullDark:"Spectrum-Full Dark",spectrumFullLight:"Spectrum-Full Light",surface:"Surface",temperature:"Temperature",whiteToBlack:"White to Black",yellowToDarkRed:"Yellow to Dark Red",yellowToGreenToDarkBlue:"Yellow to Green to Dark Blue",yellowToRed:"Yellow to Red",yellowGreenBright:"Yellow-Green Bright",yellowGreenLightToDark:"Yellow-Green Light to Dark"},a={bestMatch:0,fail:1},n={matchAny:0,matchAll:1},l={userDefined:-1,lineDetectionHorizontal:0,lineDetectionVertical:1,lineDetectionLeftDiagonal:2,lineDetectionRightDiagonal:3,gradientNorth:4,gradientWest:5,gradientEast:6,gradientSouth:7,gradientNorthEast:8,gradientNorthWest:9,smoothArithmeticMean:10,smoothing3x3:11,smoothing5x5:12,sharpening3x3:13,sharpening5x5:14,laplacian3x3:15,laplacian5x5:16,sobelHorizontal:17,sobelVertical:18,sharpen:19,sharpen2:20,pointSpread:21,none:255},g={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9},D={plus:1,minus:2,times:3,sqrt:4,power:5,abs:10,divide:23,exp:25,exp10:26,exp2:27,int:30,float:32,ln:35,log10:36,log2:37,mod:44,negate:45,roundDown:48,roundUp:49,square:53,floatDivide:64,floorDivide:65},h={bitwiseAnd:11,bitwiseLeftShift:12,bitwiseNot:13,bitwiseOr:14,bitwiseRightShift:15,bitwiseXOr:16,booleanAnd:17,booleanNot:18,booleanOr:19,booleanXOr:20,equalTo:24,greaterThan:28,greaterThanEqual:29,lessThan:33,lessThanEqual:34,isNull:31,notEqual:46},u={acos:6,asin:7,atan:8,atanh:9,cos:21,cosh:22,sin:51,sinh:52,tan:56,tanh:57,acosh:59,asinh:60,atan2:61},s={majority:38,max:39,mean:40,med:41,min:42,minority:43,range:47,stddev:54,sum:55,variety:58,majorityIgnoreNoData:66,maxIgnoreNoData:67,meanIgnoreNoData:68,medIgnoreNoData:69,minIgnoreNoData:70,minorityIgnoreNoData:71,rangeIgnoreNoData:72,stddevIgnoreNoData:73,sumIgnoreNoData:74,varietyIgnoreNoData:75},p={setNull:50,conditional:78},d={...D,...h,...u,...s,...p};export{i as bandIndexType,s as cellStatisticalOperation,o as colorRampName,t as colormapName,l as convolutionKernel,r as curvatureType,D as localArithmeticOperation,p as localConditionalOperation,h as localLogicalOperation,d as localOperators,u as localTrigonometricOperation,a as missingBandAction,n as noDataInterpretation,e as slopeType,g as stretchType};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import{JSONSupport as s}from"../../../core/JSONSupport.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import{cast as r}from"../../../core/accessorSupport/decorators/cast.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../PixelBlock.js";import o from"../RasterInfo.js";let a=class extends s{constructor(){super(...arguments),this.functionArguments=null,this.readingBufferSize=0,this.id=-1,this.isNoopProcess=!1,this.rawInputBandIds=[],this.isInputBandIdsSwizzled=!1,this.swizzledBandSelection=[],this.isBranch=!1,this._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}get flatWebGLFunctionChain(){const t=this.getWebGLProcessorDefinition();if(!t)return null;const s=[t],{parameters:e}=t;let r=e.rasters||e.raster&&[e.raster];for(;r?.length;){s.unshift(...r);const t=[];for(let s=0;s<r.length;s++){const{parameters:e}=r[s],n=e.rasters||e.raster&&[e.raster];n?.length&&t.push(...n)}r=t}for(let o=s.length-1;o>=0;o--)s[o].isNoopProcess&&s.splice(o,1);let n=!1;for(let o=0;o<s.length;o++){const t=s[o];t.id=s.length-o-1;const{rasters:e}=t.parameters;n=n||null!=e&&e.length>1}const i=s.some((({name:t})=>"Slope"===t||"Aspect"===t));return{functions:s,hasBranches:n,hasSurfaceFunction:i}}bind(t,s=!1,e=-1){this.id=e+1;const r=this._getRasterValues();let n=!0;for(let i=0;i<r.length;i++){const e=r[i];if(null!=e&&this._isRasterFunctionValue(e)){const r=e.bind(t,s,this.id+i);if(!r.success)return this._bindingResult=r,r;n=n&&r.supportsGPU}}return!this.rasterInfo||s?(this.sourceRasterInfos=this._getSourceRasterInfos(t),this._bindingResult=this._bindSourceRasters(),this._bindingResult.supportsGPU=n&&this._bindingResult.supportsGPU,this.processInputBandIds(),this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this.processInputBandIds(),this._bindingResult)}process(t){const s=this._getRasterValues(),e=0===s.length?t.pixelBlocks??t.primaryPixelBlocks:s.map((s=>this._readRasterValue(s,t)));return this._processPixels({...t,pixelBlocks:e})}processInputBandIds(){const t=this._getRasterValues().filter(this._isRasterFunctionValue);let s;if(t.length>1){const s=t.map((t=>t.processInputBandIds()[0]));this.rawInputBandIds=s,this.isInputBandIdsSwizzled=this.rawInputBandIds.some(((t,s)=>t!==s));const e=t.filter((t=>"ExtractBand"===t.functionName));return e.length&&e.forEach(((t,s)=>{t.isInputBandIdsSwizzled=!0,t.swizzledBandSelection=[s,s,s]})),this.rawInputBandIds}const e=t[0];if(e){if(s=e.processInputBandIds(),e.isInputBandIdsSwizzled)return this.rawInputBandIds=s,s}else{s=[];const{bandCount:t}=this.sourceRasterInfos[0];for(let e=0;e<t;e++)s.push(e)}const r=this._getInputBandIds(s);return this.isInputBandIdsSwizzled=r.some(((t,s)=>t!==s)),this.rawInputBandIds=r,this.rawInputBandIds}getPrimaryRasters(){const t=[],s=[];return this._getPrimaryRasters(this,t,s),{rasters:t,rasterIds:s}}getWebGLProcessorDefinition(){const t=this._getWebGLParameters(),{raster:s,rasters:e}=this.functionArguments;return e&&Array.isArray(e)&&e.length?(t.rasters=e.map((t=>this._isRasterFunctionValue(t)?t.getWebGLProcessorDefinition():"number"==typeof t?{name:"Constant",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1})),t.rasters.some((t=>null!=t))||(t.rasters=null)):this._isRasterFunctionValue(s)&&(t.raster=s.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}_getOutputPixelType(t){return"unknown"===this.outputPixelType?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_isOutputRoundingNeeded(){const{outputPixelType:t}=this;return(t?.startsWith("u")||t?.startsWith("s"))??!1}_getRasterValues(){const{rasterArgumentNames:t}=this;return"rasters"===t[0]?this.functionArguments.rasters??[]:t.map((t=>this.functionArguments[t]))}_getSourceRasterInfos(t){const s=this._getRasterValues(),{rasterInfos:e,rasterIds:r}=t;if(0===s.length)return e;const n=s.map((t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&r.includes(t)?e[r.indexOf(t)]:"number"!=typeof t?e[0]:void 0)),i=n.find((t=>t))??e[0];return n.forEach(((t,s)=>{void 0===t&&(n[s]=i)})),n}_getPrimaryRasterId(t){return t?.url}_getPrimaryRasters(t,s=[],e=[]){for(let r=0;r<t.sourceRasters.length;r++){const n=t.sourceRasters[r];if("number"!=typeof n)if("bind"in n)this._getPrimaryRasters(n,s,e);else{const t=n,r=this._getPrimaryRasterId(t);if(null==r)continue;e.includes(r)||(this.mainPrimaryRasterId===r?(s.unshift(t),e.unshift(r)):(s.push(t),e.push(r)))}}}_isRasterFunctionValue(t){return null!=t&&"object"==typeof t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,s){const{primaryPixelBlocks:e}=s;if(null==t||"$$"===t){const t=e[0];return null==t?null:t.clone()}if("string"==typeof t){const r=s.primaryRasterIds.indexOf(t);return-1===r?null:e[r]}if("number"==typeof t){const s=e[0];if(null==s)return null;const{width:r,height:n,pixelType:o,mask:a}=s,u=a?new Uint8Array(a):null,p=new Float32Array(r*n);p.fill(t);const l=this.sourceRasterInfos[0].bandCount,c=new Array(l).fill(p);return new i({width:r,height:n,pixelType:o,pixels:c,mask:u})}return t.process(s)}};t([e({json:{write:!0}})],a.prototype,"functionName",void 0),t([e({json:{write:!0}})],a.prototype,"functionArguments",void 0),t([e()],a.prototype,"rasterArgumentNames",void 0),t([e({json:{write:!0}}),r((t=>t?.toLowerCase()))],a.prototype,"outputPixelType",void 0),t([e({json:{write:!0}})],a.prototype,"mainPrimaryRasterId",void 0),t([e()],a.prototype,"sourceRasters",void 0),t([e({type:[o],json:{write:!0}})],a.prototype,"sourceRasterInfos",void 0),t([e({json:{write:!0}})],a.prototype,"rasterInfo",void 0),t([e({json:{write:!0}})],a.prototype,"readingBufferSize",void 0),t([e({json:{write:!0}})],a.prototype,"id",void 0),t([e()],a.prototype,"isNoopProcess",void 0),t([e()],a.prototype,"supportsGPU",null),t([e()],a.prototype,"rawInputBandIds",void 0),t([e()],a.prototype,"isInputBandIdsSwizzled",void 0),t([e()],a.prototype,"swizzledBandSelection",void 0),t([e()],a.prototype,"isBranch",void 0),t([e()],a.prototype,"flatWebGLFunctionChain",null),t([e()],a.prototype,"_bindingResult",void 0),a=t([n("esri.layers.support.rasterFunctions.BaseRasterFunction")],a);const u=a;export{u as default};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import{JSONSupport as s}from"../../../core/JSONSupport.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import{cast as r}from"../../../core/accessorSupport/decorators/cast.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../PixelBlock.js";import o from"../RasterInfo.js";const a=new Set(["slope","aspect","curvature","hillshade","shadedrelief"]);let u=class extends s{constructor(){super(...arguments),this.functionArguments=null,this.readingBufferSize=0,this.id=-1,this.isNoopProcess=!1,this.rawInputBandIds=[],this.isInputBandIdsSwizzled=!1,this.swizzledBandSelection=[],this.isBranch=!1,this._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}get flatWebGLFunctionChain(){const t=this.getWebGLProcessorDefinition();if(!t)return null;const s=[t],{parameters:e}=t;let r=e.rasters||e.raster&&[e.raster];for(;r?.length;){s.unshift(...r);const t=[];for(let s=0;s<r.length;s++){const{parameters:e}=r[s],n=e.rasters||e.raster&&[e.raster];n?.length&&t.push(...n)}r=t}for(let o=s.length-1;o>=0;o--)s[o].isNoopProcess&&s.splice(o,1);let n=!1;for(let o=0;o<s.length;o++){const t=s[o];t.id=s.length-o-1;const{rasters:e}=t.parameters;n=n||null!=e&&e.length>1}const i=s.some((({name:t})=>a.has(t.toLowerCase())));return{functions:s,hasBranches:n,hasSurfaceFunction:i}}bind(t,s=!1,e=-1){this.id=e+1;const r=this._getRasterValues();let n=!0;for(let i=0;i<r.length;i++){const e=r[i];if(null!=e&&this._isRasterFunctionValue(e)){const r=e.bind(t,s,this.id+i);if(!r.success)return this._bindingResult=r,r;n=n&&r.supportsGPU}}return!this.rasterInfo||s?(this.sourceRasterInfos=this._getSourceRasterInfos(t),this._bindingResult=this._bindSourceRasters(),this._bindingResult.supportsGPU=n&&this._bindingResult.supportsGPU,this.processInputBandIds(),this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this.processInputBandIds(),this._bindingResult)}process(t){const s=this._getRasterValues(),e=0===s.length?t.pixelBlocks??t.primaryPixelBlocks:s.map((s=>this._readRasterValue(s,t)));return this._processPixels({...t,pixelBlocks:e})}processInputBandIds(){const t=this._getRasterValues().filter(this._isRasterFunctionValue);let s;if(t.length>1){const s=t.map((t=>t.processInputBandIds()[0]));this.rawInputBandIds=s,this.isInputBandIdsSwizzled=this.rawInputBandIds.some(((t,s)=>t!==s));const e=t.filter((t=>"ExtractBand"===t.functionName));return e.length&&e.forEach(((t,s)=>{t.isInputBandIdsSwizzled=!0,t.swizzledBandSelection=[s,s,s]})),this.rawInputBandIds}const e=t[0];if(e){if(s=e.processInputBandIds(),e.isInputBandIdsSwizzled)return this.rawInputBandIds=s,s}else{s=[];const{bandCount:t}=this.sourceRasterInfos[0];for(let e=0;e<t;e++)s.push(e)}const r=this._getInputBandIds(s);return this.isInputBandIdsSwizzled=r.some(((t,s)=>t!==s)),this.rawInputBandIds=r,this.rawInputBandIds}getPrimaryRasters(){const t=[],s=[];return this._getPrimaryRasters(this,t,s),{rasters:t,rasterIds:s}}getWebGLProcessorDefinition(){const t=this._getWebGLParameters(),{raster:s,rasters:e}=this.functionArguments;return e&&Array.isArray(e)&&e.length?(t.rasters=e.map((t=>this._isRasterFunctionValue(t)?t.getWebGLProcessorDefinition():"number"==typeof t?{name:"Constant",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1})),t.rasters.some((t=>null!=t))||(t.rasters=null)):this._isRasterFunctionValue(s)&&(t.raster=s.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}_getOutputPixelType(t){return"unknown"===this.outputPixelType?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_isOutputRoundingNeeded(){const{outputPixelType:t}=this;return(t?.startsWith("u")||t?.startsWith("s"))??!1}_getRasterValues(){const{rasterArgumentNames:t}=this;return"rasters"===t[0]?this.functionArguments.rasters??[]:t.map((t=>this.functionArguments[t]))}_getSourceRasterInfos(t){const s=this._getRasterValues(),{rasterInfos:e,rasterIds:r}=t;if(0===s.length)return e;const n=s.map((t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&r.includes(t)?e[r.indexOf(t)]:"number"!=typeof t?e[0]:void 0)),i=n.find((t=>t))??e[0];return n.forEach(((t,s)=>{void 0===t&&(n[s]=i)})),n}_getPrimaryRasterId(t){return t?.url}_getPrimaryRasters(t,s=[],e=[]){for(let r=0;r<t.sourceRasters.length;r++){const n=t.sourceRasters[r];if("number"!=typeof n)if("bind"in n)this._getPrimaryRasters(n,s,e);else{const t=n,r=this._getPrimaryRasterId(t);if(null==r)continue;e.includes(r)||(this.mainPrimaryRasterId===r?(s.unshift(t),e.unshift(r)):(s.push(t),e.push(r)))}}}_isRasterFunctionValue(t){return null!=t&&"object"==typeof t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,s){const{primaryPixelBlocks:e}=s;if(null==t||"$$"===t){const t=e[0];return null==t?null:t.clone()}if("string"==typeof t){const r=s.primaryRasterIds.indexOf(t);return-1===r?null:e[r]}if("number"==typeof t){const s=e[0];if(null==s)return null;const{width:r,height:n,pixelType:o,mask:a}=s,u=a?new Uint8Array(a):null,p=new Float32Array(r*n);p.fill(t);const l=this.sourceRasterInfos[0].bandCount,c=new Array(l).fill(p);return new i({width:r,height:n,pixelType:o,pixels:c,mask:u})}return t.process(s)}};t([e({json:{write:!0}})],u.prototype,"functionName",void 0),t([e({json:{write:!0}})],u.prototype,"functionArguments",void 0),t([e()],u.prototype,"rasterArgumentNames",void 0),t([e({json:{write:!0}}),r((t=>t?.toLowerCase()))],u.prototype,"outputPixelType",void 0),t([e({json:{write:!0}})],u.prototype,"mainPrimaryRasterId",void 0),t([e()],u.prototype,"sourceRasters",void 0),t([e({type:[o],json:{write:!0}})],u.prototype,"sourceRasterInfos",void 0),t([e({json:{write:!0}})],u.prototype,"rasterInfo",void 0),t([e({json:{write:!0}})],u.prototype,"readingBufferSize",void 0),t([e({json:{write:!0}})],u.prototype,"id",void 0),t([e()],u.prototype,"isNoopProcess",void 0),t([e()],u.prototype,"supportsGPU",null),t([e()],u.prototype,"rawInputBandIds",void 0),t([e()],u.prototype,"isInputBandIdsSwizzled",void 0),t([e()],u.prototype,"swizzledBandSelection",void 0),t([e()],u.prototype,"isBranch",void 0),t([e()],u.prototype,"flatWebGLFunctionChain",null),t([e()],u.prototype,"_bindingResult",void 0),u=t([n("esri.layers.support.rasterFunctions.BaseRasterFunction")],u);const p=u;export{p as default};