@arcgis/core 5.1.0-next.84 → 5.1.0-next.86

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 (367) hide show
  1. package/assets/components/assets/icon/gpsReceiver16.json +1 -0
  2. package/assets/components/assets/icon/gpsReceiver24.json +1 -0
  3. package/assets/components/assets/icon/gpsReceiver32.json +1 -0
  4. package/assets/components/assets/icon/totalStation16.json +1 -0
  5. package/assets/components/assets/icon/totalStation24.json +1 -0
  6. package/assets/components/assets/icon/totalStation32.json +1 -0
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/{e89dc473f46a5584d2ef.js → 004af103a94d21cb4889.js} +3 -3
  9. package/assets/esri/core/workers/chunks/{67abbe81c16de26f61d8.js → 1bad4331a43169f3cc34.js} +1 -1
  10. package/assets/esri/core/workers/chunks/27f67a3828b78d4c1413.js +1 -0
  11. package/assets/esri/core/workers/chunks/2c916b93d8a6e6b9c0d7.js +1 -0
  12. package/assets/esri/core/workers/chunks/{db86a1119e4e58ecfbda.js → 2f8b173d1dac73ba0d9e.js} +1 -1
  13. package/assets/esri/core/workers/chunks/49e8144effc299dfcd66.js +1 -0
  14. package/assets/esri/core/workers/chunks/5166f204fd078dced5db.js +1 -0
  15. package/assets/esri/core/workers/chunks/{45c83eb7c2a06166e3b0.js → 56717ff315c6ec874142.js} +1 -1
  16. package/assets/esri/core/workers/chunks/577cbc131b21c351fae5.js +2 -0
  17. package/assets/esri/core/workers/chunks/{72691fe14024e35f85d0.js → 618106f5fbdf88ef2278.js} +1 -1
  18. package/assets/esri/core/workers/chunks/61fada8942b65fa0b5e1.js +1 -0
  19. package/assets/esri/core/workers/chunks/{05c5f68e117fc58ae801.js → 701b823763e941b71f4f.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{1e2c0c6d724f7639d4c1.js → 713ab619060bd5087479.js} +13 -13
  21. package/assets/esri/core/workers/chunks/{a9b5ce00323cd5574bf7.js → 7160e3e7340beb7fdb42.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{0219edb509e01270d42d.js → 99c6bd2125f4eb6796fe.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{ff713926985a284f5d81.js → a844547bf33a8527ee9f.js} +2 -2
  24. package/assets/esri/core/workers/chunks/aa6808146c76b2d49b64.js +1 -0
  25. package/assets/esri/core/workers/chunks/{9cac70164d8528c283af.js → add000f51c778114c028.js} +1 -1
  26. package/assets/esri/core/workers/chunks/b23e677c33db6f9bac8a.js +1 -0
  27. package/assets/esri/core/workers/chunks/{dfe1139124fda0d6c059.js → b575292013bceef9b015.js} +1 -1
  28. package/assets/esri/core/workers/chunks/bae8f2a5dfe0cfbc0688.js +1 -0
  29. package/assets/esri/core/workers/chunks/bb5f909a2f26fc6a21b0.js +2 -0
  30. package/assets/esri/core/workers/chunks/{28a45bd26eb5c9b3ec7c.js → ce66c551b7083913eee5.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{22bdea4ca52970c29504.js → d0aee7c80c5c7e23d216.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{f4220b6eab0865318033.js → d8de7fe49dba9ed589df.js} +1 -1
  33. package/assets/esri/core/workers/chunks/ded2f19a1685db2137f4.js +2 -0
  34. package/assets/esri/core/workers/chunks/{f77d23ee60c876b01e4b.js → e9a42f0262fc44a79d4b.js} +1 -1
  35. package/assets/esri/core/workers/chunks/edbdee69440dbfc05644.js +1 -0
  36. package/assets/esri/core/workers/chunks/ee057c85cdf6beb5b012.js +2 -0
  37. package/assets/esri/core/workers/chunks/f9fe3c9867b0bdb2aec6.js +596 -0
  38. package/assets/esri/core/workers/chunks/ff57a071156d8a7e47be.js +1 -0
  39. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  40. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  41. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +6 -0
  42. package/assets/esri/themes/dark/main.css +1 -1
  43. package/assets/esri/themes/light/main.css +1 -1
  44. package/assets/esri/themes/light/view.css +1 -1
  45. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis.json +1 -1
  46. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_en.json +1 -1
  47. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  48. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  49. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  50. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  51. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  52. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  53. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  54. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  55. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  56. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  57. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  58. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  59. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  60. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  61. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  62. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  63. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  64. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  65. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  66. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  67. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  68. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  69. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  70. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  71. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  72. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  73. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  74. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  75. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  76. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  77. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  78. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  79. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  80. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  81. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  82. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  83. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  84. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  85. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  86. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  87. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  88. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  89. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  90. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  91. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  92. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  93. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  94. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  95. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  96. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  97. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  98. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  99. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  100. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  101. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  102. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  103. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  104. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  105. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  106. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  107. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  108. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  109. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  110. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  111. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  112. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  113. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  114. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  115. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  116. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  117. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  118. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  119. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  120. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  121. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  122. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  123. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  124. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  125. package/chunks/EdgeShader.glsl.js +13 -9
  126. package/chunks/Fog.glsl.js +1 -1
  127. package/chunks/GlowBlur.glsl.js +9 -13
  128. package/chunks/GlowComposition.glsl.js +10 -10
  129. package/chunks/ShadowCastVisualize.glsl.js +10 -10
  130. package/config.js +1 -1
  131. package/core/arrayUtils.js +1 -1
  132. package/core/has.js +1 -1
  133. package/core/screenUtils.js +1 -1
  134. package/form/types.d.ts +1 -1
  135. package/geohash/GeohashCell.js +1 -1
  136. package/geohash/GeohashTree.js +1 -1
  137. package/interfaces.d.ts +14 -14
  138. package/kernel.js +1 -1
  139. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  140. package/layers/ParquetLayer.d.ts +10 -10
  141. package/layers/ParquetLayer.js +1 -1
  142. package/layers/StreamLayer.js +1 -1
  143. package/layers/graphics/sources/connections/FabricKustoConnection.js +2 -0
  144. package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
  145. package/layers/graphics/sources/connections/WebSocketConnection.js +1 -1
  146. package/layers/graphics/sources/connections/createConnection.js +1 -1
  147. package/layers/graphics/sources/connections/websocketUils.js +2 -0
  148. package/layers/scene/ModelFileInfo.js +1 -1
  149. package/layers/scene/modelQuerySupport.js +1 -1
  150. package/layers/support/ClientSideConnection.js +1 -1
  151. package/layers/support/FabricKustoSource.js +2 -0
  152. package/layers/support/{ParquetGeometryEncodingLocation.d.ts → GeometryEncodingLocation.d.ts} +9 -9
  153. package/layers/support/{ParquetGeometryEncodingLocation.js → GeometryEncodingLocation.js} +1 -1
  154. package/layers/support/{ParquetGeometryEncodingWkb.d.ts → GeometryEncodingWkb.d.ts} +8 -9
  155. package/layers/support/GeometryEncodingWkb.js +2 -0
  156. package/layers/support/kustoUtils.js +2 -0
  157. package/layers/support/parquetEncodingUtils.js +1 -1
  158. package/layers/support/parquetUtils.js +1 -1
  159. package/layers/support/types.d.ts +3 -3
  160. package/package.json +2 -2
  161. package/popup/Features.d.ts +10 -0
  162. package/popup/Features.js +1 -1
  163. package/rest/knowledgeGraph/GraphQueryStreamingResult.d.ts +4 -1
  164. package/support/revision.js +1 -1
  165. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  166. package/views/2d/FrameTask.js +1 -1
  167. package/views/2d/LabelManager.js +1 -1
  168. package/views/2d/ViewState.js +1 -1
  169. package/views/2d/engine/DisplayObject.js +1 -1
  170. package/views/2d/engine/Stage.js +1 -1
  171. package/views/2d/engine/flow/FlowContainer.js +1 -1
  172. package/views/2d/engine/flow/FlowView2D.js +1 -1
  173. package/views/2d/engine/flow/styles/AFlowResources.js +1 -1
  174. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  175. package/views/2d/engine/flow/styles/Particles.js +1 -1
  176. package/views/2d/engine/flow/styles/Stack.js +1 -1
  177. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  178. package/views/2d/engine/transitions/FadeTransition.js +1 -1
  179. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  180. package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
  181. package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
  182. package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
  183. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  184. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  185. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  186. package/views/2d/engine/webgl/ResizableUint32Array.js +2 -0
  187. package/views/2d/engine/webgl/TileCpuState.js +2 -0
  188. package/views/2d/engine/webgl/TileGpuState.js +2 -0
  189. package/views/2d/engine/webgl/cpuMapped/CpuBuffer.js +2 -0
  190. package/views/2d/engine/webgl/cpuMapped/CpuMeshData.js +2 -0
  191. package/views/2d/engine/webgl/cpuMapped/GpuMeshState.js +2 -0
  192. package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
  193. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueDebugContainer.js +1 -1
  194. package/views/2d/engine/webgl/shaderGraph/techniques/TestDisplayObject.js +1 -1
  195. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
  196. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  197. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  198. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  199. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  200. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  201. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  202. package/views/2d/layers/KMLLayerView2D.js +1 -1
  203. package/views/2d/layers/LayerView2D.js +1 -1
  204. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  205. package/views/2d/layers/MediaLayerView2D.js +1 -1
  206. package/views/2d/layers/RouteLayerView2D.js +1 -1
  207. package/views/2d/layers/TileLayerView2D.js +1 -1
  208. package/views/2d/layers/features/FeatureContainer.js +1 -1
  209. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  210. package/views/2d/layers/features/FeatureTilePresentStrategy.js +2 -0
  211. package/views/2d/layers/features/Processor.js +1 -1
  212. package/views/2d/layers/features/RenderState.js +1 -1
  213. package/views/2d/layers/features/aggregation/AAggregateSpatialIndex.js +1 -1
  214. package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
  215. package/views/2d/layers/features/aggregation/GridCell.js +1 -1
  216. package/views/2d/layers/features/aggregation/GridIndexCell.js +2 -0
  217. package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
  218. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  219. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  220. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  221. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  222. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  223. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  224. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  225. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  226. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  227. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  228. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  229. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  230. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  231. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  232. package/views/2d/layers/features/sources/FeatureSourceMessage.js +1 -1
  233. package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
  234. package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
  235. package/views/2d/layers/features/support/Hashed.js +2 -0
  236. package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
  237. package/views/2d/layers/graphics/GraphicStore.js +1 -1
  238. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  239. package/views/2d/layers/imagery/ImageryView2D.js +1 -1
  240. package/views/2d/layers/support/vectorTileDebugUtils.js +1 -1
  241. package/views/2d/support/hitTestUtils.js +1 -1
  242. package/views/2d/tiling/FeatureTileSubscriptionManager.js +1 -1
  243. package/views/2d/tiling/TileCombinedCoverage.js +2 -0
  244. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  245. package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +2 -0
  246. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  247. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  248. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  249. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +2 -0
  250. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  251. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  252. package/views/3d/analysis/Viewshed/ViewshedTool2.js +2 -0
  253. package/views/3d/analysis/Viewshed/viewshedSubToolUtils.js +2 -0
  254. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  255. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  256. package/views/3d/environment/CloudyWeather.js +1 -1
  257. package/views/3d/environment/FoggyWeather.js +1 -1
  258. package/views/3d/environment/RainyWeather.js +1 -1
  259. package/views/3d/environment/SnowyWeather.js +1 -1
  260. package/views/3d/environment/SunnyWeather.js +1 -1
  261. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  262. package/views/3d/layers/graphics/StreamController.js +1 -1
  263. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  264. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  265. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  266. package/views/3d/webgl/ManagedColorAttachment.js +1 -1
  267. package/views/3d/webgl/ManagedDepthAttachment.js +1 -1
  268. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  269. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  270. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  271. package/views/3d/webgl-engine/core/FBOCacheUsage.js +1 -1
  272. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  273. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +11 -11
  274. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  275. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
  276. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  277. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  278. package/views/3d/webgl-engine/effects/glow/Glow.js +2 -0
  279. package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
  280. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  281. package/views/3d/webgl-engine/effects/raymarching/{RayDistanceFalloff.glsl.js → DistanceFalloff.glsl.js} +2 -2
  282. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  283. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  284. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  285. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  286. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  287. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  288. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  289. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  290. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  291. package/views/3d/webgl-engine/lib/StencilUtils.js +1 -1
  292. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  293. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
  294. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  295. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  296. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  297. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  298. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  299. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  300. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  301. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  302. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  303. package/views/3d/webgl-engine/shaders/MeasurementArrowTechniqueConfiguration.js +1 -1
  304. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  305. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  306. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  307. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  308. package/views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js +1 -7
  309. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
  310. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +1 -1
  311. package/views/VideoView.js +1 -1
  312. package/views/View2D.js +1 -1
  313. package/views/draw/support/GraphicMover.js +1 -1
  314. package/views/support/rasterHitTestUtils.js +1 -1
  315. package/views/support/waitForResources.js +1 -1
  316. package/views/video/VideoOperationalDataView.js +1 -1
  317. package/views/webgl/FramebufferObject.js +1 -1
  318. package/views/webgl/RenderingContext.js +1 -1
  319. package/views/webgl/Texture.js +1 -1
  320. package/views/webgl/textureUtils.js +1 -1
  321. package/widgets/BatchAttributeForm/css.js +1 -1
  322. package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.d.ts +61 -0
  323. package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +2 -0
  324. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  325. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  326. package/widgets/BatchAttributeForm/inputs/types.d.ts +9 -4
  327. package/widgets/BatchAttributeForm/templates/UtilityNetworkAssociationsElementTemplate.js +2 -0
  328. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  329. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  330. package/widgets/BatchAttributeForm/templates/support/templateUtils.js +1 -1
  331. package/widgets/BatchAttributeForm.js +1 -1
  332. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  333. package/widgets/FeatureTable/Grid/Column.d.ts +17 -2
  334. package/widgets/FeatureTable/Grid/Column.js +1 -1
  335. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  336. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  337. package/widgets/FeatureTable/Grid/GroupColumn.d.ts +7 -1
  338. package/widgets/FeatureTable/Grid/GroupColumn.js +1 -1
  339. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +9 -1
  340. package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
  341. package/widgets/FeatureTable/support/types.d.ts +8 -0
  342. package/widgets/FeatureTable.js +1 -1
  343. package/assets/esri/core/workers/chunks/2171aaa147aa4d9fc5b5.js +0 -1
  344. package/assets/esri/core/workers/chunks/38f1a86b8dd9ee684ee5.js +0 -596
  345. package/assets/esri/core/workers/chunks/54d07eadf113f0e4e506.js +0 -1
  346. package/assets/esri/core/workers/chunks/5818f1f526577068d6ca.js +0 -2
  347. package/assets/esri/core/workers/chunks/5ec66e39e53c11e75179.js +0 -2
  348. package/assets/esri/core/workers/chunks/5f6fd20a7f4e80eafa25.js +0 -1
  349. package/assets/esri/core/workers/chunks/6d2abdb48e17b2b56599.js +0 -1
  350. package/assets/esri/core/workers/chunks/7cdd0492b2191df95102.js +0 -2
  351. package/assets/esri/core/workers/chunks/7e530e635325dba07864.js +0 -1
  352. package/assets/esri/core/workers/chunks/8f4cd30ce23e41c1a42c.js +0 -1
  353. package/assets/esri/core/workers/chunks/936f2b1332ece14d7c28.js +0 -2
  354. package/assets/esri/core/workers/chunks/983f6c8727fd9484718e.js +0 -1
  355. package/assets/esri/core/workers/chunks/bd8cb64b6e08839398f3.js +0 -1
  356. package/assets/esri/core/workers/chunks/cbf1a03f54bd8d2a2b47.js +0 -1
  357. package/layers/support/ParquetGeometryEncodingWkb.js +0 -2
  358. package/views/2d/engine/webgl/PooledUint32Array.js +0 -2
  359. package/views/2d/engine/webgl/cpuMapped/Buffer.js +0 -2
  360. package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +0 -2
  361. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +0 -2
  362. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DistanceFalloff.glsl.js +0 -4
  363. /package/assets/esri/core/workers/chunks/{5ec66e39e53c11e75179.js.LICENSE.txt → 577cbc131b21c351fae5.js.LICENSE.txt} +0 -0
  364. /package/assets/esri/core/workers/chunks/{ff713926985a284f5d81.js.LICENSE.txt → a844547bf33a8527ee9f.js.LICENSE.txt} +0 -0
  365. /package/assets/esri/core/workers/chunks/{5818f1f526577068d6ca.js.LICENSE.txt → bb5f909a2f26fc6a21b0.js.LICENSE.txt} +0 -0
  366. /package/assets/esri/core/workers/chunks/{7cdd0492b2191df95102.js.LICENSE.txt → ded2f19a1685db2137f4.js.LICENSE.txt} +0 -0
  367. /package/assets/esri/core/workers/chunks/{936f2b1332ece14d7c28.js.LICENSE.txt → ee057c85cdf6beb5b012.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import has from"../../../../core/has.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{notDeepEqual as t}from"../../../../core/object.js";import{throwIfNotAbortError as s,throwIfAborted as r,after as i}from"../../../../core/promiseUtils.js";import{diff as a}from"../../../../core/accessorSupport/diffUtils.js";import{ignoreConnectionErrors as o}from"../../../../core/workers/utils.js";import{normalizeTransform as n,quantizeX as c,quantizeY as h}from"../../../../geometry/support/quantizationUtils.js";import{MultiTileMeshData as u}from"../../engine/webgl/mesh/MultiTileMeshData.js";import{FeatureMeshFactory as g}from"../../engine/webgl/mesh/factories/FeatureMeshFactory.js";import{ResourceProxy as p}from"../../engine/webgl/mesh/factories/ResourceProxy.js";import{MeshWriterRegistry as y}from"../../engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{MatcherContext as d}from"../../engine/webgl/util/MatcherContext.js";import{ProcessorTileMessageQueue as _}from"./ProcessorTileMessageQueue.js";import{BinningStrategy as l}from"./processor/BinningStrategy.js";import{ClusterStrategy as m}from"./processor/ClusterStrategy.js";import{FeatureUpdateStrategy as f}from"./processor/FeatureUpdateStrategy.js";import{TrackStrategy as b}from"./processor/TrackStrategy.js";import{AttributeStore as w}from"./support/AttributeStore.js";import{ComputedAttributeStorage as S}from"./support/ComputedAttributeStorage.js";class j{constructor(e,t,s,r){this._connection=e,this._source=t,this._requiredLevel=s,this._requiredScale=r,this._version=1,this._registry=new y,this._proxy=new p({fetch:(e,t)=>this._connection.layerView.fetch(e,t),fetchDictionary:(e,t)=>this._connection.layerView.fetchDictionary(e,t)}),this._attributeStore=new w({isLocal:!1,update:e=>o(this._connection.container.updateAttributeView(e))})}destroy(){this._proxy.destroy(),this._strategy?.destroy(),this._attributeStore.destroy()}get hasClusters(){return"cluster"===this._schema?.mesh.strategy.type}get aggregateQueryEngine(){return this._strategy?.aggregateQueryEngine}get usedMemory(){let e=0;return e+=this._attributeStore.usedMemory,this._strategy&&(e+=this._strategy.usedMemory),e}get version(){return this._version}getDisplayFeatures(e){return this._strategy?this._strategy.getDisplayFeatures(e):{features:[],aggregates:[],tracks:[]}}getDisplayIds(e){const t={};return this._strategy?(this._strategy.displayMap(e,e=>e,(e,s,r)=>{t[r]=e}),t):t}getFeatureObjectIdsForAggregate(e){return this._strategy?this._strategy.getFeatureObjectIdsForAggregate(e):[]}onSubscribe(e){this._strategy?.onSubscribe(e)}onUnsubscribe(e){this._strategy?.onUnsubscribe(e)}requiresInvalidation(){return this._strategy?.requiresInvalidation()??!1}updateRequiredLevel(e,t){this._strategy?.updateRequiredLevel(e,t),this._requiredLevel=e,this._requiredScale=t}async update(e,s,r,i,o){const n=e.processor,c=t(this._schema?.storage,n.storage),h=t(this._schema?.mesh.properties,n.mesh.properties),u=t(this._schema?.mesh.factory,n.mesh.factory),p=t(this._schema?.mesh.strategy,n.mesh.strategy),y=I(this._schema?.expressionProperties,n.expressionProperties),_=y.some(e=>this._attributeStore.hasArcadeDependency(e)),l=y.some(e=>this._factory?.hasArcadeDependency(e)??!1),m=y.some(e=>this._strategy?.hasArcadeDependency(e))||this._strategy?.isAggregate&&_,f=l||m,b=h||u||p;if(!(c||b||(l||_||m))&&!i)return!1;has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] SymbolProcessor.update`,{changes:a(this._schema,n),schema:n}),this._schema=n;const w=new S({fields:this._source.metadata.fieldsIndex,spatialReference:this._source.metadata.outSpatialReference}),j={currentUser:n.mesh.properties.currentUser};if((c||b||_)&&(await this._attributeStore.update(n.storage,w,this._source.metadata,s),this._strategy?.invalidateAttributeData(v(n))),!i&&!b&&!f)return!1;(p||h||f)&&await this._updateStrategy(n.mesh.strategy,o,v(n),j),this._updateSortKey(w,"sortKey"in n.mesh.properties?n.mesh.properties.sortKey:null);const x="dictionary"===n.mesh.factory.symbology.type?n.mesh.factory.symbology.fieldMap:null,M=new d(w,this._proxy,r,this._registry,x);return(u||"dictionary"===n.mesh.factory.symbology.type)&&(this._factory=await g.create(M,n.mesh.factory)),this._version=s,!0}async applyOverrideUpdate(e,t){if(!this._strategy)return;const s=this._strategy.applyOverrideUpdate(e);for await(const i of s)try{await this._process(i,t)}catch(r){}}async updateChunks(e){await this._doUpdateChunks(e),this._strategy?.afterUpdateChunks()}async removeChunks(e){this._strategy?.removeChunks(e),this._attributeStore.incrementDisplayIdGeneration()}updateHighlight({highlights:e}){if(!this._strategy||!this._strategy.hasSubscribers)return void this._attributeStore.setHighlight(e.map(({objectId:e,highlightFlags:t})=>({objectId:e,highlightFlags:t,displayId:-1})),e);const t=this._strategy.displayMap(e,({objectId:e})=>e,(e,{highlightFlags:t},s)=>({objectId:s,displayId:e,highlightFlags:t}));this._attributeStore.setHighlight(t,e)}invalidate(){this._strategy&&this._strategy.invalidate()}async _doUpdateChunks(e){if(!this._strategy)return;const t=this._strategy.updateChunks(),r=[],i=new Map;for await(const o of t){let t=i.get(o.id);null==t&&(t=new _({concurrency:16,process:t=>this._process(t,e)}),i.set(o.id,t));const a=t.push(o).catch(e=>s(e));r.push(a)}try{await Promise.all(r)}catch(a){}has("esri-2d-update-debug")&&console.log("SendUpdates"),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")&&console.log("SendUpdates.await")}async _updateStrategy(e,t,s,r){switch(this._strategy?.destroy(),e.type){case"feature":this._strategy=new f(this._source,this._attributeStore,s,r);break;case"binning":this._strategy=await l.create(e,this._source,this._attributeStore,s,r);break;case"cluster":this._strategy=await m.create(this._connection,e,this._source,this._attributeStore,s,r,this._requiredLevel,this._requiredScale);break;case"track":this._strategy=await b.create(e,this._source,this._attributeStore,s,r)}for(const i of t)this._strategy.onSubscribe(i)}async _updateSortKey(t,s){if(this._sortInfo=e(this._sortInfo?.computed),null!=s){const e=s.byRenderer?null:await t.createComputedField(s);this._sortInfo={...s,computed:e}}}async _process(e,t){const s=e.subscription;if(has("esri-2d-update-debug")){const t=s.tile;console.debug(`Version[${this._version}] Tile[${t.key.id}, end=${e.end}] Processor._process`)}const i={currentUser:this._schema?.mesh.properties.currentUser};await this._fetchResources(e,i),r(s.signal);const a=await this._write(e,s.tile.createArcadeEvaluationOptions(v(this._schema)),i,t),o=s.tile.tileInfoView.getLODInfoAt(s.tile.key);r(s.signal);const{message:n,transferList:c}=a.serialize(o),h={objectIdMap:null,inner:e.createMessage(n,this._version,this._attributeStore.epoch)};if(this._schema?.mesh.properties.returnMeshObjectId){h.objectIdMap={};const t=e.reader?.getCursor();if(t)for(;t.next();)h.objectIdMap[t.getDisplayId()]=t.getObjectId()}if(r(s.signal),await this._connection.container.onMessage(h,{signal:s.signal,transferList:c}),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")){const t=s.tile;console.debug(`Version[${this._version}] Tile[${t.key.id}, end=${e.end}] Processor._process.await`)}}async _fetchResources(e,t){await this._fetchMatcherResources(e),await this._fetchWriterResources(e,t)}async _fetchMatcherResources(e){if(e.reader)return this._factory.enqueueMatcherRequests(this._proxy,e.reader)}async _fetchWriterResources(e,t){if(!e.reader)return;const s=e.reader.getCursor(),r=e.subscription.tile.createArcadeEvaluationOptions(v(this._schema));for(;s.next();)this._factory.enqueueWriterRequests(this._proxy,s,r,t);await this._proxy.fetchEnqueuedResources()}async _write(e,t,s,a){const o=e.subscription.tile,n=e.reader?.getCursor(),c=n?.getSize()??0,h=o.tileInfoView.tileInfo.isWrappable,g=o.tileInfoView.spatialReference.isWGS84,p=new u(o.key,this._strategy.enablePixelBuffering,h,g,c);if(!n)return p;const y=x(o.transform,a),d=o.createArcadeEvaluationOptions(v(this._schema));let _=0;for(;n.next();){++_%1e3||(await i(0),r(e.subscription));const a=this._getSortKeyValue(n,t);p.entityStart(n.getDisplayId(),a);try{this._factory.write(p,this._proxy,n,d,s,o.level,y)}catch(l){}p.entityEnd()}return p}_getSortKeyValue(e,t){if(!this._sortInfo)return 0;const{computed:s,order:r,byRenderer:i}=this._sortInfo,a=i?this._factory.getSortKey(e,t):s?.read(e,t);return null==a||isNaN(a)?0:a*("asc"===r?-1:1)}}function I(e,t){const s=[];return e?.timeExtent?.start===t.timeExtent?.start&&e?.timeExtent?.end===t.timeExtent?.end||s.push("timeProperties"),s}function v(e){const{timeZone:t}=e?.mesh.properties??{},{timeExtent:s}=e?.expressionProperties??{};return{timeZone:t,timeExtent:s}}function x(e,t){const s=n(e),r=[];for(const i of t.rings){const e=[];for(const t of i)e.push([c(s,t[0]),h(s,t[1])]);r.push(e)}return{rings:r}}export{j as default};
2
+ import has from"../../../../core/has.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{notDeepEqual as t}from"../../../../core/object.js";import{throwIfNotAbortError as s,throwIfAborted as r,after as i}from"../../../../core/promiseUtils.js";import{diff as a}from"../../../../core/accessorSupport/diffUtils.js";import{ignoreConnectionErrors as o}from"../../../../core/workers/utils.js";import{normalizeTransform as n,quantizeX as c,quantizeY as h}from"../../../../geometry/support/quantizationUtils.js";import{MultiTileMeshData as u}from"../../engine/webgl/mesh/MultiTileMeshData.js";import{FeatureMeshFactory as g}from"../../engine/webgl/mesh/factories/FeatureMeshFactory.js";import{ResourceProxy as p}from"../../engine/webgl/mesh/factories/ResourceProxy.js";import{MeshWriterRegistry as y}from"../../engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{MatcherContext as d}from"../../engine/webgl/util/MatcherContext.js";import{ProcessorTileMessageQueue as _}from"./ProcessorTileMessageQueue.js";import{BinningStrategy as l}from"./processor/BinningStrategy.js";import{ClusterStrategy as m}from"./processor/ClusterStrategy.js";import{FeatureUpdateStrategy as f}from"./processor/FeatureUpdateStrategy.js";import{TrackStrategy as b}from"./processor/TrackStrategy.js";import{AttributeStore as w}from"./support/AttributeStore.js";import{ComputedAttributeStorage as S}from"./support/ComputedAttributeStorage.js";class j{constructor(e,t,s,r){this._connection=e,this._source=t,this._requiredLevel=s,this._requiredScale=r,this._version=1,this._registry=new y,this._proxy=new p({fetch:(e,t)=>this._connection.layerView.fetch(e,t),fetchDictionary:(e,t)=>this._connection.layerView.fetchDictionary(e,t)}),this._attributeStore=new w({isLocal:!1,update:e=>o(this._connection.container.updateAttributeView(e))})}destroy(){this._proxy.destroy(),this._strategy?.destroy(),this._attributeStore.destroy()}get hasClusters(){return"cluster"===this._schema?.mesh.strategy.type}get aggregateQueryEngine(){return this._strategy?.aggregateQueryEngine}get usedMemory(){let e=0;return e+=this._attributeStore.usedMemory,this._strategy&&(e+=this._strategy.usedMemory),e}get version(){return this._version}getDisplayFeatures(e){return this._strategy?this._strategy.getDisplayFeatures(e):{features:[],aggregates:[],tracks:[]}}getDisplayIds(e){const t={};return this._strategy?(this._strategy.displayMap(e,e=>e,(e,s,r)=>{t[r]=e}),t):t}getFeatureObjectIdsForAggregate(e){return this._strategy?this._strategy.getFeatureObjectIdsForAggregate(e):[]}onSubscribe(e){this._strategy?.onSubscribe(e)}onUnsubscribe(e){this._strategy?.onUnsubscribe(e)}requiresInvalidation(e){return this._strategy?.requiresInvalidation(e)??!1}updateRequiredLevel(e,t){this._strategy?.updateRequiredLevel(e,t),this._requiredLevel=e,this._requiredScale=t}async update(e,s,r,i,o){const n=e.processor,c=t(this._schema?.storage,n.storage),h=t(this._schema?.mesh.properties,n.mesh.properties),u=t(this._schema?.mesh.factory,n.mesh.factory),p=t(this._schema?.mesh.strategy,n.mesh.strategy),y=I(this._schema?.expressionProperties,n.expressionProperties),_=y.some(e=>this._attributeStore.hasArcadeDependency(e)),l=y.some(e=>this._factory?.hasArcadeDependency(e)??!1),m=y.some(e=>this._strategy?.hasArcadeDependency(e))||this._strategy?.isAggregate&&_,f=l||m,b=h||u||p;if(!(c||b||(l||_||m))&&!i)return!1;has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] SymbolProcessor.update`,{changes:a(this._schema,n),schema:n}),this._schema=n;const w=new S({fields:this._source.metadata.fieldsIndex,spatialReference:this._source.metadata.outSpatialReference}),j={currentUser:n.mesh.properties.currentUser};if((c||b||_)&&(await this._attributeStore.update(n.storage,w,this._source.metadata,s),this._strategy?.invalidateAttributeData(v(n))),!i&&!b&&!f)return!1;(p||h||f)&&await this._updateStrategy(n.mesh.strategy,o,v(n),j),this._updateSortKey(w,"sortKey"in n.mesh.properties?n.mesh.properties.sortKey:null);const x="dictionary"===n.mesh.factory.symbology.type?n.mesh.factory.symbology.fieldMap:null,M=new d(w,this._proxy,r,this._registry,x);return(u||"dictionary"===n.mesh.factory.symbology.type)&&(this._factory=await g.create(M,n.mesh.factory)),this._version=s,!0}async applyOverrideUpdate(e,t){if(!this._strategy)return;const s=this._strategy.applyOverrideUpdate(e);for await(const i of s)try{await this._process(i,t)}catch(r){}}async updateChunks(e,t,s){await this._doUpdateChunks(e,t,s),this._strategy?.afterUpdateChunks()}async removeChunks(e){this._strategy?.removeChunks(e),this._attributeStore.incrementDisplayIdGeneration()}updateHighlight({highlights:e}){if(!this._strategy||!this._strategy.hasSubscribers)return void this._attributeStore.setHighlight(e.map(({objectId:e,highlightFlags:t})=>({objectId:e,highlightFlags:t,displayId:-1})),e);const t=this._strategy.displayMap(e,({objectId:e})=>e,(e,{highlightFlags:t},s)=>({objectId:s,displayId:e,highlightFlags:t}));this._attributeStore.setHighlight(t,e)}invalidate(){this._strategy&&this._strategy.invalidate()}async _doUpdateChunks(e,t,r){if(!this._strategy)return;const i=this._strategy.updateChunks(e,t),a=[],o=new Map;for await(const c of i){let e=o.get(c.id);null==e&&(e=new _({concurrency:16,process:e=>this._process(e,r)}),o.set(c.id,e));const t=e.push(c).catch(e=>s(e));a.push(t)}try{await Promise.all(a)}catch(n){}has("esri-2d-update-debug")&&console.log("SendUpdates"),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")&&console.log("SendUpdates.await")}async _updateStrategy(e,t,s,r){switch(this._strategy?.destroy(),e.type){case"feature":this._strategy=new f(this._source,this._attributeStore,s,r);break;case"binning":this._strategy=await l.create(e,this._source,this._attributeStore,s,r);break;case"cluster":this._strategy=await m.create(this._connection,e,this._source,this._attributeStore,s,r,this._requiredLevel,this._requiredScale);break;case"track":this._strategy=await b.create(e,this._source,this._attributeStore,s,r)}for(const i of t)this._strategy.onSubscribe(i)}async _updateSortKey(t,s){if(this._sortInfo=e(this._sortInfo?.computed),null!=s){const e=s.byRenderer?null:await t.createComputedField(s);this._sortInfo={...s,computed:e}}}async _process(e,t){const s=e.subscription;if(has("esri-2d-update-debug")){const t=s.tile;console.debug(`Version[${this._version}] Tile[${t.key.id}, end=${e.end}] Processor._process`)}const i={currentUser:this._schema?.mesh.properties.currentUser};await this._fetchResources(e,i),r(s.signal);const a=await this._write(e,s.tile.createArcadeEvaluationOptions(v(this._schema)),i,t),o=s.tile.tileInfoView.getLODInfoAt(s.tile.key);r(s.signal);const{message:n,transferList:c}=a.serialize(o),h={objectIdMap:null,inner:e.createMessage(n,this._version,this._attributeStore.epoch)};if(this._schema?.mesh.properties.returnMeshObjectId){h.objectIdMap={};const t=e.reader?.getCursor();if(t)for(;t.next();)h.objectIdMap[t.getDisplayId()]=t.getObjectId()}if(r(s.signal),await this._connection.container.onMessage(h,{signal:s.signal,transferList:c}),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")){const t=s.tile;console.debug(`Version[${this._version}] Tile[${t.key.id}, end=${e.end}] Processor._process.await`)}}async _fetchResources(e,t){await this._fetchMatcherResources(e),await this._fetchWriterResources(e,t)}async _fetchMatcherResources(e){if(e.reader)return this._factory.enqueueMatcherRequests(this._proxy,e.reader)}async _fetchWriterResources(e,t){if(!e.reader)return;const s=e.reader.getCursor(),r=e.subscription.tile.createArcadeEvaluationOptions(v(this._schema));for(;s.next();)this._factory.enqueueWriterRequests(this._proxy,s,r,t);await this._proxy.fetchEnqueuedResources()}async _write(e,t,s,a){const o=e.subscription.tile,n=e.reader?.getCursor(),c=n?.getSize()??0,h=o.tileInfoView.tileInfo.isWrappable,g=o.tileInfoView.spatialReference.isWGS84,p=new u(o.key,this._strategy.enablePixelBuffering,h,g,c);if(!n)return p;const y=x(o.transform,a),d=o.createArcadeEvaluationOptions(v(this._schema));let _=0;for(;n.next();){++_%1e3||(await i(0),r(e.subscription));const a=this._getSortKeyValue(n,t);p.entityStart(n.getDisplayId(),a);try{this._factory.write(p,this._proxy,n,d,s,o.level,y)}catch(l){}p.entityEnd()}return p}_getSortKeyValue(e,t){if(!this._sortInfo)return 0;const{computed:s,order:r,byRenderer:i}=this._sortInfo,a=i?this._factory.getSortKey(e,t):s?.read(e,t);return null==a||isNaN(a)?0:a*("asc"===r?-1:1)}}function I(e,t){const s=[];return e?.timeExtent?.start===t.timeExtent?.start&&e?.timeExtent?.end===t.timeExtent?.end||s.push("timeProperties"),s}function v(e){const{timeZone:t}=e?.mesh.properties??{},{timeExtent:s}=e?.expressionProperties??{};return{timeZone:t,timeExtent:s}}function x(e,t){const s=n(e),r=[];for(const i of t.rings){const e=[];for(const t of i)e.push([c(s,t[0]),h(s,t[1])]);r.push(e)}return{rings:r}}export{j as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../core/CircularArray.js";import t from"../../../../core/Error.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{create as s}from"../../../../geometry/support/aaBoundingRect.js";import"../../tiling/TileInfoView.js";import r from"../../tiling/TileKey.js";import"../../tiling/TileQueue.js";import"../../tiling/TileStrategy.js";import{FeatureTile as n}from"../../engine/webgl/FeatureTile.js";const o=1e3;class d{constructor(t,i,s,r,n,d){this.getStage=t,this.getSubscriptionVersion=i,this.version=s,this._fader=r,this._container=n,this._tileInfoView=d,this._pendingUpdates=new e(o),this._locked=!1,this._tiles=new Map}destroy(){for(const e of this.tiles())this._fader.unregisterFeatureTile(e),e.destroy();this._pendingUpdates.clear(),this._tiles.clear(),this._container=null,this._fader=null}tiles(){return this._tiles.values()}size(){return this._tiles.size}get usedMemory(){let e=0;for(const t of this._tiles.values())e+=t.usedMemory;for(const t of this._pendingUpdates.entries)t&&(e+=l(t.inner));return e}get requiresRefresh(){for(const e of this._tiles.values())if(e.requiresRefresh)return!0;return!1}getTile(e){return this._tiles.get(e)}setTiles(e){this._tiles.clear();for(const t of e)this._tiles.set(t.key.id,t)}lockUploads(){this._locked=!0}unlockUploads(){this._locked=!1,this.flush()}enqueueUpdate(e){this._pendingUpdates.enqueue(e)}update(e){if(!this._locked)for(;this._pendingUpdates.size;){const t=this._pendingUpdates.peek();if(null==t||t.inner.attributeEpoch>e)break;this._updateTile(t),this._pendingUpdates.dequeue()}}removeTile(e){const t=this._tiles.get(e);has("esri-2d-update-debug")&&console.debug(`Tile[${e}] RenderState.removeTile`),t&&(this._fader.unregisterFeatureTile(t),t.destroy()),this._tiles.delete(e)}isTileDone(e){const t=this._tiles.get(e.id);return!!t&&(t.isReady&&t.decluttered)}flush(){for(;this._pendingUpdates.size;){const e=this._pendingUpdates.dequeue();null!=e&&this._updateTile(e)}for(const e of this._tiles.values())e.upload()}_updateTile(e){const{inner:t,objectIdMap:i}=e,s=this.getSubscriptionVersion(t.id);if(s!==t.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${t.subscriptionVesrion} != ${s}`;console.debug(`Version[${e}] Tile[${t.id}] FeatureContainer - Dropping message, outdated version]`,t)}return}if(has("esri-2d-update-debug")){const e=t.debugInfo?.chunkId??"<EnsureEnd>";console.debug(`Version[${t.version}] Tile[${t.id}] Chunk[${e}] RenderState.updateTile [${t.type}]`,t)}const r=this._ensureTile(t.id);if("update"===t.type){const[e,...s]=t.modify;r.onMessage({type:"update",modify:e,remove:t.remove,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});for(const r of s){const e=this._tiles.get(r.tileId);e&&e.onMessage({type:"update",modify:r,remove:t.remove,end:!1,isPixelBuffer:!0,attributeEpoch:null,objectIdMap:i})}return}if(null==t.append)return void r.onMessage({type:"append",clear:t.clear,debugInfo:t.debugInfo,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});const[n,...o]=t.append;r.onMessage({type:"append",clear:t.clear,append:n,debugInfo:t.debugInfo,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});for(const d of o){const e=this._tiles.get(d.tileId);e&&e.onMessage({type:"update",modify:d,remove:[],sort:!1,end:!1,isPixelBuffer:!0,attributeEpoch:null,objectIdMap:i})}}_ensureTile(e){if(!this._tiles.has(e)){const t=this._createTile(e);this._copyPixelBufferedEntitiesInto(t),this._tiles.set(e,t)}return this._tiles.get(e)}_createTile(e){has("esri-2d-update-debug")&&console.debug(`Version[${this.version}] Tile[${e}] RenderState.createTile`);const o=new r(e),d=this._tileInfoView.getTileBounds(s(),o),l=d[0],u=d[3],a=this._tileInfoView.getTileResolution(o.level),p=this._container.instanceStore.find(20)?.instanceId,c=new n(o,a,l,u,this._fader,p,!0);if(this._fader.registerFeatureTile(c),c.stage=this.getStage(),!c.stage){const e=new t("featurelayerview:webgl","Cannot create tile with empty stage");i.getLogger("esri.views.2d.layers.features.RenderState").error(e)}return c}_copyPixelBufferedEntitiesInto(e){let t=7;const i=this._tileInfoView.getLODInfoAt(e.key);for(let s=-1;s<=1;s++)for(let r=-1;r<=1;r++){if(0===s&&0===r)continue;const n=e.key.getNormalizedNeighbor(r,s,i).id,o=this._tiles.get(n);if(null!=o){const i=1<<t;e.copyPixelBufferedEntitesFrom(o,i,r,s)}t--}}}function l(e){switch(e.type){case"update":return e.modify.reduce((e,t)=>e+u(t),0);case"append":return e.append?e.append.reduce((e,t)=>e+u(t),0):0}}function u(e){return e.entities.byteLength+e.data.reduce((e,t)=>e+a(t),0)}function a(e){return e.indices.byteLength+e.vertices.byteLength+(e.metrics?.byteLength??0)}export{d as RenderState};
2
+ import e from"../../../../core/CircularArray.js";import t from"../../../../core/Error.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{signal as s}from"../../../../core/signal.js";import{create as r}from"../../../../geometry/support/aaBoundingRect.js";import"../../tiling/TileInfoView.js";import n from"../../tiling/TileKey.js";import"../../tiling/TileQueue.js";import"../../tiling/TileStrategy.js";import{FeatureTile as o}from"../../engine/webgl/FeatureTile.js";const d=1e3;class u{constructor(t,i,r,n,o){this.getStage=t,this.getSubscriptionVersion=i,this.version=r,this._container=n,this._tileInfoView=o,this._pendingUpdates=new e(d),this._locked=!1,this._tiles=new Map,this._updating=s(!1)}destroy(){for(const e of this.tiles())this._fader?.unregisterFeatureTile(e),e.destroy();this._pendingUpdates.clear(),this._tiles.clear(),this._container=null}get _fader(){return this.getStage()?.labelManager.symbolFader}tiles(){return Array.from(this._tiles.values())}size(){return this._tiles.size}get usedMemory(){let e=0;for(const t of this._tiles.values())e+=t.usedMemory;for(const t of this._pendingUpdates.entries)t&&(e+=a(t.inner));return e}get requiresRefresh(){for(const e of this._tiles.values())if(e.requiresRefresh)return!0;return!1}get updating(){return this._updating.value}getTile(e){return this._tiles.get(e)}setTiles(e){this._tiles.clear();for(const t of e)this._tiles.set(t.key.id,t)}lockUploads(){this._locked=!0}unlockUploads(){this._locked=!1}enqueueUpdate(e){this._pendingUpdates.enqueue(e),this._notify()}update(e){if(!this._locked)for(;this._pendingUpdates.size;){const t=this._pendingUpdates.peek();if(null==t||t.inner.attributeEpoch>e)break;this._updateTile(t),this._pendingUpdates.dequeue()}this._notify()}flush(e){for(;this._pendingUpdates.size;){const t=this._pendingUpdates.dequeue();null!=t&&(t.inner.attributeEpoch>e&&console.warn("Tried to flush RenderState, but patch more recent than current",{patchEpoch:t.inner.attributeEpoch,currentEpoch:e}),this._updateTile(t))}this._notify()}removeTile(e){const t=this._tiles.get(e);has("esri-2d-update-debug")&&console.debug(`Tile[${e}] RenderState.removeTile`),t&&(this._fader?.unregisterFeatureTile(t),t.destroy()),this._tiles.delete(e)}_notify(){this._updating.mutate(e=>0!==this._pendingUpdates.size)}_updateTile(e){const{inner:t,objectIdMap:i}=e,s=this.getSubscriptionVersion(t.id);if(s!==t.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${t.subscriptionVesrion} != ${s}`;console.debug(`Version[${e}] Tile[${t.id}] FeatureContainer - Dropping message, outdated version]`,t)}return}if(has("esri-2d-update-debug")){const e=t.debugInfo?.chunkId??"<EnsureEnd>";console.debug(`Version[${t.version}] Tile[${t.id}] Chunk[${e}] RenderState.updateTile [${t.type}]`,t)}const r=this._ensureTile(t.id);if("update"===t.type){const[e,...s]=t.modify;r.update({type:"update",modify:e,remove:t.remove,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});for(const r of s){const e=this._tiles.get(r.tileId);e&&e.update({type:"update",modify:r,remove:t.remove,end:!1,isPixelBuffer:!0,attributeEpoch:null,objectIdMap:i})}return}if(null==t.append)return void r.update({type:"append",debugInfo:t.debugInfo,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});const[n,...o]=t.append;r.update({type:"append",append:n,debugInfo:t.debugInfo,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});for(const d of o){const e=this._tiles.get(d.tileId);e&&e.update({type:"update",modify:d,remove:[],sort:!1,end:!1,isPixelBuffer:!0,attributeEpoch:null,objectIdMap:i})}}_ensureTile(e){if(!this._tiles.has(e)){const t=this._createTile(e);this._copyPixelBufferedEntitiesInto(t),this._tiles.set(e,t)}return this._tiles.get(e)}_createTile(e){has("esri-2d-update-debug")&&console.debug(`Version[${this.version}] Tile[${e}] RenderState.createTile`);const s=new n(e),d=this._tileInfoView.getTileBounds(r(),s),u=d[0],a=d[3],l=this._tileInfoView.getTileResolution(s.level),p=this._container.instanceStore.find(20)?.instanceId,c=new o(s,l,u,a,this._fader,p);if(this._fader?.registerFeatureTile(c),c.stage=this.getStage(),!c.stage){const e=new t("featurelayerview:webgl","Cannot create tile with empty stage");i.getLogger("esri.views.2d.layers.features.RenderState").error(e)}return c}_copyPixelBufferedEntitiesInto(e){let t=7;const i=this._tileInfoView.getLODInfoAt(e.key);for(let s=-1;s<=1;s++)for(let r=-1;r<=1;r++){if(0===s&&0===r)continue;const n=e.key.getNormalizedNeighbor(r,s,i).id,o=this._tiles.get(n);if(null!=o){const i=1<<t;e.copyPixelBufferedEntitesFrom(o,i,r,s)}t--}}}function a(e){switch(e.type){case"update":return e.modify.reduce((e,t)=>e+l(t),0);case"append":return e.append?e.append.reduce((e,t)=>e+l(t),0):0}}function l(e){return e.entities.byteLength+e.data.reduce((e,t)=>e+p(t),0)}function p(e){return e.indices.byteLength+e.vertices.byteLength+(e.metrics?.byteLength??0)}export{u as RenderState};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{tileSize as t}from"../../../engine/webgl/definitions.js";import{createArcadeEvaluationOptions as e}from"../support/arcadeUtils.js";class r{constructor(t){this._options=t}insert(t,r){const o=t.getCursor(),{arcadeContextInfo:s,scale:i}=this._options,n=e(i,s);for(;o.next();)this._insertFeature(o,n,this._options.sqlOptions,r)}_insertFeature(e,r,o,s){const{featureFilter:i}=this._options;if(null!==i&&!i.check(e,o))return;let n=0,c=0;if("esriGeometryPoint"===e.geometryType)n=e.readXWorldSpace(),c=e.readYWorldSpace();else{if(s){const r=e.readCentroidForDisplay();if(null==r)return;const[o,s]=r.coords;if(o<0||o>t||s<0||s>t)return}const r=e.readCentroidWorldSpace();if(null==r)return;n=r.coords[0],c=r.coords[1]}this._insert(e,n,c,r)}}export{r as AAggregateSpatialIndex};
2
+ class s{constructor(s){this.options=s}get hash(){return this.options.hash}}export{s as AAggregateSpatialIndex};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{GeohashTree as e}from"../../../../../geohash/GeohashTree.js";import{getGeohashBounds as t,getGeohash as s}from"../../../../../geohash/geohashUtils.js";import{AAggregateSpatialIndex as o}from"./AAggregateSpatialIndex.js";class r extends o{constructor(t){super(t),this._tree=new e(this._options.fields)}get usedMemory(){return this._tree.usedMemory}put(e){throw new Error("Geohash tree does not support put")}putBounded(e,s,o){const{geohashLevel:r,spatialReference:h}=this._options,i=t(s,o,r,h);null!=i&&this._tree.putBins(e,i)}_insert(e,t,o,r){const{geohashLevel:h,spatialReference:i}=this._options,n=s(t,o,h,i);n&&this._tree.insert(e,t,o,n[0],n[1],h,r)}}export{r as GeohashSpatialIndex};
2
+ import{getOrCreateMapValue as e}from"../../../../../core/MapUtils.js";import{GeohashCell as r}from"../../../../../geohash/GeohashCell.js";import{GeohashTree as t}from"../../../../../geohash/GeohashTree.js";import{getGeohash as o,getGeohashBounds as s}from"../../../../../geohash/geohashUtils.js";import{AAggregateSpatialIndex as i}from"./AAggregateSpatialIndex.js";import{createArcadeEvaluationOptions as n}from"../support/arcadeUtils.js";class a extends i{constructor(e,r){super(e),this._reader=r,this._tree=new t,this.insert(this._reader)}get usedMemory(){return this._tree.usedMemory}forEachInCell(e,r){throw new Error("Not supported.")}insert(e){const r=e.getCursor(),{featureFilter:t,sqlOptions:s,geohashLevel:i,spatialReference:n}=this.options.inner;for(;r.next();){const e=r;if(null!==t&&!t.check(e,s))continue;let a=0,h=0;if("esriGeometryPoint"===e.geometryType)a=e.readXWorldSpace(),h=e.readYWorldSpace();else{const r=e.readCentroidWorldSpace();if(null==r)return;[a,h]=r.coords}const d=o(a,h,i,n);d&&this._tree.insert(e,d[0],d[1],i)}}putBounded(t,o,i,a){const{arcadeContextInfo:h,scale:d,geohashLevel:l,spatialReference:c,fields:p}=this.options.inner,f=n(d,h),u=s(i,a,l,c);null!=u&&this._tree.forEachInBounds(u,s=>{let i=null;for(const n of s.indices){this._reader.setIndex(n);const a=this._reader.getObjectId();o.has(a)||(i??=e(t,s.id,()=>r.create(p,s.xNode,s.yNode,s.depth)),i.insert(this._reader,l,c,f),o.add(a))}})}}export{a as GeohashSpatialIndex};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{quantizeX as t,quantizeY as e,quantizeOptimizedGeometry as r}from"../../../../../layers/graphics/featureConversionUtils.js";import i from"../../../../../layers/graphics/OptimizedGeometry.js";import{AAggregateCell as s}from"./AAggregateCell.js";import{AccumulatedStatistics as o}from"./AccumulatedStatistics.js";class l extends s{static createId(t,e){return`${t}.${e}`}static create(t,e,r,i){return new l(t,e,o.create(r),i)}constructor(t,e,r,i){super(r),this.gridX=t,this.gridY=e,this._worldUnitsPerCell=i,this._count=0,this._xWorldTotal=0,this._yWorldTotal=0,this._objectIds=new Set}get id(){return l.createId(this.gridX,this.gridY)}get containedObjectIds(){return this._objectIds}get count(){return this._count}get firstObjectId(){return this._objectIds.values().next().value}get centroidXWorld(){return this._xWorldTotal/this._count}get centroidYWorld(){return this._yWorldTotal/this._count}get usedMemory(){return 48}clone(){const t=new l(this.gridX,this.gridY,this._statistics.clone(),this._worldUnitsPerCell);return t._count=this._count,t._xWorldTotal=this._xWorldTotal,t._yWorldTotal=this._yWorldTotal,t._firstFeatureAttributes=this._firstFeatureAttributes,t._objectIds=new Set(this._objectIds),t}insert(t,e,r,i){0===this._count?this._firstFeatureAttributes=t.readAttributes():this._firstFeatureAttributes=null,this._count+=1,this._xWorldTotal+=r,this._yWorldTotal+=i,this._statistics.insert(t,e),this._objectIds.add(t.getObjectId())}merge(t){if(0!==t._count){this._count+=t._count,this._firstFeatureAttributes=t._firstFeatureAttributes,this._xWorldTotal+=t._xWorldTotal,this._yWorldTotal+=t._yWorldTotal,this._statistics.merge(t._statistics);for(const e of t._objectIds.values())this._objectIds.add(e)}}getCentroidX(e){return null==e?this.centroidXWorld:t(e,this.centroidXWorld)}getCentroidY(t){return null==t?this.centroidYWorld:e(t,this.centroidYWorld)}getGeometry(t,e){const s=this.gridX*this._worldUnitsPerCell,o=this.gridY*this._worldUnitsPerCell,l=new i([4],[s,o,s+this._worldUnitsPerCell,o,s+this._worldUnitsPerCell,o+this._worldUnitsPerCell,s,o+this._worldUnitsPerCell]);return null!=e?r(l,"esriGeometryPolygon",e):l}getCentroid(t){const e=new i([],[this.centroidXWorld,this.centroidYWorld]);return null!=t?r(e,"esriGeometryPoint",t):e}getGeometricCentroid(t,e){const s=this.gridX*this._worldUnitsPerCell+.5*this._worldUnitsPerCell,o=this.gridY*this._worldUnitsPerCell+.5*this._worldUnitsPerCell,l=new i([],[s,o]);return null!=e?r(l,"esriGeometryPoint",e):l}getAttributes(){const t={aggregateId:this.id};for(const e of this._statistics.values())t[e.field.name]=e.value;return null!=this._firstFeatureAttributes?{...t,...this._firstFeatureAttributes}:t}}export{l as GridCell};
2
+ import{quantizeX as t,quantizeY as e,quantizeOptimizedGeometry as r}from"../../../../../layers/graphics/featureConversionUtils.js";import i from"../../../../../layers/graphics/OptimizedGeometry.js";import{AAggregateCell as s}from"./AAggregateCell.js";import{AccumulatedStatistics as o}from"./AccumulatedStatistics.js";class l extends s{static createId(t,e){return`${t}.${e}`}static create(t,e,r,i){return new l(t,e,o.create(r),i)}constructor(t,e,r,i){super(r),this.gridX=t,this.gridY=e,this._worldUnitsPerCell=i,this._count=0,this._xWorldTotal=0,this._yWorldTotal=0,this._objectIds=new Set}get id(){return l.createId(this.gridX,this.gridY)}get containedObjectIds(){return this._objectIds}get count(){return this._count}get firstObjectId(){return this._objectIds.values().next().value}get centroidXWorld(){return this._xWorldTotal/this._count}get centroidYWorld(){return this._yWorldTotal/this._count}get usedMemory(){return 48}clone(){const t=new l(this.gridX,this.gridY,this._statistics.clone(),this._worldUnitsPerCell);return t._count=this._count,t._xWorldTotal=this._xWorldTotal,t._yWorldTotal=this._yWorldTotal,t._firstFeatureAttributes=this._firstFeatureAttributes,t._objectIds=new Set(this._objectIds),t}insert(t,e){let r=0,i=0;if("esriGeometryPoint"===t.geometryType)r=t.readXWorldSpace(),i=t.readYWorldSpace();else{const e=t.readCentroidWorldSpace();if(null==e)return;[r,i]=e.coords}0===this._count?this._firstFeatureAttributes=t.readAttributes():this._firstFeatureAttributes=null,this._count+=1,this._xWorldTotal+=r,this._yWorldTotal+=i,this._statistics.insert(t,e),this._objectIds.add(t.getObjectId())}merge(t){if(0!==t._count){this._count+=t._count,this._firstFeatureAttributes=t._firstFeatureAttributes,this._xWorldTotal+=t._xWorldTotal,this._yWorldTotal+=t._yWorldTotal,this._statistics.merge(t._statistics);for(const e of t._objectIds.values())this._objectIds.add(e)}}getCentroidX(e){return null==e?this.centroidXWorld:t(e,this.centroidXWorld)}getCentroidY(t){return null==t?this.centroidYWorld:e(t,this.centroidYWorld)}getGeometry(t,e){const s=this.gridX*this._worldUnitsPerCell,o=this.gridY*this._worldUnitsPerCell,l=new i([4],[s,o,s+this._worldUnitsPerCell,o,s+this._worldUnitsPerCell,o+this._worldUnitsPerCell,s,o+this._worldUnitsPerCell]);return null!=e?r(l,"esriGeometryPolygon",e):l}getCentroid(t){const e=new i([],[this.centroidXWorld,this.centroidYWorld]);return null!=t?r(e,"esriGeometryPoint",t):e}getGeometricCentroid(t,e){const s=this.gridX*this._worldUnitsPerCell+.5*this._worldUnitsPerCell,o=this.gridY*this._worldUnitsPerCell+.5*this._worldUnitsPerCell,l=new i([],[s,o]);return null!=e?r(l,"esriGeometryPoint",e):l}getAttributes(){const t={aggregateId:this.id};for(const e of this._statistics.values())t[e.field.name]=e.value;return null!=this._firstFeatureAttributes?{...t,...this._firstFeatureAttributes}:t}}export{l as GridCell};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ class s{static createId(s,t){return`${s}.${t}`}constructor(t,i){this._indices=[],this.id=s.createId(t,i)}push(s){this._indices.push(s)}}export{s as GridIndexCell};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{estimateNumberMemory as e}from"../../../../../core/memoryEstimations.js";import{getMetersPerUnitForSR as t,inchesPerMeter as s}from"../../../../../core/units.js";import{AAggregateSpatialIndex as i}from"./AAggregateSpatialIndex.js";import{GridCell as l}from"./GridCell.js";const o=96;function r(e,i){return t(e)*s*o/i}class n extends i{constructor(e){super(e),this._cells=new Map,this._pixelsPerMapUnit=r(e.spatialReference,e.scale)}get usedMemory(){const t=this._cells.values().next().value;return t?(e+t.usedMemory)*this._cells.size:0}put(e){for(const t of this._cells.values()){const s=e.get(t.id);s?s.merge(t):e.set(t.id,t.clone())}}putBounded(e,t,s){const i=[t.xmin,t.ymin,t.xmax,t.ymax],[l,o,r,n]=i,c=Math.floor(l*this._pixelsPerMapUnit/this._options.cellSize),p=Math.floor(o*this._pixelsPerMapUnit/this._options.cellSize),a=Math.ceil(r*this._pixelsPerMapUnit/this._options.cellSize),h=Math.ceil(n*this._pixelsPerMapUnit/this._options.cellSize);for(let _=p;_<=h;_++)for(let t=c;t<=a;t++){const s=`${t}.${_}`,i=this._cells.get(s);if(!i)continue;const l=e.get(i.id);l?i&&!e.has(i.id)&&l.merge(i):e.set(i.id,i.clone())}}_insert(e,t,s,i){const l=t*this._pixelsPerMapUnit,o=s*this._pixelsPerMapUnit,r=Math.floor(l/this._options.cellSize),n=Math.floor(o/this._options.cellSize);this._getCellOrCreate(r,n).insert(e,i,t,s)}_getCellOrCreate(e,t){const s=l.createId(e,t);let i=this._cells.get(s);if(!i){const o=1*this._options.cellSize/this._pixelsPerMapUnit;i=l.create(e,t,this._options.fields,o),this._cells.set(s,i)}return i}}export{n as GridSpatialIndex,r as pixelsPerMapUnit};
2
+ import{getOrCreateMapValue as e}from"../../../../../core/MapUtils.js";import{getMetersPerUnitForSR as t,inchesPerMeter as r}from"../../../../../core/units.js";import{AAggregateSpatialIndex as i}from"./AAggregateSpatialIndex.js";import{GridCell as s}from"./GridCell.js";import{GridIndexCell as n}from"./GridIndexCell.js";import{createArcadeEvaluationOptions as o}from"../support/arcadeUtils.js";const l=96;function a(e,i){return t(e)*r*l/i}class c extends i{constructor(e,t){super(e),this._reader=t,this._cells=new Map,this._pixelsPerMapUnit=a(e.inner.spatialReference,e.inner.scale),this.insert(this._reader)}get worldUnitsPerCell(){return 1*this.options.inner.cellSize/this._pixelsPerMapUnit}insert(e){const t=e.getCursor();for(;t.next();){const e=t,{featureFilter:r,sqlOptions:i,cellSize:s}=this.options.inner;if(null!==r&&!r.check(e,i))continue;let n=0,o=0;if("esriGeometryPoint"===e.geometryType)n=e.readXWorldSpace(),o=e.readYWorldSpace();else{const t=e.readCentroidWorldSpace();if(null==t)return;[n,o]=t.coords}const l=n*this._pixelsPerMapUnit,a=o*this._pixelsPerMapUnit,c=Math.floor(l/s),p=Math.floor(a/s);this._getCellOrCreate(c,p).push(t.getIndex())}}get usedMemory(){return 0}forEachInCell(e,t){const r=this._cells.get(e);if(r)for(const i of r._indices)this._reader.setIndex(i),t(this._reader)}putBounded(t,r,i,n){const{arcadeContextInfo:l,scale:a,cellSize:c,fields:p}=this.options.inner,d=o(a,l),h=[i.xmin,i.ymin,i.xmax,i.ymax],[f,_,u,x]=h,m=Math.floor(f*this._pixelsPerMapUnit/c),M=Math.floor(_*this._pixelsPerMapUnit/c),g=Math.ceil(u*this._pixelsPerMapUnit/c),C=Math.ceil(x*this._pixelsPerMapUnit/c);for(let o=M;o<=C;o++)for(let i=m;i<=g;i++){const n=s.createId(i,o),l=this._cells.get(n);if(!l)continue;let a=null;for(const c of l._indices){this._reader.setIndex(c);const n=this._reader.getObjectId();r.has(n)||(a??=e(t,l.id,()=>s.create(i,o,p,this.worldUnitsPerCell)),a.insert(this._reader,d),r.add(n))}}}_getCellOrCreate(e,t){const r=n.createId(e,t);let i=this._cells.get(r);return i||(i=new n(e,t),this._cells.set(r,i)),i}}export{c as GridSpatialIndex,a as pixelsPerMapUnit};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as r}from"../../../../../layers/support/arcgisLayerUrl.js";import{getServiceGeometryType as t}from"./geometryUtils.js";import{getLayerDeconflictionEnabled as i,createLabelVVEvaluator as s}from"./labelingUtils.js";import{ExceedsLimitCache as a}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as o}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as l}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as n}from"../support/rendererUtils.js";class u{constructor(e){this.layer=e,this._cache=new a}getLabelingDeconflictionInfo(e){const r=this.layer,t=i(r);return[{vvEvaluators:{0:s(r.renderer)},deconflictionEnabled:t}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return o(t,null,{definitionExpression:this.layer.definitionExpression,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:this.layer.customParameters,gdbVersion:null,historicMoment:null,postQueryFilter:null,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,r,t){const{fields:i,geometryType:s,orderBy:a,objectIdField:o,renderer:n,labelingInfo:u,labelsVisible:d}=this.layer,p={featureReduction:null,labelingInfoSource:this.layer.id,fields:i.map(e=>e.toJSON()),geometryType:s,labelingInfo:u,labelsVisible:d,objectIdField:o,orderBy:a??"default",renderer:n?.clone()};return l(e,r,p,t)}get hasRequiredSupport(){return n(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>this.layer.outFields,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}_createServiceInfo(i){const s=this.layer,{capabilities:a,editingInfo:o,objectIdField:l,globalIdField:n,datesInUnknownTimezone:u,dateFieldsTimeZone:d,orderBy:p,parsedUrl:c,hasZ:y,hasM:m}=s,f=s.fieldsIndex.toJSON(),h=t(s),g=s.timeInfo?.toJSON(),b=s.spatialReference.toJSON(),F=e(c);let I=l;if(p?.length){const e=!p[0].valueExpression&&p[0].field;e&&(I=e)}const S=r(F.path),R=i.spatialReference.toJSON();return{type:"feature-service",source:F,isSourceHosted:S,orderByFields:I,outSpatialReference:R,metadata:{timeReferenceUnknownClient:u,dateFieldsTimeZone:d,globalIdField:n,fieldsIndex:f,geometryType:h,hasZ:y??!1,hasM:m??!1,featureIdInfo:{type:"object-id",fieldName:l},timeInfo:g,spatialReference:b,outSpatialReference:R,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:a.query.maxRecordCount,tileMaxRecordCount:a.query.tileMaxRecordCount,supportsCompactGeometry:a.query.supportsCompactGeometry,supportsDefaultSpatialReference:a.query.supportsDefaultSpatialReference,supportsFormatPBF:a.query.supportsFormatPBF,supportsMaxRecordCountFactor:a.query.supportsMaxRecordCountFactor,supportsQuantization:a.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:a.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:a.query.supportsDegeneratedQuantizedGeometry,lastEditDate:o?.lastEditDate?.getTime()}}}}export{u as CatalogFootprintLayerAdapter};
2
+ import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as r}from"../../../../../layers/support/arcgisLayerUrl.js";import{getServiceGeometryType as t}from"./geometryUtils.js";import{createLabelVVEvaluator as i}from"./labelingUtils.js";import{ExceedsLimitCache as s}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as a}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as o}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as l}from"../support/rendererUtils.js";class n{constructor(e){this.layer=e,this._cache=new s}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:i(this.layer.renderer)}}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return a(t,null,{definitionExpression:this.layer.definitionExpression,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:this.layer.customParameters,gdbVersion:null,historicMoment:null,postQueryFilter:null,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,r,t){const{fields:i,geometryType:s,orderBy:a,objectIdField:l,renderer:n,labelingInfo:u,labelsVisible:p}=this.layer,d={featureReduction:null,labelingInfoSource:this.layer.id,fields:i.map(e=>e.toJSON()),geometryType:s,labelingInfo:u,labelsVisible:p,objectIdField:l,orderBy:a??"default",renderer:n?.clone()};return o(e,r,d,t)}get hasRequiredSupport(){return l(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>this.layer.outFields,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}_createServiceInfo(i){const s=this.layer,{capabilities:a,editingInfo:o,objectIdField:l,globalIdField:n,datesInUnknownTimezone:u,dateFieldsTimeZone:p,orderBy:d,parsedUrl:c,hasZ:y,hasM:m}=s,f=s.fieldsIndex.toJSON(),h=t(s),g=s.timeInfo?.toJSON(),b=s.spatialReference.toJSON(),F=e(c);let I=l;if(d?.length){const e=!d[0].valueExpression&&d[0].field;e&&(I=e)}const S=r(F.path),R=i.spatialReference.toJSON();return{type:"feature-service",source:F,isSourceHosted:S,orderByFields:I,outSpatialReference:R,metadata:{timeReferenceUnknownClient:u,dateFieldsTimeZone:p,globalIdField:n,fieldsIndex:f,geometryType:h,hasZ:y??!1,hasM:m??!1,featureIdInfo:{type:"object-id",fieldName:l},timeInfo:g,spatialReference:b,outSpatialReference:R,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:a.query.maxRecordCount,tileMaxRecordCount:a.query.tileMaxRecordCount,supportsCompactGeometry:a.query.supportsCompactGeometry,supportsDefaultSpatialReference:a.query.supportsDefaultSpatialReference,supportsFormatPBF:a.query.supportsFormatPBF,supportsMaxRecordCountFactor:a.query.supportsMaxRecordCountFactor,supportsQuantization:a.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:a.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:a.query.supportsDegeneratedQuantizedGeometry,lastEditDate:o?.lastEditDate?.getTime()}}}}export{n as CatalogFootprintLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{clone as e}from"../../../../../core/lang.js";import{sqlAnd as r}from"../../../../../core/sql.js";import{isHostedAgolService as t}from"../../../../../layers/support/arcgisLayerUrl.js";import{canConvertSqlRelativeTime as i,sqlRelativeTimeToAbsolute as s}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as a}from"../../../../../networks/support/networkFieldUtils.js";import{getEffectiveFeatureReduction as o}from"./featureReductionUtils.js";import{createFeatureIdInfo as l}from"./featureServiceUtils.js";import{addFloorFilter as n,hasFloorFilter as y}from"./floorFilterUtils.js";import{getServiceGeometryType as d}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as p,getLayerDeconflictionEnabled as u,createLabelVVEvaluator as c}from"./labelingUtils.js";import{ExceedsLimitCache as m}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as h,createFeatureSourceSchema as f}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as g}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as b}from"../support/rendererUtils.js";class F{constructor(e){this.layer=e,this._cache=new m}getLabelingDeconflictionInfo(e){const r=this.layer,t=p(r,e)??u(r),i=o(r,e),s=[...r.labelingInfo||[],...i?.labelingInfo||[]];return[{vvEvaluators:{0:c(r.renderer)},deconflictionEnabled:t,labelingInfo:s}]}async createSourceSchema(e,t){const a=this._createServiceInfo(e),o=null!=this.layer.editingInfo?.lastEditDate,l=this.layer.refreshInterval>0,n=!o&&l,y=h(a.isSourceHosted,n,this.layer.capabilities,a.metadata.geometryType,e.extent,this.layer.fullExtent),d=null!=this.layer.subtypeCode?`${this.layer.subtypeField} = ${this.layer.subtypeCode}`:null,p=r(this.layer.definitionExpression,d),u=i(p)?await s(this.layer.fieldsIndex,p,this.layer.capabilities.query.relativeTimeBinWindow):p,c=p!==u?{where:p}:null,{gdbVersion:m,apiKey:g,historicMoment:b,timeExtent:F,customParameters:I,displayFilterInfo:S}=this.layer;return f(a,y,{definitionExpression:u,returnZ:e.returnZ,returnM:e.returnM,postQueryFilter:c,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:S,customParameters:I,gdbVersion:m,historicMoment:b,timeExtent:F,apiKey:g,sourceRefreshVersion:t,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,r,t){const{fields:i,renderer:s,geometryType:a,labelingInfo:l,labelsVisible:n,orderBy:y,objectIdField:d,trackInfo:p,symbolLayerDrawing:u}=this.layer,c={fields:i.map(e=>e.toJSON()),renderer:s?.clone(),labelingInfoSource:this.layer.id,featureReduction:o(this.layer,r),geometryType:a,labelingInfo:l,labelsVisible:n,objectIdField:d,orderBy:y??"default",trackInfo:p,symbolLayerDrawing:u};return g(e,r,c,t)}get hasRequiredSupport(){return b(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,r){return n(this.layer,e,r)}getUpdateHashProperties(e){return this.layer.destroyed?[]:[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>o(this.layer,e),()=>y(this.layer,e)?e.floors:null,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.outFields,()=>this.layer.renderer,()=>this.layer.subtypeCode,()=>this.layer.trackInfo,()=>this.layer.symbolLayerDrawing?.drawOrder,()=>this.layer.symbolLayerDrawing?.enabled,()=>e?.requiredFieldsOptions?.featureTitleFields&&this.layer.featureTitleFields,()=>e?.requiredFieldsOptions?.utilityNetworkFields&&a(e,this.layer)]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(r){const i=this.layer,{capabilities:s,editingInfo:a,typeIdField:o,globalIdField:n,datesInUnknownTimezone:y,dateFieldsTimeZone:p,orderBy:u,subtypeField:c}=i,m=i.fieldsIndex.toJSON(),h=d(i),{hasZ:f,hasM:g}=i,b=i.timeInfo?.toJSON(),F=i.spatialReference.toJSON(),I=i.types?.map(e=>e.toJSON()),S=e(this.layer.parsedUrl);this.layer.dynamicDataSource&&(S.query={layer:JSON.stringify({source:this.layer.dynamicDataSource})});let O=this.layer.objectIdField;if(u?.length){const e=!u[0].valueExpression&&u[0].field;e&&(O=e)}const x=t(S.path),R=r.spatialReference.toJSON();return{type:"feature-service",source:S,isSourceHosted:x,orderByFields:O,outSpatialReference:R,metadata:{typeIdField:o??void 0,types:I,timeReferenceUnknownClient:y,dateFieldsTimeZone:p,subtypeField:c,globalIdField:n,fieldsIndex:m,geometryType:h,hasZ:f,hasM:g,featureIdInfo:l(i),timeInfo:b,spatialReference:F,outSpatialReference:R,subtypes:this.layer.subtypes?.map(e=>e.toJSON())},queryMetadata:{maxRecordCount:s.query.maxRecordCount,tileMaxRecordCount:s.query.tileMaxRecordCount,supportsCompactGeometry:s.query.supportsCompactGeometry,supportsDefaultSpatialReference:s.query.supportsDefaultSpatialReference,supportsFormatPBF:s.query.supportsFormatPBF,supportsMaxRecordCountFactor:s.query.supportsMaxRecordCountFactor,supportsQuantization:s.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:s.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:s.query.supportsDegeneratedQuantizedGeometry,lastEditDate:a?.lastEditDate?.getTime()}}}}export{F as FeatureLayerAdapter};
2
+ import{clone as e}from"../../../../../core/lang.js";import{sqlAnd as r}from"../../../../../core/sql.js";import{isHostedAgolService as t}from"../../../../../layers/support/arcgisLayerUrl.js";import{canConvertSqlRelativeTime as i,sqlRelativeTimeToAbsolute as s}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as a}from"../../../../../networks/support/networkFieldUtils.js";import{getEffectiveFeatureReduction as o}from"./featureReductionUtils.js";import{createFeatureIdInfo as l}from"./featureServiceUtils.js";import{addFloorFilter as n,hasFloorFilter as y}from"./floorFilterUtils.js";import{getServiceGeometryType as d}from"./geometryUtils.js";import{createLabelVVEvaluator as p}from"./labelingUtils.js";import{ExceedsLimitCache as u}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as c,createFeatureSourceSchema as m}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as h}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as f}from"../support/rendererUtils.js";class g{constructor(e){this.layer=e,this._cache=new u}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:p(this.layer.renderer)}}]}async createSourceSchema(e,t){const a=this._createServiceInfo(e),o=null!=this.layer.editingInfo?.lastEditDate,l=this.layer.refreshInterval>0,n=!o&&l,y=c(a.isSourceHosted,n,this.layer.capabilities,a.metadata.geometryType,e.extent,this.layer.fullExtent),d=null!=this.layer.subtypeCode?`${this.layer.subtypeField} = ${this.layer.subtypeCode}`:null,p=r(this.layer.definitionExpression,d),u=i(p)?await s(this.layer.fieldsIndex,p,this.layer.capabilities.query.relativeTimeBinWindow):p,h=p!==u?{where:p}:null,{gdbVersion:f,apiKey:g,historicMoment:b,timeExtent:F,customParameters:I,displayFilterInfo:S}=this.layer;return m(a,y,{definitionExpression:u,returnZ:e.returnZ,returnM:e.returnM,postQueryFilter:h,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:S,customParameters:I,gdbVersion:f,historicMoment:b,timeExtent:F,apiKey:g,sourceRefreshVersion:t,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,r,t){const{fields:i,renderer:s,geometryType:a,labelingInfo:l,labelsVisible:n,orderBy:y,objectIdField:d,trackInfo:p,symbolLayerDrawing:u}=this.layer,c={fields:i.map(e=>e.toJSON()),renderer:s?.clone(),labelingInfoSource:this.layer.id,featureReduction:o(this.layer,r),geometryType:a,labelingInfo:l,labelsVisible:n,objectIdField:d,orderBy:y??"default",trackInfo:p,symbolLayerDrawing:u};return h(e,r,c,t)}get hasRequiredSupport(){return f(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,r){return n(this.layer,e,r)}getUpdateHashProperties(e){return this.layer.destroyed?[]:[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>o(this.layer,e),()=>y(this.layer,e)?e.floors:null,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.outFields,()=>this.layer.renderer,()=>this.layer.subtypeCode,()=>this.layer.trackInfo,()=>this.layer.symbolLayerDrawing?.drawOrder,()=>this.layer.symbolLayerDrawing?.enabled,()=>e?.requiredFieldsOptions?.featureTitleFields&&this.layer.featureTitleFields,()=>e?.requiredFieldsOptions?.utilityNetworkFields&&a(e,this.layer)]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(r){const i=this.layer,{capabilities:s,editingInfo:a,typeIdField:o,globalIdField:n,datesInUnknownTimezone:y,dateFieldsTimeZone:p,orderBy:u,subtypeField:c}=i,m=i.fieldsIndex.toJSON(),h=d(i),{hasZ:f,hasM:g}=i,b=i.timeInfo?.toJSON(),F=i.spatialReference.toJSON(),I=i.types?.map(e=>e.toJSON()),S=e(this.layer.parsedUrl);this.layer.dynamicDataSource&&(S.query={layer:JSON.stringify({source:this.layer.dynamicDataSource})});let O=this.layer.objectIdField;if(u?.length){const e=!u[0].valueExpression&&u[0].field;e&&(O=e)}const x=t(S.path),R=r.spatialReference.toJSON();return{type:"feature-service",source:S,isSourceHosted:x,orderByFields:O,outSpatialReference:R,metadata:{typeIdField:o??void 0,types:I,timeReferenceUnknownClient:y,dateFieldsTimeZone:p,subtypeField:c,globalIdField:n,fieldsIndex:m,geometryType:h,hasZ:f,hasM:g,featureIdInfo:l(i),timeInfo:b,spatialReference:F,outSpatialReference:R,subtypes:this.layer.subtypes?.map(e=>e.toJSON())},queryMetadata:{maxRecordCount:s.query.maxRecordCount,tileMaxRecordCount:s.query.tileMaxRecordCount,supportsCompactGeometry:s.query.supportsCompactGeometry,supportsDefaultSpatialReference:s.query.supportsDefaultSpatialReference,supportsFormatPBF:s.query.supportsFormatPBF,supportsMaxRecordCountFactor:s.query.supportsMaxRecordCountFactor,supportsQuantization:s.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:s.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:s.query.supportsDegeneratedQuantizedGeometry,lastEditDate:a?.lastEditDate?.getTime()}}}}export{g as FeatureLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../../core/Error.js";import{hasTimeOptions as r}from"../../../../../layers/support/timeSupport.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{createFeatureIdInfo as i}from"./featureServiceUtils.js";import{getServiceGeometryType as n}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as o,getLayerDeconflictionEnabled as s,createLabelVVEvaluator as a}from"./labelingUtils.js";import{ExceedsLimitCache as l}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as u}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as p}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as c}from"../support/rendererUtils.js";function d(r){if(!("openPorts"in r))throw new e("featurelayer:source-not-supported","source is not supported")}class y{constructor(e){this.layer=e,this._cache=new l}openMessagePorts(){return d(this.layer.source),this.layer.source.openPorts()}getLabelingDeconflictionInfo(e){const r=this.layer,i=o(r,e)??s(r),n=t(r,e),l=[...r.labelingInfo||[],...n?.labelingInfo||[]];return[{vvEvaluators:{0:a(r.renderer)},deconflictionEnabled:i,labelingInfo:l}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return u(t,null,{definitionExpression:this.layer.definitionExpression,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:this.layer.customParameters,gdbVersion:null,historicMoment:null,timeExtent:"timeExtent"in this.layer?this.layer.timeExtent:null,apiKey:null,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,r,i){const{fields:n,renderer:o,geometryType:s,labelingInfo:a,labelsVisible:l,orderBy:u,objectIdField:c}=this.layer,d="trackInfo"in this.layer?this.layer.trackInfo:null,y={fields:n.map(e=>e.toJSON()),renderer:o?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:s,labelingInfo:a,labelsVisible:l,objectIdField:c,orderBy:u??"default",trackInfo:d};return p(e,r,y,i)}get hasRequiredSupport(){return c(this.layer.renderer)}get timeOptions(){return r(this.layer)?this.layer:null}getUpdateHashProperties(e){return[()=>this.layer.definitionExpression,()=>this.layer.displayFilterInfo,()=>this.layer.orderBy,()=>"outFields"in this.layer?this.layer.outFields:null,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>"trackInfo"in this.layer?this.layer.trackInfo:null]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){"trackGraphicOrigin"in this.layer&&(e.origin=this.layer.trackGraphicOrigin)}_createServiceInfo(e){const r=this.layer,{capabilities:t,objectIdField:o}=r,s=r.fieldsIndex.toJSON(),a=n(r),l="timeInfo"in r?r.timeInfo?.toJSON():null,u=r.spatialReference.toJSON();d(r.source);const p=o,c=e.spatialReference.toJSON();return{type:"memory",orderByFields:p,outSpatialReference:c,metadata:{fieldsIndex:s,geometryType:a,featureIdInfo:i(r),hasZ:"hasZ"in r&&r.hasZ,hasM:"hasM"in r&&r.hasM,timeInfo:l,spatialReference:u,outSpatialReference:c,subtypes:null,subtypeField:null,globalIdField:null,typeIdField:null,types:null,timeReferenceUnknownClient:"datesInUnknownTimezone"in r?r.datesInUnknownTimezone:null,dateFieldsTimeZone:"dateFieldsTimeZone"in r?r.dateFieldsTimeZone:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:t.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:t.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}export{y as InMemoryLayerAdapter};
2
+ import e from"../../../../../core/Error.js";import{hasTimeOptions as r}from"../../../../../layers/support/timeSupport.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{createFeatureIdInfo as i}from"./featureServiceUtils.js";import{getServiceGeometryType as s}from"./geometryUtils.js";import{createLabelVVEvaluator as o}from"./labelingUtils.js";import{ExceedsLimitCache as a}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as n}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as l}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as u}from"../support/rendererUtils.js";function p(r){if(!("openPorts"in r))throw new e("featurelayer:source-not-supported","source is not supported")}class c{constructor(e){this.layer=e,this._cache=new a}openMessagePorts(){return p(this.layer.source),this.layer.source.openPorts()}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:o(this.layer.renderer)}}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return n(t,null,{definitionExpression:this.layer.definitionExpression,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:this.layer.customParameters,gdbVersion:null,historicMoment:null,timeExtent:"timeExtent"in this.layer?this.layer.timeExtent:null,apiKey:null,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,r,i){const{fields:s,renderer:o,geometryType:a,labelingInfo:n,labelsVisible:u,orderBy:p,objectIdField:c}=this.layer,d="trackInfo"in this.layer?this.layer.trackInfo:null,y={fields:s.map(e=>e.toJSON()),renderer:o?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:a,labelingInfo:n,labelsVisible:u,objectIdField:c,orderBy:p??"default",trackInfo:d};return l(e,r,y,i)}get hasRequiredSupport(){return u(this.layer.renderer)}get timeOptions(){return r(this.layer)?this.layer:null}getUpdateHashProperties(e){return[()=>this.layer.definitionExpression,()=>this.layer.displayFilterInfo,()=>this.layer.orderBy,()=>"outFields"in this.layer?this.layer.outFields:null,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>"trackInfo"in this.layer?this.layer.trackInfo:null]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){"trackGraphicOrigin"in this.layer&&(e.origin=this.layer.trackGraphicOrigin)}_createServiceInfo(e){const r=this.layer,{capabilities:t,objectIdField:o}=r,a=r.fieldsIndex.toJSON(),n=s(r),l="timeInfo"in r?r.timeInfo?.toJSON():null,u=r.spatialReference.toJSON();p(r.source);const c=o,d=e.spatialReference.toJSON();return{type:"memory",orderByFields:c,outSpatialReference:d,metadata:{fieldsIndex:a,geometryType:n,featureIdInfo:i(r),hasZ:"hasZ"in r&&r.hasZ,hasM:"hasM"in r&&r.hasM,timeInfo:l,spatialReference:u,outSpatialReference:d,subtypes:null,subtypeField:null,globalIdField:null,typeIdField:null,types:null,timeReferenceUnknownClient:"datesInUnknownTimezone"in r?r.datesInUnknownTimezone:null,dateFieldsTimeZone:"dateFieldsTimeZone"in r?r.dateFieldsTimeZone:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:t.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:t.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}export{c as InMemoryLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{sqlAnd as e}from"../../../../../core/sql.js";import{systemIsSpatialFieldName as r}from"../../../../../layers/knowledgeGraph/constants.js";import t from"../../../../../layers/support/FeatureFilter.js";import{getEffectiveFeatureReduction as i}from"./featureReductionUtils.js";import{getServiceGeometryType as a}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as s,getLayerDeconflictionEnabled as o,createLabelVVEvaluator as n}from"./labelingUtils.js";import{ExceedsLimitCache as l}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as u}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as p}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as c}from"../support/rendererUtils.js";class d{constructor(e){this.layer=e,this._cache=new l}getLabelingDeconflictionInfo(e){const r=this.layer,t=s(r,e)??o(r);return[{vvEvaluators:{0:n(r.renderer)},deconflictionEnabled:t}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return u(t,null,{definitionExpression:this.layer.definitionExpression,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:null,gdbVersion:null,historicMoment:null,timeExtent:this.layer.timeExtent,apiKey:null,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,r,t){const{fields:a,renderer:s,geometryType:o,labelingInfo:n,labelsVisible:l,objectIdField:u}=this.layer,c={fields:a.map(e=>e.toJSON()),renderer:s?.clone(),labelingInfoSource:this.layer.id,featureReduction:i(this.layer,r),geometryType:o,labelingInfo:n,labelsVisible:l,objectIdField:u,orderBy:"default"};return p(e,r,c,t)}get hasRequiredSupport(){return c(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>i(this.layer,e),()=>y(this.layer)]}hasFilters(e){return y(this.layer)}addFilters(i,a){if(y(this.layer)){const a=e(i?.where,`${r}=1`);if(!a)return i;i??=new t,i.where=a}return i}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}openMessagePorts(){return this.layer.source.openPorts()}_createServiceInfo(e){const r=this.layer,{capabilities:t,objectIdField:i}=r,s=r.fieldsIndex.toJSON(),o=a(r),n=r.spatialReference.toJSON(),l=i,u=e.spatialReference.toJSON();return{type:"memory",orderByFields:l,outSpatialReference:u,metadata:{fieldsIndex:s,geometryType:o,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:{type:"object-id",fieldName:r.objectIdField},spatialReference:n,outSpatialReference:u,globalIdField:null,subtypeField:null,subtypes:null,timeInfo:r.timeInfo?.toJSON(),timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:t.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:t.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}function y(e){return"link-chart"===e.parentCompositeLayer.type&&"hidden"===e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode}export{d as KnowledgeGraphSublayerAdapter};
2
+ import{sqlAnd as e}from"../../../../../core/sql.js";import{systemIsSpatialFieldName as r}from"../../../../../layers/knowledgeGraph/constants.js";import t from"../../../../../layers/support/FeatureFilter.js";import{getEffectiveFeatureReduction as i}from"./featureReductionUtils.js";import{getServiceGeometryType as a}from"./geometryUtils.js";import{createLabelVVEvaluator as s}from"./labelingUtils.js";import{ExceedsLimitCache as o}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as l}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as n}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as u}from"../support/rendererUtils.js";class p{constructor(e){this.layer=e,this._cache=new o}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:s(this.layer.renderer)}}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return l(t,null,{definitionExpression:this.layer.definitionExpression,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:null,gdbVersion:null,historicMoment:null,timeExtent:this.layer.timeExtent,apiKey:null,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,r,t){const{fields:a,renderer:s,geometryType:o,labelingInfo:l,labelsVisible:u,objectIdField:p}=this.layer,c={fields:a.map(e=>e.toJSON()),renderer:s?.clone(),labelingInfoSource:this.layer.id,featureReduction:i(this.layer,r),geometryType:o,labelingInfo:l,labelsVisible:u,objectIdField:p,orderBy:"default"};return n(e,r,c,t)}get hasRequiredSupport(){return u(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>i(this.layer,e),()=>c(this.layer)]}hasFilters(e){return c(this.layer)}addFilters(i,a){if(c(this.layer)){const a=e(i?.where,`${r}=1`);if(!a)return i;i??=new t,i.where=a}return i}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}openMessagePorts(){return this.layer.source.openPorts()}_createServiceInfo(e){const r=this.layer,{capabilities:t,objectIdField:i}=r,s=r.fieldsIndex.toJSON(),o=a(r),l=r.spatialReference.toJSON(),n=i,u=e.spatialReference.toJSON();return{type:"memory",orderByFields:n,outSpatialReference:u,metadata:{fieldsIndex:s,geometryType:o,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:{type:"object-id",fieldName:r.objectIdField},spatialReference:l,outSpatialReference:u,globalIdField:null,subtypeField:null,subtypes:null,timeInfo:r.timeInfo?.toJSON(),timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:t.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:t.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}function c(e){return"link-chart"===e.parentCompositeLayer.type&&"hidden"===e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode}export{p as KnowledgeGraphSublayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{clone as e}from"../../../../../core/lang.js";import{getEffectiveFeatureReduction as r}from"./featureReductionUtils.js";import{getServiceGeometryType as t}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as i,getLayerDeconflictionEnabled as a,createLabelVVEvaluator as o}from"./labelingUtils.js";import{ExceedsLimitCache as s}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as l}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as n}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as u}from"../support/rendererUtils.js";class c{constructor(e){this.layer=e,this._cache=new s}getLabelingDeconflictionInfo(e){const r=this.layer,t=i(r,e)??a(r);return[{vvEvaluators:{0:o(r.renderer)},deconflictionEnabled:t,labelingInfo:r.labelingInfo}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return l(t,null,{definitionExpression:null,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:null,customParameters:this.layer.customParameters,gdbVersion:null,historicMoment:null,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,t,i){const{fields:a,renderer:o,geometryType:s,labelingInfo:l,labelsVisible:u,orderBy:c,objectIdField:p}=this.layer,d={fields:a.map(e=>e.toJSON()),renderer:o?.clone(),labelingInfoSource:this.layer.id,featureReduction:r(this.layer,t),geometryType:s,labelingInfo:l,labelsVisible:u,objectIdField:p,orderBy:c??"default"};return n(e,t,d,i)}get hasRequiredSupport(){return u(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>r(this.layer,e),()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.renderer]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(r){const i=this.layer,{capabilities:a}=i,o=i.fieldsIndex.toJSON(),s=t(i),l=i.timeInfo?.toJSON(),n=i.spatialReference.toJSON(),u=i.source.getSource(),c=this.layer.objectIdField,p=e(a);p.query.maxRecordCount=u.maxRecordCount;const d=r.spatialReference.toJSON();return{type:"ogc",source:u,orderByFields:c,outSpatialReference:d,metadata:{fieldsIndex:o,geometryType:s,hasZ:this.layer.hasZ??!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:i.objectIdField},timeInfo:l,spatialReference:n,outSpatialReference:d,globalIdField:null,subtypeField:null,subtypes:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:p.query.maxRecordCount,tileMaxRecordCount:p.query.tileMaxRecordCount,supportsCompactGeometry:p.query.supportsCompactGeometry,supportsDefaultSpatialReference:p.query.supportsDefaultSpatialReference,supportsFormatPBF:p.query.supportsFormatPBF,supportsMaxRecordCountFactor:p.query.supportsMaxRecordCountFactor,supportsQuantization:p.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:p.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:p.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}export{c as OGCFeatureLayerAdapter};
2
+ import{clone as e}from"../../../../../core/lang.js";import{getEffectiveFeatureReduction as r}from"./featureReductionUtils.js";import{getServiceGeometryType as t}from"./geometryUtils.js";import{createLabelVVEvaluator as i}from"./labelingUtils.js";import{ExceedsLimitCache as a}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as o}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as s}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as l}from"../support/rendererUtils.js";class n{constructor(e){this.layer=e,this._cache=new a}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:i(this.layer.renderer)}}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return o(t,null,{definitionExpression:null,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:null,customParameters:this.layer.customParameters,gdbVersion:null,historicMoment:null,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,t,i){const{fields:a,renderer:o,geometryType:l,labelingInfo:n,labelsVisible:u,orderBy:c,objectIdField:p}=this.layer,d={fields:a.map(e=>e.toJSON()),renderer:o?.clone(),labelingInfoSource:this.layer.id,featureReduction:r(this.layer,t),geometryType:l,labelingInfo:n,labelsVisible:u,objectIdField:p,orderBy:c??"default"};return s(e,t,d,i)}get hasRequiredSupport(){return l(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>r(this.layer,e),()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.renderer]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(r){const i=this.layer,{capabilities:a}=i,o=i.fieldsIndex.toJSON(),s=t(i),l=i.timeInfo?.toJSON(),n=i.spatialReference.toJSON(),u=i.source.getSource(),c=this.layer.objectIdField,p=e(a);p.query.maxRecordCount=u.maxRecordCount;const d=r.spatialReference.toJSON();return{type:"ogc",source:u,orderByFields:c,outSpatialReference:d,metadata:{fieldsIndex:o,geometryType:s,hasZ:this.layer.hasZ??!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:i.objectIdField},timeInfo:l,spatialReference:n,outSpatialReference:d,globalIdField:null,subtypeField:null,subtypes:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:p.query.maxRecordCount,tileMaxRecordCount:p.query.tileMaxRecordCount,supportsCompactGeometry:p.query.supportsCompactGeometry,supportsDefaultSpatialReference:p.query.supportsDefaultSpatialReference,supportsFormatPBF:p.query.supportsFormatPBF,supportsMaxRecordCountFactor:p.query.supportsMaxRecordCountFactor,supportsQuantization:p.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:p.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:p.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}export{n as OGCFeatureLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as r}from"../../../../../layers/support/arcgisLayerUrl.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{addFloorFilter as i,hasFloorFilter as a}from"./floorFilterUtils.js";import{getServiceGeometryType as s}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as o,getLayerDeconflictionEnabled as l,createLabelVVEvaluator as n}from"./labelingUtils.js";import{ExceedsLimitCache as d}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as p,createFeatureSourceSchema as u}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as c}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as y}from"../support/rendererUtils.js";class h{constructor(e){this.layer=e,this._cache=new d}getLabelingDeconflictionInfo(e){const r=this.layer,t=o(r,e)??l(r);return[{vvEvaluators:{0:n(r.renderer)},deconflictionEnabled:t}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e),i=null!=this.layer.editingInfo?.lastEditDate,a=this.layer.refreshInterval>0,s=!i&&a,o=p(t.isSourceHosted,s,this.layer.capabilities,t.metadata.geometryType,e.extent,this.layer.fullExtent);return u(t,o,{definitionExpression:this.layer.definitionExpression,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:this.layer.customParameters,gdbVersion:this.layer.gdbVersion,historicMoment:this.layer.historicMoment,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,r,i){const{fields:a,renderer:s,geometryType:o,labelingInfo:l,labelsVisible:n,orderBy:d,objectIdField:p}=this.layer,u={fields:a.map(e=>e.toJSON()),renderer:s?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:o,labelingInfo:l,labelsVisible:n,objectIdField:p,orderBy:d??"default"};return c(e,r,u,i)}get hasRequiredSupport(){return y(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,r){return i(this.layer,e,r)}getUpdateHashProperties(e){return[()=>this.layer.outFields,()=>this.layer.orderBy,()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>this.layer.customParameters,()=>a(this.layer,e)?e.floors:null]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(t){const i=this.layer,{capabilities:a,globalIdField:o,orderBy:l}=i,n=i.fieldsIndex.toJSON(),d=s(i),p=i.timeInfo?.toJSON(),u=i.spatialReference.toJSON(),c=e(this.layer.parsedUrl);let y=this.layer.objectIdField;if(l?.length){const e=!l[0].valueExpression&&l[0].field;e&&(y=e)}const h=r(c.path),m=t.spatialReference.toJSON();return{type:"feature-service",source:c,isSourceHosted:h,orderByFields:y,outSpatialReference:m,metadata:{globalIdField:o,fieldsIndex:n,geometryType:d,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:{type:"object-id",fieldName:i.objectIdField},timeInfo:p,spatialReference:u,outSpatialReference:m,timeReferenceUnknownClient:i.datesInUnknownTimezone,dateFieldsTimeZone:i.dateFieldsTimeZone,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:a.query.maxRecordCount,tileMaxRecordCount:a.query.tileMaxRecordCount,supportsCompactGeometry:a.query.supportsCompactGeometry,supportsDefaultSpatialReference:a.query.supportsDefaultSpatialReference,supportsFormatPBF:a.query.supportsFormatPBF,supportsMaxRecordCountFactor:a.query.supportsMaxRecordCountFactor,supportsQuantization:a.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:a.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:a.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}export{h as OrientedImageryLayerAdapter};
2
+ import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as r}from"../../../../../layers/support/arcgisLayerUrl.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{addFloorFilter as i,hasFloorFilter as a}from"./floorFilterUtils.js";import{getServiceGeometryType as s}from"./geometryUtils.js";import{createLabelVVEvaluator as o}from"./labelingUtils.js";import{ExceedsLimitCache as l}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as n,createFeatureSourceSchema as p}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as u}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as d}from"../support/rendererUtils.js";class c{constructor(e){this.layer=e,this._cache=new l}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:o(this.layer.renderer)}}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e),i=null!=this.layer.editingInfo?.lastEditDate,a=this.layer.refreshInterval>0,s=!i&&a,o=n(t.isSourceHosted,s,this.layer.capabilities,t.metadata.geometryType,e.extent,this.layer.fullExtent);return p(t,o,{definitionExpression:this.layer.definitionExpression,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:this.layer.customParameters,gdbVersion:this.layer.gdbVersion,historicMoment:this.layer.historicMoment,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,r,i){const{fields:a,renderer:s,geometryType:o,labelingInfo:l,labelsVisible:n,orderBy:p,objectIdField:d}=this.layer,c={fields:a.map(e=>e.toJSON()),renderer:s?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:o,labelingInfo:l,labelsVisible:n,objectIdField:d,orderBy:p??"default"};return u(e,r,c,i)}get hasRequiredSupport(){return d(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,r){return i(this.layer,e,r)}getUpdateHashProperties(e){return[()=>this.layer.outFields,()=>this.layer.orderBy,()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>this.layer.customParameters,()=>a(this.layer,e)?e.floors:null]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(t){const i=this.layer,{capabilities:a,globalIdField:o,orderBy:l}=i,n=i.fieldsIndex.toJSON(),p=s(i),u=i.timeInfo?.toJSON(),d=i.spatialReference.toJSON(),c=e(this.layer.parsedUrl);let y=this.layer.objectIdField;if(l?.length){const e=!l[0].valueExpression&&l[0].field;e&&(y=e)}const h=r(c.path),m=t.spatialReference.toJSON();return{type:"feature-service",source:c,isSourceHosted:h,orderByFields:y,outSpatialReference:m,metadata:{globalIdField:o,fieldsIndex:n,geometryType:p,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:{type:"object-id",fieldName:i.objectIdField},timeInfo:u,spatialReference:d,outSpatialReference:m,timeReferenceUnknownClient:i.datesInUnknownTimezone,dateFieldsTimeZone:i.dateFieldsTimeZone,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:a.query.maxRecordCount,tileMaxRecordCount:a.query.tileMaxRecordCount,supportsCompactGeometry:a.query.supportsCompactGeometry,supportsDefaultSpatialReference:a.query.supportsDefaultSpatialReference,supportsFormatPBF:a.query.supportsFormatPBF,supportsMaxRecordCountFactor:a.query.supportsMaxRecordCountFactor,supportsQuantization:a.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:a.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:a.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}export{c as OrientedImageryLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../../core/Error.js";import{toParquetJSONGeometryType as r}from"../../../../../layers/support/parquetUtils.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{getServiceGeometryType as i}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as l,getLayerDeconflictionEnabled as a,createLabelVVEvaluator as s}from"./labelingUtils.js";import{createSimpleProcessorSchema as n}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as o}from"../support/rendererUtils.js";class y{constructor(e){this.layer=e}get hasRequiredSupport(){return o(this.layer.renderer)}get timeOptions(){return null}getLabelingDeconflictionInfo(e){const r=this.layer,i=l(r,e)??a(r),n=t(r,e),o=[...r.labelingInfo||[],...n?.labelingInfo||[]];return[{vvEvaluators:{0:s(r.renderer)},deconflictionEnabled:i,labelingInfo:o}]}getUpdateHashProperties(e){return[()=>this.layer.urls.join(","),()=>this.layer.outFields,()=>this.layer.definitionExpression,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>this.layer.customParameters,()=>this.layer.orderBy,()=>this.layer.renderer,()=>this.layer.popupTemplate]}openMessagePorts(){return this.layer.source.openPorts()}async createSourceSchema(e,r){const t=this._createServiceInfo(e),i=e.availableFields.includes("*")?this.layer.fields.map(e=>e.name):e.availableFields,l={partial:{urls:[...this.layer.urls.items],availableFields:i},full:{definitionExpression:this.layer.definitionExpression??null,sourceRefreshVersion:r,customParameters:this.layer.customParameters??null}};return{type:"parquet",service:t,strategy:this._createStrategy(t,l)}}_createStrategy(e,r){return e.geometryInfo.displayOptimization?{type:"xz",...r}:{type:"snapshot",...r}}createProcessorSchema(e,r,i){const l={fields:this.layer.fields.map(e=>e.toJSON()),renderer:this.layer.renderer?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:this.layer.geometryType,labelingInfo:this.layer.labelingInfo,labelsVisible:this.layer.labelsVisible,objectIdField:this.layer.objectIdField,orderBy:this.layer.orderBy};return n(e,r,l,i)}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}_createServiceInfo(t){const l=i(this.layer),a=t.spatialReference.toJSON(),s=this.layer.geometryEncoding;if(null==s&&null==this.layer.displayOptimization)throw new e("parquet-layer:unsupported","creating a parquet layer view requires an encoding",{layer:this.layer});return{type:"parquet",outSpatialReference:a,geometryInfo:{geometry:s?{geometryType:r(this.layer.geometryType),spatialReference:this.layer.spatialReference.toJSON(),encoding:s.toJSON()}:null,displayOptimization:this.layer.displayOptimization},metadata:{spatialReference:this.layer.spatialReference.toJSON(),outSpatialReference:a,fieldsIndex:this.layer.fieldsIndex.toJSON(),featureIdInfo:{type:"object-id",fieldName:this.layer.objectIdField},geometryType:l,hasZ:!1,hasM:!1,types:null,subtypes:null,timeInfo:null,typeIdField:null,subtypeField:null,globalIdField:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}}}}export{y as ParquetLayerAdapter};
2
+ import e from"../../../../../core/Error.js";import{toParquetJSONGeometryType as r}from"../../../../../layers/support/parquetUtils.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{getServiceGeometryType as i}from"./geometryUtils.js";import{createLabelVVEvaluator as l}from"./labelingUtils.js";import{createSimpleProcessorSchema as a}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as s}from"../support/rendererUtils.js";class o{constructor(e){this.layer=e}get hasRequiredSupport(){return s(this.layer.renderer)}get timeOptions(){return null}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:l(this.layer.renderer)}}]}getUpdateHashProperties(e){return[()=>this.layer.urls.join(","),()=>this.layer.outFields,()=>this.layer.definitionExpression,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>this.layer.customParameters,()=>this.layer.orderBy,()=>this.layer.renderer,()=>this.layer.popupTemplate]}openMessagePorts(){return this.layer.source.openPorts()}async createSourceSchema(e,r){const t=this._createServiceInfo(e),i=e.availableFields.includes("*")?this.layer.fields.map(e=>e.name):e.availableFields,l={partial:{urls:[...this.layer.urls.items],availableFields:i},full:{definitionExpression:this.layer.definitionExpression??null,sourceRefreshVersion:r,customParameters:this.layer.customParameters??null}};return{type:"parquet",service:t,strategy:this._createStrategy(t,l)}}_createStrategy(e,r){return e.geometryInfo.displayOptimization?{type:"xz",...r}:{type:"snapshot",...r}}createProcessorSchema(e,r,i){const l={fields:this.layer.fields.map(e=>e.toJSON()),renderer:this.layer.renderer?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:this.layer.geometryType,labelingInfo:this.layer.labelingInfo,labelsVisible:this.layer.labelsVisible,objectIdField:this.layer.objectIdField,orderBy:this.layer.orderBy};return a(e,r,l,i)}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}_createServiceInfo(t){const l=i(this.layer),a=t.spatialReference.toJSON(),s=this.layer.geometryEncoding;if(null==s&&null==this.layer.displayOptimization)throw new e("parquet-layer:unsupported","creating a parquet layer view requires an encoding",{layer:this.layer});return{type:"parquet",outSpatialReference:a,geometryInfo:{geometry:s?{geometryType:r(this.layer.geometryType),spatialReference:this.layer.spatialReference.toJSON(),encoding:s.toJSON()}:null,displayOptimization:this.layer.displayOptimization},metadata:{spatialReference:this.layer.spatialReference.toJSON(),outSpatialReference:a,fieldsIndex:this.layer.fieldsIndex.toJSON(),featureIdInfo:{type:"object-id",fieldName:this.layer.objectIdField},geometryType:l,hasZ:!1,hasM:!1,types:null,subtypes:null,timeInfo:null,typeIdField:null,subtypeField:null,globalIdField:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}}}}export{o as ParquetLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{getEffectiveFeatureReduction as e}from"./featureReductionUtils.js";import{getServiceGeometryType as r}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as t,getLayerDeconflictionEnabled as i,createLabelVVEvaluator as a}from"./labelingUtils.js";import{createSimpleProcessorSchema as l}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as n}from"../support/rendererUtils.js";class s{constructor(e){this.layer=e}getLabelingDeconflictionInfo(r){const l=this.layer,n=t(l,r)??i(l),s=e(l,r),o=[...l.labelingInfo||[],...s?.labelingInfo||[]];return[{vvEvaluators:{0:a(l.renderer)},deconflictionEnabled:n,labelingInfo:o}]}async createSourceSchema(e,r){return{type:"stream",service:this._createServiceInfo(e),strategy:{type:"stream",partial:{sourceRefreshVersion:r},full:{availableFields:e.availableFields,geometryDefinition:this.layer.geometryDefinition?.toJSON(),definitionExpression:this.layer.definitionExpression,customParameters:this.layer.customParameters,maxReconnectionAttempts:this.layer.maxReconnectionAttempts,maxReconnectionInterval:this.layer.maxReconnectionInterval,purgeOptions:this.layer.purgeOptions.toJSON()}}}}createProcessorSchema(r,t,i){const{fields:a,renderer:n,geometryType:s,labelingInfo:o,labelsVisible:c,objectIdField:y,trackInfo:p}=this.layer,f={fields:a.map(e=>e.toJSON()),renderer:n?.clone(),labelingInfoSource:this.layer.id,featureReduction:e(this.layer,t),geometryType:s,labelingInfo:o,labelsVisible:c,objectIdField:y,orderBy:"default",trackInfo:p};return l(r,t,f,i)}get hasRequiredSupport(){return n(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(r){return[()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>e(this.layer,r),()=>this.layer.customParameters,()=>this.layer.geometryDefinition,()=>this.layer.definitionExpression,()=>this.layer.trackInfo]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(e){const t=r(this.layer),i=this.layer.timeInfo?.toJSON()||null,a=this.layer.spatialReference?this.layer.spatialReference.toJSON():null,l=e.spatialReference.toJSON();return{type:"stream",source:this.layer.parsedUrl,outSpatialReference:l,metadata:{fieldsIndex:this.layer.fieldsIndex.toJSON(),geometryType:t,hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:this.layer.objectIdField},timeInfo:i,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,spatialReference:a,outSpatialReference:l,subtypeField:null,subtypes:null,globalIdField:null,typeIdField:null,types:null}}}}export{s as StreamLayerAdapter};
2
+ import{getEffectiveFeatureReduction as e}from"./featureReductionUtils.js";import{getServiceGeometryType as r}from"./geometryUtils.js";import{createLabelVVEvaluator as t}from"./labelingUtils.js";import{createSimpleProcessorSchema as i}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as a}from"../support/rendererUtils.js";class s{constructor(e){this.layer=e}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:t(this.layer.renderer)}}]}async createSourceSchema(e,r){return{type:"stream",service:this._createServiceInfo(e),strategy:{type:"stream",partial:{sourceRefreshVersion:r},full:{availableFields:e.availableFields,geometryDefinition:this.layer.geometryDefinition?.toJSON(),definitionExpression:this.layer.definitionExpression,customParameters:this.layer.customParameters,maxReconnectionAttempts:this.layer.maxReconnectionAttempts,maxReconnectionInterval:this.layer.maxReconnectionInterval,purgeOptions:this.layer.purgeOptions.toJSON()}}}}createProcessorSchema(r,t,a){const{fields:s,renderer:l,geometryType:n,labelingInfo:o,labelsVisible:c,objectIdField:y,trackInfo:h}=this.layer,p={fields:s.map(e=>e.toJSON()),renderer:l?.clone(),labelingInfoSource:this.layer.id,featureReduction:e(this.layer,t),geometryType:n,labelingInfo:o,labelsVisible:c,objectIdField:y,orderBy:"default",trackInfo:h};return i(r,t,p,a)}get hasRequiredSupport(){return a(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(r){return[()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>e(this.layer,r),()=>this.layer.customParameters,()=>this.layer.geometryDefinition,()=>this.layer.definitionExpression,()=>this.layer.trackInfo,()=>this.layer?.source?.refreshInterval]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(e){const t=r(this.layer),i=this.layer.timeInfo?.toJSON()||null,a=this.layer.spatialReference?this.layer.spatialReference.toJSON():null,s=e.spatialReference.toJSON();return{type:"stream",source:this.layer.getStreamConnectionSource(),outSpatialReference:s,metadata:{fieldsIndex:this.layer.fieldsIndex.toJSON(),geometryType:t,hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:this.layer.objectIdField},timeInfo:i,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,spatialReference:a,outSpatialReference:s,subtypeField:null,subtypes:null,globalIdField:null,typeIdField:null,types:null}}}}export{s as StreamLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{clone as e}from"../../../../../core/lang.js";import{floatEqualAbsolute as r}from"../../../../../core/mathUtils.js";import{sqlAnd as t}from"../../../../../core/sql.js";import{isHostedAgolService as i}from"../../../../../layers/support/arcgisLayerUrl.js";import s from"../../../../../layers/support/FeatureFilter.js";import{canConvertSqlRelativeTime as a,sqlRelativeTimeToAbsolute as l}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as o}from"../../../../../networks/support/networkFieldUtils.js";import{createFeatureIdInfo as n}from"./featureServiceUtils.js";import{addFloorFilter as u,hasFloorFilter as y}from"./floorFilterUtils.js";import{getServiceGeometryType as p}from"./geometryUtils.js";import{getLayerDeconflictionEnabled as c}from"./labelingUtils.js";import{ExceedsLimitCache as d}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as m,createFeatureSourceSchema as h}from"../schema/SourceSchema.js";import{createSubtypeProcessorSchema as f}from"../schema/processor/SubtypeProcessorSchema.js";class b{constructor(e){this.layer=e,this._cache=new d}getLabelingDeconflictionInfo(e){const r=this.layer;return[{vvEvaluators:{},deconflictionEnabled:r.sublayers.some(e=>c(e)),labelingInfo:r.sublayers.toArray().filter(e=>!!e.labelingInfo).flatMap(e=>e.labelingInfo)}]}async createSourceSchema(e,r){const{definitionExpression:t,customParameters:i,gdbVersion:s,historicMoment:o,timeExtent:n,apiKey:u,displayFilterInfo:y}=this.layer,p=this._createServiceInfo(e),c=null!=this.layer.editingInfo?.lastEditDate,d=this.layer.refreshInterval>0,f=!c&&d,b=m(p.isSourceHosted,f,this.layer.capabilities,p.metadata.geometryType,e.extent,this.layer.fullExtent),g=a(t)?await l(this.layer.fieldsIndex,t,this.layer.capabilities.query.relativeTimeBinWindow):t,S=t!==g?{where:t}:null;return h(p,b,{definitionExpression:g,returnZ:e.returnZ,returnM:e.returnM,postQueryFilter:S,queryScaleRanges:this.layer.sublayers.items.map(e=>({subtypeCode:e.subtypeCode,minScale:e.minScale,maxScale:e.maxScale})),displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:y,customParameters:i,gdbVersion:s,historicMoment:o,timeExtent:n,apiKey:u,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,r,t){const i={labelingInfoSource:this.layer.id,subtypeField:this.layer.subtypeField,sublayers:Array.from(this.layer.sublayers,(e,r)=>({featureReduction:null,geometryType:this.layer.geometryType,labelingInfoSource:this.layer.id+`-${r}`,labelingInfo:e.labelingInfo,labelsVisible:e.labelsVisible,renderer:e.renderer,subtypeCode:e.subtypeCode,orderBy:null}))};return f(e,r,i,t)}addFilters(e,r){e=u(this.layer,e,r);const i=this.layer.sublayers.filter(e=>!g(e,r)).map(e=>e.subtypeCode);if(!i.length)return e;e??=new s;const a=`NOT ${this.layer.subtypeField} IN (${i.join(",")})`;return e.where=t(e.where,a),e}get hasRequiredSupport(){return!0}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>y(this.layer,e)?e.floors:null,()=>this.layer.outFields,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>e?.requiredFieldsOptions?.featureTitleFields&&this.layer.featureTitleFields,()=>e?.requiredFieldsOptions?.utilityNetworkFields&&o(e,this.layer),()=>this.layer.sublayers.map(({renderer:e,labelsVisible:r,labelingInfo:t,visible:i,minScale:s,maxScale:a})=>({renderer:e,labelsVisible:r,labelingInfo:t,visible:i,minScale:s,maxScale:a}))]}setGraphicOrigin(e){const r=this.layer.findSublayerForFeature(e);e.layer=e.sourceLayer=r,e.origin=r?.graphicOrigin}_createServiceInfo(r){const{capabilities:t,datesInUnknownTimezone:s,dateFieldsTimeZone:a,editingInfo:l,globalIdField:o,objectIdField:u,subtypeField:y}=this.layer,c=this.layer.fieldsIndex.toJSON(),d=p(this.layer),m=this.layer.timeInfo?.toJSON(),h=this.layer.spatialReference.toJSON(),f=e(this.layer.parsedUrl),b=u,g=i(f.path),S=r.spatialReference.toJSON();return{type:"feature-service",source:f,isSourceHosted:g,orderByFields:b,outSpatialReference:S,metadata:{timeReferenceUnknownClient:s,dateFieldsTimeZone:a,subtypeField:y,globalIdField:o,fieldsIndex:c,geometryType:d,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:n(this.layer),timeInfo:m,spatialReference:h,outSpatialReference:S,subtypes:this.layer.subtypes?.map(e=>e.toJSON()),typeIdField:null,types:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:t.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:t.query.supportsDegeneratedQuantizedGeometry,lastEditDate:l?.lastEditDate?.getTime()}}}}function g(e,t){return e.visible&&(0===e.minScale||r(t.scale,e.minScale)||t.scale<e.minScale)&&(0===e.maxScale||r(t.scale,e.maxScale)||t.scale>e.maxScale)}export{b as SubtypeGroupLayerAdapter};
2
+ import{clone as e}from"../../../../../core/lang.js";import{floatEqualAbsolute as r}from"../../../../../core/mathUtils.js";import{sqlAnd as t}from"../../../../../core/sql.js";import{isHostedAgolService as i}from"../../../../../layers/support/arcgisLayerUrl.js";import s from"../../../../../layers/support/FeatureFilter.js";import{canConvertSqlRelativeTime as a,sqlRelativeTimeToAbsolute as l}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as o}from"../../../../../networks/support/networkFieldUtils.js";import{createFeatureIdInfo as n}from"./featureServiceUtils.js";import{addFloorFilter as u,hasFloorFilter as p}from"./floorFilterUtils.js";import{getServiceGeometryType as y}from"./geometryUtils.js";import{ExceedsLimitCache as c}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as d,createFeatureSourceSchema as m}from"../schema/SourceSchema.js";import{createSubtypeProcessorSchema as h}from"../schema/processor/SubtypeProcessorSchema.js";class f{constructor(e){this.layer=e,this._cache=new c}getLabelingDeconflictionInfo(){return[{vvEvaluators:{}}]}async createSourceSchema(e,r){const{definitionExpression:t,customParameters:i,gdbVersion:s,historicMoment:o,timeExtent:n,apiKey:u,displayFilterInfo:p}=this.layer,y=this._createServiceInfo(e),c=null!=this.layer.editingInfo?.lastEditDate,h=this.layer.refreshInterval>0,f=!c&&h,b=d(y.isSourceHosted,f,this.layer.capabilities,y.metadata.geometryType,e.extent,this.layer.fullExtent),S=a(t)?await l(this.layer.fieldsIndex,t,this.layer.capabilities.query.relativeTimeBinWindow):t,F=t!==S?{where:t}:null;return m(y,b,{definitionExpression:S,returnZ:e.returnZ,returnM:e.returnM,postQueryFilter:F,queryScaleRanges:this.layer.sublayers.items.map(e=>({subtypeCode:e.subtypeCode,minScale:e.minScale,maxScale:e.maxScale})),displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:p,customParameters:i,gdbVersion:s,historicMoment:o,timeExtent:n,apiKey:u,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,r,t){const i={labelingInfoSource:this.layer.id,subtypeField:this.layer.subtypeField,sublayers:Array.from(this.layer.sublayers,(e,r)=>({featureReduction:null,geometryType:this.layer.geometryType,labelingInfoSource:this.layer.id+`-${r}`,labelingInfo:e.labelingInfo,labelsVisible:e.labelsVisible,renderer:e.renderer,subtypeCode:e.subtypeCode,orderBy:null}))};return h(e,r,i,t)}addFilters(e,r){e=u(this.layer,e,r);const i=this.layer.sublayers.filter(e=>!b(e,r)).map(e=>e.subtypeCode);if(!i.length)return e;e??=new s;const a=`NOT ${this.layer.subtypeField} IN (${i.join(",")})`;return e.where=t(e.where,a),e}get hasRequiredSupport(){return!0}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>p(this.layer,e)?e.floors:null,()=>this.layer.outFields,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>e?.requiredFieldsOptions?.featureTitleFields&&this.layer.featureTitleFields,()=>e?.requiredFieldsOptions?.utilityNetworkFields&&o(e,this.layer),()=>this.layer.sublayers.map(({renderer:e,labelsVisible:r,labelingInfo:t,visible:i,minScale:s,maxScale:a})=>({renderer:e,labelsVisible:r,labelingInfo:t,visible:i,minScale:s,maxScale:a}))]}setGraphicOrigin(e){const r=this.layer.findSublayerForFeature(e);e.layer=e.sourceLayer=r,e.origin=r?.graphicOrigin}_createServiceInfo(r){const{capabilities:t,datesInUnknownTimezone:s,dateFieldsTimeZone:a,editingInfo:l,globalIdField:o,objectIdField:u,subtypeField:p}=this.layer,c=this.layer.fieldsIndex.toJSON(),d=y(this.layer),m=this.layer.timeInfo?.toJSON(),h=this.layer.spatialReference.toJSON(),f=e(this.layer.parsedUrl),b=u,S=i(f.path),F=r.spatialReference.toJSON();return{type:"feature-service",source:f,isSourceHosted:S,orderByFields:b,outSpatialReference:F,metadata:{timeReferenceUnknownClient:s,dateFieldsTimeZone:a,subtypeField:p,globalIdField:o,fieldsIndex:c,geometryType:d,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:n(this.layer),timeInfo:m,spatialReference:h,outSpatialReference:F,subtypes:this.layer.subtypes?.map(e=>e.toJSON()),typeIdField:null,types:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:t.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:t.query.supportsDegeneratedQuantizedGeometry,lastEditDate:l?.lastEditDate?.getTime()}}}}function b(e,t){return e.visible&&(0===e.minScale||r(t.scale,e.minScale)||t.scale<e.minScale)&&(0===e.maxScale||r(t.scale,e.maxScale)||t.scale>e.maxScale)}export{f as SubtypeGroupLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- class e{constructor(e){this.subscription=e,this.handledChunks=new Set}destroy(){}}class t{constructor(e,t,s){this._source=e,this._attributeStore=t,this._sqlOptions=s,this._sendStates=new Map}destroy(){}get enablePixelBuffering(){return!0}get isAggregate(){return!1}get usedMemory(){return 0}updateRequiredLevel(e,t){}onSubscribe(e){const t=this.createState(e);this._sendStates.set(e.key.id,t),this.updateChunks()}onUnsubscribe(e){this._sendStates.get(e.key.id)?.destroy(),this._sendStates.delete(e.key.id)}get hasSubscribers(){return this._sendStates.size>0}requiresInvalidation(){return!1}invalidate(){const e=Array.from(this._sendStates.values());this._sendStates.clear();for(const t of e)t.destroy(),this.onSubscribe(t.subscription)}invalidateAttributeData(e){}hasArcadeDependency(e){return!1}getFeatureObjectIdsForAggregate(e){throw new Error("InternalError: AggregateId lookup not supported")}getDisplayIds(e){return this.displayMap(e,e=>e,e=>e)}getDisplayAndObjectIds(e){return this.displayMap(e,e=>e,(e,t,s)=>[e,s])}afterUpdateChunks(){}}export{t as AProcessorStrategy,e as ASendState};
2
+ import has from"../../../../../core/has.js";class e{constructor(e){this.subscription=e,this.handledChunks=new Set,has("esri-2d-update-debug")&&console.debug(`Tile[${e.tile.id}] ASendState.create`)}destroy(){}}class t{constructor(e,t,s){this._source=e,this._attributeStore=t,this._sqlOptions=s,this._sendStates=new Map}destroy(){}get enablePixelBuffering(){return!0}get isAggregate(){return!1}get usedMemory(){return 0}updateRequiredLevel(e,t){}onSubscribe(e){const t=this.createState(e);this._sendStates.set(e.key.id,t)}onUnsubscribe(e){this._sendStates.get(e.key.id)?.destroy(),this._sendStates.delete(e.key.id)}get hasSubscribers(){return this._sendStates.size>0}requiresInvalidation(e){return!1}invalidate(){const e=Array.from(this._sendStates.values());this._sendStates.clear();for(const t of e)t.destroy(),this.onSubscribe(t.subscription)}invalidateAttributeData(e){}hasArcadeDependency(e){return!1}getFeatureObjectIdsForAggregate(e){throw new Error("InternalError: AggregateId lookup not supported")}getDisplayIds(e){return this.displayMap(e,e=>e,e=>e)}getDisplayAndObjectIds(e){return this.displayMap(e,e=>e,(e,t,s)=>[e,s])}afterUpdateChunks(){}}export{t as AProcessorStrategy,e as ASendState};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../../geometry/SpatialReference.js";import{convertToFeature as t,unquantizeOptimizedGeometryInPlace as s}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as a}from"../../../../../layers/graphics/OptimizedFeature.js";import{checkProjectionSupport as r}from"../../../../../layers/graphics/data/projectionSupport.js";import i from"../../../../../layers/support/FieldsIndex.js";import{ComputedAggregateField as o}from"../aggregation/ComputedAggregateField.js";import{AAggregateStrategy as n}from"./AAggregateStrategy.js";import{ASendState as l}from"./AProcessorStrategy.js";import{FeatureTileAppendMessage as d,FeatureTileUpdateMessage as c}from"../sources/FeatureSourceMessage.js";import{ComputedAttributeStorage as u}from"../support/ComputedAttributeStorage.js";import f from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as p}from"../support/FeatureMetadata.js";import{FeatureSetReaderJSON as h}from"../support/FeatureSetReaderJSON.js";import m from"../../../tiling/TileKey.js";class g extends l{constructor(e,t){super(e),this.bins=new Map,this.featureCache=new Map,this.done=!1,this._store=t}reset(){this.destroy(),this.done=!1}destroy(){const e=this.subscription.tile.key.level;for(const t of this.featureCache.keys())this._store.releaseDisplayIdForObjectId(`${t}.${e}`);this.bins.clear(),this.featureCache.clear(),this.handledChunks.clear()}get tile(){return this.subscription.tile}*featuresWorldSpace(){for(const e of this.featureCache.values()){const t=e.clone();t.geometry&&s(t.geometry,this.subscription.tile.transform),yield t}}}class y extends n{static async create(t,s,a,i,n){const l=s.metadata.outSpatialReference,d=new u({spatialReference:l}),c=await Promise.all(t.fields.map(async e=>o.create(d,e))),p=t.featureFilter?await f.create({geometryType:s.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:s.metadata.timeInfo,fieldsIndex:s.metadata.fieldsIndex,spatialReference:l,filterJSON:t.featureFilter}):null;return"geohash"===t.index.type&&await r(l,e.WGS84),new y(t,p,i,c,l,s,a,n)}constructor(e,t,s,a,r,o,n,l){super(o,n,r,a,l),this._schema=e,this._featureFilter=t,this._arcadeContextInfo=s,this._metadata=p.createFeature({geometryType:"esriGeometryPolygon",hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:new i(e.fields).toJSON(),globalIdField:null,spatialReference:o.metadata.spatialReference,outSpatialReference:o.metadata.outSpatialReference,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null})}createState(e){return new g(e,this._attributeStore)}async*applyOverrideUpdate(e){for(const t of this._sendStates.values()){t.reset();const e=new d(t.subscription,h.empty(this._source.metadata),!0,!1,{});yield e}}displayMap(e,t,s){const a=new Map(e.map(e=>[t(e),e])),r=[];for(const i of this._sendStates.values())for(const e of i.featuresWorldSpace()){const{objectId:t,displayId:i}=e,o=a.get(t);if(null!=o){const e=s(i,o,t);r.push(e),a.delete(t)}}return r}getDisplayFeatures(e){const s=new Set(e),a=new Set,r=[];for(const i of this._sendStates.values())for(const e of i.featuresWorldSpace())s.has(e.displayId)&&!a.has(e.objectId)&&(e.geometry&&r.push({...t(e,this._metadata.geometryType,!1,!1),displayId:e.displayId}),a.add(e.objectId));return{features:[],aggregates:r,tracks:[]}}getFeatureObjectIdsForAggregate(e){for(const t of this._sendStates.values())for(const s of t.bins.values())if(s.id===e)return Array.from(s.containedObjectIds);return[]}async*updateChunks(){for(const e of this._sendStates.values())yield*this._update(e,this._source)}forEachAggregateWorldSpace(e){const t=new Set;for(const s of this._sendStates.values())for(const a of s.featuresWorldSpace())t.has(a.objectId)||(e(a),t.add(a.objectId))}_createIndexOptions(e){switch(this._schema.index.type){case"geohash":return{type:"geohash",fields:this.aggregateFields,featureFilter:this._featureFilter,geohashLevel:this._schema.index.fixBinLevel,spatialReference:this.spatialReference,arcadeContextInfo:this._arcadeContextInfo,scale:e.scale,sqlOptions:this._sqlOptions};case"grid":{const t=this._schema.index.fixedBinLevel,s=null!=t?e.tileInfoView.getLODInfoAt(t).scale:e.scale;return{type:"grid",fields:this.aggregateFields,cellSize:this._schema.index.size,featureFilter:this._featureFilter,spatialReference:this.spatialReference,arcadeContextInfo:this._arcadeContextInfo,scale:s,sqlOptions:this._sqlOptions}}}}async*_update(e,t){const{handledChunks:s,subscription:r,bins:i,featureCache:o}=e,n=r.tile;if(e.done)return;for(const a of t.chunks()){if(s.has(a.chunkId))continue;s.add(a.chunkId);const t=a.queryInfo;if("tileId"in t){const e=new m(t.tileId);if(e.level!==n.level||e.world!==n.key.world)continue}a.getAggregateIndex(this._createIndexOptions(e.tile)).putBounded(i,e.tile.extent,e.tile.resolution)}const l=[],d=r.tile.transform,u=r.tile.key.level;for(const c of i.values()){let e=o.get(c.id);if(e)e.attributes=c.getAttributes();else{const t=c.getGeometry(this.spatialReference,d);e=new a(t,c.getAttributes(),null,c.id),t||(e.centroid=c.getGeometricCentroid(this.spatialReference,d)),e.displayId=this._attributeStore.createDisplayIdForObjectId(`${e.objectId}.${u}`),o.set(c.id,e)}l.push(e)}this.events.emit("changed"),e.done=!t.updateTracking.updating;const f=h.fromOptimizedFeatures(l,this._metadata,d),p=f.getCursor(),g=e.subscription.tile.createArcadeEvaluationOptions(this._arcadeContextInfo);for(;p.next();)this._attributeStore.setAttributeData(p.getDisplayId(),p,g,this._sqlOptions);const y=new c(e.subscription,f,[],e.done,{});yield y}}export{g as BinningState,y as BinningStrategy};
2
+ import{equals as e}from"../../../../../core/SetUtils.js";import t from"../../../../../geometry/SpatialReference.js";import{convertToFeature as s,unquantizeOptimizedGeometryInPlace as a}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as r}from"../../../../../layers/graphics/OptimizedFeature.js";import{checkProjectionSupport as i}from"../../../../../layers/graphics/data/projectionSupport.js";import o from"../../../../../layers/support/FieldsIndex.js";import{ComputedAggregateField as n}from"../aggregation/ComputedAggregateField.js";import{AAggregateStrategy as l}from"./AAggregateStrategy.js";import{ASendState as d}from"./AProcessorStrategy.js";import{FeatureTileUpdateMessage as c}from"../sources/FeatureSourceMessage.js";import{ComputedAttributeStorage as f}from"../support/ComputedAttributeStorage.js";import u from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as p}from"../support/FeatureMetadata.js";import{FeatureSetReaderJSON as h}from"../support/FeatureSetReaderJSON.js";import{Hashed as m}from"../support/Hashed.js";class g extends d{constructor(e,t){super(e),this.bins=new Map,this.featureCache=new Map,this.done=!1,this._store=t}take(){const e=this.bins,t=this.featureCache;return this.bins=new Map,this.featureCache=new Map,{bins:e,featureCache:t}}destroy(){const e=this.subscription.tile.key.level;for(const t of this.featureCache.keys())this._store.releaseDisplayIdForObjectId(`${t}.${e}`);this.bins.clear(),this.featureCache.clear(),this.handledChunks.clear()}get tile(){return this.subscription.tile}*featuresWorldSpace(){for(const e of this.featureCache.values()){const t=e.clone();t.geometry&&a(t.geometry,this.subscription.tile.transform),yield t}}}class y extends l{static async create(e,s,a,r,o){const l=s.metadata.outSpatialReference,d=new f({spatialReference:l}),c=await Promise.all(e.fields.map(async e=>n.create(d,e))),p=e.featureFilter?await u.create({geometryType:s.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:s.metadata.timeInfo,fieldsIndex:s.metadata.fieldsIndex,spatialReference:l,filterJSON:e.featureFilter}):null;return"geohash"===e.index.type&&await i(l,t.WGS84),new y(e,p,r,c,l,s,a,o)}constructor(e,t,s,a,r,i,n,l){super(i,n,r,a,l),this._schema=e,this._featureFilter=t,this._arcadeContextInfo=s,this._handled=new Set,this._invalidated=!1,this._metadata=p.createFeature({geometryType:"esriGeometryPolygon",hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:new o(e.fields).toJSON(),globalIdField:null,spatialReference:i.metadata.spatialReference,outSpatialReference:i.metadata.outSpatialReference,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null}),this._getIndex=this._createGetIndex()}requiresInvalidation(t){for(const e of this._sendStates.values())if(!e.done)return!0;const s=new Set;for(const e of t)s.add(e.chunkId);return!e(s,this._handled)&&(this._handled=s,!0)}invalidate(){this._invalidated=!0}createState(e){return new g(e,this._attributeStore)}async*applyOverrideUpdate(e){}displayMap(e,t,s){const a=new Map(e.map(e=>[t(e),e])),r=[];for(const i of this._sendStates.values())for(const e of i.featuresWorldSpace()){const{objectId:t,displayId:i}=e,o=a.get(t);if(null!=o){const e=s(i,o,t);r.push(e),a.delete(t)}}return r}getDisplayFeatures(e){const t=new Set(e),a=new Set,r=[];for(const i of this._sendStates.values())for(const e of i.featuresWorldSpace())t.has(e.displayId)&&!a.has(e.objectId)&&(e.geometry&&r.push({...s(e,this._metadata.geometryType,!1,!1),displayId:e.displayId}),a.add(e.objectId));return{features:[],aggregates:r,tracks:[]}}getFeatureObjectIdsForAggregate(e){for(const t of this._sendStates.values())for(const s of t.bins.values())if(s.id===e)return Array.from(s.containedObjectIds);return[]}async*updateChunks(e,t){if(this._invalidated){this._invalidated=!1;for(const s of this._sendStates.values())yield*this._update(s,e,t)}}forEachAggregateWorldSpace(e){const t=new Set;for(const s of this._sendStates.values())for(const a of s.featuresWorldSpace())t.has(a.objectId)||(e(a),t.add(a.objectId))}_createGetIndex(){return(e,t)=>{switch(this._schema.index.type){case"geohash":return e.getGeohashIndex(new m({type:"geohash",fields:this.aggregateFields,featureFilter:this._featureFilter,geohashLevel:this._schema.index.fixBinLevel,spatialReference:this.spatialReference,arcadeContextInfo:this._arcadeContextInfo,scale:t.scale,sqlOptions:this._sqlOptions}));case"grid":{const s=this._schema.index.fixedBinLevel,a=null!=s?t.tileInfoView.getLODInfoAt(s).scale:t.scale;return e.getGridIndex(new m({type:"grid",fields:this.aggregateFields,cellSize:this._schema.index.size,featureFilter:this._featureFilter,spatialReference:this.spatialReference,arcadeContextInfo:this._arcadeContextInfo,scale:a,sqlOptions:this._sqlOptions}))}}}}async*_update(e,t,s){const{subscription:a}=e,i=e.take(),{bins:o,featureCache:n}=e,l=a.tile,d=new Set;for(const r of t){this._getIndex(r,l).putBounded(o,d,e.tile.extent,e.tile.resolution)}const f=[],u=a.tile.transform,p=a.tile.key.level;for(const c of o.values()){const e=c.getGeometry(this.spatialReference,u),t=new r(e,c.getAttributes(),null,c.id);e||(t.centroid=c.getGeometricCentroid(this.spatialReference,u)),t.displayId=this._attributeStore.createDisplayIdForObjectId(`${t.objectId}.${p}`),n.set(c.id,t),f.push(t)}this.events.emit("changed"),e.done||=!s;const m=h.fromOptimizedFeatures(f,this._metadata,u),g=m.getCursor(),y=e.subscription.tile.createArcadeEvaluationOptions(this._arcadeContextInfo);for(;g.next();)this._attributeStore.setAttributeData(g.getDisplayId(),g,y,this._sqlOptions);const I=new c(e.subscription,m,[],e.done,{});for(const r of i.featureCache.keys())this._attributeStore.releaseDisplayIdForObjectId(`${r}.${p}`);yield I}}export{g as BinningState,y as BinningStrategy};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{convertToFeature as e}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as t}from"../../../../../layers/graphics/OptimizedFeature.js";import s from"../../../../../layers/graphics/OptimizedGeometry.js";import i from"../../../../../layers/support/FieldsIndex.js";import{tileSize as r}from"../../../engine/webgl/definitions.js";import{ComputedAggregateField as n}from"../aggregation/ComputedAggregateField.js";import{GridCell as a}from"../aggregation/GridCell.js";import{pixelsPerMapUnit as l}from"../aggregation/GridSpatialIndex.js";import{AAggregateStrategy as o}from"./AAggregateStrategy.js";import{ASendState as d}from"./AProcessorStrategy.js";import{WithDisplayId as u}from"./support/WithDisplayId.js";import{FeatureTileAppendMessage as c}from"../sources/FeatureSourceMessage.js";import{ComputedAttributeStorage as h}from"../support/ComputedAttributeStorage.js";import p from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as f}from"../support/FeatureMetadata.js";import{FeatureSetReaderJSON as g}from"../support/FeatureSetReaderJSON.js";import _ from"../../../tiling/TileKey.js";const m=128;class y extends d{constructor(e){super(e),this.didSend=!1,this.done=!1}}class S{constructor(e,t,s,i,r){this._level=e,this._scale=t,this._indexOptions=s,this._clusterRadius=i,this._store=r,this._cells=new Map,this._handledChunks=new Set,this._statistics=new Map,this._clusters=new Map}destroy(){this._clearClusters()}_clearClusters(){for(const e of this._clusters.values())this._store.releaseDisplayIdForObjectId(e.inner.id);this._clusters.clear()}*aggregatesWorldSpace(){for(const e of this._clusters.values()){const s=e.inner.getCentroid(null),i=new t(s,e.inner.getAttributes(),null,e.inner.id,e.displayId);yield i}}clusters(){return this._clusters.values()}updateChunks(e,t){let s=!1;for(const a of e){const e=a.queryInfo;if("tileId"in e){if(new _(e.tileId).level!==this._level)continue}if(!this._handledChunks.has(a.normalizedChunkId)){this._handledChunks.add(a.normalizedChunkId),s=!0;a.getAggregateIndex({...this._indexOptions,scale:this._scale}).put(this._cells)}}const i={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0},r=l(this._indexOptions.spatialReference,this._scale),n=this._indexOptions.cellSize;for(const{subscription:a}of t){const e=a.tile.bounds,t=Math.floor(e[0]*r/n),s=Math.floor(e[1]*r/n),l=Math.ceil(e[2]*r/n),o=Math.ceil(e[3]*r/n);i.xMin=Math.min(i.xMin,t),i.yMin=Math.min(i.yMin,s),i.xMax=Math.max(i.xMax,l),i.yMax=Math.max(i.yMax,o)}return null!=this._lastCellBounds&&i.xMin===this._lastCellBounds.xMin&&i.yMin===this._lastCellBounds.yMin&&i.yMin===this._lastCellBounds.yMin&&i.yMax===this._lastCellBounds.yMax||(s=!0,this._lastCellBounds=i),s&&this._clusterCells(i),s}async updateStatistics(e){let t=!1;for(const s of this._clusters.values())s.inner.count>1&&(t=this._updateAggregateStatistics(this._statistics,s.inner)||t);if(t){const t=Array.from(this._statistics.entries()).map(([e,t])=>({fieldName:e,minValue:t.minValue,maxValue:t.maxValue}));await e.container.updateStatistics(this._level,t)}}createAggregateFeatures(e,i){const n=e.subscription,a=[],l=n.tile.transform;for(const o of this._clusters.values()){let e=o.inner.getCentroidX(l);const i=o.inner.getCentroidY(l),d=n.tile.lod,u=d.wrap?d.worldSize[0]:null,c=1===o.inner.count?o.inner.firstObjectId:o.inner.id,h=o.displayId;if(null!=u)if(1===u){const n=new s([],[e,i]),l=new t(n,o.inner.getAttributes(),null,c,h);l.geometry.coords[0]-=r,a.push(l);const d=new s([],[e,i]),u=new t(d,o.inner.getAttributes(),null,c,h);u.geometry.coords[0]+=r,a.push(u)}else e>r+r/2?e-=u*r:e<-256&&(e+=u*r);if(e<r+m&&e>=-m&&i<r+m&&i>=-m){const r=new s([],[e,i]),n=new t(r,o.inner.getAttributes(),null,c,h);a.push(n)}}return g.fromOptimizedFeatures(a,i,n.tile.transform)}_clusterCells(e){let t=Array.from(this._cells.values());t=t.sort((e,t)=>t.count-e.count);const s=[];for(const a of this._clusters.values())s.push(a.inner.id);this._clusters.clear();const i=this._clusterRadius*(1/l(this._indexOptions.spatialReference,this._scale)),r=1+this._clusterRadius/this._indexOptions.cellSize,n=new Set;for(const l of t){if(n.has(l.id))continue;if(l.gridX<e.xMin||l.gridX>e.xMax||l.gridY<e.yMin||l.gridY>e.yMax)continue;const t=this._store.createDisplayIdForObjectId(l.id),s=new u(l.clone(),t);n.add(l.id),this._clusters.set(l.id,s);const o=l.centroidXWorld,d=l.centroidYWorld;for(let e=l.gridY-r;e<=l.gridY+r;e++)for(let t=l.gridX-r;t<=l.gridX+r;t++){if(e===l.gridY&&t===l.gridX)continue;const r=this._cells.get(a.createId(t,e));if(!r||n.has(r.id))continue;const u=Math.abs(r.centroidXWorld-o),c=Math.abs(r.centroidYWorld-d);u<i&&c<i&&(s.inner.merge(r),n.add(r.id))}}for(const a of s)this._store.releaseDisplayIdForObjectId(a)}_updateAggregateStatistics(e,t){let s=!1;for(const i of t.statistics.values()){if("esriFieldTypeString"===i.field.type)continue;const t=i.value,r=i.field,n=e.get(r.name);if(n){const{minValue:e,maxValue:i}=n,r=Math.min(n.minValue,t),a=Math.max(n.maxValue,t);e===r&&i===a||(n.minValue=r,n.maxValue=a,s=!0);continue}e.set(r.name,{minValue:t,maxValue:t}),s=!0}return s}}class x extends o{static async create(e,t,s,i,r,a,l,o){const d=s.metadata.outSpatialReference,u=new h({spatialReference:d}),c={type:"grid",fields:await Promise.all(t.fields.map(async e=>n.create(u,e))),spatialReference:d,featureFilter:t.featureFilter?await p.create({geometryType:s.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:s.metadata.timeInfo,fieldsIndex:s.metadata.fieldsIndex,spatialReference:d,filterJSON:t.featureFilter}):null,cellSize:t.clusterRadius/4,arcadeContextInfo:r,sqlOptions:a};return new x(e,t.clusterRadius,c,t.fields,s,i,a,l,o)}constructor(e,t,s,r,n,a,l,o,d){super(n,a,s.spatialReference,s.fields,l),this._connection=e,this._clusterRadius=t,this._indexOptions=s,this._requiredLevel=o,this._requiredScale=d,this._cellsPerScale=new Map,this._metadata=f.createFeature({geometryType:"esriGeometryPoint",hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:new i([...r,...this._source.metadata.fieldsIndex.fields,{name:"aggregateId",alias:"aggregateId",type:"esriFieldTypeOID"}]).toJSON(),globalIdField:null,spatialReference:n.metadata.spatialReference,outSpatialReference:n.metadata.outSpatialReference,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null})}get enablePixelBuffering(){return!1}invalidate(){super.invalidate();for(const e of this._cellsPerScale.values())e.destroy();this._cellsPerScale.clear()}updateRequiredLevel(e,t){this._requiredLevel=e,this._requiredScale=t}createState(e){return new y(e)}async*applyOverrideUpdate(e){for(const t of this._cellsPerScale.values())t.destroy();this._cellsPerScale.clear();for(const t of this._sendStates.values())t.done=!1}displayMap(e,t,s){const i=new Map(e.map(e=>[t(e),e])),r=[],n=this._getClusterState(this._requiredLevel,this._requiredScale);for(const a of n.clusters()){const e=i.get(a.inner.id);if(null!=e){const t=s(a.displayId,e,a.inner.id);r.push(t),i.delete(a.inner.id);continue}if(1===a.inner.count){const{firstObjectId:e}=a.inner,t=e?i.get(e):null;if(null!=t){const n=s(a.displayId,t,e);r.push(n),i.delete(e)}}}return r}getDisplayFeatures(t){const s=new Set(t),i=new Set,r=[],n=[],a=this._getClusterState(this._requiredLevel,this._requiredScale);for(const l of a.aggregatesWorldSpace())if(s.has(l.displayId)&&!i.has(l.displayId)){const t=e(l,this._metadata.geometryType,!1,!1);if(i.add(l.displayId),1===t.attributes.cluster_count){r.push({...t,displayId:l.displayId});continue}n.push({...t,displayId:l.displayId})}return{features:r,aggregates:n,tracks:[]}}getFeatureObjectIdsForAggregate(e){const t=this._getClusterState(this._requiredLevel,this._requiredScale);for(const s of t.clusters())if(s.inner.id===e)return Array.from(s.inner.containedObjectIds);return[]}async*updateChunks(){const e=this._source.chunks();if(!e.length)return;const t=this._getClusterState(this._requiredLevel,this._requiredScale),s=Array.from(this._sendStates.values()).filter(e=>e.subscription.tile.level===this._requiredLevel);if(t.updateChunks(e,s)||!this._source.updateTracking.updating)for(const n of s)n.subscription.tile.level===this._requiredLevel&&(n.didSend=!1,n.done=!1);const i=Array.from(this._sendStates.values()).filter(e=>e.done).map(e=>e.subscription.tile.key),r=new Set(i);for(const n of this._sendStates.values()){if(this._source.updateTracking.updating){if(i.some(e=>e.containsChild(n.subscription.tile.key)))continue;if(n.subscription.tile.key.getChildKeys().every(e=>r.has(e)))continue}n.didSend||n.subscription.tile.level!==this._requiredLevel||(n.didSend=!0,yield*this._update(n,t,this._source))}await t.updateStatistics(this._connection)}forEachAggregateWorldSpace(e){if(null==this._requiredLevel||null==this._requiredScale)return;const t=this._getClusterState(this._requiredLevel,this._requiredScale);for(const s of t.aggregatesWorldSpace())e(s)}_getClusterState(e,t){if(null==e||null==t)throw new Error("InternalError: Level and scale must be defined");let s=this._cellsPerScale.get(t);return s||(s=new S(e,t,this._indexOptions,this._clusterRadius,this._attributeStore),this._cellsPerScale.set(t,s)),s}async*_update(e,t,s){if(e.done)return;const i=t.createAggregateFeatures(e,this._metadata);this.events.emit("changed"),e.done=!s.updateTracking.updating;const r=i.getCursor(),n=e.subscription.tile.createArcadeEvaluationOptions(this._indexOptions.arcadeContextInfo);for(;r.next();)this._attributeStore.setAttributeData(r.getDisplayId(),r,n,this._sqlOptions);const a=new c(e.subscription,i,!0,e.done,{});yield a}}export{y as ClusterState,x as ClusterStrategy};
2
+ import has from"../../../../../core/has.js";import{getOrCreateMapValue as e}from"../../../../../core/MapUtils.js";import{equals as t}from"../../../../../core/SetUtils.js";import{convertToFeature as s}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as i}from"../../../../../layers/graphics/OptimizedFeature.js";import r from"../../../../../layers/graphics/OptimizedGeometry.js";import a from"../../../../../layers/support/FieldsIndex.js";import{tileSize as n}from"../../../engine/webgl/definitions.js";import{ComputedAggregateField as l}from"../aggregation/ComputedAggregateField.js";import{GridCell as o}from"../aggregation/GridCell.js";import{GridIndexCell as d}from"../aggregation/GridIndexCell.js";import{pixelsPerMapUnit as c}from"../aggregation/GridSpatialIndex.js";import{AAggregateStrategy as u}from"./AAggregateStrategy.js";import{ASendState as p}from"./AProcessorStrategy.js";import{WithDisplayId as h}from"./support/WithDisplayId.js";import{FeatureTileAppendMessage as f}from"../sources/FeatureSourceMessage.js";import{createArcadeEvaluationOptions as g}from"../support/arcadeUtils.js";import{ComputedAttributeStorage as m}from"../support/ComputedAttributeStorage.js";import _ from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as y}from"../support/FeatureMetadata.js";import{FeatureSetReaderJSON as S}from"../support/FeatureSetReaderJSON.js";import{Hashed as x}from"../support/Hashed.js";const I=128;class M extends p{constructor(e){super(e),this.didSend=!1,this.done=!1}}class C{constructor(e,t,s,i,r){this._level=e,this._scale=t,this._indexOptions=s,this._clusterRadius=i,this._store=r,this._statistics=new Map,this._clusters=new Map}destroy(){this._clearClusters()}_clearClusters(){for(const e of this._clusters.values())this._store.releaseDisplayIdForObjectId(e.inner.id);this._clusters.clear()}*aggregatesWorldSpace(){for(const e of this._clusters.values()){const t=e.inner.getCentroid(null),s=new i(t,e.inner.getAttributes(),null,e.inner.id,e.displayId);yield s}}clusters(){return this._clusters.values()}updateChunks(e,t){const s={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0},i=c(this._indexOptions.spatialReference,this._scale),r=this._indexOptions.cellSize;for(const{subscription:a}of t){const e=a.tile.bounds,t=Math.floor(e[0]*i/r),n=Math.floor(e[1]*i/r),l=Math.ceil(e[2]*i/r),o=Math.ceil(e[3]*i/r);s.xMin=Math.min(s.xMin,t),s.yMin=Math.min(s.yMin,n),s.xMax=Math.max(s.xMax,l),s.yMax=Math.max(s.yMax,o)}null!=this._lastCellBounds&&s.xMin===this._lastCellBounds.xMin&&s.yMin===this._lastCellBounds.yMin&&s.yMin===this._lastCellBounds.yMin&&s.yMax===this._lastCellBounds.yMax||(this._lastCellBounds=s),this._clusterCells(e,s)}async updateStatistics(e){let t=!1;for(const s of this._clusters.values())s.inner.count>1&&(t=this._updateAggregateStatistics(this._statistics,s.inner)||t);if(t){const t=Array.from(this._statistics.entries()).map(([e,t])=>({fieldName:e,minValue:t.minValue,maxValue:t.maxValue}));await e.container.updateStatistics(this._level,t)}}createAggregateFeatures(e,t){const s=e.subscription,a=[],l=s.tile.transform,o=Array.from(this._clusters.values()),d=o.length;for(const u of o){const e=u.inner.getCentroidX(l),t=u.inner.getCentroidY(l),s=1===u.inner.count?u.inner.firstObjectId:u.inner.id,o=u.displayId;if(e<n+I&&e>=-I&&t<n+I&&t>=-I){const n=new r([],[e,t]),l=new i(n,u.inner.getAttributes(),null,s,o);a.push(l)}}const c=S.fromOptimizedFeatures(a,t,s.tile.transform);return has("esri-2d-update-debug")&&console.debug(`Tile[${e.subscription.tile.id}] ClusterStrategy.createAggregateFeatures`,{clusters:c,levelClusterCount:d}),c}_clusterCells(t,s){this._clearClusters();const i=this._clusterRadius*(1/c(this._indexOptions.spatialReference,this._scale)),{arcadeContextInfo:r}=this._indexOptions,a=g(this._scale,r),n=new x({...this._indexOptions,scale:this._scale}),l=new Set,u=new Map;for(let c=s.yMin;c<=s.yMax;c++)for(let i=s.xMin;i<=s.xMax;i++){const s=d.createId(i,c),r=o.createId(i,c);for(const d of t){const t=d.getGridIndex(n);t.forEachInCell(s,s=>{const n=s.getObjectId();if(l.has(n))return;l.add(n);e(u,r,()=>o.create(i,c,this._indexOptions.fields,t.worldUnitsPerCell)).insert(s,a)})}}let p=Array.from(u.values());p=p.sort((e,t)=>t.count-e.count);const f=new Set;for(const e of p){if(f.has(e.id))continue;if(e.gridX<s.xMin||e.gridX>s.xMax||e.gridY<s.yMin||e.gridY>s.yMax)continue;const t=1+this._clusterRadius/this._indexOptions.cellSize,r=this._store.createDisplayIdForObjectId(e.id),a=new h(e.clone(),r);f.add(e.id),this._clusters.set(e.id,a);const n=e.centroidXWorld,l=e.centroidYWorld;for(let s=e.gridY-t;s<=e.gridY+t;s++)for(let r=e.gridX-t;r<=e.gridX+t;r++){if(s===e.gridY&&r===e.gridX)continue;const t=u.get(o.createId(r,s));if(!t||f.has(t.id))continue;const d=Math.abs(t.centroidXWorld-n),c=Math.abs(t.centroidYWorld-l);d<i&&c<i&&(a.inner.merge(t),f.add(t.id))}}}_updateAggregateStatistics(e,t){let s=!1;for(const i of t.statistics.values()){if("esriFieldTypeString"===i.field.type)continue;const t=i.value,r=i.field,a=e.get(r.name);if(a){const{minValue:e,maxValue:i}=a,r=Math.min(a.minValue,t),n=Math.max(a.maxValue,t);e===r&&i===n||(a.minValue=r,a.maxValue=n,s=!0);continue}e.set(r.name,{minValue:t,maxValue:t}),s=!0}return s}}class v extends u{static async create(e,t,s,i,r,a,n,o){const d=s.metadata.outSpatialReference,c=new m({spatialReference:d}),u={type:"grid",fields:await Promise.all(t.fields.map(async e=>l.create(c,e))),spatialReference:d,featureFilter:t.featureFilter?await _.create({geometryType:s.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:s.metadata.timeInfo,fieldsIndex:s.metadata.fieldsIndex,spatialReference:d,filterJSON:t.featureFilter}):null,cellSize:t.clusterRadius/4,arcadeContextInfo:r,sqlOptions:a};return new v(e,t.clusterRadius,u,t.fields,s,i,a,n,o)}constructor(e,t,s,i,r,n,l,o,d){super(r,n,s.spatialReference,s.fields,l),this._connection=e,this._clusterRadius=t,this._indexOptions=s,this._requiredLevel=o,this._requiredScale=d,this._cellsPerScale=new Map,this._handled=new Set,this._invalidated=!1,this._metadata=y.createFeature({geometryType:"esriGeometryPoint",hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:new a([...i,...this._source.metadata.fieldsIndex.fields,{name:"aggregateId",alias:"aggregateId",type:"esriFieldTypeOID"}]).toJSON(),globalIdField:null,spatialReference:r.metadata.spatialReference,outSpatialReference:r.metadata.outSpatialReference,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null})}get enablePixelBuffering(){return!0}requiresInvalidation(e){for(const t of this._sendStates.values())if(!t.done)return!0;const s=new Set;for(const t of e)s.add(t.chunkId);return!t(s,this._handled)&&(this._handled=s,!0)}invalidate(){this._invalidated=!0;for(const e of this._cellsPerScale.values())e.destroy();this._cellsPerScale.clear()}updateRequiredLevel(e,t){this._requiredLevel=e,this._requiredScale=t}createState(e){return new M(e)}async*applyOverrideUpdate(e){for(const t of this._cellsPerScale.values())t.destroy();this._cellsPerScale.clear();for(const t of this._sendStates.values())t.done=!1}displayMap(e,t,s){const i=new Map(e.map(e=>[t(e),e])),r=[],a=this._getClusterState(this._requiredLevel,this._requiredScale);for(const n of a.clusters()){const e=i.get(n.inner.id);if(null!=e){const t=s(n.displayId,e,n.inner.id);r.push(t),i.delete(n.inner.id);continue}if(1===n.inner.count){const{firstObjectId:e}=n.inner,t=e?i.get(e):null;if(null!=t){const a=s(n.displayId,t,e);r.push(a),i.delete(e)}}}return r}getDisplayFeatures(e){const t=new Set(e),i=new Set,r=[],a=[],n=this._getClusterState(this._requiredLevel,this._requiredScale);for(const l of n.aggregatesWorldSpace())if(t.has(l.displayId)&&!i.has(l.displayId)){const e=s(l,this._metadata.geometryType,!1,!1);if(i.add(l.displayId),1===e.attributes.cluster_count){r.push({...e,displayId:l.displayId});continue}a.push({...e,displayId:l.displayId})}return{features:r,aggregates:a,tracks:[]}}getFeatureObjectIdsForAggregate(e){const t=this._getClusterState(this._requiredLevel,this._requiredScale);for(const s of t.clusters())if(s.inner.id===e)return Array.from(s.inner.containedObjectIds);return[]}async*updateChunks(e,t){if(!this._invalidated)return;this._invalidated=!1;const s=this._getClusterState(this._requiredLevel,this._requiredScale);s.updateChunks(e,Array.from(this._sendStates.values()));for(const i of this._sendStates.values())yield*this._update(i,s,t);await s.updateStatistics(this._connection)}forEachAggregateWorldSpace(e){if(null==this._requiredLevel||null==this._requiredScale)return;const t=this._getClusterState(this._requiredLevel,this._requiredScale);for(const s of t.aggregatesWorldSpace())e(s)}_getClusterState(e,t){if(null==e||null==t)throw new Error("InternalError: Level and scale must be defined");let s=this._cellsPerScale.get(t);return s||(s=new C(e,t,this._indexOptions,this._clusterRadius,this._attributeStore),this._cellsPerScale.set(t,s)),s}async*_update(e,t,s){const i=t.createAggregateFeatures(e,this._metadata);this.events.emit("changed"),e.done=e.done||!s;const r=i.getCursor(),a=e.subscription.tile.createArcadeEvaluationOptions(this._indexOptions.arcadeContextInfo);for(;r.next();)this._attributeStore.setAttributeData(r.getDisplayId(),r,a,this._sqlOptions);has("esri-2d-update-debug")&&console.debug(`Tile[${e.subscription.tile.id}] ClusterStrategy._update`,{done:e.done});const n=new f(e.subscription,i,e.done,{});yield n}}export{M as ClusterState,v as ClusterStrategy};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import has from"../../../../../core/has.js";import{AProcessorStrategy as e,ASendState as t}from"./AProcessorStrategy.js";import{FeatureTileUpdateMessage as s,FeatureTileAppendMessage as r}from"../sources/FeatureSourceMessage.js";import{OverrideChunk as a}from"../sources/strategies/chunks/Overrides.js";import{createArcadeEvaluationOptions as o}from"../support/arcadeUtils.js";import{FeatureSetReaderJSON as n}from"../support/FeatureSetReaderJSON.js";class d extends t{}class i extends e{constructor(e,t,s,r){super(e,t,r),this._arcadeContextInfo=s,this.handledChunks=new Set,this.handledChunksForIdCreation=new Set,this.handledChunksForAttributeData=new Set,this._streamLayerDeferredObjectIdsToRemove=[]}destroy(){super.destroy();for(const e of this._source.chunks())this._cleanupChunkIds(e)}invalidateAttributeData(e){this.handledChunksForAttributeData.clear(),this._arcadeContextInfo=e,null!=this._evalOptions&&(this._evalOptions=o(this._evalOptions.$view.scale,e))}onSubscribe(e){super.onSubscribe(e),this._evalOptions=e.tile.createArcadeEvaluationOptions(this._arcadeContextInfo)}createState(e){return new d(e)}get aggregateQueryEngine(){return null}displayMap(e,t,s){const r=new Map(e.map(e=>[t(e),e])),a=[];for(const o of this._source.chunks()){const e=o.reader.getCursor();for(;e.next();){const t=e.getObjectId(),o=e.getDisplayId(),n=r.get(t);if(null!=n){const e=s(o,n,t);a.push(e),r.delete(t)}}}return a}getDisplayFeatures(e){const t=new Set(e),s=new Set,r=[];for(const a of this._source.chunks()){const e=a.reader.getCursor();for(;e.next();){const a=e.getObjectId(),o=e.getDisplayId();t.has(o)&&!s.has(a)&&(r.push({...e.readLegacyFeatureWorldSpace(),displayId:o}),s.add(a))}}return{features:r,aggregates:[],tracks:[]}}async*applyOverrideUpdate(e){const t=[];for(const s of e.modified.values()){const e=this._attributeStore.createDisplayIdForObjectId(s.objectId);s.displayId=e,t.push(e)}const r=n.fromOptimizedFeatures(Array.from(e.modified.values()),this._source.metadata).getCursor();for(;r.next();)this._attributeStore.setAttributeData(r.getDisplayId(),r,this._evalOptions,this._sqlOptions);const o=[];for(const s of e.removed){const e=this._attributeStore.getDisplayIdForObjectId(s);null!=e&&o.push(e)}has("esri-2d-update-debug")&&console.debug("FeatureUpdateStrategy.applyLocalEdit",{message:e,modifiedDisplayIds:t,removedDisplayIds:o});const d=a.fromFeatures(Array.from(e.modified.values()),this._source.metadata);this.handledChunks.add(d.chunkId),this.handledChunksForAttributeData.add(d.chunkId),this.handledChunksForIdCreation.add(d.chunkId);for(const a of this._sendStates.values())a.handledChunks.add(d.chunkId),yield new s(a.subscription,null,t,!1,d.queryInfo);for(const a of this._sendStates.values()){const e=d.getTileReader(a.subscription.tile);yield new s(a.subscription,e,o,!1,d.queryInfo)}for(const s of e.removed)this._attributeStore.releaseDisplayIdForObjectId(s)}async*updateChunks(){if(this._source.chunks().length){this._updateAttributeData();for(const e of this._sendStates.values())yield*this._update(e)}}removeChunks(e){for(const t of e)this.handledChunks.delete(t.chunkId),this.handledChunksForAttributeData.delete(t.chunkId),this._cleanupChunkIds(t)}afterUpdateChunks(){for(const e of this._streamLayerDeferredObjectIdsToRemove)this._attributeStore.releaseDisplayIdForObjectId(e);this._streamLayerDeferredObjectIdsToRemove=[]}_cleanupChunkIds(e){if(this.handledChunksForIdCreation.has(e.chunkId)){const t=e.reader.getCursor();for(;t.next();){const e=t.getObjectId();this._source.isStream?this._streamLayerDeferredObjectIdsToRemove.push(e):this._attributeStore.releaseDisplayIdForObjectId(e)}this.handledChunksForIdCreation.delete(e.chunkId)}}_updateAttributeData(){for(const e of this._source.chunks()){const{chunkId:t,reader:s}=e;if(!this.handledChunksForIdCreation.has(t)){this.handledChunksForIdCreation.add(t);const e=s.getCursor();for(;e.next();){const t=this._attributeStore.createDisplayIdForObjectId(e.getObjectId());e.setDisplayId(t)}}}for(const e of this._source.chunks())if(this._attributeStore.referencesScale()||!this.handledChunksForAttributeData.has(e.chunkId)){this.handledChunksForAttributeData.add(e.chunkId);const t=e.reader.getCursor();for(;t.next();){const e=t.getDisplayId();this._attributeStore.setAttributeData(e,t,this._evalOptions,this._sqlOptions)}}}*_update(e){const{subscription:t,handledChunks:s}=e;for(const a of this._source.chunks()){const{chunkId:o}=a;if(s.has(o)||!this.handledChunksForIdCreation.has(o)||!this.handledChunksForAttributeData.has(o))continue;s.add(o);const n=a.getTileReader(t.tile);n&&(yield new r(e.subscription,n,!1,a.end,a.queryInfo))}}}export{d as DefaultSendState,i as FeatureUpdateStrategy};
2
+ import has from"../../../../../core/has.js";import{AProcessorStrategy as e,ASendState as t}from"./AProcessorStrategy.js";import{FeatureTileUpdateMessage as s,FeatureTileAppendMessage as r}from"../sources/FeatureSourceMessage.js";import{OverrideChunk as a}from"../sources/strategies/chunks/Overrides.js";import{createArcadeEvaluationOptions as o}from"../support/arcadeUtils.js";import{FeatureSetReaderJSON as n}from"../support/FeatureSetReaderJSON.js";class d extends t{}class i extends e{constructor(e,t,s,r){super(e,t,r),this._arcadeContextInfo=s,this.handledChunks=new Set,this.handledChunksForIdCreation=new Set,this.handledChunksForAttributeData=new Set,this._streamLayerDeferredObjectIdsToRemove=[]}destroy(){super.destroy();for(const e of this._source.chunks())this._cleanupChunkIds(e)}invalidateAttributeData(e){this.handledChunksForAttributeData.clear(),this._arcadeContextInfo=e,null!=this._evalOptions&&(this._evalOptions=o(this._evalOptions.$view.scale,e))}onSubscribe(e){super.onSubscribe(e),this._evalOptions=e.tile.createArcadeEvaluationOptions(this._arcadeContextInfo)}createState(e){return new d(e)}get aggregateQueryEngine(){return null}displayMap(e,t,s){const r=new Map(e.map(e=>[t(e),e])),a=[];for(const o of this._source.chunks()){const e=o.reader.getCursor();for(;e.next();){const t=e.getObjectId(),o=e.getDisplayId(),n=r.get(t);if(null!=n){const e=s(o,n,t);a.push(e),r.delete(t)}}}return a}getDisplayFeatures(e){const t=new Set(e),s=new Set,r=[];for(const a of this._source.chunks()){const e=a.reader.getCursor();for(;e.next();){const a=e.getObjectId(),o=e.getDisplayId();t.has(o)&&!s.has(a)&&(r.push({...e.readLegacyFeatureWorldSpace(),displayId:o}),s.add(a))}}return{features:r,aggregates:[],tracks:[]}}async*applyOverrideUpdate(e){const t=[];for(const s of e.modified.values()){const e=this._attributeStore.createDisplayIdForObjectId(s.objectId);s.displayId=e,t.push(e)}const r=n.fromOptimizedFeatures(Array.from(e.modified.values()),this._source.metadata).getCursor();for(;r.next();)this._attributeStore.setAttributeData(r.getDisplayId(),r,this._evalOptions,this._sqlOptions);const o=[];for(const s of e.removed){const e=this._attributeStore.getDisplayIdForObjectId(s);null!=e&&o.push(e)}has("esri-2d-update-debug")&&console.debug("FeatureUpdateStrategy.applyLocalEdit",{message:e,modifiedDisplayIds:t,removedDisplayIds:o});const d=a.fromFeatures(Array.from(e.modified.values()),this._source.metadata);this.handledChunks.add(d.chunkId),this.handledChunksForAttributeData.add(d.chunkId),this.handledChunksForIdCreation.add(d.chunkId);for(const a of this._sendStates.values())a.handledChunks.add(d.chunkId),yield new s(a.subscription,null,t,!1,d.queryInfo);for(const a of this._sendStates.values()){const e=d.getTileReader(a.subscription.tile);yield new s(a.subscription,e,o,!1,d.queryInfo)}for(const s of e.removed)this._attributeStore.releaseDisplayIdForObjectId(s)}async*updateChunks(e,t){if(e.length){this._updateAttributeData();for(const e of this._sendStates.values())yield*this._update(e)}}removeChunks(e){for(const t of e)this.handledChunks.delete(t.chunkId),this.handledChunksForAttributeData.delete(t.chunkId),this._cleanupChunkIds(t)}afterUpdateChunks(){for(const e of this._streamLayerDeferredObjectIdsToRemove)this._attributeStore.releaseDisplayIdForObjectId(e);this._streamLayerDeferredObjectIdsToRemove=[]}_cleanupChunkIds(e){if(this.handledChunksForIdCreation.has(e.chunkId)){const t=e.reader.getCursor();for(;t.next();){const e=t.getObjectId();this._source.isStream?this._streamLayerDeferredObjectIdsToRemove.push(e):this._attributeStore.releaseDisplayIdForObjectId(e)}this.handledChunksForIdCreation.delete(e.chunkId)}}_updateAttributeData(){for(const e of this._source.chunks()){const{chunkId:t,reader:s}=e;if(!this.handledChunksForIdCreation.has(t)){this.handledChunksForIdCreation.add(t);const e=s.getCursor();for(;e.next();){const t=this._attributeStore.createDisplayIdForObjectId(e.getObjectId());e.setDisplayId(t)}}}for(const e of this._source.chunks())if(this._attributeStore.referencesScale()||!this.handledChunksForAttributeData.has(e.chunkId)){this.handledChunksForAttributeData.add(e.chunkId);const t=e.reader.getCursor();for(;t.next();){const e=t.getDisplayId();this._attributeStore.setAttributeData(e,t,this._evalOptions,this._sqlOptions)}}}*_update(e){const{subscription:t,handledChunks:s}=e;for(const a of this._source.chunks()){const{chunkId:o}=a;if(s.has(o)||!this.handledChunksForIdCreation.has(o)||!this.handledChunksForAttributeData.has(o))continue;s.add(o);const n=a.getTileReader(t.tile);n&&(yield new r(e.subscription,n,a.end,a.queryInfo))}}}export{d as DefaultSendState,i as FeatureUpdateStrategy};