@arcgis/core 5.1.0-next.126 → 5.1.0-next.128

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 (470) hide show
  1. package/applications/Urban/editingSessionUtils.js +1 -1
  2. package/arcade/featureSetUtils.js +1 -1
  3. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  4. package/arcade/featureset/sources/FeatureLayerParquet.js +2 -0
  5. package/arcade/featureset/support/FeatureSet.js +1 -1
  6. package/arcade/featureset/support/shared.js +1 -1
  7. package/arcade.d.ts +2 -1
  8. package/arcgisGlobal.d.ts +6 -4
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/01ba5319cac3e0f14205.js +1 -0
  11. package/assets/esri/core/workers/chunks/02a94efda13d9b683272.js +1 -0
  12. package/assets/esri/core/workers/chunks/05e1f1628a3726eca03d.js +1 -0
  13. package/assets/esri/core/workers/chunks/{81808c3aead7dfac3049.js → 07ca020796c57cefda62.js} +1 -1
  14. package/assets/esri/core/workers/chunks/08dfe61c75f0032db4d4.js +1 -0
  15. package/assets/esri/core/workers/chunks/0a1037fdc8c7bf8d0e7e.js +1 -0
  16. package/assets/esri/core/workers/chunks/{ac33b10fe65f9e9e824f.js → 0acf8df4e9556d05136c.js} +1 -1
  17. package/assets/esri/core/workers/chunks/0b45d34938fa7862f746.js +1 -0
  18. package/assets/esri/core/workers/chunks/0fe57b2d06368d3f68c9.js +1 -0
  19. package/assets/esri/core/workers/chunks/10605362b74cc63bd8a2.js +1 -0
  20. package/assets/esri/core/workers/chunks/11c3b1e8ca21ad62fdd1.js +1 -0
  21. package/assets/esri/core/workers/chunks/{7c6f4104f5325ce0afbc.js → 183b7664c68babd90fc8.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{c187bc997bad61b6c6e9.js → 18d1ac2165a84c42e98f.js} +1 -1
  23. package/assets/esri/core/workers/chunks/1a0903b1d2d5101977c6.js +1 -0
  24. package/assets/esri/core/workers/chunks/{0b169bb1969f86232a1a.js → 1b03e10a6b721365acbb.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{100130a80bc151f2e493.js → 1b07d7656ffcf53cba2b.js} +1 -1
  26. package/assets/esri/core/workers/chunks/1bd49e8d2657c72bf3f9.js +1 -0
  27. package/assets/esri/core/workers/chunks/1d38b2fcd85ac9ebd7c6.js +1 -0
  28. package/assets/esri/core/workers/chunks/1d91e69483c3ceec3c4d.js +1 -0
  29. package/assets/esri/core/workers/chunks/1effde6a39ef0d4af525.js +1 -0
  30. package/assets/esri/core/workers/chunks/{0f75c19d8e296a32e329.js → 1ff57bf19f021f5fd246.js} +1 -1
  31. package/assets/esri/core/workers/chunks/268243ee64d001009f78.js +1 -0
  32. package/assets/esri/core/workers/chunks/26aa8190ac439f634c5b.js +1 -0
  33. package/assets/esri/core/workers/chunks/2b781de7b467c61849b2.js +1 -0
  34. package/assets/esri/core/workers/chunks/2c4f10eaf02ef090ee8f.js +1 -0
  35. package/assets/esri/core/workers/chunks/309fcc46da0b4393960e.js +1 -0
  36. package/assets/esri/core/workers/chunks/314bc1b356d43bfa72a8.js +1 -0
  37. package/assets/esri/core/workers/chunks/{03e93c18efc67a25ca63.js → 35c4037b8eea067d9638.js} +1 -1
  38. package/assets/esri/core/workers/chunks/39a10b2092a98083f4cf.js +1 -0
  39. package/assets/esri/core/workers/chunks/{96e46424c3fb1dd9ce3b.js → 3a284a81d1fdfae2dc77.js} +1 -1
  40. package/assets/esri/core/workers/chunks/3b9174de370b187a0985.js +1 -0
  41. package/assets/esri/core/workers/chunks/3bd32387af52fa48d747.js +1 -0
  42. package/assets/esri/core/workers/chunks/3d4bb539bf939fcdeef9.js +1 -0
  43. package/assets/esri/core/workers/chunks/3d83ac791212b81c9d11.js +1 -0
  44. package/assets/esri/core/workers/chunks/3dc6e9494af16f7b8009.js +1 -0
  45. package/assets/esri/core/workers/chunks/3ecb906322a6a5c8c93b.js +1 -0
  46. package/assets/esri/core/workers/chunks/3f67162456a1f02190fa.js +1 -0
  47. package/assets/esri/core/workers/chunks/{d63f532dd7d60ee8ef2c.js → 42e5e00610f281ca8ffa.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{73c355b895fd6a34fcb8.js → 45b560ca01fb566ba560.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{d36b407f5ad5eabac530.js → 4a9e34fe9a16b1850876.js} +28 -28
  50. package/assets/esri/core/workers/chunks/{e25bcfdd8f20f8a08b19.js → 4d57c771af4137f74bfb.js} +1 -1
  51. package/assets/esri/core/workers/chunks/4e59e5a5d0ff887ff899.js +1 -0
  52. package/assets/esri/core/workers/chunks/4e788fc6cb2ea936f676.js +1 -0
  53. package/assets/esri/core/workers/chunks/4efef5fa8bf23aaf34cd.js +1 -0
  54. package/assets/esri/core/workers/chunks/511b9c12a7479d39dac0.js +1 -0
  55. package/assets/esri/core/workers/chunks/51a53011478e0cf96e0b.js +1 -0
  56. package/assets/esri/core/workers/chunks/5282705a4b515d38ebde.js +1 -0
  57. package/assets/esri/core/workers/chunks/53c8062f4573fa64c49d.js +1 -0
  58. package/assets/esri/core/workers/chunks/599bd80379423c99799d.js +1 -0
  59. package/assets/esri/core/workers/chunks/5aba23584e0b230c75f5.js +1 -0
  60. package/assets/esri/core/workers/chunks/{77214e6081c1c28f1345.js → 6144f59bc0ba153a82d3.js} +1 -1
  61. package/assets/esri/core/workers/chunks/65cc9a48ac95523f7aa8.js +1 -0
  62. package/assets/esri/core/workers/chunks/66392ff750c28064040a.js +1 -0
  63. package/assets/esri/core/workers/chunks/668d84dc512b3085a960.js +1 -0
  64. package/assets/esri/core/workers/chunks/{d3c760109a70a71448c5.js → 67773a9f031d9f1d672f.js} +1 -1
  65. package/assets/esri/core/workers/chunks/67bf361d0b5cfd6b53da.js +1 -0
  66. package/assets/esri/core/workers/chunks/68b77b36daae2b4b4237.js +1 -0
  67. package/assets/esri/core/workers/chunks/6f5a82388a5eb5fcf1b7.js +1 -0
  68. package/assets/esri/core/workers/chunks/70b5e0fce22122a7ccc2.js +1 -0
  69. package/assets/esri/core/workers/chunks/{b606af35a4fb893b762c.js → 71a48f597fda322ea56f.js} +1 -1
  70. package/assets/esri/core/workers/chunks/71c996e1ae84d9daddf2.js +1 -0
  71. package/assets/esri/core/workers/chunks/73b0edabddbb72fe1104.js +1 -0
  72. package/assets/esri/core/workers/chunks/753e0b21e57c12c742ee.js +1 -0
  73. package/assets/esri/core/workers/chunks/{8b0a01ebc86ab226f01f.js → 75b4c27ca02b124a713c.js} +1 -1
  74. package/assets/esri/core/workers/chunks/764c8ba14ab74b66b391.js +1 -0
  75. package/assets/esri/core/workers/chunks/7a1f65511bce26e6b770.js +1 -0
  76. package/assets/esri/core/workers/chunks/7f849c8255140be6097f.js +1 -0
  77. package/assets/esri/core/workers/chunks/{cc697c4d9cdc116373dc.js → 81726d997a2d34449bb2.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{74e1826ad9e2c4fd3b42.js → 81883bca8a79ee2ddb00.js} +1 -1
  79. package/assets/esri/core/workers/chunks/831455798b177678720c.js +1 -0
  80. package/assets/esri/core/workers/chunks/85505a8b8b0794656d06.js +1 -0
  81. package/assets/esri/core/workers/chunks/8570d1c7159b5a84d56c.js +1 -0
  82. package/assets/esri/core/workers/chunks/{5bd7ee40a1c469c24013.js → 86cad656a6a473982109.js} +2 -2
  83. package/assets/esri/core/workers/chunks/{9331969046f2b277d620.js → 8a39dd585742960d3ca2.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{5cb1b950249d651f3837.js → 8dcb3e77f76d8396706b.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{3ff7aa216cd794d951e8.js → 8e99f937fd36cf2cd05f.js} +1 -1
  86. package/assets/esri/core/workers/chunks/8f25d91ea7b99597124e.js +1 -0
  87. package/assets/esri/core/workers/chunks/92341f36a8b15f34bcca.js +1 -0
  88. package/assets/esri/core/workers/chunks/93d08d82ceab19e314f8.js +1 -0
  89. package/assets/esri/core/workers/chunks/96f58e0157b960f6ee22.js +1 -0
  90. package/assets/esri/core/workers/chunks/{bf706a5d065a357de51b.js → 993fee0e91303eb1f01f.js} +1 -1
  91. package/assets/esri/core/workers/chunks/9da1a514e042eb642d35.js +1 -0
  92. package/assets/esri/core/workers/chunks/9f93c29af2a18f7cb160.js +1 -0
  93. package/assets/esri/core/workers/chunks/{00da56b977a7c61b5c94.js → 9fd61a387bd6603da299.js} +1 -1
  94. package/assets/esri/core/workers/chunks/a0208e35b217808777c4.js +1 -0
  95. package/assets/esri/core/workers/chunks/a18cb809dd56c5537b3b.js +1 -0
  96. package/assets/esri/core/workers/chunks/{52175ff9e8c2c136f90a.js → a3ecde3794a7db3cf283.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{c9fefb6316c51cbdc61f.js → a4cdcb0b06242a95722a.js} +1 -1
  98. package/assets/esri/core/workers/chunks/a892b3be70f482bef0ba.js +1 -0
  99. package/assets/esri/core/workers/chunks/a8ef7acb6d3d1f45e14c.js +1 -0
  100. package/assets/esri/core/workers/chunks/aa5f36d7ed59c625ba78.js +1 -0
  101. package/assets/esri/core/workers/chunks/ac5032253c752768021b.js +2 -0
  102. package/assets/esri/core/workers/chunks/ac7ecd90330090c90005.js +1 -0
  103. package/assets/esri/core/workers/chunks/b1524f23e6cee5301a14.js +1 -0
  104. package/assets/esri/core/workers/chunks/{c983e5ce0ff952b65d7f.js → b2b342b06d502fc61ea5.js} +1 -1
  105. package/assets/esri/core/workers/chunks/b3c8aa11ae7f63cb6d74.js +1 -0
  106. package/assets/esri/core/workers/chunks/b590402170ae289290d7.js +1 -0
  107. package/assets/esri/core/workers/chunks/b75a4753cea6544da8bb.js +1 -0
  108. package/assets/esri/core/workers/chunks/b775a0d8894930af4983.js +1 -0
  109. package/assets/esri/core/workers/chunks/bbcad2fde838819ffc7b.js +1 -0
  110. package/assets/esri/core/workers/chunks/{1a527c0740d9f4fa0791.js → bc547cf814d6703cef59.js} +1 -1
  111. package/assets/esri/core/workers/chunks/bd36c57dd0cd28dee55f.js +30 -0
  112. package/assets/esri/core/workers/chunks/be1d2c3a61e6447fbbc7.js +1 -0
  113. package/assets/esri/core/workers/chunks/be8340d5ae5e662c2671.js +1 -0
  114. package/assets/esri/core/workers/chunks/bf6ae205fbfbfcd1a0ee.js +1 -0
  115. package/assets/esri/core/workers/chunks/bfa6f4c08e7571bb1f37.js +1 -0
  116. package/assets/esri/core/workers/chunks/c030cdb4cdb08cb51501.js +262 -0
  117. package/assets/esri/core/workers/chunks/c148ad0ea9258046ac1f.js +1 -0
  118. package/assets/esri/core/workers/chunks/c2cbc2a920e6e199533a.js +1 -0
  119. package/assets/esri/core/workers/chunks/c8460bdf60aca749ed05.js +30 -0
  120. package/assets/esri/core/workers/chunks/c9057b0ad2c2bae4a8ce.js +1 -0
  121. package/assets/esri/core/workers/chunks/cc0efa716b8414a44398.js +1 -0
  122. package/assets/esri/core/workers/chunks/{8f6833671c071b522923.js → cd66bd30f654fe571e57.js} +1 -1
  123. package/assets/esri/core/workers/chunks/cf41a66fb97c1076fb34.js +1 -0
  124. package/assets/esri/core/workers/chunks/cf9a132c4c37e62de3d7.js +1 -0
  125. package/assets/esri/core/workers/chunks/d3be4d914fc99a1d686c.js +1 -0
  126. package/assets/esri/core/workers/chunks/d6145cd7e7c5346f62ec.js +1 -0
  127. package/assets/esri/core/workers/chunks/d6911e9453532501f460.js +1 -0
  128. package/assets/esri/core/workers/chunks/{8407c91cce31e087b41b.js → d750e4abeb777caa8c36.js} +1 -1
  129. package/assets/esri/core/workers/chunks/dada22a4350e9ddaf850.js +30 -0
  130. package/assets/esri/core/workers/chunks/{6675d56f49d07a97dc40.js → dd0c1cf921369e2bc48b.js} +1 -1
  131. package/assets/esri/core/workers/chunks/e656fd5ecf9ac059a87b.js +1 -0
  132. package/assets/esri/core/workers/chunks/{7a474ce61cf484df87b4.js → e80376832050a4b6d28a.js} +1 -1
  133. package/assets/esri/core/workers/chunks/e9acc05b0cf9e05f31a8.js +1 -0
  134. package/assets/esri/core/workers/chunks/e9cd84ad0054e9fea448.js +1 -0
  135. package/assets/esri/core/workers/chunks/ead719bff4a94816a42e.js +1 -0
  136. package/assets/esri/core/workers/chunks/f116331c6eca937aac8e.js +1 -0
  137. package/assets/esri/core/workers/chunks/f116ff0121d28bbf7a23.js +1 -0
  138. package/assets/esri/core/workers/chunks/{3b837b512999e6ab24bc.js → f148666308071bdb185a.js} +1 -1
  139. package/assets/esri/core/workers/chunks/f23e995320674b32e142.js +1 -0
  140. package/assets/esri/core/workers/chunks/f27c7d5cb0937fe50acf.js +1 -0
  141. package/assets/esri/core/workers/chunks/f5f9f21c23c51e35ae65.js +1 -0
  142. package/assets/esri/core/workers/chunks/{893c0d28a5bf3f9f29f1.js → f93facf47aba9b128fcc.js} +1 -1
  143. package/assets/esri/core/workers/chunks/f955b35337a08f9f747d.js +1 -0
  144. package/assets/esri/core/workers/chunks/{f75295cdd5e84eb97d5a.js → f9d583785b3b09ace222.js} +1 -1
  145. package/assets/esri/core/workers/chunks/fa1336b60278017d2525.js +1 -0
  146. package/assets/esri/core/workers/chunks/fe6385115d76e16e8da0.js +1 -0
  147. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  148. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  149. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +5 -1
  150. package/assets/esri/themes/dark/main.css +1 -1
  151. package/assets/esri/themes/light/main.css +1 -1
  152. package/assets/esri/themes/light/view.css +1 -1
  153. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
  154. package/chunks/ComponentShader.glsl.js +11 -11
  155. package/chunks/GaussianSplatComposition.glsl.js +1 -1
  156. package/chunks/GlobalIlluminationBlur.glsl.js +8 -8
  157. package/chunks/OITBlend.glsl.js +1 -24
  158. package/chunks/OITBlendEmission.glsl.js +9 -9
  159. package/chunks/OITDimOpaque.glsl.js +3 -9
  160. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  161. package/chunks/arcgis-knowledge-client-core.js +1 -1
  162. package/config.js +1 -1
  163. package/core/promiseUtils.d.ts +1 -1
  164. package/core/promiseUtils.js +1 -1
  165. package/core/reactiveUtils.d.ts +410 -109
  166. package/core/units.js +1 -1
  167. package/form/types.d.ts +1 -1
  168. package/geometry/Mesh.d.ts +220 -95
  169. package/geometry/operators/support/projectionZScaling.js +1 -1
  170. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +35 -13
  171. package/geometry/support/MeshLocalVertexSpace.d.ts +32 -8
  172. package/geometry/support/MeshVertexAttributes.d.ts +6 -2
  173. package/geometry/support/heightModelInfoUtils.js +1 -1
  174. package/geometry/support/zscale.js +1 -1
  175. package/graphic/{AnnotationGraphicOrigin.d.ts → AnnotationFeatureGraphicOrigin.d.ts} +12 -9
  176. package/graphic/AnnotationFeatureGraphicOrigin.js +2 -0
  177. package/graphic/DimensionFeatureGraphicOrigin.js +1 -1
  178. package/graphic/graphicOrigins.js +1 -1
  179. package/graphic/isAnnotationFeatureGraphicOrigin.d.ts +29 -0
  180. package/graphic/isAnnotationFeatureGraphicOrigin.js +2 -0
  181. package/graphic/isDimensionFeatureGraphicOrigin.d.ts +29 -0
  182. package/graphic/isDimensionFeatureGraphicOrigin.js +2 -0
  183. package/interfaces.d.ts +6 -6
  184. package/kernel.js +1 -1
  185. package/layers/{AnnotationLayer.d.ts → AnnotationFeatureLayer.d.ts} +97 -24
  186. package/layers/AnnotationFeatureLayer.js +2 -0
  187. package/layers/GaussianSplatLayer.d.ts +4 -1
  188. package/layers/ParquetLayer.js +1 -1
  189. package/layers/graphics/data/queryUtils.js +1 -1
  190. package/layers/graphics/sources/MemorySource.js +1 -1
  191. package/layers/graphics/sources/ParquetSource.js +1 -1
  192. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  193. package/layers/mixins/OperationalLayer.js +1 -1
  194. package/layers/save/featureLayerUtils.js +1 -1
  195. package/layers/support/AnnotationFeatureSublayer.d.ts +44 -0
  196. package/layers/support/AnnotationFeatureSublayer.js +2 -0
  197. package/layers/support/ExportImageServiceParameters.js +1 -1
  198. package/layers/support/ParquetPortalItemData.js +1 -1
  199. package/layers/support/arcgisLayers.js +1 -1
  200. package/layers/support/fetchService.js +1 -1
  201. package/layers/support/layerUtils.js +1 -1
  202. package/layers/support/layersLoader.js +1 -1
  203. package/layers/support/layersMapping.js +1 -1
  204. package/layers/support/schemaValidator.js +1 -1
  205. package/layers/types.d.ts +1 -1
  206. package/networks/support/networkFieldUtils.js +1 -1
  207. package/package.json +3 -3
  208. package/portal/schemas/definitions.js +1 -1
  209. package/portal/schemas/gaussianSplatLayerItem.js +2 -0
  210. package/portal/schemas/integratedMesh3DTilesLayerItem.js +1 -1
  211. package/portal/support/loadUtils.js +1 -1
  212. package/rest/knowledgeGraph/ReplicaDefinition.d.ts +0 -2
  213. package/rest/knowledgeGraph/wasmInterface/replicaToWasmEncodedFactories.js +1 -1
  214. package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +1 -1
  215. package/rest/knowledgeGraphService.js +1 -1
  216. package/rest/print.js +1 -1
  217. package/rest/support/AttributeBinsQuery.js +1 -1
  218. package/rest/support/Query.js +1 -1
  219. package/rest/support/TopFeaturesQuery.js +1 -1
  220. package/smartMapping/renderers/location.js +1 -1
  221. package/smartMapping/renderers/predominance.js +1 -1
  222. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  223. package/smartMapping/renderers/support/rendererUtils.d.ts +3 -1
  224. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  225. package/support/revision.js +1 -1
  226. package/symbols/WebStyleSymbol.js +1 -1
  227. package/symbols/support/symbolUtils.js +1 -1
  228. package/symbols/support/webStyleSymbolCache.js +2 -0
  229. package/undoredo/support/ApplySet.js +1 -1
  230. package/undoredo/support/ApplySetItem.js +1 -1
  231. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  232. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  233. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  234. package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +1 -1
  235. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  236. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  237. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  238. package/views/2d/layerViewModuleImportUtils.js +1 -1
  239. package/views/2d/layers/AnnotationFeatureLayerView2D.js +2 -0
  240. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  241. package/views/2d/layers/TileLayerView2D.js +1 -1
  242. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  243. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  244. package/views/2d/layers/support/annodime/annotationSchema.js +1 -1
  245. package/views/2d/types.d.ts +2 -2
  246. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  247. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  248. package/views/3d/layerViewModuleImportUtils.js +1 -1
  249. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  250. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  251. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  252. package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
  253. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  254. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  255. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  256. package/views/3d/terrain/Tile.js +1 -1
  257. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  258. package/views/3d/types.d.ts +1 -1
  259. package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
  260. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +7 -7
  261. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +29 -20
  262. package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +2 -2
  263. package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
  264. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js +6 -8
  265. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  266. package/views/3d/webgl-engine/effects/fog/FogTechniqueConfiguration.js +1 -1
  267. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  268. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  269. package/views/3d/webgl-engine/effects/glow/GlowBlurTechniqueConfiguration.js +1 -1
  270. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
  271. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  272. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
  273. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  274. package/views/3d/webgl-engine/effects/transparency/OITBlendEmission.glsl.js +1 -1
  275. package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechnique.js +1 -1
  276. package/views/3d/webgl-engine/effects/transparency/OITBlendFragmentTechniqueConfiguration.js +2 -0
  277. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  278. package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
  279. package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +1 -1
  280. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +1 -1
  281. package/views/3d/webgl-engine/effects/transparency/oitBlendFragment.glsl.js +2 -0
  282. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  283. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  284. package/views/3d/webgl-engine/lib/Material.js +1 -1
  285. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  286. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TexelFormatInfo.js +2 -0
  287. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  288. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
  289. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  290. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  291. package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
  292. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  293. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  294. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  295. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  296. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  297. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  298. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  299. package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +1 -1
  300. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
  301. package/views/3d/webgl-engine/shaders/alphaCutoff.glsl.js +1 -1
  302. package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
  303. package/views/View2D.d.ts +2 -3
  304. package/views/draw/support/editingSessionUtils.js +1 -1
  305. package/views/layers/{AnnotationLayerView.d.ts → AnnotationFeatureLayerView.d.ts} +6 -6
  306. package/views/layers/FeatureLikeLayerView.d.ts +2 -2
  307. package/views/layers/FeatureLikeLayerView.js +1 -1
  308. package/webdoc/support/writeUtils.js +1 -1
  309. package/webdoc/widgets/FloorFilter.d.ts +14 -1
  310. package/webdoc/widgets/FloorFilter.js +1 -1
  311. package/webscene/support/AlphaCutoff.js +1 -1
  312. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  313. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +12 -4
  314. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  315. package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
  316. package/widgets/BatchAttributeForm/ValueChangeTransaction.js +2 -0
  317. package/widgets/BatchAttributeForm/VisibleElements.d.ts +8 -1
  318. package/widgets/BatchAttributeForm/VisibleElements.js +1 -1
  319. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  320. package/widgets/BatchAttributeForm/css.js +1 -1
  321. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  322. package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
  323. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +2 -2
  324. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  325. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +3 -0
  326. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  327. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  328. package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
  329. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  330. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  331. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  332. package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
  333. package/widgets/BatchAttributeForm/stringUtils.js +2 -0
  334. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  335. package/widgets/BatchAttributeForm/types.d.ts +49 -7
  336. package/widgets/BatchAttributeForm.js +1 -1
  337. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  338. package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
  339. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  340. package/widgets/Editor/EditorViewModel.d.ts +1 -1
  341. package/widgets/Editor/EditorViewModel.js +1 -1
  342. package/widgets/Editor/MergeFeaturesWorkflow.d.ts +3 -3
  343. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  344. package/widgets/Editor/SplitFeatureWorkflow.d.ts +3 -3
  345. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  346. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  347. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  348. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  349. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  350. package/widgets/Editor/UpdateWorkflow.js +1 -1
  351. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  352. package/widgets/Editor/support/SketchController.js +1 -1
  353. package/widgets/Editor/workflowUtils.js +1 -1
  354. package/widgets/Editor.js +1 -1
  355. package/widgets/FloorFilter/FloorFilterViewModel.d.ts +10 -0
  356. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  357. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  358. package/widgets/Print/PrintViewModel.d.ts +11 -1
  359. package/widgets/Print/PrintViewModel.js +1 -1
  360. package/assets/esri/core/workers/chunks/034a5c55ceeb1f85ccba.js +0 -1
  361. package/assets/esri/core/workers/chunks/160e5b99f1097a473e6b.js +0 -1
  362. package/assets/esri/core/workers/chunks/17e68828ca6ff6912d3e.js +0 -1
  363. package/assets/esri/core/workers/chunks/184d896fe66340129acd.js +0 -1
  364. package/assets/esri/core/workers/chunks/1996f0a930abdd97b855.js +0 -1
  365. package/assets/esri/core/workers/chunks/19dcae83be0fc0aced02.js +0 -1
  366. package/assets/esri/core/workers/chunks/1a95370ddc22729ab3c6.js +0 -1
  367. package/assets/esri/core/workers/chunks/1c16f3db1c98da8730b9.js +0 -1
  368. package/assets/esri/core/workers/chunks/1e340536d3c5f94920b5.js +0 -1
  369. package/assets/esri/core/workers/chunks/24810c36ae09bb4e83dc.js +0 -1
  370. package/assets/esri/core/workers/chunks/274b82cb183ddd0042f3.js +0 -1
  371. package/assets/esri/core/workers/chunks/297ae764445e6f73a5ea.js +0 -1
  372. package/assets/esri/core/workers/chunks/29aba121db7f00e0cf81.js +0 -1
  373. package/assets/esri/core/workers/chunks/2a3145a595d19391bb8a.js +0 -1
  374. package/assets/esri/core/workers/chunks/2b00229c238aae70b948.js +0 -1
  375. package/assets/esri/core/workers/chunks/2b814bb51704a5b4fdc2.js +0 -30
  376. package/assets/esri/core/workers/chunks/30f1909c5ef1835b8507.js +0 -1
  377. package/assets/esri/core/workers/chunks/3172d7fc23787a287191.js +0 -1
  378. package/assets/esri/core/workers/chunks/3297658ccd8d4b9ce733.js +0 -1
  379. package/assets/esri/core/workers/chunks/38ca59db0e8f45bd7811.js +0 -1
  380. package/assets/esri/core/workers/chunks/39596715e84d0da2f803.js +0 -30
  381. package/assets/esri/core/workers/chunks/3c5534c576528c1921d2.js +0 -1
  382. package/assets/esri/core/workers/chunks/41f12eb7c9b7086528d5.js +0 -1
  383. package/assets/esri/core/workers/chunks/426156137f279d979ddd.js +0 -1
  384. package/assets/esri/core/workers/chunks/44e52fe98ffafe6a2807.js +0 -1
  385. package/assets/esri/core/workers/chunks/47f65ffcf23713f0fd5c.js +0 -1
  386. package/assets/esri/core/workers/chunks/4d09ef7c57ab7f9782fe.js +0 -1
  387. package/assets/esri/core/workers/chunks/5022413f5a41b5d435ea.js +0 -1
  388. package/assets/esri/core/workers/chunks/538537f9bc866d9caa75.js +0 -1
  389. package/assets/esri/core/workers/chunks/58a7cdebc3d182c15ec6.js +0 -1
  390. package/assets/esri/core/workers/chunks/59dafa1e1340ea4043e6.js +0 -1
  391. package/assets/esri/core/workers/chunks/5c7aff9604b4576a0e1d.js +0 -1
  392. package/assets/esri/core/workers/chunks/5d3ddbf94539cb4f493e.js +0 -1
  393. package/assets/esri/core/workers/chunks/5eb9fdb076488de9cd83.js +0 -1
  394. package/assets/esri/core/workers/chunks/603177137eb680afe371.js +0 -1
  395. package/assets/esri/core/workers/chunks/629099f05ca5c9ca1973.js +0 -1
  396. package/assets/esri/core/workers/chunks/62f78fa455d556008f6a.js +0 -1
  397. package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +0 -1
  398. package/assets/esri/core/workers/chunks/661f7e3f88727dc4801c.js +0 -1
  399. package/assets/esri/core/workers/chunks/686c51fd2144e132783e.js +0 -1
  400. package/assets/esri/core/workers/chunks/6cab67fc7044ee9b863b.js +0 -1
  401. package/assets/esri/core/workers/chunks/6d616b66fb32904b55a1.js +0 -1
  402. package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +0 -1
  403. package/assets/esri/core/workers/chunks/6f0341cfa4c68e6e60b3.js +0 -1
  404. package/assets/esri/core/workers/chunks/6f125b4ed06c0022dee6.js +0 -1
  405. package/assets/esri/core/workers/chunks/6f4825c3ef1fe202ab82.js +0 -1
  406. package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +0 -1
  407. package/assets/esri/core/workers/chunks/72d67cc3a382e83bf1a2.js +0 -1
  408. package/assets/esri/core/workers/chunks/7cadb872b9ca96eedca5.js +0 -1
  409. package/assets/esri/core/workers/chunks/7e89cb9ff615742e0894.js +0 -1
  410. package/assets/esri/core/workers/chunks/851705cf276eae8d4d37.js +0 -1
  411. package/assets/esri/core/workers/chunks/882ee7ed8a3a0215f9b9.js +0 -1
  412. package/assets/esri/core/workers/chunks/890b7a1153b7f65eba9a.js +0 -1
  413. package/assets/esri/core/workers/chunks/8c443c52c846a096a250.js +0 -1
  414. package/assets/esri/core/workers/chunks/985fceacd6ec137bd490.js +0 -1
  415. package/assets/esri/core/workers/chunks/9d27cc631bab8aa7479e.js +0 -1
  416. package/assets/esri/core/workers/chunks/9d5f7573bfe3b051daf1.js +0 -1
  417. package/assets/esri/core/workers/chunks/a0c00c6fe60db49b3ab9.js +0 -1
  418. package/assets/esri/core/workers/chunks/a4245bd4e67a428fd835.js +0 -1
  419. package/assets/esri/core/workers/chunks/a643a4751bbf4430bde2.js +0 -262
  420. package/assets/esri/core/workers/chunks/ab62724b80b3c478a597.js +0 -1
  421. package/assets/esri/core/workers/chunks/b002304a45856b024b46.js +0 -1
  422. package/assets/esri/core/workers/chunks/b44cf254585210578eab.js +0 -1
  423. package/assets/esri/core/workers/chunks/b5937ce657c1fff3864f.js +0 -1
  424. package/assets/esri/core/workers/chunks/c2a65de34f6a6c89c652.js +0 -1
  425. package/assets/esri/core/workers/chunks/c3cf9e6e91f71c9cc5f3.js +0 -1
  426. package/assets/esri/core/workers/chunks/c6d0b4875b6b8d6bc25a.js +0 -1
  427. package/assets/esri/core/workers/chunks/c755bfd90c9654170e67.js +0 -1
  428. package/assets/esri/core/workers/chunks/c80fc1b3048e8d58a1f8.js +0 -1
  429. package/assets/esri/core/workers/chunks/c911f0b5bdd43b66b731.js +0 -1
  430. package/assets/esri/core/workers/chunks/cc3e895cff019e811c07.js +0 -1
  431. package/assets/esri/core/workers/chunks/d122431f3b0b88dcb488.js +0 -1
  432. package/assets/esri/core/workers/chunks/d24e027bb8b2c09f25c8.js +0 -1
  433. package/assets/esri/core/workers/chunks/d2df8c328054dc6cb7b7.js +0 -1
  434. package/assets/esri/core/workers/chunks/d41caf20c26f80385265.js +0 -1
  435. package/assets/esri/core/workers/chunks/d468994822f9bc3d6279.js +0 -1
  436. package/assets/esri/core/workers/chunks/d52864823067e57a719a.js +0 -1
  437. package/assets/esri/core/workers/chunks/d5c35a75fd4c41def420.js +0 -1
  438. package/assets/esri/core/workers/chunks/d64613209a9eb1eafb11.js +0 -1
  439. package/assets/esri/core/workers/chunks/d7be278aed1fb37ad5ec.js +0 -1
  440. package/assets/esri/core/workers/chunks/d8ec0afb2b91ccf32e55.js +0 -1
  441. package/assets/esri/core/workers/chunks/da1e8b338ab9fe9e0a8e.js +0 -1
  442. package/assets/esri/core/workers/chunks/dd920a6f6422fa213eba.js +0 -1
  443. package/assets/esri/core/workers/chunks/e1505ec80b068011bdc5.js +0 -1
  444. package/assets/esri/core/workers/chunks/e279bcbe4f10e87bde6c.js +0 -1
  445. package/assets/esri/core/workers/chunks/e2de13810dce01b98520.js +0 -1
  446. package/assets/esri/core/workers/chunks/e33d2ede6c9f1527d51b.js +0 -1
  447. package/assets/esri/core/workers/chunks/e5837e5ac6ef761f26a2.js +0 -1
  448. package/assets/esri/core/workers/chunks/e82488b9b3bb0c1dedb4.js +0 -1
  449. package/assets/esri/core/workers/chunks/e912b515704e20313e53.js +0 -1
  450. package/assets/esri/core/workers/chunks/eabeaab5c4810f999a4d.js +0 -1
  451. package/assets/esri/core/workers/chunks/ec723f8777b935c5e81a.js +0 -1
  452. package/assets/esri/core/workers/chunks/ef46ef4f0ee9f2aeaa4a.js +0 -1
  453. package/assets/esri/core/workers/chunks/f274a8e8c7ca4294e876.js +0 -1
  454. package/assets/esri/core/workers/chunks/f4f642ddd4d5db7cbbb4.js +0 -1
  455. package/assets/esri/core/workers/chunks/f590db684d88e72bd79b.js +0 -1
  456. package/assets/esri/core/workers/chunks/f622ae3887c85535e8ab.js +0 -30
  457. package/assets/esri/core/workers/chunks/f6d047358d14328f3622.js +0 -1
  458. package/assets/esri/core/workers/chunks/f80613cce68dc3df8303.js +0 -2
  459. package/assets/esri/core/workers/chunks/fb6605be0c5e36785543.js +0 -1
  460. package/assets/esri/core/workers/chunks/fd70a25ffdf2cc6c5be2.js +0 -1
  461. package/graphic/AnnotationGraphicOrigin.js +0 -2
  462. package/layers/AnnotationLayer.js +0 -2
  463. package/layers/support/AnnotationSublayer.d.ts +0 -44
  464. package/layers/support/AnnotationSublayer.js +0 -2
  465. package/views/2d/layers/AnnotationLayerView2D.js +0 -2
  466. package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechniqueConfiguration.js +0 -2
  467. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechniqueConfiguration.js +0 -2
  468. /package/assets/esri/core/workers/chunks/{5bd7ee40a1c469c24013.js.LICENSE.txt → 86cad656a6a473982109.js.LICENSE.txt} +0 -0
  469. /package/assets/esri/core/workers/chunks/{f80613cce68dc3df8303.js.LICENSE.txt → ac5032253c752768021b.js.LICENSE.txt} +0 -0
  470. /package/views/layers/{AnnotationLayerView.js → AnnotationFeatureLayerView.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../core/Error.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{fetchFullFeaturesByObjectId as i,updateGraphicSymbolWhenRequired as s,swapForEditingSession as t}from"../../views/draw/support/editingSessionUtils.js";async function n(n){const{graphicsLayer:a,graphic:c,signal:p,view:d}=n,u=c.sourceLayer;if(!r(u))throw new e("editing-session:unsupported-layer","The graphic source layer does not support editing sessions.");const l=c.getObjectId();if(null==l)throw new e("editing-session:missing-object-id","The graphic does not have an object id and cannot be used for an editing session.");const g=await i([l],u,d.spatialReference,p);if(o(n),1!==g.length)throw new e("editing-session:feature-not-found","Unable to resolve exactly one feature for the provided graphic.");const f=g[0],h="2d"===d.type?d.scale:null;await s(f,void 0,h,p),o(n);const w=await t(a,d,c,f,p),y=()=>w.remove();return{graphic:f,remove:y,[Symbol.asyncDispose]:y}}function r(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatures"in e}export{n as openEditingSession};
2
+ import e from"../../core/Error.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{fetchFullFeaturesByObjectId as i,updateGraphicSymbolWhenRequired as s,swapForEditingSession as t}from"../../views/draw/support/editingSessionUtils.js";async function n(n){const{graphicsLayer:a,graphic:c,signal:p,view:u}=n,d=c.sourceLayer;if(!r(d))throw new e("editing-session:unsupported-layer","The graphic source layer does not support editing sessions.");const l=c.getObjectId();if(null==l)throw new e("editing-session:missing-object-id","The graphic does not have an object id and cannot be used for an editing session.");const g=await i([l],d,u.spatialReference,p);if(o(n),1!==g.length)throw new e("editing-session:feature-not-found","Unable to resolve exactly one feature for the provided graphic.");const f=g[0],h="2d"===u.type?u.scale:null;await s(f,h,p),o(n);const w=await t(a,u,c,f,p),y=()=>w.remove();return{graphic:f,remove:y,[Symbol.asyncDispose]:y}}function r(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatures"in e}export{n as openEditingSession};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../request.js";import t from"./featureSetCollection.js";import{m as a,a4 as r}from"../chunks/languageUtils.js";import n from"./featureset/actions/AttributeFilter.js";import l from"./featureset/sources/FeatureLayerDynamic.js";import s from"./featureset/sources/FeatureLayerMemory.js";import i from"./featureset/sources/FeatureLayerRelated.js";import o from"./featureset/support/cache.js";import{FeatureSetError as u}from"./featureset/support/errorsupport.js";import{isSupportedLayer as c,extractServiceUrl as d}from"./featureset/support/shared.js";import{isLoadable as p}from"../core/Loadable.js";import f from"../core/sql/WhereClause.js";import y from"../layers/FeatureLayer.js";import m from"../layers/Layer.js";import h from"../portal/PortalItem.js";function w(){null===o.applicationCache&&(o.applicationCache=new o)}async function I(e,t,a){if(o.applicationCache){const a=o.applicationCache.getLayerInfo(e);if(a){const r=await a;return new y({url:e,outFields:t,sourceJSON:r})}const n=new y({url:e,outFields:t}),l=(async()=>(await n.load(),n.sourceJSON))();if(o.applicationCache){o.applicationCache.setLayerInfo(e,l);try{return await l,n}catch(r){throw o.applicationCache.clearLayerInfo(e),r}}return await l,n}if(null!=a){const r=a.getCachedLayerMetadata(e);if(r){const a=await r;return new y({url:e,outFields:t,sourceJSON:a})}const l=new y({url:e,outFields:t}),s=(async()=>(await l.load(),l.sourceJSON))();a.setCachedLayerMetadata(e,s);try{return await s,l}catch(n){throw a.removeCachedLayerMetadata(e,s),n}}return new y({url:e,outFields:t})}async function L(e,t,a,r,n,l=null){return _(await I(e,["*"],n),t,a,r,n,l)}function _(e,t=null,a=null,r=!0,i=null,o=null){switch(e.type){case"catalog-footprint":return _(e.parent,t,a,r,i,o);case"subtype-sublayer":{const l=_(e.parent,t,a,r,i,o);return new n({parentfeatureset:l,whereclause:f.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:l.dateFieldsTimeZoneDefaultUTC})})}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new s({layer:e,spatialReference:t,outFields:a,includeGeometry:r,lrucache:i,interceptor:o});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const n={layer:e,spatialReference:t,outFields:a,includeGeometry:r,lrucache:i,interceptor:o};return!e.url&&e.source?new s(n):new l(n)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function S(t){if(null!==o.applicationCache){const e=o.applicationCache.getLayerInfo(t);if(null!==e)return e}const a=(async()=>{const a=await e(t,{responseType:"json",query:{f:"json"}});return a.data?a.data:null})();if(null!==o.applicationCache){o.applicationCache.setLayerInfo(t,a);try{return await a}catch(r){throw o.applicationCache.clearLayerInfo(t),r}}return a}async function C(t,a){const r="QUERYDATAELEMTS:"+a.toString()+":"+t;if(null!==o.applicationCache){const e=o.applicationCache.getLayerInfo(r);if(null!==e)return e}const n=(async()=>{const r=await e(t+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([a.toString()]),f:"json"}});if(r.data){const e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new u("DataElementsNotFound")})();if(null!==o.applicationCache){o.applicationCache.setLayerInfo(r,n);try{return await n}catch(l){throw o.applicationCache.clearLayerInfo(r),l}}return n}async function k(t,a){if(null!==o.applicationCache){const e=o.applicationCache.getLayerInfo(t);if(null!==e)return e}if(null!=a){const e=a.getCachedServiceMetadata(t);if(null!=e)return e}const r=(async()=>{const a=await e(t,{responseType:"json",query:{f:"json"},authMode:"no-prompt"});if(a.data){const e=a.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==o.applicationCache){o.applicationCache.setLayerInfo(t,r);try{return await r}catch(n){throw o.applicationCache.clearLayerInfo(t),n}}if(null!=a){a.setCachedServiceMetadata(t,r);try{return await r}catch(l){throw a.removeCachedServiceMetadata(t,r),l}}return r}async function g(e,t,a){const r={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},l=await k(e,null);if(r.metadata=l,void 0!==l.controllerDatasetLayers?.utilityNetworkLayerId&&null!==l.controllerDatasetLayers.utilityNetworkLayerId){if(l.layers)for(const e of l.layers)r.layerNameLkp[e.id]=e.name;if(l.tables)for(const e of l.tables)r.layerNameLkp[e.id]=e.name;const s=l.controllerDatasetLayers.utilityNetworkLayerId;r.networkId=s;const i=await C(e,s);if(i){r.queryelem=i,r.queryelem?.dataElement&&void 0!==r.queryelem.dataElement.schemaGeneration&&(r.unVersion=r.queryelem.dataElement.schemaGeneration),r.lkp={},r.queryelem.dataElement.domainNetworks||(r.queryelem.dataElement.domainNetworks=[]);for(const e of r.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:r.layerNameLkp[t.layerId]??null};r.layerIdLookup.set(e.layerId,e),r.sourceIdLookup.set(e.sourceId,e),e.className&&(r.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:r.layerNameLkp[t.layerId]??null};r.layerIdLookup.set(e.layerId,e),r.sourceIdLookup.set(e.sourceId,e),e.className&&(r.lkp[e.className]=e)}}if(r.queryelem.dataElement.terminalConfigurations)for(const e of r.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)r.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const l=await S(e+"/"+s);if(void 0!==l.systemLayers?.associationsTableId&&null!==l.systemLayers.associationsTableId){let s=null;if(a&&r.unVersion<8){const a=[];r.unVersion>=4&&(a.push("STATUS"),a.push("PERCENTALONG")),s=await L(e+"/"+l.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...a],!1,null,null),await s.load(),r.unVersion>=4&&(s=new n({parentfeatureset:s,whereclause:f.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:s.getFieldsIndex(),timeZone:s.dateFieldsTimeZoneDefaultUTC})}),await s.load())}return{lkp:r.lkp,associations:s,unVersion:r.unVersion,terminals:r.terminals,layerIdLookup:r.layerIdLookup,sourceIdLookup:r.sourceIdLookup}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function F(e,t,a,r=null,n=null,l=!0,s=null,o=null){let u=e.serviceUrl();if(!u)return null;u=u.endsWith("/")?u+t.relatedTableId.toString():u+"/"+t.relatedTableId.toString();const c=await L(u,r,n,l,s,o);return new i({layer:e,relatedLayer:c,relationship:t,objectId:a,spatialReference:r,outFields:n,includeGeometry:l,lrucache:s,interceptor:o})}class N extends t{constructor(e,t=null,a=null,r=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=a,this._interceptor=r,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,a=null){const r=_(e,this._overrideSpatialReference,null===a?["*"]:a,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(a)}),r}async listAll(){p(this._map)&&!this._map.loaded&&await this._map.load();const e=this._map.allLayers.toArray().filter(e=>c(e)).map(e=>({id:e.id,name:e.title})),t=this._map.allTables.toArray().filter(e=>c(e)).map(e=>({id:e.id,name:e.title}));return e.concat(t)}async featureSetByName(e,t=!0,a=null){if(p(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,a);null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);for(let l=0;l<this._instantLayers.length;l++){const a=this._instantLayers[l];if(a.opitem.title===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[l].featureset}const n=this._map.allLayers.find(t=>c(t)&&t.title===e);if(null!=n)return this._makeAndAddFeatureSet(n,t,a);if(this._map.allTables){const r=this._map.allTables.find(t=>c(t)&&t.title===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,a)}return null}async featureSetById(e,t=!0,a=["*"]){if(p(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,a);null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);for(let l=0;l<this._instantLayers.length;l++){const a=this._instantLayers[l];if(a.opitem.id===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[l].featureset}const n=this._map.allLayers.find(t=>c(t)&&t.id===e);if(n)return this._makeAndAddFeatureSet(n,t,a);if(this._map.allTables){const r=this._map.allTables.find(t=>c(t)&&t.id===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,a)}return null}}class T extends t{constructor(e,t=null,a=null,r=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=a,this._interceptor=r,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,a=null){const r=_(e,this._overrideSpatialReference,null===a?["*"]:a,t,this._lrucache);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(a)}),r}async _loadMetaData(){const e=await k(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new T(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async listAll(){const e=await this._loadMetaData();return e.layers.concat(e.tables)}async featureSetByName(e,t=!0,a=null){null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);for(let s=0;s<this._instantLayers.length;s++){const a=this._instantLayers[s];if(a.opitem.title===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[s].featureset}const n=await this._loadMetaData();let l=null;for(const s of n.layers??[])s.name===e&&(l=s);if(!l)for(const s of n.tables??[])s.name===e&&(l=s);if(l){const e=await I(this._url+"/"+l.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,a)}return null}async featureSetById(e,t=!0,a=["*"]){null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);e=null!=e?e.toString():"";for(let s=0;s<this._instantLayers.length;s++){const a=this._instantLayers[s];if(a.opitem.id===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[s].featureset}const n=await this._loadMetaData();let l=null;for(const s of n.layers??[])null!==s.id&&void 0!==s.id&&s.id.toString()===e&&(l=s);if(!l)for(const s of n.tables??[])null!==s.id&&void 0!==s.id&&s.id.toString()===e&&(l=s);if(l){const e=await I(this._url+"/"+l.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,a)}return null}}function A(e,t,a=null,r=null){return new N(e,t,a,r)}function O(e,t,a=null,r=null){return new T(e,t,a,r)}function E(e,t,n,l,s){if(null===e)return null;if(a(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof m&&c(e)){switch(t){case"datasource":return _(e,s,"outFields"in e?e.outFields:null,!0,n,l).getDataSourceFeatureSet();case"parent":case"root":return _(e,s,"outFields"in e?e.outFields:null,!0,n,l)}return null}if(r(e)){switch(t){case"datasource":return _(e.parent,s,e.parent.outFields,!0,n,l).getDataSourceFeatureSet();case"parent":case"root":return _(e,s,e.parent.outFields,!0,n,l)}return null}return null}async function M(e,t,a,r,n,l,s,i=null){if(o.applicationCache){const u=o.applicationCache.getLayerInfo(e+":"+l.url);if(u)return b(await u,t,a,r,n,s,i)}if(null!=s){const o=s.getCachedPortalItem(l.url,e);if(null!=o)return await b(await o,t,a,r,n,s,i)}const u=new h({id:e,portal:l}).load();o.applicationCache?o.applicationCache.setLayerInfo(e+":"+l.url,u):null!=s&&s.setCachedPortalItem(l.url,e,u);try{return await b(await u,t,a,r,n,s,i)}catch(c){throw o.applicationCache&&o.applicationCache.clearLayerInfo(e+":"+l.url),null!=s&&s.removeCachedPortalItem(l.url,e,u),c}}async function b(e,t,a,r,n,l,s){let i;if("Feature Service"===e.type||"Map Service"===e.type)i=await I(d(e.url??"")+"/"+t,["*"],l);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=l){const t=l.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)i=await t;else{const t=m.fromPortalItem(e);l.setCachedPortalItemLayer(e.portal.url,e.id,t);try{i=await t}catch(o){throw l.removeCachedPortalItemLayer(e.portal.url,e.id,t),o}}}else i=await m.fromPortalItem(e)}return _(i,a,r,n,l,s)}export{g as constructAssociationMetaDataFeatureSetFromUrl,_ as constructFeatureSet,M as constructFeatureSetFromPortalItem,F as constructFeatureSetFromRelationship,L as constructFeatureSetFromUrl,E as convertToFeatureSet,A as createFeatureSetCollectionFromMap,O as createFeatureSetCollectionFromService,w as initialiseMetaDataCache};
2
+ import e from"../request.js";import t from"./featureSetCollection.js";import{m as a,a4 as r}from"../chunks/languageUtils.js";import n from"./featureset/actions/AttributeFilter.js";import l from"./featureset/sources/FeatureLayerDynamic.js";import s from"./featureset/sources/FeatureLayerMemory.js";import i from"./featureset/sources/FeatureLayerParquet.js";import o from"./featureset/sources/FeatureLayerRelated.js";import u from"./featureset/support/cache.js";import{FeatureSetError as c}from"./featureset/support/errorsupport.js";import{isSupportedLayer as d,extractServiceUrl as p}from"./featureset/support/shared.js";import{isLoadable as y}from"../core/Loadable.js";import f from"../core/sql/WhereClause.js";import m from"../layers/FeatureLayer.js";import h from"../layers/Layer.js";import w from"../layers/ParquetLayer.js";import I from"../layers/support/ParquetPortalItemData.js";import L from"../portal/PortalItem.js";function _(){null===u.applicationCache&&(u.applicationCache=new u)}async function S(e,t,a){if(u.applicationCache){const a=u.applicationCache.getLayerInfo(e);if(a){const r=await a;return new m({url:e,outFields:t,sourceJSON:r})}const n=new m({url:e,outFields:t}),l=(async()=>(await n.load(),n.sourceJSON))();if(u.applicationCache){u.applicationCache.setLayerInfo(e,l);try{return await l,n}catch(r){throw u.applicationCache.clearLayerInfo(e),r}}return await l,n}if(null!=a){const r=a.getCachedLayerMetadata(e);if(r){const a=await r;return new m({url:e,outFields:t,sourceJSON:a})}const l=new m({url:e,outFields:t}),s=(async()=>(await l.load(),l.sourceJSON))();a.setCachedLayerMetadata(e,s);try{return await s,l}catch(n){throw a.removeCachedLayerMetadata(e,s),n}}return new m({url:e,outFields:t})}async function C(e,t,a,r,n,l=null){return F(await S(e,["*"],n),t,a,r,n,l)}function F(e,t=null,a=null,r=!0,o=null,u=null){switch(e.type){case"catalog-footprint":return F(e.parent,t,a,r,o,u);case"subtype-sublayer":{const l=F(e.parent,t,a,r,o,u);return new n({parentfeatureset:l,whereclause:f.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:l.dateFieldsTimeZoneDefaultUTC})})}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new s({layer:e,spatialReference:t,outFields:a,includeGeometry:r,lrucache:o,interceptor:u});case"parquet":return new i({layer:e,spatialReference:t,outFields:a,includeGeometry:r});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const n={layer:e,spatialReference:t,outFields:a,includeGeometry:r,lrucache:o,interceptor:u};return!e.url&&e.source?new s(n):new l(n)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function k(t){if(null!==u.applicationCache){const e=u.applicationCache.getLayerInfo(t);if(null!==e)return e}const a=(async()=>{const a=await e(t,{responseType:"json",query:{f:"json"}});return a.data?a.data:null})();if(null!==u.applicationCache){u.applicationCache.setLayerInfo(t,a);try{return await a}catch(r){throw u.applicationCache.clearLayerInfo(t),r}}return a}async function g(t,a){const r="QUERYDATAELEMTS:"+a.toString()+":"+t;if(null!==u.applicationCache){const e=u.applicationCache.getLayerInfo(r);if(null!==e)return e}const n=(async()=>{const r=await e(t+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([a.toString()]),f:"json"}});if(r.data){const e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new c("DataElementsNotFound")})();if(null!==u.applicationCache){u.applicationCache.setLayerInfo(r,n);try{return await n}catch(l){throw u.applicationCache.clearLayerInfo(r),l}}return n}async function N(t,a){if(null!==u.applicationCache){const e=u.applicationCache.getLayerInfo(t);if(null!==e)return e}if(null!=a){const e=a.getCachedServiceMetadata(t);if(null!=e)return e}const r=(async()=>{const a=await e(t,{responseType:"json",query:{f:"json"},authMode:"no-prompt"});if(a.data){const e=a.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==u.applicationCache){u.applicationCache.setLayerInfo(t,r);try{return await r}catch(n){throw u.applicationCache.clearLayerInfo(t),n}}if(null!=a){a.setCachedServiceMetadata(t,r);try{return await r}catch(l){throw a.removeCachedServiceMetadata(t,r),l}}return r}async function T(e,t,a){const r={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},l=await N(e,null);if(r.metadata=l,void 0!==l.controllerDatasetLayers?.utilityNetworkLayerId&&null!==l.controllerDatasetLayers.utilityNetworkLayerId){if(l.layers)for(const e of l.layers)r.layerNameLkp[e.id]=e.name;if(l.tables)for(const e of l.tables)r.layerNameLkp[e.id]=e.name;const s=l.controllerDatasetLayers.utilityNetworkLayerId;r.networkId=s;const i=await g(e,s);if(i){r.queryelem=i,r.queryelem?.dataElement&&void 0!==r.queryelem.dataElement.schemaGeneration&&(r.unVersion=r.queryelem.dataElement.schemaGeneration),r.lkp={},r.queryelem.dataElement.domainNetworks||(r.queryelem.dataElement.domainNetworks=[]);for(const e of r.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:r.layerNameLkp[t.layerId]??null};r.layerIdLookup.set(e.layerId,e),r.sourceIdLookup.set(e.sourceId,e),e.className&&(r.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:r.layerNameLkp[t.layerId]??null};r.layerIdLookup.set(e.layerId,e),r.sourceIdLookup.set(e.sourceId,e),e.className&&(r.lkp[e.className]=e)}}if(r.queryelem.dataElement.terminalConfigurations)for(const e of r.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)r.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const l=await k(e+"/"+s);if(void 0!==l.systemLayers?.associationsTableId&&null!==l.systemLayers.associationsTableId){let s=null;if(a&&r.unVersion<8){const a=[];r.unVersion>=4&&(a.push("STATUS"),a.push("PERCENTALONG")),s=await C(e+"/"+l.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...a],!1,null,null),await s.load(),r.unVersion>=4&&(s=new n({parentfeatureset:s,whereclause:f.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:s.getFieldsIndex(),timeZone:s.dateFieldsTimeZoneDefaultUTC})}),await s.load())}return{lkp:r.lkp,associations:s,unVersion:r.unVersion,terminals:r.terminals,layerIdLookup:r.layerIdLookup,sourceIdLookup:r.sourceIdLookup}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function A(e,t,a,r=null,n=null,l=!0,s=null,i=null){let u=e.serviceUrl();if(!u)return null;u=u.endsWith("/")?u+t.relatedTableId.toString():u+"/"+t.relatedTableId.toString();const c=await C(u,r,n,l,s,i);return new o({layer:e,relatedLayer:c,relationship:t,objectId:a,spatialReference:r,outFields:n,includeGeometry:l,lrucache:s,interceptor:i})}class O extends t{constructor(e,t=null,a=null,r=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=a,this._interceptor=r,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,a=null){const r=F(e,this._overrideSpatialReference,null===a?["*"]:a,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(a)}),r}async listAll(){y(this._map)&&!this._map.loaded&&await this._map.load();const e=this._map.allLayers.toArray().filter(e=>d(e)).map(e=>({id:e.id,name:e.title})),t=this._map.allTables.toArray().filter(e=>d(e)).map(e=>({id:e.id,name:e.title}));return e.concat(t)}async featureSetByName(e,t=!0,a=null){if(y(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,a);null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);for(let l=0;l<this._instantLayers.length;l++){const a=this._instantLayers[l];if(a.opitem.title===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[l].featureset}const n=this._map.allLayers.find(t=>d(t)&&t.title===e);if(null!=n)return this._makeAndAddFeatureSet(n,t,a);if(this._map.allTables){const r=this._map.allTables.find(t=>d(t)&&t.title===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,a)}return null}async featureSetById(e,t=!0,a=["*"]){if(y(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,a);null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);for(let l=0;l<this._instantLayers.length;l++){const a=this._instantLayers[l];if(a.opitem.id===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[l].featureset}const n=this._map.allLayers.find(t=>d(t)&&t.id===e);if(n)return this._makeAndAddFeatureSet(n,t,a);if(this._map.allTables){const r=this._map.allTables.find(t=>d(t)&&t.id===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,a)}return null}}class E extends t{constructor(e,t=null,a=null,r=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=a,this._interceptor=r,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,a=null){const r=F(e,this._overrideSpatialReference,null===a?["*"]:a,t,this._lrucache);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(a)}),r}async _loadMetaData(){const e=await N(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new E(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async listAll(){const e=await this._loadMetaData();return e.layers.concat(e.tables)}async featureSetByName(e,t=!0,a=null){null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);for(let s=0;s<this._instantLayers.length;s++){const a=this._instantLayers[s];if(a.opitem.title===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[s].featureset}const n=await this._loadMetaData();let l=null;for(const s of n.layers??[])s.name===e&&(l=s);if(!l)for(const s of n.tables??[])s.name===e&&(l=s);if(l){const e=await S(this._url+"/"+l.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,a)}return null}async featureSetById(e,t=!0,a=["*"]){null===a&&(a=["*"]),a=(a=a.slice()).sort();const r=JSON.stringify(a);e=null!=e?e.toString():"";for(let s=0;s<this._instantLayers.length;s++){const a=this._instantLayers[s];if(a.opitem.id===e&&a.includeGeometry===t&&a.outFields===r)return this._instantLayers[s].featureset}const n=await this._loadMetaData();let l=null;for(const s of n.layers??[])null!==s.id&&void 0!==s.id&&s.id.toString()===e&&(l=s);if(!l)for(const s of n.tables??[])null!==s.id&&void 0!==s.id&&s.id.toString()===e&&(l=s);if(l){const e=await S(this._url+"/"+l.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,a)}return null}}function D(e,t,a=null,r=null){return new O(e,t,a,r)}function M(e,t,a=null,r=null){return new E(e,t,a,r)}function b(e,t,n,l,s){if(null===e)return null;if(a(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof h&&d(e)){switch(t){case"datasource":return F(e,s,"outFields"in e?e.outFields:null,!0,n,l).getDataSourceFeatureSet();case"parent":case"root":return F(e,s,"outFields"in e?e.outFields:null,!0,n,l)}return null}if(r(e)){switch(t){case"datasource":return F(e.parent,s,e.parent.outFields,!0,n,l).getDataSourceFeatureSet();case"parent":case"root":return F(e,s,e.parent.outFields,!0,n,l)}return null}return null}async function j(e,t,a,r,n,l,s,i=null){if(u.applicationCache){const o=u.applicationCache.getLayerInfo(e+":"+l.url);if(o)return v(await o,t,a,r,n,s,i)}if(null!=s){const o=s.getCachedPortalItem(l.url,e);if(null!=o)return await v(await o,t,a,r,n,s,i)}const o=new L({id:e,portal:l}).load();u.applicationCache?u.applicationCache.setLayerInfo(e+":"+l.url,o):null!=s&&s.setCachedPortalItem(l.url,e,o);try{return await v(await o,t,a,r,n,s,i)}catch(c){throw u.applicationCache&&u.applicationCache.clearLayerInfo(e+":"+l.url),null!=s&&s.removeCachedPortalItem(l.url,e,o),c}}const q=new Set(["Apache Parquet","Parquet layer","Parquet Layer","Parquet feature layer","Parquet Feature Layer"]);async function v(e,t,a,r,n,l,s){let i;if("Feature Service"===e.type||"Map Service"===e.type)i=await S(p(e.url??"")+"/"+t,["*"],l);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=l){const t=l.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)i=await t;else{const t=q.has(e.type)?Promise.resolve(new w({data:new I({portalItem:e})})):h.fromPortalItem(e);l.setCachedPortalItemLayer(e.portal.url,e.id,t);try{i=await t}catch(o){throw l.removeCachedPortalItemLayer(e.portal.url,e.id,t),o}}}else i=q.has(e.type)?new w({data:new I({portalItem:e})}):await h.fromPortalItem(e)}return F(i,a,r,n,l,s)}export{T as constructAssociationMetaDataFeatureSetFromUrl,F as constructFeatureSet,j as constructFeatureSetFromPortalItem,A as constructFeatureSetFromRelationship,C as constructFeatureSetFromUrl,b as convertToFeatureSet,D as createFeatureSetCollectionFromMap,M as createFeatureSetCollectionFromService,_ as initialiseMetaDataCache};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{id as e}from"../../../kernel.js";import t from"../../../request.js";import{neverAbortedSignal as r}from"../../arcadeEnvironment.js";import a from"../../Attachment.js";import i from"../../Dictionary.js";import{throwIfCancelled as s,FeatureSetError as l}from"../support/errorsupport.js";import{RootFeatureSet as n,emptyFeaturesResult as o,assignSpatialReferenceOnFeatures as u}from"../support/FeatureSet.js";import{defaultMaxRecords as c,stableStringify as h,extractServiceUrl as d}from"../support/shared.js";import{toWhereClause as y,isSingleField as p}from"../support/sqlUtils.js";import{decodeStatType as _}from"../support/stats.js";import{splitIntoChunks as m,sliceEquals as f}from"../../../core/arrayUtils.js";import{createMD5Hash as F,outputTypes as w}from"../../../core/MD5.js";import{sqlAnd as S}from"../../../core/sql.js";import g from"../../../core/sql/WhereClause.js";import b from"../../../layers/FeatureLayer.js";import{toQueryStringParameters as R}from"../../../rest/query/operations/queryRelatedRecords.js";import I from"../../../rest/support/AttachmentQuery.js";import T from"../../../rest/support/Query.js";import q from"../../../rest/support/StatisticDefinition.js";function Q(e){if(0===e.length)throw new l("NeverReach");const t=[];for(let a=0;a<e.length;a++){const r=e[a],i=[`"${r.name.replaceAll('"','""')}" ${r.asc?">":"<"} @last_${a}`];for(let t=0;t<a;t++){const r=e[t];i.push(`"${r.name.replaceAll('"','""')}" = @last_${t}`)}t.push(i.join(" AND "))}const r=t.join(" OR ");return g.create(r)}function x(e,t){null==e.clause&&(e.clause=Q(e.keyFields));for(let r=0;r<e.keyFields.length;r++){const a=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[a]}}class v extends n{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._recentlyUsedQueries=null,this._featureSetQueryInterceptor=null,this._featureSetInfo=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry),e.lrucache&&(this._recentlyUsedQueries=e.lrucache),e.interceptor&&(this._featureSetQueryInterceptor=e.interceptor)}_maxQueryRate(){return c}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+h(e.toJSON());return F(t,w.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new T;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch{return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}async _queryAll(){return(await this.query({abortSignal:r})).features}async query(e){return await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter?o:this._canUsePagination()?this._queryUsingPaging(e):this._queryUsingIdSetTraversal(e)}async _queryUsingPaging(e){const t=this._layer.capabilities.query;let r=!0,a=null,i=!1;null!=e.orderBy&&(t.supportsOrderBy?(a=e.orderBy.toOrderByFields(),i=!0):r=!1);const s=await this.databaseType(),l=null==e.where?null==e.spatialFilter?"1=1":"":y(e.where,s),n=!0!==this._removeGeometry,o=this._overrideFields??this._fieldsIncludingObjectId(["*"]),u=o.includes("*")?this._layer.fields.length:o.length,c=(this.isTable()||!n?t.standardMaxRecordCountNoGeometry:void 0)??t.standardMaxRecordCount??t.maxRecordCount??this._maxQueryRate(),h=u<=50?1:u<=100?.5:u<=200?.25:.125,d=Math.max(Math.ceil(c*h),t.maxRecordCount??this._maxQueryRate()),p=this._createQuery();return p.where=S(p.where,l),null!=e.spatialFilter&&(p.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),p.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),p.geometry=e.spatialFilter.geometry),p.orderByFields=a,p.outFields=o,p.returnGeometry=n,p.outSpatialReference=this.spatialReference,p.resultType="standard",{ordered:i,filterApplied:!0,spatialFilterApplied:!0,features:this._queryPaginated(p,d,r?e.limit:null,e.abortSignal)}}async*_queryPaginated(e,t,r,a){let i;e.num=null!=r?Math.min(r,t):t,e.start=0;do{s(a),i=await this.executeQuery(e,"execute"),yield*m(i.features,this._maxQueryRate()),e.start+=i.features.length,e.num=null!=r?Math.min(r-e.start,t):t}while(e.num>0&&!0===i.exceededTransferLimit)}async _queryUsingIdSetTraversal(e){let t=!0,r=null,a=!1;null!=e.orderBy&&(this._layer.capabilities?.query?.supportsOrderBy?(r=e.orderBy.toOrderByFields(),a=!0):t=!1);const i=await this.databaseType(),l=null==e.where?null==e.spatialFilter?"1=1":"":y(e.where,i),n=this._createQuery();n.where=S(n.where,l),null!=e.spatialFilter&&(n.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),n.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),n.geometry=e.spatialFilter.geometry),n.orderByFields=r,n.outSpatialReference=this.spatialReference,n.num=t?e.limit:null;const u=await this.executeQuery(n,"executeForIds");if(s(e.abortSignal),null==u||u.length<=0)return o;let c=this._maxQueryRate();const h=this._layer.capabilities?.query.maxRecordCount;null!=h&&h<c&&(c=h);const d=this._createQuery();return n.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),n.returnGeometry=!0!==this._removeGeometry,n.outSpatialReference=this.spatialReference,{ordered:a,filterApplied:!0,spatialFilterApplied:!0,features:this._traverseIdSet(d,u,c,e.abortSignal)}}async*_traverseIdSet(e,t,r,a){for(let i=0;i<t.length;i+=r){e.objectIds=t.slice(i,i+r),s(a);const l=await this.executeQuery(e,"execute");yield l.features}}async queryStat(e){await this._ensureLoaded();const t=this._layer.capabilities?.query,r=!!t?.supportsSqlExpression,a=!!t?.supportsStatistics,i=!!t?.supportsDistinct,s=_(e.stat);if("count"===s)return i?this._queryCount(e):{calculated:!1};const n=e.field;if(null==n)return{calculated:!1};if(!1===a||!1===p(n)&&!1===r||!1===n.isStandardized)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,n,e.limit??c,e.abortSignal);if("distinct"===s)return!1===i?null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(s,n,e.limit??c,e.abortSignal):{calculated:!1};const o=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const u=this._createQuery();u.where=S(u.where,null==e.where?null==e.spatialFilter?"1=1":"":y(e.where,o)),null!=e.spatialFilter&&(u.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),u.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),u.geometry=e.spatialFilter.geometry);const h=new q;h.statisticType=s,h.onStatisticField=y(n,o),h.outStatisticFieldName="ARCADE_STAT_RESULT",u.returnGeometry=!1;let d="ARCADE_STAT_RESULT";u.outStatistics=[h];const m=await this.executeQuery(u,"execute");if(!m.hasOwnProperty("features")||0===m.features.length)throw new l("InvalidStatResponse");let f=!1;const F=m.fields??[];for(const l of F)if("ARCADE_STAT_RESULT"===l.name.toUpperCase()){d=l.name,"esriFieldTypeDate"===l.type&&(f=!0);break}const w=m.features[0].attributes[d];return{calculated:!0,result:f&&null!=w?new Date(w):w}}async _queryCount(e){const t=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const r=this._createQuery();r.where=S(r.where,null==e.where?null==e.spatialFilter?"1=1":"":y(e.where,t)),null!=e.spatialFilter&&(r.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),r.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),r.geometry=e.spatialFilter.geometry),r.returnGeometry=!1;return{calculated:!0,result:await this.executeQuery(r,"executeForCount")}}async canQueryAggregate(e){await this._ensureLoaded();let t=!1;const r=this._layer.capabilities?.query,a=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(t=!0),t)for(const i of e.statistics)(!1===i.workingexpr?.isStandardized||!1===p(i.workingexpr)&&!1===a)&&(t=!1);return t}async queryAggregate(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return o;const t=await this.databaseType(),r=e.groupBy,a=e.orderBy;let i=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const e=this.getFieldsIndex();i={keyFields:r.map((t,r)=>({name:e.normalizeFieldName(t)??t,asc:null==a||1===a._directions[r]}))}}let s=null,l=!1;null!=a&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==i||f(r,0,r.length,a._fields,0,Math.min(a._fields.length,r.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(s=a.toOrderByFields(),l=!0),null==s&&(s=r.slice());const n=e.statistics.map(e=>new q({onStatisticField:null!==e.workingexpr?y(e.workingexpr,t):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()}));let u=this._maxQueryRate();const c=this._layer.capabilities?.query.maxRecordCount;null!=c&&c<u&&(u=c);const h=null==e.where?null==e.spatialFilter?"1=1":"":y(e.where,t),d=this._createQuery();return d.where=S(d.where,h),null!=e.spatialFilter&&(d.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),d.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),d.geometry=e.spatialFilter.geometry),d.orderByFields=s,d.outFields=["*"],d.outStatistics=n,d.groupByFieldsForStatistics=r,d.returnGeometry=!1,null==i?{filterApplied:!0,spatialFilterApplied:!0,ordered:l,features:this._queryPaginated(d,u,null,e.abortSignal)}:{filterApplied:!0,spatialFilterApplied:!0,ordered:l,features:this._queryKeysetPaginated(d,i,e.abortSignal)}}async*_queryKeysetPaginated(e,t,r){const a=e.where;for(;;){if(null!=t.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new l("NotImplemented");e.where=S(a,y(t.clause,await this.databaseType()))}const i=await this.executeQuery(e,"execute");if(s(r),!i.hasOwnProperty("features"))throw new l("InvalidStatResponse");if(yield i.features,0===i.features.length||!0!==i.exceededTransferLimit)break;x(t,i.features.at(-1))}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?async e=>{const t=await this._layer.source.queryFeaturesJSON(e);return u(t.features,t.spatialReference??this.spatialReference.toJSON()),t}:"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let a=null;if(this._recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);a=this._recentlyUsedQueries.getFromCache(t),null===a&&(a=r(e),this._recentlyUsedQueries.addToCache(t,a),a=a.catch(e=>{throw this._recentlyUsedQueries?.removeFromCache(t),e}))}return this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===a&&(a=r(e)),a}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const a of t)if(a.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}static create(e,t,r,a,i){const s=new b({url:e,outFields:null===t?["*"]:t});return new v({layer:s,spatialReference:r,lrucache:a,interceptor:i})}relationshipMetadata(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return d(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,s,l){function n(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}const o=this._layer;if(!n(o))return[];const u=new I({objectIds:[e],returnMetadata:l});(t&&t>0||r&&r>0)&&(u.size=[t&&t>0?t:0,r&&r>0?r:t+1]),s&&s.length>0&&(u.attachmentTypes=s),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:o,query:u,method:"attachments"});const c=await o.queryAttachments(u);return c?.[e]?c[e].map(t=>{const r=`${this._layer.parsedUrl.path}/${e}/attachments/${t.id}`;let s=null;return l&&t.exifInfo&&(s=i.convertJsonToArcade(t.exifInfo,"system",!0)),new a(t.id,t.name,t.contentType,t.size,r,s,t.keywords??null)}):[]}async queryRelatedFeatures(e){const r=R(e);r.f="json",this._requestStandardised&&(r.sqlFormat="standard"),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:r,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const a=await t(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:r});if(a.data){const e={},t=a.data;if(t?.relatedRecordGroups){const r=t.spatialReference,a=!0===t.exceededTransferLimit;for(const i of t.relatedRecordGroups)u(i.relatedRecords,r),e[i.objectId]={features:i.relatedRecords,exceededTransferLimit:a}}return e}throw new l("InvalidRequest")}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=S(r.where,this.objectIdField+"="+e.toString()),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const a=await this._layer.source.queryFeaturesJSON(r);return 1===a.features.length?(u(a.features,a.spatialReference??this.spatialReference.toJSON()),a.features[0]):null}async getIdentityUser(){await this.load();const t=e?.findCredential(this._layer.url);return t?t.userId:null}async getOwningSystemUrl(){await this.load();const r=e?.findServerInfo(this._layer.url);if(r)return r.owningSystemUrl??"";let a=this._layer.url;const i=a.toLowerCase().indexOf("/rest/services");if(a=i>-1?a.slice(0,i):a,a){a+="/rest/info";try{const e=await t(a,{query:{f:"json"}});let r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch{return""}}return""}getDataSourceFeatureSet(){const e=new v({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this._recentlyUsedQueries??void 0,interceptor:this._featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this._featureSetInfo)return this._featureSetInfo;let e=null,r="serviceItemId"in this._layer?this._layer.serviceItemId:null;const a=this._layer.parsedUrl?.path??null;if(a){const i=await t(a,{responseType:"json",query:{f:"json"}});e=i?.data?.name??null,r=i?.data?.serviceItemId??null}const i=this._layer.title&&null!==(this._layer.parent??null);return this._featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===r?null:r,serviceLayerUrl:""===a?null:a,webMapLayerId:i?this._layer.id??null:null,webMapLayerTitle:i?this._layer.title??null:null,className:null,objectClassId:null},this._featureSetInfo}}export{v as default};
2
+ import{id as e}from"../../../kernel.js";import t from"../../../request.js";import{neverAbortedSignal as r}from"../../arcadeEnvironment.js";import a from"../../Attachment.js";import i from"../../Dictionary.js";import{throwIfCancelled as s,FeatureSetError as l}from"../support/errorsupport.js";import{RootFeatureSet as n,emptyFeaturesResult as o,getSpatialFilterRelationRestQueryParams as u,assignSpatialReferenceOnFeatures as c}from"../support/FeatureSet.js";import{defaultMaxRecords as d,stableStringify as h,extractServiceUrl as y}from"../support/shared.js";import{toWhereClause as p,isSingleField as _}from"../support/sqlUtils.js";import{decodeStatType as f}from"../support/stats.js";import{splitIntoChunks as m,sliceEquals as F}from"../../../core/arrayUtils.js";import{createMD5Hash as w,outputTypes as g}from"../../../core/MD5.js";import{sqlAnd as S}from"../../../core/sql.js";import b from"../../../core/sql/WhereClause.js";import I from"../../../layers/FeatureLayer.js";import{toQueryStringParameters as R}from"../../../rest/query/operations/queryRelatedRecords.js";import q from"../../../rest/support/AttachmentQuery.js";import T from"../../../rest/support/Query.js";import Q from"../../../rest/support/StatisticDefinition.js";function x(e){if(0===e.length)throw new l("NeverReach");const t=[];for(let a=0;a<e.length;a++){const r=e[a],i=[`"${r.name.replaceAll('"','""')}" ${r.asc?">":"<"} @last_${a}`];for(let t=0;t<a;t++){const r=e[t];i.push(`"${r.name.replaceAll('"','""')}" = @last_${t}`)}t.push(i.join(" AND "))}const r=t.join(" OR ");return b.create(r)}function v(e,t){null==e.clause&&(e.clause=x(e.keyFields));for(let r=0;r<e.keyFields.length;r++){const a=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[a]}}class j extends n{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._recentlyUsedQueries=null,this._featureSetQueryInterceptor=null,this._featureSetInfo=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry),e.lrucache&&(this._recentlyUsedQueries=e.lrucache),e.interceptor&&(this._featureSetQueryInterceptor=e.interceptor)}_maxQueryRate(){return d}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+h(e.toJSON());return w(t,g.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new T;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch{return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}async _queryAll(){return(await this.query({abortSignal:r})).features}async query(e){return await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter?o:this._canUsePagination()?this._queryUsingPaging(e):this._queryUsingIdSetTraversal(e)}async _queryUsingPaging(e){const t=this._layer.capabilities.query;let r=!0,a=null,i=!1;null!=e.orderBy&&(t.supportsOrderBy?(a=e.orderBy.toOrderByFields(),i=!0):r=!1);const s=await this.databaseType(),l=null==e.where?null==e.spatialFilter?"1=1":"":p(e.where,s),n=!0!==this._removeGeometry,o=this._overrideFields??this._fieldsIncludingObjectId(["*"]),c=o.includes("*")?this._layer.fields.length:o.length,d=(this.isTable()||!n?t.standardMaxRecordCountNoGeometry:void 0)??t.standardMaxRecordCount??t.maxRecordCount??this._maxQueryRate(),h=c<=50?1:c<=100?.5:c<=200?.25:.125,y=Math.max(Math.ceil(d*h),t.maxRecordCount??this._maxQueryRate()),_=this._createQuery();if(_.where=S(_.where,l),null!=e.spatialFilter){const t=u(e.spatialFilter.relation);_.spatialRelationship=t.spatialRelationship,_.relationParameter=t.relationParameter,_.geometry=e.spatialFilter.geometry}return _.orderByFields=a,_.outFields=o,_.returnGeometry=n,_.outSpatialReference=this.spatialReference,_.resultType="standard",{ordered:i,filterApplied:!0,spatialFilterApplied:!0,features:this._queryPaginated(_,y,r?e.limit:null,e.abortSignal)}}async*_queryPaginated(e,t,r,a){let i;e.num=null!=r?Math.min(r,t):t,e.start=0;do{s(a),i=await this.executeQuery(e,"execute"),yield*m(i.features,this._maxQueryRate()),e.start+=i.features.length,e.num=null!=r?Math.min(r-e.start,t):t}while(e.num>0&&!0===i.exceededTransferLimit)}async _queryUsingIdSetTraversal(e){let t=!0,r=null,a=!1;null!=e.orderBy&&(this._layer.capabilities?.query?.supportsOrderBy?(r=e.orderBy.toOrderByFields(),a=!0):t=!1);const i=await this.databaseType(),l=null==e.where?null==e.spatialFilter?"1=1":"":p(e.where,i),n=this._createQuery();if(n.where=S(n.where,l),null!=e.spatialFilter){const t=u(e.spatialFilter.relation);n.spatialRelationship=t.spatialRelationship,n.relationParameter=t.relationParameter,n.geometry=e.spatialFilter.geometry}n.orderByFields=r,n.outSpatialReference=this.spatialReference,n.num=t?e.limit:null;const c=await this.executeQuery(n,"executeForIds");if(s(e.abortSignal),null==c||c.length<=0)return o;let d=this._maxQueryRate();const h=this._layer.capabilities?.query.maxRecordCount;null!=h&&h<d&&(d=h);const y=this._createQuery();return n.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),n.returnGeometry=!0!==this._removeGeometry,n.outSpatialReference=this.spatialReference,{ordered:a,filterApplied:!0,spatialFilterApplied:!0,features:this._traverseIdSet(y,c,d,e.abortSignal)}}async*_traverseIdSet(e,t,r,a){for(let i=0;i<t.length;i+=r){e.objectIds=t.slice(i,i+r),s(a);const l=await this.executeQuery(e,"execute");yield l.features}}async queryStat(e){await this._ensureLoaded();const t=this._layer.capabilities?.query,r=!!t?.supportsSqlExpression,a=!!t?.supportsStatistics,i=!!t?.supportsDistinct,s=f(e.stat);if("count"===s)return i?this._queryCount(e):{calculated:!1};const n=e.field;if(null==n)return{calculated:!1};if(!1===a||!1===_(n)&&!1===r||!1===n.isStandardized)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,n,e.limit??d,e.abortSignal);if("distinct"===s)return!1===i?null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(s,n,e.limit??d,e.abortSignal):{calculated:!1};const o=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const c=this._createQuery();if(c.where=S(c.where,null==e.where?null==e.spatialFilter?"1=1":"":p(e.where,o)),null!=e.spatialFilter){const t=u(e.spatialFilter.relation);c.spatialRelationship=t.spatialRelationship,c.relationParameter=t.relationParameter,c.geometry=e.spatialFilter.geometry}const h=new Q;h.statisticType=s,h.onStatisticField=p(n,o),h.outStatisticFieldName="ARCADE_STAT_RESULT",c.returnGeometry=!1;let y="ARCADE_STAT_RESULT";c.outStatistics=[h];const m=await this.executeQuery(c,"execute");if(!m.hasOwnProperty("features")||0===m.features.length)throw new l("InvalidStatResponse");let F=!1;const w=m.fields??[];for(const l of w)if("ARCADE_STAT_RESULT"===l.name.toUpperCase()){y=l.name,"esriFieldTypeDate"===l.type&&(F=!0);break}const g=m.features[0].attributes[y];return{calculated:!0,result:F&&null!=g?new Date(g):g}}async _queryCount(e){const t=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const r=this._createQuery();if(r.where=S(r.where,null==e.where?null==e.spatialFilter?"1=1":"":p(e.where,t)),null!=e.spatialFilter){const t=u(e.spatialFilter.relation);r.spatialRelationship=t.spatialRelationship,r.relationParameter=t.relationParameter,r.geometry=e.spatialFilter.geometry}r.returnGeometry=!1;return{calculated:!0,result:await this.executeQuery(r,"executeForCount")}}async canQueryAggregate(e){await this._ensureLoaded();let t=!1;const r=this._layer.capabilities?.query,a=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(t=!0),t)for(const i of e.statistics)(!1===i.workingexpr?.isStandardized||!1===_(i.workingexpr)&&!1===a)&&(t=!1);return t}async queryAggregate(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return o;const t=await this.databaseType(),r=e.groupBy,a=e.orderBy;let i=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const e=this.getFieldsIndex();i={keyFields:r.map((t,r)=>({name:e.normalizeFieldName(t)??t,asc:null==a||1===a._directions[r]}))}}let s=null,l=!1;null!=a&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==i||F(r,0,r.length,a._fields,0,Math.min(a._fields.length,r.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(s=a.toOrderByFields(),l=!0),null==s&&(s=r.slice());const n=e.statistics.map(e=>new Q({onStatisticField:null!==e.workingexpr?p(e.workingexpr,t):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()}));let c=this._maxQueryRate();const d=this._layer.capabilities?.query.maxRecordCount;null!=d&&d<c&&(c=d);const h=null==e.where?null==e.spatialFilter?"1=1":"":p(e.where,t),y=this._createQuery();if(y.where=S(y.where,h),null!=e.spatialFilter){const t=u(e.spatialFilter.relation);y.spatialRelationship=t.spatialRelationship,y.relationParameter=t.relationParameter,y.geometry=e.spatialFilter.geometry}return y.orderByFields=s,y.outFields=["*"],y.outStatistics=n,y.groupByFieldsForStatistics=r,y.returnGeometry=!1,null==i?{filterApplied:!0,spatialFilterApplied:!0,ordered:l,features:this._queryPaginated(y,c,null,e.abortSignal)}:{filterApplied:!0,spatialFilterApplied:!0,ordered:l,features:this._queryKeysetPaginated(y,i,e.abortSignal)}}async*_queryKeysetPaginated(e,t,r){const a=e.where;for(;;){if(null!=t.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new l("NotImplemented");e.where=S(a,p(t.clause,await this.databaseType()))}const i=await this.executeQuery(e,"execute");if(s(r),!i.hasOwnProperty("features"))throw new l("InvalidStatResponse");if(yield i.features,0===i.features.length||!0!==i.exceededTransferLimit)break;v(t,i.features.at(-1))}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?async e=>{const t=await this._layer.source.queryFeaturesJSON(e);return c(t.features,t.spatialReference??this.spatialReference.toJSON()),t}:"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let a=null;if(this._recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);a=this._recentlyUsedQueries.getFromCache(t),null===a&&(a=r(e),this._recentlyUsedQueries.addToCache(t,a),a=a.catch(e=>{throw this._recentlyUsedQueries?.removeFromCache(t),e}))}return this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===a&&(a=r(e)),a}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const a of t)if(a.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}static create(e,t,r,a,i){const s=new I({url:e,outFields:null===t?["*"]:t});return new j({layer:s,spatialReference:r,lrucache:a,interceptor:i})}relationshipMetadata(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return y(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,s,l){function n(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}const o=this._layer;if(!n(o))return[];const u=new q({objectIds:[e],returnMetadata:l});(t&&t>0||r&&r>0)&&(u.size=[t&&t>0?t:0,r&&r>0?r:t+1]),s&&s.length>0&&(u.attachmentTypes=s),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:o,query:u,method:"attachments"});const c=await o.queryAttachments(u);return c?.[e]?c[e].map(t=>{const r=`${this._layer.parsedUrl.path}/${e}/attachments/${t.id}`;let s=null;return l&&t.exifInfo&&(s=i.convertJsonToArcade(t.exifInfo,"system",!0)),new a(t.id,t.name,t.contentType,t.size,r,s,t.keywords??null)}):[]}async queryRelatedFeatures(e){const r=R(e);r.f="json",this._requestStandardised&&(r.sqlFormat="standard"),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:r,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const a=await t(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:r});if(a.data){const e={},t=a.data;if(t?.relatedRecordGroups){const r=t.spatialReference,a=!0===t.exceededTransferLimit;for(const i of t.relatedRecordGroups)c(i.relatedRecords,r),e[i.objectId]={features:i.relatedRecords,exceededTransferLimit:a}}return e}throw new l("InvalidRequest")}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=S(r.where,this.objectIdField+"="+e.toString()),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const a=await this._layer.source.queryFeaturesJSON(r);return 1===a.features.length?(c(a.features,a.spatialReference??this.spatialReference.toJSON()),a.features[0]):null}async getIdentityUser(){await this.load();const t=e?.findCredential(this._layer.url);return t?t.userId:null}async getOwningSystemUrl(){await this.load();const r=e?.findServerInfo(this._layer.url);if(r)return r.owningSystemUrl??"";let a=this._layer.url;const i=a.toLowerCase().indexOf("/rest/services");if(a=i>-1?a.slice(0,i):a,a){a+="/rest/info";try{const e=await t(a,{query:{f:"json"}});let r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch{return""}}return""}getDataSourceFeatureSet(){const e=new j({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this._recentlyUsedQueries??void 0,interceptor:this._featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this._featureSetInfo)return this._featureSetInfo;let e=null,r="serviceItemId"in this._layer?this._layer.serviceItemId:null;const a=this._layer.parsedUrl?.path??null;if(a){const i=await t(a,{responseType:"json",query:{f:"json"}});e=i?.data?.name??null,r=i?.data?.serviceItemId??null}const i=this._layer.title&&null!==(this._layer.parent??null);return this._featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===r?null:r,serviceLayerUrl:""===a?null:a,webMapLayerId:i?this._layer.id??null:null,webMapLayerTitle:i?this._layer.title??null:null,className:null,objectClassId:null},this._featureSetInfo}}export{j as default};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{neverAbortedSignal as e}from"../../arcadeEnvironment.js";import{throwIfCancelled as t,FeatureSetError as r}from"../support/errorsupport.js";import{RootFeatureSet as i,emptyFeaturesResult as a,assignSpatialReferenceOnFeatures as s,getSpatialFilterRelationRestQueryParams as l}from"../support/FeatureSet.js";import{defaultMaxRecords as n}from"../support/shared.js";import{toWhereClause as u}from"../support/sqlUtils.js";import{decodeStatType as o}from"../support/stats.js";import{splitIntoChunks as c}from"../../../core/arrayUtils.js";import{sqlAnd as h}from"../../../core/sql.js";import p from"../../../rest/support/StatisticDefinition.js";const y=new FinalizationRegistry(e=>{e.abort()});class d extends i{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerParquet",this._outFields=null,this._returnGeometry=!0,this._ignoreDefinitionExpression=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),null!=e.outFields&&(this._outFields=e.outFields),null!=e.includeGeometry&&(this._returnGeometry=e.includeGeometry)}_maxQueryRate(){return n}async loadImpl(){return this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.objectIdField=this._layer.objectIdField,null!==this._outFields)if(1===this._outFields.length&&"*"===this._outFields[0])this._outFields=null;else{const e=new Set(this._outFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._outFields=this.fields.map(({name:e})=>e)}this._databaseType=0}getDataSourceFeatureSet(){const e=new d({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._outFields??void 0,includeGeometry:this._returnGeometry});return e._ignoreDefinitionExpression=!0,e}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this._ignoreDefinitionExpression&&(e.where=null),e}isTable(){return this._layer.isTable}async _queryAll(){return(await this.query({abortSignal:e})).features}async query(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return a;const t={type:"arcade",returnGeometry:this._returnGeometry,outSpatialReference:(this.spatialReference??this._layer.spatialReference).toJSON(),outFields:Array.from(new Set(this._outFields??this._layer.fields.map(e=>e.name))),where:h(this._ignoreDefinitionExpression?null:this._layer.definitionExpression,e.where?u(e.where,0):null),extent:null};if(null!=e.spatialFilter)switch(e.spatialFilter.relation){case"esriSpatialRelIntersects":case"esriSpatialRelContains":case"esriSpatialRelOverlaps":case"esriSpatialRelWithin":case"esriSpatialRelTouches":case"esriSpatialRelCrosses":{const r=e.spatialFilter.geometry.extent;null!=r&&(t.extent=r.toJSON());break}}return{filterApplied:!0,spatialFilterApplied:!1,ordered:!1,features:await this._queryParquetStream(t,e.abortSignal)}}async _queryParquetStream(e,t){const r=new AbortController,i=await this._layer.source._queryStream(e,{signal:r.signal}),a=this._iterateParquetStream(i,r,t);return y.register(a,r,r),a}async*_iterateParquetStream(e,r,i){try{for(;;){const a=await this._layer.source._getStreamNextFeatures(e,{signal:r.signal});if(i.aborted&&(r.abort(),t(i)),null==a)break;s(a.features,a.spatialReference??this.spatialReference.toJSON()),yield a.features}}finally{y.unregister(r)}}async isEmpty(){return this._totalCount>=0?0===this._totalCount:(this._totalCount=await this._layer.queryFeatureCount(this._createQuery()),this._totalCount<=0)}async queryStat(e){await this._ensureLoaded();const t=o(e.stat);if("count"===t)return this._queryCount(e);const i=e.field;if(null==i)throw new r("NeverReach");if(!0!==this._layer.capabilities?.query.supportsStatistics)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,i,e.limit??n,e.abortSignal);if("distinct"===t)return{calculated:!1};if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const a=this._createQuery();if(a.returnGeometry=!1,a.where=h(a.where,e.where?u(e.where,0):null),null!=e.spatialFilter){const t=l(e.spatialFilter.relation);a.spatialRelationship=t.spatialRelationship,a.relationParameter=t.relationParameter,a.geometry=e.spatialFilter.geometry}const s=new p;s.statisticType=t,s.onStatisticField=u(i,0);const c="ARCADE_STAT_RESULT";s.outStatisticFieldName=c,a.outStatistics=[s];const y=await this._layer.source.queryFeaturesJSON(a);if(y.features.length<=0)throw new r("InvalidStatResponse");const d=y.features[0].attributes[c];return{calculated:!0,result:"esriFieldTypeDate"===y.fields?.find(e=>e.name===c)?.type&&null!=d?new Date(d):d}}async _queryCount(e){if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const t=this._createQuery();if(t.where=h(t.where,e.where?u(e.where,0):null),null!=e.spatialFilter){const r=l(e.spatialFilter.relation);t.spatialRelationship=r.spatialRelationship,t.relationParameter=r.relationParameter,t.geometry=e.spatialFilter.geometry}return t.returnGeometry=!1,{calculated:!0,result:await this._layer.queryFeatureCount(t)}}async canQueryAggregate(e){await this._ensureLoaded();const t=this._layer.capabilities?.query;return!0===t?.supportsStatistics&&null==e.spatialFilter}async queryAggregate(e){await this._ensureLoaded();const r=this._createQuery();return r.where=h(r.where,e.where?u(e.where,0):null),r.orderByFields=e.orderBy?.toOrderByFields(),r.outFields=["*"],r.outStatistics=e.statistics.map(e=>new p({onStatisticField:null!==e.workingexpr?u(e.workingexpr,0):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()})),r.groupByFieldsForStatistics=e.groupBy,r.returnGeometry=!1,{filterApplied:!0,spatialFilterApplied:!0,ordered:null!=e.orderBy,features:async function*(){const i=await this._layer.source.queryFeaturesJSON(r);t(e.abortSignal);for(const e of c(i.features,this._maxQueryRate()))s(e,i.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}async queryAttachments(){return[]}serviceUrl(){return""}relationshipMetadata(){return[]}get gdbVersion(){return""}getFeatureByObjectId(){throw new r("NeverReach")}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return null}get dateFieldsTimeZone(){return null}get datesInUnknownTimezone(){return!1}get editFieldsInfo(){return null}get timeInfo(){return null}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}export{d as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../Graphic.js";import{neverAbortedSignal as t}from"../../arcadeEnvironment.js";import a from"./cache.js";import{throwIfCancelled as s,FeatureSetError as r}from"./errorsupport.js";import{QueryIterator as i}from"./FeatureSetIterator.js";import{layerGeometryEsriConstants as n,esriFieldToJson as l,layerGeometryEsriRestConstants as o}from"./shared.js";import{max as u,min as h,sum as d,variance as c,stdev as p,mean as y,distinct as m}from"./stats.js";import{invokeRemoteGeometryOp as f}from"../../geometry/operatorsWorkerConnection.js";import{cacheAsync as _}from"../../../core/iteratorUtils.js";import g from"../../../core/sql/WhereClause.js";import b from"../../../geometry/SpatialReference.js";import{fromJSON as T}from"../../../geometry/support/jsonUtils.js";import F from"../../../layers/support/FieldsIndex.js";function I(e,t){for(const a of e)null!=a.geometry&&(a.geometry.spatialReference??=t)}const w=Object.freeze({ordered:!0,filterApplied:!0,spatialFilterApplied:!0,features:Object.freeze({next:()=>Promise.resolve({done:!0,value:void 0}),[Symbol.asyncIterator](){return this}})});class S{constructor(){this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._parent=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=7,this._databaseTypeProbed=null,this._loadPromise=null,this._allFeatures=null,this._fieldsIndex=null,this.typeIdField=null,this.types=null,this.subtypeField=null,this.subtypes=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return await(this._parent?.load()),this._initialiseFeatureSet(),this}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new b({wkid:4326}),this.geometryType=n.point)}getField(e,t){return e=e.toLowerCase(),(t||this.fields).find(t=>t.name.toLowerCase()===e)}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=F.fromLayer({timeInfo:this.timeInfo,editFieldsInfo:this.editFieldsInfo,dateFieldsTimeZone:this.dateFieldsTimeZone,datesInUnknownTimezone:this.datesInUnknownTimezone,fields:this.fields})),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}nativeCapabilities(){return this._parent.nativeCapabilities()}get _hasCachedFeatures(){return null!=this._allFeatures}async queryAll(e){null==this._allFeatures&&(this._allFeatures=this._queryAll().then(e=>_(e)));const a=(await this._allFeatures)();return null==e||e===t?a:async function*(){for await(const t of a)s(e),yield t}()}async databaseType(){if(7===this._databaseType){if(null!==a.applicationCache){const e=a.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==a.applicationCache&&a.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==a.applicationCache&&a.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{dbType:2,probeSql:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{dbType:3,probeSql:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{dbType:1,probeSql:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e){if(!0===await this._runDatabaseProbe(t.probeSql))return t.dbType}return 1}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new r("NotImplemented")}isTable(){return this._parent?.isTable()??!1}async first(t){if(this._hasCachedFeatures)return this.iterator(t).next();const a=await this.query({limit:1,abortSignal:t});for await(const s of a.features)if(s.length>0)return e.fromJSON(s[0]);return null}async isEmpty(e){return this._totalCount>=0?0===this._totalCount:null==await this.first(e)}async calculateStatistic(e,t,a,s){await this._ensureLoaded();let r=await this.queryStat({stat:e,field:t,limit:a,abortSignal:s});return!1===r.calculated&&(r=await this._manualStat(e,t,a,s)),r.result}async _manualStat(e,t,a,s){let r=null;switch(e.toLowerCase()){case"count":{if(this._totalCount>=0)return{calculated:!0,result:this._totalCount};const e=await this.queryAll(s);let t=0;for await(const a of e)t+=a.length;return this._totalCount=t,{calculated:!0,result:t}}case"distinct":return r=await m(this,t,a,s),{calculated:!0,result:r};case"avg":case"mean":return r=await y(this,t,s),{calculated:!0,result:r};case"stdev":return r=await p(this,t,s),{calculated:!0,result:r};case"variance":return r=await c(this,t,s),{calculated:!0,result:r};case"sum":return r=await d(this,t,s),{calculated:!0,result:r};case"min":return r=await h(this,t,s),{calculated:!0,result:r};case"max":return r=await u(this,t,s),{calculated:!0,result:r};default:return{calculated:!0,result:0}}}iterator(e){return new i(this,e)}async sumArea(e,t,a){let s=0;for await(const r of await this.queryAll(a))for(const a of r)null!=a.geometry&&(s+=null!=t?await f("geodeticArea",[a.geometry,e,t]):await f("area",[a.geometry,e]));return s}async sumLength(e,t,a){let s=0;for await(const r of await this.queryAll(a))for(const a of r)null!=a.geometry&&(s+=null!=t?await f("geodeticLength",[a.geometry,e,t]):await f("length",[a.geometry,e]));return s}async count(e){return await this.load(),this.calculateStatistic("count",g.create("1",{fieldsIndex:this.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),-1,e??t)}castToText(e=!1){return"object, FeatureSet"}queryAttachments(e,t,a,s,r){return this._parent.queryAttachments(e,t,a,s,r)}serviceUrl(){return this._parent.serviceUrl()}subtypeMetadata(){return this.subtypeField&&this.subtypes?{subtypeField:this.subtypeField,subtypes:this.subtypes?this.subtypes.map(e=>({name:e.name,code:e.code})):[]}:this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map(e=>({name:e.name,code:e.id})):[]}:null}relationshipMetadata(){return this._parent.relationshipMetadata()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push(l(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===o[this.geometryType]?"esriGeometryNull":o[this.geometryType],fields:e}}async convertToText(e,t){if("schema"===e)return await this._ensureLoaded(),JSON.stringify(this.schema());if("featureset"===e){await this._ensureLoaded();const e=[];for await(const a of await this.queryAll(t))for(const t of a){const a={geometry:t.geometry??null,attributes:t.attributes};if(null!==a.geometry&&a.geometry.spatialReference){const{spatialReference:e,...t}=a.geometry;a.geometry=t}e.push(a)}return JSON.stringify({...this.schema(),features:e,spatialReference:this.spatialReference.toJSON()})}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return this._parent.getRootFeatureSet()}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===e?.featureset?this:"none"===e?.featureset?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){if("keeptype"===t?.featureset)return this;if("schema"===t?.featureset)return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if("none"===t?.featureset)return null;await this._ensureLoaded();const a=[];for await(const s of await this.queryAll(e))for(const e of s){const s={geometry:e.geometry?!0===t?.keepGeometryType?T(e.geometry):e.geometry:null,attributes:e.attributes};if(null!==s.geometry&&s.geometry.spatialReference&&!0!==t?.keepGeometryType){delete s.geometry.spatialReference;const{spatialReference:e,...t}=s.geometry;s.geometry=t}a.push(s)}return{...this.schema(),features:a,spatialReference:!0===t?.keepGeometryType?this.spatialReference:this.spatialReference?.toJSON()}}fieldTimeZone(e){return this.getFieldsIndex().getTimeZone(e)}get preferredTimeZone(){return this._parent?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._parent?.dateFieldsTimeZone??null}get dateFieldsTimeZoneDefaultUTC(){return this.datesInUnknownTimezone?"unknown":this.dateFieldsTimeZone||"UTC"}get datesInUnknownTimezone(){return this._parent.datesInUnknownTimezone}get editFieldsInfo(){return this._parent?.editFieldsInfo??null}get timeInfo(){return this._parent?.timeInfo??null}getFeatureSetInfo(){return this._parent?this._parent.getFeatureSetInfo():Promise.resolve(null)}}class C extends S{constructor(){super(...arguments),this._parent=null}getRootFeatureSet(){return this}}export{S as FeatureSet,C as RootFeatureSet,I as assignSpatialReferenceOnFeatures,w as emptyFeaturesResult};
2
+ import e from"../../../Graphic.js";import{neverAbortedSignal as t}from"../../arcadeEnvironment.js";import a from"./cache.js";import{throwIfCancelled as s,FeatureSetError as r}from"./errorsupport.js";import{QueryIterator as i}from"./FeatureSetIterator.js";import{layerGeometryEsriConstants as n,esriFieldToJson as l,layerGeometryEsriRestConstants as o}from"./shared.js";import{max as u,min as h,sum as p,variance as c,stdev as d,mean as m,distinct as y}from"./stats.js";import{invokeRemoteGeometryOp as f}from"../../geometry/operatorsWorkerConnection.js";import{cacheAsync as _}from"../../../core/iteratorUtils.js";import g from"../../../core/sql/WhereClause.js";import b from"../../../geometry/SpatialReference.js";import{fromJSON as T}from"../../../geometry/support/jsonUtils.js";import F from"../../../layers/support/FieldsIndex.js";function I(e){switch(e){case"esriSpatialRelIntersects":return{spatialRelationship:"intersects",relationParameter:null};case"esriSpatialRelContains":return{spatialRelationship:"contains",relationParameter:null};case"esriSpatialRelOverlaps":return{spatialRelationship:"overlaps",relationParameter:null};case"esriSpatialRelWithin":return{spatialRelationship:"within",relationParameter:null};case"esriSpatialRelTouches":return{spatialRelationship:"touches",relationParameter:null};case"esriSpatialRelCrosses":return{spatialRelationship:"crosses",relationParameter:null};case"esriSpatialRelEnvelopeIntersects":return{spatialRelationship:"envelope-intersects",relationParameter:null};default:if(e.includes("esriSpatialRelRelation"))return{spatialRelationship:"relation",relationParameter:e.split(":")[1]};throw new r("NeverReach")}}function w(e,t){for(const a of e)null!=a.geometry&&(a.geometry.spatialReference??=t)}const S=Object.freeze({ordered:!0,filterApplied:!0,spatialFilterApplied:!0,features:Object.freeze({next:()=>Promise.resolve({done:!0,value:void 0}),[Symbol.asyncIterator](){return this}})});class R{constructor(){this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._parent=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=7,this._databaseTypeProbed=null,this._loadPromise=null,this._allFeatures=null,this._fieldsIndex=null,this.typeIdField=null,this.types=null,this.subtypeField=null,this.subtypes=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return await(this._parent?.load()),this._initialiseFeatureSet(),this}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new b({wkid:4326}),this.geometryType=n.point)}getField(e,t){return e=e.toLowerCase(),(t||this.fields).find(t=>t.name.toLowerCase()===e)}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=F.fromLayer({timeInfo:this.timeInfo,editFieldsInfo:this.editFieldsInfo,dateFieldsTimeZone:this.dateFieldsTimeZone,datesInUnknownTimezone:this.datesInUnknownTimezone,fields:this.fields})),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}nativeCapabilities(){return this._parent.nativeCapabilities()}get _hasCachedFeatures(){return null!=this._allFeatures}async queryAll(e){null==this._allFeatures&&(this._allFeatures=this._queryAll().then(e=>_(e)));const a=(await this._allFeatures)();return null==e||e===t?a:async function*(){for await(const t of a)s(e),yield t}()}async databaseType(){if(7===this._databaseType){if(null!==a.applicationCache){const e=a.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==a.applicationCache&&a.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==a.applicationCache&&a.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{dbType:2,probeSql:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{dbType:3,probeSql:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{dbType:1,probeSql:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e){if(!0===await this._runDatabaseProbe(t.probeSql))return t.dbType}return 1}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new r("NotImplemented")}isTable(){return this._parent?.isTable()??!1}async first(t){if(this._hasCachedFeatures)return this.iterator(t).next();const a=await this.query({limit:1,abortSignal:t});for await(const s of a.features)if(s.length>0)return e.fromJSON(s[0]);return null}async isEmpty(e){return this._totalCount>=0?0===this._totalCount:null==await this.first(e)}async calculateStatistic(e,t,a,s){await this._ensureLoaded();let r=await this.queryStat({stat:e,field:t,limit:a,abortSignal:s});return!1===r.calculated&&(r=await this._manualStat(e,t,a,s)),r.result}async _manualStat(e,t,a,s){let r=null;switch(e.toLowerCase()){case"count":{if(this._totalCount>=0)return{calculated:!0,result:this._totalCount};const e=await this.queryAll(s);let t=0;for await(const a of e)t+=a.length;return this._totalCount=t,{calculated:!0,result:t}}case"distinct":return r=await y(this,t,a,s),{calculated:!0,result:r};case"avg":case"mean":return r=await m(this,t,s),{calculated:!0,result:r};case"stdev":return r=await d(this,t,s),{calculated:!0,result:r};case"variance":return r=await c(this,t,s),{calculated:!0,result:r};case"sum":return r=await p(this,t,s),{calculated:!0,result:r};case"min":return r=await h(this,t,s),{calculated:!0,result:r};case"max":return r=await u(this,t,s),{calculated:!0,result:r};default:return{calculated:!0,result:0}}}iterator(e){return new i(this,e)}async sumArea(e,t,a){let s=0;for await(const r of await this.queryAll(a))for(const a of r)null!=a.geometry&&(s+=null!=t?await f("geodeticArea",[a.geometry,e,t]):await f("area",[a.geometry,e]));return s}async sumLength(e,t,a){let s=0;for await(const r of await this.queryAll(a))for(const a of r)null!=a.geometry&&(s+=null!=t?await f("geodeticLength",[a.geometry,e,t]):await f("length",[a.geometry,e]));return s}async count(e){return await this.load(),this.calculateStatistic("count",g.create("1",{fieldsIndex:this.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),-1,e??t)}castToText(e=!1){return"object, FeatureSet"}queryAttachments(e,t,a,s,r){return this._parent.queryAttachments(e,t,a,s,r)}serviceUrl(){return this._parent.serviceUrl()}subtypeMetadata(){return this.subtypeField&&this.subtypes?{subtypeField:this.subtypeField,subtypes:this.subtypes?this.subtypes.map(e=>({name:e.name,code:e.code})):[]}:this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map(e=>({name:e.name,code:e.id})):[]}:null}relationshipMetadata(){return this._parent.relationshipMetadata()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push(l(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===o[this.geometryType]?"esriGeometryNull":o[this.geometryType],fields:e}}async convertToText(e,t){if("schema"===e)return await this._ensureLoaded(),JSON.stringify(this.schema());if("featureset"===e){await this._ensureLoaded();const e=[];for await(const a of await this.queryAll(t))for(const t of a){const a={geometry:t.geometry??null,attributes:t.attributes};if(null!==a.geometry&&a.geometry.spatialReference){const{spatialReference:e,...t}=a.geometry;a.geometry=t}e.push(a)}return JSON.stringify({...this.schema(),features:e,spatialReference:this.spatialReference.toJSON()})}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return this._parent.getRootFeatureSet()}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===e?.featureset?this:"none"===e?.featureset?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){if("keeptype"===t?.featureset)return this;if("schema"===t?.featureset)return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if("none"===t?.featureset)return null;await this._ensureLoaded();const a=[];for await(const s of await this.queryAll(e))for(const e of s){const s={geometry:e.geometry?!0===t?.keepGeometryType?T(e.geometry):e.geometry:null,attributes:e.attributes};if(null!==s.geometry&&s.geometry.spatialReference&&!0!==t?.keepGeometryType){delete s.geometry.spatialReference;const{spatialReference:e,...t}=s.geometry;s.geometry=t}a.push(s)}return{...this.schema(),features:a,spatialReference:!0===t?.keepGeometryType?this.spatialReference:this.spatialReference?.toJSON()}}fieldTimeZone(e){return this.getFieldsIndex().getTimeZone(e)}get preferredTimeZone(){return this._parent?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._parent?.dateFieldsTimeZone??null}get dateFieldsTimeZoneDefaultUTC(){return this.datesInUnknownTimezone?"unknown":this.dateFieldsTimeZone||"UTC"}get datesInUnknownTimezone(){return this._parent.datesInUnknownTimezone}get editFieldsInfo(){return this._parent?.editFieldsInfo??null}get timeInfo(){return this._parent?.timeInfo??null}getFeatureSetInfo(){return this._parent?this._parent.getFeatureSetInfo():Promise.resolve(null)}}class C extends R{constructor(){super(...arguments),this._parent=null}getRootFeatureSet(){return this}}export{R as FeatureSet,C as RootFeatureSet,w as assignSpatialReferenceOnFeatures,S as emptyFeaturesResult,I as getSpatialFilterRelationRestQueryParams};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{ArcadeDate as e}from"../../ArcadeDate.js";import{DateOnly as i}from"../../../core/sql/DateOnly.js";import{TimeOnly as r}from"../../../core/sql/TimeOnly.js";import t from"../../../layers/support/Field.js";import{DateTime as n}from"luxon";function o(e){return t.fromJSON(e.toJSON())}function l(e){return e.toJSON?e.toJSON():e}function s(e){return"string"==typeof e||e instanceof String}function y(e){return"boolean"==typeof e}function p(e){return"number"==typeof e}function u(e){return Array.isArray(e)}function c(e){return e instanceof Date}function m(e){return e instanceof n}function a(i){return i instanceof e}function f(e){return e instanceof i}function d(e){return e instanceof r}function T(e,i){return e===i||!(!c(e)&&!a(e)||!c(i)&&!a(i))&&e.getTime()===i.getTime()}function g(e){const i={};for(const r in e)i[r]=e[r];return i}function F(e,i){return e===i||("point"===e&&"esriGeometryPoint"===i||("polyline"===e&&"esriGeometryPolyline"===i||("polygon"===e&&"esriGeometryPolygon"===i||("extent"===e&&"esriGeometryEnvelope"===i||("multipoint"===e&&"esriGeometryMultipoint"===i||("point"===i&&"esriGeometryPoint"===e||("polyline"===i&&"esriGeometryPolyline"===e||("polygon"===i&&"esriGeometryPolygon"===e||("extent"===i&&"esriGeometryEnvelope"===e||"multipoint"===i&&"esriGeometryMultipoint"===e)))))))))}const G=1e3;function O(e){return function(i){e.reject(i)}}function b(e,i){return function(){try{e.apply(null,arguments)}catch(r){i.reject(r)}}}const S={point:"point",polygon:"polygon",polyline:"polyline",multipoint:"multipoint",extent:"extent",esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint",esriGeometryEnvelope:"extent",envelope:"extent"},D={point:"esriGeometryPoint",polygon:"esriGeometryPolygon",polyline:"esriGeometryPolyline",multipoint:"esriGeometryMultipoint",extent:"esriGeometryEnvelope",esriGeometryPoint:"esriGeometryPoint",esriGeometryPolygon:"esriGeometryPolygon",esriGeometryPolyline:"esriGeometryPolyline",esriGeometryMultipoint:"esriGeometryMultipoint",esriGeometryEnvelope:"esriGeometryEnvelope",envelope:"esriGeometryEnvelope"},P={"small-integer":"esriFieldTypeSmallInteger",integer:"esriFieldTypeInteger",long:"esriFieldTypeLong",single:"esriFieldTypeSingle",double:"esriFieldTypeDouble",string:"esriFieldTypeString",date:"esriFieldTypeDate","date-only":"esriFieldTypeDateOnly","time-only":"esriFieldTypeTimeOnly","timestamp-offset":"esriFieldTypeTimestampOffset",oid:"esriFieldTypeOID",geometry:"esriFieldTypeGeometry",blob:"esriFieldTypeBlob",raster:"esriFieldTypeRaster",guid:"esriFieldTypeGUID","global-id":"esriFieldTypeGlobalID",xml:"esriFieldTypeXML","big-integer":"esriFieldTypeBigInteger",esriFieldTypeSmallInteger:"esriFieldTypeSmallInteger",esriFieldTypeInteger:"esriFieldTypeInteger",esriFieldTypeLong:"esriFieldTypeLong",esriFieldTypeSingle:"esriFieldTypeSingle",esriFieldTypeDouble:"esriFieldTypeDouble",esriFieldTypeString:"esriFieldTypeString",esriFieldTypeDate:"esriFieldTypeDate",esriFieldTypeDateOnly:"esriFieldTypeDateOnly",esriFieldTypeTimeOnly:"esriFieldTypeTimeOnly",esriFieldTypeTimestampOffset:"esriFieldTypeTimestampOffset",esriFieldTypeOID:"esriFieldTypeOID",esriFieldTypeGeometry:"esriFieldTypeGeometry",esriFieldTypeBlob:"esriFieldTypeBlob",esriFieldTypeRaster:"esriFieldTypeRaster",esriFieldTypeGUID:"esriFieldTypeGUID",esriFieldTypeGlobalID:"esriFieldTypeGlobalID",esriFieldTypeXML:"esriFieldTypeXML",esriFieldTypeBigInteger:"esriFieldTypeBigInteger"};function v(e){switch(e){case"point":default:return"esriGeometryPoint";case"polygon":return"esriGeometryPolygon";case"multipoint":return"esriGeometryMultipoint";case"polyline":return"esriGeometryPolyline"}}function I(e){return void 0===e?"":e=(e=(e=e.replace(/\/featureserver\/[0-9]*/i,"/FeatureServer")).replace(/\/mapserver\/[0-9]*/i,"/MapServer")).split("?")[0]}function J(e,i){i||(i={}),"function"==typeof i&&(i={cmp:i});const r="boolean"==typeof i.cycles&&i.cycles,t=i.cmp&&(n=i.cmp,function(e){return function(i,r){const t={key:i,value:e[i]},o={key:r,value:e[r]};return n(t,o)}});var n;const o=[];return function e(i){if(i?.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),void 0===i)return;if("number"==typeof i)return isFinite(i)?""+i:"null";if("object"!=typeof i)return JSON.stringify(i);let n,l;if(Array.isArray(i)){for(l="[",n=0;n<i.length;n++)n&&(l+=","),l+=e(i[n])||"null";return l+"]"}if(null===i)return"null";if(o.includes(i)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const s=o.push(i)-1,y=Object.keys(i).sort(t?.(i));for(l="",n=0;n<y.length;n++){const r=y[n],t=e(i[r]);t&&(l&&(l+=","),l+=JSON.stringify(r)+":"+t)}return o.splice(s,1),"{"+l+"}"}(e)}function M(e){switch(e.type){case"catalog-footprint":case"catalog":case"csv":case"feature":case"geojson":case"knowledge-graph-sublayer":case"oriented-imagery":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}export{b as callback,g as cloneAttributes,o as cloneField,G as defaultMaxRecords,T as equalityTest,O as errback,l as esriFieldToJson,I as extractServiceUrl,a as isArcadeDate,f as isArcadeDateOnly,d as isArcadeTime,u as isArray,y as isBoolean,c as isDate,m as isLuxonDate,p as isNumber,s as isString,M as isSupportedLayer,P as layerFieldEsriConstants,S as layerGeometryEsriConstants,D as layerGeometryEsriRestConstants,F as sameGeomType,J as stableStringify,v as toEsriGeometryType};
2
+ import{ArcadeDate as e}from"../../ArcadeDate.js";import{DateOnly as i}from"../../../core/sql/DateOnly.js";import{TimeOnly as r}from"../../../core/sql/TimeOnly.js";import t from"../../../layers/support/Field.js";import{DateTime as n}from"luxon";function o(e){return t.fromJSON(e.toJSON())}function l(e){return e.toJSON?e.toJSON():e}function s(e){return"string"==typeof e||e instanceof String}function y(e){return"boolean"==typeof e}function p(e){return"number"==typeof e}function u(e){return Array.isArray(e)}function c(e){return e instanceof Date}function m(e){return e instanceof n}function a(i){return i instanceof e}function f(e){return e instanceof i}function d(e){return e instanceof r}function T(e,i){return e===i||!(!c(e)&&!a(e)||!c(i)&&!a(i))&&e.getTime()===i.getTime()}function g(e){const i={};for(const r in e)i[r]=e[r];return i}function F(e,i){return e===i||("point"===e&&"esriGeometryPoint"===i||("polyline"===e&&"esriGeometryPolyline"===i||("polygon"===e&&"esriGeometryPolygon"===i||("extent"===e&&"esriGeometryEnvelope"===i||("multipoint"===e&&"esriGeometryMultipoint"===i||("point"===i&&"esriGeometryPoint"===e||("polyline"===i&&"esriGeometryPolyline"===e||("polygon"===i&&"esriGeometryPolygon"===e||("extent"===i&&"esriGeometryEnvelope"===e||"multipoint"===i&&"esriGeometryMultipoint"===e)))))))))}const G=1e3;function O(e){return function(i){e.reject(i)}}function b(e,i){return function(){try{e.apply(null,arguments)}catch(r){i.reject(r)}}}const S={point:"point",polygon:"polygon",polyline:"polyline",multipoint:"multipoint",extent:"extent",esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint",esriGeometryEnvelope:"extent",envelope:"extent"},D={point:"esriGeometryPoint",polygon:"esriGeometryPolygon",polyline:"esriGeometryPolyline",multipoint:"esriGeometryMultipoint",extent:"esriGeometryEnvelope",esriGeometryPoint:"esriGeometryPoint",esriGeometryPolygon:"esriGeometryPolygon",esriGeometryPolyline:"esriGeometryPolyline",esriGeometryMultipoint:"esriGeometryMultipoint",esriGeometryEnvelope:"esriGeometryEnvelope",envelope:"esriGeometryEnvelope"},P={"small-integer":"esriFieldTypeSmallInteger",integer:"esriFieldTypeInteger",long:"esriFieldTypeLong",single:"esriFieldTypeSingle",double:"esriFieldTypeDouble",string:"esriFieldTypeString",date:"esriFieldTypeDate","date-only":"esriFieldTypeDateOnly","time-only":"esriFieldTypeTimeOnly","timestamp-offset":"esriFieldTypeTimestampOffset",oid:"esriFieldTypeOID",geometry:"esriFieldTypeGeometry",blob:"esriFieldTypeBlob",raster:"esriFieldTypeRaster",guid:"esriFieldTypeGUID","global-id":"esriFieldTypeGlobalID",xml:"esriFieldTypeXML","big-integer":"esriFieldTypeBigInteger",esriFieldTypeSmallInteger:"esriFieldTypeSmallInteger",esriFieldTypeInteger:"esriFieldTypeInteger",esriFieldTypeLong:"esriFieldTypeLong",esriFieldTypeSingle:"esriFieldTypeSingle",esriFieldTypeDouble:"esriFieldTypeDouble",esriFieldTypeString:"esriFieldTypeString",esriFieldTypeDate:"esriFieldTypeDate",esriFieldTypeDateOnly:"esriFieldTypeDateOnly",esriFieldTypeTimeOnly:"esriFieldTypeTimeOnly",esriFieldTypeTimestampOffset:"esriFieldTypeTimestampOffset",esriFieldTypeOID:"esriFieldTypeOID",esriFieldTypeGeometry:"esriFieldTypeGeometry",esriFieldTypeBlob:"esriFieldTypeBlob",esriFieldTypeRaster:"esriFieldTypeRaster",esriFieldTypeGUID:"esriFieldTypeGUID",esriFieldTypeGlobalID:"esriFieldTypeGlobalID",esriFieldTypeXML:"esriFieldTypeXML",esriFieldTypeBigInteger:"esriFieldTypeBigInteger"};function v(e){switch(e){case"point":default:return"esriGeometryPoint";case"polygon":return"esriGeometryPolygon";case"multipoint":return"esriGeometryMultipoint";case"polyline":return"esriGeometryPolyline"}}function I(e){return void 0===e?"":e=(e=(e=e.replace(/\/featureserver\/[0-9]*/i,"/FeatureServer")).replace(/\/mapserver\/[0-9]*/i,"/MapServer")).split("?")[0]}function J(e,i){i||(i={}),"function"==typeof i&&(i={cmp:i});const r="boolean"==typeof i.cycles&&i.cycles,t=i.cmp&&(n=i.cmp,function(e){return function(i,r){const t={key:i,value:e[i]},o={key:r,value:e[r]};return n(t,o)}});var n;const o=[];return function e(i){if(i?.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),void 0===i)return;if("number"==typeof i)return isFinite(i)?""+i:"null";if("object"!=typeof i)return JSON.stringify(i);let n,l;if(Array.isArray(i)){for(l="[",n=0;n<i.length;n++)n&&(l+=","),l+=e(i[n])||"null";return l+"]"}if(null===i)return"null";if(o.includes(i)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const s=o.push(i)-1,y=Object.keys(i).sort(t?.(i));for(l="",n=0;n<y.length;n++){const r=y[n],t=e(i[r]);t&&(l&&(l+=","),l+=JSON.stringify(r)+":"+t)}return o.splice(s,1),"{"+l+"}"}(e)}function M(e){switch(e.type){case"catalog-footprint":case"catalog":case"csv":case"feature":case"geojson":case"knowledge-graph-sublayer":case"oriented-imagery":case"parquet":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}export{b as callback,g as cloneAttributes,o as cloneField,G as defaultMaxRecords,T as equalityTest,O as errback,l as esriFieldToJson,I as extractServiceUrl,a as isArcadeDate,f as isArcadeDateOnly,d as isArcadeTime,u as isArray,y as isBoolean,c as isDate,m as isLuxonDate,p as isNumber,s as isString,M as isSupportedLayer,P as layerFieldEsriConstants,S as layerGeometryEsriConstants,D as layerGeometryEsriRestConstants,F as sameGeomType,J as stableStringify,v as toEsriGeometryType};
package/arcade.d.ts CHANGED
@@ -28,6 +28,7 @@ import type CSVLayer from "./layers/CSVLayer.js";
28
28
  import type FeatureLayer from "./layers/FeatureLayer.js";
29
29
  import type GeoJSONLayer from "./layers/GeoJSONLayer.js";
30
30
  import type OrientedImageryLayer from "./layers/OrientedImageryLayer.js";
31
+ import type ParquetLayer from "./layers/ParquetLayer.js";
31
32
  import type SubtypeGroupLayer from "./layers/SubtypeGroupLayer.js";
32
33
  import type WFSLayer from "./layers/WFSLayer.js";
33
34
  import type CatalogFootprintLayer from "./layers/catalog/CatalogFootprintLayer.js";
@@ -40,7 +41,7 @@ import type { Breakpoint, Debugger, DebugValue } from "./arcade/debug.js";
40
41
  import type { GeometryUnion } from "./geometry/types.js";
41
42
 
42
43
  /** Layer types that may be used to construct Arcade FeatureSets. */
43
- export type ArcadeSupportedFeatureSetLayerUnion = CatalogFootprintLayer | CatalogLayer | CSVLayer | FeatureLayer | GeoJSONLayer | KnowledgeGraphSublayer | OrientedImageryLayer | SubtypeGroupLayer | SubtypeSublayer | WFSLayer;
44
+ export type ArcadeSupportedFeatureSetLayerUnion = CatalogFootprintLayer | CatalogLayer | CSVLayer | FeatureLayer | GeoJSONLayer | KnowledgeGraphSublayer | OrientedImageryLayer | ParquetLayer | SubtypeGroupLayer | SubtypeSublayer | WFSLayer;
44
45
 
45
46
  /**
46
47
  * Creates a [Profile](https://developers.arcgis.com/javascript/latest/references/core/arcade/#Profile) definition for an Arcade profile implemented in the ArcGIS Maps SDK for JavaScript.
package/arcgisGlobal.d.ts CHANGED
@@ -274,7 +274,7 @@ export interface ArcgisImportModules {
274
274
  "@arcgis/core/geometry/support/meshUtils.js": typeof import("./geometry/support/meshUtils.js");
275
275
  "@arcgis/core/geometry/support/normalizeUtils.js": typeof import("./geometry/support/normalizeUtils.js");
276
276
  "@arcgis/core/geometry/support/webMercatorUtils.js": typeof import("./geometry/support/webMercatorUtils.js");
277
- "@arcgis/core/graphic/AnnotationGraphicOrigin.js": typeof import("./graphic/AnnotationGraphicOrigin.js").default;
277
+ "@arcgis/core/graphic/AnnotationFeatureGraphicOrigin.js": typeof import("./graphic/AnnotationFeatureGraphicOrigin.js").default;
278
278
  "@arcgis/core/graphic/BuildingGraphicOrigin.js": typeof import("./graphic/BuildingGraphicOrigin.js").default;
279
279
  "@arcgis/core/graphic/CSVGraphicOrigin.js": typeof import("./graphic/CSVGraphicOrigin.js").default;
280
280
  "@arcgis/core/graphic/CatalogGraphicOrigin.js": typeof import("./graphic/CatalogGraphicOrigin.js").default;
@@ -302,9 +302,11 @@ export interface ArcgisImportModules {
302
302
  "@arcgis/core/graphic/VoxelGraphicOrigin.js": typeof import("./graphic/VoxelGraphicOrigin.js").default;
303
303
  "@arcgis/core/graphic/WCSGraphicOrigin.js": typeof import("./graphic/WCSGraphicOrigin.js").default;
304
304
  "@arcgis/core/graphic/WFSGraphicOrigin.js": typeof import("./graphic/WFSGraphicOrigin.js").default;
305
+ "@arcgis/core/graphic/isAnnotationFeatureGraphicOrigin.js": typeof import("./graphic/isAnnotationFeatureGraphicOrigin.js");
305
306
  "@arcgis/core/graphic/isBuildingGraphicOrigin.js": typeof import("./graphic/isBuildingGraphicOrigin.js");
306
307
  "@arcgis/core/graphic/isCSVGraphicOrigin.js": typeof import("./graphic/isCSVGraphicOrigin.js");
307
308
  "@arcgis/core/graphic/isCatalogGraphicOrigin.js": typeof import("./graphic/isCatalogGraphicOrigin.js");
309
+ "@arcgis/core/graphic/isDimensionFeatureGraphicOrigin.js": typeof import("./graphic/isDimensionFeatureGraphicOrigin.js");
308
310
  "@arcgis/core/graphic/isFeatureGraphicOrigin.js": typeof import("./graphic/isFeatureGraphicOrigin.js");
309
311
  "@arcgis/core/graphic/isGeoJSONGraphicOrigin.js": typeof import("./graphic/isGeoJSONGraphicOrigin.js");
310
312
  "@arcgis/core/graphic/isGeoRSSGraphicOrigin.js": typeof import("./graphic/isGeoRSSGraphicOrigin.js");
@@ -333,7 +335,7 @@ export interface ArcgisImportModules {
333
335
  "@arcgis/core/identity/IdentityManagerBase.js": typeof import("./identity/IdentityManagerBase.js");
334
336
  "@arcgis/core/identity/OAuthInfo.js": typeof import("./identity/OAuthInfo.js").default;
335
337
  "@arcgis/core/identity/ServerInfo.js": typeof import("./identity/ServerInfo.js").default;
336
- "@arcgis/core/layers/AnnotationLayer.js": typeof import("./layers/AnnotationLayer.js").default;
338
+ "@arcgis/core/layers/AnnotationFeatureLayer.js": typeof import("./layers/AnnotationFeatureLayer.js").default;
337
339
  "@arcgis/core/layers/BaseDynamicLayer.js": typeof import("./layers/BaseDynamicLayer.js").default;
338
340
  "@arcgis/core/layers/BaseElevationLayer.js": typeof import("./layers/BaseElevationLayer.js").default;
339
341
  "@arcgis/core/layers/BaseTileLayer.js": typeof import("./layers/BaseTileLayer.js").default;
@@ -403,7 +405,7 @@ export interface ArcgisImportModules {
403
405
  "@arcgis/core/layers/scene/ModelFileInfo.js": typeof import("./layers/scene/ModelFileInfo.js").default;
404
406
  "@arcgis/core/layers/scene/ModelInfo.js": typeof import("./layers/scene/ModelInfo.js").default;
405
407
  "@arcgis/core/layers/support/AggregateField.js": typeof import("./layers/support/AggregateField.js").default;
406
- "@arcgis/core/layers/support/AnnotationSublayer.js": typeof import("./layers/support/AnnotationSublayer.js").default;
408
+ "@arcgis/core/layers/support/AnnotationFeatureSublayer.js": typeof import("./layers/support/AnnotationFeatureSublayer.js").default;
407
409
  "@arcgis/core/layers/support/BuildingFieldStatistics.js": typeof import("./layers/support/BuildingFieldStatistics.js").default;
408
410
  "@arcgis/core/layers/support/BuildingFilter.js": typeof import("./layers/support/BuildingFilter.js").default;
409
411
  "@arcgis/core/layers/support/BuildingFilterBlock.js": typeof import("./layers/support/BuildingFilterBlock.js").default;
@@ -1099,7 +1101,7 @@ export interface ArcgisImportModules {
1099
1101
  "@arcgis/core/views/interactive/snapping/FeatureSnappingLayerSource.js": typeof import("./views/interactive/snapping/FeatureSnappingLayerSource.js").default;
1100
1102
  "@arcgis/core/views/interactive/snapping/SnappingOptions.js": typeof import("./views/interactive/snapping/SnappingOptions.js").default;
1101
1103
  "@arcgis/core/views/interactive/tooltip/fields/TooltipField.js": typeof import("./views/interactive/tooltip/fields/TooltipField.js");
1102
- "@arcgis/core/views/layers/AnnotationLayerView.js": typeof import("./views/layers/AnnotationLayerView.js").default;
1104
+ "@arcgis/core/views/layers/AnnotationFeatureLayerView.js": typeof import("./views/layers/AnnotationFeatureLayerView.js").default;
1103
1105
  "@arcgis/core/views/layers/BuildingComponentSublayerView.js": typeof import("./views/layers/BuildingComponentSublayerView.js").default;
1104
1106
  "@arcgis/core/views/layers/BuildingSceneLayerView.js": typeof import("./views/layers/BuildingSceneLayerView.js").default;
1105
1107
  "@arcgis/core/views/layers/CSVLayerView.js": typeof import("./views/layers/CSVLayerView.js").default;