@arcgis/core 6.0.0-next.21 → 6.0.0-next.23

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 (345) hide show
  1. package/PopupTemplate.js +1 -1
  2. package/analysis/LineOfSightAnalysis.d.ts +1 -1
  3. package/analysis/LineOfSightAnalysisObserver.d.ts +5 -4
  4. package/analysis/LineOfSightAnalysisTarget.d.ts +4 -4
  5. package/analysis/Viewshed.d.ts +4 -4
  6. package/arcgisGlobal.d.ts +0 -5
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/{3c277a0f099d67090d07.js → 02335385b1476fe322eb.js} +1 -1
  9. package/assets/esri/core/workers/chunks/092e311cb7aea92a6a26.js +1 -0
  10. package/assets/esri/core/workers/chunks/0df9a906f7823c23d426.js +1 -0
  11. package/assets/esri/core/workers/chunks/{4911ce62421a6c3320b0.js → 13c64087be3b2985a21b.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{8e19629899a5becf8e19.js → 150e7a7bd5df25693da7.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{3704b4e7efc3abc1a7b1.js → 242a77066ac5cdb5b7d7.js} +1 -1
  14. package/assets/esri/core/workers/chunks/2ad69cc496235702bbf2.js +1 -0
  15. package/assets/esri/core/workers/chunks/2c0cb214fedb29487eef.js +1 -0
  16. package/assets/esri/core/workers/chunks/2f91fd61019d2a37476d.js +1 -0
  17. package/assets/esri/core/workers/chunks/3cd04d23b73beaf79650.js +1 -0
  18. package/assets/esri/core/workers/chunks/434a8ba841a59e0deab9.js +1 -0
  19. package/assets/esri/core/workers/chunks/{60f92eb03c6e17ab4747.js → 435b90168f79c5587a07.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{f00458654c7c34c369ef.js → 45ba4aa87a4732198596.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{2e096537a3a5555a4a93.js → 4cb751dc8d00bdaeb04c.js} +1 -1
  22. package/assets/esri/core/workers/chunks/504184828048310a052c.js +1 -0
  23. package/assets/esri/core/workers/chunks/{eca44e53bcee9b08d70a.js → 5046214dd32029cb733d.js} +1 -1
  24. package/assets/esri/core/workers/chunks/517106048980a3cbe072.js +1 -0
  25. package/assets/esri/core/workers/chunks/53ff68d4f9e365fc15cd.js +1 -0
  26. package/assets/esri/core/workers/chunks/542e5640ea1b80ef801a.js +1 -0
  27. package/assets/esri/core/workers/chunks/58865772bed48141a56a.js +1 -0
  28. package/assets/esri/core/workers/chunks/5a9b7eb26f936f03d02e.js +1 -0
  29. package/assets/esri/core/workers/chunks/5d76f4d97beee494bbbf.js +1 -0
  30. package/assets/esri/core/workers/chunks/5f07f52bb8b7721f08d3.js +1 -0
  31. package/assets/esri/core/workers/chunks/{d08ff41e2a9bcd58b64a.js → 636cd05abfbdff19029e.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{461e63a0f436c41a9f4a.js → 64b360625c68cb863a08.js} +1 -1
  33. package/assets/esri/core/workers/chunks/67f54efc817b241f8746.js +1 -0
  34. package/assets/esri/core/workers/chunks/6d41444b46677aa762a7.js +1 -0
  35. package/assets/esri/core/workers/chunks/6dfe96b056bec30068df.js +1 -0
  36. package/assets/esri/core/workers/chunks/7159d9c36869cd82599e.js +29 -0
  37. package/assets/esri/core/workers/chunks/792d2b62356a1d953c88.js +1 -0
  38. package/assets/esri/core/workers/chunks/{814751e705c05099f864.js → 7c75a8ee266c36baa902.js} +1 -1
  39. package/assets/esri/core/workers/chunks/947674b2ca8be65b9bcc.js +1 -0
  40. package/assets/esri/core/workers/chunks/95b82cbbe355266c65d7.js +1 -0
  41. package/assets/esri/core/workers/chunks/{a0c9e3f8b7d55d6dc1d5.js → 96c4ea9cfa3930f1c3fb.js} +25 -21
  42. package/assets/esri/core/workers/chunks/{601e1d020b8115497944.js → 9d40786c5ceface786ba.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{a35c69a4751d28c39907.js → 9e7c4eda135c4911b268.js} +1 -1
  44. package/assets/esri/core/workers/chunks/a64446a3328a7323e307.js +1 -0
  45. package/assets/esri/core/workers/chunks/a65951f1d5702cfd996e.js +1 -0
  46. package/assets/esri/core/workers/chunks/aa4f3751f0d830113bed.js +1 -0
  47. package/assets/esri/core/workers/chunks/ad96132bc89671e595f3.js +1 -0
  48. package/assets/esri/core/workers/chunks/b0ca81a07cff25df19d2.js +1 -0
  49. package/assets/esri/core/workers/chunks/b1d989b72203113a06fe.js +1 -0
  50. package/assets/esri/core/workers/chunks/{9e0559cd0bb01a0ed9d7.js → b3273f847405799e3362.js} +1 -1
  51. package/assets/esri/core/workers/chunks/b4c3ec081874b49ff89b.js +1 -0
  52. package/assets/esri/core/workers/chunks/b6d71a4ab788a09714f3.js +1 -0
  53. package/assets/esri/core/workers/chunks/c0d7ae314ebfad1e3791.js +1 -0
  54. package/assets/esri/core/workers/chunks/c82daefb193aae895bc0.js +1 -0
  55. package/assets/esri/core/workers/chunks/d8a7eba588d374b2f961.js +1 -0
  56. package/assets/esri/core/workers/chunks/ee08ae5b73439a1ff666.js +1 -0
  57. package/assets/esri/core/workers/chunks/{557671c897ca5563be6c.js → f6bd7b52745b82ba73dc.js} +1 -1
  58. package/assets/esri/core/workers/chunks/fcaf9450642fcef83286.js +1 -0
  59. package/assets/esri/core/workers/chunks/feb41abc03d677df6f73.js +1 -0
  60. package/assets/esri/core/workers/chunks/ffcb99693182a621a93e.js +1 -0
  61. package/assets/esri/themes/base/_core.scss +0 -2
  62. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -0
  63. package/assets/esri/themes/dark/main.css +1 -1
  64. package/assets/esri/themes/light/main.css +1 -1
  65. package/assets/esri/themes/light/view.css +1 -1
  66. package/chunks/CloudsComposition.glsl.js +2 -2
  67. package/chunks/Component.glsl.js +9 -12
  68. package/chunks/DefaultMaterial.glsl.js +4 -5
  69. package/chunks/Path.glsl.js +2 -4
  70. package/chunks/RealisticTree.glsl.js +3 -3
  71. package/chunks/SSAO.glsl.js +1 -2
  72. package/config.d.ts +11 -30
  73. package/config.js +1 -1
  74. package/core/accessorSupport/trackingUtils.js +1 -1
  75. package/core/accessorSupport/watch.js +1 -1
  76. package/core/workers/workerFactory.js +1 -1
  77. package/core/workers.d.ts +17 -0
  78. package/geometry/support/MeshComponent.d.ts +1 -1
  79. package/geometry/support/clipRay.js +1 -1
  80. package/geometry/support/plane.js +1 -1
  81. package/geometry/support/vcsData.js +1 -1
  82. package/interfaces.d.ts +0 -55
  83. package/kernel.js +1 -1
  84. package/layers/ElevationLayer.d.ts +6 -2
  85. package/layers/FeatureLayer.d.ts +32 -14
  86. package/layers/GeoJSONLayer.d.ts +2 -107
  87. package/layers/IntegratedMeshLayer.js +1 -1
  88. package/layers/MapImageLayer.d.ts +2 -1
  89. package/layers/SceneLayer.d.ts +40 -16
  90. package/layers/SubtypeGroupLayer.d.ts +63 -0
  91. package/layers/ViewshedLayer.d.ts +10 -4
  92. package/layers/WMSLayer.d.ts +2 -69
  93. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
  94. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  95. package/layers/graphics/sources/support/QueryTask.js +1 -1
  96. package/layers/mixins/TemporalLayer.d.ts +70 -48
  97. package/layers/mixins/TiledImagery.d.ts +0 -11
  98. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  99. package/layers/support/LabelClass.d.ts +20 -2
  100. package/layers/support/Sublayer.d.ts +32 -2
  101. package/layers/support/TimeInformation.js +2 -0
  102. package/libs/basisu/textureMetadata.js +2 -0
  103. package/package.json +3 -3
  104. package/popup/content.d.ts +38 -1
  105. package/popup/content.js +1 -1
  106. package/rest/layerSources/DynamicWorkspaceLayer.d.ts +10 -6
  107. package/rest/query/operations/queryUtils.js +1 -1
  108. package/rest/support/timeUtils.js +2 -0
  109. package/smartMapping/popup/support/clusterUtils.js +1 -1
  110. package/smartMapping/popup/support/utils.js +2 -2
  111. package/smartMapping/renderers/size.js +1 -1
  112. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  113. package/support/timeUtils.d.ts +11 -0
  114. package/symbols/TextSymbol.d.ts +27 -2
  115. package/time/legacyTimeZoneMap.js +1 -1
  116. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  117. package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +1 -1
  118. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
  119. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.js +1 -1
  120. package/views/2d/engine/webgl/GlyphWorker.js +1 -1
  121. package/views/2d/layers/features/Processor.js +1 -1
  122. package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
  123. package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
  124. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  125. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  126. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  127. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  128. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  129. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  130. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  131. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  132. package/views/2d/layers/features/processor/AggregateStrategy.js +1 -1
  133. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  134. package/views/2d/layers/features/processor/bins/BinAdapter.js +1 -1
  135. package/views/2d/layers/features/processor/bins/BinLevelState.js +1 -1
  136. package/views/2d/layers/features/processor/clusters/ClusterAdapter.js +1 -1
  137. package/views/2d/layers/features/processor/clusters/ClusterLevelState.js +1 -1
  138. package/views/2d/layers/features/processor/tracks/TrackAdapter.js +1 -1
  139. package/views/2d/layers/features/processor/tracks/TrackLevelState.js +1 -1
  140. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  141. package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
  142. package/views/2d/layers/features/sources/strategies/chunks/ByReferenceTileSourceChunk.js +1 -1
  143. package/views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js +1 -1
  144. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
  145. package/views/2d/layers/features/sources/strategies/chunks/ParquetSnapshotSourceChunk.js +1 -1
  146. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  147. package/views/2d/layers/features/sources/strategies/chunks/StreamSourceChunk.js +1 -1
  148. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  149. package/views/2d/layers/features/support/FeatureFilterEvaluator.js +1 -1
  150. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  151. package/views/2d/layers/features/support/GraphicsReader.js +1 -1
  152. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  153. package/views/3d/GroundView3D.js +1 -1
  154. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementController.js +1 -1
  155. package/views/3d/environment/SunLighting.d.ts +16 -1
  156. package/views/3d/environment/SunLighting.js +1 -1
  157. package/views/3d/environment/VirtualLighting.d.ts +16 -1
  158. package/views/3d/environment/VirtualLighting.js +1 -1
  159. package/views/3d/input/handlers/ground/GroundDoubleClickMove.js +1 -1
  160. package/views/3d/interactive/placementTools/GroundNavigationPlacementTool3D.js +1 -1
  161. package/views/3d/layers/I3SMeshView3D.js +1 -1
  162. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  163. package/views/3d/layers/TiledLayerView3D.js +1 -1
  164. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  165. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  166. package/views/3d/support/elevationUpdateUtils.js +1 -1
  167. package/views/3d/terrain/TerrainSurface.js +1 -1
  168. package/views/3d/terrain/TileAgent.js +1 -1
  169. package/views/3d/terrain/tileUtils.js +1 -1
  170. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  171. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +1 -2
  172. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +2 -2
  173. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +1 -1
  174. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +1 -2
  175. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +1 -1
  176. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +6 -6
  177. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  178. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +9 -4
  179. package/views/3d/webgl-engine/effects/snowcover/applySnow.glsl.js +18 -0
  180. package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
  181. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  182. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  183. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  184. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  185. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  186. package/views/3d/webgl-engine/materials/internal/worldSizedRibbonLineIntersectionUtils.js +2 -0
  187. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  188. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  189. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  190. package/views/BasemapView.js +1 -1
  191. package/views/GroundView.d.ts +1 -1
  192. package/views/GroundView.js +1 -1
  193. package/views/SceneView.js +1 -1
  194. package/views/layers/LineOfSightLayerView.d.ts +2 -2
  195. package/views/layers/ViewshedLayerView.d.ts +2 -1
  196. package/widgets/Daylight/DaylightViewModel.js +1 -1
  197. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  198. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  199. package/widgets/Locate.d.ts +1 -1
  200. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  201. package/widgets/OrientedImageryViewer.js +2 -2
  202. package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
  203. package/widgets/Search/SearchViewModel.js +1 -1
  204. package/widgets/Search/support/layerSearchUtils.js +1 -1
  205. package/widgets/Sketch/SketchViewModel.d.ts +61 -2
  206. package/widgets/Sketch/SketchViewModel.js +1 -1
  207. package/widgets/Sketch/support/PluginManager.js +1 -1
  208. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +3 -2
  209. package/widgets/TimeSlider.d.ts +5 -4
  210. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  211. package/widgets/support/GeolocationPositioning.d.ts +1 -2
  212. package/assets/esri/core/workers/chunks/0bd5012da287469b17d5.js +0 -1
  213. package/assets/esri/core/workers/chunks/1f6b601147521a42e65c.js +0 -1
  214. package/assets/esri/core/workers/chunks/25d14874198773d2d836.js +0 -1
  215. package/assets/esri/core/workers/chunks/2d13a22f7b2427927fdc.js +0 -1
  216. package/assets/esri/core/workers/chunks/34e0a8a3a2beea50f4f5.js +0 -1
  217. package/assets/esri/core/workers/chunks/42045cf46497828cd3c0.js +0 -1
  218. package/assets/esri/core/workers/chunks/42fd2a7b22b03dacc6a7.js +0 -1
  219. package/assets/esri/core/workers/chunks/494bd434fee9032e1d02.js +0 -1
  220. package/assets/esri/core/workers/chunks/4e350d6c76957f5beb70.js +0 -1
  221. package/assets/esri/core/workers/chunks/4fe34da1c5d63e66ce98.js +0 -1
  222. package/assets/esri/core/workers/chunks/501c6e14ab119785252b.js +0 -1
  223. package/assets/esri/core/workers/chunks/576248e9ae2654569420.js +0 -1
  224. package/assets/esri/core/workers/chunks/6059853ef3b6cddbe869.js +0 -1
  225. package/assets/esri/core/workers/chunks/6c255c029d67423e4dac.js +0 -1
  226. package/assets/esri/core/workers/chunks/6c9266120d46e8c69dbf.js +0 -1
  227. package/assets/esri/core/workers/chunks/6c9acd9e4e201dc380e9.js +0 -1
  228. package/assets/esri/core/workers/chunks/728837812940d7f2ef43.js +0 -1
  229. package/assets/esri/core/workers/chunks/74c866e0b66e61751861.js +0 -1
  230. package/assets/esri/core/workers/chunks/7bbfe9ff352afc566367.js +0 -1
  231. package/assets/esri/core/workers/chunks/939942b00ba380e2957e.js +0 -1
  232. package/assets/esri/core/workers/chunks/95dbbddac6581b9d671f.js +0 -1
  233. package/assets/esri/core/workers/chunks/a8df3f59728f841b608e.js +0 -1
  234. package/assets/esri/core/workers/chunks/aa1ac7954e4f0fefe15b.js +0 -1
  235. package/assets/esri/core/workers/chunks/b48952e1fb4cb7360dd0.js +0 -1
  236. package/assets/esri/core/workers/chunks/b5df193c93e9c19f9700.js +0 -1
  237. package/assets/esri/core/workers/chunks/befa32b9e7b3fbdd431e.js +0 -1
  238. package/assets/esri/core/workers/chunks/c2c1f51a4668055c2838.js +0 -1
  239. package/assets/esri/core/workers/chunks/d0f5bee9db1ad51ae687.js +0 -1
  240. package/assets/esri/core/workers/chunks/d678828726371243d5eb.js +0 -1
  241. package/assets/esri/core/workers/chunks/dd0310184fe4832755a8.js +0 -1
  242. package/assets/esri/core/workers/chunks/de5ecb567bd69c613e9d.js +0 -1
  243. package/assets/esri/core/workers/chunks/dfc81e66196c402f39b4.js +0 -29
  244. package/assets/esri/core/workers/chunks/e1f5d00878f27e1d413e.js +0 -1
  245. package/assets/esri/core/workers/chunks/fb70ab267a08e24b710f.js +0 -1
  246. package/assets/esri/core/workers/chunks/fc44d45598a7476bc606.js +0 -1
  247. package/assets/esri/themes/base/widgets/_DirectionalPad.scss +0 -85
  248. package/assets/esri/widgets/DirectionalPad/t9n/messages.ar.json +0 -1
  249. package/assets/esri/widgets/DirectionalPad/t9n/messages.bg.json +0 -1
  250. package/assets/esri/widgets/DirectionalPad/t9n/messages.bs.json +0 -1
  251. package/assets/esri/widgets/DirectionalPad/t9n/messages.ca.json +0 -1
  252. package/assets/esri/widgets/DirectionalPad/t9n/messages.cs.json +0 -1
  253. package/assets/esri/widgets/DirectionalPad/t9n/messages.da.json +0 -1
  254. package/assets/esri/widgets/DirectionalPad/t9n/messages.de.json +0 -1
  255. package/assets/esri/widgets/DirectionalPad/t9n/messages.el.json +0 -1
  256. package/assets/esri/widgets/DirectionalPad/t9n/messages.en.json +0 -1
  257. package/assets/esri/widgets/DirectionalPad/t9n/messages.es.json +0 -1
  258. package/assets/esri/widgets/DirectionalPad/t9n/messages.et.json +0 -1
  259. package/assets/esri/widgets/DirectionalPad/t9n/messages.fi.json +0 -1
  260. package/assets/esri/widgets/DirectionalPad/t9n/messages.fr.json +0 -1
  261. package/assets/esri/widgets/DirectionalPad/t9n/messages.he.json +0 -1
  262. package/assets/esri/widgets/DirectionalPad/t9n/messages.hr.json +0 -1
  263. package/assets/esri/widgets/DirectionalPad/t9n/messages.hu.json +0 -1
  264. package/assets/esri/widgets/DirectionalPad/t9n/messages.id.json +0 -1
  265. package/assets/esri/widgets/DirectionalPad/t9n/messages.it.json +0 -1
  266. package/assets/esri/widgets/DirectionalPad/t9n/messages.ja.json +0 -1
  267. package/assets/esri/widgets/DirectionalPad/t9n/messages.ko.json +0 -1
  268. package/assets/esri/widgets/DirectionalPad/t9n/messages.lt.json +0 -1
  269. package/assets/esri/widgets/DirectionalPad/t9n/messages.lv.json +0 -1
  270. package/assets/esri/widgets/DirectionalPad/t9n/messages.nl.json +0 -1
  271. package/assets/esri/widgets/DirectionalPad/t9n/messages.no.json +0 -1
  272. package/assets/esri/widgets/DirectionalPad/t9n/messages.pl.json +0 -1
  273. package/assets/esri/widgets/DirectionalPad/t9n/messages.pt-BR.json +0 -1
  274. package/assets/esri/widgets/DirectionalPad/t9n/messages.pt-PT.json +0 -1
  275. package/assets/esri/widgets/DirectionalPad/t9n/messages.ro.json +0 -1
  276. package/assets/esri/widgets/DirectionalPad/t9n/messages.ru.json +0 -1
  277. package/assets/esri/widgets/DirectionalPad/t9n/messages.sk.json +0 -1
  278. package/assets/esri/widgets/DirectionalPad/t9n/messages.sl.json +0 -1
  279. package/assets/esri/widgets/DirectionalPad/t9n/messages.sr.json +0 -1
  280. package/assets/esri/widgets/DirectionalPad/t9n/messages.sv.json +0 -1
  281. package/assets/esri/widgets/DirectionalPad/t9n/messages.th.json +0 -1
  282. package/assets/esri/widgets/DirectionalPad/t9n/messages.tr.json +0 -1
  283. package/assets/esri/widgets/DirectionalPad/t9n/messages.uk.json +0 -1
  284. package/assets/esri/widgets/DirectionalPad/t9n/messages.vi.json +0 -1
  285. package/assets/esri/widgets/DirectionalPad/t9n/messages.zh-CN.json +0 -1
  286. package/assets/esri/widgets/DirectionalPad/t9n/messages.zh-HK.json +0 -1
  287. package/assets/esri/widgets/DirectionalPad/t9n/messages.zh-TW.json +0 -1
  288. package/assets/esri/widgets/Track/t9n/messages.ar.json +0 -1
  289. package/assets/esri/widgets/Track/t9n/messages.bg.json +0 -1
  290. package/assets/esri/widgets/Track/t9n/messages.bs.json +0 -1
  291. package/assets/esri/widgets/Track/t9n/messages.ca.json +0 -1
  292. package/assets/esri/widgets/Track/t9n/messages.cs.json +0 -1
  293. package/assets/esri/widgets/Track/t9n/messages.da.json +0 -1
  294. package/assets/esri/widgets/Track/t9n/messages.de.json +0 -1
  295. package/assets/esri/widgets/Track/t9n/messages.el.json +0 -1
  296. package/assets/esri/widgets/Track/t9n/messages.en.json +0 -1
  297. package/assets/esri/widgets/Track/t9n/messages.es.json +0 -1
  298. package/assets/esri/widgets/Track/t9n/messages.et.json +0 -1
  299. package/assets/esri/widgets/Track/t9n/messages.fi.json +0 -1
  300. package/assets/esri/widgets/Track/t9n/messages.fr.json +0 -1
  301. package/assets/esri/widgets/Track/t9n/messages.he.json +0 -1
  302. package/assets/esri/widgets/Track/t9n/messages.hr.json +0 -1
  303. package/assets/esri/widgets/Track/t9n/messages.hu.json +0 -1
  304. package/assets/esri/widgets/Track/t9n/messages.id.json +0 -1
  305. package/assets/esri/widgets/Track/t9n/messages.it.json +0 -1
  306. package/assets/esri/widgets/Track/t9n/messages.ja.json +0 -1
  307. package/assets/esri/widgets/Track/t9n/messages.ko.json +0 -1
  308. package/assets/esri/widgets/Track/t9n/messages.lt.json +0 -1
  309. package/assets/esri/widgets/Track/t9n/messages.lv.json +0 -1
  310. package/assets/esri/widgets/Track/t9n/messages.nl.json +0 -1
  311. package/assets/esri/widgets/Track/t9n/messages.no.json +0 -1
  312. package/assets/esri/widgets/Track/t9n/messages.pl.json +0 -1
  313. package/assets/esri/widgets/Track/t9n/messages.pt-BR.json +0 -1
  314. package/assets/esri/widgets/Track/t9n/messages.pt-PT.json +0 -1
  315. package/assets/esri/widgets/Track/t9n/messages.ro.json +0 -1
  316. package/assets/esri/widgets/Track/t9n/messages.ru.json +0 -1
  317. package/assets/esri/widgets/Track/t9n/messages.sk.json +0 -1
  318. package/assets/esri/widgets/Track/t9n/messages.sl.json +0 -1
  319. package/assets/esri/widgets/Track/t9n/messages.sr.json +0 -1
  320. package/assets/esri/widgets/Track/t9n/messages.sv.json +0 -1
  321. package/assets/esri/widgets/Track/t9n/messages.th.json +0 -1
  322. package/assets/esri/widgets/Track/t9n/messages.tr.json +0 -1
  323. package/assets/esri/widgets/Track/t9n/messages.uk.json +0 -1
  324. package/assets/esri/widgets/Track/t9n/messages.vi.json +0 -1
  325. package/assets/esri/widgets/Track/t9n/messages.zh-CN.json +0 -1
  326. package/assets/esri/widgets/Track/t9n/messages.zh-HK.json +0 -1
  327. package/assets/esri/widgets/Track/t9n/messages.zh-TW.json +0 -1
  328. package/views/2d/layers/features/FeatureSpatialIndex.js +0 -2
  329. package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +0 -2
  330. package/views/3d/webgl-engine/effects/snowcover/SnowCover.glsl.js +0 -12
  331. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +0 -85
  332. package/widgets/DirectionalPad/DirectionalPadViewModel.js +0 -2
  333. package/widgets/DirectionalPad/VisibleElements.d.ts +0 -40
  334. package/widgets/DirectionalPad/VisibleElements.js +0 -2
  335. package/widgets/DirectionalPad/constants.js +0 -2
  336. package/widgets/DirectionalPad/css.js +0 -2
  337. package/widgets/DirectionalPad/types.d.ts +0 -27
  338. package/widgets/DirectionalPad/utils.js +0 -2
  339. package/widgets/DirectionalPad.d.ts +0 -156
  340. package/widgets/DirectionalPad.js +0 -2
  341. package/widgets/Track/TrackViewModel.d.ts +0 -131
  342. package/widgets/Track/TrackViewModel.js +0 -2
  343. package/widgets/Track/types.d.ts +0 -6
  344. package/widgets/Track.d.ts +0 -278
  345. package/widgets/Track.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../../request.js";import{bidiText as t}from"../../../../core/BidiText.js";import{getFullyQualifiedFontName as n}from"../../../../core/fontUtils.js";import has from"../../../../core/has.js";import r from"../../../../core/Logger.js";import{ignoreAbortErrors as i,throwIfNotAbortError as a}from"../../../../core/promiseUtils.js";import{loadTextModule as o}from"../../../../libs/librust-text/loadTextModule.js";import{parseRichTextRuns as s}from"../../../../symbols/cim/richTextUtils.js";import{decorGlyphRect as c}from"./decorGlyphRect.js";import{sdfRadiusComplex as l,sdfBufferGlyphSDFCreator as u,sdfSizeComplex as d,sdfBufferServer as f,sdfRadiusSimple as p,sdfSizeSimple as m}from"./definitions.js";import{GlyphSDFCreator as h}from"./GlyphSDFCreator.js";import g from"./GlyphSource.js";import{hashMosaic as _}from"./hashMosaic.js";import v from"./Rect.js";import y from"./RectangleBinPack.js";const b=`arial-unicode-ms-regular`,x=/[\u0695\u0698\u06a9\u06af\u06b5\u06be\u06c6\u06cc\u06ce\u06d5\u06ca]|\p{Script=Thai}|\p{Script=Lao}|\p{Script=Tamil}|\p{Script=Khmer}/u,S=new Set([`Noto Sans Khmer`,`Noto Sans Lao`,`Noto Sans Myanmar`,`Noto Sans Thai`]),C=()=>r.getLogger(`esri.views.MapView`),w=(e,t=``)=>C().warnOnce(e,t);class T{constructor(){this._glyphSources=new Map,this._snapCoords=!0,this._currentPage=0,this._faces=new Map,this._facePromises=new Map,this._pbfRangePromises=new Map,this._glyphCache=new Map,this._pbfGlyphCache=new Map,this._invalidFonts=new Set,this._preloadCache={},this._glyphSDFCreator=new h({sdfSizePx:d,sdfBufferPx:u,radius:l,cutoff:.25})}set remoteClient(e){this._client=e.createInvokeProxy();let t=i(this._client.getOptions());this._inited=this._init(t)}async rasterizeText(e,t,n){await this._inited;let r=t.symbol?s(t):null;return r?{type:`rich-glyphs`,runs:(await Promise.all(r.map(async t=>({fontSize:t.fontSize,characterSpacing:t.characterSpacing,decoration:t.font.decoration,color:t.color,glyphs:await this._rasterizeTextRun(e,t.font,t.text,n)})))).filter(e=>e.glyphs!=null)}:this._rasterizeTextRun(e,t.font,t.textString,n)}async _rasterizeTextRun(e,t,r,i){let a=n(t),o=this._invalidFonts.has(a),s=!!has(`esri-2d-force-complex-shaping`),c=!!has(`esri-2d-complex-shaping`)&&x.test(r),l=S.has(t.family),u=s||c||l,d=o?b:a,f=await this.getGlyphItems(r,u,e,d,!1,i);return f||=(w(`Font ${a} is not available on the web, using "Arial Unicode MS Regular"`),this._invalidFonts.add(a),await this.getGlyphItems(r,u,e,b,!1,i)),f}async getGlyphItems(e,n,r,i,a,o){await this._inited;let s=this._getSource(r),c=n?d:m,h=n?l:p,g=n?u:f,_,v,y;if(has(`esri-2d-stabilize-glyphs`)&&await this.preloadASCIIGlyphCache(s,i).catch(()=>{}),n){let t=await this._getFace(s,i);if(!t)return null;let n=this._glyphCache.get(i);n||(n=new Map,this._glyphCache.set(i,n));let{shaping:r,isRTL:a}=this._shape(t,e);y=a,_=r.map(e=>this._getShapedGlyph(t,n,e)),v={baseline:t.baseline()/c,midline:t.midline()/c}}else{let n=this._pbfGlyphCache.get(i);n||(n=new Map,this._pbfGlyphCache.set(i,n));let[r,c,l]=t(e),u=k(r);try{await this._fetchRanges(s,i,u,o)}catch{return null}y=c,_=u.map(e=>this._getPBFGlyph(n,s,i,e,a)).filter(e=>!!e)}let b=_.filter(e=>e.needsRecord);return b.length>0&&await this._client.recordGlyphs(b),{type:`glyphs`,glyphs:_,faceInfo:v,isRightToLeft:y,sdfSize:c,sdfRadius:h,sdfPadding:g}}async _init(e){let t=await e;if(!t)return;let{width:n,height:r,snapCoords:i}=t;this._glyphCache=new Map,this._pbfGlyphCache=new Map,this._binPack=new y(n,r),this._snapCoords=i,this._currentPage=0,this._initDecorationGlyphs()}_getShapedGlyph(e,t,n){let r,i,a=t.get(n.glyphId);if(!a){r=this._glyphSDFCreator.draw(e,n.glyphId);let o=this._glyphSDFCreator.sdfBufferPx;a={mosaicItem:{rect:this._recordGlyph(r?.rect,o),page:this._currentPage,sdf:!0,textureBinding:_(1,this._currentPage,!0)},glyphRect:r?.rect??{width:0,height:0,top:0,left:0}},t.set(n.glyphId,a),i=!0}return{mosaicItem:a.mosaicItem,rect:a.glyphRect,shaping:{xAdvance:n.xAdvance,yAdvance:n.yAdvance,xOffset:n.xOffset,yOffset:n.yOffset},code:n.isNewline?10:n.isWhitespace?32:NaN,sdf:r,needsRecord:i}}_getPBFGlyph(e,t,n,r,i=!1){let a,o,s=e.get(r);if(!s){let c=t.getRange(n,r),l=c?.getRect(r),d=c?.getShaping(r),f=c?.getBitmap(r);if(i&&(!l||!d))return;if(!l||!d)return O(r);let p={rect:f?this._recordGlyph(l,u):new v(0,0,0,0),sdf:!0,page:this._currentPage,textureBinding:_(1,this._currentPage,!0)};a=f&&{buffer:f,rect:l},s={mosaicItem:p,rect:l,shaping:d,code:r},o=!0,e.set(r,s)}let{mosaicItem:c,rect:l,shaping:d}=s;return{mosaicItem:c,rect:l,shaping:d,code:r,sdf:a,needsRecord:o}}_shape(e,n){let r=this._glyphSDFCreator.sdfSizePx,[i,a,o]=t(n,!1),s=new Uint32Array(Array.from(i).map((e,t)=>o.levels[o.targetToSource[t]]));return{shaping:e.shape(i,s,r),isRTL:a}}async _getFace(t,n,r){if(this._faces.has(n))return this._faces.get(n);let i=t.woffURL(n);return await D(this._facePromises,n,async()=>{let t=await e(i,{responseType:`array-buffer`,...r}),a=(await o()).Face.parseWoff2(new Uint8Array(t.data));this._faces.set(n,a)}),this._faces.get(n)}_getSource(e){return this._glyphSources.has(e)||this._glyphSources.set(e,new g(e)),this._glyphSources.get(e)}async _fetchRanges(e,t,n,r){let i=E(n),a=[];i.forEach(n=>{a.push(this._fetchRange(e,t,n,r))}),await Promise.all(a)}async _fetchRange(e,t,n,r){if(n>256)return;let i=t+n;return D(this._pbfRangePromises,i,()=>e.fetchRange(t,n,r))}_allocNewPage(){this._currentPage++,this._binPack=new y(this._binPack.width,this._binPack.height),this._initDecorationGlyphs()}_recordGlyph(e,t){let n=this._binPack;if(!e||e.width===0)return new v;let r=e.width+t*2,i=e.height+t*2,a=r,o=i;if(this._snapCoords){let e=r%4?4-r%4:4,t=i%4?4-i%4:4;a+=e,o+=t}let s=n.allocate(a,o);return s.isEmpty?(this._allocNewPage(),n.allocate(a,o)):s}_initDecorationGlyphs(){this._recordGlyph(c,f),this._recordGlyph(c,f)}preloadASCIIGlyphCache(e,t){let n=this._preloadCache[t];if(n!=null)return n;let r=e.preloadASCIIRange(t).then(async()=>{let n=this._pbfGlyphCache.get(t);n||(n=new Map,this._pbfGlyphCache.set(t,n));let r=[];for(let i=0;i<256;i++){let a=this._getPBFGlyph(n,e,t,i);a?.needsRecord&&r.push(a)}await this._client.recordGlyphs(r)},e=>{throw delete this._preloadCache[t],e});return this._preloadCache[t]=r,r}}function E(e){let t=new Set;for(let n of e)t.add(Math.floor(n/256));return t}function D(e,t,n){return e.has(t)||e.set(t,n().finally(()=>{e.delete(t)}).catch(e=>{a(e)})),e.get(t)}const O=e=>({mosaicItem:{rect:new v(0,0,0,0),sdf:!0,page:0},rect:{left:0,width:0,height:0,top:0},shaping:{xAdvance:0,yAdvance:0,xOffset:0,yOffset:0},code:e});function k(e){let t=[];for(let n=0;n<e.length;n++)t.push(e.charCodeAt(n));return t}export{T as default};
2
+ import e from"../../../../request.js";import{bidiText as t}from"../../../../core/BidiText.js";import{getFullyQualifiedFontName as n}from"../../../../core/fontUtils.js";import has from"../../../../core/has.js";import r from"../../../../core/Logger.js";import{ignoreAbortErrors as i,throwIfNotAbortError as a}from"../../../../core/promiseUtils.js";import{loadTextModule as o}from"../../../../libs/librust-text/loadTextModule.js";import{parseRichTextRuns as s}from"../../../../symbols/cim/richTextUtils.js";import{decorGlyphRect as c}from"./decorGlyphRect.js";import{sdfRadiusComplex as l,sdfBufferGlyphSDFCreator as u,sdfSizeComplex as d,sdfBufferServer as f,sdfRadiusSimple as p,sdfSizeSimple as m}from"./definitions.js";import{GlyphSDFCreator as h}from"./GlyphSDFCreator.js";import g from"./GlyphSource.js";import{hashMosaic as _}from"./hashMosaic.js";import v from"./Rect.js";import y from"./RectangleBinPack.js";const b=`arial-unicode-ms-regular`,x=/[\u0695\u0698\u06a9\u06af\u06b5\u06be\u06c6\u06cc\u06ce\u06d5\u06ca]|\p{Script=Thai}|\p{Script=Lao}|\p{Script=Tamil}|\p{Script=Khmer}/u,S=new Set([`Noto Sans Khmer`,`Noto Sans Lao`,`Noto Sans Myanmar`,`Noto Sans Thai`]),C=()=>r.getLogger(`esri.views.MapView`),w=(e,t=``)=>C().warnOnce(e,t);class T{constructor(){this._glyphSources=new Map,this._snapCoords=!0,this._currentPage=0,this._faces=new Map,this._facePromises=new Map,this._pbfRangePromises=new Map,this._glyphCache=new Map,this._pbfGlyphCache=new Map,this._invalidFonts=new Set,this._preloadCache={},this._glyphSDFCreator=new h({sdfSizePx:d,sdfBufferPx:u,radius:l,cutoff:.25})}set remoteClient(e){this._client=e.createInvokeProxy();let t=i(this._client.getOptions());this._inited=this._init(t)}async rasterizeText(e,t,n){await this._inited;let r=t.symbol?s(t):null;return r?{type:`rich-glyphs`,runs:(await Promise.all(r.map(async t=>({fontSize:t.fontSize,characterSpacing:t.characterSpacing,decoration:t.font.decoration,color:t.color,glyphs:await this._rasterizeTextRun(e,t.font,t.text,n)})))).filter(e=>e.glyphs!=null)}:this._rasterizeTextRun(e,t.font,t.textString,n)}async _rasterizeTextRun(e,t,r,i){let a=n(t),o=this._invalidFonts.has(a),s=!!has(`esri-2d-force-complex-shaping`),c=!!has(`esri-2d-complex-shaping`)&&x.test(r),l=S.has(t.family),u=s||c||l,d=o?b:a,f=await this.getGlyphItems(r,u,e,d,!1,i);return f||=(w(`Font ${a} is not available on the web, using "Arial Unicode MS Regular"`),this._invalidFonts.add(a),await this.getGlyphItems(r,u,e,b,!1,i)),f}async getGlyphItems(e,n,r,i,a,o){await this._inited;let s=this._getSource(r),c=n?d:m,h=n?l:p,g=n?u:f,_,v,y;if(has(`esri-2d-stabilize-glyphs`)&&await this.preloadASCIIGlyphCache(s,i).catch(()=>{}),n){let t=await this._getFace(s,i);if(!t)return null;let n=this._glyphCache.get(i);n||(n=new Map,this._glyphCache.set(i,n));let{shaping:r,isRTL:a}=this._shape(t,e);y=a,_=r.map(e=>this._getShapedGlyph(t,n,e)),v={baseline:t.baseline()/c,midline:t.midline()/c}}else{let n=this._pbfGlyphCache.get(i);n||(n=new Map,this._pbfGlyphCache.set(i,n));let[r,c,l]=t(e),u=k(r);try{await this._fetchRanges(s,i,u,o)}catch{return null}y=c,_=u.map(e=>this._getPBFGlyph(n,s,i,e,a)).filter(e=>!!e)}let b=_.filter(e=>e.needsRecord);return b.length>0&&await this._client.recordGlyphs(b),{type:`glyphs`,glyphs:_,faceInfo:v,isRightToLeft:y,sdfSize:c,sdfRadius:h,sdfPadding:g}}async _init(e){let t=await e;if(!t)return;let{width:n,height:r,snapCoords:i}=t;this._glyphCache=new Map,this._pbfGlyphCache=new Map,this._binPack=new y(n,r),this._snapCoords=i,this._currentPage=0,this._initDecorationGlyphs()}_getShapedGlyph(e,t,n){let r,i,a=t.get(n.glyphId);if(!a){r=this._glyphSDFCreator.draw(e,n.glyphId);let o=this._glyphSDFCreator.sdfBufferPx;a={mosaicItem:{rect:this._recordGlyph(r?.rect,o),page:this._currentPage,sdf:!0,textureBinding:_(1,this._currentPage,!0)},glyphRect:r?.rect??{width:0,height:0,top:0,left:0}},t.set(n.glyphId,a),i=!0}return{mosaicItem:a.mosaicItem,rect:a.glyphRect,shaping:{xAdvance:n.xAdvance,yAdvance:n.yAdvance,xOffset:n.xOffset,yOffset:n.yOffset},code:n.isNewline?10:n.isWhitespace?32:NaN,sdf:r,needsRecord:i}}_getPBFGlyph(e,t,n,r,i=!1){let a,o,s=e.get(r);if(!s){let c=t.getRange(n,r),l=c?.getRect(r),d=c?.getShaping(r),f=c?.getBitmap(r);if(i&&(!l||!d))return;if(!l||!d)return O(r);let p={rect:f?this._recordGlyph(l,u):new v(0,0,0,0),sdf:!0,page:this._currentPage,textureBinding:_(1,this._currentPage,!0)};a=f&&{buffer:f,rect:l},s={mosaicItem:p,rect:l,shaping:d,code:r},o=!0,e.set(r,s)}let{mosaicItem:c,rect:l,shaping:d}=s;return{mosaicItem:c,rect:l,shaping:d,code:r,sdf:a,needsRecord:o}}_shape(e,n){let r=this._glyphSDFCreator.sdfSizePx,[i,a,o]=t(n,!1),s=new Uint32Array(Array.from(i).map((e,t)=>o.levels[o.targetToSource[t]]));return{shaping:e.shape(i,s,r),isRTL:a}}async _getFace(t,n,r){if(this._faces.has(n))return this._faces.get(n);let i=t.woffURL(n);return await D(this._facePromises,n,async()=>{let t=await e(i,{responseType:`array-buffer`,...r}),a=(await o()).Face.parseWoff2(new Uint8Array(t.data));this._faces.set(n,a)}),this._faces.get(n)}_getSource(e){return this._glyphSources.has(e)||this._glyphSources.set(e,new g(e)),this._glyphSources.get(e)}async _fetchRanges(e,t,n,r){let i=E(n),a=[];i.forEach(n=>{a.push(this._fetchRange(e,t,n,r))}),await Promise.all(a)}async _fetchRange(e,t,n,r){if(n>256)return;let i=t+n;return D(this._pbfRangePromises,i,()=>e.fetchRange(t,n,r))}_allocNewPage(){this._currentPage++,this._binPack=new y(this._binPack.width,this._binPack.height),this._initDecorationGlyphs()}_recordGlyph(e,t){let n=this._binPack;if(!e||e.width===0)return new v;let r=e.width+t*2,i=e.height+t*2,a=r,o=i;if(this._snapCoords){let e=r%4?4-r%4:4,t=i%4?4-i%4:4;a+=e,o+=t}let s=n.allocate(a,o);return s.isEmpty?(this._allocNewPage(),n.allocate(a,o)):s}_initDecorationGlyphs(){this._recordGlyph(c,f),this._recordGlyph(c,f)}preloadASCIIGlyphCache(e,t){let n=this._preloadCache[t];if(n!=null)return n;let r=e.preloadASCIIRange(t).then(async()=>{let n=this._pbfGlyphCache.get(t);n||(n=new Map,this._pbfGlyphCache.set(t,n));let r=[];for(let i=0;i<256;i++){let a=this._getPBFGlyph(n,e,t,i);a?.needsRecord&&r.push(a)}await this._client.recordGlyphs(r)},e=>{throw delete this._preloadCache[t],e});return this._preloadCache[t]=r,r}}function E(e){let t=new Set;for(let n of e)t.add(Math.floor(n/256));return t}function D(e,t,n){return e.has(t)||e.set(t,n().finally(()=>{e.delete(t)}).catch(e=>{a(e)})),e.get(t)}const O=e=>({mosaicItem:{rect:new v(0,0,0,0),sdf:!0,page:0,textureBinding:_(1,0,!0)},rect:{left:0,width:0,height:0,top:0},shaping:{xAdvance:0,yAdvance:0,xOffset:0,yOffset:0},code:e,needsRecord:!0});function k(e){let t=[];for(let n=0;n<e.length;n++)t.push(e.charCodeAt(n));return t}export{T as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../../config.js";import has from"../../../../core/has.js";import{destroyMaybe as t}from"../../../../core/maybe.js";import{notDeepEqual as n}from"../../../../core/object.js";import{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{openWithPorts as s}from"../../../../core/workers/workers.js";import{normalizeTransform as c,quantizeX as l,quantizeY as u}from"../../../../geometry/support/quantizationUtils.js";import{checkProjectionSupport as d}from"../../../../layers/graphics/data/projectionSupport.js";import{MultiTileMeshData as f}from"../../engine/webgl/mesh/MultiTileMeshData.js";import{FeatureMeshFactory as p}from"../../engine/webgl/mesh/factories/FeatureMeshFactory.js";import{ResourceProxy as m}from"../../engine/webgl/mesh/factories/ResourceProxy.js";import{MeshWriterRegistry as h}from"../../engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{MatcherContext as g}from"../../engine/webgl/util/MatcherContext.js";import{createAggregateStrategy as _}from"./processor/createAggregateStrategy.js";import{AttributeStore as v}from"./support/AttributeStore.js";import{ComputedAttributeStorage as y}from"./support/ComputedAttributeStorage.js";class b{constructor(t,n){this._connection=t,this._source=n,this._version=1,this._registry=new h;let r={fetch:(e,t)=>this._connection.layerView.fetch(e,t),fetchDictionary:(e,t)=>this._connection.layerView.fetchDictionary(e,t),fetchMesh:(e,t)=>this._connection.layerView.fetchMesh(e,t)},i={fetchGlyphs:async(t,n)=>{let r=[];if(await this._loaded,this._glyphProxy){let i=`${e.fontsUrl}/{fontstack}/{range}.pbf`;for(let e of t)r.push(this._glyphProxy.rasterizeText(i,e,n))}else console.error(`Failed to fetch glyphs from worker: proxy not created`);return Promise.all(r)}};this._proxy=new m(r,i),this._attributeStore=new v({isLocal:!1,update:e=>o(this._connection.container.updateAttributeView(e))}),this._loaded=this._load(t)}destroy(){this._proxy.destroy(),this._strategy?.destroy(),this._attributeStore.destroy(),this._loaded.finally(()=>{this._glyphClient?.close(),this._glyphClient=null,this._glyphPorts?.forEach(e=>e.close())})}get hasClusters(){return this._schema?.mesh.strategy.type===`cluster`}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){return this._strategy?this._strategy.getDisplayIds(e):{}}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}async update(e,t,r,i,o){let s=e.processor,c=n(this._schema?.storage,s.storage),l=n(this._schema?.mesh.properties,s.mesh.properties),u=n(this._schema?.mesh.factory,s.mesh.factory),f=n(this._schema?.mesh.strategy,s.mesh.strategy),m=x(this._schema?.expressionProperties,s.expressionProperties),h=m.some(e=>this._attributeStore.hasArcadeDependency(e)),_=m.some(e=>this._factory?.hasArcadeDependency(e)??!1),v=m.some(e=>this._strategy?.hasArcadeDependency(e))||this._strategy?.isAggregate&&h,b=_||v,C=_||h||v,w=l||u||f;if(!(c||w||C)&&!i)return!1;if(has(`esri-2d-update-debug`)&&console.debug(`Version[${this._version}] SymbolProcessor.update`,{changes:a(this._schema,s),schema:s}),this._schema=s,s.mesh.factory.symbology.type===`annotation-feature`||s.mesh.factory.symbology.type===`dimension-feature`){let e=this._source.metadata.outSpatialReference,t=this._source.metadata.attributeSpatialReference??this._source.metadata.spatialReference??e;await d(t,e)}let T=new y({fields:this._source.metadata.fieldsIndex,spatialReference:this._source.metadata.outSpatialReference}),E={currentUser:s.mesh.properties.currentUser};if((c||w||h)&&(await this._attributeStore.update(s.storage,T,this._source.metadata,t),this._strategy?.invalidateAttributeData(S(s))),!i&&!w&&!b)return!1;(f||l||b)&&await this._updateStrategy(s.mesh.strategy,o,S(s),E),this._updateSortKey(T,`sortKey`in s.mesh.properties?s.mesh.properties.sortKey:null);let D=s.mesh.factory.symbology.type===`dictionary`?s.mesh.factory.symbology.fieldMap:null,O=new g(T,this._proxy,r,this._registry,D);return(u||s.mesh.factory.symbology.type===`dictionary`)&&(this._factory=await p.create(O,s.mesh.factory)),this._version=t,!0}async applyOverrideUpdate(e,t){if(this._strategy)try{let n=await this._strategy.applyOverrideUpdate(e);n&&await this._process(n,t)}catch{}}async updateChunks(e,t,n){await this._doUpdateChunks(e,t,n),this._strategy?.afterUpdateChunks()}async removeChunks(e){this._strategy?.removeChunks(e),this._attributeStore.incrementDisplayIdGeneration()}invalidate(){this._strategy&&this._strategy.invalidate()}async _load(e){this._glyphPorts=await e.layerView.openGlyphPorts(),this._glyphClient=await s(this._glyphPorts,{maxNumberOfConcurrentJobs:20}),this._glyphProxy=this._glyphClient.createInvokeProxy()}async _doUpdateChunks(e,t,n){if(this._strategy){try{let r=await this._strategy.updateChunks(e,t);r&&await this._process(r,n)}catch{}has(`esri-2d-update-debug`)&&console.log(`SendUpdates`),this._attributeStore.sendUpdates(),has(`esri-2d-update-debug`)&&console.log(`SendUpdates.await`)}}async _updateStrategy(e,t,n,r){this._strategy?.destroy(),this._strategy=await _(this._connection,e,this._source,this._attributeStore,n,r);for(let e of t)this._strategy.onSubscribe(e)}async _updateSortKey(e,n){if(this._sortInfo=t(this._sortInfo?.computed),n!=null){let t=n.byRenderer?null:await e.createComputedField(n);this._sortInfo={...n,computed:t}}}async _process(e,t){switch(e.type){case`level-replace`:return this._processLevelBatch(e,t);case`append`:case`update`:return this._processStandardBatch(e,t)}}async _processLevelBatch(e,t){let n=await this._connection.container.beginLevelMeshUpdate(e.level);await this._processBatchMessages(e.messages,t),await this._connection.container.applyLevelMeshUpdate(n)}async _processStandardBatch(e,t){return this._processBatchMessages(e.messages,t)}async _processBatchMessages(e,t){for(let n of e){let e=n.subscription;if(has(`esri-2d-update-debug`)){let t=e.tile;console.debug(`Version[${this._version}] Tile[${t.key.id}, end=${n.end}] Processor._process`)}let i={currentUser:this._schema?.mesh.properties.currentUser};await this._fetchResources(n,i),r(e.signal);let a=await this._write(n,e.tile.createArcadeEvaluationOptions(S(this._schema)),i,t),o=e.tile.tileInfoView.getLODInfoAt(e.tile.key);r(e.signal);let{message:s,transferList:c}=a.serialize(o),l={objectIdMap:null,inner:n.createMessage(s,this._version,this._attributeStore.epoch)};if(this._schema?.mesh.properties.returnMeshObjectId){l.objectIdMap={};let e=n.reader?.getCursor();if(e)for(;e.next();)l.objectIdMap[e.getDisplayId()]=e.getObjectId()}if(r(e.signal),await this._connection.container.onMessage(l,{signal:e.signal,transferList:c}),this._attributeStore.sendUpdates(),has(`esri-2d-update-debug`)){let t=e.tile;console.debug(`Version[${this._version}] Tile[${t.key.id}, end=${n.end}] Processor._process.await`)}}}async _fetchResources(e,t){await this._loaded,await this._fetchMatcherResources(e),await this._fetchWriterResources(e,t)}async _fetchMatcherResources(e){if(!e.reader)return;let t=e.subscription.tile.createArcadeEvaluationOptions(S(this._schema));return this._factory.enqueueMatcherRequests(this._proxy,e.reader,{scale:t.$view.scale,viewingMode:`2d`},e.id)}async _fetchWriterResources(e,t){if(!e.reader)return;let n=e.reader.getCursor(),r=e.subscription.tile.createArcadeEvaluationOptions(S(this._schema));for(;n.next();)this._factory.enqueueWriterRequests(this._proxy,n,r,t,e.id);await this._proxy.fetchEnqueuedResources()}async _write(e,t,n,a){let o=e.subscription.tile,s=e.reader?.getCursor(),c=s?.getSize()??0,l=o.tileInfoView.tileInfo.isWrappable,u=o.tileInfoView.spatialReference.isWGS84,d=this._schema?.mesh.factory.referenceScale,p=new f(o.key,l,u,c);if(!s)return p;let m=C(o.transform,a),h=o.createArcadeEvaluationOptions(S(this._schema)),g=0;for(;s.next();){++g%1e3||(await i(0),r(e.subscription));let a=this._getSortKeyValue(s,t);p.entityStart(s.getDisplayId(),a);try{this._factory.write(p,this._proxy,s,h,n,o.level,m,d)}catch{}p.entityEnd()}return p}_getSortKeyValue(e,t){if(!this._sortInfo)return 0;let{computed:n,order:r,byRenderer:i}=this._sortInfo,a=i?this._factory.getSortKey(e,t):n?.read(e,t);return a==null||isNaN(a)?0:a*(r===`asc`?-1:1)}}function x(e,t){let n=[];return(e?.timeExtent?.start!==t.timeExtent?.start||e?.timeExtent?.end!==t.timeExtent?.end)&&n.push(`timeProperties`),n}function S(e){let{timeZone:t}=e?.mesh.properties??{},{timeExtent:n}=e?.expressionProperties??{};return{timeZone:t,timeExtent:n}}function C(e,t){let n=c(e),r=[];for(let e of t.rings){let t=[];for(let r of e)t.push([l(n,r[0]),u(n,r[1])]);r.push(t)}return{rings:r}}export{b as default};
2
+ import e from"../../../../config.js";import has from"../../../../core/has.js";import{destroyMaybe as t}from"../../../../core/maybe.js";import{notDeepEqual as n}from"../../../../core/object.js";import{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{openWithPorts as s}from"../../../../core/workers/workers.js";import{normalizeTransform as c,quantizeX as l,quantizeY as u}from"../../../../geometry/support/quantizationUtils.js";import{checkProjectionSupport as d}from"../../../../layers/graphics/data/projectionSupport.js";import{MultiTileMeshData as f}from"../../engine/webgl/mesh/MultiTileMeshData.js";import{FeatureMeshFactory as p}from"../../engine/webgl/mesh/factories/FeatureMeshFactory.js";import{ResourceProxy as m}from"../../engine/webgl/mesh/factories/ResourceProxy.js";import{MeshWriterRegistry as h}from"../../engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{MatcherContext as g}from"../../engine/webgl/util/MatcherContext.js";import{createAggregateStrategy as _}from"./processor/createAggregateStrategy.js";import{AttributeStore as v}from"./support/AttributeStore.js";import{ComputedAttributeStorage as y}from"./support/ComputedAttributeStorage.js";class b{constructor(t,n){this._connection=t,this._source=n,this._version=1,this._registry=new h;let r={fetch:(e,t)=>this._connection.layerView.fetch(e,t),fetchDictionary:(e,t)=>this._connection.layerView.fetchDictionary(e,t),fetchMesh:(e,t)=>this._connection.layerView.fetchMesh(e,t)},i={fetchGlyphs:async(t,n)=>{let r=[];if(await this._loaded,this._glyphProxy){let i=`${e.fontsUrl}/{fontstack}/{range}.pbf`;for(let e of t)r.push(this._glyphProxy.rasterizeText(i,e,n))}else console.error(`Failed to fetch glyphs from worker: proxy not created`);return Promise.all(r)}};this._proxy=new m(r,i),this._attributeStore=new v({isLocal:!1,update:e=>o(this._connection.container.updateAttributeView(e))}),this._loaded=this._load(t)}destroy(){this._proxy.destroy(),this._strategy?.destroy(),this._attributeStore.destroy(),this._loaded.finally(()=>{this._glyphClient?.close(),this._glyphClient=null,this._glyphPorts?.forEach(e=>e.close())})}get hasClusters(){return this._schema?.mesh.strategy.type===`cluster`}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){return this._strategy?this._strategy.getDisplayIds(e):{}}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}async update(e,t,r,i,o){let s=e.processor,c=n(this._schema?.storage,s.storage),l=n(this._schema?.mesh.properties,s.mesh.properties),u=n(this._schema?.mesh.factory,s.mesh.factory),f=n(this._schema?.mesh.strategy,s.mesh.strategy),m=this._schema?.mesh.properties.timeZone!==s.mesh.properties.timeZone,h=this._schema?.mesh.properties.currentUser!==s.mesh.properties.currentUser,_=x(this._schema?.expressionProperties,s.expressionProperties),v=_.some(e=>this._attributeStore.hasArcadeDependency(e)),b=_.some(e=>this._factory?.hasArcadeDependency(e)??!1),C=_.some(e=>this._strategy?.hasArcadeDependency(e))||this._strategy?.isAggregate&&v,w=b||C,T=b||v||C,E=l||u||f;if(!(c||E||T)&&!i)return!1;if(has(`esri-2d-update-debug`)&&console.debug(`Version[${this._version}] SymbolProcessor.update`,{changes:a(this._schema,s),schema:s}),this._schema=s,s.mesh.factory.symbology.type===`annotation-feature`||s.mesh.factory.symbology.type===`dimension-feature`){let e=this._source.metadata.outSpatialReference,t=this._source.metadata.attributeSpatialReference??this._source.metadata.spatialReference??e;await d(t,e)}let D=new y({fields:this._source.metadata.fieldsIndex,spatialReference:this._source.metadata.outSpatialReference}),O={currentUser:s.mesh.properties.currentUser};if((c||E||v)&&(await this._attributeStore.update(s.storage,D,this._source.metadata,t,{dependencies:_,timeZoneChanged:m,currentUserChanged:h}),this._strategy?.invalidateAttributeData(S(s))),!i&&!E&&!w)return!1;(f||l||w)&&await this._updateStrategy(s.mesh.strategy,o,S(s),O),this._updateSortKey(D,`sortKey`in s.mesh.properties?s.mesh.properties.sortKey:null);let k=s.mesh.factory.symbology.type===`dictionary`?s.mesh.factory.symbology.fieldMap:null,A=new g(D,this._proxy,r,this._registry,k);return(u||s.mesh.factory.symbology.type===`dictionary`)&&(this._factory=await p.create(A,s.mesh.factory)),this._version=t,!0}async applyOverrideUpdate(e,t){if(this._strategy)try{let n=await this._strategy.applyOverrideUpdate(e);n&&await this._process(n,t)}catch{}}async updateChunks(e,t,n){await this._doUpdateChunks(e,t,n),this._strategy?.afterUpdateChunks()}async removeChunks(e){this._strategy?.removeChunks(e),this._attributeStore.incrementDisplayIdGeneration()}invalidate(){this._strategy&&this._strategy.invalidate()}async _load(e){this._glyphPorts=await e.layerView.openGlyphPorts(),this._glyphClient=await s(this._glyphPorts,{maxNumberOfConcurrentJobs:20}),this._glyphProxy=this._glyphClient.createInvokeProxy()}async _doUpdateChunks(e,t,n){if(this._strategy){try{let r=await this._strategy.updateChunks(e,t);r&&await this._process(r,n)}catch{}has(`esri-2d-update-debug`)&&console.log(`SendUpdates`),this._attributeStore.sendUpdates(),has(`esri-2d-update-debug`)&&console.log(`SendUpdates.await`)}}async _updateStrategy(e,t,n,r){this._strategy?.destroy(),this._strategy=await _(this._connection,e,this._source,this._attributeStore,n,r);for(let e of t)this._strategy.onSubscribe(e)}async _updateSortKey(e,n){if(this._sortInfo=t(this._sortInfo?.computed),n!=null){let t=n.byRenderer?null:await e.createComputedField(n);this._sortInfo={...n,computed:t}}}async _process(e,t){switch(e.type){case`level-replace`:return this._processLevelBatch(e,t);case`append`:case`update`:return this._processStandardBatch(e,t)}}async _processLevelBatch(e,t){let n=await this._connection.container.beginLevelMeshUpdate(e.level);await this._processBatchMessages(e.messages,t),await this._connection.container.applyLevelMeshUpdate(n)}async _processStandardBatch(e,t){return this._processBatchMessages(e.messages,t)}async _processBatchMessages(e,t){for(let n of e){let e=n.subscription;if(has(`esri-2d-update-debug`)){let t=e.tile;console.debug(`Version[${this._version}] Tile[${t.key.id}, end=${n.end}] Processor._process`)}let i={currentUser:this._schema?.mesh.properties.currentUser};await this._fetchResources(n,i),r(e.signal);let a=await this._write(n,e.tile.createArcadeEvaluationOptions(S(this._schema)),i,t),o=e.tile.tileInfoView.getLODInfoAt(e.tile.key);r(e.signal);let{message:s,transferList:c}=a.serialize(o),l={objectIdMap:null,inner:n.createMessage(s,this._version,this._attributeStore.epoch)};if(this._schema?.mesh.properties.returnMeshObjectId){l.objectIdMap={};let e=n.reader?.getCursor();if(e)for(;e.next();)l.objectIdMap[e.getDisplayId()]=e.getObjectId()}if(r(e.signal),await this._connection.container.onMessage(l,{signal:e.signal,transferList:c}),this._attributeStore.sendUpdates(),has(`esri-2d-update-debug`)){let t=e.tile;console.debug(`Version[${this._version}] Tile[${t.key.id}, end=${n.end}] Processor._process.await`)}}}async _fetchResources(e,t){await this._loaded,await this._fetchMatcherResources(e),await this._fetchWriterResources(e,t)}async _fetchMatcherResources(e){if(!e.reader)return;let t=e.subscription.tile.createArcadeEvaluationOptions(S(this._schema));return this._factory.enqueueMatcherRequests(this._proxy,e.reader,{scale:t.$view.scale,viewingMode:`2d`},e.id)}async _fetchWriterResources(e,t){if(!e.reader)return;let n=e.reader.getCursor(),r=e.subscription.tile.createArcadeEvaluationOptions(S(this._schema));for(;n.next();)this._factory.enqueueWriterRequests(this._proxy,n,r,t,e.id);await this._proxy.fetchEnqueuedResources()}async _write(e,t,n,a){let o=e.subscription.tile,s=e.reader?.getCursor(),c=s?.getSize()??0,l=o.tileInfoView.tileInfo.isWrappable,u=o.tileInfoView.spatialReference.isWGS84,d=this._schema?.mesh.factory.referenceScale,p=new f(o.key,l,u,c);if(!s)return p;let m=C(o.transform,a),h=o.createArcadeEvaluationOptions(S(this._schema)),g=0;for(;s.next();){++g%1e3||(await i(0),r(e.subscription));let a=this._getSortKeyValue(s,t);p.entityStart(s.getDisplayId(),a);try{this._factory.write(p,this._proxy,s,h,n,o.level,m,d)}catch{}p.entityEnd()}return p}_getSortKeyValue(e,t){if(!this._sortInfo)return 0;let{computed:n,order:r,byRenderer:i}=this._sortInfo,a=i?this._factory.getSortKey(e,t):n?.read(e,t);return a==null||isNaN(a)?0:a*(r===`asc`?-1:1)}}function x(e,t){let n=[];return(e?.timeExtent?.start!==t.timeExtent?.start||e?.timeExtent?.end!==t.timeExtent?.end)&&n.push(`timeProperties`),n}function S(e){let{timeZone:t}=e?.mesh.properties??{},{timeExtent:n}=e?.expressionProperties??{};return{timeZone:t,timeExtent:n}}function C(e,t){let n=c(e),r=[];for(let e of t.rings){let t=[];for(let r of e)t.push([l(n,r[0]),u(n,r[1])]);r.push(t)}return{rings:r}}export{b as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{getOrCreateMapValue as e}from"../../../../../core/MapUtils.js";import{GeohashCell as t}from"../../../../../geohash/GeohashCell.js";import{GeohashTree as n}from"../../../../../geohash/GeohashTree.js";import{getGeohash as r,getGeohashBounds as i}from"../../../../../geohash/geohashUtils.js";import{AAggregateSpatialIndex as a}from"./AAggregateSpatialIndex.js";import{createArcadeEvaluationOptions as o}from"../support/arcadeUtils.js";class s extends a{constructor(e,t){super(e),this._reader=t,this._tree=new n,this.insert(this._reader)}get usedMemory(){return this._tree.usedMemory}forEachInCell(e,t){throw Error(`Not supported.`)}insert(e){let t=e.getCursor(),{featureFilter:n,sqlOptions:i,geohashLevel:a,spatialReference:o}=this.options.inner;for(;t.next();){let e=t;if(n!==null&&!n.check(e,i))continue;let s=0,c=0;if(e.geometryType===`esriGeometryPoint`)s=e.readXWorldSpace(),c=e.readYWorldSpace();else{let t=e.readCentroidWorldSpace();if(t==null)continue;[s,c]=t.coords}let l=r(s,c,a,o);l&&this._tree.insert(e,l[0],l[1],a)}}put(e,t){throw Error(`Not supported.`)}putBounded(n,r,a,s){let{arcadeContextInfo:c,scale:l,geohashLevel:u,spatialReference:d,fields:f}=this.options.inner,p=o(l,c),m=i(a,s,u,d);m!=null&&this._tree.forEachInBounds(m,i=>{let a=null;for(let o of i.indices){this._reader.setIndex(o);let s=this._reader.getObjectId();r.has(s)||(a??=e(n,i.id,()=>t.create(f,i.xNode,i.yNode,i.depth)),a.insert(this._reader,u,d,p),r.add(s))}})}}export{s as GeohashSpatialIndex};
2
+ import{getOrCreateMapValue as e}from"../../../../../core/MapUtils.js";import{GeohashCell as t}from"../../../../../geohash/GeohashCell.js";import{GeohashTree as n}from"../../../../../geohash/GeohashTree.js";import{getGeohashBounds as r,getGeohash as i}from"../../../../../geohash/geohashUtils.js";import{AAggregateSpatialIndex as a}from"./AAggregateSpatialIndex.js";import{createArcadeEvaluationOptions as o}from"../support/arcadeUtils.js";class s extends a{constructor(e,t){super(e),this._reader=t,this._tree=new n,this._insert(this._reader)}get usedMemory(){return this._tree.usedMemory}putBounded(n,i,a,s){let{arcadeContextInfo:c,scale:l,geohashLevel:u,spatialReference:d,fields:f}=this.options.inner,p=o(l,c),m=r(a,s,u,d);m!=null&&this._tree.forEachInBounds(m,r=>{let a=null;for(let o of r.indices){this._reader.setIndex(o);let s=this._reader.getObjectId();i.has(s)||(a??=e(n,r.id,()=>t.create(f,r.xNode,r.yNode,r.depth)),a.insert(this._reader,u,d,p),i.add(s))}})}_insert(e){let{featureFilter:t,sqlOptions:n,geohashLevel:r,spatialReference:a}=this.options.inner,o=e=>{let t=0,n=0;if(e.geometryType===`esriGeometryPoint`)t=e.readXWorldSpace(),n=e.readYWorldSpace();else{let r=e.readCentroidWorldSpace();if(r==null)return;[t,n]=r.coords}let o=i(t,n,r,a);o&&this._tree.insert(e,o[0],o[1],r)};if(t!==null)t.forEachMatch(e,n,o);else{let t=e.getCursor();for(;t.next();)o(t)}}}export{s as GeohashSpatialIndex};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{getOrCreateMapValue as e}from"../../../../../core/MapUtils.js";import{getMetersPerUnitForSR as t,inchesPerMeter as n}from"../../../../../core/units.js";import{AAggregateSpatialIndex as r}from"./AAggregateSpatialIndex.js";import{GridCell as i}from"./GridCell.js";import{GridIndexCell as a}from"./GridIndexCell.js";import{createArcadeEvaluationOptions as o}from"../support/arcadeUtils.js";function s(e,r){return t(e)*n*96/r}class c extends r{constructor(e,t){super(e),this._reader=t,this._cells=new Map,this._pixelsPerMapUnit=s(e.inner.spatialReference,e.inner.scale),this.insert(this._reader)}get worldUnitsPerCell(){return this.options.inner.cellSize*1/this._pixelsPerMapUnit}insert(e){let t=e.getCursor();for(;t.next();){let e=t,{featureFilter:n,sqlOptions:r,cellSize:i}=this.options.inner;if(n!==null&&!n.check(e,r))continue;let a=0,o=0;if(e.geometryType===`esriGeometryPoint`)a=e.readXWorldSpace(),o=e.readYWorldSpace();else{let t=e.readCentroidWorldSpace();if(t==null)continue;[a,o]=t.coords}let s=a*this._pixelsPerMapUnit,c=o*this._pixelsPerMapUnit,l=Math.floor(s/i),u=Math.floor(c/i);this._getCellOrCreate(l,u).push(t.getIndex())}}get usedMemory(){return 0}forEachInCell(e,t){let n=this._cells.get(e);if(n)for(let e of n._indices)this._reader.setIndex(e),t(this._reader)}put(t,n){let{arcadeContextInfo:r,scale:a,fields:s}=this.options.inner,c=o(a,r);this._cells.forEach(r=>{let a=null;for(let o of r._indices){this._reader.setIndex(o);let l=this._reader.getObjectId();n.has(l)||(a??=e(t,r.id,()=>i.create(r.gridX,r.gridY,s,this.worldUnitsPerCell)),a.insert(this._reader,c),n.add(l))}})}putBounded(t,n,r,a){let{arcadeContextInfo:s,scale:c,cellSize:l,fields:u}=this.options.inner,d=o(c,s),[f,p,m,h]=[r.xmin,r.ymin,r.xmax,r.ymax],g=Math.floor(f*this._pixelsPerMapUnit/l),_=Math.floor(p*this._pixelsPerMapUnit/l),v=Math.ceil(m*this._pixelsPerMapUnit/l),y=Math.ceil(h*this._pixelsPerMapUnit/l);for(let r=_;r<=y;r++)for(let a=g;a<=v;a++){let o=i.createId(a,r),s=this._cells.get(o);if(!s)continue;let c=null;for(let o of s._indices){this._reader.setIndex(o);let l=this._reader.getObjectId();n.has(l)||(c??=e(t,s.id,()=>i.create(a,r,u,this.worldUnitsPerCell)),c.insert(this._reader,d),n.add(l))}}}_getCellOrCreate(e,t){let n=a.createId(e,t),r=this._cells.get(n);return r||(r=new a(e,t),this._cells.set(n,r)),r}}export{c as GridSpatialIndex,s as pixelsPerMapUnit};
2
+ import{getOrCreateMapValue as e}from"../../../../../core/MapUtils.js";import{getMetersPerUnitForSR as t,inchesPerMeter as n}from"../../../../../core/units.js";import{AAggregateSpatialIndex as r}from"./AAggregateSpatialIndex.js";import{GridCell as i}from"./GridCell.js";import{GridIndexCell as a}from"./GridIndexCell.js";import{createArcadeEvaluationOptions as o}from"../support/arcadeUtils.js";function s(e,r){return t(e)*n*96/r}class c extends r{constructor(e,t){super(e),this._reader=t,this._cells=new Map,this._pixelsPerMapUnit=s(e.inner.spatialReference,e.inner.scale),this._insert(this._reader)}get _worldUnitsPerCell(){return this.options.inner.cellSize*1/this._pixelsPerMapUnit}get usedMemory(){return 0}put(t,n){let{arcadeContextInfo:r,scale:a,fields:s}=this.options.inner,c=o(a,r);this._cells.forEach(r=>{let a=null;for(let o of r._indices){this._reader.setIndex(o);let l=this._reader.getObjectId();n.has(l)||(a??=e(t,r.id,()=>i.create(r.gridX,r.gridY,s,this._worldUnitsPerCell)),a.insert(this._reader,c),n.add(l))}})}putBounded(t,n,r,a){let{arcadeContextInfo:s,scale:c,cellSize:l,fields:u}=this.options.inner,d=o(c,s),[f,p,m,h]=[r.xmin,r.ymin,r.xmax,r.ymax],g=Math.floor(f*this._pixelsPerMapUnit/l),_=Math.floor(p*this._pixelsPerMapUnit/l),v=Math.ceil(m*this._pixelsPerMapUnit/l),y=Math.ceil(h*this._pixelsPerMapUnit/l);for(let r=_;r<=y;r++)for(let a=g;a<=v;a++){let o=i.createId(a,r),s=this._cells.get(o);if(!s)continue;let c=null;for(let o of s._indices){this._reader.setIndex(o);let l=this._reader.getObjectId();n.has(l)||(c??=e(t,s.id,()=>i.create(a,r,u,this._worldUnitsPerCell)),c.insert(this._reader,d),n.add(l))}}}_insert(e){let{featureFilter:t,sqlOptions:n,cellSize:r}=this.options.inner,i=e=>{let t=0,n=0;if(e.geometryType===`esriGeometryPoint`)t=e.readXWorldSpace(),n=e.readYWorldSpace();else{let r=e.readCentroidWorldSpace();if(r==null)return;[t,n]=r.coords}let i=t*this._pixelsPerMapUnit,a=n*this._pixelsPerMapUnit,o=Math.floor(i/r),s=Math.floor(a/r);this._getCellOrCreate(o,s).push(e.getIndex())};if(t!==null)t.forEachMatch(e,n,i);else{let t=e.getCursor();for(;t.next();)i(t)}}_getCellOrCreate(e,t){let n=a.createId(e,t),r=this._cells.get(n);return r||(r=new a(e,t),this._cells.set(n,r)),r}}export{c as GridSpatialIndex,s as pixelsPerMapUnit};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as t}from"../../../../../layers/support/arcgisLayerUrl.js";import{getServiceGeometryType as n}from"./geometryUtils.js";import{createLabelVVEvaluator as r}from"./labelingUtils.js";import{ExceedsLimitCache as i}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as a}from"../schema/SourceSchema.js";import{createServiceTimeSchema as o}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as s}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as c}from"../support/rendererUtils.js";class l{constructor(e){this.layer=e,this._cache=new i}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:r(this.layer.renderer)}}]}async createSourceSchema(e,t){let n=this._createServiceInfo(e);return a(n,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:t,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,t,n){let{fields:r,geometryType:i,orderBy:a,objectIdField:o,renderer:c,labelingInfo:l,labelsVisible:u}=this.layer,d={featureReduction:null,labelingInfoSource:this.layer.id,fields:r.map(e=>e.toJSON()),geometryType:i,labelingInfo:l,labelsVisible:u,objectIdField:o,orderBy:a??`default`,renderer:c?.clone()};return s(e,t,d,n)}get hasRequiredSupport(){return c(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]}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}_createServiceInfo(r){let i=this.layer,{capabilities:a,editingInfo:s,objectIdField:c,globalIdField:l,datesInUnknownTimezone:u,dateFieldsTimeZone:d,orderBy:f,parsedUrl:p,hasZ:m,hasM:h}=i,g=i.fieldsIndex.toJSON(),_=n(i),v=o(i.timeInfo),y=i.spatialReference.toJSON(),b=e(p),x=c;if(f?.length){let e=!f[0].valueExpression&&f[0].field;e&&(x=e)}let S=t(b.path),C=r.spatialReference.toJSON();return{type:`feature-service`,source:b,isSourceHosted:S,orderByFields:x,outSpatialReference:C,metadata:{timeReferenceUnknownClient:u,dateFieldsTimeZone:d,globalIdField:l,fieldsIndex:g,geometryType:_,hasZ:m??!1,hasM:h??!1,featureIdInfo:{type:`object-id`,fieldName:c},timeInfo:v,spatialReference:y,outSpatialReference:C,attributeSpatialReference:null,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{supportsCacheHint:a.query.supportsCacheHint,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,supportsReturnExceededLimitGeometries:a.query.supportsReturnExceededLimitGeometries,lastEditDate:s?.lastEditDate?.getTime()}}}}export{l as CatalogFootprintLayerAdapter};
2
+ import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as t}from"../../../../../layers/support/arcgisLayerUrl.js";import{getServiceGeometryType as n}from"./geometryUtils.js";import{createLabelVVEvaluator as r}from"./labelingUtils.js";import{ExceedsLimitCache as i}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as a}from"../schema/SourceSchema.js";import{createServiceTimeSchema as o}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as s}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as c}from"../support/rendererUtils.js";class l{constructor(e){this.layer=e,this._cache=new i}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:r(this.layer.renderer)}}]}async createSourceSchema(e,t){let n=this._createServiceInfo(e);return a(n,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:t,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,t,n){let{fields:r,geometryType:i,orderBy:a,objectIdField:o,renderer:c,labelingInfo:l,labelsVisible:u}=this.layer,d={featureReduction:null,labelingInfoSource:this.layer.id,fields:r,geometryType:i,labelingInfo:l,labelsVisible:u,objectIdField:o,orderBy:a??`default`,renderer:c};return s(e,t,d,n)}get hasRequiredSupport(){return c(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]}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}_createServiceInfo(r){let i=this.layer,{capabilities:a,editingInfo:s,objectIdField:c,globalIdField:l,datesInUnknownTimezone:u,dateFieldsTimeZone:d,orderBy:f,parsedUrl:p,hasZ:m,hasM:h}=i,g=i.fieldsIndex.toJSON(),_=n(i),v=o(i.timeInfo),y=i.spatialReference.toJSON(),b=e(p),x=c;if(f?.length){let e=!f[0].valueExpression&&f[0].field;e&&(x=e)}let S=t(b.path),C=r.spatialReference.toJSON();return{type:`feature-service`,source:b,isSourceHosted:S,orderByFields:x,outSpatialReference:C,metadata:{timeReferenceUnknownClient:u,dateFieldsTimeZone:d,globalIdField:l,fieldsIndex:g,geometryType:_,hasZ:m??!1,hasM:h??!1,featureIdInfo:{type:`object-id`,fieldName:c},timeInfo:v,spatialReference:y,outSpatialReference:C,attributeSpatialReference:null,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{supportsCacheHint:a.query.supportsCacheHint,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,supportsReturnExceededLimitGeometries:a.query.supportsReturnExceededLimitGeometries,lastEditDate:s?.lastEditDate?.getTime()}}}}export{l as CatalogFootprintLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{clone as e}from"../../../../../core/lang.js";import{sqlAnd as t}from"../../../../../core/sql.js";import{isHostedAgolService as n}from"../../../../../layers/support/arcgisLayerUrl.js";import{canConvertSqlRelativeTime as r,sqlRelativeTimeToAbsolute as i}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as a}from"../../../../../networks/support/networkFieldUtils.js";import{getEffectiveFeatureReduction as o}from"./featureReductionUtils.js";import{createFeatureIdInfo as s}from"./featureServiceUtils.js";import{addFloorFilter as c,hasFloorFilter as l}from"./floorFilterUtils.js";import{getServiceGeometryType as u}from"./geometryUtils.js";import{createLabelVVEvaluator as d}from"./labelingUtils.js";import{ExceedsLimitCache as f}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as p,createFeatureSourceSchema as m}from"../schema/SourceSchema.js";import{createServiceTimeSchema as h}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as g}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as _}from"../support/rendererUtils.js";class v{constructor(e){this.layer=e,this._cache=new f}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:d(this.layer.renderer)}}]}async createSourceSchema(e,n){let a=this._createServiceInfo(e),o=this.layer.editingInfo?.lastEditDate!=null,s=this.layer.refreshInterval>0,c=!o&&s,l=p(a.isSourceHosted,c,this.layer.capabilities,a.metadata.geometryType,e.extent,this.layer.fullExtent),u=this.layer.subtypeCode==null?null:`${this.layer.subtypeField} = ${this.layer.subtypeCode}`,d=t(this.layer.definitionExpression,u),f=r(d)?await i(this.layer.fieldsIndex,d,this.layer.capabilities.query.relativeTimeBinWindow):d,h=d===f?null:{where:d},{gdbVersion:g,apiKey:_,historicMoment:v,timeExtent:y,customParameters:b,displayFilterInfo:x}=this.layer;return m(a,l,{definitionExpression:f,returnZ:e.returnZ,returnM:e.returnM,postQueryFilter:h,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:x,customParameters:b,gdbVersion:g,historicMoment:v,timeExtent:y,apiKey:_,sourceRefreshVersion:n,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,t,n){let{fields:r,renderer:i,geometryType:a,labelingInfo:s,labelsVisible:c,orderBy:l,objectIdField:u,trackInfo:d,symbolLayerDrawing:f}=this.layer,p={fields:r.map(e=>e.toJSON()),renderer:i?.clone(),labelingInfoSource:this.layer.id,featureReduction:o(this.layer,t),geometryType:a,labelingInfo:s,labelsVisible:c,objectIdField:u,orderBy:l??`default`,trackInfo:d,symbolLayerDrawing:f};return g(e,t,p,n)}get hasRequiredSupport(){return _(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,t){return c(this.layer,e,t)}getUpdateHashProperties(e){return this.layer.destroyed?[]:[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>o(this.layer,e),()=>l(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)]}getRenderer(){return 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(t){let r=this.layer,{capabilities:i,editingInfo:a,typeIdField:o,globalIdField:c,datesInUnknownTimezone:l,dateFieldsTimeZone:d,orderBy:f,subtypeField:p}=r,m=r.fieldsIndex.toJSON(),g=u(r),{hasZ:_,hasM:v}=r,y=h(r.timeInfo),b=r.spatialReference.toJSON(),x=r.types?.map(e=>e.toJSON()),S=e(this.layer.parsedUrl);this.layer.dynamicDataSource&&(S.query={layer:JSON.stringify(this.layer.dynamicDataSource.toLayerSourceJSON())});let C=this.layer.objectIdField;if(f?.length){let e=!f[0].valueExpression&&f[0].field;e&&(C=e)}let w=n(S.path),T=t.spatialReference.toJSON();return{type:`feature-service`,source:S,isSourceHosted:w,orderByFields:C,outSpatialReference:T,metadata:{typeIdField:o??void 0,types:x,timeReferenceUnknownClient:l,dateFieldsTimeZone:d,subtypeField:p,globalIdField:c,fieldsIndex:m,geometryType:g,hasZ:_,hasM:v,featureIdInfo:s(r),timeInfo:y,spatialReference:b,outSpatialReference:T,attributeSpatialReference:null,subtypes:this.layer.subtypes?.map(e=>e.toJSON())},queryMetadata:{supportsCacheHint:i.query.supportsCacheHint,maxRecordCount:i.query.maxRecordCount,tileMaxRecordCount:i.query.tileMaxRecordCount,supportsCompactGeometry:i.query.supportsCompactGeometry,supportsDefaultSpatialReference:i.query.supportsDefaultSpatialReference,supportsFormatPBF:i.query.supportsFormatPBF,supportsMaxRecordCountFactor:i.query.supportsMaxRecordCountFactor,supportsQuantization:i.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:i.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:i.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:i.query.supportsReturnExceededLimitGeometries,lastEditDate:a?.lastEditDate?.getTime()}}}}export{v as FeatureLayerAdapter};
2
+ import{clone as e}from"../../../../../core/lang.js";import{sqlAnd as t}from"../../../../../core/sql.js";import{isHostedAgolService as n}from"../../../../../layers/support/arcgisLayerUrl.js";import{canConvertSqlRelativeTime as r,sqlRelativeTimeToAbsolute as i}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as a}from"../../../../../networks/support/networkFieldUtils.js";import{getEffectiveFeatureReduction as o}from"./featureReductionUtils.js";import{createFeatureIdInfo as s}from"./featureServiceUtils.js";import{addFloorFilter as c,hasFloorFilter as l}from"./floorFilterUtils.js";import{getServiceGeometryType as u}from"./geometryUtils.js";import{createLabelVVEvaluator as d}from"./labelingUtils.js";import{ExceedsLimitCache as f}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as p,createFeatureSourceSchema as m}from"../schema/SourceSchema.js";import{createServiceTimeSchema as h}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as g}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as _}from"../support/rendererUtils.js";class v{constructor(e){this.layer=e,this._cache=new f}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:d(this.layer.renderer)}}]}async createSourceSchema(e,n){let a=this._createServiceInfo(e),o=this.layer.editingInfo?.lastEditDate!=null,s=this.layer.refreshInterval>0,c=!o&&s,l=p(a.isSourceHosted,c,this.layer.capabilities,a.metadata.geometryType,e.extent,this.layer.fullExtent),u=this.layer.subtypeCode==null?null:`${this.layer.subtypeField} = ${this.layer.subtypeCode}`,d=t(this.layer.definitionExpression,u),f=r(d)?await i(this.layer.fieldsIndex,d,this.layer.capabilities.query.relativeTimeBinWindow):d,h=d===f?null:{where:d},{gdbVersion:g,apiKey:_,historicMoment:v,timeExtent:y,customParameters:b,displayFilterInfo:x}=this.layer;return m(a,l,{definitionExpression:f,returnZ:e.returnZ,returnM:e.returnM,postQueryFilter:h,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:x,customParameters:b,gdbVersion:g,historicMoment:v,timeExtent:y,apiKey:_,sourceRefreshVersion:n,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,t,n){let{fields:r,renderer:i,geometryType:a,labelingInfo:s,labelsVisible:c,orderBy:l,objectIdField:u,trackInfo:d,symbolLayerDrawing:f}=this.layer,p={fields:r,renderer:i,labelingInfoSource:this.layer.id,featureReduction:o(this.layer,t),geometryType:a,labelingInfo:s,labelsVisible:c,objectIdField:u,orderBy:l??`default`,trackInfo:d,symbolLayerDrawing:f};return g(e,t,p,n)}get hasRequiredSupport(){return _(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,t){return c(this.layer,e,t)}getUpdateHashProperties(e){return this.layer.destroyed?[]:[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>o(this.layer,e),()=>l(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)]}getRenderer(){return 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(t){let r=this.layer,{capabilities:i,editingInfo:a,typeIdField:o,globalIdField:c,datesInUnknownTimezone:l,dateFieldsTimeZone:d,orderBy:f,subtypeField:p}=r,m=r.fieldsIndex.toJSON(),g=u(r),{hasZ:_,hasM:v}=r,y=h(r.timeInfo),b=r.spatialReference.toJSON(),x=r.types?.map(e=>e.toJSON()),S=e(this.layer.parsedUrl);this.layer.dynamicDataSource&&(S.query={layer:JSON.stringify(this.layer.dynamicDataSource.toLayerSourceJSON())});let C=this.layer.objectIdField;if(f?.length){let e=!f[0].valueExpression&&f[0].field;e&&(C=e)}let w=n(S.path),T=t.spatialReference.toJSON();return{type:`feature-service`,source:S,isSourceHosted:w,orderByFields:C,outSpatialReference:T,metadata:{typeIdField:o??void 0,types:x,timeReferenceUnknownClient:l,dateFieldsTimeZone:d,subtypeField:p,globalIdField:c,fieldsIndex:m,geometryType:g,hasZ:_,hasM:v,featureIdInfo:s(r),timeInfo:y,spatialReference:b,outSpatialReference:T,attributeSpatialReference:null,subtypes:this.layer.subtypes?.map(e=>e.toJSON())},queryMetadata:{supportsCacheHint:i.query.supportsCacheHint,maxRecordCount:i.query.maxRecordCount,tileMaxRecordCount:i.query.tileMaxRecordCount,supportsCompactGeometry:i.query.supportsCompactGeometry,supportsDefaultSpatialReference:i.query.supportsDefaultSpatialReference,supportsFormatPBF:i.query.supportsFormatPBF,supportsMaxRecordCountFactor:i.query.supportsMaxRecordCountFactor,supportsQuantization:i.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:i.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:i.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:i.query.supportsReturnExceededLimitGeometries,lastEditDate:a?.lastEditDate?.getTime()}}}}export{v as FeatureLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../../../core/Error.js";import{hasTimeOptions as t}from"../../../../../layers/support/timeSupport.js";import{getEffectiveFeatureReduction as n}from"./featureReductionUtils.js";import{createFeatureIdInfo as r}from"./featureServiceUtils.js";import{getServiceGeometryType as i}from"./geometryUtils.js";import{createLabelVVEvaluator as a}from"./labelingUtils.js";import{ExceedsLimitCache as o}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as s}from"../schema/SourceSchema.js";import{createServiceTimeSchema as c}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as l}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as u}from"../support/rendererUtils.js";function d(t){if(!(`openPorts`in t))throw new e(`featurelayer:source-not-supported`,`source is not supported`)}class f{constructor(e){this.layer=e,this._cache=new o}openMessagePorts(){return d(this.layer.source),this.layer.source.openPorts()}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:a(this.layer.renderer)}}]}async createSourceSchema(e,t){let n=this._createServiceInfo(e);return s(n,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:t,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,t,r){let{fields:i,renderer:a,geometryType:o,labelingInfo:s,labelsVisible:c,orderBy:u,objectIdField:d}=this.layer,f=`trackInfo`in this.layer?this.layer.trackInfo:null,p={fields:i.map(e=>e.toJSON()),renderer:a?.clone(),labelingInfoSource:this.layer.id,featureReduction:n(this.layer,t),geometryType:o,labelingInfo:s,labelsVisible:c,objectIdField:d,orderBy:u??`default`,trackInfo:f};return l(e,t,p,r)}get hasRequiredSupport(){return u(this.layer.renderer)}get timeOptions(){return t(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,()=>n(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)}getRenderer(){return this.layer.renderer}_createServiceInfo(e){let t=this.layer,{capabilities:n,objectIdField:a}=t,o=t.fieldsIndex.toJSON(),s=i(t),l=`timeInfo`in t?c(t.timeInfo):null,u=t.spatialReference.toJSON();d(t.source);let f=a,p=e.spatialReference.toJSON();return{type:`memory`,orderByFields:f,outSpatialReference:p,metadata:{fieldsIndex:o,geometryType:s,featureIdInfo:r(t),hasZ:`hasZ`in t&&t.hasZ,hasM:`hasM`in t&&t.hasM,timeInfo:l,spatialReference:u,outSpatialReference:p,attributeSpatialReference:null,subtypes:null,subtypeField:null,globalIdField:null,typeIdField:null,types:null,timeReferenceUnknownClient:`datesInUnknownTimezone`in t?t.datesInUnknownTimezone:null,dateFieldsTimeZone:`dateFieldsTimeZone`in t?t.dateFieldsTimeZone:null},queryMetadata:{supportsCacheHint:n.query.supportsCacheHint,maxRecordCount:n.query.maxRecordCount,tileMaxRecordCount:n.query.tileMaxRecordCount,supportsCompactGeometry:n.query.supportsCompactGeometry,supportsDefaultSpatialReference:n.query.supportsDefaultSpatialReference,supportsFormatPBF:n.query.supportsFormatPBF,supportsMaxRecordCountFactor:n.query.supportsMaxRecordCountFactor,supportsQuantization:n.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:n.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:n.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:n.query.supportsReturnExceededLimitGeometries,lastEditDate:null}}}}export{f as InMemoryLayerAdapter};
2
+ import e from"../../../../../core/Error.js";import{hasTimeOptions as t}from"../../../../../layers/support/timeSupport.js";import{getEffectiveFeatureReduction as n}from"./featureReductionUtils.js";import{createFeatureIdInfo as r}from"./featureServiceUtils.js";import{getServiceGeometryType as i}from"./geometryUtils.js";import{createLabelVVEvaluator as a}from"./labelingUtils.js";import{ExceedsLimitCache as o}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as s}from"../schema/SourceSchema.js";import{createServiceTimeSchema as c}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as l}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as u}from"../support/rendererUtils.js";function d(t){if(!(`openPorts`in t))throw new e(`featurelayer:source-not-supported`,`source is not supported`)}class f{constructor(e){this.layer=e,this._cache=new o}openMessagePorts(){return d(this.layer.source),this.layer.source.openPorts()}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:a(this.layer.renderer)}}]}async createSourceSchema(e,t){let n=this._createServiceInfo(e);return s(n,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:t,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,t,r){let{fields:i,renderer:a,geometryType:o,labelingInfo:s,labelsVisible:c,orderBy:u,objectIdField:d}=this.layer,f=`trackInfo`in this.layer?this.layer.trackInfo:null,p={fields:i,renderer:a,labelingInfoSource:this.layer.id,featureReduction:n(this.layer,t),geometryType:o,labelingInfo:s,labelsVisible:c,objectIdField:d,orderBy:u??`default`,trackInfo:f};return l(e,t,p,r)}get hasRequiredSupport(){return u(this.layer.renderer)}get timeOptions(){return t(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,()=>n(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)}getRenderer(){return this.layer.renderer}_createServiceInfo(e){let t=this.layer,{capabilities:n,objectIdField:a}=t,o=t.fieldsIndex.toJSON(),s=i(t),l=`timeInfo`in t?c(t.timeInfo):null,u=t.spatialReference.toJSON();d(t.source);let f=a,p=e.spatialReference.toJSON();return{type:`memory`,orderByFields:f,outSpatialReference:p,metadata:{fieldsIndex:o,geometryType:s,featureIdInfo:r(t),hasZ:`hasZ`in t&&t.hasZ,hasM:`hasM`in t&&t.hasM,timeInfo:l,spatialReference:u,outSpatialReference:p,attributeSpatialReference:null,subtypes:null,subtypeField:null,globalIdField:null,typeIdField:null,types:null,timeReferenceUnknownClient:`datesInUnknownTimezone`in t?t.datesInUnknownTimezone:null,dateFieldsTimeZone:`dateFieldsTimeZone`in t?t.dateFieldsTimeZone:null},queryMetadata:{supportsCacheHint:n.query.supportsCacheHint,maxRecordCount:n.query.maxRecordCount,tileMaxRecordCount:n.query.tileMaxRecordCount,supportsCompactGeometry:n.query.supportsCompactGeometry,supportsDefaultSpatialReference:n.query.supportsDefaultSpatialReference,supportsFormatPBF:n.query.supportsFormatPBF,supportsMaxRecordCountFactor:n.query.supportsMaxRecordCountFactor,supportsQuantization:n.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:n.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:n.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:n.query.supportsReturnExceededLimitGeometries,lastEditDate:null}}}}export{f as InMemoryLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{sqlAnd as e}from"../../../../../core/sql.js";import{systemIsSpatialFieldName as t}from"../../../../../layers/knowledgeGraph/constants.js";import n from"../../../../../layers/support/FeatureFilter.js";import{getEffectiveFeatureReduction as r}from"./featureReductionUtils.js";import{getServiceGeometryType as i}from"./geometryUtils.js";import{createLabelVVEvaluator as a}from"./labelingUtils.js";import{ExceedsLimitCache as o}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as s}from"../schema/SourceSchema.js";import{createServiceTimeSchema as c}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as l}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as u}from"../support/rendererUtils.js";class d{constructor(e){this.layer=e,this._cache=new o}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:a(this.layer.renderer)}}]}async createSourceSchema(e,t){let n=this._createServiceInfo(e);return s(n,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:t,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,t,n){let{fields:i,renderer:a,geometryType:o,labelingInfo:s,labelsVisible:c,objectIdField:u}=this.layer,d={fields:i.map(e=>e.toJSON()),renderer:a?.clone(),labelingInfoSource:this.layer.id,featureReduction:r(this.layer,t),geometryType:o,labelingInfo:s,labelsVisible:c,objectIdField:u,orderBy:`default`};return l(e,t,d,n)}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,()=>r(this.layer,e),()=>this.layer.parentCompositeLayer!=null&&f(this.layer.parentCompositeLayer)]}getRenderer(){return this.layer.renderer}hasFilters(e){return this.layer.parentCompositeLayer!=null&&f(this.layer.parentCompositeLayer)}addFilters(r,i){if(this.layer.parentCompositeLayer!=null&&f(this.layer.parentCompositeLayer)){let i=e(r?.where,`${t}=1`);if(!i)return r;r??=new n,r.where=i}return r}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}openMessagePorts(){return this.layer.source.openPorts()}_createServiceInfo(e){let t=this.layer,{capabilities:n,objectIdField:r}=t,a=t.fieldsIndex.toJSON(),o=i(t),s=t.spatialReference.toJSON(),l=r,u=e.spatialReference.toJSON();return{type:`memory`,orderByFields:l,outSpatialReference:u,metadata:{fieldsIndex:a,geometryType:o,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:{type:`object-id`,fieldName:t.objectIdField},spatialReference:s,outSpatialReference:u,attributeSpatialReference:null,globalIdField:null,subtypeField:null,subtypes:null,timeInfo:c(t.timeInfo),timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{supportsCacheHint:n.query.supportsCacheHint,maxRecordCount:n.query.maxRecordCount,tileMaxRecordCount:n.query.tileMaxRecordCount,supportsCompactGeometry:n.query.supportsCompactGeometry,supportsDefaultSpatialReference:n.query.supportsDefaultSpatialReference,supportsFormatPBF:n.query.supportsFormatPBF,supportsMaxRecordCountFactor:n.query.supportsMaxRecordCountFactor,supportsQuantization:n.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:n.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:n.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:n.query.supportsReturnExceededLimitGeometries,lastEditDate:null}}}}function f(e){return e.type===`link-chart`&&e.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode===`hidden`}export{d as KnowledgeGraphSublayerAdapter};
2
+ import{sqlAnd as e}from"../../../../../core/sql.js";import{systemIsSpatialFieldName as t}from"../../../../../layers/knowledgeGraph/constants.js";import n from"../../../../../layers/support/FeatureFilter.js";import{getEffectiveFeatureReduction as r}from"./featureReductionUtils.js";import{getServiceGeometryType as i}from"./geometryUtils.js";import{createLabelVVEvaluator as a}from"./labelingUtils.js";import{ExceedsLimitCache as o}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as s}from"../schema/SourceSchema.js";import{createServiceTimeSchema as c}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as l}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as u}from"../support/rendererUtils.js";class d{constructor(e){this.layer=e,this._cache=new o}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:a(this.layer.renderer)}}]}async createSourceSchema(e,t){let n=this._createServiceInfo(e);return s(n,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:t,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,t,n){let{fields:i,renderer:a,geometryType:o,labelingInfo:s,labelsVisible:c,objectIdField:u}=this.layer,d={fields:i,renderer:a,labelingInfoSource:this.layer.id,featureReduction:r(this.layer,t),geometryType:o,labelingInfo:s,labelsVisible:c,objectIdField:u,orderBy:`default`};return l(e,t,d,n)}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,()=>r(this.layer,e),()=>this.layer.parentCompositeLayer!=null&&f(this.layer.parentCompositeLayer)]}getRenderer(){return this.layer.renderer}hasFilters(e){return this.layer.parentCompositeLayer!=null&&f(this.layer.parentCompositeLayer)}addFilters(r,i){if(this.layer.parentCompositeLayer!=null&&f(this.layer.parentCompositeLayer)){let i=e(r?.where,`${t}=1`);if(!i)return r;r??=new n,r.where=i}return r}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}openMessagePorts(){return this.layer.source.openPorts()}_createServiceInfo(e){let t=this.layer,{capabilities:n,objectIdField:r}=t,a=t.fieldsIndex.toJSON(),o=i(t),s=t.spatialReference.toJSON(),l=r,u=e.spatialReference.toJSON();return{type:`memory`,orderByFields:l,outSpatialReference:u,metadata:{fieldsIndex:a,geometryType:o,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:{type:`object-id`,fieldName:t.objectIdField},spatialReference:s,outSpatialReference:u,attributeSpatialReference:null,globalIdField:null,subtypeField:null,subtypes:null,timeInfo:c(t.timeInfo),timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{supportsCacheHint:n.query.supportsCacheHint,maxRecordCount:n.query.maxRecordCount,tileMaxRecordCount:n.query.tileMaxRecordCount,supportsCompactGeometry:n.query.supportsCompactGeometry,supportsDefaultSpatialReference:n.query.supportsDefaultSpatialReference,supportsFormatPBF:n.query.supportsFormatPBF,supportsMaxRecordCountFactor:n.query.supportsMaxRecordCountFactor,supportsQuantization:n.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:n.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:n.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:n.query.supportsReturnExceededLimitGeometries,lastEditDate:null}}}}function f(e){return e.type===`link-chart`&&e.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode===`hidden`}export{d as KnowledgeGraphSublayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{clone as e}from"../../../../../core/lang.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{getServiceGeometryType as n}from"./geometryUtils.js";import{createLabelVVEvaluator as r}from"./labelingUtils.js";import{ExceedsLimitCache as i}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as a}from"../schema/SourceSchema.js";import{createServiceTimeSchema as o}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as s}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as c}from"../support/rendererUtils.js";class l{constructor(e){this.layer=e,this._cache=new i}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:r(this.layer.renderer)}}]}async createSourceSchema(e,t){let n=this._createServiceInfo(e);return a(n,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:t,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,n,r){let{fields:i,renderer:a,geometryType:o,labelingInfo:c,labelsVisible:l,orderBy:u,objectIdField:d}=this.layer,f={fields:i.map(e=>e.toJSON()),renderer:a?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,n),geometryType:o,labelingInfo:c,labelsVisible:l,objectIdField:d,orderBy:u??`default`};return s(e,n,f,r)}get hasRequiredSupport(){return c(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>t(this.layer,e),()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.renderer]}getRenderer(){return 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(t){let r=this.layer,{capabilities:i}=r,a=r.fieldsIndex.toJSON(),s=n(r),c=o(r.timeInfo),l=r.spatialReference.toJSON(),u=r.source.getSource(),d=this.layer.objectIdField,f=e(i);f.query.maxRecordCount=u.maxRecordCount;let p=t.spatialReference.toJSON();return{type:`ogc`,source:u,orderByFields:d,outSpatialReference:p,metadata:{fieldsIndex:a,geometryType:s,hasZ:this.layer.hasZ??!1,hasM:!1,featureIdInfo:{type:`object-id`,fieldName:r.objectIdField},timeInfo:c,spatialReference:l,outSpatialReference:p,attributeSpatialReference:null,globalIdField:null,subtypeField:null,subtypes:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{supportsCacheHint:f.query.supportsCacheHint,maxRecordCount:f.query.maxRecordCount,tileMaxRecordCount:f.query.tileMaxRecordCount,supportsCompactGeometry:f.query.supportsCompactGeometry,supportsDefaultSpatialReference:f.query.supportsDefaultSpatialReference,supportsFormatPBF:f.query.supportsFormatPBF,supportsMaxRecordCountFactor:f.query.supportsMaxRecordCountFactor,supportsQuantization:f.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:f.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:f.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:f.query.supportsReturnExceededLimitGeometries,lastEditDate:null}}}}export{l as OGCFeatureLayerAdapter};
2
+ import{clone as e}from"../../../../../core/lang.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{getServiceGeometryType as n}from"./geometryUtils.js";import{createLabelVVEvaluator as r}from"./labelingUtils.js";import{ExceedsLimitCache as i}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as a}from"../schema/SourceSchema.js";import{createServiceTimeSchema as o}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as s}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as c}from"../support/rendererUtils.js";class l{constructor(e){this.layer=e,this._cache=new i}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:r(this.layer.renderer)}}]}async createSourceSchema(e,t){let n=this._createServiceInfo(e);return a(n,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:t,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,n,r){let{fields:i,renderer:a,geometryType:o,labelingInfo:c,labelsVisible:l,orderBy:u,objectIdField:d}=this.layer,f={fields:i,renderer:a,labelingInfoSource:this.layer.id,featureReduction:t(this.layer,n),geometryType:o,labelingInfo:c,labelsVisible:l,objectIdField:d,orderBy:u??`default`};return s(e,n,f,r)}get hasRequiredSupport(){return c(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>t(this.layer,e),()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.renderer]}getRenderer(){return 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(t){let r=this.layer,{capabilities:i}=r,a=r.fieldsIndex.toJSON(),s=n(r),c=o(r.timeInfo),l=r.spatialReference.toJSON(),u=r.source.getSource(),d=this.layer.objectIdField,f=e(i);f.query.maxRecordCount=u.maxRecordCount;let p=t.spatialReference.toJSON();return{type:`ogc`,source:u,orderByFields:d,outSpatialReference:p,metadata:{fieldsIndex:a,geometryType:s,hasZ:this.layer.hasZ??!1,hasM:!1,featureIdInfo:{type:`object-id`,fieldName:r.objectIdField},timeInfo:c,spatialReference:l,outSpatialReference:p,attributeSpatialReference:null,globalIdField:null,subtypeField:null,subtypes:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{supportsCacheHint:f.query.supportsCacheHint,maxRecordCount:f.query.maxRecordCount,tileMaxRecordCount:f.query.tileMaxRecordCount,supportsCompactGeometry:f.query.supportsCompactGeometry,supportsDefaultSpatialReference:f.query.supportsDefaultSpatialReference,supportsFormatPBF:f.query.supportsFormatPBF,supportsMaxRecordCountFactor:f.query.supportsMaxRecordCountFactor,supportsQuantization:f.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:f.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:f.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:f.query.supportsReturnExceededLimitGeometries,lastEditDate:null}}}}export{l as OGCFeatureLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as t}from"../../../../../layers/support/arcgisLayerUrl.js";import{getEffectiveFeatureReduction as n}from"./featureReductionUtils.js";import{addFloorFilter as r,hasFloorFilter as i}from"./floorFilterUtils.js";import{getServiceGeometryType as a}from"./geometryUtils.js";import{createLabelVVEvaluator as o}from"./labelingUtils.js";import{ExceedsLimitCache as s}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as c,createFeatureSourceSchema as l}from"../schema/SourceSchema.js";import{createServiceTimeSchema as u}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as d}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as f}from"../support/rendererUtils.js";class p{constructor(e){this.layer=e,this._cache=new s}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:o(this.layer.renderer)}}]}async createSourceSchema(e,t){let n=this._createServiceInfo(e),r=this.layer.editingInfo?.lastEditDate!=null,i=this.layer.refreshInterval>0,a=!r&&i,o=c(n.isSourceHosted,a,this.layer.capabilities,n.metadata.geometryType,e.extent,this.layer.fullExtent);return l(n,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:t,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,t,r){let{fields:i,renderer:a,geometryType:o,labelingInfo:s,labelsVisible:c,orderBy:l,objectIdField:u}=this.layer,f={fields:i.map(e=>e.toJSON()),renderer:a?.clone(),labelingInfoSource:this.layer.id,featureReduction:n(this.layer,t),geometryType:o,labelingInfo:s,labelsVisible:c,objectIdField:u,orderBy:l??`default`};return d(e,t,f,r)}get hasRequiredSupport(){return f(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,t){return r(this.layer,e,t)}getUpdateHashProperties(e){return[()=>this.layer.outFields,()=>this.layer.orderBy,()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>n(this.layer,e),()=>this.layer.customParameters,()=>i(this.layer,e)?e.floors:null]}getRenderer(){return 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(n){let r=this.layer,{capabilities:i,globalIdField:o,orderBy:s}=r,c=r.fieldsIndex.toJSON(),l=a(r),d=u(r.timeInfo),f=r.spatialReference.toJSON(),p=e(this.layer.parsedUrl),m=this.layer.objectIdField;if(s?.length){let e=!s[0].valueExpression&&s[0].field;e&&(m=e)}let h=t(p.path),g=n.spatialReference.toJSON();return{type:`feature-service`,source:p,isSourceHosted:h,orderByFields:m,outSpatialReference:g,metadata:{globalIdField:o,fieldsIndex:c,geometryType:l,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:{type:`object-id`,fieldName:r.objectIdField},timeInfo:d,spatialReference:f,outSpatialReference:g,attributeSpatialReference:null,timeReferenceUnknownClient:r.datesInUnknownTimezone,dateFieldsTimeZone:r.dateFieldsTimeZone,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{supportsCacheHint:i.query.supportsCacheHint,maxRecordCount:i.query.maxRecordCount,tileMaxRecordCount:i.query.tileMaxRecordCount,supportsCompactGeometry:i.query.supportsCompactGeometry,supportsDefaultSpatialReference:i.query.supportsDefaultSpatialReference,supportsFormatPBF:i.query.supportsFormatPBF,supportsMaxRecordCountFactor:i.query.supportsMaxRecordCountFactor,supportsQuantization:i.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:i.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:i.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:i.query.supportsReturnExceededLimitGeometries,lastEditDate:null}}}}export{p as OrientedImageryLayerAdapter};
2
+ import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as t}from"../../../../../layers/support/arcgisLayerUrl.js";import{getEffectiveFeatureReduction as n}from"./featureReductionUtils.js";import{addFloorFilter as r,hasFloorFilter as i}from"./floorFilterUtils.js";import{getServiceGeometryType as a}from"./geometryUtils.js";import{createLabelVVEvaluator as o}from"./labelingUtils.js";import{ExceedsLimitCache as s}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as c,createFeatureSourceSchema as l}from"../schema/SourceSchema.js";import{createServiceTimeSchema as u}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as d}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as f}from"../support/rendererUtils.js";class p{constructor(e){this.layer=e,this._cache=new s}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:o(this.layer.renderer)}}]}async createSourceSchema(e,t){let n=this._createServiceInfo(e),r=this.layer.editingInfo?.lastEditDate!=null,i=this.layer.refreshInterval>0,a=!r&&i,o=c(n.isSourceHosted,a,this.layer.capabilities,n.metadata.geometryType,e.extent,this.layer.fullExtent);return l(n,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:t,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,t,r){let{fields:i,renderer:a,geometryType:o,labelingInfo:s,labelsVisible:c,orderBy:l,objectIdField:u}=this.layer,f={fields:i,renderer:a,labelingInfoSource:this.layer.id,featureReduction:n(this.layer,t),geometryType:o,labelingInfo:s,labelsVisible:c,objectIdField:u,orderBy:l??`default`};return d(e,t,f,r)}get hasRequiredSupport(){return f(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,t){return r(this.layer,e,t)}getUpdateHashProperties(e){return[()=>this.layer.outFields,()=>this.layer.orderBy,()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>n(this.layer,e),()=>this.layer.customParameters,()=>i(this.layer,e)?e.floors:null]}getRenderer(){return 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(n){let r=this.layer,{capabilities:i,globalIdField:o,orderBy:s}=r,c=r.fieldsIndex.toJSON(),l=a(r),d=u(r.timeInfo),f=r.spatialReference.toJSON(),p=e(this.layer.parsedUrl),m=this.layer.objectIdField;if(s?.length){let e=!s[0].valueExpression&&s[0].field;e&&(m=e)}let h=t(p.path),g=n.spatialReference.toJSON();return{type:`feature-service`,source:p,isSourceHosted:h,orderByFields:m,outSpatialReference:g,metadata:{globalIdField:o,fieldsIndex:c,geometryType:l,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:{type:`object-id`,fieldName:r.objectIdField},timeInfo:d,spatialReference:f,outSpatialReference:g,attributeSpatialReference:null,timeReferenceUnknownClient:r.datesInUnknownTimezone,dateFieldsTimeZone:r.dateFieldsTimeZone,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{supportsCacheHint:i.query.supportsCacheHint,maxRecordCount:i.query.maxRecordCount,tileMaxRecordCount:i.query.tileMaxRecordCount,supportsCompactGeometry:i.query.supportsCompactGeometry,supportsDefaultSpatialReference:i.query.supportsDefaultSpatialReference,supportsFormatPBF:i.query.supportsFormatPBF,supportsMaxRecordCountFactor:i.query.supportsMaxRecordCountFactor,supportsQuantization:i.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:i.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:i.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:i.query.supportsReturnExceededLimitGeometries,lastEditDate:null}}}}export{p as OrientedImageryLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../../../core/Error.js";import{toParquetJSONGeometryType as t}from"../../../../../layers/support/parquetUtils.js";import{getEffectiveFeatureReduction as n}from"./featureReductionUtils.js";import{getServiceGeometryType as r}from"./geometryUtils.js";import{createLabelVVEvaluator as i}from"./labelingUtils.js";import{createSimpleProcessorSchema as a}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as o}from"../support/rendererUtils.js";class s{constructor(e){this.layer=e}get hasRequiredSupport(){return o(this.layer.renderer)}get timeOptions(){return null}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:i(this.layer.renderer)}}]}getUpdateHashProperties(e){return[()=>this.layer.data,()=>this.layer.outFields,()=>this.layer.definitionExpression,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>n(this.layer,e),()=>this.layer.customParameters,()=>this.layer.orderBy,()=>this.layer.returnZ,()=>this.layer.returnM,()=>this.layer.renderer,()=>this.layer.popupTemplate]}openMessagePorts(){return this.layer.source.openPorts()}async createSourceSchema(e,t){let n=this._createServiceInfo(e),r=e.availableFields.includes(`*`)?this.layer.fields.map(e=>e.name):e.availableFields,i={partial:{dataSourceHash:this.layer.data?JSON.stringify(this.layer.data.toJSON()):null,availableFields:r},full:{displayFilterInfo:n.geometryInfo.displayOptimization&&e.displayFilterEnabled?this.layer.displayFilterInfo?.toJSON()??null:null,definitionExpression:this.layer.definitionExpression??null,sourceRefreshVersion:t,customParameters:this.layer.customParameters??null,returnZ:e.returnZ&&n.metadata.hasZ,returnM:e.returnM&&n.metadata.hasM}};return{type:`parquet`,service:n,strategy:this._createStrategy(n,i)}}_createStrategy(e,t){return e.geometryInfo.displayOptimization?{type:`xz`,...t}:{type:`snapshot`,...t}}createProcessorSchema(e,t,r){let i={fields:this.layer.fields.map(e=>e.toJSON()),renderer:this.layer.renderer?.clone(),labelingInfoSource:this.layer.id,featureReduction:n(this.layer,t),geometryType:this.layer.geometryType,labelingInfo:this.layer.labelingInfo,labelsVisible:this.layer.labelsVisible,objectIdField:this.layer.objectIdField,orderBy:this.layer.orderBy};return a(e,t,i,r)}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}_createServiceInfo(n){let i=r(this.layer),a=n.spatialReference.toJSON(),o=this.layer.geometryEncoding,s=this.layer.capabilities.query,c=this.layer.capabilities?.data?.supportsZ===!0,l=this.layer.capabilities?.data?.supportsM===!0;if(o==null&&this.layer.displayOptimization==null)throw new e(`parquet-layer:unsupported`,`creating a parquet layer view requires an encoding`,{layer:this.layer});return{type:`parquet`,outSpatialReference:a,geometryInfo:{geometry:o?{geometryType:t(this.layer.geometryType),spatialReference:this.layer.spatialReference.toJSON(),encoding:o.toJSON()}:null,displayOptimization:this.layer.displayOptimization},metadata:{spatialReference:this.layer.spatialReference.toJSON(),outSpatialReference:a,attributeSpatialReference:null,fieldsIndex:this.layer.fieldsIndex.toJSON(),featureIdInfo:{type:`object-id`,fieldName:this.layer.objectIdField},geometryType:i,hasZ:c,hasM:l,types:null,subtypes:null,timeInfo:null,typeIdField:null,subtypeField:null,globalIdField:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:this.layer.dateFieldsTimeZone},queryMetadata:{supportsCacheHint:s.supportsCacheHint,maxRecordCount:s.maxRecordCount,tileMaxRecordCount:s.tileMaxRecordCount,supportsCompactGeometry:s.supportsCompactGeometry,supportsDefaultSpatialReference:s.supportsDefaultSpatialReference,supportsFormatPBF:s.supportsFormatPBF,supportsMaxRecordCountFactor:s.supportsMaxRecordCountFactor,supportsQuantization:s.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:s.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:s.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:s.supportsReturnExceededLimitGeometries,lastEditDate:null}}}}export{s as ParquetLayerAdapter};
2
+ import e from"../../../../../core/Error.js";import{toParquetJSONGeometryType as t}from"../../../../../layers/support/parquetUtils.js";import{getEffectiveFeatureReduction as n}from"./featureReductionUtils.js";import{getServiceGeometryType as r}from"./geometryUtils.js";import{createLabelVVEvaluator as i}from"./labelingUtils.js";import{createSimpleProcessorSchema as a}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as o}from"../support/rendererUtils.js";class s{constructor(e){this.layer=e}get hasRequiredSupport(){return o(this.layer.renderer)}get timeOptions(){return null}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:i(this.layer.renderer)}}]}getUpdateHashProperties(e){return[()=>this.layer.data,()=>this.layer.outFields,()=>this.layer.definitionExpression,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>n(this.layer,e),()=>this.layer.customParameters,()=>this.layer.orderBy,()=>this.layer.returnZ,()=>this.layer.returnM,()=>this.layer.renderer,()=>this.layer.popupTemplate]}openMessagePorts(){return this.layer.source.openPorts()}async createSourceSchema(e,t){let n=this._createServiceInfo(e),r=e.availableFields.includes(`*`)?this.layer.fields.map(e=>e.name):e.availableFields,i={partial:{dataSourceHash:this.layer.data?JSON.stringify(this.layer.data.toJSON()):null,availableFields:r},full:{displayFilterInfo:n.geometryInfo.displayOptimization&&e.displayFilterEnabled?this.layer.displayFilterInfo?.toJSON()??null:null,definitionExpression:this.layer.definitionExpression??null,sourceRefreshVersion:t,customParameters:this.layer.customParameters??null,returnZ:e.returnZ&&n.metadata.hasZ,returnM:e.returnM&&n.metadata.hasM}};return{type:`parquet`,service:n,strategy:this._createStrategy(n,i)}}_createStrategy(e,t){return e.geometryInfo.displayOptimization?{type:`xz`,...t}:{type:`snapshot`,...t}}createProcessorSchema(e,t,r){let i={fields:this.layer.fields,renderer:this.layer.renderer,labelingInfoSource:this.layer.id,featureReduction:n(this.layer,t),geometryType:this.layer.geometryType,labelingInfo:this.layer.labelingInfo,labelsVisible:this.layer.labelsVisible,objectIdField:this.layer.objectIdField,orderBy:this.layer.orderBy};return a(e,t,i,r)}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}_createServiceInfo(n){let i=r(this.layer),a=n.spatialReference.toJSON(),o=this.layer.geometryEncoding,s=this.layer.capabilities.query,c=this.layer.capabilities?.data?.supportsZ===!0,l=this.layer.capabilities?.data?.supportsM===!0;if(o==null&&this.layer.displayOptimization==null)throw new e(`parquet-layer:unsupported`,`creating a parquet layer view requires an encoding`,{layer:this.layer});return{type:`parquet`,outSpatialReference:a,geometryInfo:{geometry:o?{geometryType:t(this.layer.geometryType),spatialReference:this.layer.spatialReference.toJSON(),encoding:o.toJSON()}:null,displayOptimization:this.layer.displayOptimization},metadata:{spatialReference:this.layer.spatialReference.toJSON(),outSpatialReference:a,attributeSpatialReference:null,fieldsIndex:this.layer.fieldsIndex.toJSON(),featureIdInfo:{type:`object-id`,fieldName:this.layer.objectIdField},geometryType:i,hasZ:c,hasM:l,types:null,subtypes:null,timeInfo:null,typeIdField:null,subtypeField:null,globalIdField:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:this.layer.dateFieldsTimeZone},queryMetadata:{supportsCacheHint:s.supportsCacheHint,maxRecordCount:s.maxRecordCount,tileMaxRecordCount:s.tileMaxRecordCount,supportsCompactGeometry:s.supportsCompactGeometry,supportsDefaultSpatialReference:s.supportsDefaultSpatialReference,supportsFormatPBF:s.supportsFormatPBF,supportsMaxRecordCountFactor:s.supportsMaxRecordCountFactor,supportsQuantization:s.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:s.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:s.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:s.supportsReturnExceededLimitGeometries,lastEditDate:null}}}}export{s as ParquetLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{getEffectiveFeatureReduction as e}from"./featureReductionUtils.js";import{getServiceGeometryType as t}from"./geometryUtils.js";import{createLabelVVEvaluator as n}from"./labelingUtils.js";import{createServiceTimeSchema as r}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as i}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as a}from"../support/rendererUtils.js";class o{constructor(e){this.layer=e}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:n(this.layer.renderer)}}]}async createSourceSchema(e,t){return{type:`stream`,service:this._createServiceInfo(e),strategy:{type:`stream`,partial:{sourceRefreshVersion:t},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(t,n,r){let{fields:a,renderer:o,geometryType:s,labelingInfo:c,labelsVisible:l,objectIdField:u,trackInfo:d}=this.layer,f={fields:a.map(e=>e.toJSON()),renderer:o?.clone(),labelingInfoSource:this.layer.id,featureReduction:e(this.layer,n),geometryType:s,labelingInfo:c,labelsVisible:l,objectIdField:u,orderBy:`default`,trackInfo:d};return i(t,n,f,r)}get hasRequiredSupport(){return a(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(t){return[()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>e(this.layer,t),()=>this.layer.customParameters,()=>this.layer.geometryDefinition,()=>this.layer.definitionExpression,()=>this.layer.trackInfo,()=>this.layer?.source?.refreshInterval]}getRenderer(){return 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(e){let n=t(this.layer),i=r(this.layer.timeInfo)??null,a=this.layer.spatialReference?this.layer.spatialReference.toJSON():null,o=e.spatialReference.toJSON();return{type:`stream`,source:this.layer.getStreamConnectionSource(),outSpatialReference:o,metadata:{fieldsIndex:this.layer.fieldsIndex.toJSON(),geometryType:n,hasZ:!1,hasM:!1,featureIdInfo:{type:`object-id`,fieldName:this.layer.objectIdField},timeInfo:i,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,spatialReference:a,outSpatialReference:o,attributeSpatialReference:null,subtypeField:null,subtypes:null,globalIdField:null,typeIdField:null,types:null}}}}export{o as StreamLayerAdapter};
2
+ import{getEffectiveFeatureReduction as e}from"./featureReductionUtils.js";import{getServiceGeometryType as t}from"./geometryUtils.js";import{createLabelVVEvaluator as n}from"./labelingUtils.js";import{createServiceTimeSchema as r}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as i}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as a}from"../support/rendererUtils.js";class o{constructor(e){this.layer=e}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:n(this.layer.renderer)}}]}async createSourceSchema(e,t){return{type:`stream`,service:this._createServiceInfo(e),strategy:{type:`stream`,partial:{sourceRefreshVersion:t},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(t,n,r){let{fields:a,renderer:o,geometryType:s,labelingInfo:c,labelsVisible:l,objectIdField:u,trackInfo:d}=this.layer,f={fields:a,renderer:o,labelingInfoSource:this.layer.id,featureReduction:e(this.layer,n),geometryType:s,labelingInfo:c,labelsVisible:l,objectIdField:u,orderBy:`default`,trackInfo:d};return i(t,n,f,r)}get hasRequiredSupport(){return a(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(t){return[()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>e(this.layer,t),()=>this.layer.customParameters,()=>this.layer.geometryDefinition,()=>this.layer.definitionExpression,()=>this.layer.trackInfo,()=>this.layer?.source?.refreshInterval]}getRenderer(){return 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(e){let n=t(this.layer),i=r(this.layer.timeInfo)??null,a=this.layer.spatialReference?this.layer.spatialReference.toJSON():null,o=e.spatialReference.toJSON();return{type:`stream`,source:this.layer.getStreamConnectionSource(),outSpatialReference:o,metadata:{fieldsIndex:this.layer.fieldsIndex.toJSON(),geometryType:n,hasZ:!1,hasM:!1,featureIdInfo:{type:`object-id`,fieldName:this.layer.objectIdField},timeInfo:i,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,spatialReference:a,outSpatialReference:o,attributeSpatialReference:null,subtypeField:null,subtypes:null,globalIdField:null,typeIdField:null,types:null}}}}export{o as StreamLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{EventEmitter as e}from"../../../../../core/Evented.js";import{create as t}from"../../../../../geometry/support/aaBoundingBox.js";import{getBoundsOptimizedGeometry as n}from"../../../../../layers/graphics/featureConversionUtils.js";import{optimizedFeatureQueryEngineAdapter as r}from"../../../../../layers/graphics/data/optimizedFeatureQueryEngineAdapter.js";import{QueryEngine as i}from"../../../../../layers/graphics/data/QueryEngine.js";import{collectExpressionDependencies as a}from"../../../../../support/ArcadeExpression.js";import{AProcessorStrategy as o,LevelReplaceBatch as s}from"./AProcessorStrategy.js";class c extends o{constructor(t,n,i,o,s,c){super(t,n,s),this.spatialReference=i,this.aggregateFields=o,this._adapter=c,this._arcadeDependencies=new Set,this._levelStates=new Map,this.events=new e,this.featureAdapter=r;for(let e of o)a(this._arcadeDependencies,e.computed)}get aggregateQueryEngine(){if(!this._aggregateQueryEngine){let{metadata:e}=this._adapter;this._aggregateQueryEngine=new i({featureStore:this,fieldsIndex:e.fieldsIndex,geometryType:e.geometryType,featureIdInfo:e.featureIdInfo,spatialReference:this.spatialReference})}return this._aggregateQueryEngine}get isAggregate(){return!0}removeChunks(e){}hasArcadeDependency(e){return this._arcadeDependencies.has(e)}destroy(){super.destroy();for(let e of this._levelStates.values())e.destroy();this._levelStates.clear()}onSubscribe(e){super.onSubscribe(e);let{scale:t,level:n}=e.tile;this._lastSubscribedLodInfo={scale:t,level:n}}onUnsubscribe(e){this._levelStates.get(e.tile.level)?.removeTile(e),super.onUnsubscribe(e)}requiresInvalidation(e){return!1}invalidate(){for(let e of this._levelStates.values())e.invalidate()}getDisplayIds(e){return this.getActiveLevelState()?.getDisplayIds(e)??{}}getDisplayFeatures(e){return this.getActiveLevelState()?.getDisplayFeatures(e)??{features:[],aggregates:[],tracks:[]}}getFeatureObjectIdsForAggregate(e){return this.getActiveLevelState()?.getFeatureObjectIdsForAggregate(e)??[]}applyOverrideUpdate(e){return this._adapter.applyOverrideUpdate(e,this._levelStates.values())}createState(e){return this._adapter.createSendState(e)}async updateChunks(e,t){let n=this._lastSubscribedLodInfo;if(n==null)return null;let r=this._getOrCreateLevelState(n),i=this._getSendStatesForLevel(n.level);await r.update(e,i);let a=new s(n.level);for(let n of i)a.messages.push(...r.createMessages(n,e,t,()=>{this.events.emit(`changed`)}));return await this._adapter.afterUpdateLevelState(r,e,i),a}getActiveLevelState(){let e=this._lastSubscribedLodInfo;return e==null?null:this._levelStates.get(e.level)}_getOrCreateLevelState(e){let t=this._levelStates.get(e.level);return t??(t=this._adapter.createLevelState(e),this._levelStates.set(e.level,t)),t}_getSendStatesForLevel(e){return Array.from(this._sendStates.values()).filter(t=>t.subscription.tile.level===e)}forEach(e){this.getActiveLevelState()?.forEachAggregateWorldSpace(e)}forEachInBounds(e,t){}forEachBounds(e,r){let i=t();for(let t of e){let e=n(i,t.geometry);e&&r(e)}}}export{c as AggregateStrategy};
2
+ import{EventEmitter as e}from"../../../../../core/Evented.js";import{create as t}from"../../../../../geometry/support/aaBoundingBox.js";import{getBoundsOptimizedGeometry as n}from"../../../../../layers/graphics/featureConversionUtils.js";import{optimizedFeatureQueryEngineAdapter as r}from"../../../../../layers/graphics/data/optimizedFeatureQueryEngineAdapter.js";import{QueryEngine as i}from"../../../../../layers/graphics/data/QueryEngine.js";import{collectExpressionDependencies as a}from"../../../../../support/ArcadeExpression.js";import{AProcessorStrategy as o,LevelReplaceBatch as s}from"./AProcessorStrategy.js";class c extends o{constructor(t,n,i,o,s,c){super(t,n,s),this.spatialReference=i,this.aggregateFields=o,this._adapter=c,this._arcadeDependencies=new Set,this._levelStates=new Map,this.events=new e,this.featureAdapter=r;for(let e of o)a(this._arcadeDependencies,e.computed)}get aggregateQueryEngine(){if(!this._aggregateQueryEngine){let{metadata:e}=this._adapter;this._aggregateQueryEngine=new i({featureStore:this,fieldsIndex:e.fieldsIndex,geometryType:e.geometryType,featureIdInfo:e.featureIdInfo,spatialReference:this.spatialReference})}return this._aggregateQueryEngine}get isAggregate(){return!0}removeChunks(e){}hasArcadeDependency(e){return this._arcadeDependencies.has(e)}destroy(){super.destroy();for(let e of this._levelStates.values())e.destroy();this._levelStates.clear()}onSubscribe(e){super.onSubscribe(e);let{scale:t,level:n}=e.tile;this._lastSubscribedLodInfo={scale:t,level:n}}onUnsubscribe(e){this._levelStates.get(e.tile.level)?.removeTile(e),super.onUnsubscribe(e)}requiresInvalidation(e){return!1}invalidate(){for(let e of this._levelStates.values())e.invalidate()}getDisplayIds(e){return this.getActiveLevelState()?.getDisplayIds(e)??{}}getDisplayFeatures(e){return this.getActiveLevelState()?.getDisplayFeatures(e)??{features:[],aggregates:[],tracks:[]}}getFeatureObjectIdsForAggregate(e){return this.getActiveLevelState()?.getFeatureObjectIdsForAggregate(e)??[]}applyOverrideUpdate(e){return this._adapter.applyOverrideUpdate(e,this._levelStates.values())}createState(e){return this._adapter.createSendState(e)}async updateChunks(e,t){let n=this._lastSubscribedLodInfo;if(n==null)return null;let r=this._getOrCreateLevelState(n),i=this._getSendStatesForLevel(n.level);await r.update(e,i);let a=new s(n.level);for(let n of i){let i=r.createMessages(n,e,t,()=>{this.events.emit(`changed`)});a.messages.push(...i)}return this._adapter.applyAttributeUpdate(n),await this._adapter.afterUpdateLevelState(r,e,i),a}getActiveLevelState(){let e=this._lastSubscribedLodInfo;return e==null?null:this._levelStates.get(e.level)}_getOrCreateLevelState(e){let t=this._levelStates.get(e.level);return t??(t=this._adapter.createLevelState(e),this._levelStates.set(e.level,t)),t}_getSendStatesForLevel(e){return Array.from(this._sendStates.values()).filter(t=>t.subscription.tile.level===e)}forEach(e){this.getActiveLevelState()?.forEachAggregateWorldSpace(e)}forEachInBounds(e,t){}forEachBounds(e,r){let i=t();for(let t of e){let e=n(i,t.geometry);e&&r(e)}}}export{c as AggregateStrategy};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import has from"../../../../../core/has.js";import{AProcessorStrategy as e,UpdateBatch as t,AppendBatch as n,ASendState as r}from"./AProcessorStrategy.js";import{FeatureTileUpdateMessage as i,FeatureTileAppendMessage as a}from"../sources/FeatureSourceMessage.js";import{OverrideChunk as o}from"../sources/strategies/chunks/Overrides.js";import{createArcadeEvaluationOptions as s}from"../support/arcadeUtils.js";import{FeatureSetReaderJSON as c}from"../support/FeatureSetReaderJSON.js";class l extends r{}class u extends e{constructor(e,t,n,r){super(e,t,r),this._arcadeContextInfo=n,this.handledChunks=new Set,this.handledChunksForIdCreation=new Set,this.handledChunksForAttributeData=new Set,this._streamLayerDeferredObjectIdsToRemove=[]}destroy(){super.destroy();for(let e of this._source.chunks())this._cleanupChunkIds(e)}invalidateAttributeData(e){this.handledChunksForAttributeData.clear(),this._arcadeContextInfo=e,this._evalOptions!=null&&(this._evalOptions=s(this._evalOptions.$view.scale,e))}onSubscribe(e){super.onSubscribe(e),this._evalOptions=e.tile.createArcadeEvaluationOptions(this._arcadeContextInfo)}createState(e){return new l(e)}get aggregateQueryEngine(){return null}getDisplayFeatures(e){let t=new Set(e),n=new Set,r=[];for(let e of this._source.chunks()){let i=e.reader.getCursor();for(;i.next();){let e=i.getObjectId(),a=i.getDisplayId();t.has(a)&&!n.has(e)&&(r.push({...i.readLegacyFeatureWorldSpace(),displayId:a}),n.add(e))}}return{features:r,aggregates:[],tracks:[]}}async applyOverrideUpdate(e){let n=new t,r=[];for(let t of e.modified.values()){let e=this._attributeStore.createDisplayIdForObjectId(t.objectId);t.displayId=e,r.push(e)}let a=c.fromOptimizedFeatures(Array.from(e.modified.values()),this._source.metadata).getCursor();for(;a.next();)this._attributeStore.setAttributeData(a.getDisplayId(),a,this._evalOptions,this._sqlOptions);let s=[];for(let t of e.removed){let e=this._attributeStore.getDisplayIdForObjectId(t);e!=null&&s.push(e)}has(`esri-2d-update-debug`)&&console.debug(`FeatureUpdateStrategy.applyLocalEdit`,{message:e,modifiedDisplayIds:r,removedDisplayIds:s});let l=o.fromFeatures(Array.from(e.modified.values()),this._source.metadata);this.handledChunks.add(l.chunkId),this.handledChunksForAttributeData.add(l.chunkId),this.handledChunksForIdCreation.add(l.chunkId);for(let e of this._sendStates.values())e.handledChunks.add(l.chunkId),n.messages.push(new i(e.subscription,null,r,!1,l.queryInfo));for(let e of this._sendStates.values()){let t=l.getTileReader(e.subscription.tile);n.messages.push(new i(e.subscription,t,s,!1,l.queryInfo))}for(let t of e.removed)this._attributeStore.releaseDisplayIdForObjectId(t);return n}async updateChunks(e,t){let r=new n;if(!e.length)return r;this._updateAttributeData();for(let t of this._sendStates.values()){let{subscription:n,handledChunks:i}=t;for(let o of e){let{chunkId:e}=o;if(i.has(e)||!this.handledChunksForIdCreation.has(e)||!this.handledChunksForAttributeData.has(e))continue;i.add(e);let s=o.getTileReader(n.tile);if(!s)continue;let c=new a(t.subscription,s,o.end,o.queryInfo);r.messages.push(c)}}return r}removeChunks(e){for(let t of e)this.handledChunks.delete(t.chunkId),this.handledChunksForAttributeData.delete(t.chunkId),this._cleanupChunkIds(t)}afterUpdateChunks(){for(let e of this._streamLayerDeferredObjectIdsToRemove)this._attributeStore.releaseDisplayIdForObjectId(e);this._streamLayerDeferredObjectIdsToRemove=[]}_cleanupChunkIds(e){if(this.handledChunksForIdCreation.has(e.chunkId)){let t=e.reader.getCursor();for(;t.next();){let e=t.getObjectId();this._source.isStream?this._streamLayerDeferredObjectIdsToRemove.push(e):this._attributeStore.releaseDisplayIdForObjectId(e)}this.handledChunksForIdCreation.delete(e.chunkId)}}_updateAttributeData(){for(let e of this._source.chunks()){let{chunkId:t,reader:n}=e;if(!this.handledChunksForIdCreation.has(t)){this.handledChunksForIdCreation.add(t);let e=n.getCursor();for(;e.next();){let t=this._attributeStore.createDisplayIdForObjectId(e.getObjectId());e.setDisplayId(t)}}}for(let e of this._source.chunks())if(this._attributeStore.referencesScale()||!this.handledChunksForAttributeData.has(e.chunkId)){this.handledChunksForAttributeData.add(e.chunkId);let t=e.reader.getCursor();for(;t.next();){let e=t.getDisplayId();this._attributeStore.setAttributeData(e,t,this._evalOptions,this._sqlOptions)}}}}export{l as DefaultSendState,u as FeatureUpdateStrategy};
2
+ import has from"../../../../../core/has.js";import{AProcessorStrategy as e,UpdateBatch as t,AppendBatch as n,ASendState as r}from"./AProcessorStrategy.js";import{FeatureTileUpdateMessage as i,FeatureTileAppendMessage as a}from"../sources/FeatureSourceMessage.js";import{OverrideChunk as o}from"../sources/strategies/chunks/Overrides.js";import{createArcadeEvaluationOptions as s}from"../support/arcadeUtils.js";class c extends r{}class l extends e{constructor(e,t,n,r){super(e,t,r),this._arcadeContextInfo=n,this._handledChunks=new Set,this._streamLayerDeferredObjectIdsToRemove=[]}destroy(){super.destroy();for(let e of this._source.chunks())this._cleanupChunkIds(e)}invalidateAttributeData(e){this._arcadeContextInfo=e,this._evalOptions!=null&&(this._evalOptions=s(this._evalOptions.$view.scale,e))}onSubscribe(e){super.onSubscribe(e),this._evalOptions=e.tile.createArcadeEvaluationOptions(this._arcadeContextInfo)}createState(e){return new c(e)}get aggregateQueryEngine(){return null}getDisplayFeatures(e){let t=new Set(e),n=new Set,r=[];for(let e of this._source.chunks()){let i=e.reader.getCursor();for(;i.next();){let e=i.getObjectId(),a=i.getDisplayId();t.has(a)&&!n.has(e)&&(r.push({...i.readLegacyFeatureWorldSpace(),displayId:a}),n.add(e))}}return{features:r,aggregates:[],tracks:[]}}async applyOverrideUpdate(e){let n=new t,r=[];for(let t of e.modified.values()){let e=this._attributeStore.createDisplayIdForObjectId(t.objectId);t.displayId=e,r.push(e)}let a=[];for(let t of e.removed){let e=this._attributeStore.getDisplayIdForObjectId(t);e!=null&&a.push(e)}let s=o.fromFeatures(Array.from(e.modified.values()),this._source.metadata);this._attributeStore.setDataForReader(s.reader,this._evalOptions,this._sqlOptions),has(`esri-2d-update-debug`)&&console.debug(`FeatureUpdateStrategy.applyLocalEdit`,{message:e,modifiedDisplayIds:r,removedDisplayIds:a}),this._handledChunks.add(s.chunkId);for(let e of this._sendStates.values())e.handledChunks.add(s.chunkId),n.messages.push(new i(e.subscription,null,r,!1,s.queryInfo));for(let e of this._sendStates.values()){let t=s.getTileReader(e.subscription.tile);n.messages.push(new i(e.subscription,t,a,!1,s.queryInfo))}for(let t of e.removed)this._attributeStore.releaseDisplayIdForObjectId(t);return n}async updateChunks(e,t){let r=new n;if(!e.length)return r;this._updateAttributeData();for(let t of this._sendStates.values()){let{subscription:n,handledChunks:i}=t;for(let o of e){let{chunkId:e}=o;if(i.has(e)||!this._handledChunks.has(e))continue;i.add(e);let s=o.getTileReader(n.tile);if(!s)continue;let c=new a(t.subscription,s,o.end,o.queryInfo);r.messages.push(c)}}return r}removeChunks(e){for(let t of e)this._cleanupChunkIds(t)}afterUpdateChunks(){for(let e of this._streamLayerDeferredObjectIdsToRemove)this._attributeStore.releaseDisplayIdForObjectId(e);this._streamLayerDeferredObjectIdsToRemove=[]}_cleanupChunkIds(e){if(this._handledChunks.has(e.chunkId)){let t=e.reader.getCursor();for(;t.next();){let e=t.getObjectId();this._source.isStream?this._streamLayerDeferredObjectIdsToRemove.push(e):this._attributeStore.releaseDisplayIdForObjectId(e)}this._handledChunks.delete(e.chunkId)}}_updateAttributeData(){for(let e of this._source.chunks()){let{chunkId:t,reader:n}=e;if(this._handledChunks.has(t))continue;let r=n.getCursor();for(;r.next();){let e=this._attributeStore.createDisplayIdForObjectId(r.getObjectId());r.setDisplayId(e)}this._attributeStore.setDataForReader(n,this._evalOptions,this._sqlOptions),this._handledChunks.add(t)}this._attributeStore.applyUpdate(this._source.chunks().map(e=>e.reader),this._evalOptions,this._sqlOptions)}}export{c as DefaultSendState,l as FeatureUpdateStrategy};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../../../../layers/support/FieldsIndex.js";import{BinLevelState as t}from"./BinLevelState.js";import{BinState as n}from"./BinState.js";import{FeatureMetadata as r}from"../../support/FeatureMetadata.js";import{Hashed as i}from"../../support/Hashed.js";class a{constructor(t,n,i,a,o,s,c,l){this._schema=t,this._featureFilter=n,this._arcadeContextInfo=i,this._aggregateFields=a,this._spatialReference=o,this._sqlOptions=l,this.metadata=r.createFeature({geometryType:`esriGeometryPolygon`,hasZ:!1,hasM:!1,featureIdInfo:{type:`object-id`,fieldName:`aggregateId`},fieldsIndex:new e(t.fields).toJSON(),globalIdField:null,spatialReference:s.metadata.spatialReference,outSpatialReference:s.metadata.outSpatialReference,attributeSpatialReference:null,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null}),this._getIndex=this._createGetIndex(),this._binContext={getIndex:this._getIndex,spatialReference:this._spatialReference,attributeStore:c,metadata:this.metadata,arcadeContextInfo:this._arcadeContextInfo,sqlOptions:this._sqlOptions}}createSendState(e){return new n(e)}createLevelState(e){return new t(e.level,this._binContext)}async applyOverrideUpdate(e,t){for(let e of t)e.invalidate();return null}afterUpdateLevelState(e,t,n){}_createGetIndex(){return(e,t)=>{switch(this._schema.index.type){case`geohash`:return e.getGeohashIndex(new i({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`:{let n=this._schema.index.fixedBinLevel,r=n==null?t.scale:t.tileInfoView.getLODInfoAt(n).scale;return e.getGridIndex(new i({type:`grid`,fields:this._aggregateFields,cellSize:this._schema.index.size,featureFilter:this._featureFilter,spatialReference:this._spatialReference,arcadeContextInfo:this._arcadeContextInfo,scale:r,sqlOptions:this._sqlOptions}))}}}}}export{a as BinAdapter};
2
+ import e from"../../../../../../layers/support/FieldsIndex.js";import{BinLevelState as t}from"./BinLevelState.js";import{BinState as n}from"./BinState.js";import{createArcadeEvaluationOptions as r}from"../../support/arcadeUtils.js";import{FeatureMetadata as i}from"../../support/FeatureMetadata.js";import{Hashed as a}from"../../support/Hashed.js";class o{constructor(t,n,r,a,o,s,c,l){this._schema=t,this._featureFilter=n,this._arcadeContextInfo=r,this._aggregateFields=a,this._spatialReference=o,this._sqlOptions=l,this.metadata=i.createFeature({geometryType:`esriGeometryPolygon`,hasZ:!1,hasM:!1,featureIdInfo:{type:`object-id`,fieldName:`aggregateId`},fieldsIndex:new e(t.fields).toJSON(),globalIdField:null,spatialReference:s.metadata.spatialReference,outSpatialReference:s.metadata.outSpatialReference,attributeSpatialReference:null,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null}),this._getIndex=this._createGetIndex(),this._binContext={getIndex:this._getIndex,spatialReference:this._spatialReference,attributeStore:c,metadata:this.metadata,arcadeContextInfo:this._arcadeContextInfo,sqlOptions:this._sqlOptions}}createSendState(e){return new n(e)}createLevelState(e){return new t(e.level,this._binContext)}async applyOverrideUpdate(e,t){for(let e of t)e.invalidate();return null}applyAttributeUpdate(e){let t=r(e.scale,this._binContext.arcadeContextInfo);this._binContext.attributeStore.applyUpdate([],t,this._binContext.sqlOptions)}afterUpdateLevelState(e,t,n){}_createGetIndex(){return(e,t)=>{switch(this._schema.index.type){case`geohash`:return e.reader.getGeohashIndex(new a({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`:{let n=this._schema.index.fixedBinLevel,r=n==null?t.scale:t.tileInfoView.getLODInfoAt(n).scale;return e.reader.getGridIndex(new a({type:`grid`,fields:this._aggregateFields,cellSize:this._schema.index.size,featureFilter:this._featureFilter,spatialReference:this._spatialReference,arcadeContextInfo:this._arcadeContextInfo,scale:r,sqlOptions:this._sqlOptions}))}}}}}export{o as BinAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import has from"../../../../../../core/has.js";import{convertToFeature as e,unquantizeOptimizedGeometryInPlace as t}from"../../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as n}from"../../../../../../layers/graphics/OptimizedFeature.js";import{FeatureTileAppendMessage as r}from"../../sources/FeatureSourceMessage.js";import{FeatureSetReaderJSON as i}from"../../support/FeatureSetReaderJSON.js";class a{constructor(e,t){this.level=e,this._context=t,this._tileStates=new Map}destroy(){for(let e of this._tileStates.values())this._releaseTileState(e);this._tileStates.clear()}invalidate(){}update(e,t){}removeTile(e){let t=this._tileStates.get(e.key.id);t!=null&&(this._releaseTileState(t),this._tileStates.delete(e.key.id))}getDisplayIds(e){let t=new Set(e),n={};for(let e of this._featuresWorldSpace()){let{objectId:r,displayId:i}=e;r!=null&&t.has(r)&&(n[r]=i)}return n}getDisplayFeatures(t){let n=new Set(t),r=new Set,i=[];for(let t of this._featuresWorldSpace())n.has(t.displayId)&&!r.has(t.objectId)&&(t.geometry&&i.push({...e(t,this._context.metadata.geometryType,!1,!1),displayId:t.displayId}),r.add(t.objectId));return{features:[],aggregates:i,tracks:[]}}getFeatureObjectIdsForAggregate(e){for(let t of this._tileStates.values())for(let n of t.bins.values())if(n.id===e){let e=[];for(let t of n.containedObjectIds)for(let n of t.values())e.push(n);return e}return[]}forEachAggregateWorldSpace(e){let t=new Set;for(let n of this._featuresWorldSpace())t.has(n.objectId)||(e(n),t.add(n.objectId))}createMessages(e,t,a,o){let{subscription:s}=e,c=this._getOrCreateTileState(s),l=this._takeTileState(c),u=s.tile,d=new Set;for(let e of t)this._context.getIndex(e,u).putBounded(c.bins,d,u.extent,u.resolution);let f=[],p=s.tile.transform,m=s.tile.key.level;for(let e of c.bins.values()){let t=e.getGeometry(this._context.spatialReference,p),r=new n(t,e.getAttributes(),null,e.id);t||(r.centroid=e.getGeometricCentroid(this._context.spatialReference,p)),r.displayId=this._context.attributeStore.createDisplayIdForObjectId(`${r.objectId}.${m}`),c.featureCache.set(e.id,r),f.push(r)}o(),e.done||=!a;let h=i.fromOptimizedFeatures(f,this._context.metadata,p),g=h.getCursor(),_=e.subscription.tile.createArcadeEvaluationOptions(this._context.arcadeContextInfo);for(;g.next();)this._context.attributeStore.setAttributeData(g.getDisplayId(),g,_,this._context.sqlOptions);has(`esri-2d-update-debug`)&&console.debug(`Tile[${e.subscription.tile.id}] BinningStrategy._update`,{done:e.done});let v=new r(e.subscription,h,e.done,{});for(let e of l.featureCache.keys())this._context.attributeStore.releaseDisplayIdForObjectId(`${e}.${m}`);return[v]}_getOrCreateTileState(e){let t=this._tileStates.get(e.key.id);return t??(t={subscription:e,bins:new Map,featureCache:new Map},this._tileStates.set(e.key.id,t)),t}_takeTileState(e){let t=e.bins,n=e.featureCache;return e.bins=new Map,e.featureCache=new Map,{bins:t,featureCache:n}}_releaseTileState(e){let t=e.subscription.tile.key.level;for(let n of e.featureCache.keys())this._context.attributeStore.releaseDisplayIdForObjectId(`${n}.${t}`);e.bins.clear(),e.featureCache.clear()}*_featuresWorldSpace(){for(let e of this._tileStates.values())for(let n of e.featureCache.values()){let r=n.clone();r.geometry&&t(r.geometry,e.subscription.tile.transform),yield r}}}export{a as BinLevelState};
2
+ import has from"../../../../../../core/has.js";import{convertToFeature as e,unquantizeOptimizedGeometryInPlace as t}from"../../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as n}from"../../../../../../layers/graphics/OptimizedFeature.js";import{FeatureTileAppendMessage as r}from"../../sources/FeatureSourceMessage.js";import{FeatureSetReaderJSON as i}from"../../support/FeatureSetReaderJSON.js";class a{constructor(e,t){this.level=e,this._context=t,this._tileStates=new Map}destroy(){for(let e of this._tileStates.values())this._releaseTileState(e);this._tileStates.clear()}invalidate(){}update(e,t){}removeTile(e){let t=this._tileStates.get(e.key.id);t!=null&&(this._releaseTileState(t),this._tileStates.delete(e.key.id))}getDisplayIds(e){let t=new Set(e),n={};for(let e of this._featuresWorldSpace()){let{objectId:r,displayId:i}=e;r!=null&&t.has(r)&&(n[r]=i)}return n}getDisplayFeatures(t){let n=new Set(t),r=new Set,i=[];for(let t of this._featuresWorldSpace())n.has(t.displayId)&&!r.has(t.objectId)&&(t.geometry&&i.push({...e(t,this._context.metadata.geometryType,!1,!1),displayId:t.displayId}),r.add(t.objectId));return{features:[],aggregates:i,tracks:[]}}getFeatureObjectIdsForAggregate(e){for(let t of this._tileStates.values())for(let n of t.bins.values())if(n.id===e){let e=[];for(let t of n.containedObjectIds)for(let n of t.values())e.push(n);return e}return[]}forEachAggregateWorldSpace(e){let t=new Set;for(let n of this._featuresWorldSpace())t.has(n.objectId)||(e(n),t.add(n.objectId))}createMessages(e,t,a,o){let{subscription:s}=e,c=this._getOrCreateTileState(s),l=this._takeTileState(c),u=s.tile,d=new Set;for(let e of t)this._context.getIndex(e,u).putBounded(c.bins,d,u.extent,u.resolution);let f=[],p=s.tile.transform,m=s.tile.key.level;for(let e of c.bins.values()){let t=e.getGeometry(this._context.spatialReference,p),r=new n(t,e.getAttributes(),null,e.id);t||(r.centroid=e.getGeometricCentroid(this._context.spatialReference,p)),r.displayId=this._context.attributeStore.createDisplayIdForObjectId(`${r.objectId}.${m}`),c.featureCache.set(e.id,r),f.push(r)}o(),e.done||=!a;let h=i.fromOptimizedFeatures(f,this._context.metadata,p),g=e.subscription.tile.createArcadeEvaluationOptions(this._context.arcadeContextInfo);this._context.attributeStore.setDataForReader(h,g,this._context.sqlOptions),has(`esri-2d-update-debug`)&&console.debug(`Tile[${e.subscription.tile.id}] BinningStrategy._update`,{done:e.done});let _=new r(e.subscription,h,e.done,{});for(let e of l.featureCache.keys())this._context.attributeStore.releaseDisplayIdForObjectId(`${e}.${m}`);return[_]}_getOrCreateTileState(e){let t=this._tileStates.get(e.key.id);return t??(t={subscription:e,bins:new Map,featureCache:new Map},this._tileStates.set(e.key.id,t)),t}_takeTileState(e){let t=e.bins,n=e.featureCache;return e.bins=new Map,e.featureCache=new Map,{bins:t,featureCache:n}}_releaseTileState(e){let t=e.subscription.tile.key.level;for(let n of e.featureCache.keys())this._context.attributeStore.releaseDisplayIdForObjectId(`${n}.${t}`);e.bins.clear(),e.featureCache.clear()}*_featuresWorldSpace(){for(let e of this._tileStates.values())for(let n of e.featureCache.values()){let r=n.clone();r.geometry&&t(r.geometry,e.subscription.tile.transform),yield r}}}export{a as BinLevelState};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../../../../layers/support/FieldsIndex.js";import{ClusterLevelState as t}from"./ClusterLevelState.js";import{ClusterSendState as n}from"./ClusterSendState.js";import{FeatureMetadata as r}from"../../support/FeatureMetadata.js";class i{constructor(t,n,i,a,o,s,c){this.metadata=r.createFeature({geometryType:`esriGeometryPoint`,hasZ:!1,hasM:!1,featureIdInfo:{type:`object-id`,fieldName:`aggregateId`},fieldsIndex:new e([...a,...o.metadata.fieldsIndex.fields,{name:`aggregateId`,alias:`aggregateId`,type:`esriFieldTypeOID`}]).toJSON(),globalIdField:null,spatialReference:o.metadata.spatialReference,outSpatialReference:o.metadata.outSpatialReference,attributeSpatialReference:null,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null}),this._clusterContext={connection:t,clusterRadius:n,indexOptions:i,attributeStore:s,metadata:this.metadata,sqlOptions:c}}createSendState(e){return new n(e)}createLevelState(e){return new t(e.level,e.scale,this._clusterContext)}async applyOverrideUpdate(e,t){for(let e of t)e.invalidate();return null}afterUpdateLevelState(e,t,n){return e.updateStatistics()}}export{i as ClusterAdapter};
2
+ import e from"../../../../../../layers/support/FieldsIndex.js";import{ClusterLevelState as t}from"./ClusterLevelState.js";import{ClusterSendState as n}from"./ClusterSendState.js";import{createArcadeEvaluationOptions as r}from"../../support/arcadeUtils.js";import{FeatureMetadata as i}from"../../support/FeatureMetadata.js";class a{constructor(t,n,r,a,o,s,c){this.metadata=i.createFeature({geometryType:`esriGeometryPoint`,hasZ:!1,hasM:!1,featureIdInfo:{type:`object-id`,fieldName:`aggregateId`},fieldsIndex:new e([...a,...o.metadata.fieldsIndex.fields,{name:`aggregateId`,alias:`aggregateId`,type:`esriFieldTypeOID`}]).toJSON(),globalIdField:null,spatialReference:o.metadata.spatialReference,outSpatialReference:o.metadata.outSpatialReference,attributeSpatialReference:null,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null}),this._clusterContext={connection:t,clusterRadius:n,indexOptions:r,attributeStore:s,metadata:this.metadata,sqlOptions:c}}createSendState(e){return new n(e)}createLevelState(e){return new t(e.level,e.scale,this._clusterContext)}async applyOverrideUpdate(e,t){for(let e of t)e.invalidate();return null}applyAttributeUpdate(e){let t=r(e.scale,this._clusterContext.indexOptions.arcadeContextInfo);this._clusterContext.attributeStore.applyUpdate([],t,this._clusterContext.sqlOptions)}afterUpdateLevelState(e,t,n){return e.updateStatistics()}}export{a as ClusterAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import has from"../../../../../../core/has.js";import{convertToFeature as e}from"../../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as t}from"../../../../../../layers/graphics/OptimizedFeature.js";import n from"../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as r}from"../../../../engine/webgl/definitions.js";import{GridCell as i}from"../../aggregation/GridCell.js";import{pixelsPerMapUnit as a}from"../../aggregation/GridSpatialIndex.js";import{WithDisplayId as o}from"../support/WithDisplayId.js";import{FeatureTileAppendMessage as s}from"../../sources/FeatureSourceMessage.js";import{FeatureSetReaderJSON as c}from"../../support/FeatureSetReaderJSON.js";import{Hashed as l}from"../../support/Hashed.js";class u{constructor(e,t,n){this.level=e,this._scale=t,this._context=n,this._statistics=new Map,this._handledChunks=new Set,this._handledIds=new Set,this._cells=new Map,this._clusters=new Map}destroy(){this._clearClusters()}_clearClusters(){for(let e of this._clusters.values())this._context.attributeStore.releaseDisplayIdForObjectId(e.inner.id);this._clusters.clear()}invalidate(){this._cells.clear(),this._handledChunks.clear(),this._handledIds.clear()}removeTile(e){}*aggregatesWorldSpace(){for(let e of this._clusters.values()){let n=e.inner.getCentroid(null);yield new t(n,e.inner.getAttributes(),null,e.inner.id,e.displayId)}}clusters(){return this._clusters.values()}getDisplayIds(e){let t=new Set(e),n={};for(let e of this._clusters.values())if(t.has(e.inner.id))n[e.inner.id]=e.displayId;else if(e.inner.count===1){let{firstObjectId:r}=e.inner;r!=null&&t.has(r)&&(n[r]=e.displayId)}return n}getDisplayFeatures(t){let n=new Set(t),r=new Set,i=[],a=[];for(let t of this.aggregatesWorldSpace())if(n.has(t.displayId)&&!r.has(t.displayId)){let n=e(t,this._context.metadata.geometryType,!1,!1);if(r.add(t.displayId),n.attributes.cluster_count===1){i.push({...n,displayId:t.displayId});continue}a.push({...n,displayId:t.displayId})}return{features:i,aggregates:a,tracks:[]}}getFeatureObjectIdsForAggregate(e){for(let t of this._clusters.values())if(t.inner.id===e){let e=[];for(let n of t.inner.containedObjectIds)for(let t of n.values())e.push(t);return e}return[]}forEachAggregateWorldSpace(e){for(let t of this.aggregatesWorldSpace())e(t)}update(e,t){let n=!1,r=new l({...this._context.indexOptions,scale:this._scale});for(let t of e)this._handledChunks.has(t.normalizedChunkId)||(this._handledChunks.add(t.normalizedChunkId),t.lodInfo!=null&&t.lodInfo.level!==this.level)||(t.getGridIndex(r).put(this._cells,this._handledIds),n=!0);let i=a(this._context.indexOptions.spatialReference,this._scale),o=this._context.indexOptions.cellSize,s={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};for(let{subscription:e}of t){let t=e.tile.bounds,n=Math.floor(t[0]*i/o),r=Math.floor(t[1]*i/o),a=Math.ceil(t[2]*i/o),c=Math.ceil(t[3]*i/o);s.xMin=Math.min(s.xMin,n),s.yMin=Math.min(s.yMin,r),s.xMax=Math.max(s.xMax,a),s.yMax=Math.max(s.yMax,c)}(this._lastCellBounds==null||s.xMin!==this._lastCellBounds.xMin||s.xMax!==this._lastCellBounds.xMax||s.yMin!==this._lastCellBounds.yMin||s.yMax!==this._lastCellBounds.yMax)&&(this._lastCellBounds=s,n=!0),n&&this._clusterCells(s)}async updateStatistics(){let e=!1;for(let t of this._clusters.values())t.inner.count>1&&(e=this._updateAggregateStatistics(this._statistics,t.inner)||e);if(e){let e=Array.from(this._statistics.entries()).map(([e,t])=>({fieldName:e,minValue:t.minValue,maxValue:t.maxValue}));await this._context.connection.container.updateStatistics(this.level,e)}}createMessages(e,t,n,r){let i=this._createAggregateFeatures(e);r(),e.done=e.done||!n;let a=i.getCursor(),o=e.subscription.tile.createArcadeEvaluationOptions(this._context.indexOptions.arcadeContextInfo);for(;a.next();)this._context.attributeStore.setAttributeData(a.getDisplayId(),a,o,this._context.sqlOptions);return has(`esri-2d-update-debug`)&&console.debug(`Tile[${e.subscription.tile.id}] ClusterStrategy._update`,{done:e.done}),[new s(e.subscription,i,e.done,{})]}_createAggregateFeatures(e){let i=e.subscription,a=[],o=i.tile.transform,s=Array.from(this._clusters.values()),l=s.length;for(let e of s){let i=e.inner.getCentroidX(o),s=e.inner.getCentroidY(o),c=e.inner.count===1?e.inner.firstObjectId:e.inner.id,l=e.displayId;if(i<r+128&&i>=-128&&s<r+128&&s>=-128){let r=new n([],[i,s]),o=new t(r,e.inner.getAttributes(),null,c,l);a.push(o)}}let u=c.fromOptimizedFeatures(a,this._context.metadata,i.tile.transform);return has(`esri-2d-update-debug`)&&console.debug(`Tile[${e.subscription.tile.id}] ClusterLevelState.createAggregateFeatures`,{clusters:u,levelClusterCount:l}),u}_clusterCells(e){let t=this._clusters;this._clusters=new Map;let n=this._context.clusterRadius*(1/a(this._context.indexOptions.spatialReference,this._scale)),r=Array.from(this._cells.values());r=r.sort((e,t)=>t.count-e.count);let s=new Set;for(let t of r){if(s.has(t.id)||t.gridX<e.xMin||t.gridX>e.xMax||t.gridY<e.yMin||t.gridY>e.yMax)continue;let r=1+this._context.clusterRadius/this._context.indexOptions.cellSize,a=this._context.attributeStore.createDisplayIdForObjectId(t.id),c=new o(t.clone(),a);s.add(t.id),this._clusters.set(t.id,c);let l=t.centroidXWorld,u=t.centroidYWorld;for(let e=t.gridY-r;e<=t.gridY+r;e++)for(let a=t.gridX-r;a<=t.gridX+r;a++){if(e===t.gridY&&a===t.gridX)continue;let r=this._cells.get(i.createId(a,e));if(!r||s.has(r.id))continue;let o=Math.abs(r.centroidXWorld-l),d=Math.abs(r.centroidYWorld-u);o<n&&d<n&&(c.inner.merge(r),s.add(r.id))}}for(let e of t.values())this._context.attributeStore.releaseDisplayIdForObjectId(e.inner.id)}_updateAggregateStatistics(e,t){let n=!1;for(let r of t.statistics.values()){if(r.field.type===`esriFieldTypeString`)continue;let t=r.value,i=r.field,a=e.get(i.name);if(a){let{minValue:e,maxValue:r}=a,i=Math.min(a.minValue,t),o=Math.max(a.maxValue,t);(e!==i||r!==o)&&(a.minValue=i,a.maxValue=o,n=!0)}else e.set(i.name,{minValue:t,maxValue:t}),n=!0}return n}}export{u as ClusterLevelState};
2
+ import has from"../../../../../../core/has.js";import{convertToFeature as e}from"../../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as t}from"../../../../../../layers/graphics/OptimizedFeature.js";import n from"../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as r}from"../../../../engine/webgl/definitions.js";import{GridCell as i}from"../../aggregation/GridCell.js";import{pixelsPerMapUnit as a}from"../../aggregation/GridSpatialIndex.js";import{WithDisplayId as o}from"../support/WithDisplayId.js";import{FeatureTileAppendMessage as s}from"../../sources/FeatureSourceMessage.js";import{FeatureSetReaderJSON as c}from"../../support/FeatureSetReaderJSON.js";import{Hashed as l}from"../../support/Hashed.js";class u{constructor(e,t,n){this.level=e,this._scale=t,this._context=n,this._statistics=new Map,this._handledChunks=new Set,this._handledIds=new Set,this._cells=new Map,this._clusters=new Map}destroy(){this._clearClusters()}_clearClusters(){for(let e of this._clusters.values())this._context.attributeStore.releaseDisplayIdForObjectId(e.inner.id);this._clusters.clear()}invalidate(){this._cells.clear(),this._handledChunks.clear(),this._handledIds.clear()}removeTile(e){}*aggregatesWorldSpace(){for(let e of this._clusters.values()){let n=e.inner.getCentroid(null);yield new t(n,e.inner.getAttributes(),null,e.inner.id,e.displayId)}}clusters(){return this._clusters.values()}getDisplayIds(e){let t=new Set(e),n={};for(let e of this._clusters.values())if(t.has(e.inner.id))n[e.inner.id]=e.displayId;else if(e.inner.count===1){let{firstObjectId:r}=e.inner;r!=null&&t.has(r)&&(n[r]=e.displayId)}return n}getDisplayFeatures(t){let n=new Set(t),r=new Set,i=[],a=[];for(let t of this.aggregatesWorldSpace())if(n.has(t.displayId)&&!r.has(t.displayId)){let n=e(t,this._context.metadata.geometryType,!1,!1);if(r.add(t.displayId),n.attributes.cluster_count===1){i.push({...n,displayId:t.displayId});continue}a.push({...n,displayId:t.displayId})}return{features:i,aggregates:a,tracks:[]}}getFeatureObjectIdsForAggregate(e){for(let t of this._clusters.values())if(t.inner.id===e){let e=[];for(let n of t.inner.containedObjectIds)for(let t of n.values())e.push(t);return e}return[]}forEachAggregateWorldSpace(e){for(let t of this.aggregatesWorldSpace())e(t)}update(e,t){let n=!1,r=new l({...this._context.indexOptions,scale:this._scale});for(let t of e)this._handledChunks.has(t.normalizedChunkId)||(this._handledChunks.add(t.normalizedChunkId),t.lodInfo!=null&&t.lodInfo.level!==this.level)||(t.reader.getGridIndex(r).put(this._cells,this._handledIds),n=!0);let i=a(this._context.indexOptions.spatialReference,this._scale),o=this._context.indexOptions.cellSize,s={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};for(let{subscription:e}of t){let t=e.tile.bounds,n=Math.floor(t[0]*i/o),r=Math.floor(t[1]*i/o),a=Math.ceil(t[2]*i/o),c=Math.ceil(t[3]*i/o);s.xMin=Math.min(s.xMin,n),s.yMin=Math.min(s.yMin,r),s.xMax=Math.max(s.xMax,a),s.yMax=Math.max(s.yMax,c)}(this._lastCellBounds==null||s.xMin!==this._lastCellBounds.xMin||s.xMax!==this._lastCellBounds.xMax||s.yMin!==this._lastCellBounds.yMin||s.yMax!==this._lastCellBounds.yMax)&&(this._lastCellBounds=s,n=!0),n&&this._clusterCells(s)}async updateStatistics(){let e=!1;for(let t of this._clusters.values())t.inner.count>1&&(e=this._updateAggregateStatistics(this._statistics,t.inner)||e);if(e){let e=Array.from(this._statistics.entries()).map(([e,t])=>({fieldName:e,minValue:t.minValue,maxValue:t.maxValue}));await this._context.connection.container.updateStatistics(this.level,e)}}createMessages(e,t,n,r){let i=this._createAggregateFeatures(e);r(),e.done=e.done||!n;let a=e.subscription.tile.createArcadeEvaluationOptions(this._context.indexOptions.arcadeContextInfo);return this._context.attributeStore.setDataForReader(i,a,this._context.sqlOptions),has(`esri-2d-update-debug`)&&console.debug(`Tile[${e.subscription.tile.id}] ClusterStrategy._update`,{done:e.done}),[new s(e.subscription,i,e.done,{})]}_createAggregateFeatures(e){let i=e.subscription,a=[],o=i.tile.transform,s=Array.from(this._clusters.values()),l=s.length;for(let e of s){let i=e.inner.getCentroidX(o),s=e.inner.getCentroidY(o),c=e.inner.count===1?e.inner.firstObjectId:e.inner.id,l=e.displayId;if(i<r+128&&i>=-128&&s<r+128&&s>=-128){let r=new n([],[i,s]),o=new t(r,e.inner.getAttributes(),null,c,l);a.push(o)}}let u=c.fromOptimizedFeatures(a,this._context.metadata,i.tile.transform);return has(`esri-2d-update-debug`)&&console.debug(`Tile[${e.subscription.tile.id}] ClusterLevelState.createAggregateFeatures`,{clusters:u,levelClusterCount:l}),u}_clusterCells(e){let t=this._clusters;this._clusters=new Map;let n=this._context.clusterRadius*(1/a(this._context.indexOptions.spatialReference,this._scale)),r=Array.from(this._cells.values());r=r.sort((e,t)=>t.count-e.count);let s=new Set;for(let t of r){if(s.has(t.id)||t.gridX<e.xMin||t.gridX>e.xMax||t.gridY<e.yMin||t.gridY>e.yMax)continue;let r=1+this._context.clusterRadius/this._context.indexOptions.cellSize,a=this._context.attributeStore.createDisplayIdForObjectId(t.id),c=new o(t.clone(),a);s.add(t.id),this._clusters.set(t.id,c);let l=t.centroidXWorld,u=t.centroidYWorld;for(let e=t.gridY-r;e<=t.gridY+r;e++)for(let a=t.gridX-r;a<=t.gridX+r;a++){if(e===t.gridY&&a===t.gridX)continue;let r=this._cells.get(i.createId(a,e));if(!r||s.has(r.id))continue;let o=Math.abs(r.centroidXWorld-l),d=Math.abs(r.centroidYWorld-u);o<n&&d<n&&(c.inner.merge(r),s.add(r.id))}}for(let e of t.values())this._context.attributeStore.releaseDisplayIdForObjectId(e.inner.id)}_updateAggregateStatistics(e,t){let n=!1;for(let r of t.statistics.values()){if(r.field.type===`esriFieldTypeString`)continue;let t=r.value,i=r.field,a=e.get(i.name);if(a){let{minValue:e,maxValue:r}=a,i=Math.min(a.minValue,t),o=Math.max(a.maxValue,t);(e!==i||r!==o)&&(a.minValue=i,a.maxValue=o,n=!0)}else e.set(i.name,{minValue:t,maxValue:t}),n=!0}return n}}export{u as ClusterLevelState};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../../../../core/Logger.js";import{internalTrackPartField as t}from"../../../../../../layers/support/streamLayerUtils.js";import{TrackLevelState as n}from"./TrackLevelState.js";import{TrackSendState as r}from"./TrackSendState.js";import{FeatureMetadata as i}from"../../support/FeatureMetadata.js";const a=()=>e.getLogger(`esri.views.2d.layers.features.processor.TrackStrategy`);class o{constructor(e,n,r,a,o,s,c,l){let u=n.metadata.weakCloneWithAdditionalFields([{name:t,alias:`trackPart`,type:`esriFieldTypeSmallInteger`}]),d=n.metadata.fieldsIndex.toJSON();d.fields.push(...o,{name:t,alias:`trackPart`,type:`esriFieldTypeSmallInteger`},{name:`aggregateId`,alias:`aggregateId`,type:`esriFieldTypeOID`});let f=i.createFeature({geometryType:`esriGeometryPolyline`,featureIdInfo:{type:`object-id`,fieldName:`aggregateId`},fieldsIndex:d,globalIdField:null,spatialReference:n.metadata.spatialReference,outSpatialReference:n.metadata.outSpatialReference,attributeSpatialReference:null,subtypeField:null,subtypes:null,timeInfo:n.metadata.timeInfo,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null,hasZ:!1,hasM:!1});this.metadata=u,this._trackContext={schema:e,source:n,attributeStore:r,spatialReference:a,metadata:u,trackLineMetadata:f,aggregateFields:o,arcadeContextInfo:c,sqlOptions:l,featureFilter:s,isStream:n.isStream}}createSendState(e){return new r(e)}createLevelState(e){return new n(e.level,this._trackContext)}async applyOverrideUpdate(e,t){return a().error(`Applying override to tracks is not supported`),null}afterUpdateLevelState(e,t,n){}}export{o as TrackAdapter};
2
+ import e from"../../../../../../core/Logger.js";import{internalTrackPartField as t}from"../../../../../../layers/support/streamLayerUtils.js";import{TrackLevelState as n}from"./TrackLevelState.js";import{TrackSendState as r}from"./TrackSendState.js";import{createArcadeEvaluationOptions as i}from"../../support/arcadeUtils.js";import{FeatureMetadata as a}from"../../support/FeatureMetadata.js";const o=()=>e.getLogger(`esri.views.2d.layers.features.processor.TrackStrategy`);class s{constructor(e,n,r,i,o,s,c,l){let u=n.metadata.weakCloneWithAdditionalFields([{name:t,alias:`trackPart`,type:`esriFieldTypeSmallInteger`}]),d=n.metadata.fieldsIndex.toJSON();d.fields.push(...o,{name:t,alias:`trackPart`,type:`esriFieldTypeSmallInteger`},{name:`aggregateId`,alias:`aggregateId`,type:`esriFieldTypeOID`});let f=a.createFeature({geometryType:`esriGeometryPolyline`,featureIdInfo:{type:`object-id`,fieldName:`aggregateId`},fieldsIndex:d,globalIdField:null,spatialReference:n.metadata.spatialReference,outSpatialReference:n.metadata.outSpatialReference,attributeSpatialReference:null,subtypeField:null,subtypes:null,timeInfo:n.metadata.timeInfo,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null,hasZ:!1,hasM:!1});this.metadata=u,this._trackContext={schema:e,source:n,attributeStore:r,spatialReference:i,metadata:u,trackLineMetadata:f,aggregateFields:o,arcadeContextInfo:c,sqlOptions:l,featureFilter:s,isStream:n.isStream}}createSendState(e){return new r(e)}createLevelState(e){return new n(e.level,this._trackContext)}async applyOverrideUpdate(e,t){return o().error(`Applying override to tracks is not supported`),null}applyAttributeUpdate(e){let t=i(e.scale,this._trackContext.arcadeContextInfo);this._trackContext.attributeStore.applyUpdate([],t,this._trackContext.sqlOptions)}afterUpdateLevelState(e,t,n){}}export{s as TrackAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{isSome as e}from"../../../../../../core/arrayUtils.js";import{internalTrackPartField as t}from"../../../../../../layers/support/streamLayerUtils.js";import{Track as n}from"./Track.js";import{FeatureTileAppendMessage as r}from"../../sources/FeatureSourceMessage.js";import{createArcadeEvaluationOptions as i}from"../../support/arcadeUtils.js";import{FeatureSetReaderIndirect as a}from"../../support/FeatureSetReaderIndirect.js";import{FeatureSetReaderJSON as o}from"../../support/FeatureSetReaderJSON.js";class s{constructor(e,t){this.level=e,this._context=t,this._chunks=[],this._tracks=new Map,this._handledChunks=new Set}destroy(){this._clear()}invalidate(){}removeTile(e){}update(e,t){let n=this._chunks,r=this._tracks,i=this._handledChunks;this._chunks=e,this._tracks=new Map,this._handledChunks=new Set,this._rebuildTracks(e),this._releaseState(n,r,i)}getDisplayIds(e){let t=new Set(e),n={};for(let e of this._tracks.values()){if(t.has(e.objectId)){n[e.objectId]=e.displayId;continue}let r=e.latestObservationFeature;if(r?.objectId!=null&&t.has(r.objectId))n[r.objectId]=r.displayId;else for(let r of e.observations())r.objectId!=null&&t.has(r.objectId)&&(n[r.objectId]=r.displayId)}return n}getDisplayFeatures(e){let t=new Set(e),n=[],r=[],i=this._chunks.map(e=>e.reader.getCursor());for(let e of this._tracks.values()){if(t.has(e.displayId)&&r.push(e.getTrackLineDisplayFeature()),e.latestObservationFeature!=null&&t.has(e.latestObservationFeature.displayId)){let{displayId:t,chunkIndex:r,featureIndex:a}=e.latestObservationRecord,o=i[r];o.setIndex(a),n.push({displayId:t,...o.readLegacyFeatureWorldSpace()})}for(let{displayId:r,chunkIndex:a,featureIndex:o}of e.observations())if(t.has(r)){let e=i[a];e.setIndex(o),n.push({displayId:r,...e.readLegacyFeatureWorldSpace()})}}return{features:n,aggregates:[],tracks:r}}getFeatureObjectIdsForAggregate(e){for(let t of this._tracks.values())if(t.objectId===e)return Array.from(t.observations(),e=>e.objectId);return[]}forEachAggregateWorldSpace(e){for(let t of this._tracks.values())e(t.getTrackLineOptimizedFeature())}createMessages(n,i,s,c){n.done=n.done||!s;let l=[],u=[];for(let e of this._tracks.values())if(e.length>0){if(this._context.schema.showLatestObservation){let t=e.getLatestObservationFeatureForTile(n);t!=null&&l.push(t)}this._context.schema.showTrackLine&&e.overlapsTile(n.subscription.tile)&&u.push(e.getTrackLineFeatureForTile(n))}let d=o.fromOptimizedFeatures(l,this._context.metadata,n.subscription.tile.transform),f=o.fromOptimizedFeatures(u,this._context.trackLineMetadata,n.subscription.tile.transform),p=[];if(this._context.schema.showPreviousObservations){let r=this._chunks.map(()=>[]);for(let e of this._tracks.values())for(let{chunkIndex:t,featureIndex:n}of e.previousObservations())r[t].push(n);p=this._chunks.map((e,i)=>{let o=n.subscription.tile,s;if(this._context.metadata.geometryType===`esriGeometryPolygon`){let t=e.queryFeaturesInBounds(o.bounds);t.setTransformForDisplay(o.transform),s=t}else s=e.getTileReader(o);if(s==null)return null;let c=a.from(s,r[i]);return c.setProcessorAttributes({[t]:2}),(c.geometryType===`esriGeometryPoint`||c.getInTransform()==null)&&c.setTransformForDisplay(n.subscription.tile.transform),c}).filter(e)}c();let m=n.subscription.tile.createArcadeEvaluationOptions(this._context.arcadeContextInfo),h=f.getCursor();for(;h.next();)this._context.attributeStore.setAttributeData(h.getDisplayId(),h,m,this._context.sqlOptions);for(let e of p){let t=e.getCursor();for(;t.next();)this._context.attributeStore.setAttributeData(t.getDisplayId(),t,m,this._context.sqlOptions)}let g=d.getCursor();for(;g.next();)this._context.attributeStore.setAttributeData(g.getDisplayId(),g,m,this._context.sqlOptions);return[new r(n.subscription,f,!1,{}),...p.map(e=>new r(n.subscription,e,!1,{})),new r(n.subscription,d,n.done,{})]}_clear(){this._releaseState(this._chunks,this._tracks,this._handledChunks),this._chunks=[],this._tracks.clear(),this._handledChunks.clear()}_rebuildTracks(e){if(!e.length)return;let t=this._context.metadata.timeInfo?.trackIdField;if(t!=null){for(let r=0;r<e.length;r++){let i=e[r];if(i.lodInfo!=null&&i.lodInfo.level!==this.level||this._handledChunks.has(i.chunkId))continue;this._handledChunks.add(i.chunkId);let a=i.reader.getCursor();for(;a.next();){let e=a.getObjectId();a.setDisplayId(this._context.attributeStore.createDisplayIdForObjectId(e));let i=a.readAttribute(t);if(i!=null&&e!=null&&(this._context.featureFilter===null||this._context.featureFilter.check(a,this._context.sqlOptions))){if(!this._tracks.has(i)){let e=n.getOid(i),t=this._context.attributeStore.createDisplayIdForObjectId(e),r=new n(this._context,i,e,t);this._tracks.set(i,r)}this._tracks.get(i).stageObservation(r,a)}}}for(let t of this._tracks.values()){let n=t.commitObservations(this._context.attributeStore,e,this._context.featureFilter?.timeExtent);for(let e of n)this._context.attributeStore.releaseDisplayIdForObjectId(e);t.updateStatistics(e,i(1,this._context.arcadeContextInfo))}}}_releaseState(e,t,n){for(let t of e)if(n.has(t.chunkId)){let e=t.reader.getCursor();for(;e.next();){let t=e.getObjectId();this._context.attributeStore.releaseDisplayIdForObjectId(t)}}for(let e of t.values())this._releaseTrack(e)}_releaseTrack(e){this._context.attributeStore.releaseDisplayIdForObjectId(e.objectId),e.latestObservationFeature!=null&&this._context.attributeStore.releaseDisplayIdForObjectId(e.latestObservationFeature.objectId)}}export{s as TrackLevelState};
2
+ import{isSome as e}from"../../../../../../core/arrayUtils.js";import{internalTrackPartField as t}from"../../../../../../layers/support/streamLayerUtils.js";import{Track as n}from"./Track.js";import{FeatureTileAppendMessage as r}from"../../sources/FeatureSourceMessage.js";import{createArcadeEvaluationOptions as i}from"../../support/arcadeUtils.js";import{FeatureSetReaderIndirect as a}from"../../support/FeatureSetReader.js";import{FeatureSetReaderJSON as o}from"../../support/FeatureSetReaderJSON.js";class s{constructor(e,t){this.level=e,this._context=t,this._chunks=[],this._tracks=new Map,this._handledChunks=new Set}destroy(){this._clear()}invalidate(){}removeTile(e){}update(e,t){let n=this._chunks,r=this._tracks,i=this._handledChunks;this._chunks=e,this._tracks=new Map,this._handledChunks=new Set,this._rebuildTracks(e),this._releaseState(n,r,i)}getDisplayIds(e){let t=new Set(e),n={};for(let e of this._tracks.values()){if(t.has(e.objectId)){n[e.objectId]=e.displayId;continue}let r=e.latestObservationFeature;if(r?.objectId!=null&&t.has(r.objectId))n[r.objectId]=r.displayId;else for(let r of e.observations())r.objectId!=null&&t.has(r.objectId)&&(n[r.objectId]=r.displayId)}return n}getDisplayFeatures(e){let t=new Set(e),n=[],r=[],i=this._chunks.map(e=>e.reader.getCursor());for(let e of this._tracks.values()){if(t.has(e.displayId)&&r.push(e.getTrackLineDisplayFeature()),e.latestObservationFeature!=null&&t.has(e.latestObservationFeature.displayId)){let{displayId:t,chunkIndex:r,featureIndex:a}=e.latestObservationRecord,o=i[r];o.setIndex(a),n.push({displayId:t,...o.readLegacyFeatureWorldSpace()})}for(let{displayId:r,chunkIndex:a,featureIndex:o}of e.observations())if(t.has(r)){let e=i[a];e.setIndex(o),n.push({displayId:r,...e.readLegacyFeatureWorldSpace()})}}return{features:n,aggregates:[],tracks:r}}getFeatureObjectIdsForAggregate(e){for(let t of this._tracks.values())if(t.objectId===e)return Array.from(t.observations(),e=>e.objectId);return[]}forEachAggregateWorldSpace(e){for(let t of this._tracks.values())e(t.getTrackLineOptimizedFeature())}createMessages(n,i,s,c){n.done=n.done||!s;let l=[],u=[];for(let e of this._tracks.values())if(e.length>0){if(this._context.schema.showLatestObservation){let t=e.getLatestObservationFeatureForTile(n);t!=null&&l.push(t)}this._context.schema.showTrackLine&&e.overlapsTile(n.subscription.tile)&&u.push(e.getTrackLineFeatureForTile(n))}let d=o.fromOptimizedFeatures(l,this._context.metadata,n.subscription.tile.transform),f=o.fromOptimizedFeatures(u,this._context.trackLineMetadata,n.subscription.tile.transform),p=[];if(this._context.schema.showPreviousObservations){let r=this._chunks.map(()=>[]);for(let e of this._tracks.values())for(let{chunkIndex:t,featureIndex:n}of e.previousObservations())r[t].push(n);p=this._chunks.map((e,i)=>{let o=n.subscription.tile,s;if(this._context.metadata.geometryType===`esriGeometryPolygon`){let t=e.reader.queryFeaturesInBounds(o.bounds);t.setTransformForDisplay(o.transform),s=t}else s=e.getTileReader(o);if(s==null)return null;let c=a.from(s,r[i]);return c.setProcessorAttributes({[t]:2}),(c.geometryType===`esriGeometryPoint`||c.getInTransform()==null)&&c.setTransformForDisplay(n.subscription.tile.transform),c}).filter(e)}c();let m=n.subscription.tile.createArcadeEvaluationOptions(this._context.arcadeContextInfo);this._context.attributeStore.setDataForReader(f,m,this._context.sqlOptions);for(let e of p)this._context.attributeStore.setDataForReader(e,m,this._context.sqlOptions);return this._context.attributeStore.setDataForReader(d,m,this._context.sqlOptions),[new r(n.subscription,f,!1,{}),...p.map(e=>new r(n.subscription,e,!1,{})),new r(n.subscription,d,n.done,{})]}_clear(){this._releaseState(this._chunks,this._tracks,this._handledChunks),this._chunks=[],this._tracks.clear(),this._handledChunks.clear()}_rebuildTracks(e){if(!e.length)return;let t=this._context.metadata.timeInfo?.trackIdField;if(t!=null){for(let r=0;r<e.length;r++){let i=e[r];if(i.lodInfo!=null&&i.lodInfo.level!==this.level||this._handledChunks.has(i.chunkId))continue;this._handledChunks.add(i.chunkId);let a=i.reader.getCursor();for(;a.next();){let e=a.getObjectId();a.setDisplayId(this._context.attributeStore.createDisplayIdForObjectId(e))}let o=e=>{let i=e.getObjectId(),a=e.readAttribute(t);if(a!=null&&i!=null){if(!this._tracks.has(a)){let e=n.getOid(a),t=this._context.attributeStore.createDisplayIdForObjectId(e),r=new n(this._context,a,e,t);this._tracks.set(a,r)}this._tracks.get(a).stageObservation(r,e)}};if(this._context.featureFilter!==null)this._context.featureFilter.forEachMatch(i.reader,this._context.sqlOptions,o);else{let e=i.reader.getCursor();for(;e.next();)o(e)}}for(let t of this._tracks.values()){let n=t.commitObservations(this._context.attributeStore,e,this._context.featureFilter?.timeExtent);for(let e of n)this._context.attributeStore.releaseDisplayIdForObjectId(e);t.updateStatistics(e,i(1,this._context.arcadeContextInfo))}}}_releaseState(e,t,n){for(let t of e)if(n.has(t.chunkId)){let e=t.reader.getCursor();for(;e.next();){let t=e.getObjectId();this._context.attributeStore.releaseDisplayIdForObjectId(t)}}for(let e of t.values())this._releaseTrack(e)}_releaseTrack(e){this._context.attributeStore.releaseDisplayIdForObjectId(e.objectId),e.latestObservationFeature!=null&&this._context.attributeStore.releaseDisplayIdForObjectId(e.latestObservationFeature.objectId)}}export{s as TrackLevelState};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{pt2px as e}from"../../../../../../core/screenUtils.js";import t from"../../../../../../layers/support/OrderByInfo.js";import{createLabelMatcherSchema as n}from"./LabelMatcherSchema.js";import{createMatcherSchema as r,createClassBreaksMatcherSchema as i}from"./MatcherSchema.js";import{createStorageSchema as a,createTrackStorageSchema as o}from"./StorageSchema.js";import{createVisualVariableUniforms as s}from"./VisualVariablesSchema.js";const c=e=>e.filter(({role:e})=>e===`highlight`),l=e=>e.find(({role:e})=>e===`visibility`)?.filters[0]??null;async function u(e,t,r){let i=t.renderer,a=s(i);return{symbology:r,labels:await n(e,t,a)}}async function d(e,t,n,r){let i=n.featureReduction;if(i)switch(i.type){case`binning`:return m(i,e,t,n,r);case`cluster`:return g(i,e,t,n,r)}if(n.trackInfo?.enabled)return _(n.trackInfo,e,t,n,r);e.symbolLayerDrawing=n.symbolLayerDrawing?.enabled?n.symbolLayerDrawing:null;let{symbology:a,storage:o}=await h(e,n.renderer,t.filters),s=v(n.orderBy,n.renderer,n.objectIdField),c=await u(e,n,a),l=b(c.symbology);return{storage:o,mesh:{properties:{sortKey:s,timeZone:t.timeZone,returnMeshObjectId:l,displayRefreshVersion:r,currentUser:t.currentUser},strategy:{type:`feature`},factory:c},expressionProperties:{timeExtent:t.timeExtent?.toJSON()}}}function f(e,t){return e.fields.map(e=>({...e.toJSON(),type:p(e,t)}))}function p(e,t){let{onStatisticExpression:n,onStatisticField:r,statisticType:i}=e;switch(i){case`min`:case`max`:case`avg`:case`avg_angle`:case`sum`:case`count`:return`esriFieldTypeDouble`;case`mode`:{if(n){let{returnType:e}=n;return e?e===`string`?`esriFieldTypeString`:`esriFieldTypeDouble`:`esriFieldTypeString`}let e=t.find(e=>e.name===r);return e?e.type:`esriFieldTypeString`}}}async function m(t,r,i,a,o){let u=f(t,a.fields),d=t.renderer,{symbology:p,storage:m}=await h(r,d,c(i.filters)),g=s(d),_=await n(r,{geometryType:`polygon`,labelingInfoSource:a.labelingInfoSource+`-binning`,labelingInfo:t.labelingInfo,labelsVisible:t.labelsVisible},g),v=b(p),y=t.binType===`geohash`?{type:`geohash`,fixBinLevel:t.fixedBinLevel??3}:{type:`grid`,size:e(t.size),fixedBinLevel:t.fixedBinLevel};return{storage:m,mesh:{properties:{sortKey:null,timeZone:i.timeZone,returnMeshObjectId:v,displayRefreshVersion:o,currentUser:i.currentUser},strategy:{type:`binning`,fields:u,index:y,featureFilter:l(i.filters)},factory:{labels:_,symbology:p}},expressionProperties:{timeExtent:i.timeExtent?.toJSON()}}}async function h(e,t,n){if(t?.type===`class-breaks`){let{symbology:r,matcherFilter:o}=await i(e,t);return{symbology:r,storage:a(t,n,o)}}return{symbology:await r(e,t),storage:a(t,n)}}async function g(t,i,o,u,d){let p=f(t,u.fields),m={type:`cluster`,feature:await r(i,t.effectiveFeatureRenderer),cluster:await r(i,t.effectiveClusterRenderer)},h=s(t.effectiveFeatureRenderer),g={type:`cluster`,feature:await n(i,u,h),cluster:await n(i,{geometryType:`point`,labelingInfoSource:u.labelingInfoSource+`-clusters`,labelingInfo:t.labelingInfo,labelsVisible:t.labelsVisible},h)},_=a(t.effectiveFeatureRenderer,c(o.filters)),v=b(m);return{storage:_,mesh:{properties:{sortKey:null,timeZone:o.timeZone,displayRefreshVersion:d,returnMeshObjectId:v,currentUser:o.currentUser},strategy:{type:`cluster`,fields:p,featureFilter:l(o.filters),clusterRadius:e(t.clusterRadius/2)},factory:{labels:g,symbology:m}},expressionProperties:{timeExtent:o.timeExtent?.toJSON()}}}async function _(e,t,i,a,u){let d=f(e,a.fields),p={type:`track`,previousObservation:await r(t,e.previousObservations.renderer),latestObservation:await r(t,e.latestObservations.renderer),trackLine:await r(t,e.trackLines.renderer)},m={type:`track`,previousObservation:await n(t,{geometryType:a.geometryType,labelingInfoSource:a.labelingInfoSource+`-track-prev`,labelingInfo:e.previousObservations.labelingInfo,labelsVisible:e.previousObservations.labelsVisible},s(e.previousObservations.renderer)),latestObservation:await n(t,{geometryType:a.geometryType,labelingInfoSource:a.labelingInfoSource+`-track-latest`,labelingInfo:e.latestObservations.labelingInfo,labelsVisible:e.latestObservations.labelsVisible},s(e.latestObservations.renderer)),trackLine:await n(t,{geometryType:`polyline`,labelingInfoSource:a.labelingInfoSource+`-track-line`,labelingInfo:e.trackLines.labelingInfo,labelsVisible:e.trackLines.labelsVisible},s(e.trackLines.renderer))},h=o(e,c(i.filters)),g=b(p);return{storage:h,mesh:{properties:{sortKey:null,timeZone:i.timeZone,returnMeshObjectId:g,displayRefreshVersion:u,currentUser:i.currentUser},strategy:{type:`track`,featureFilter:l(i.filters),fields:d,maxDisplayDuration:e.maxDisplayDuration?.toMilliseconds()??0,maxDisplayObservationsPerTrack:e.maxDisplayObservationsPerTrack,showLatestObservation:e.latestObservations.visible,showPreviousObservations:e.previousObservations.visible,showTrackLine:e.trackLines.visible,timeField:e.timeField},factory:{labels:m,symbology:p}},expressionProperties:{timeExtent:i.timeExtent?.toJSON()}}}function v(e,n,r){let i=n!=null&&n.type===`unique-value`&&n.orderByClassesEnabled;if(e==="default"&&!i&&(e=[new t({field:r,order:`descending`})]),e!=="default"&&e?.length){e.length;let t=e[0],n=t.order===`ascending`?`asc`:`desc`;return t.field?{field:t.field,order:n}:t.valueExpression?{expression:t.valueExpression,order:n}:null}return i?{byRenderer:!0,order:`asc`}:null}function y(e){return e.techniqueType===2}function b(e){return!!(e.type===`simple`&&e.meshes.some(y)||e.type===`interval`&&(e.intervals.some(e=>e.meshes.some(y)||e.alternateMeshes.some(y))||e.backgroundFill.some(y))||e.type===`map`&&(e.map.some(e=>e.meshes.some(y)||e.alternateMeshes.some(y))||e.backgroundFill.some(y)))}export{d as createSimpleProcessorSchema,f as getAggregateFields,v as getSortKey};
2
+ import{pt2px as e}from"../../../../../../core/screenUtils.js";import{kebabDict as t}from"../../../../../../layers/support/fieldType.js";import n from"../../../../../../layers/support/OrderByInfo.js";import{createLabelMatcherSchema as r}from"./LabelMatcherSchema.js";import{createMatcherSchema as i,createClassBreaksMatcherSchema as a}from"./MatcherSchema.js";import{createStorageSchema as o,createTrackStorageSchema as s}from"./StorageSchema.js";import{createVisualVariableUniforms as c}from"./VisualVariablesSchema.js";const l=e=>e.filter(({role:e})=>e===`highlight`),u=e=>e.find(({role:e})=>e===`visibility`)?.filters[0]??null;async function d(e,t,n){let i=t.renderer,a=c(i);return{symbology:n,labels:await r(e,t,a)}}async function f(e,t,n,r){let i=n.featureReduction;if(i)switch(i.type){case`binning`:return h(i,e,t,n,r);case`cluster`:return _(i,e,t,n,r)}if(n.trackInfo?.enabled)return v(n.trackInfo,e,t,n,r);e.symbolLayerDrawing=n.symbolLayerDrawing?.enabled?n.symbolLayerDrawing:null;let{symbology:a,storage:o}=await g(e,n.renderer,t.filters),s=y(n.orderBy,n.renderer,n.objectIdField),c=await d(e,n,a),l=x(c.symbology);return{storage:o,mesh:{properties:{sortKey:s,timeZone:t.timeZone,returnMeshObjectId:l,displayRefreshVersion:r,currentUser:t.currentUser},strategy:{type:`feature`},factory:c},expressionProperties:{timeExtent:t.timeExtent?.toJSON()}}}function p(e,t){return e.fields.map(e=>({...e.toJSON(),type:m(e,t)}))}function m(e,n){let{onStatisticExpression:r,onStatisticField:i,statisticType:a}=e;switch(a){case`min`:case`max`:case`avg`:case`avg_angle`:case`sum`:case`count`:return`esriFieldTypeDouble`;case`mode`:{if(r){let{returnType:e}=r;return e?e===`string`?`esriFieldTypeString`:`esriFieldTypeDouble`:`esriFieldTypeString`}let e=n.find(e=>e.name===i);return e?t.toJSON(e.type):`esriFieldTypeString`}}}async function h(t,n,i,a,o){let s=p(t,a.fields),d=t.renderer,{symbology:f,storage:m}=await g(n,d,l(i.filters)),h=c(d),_=await r(n,{geometryType:`polygon`,labelingInfoSource:a.labelingInfoSource+`-binning`,labelingInfo:t.labelingInfo,labelsVisible:t.labelsVisible},h),v=x(f),y=t.binType===`geohash`?{type:`geohash`,fixBinLevel:t.fixedBinLevel??3}:{type:`grid`,size:e(t.size),fixedBinLevel:t.fixedBinLevel};return{storage:m,mesh:{properties:{sortKey:null,timeZone:i.timeZone,returnMeshObjectId:v,displayRefreshVersion:o,currentUser:i.currentUser},strategy:{type:`binning`,fields:s,index:y,featureFilter:u(i.filters)},factory:{labels:_,symbology:f}},expressionProperties:{timeExtent:i.timeExtent?.toJSON()}}}async function g(e,t,n){if(t?.type===`class-breaks`){let{symbology:r,matcherFilter:i}=await a(e,t);return{symbology:r,storage:o(t,n,i)}}return{symbology:await i(e,t),storage:o(t,n)}}async function _(t,n,a,s,d){let f=p(t,s.fields),m={type:`cluster`,feature:await i(n,t.effectiveFeatureRenderer),cluster:await i(n,t.effectiveClusterRenderer)},h=c(t.effectiveFeatureRenderer),g={type:`cluster`,feature:await r(n,s,h),cluster:await r(n,{geometryType:`point`,labelingInfoSource:s.labelingInfoSource+`-clusters`,labelingInfo:t.labelingInfo,labelsVisible:t.labelsVisible},h)},_=o(t.effectiveFeatureRenderer,l(a.filters)),v=x(m);return{storage:_,mesh:{properties:{sortKey:null,timeZone:a.timeZone,displayRefreshVersion:d,returnMeshObjectId:v,currentUser:a.currentUser},strategy:{type:`cluster`,fields:f,featureFilter:u(a.filters),clusterRadius:e(t.clusterRadius/2)},factory:{labels:g,symbology:m}},expressionProperties:{timeExtent:a.timeExtent?.toJSON()}}}async function v(e,t,n,a,o){let d=p(e,a.fields),f={type:`track`,previousObservation:await i(t,e.previousObservations.renderer),latestObservation:await i(t,e.latestObservations.renderer),trackLine:await i(t,e.trackLines.renderer)},m={type:`track`,previousObservation:await r(t,{geometryType:a.geometryType,labelingInfoSource:a.labelingInfoSource+`-track-prev`,labelingInfo:e.previousObservations.labelingInfo,labelsVisible:e.previousObservations.labelsVisible},c(e.previousObservations.renderer)),latestObservation:await r(t,{geometryType:a.geometryType,labelingInfoSource:a.labelingInfoSource+`-track-latest`,labelingInfo:e.latestObservations.labelingInfo,labelsVisible:e.latestObservations.labelsVisible},c(e.latestObservations.renderer)),trackLine:await r(t,{geometryType:`polyline`,labelingInfoSource:a.labelingInfoSource+`-track-line`,labelingInfo:e.trackLines.labelingInfo,labelsVisible:e.trackLines.labelsVisible},c(e.trackLines.renderer))},h=s(e,l(n.filters)),g=x(f);return{storage:h,mesh:{properties:{sortKey:null,timeZone:n.timeZone,returnMeshObjectId:g,displayRefreshVersion:o,currentUser:n.currentUser},strategy:{type:`track`,featureFilter:u(n.filters),fields:d,maxDisplayDuration:e.maxDisplayDuration?.toMilliseconds()??0,maxDisplayObservationsPerTrack:e.maxDisplayObservationsPerTrack,showLatestObservation:e.latestObservations.visible,showPreviousObservations:e.previousObservations.visible,showTrackLine:e.trackLines.visible,timeField:e.timeField},factory:{labels:m,symbology:f}},expressionProperties:{timeExtent:n.timeExtent?.toJSON()}}}function y(e,t,r){let i=t!=null&&t.type===`unique-value`&&t.orderByClassesEnabled;if(e==="default"&&!i&&(e=[new n({field:r,order:`descending`})]),e!=="default"&&e?.length){e.length;let t=e[0],n=t.order===`ascending`?`asc`:`desc`;return t.field?{field:t.field,order:n}:t.valueExpression?{expression:t.valueExpression,order:n}:null}return i?{byRenderer:!0,order:`asc`}:null}function b(e){return e.techniqueType===2}function x(e){return!!(e.type===`simple`&&e.meshes.some(b)||e.type===`interval`&&(e.intervals.some(e=>e.meshes.some(b)||e.alternateMeshes.some(b))||e.backgroundFill.some(b))||e.type===`map`&&(e.map.some(e=>e.meshes.some(b)||e.alternateMeshes.some(b))||e.backgroundFill.some(b)))}export{f as createSimpleProcessorSchema,p as getAggregateFields,y as getSortKey};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{FeatureSpatialIndex as e}from"../../../FeatureSpatialIndex.js";import{GeohashSpatialIndex as t}from"../../../aggregation/GeohashSpatialIndex.js";import{GridSpatialIndex as n}from"../../../aggregation/GridSpatialIndex.js";import{FeatureSetReaderIndirect as r}from"../../../support/FeatureSetReaderIndirect.js";class i{size(){return this.reader.getSize()}get fields(){return this.reader.fields}invalidate(){this._spatialIndex=null,this._gridIndex=null,this._geohashIndex=null}get usedMemory(){let e=0;return e+=this.reader.underlyingMemory,this._gridIndex&&(e+=this._gridIndex.usedMemory),this._geohashIndex&&(e+=this._geohashIndex.usedMemory),this._spatialIndex&&(e+=this._spatialIndex.usedMemory),e}getObjectIds(){let e=this.reader.getCursor(),t=[];for(;e.next();)t.push(e.getObjectId());return t}registerOverrides(e){this.reader.registerOverrides(e),this.invalidate()}queryFeaturesInBounds(e){let t=this._getSpatialIndex().search(e);return r.from(this.reader,t)}getGridIndex(e){return e.hash!==this._gridIndex?.hash&&(this._gridIndex=new n(e,this.reader.copy())),this._gridIndex}getGeohashIndex(e){return e.hash!==this._geohashIndex?.hash&&(this._geohashIndex=new t(e,this.reader.copy())),this._geohashIndex}_getSpatialIndex(){return this._spatialIndex||=e.fromReader(this.reader),this._spatialIndex}}export{i as ASourceChunk};
2
+ class e{size(){return this.reader.getSize()}get fields(){return this.reader.fields}invalidate(){this.reader.invalidateAggregateIndices()}get usedMemory(){return this.reader.underlyingMemory}getObjectIds(){let e=this.reader.getCursor(),t=[];for(;e.next();)t.push(e.getObjectId());return t}registerOverrides(e){this.reader.registerOverrides(e),this.invalidate()}}export{e as ASourceChunk};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{ASourceChunk as e}from"./ASourceChunk.js";class t extends e{constructor(e,t){super(),this._reader=e,this._tile=t;let n=this._reader.getCursor();n.next();let r=n.getObjectId();this.chunkId=`${this._tile.key.id}.${r}${this.end?`e`:``}`,this.normalizedChunkId=this.chunkId}get reader(){return this._reader}get first(){return!1}get end(){return!1}get queryInfo(){return{type:`snapshot`,chunkId:this.chunkId,size:this.size(),end:this.end}}get lodInfo(){return null}get tile(){return this._tile}getTileReader(e){if(this._tile.key.id!==e.key.id)return null;let t=this.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}export{t as ByReferenceTileSourceChunk};
2
+ import{ASourceChunk as e}from"./ASourceChunk.js";class t extends e{constructor(e,t){super(),this._reader=e,this._tile=t;let n=this._reader.getCursor();n.next();let r=n.getObjectId();this.chunkId=`${this._tile.key.id}.${r}${this.end?`e`:``}`,this.normalizedChunkId=this.chunkId}get reader(){return this._reader}get first(){return!1}get end(){return!1}get queryInfo(){return{type:`snapshot`,chunkId:this.chunkId,size:this.size(),end:this.end}}get lodInfo(){return null}get tile(){return this._tile}getTileReader(e){if(this._tile.key.id!==e.key.id)return null;let t=this.reader.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}export{t as ByReferenceTileSourceChunk};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{ASourceChunk as e}from"./ASourceChunk.js";class t extends e{constructor(e,t,n,r,i=0){super(),this._reader=e,this._queryJSON=t,this._page=n,this._end=r,this.fileIndex=i,this.chunkId=`${this.fileIndex}.${this._page}${this.end?`e`:``}`,this.normalizedChunkId=this.chunkId}get reader(){return this._reader}get first(){return this._page===0}get end(){return this._end}get queryInfo(){return{type:`snapshot`,chunkId:this.chunkId,queryJSON:this._queryJSON,page:this._page,size:this.size(),end:this.end}}get lodInfo(){return null}getTileReader(e){let t=this.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}export{t as FeatureSnapshotSourceChunk};
2
+ import{ASourceChunk as e}from"./ASourceChunk.js";class t extends e{constructor(e,t,n,r,i=0){super(),this._reader=e,this._queryJSON=t,this._page=n,this._end=r,this.fileIndex=i,this.chunkId=`${this.fileIndex}.${this._page}${this.end?`e`:``}`,this.normalizedChunkId=this.chunkId}get reader(){return this._reader}get first(){return this._page===0}get end(){return this._end}get queryInfo(){return{type:`snapshot`,chunkId:this.chunkId,queryJSON:this._queryJSON,page:this._page,size:this.size(),end:this.end}}get lodInfo(){return null}getTileReader(e){let t=this.reader.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}export{t as FeatureSnapshotSourceChunk};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{parseWhereClause as e}from"../../../../../../../core/sql.js";import{ASourceChunk as t}from"./ASourceChunk.js";import{FeatureSetReaderJSON as n}from"../../../support/FeatureSetReaderJSON.js";const r=1e4;class i{static async create(t){let{metadata:n,definitionExpression:r}=t,a=r?await e(r,n.fieldsIndex):null;return new i(n,a,r)}constructor(e,t,n){this.metadata=e,this._clause=t,this._definitionExpression=n}get hash(){return this._definitionExpression}testFeature(e){return this._clause==null||this._clause.testFeature(e)}}class a{constructor(){this.modified=new Map,this.removed=new Set}modify(e){this.modified.set(e.objectId,e),this.removed.has(e.objectId)&&this.removed.delete(e.objectId)}remove(e){this.modified.delete(e),this.removed.add(e)}get isEmpty(){return this.modified.size===0&&this.removed.size===0}applyWhereClause(e){let t=new a;for(let[n,r]of this.modified)e.testFeature(r)?t.modified.set(n,r):t.removed.add(r.objectId);for(let e of this.removed)t.removed.add(e);return t}}class o extends t{constructor(e){super(),this._reader=e,this.chunkId=`override`,this.normalizedChunkId=`override`}static fromFeatures(e,t){let r=n.fromOptimizedFeatures(e,t);return new o(r)}get reader(){return this._reader}get queryInfo(){return{}}get first(){return!1}get end(){return!1}get lodInfo(){return null}getTileReader(e){if(!this._reader.getSize())return null;let t=this.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}class s{constructor(e,t){this.inner=e,this.isWeak=t,this.lastWeak=null}get isStrong(){return!this.isWeak}}class c{constructor(e){this._parameters=e,this._overrides=new Map,this._update=new a,this._lastCleanup=0}update(e){this._parameters=e}hasOverride(e){return this._overrides.has(e)}onChunkInsert(e){if(this._overrides.size){let t=e.reader.getCursor();for(;t.next();){let e=t.getObjectId(),n=this._overrides.get(e);if(n?.lastWeak&&(n.lastWeak=null),n?.isWeak){let e=t.readOptimizedFeatureWorldSpace();e.attributes={...n.inner?.attributes??{},...e.attributes},n.inner=e,this._update.modify(e),this.invalidate()}}}e.registerOverrides(this)}apply(e,t){let{updateWeak:n,removeWeak:r,update:i,remove:a,release:o}=e.commands;this.invalidate();for(let e of n){let t=new s(e,!0),n=this._overrides.get(e.objectId);n?.isStrong?n.lastWeak=t:(this._overrides.set(e.objectId,t),this._update.modify(e))}for(let e of i){let t=new s(e,!1),n=this._overrides.get(e.objectId);t.lastWeak=n?.isWeak?n:n?.lastWeak??null,this._overrides.set(e.objectId,t),this._update.modify(e)}for(let e of r){let t=new s(null,!0),n=this._overrides.get(e);n?.isStrong?n.lastWeak=t:(this._overrides.set(e,t),this._update.remove(e))}for(let e of a){let t=new s(null,!1),n=this._overrides.get(e);t.lastWeak=n?.isWeak?n:n?.lastWeak??null,this._overrides.set(e,t),this._update.remove(e)}if(o.length){let e=new Set;for(let t of o){let n=this._overrides.get(t);n?.lastWeak?(this._overrides.set(t,n.lastWeak),n.lastWeak.inner==null?this._update.remove(t):this._update.modify(n.lastWeak.inner)):n&&!n.isWeak&&(this._overrides.delete(t),e.add(t))}t.forEachUnsafe(t=>{let n=t.getObjectId();e.has(n)&&(this._update.modify(t.readOptimizedFeatureWorldSpace()),e.delete(n))});for(let t of e.values())this._update.remove(t)}}clearWeakOverrides(){for(let[e,t]of this._overrides.entries())t.isWeak&&this._overrides.delete(e);this.invalidate()}cleanup(e){if(this._overrides.size<r)return;let t=performance.now();if(t-this._lastCleanup<1e3)return;this._lastCleanup=t;let n=this._getWeakDeletions();if(!(n.size<r)){for(let t of e){let e=t.reader.withoutOverrides().getCursor();for(;e.next();){let t=e.getObjectId();n.delete(t)}}for(let e of n)this._overrides.delete(e);n.size&&this.invalidate()}}takeOverrideUpdate(){let e=this._update;return e.isEmpty?null:(this._update=new a,e.applyWhereClause(this._parameters))}asChunk(){let e=this._parameters;if(this._lastOverrideParametersHash!==e.hash&&(this._lastOverrideParametersHash=e.hash,this._chunk=null),!this._chunk){let t=[];for(let n of this._overrides.values())n.inner!=null&&e.testFeature(n.inner)&&t.push(n.inner);this._chunk=o.fromFeatures(t,e.metadata)}return this._chunk}invalidate(){this._chunk=null}putWeakObjectIdsFromGlobalIds(e,t,n){for(let[r,i]of this._overrides.entries())if(i.isWeak&&i.inner!=null){let a=i.inner.attributes[n];a&&t.has(a)&&!e.has(a)&&e.set(a,r)}else if(i.lastWeak!=null&&i.lastWeak.inner!=null){let a=i.lastWeak.inner.attributes[n];a&&t.has(a)&&!e.has(a)&&e.set(a,r)}}_getWeakDeletions(){let e=new Set;for(let[t,n]of this._overrides.entries())n.isWeak&&n.inner==null&&e.add(t);return e}}export{o as OverrideChunk,i as OverrideParameters,c as OverrideState,a as OverrideUpdate};
2
+ import{parseWhereClause as e}from"../../../../../../../core/sql.js";import{ASourceChunk as t}from"./ASourceChunk.js";import{FeatureSetReaderJSON as n}from"../../../support/FeatureSetReaderJSON.js";const r=1e4;class i{static async create(t){let{metadata:n,definitionExpression:r}=t,a=r?await e(r,n.fieldsIndex):null;return new i(n,a,r)}constructor(e,t,n){this.metadata=e,this._clause=t,this._definitionExpression=n}get hash(){return this._definitionExpression}testFeature(e){return this._clause==null||this._clause.testFeature(e)}}class a{constructor(){this.modified=new Map,this.removed=new Set}modify(e){this.modified.set(e.objectId,e),this.removed.has(e.objectId)&&this.removed.delete(e.objectId)}remove(e){this.modified.delete(e),this.removed.add(e)}get isEmpty(){return this.modified.size===0&&this.removed.size===0}applyWhereClause(e){let t=new a;for(let[n,r]of this.modified)e.testFeature(r)?t.modified.set(n,r):t.removed.add(r.objectId);for(let e of this.removed)t.removed.add(e);return t}}class o extends t{constructor(e){super(),this._reader=e,this.chunkId=`override`,this.normalizedChunkId=`override`}static fromFeatures(e,t){let r=n.fromOptimizedFeatures(e,t);return new o(r)}get reader(){return this._reader}get queryInfo(){return{}}get first(){return!1}get end(){return!1}get lodInfo(){return null}getTileReader(e){if(!this._reader.getSize())return null;let t=this.reader.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}class s{constructor(e,t){this.inner=e,this.isWeak=t,this.lastWeak=null}get isStrong(){return!this.isWeak}}class c{constructor(e){this._parameters=e,this._overrides=new Map,this._update=new a,this._lastCleanup=0}update(e){this._parameters=e}hasOverride(e){return this._overrides.has(e)}onChunkInsert(e){if(this._overrides.size){let t=e.reader.getCursor();for(;t.next();){let e=t.getObjectId(),n=this._overrides.get(e);if(n?.lastWeak&&(n.lastWeak=null),n?.isWeak){let e=t.readOptimizedFeatureWorldSpace();e.attributes={...n.inner?.attributes??{},...e.attributes},n.inner=e,this._update.modify(e),this.invalidate()}}}e.registerOverrides(this)}apply(e,t){let{updateWeak:n,removeWeak:r,update:i,remove:a,release:o}=e.commands;this.invalidate();for(let e of n){let t=new s(e,!0),n=this._overrides.get(e.objectId);n?.isStrong?n.lastWeak=t:(this._overrides.set(e.objectId,t),this._update.modify(e))}for(let e of i){let t=new s(e,!1),n=this._overrides.get(e.objectId);t.lastWeak=n?.isWeak?n:n?.lastWeak??null,this._overrides.set(e.objectId,t),this._update.modify(e)}for(let e of r){let t=new s(null,!0),n=this._overrides.get(e);n?.isStrong?n.lastWeak=t:(this._overrides.set(e,t),this._update.remove(e))}for(let e of a){let t=new s(null,!1),n=this._overrides.get(e);t.lastWeak=n?.isWeak?n:n?.lastWeak??null,this._overrides.set(e,t),this._update.remove(e)}if(o.length){let e=new Set;for(let t of o){let n=this._overrides.get(t);n?.lastWeak?(this._overrides.set(t,n.lastWeak),n.lastWeak.inner==null?this._update.remove(t):this._update.modify(n.lastWeak.inner)):n&&!n.isWeak&&(this._overrides.delete(t),e.add(t))}t.forEachUnsafe(t=>{let n=t.getObjectId();e.has(n)&&(this._update.modify(t.readOptimizedFeatureWorldSpace()),e.delete(n))});for(let t of e.values())this._update.remove(t)}}clearWeakOverrides(){for(let[e,t]of this._overrides.entries())t.isWeak&&this._overrides.delete(e);this.invalidate()}cleanup(e){if(this._overrides.size<r)return;let t=performance.now();if(t-this._lastCleanup<1e3)return;this._lastCleanup=t;let n=this._getWeakDeletions();if(!(n.size<r)){for(let t of e){let e=t.reader.withoutOverrides().getCursor();for(;e.next();){let t=e.getObjectId();n.delete(t)}}for(let e of n)this._overrides.delete(e);n.size&&this.invalidate()}}takeOverrideUpdate(){let e=this._update;return e.isEmpty?null:(this._update=new a,e.applyWhereClause(this._parameters))}asChunk(){let e=this._parameters;if(this._lastOverrideParametersHash!==e.hash&&(this._lastOverrideParametersHash=e.hash,this._chunk=null),!this._chunk){let t=[];for(let n of this._overrides.values())n.inner!=null&&e.testFeature(n.inner)&&t.push(n.inner);this._chunk=o.fromFeatures(t,e.metadata)}return this._chunk}invalidate(){this._chunk=null}putWeakObjectIdsFromGlobalIds(e,t,n){for(let[r,i]of this._overrides.entries())if(i.isWeak&&i.inner!=null){let a=i.inner.attributes[n];a&&t.has(a)&&!e.has(a)&&e.set(a,r)}else if(i.lastWeak!=null&&i.lastWeak.inner!=null){let a=i.lastWeak.inner.attributes[n];a&&t.has(a)&&!e.has(a)&&e.set(a,r)}}_getWeakDeletions(){let e=new Set;for(let[t,n]of this._overrides.entries())n.isWeak&&n.inner==null&&e.add(t);return e}}export{o as OverrideChunk,i as OverrideParameters,c as OverrideState,a as OverrideUpdate};