@agrotools1/at-components 0.2.4 → 0.2.5

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 (907) hide show
  1. package/dist/AGraphicContainer-d82e96aa.js +109 -0
  2. package/dist/APIKeyMixin-2ee64e59.js +19 -0
  3. package/dist/Analysis-449f84c5.js +31 -0
  4. package/dist/ArcGISCachedService-a838709f.js +47 -0
  5. package/dist/ArcGISService-7e5e8710.js +25 -0
  6. package/dist/AreaMeasurement2D-971dad40.js +405 -0
  7. package/dist/AreaMeasurement3D-48bc0242.js +488 -0
  8. package/dist/AttachmentInfo-ad88d558.js +34 -0
  9. package/dist/AttachmentQuery-c86dac15.js +18 -0
  10. package/dist/AttributeStore-3851ad0b.js +1707 -0
  11. package/dist/BaseDynamicLayerView2D-02baa49a.js +63 -0
  12. package/dist/BingMapsLayer-67c70069.js +112 -0
  13. package/dist/Bitmap-d455f554.js +128 -0
  14. package/dist/BitmapContainer-c78799ad.js +23 -0
  15. package/dist/BlendLayer-246e4998.js +13 -0
  16. package/dist/BoundsStore-b18f4e4e.js +63 -0
  17. package/dist/BufferObject-22d914df.js +100 -0
  18. package/dist/BufferView-5272765e.js +683 -0
  19. package/dist/BuildingSceneLayer-f08d5129.js +535 -0
  20. package/dist/Button-335b8469.js +36 -0
  21. package/dist/CSVLayer-40c0bd0e.js +208 -0
  22. package/dist/CSVSourceWorker-b8df4580.js +367 -0
  23. package/dist/CatalogDynamicGroupLayerView2D-3abd5c54.js +66 -0
  24. package/dist/CatalogFootprintLayerView2D-22c795e4.js +76 -0
  25. package/dist/CatalogLayer-74d18466.js +262 -0
  26. package/dist/CatalogLayerView2D-ffee45d8.js +52 -0
  27. package/dist/ClassBreaksDefinition-5a577d31.js +18 -0
  28. package/dist/ColorMaterial.glsl-bc384e65.js +64 -0
  29. package/dist/ColorSet-570396b9.js +45 -0
  30. package/dist/ColorStop-5009138a.js +29 -0
  31. package/dist/Container-f931e682.js +521 -0
  32. package/dist/CustomParametersMixin-9e8adcf6.js +12 -0
  33. package/dist/DefaultMaterial.glsl-092e1a97.js +42 -0
  34. package/dist/DefaultMaterial_COLOR_GAMMA-43e030be.js +653 -0
  35. package/dist/DefaultTheme-59d78c72.js +130 -0
  36. package/dist/DeleteForwardEditsParameters-8b5196fa.js +18 -0
  37. package/dist/DimensionLayer-6fc6ab12.js +129 -0
  38. package/dist/DirectLineMeasurement3D-6823c93d.js +449 -0
  39. package/dist/DistanceMeasurement2D-a6cf62b6.js +303 -0
  40. package/dist/DoubleArray-bb8ff0fb.js +25 -0
  41. package/dist/Dropdown/Filter/test.mocks.d.ts +1 -1
  42. package/dist/Dropdown/List/test.mocks.d.ts +1 -1
  43. package/dist/EdgeProcessingWorker-c5511714.js +63 -0
  44. package/dist/EditBusLayer-513ca203.js +107 -0
  45. package/dist/ElevationInfo-234040e3.js +56 -0
  46. package/dist/ElevationLayer-599949a0.js +129 -0
  47. package/dist/ElevationQuery-aaa7fb05.js +598 -0
  48. package/dist/ElevationSamplerWorker-07be3a80.js +62 -0
  49. package/dist/ExportImageParameters-b28e28df.js +66 -0
  50. package/dist/ExportStrategy-d6fd38ed.js +93 -0
  51. package/dist/ExportWMSImageParameters-be4cc5df.js +33 -0
  52. package/dist/External-55b35c8d.js +110 -0
  53. package/dist/FeatureCollectionSnappingSource-fce9fa91.js +130 -0
  54. package/dist/FeatureCommandQueue-4e426066.js +1244 -0
  55. package/dist/FeatureEffect-0a86f0ba.js +39 -0
  56. package/dist/FeatureEffectLayer-13705792.js +13 -0
  57. package/dist/FeatureFilter-1635b86a.js +27 -0
  58. package/dist/FeatureLayer-d2f8e7c0.js +693 -0
  59. package/dist/FeatureLayerBase-40e10dd6.js +148 -0
  60. package/dist/FeatureLayerSource-ebd2bea5.js +444 -0
  61. package/dist/FeatureLayerView2D-23240236.js +1967 -0
  62. package/dist/FeaturePipelineWorker-8d07a1dd.js +3633 -0
  63. package/dist/FeatureReductionLayer-55609d4e.js +225 -0
  64. package/dist/FeatureReductionSelection-2f351ee7.js +22 -0
  65. package/dist/FeatureServiceSnappingSource-513edf0d.js +481 -0
  66. package/dist/FeatureServiceSnappingSourceWorker-d6deecd4.js +747 -0
  67. package/dist/FeatureSet-ffd45984.js +188 -0
  68. package/dist/FeatureStore-9fd6c0f8.js +131 -0
  69. package/dist/FeatureTemplate-e4854302.js +12 -0
  70. package/dist/FeatureType-b4ef51c2.js +25 -0
  71. package/dist/FieldsIndex-91fb234a.js +109 -0
  72. package/dist/FormTemplate-67f4d44e.js +350 -0
  73. package/dist/GeoJSONLayer-e3495648.js +236 -0
  74. package/dist/GeoJSONSourceWorker-b0ee6d8e.js +247 -0
  75. package/dist/GeoRSSLayer-afac8cf1.js +73 -0
  76. package/dist/GeoRSSLayerView2D-b03f6564.js +140 -0
  77. package/dist/GeometryUtils-058e30f4.js +403 -0
  78. package/dist/GraphicContainer-d0803f7a.js +26 -0
  79. package/dist/GraphicManipulator-797ae6c6.js +1499 -0
  80. package/dist/GraphicsLayer-a30f80da.js +38 -0
  81. package/dist/GraphicsLayerView2D-0c92e0f2.js +114 -0
  82. package/dist/GraphicsSnappingSource-e928ab8c.js +273 -0
  83. package/dist/GraphicsView2D-963eb026.js +620 -0
  84. package/dist/GroupLayer-7f131ab8.js +147 -0
  85. package/dist/GroupLayerView2D-5fcc27fc.js +98 -0
  86. package/dist/HUDMaterial.glsl-3b450c01.js +65 -0
  87. package/dist/HighlightCounter-fda615cd.js +41 -0
  88. package/dist/HighlightGraphicContainer-8cfde780.js +18 -0
  89. package/dist/I3SBinaryReader-a4021fad.js +310 -0
  90. package/dist/I3SLayerDefinitions-f004f8b6.js +55 -0
  91. package/dist/I3SUtil-040e44af.js +59 -0
  92. package/dist/IdentityManager-012e74ca.js +899 -0
  93. package/dist/ImageHistogramParameters-f7c4c804.js +905 -0
  94. package/dist/ImageryLayer-c3f0176f.js +1799 -0
  95. package/dist/ImageryLayerView2D-5a14beb5.js +352 -0
  96. package/dist/ImageryTileLayer-a93e8471.js +2157 -0
  97. package/dist/ImageryTileLayerView2D-3e9fea94.js +1110 -0
  98. package/dist/Indices-f0dca4b5.js +67 -0
  99. package/dist/IntegratedMesh3DTilesLayer-7e70c76e.js +112 -0
  100. package/dist/IntegratedMeshLayer-2283f8d9.js +141 -0
  101. package/dist/InteractiveAnalysisViewModel-f0a0c72a.js +7397 -0
  102. package/dist/InterleavedLayout-9490090b.js +163 -0
  103. package/dist/KMLLayer-06b7037f.js +162 -0
  104. package/dist/KMLLayerView2D-59f96ec9.js +253 -0
  105. package/dist/KnowledgeGraphLayerView2D-6c8c4aae.js +43 -0
  106. package/dist/LRUCache-fc532e9b.js +32 -0
  107. package/dist/LabelClass-eae6271b.js +135 -0
  108. package/dist/LabelMetric-ee740bd1.js +400 -0
  109. package/dist/LaserlinePath.glsl-f58264f5.js +64 -0
  110. package/dist/Laserlines.glsl-14ab8523.js +65 -0
  111. package/dist/LayerFloorInfo-6ac1a57d.js +15 -0
  112. package/dist/LayerView-e41297e4.js +206 -0
  113. package/dist/LercWorker-22ed35b2.js +157 -0
  114. package/dist/LineOfSightLayer-6bf67bb7.js +147 -0
  115. package/dist/LinkChartLayer-e9a861f0.js +1027 -0
  116. package/dist/Lyr3DWorker-29f7a041.js +82 -0
  117. package/dist/MagnifierPrograms-1584f9b5.js +806 -0
  118. package/dist/MapImageLayer-b89cf158.js +169 -0
  119. package/dist/MapImageLayerView2D-e3f4a4cc.js +146 -0
  120. package/dist/MapNotesLayer-966f3446.js +283 -0
  121. package/dist/MapNotesLayerView2D-4aedef2a.js +161 -0
  122. package/dist/MapServiceLayerViewHelper-4f262166.js +288 -0
  123. package/dist/MeasurementWidgetContent-82971f95.js +2642 -0
  124. package/dist/MediaLayer-697a7c14.js +523 -0
  125. package/dist/MediaLayerView2D-64897044.js +332 -0
  126. package/dist/MemCache-0861cc28.js +227 -0
  127. package/dist/MemorySourceWorker-e1c531ac.js +222 -0
  128. package/dist/Mesh-44c8f6ba.js +980 -0
  129. package/dist/MeshLocalVertexSpace-6fe3a662.js +19 -0
  130. package/dist/MultiOriginJSONSupport-248453ac.js +158 -0
  131. package/dist/Notifications/index.d.ts +1 -0
  132. package/dist/OGCFeatureLayer-2daa0551.js +211 -0
  133. package/dist/OGCFeatureLayerView2D-7cebf7e0.js +82 -0
  134. package/dist/ObjectStack-424092a9.js +21 -0
  135. package/dist/Octree-21d216f2.js +495 -0
  136. package/dist/OpenStreetMapLayer-ade6fa9d.js +30 -0
  137. package/dist/OperationalLayer-097ad3e0.js +44 -0
  138. package/dist/OrderByInfo-e9ed942d.js +16 -0
  139. package/dist/OrderedLayer-fef2b56e.js +26 -0
  140. package/dist/OrientedImageryLayer-424a6234.js +216 -0
  141. package/dist/OverlayCompositing.glsl-1954a291.js +65 -0
  142. package/dist/OverrideHelper-f8aace2c.js +242 -0
  143. package/dist/PBFDecoderWorker-15cd639d.js +213 -0
  144. package/dist/PointCloudLayer-c820d269.js +197 -0
  145. package/dist/PointCloudUniqueValueRenderer-e7d37f08.js +115 -0
  146. package/dist/PointCloudWorker-3e28270d.js +212 -0
  147. package/dist/PooledRBush-e4cbf810.js +272 -0
  148. package/dist/Popup-2c03dbc0.js +3990 -0
  149. package/dist/PortalLayer-09e5a300.js +126 -0
  150. package/dist/Program-ed5a5aa3.js +694 -0
  151. package/dist/ProgramTemplate-976cfde1.js +35 -0
  152. package/dist/QueryEngine-8915348b.js +896 -0
  153. package/dist/QueryTask-f386d91d.js +119 -0
  154. package/dist/RasterSymbolizer-6177c6ec.js +3024 -0
  155. package/dist/RasterVFDisplayObject-6411b56f.js +581 -0
  156. package/dist/RasterWorker-f825daf0.js +78 -0
  157. package/dist/RawBlockCache-0d61962b.js +185 -0
  158. package/dist/RealisticTree.glsl-c9fd0d3c.js +42 -0
  159. package/dist/RefreshableLayer-0945a308.js +80 -0
  160. package/dist/RefreshableLayerView-4956f17c.js +16 -0
  161. package/dist/Relationship-9a82bd43.js +64 -0
  162. package/dist/RelationshipQuery-68ad49a7.js +22 -0
  163. package/dist/RenderingContext-49610ad9.js +889 -0
  164. package/dist/RibbonLine.glsl-6314f72e.js +65 -0
  165. package/dist/RouteLayer-ff5c8f33.js +786 -0
  166. package/dist/RouteLayerView2D-2cc60ad2.js +195 -0
  167. package/dist/SDFHelper-b08be611.js +140 -0
  168. package/dist/SSAO.glsl-0e92c4e5.js +43 -0
  169. package/dist/SSAOBlur.glsl-a2bb2587.js +42 -0
  170. package/dist/ScaleRangeLayer-ab226dbd.js +21 -0
  171. package/dist/SceneLayer-884ec175.js +542 -0
  172. package/dist/SceneLayerSnappingSource-aa2944b9.js +218 -0
  173. package/dist/SceneLayerSnappingSourceWorker-5616c206.js +112 -0
  174. package/dist/SceneLayerWorker-9745b8b5.js +164 -0
  175. package/dist/SceneService-da855dda.js +215 -0
  176. package/dist/Scheduler-b3c40220.js +373 -0
  177. package/dist/Search/test.mocks.d.ts +1 -1
  178. package/dist/Search/utils.d.ts +1 -1
  179. package/dist/ShadedColorMaterial.glsl-f953e894.js +64 -0
  180. package/dist/SnappingOperation-be595c42.js +48 -0
  181. package/dist/SourceLayerData-ec8ab72c.js +116 -0
  182. package/dist/SpatialFilter-7d64232d.js +1701 -0
  183. package/dist/Stop-c022e866.js +281 -0
  184. package/dist/StreamLayer-d603abd8.js +188 -0
  185. package/dist/StreamLayerView2D-6d6618cf.js +164 -0
  186. package/dist/StyleRepository-2f08de17.js +2212 -0
  187. package/dist/SublayersOwner-cc0e4f54.js +545 -0
  188. package/dist/SubtypeGroupLayer-bacf048d.js +514 -0
  189. package/dist/SubtypeGroupLayerView2D-b3ed2c1a.js +84 -0
  190. package/dist/TechniqueInstance-397b7dc2.js +233 -0
  191. package/dist/TemporalLayer-7844bd88.js +23 -0
  192. package/dist/Texture-b1727861.js +501 -0
  193. package/dist/TextureOnly.glsl-ffd4a7df.js +65 -0
  194. package/dist/Theme-12cb681b.js +3426 -0
  195. package/dist/Tick-25d07d27.js +723 -0
  196. package/dist/TileContainer-ab77d7a6.js +31 -0
  197. package/dist/TileInfoTilemapCache-3e97ab02.js +38 -0
  198. package/dist/TileLayer-03cfc8ab.js +194 -0
  199. package/dist/TileLayerView2D-3cfd6a21.js +187 -0
  200. package/dist/TilemapCache-36e3c4b7.js +189 -0
  201. package/dist/TimeInfo-cea2517f.js +42 -0
  202. package/dist/TimeOnly-5a143001.js +706 -0
  203. package/dist/Tooltip-2b4711cb.js +138 -0
  204. package/dist/TopFeaturesQuery-285284f1.js +32 -0
  205. package/dist/TurboLine-708823a3.js +565 -0
  206. package/dist/UniqueValueRenderer-3d92c0b9.js +1039 -0
  207. package/dist/UnknownLayer-d3dbe7c9.js +30 -0
  208. package/dist/UnknownTimeZone-ed4def19.js +15 -0
  209. package/dist/UnsupportedLayer-40bbb9f5.js +31 -0
  210. package/dist/UpdateTracking2D-23c8ff3f.js +8566 -0
  211. package/dist/Util-2ba07f64.js +57 -0
  212. package/dist/VectorTileLayer-ba191a02.js +544 -0
  213. package/dist/VectorTileLayerView2D-bd3971cd.js +2108 -0
  214. package/dist/Version-d45bee25.js +33 -0
  215. package/dist/VertexArrayObject-08a9d938.js +73 -0
  216. package/dist/VertexColor.glsl-cfafd4c9.js +2683 -0
  217. package/dist/VertexSnappingCandidate-cbae227c.js +13 -0
  218. package/dist/VideoLayerView2D-ec66c226.js +124 -0
  219. package/dist/VoxelLayer-888a65f9.js +631 -0
  220. package/dist/WFSLayer-786bdecd.js +221 -0
  221. package/dist/WFSSourceWorker-a212500b.js +157 -0
  222. package/dist/WGLContainer-f05c906a.js +5426 -0
  223. package/dist/WMSLayer-b2c46060.js +536 -0
  224. package/dist/WMSLayerView2D-a90672e9.js +117 -0
  225. package/dist/WMTSLayer-860b1a45.js +531 -0
  226. package/dist/WMTSLayerView2D-c492825d.js +142 -0
  227. package/dist/WebTileLayer-e178eb17.js +110 -0
  228. package/dist/WhereClause-ad3cc5ae.js +2766 -0
  229. package/dist/WorkerHandle-ef6ad49b.js +47 -0
  230. package/dist/WorkerTileHandler-c2b98dae.js +1539 -0
  231. package/dist/action-46ccf03a.js +198 -0
  232. package/dist/action-group-9785519d.js +145 -0
  233. package/dist/action-menu-f423306a.js +1759 -0
  234. package/dist/agrotools-theme.css +2 -2
  235. package/dist/agrotools-theme.css.map +1 -1
  236. package/dist/apng-66c828d8.js +392 -0
  237. package/dist/arcade-af30f385.js +229 -0
  238. package/dist/arcadeAsyncRuntime-fdce05e3.js +943 -0
  239. package/dist/arcadeUtils-2b5a1e68.js +8741 -0
  240. package/dist/arcgis-knowledge-client-core-192a1ac0.js +1218 -0
  241. package/dist/arcgis-knowledge-client-core-simd-4fb6c777.js +1218 -0
  242. package/dist/arcgisLayers-f43f9183.js +152 -0
  243. package/dist/associatedFeatureServiceUtils-15949591.js +92 -0
  244. package/dist/axisAngleDegrees-de05cd64.js +49 -0
  245. package/dist/basis_transcoder-6f118404.js +1248 -0
  246. package/dist/calcite-action-bar-9722a11e.js +303 -0
  247. package/dist/calcite-action-f5829479.js +22 -0
  248. package/dist/calcite-action-group-3e77994f.js +28 -0
  249. package/dist/calcite-button-8979d383.js +228 -0
  250. package/dist/calcite-flow-b50ce308.js +128 -0
  251. package/dist/calcite-flow-item-57549b16.js +499 -0
  252. package/dist/calcite-icon-fb43725c.js +16 -0
  253. package/dist/calcite-input-fcc054c7.js +24 -0
  254. package/dist/calcite-label-10d65c11.js +79 -0
  255. package/dist/calcite-list-2847bddc.js +2135 -0
  256. package/dist/calcite-list-item-53cde043.js +576 -0
  257. package/dist/calcite-list-item-group-256eb990.js +71 -0
  258. package/dist/calcite-loader-022a5436.js +14 -0
  259. package/dist/calcite-modal-5b1a23d9.js +333 -0
  260. package/dist/calcite-notice-17009704.js +181 -0
  261. package/dist/calcite-option-c7d00181.js +94 -0
  262. package/dist/calcite-scrim-1dced2db.js +18 -0
  263. package/dist/calcite-select-a96a55a3.js +231 -0
  264. package/dist/capabilities-3f86754a.js +50 -0
  265. package/dist/chartCommon-af8c14ae.js +256 -0
  266. package/dist/chartUtilsAm5-418cf95f.js +2954 -0
  267. package/dist/clientSideDefaults-2aad569c.js +39 -0
  268. package/dist/colorRamps-0fae1fde.js +38 -0
  269. package/dist/colorUtils-6d5e716b.js +164 -0
  270. package/dist/commonProperties-d1f695a2.js +60 -0
  271. package/dist/computeTranslationToOriginAndRotation-cba163ab.js +60 -0
  272. package/dist/conditionalSlot-14f35023.js +27 -0
  273. package/dist/createConnection-f3b9e606.js +299 -0
  274. package/dist/dataUtils-65604399.js +1421 -0
  275. package/dist/deduplicate-16f30199.js +89 -0
  276. package/dist/defaults-b7c93d2a.js +31 -0
  277. package/dist/deleteForwardEdits-f31f885d.js +13 -0
  278. package/dist/diffUtils-54c1c039.js +90 -0
  279. package/dist/drapedUtils-166cd4c2.js +75 -0
  280. package/dist/earcut-ffaa9a50.js +292 -0
  281. package/dist/edgeProcessing-1a2c4169.js +252 -0
  282. package/dist/editingSupport-ffa6f639.js +203 -0
  283. package/dist/editsZScale-2840378a.js +37 -0
  284. package/dist/elevationInfoUtils-c1caf596.js +126 -0
  285. package/dist/executeForIds-b9c9164b.js +14 -0
  286. package/dist/executeForTopCount-8a73aea7.js +17 -0
  287. package/dist/executeForTopExtents-a3d0b42e.js +17 -0
  288. package/dist/executeForTopIds-f14d5790.js +17 -0
  289. package/dist/executeQueryJSON-6cd89bed.js +15 -0
  290. package/dist/executeQueryPBF-e1d32cfc.js +152 -0
  291. package/dist/executeRelationshipQuery-5cadcb20.js +53 -0
  292. package/dist/executeTopFeaturesQuery-32dda453.js +18 -0
  293. package/dist/featureConversionUtils-a5f0b9b2.js +479 -0
  294. package/dist/featureLayerUtils-828813e8.js +250 -0
  295. package/dist/featureLayerUtils-9e9f97c1.js +142 -0
  296. package/dist/featureSetUtils-2f86a02f.js +2530 -0
  297. package/dist/featuresetbase-bb981400.js +707 -0
  298. package/dist/featuresetgeom-0185b49f.js +99 -0
  299. package/dist/featuresetstats-3d689b79.js +81 -0
  300. package/dist/featuresetstring-83733fad.js +95 -0
  301. package/dist/fetchService-25e9ba70.js +33 -0
  302. package/dist/fieldProperties-cd5649d9.js +33 -0
  303. package/dist/floatRGBA-005cc596.js +20 -0
  304. package/dist/form-41e8f739.js +138 -0
  305. package/dist/geohashUtils-776cae3b.js +85 -0
  306. package/dist/geojson-7ef69d00.js +208 -0
  307. package/dist/geomasync-43a66474.js +567 -0
  308. package/dist/geometryEngine-e18a460d.js +192 -0
  309. package/dist/geometryEngineAsync-ae21d4e2.js +217 -0
  310. package/dist/geometryEngineBase-d653892b.js +18463 -0
  311. package/dist/geometryEngineJSON-031f6196.js +46 -0
  312. package/dist/geometryEngineJSON-9aeb41cd.js +171 -0
  313. package/dist/geometryEngineWorker-1c2f96e6.js +11 -0
  314. package/dist/geometryServiceUtils-50afe031.js +28 -0
  315. package/dist/georeference-cf051555.js +291 -0
  316. package/dist/gif-3fe5f761.js +323 -0
  317. package/dist/gltfexport-3ec498d6.js +705 -0
  318. package/dist/groupLayerUtils-5b8e1f89.js +39 -0
  319. package/dist/heatmapUtils-b512588d.js +45 -0
  320. package/dist/highlightReasons-b0f772b2.js +19 -0
  321. package/dist/hydrated-36edecd6.js +40 -0
  322. package/dist/i3s-239f062a.js +809 -0
  323. package/dist/icon-5e93376e.js +127 -0
  324. package/dist/imageBitmapUtils-142daeaf.js +23 -0
  325. package/dist/imageUtils-27ed5e73.js +89 -0
  326. package/dist/imageUtils-901282e9.js +69 -0
  327. package/dist/imageryUtils-b1dd3a54.js +43 -0
  328. package/dist/index-6ebf29c1.js +43667 -0
  329. package/dist/index.d.ts +1 -0
  330. package/dist/index.js +15 -14
  331. package/dist/input-message-20d19cfb.js +92 -0
  332. package/dist/input2-8da11a51.js +575 -0
  333. package/dist/interactive-bcb1b82d.js +80 -0
  334. package/dist/jsonContext-45fce1e1.js +15 -0
  335. package/dist/jsonUtils-09f69988.js +86 -0
  336. package/dist/jsonUtils-1f447d0c.js +476 -0
  337. package/dist/jsonUtils-db906457.js +59 -0
  338. package/dist/kmlUtils-6412718d.js +112 -0
  339. package/dist/knowledgeGraphService-80890106.js +739 -0
  340. package/dist/knowledgegraph-475723f0.js +149 -0
  341. package/dist/labelUtils-85708580.js +61 -0
  342. package/dist/labelingInfo-62fc9d21.js +46 -0
  343. package/dist/layersCreator-a94b60fe.js +151 -0
  344. package/dist/layersLoader-39c74edb.js +197 -0
  345. package/dist/lazyLayerLoader-7922c10d.js +10 -0
  346. package/dist/lclayout-6ac84378.js +773 -0
  347. package/dist/lengthUtils-6a89d855.js +5 -0
  348. package/dist/lerc-wasm-b8b3cd2c.js +325 -0
  349. package/dist/libtess-61451fa0.js +269 -0
  350. package/dist/libtess-asm-fef1a4ca.js +3673 -0
  351. package/dist/lineSegment-f45db35c.js +76 -0
  352. package/dist/loadGLTFMesh-2f9cee21.js +181 -0
  353. package/dist/loadable-c29cb205.js +24 -0
  354. package/dist/loader-d9b4787f.js +79 -0
  355. package/dist/lyr3DWorker-33babc2c.js +2108 -0
  356. package/dist/mapViewDeps-f5b886c8.js +3052 -0
  357. package/dist/mediaLayerUtils-5a2c2fe8.js +35 -0
  358. package/dist/meshFeatureSet-2312bbe6.js +126 -0
  359. package/dist/meshVertexSpaceUtils-c9b69510.js +58 -0
  360. package/dist/multidimensionalUtils-e85f5a78.js +290 -0
  361. package/dist/normalizeUtilsSync-555b1847.js +181 -0
  362. package/dist/number-72e1a662.js +128 -0
  363. package/dist/objectResourceUtils-abe804cf.js +1455 -0
  364. package/dist/observers-f3bd3593.js +30 -0
  365. package/dist/ogcFeatureUtils-7097c17e.js +206 -0
  366. package/dist/openCloseComponent-67a2c20c.js +37 -0
  367. package/dist/orientedBoundingBox-4ae2c366.js +447 -0
  368. package/dist/parser-7a76caf9.js +488 -0
  369. package/dist/pbf-0b9b579c.js +215 -0
  370. package/dist/pbfQueryUtils-baba23c7.js +422 -0
  371. package/dist/pe-wasm-d080c07b.js +887 -0
  372. package/dist/persistable-82932da9.js +89 -0
  373. package/dist/perspectiveUtils-1b383b17.js +42 -0
  374. package/dist/pieChart-eca78f7c.js +555 -0
  375. package/dist/plane-84e27261.js +160 -0
  376. package/dist/popupUtils-b72d32fb.js +22 -0
  377. package/dist/popupUtils-cde1d105.js +50 -0
  378. package/dist/portalItemUtils-28314a3f.js +57 -0
  379. package/dist/portalLayers-eeaa6e57.js +312 -0
  380. package/dist/portalUtils-457f542e.js +7 -0
  381. package/dist/programUtils-0c20a48e.js +59 -0
  382. package/dist/project-1b5431dd.js +21 -0
  383. package/dist/projectPointToVector-1f1d1dc7.js +14 -0
  384. package/dist/projectVectorToVector-b7e757a1.js +13 -0
  385. package/dist/quantityUtils-b64583f9.js +33 -0
  386. package/dist/quantizationUtils-9e478e23.js +68 -0
  387. package/dist/quat-5502b70d.js +104 -0
  388. package/dist/query-b2397453.js +89 -0
  389. package/dist/queryAttachments-4361fd2f.js +39 -0
  390. package/dist/queryEngineUtils-f24bc98c.js +21 -0
  391. package/dist/queryTopFeatures-e06aa562.js +50 -0
  392. package/dist/queryZScale-b18ec359.js +12 -0
  393. package/dist/rasterProjectionHelper-935c256c.js +577 -0
  394. package/dist/rasterUtils-efad8a20.js +122 -0
  395. package/dist/rasterizingUtils-80de9b14.js +46 -0
  396. package/dist/request-cae502b7.js +46 -0
  397. package/dist/requestImageUtils-caebcf1e.js +8 -0
  398. package/dist/resourceExtension-7d14f4fc.js +17 -0
  399. package/dist/resourceUtils-8d97f5bf.js +42 -0
  400. package/dist/resourceUtils-be991ca4.js +69 -0
  401. package/dist/resourceUtils-fa1a565f.js +62 -0
  402. package/dist/saveAPIKeyUtils-9f0454db.js +8 -0
  403. package/dist/saveUtils-22a6caa6.js +24 -0
  404. package/dist/scaleUtils-ba5596ad.js +23 -0
  405. package/dist/scrim-5b1b6156.js +114 -0
  406. package/dist/serviceCapabilitiesUtils-3a47b26b.js +64 -0
  407. package/dist/sourceUtils-ded5acd6.js +71 -0
  408. package/dist/sphere-418b76df.js +199 -0
  409. package/dist/statsWorker-a082453a.js +37 -0
  410. package/dist/streamLayerUtils-22aa35f2.js +31 -0
  411. package/dist/style.css +1 -1
  412. package/dist/styleUtils-aa4777b6.js +75 -0
  413. package/dist/styleUtils-e5f7ddb7.js +14 -0
  414. package/dist/sublayerUtils-7c5ebfea.js +37 -0
  415. package/dist/substitute-da3c695d.js +52 -0
  416. package/dist/symbolColorUtils-5d3e355f.js +8 -0
  417. package/dist/symbolLayerUtils-47cdd4d1.js +31 -0
  418. package/dist/symbologySnappingCandidates-6ebf1df0.js +221 -0
  419. package/dist/t9n-c80e56d9.js +349 -0
  420. package/dist/testSVGPremultipliedAlpha-b9ff88ef.js +94 -0
  421. package/dist/timeSupport-8d2432f7.js +410 -0
  422. package/dist/triangle-07f96fb9.js +98 -0
  423. package/dist/unitConversionUtils-c1bfd22b.js +17 -0
  424. package/dist/unitFormatUtils-e75be0c3.js +40 -0
  425. package/dist/uploadAssetErrors-3493bdb9.js +70 -0
  426. package/dist/uploadAssets-24fe5279.js +330 -0
  427. package/dist/utils-17d83806.js +2746 -0
  428. package/dist/utils-717efd4b.js +73 -0
  429. package/dist/utils-74e8e651.js +433 -0
  430. package/dist/utils-7c8f1d3f.js +232 -0
  431. package/dist/utils-94cbe432.js +79 -0
  432. package/dist/utils-a76b92ed.js +34 -0
  433. package/dist/utils-e73651cf.js +419 -0
  434. package/dist/utils-f46de72c.js +91 -0
  435. package/dist/utils3-eb04cacb.js +75 -0
  436. package/dist/vec3-61daf837.js +81 -0
  437. package/dist/vec42-27060a00.js +125 -0
  438. package/dist/versionUtils-c9c03a5d.js +161 -0
  439. package/dist/visualVariableUtils-bc9bfef1.js +267 -0
  440. package/dist/webStyleSymbolUtils-0990caa8.js +48 -0
  441. package/dist/webglDeps-812387f7.js +23 -0
  442. package/dist/wfsUtils-fdccd660.js +343 -0
  443. package/dist/workerHelper-d8d5f17b.js +11 -0
  444. package/dist/xyChart-94c1ef04.js +3335 -0
  445. package/package.json +1 -1
  446. package/dist/AGraphicContainer-75e55bb8.js +0 -109
  447. package/dist/APIKeyMixin-688c6ac6.js +0 -19
  448. package/dist/Accordion/Accordion.d.ts +0 -49
  449. package/dist/Analysis-53f71911.js +0 -31
  450. package/dist/ArcGISCachedService-ea7559f0.js +0 -47
  451. package/dist/ArcGISService-a447176d.js +0 -25
  452. package/dist/AreaMeasurement2D-4d0db109.js +0 -405
  453. package/dist/AreaMeasurement3D-a2a10ea8.js +0 -488
  454. package/dist/AttachmentInfo-a2849bf0.js +0 -34
  455. package/dist/AttachmentQuery-e743e06f.js +0 -18
  456. package/dist/AttributeStore-6a3291d4.js +0 -1707
  457. package/dist/Avatar/Avatar.d.ts +0 -66
  458. package/dist/BaseDynamicLayerView2D-b3ff0eae.js +0 -63
  459. package/dist/BingMapsLayer-689d8e88.js +0 -112
  460. package/dist/Bitmap-e2b1f93c.js +0 -128
  461. package/dist/BitmapContainer-4dcc4a14.js +0 -23
  462. package/dist/BlendLayer-113fd3b8.js +0 -13
  463. package/dist/BoundsStore-3598604e.js +0 -63
  464. package/dist/BufferObject-59880a47.js +0 -100
  465. package/dist/BufferView-2cfe8c7d.js +0 -683
  466. package/dist/BuildingSceneLayer-a3e4a869.js +0 -535
  467. package/dist/Button/Button.d.ts +0 -82
  468. package/dist/Button-5e85250d.js +0 -36
  469. package/dist/CSVLayer-a68a64b8.js +0 -208
  470. package/dist/CSVSourceWorker-cf1fee99.js +0 -367
  471. package/dist/CatalogDynamicGroupLayerView2D-a4ae390f.js +0 -66
  472. package/dist/CatalogFootprintLayerView2D-145014a4.js +0 -76
  473. package/dist/CatalogLayer-48e7048b.js +0 -262
  474. package/dist/CatalogLayerView2D-8b4a4d47.js +0 -52
  475. package/dist/Checkbox/Checkbox.d.ts +0 -87
  476. package/dist/ClassBreaksDefinition-e2d8b3cc.js +0 -18
  477. package/dist/ColorMaterial.glsl-a7c70d21.js +0 -64
  478. package/dist/ColorSet-f4b34654.js +0 -45
  479. package/dist/ColorStop-1111f0fd.js +0 -29
  480. package/dist/Container-4a2d8bcd.js +0 -521
  481. package/dist/CustomParametersMixin-601866cc.js +0 -12
  482. package/dist/DataTable/Column/Column.d.ts +0 -36
  483. package/dist/DataTable/Counters/Counters.d.ts +0 -41
  484. package/dist/DataTable/DataTable.d.ts +0 -113
  485. package/dist/DefaultMaterial.glsl-9243ba6c.js +0 -42
  486. package/dist/DefaultMaterial_COLOR_GAMMA-bf0d97c7.js +0 -653
  487. package/dist/DefaultTheme-e96ad45b.js +0 -130
  488. package/dist/DeleteForwardEditsParameters-bd5164e3.js +0 -18
  489. package/dist/DimensionLayer-d51dcf5e.js +0 -129
  490. package/dist/DirectLineMeasurement3D-7b426a46.js +0 -449
  491. package/dist/DistanceMeasurement2D-1f05b105.js +0 -303
  492. package/dist/DoubleArray-4f276822.js +0 -25
  493. package/dist/Dropdown/Dropdown.core.d.ts +0 -31
  494. package/dist/Dropdown/List/Dropdown.List.d.ts +0 -84
  495. package/dist/EdgeProcessingWorker-317b2f9a.js +0 -63
  496. package/dist/EditBusLayer-55763028.js +0 -107
  497. package/dist/ElevationInfo-5be88917.js +0 -56
  498. package/dist/ElevationLayer-754634d4.js +0 -129
  499. package/dist/ElevationQuery-1e84df59.js +0 -598
  500. package/dist/ElevationSamplerWorker-1c01b3d8.js +0 -62
  501. package/dist/ExportImageParameters-e00a1031.js +0 -66
  502. package/dist/ExportStrategy-ba992e25.js +0 -93
  503. package/dist/ExportWMSImageParameters-395804ac.js +0 -33
  504. package/dist/External-77e767f4.js +0 -110
  505. package/dist/FeatureCollectionSnappingSource-d1435805.js +0 -130
  506. package/dist/FeatureCommandQueue-4db7f162.js +0 -1244
  507. package/dist/FeatureEffect-5b570804.js +0 -39
  508. package/dist/FeatureEffectLayer-171a9749.js +0 -13
  509. package/dist/FeatureFilter-db89ec09.js +0 -27
  510. package/dist/FeatureLayer-881827c7.js +0 -693
  511. package/dist/FeatureLayerBase-b410d8eb.js +0 -148
  512. package/dist/FeatureLayerSource-e5eba81e.js +0 -444
  513. package/dist/FeatureLayerView2D-107b4ed6.js +0 -1967
  514. package/dist/FeaturePipelineWorker-2b42d98d.js +0 -3633
  515. package/dist/FeatureReductionLayer-1f3f6a98.js +0 -225
  516. package/dist/FeatureReductionSelection-b0c4bcaf.js +0 -22
  517. package/dist/FeatureServiceSnappingSource-fde9a8da.js +0 -481
  518. package/dist/FeatureServiceSnappingSourceWorker-d4113c50.js +0 -747
  519. package/dist/FeatureSet-595ae550.js +0 -188
  520. package/dist/FeatureStore-87fbe804.js +0 -131
  521. package/dist/FeatureTemplate-c810cba6.js +0 -12
  522. package/dist/FeatureType-22de76b9.js +0 -25
  523. package/dist/FieldsIndex-390b005f.js +0 -109
  524. package/dist/FormTemplate-728de82d.js +0 -350
  525. package/dist/GeoJSONLayer-fbf5ee27.js +0 -236
  526. package/dist/GeoJSONSourceWorker-30cd4133.js +0 -247
  527. package/dist/GeoRSSLayer-2addf639.js +0 -73
  528. package/dist/GeoRSSLayerView2D-29c15edb.js +0 -140
  529. package/dist/GeometryUtils-80d3036a.js +0 -403
  530. package/dist/GraphicContainer-2b112072.js +0 -26
  531. package/dist/GraphicManipulator-84ac0573.js +0 -1499
  532. package/dist/GraphicsLayer-ee9f874e.js +0 -38
  533. package/dist/GraphicsLayerView2D-c5eda7d2.js +0 -114
  534. package/dist/GraphicsSnappingSource-3dd1e9b3.js +0 -273
  535. package/dist/GraphicsView2D-40686b59.js +0 -620
  536. package/dist/GroupLayer-fd168a3e.js +0 -147
  537. package/dist/GroupLayerView2D-f4078b54.js +0 -98
  538. package/dist/HUDMaterial.glsl-bea5cb7c.js +0 -65
  539. package/dist/HighlightCounter-b3b4b206.js +0 -41
  540. package/dist/HighlightGraphicContainer-c00c331b.js +0 -18
  541. package/dist/I3SBinaryReader-d3a26893.js +0 -310
  542. package/dist/I3SLayerDefinitions-2bea64c8.js +0 -55
  543. package/dist/I3SUtil-ab1a91f5.js +0 -59
  544. package/dist/IdentityManager-8e14d109.js +0 -899
  545. package/dist/ImageHistogramParameters-711f313f.js +0 -905
  546. package/dist/ImageryLayer-fbaf4d8c.js +0 -1799
  547. package/dist/ImageryLayerView2D-199eb1fd.js +0 -352
  548. package/dist/ImageryTileLayer-48671dc9.js +0 -2157
  549. package/dist/ImageryTileLayerView2D-8ac1ee64.js +0 -1110
  550. package/dist/Indices-2f9cf62d.js +0 -67
  551. package/dist/Input/Input.core.d.ts +0 -4709
  552. package/dist/IntegratedMesh3DTilesLayer-89d862a2.js +0 -112
  553. package/dist/IntegratedMeshLayer-53f792e4.js +0 -141
  554. package/dist/InteractiveAnalysisViewModel-d7dd665d.js +0 -7397
  555. package/dist/InterleavedLayout-ff67e161.js +0 -163
  556. package/dist/KMLLayer-7a4cfa2a.js +0 -162
  557. package/dist/KMLLayerView2D-d0874e8d.js +0 -253
  558. package/dist/KnowledgeGraphLayerView2D-70d956b2.js +0 -43
  559. package/dist/LRUCache-5bebd9a8.js +0 -32
  560. package/dist/LabelClass-63459c37.js +0 -135
  561. package/dist/LabelMetric-09a9cd38.js +0 -400
  562. package/dist/LaserlinePath.glsl-731dbba1.js +0 -64
  563. package/dist/Laserlines.glsl-26d42447.js +0 -65
  564. package/dist/LayerFloorInfo-5c67a822.js +0 -15
  565. package/dist/LayerView-405cecd2.js +0 -206
  566. package/dist/Legend/Legend.d.ts +0 -73
  567. package/dist/LercWorker-a7892aa0.js +0 -157
  568. package/dist/LineOfSightLayer-abad68f7.js +0 -147
  569. package/dist/LinkChartLayer-c36d2a81.js +0 -1027
  570. package/dist/Lyr3DWorker-8f4c6c50.js +0 -82
  571. package/dist/MagnifierPrograms-ddc85113.js +0 -806
  572. package/dist/Map/Map.d.ts +0 -26
  573. package/dist/MapImageLayer-04f4cdcb.js +0 -169
  574. package/dist/MapImageLayerView2D-712dd60f.js +0 -146
  575. package/dist/MapNotesLayer-83fcba8e.js +0 -283
  576. package/dist/MapNotesLayerView2D-f0ad0a82.js +0 -161
  577. package/dist/MapServiceLayerViewHelper-6c746a26.js +0 -288
  578. package/dist/MeasurementWidgetContent-fc0c1569.js +0 -2642
  579. package/dist/MediaLayer-05162eaf.js +0 -523
  580. package/dist/MediaLayerView2D-474c563b.js +0 -332
  581. package/dist/MemCache-8f96824a.js +0 -227
  582. package/dist/MemorySourceWorker-08562524.js +0 -222
  583. package/dist/Mesh-3208420e.js +0 -980
  584. package/dist/MeshLocalVertexSpace-59268d9e.js +0 -19
  585. package/dist/Modal/Modal.d.ts +0 -106
  586. package/dist/MultiOriginJSONSupport-365740bb.js +0 -158
  587. package/dist/OGCFeatureLayer-7201d1ee.js +0 -211
  588. package/dist/OGCFeatureLayerView2D-d242f130.js +0 -82
  589. package/dist/ObjectStack-bad354ab.js +0 -21
  590. package/dist/Octree-cbaefa65.js +0 -495
  591. package/dist/OpenStreetMapLayer-b3c8020b.js +0 -30
  592. package/dist/OperationalLayer-30f48d16.js +0 -44
  593. package/dist/OrderByInfo-9bd0a8fe.js +0 -16
  594. package/dist/OrderedLayer-2962d196.js +0 -26
  595. package/dist/OrientedImageryLayer-5d599e15.js +0 -216
  596. package/dist/OverlayCompositing.glsl-334c68d5.js +0 -65
  597. package/dist/OverrideHelper-7981ecc2.js +0 -242
  598. package/dist/PBFDecoderWorker-48f7e620.js +0 -213
  599. package/dist/Paginator/Paginator.d.ts +0 -43
  600. package/dist/PointCloudLayer-5b804571.js +0 -197
  601. package/dist/PointCloudUniqueValueRenderer-9ef1db42.js +0 -115
  602. package/dist/PointCloudWorker-9e88daea.js +0 -212
  603. package/dist/PooledRBush-afceba5f.js +0 -272
  604. package/dist/Popup-89e3fd56.js +0 -3990
  605. package/dist/PortalLayer-21d22eb9.js +0 -126
  606. package/dist/Program-09ee8c67.js +0 -694
  607. package/dist/ProgramTemplate-be811b23.js +0 -35
  608. package/dist/ProgressBar/ProgressBar.d.ts +0 -85
  609. package/dist/QueryEngine-810a7f24.js +0 -896
  610. package/dist/QueryTask-013cc810.js +0 -119
  611. package/dist/RadioButton/RadioButton.d.ts +0 -87
  612. package/dist/RasterSymbolizer-ae063ee7.js +0 -3024
  613. package/dist/RasterVFDisplayObject-fe2f7ea2.js +0 -581
  614. package/dist/RasterWorker-7efcbd4d.js +0 -78
  615. package/dist/RawBlockCache-5a644219.js +0 -185
  616. package/dist/RealisticTree.glsl-4e33ae57.js +0 -42
  617. package/dist/RefreshableLayer-e64dd0ee.js +0 -80
  618. package/dist/RefreshableLayerView-61f7dd9a.js +0 -16
  619. package/dist/Relationship-adcdce15.js +0 -64
  620. package/dist/RelationshipQuery-0c20b8ed.js +0 -22
  621. package/dist/RenderingContext-29b578ca.js +0 -889
  622. package/dist/RibbonLine.glsl-038f5cac.js +0 -65
  623. package/dist/RouteLayer-479e0ccc.js +0 -786
  624. package/dist/RouteLayerView2D-1a646f54.js +0 -195
  625. package/dist/SDFHelper-9abcbcca.js +0 -140
  626. package/dist/SSAO.glsl-5d41f99f.js +0 -43
  627. package/dist/SSAOBlur.glsl-7ebf8f5c.js +0 -42
  628. package/dist/ScaleRangeLayer-3bbd6ead.js +0 -21
  629. package/dist/SceneLayer-b19fa11e.js +0 -542
  630. package/dist/SceneLayerSnappingSource-f53ddd8a.js +0 -218
  631. package/dist/SceneLayerSnappingSourceWorker-80f48214.js +0 -112
  632. package/dist/SceneLayerWorker-bab8aeb0.js +0 -164
  633. package/dist/SceneService-0c4fac79.js +0 -215
  634. package/dist/Scheduler-9db9a8cf.js +0 -373
  635. package/dist/Search/Search.d.ts +0 -99
  636. package/dist/Select/Item/Item.d.ts +0 -104
  637. package/dist/Select/Multiple/Select.multiple.d.ts +0 -90
  638. package/dist/Select/Select.core.d.ts +0 -78
  639. package/dist/Select/Single/Select.single.d.ts +0 -66
  640. package/dist/ShadedColorMaterial.glsl-a2dd0bb3.js +0 -64
  641. package/dist/SnappingOperation-25ff52da.js +0 -48
  642. package/dist/SourceLayerData-ec301fa4.js +0 -116
  643. package/dist/SpatialFilter-351a1d5e.js +0 -1701
  644. package/dist/Stop-595501a7.js +0 -281
  645. package/dist/StreamLayer-d5ebd4d3.js +0 -188
  646. package/dist/StreamLayerView2D-8a39daaa.js +0 -164
  647. package/dist/StyleRepository-dd283243.js +0 -2212
  648. package/dist/SublayersOwner-0be88fd0.js +0 -545
  649. package/dist/SubtypeGroupLayer-8386c037.js +0 -514
  650. package/dist/SubtypeGroupLayerView2D-97b63aa1.js +0 -84
  651. package/dist/Tabs/Tab/Tab.d.ts +0 -69
  652. package/dist/Tabs/Tabs.d.ts +0 -50
  653. package/dist/Tag/Tag.d.ts +0 -52
  654. package/dist/TechniqueInstance-87f77cd3.js +0 -233
  655. package/dist/TemporalLayer-7c15b8a6.js +0 -23
  656. package/dist/Texture-c1f5f21b.js +0 -501
  657. package/dist/TextureOnly.glsl-acae1d94.js +0 -65
  658. package/dist/Theme-72a69427.js +0 -3426
  659. package/dist/Tick-d7f9b999.js +0 -723
  660. package/dist/TileContainer-20f11bc5.js +0 -31
  661. package/dist/TileInfoTilemapCache-a50aaed0.js +0 -38
  662. package/dist/TileLayer-ce04649f.js +0 -194
  663. package/dist/TileLayerView2D-0f45ff75.js +0 -187
  664. package/dist/TilemapCache-95b53d5a.js +0 -189
  665. package/dist/TimeInfo-f17e0ff9.js +0 -42
  666. package/dist/TimeOnly-63922f1a.js +0 -706
  667. package/dist/Tipograph/Paragraph/Paragraph.d.ts +0 -25
  668. package/dist/Tipograph/Title/Title.d.ts +0 -25
  669. package/dist/Toggle/Toggle.d.ts +0 -45
  670. package/dist/Tooltip-a21a6650.js +0 -138
  671. package/dist/TopFeaturesQuery-9e4228e7.js +0 -32
  672. package/dist/TurboLine-aeb14d6e.js +0 -565
  673. package/dist/UniqueValueRenderer-7532473e.js +0 -1039
  674. package/dist/UnknownLayer-99d4832b.js +0 -30
  675. package/dist/UnknownTimeZone-4c0a5184.js +0 -15
  676. package/dist/UnsupportedLayer-f439265c.js +0 -31
  677. package/dist/UpdateTracking2D-a1164b3d.js +0 -8566
  678. package/dist/Upload/Upload.d.ts +0 -206
  679. package/dist/Util-26f81cc4.js +0 -57
  680. package/dist/VectorTileLayer-8b5289d2.js +0 -544
  681. package/dist/VectorTileLayerView2D-00d98337.js +0 -2108
  682. package/dist/Version-2556ea28.js +0 -33
  683. package/dist/VertexArrayObject-5595c535.js +0 -73
  684. package/dist/VertexColor.glsl-01eb58bb.js +0 -2683
  685. package/dist/VertexSnappingCandidate-c1e2992a.js +0 -13
  686. package/dist/VideoLayerView2D-e92c8bab.js +0 -124
  687. package/dist/VoxelLayer-e57c2b7b.js +0 -631
  688. package/dist/WFSLayer-486fff2e.js +0 -221
  689. package/dist/WFSSourceWorker-3d8ac573.js +0 -157
  690. package/dist/WGLContainer-1441483b.js +0 -5426
  691. package/dist/WMSLayer-07ea95cc.js +0 -536
  692. package/dist/WMSLayerView2D-8b67d5da.js +0 -117
  693. package/dist/WMTSLayer-b52fbe0c.js +0 -531
  694. package/dist/WMTSLayerView2D-8ca1d522.js +0 -142
  695. package/dist/WebTileLayer-dd24dee2.js +0 -110
  696. package/dist/WhereClause-2eefa48c.js +0 -2766
  697. package/dist/WorkerHandle-f6b5ac7b.js +0 -47
  698. package/dist/WorkerTileHandler-e060fab5.js +0 -1539
  699. package/dist/action-a2d13907.js +0 -198
  700. package/dist/action-group-af071314.js +0 -145
  701. package/dist/action-menu-c759068f.js +0 -1759
  702. package/dist/apng-b33ce902.js +0 -392
  703. package/dist/arcade-b05c8c22.js +0 -229
  704. package/dist/arcadeAsyncRuntime-9b4a7891.js +0 -943
  705. package/dist/arcadeUtils-41691d12.js +0 -8741
  706. package/dist/arcgis-knowledge-client-core-2217ce57.js +0 -1218
  707. package/dist/arcgis-knowledge-client-core-simd-ab44590a.js +0 -1218
  708. package/dist/arcgisLayers-0ea0be85.js +0 -152
  709. package/dist/associatedFeatureServiceUtils-09077513.js +0 -92
  710. package/dist/axisAngleDegrees-1c3d7520.js +0 -49
  711. package/dist/basis_transcoder-292f1aaf.js +0 -1248
  712. package/dist/calcite-action-ad0d1e23.js +0 -22
  713. package/dist/calcite-action-bar-1b2de6d0.js +0 -303
  714. package/dist/calcite-action-group-aacf8ec4.js +0 -28
  715. package/dist/calcite-button-125cbd95.js +0 -228
  716. package/dist/calcite-flow-c9a6e8fa.js +0 -128
  717. package/dist/calcite-flow-item-eb314bb8.js +0 -499
  718. package/dist/calcite-icon-07f22bc6.js +0 -16
  719. package/dist/calcite-input-167be799.js +0 -24
  720. package/dist/calcite-label-7de34a6b.js +0 -79
  721. package/dist/calcite-list-2087f9ca.js +0 -2135
  722. package/dist/calcite-list-item-3419fb5f.js +0 -576
  723. package/dist/calcite-list-item-group-3a6545e3.js +0 -71
  724. package/dist/calcite-loader-16bcfb95.js +0 -14
  725. package/dist/calcite-modal-f608731f.js +0 -333
  726. package/dist/calcite-notice-88ee1edf.js +0 -181
  727. package/dist/calcite-option-375585a2.js +0 -94
  728. package/dist/calcite-scrim-751cf767.js +0 -18
  729. package/dist/calcite-select-62db97da.js +0 -231
  730. package/dist/capabilities-359df394.js +0 -50
  731. package/dist/chartCommon-cceb2530.js +0 -256
  732. package/dist/chartUtilsAm5-08a29408.js +0 -2954
  733. package/dist/clientSideDefaults-b5450c9b.js +0 -39
  734. package/dist/colorRamps-314c4b5a.js +0 -38
  735. package/dist/colorUtils-6e9b620c.js +0 -164
  736. package/dist/commonProperties-3399f319.js +0 -60
  737. package/dist/computeTranslationToOriginAndRotation-0b0f32ad.js +0 -60
  738. package/dist/conditionalSlot-012fd5da.js +0 -27
  739. package/dist/createConnection-f1189f51.js +0 -299
  740. package/dist/dataUtils-950a0ae9.js +0 -1421
  741. package/dist/deduplicate-eabb5f9e.js +0 -89
  742. package/dist/defaults-e5c5ee75.js +0 -31
  743. package/dist/deleteForwardEdits-ea9258ea.js +0 -13
  744. package/dist/diffUtils-04a71a59.js +0 -90
  745. package/dist/drapedUtils-2515520d.js +0 -75
  746. package/dist/earcut-192842ab.js +0 -292
  747. package/dist/edgeProcessing-da003f69.js +0 -252
  748. package/dist/editingSupport-9f04ba1b.js +0 -203
  749. package/dist/editsZScale-97938687.js +0 -37
  750. package/dist/elevationInfoUtils-e1edd62e.js +0 -126
  751. package/dist/executeForIds-3b8a1698.js +0 -14
  752. package/dist/executeForTopCount-6c6cd2f2.js +0 -17
  753. package/dist/executeForTopExtents-86851593.js +0 -17
  754. package/dist/executeForTopIds-24bc9dea.js +0 -17
  755. package/dist/executeQueryJSON-cf7d748b.js +0 -15
  756. package/dist/executeQueryPBF-ad416846.js +0 -152
  757. package/dist/executeRelationshipQuery-9b6666bf.js +0 -53
  758. package/dist/executeTopFeaturesQuery-4ac72bd2.js +0 -18
  759. package/dist/featureConversionUtils-67a121da.js +0 -479
  760. package/dist/featureLayerUtils-a4002773.js +0 -142
  761. package/dist/featureLayerUtils-a7e985d2.js +0 -250
  762. package/dist/featureSetUtils-11fcb3c4.js +0 -2530
  763. package/dist/featuresetbase-47894167.js +0 -707
  764. package/dist/featuresetgeom-bff2aa07.js +0 -99
  765. package/dist/featuresetstats-14a3fe2b.js +0 -81
  766. package/dist/featuresetstring-de2b64db.js +0 -95
  767. package/dist/fetchService-b6d76f5e.js +0 -33
  768. package/dist/fieldProperties-a9fbe289.js +0 -33
  769. package/dist/floatRGBA-2bc6800c.js +0 -20
  770. package/dist/form-e210eee8.js +0 -138
  771. package/dist/geohashUtils-085312a3.js +0 -85
  772. package/dist/geojson-f0bc401a.js +0 -208
  773. package/dist/geomasync-3c3b5e8d.js +0 -567
  774. package/dist/geometryEngine-2772790a.js +0 -192
  775. package/dist/geometryEngineAsync-db2e5674.js +0 -217
  776. package/dist/geometryEngineBase-8b327072.js +0 -18463
  777. package/dist/geometryEngineJSON-95268e88.js +0 -171
  778. package/dist/geometryEngineJSON-fc48a48b.js +0 -46
  779. package/dist/geometryEngineWorker-2fbc65f7.js +0 -11
  780. package/dist/geometryServiceUtils-ed9cb722.js +0 -28
  781. package/dist/georeference-f6f67e9b.js +0 -291
  782. package/dist/gif-a4043534.js +0 -323
  783. package/dist/gltfexport-d028c5c9.js +0 -705
  784. package/dist/groupLayerUtils-22dde377.js +0 -39
  785. package/dist/heatmapUtils-8e578a0a.js +0 -45
  786. package/dist/highlightReasons-ab23926f.js +0 -19
  787. package/dist/hydrated-219f2b0c.js +0 -40
  788. package/dist/i3s-b5ed4851.js +0 -809
  789. package/dist/icon-8711ff33.js +0 -127
  790. package/dist/imageBitmapUtils-dc97b3de.js +0 -23
  791. package/dist/imageUtils-0a71062a.js +0 -69
  792. package/dist/imageUtils-a4c7c9bf.js +0 -89
  793. package/dist/imageryUtils-d21fd540.js +0 -43
  794. package/dist/index-f28919b2.js +0 -43440
  795. package/dist/input-message-3df877b9.js +0 -92
  796. package/dist/input2-32e36924.js +0 -575
  797. package/dist/interactive-c1e1aeaf.js +0 -80
  798. package/dist/jsonContext-4622e179.js +0 -15
  799. package/dist/jsonUtils-9f58b7bb.js +0 -476
  800. package/dist/jsonUtils-d9bb6102.js +0 -86
  801. package/dist/jsonUtils-e40213c1.js +0 -59
  802. package/dist/kmlUtils-5f8f6cf6.js +0 -112
  803. package/dist/knowledgeGraphService-a34bf3b0.js +0 -739
  804. package/dist/knowledgegraph-68124c78.js +0 -149
  805. package/dist/labelUtils-3a1386e4.js +0 -61
  806. package/dist/labelingInfo-69c9f8f4.js +0 -46
  807. package/dist/layersCreator-5e6fe7f2.js +0 -151
  808. package/dist/layersLoader-f96735c7.js +0 -197
  809. package/dist/lazyLayerLoader-142515c4.js +0 -10
  810. package/dist/lclayout-639ec791.js +0 -773
  811. package/dist/lengthUtils-8796ccf3.js +0 -5
  812. package/dist/lerc-wasm-acb341bd.js +0 -325
  813. package/dist/libtess-a9e7192e.js +0 -269
  814. package/dist/libtess-asm-8de2fb72.js +0 -3673
  815. package/dist/lineSegment-2790f546.js +0 -76
  816. package/dist/loadGLTFMesh-33064e6d.js +0 -181
  817. package/dist/loadable-4558719f.js +0 -24
  818. package/dist/loader-4dbc522d.js +0 -79
  819. package/dist/lyr3DWorker-3365d66f.js +0 -2108
  820. package/dist/mapViewDeps-67ec1d27.js +0 -3052
  821. package/dist/mediaLayerUtils-612838fb.js +0 -35
  822. package/dist/meshFeatureSet-07b96756.js +0 -126
  823. package/dist/meshVertexSpaceUtils-673c2055.js +0 -58
  824. package/dist/multidimensionalUtils-79cc2536.js +0 -290
  825. package/dist/normalizeUtilsSync-9fd98ab4.js +0 -181
  826. package/dist/number-110986f5.js +0 -128
  827. package/dist/objectResourceUtils-1b8d1c03.js +0 -1455
  828. package/dist/observers-507c19a0.js +0 -30
  829. package/dist/ogcFeatureUtils-3c65f06a.js +0 -206
  830. package/dist/openCloseComponent-89dc4d35.js +0 -37
  831. package/dist/orientedBoundingBox-46d44acf.js +0 -447
  832. package/dist/parser-8f715684.js +0 -488
  833. package/dist/pbf-4ce99129.js +0 -215
  834. package/dist/pbfQueryUtils-23cca540.js +0 -422
  835. package/dist/pe-wasm-d186391a.js +0 -887
  836. package/dist/persistable-09062510.js +0 -89
  837. package/dist/perspectiveUtils-9da629d6.js +0 -42
  838. package/dist/pieChart-92709a5c.js +0 -555
  839. package/dist/plane-2b39f8eb.js +0 -160
  840. package/dist/popupUtils-dc099446.js +0 -22
  841. package/dist/popupUtils-e53c5c04.js +0 -50
  842. package/dist/portalItemUtils-39079445.js +0 -57
  843. package/dist/portalLayers-efcd5403.js +0 -312
  844. package/dist/portalUtils-44b1ac04.js +0 -7
  845. package/dist/programUtils-c22a40e2.js +0 -59
  846. package/dist/project-4759dc23.js +0 -21
  847. package/dist/projectPointToVector-1d9098bc.js +0 -14
  848. package/dist/projectVectorToVector-add01592.js +0 -13
  849. package/dist/quantityUtils-afe6e5b7.js +0 -33
  850. package/dist/quantizationUtils-51d3a038.js +0 -68
  851. package/dist/quat-22f56b72.js +0 -104
  852. package/dist/query-8cf3e12b.js +0 -89
  853. package/dist/queryAttachments-0a63ea2f.js +0 -39
  854. package/dist/queryEngineUtils-a1db57f0.js +0 -21
  855. package/dist/queryTopFeatures-b4fb05ad.js +0 -50
  856. package/dist/queryZScale-112cd8e3.js +0 -12
  857. package/dist/rasterProjectionHelper-3ae0fcfd.js +0 -577
  858. package/dist/rasterUtils-6868b6b6.js +0 -122
  859. package/dist/rasterizingUtils-922f43e7.js +0 -46
  860. package/dist/request-fd620c13.js +0 -46
  861. package/dist/requestImageUtils-f8f50ad7.js +0 -8
  862. package/dist/resourceExtension-f0327971.js +0 -17
  863. package/dist/resourceUtils-2e33090d.js +0 -69
  864. package/dist/resourceUtils-db0d7e83.js +0 -42
  865. package/dist/resourceUtils-ff5eafc3.js +0 -62
  866. package/dist/saveAPIKeyUtils-32bb955d.js +0 -8
  867. package/dist/saveUtils-d4ad8f94.js +0 -24
  868. package/dist/scaleUtils-a3ce8cc6.js +0 -23
  869. package/dist/scrim-7ef1cdf5.js +0 -114
  870. package/dist/serviceCapabilitiesUtils-cafdd4bc.js +0 -64
  871. package/dist/sourceUtils-1a30f8aa.js +0 -71
  872. package/dist/sphere-84d1e36b.js +0 -199
  873. package/dist/statsWorker-efb7a41b.js +0 -37
  874. package/dist/streamLayerUtils-4c5b417e.js +0 -31
  875. package/dist/styleUtils-8f0e3848.js +0 -75
  876. package/dist/styleUtils-a61894cc.js +0 -14
  877. package/dist/sublayerUtils-aaa67481.js +0 -37
  878. package/dist/substitute-7b4a925f.js +0 -52
  879. package/dist/symbolColorUtils-45615b74.js +0 -8
  880. package/dist/symbolLayerUtils-6ee325f3.js +0 -31
  881. package/dist/symbologySnappingCandidates-a56c7bbb.js +0 -221
  882. package/dist/t9n-b5ab99e4.js +0 -349
  883. package/dist/testSVGPremultipliedAlpha-a89a8569.js +0 -94
  884. package/dist/timeSupport-76d5ec0e.js +0 -410
  885. package/dist/triangle-95e355d3.js +0 -98
  886. package/dist/unitConversionUtils-b0c2c156.js +0 -17
  887. package/dist/unitFormatUtils-b79fea5c.js +0 -40
  888. package/dist/uploadAssetErrors-7ef907ce.js +0 -70
  889. package/dist/uploadAssets-99a2ec95.js +0 -330
  890. package/dist/utils-0da4a164.js +0 -419
  891. package/dist/utils-0e163cdb.js +0 -433
  892. package/dist/utils-421c60f9.js +0 -73
  893. package/dist/utils-6e4fc34d.js +0 -91
  894. package/dist/utils-9612bce6.js +0 -34
  895. package/dist/utils-99bb2971.js +0 -2746
  896. package/dist/utils-d1f92cf8.js +0 -79
  897. package/dist/utils-e30b7de3.js +0 -232
  898. package/dist/utils3-41d8e55d.js +0 -75
  899. package/dist/vec3-ab2339d6.js +0 -81
  900. package/dist/vec42-1a7bd7a6.js +0 -125
  901. package/dist/versionUtils-b6c13869.js +0 -161
  902. package/dist/visualVariableUtils-1a38c540.js +0 -267
  903. package/dist/webStyleSymbolUtils-6f89a405.js +0 -48
  904. package/dist/webglDeps-dcb6738a.js +0 -23
  905. package/dist/wfsUtils-d679c9b9.js +0 -343
  906. package/dist/workerHelper-8fb7376f.js +0 -11
  907. package/dist/xyChart-b3c4e27e.js +0 -3335
@@ -1,2530 +0,0 @@
1
- import { bR as ae, ez as Ue, ap as Be, z as G, c6 as M, aO as Me, dE as We, by as N, c1 as $e, W as Ve, iS as fe, e7 as Qe, U as B, c7 as Ze, bP as pe, ey as ze, bM as Je } from "./index-f28919b2.js";
2
- import { aw as re, ax as I, K as Ke, an as x, ao as _e, ap as ye, aq as ge, ar as me, as as we, aD as $, aE as ne, aF as Xe, aG as Y, N as Ye, aH as He, aI as V, aJ as et } from "./arcadeUtils-41691d12.js";
3
- import { x as R, s as D, a as T, n as L, t as A, r as tt } from "./WhereClause-2eefa48c.js";
4
- import { x as E, t as _, g as j, m as Q, a as k, y as it, L as st, w as X, E as Fe, T as Se, S as be, F as at, v as ve, p as rt, D as Z, I as nt, d as U, b as lt, f as ot, c as m } from "./SpatialFilter-351a1d5e.js";
5
- import { c as ut, a as dt, n as ht } from "./TimeOnly-63922f1a.js";
6
- import { x as xe, n as Ne } from "./MD5-1b5ec1c3.js";
7
- import { Z as ct } from "./FieldsIndex-390b005f.js";
8
- import v from "./FeatureLayer-881827c7.js";
9
- import Le from "./SubtypeGroupLayer-8386c037.js";
10
- import { u as Ie, i as Ce } from "./infoFor3D-bf4e6c95.js";
11
- import { a as ft, s as De } from "./executeQueryJSON-cf7d748b.js";
12
- import { n as pt } from "./executeQueryPBF-ad416846.js";
13
- import { d as _t } from "./FeatureSet-595ae550.js";
14
- import "./AttachmentInfo-a2849bf0.js";
15
- import "./AttachmentQuery-e743e06f.js";
16
- import { n as yt, s as gt } from "./executeForIds-3b8a1698.js";
17
- import "./pbf-4ce99129.js";
18
- import Te from "./RelationshipQuery-0c20b8ed.js";
19
- import "./TopFeaturesQuery-9e4228e7.js";
20
- import { n as mt } from "./FeatureType-22de76b9.js";
21
- let Ae = class {
22
- constructor() {
23
- this.declaredRootClass = "esri.arcade.featureSetCollection", this._layerById = {}, this._layerByName = {};
24
- }
25
- add(e, t, i) {
26
- this._layerById[t] = i, this._layerByName[e] = i;
27
- }
28
- async featureSetByName(e, t = !0, i = ["*"]) {
29
- return this._layerByName[e] === void 0 ? null : this._layerByName[e];
30
- }
31
- async featureSetById(e, t = !0, i = ["*"]) {
32
- return this._layerById[e] === void 0 ? null : this._layerById[e];
33
- }
34
- castToText(e = !1) {
35
- return "object, FeatureSetCollection";
36
- }
37
- }, Oe = class H extends E {
38
- constructor(e) {
39
- super(e), this.declaredClass = "esri.arcade.featureset.actions.AttributeFilter", this._maxProcessing = 1e3, this._parent = e.parentfeatureset, e.whereclause instanceof R ? (this._whereclause = e.whereclause, this._whereClauseFunction = null) : (this._whereClauseFunction = e.whereclause, this._whereclause = null);
40
- }
41
- _initialiseFeatureSet() {
42
- this._parent !== null ? (this.fields = this._parent.fields.slice(0), this.geometryType = this._parent.geometryType, this.objectIdField = this._parent.objectIdField, this.globalIdField = this._parent.globalIdField, this.spatialReference = this._parent.spatialReference, this.hasM = this._parent.hasM, this.hasZ = this._parent.hasZ, this.typeIdField = this._parent.typeIdField, this.types = this._parent.types, this.subtypeField = this._parent.subtypeField, this.subtypes = this._parent.subtypes) : (this.fields = [], this.typeIdField = "", this.subtypeField = "", this.objectIdField = "", this.globalIdField = "", this.spatialReference = new ae({ wkid: 4326 }), this.geometryType = re.point);
43
- }
44
- async _getSet(e) {
45
- if (this._wset === null) {
46
- await this._ensureLoaded();
47
- const t = await this._parent._getFilteredSet("", null, this._whereclause, null, e);
48
- return this._checkCancelled(e), this._whereClauseFunction !== null ? this._wset = new _(t._candidates.slice(0).concat(t._known.slice(0)), [], t._ordered, this._clonePageDefinition(t.pagesDefinition)) : this._wset = new _(t._candidates.slice(0), t._known.slice(0), t._ordered, this._clonePageDefinition(t.pagesDefinition)), this._wset;
49
- }
50
- return this._wset;
51
- }
52
- _isInFeatureSet(e) {
53
- var i;
54
- let t = (i = this._parent) == null ? void 0 : i._isInFeatureSet(e);
55
- return t === I.NotInFeatureSet ? t : (t = this._idstates[e], t === void 0 ? I.Unknown : t);
56
- }
57
- _getFeature(e, t, i) {
58
- return this._parent._getFeature(e, t, i);
59
- }
60
- _getFeatures(e, t, i, s) {
61
- return this._parent._getFeatures(e, t, i, s);
62
- }
63
- _featureFromCache(e) {
64
- return this._parent._featureFromCache(e);
65
- }
66
- executeWhereClause(e) {
67
- var t;
68
- return ((t = this._whereclause) == null ? void 0 : t.testFeature(e)) ?? !1;
69
- }
70
- async executeWhereClauseDeferred(e) {
71
- if (this._whereClauseFunction !== null) {
72
- const t = this._whereClauseFunction(e);
73
- return Ue(t), t;
74
- }
75
- return this.executeWhereClause(e);
76
- }
77
- async _fetchAndRefineFeatures(e, t, i) {
78
- var n, l, u;
79
- const s = new _([], e, !1, null), a = Math.min(t, e.length);
80
- if (await ((n = this._parent) == null ? void 0 : n._getFeatures(s, -1, a, i)), this._checkCancelled(i), this._whereClauseFunction == null) {
81
- for (let o = 0; o < a; o++) {
82
- const d = (l = this._parent) == null ? void 0 : l._featureFromCache(e[o]);
83
- this.executeWhereClause(d) === !0 ? this._idstates[e[o]] = I.InFeatureSet : this._idstates[e[o]] = I.NotInFeatureSet;
84
- }
85
- return "success";
86
- }
87
- const r = [];
88
- for (let o = 0; o < a; o++) {
89
- const d = (u = this._parent) == null ? void 0 : u._featureFromCache(e[o]);
90
- r.push(await this.executeWhereClauseDeferred(d));
91
- }
92
- for (let o = 0; o < t; o++)
93
- r[o] === !0 ? this._idstates[e[o]] = I.InFeatureSet : this._idstates[e[o]] = I.NotInFeatureSet;
94
- return "success";
95
- }
96
- async _getFilteredSet(e, t, i, s, a) {
97
- this._whereClauseFunction !== null || (i !== null ? this._whereclause !== null && (i = j(this._whereclause, i)) : i = this._whereclause), await this._ensureLoaded();
98
- const r = await this._parent._getFilteredSet(e, t, i, s, a);
99
- let n;
100
- return this._checkCancelled(a), n = this._whereClauseFunction !== null ? new _(r._candidates.slice(0).concat(r._known.slice(0)), [], r._ordered, this._clonePageDefinition(r.pagesDefinition)) : new _(r._candidates.slice(0), r._known.slice(0), r._ordered, this._clonePageDefinition(r.pagesDefinition)), n;
101
- }
102
- async _stat(e, t, i, s, a, r, n) {
103
- if (this._whereClauseFunction !== null)
104
- return a === null && i === "" && s === null ? this._manualStat(e, t, r, n) : { calculated: !1 };
105
- let l = this._whereclause;
106
- a !== null && this._whereclause !== null && (l = j(this._whereclause, a));
107
- const u = await this._parent._stat(e, t, i, s, l, r, n);
108
- return u.calculated === !1 ? a === null && i === "" && s === null ? this._manualStat(e, t, r, n) : { calculated: !1 } : u;
109
- }
110
- async _canDoAggregates(e, t, i, s, a) {
111
- return this._whereClauseFunction === null && (a !== null ? this._whereclause !== null && (a = j(this._whereclause, a)) : a = this._whereclause, this._parent !== null && this._parent._canDoAggregates(e, t, i, s, a));
112
- }
113
- async _getAggregatePagesDataSourceDefinition(e, t, i, s, a, r, n) {
114
- if (this._parent === null)
115
- throw new D(T.NeverReach);
116
- return a !== null ? this._whereclause !== null && (a = j(this._whereclause, a)) : a = this._whereclause, this._parent._getAggregatePagesDataSourceDefinition(e, t, i, s, a, r, n);
117
- }
118
- static registerAction() {
119
- E._featuresetFunctions.filter = function(e) {
120
- if (typeof e == "function")
121
- return new H({ parentfeatureset: this, whereclause: e });
122
- let t = null;
123
- return e instanceof R && (t = e), new H({ parentfeatureset: this, whereclause: t });
124
- };
125
- }
126
- getFieldsIndex() {
127
- return this._parent.getFieldsIndex();
128
- }
129
- }, J = class {
130
- constructor(e) {
131
- this.field = e, this.sqlRewritable = !1;
132
- }
133
- postInitialization(e, t) {
134
- }
135
- }, ee = class extends J {
136
- constructor(e) {
137
- super(e), this.sqlRewritable = !0;
138
- }
139
- extractValue(e) {
140
- return e.attributes[this.field.name];
141
- }
142
- rewriteSql(e) {
143
- return { rewritten: this.sqlRewritable, where: e };
144
- }
145
- }, wt = class extends J {
146
- constructor(e, t, i) {
147
- super(Ke(e)), this.originalField = e, this.sqlRewritable = !0, this.field.name = t, this.field.alias = i;
148
- }
149
- rewriteSql(e, t) {
150
- return { rewritten: this.sqlRewritable, where: Q(e, this.field.name, this.originalField.name, t.getFieldsIndex()) };
151
- }
152
- extractValue(e) {
153
- return e.attributes[this.originalField.name];
154
- }
155
- }, Ft = class F extends J {
156
- constructor(e, t, i) {
157
- super(e), this.codefield = t, this.lkp = i, this.reverseLkp = {};
158
- for (const s in i)
159
- this.reverseLkp[i[s]] = s;
160
- this.sqlRewritable = !0;
161
- }
162
- rewriteSql(e, t) {
163
- const i = this.evaluateNodeToWhereClause(e.parseTree, x.Standardised, this.field.name, this.codefield instanceof R ? k(this.codefield, x.Standardised) : this.codefield, e.parameters);
164
- return i.includes(F.BADNESS) ? { rewritten: !1, where: e } : { rewritten: this.sqlRewritable, where: R.create(i, t._parent.getFieldsIndex(), t.dateFieldsTimeZoneDefaultUTC) };
165
- }
166
- evaluateNodeToWhereClause(e, t, i = null, s = null, a) {
167
- let r, n, l, u;
168
- switch (e.type) {
169
- case "interval":
170
- return at(this.evaluateNodeToWhereClause(e.value, t, i, s, a), e.qualifier, e.op);
171
- case "case-expression": {
172
- let o = " CASE ";
173
- e.format === "simple" && (o += this.evaluateNodeToWhereClause(e.operand, t, i, F.BADNESS, a));
174
- for (let d = 0; d < e.clauses.length; d++)
175
- o += " WHEN " + this.evaluateNodeToWhereClause(e.clauses[d].operand, t, i, F.BADNESS, a) + " THEN " + this.evaluateNodeToWhereClause(e.clauses[d].value, t, i, F.BADNESS, a);
176
- return e.else !== null && (o += " ELSE " + this.evaluateNodeToWhereClause(e.else, t, i, F.BADNESS, a)), o += " END ", o;
177
- }
178
- case "parameter": {
179
- const o = a[e.value.toLowerCase()];
180
- if (typeof o == "string")
181
- return "'" + o.toString().replaceAll("'", "''") + "'";
182
- if (_e(o))
183
- return X(o, t);
184
- if (ye(o))
185
- return X(o, t);
186
- if (ge(o))
187
- return Fe(o, t);
188
- if (me(o))
189
- return Se(o, t);
190
- if (we(o))
191
- return be(o, t);
192
- if (o instanceof Array) {
193
- const d = [];
194
- for (let c = 0; c < o.length; c++)
195
- typeof o[c] == "string" ? d.push("'" + o[c].toString().replaceAll("'", "''") + "'") : _e(o[c]) || ye(o[c]) ? d.push(X(o[c], t)) : ge(o[c]) ? d.push(Fe(o[c], t)) : me(o[c]) ? d.push(Se(o[c], t)) : we(o[c]) ? d.push(be(o[c], t)) : d.push(o[c].toString());
196
- return d;
197
- }
198
- return o.toString();
199
- }
200
- case "expression-list":
201
- n = [];
202
- for (const o of e.value)
203
- n.push(this.evaluateNodeToWhereClause(o, t, i, s, a));
204
- return n;
205
- case "unary-expression":
206
- return " ( NOT " + this.evaluateNodeToWhereClause(e.expr, t, i, F.BADNESS, a) + " ) ";
207
- case "binary-expression":
208
- switch (e.operator) {
209
- case "AND":
210
- return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " AND " + this.evaluateNodeToWhereClause(e.right, t, i, s, a) + ") ";
211
- case "OR":
212
- return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " OR " + this.evaluateNodeToWhereClause(e.right, t, i, s, a) + ") ";
213
- case "IS":
214
- if (e.right.type !== "null")
215
- throw new L(A.UnsupportedIsRhs);
216
- return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IS NULL )";
217
- case "ISNOT":
218
- if (e.right.type !== "null")
219
- throw new L(A.UnsupportedIsRhs);
220
- return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IS NOT NULL )";
221
- case "IN":
222
- if (r = [], e.right.type === "expression-list") {
223
- if (e.left.type === "column-reference" && e.left.column.toUpperCase() === this.field.name.toUpperCase()) {
224
- const o = [];
225
- let d = !0;
226
- for (const c of e.right.value) {
227
- if (c.type !== "string") {
228
- d = !1;
229
- break;
230
- }
231
- if (this.lkp[c.value] === void 0) {
232
- d = !1;
233
- break;
234
- }
235
- o.push(this.lkp[c.value].toString());
236
- }
237
- if (d)
238
- return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IN (" + o.join(",") + ")) ";
239
- }
240
- return r = this.evaluateNodeToWhereClause(e.right, t, i, s, a), " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IN (" + r.join(",") + ")) ";
241
- }
242
- return u = this.evaluateNodeToWhereClause(e.right, t, i, s, a), u instanceof Array ? " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IN (" + u.join(",") + ")) " : " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IN (" + u + ")) ";
243
- case "NOT IN":
244
- if (r = [], e.right.type === "expression-list") {
245
- if (e.left.type === "column-reference" && e.left.column.toUpperCase() === this.field.name.toUpperCase()) {
246
- const o = [];
247
- let d = !0;
248
- for (const c of e.right.value) {
249
- if (c.type !== "string") {
250
- d = !1;
251
- break;
252
- }
253
- if (this.lkp[c.value] === void 0) {
254
- d = !1;
255
- break;
256
- }
257
- o.push(this.lkp[c.value].toString());
258
- }
259
- if (d)
260
- return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " NOT IN (" + o.join(",") + ")) ";
261
- }
262
- return r = this.evaluateNodeToWhereClause(e.right, t, i, s, a), " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " NOT IN (" + r.join(",") + ")) ";
263
- }
264
- return u = this.evaluateNodeToWhereClause(e.right, t, i, s, a), u instanceof Array ? " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " NOT IN (" + u.join(",") + ")) " : " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " NOT IN (" + u + ")) ";
265
- case "BETWEEN":
266
- return l = this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a), " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " BETWEEN " + l[0] + " AND " + l[1] + " ) ";
267
- case "NOTBETWEEN":
268
- return l = this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a), " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " NOT BETWEEN " + l[0] + " AND " + l[1] + " ) ";
269
- case "LIKE":
270
- return e.escape !== "" ? " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " LIKE " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + " ESCAPE '" + e.escape + "') " : " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " LIKE " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + ") ";
271
- case "NOT LIKE":
272
- return e.escape !== "" ? " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " NOT LIKE " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + " ESCAPE '" + e.escape + "') " : " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " NOT LIKE " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + ") ";
273
- case "<>":
274
- case "=":
275
- if (e.left.type === "column-reference" && e.right.type === "string") {
276
- if (e.left.column.toUpperCase() === this.field.name.toUpperCase() && this.lkp[e.right.value.toString()] !== void 0)
277
- return " (" + s + " " + e.operator + " " + this.lkp[e.right.value.toString()].toString() + ") ";
278
- } else if (e.right.type === "column-reference" && e.left.type === "string" && e.right.column.toUpperCase() === this.field.name.toUpperCase())
279
- return " (" + this.lkp[e.right.value.toString()].toString() + " " + e.operator + " " + s + ") ";
280
- return " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " " + e.operator + " " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + ") ";
281
- case "<":
282
- case ">":
283
- case ">=":
284
- case "<=":
285
- case "*":
286
- case "-":
287
- case "+":
288
- case "/":
289
- case "||":
290
- return " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " " + e.operator + " " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + ") ";
291
- }
292
- case "null":
293
- return "null";
294
- case "boolean":
295
- return e.value === !0 ? "1" : "0";
296
- case "string":
297
- return "'" + e.value.toString().replaceAll("'", "''") + "'";
298
- case "timestamp":
299
- return `timestamp '${e.value}'`;
300
- case "date":
301
- return `date '${e.value}'`;
302
- case "time":
303
- return `time '${e.value}'`;
304
- case "number":
305
- return e.value.toString();
306
- case "current-time":
307
- return st(e.mode === "date", t);
308
- case "column-reference":
309
- return i && i.toLowerCase() === e.column.toLowerCase() ? "(" + s + ")" : e.column;
310
- case "data-type":
311
- return e.value;
312
- case "function": {
313
- const o = this.evaluateNodeToWhereClause(e.args, t, i, F.BADNESS, a);
314
- return it(e.name, o, t);
315
- }
316
- }
317
- throw new L(A.UnsupportedSyntax, { node: e.type });
318
- }
319
- extractValue(e) {
320
- return this.codefield instanceof R ? this.reverseLkp[R.convertValueToStorageFormat(this.codefield.calculateValueCompiled(e))] : this.reverseLkp[e.attributes[this.codefield]];
321
- }
322
- };
323
- Ft.BADNESS = "_!!!_BAD_LKP_!!!!";
324
- class St extends J {
325
- constructor(e, t) {
326
- super(e), this._sql = t;
327
- }
328
- rewriteSql(e, t) {
329
- return { rewritten: !0, where: Q(e, this.field.name, k(this._sql, x.Standardised), t.getFieldsIndex()) };
330
- }
331
- extractValue(e) {
332
- return R.convertValueToStorageFormat(this._sql.calculateValueCompiled(e), this.field.type);
333
- }
334
- }
335
- class bt extends E {
336
- static findField(e, t) {
337
- for (const i of e)
338
- if (i.name.toLowerCase() === t.toString().toLowerCase())
339
- return i;
340
- return null;
341
- }
342
- constructor(e) {
343
- super(e), this._calcFunc = null, this.declaredClass = "esri.arcade.featureset.actions.Adapted", this.adaptedFields = [], this._extraFilter = null, this._extraFilter = e.extraFilter, this._parent = e.parentfeatureset, this._maxProcessing = 30, this.adaptedFields = e.adaptedFields;
344
- }
345
- _initialiseFeatureSet() {
346
- this._parent !== null ? (this.geometryType = this._parent.geometryType, this.objectIdField = this._parent.objectIdField, this.globalIdField = this._parent.globalIdField, this.spatialReference = this._parent.spatialReference, this.hasM = this._parent.hasM, this.hasZ = this._parent.hasZ, this.typeIdField = this._parent.typeIdField, this.types = this._parent.types) : (this.spatialReference = new ae({ wkid: 4326 }), this.objectIdField = "", this.globalIdField = "", this.geometryType = re.point, this.typeIdField = "", this.types = null, this.subtypeField = null, this.subtypes = null), this.fields = [];
347
- for (const e of this.adaptedFields)
348
- e.postInitialization(this, this._parent), this.fields.push(e.field);
349
- }
350
- async _getSet(e) {
351
- var t;
352
- if (this._wset === null) {
353
- await this._ensureLoaded();
354
- let i = null;
355
- return i = this._extraFilter ? await this._getFilteredSet("", null, null, null, e) : await ((t = this._parent) == null ? void 0 : t._getSet(e)), this._checkCancelled(e), Be(i), this._wset = new _(i._candidates.slice(0), i._known.slice(0), i._ordered, this._clonePageDefinition(i.pagesDefinition)), this._wset;
356
- }
357
- return this._wset;
358
- }
359
- _isInFeatureSet(e) {
360
- return this._parent._isInFeatureSet(e);
361
- }
362
- async _getFeatures(e, t, i, s) {
363
- var o, d;
364
- const a = [];
365
- t !== -1 && this._featureCache[t] === void 0 && a.push(t);
366
- const r = this._maxQueryRate();
367
- if (this._checkIfNeedToExpandKnownPage(e, r) === !0)
368
- return await this._expandPagedSet(e, r, 0, 0, s), this._getFeatures(e, t, i, s);
369
- let n = 0;
370
- for (let c = e._lastFetchedIndex; c < e._known.length && (n++, n <= i && (e._lastFetchedIndex += 1), !(this._featureCache[e._known[c]] === void 0 && (e._known[c] !== t && a.push(e._known[c]), a.length >= r))); c++)
371
- ;
372
- if (a.length === 0)
373
- return "success";
374
- e = new _([], a, e._ordered, null);
375
- const l = Math.min(a.length, i);
376
- await ((o = this._parent) == null ? void 0 : o._getFeatures(e, -1, l, s)), this._checkCancelled(s);
377
- const u = [];
378
- for (let c = 0; c < l; c++) {
379
- const f = (d = this._parent) == null ? void 0 : d._featureFromCache(a[c]);
380
- f !== void 0 && u.push({ geometry: f.geometry, attributes: f.attributes, id: a[c] });
381
- }
382
- for (const c of u) {
383
- const f = [];
384
- for (const y of this.adaptedFields)
385
- f[y.field.name] = y.extractValue(c);
386
- this._featureCache[c.id] = new G({ attributes: f, geometry: ut(c.geometry) });
387
- }
388
- return "success";
389
- }
390
- async _fetchAndRefineFeatures() {
391
- throw new D(T.NeverReach);
392
- }
393
- async _getFilteredSet(e, t, i, s, a) {
394
- let r = !1;
395
- const n = this._reformulateWithoutAdaptions(i);
396
- r = n.cannot, i = n.where;
397
- let l = !1;
398
- if (s !== null) {
399
- l = !0;
400
- const d = [];
401
- for (const c of this.adaptedFields)
402
- if (!(c instanceof ee) && s.scanForField(c.field.name) === !0) {
403
- if (!(c instanceof wt)) {
404
- s = null, l = !1;
405
- break;
406
- }
407
- d.push({ field: c.field.name, newfield: c.originalField.name });
408
- }
409
- s && d.length > 0 && (s = s.replaceFields(d));
410
- }
411
- i !== null ? this._extraFilter !== null && (i = j(this._extraFilter, i)) : i = this._extraFilter, await this._ensureLoaded();
412
- const u = await this._parent._getFilteredSet(e, t, i, s, a);
413
- let o;
414
- return this._checkCancelled(a), o = r === !0 ? new _(u._candidates.slice(0).concat(u._known.slice(0)), [], l === !0 && u._ordered, this._clonePageDefinition(u.pagesDefinition)) : new _(u._candidates.slice(0), u._known.slice(0), l === !0 && u._ordered, this._clonePageDefinition(u.pagesDefinition)), o;
415
- }
416
- _reformulateWithoutAdaptions(e) {
417
- const t = { cannot: !1, where: e };
418
- if (e !== null) {
419
- for (const i of this.adaptedFields)
420
- if (ve(e, i.field.name) === !0) {
421
- const s = i.rewriteSql(e, this);
422
- if (s.rewritten !== !0) {
423
- t.cannot = !0, t.where = null;
424
- break;
425
- }
426
- t.where = s.where;
427
- }
428
- }
429
- return t;
430
- }
431
- async _stat(e, t, i, s, a, r, n) {
432
- let l = !1, u = this._reformulateWithoutAdaptions(t);
433
- if (l = u.cannot, t = u.where, u = this._reformulateWithoutAdaptions(a), l = l || u.cannot, (a = u.where) !== null ? this._extraFilter !== null && (a = j(this._extraFilter, a)) : a = this._extraFilter, l === !0)
434
- return a === null && i === "" && s === null ? this._manualStat(e, t, r, n) : { calculated: !1 };
435
- const o = await this._parent._stat(e, t, i, s, a, r, n);
436
- return o.calculated === !1 ? a === null && i === "" && s === null ? this._manualStat(e, t, r, n) : { calculated: !1 } : o;
437
- }
438
- async _canDoAggregates(e, t, i, s, a) {
439
- if (this._parent === null)
440
- return !1;
441
- for (let l = 0; l < e.length; l++)
442
- for (const u of this.adaptedFields)
443
- if (e[l].toLowerCase() === u.field.name.toLowerCase() && !(u instanceof ee))
444
- return !1;
445
- const r = [];
446
- for (let l = 0; l < t.length; l++) {
447
- const u = t[l];
448
- if (u.workingexpr !== null) {
449
- const o = this._reformulateWithoutAdaptions(u.workingexpr);
450
- if (o.cannot)
451
- return !1;
452
- const d = u.clone();
453
- d.workingexpr = o.where, r.push(d);
454
- } else
455
- r.push(u);
456
- }
457
- const n = this._reformulateWithoutAdaptions(a);
458
- return !n.cannot && ((a = n.where) !== null ? this._extraFilter !== null && (a = j(this._extraFilter, a)) : a = this._extraFilter, this._parent._canDoAggregates(e, r, i, s, a));
459
- }
460
- async _getAggregatePagesDataSourceDefinition(e, t, i, s, a, r, n) {
461
- if (this._parent === null)
462
- throw new D(T.NeverReach);
463
- const l = [];
464
- for (let o = 0; o < t.length; o++) {
465
- const d = t[o];
466
- if (d.workingexpr !== null) {
467
- const c = this._reformulateWithoutAdaptions(d.workingexpr);
468
- if (c.cannot)
469
- throw new D(T.NeverReach);
470
- const f = d.clone();
471
- f.workingexpr = c.where, l.push(f);
472
- } else
473
- l.push(d);
474
- }
475
- const u = this._reformulateWithoutAdaptions(a);
476
- if (u.cannot)
477
- throw new D(T.NeverReach);
478
- return (a = u.where) !== null ? this._extraFilter !== null && (a = j(this._extraFilter, a)) : a = this._extraFilter, this._parent._getAggregatePagesDataSourceDefinition(e, l, i, s, a, r, n);
479
- }
480
- }
481
- function Re(h, e) {
482
- return h === e ? 0 : h === null ? -1 : e === null ? 1 : h < e ? -1 : 1;
483
- }
484
- class W {
485
- constructor(e) {
486
- const t = e.split(",");
487
- this._fields = [], this._directions = [];
488
- for (let i = 0; i < t.length; i++) {
489
- const s = t[i].match(/\S+/g);
490
- this._fields.push(s[0]), s.length === 2 ? s[1].toLowerCase() === "asc" ? this._directions.push(1) : this._directions.push(0) : this._directions.push(1);
491
- }
492
- }
493
- constructClause() {
494
- let e = "";
495
- for (let t = 0; t < this._fields.length; t++)
496
- t !== 0 && (e += ","), e += this._fields[t], this._directions[t] === 1 ? e += " ASC" : e += " DESC";
497
- return e;
498
- }
499
- order(e) {
500
- e.sort((t, i) => {
501
- for (let s = 0; s < this._fields.length; s++) {
502
- const a = this.featureValue(t.feature, this._fields[s], s), r = this.featureValue(i.feature, this._fields[s], s);
503
- let n = 0;
504
- if (n = this._directions[s] === 1 ? Re(a, r) : -1 * Re(a, r), n !== 0)
505
- return n;
506
- }
507
- return 0;
508
- });
509
- }
510
- scanForField(e) {
511
- for (let t = 0; t < this._fields.length; t++)
512
- if (this._fields[t].toLowerCase().trim() === e.toLowerCase().trim())
513
- return !0;
514
- return !1;
515
- }
516
- replaceFields(e) {
517
- let t = "";
518
- for (let i = 0; i < this._fields.length; i++) {
519
- i !== 0 && (t += ",");
520
- let s = this._fields[i];
521
- for (const a of e)
522
- if (s.toLowerCase() === a.field.toLowerCase()) {
523
- s = a.newfield;
524
- break;
525
- }
526
- t += s, this._directions[i] === 1 ? t += " ASC" : t += " DESC";
527
- }
528
- return new W(t);
529
- }
530
- featureValue(e, t, i) {
531
- const s = e.attributes[t];
532
- if (s !== void 0)
533
- return s;
534
- for (const a in e.attributes)
535
- if (t.toLowerCase() === a.toLowerCase())
536
- return this._fields[i] = a, e.attributes[a];
537
- return null;
538
- }
539
- }
540
- let te = class Ee extends E {
541
- constructor(e) {
542
- super(e), this._orderbyclause = null, this.declaredClass = "esri.arcade.featureset.actions.OrderBy", this._maxProcessing = 100, this._orderbyclause = e.orderbyclause, this._parent = e.parentfeatureset;
543
- }
544
- async _getSet(e) {
545
- if (this._wset === null) {
546
- await this._ensureLoaded();
547
- const t = await this._getFilteredSet("", null, null, this._orderbyclause, e);
548
- return this._checkCancelled(e), this._wset = t, this._wset;
549
- }
550
- return this._wset;
551
- }
552
- async manualOrderSet(e, t) {
553
- var a;
554
- const i = await this.getIdColumnDictionary(e, [], -1, t);
555
- (a = this._orderbyclause) == null || a.order(i);
556
- const s = new _([], [], !0, null);
557
- for (let r = 0; r < i.length; r++)
558
- s._known.push(i[r].id);
559
- return s;
560
- }
561
- async getIdColumnDictionary(e, t, i, s) {
562
- if (i < e._known.length - 1) {
563
- const a = this._maxQueryRate();
564
- if (e._known[i + 1] === "GETPAGES")
565
- return await $(this._parent._expandPagedSet(e, a, 0, 0, s)), this.getIdColumnDictionary(e, t, i, s);
566
- let r = i + 1;
567
- const n = [];
568
- for (; r < e._known.length && e._known[r] !== "GETPAGES"; )
569
- n.push(e._known[r]), r++;
570
- i += n.length;
571
- const l = await $(this._parent._getFeatureBatch(n, s));
572
- this._checkCancelled(s);
573
- for (const u of l)
574
- t.push({ id: u.attributes[this.objectIdField], feature: u });
575
- return this.getIdColumnDictionary(e, t, i, s);
576
- }
577
- return e._candidates.length > 0 ? (await $(this._refineSetBlock(e, this._maxProcessingRate(), s)), this._checkCancelled(s), this.getIdColumnDictionary(e, t, i, s)) : t;
578
- }
579
- _isInFeatureSet(e) {
580
- return this._parent._isInFeatureSet(e);
581
- }
582
- _getFeatures(e, t, i, s) {
583
- return this._parent._getFeatures(e, t, i, s);
584
- }
585
- _featureFromCache(e) {
586
- if (this._featureCache[e] === void 0) {
587
- const t = this._parent._featureFromCache(e);
588
- return t === void 0 ? void 0 : t === null ? null : (this._featureCache[e] = t, t);
589
- }
590
- return this._featureCache[e];
591
- }
592
- async _fetchAndRefineFeatures() {
593
- throw new D(T.NeverReach);
594
- }
595
- async _getFilteredSet(e, t, i, s, a) {
596
- await this._ensureLoaded();
597
- const r = await this._parent._getFilteredSet(e, t, i, s === null ? this._orderbyclause : s, a);
598
- this._checkCancelled(a);
599
- const n = new _(r._candidates.slice(0), r._known.slice(0), r._ordered, this._clonePageDefinition(r.pagesDefinition));
600
- let l = !0;
601
- if (r._candidates.length > 0 && (l = !1), n._ordered === !1) {
602
- let u = await this.manualOrderSet(n, a);
603
- return l === !1 && (t === null && i === null || (u = new _(u._candidates.slice(0).concat(u._known.slice(0)), [], u._ordered, this._clonePageDefinition(u.pagesDefinition)))), u;
604
- }
605
- return n;
606
- }
607
- static registerAction() {
608
- E._featuresetFunctions.orderBy = function(e) {
609
- return e === "" ? this : new Ee({ parentfeatureset: this, orderbyclause: new W(e) });
610
- };
611
- }
612
- getFieldsIndex() {
613
- return this._parent.getFieldsIndex();
614
- }
615
- };
616
- function It(h) {
617
- if (h.parseTree.type === "function") {
618
- if (h.parseTree.args.value.length === 0)
619
- return { name: h.parseTree.name, expr: null };
620
- if (h.parseTree.args.value.length > 1)
621
- throw new L(A.MissingStatisticParameters);
622
- const e = R.create(rt(h.parseTree.args.value[0], x.Standardised, h.parameters), h.fieldsIndex, h.timeZone);
623
- return { name: h.parseTree.name, expr: e };
624
- }
625
- return null;
626
- }
627
- let ke = class ie {
628
- constructor() {
629
- this.field = "", this.tofieldname = "", this.typeofstat = "MIN", this.workingexpr = null;
630
- }
631
- clone() {
632
- const e = new ie();
633
- return e.field = this.field, e.tofieldname = this.tofieldname, e.typeofstat = this.typeofstat, e.workingexpr = this.workingexpr, e;
634
- }
635
- static parseStatField(e, t, i, s) {
636
- const a = new ie();
637
- a.field = e;
638
- const r = R.create(t, i, s), n = It(r);
639
- if (n === null)
640
- throw new L(A.UnsupportedSqlFunction, { function: "" });
641
- const l = n.name.toUpperCase().trim();
642
- if (l === "MIN") {
643
- if (a.typeofstat = "MIN", a.workingexpr = n.expr, r === null)
644
- throw new L(A.InvalidFunctionParameters, { function: "min" });
645
- } else if (l === "MAX") {
646
- if (a.typeofstat = "MAX", a.workingexpr = n.expr, r === null)
647
- throw new L(A.InvalidFunctionParameters, { function: "max" });
648
- } else if (l === "COUNT")
649
- a.typeofstat = "COUNT", a.workingexpr = n.expr;
650
- else if (l === "STDEV") {
651
- if (a.typeofstat = "STDDEV", a.workingexpr = n.expr, r === null)
652
- throw new L(A.InvalidFunctionParameters, { function: "stdev" });
653
- } else if (l === "SUM") {
654
- if (a.typeofstat = "SUM", a.workingexpr = n.expr, r === null)
655
- throw new L(A.InvalidFunctionParameters, { function: "sum" });
656
- } else if (l === "MEAN") {
657
- if (a.typeofstat = "AVG", a.workingexpr = n.expr, r === null)
658
- throw new L(A.InvalidFunctionParameters, { function: l });
659
- } else if (l === "AVG") {
660
- if (a.typeofstat = "AVG", a.workingexpr = n.expr, r === null)
661
- throw new L(A.InvalidFunctionParameters, { function: "avg" });
662
- } else {
663
- if (l !== "VAR")
664
- throw new L(A.UnsupportedSqlFunction, { function: l });
665
- if (a.typeofstat = "VAR", a.workingexpr = n.expr, r === null)
666
- throw new L(A.InvalidFunctionParameters, { function: "var" });
667
- }
668
- return a;
669
- }
670
- toStatisticsName() {
671
- switch (this.typeofstat.toUpperCase()) {
672
- case "MIN":
673
- return "min";
674
- case "MAX":
675
- return "max";
676
- case "SUM":
677
- return "sum";
678
- case "COUNT":
679
- default:
680
- return "count";
681
- case "VAR":
682
- return "var";
683
- case "STDDEV":
684
- return "stddev";
685
- case "AVG":
686
- return "avg";
687
- }
688
- }
689
- };
690
- function Ct(h) {
691
- if (!h)
692
- return "COUNT";
693
- switch (h.toLowerCase()) {
694
- case "max":
695
- return "MAX";
696
- case "var":
697
- case "variance":
698
- return "VAR";
699
- case "avg":
700
- case "average":
701
- case "mean":
702
- return "AVG";
703
- case "min":
704
- return "MIN";
705
- case "sum":
706
- return "SUM";
707
- case "stdev":
708
- case "stddev":
709
- return "STDDEV";
710
- case "count":
711
- return "COUNT";
712
- }
713
- return "COUNT";
714
- }
715
- let Dt = class Pe extends E {
716
- constructor(e) {
717
- super(e), this._decodedStatsfield = [], this._decodedGroupbyfield = [], this._candosimplegroupby = !0, this.phsyicalgroupbyfields = [], this.objectIdField = "ROW__ID", this._internalObjectIdField = "ROW__ID", this._adaptedFields = [], this.declaredClass = "esri.arcade.featureset.actions.Aggregate", this._uniqueIds = 1, this._maxQuery = 10, this._maxProcessing = 10, this._parent = e.parentfeatureset, this._config = e;
718
- }
719
- isTable() {
720
- return !0;
721
- }
722
- async _getSet(e) {
723
- if (this._wset === null) {
724
- const t = await this._getFilteredSet("", null, null, null, e);
725
- return this._wset = t, this._wset;
726
- }
727
- return this._wset;
728
- }
729
- _isInFeatureSet() {
730
- return I.InFeatureSet;
731
- }
732
- _nextUniqueName(e) {
733
- for (; e["T" + this._uniqueIds.toString()] === 1; )
734
- this._uniqueIds++;
735
- const t = "T" + this._uniqueIds.toString();
736
- return e[t] = 1, t;
737
- }
738
- _convertToEsriFieldType(e) {
739
- return e;
740
- }
741
- _initialiseFeatureSet() {
742
- const e = {};
743
- let t = !1, i = 1;
744
- const s = this._parent ? this._parent.getFieldsIndex() : new ct([]);
745
- for (this.objectIdField = "ROW__ID", this.globalIdField = ""; t === !1; ) {
746
- let r = !1;
747
- for (let n = 0; n < this._config.groupbyfields.length; n++)
748
- if (this._config.groupbyfields[n].name.toLowerCase() === this.objectIdField.toLowerCase()) {
749
- r = !0;
750
- break;
751
- }
752
- if (r === !1) {
753
- for (let n = 0; n < this._config.statsfields.length; n++)
754
- if (this._config.statsfields[n].name.toLowerCase() === this.objectIdField.toLowerCase()) {
755
- r = !0;
756
- break;
757
- }
758
- }
759
- r === !1 ? t = !0 : (this.objectIdField = "ROW__ID" + i.toString(), i++);
760
- }
761
- for (const r of this._config.statsfields) {
762
- const n = new ke();
763
- n.field = r.name, n.tofieldname = r.name, n.workingexpr = r.expression instanceof R ? r.expression : R.create(r.expression, s, this.dateFieldsTimeZoneDefaultUTC), n.typeofstat = Ct(r.statistic), this._decodedStatsfield.push(n);
764
- }
765
- this._decodedGroupbyfield = [];
766
- for (const r of this._config.groupbyfields) {
767
- const n = { name: r.name, singlefield: null, tofieldname: r.name, expression: r.expression instanceof R ? r.expression : R.create(r.expression, s, this.dateFieldsTimeZoneDefaultUTC), sqlType: null };
768
- this._decodedGroupbyfield.push(n);
769
- }
770
- if (this._parent !== null) {
771
- this.geometryType = this._parent.geometryType, this.spatialReference = this._parent.spatialReference, this.hasM = this._parent.hasM, this.hasZ = this._parent.hasZ, this.typeIdField = "";
772
- for (const r of this._parent.fields)
773
- e[r.name.toUpperCase()] = 1;
774
- this.types = null, this.subtypes = null, this.subtypeField = "";
775
- } else
776
- this.geometryType = re.point, this.typeIdField = "", this.types = null, this.subtypes = null, this.subtypeField = "", this.spatialReference = new ae({ wkid: 4326 });
777
- this.fields = [];
778
- const a = new ke();
779
- a.field = this._nextUniqueName(e), a.tofieldname = this.objectIdField, a.workingexpr = R.create(this._parent.objectIdField, this._parent.getFieldsIndex(), this.dateFieldsTimeZoneDefaultUTC), a.typeofstat = "MIN", this._decodedStatsfield.push(a);
780
- for (const r of this._decodedGroupbyfield) {
781
- const n = new M();
782
- if (r.name = this._nextUniqueName(e), n.name = r.tofieldname, n.alias = n.name, Z(r.expression)) {
783
- const l = this._parent.getField(k(r.expression, x.Standardised));
784
- if (!l)
785
- throw new D(T.AggregationFieldNotFound);
786
- r.name = l.name, r.singlefield = l.name, this.phsyicalgroupbyfields.push(l.name), n.type = l.type, r.sqlType = l.type;
787
- } else {
788
- n.type = this._convertToEsriFieldType(nt(r.expression, this._parent.fields));
789
- const l = new M();
790
- l.name = r.name, l.alias = l.name, this.phsyicalgroupbyfields.push(r.name), this._adaptedFields.push(new St(l, r.expression)), this._candosimplegroupby = !1, r.sqlType = n.type;
791
- }
792
- this.fields.push(n);
793
- }
794
- if (this._adaptedFields.length > 0)
795
- for (const r of this._parent.fields)
796
- this._adaptedFields.push(new ee(r));
797
- for (let r = 0; r < this._decodedStatsfield.length; r++) {
798
- const n = new M();
799
- let l = null;
800
- const u = this._decodedStatsfield[r];
801
- u.field = this._nextUniqueName(e), u.tofieldname === this.objectIdField && (this._internalObjectIdField = u.field), n.name = u.tofieldname, n.alias = n.name;
802
- const o = u.workingexpr !== null && Z(u.workingexpr) ? k(u.workingexpr, x.Standardised) : "";
803
- switch (this._decodedStatsfield[r].typeofstat) {
804
- case "SUM":
805
- if (o !== "") {
806
- if (l = this._parent.getField(o), !l)
807
- throw new D(T.AggregationFieldNotFound);
808
- n.type = l.type;
809
- } else
810
- n.type = "double";
811
- break;
812
- case "MIN":
813
- case "MAX":
814
- if (o !== "") {
815
- if (l = this._parent.getField(o), !l)
816
- throw new D(T.AggregationFieldNotFound);
817
- n.type = l.type;
818
- } else
819
- n.type = "double";
820
- break;
821
- case "COUNT":
822
- n.type = "integer";
823
- break;
824
- case "STDDEV":
825
- case "VAR":
826
- case "AVG":
827
- if (o !== "" && (l = this._parent.getField(o), !l))
828
- throw new D(T.AggregationFieldNotFound);
829
- n.type = "double";
830
- }
831
- this.fields.push(n);
832
- }
833
- }
834
- async _canDoAggregates() {
835
- return !1;
836
- }
837
- async _getFeatures(e, t, i, s) {
838
- t !== -1 && this._featureCache[t];
839
- const a = this._maxQuery;
840
- return this._checkIfNeedToExpandKnownPage(e, a) === !0 ? (await this._expandPagedSet(e, a, 0, 0, s), this._getFeatures(e, t, i, s)) : "success";
841
- }
842
- async _getFilteredSet(e, t, i, s, a) {
843
- if (e !== "")
844
- return new _([], [], !0, null);
845
- let r = null;
846
- const n = { ordered: !1, nowhereclause: !1 };
847
- if (await this._ensureLoaded(), i !== null) {
848
- for (let u = 0; u < this._decodedStatsfield.length; u++)
849
- if (ve(i, this._decodedStatsfield[u].tofieldname) === !0) {
850
- n.nowhereclause = !0, i = null;
851
- break;
852
- }
853
- }
854
- if (s !== null) {
855
- n.ordered = !0;
856
- for (let u = 0; u < this._decodedStatsfield.length; u++)
857
- if (s.scanForField(this._decodedStatsfield[u].tofieldname) === !0) {
858
- s = null, n.ordered = !1;
859
- break;
860
- }
861
- if (s !== null) {
862
- for (const u of this._decodedGroupbyfield)
863
- if (u.singlefield === null && s.scanForField(u.tofieldname) === !0) {
864
- s = null, n.ordered = !1;
865
- break;
866
- }
867
- }
868
- }
869
- if (this._candosimplegroupby !== !1 && await this._parent._canDoAggregates(this.phsyicalgroupbyfields, this._decodedStatsfield, "", null, null)) {
870
- let u = null;
871
- i && (u = this._reformulateWhereClauseWithoutGroupByFields(i));
872
- let o = null;
873
- s && (o = this._reformulateOrderClauseWithoutGroupByFields(s));
874
- const d = await this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields, this._decodedStatsfield, "", null, u, o, this._internalObjectIdField);
875
- return this._checkCancelled(a), r = n.nowhereclause === !0 ? new _(d._candidates.slice(0).concat(d._known.slice(0)), [], n.ordered === !0 && d._ordered, this._clonePageDefinition(d.pagesDefinition)) : new _(d._candidates.slice(0), d._known.slice(0), n.ordered === !0 && d._ordered, this._clonePageDefinition(d.pagesDefinition)), r;
876
- }
877
- let l = this._parent;
878
- if (this._adaptedFields.length > 0 && (l = new bt({ parentfeatureset: this._parent, adaptedFields: this._adaptedFields, extraFilter: null })), n.nowhereclause === !0)
879
- r = new _(["GETPAGES"], [], !1, { aggregatefeaturesetpagedefinition: !0, resultOffset: 0, resultRecordCount: this._maxQuery, internal: { fullyResolved: !1, workingItem: null, type: "manual", iterator: null, set: [], subfeatureset: new te({ parentfeatureset: l, orderbyclause: new W(this.phsyicalgroupbyfields.join(",") + "," + this._parent.objectIdField + " ASC") }) } });
880
- else {
881
- let u = l;
882
- if (i !== null) {
883
- let o = null;
884
- i && (o = this._reformulateWhereClauseWithoutGroupByFields(i)), u = new Oe({ parentfeatureset: u, whereclause: o });
885
- }
886
- r = new _(["GETPAGES"], [], !1, { aggregatefeaturesetpagedefinition: !0, resultOffset: 0, resultRecordCount: this._maxQuery, internal: { fullyResolved: !1, workingItem: null, type: "manual", iterator: null, set: [], subfeatureset: new te({ parentfeatureset: u, orderbyclause: new W(this.phsyicalgroupbyfields.join(",") + "," + this._parent.objectIdField + " ASC") }) } });
887
- }
888
- return r;
889
- }
890
- _reformulateWhereClauseWithoutStatsFields(e) {
891
- for (const t of this._decodedStatsfield)
892
- e = Q(e, t.tofieldname, k(t.workingexpr, x.Standardised), this._parent.getFieldsIndex());
893
- return e;
894
- }
895
- _reformulateWhereClauseWithoutGroupByFields(e) {
896
- for (const t of this._decodedGroupbyfield)
897
- t.tofieldname !== t.name && (e = Q(e, t.tofieldname, k(t.expression, x.Standardised), this._parent.getFieldsIndex()));
898
- return e;
899
- }
900
- _reformulateOrderClauseWithoutGroupByFields(e) {
901
- const t = [];
902
- for (const i of this._decodedGroupbyfield)
903
- i.tofieldname !== i.name && t.push({ field: i.tofieldname, newfield: i.name });
904
- return t.length > 0 ? e.replaceFields(t) : e;
905
- }
906
- _clonePageDefinition(e) {
907
- return e === null ? null : e.aggregatefeaturesetpagedefinition === !0 ? { aggregatefeaturesetpagedefinition: !0, resultRecordCount: e.resultRecordCount, resultOffset: e.resultOffset, internal: e.internal } : this._parent._clonePageDefinition(e);
908
- }
909
- async _refineSetBlock(e, t, i) {
910
- return this._checkIfNeedToExpandCandidatePage(e, this._maxQuery) === !0 ? (await this._expandPagedSet(e, this._maxQuery, 0, 0, i), this._refineSetBlock(e, t, i)) : (this._checkCancelled(i), e._candidates.length, this._refineKnowns(e, t), e._candidates.length, e._candidates.length, e);
911
- }
912
- _expandPagedSet(e, t, i, s, a) {
913
- return this._expandPagedSetFeatureSet(e, t, i, s, a);
914
- }
915
- async _getPhysicalPage(e, t, i) {
916
- if (e.pagesDefinition.aggregatefeaturesetpagedefinition === !0)
917
- return this._sequentialGetPhysicalItem(e, e.pagesDefinition.resultRecordCount, i, []);
918
- const s = await this._getAgregagtePhysicalPage(e, t, i);
919
- for (const a of s) {
920
- const r = { geometry: a.geometry, attributes: {} }, n = {};
921
- for (const l in a.attributes)
922
- n[l.toLowerCase()] = a.attributes[l];
923
- for (const l of this._decodedGroupbyfield)
924
- r.attributes[l.tofieldname] = n[l.name.toLowerCase()];
925
- for (const l of this._decodedStatsfield)
926
- r.attributes[l.tofieldname] = n[l.field.toLowerCase()];
927
- this._featureCache[r.attributes[this.objectIdField]] = new G(r);
928
- }
929
- return s.length;
930
- }
931
- _sequentialGetPhysicalItem(e, t, i, s) {
932
- return new Promise((a, r) => {
933
- e.pagesDefinition.internal.iterator === null && (e.pagesDefinition.internal.iterator = e.pagesDefinition.internal.subfeatureset.iterator(i)), e.pagesDefinition.internal.fullyResolved === !0 || t === 0 ? a(s.length) : this._nextAggregateItem(e, t, i, s, (n) => {
934
- n === null ? a(s.length) : (t -= 1, a(this._sequentialGetPhysicalItem(e, t, i, s)));
935
- }, r);
936
- });
937
- }
938
- _nextAggregateItem(e, t, i, s, a, r) {
939
- try {
940
- $(e.pagesDefinition.internal.iterator.next()).then((n) => {
941
- if (n === null)
942
- if (e.pagesDefinition.internal.workingItem !== null) {
943
- const l = this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);
944
- s.push(l), e.pagesDefinition.internal.workingItem = null, e.pagesDefinition.internal.set.push(l.attributes[this.objectIdField]), e.pagesDefinition.internal.fullyResolved = !0, a(null);
945
- } else
946
- e.pagesDefinition.internal.fullyResolved = !0, a(null);
947
- else {
948
- const l = this._generateAggregateHash(n);
949
- if (e.pagesDefinition.internal.workingItem === null)
950
- e.pagesDefinition.internal.workingItem = { features: [n], id: l };
951
- else {
952
- if (l !== e.pagesDefinition.internal.workingItem.id) {
953
- const u = this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);
954
- return s.push(u), e.pagesDefinition.internal.workingItem = null, e.pagesDefinition.internal.set.push(u.attributes[this.objectIdField]), t -= 1, e.pagesDefinition.internal.workingItem = { features: [n], id: l }, void a(u);
955
- }
956
- e.pagesDefinition.internal.workingItem.features.push(n);
957
- }
958
- this._nextAggregateItem(e, t, i, s, a, r);
959
- }
960
- }, r);
961
- } catch (n) {
962
- r(n);
963
- }
964
- }
965
- _calculateFieldStat(e, t, i) {
966
- const s = [];
967
- for (let a = 0; a < e.features.length; a++)
968
- if (t.workingexpr !== null) {
969
- const r = t.workingexpr.calculateValue(e.features[a]);
970
- r !== null && (r instanceof dt || r instanceof ht ? s.push(r.toNumber()) : r instanceof tt ? s.push(r.toMilliseconds()) : s.push(r));
971
- } else
972
- s.push(null);
973
- switch (t.typeofstat) {
974
- case "MIN":
975
- i.attributes[t.tofieldname] = U("min", s, -1);
976
- break;
977
- case "MAX":
978
- i.attributes[t.tofieldname] = U("max", s, -1);
979
- break;
980
- case "SUM":
981
- i.attributes[t.tofieldname] = U("sum", s, -1);
982
- break;
983
- case "COUNT":
984
- i.attributes[t.tofieldname] = s.length;
985
- break;
986
- case "VAR":
987
- i.attributes[t.tofieldname] = U("var", s, -1);
988
- break;
989
- case "STDDEV":
990
- i.attributes[t.tofieldname] = U("stddev", s, -1);
991
- break;
992
- case "AVG":
993
- i.attributes[t.tofieldname] = U("avg", s, -1);
994
- }
995
- return !0;
996
- }
997
- _calculateAndAppendAggregateItem(e) {
998
- const t = { attributes: {}, geometry: null };
999
- for (const s of this._decodedGroupbyfield) {
1000
- const a = s.singlefield ? e.features[0].attributes[s.singlefield] : R.convertValueToStorageFormat(s.expression.calculateValue(e.features[0]), s.sqlType);
1001
- t.attributes[s.tofieldname] = a;
1002
- }
1003
- for (const s of this._decodedStatsfield)
1004
- this._calculateFieldStat(e, s, t);
1005
- const i = [];
1006
- for (let s = 0; s < this._decodedStatsfield.length; s++)
1007
- i.push(this._calculateFieldStat(e, this._decodedStatsfield[s], t));
1008
- return this._featureCache[t.attributes[this.objectIdField]] = new G({ attributes: t.attributes, geometry: t.geometry }), t;
1009
- }
1010
- _generateAggregateHash(e) {
1011
- let t = "";
1012
- for (const i of this._decodedGroupbyfield) {
1013
- const s = i.singlefield ? e.attributes[i.singlefield] : i.expression.calculateValue(e);
1014
- t += s == null ? ":" : ":" + s.toString();
1015
- }
1016
- return xe(t, Ne.String);
1017
- }
1018
- async _stat() {
1019
- return { calculated: !1 };
1020
- }
1021
- async getFeatureByObjectId() {
1022
- return null;
1023
- }
1024
- static registerAction() {
1025
- E._featuresetFunctions.groupby = function(e, t) {
1026
- return new Pe({ parentfeatureset: this, groupbyfields: e, statsfields: t });
1027
- };
1028
- }
1029
- };
1030
- class le extends E {
1031
- constructor(e) {
1032
- super(e), this._topnum = 0, this.declaredClass = "esri.arcade.featureset.actions.Top", this._countedin = 0, this._maxProcessing = 100, this._topnum = e.topnum, this._parent = e.parentfeatureset;
1033
- }
1034
- async _getSet(e) {
1035
- if (this._wset === null) {
1036
- await this._ensureLoaded();
1037
- const t = await this._parent._getSet(e);
1038
- return this._wset = new _(t._candidates.slice(0), t._known.slice(0), !1, this._clonePageDefinition(t.pagesDefinition)), this._setKnownLength(this._wset) > this._topnum && (this._wset._known = this._wset._known.slice(0, this._topnum)), this._setKnownLength(this._wset) >= this._topnum && (this._wset._candidates = []), this._wset;
1039
- }
1040
- return this._wset;
1041
- }
1042
- _setKnownLength(e) {
1043
- return e._known.length > 0 && e._known[e._known.length - 1] === "GETPAGES" ? e._known.length - 1 : e._known.length;
1044
- }
1045
- _isInFeatureSet(e) {
1046
- const t = this._parent._isInFeatureSet(e);
1047
- if (t === I.NotInFeatureSet)
1048
- return t;
1049
- const i = this._idstates[e];
1050
- return i === I.InFeatureSet || i === I.NotInFeatureSet ? i : t === I.InFeatureSet && i === void 0 ? this._countedin < this._topnum ? (this._idstates[e] = I.InFeatureSet, this._countedin++, I.InFeatureSet) : (this._idstates[e] = I.NotInFeatureSet, I.NotInFeatureSet) : I.Unknown;
1051
- }
1052
- async _expandPagedSet(e, t, i, s, a) {
1053
- if (this._parent === null)
1054
- throw new D(T.NotImplemented);
1055
- if (t > this._topnum && (t = this._topnum), this._countedin >= this._topnum && e.pagesDefinition.internal.set.length <= e.pagesDefinition.resultOffset) {
1056
- let n = e._known.length;
1057
- return n > 0 && e._known[n - 1] === "GETPAGES" && (e._known.length = n - 1), n = e._candidates.length, n > 0 && e._candidates[n - 1] === "GETPAGES" && (e._candidates.length = n - 1), "success";
1058
- }
1059
- const r = await this._parent._expandPagedSet(e, t, i, s, a);
1060
- return this._setKnownLength(e) > this._topnum && (e._known.length = this._topnum), this._setKnownLength(e) >= this._topnum && (e._candidates.length = 0), r;
1061
- }
1062
- async _getFeatures(e, t, i, s) {
1063
- const a = [], r = this._maxQueryRate();
1064
- if (this._checkIfNeedToExpandKnownPage(e, r) === !0)
1065
- return await this._expandPagedSet(e, r, 0, 0, s), this._getFeatures(e, t, i, s);
1066
- t !== -1 && this._featureCache[t] === void 0 && a.push(t);
1067
- let n = 0;
1068
- for (let o = e._lastFetchedIndex; o < e._known.length && (n++, n <= i && (e._lastFetchedIndex += 1), !(this._featureCache[e._known[o]] === void 0 && (e._known[o] !== t && a.push(e._known[o]), a.length > r))); o++)
1069
- ;
1070
- if (a.length === 0)
1071
- return "success";
1072
- const l = new _([], a, !1, null), u = Math.min(a.length, i);
1073
- await this._parent._getFeatures(l, -1, u, s);
1074
- for (let o = 0; o < u; o++) {
1075
- const d = this._parent._featureFromCache(a[o]);
1076
- d !== void 0 && (this._featureCache[a[o]] = d);
1077
- }
1078
- return "success";
1079
- }
1080
- async _getFilteredSet(e, t, i, s, a) {
1081
- await this._ensureLoaded();
1082
- const r = await this._getSet(a);
1083
- return new _(r._candidates.slice(0).concat(r._known.slice(0)), [], !1, this._clonePageDefinition(r.pagesDefinition));
1084
- }
1085
- _refineKnowns(e, t) {
1086
- let i = 0, s = null;
1087
- const a = [];
1088
- for (let r = 0; r < e._candidates.length; r++) {
1089
- const n = this._isInFeatureSet(e._candidates[r]);
1090
- if (n === I.InFeatureSet) {
1091
- if (e._known.push(e._candidates[r]), i += 1, s === null ? s = { start: r, end: r } : s.end === r - 1 ? s.end = r : (a.push(s), s = { start: r, end: r }), e._known.length >= this._topnum)
1092
- break;
1093
- } else if (n === I.NotInFeatureSet)
1094
- s === null ? s = { start: r, end: r } : s.end === r - 1 ? s.end = r : (a.push(s), s = { start: r, end: r }), i += 1;
1095
- else if (n === I.Unknown)
1096
- break;
1097
- if (i >= t)
1098
- break;
1099
- }
1100
- s !== null && a.push(s);
1101
- for (let r = a.length - 1; r >= 0; r--)
1102
- e._candidates.splice(a[r].start, a[r].end - a[r].start + 1);
1103
- this._setKnownLength(e) > this._topnum && (e._known = e._known.slice(0, this._topnum)), this._setKnownLength(e) >= this._topnum && (e._candidates = []);
1104
- }
1105
- async _stat() {
1106
- return { calculated: !1 };
1107
- }
1108
- async _canDoAggregates() {
1109
- return !1;
1110
- }
1111
- static registerAction() {
1112
- E._featuresetFunctions.top = function(e) {
1113
- return new le({ parentfeatureset: this, topnum: e });
1114
- };
1115
- }
1116
- getFieldsIndex() {
1117
- return this._parent.getFieldsIndex();
1118
- }
1119
- }
1120
- async function Tt(h, e, t, i) {
1121
- return vt(e, await Rt(h, e, t, i), t, i);
1122
- }
1123
- async function Rt(h, e, t, i) {
1124
- var o;
1125
- const s = { ...i }, a = xt(e, t), r = ((o = e.outStatistics) == null ? void 0 : o[0]) != null, n = Me("featurelayer-pbf-statistics"), l = !r || n;
1126
- let u;
1127
- if ((t == null ? void 0 : t.format) === "pbf" && l)
1128
- try {
1129
- u = await pt(h, a, s);
1130
- } catch (d) {
1131
- if (d.name !== "query:parsing-pbf")
1132
- throw d;
1133
- t.format = "json";
1134
- }
1135
- return (t == null ? void 0 : t.format) !== "json" && l || (u = await ft(h, a, s)), kt(t == null ? void 0 : t.fieldsIndex, u.fields), u;
1136
- }
1137
- function kt(h, e) {
1138
- if (h != null && e != null)
1139
- for (const t of e) {
1140
- const i = h.get(t.name);
1141
- i && Object.assign(t, i.toJSON());
1142
- }
1143
- }
1144
- async function vt(h, e, t, i) {
1145
- var r;
1146
- const s = t == null ? void 0 : t.infoFor3D;
1147
- if (!qe(h, s) || s == null || !e.assetMaps || !((r = e.features) != null && r.length))
1148
- return _t.fromJSON(e);
1149
- const { meshFeatureSetFromJSON: a } = await We(import("./meshFeatureSet-07b96756.js"), i);
1150
- return a(h, s, e);
1151
- }
1152
- function xt(h, e) {
1153
- let t = N.from(h);
1154
- t.sourceSpatialReference = t.sourceSpatialReference ?? (e == null ? void 0 : e.sourceSpatialReference) ?? null, (e != null && e.gdbVersion || e != null && e.dynamicDataSource) && (t = t === h ? t.clone() : t, t.gdbVersion = h.gdbVersion || e.gdbVersion, t.dynamicDataSource = h.dynamicDataSource ? $e.from(h.dynamicDataSource) : e.dynamicDataSource);
1155
- const i = e == null ? void 0 : e.infoFor3D;
1156
- if (i != null && qe(h, i)) {
1157
- t = t === h ? t.clone() : t, t.formatOf3DObjects = null;
1158
- const { supportedFormats: s, queryFormats: a } = i, r = Ie("model/gltf-binary", s) ?? Ce("glb", s), n = Ie("model/gltf+json", s) ?? Ce("gtlf", s);
1159
- for (const l of a) {
1160
- if (l === r) {
1161
- t.formatOf3DObjects = l;
1162
- break;
1163
- }
1164
- l !== n || t.formatOf3DObjects || (t.formatOf3DObjects = l);
1165
- }
1166
- if (!t.formatOf3DObjects)
1167
- throw new Ve("query:unsupported-3d-query-formats", "Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");
1168
- if (t.outFields == null || !t.outFields.includes("*")) {
1169
- t = t === h ? t.clone() : t, t.outFields == null && (t.outFields = []);
1170
- const { originX: l, originY: u, originZ: o, translationX: d, translationY: c, translationZ: f, scaleX: y, scaleY: g, scaleZ: b, rotationX: S, rotationY: p, rotationZ: w, rotationDeg: C } = i.transformFieldRoles;
1171
- t.outFields.push(l, u, o, d, c, f, y, g, b, S, p, w, C);
1172
- }
1173
- }
1174
- return t;
1175
- }
1176
- function qe(h, e) {
1177
- return e != null && h.returnGeometry === !0 && h.multipatchOption !== "xyFootprint" && !h.outStatistics;
1178
- }
1179
- class z extends E {
1180
- constructor(e) {
1181
- super(e), this.declaredClass = "esri.arcade.featureset.sources.FeatureLayerDynamic", this._removeGeometry = !1, this._overrideFields = null, this.formulaCredential = null, this._pageJustIds = !1, this._requestStandardised = !1, this._useDefinitionExpression = !0, e.spatialReference && (this.spatialReference = e.spatialReference), this._transparent = !0, this._maxProcessing = 1e3, this._layer = e.layer, this._wset = null, e.outFields !== void 0 && (this._overrideFields = e.outFields), e.includeGeometry !== void 0 && (this._removeGeometry = e.includeGeometry === !1);
1182
- }
1183
- _maxQueryRate() {
1184
- return ne;
1185
- }
1186
- end() {
1187
- return this._layer;
1188
- }
1189
- optimisePagingFeatureQueries(e) {
1190
- this._pageJustIds = e;
1191
- }
1192
- get urlQueryPath() {
1193
- return this._layer.parsedUrl.path || "";
1194
- }
1195
- convertQueryToLruCacheKey(e) {
1196
- const t = this.urlQueryPath + "," + Xe(e.toJSON());
1197
- return xe(t, Ne.String);
1198
- }
1199
- async loadImpl() {
1200
- return this._layer.loaded === !0 ? (this._initialiseFeatureSet(), this) : (await this._layer.load(), this._initialiseFeatureSet(), this);
1201
- }
1202
- _initialiseFeatureSet() {
1203
- var e, t, i, s, a, r;
1204
- if (this.spatialReference == null && (this.spatialReference = this._layer.spatialReference), this.geometryType = this._layer.geometryType, this.fields = this._layer.fields.slice(0), this.hasZ = ((i = (t = (e = this._layer) == null ? void 0 : e.capabilities) == null ? void 0 : t.data) == null ? void 0 : i.supportsZ) === !0, this.hasM = ((r = (a = (s = this._layer) == null ? void 0 : s.capabilities) == null ? void 0 : a.data) == null ? void 0 : r.supportsM) === !0, this._overrideFields !== null)
1205
- if (this._overrideFields.length === 1 && this._overrideFields[0] === "*")
1206
- this._overrideFields = null;
1207
- else {
1208
- const n = [], l = [];
1209
- for (const u of this.fields)
1210
- if (u.type === "oid")
1211
- n.push(u), l.push(u.name);
1212
- else
1213
- for (const o of this._overrideFields)
1214
- if (o.toLowerCase() === u.name.toLowerCase()) {
1215
- n.push(u), l.push(u.name);
1216
- break;
1217
- }
1218
- this.fields = n, this._overrideFields = l;
1219
- }
1220
- if (this._layer.source && this._layer.source.sourceJSON) {
1221
- const n = this._layer.source.sourceJSON.currentVersion;
1222
- this._layer.source.sourceJSON.useStandardizedQueries === !0 ? (this._databaseType = x.StandardisedNoInterval, n != null && n >= 10.61 && (this._databaseType = x.Standardised)) : n != null && (n >= 10.5 && (this._databaseType = x.StandardisedNoInterval, this._requestStandardised = !0), n >= 10.61 && (this._databaseType = x.Standardised));
1223
- }
1224
- this.objectIdField = this._layer.objectIdField;
1225
- for (const n of this.fields)
1226
- n.type === "global-id" && (this.globalIdField = n.name);
1227
- this._layer instanceof Le ? (this.subtypeField = this._layer.subtypeField ?? "", this.subtypes = this._layer.subtypes, this.types = null, this.typeIdField = null) : (this.typeIdField = this._layer.typeIdField ?? "", this.types = this._layer.types, this.subtypeField = this._layer.subtypeField, this.subtypes = this._layer.subtypes);
1228
- }
1229
- _isInFeatureSet() {
1230
- return I.InFeatureSet;
1231
- }
1232
- async _refineSetBlock(e) {
1233
- return e;
1234
- }
1235
- _candidateIdTransform(e) {
1236
- return e;
1237
- }
1238
- async _getSet(e) {
1239
- if (this._wset === null) {
1240
- await this._ensureLoaded();
1241
- const t = await this._getFilteredSet("", null, null, null, e);
1242
- return this._wset = t, t;
1243
- }
1244
- return this._wset;
1245
- }
1246
- async _runDatabaseProbe(e) {
1247
- await this._ensureLoaded();
1248
- const t = new N();
1249
- this.datesInUnknownTimezone && (t.timeReferenceUnknownClient = !0), t.where = e.replace("OBJECTID", this._layer.objectIdField);
1250
- try {
1251
- return await this._layer.queryObjectIds(t), !0;
1252
- } catch {
1253
- return !1;
1254
- }
1255
- }
1256
- _canUsePagination() {
1257
- return !(!this._layer.capabilities || !this._layer.capabilities.query || this._layer.capabilities.query.supportsPagination !== !0);
1258
- }
1259
- _cacheableFeatureSetSourceKey() {
1260
- return this._layer.url;
1261
- }
1262
- pbfSupportedForQuery(e) {
1263
- var i, s;
1264
- const t = (s = (i = this._layer) == null ? void 0 : i.capabilities) == null ? void 0 : s.query;
1265
- return !e.outStatistics && (t == null ? void 0 : t.supportsFormatPBF) === !0 && (t == null ? void 0 : t.supportsQuantizationEditMode) === !0;
1266
- }
1267
- async queryPBF(e) {
1268
- return e.quantizationParameters = { mode: "edit" }, (await Tt(this._layer.parsedUrl, e, { format: "pbf" }, {})).unquantize();
1269
- }
1270
- get gdbVersion() {
1271
- return this._layer && this._layer.capabilities && this._layer.capabilities.data && this._layer.capabilities.data.isVersioned ? this._layer.gdbVersion || "SDE.DEFAULT" : "";
1272
- }
1273
- nativeCapabilities() {
1274
- return { title: this._layer.title ?? "", source: this, canQueryRelated: !0, capabilities: this._layer.capabilities, databaseType: this._databaseType, requestStandardised: this._requestStandardised };
1275
- }
1276
- executeQuery(e, t) {
1277
- e.returnZ = this.hasZ, e.returnM = this.hasM;
1278
- const i = t === "execute" ? De : t === "executeForCount" ? yt : gt, s = t === "execute" && this.pbfSupportedForQuery(e);
1279
- let a = null;
1280
- if (this.recentlyUsedQueries) {
1281
- const r = this.convertQueryToLruCacheKey(e);
1282
- a = this.recentlyUsedQueries.getFromCache(r), a === null && (a = s !== !0 ? i(this._layer.parsedUrl.path, e) : this.queryPBF(e), this.recentlyUsedQueries.addToCache(r, a), a = a.catch((n) => {
1283
- var l;
1284
- throw (l = this.recentlyUsedQueries) == null || l.removeFromCache(r), n;
1285
- }));
1286
- }
1287
- return this.featureSetQueryInterceptor && this.featureSetQueryInterceptor.preLayerQueryCallback({ layer: this._layer, query: e, method: t }), a === null && (a = s !== !0 ? i(this._layer.parsedUrl.path, e) : this.queryPBF(e)), a;
1288
- }
1289
- async _getFilteredSet(e, t, i, s, a) {
1290
- const r = await this.databaseType();
1291
- if (this.isTable() && t && e !== null && e !== "")
1292
- return new _([], [], !0, null);
1293
- if (this._canUsePagination())
1294
- return this._getFilteredSetUsingPaging(e, t, i, s, a);
1295
- let n = "", l = !1;
1296
- s !== null && this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsOrderBy === !0 && (n = s.constructClause(), l = !0);
1297
- const u = new N();
1298
- this.datesInUnknownTimezone && (u.timeReferenceUnknownClient = !0), u.where = i === null ? t === null ? "1=1" : "" : k(i, r), this._requestStandardised && (u.sqlFormat = "standard"), u.spatialRelationship = this._makeRelationshipEnum(e), u.outSpatialReference = this.spatialReference, u.orderByFields = n !== "" ? n.split(",") : null, u.geometry = t === null ? null : t, u.relationParameter = this._makeRelationshipParam(e);
1299
- let o = await this.executeQuery(u, "executeForIds");
1300
- return o === null && (o = []), this._checkCancelled(a), new _([], o, l, null);
1301
- }
1302
- _expandPagedSet(e, t, i, s, a) {
1303
- return this._expandPagedSetFeatureSet(e, t, i, s, a);
1304
- }
1305
- async _getFilteredSetUsingPaging(e, t, i, s, a) {
1306
- var f;
1307
- let r = "", n = !1;
1308
- s !== null && this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsOrderBy === !0 && (r = s.constructClause(), n = !0);
1309
- const l = await this.databaseType();
1310
- let u = i === null ? t === null ? "1=1" : "" : k(i, l);
1311
- this._layer.definitionExpression && this._useDefinitionExpression && (u = u !== "" ? "((" + this._layer.definitionExpression + ") AND (" + u + "))" : this._layer.definitionExpression);
1312
- let o = this._maxQueryRate();
1313
- const d = (f = this._layer.capabilities) == null ? void 0 : f.query.maxRecordCount;
1314
- d != null && d < o && (o = d);
1315
- let c = null;
1316
- if (this._pageJustIds === !0)
1317
- c = new _([], ["GETPAGES"], n, { spatialRel: this._makeRelationshipEnum(e), relationParam: this._makeRelationshipParam(e), outFields: this._layer.objectIdField, resultRecordCount: o, resultOffset: 0, geometry: t === null ? null : t, where: u, orderByFields: r, returnGeometry: !1, returnIdsOnly: "false", internal: { set: [], lastRetrieved: 0, lastPage: 0, fullyResolved: !1 } });
1318
- else {
1319
- let y = !0;
1320
- this._removeGeometry === !0 && (y = !1);
1321
- const g = this._overrideFields ?? this._fieldsIncludingObjectId(["*"]);
1322
- c = new _([], ["GETPAGES"], n, { spatialRel: this._makeRelationshipEnum(e), relationParam: this._makeRelationshipParam(e), outFields: g.join(","), resultRecordCount: o, resultOffset: 0, geometry: t === null ? null : t, where: u, orderByFields: r, returnGeometry: y, returnIdsOnly: "false", internal: { set: [], lastRetrieved: 0, lastPage: 0, fullyResolved: !1 } });
1323
- }
1324
- return await this._expandPagedSet(c, o, 0, 1, a), c;
1325
- }
1326
- _clonePageDefinition(e) {
1327
- return e === null ? null : e.groupbypage !== !0 ? { groupbypage: !1, spatialRel: e.spatialRel, relationParam: e.relationParam, outFields: e.outFields, resultRecordCount: e.resultRecordCount, resultOffset: e.resultOffset, geometry: e.geometry, where: e.where, orderByFields: e.orderByFields, returnGeometry: e.returnGeometry, returnIdsOnly: e.returnIdsOnly, internal: e.internal } : { groupbypage: !0, spatialRel: e.spatialRel, relationParam: e.relationParam, outFields: e.outFields, resultRecordCount: e.resultRecordCount, useOIDpagination: e.useOIDpagination, generatedOid: e.generatedOid, groupByFieldsForStatistics: e.groupByFieldsForStatistics, resultOffset: e.resultOffset, outStatistics: e.outStatistics, geometry: e.geometry, where: e.where, orderByFields: e.orderByFields, returnGeometry: e.returnGeometry, returnIdsOnly: e.returnIdsOnly, internal: e.internal };
1328
- }
1329
- async _getPhysicalPage(e, t, i) {
1330
- const s = e.pagesDefinition.internal.lastRetrieved, a = s, r = e.pagesDefinition.internal.lastPage, n = new N();
1331
- this._requestStandardised && (n.sqlFormat = "standard"), this.datesInUnknownTimezone && (n.timeReferenceUnknownClient = !0), n.spatialRelationship = e.pagesDefinition.spatialRel, n.relationParameter = e.pagesDefinition.relationParam, n.outFields = e.pagesDefinition.outFields.split(","), n.num = e.pagesDefinition.resultRecordCount, n.start = e.pagesDefinition.internal.lastPage, n.geometry = e.pagesDefinition.geometry, n.where = e.pagesDefinition.where, n.orderByFields = e.pagesDefinition.orderByFields !== "" ? e.pagesDefinition.orderByFields.split(",") : null, n.returnGeometry = e.pagesDefinition.returnGeometry, n.outSpatialReference = this.spatialReference;
1332
- const l = await this.executeQuery(n, "execute");
1333
- if (this._checkCancelled(i), e.pagesDefinition.internal.lastPage !== r)
1334
- return "done";
1335
- const u = this._layer.objectIdField;
1336
- for (let o = 0; o < l.features.length; o++)
1337
- e.pagesDefinition.internal.set[a + o] = l.features[o].attributes[u];
1338
- if (this._pageJustIds === !1)
1339
- for (let o = 0; o < l.features.length; o++)
1340
- this._featureCache[l.features[o].attributes[u]] = l.features[o];
1341
- return (l.exceededTransferLimit === void 0 && l.features.length !== e.pagesDefinition.resultRecordCount || l.exceededTransferLimit === !1) && (e.pagesDefinition.internal.fullyResolved = !0), e.pagesDefinition.internal.lastRetrieved = s + l.features.length, e.pagesDefinition.internal.lastPage += e.pagesDefinition.resultRecordCount, "done";
1342
- }
1343
- _fieldsIncludingObjectId(e) {
1344
- if (e === null)
1345
- return [this.objectIdField];
1346
- const t = e.slice(0);
1347
- if (t.includes("*"))
1348
- return t;
1349
- let i = !1;
1350
- for (const s of t)
1351
- if (s.toUpperCase() === this.objectIdField.toUpperCase()) {
1352
- i = !0;
1353
- break;
1354
- }
1355
- return i === !1 && t.push(this.objectIdField), t;
1356
- }
1357
- async _getFeatures(e, t, i, s) {
1358
- const a = [];
1359
- if (t !== -1 && this._featureCache[t] === void 0 && a.push(t), this._checkIfNeedToExpandKnownPage(e, this._maxProcessingRate()) === !0)
1360
- return await this._expandPagedSet(e, this._maxProcessingRate(), 0, 0, s), this._getFeatures(e, t, i, s);
1361
- let r = 0;
1362
- for (let o = e._lastFetchedIndex; o < e._known.length; o++) {
1363
- if (e._lastFetchedIndex += 1, r++, this._featureCache[e._known[o]] === void 0) {
1364
- let d = !1;
1365
- if (this._layer._mode !== null && this._layer._mode !== void 0) {
1366
- const c = this._layer._mode;
1367
- if (c._featureMap[e._known[o]] !== void 0) {
1368
- const f = c._featureMap[e._known[o]];
1369
- f !== null && (d = !0, this._featureCache[e._known[o]] = f);
1370
- }
1371
- }
1372
- if (d === !1 && (e._known[o] !== t && a.push(e._known[o]), a.length >= this._maxProcessingRate() - 1))
1373
- break;
1374
- }
1375
- if (r >= i && a.length === 0)
1376
- break;
1377
- }
1378
- if (a.length === 0)
1379
- return "success";
1380
- const n = new N();
1381
- this._requestStandardised && (n.sqlFormat = "standard"), this.datesInUnknownTimezone && (n.timeReferenceUnknownClient = !0), n.objectIds = a, n.outFields = this._overrideFields ?? this._fieldsIncludingObjectId(["*"]), n.returnGeometry = !0, this._removeGeometry === !0 && (n.returnGeometry = !1), n.outSpatialReference = this.spatialReference;
1382
- const l = await this.executeQuery(n, "execute");
1383
- if (this._checkCancelled(s), l.error !== void 0)
1384
- throw new D(T.RequestFailed, { reason: l.error });
1385
- const u = this._layer.objectIdField;
1386
- for (let o = 0; o < l.features.length; o++)
1387
- this._featureCache[l.features[o].attributes[u]] = l.features[o];
1388
- return "success";
1389
- }
1390
- async _getDistinctPages(e, t, i, s, a, r, n, l, u) {
1391
- var S;
1392
- await this._ensureLoaded();
1393
- const o = await this.databaseType();
1394
- let d = i.parseTree.column;
1395
- const c = this._layer.fields ?? [];
1396
- for (let p = 0; p < c.length; p++)
1397
- if (c[p].name.toLowerCase() === d.toLowerCase()) {
1398
- d = c[p].name;
1399
- break;
1400
- }
1401
- const f = new N();
1402
- this._requestStandardised && (f.sqlFormat = "standard"), this.datesInUnknownTimezone && (f.timeReferenceUnknownClient = !0);
1403
- let y = r === null ? a === null ? "1=1" : "" : k(r, o);
1404
- this._layer.definitionExpression && this._useDefinitionExpression && (y = y !== "" ? "((" + this._layer.definitionExpression + ") AND (" + y + "))" : this._layer.definitionExpression), f.where = y, f.spatialRelationship = this._makeRelationshipEnum(s), f.relationParameter = this._makeRelationshipParam(s), f.geometry = a === null ? null : a, f.returnDistinctValues = !0, f.returnGeometry = !1, f.outFields = [d];
1405
- const g = await this.executeQuery(f, "execute");
1406
- if (this._checkCancelled(u), !g.hasOwnProperty("features"))
1407
- throw new D(T.InvalidStatResponse);
1408
- let b = !1;
1409
- for (let p = 0; p < c.length; p++)
1410
- if (c[p].name === d) {
1411
- c[p].type === "date" && (b = !0);
1412
- break;
1413
- }
1414
- for (let p = 0; p < g.features.length; p++) {
1415
- if (b) {
1416
- const w = g.features[p].attributes[d];
1417
- w !== null ? l.push(new Date(w)) : l.push(w);
1418
- } else
1419
- l.push(g.features[p].attributes[d]);
1420
- if (l.length >= n)
1421
- break;
1422
- }
1423
- return g.features.length === 0 ? l : g.features.length === ((S = this._layer.capabilities) == null ? void 0 : S.query.maxRecordCount) && l.length < n ? { calculated: !0, result: await this._getDistinctPages(e + g.features.length, t, i, s, a, r, n, l, u) } : l;
1424
- }
1425
- async _distinctStat(e, t, i, s, a, r, n) {
1426
- return { calculated: !0, result: await this._getDistinctPages(0, e, t, i, s, a, r, [], n) };
1427
- }
1428
- isTable() {
1429
- return this._layer.isTable || this._layer.geometryType === null || this._layer.type === "table" || this._layer.geometryType === "" || this._layer.geometryType === "esriGeometryNull";
1430
- }
1431
- async _countstat(e, t, i, s) {
1432
- const a = await this.databaseType(), r = new N();
1433
- if (this._requestStandardised && (r.sqlFormat = "standard"), this.isTable() && i && t !== null && t !== "")
1434
- return { calculated: !0, result: 0 };
1435
- let n = s === null ? i === null ? "1=1" : "" : k(s, a);
1436
- return this._layer.definitionExpression && this._useDefinitionExpression && (n = n !== "" ? "((" + this._layer.definitionExpression + ") AND (" + n + "))" : this._layer.definitionExpression), r.where = n, this.datesInUnknownTimezone && (r.timeReferenceUnknownClient = !0), r.where = n, r.spatialRelationship = this._makeRelationshipEnum(t), r.relationParameter = this._makeRelationshipParam(t), r.geometry = i === null ? null : i, r.returnGeometry = !1, { calculated: !0, result: await this.executeQuery(r, "executeForCount") };
1437
- }
1438
- async _stats(e, t, i, s, a, r, n) {
1439
- await this._ensureLoaded();
1440
- const l = this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsSqlExpression === !0, u = this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsStatistics === !0, o = this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsDistinct === !0;
1441
- if (e === "count")
1442
- return o ? this._countstat(e, i, s, a) : { calculated: !1 };
1443
- if (u === !1 || Z(t) === !1 && l === !1 || t.isStandardized === !1)
1444
- return i !== "" || a !== null ? { calculated: !1 } : this._manualStat(e, t, r, n);
1445
- if (e === "distinct")
1446
- return o === !1 ? i !== "" || a !== null ? { calculated: !1 } : this._manualStat(e, t, r, n) : this._distinctStat(e, t, i, s, a, r, n);
1447
- const d = await this.databaseType();
1448
- if (this.isTable() && s && i !== null && i !== "")
1449
- return { calculated: !0, result: null };
1450
- const c = new N();
1451
- this._requestStandardised && (c.sqlFormat = "standard");
1452
- let f = a === null ? s === null ? "1=1" : "" : k(a, d);
1453
- this._layer.definitionExpression && this._useDefinitionExpression && (f = f !== "" ? "((" + this._layer.definitionExpression + ") AND (" + f + "))" : this._layer.definitionExpression), c.where = f, c.spatialRelationship = this._makeRelationshipEnum(i), c.relationParameter = this._makeRelationshipParam(i), c.geometry = s === null ? null : s, this.datesInUnknownTimezone && (c.timeReferenceUnknownClient = !0);
1454
- const y = new fe();
1455
- y.statisticType = lt(e), y.onStatisticField = k(t, d), y.outStatisticFieldName = "ARCADE_STAT_RESULT", c.returnGeometry = !1;
1456
- let g = "ARCADE_STAT_RESULT";
1457
- c.outStatistics = [y];
1458
- const b = await this.executeQuery(c, "execute");
1459
- if (!b.hasOwnProperty("features") || b.features.length === 0)
1460
- throw new D(T.InvalidStatResponse);
1461
- let S = !1;
1462
- const p = b.fields ?? [];
1463
- for (let w = 0; w < p.length; w++)
1464
- if (p[w].name.toUpperCase() === "ARCADE_STAT_RESULT") {
1465
- g = p[w].name, p[w].type === "date" && (S = !0);
1466
- break;
1467
- }
1468
- if (S) {
1469
- let w = b.features[0].attributes[g];
1470
- return w !== null && (w = new Date(b.features[0].attributes[g])), { calculated: !0, result: w };
1471
- }
1472
- return { calculated: !0, result: b.features[0].attributes[g] };
1473
- }
1474
- _stat(e, t, i, s, a, r, n) {
1475
- return this._stats(e, t, i, s, a, r, n);
1476
- }
1477
- async _canDoAggregates(e, t) {
1478
- var r, n;
1479
- await this._ensureLoaded();
1480
- let i = !1;
1481
- const s = (r = this._layer.capabilities) == null ? void 0 : r.query, a = (s == null ? void 0 : s.supportsSqlExpression) === !0;
1482
- if (s != null && s.supportsStatistics === !0 && s.supportsOrderBy === !0 && (i = !0), i)
1483
- for (let l = 0; l < t.length - 1; l++)
1484
- (((n = t[l].workingexpr) == null ? void 0 : n.isStandardized) === !1 || Z(t[l].workingexpr) === !1 && a === !1) && (i = !1);
1485
- return i !== !1;
1486
- }
1487
- _makeRelationshipEnum(e) {
1488
- if (e.includes("esriSpatialRelRelation"))
1489
- return "relation";
1490
- switch (e) {
1491
- case "esriSpatialRelRelation":
1492
- return "relation";
1493
- case "esriSpatialRelIntersects":
1494
- return "intersects";
1495
- case "esriSpatialRelContains":
1496
- return "contains";
1497
- case "esriSpatialRelOverlaps":
1498
- return "overlaps";
1499
- case "esriSpatialRelWithin":
1500
- return "within";
1501
- case "esriSpatialRelTouches":
1502
- return "touches";
1503
- case "esriSpatialRelCrosses":
1504
- return "crosses";
1505
- case "esriSpatialRelEnvelopeIntersects":
1506
- return "envelope-intersects";
1507
- }
1508
- return e;
1509
- }
1510
- _makeRelationshipParam(e) {
1511
- return e.includes("esriSpatialRelRelation") ? e.split(":")[1] : "";
1512
- }
1513
- async _getAggregatePagesDataSourceDefinition(e, t, i, s, a, r, n) {
1514
- var b;
1515
- await this._ensureLoaded();
1516
- const l = await this.databaseType();
1517
- let u = "", o = !1, d = !1;
1518
- r !== null && this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsOrderBy === !0 && (u = r.constructClause(), d = !0), this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsPagination === !1 && (d = !1, o = !0, u = this._layer.objectIdField);
1519
- const c = [];
1520
- for (let S = 0; S < t.length; S++) {
1521
- const p = new fe();
1522
- p.onStatisticField = t[S].workingexpr !== null ? k(t[S].workingexpr, l) : "", p.outStatisticFieldName = t[S].field, p.statisticType = t[S].toStatisticsName(), c.push(p);
1523
- }
1524
- u === "" && (u = e.join(","));
1525
- let f = this._maxQueryRate();
1526
- const y = (b = this._layer.capabilities) == null ? void 0 : b.query.maxRecordCount;
1527
- y != null && y < f && (f = y);
1528
- let g = a === null ? s === null ? "1=1" : "" : k(a, l);
1529
- return this._layer.definitionExpression && this._useDefinitionExpression && (g = g !== "" ? "((" + this._layer.definitionExpression + ") AND (" + g + "))" : this._layer.definitionExpression), new _([], ["GETPAGES"], d, { groupbypage: !0, spatialRel: this._makeRelationshipEnum(i), relationParam: this._makeRelationshipParam(i), outFields: ["*"], useOIDpagination: o, generatedOid: n, resultRecordCount: f, resultOffset: 0, groupByFieldsForStatistics: e, outStatistics: c, geometry: s === null ? null : s, where: g, orderByFields: u, returnGeometry: !1, returnIdsOnly: !1, internal: { lastMaxId: -1, set: [], lastRetrieved: 0, lastPage: 0, fullyResolved: !1 } });
1530
- }
1531
- async _getAgregagtePhysicalPage(e, t, i) {
1532
- let s = e.pagesDefinition.where;
1533
- e.pagesDefinition.useOIDpagination === !0 && (s = s !== "" ? "(" + s + ") AND (" + e.pagesDefinition.generatedOid + ">" + e.pagesDefinition.internal.lastMaxId.toString() + ")" : e.pagesDefinition.generatedOid + ">" + e.pagesDefinition.internal.lastMaxId.toString());
1534
- const a = e.pagesDefinition.internal.lastRetrieved, r = a, n = e.pagesDefinition.internal.lastPage, l = new N();
1535
- if (this._requestStandardised && (l.sqlFormat = "standard"), l.where = s, l.spatialRelationship = e.pagesDefinition.spatialRel, l.relationParameter = e.pagesDefinition.relationParam, l.outFields = e.pagesDefinition.outFields, l.outStatistics = e.pagesDefinition.outStatistics, l.geometry = e.pagesDefinition.geometry, l.groupByFieldsForStatistics = e.pagesDefinition.groupByFieldsForStatistics, l.num = e.pagesDefinition.resultRecordCount, l.start = e.pagesDefinition.internal.lastPage, l.returnGeometry = e.pagesDefinition.returnGeometry, this.datesInUnknownTimezone && (l.timeReferenceUnknownClient = !0), l.orderByFields = e.pagesDefinition.orderByFields !== "" ? e.pagesDefinition.orderByFields.split(",") : null, this.isTable() && l.geometry && l.spatialRelationship)
1536
- return [];
1537
- const u = await this.executeQuery(l, "execute");
1538
- if (this._checkCancelled(i), !u.hasOwnProperty("features"))
1539
- throw new D(T.InvalidStatResponse);
1540
- const o = [];
1541
- if (e.pagesDefinition.internal.lastPage !== n)
1542
- return [];
1543
- u.features.length > 0 && u.features[0].attributes[e.pagesDefinition.generatedOid] === void 0 && (e.pagesDefinition.generatedOid = e.pagesDefinition.generatedOid.toLowerCase());
1544
- for (let d = 0; d < u.features.length; d++)
1545
- e.pagesDefinition.internal.set[r + d] = u.features[d].attributes[e.pagesDefinition.generatedOid];
1546
- for (let d = 0; d < u.features.length; d++)
1547
- o.push(new G({ attributes: u.features[d].attributes, geometry: null }));
1548
- return e.pagesDefinition.useOIDpagination === !0 ? u.features.length === 0 ? e.pagesDefinition.internal.fullyResolved = !0 : e.pagesDefinition.internal.lastMaxId = u.features[u.features.length - 1].attributes[e.pagesDefinition.generatedOid] : (u.exceededTransferLimit === void 0 && u.features.length !== e.pagesDefinition.resultRecordCount || u.exceededTransferLimit === !1) && (e.pagesDefinition.internal.fullyResolved = !0), e.pagesDefinition.internal.lastRetrieved = a + u.features.length, e.pagesDefinition.internal.lastPage += e.pagesDefinition.resultRecordCount, o;
1549
- }
1550
- static create(e, t, i, s, a) {
1551
- const r = new v({ url: e, outFields: t === null ? ["*"] : t });
1552
- return new z({ layer: r, spatialReference: i, lrucache: s, interceptor: a });
1553
- }
1554
- relationshipMetaData() {
1555
- var e;
1556
- return this._layer && this._layer.source && ((e = this._layer.source.sourceJSON) != null && e.relationships) ? this._layer.source.sourceJSON.relationships : [];
1557
- }
1558
- serviceUrl() {
1559
- return Y(this._layer.parsedUrl.path);
1560
- }
1561
- async queryAttachments(e, t, i, s, a) {
1562
- const r = this._layer.capabilities;
1563
- if (r != null && r.data.supportsAttachment && (r != null && r.operations.supportsQueryAttachments)) {
1564
- const n = { objectIds: [e], returnMetadata: a };
1565
- (t && t > 0 || i && i > 0) && (n.size = [t && t > 0 ? t : 0, i && i > 0 ? i : t + 1]), s && s.length > 0 && (n.attachmentTypes = s), this.featureSetQueryInterceptor && this.featureSetQueryInterceptor.preLayerQueryCallback({ layer: this._layer, query: n, method: "attachments" });
1566
- const l = await this._layer.queryAttachments(n), u = [];
1567
- return l && l[e] && l[e].forEach((o) => {
1568
- const d = this._layer.parsedUrl.path + "/" + e.toString() + "/attachments/" + o.id.toString();
1569
- let c = null;
1570
- a && o.exifInfo && (c = Ye.convertJsonToArcade(o.exifInfo, "system", !0)), u.push(new He(o.id, o.name, o.contentType, o.size, d, c, o.keywords ?? null));
1571
- }), u;
1572
- }
1573
- return [];
1574
- }
1575
- async queryRelatedFeatures(e) {
1576
- var s;
1577
- const t = { f: "json", relationshipId: e.relationshipId.toString(), definitionExpression: e.where, outFields: (s = e.outFields) == null ? void 0 : s.join(","), returnGeometry: e.returnGeometry.toString() };
1578
- e.resultOffset !== void 0 && e.resultOffset !== null && (t.resultOffset = e.resultOffset.toString()), e.resultRecordCount !== void 0 && e.resultRecordCount !== null && (t.resultRecordCount = e.resultRecordCount.toString()), e.orderByFields && (t.orderByFields = e.orderByFields.join(",")), e.objectIds && e.objectIds.length > 0 && (t.objectIds = e.objectIds.join(",")), e.outSpatialReference && (t.outSR = Qe(e.outSpatialReference)), this.featureSetQueryInterceptor && this.featureSetQueryInterceptor.preRequestCallback({ layer: this._layer, queryPayload: t, method: "relatedrecords", url: this._layer.parsedUrl.path + "/queryRelatedRecords" });
1579
- const i = await B(this._layer.parsedUrl.path + "/queryRelatedRecords", { responseType: "json", query: t });
1580
- if (i.data) {
1581
- const a = {}, r = i.data;
1582
- if (r != null && r.relatedRecordGroups) {
1583
- const n = r.spatialReference;
1584
- for (const l of r.relatedRecordGroups) {
1585
- const u = l.objectId, o = [];
1586
- for (const d of l.relatedRecords) {
1587
- d.geometry && (d.geometry.spatialReference = n);
1588
- const c = new G({ geometry: d.geometry ? Ze(d.geometry) : null, attributes: d.attributes });
1589
- o.push(c);
1590
- }
1591
- a[u] = { features: o, exceededTransferLimit: r.exceededTransferLimit === !0 };
1592
- }
1593
- }
1594
- return a;
1595
- }
1596
- throw new D(T.InvalidRequest);
1597
- }
1598
- async getFeatureByObjectId(e, t) {
1599
- const i = new N();
1600
- i.outFields = t, i.returnGeometry = !1, i.outSpatialReference = this.spatialReference, i.where = this.objectIdField + "=" + e.toString(), this.datesInUnknownTimezone && (i.timeReferenceUnknownClient = !0), this.featureSetQueryInterceptor && this.featureSetQueryInterceptor.preLayerQueryCallback({ layer: this._layer, query: i, method: "execute" });
1601
- const s = await De(this._layer.parsedUrl.path, i);
1602
- return s.features.length === 1 ? s.features[0] : null;
1603
- }
1604
- async getIdentityUser() {
1605
- var t;
1606
- await this.load();
1607
- const e = (t = pe) == null ? void 0 : t.findCredential(this._layer.url);
1608
- return e ? e.userId : null;
1609
- }
1610
- async getOwningSystemUrl() {
1611
- var s, a;
1612
- await this.load();
1613
- const e = (s = pe) == null ? void 0 : s.findServerInfo(this._layer.url);
1614
- if (e)
1615
- return e.owningSystemUrl;
1616
- let t = this._layer.url;
1617
- const i = t.toLowerCase().indexOf("/rest/services");
1618
- if (t = i > -1 ? t.substring(0, i) : t, t) {
1619
- t += "/rest/info";
1620
- try {
1621
- const r = await B(t, { query: { f: "json" } });
1622
- let n = "";
1623
- return (a = r.data) != null && a.owningSystemUrl && (n = r.data.owningSystemUrl), n;
1624
- } catch {
1625
- return "";
1626
- }
1627
- }
1628
- return "";
1629
- }
1630
- getDataSourceFeatureSet() {
1631
- const e = new z({ layer: this._layer, spatialReference: this.spatialReference ?? void 0, outFields: this._overrideFields ?? void 0, includeGeometry: !this._removeGeometry, lrucache: this.recentlyUsedQueries ?? void 0, interceptor: this.featureSetQueryInterceptor ?? void 0 });
1632
- return e._useDefinitionExpression = !1, e;
1633
- }
1634
- get preferredTimeZone() {
1635
- return this._layer.preferredTimeZone ?? null;
1636
- }
1637
- get dateFieldsTimeZone() {
1638
- return this._layer.dateFieldsTimeZone ?? null;
1639
- }
1640
- get datesInUnknownTimezone() {
1641
- return this._layer.datesInUnknownTimezone;
1642
- }
1643
- get editFieldsInfo() {
1644
- return this._layer.editFieldsInfo ?? null;
1645
- }
1646
- get timeInfo() {
1647
- return this._layer.timeInfo ?? null;
1648
- }
1649
- async getFeatureSetInfo() {
1650
- var a, r;
1651
- if (this.fsetInfo)
1652
- return this.fsetInfo;
1653
- let e = null, { parsedUrl: { path: t }, serviceItemId: i = null } = this._layer;
1654
- if (t) {
1655
- const n = await B(t, { responseType: "json", query: { f: "json" } });
1656
- e = ((a = n == null ? void 0 : n.data) == null ? void 0 : a.name) ?? null, i = ((r = n == null ? void 0 : n.data) == null ? void 0 : r.serviceItemId) ?? null;
1657
- }
1658
- const s = this._layer.title && (this._layer.parent ?? null) !== null;
1659
- return this.featureSetInfo = { layerId: this._layer.layerId, layerName: e === "" ? null : e, itemId: i === "" ? null : i, serviceLayerUrl: t === "" ? null : t, webMapLayerId: s ? this._layer.id ?? null : null, webMapLayerTitle: s ? this._layer.title ?? null : null, className: null, objectClassId: null }, this.fsetInfo;
1660
- }
1661
- }
1662
- class oe extends E {
1663
- constructor(e) {
1664
- super(e), this.declaredClass = "esri.arcade.featureset.sources.FeatureLayerMemory", this._removeGeometry = !1, this._overrideFields = null, this._forceIsTable = !1, e.spatialReference && (this.spatialReference = e.spatialReference), this._transparent = !0, this._maxProcessing = 1e3, this._layer = e.layer, this._wset = null, e.isTable === !0 && (this._forceIsTable = !0), e.outFields !== void 0 && (this._overrideFields = e.outFields), e.includeGeometry !== void 0 && (this._removeGeometry = e.includeGeometry === !1);
1665
- }
1666
- _maxQueryRate() {
1667
- return ne;
1668
- }
1669
- end() {
1670
- return this._layer;
1671
- }
1672
- optimisePagingFeatureQueries() {
1673
- }
1674
- async loadImpl() {
1675
- return this._layer.loaded === !0 ? (this._initialiseFeatureSet(), this) : (await this._layer.load(), this._initialiseFeatureSet(), this);
1676
- }
1677
- get gdbVersion() {
1678
- return "";
1679
- }
1680
- _initialiseFeatureSet() {
1681
- var e, t, i, s, a, r;
1682
- if (this.spatialReference == null && (this.spatialReference = this._layer.spatialReference), this.geometryType = this._layer.geometryType, this.fields = this._layer.fields.slice(0), this._overrideFields !== null)
1683
- if (this._overrideFields.length === 1 && this._overrideFields[0] === "*")
1684
- this._overrideFields = null;
1685
- else {
1686
- const n = [], l = [];
1687
- for (const u of this.fields)
1688
- if (u.type === "oid")
1689
- n.push(u), l.push(u.name);
1690
- else
1691
- for (const o of this._overrideFields)
1692
- if (o.toLowerCase() === u.name.toLowerCase()) {
1693
- n.push(u), l.push(u.name);
1694
- break;
1695
- }
1696
- this.fields = n, this._overrideFields = l;
1697
- }
1698
- this.objectIdField = this._layer.objectIdField;
1699
- for (const n of this.fields)
1700
- n.type === "global-id" && (this.globalIdField = n.name);
1701
- this._databaseType = x.Standardised, this.hasZ = ((i = (t = (e = this._layer) == null ? void 0 : e.capabilities) == null ? void 0 : t.data) == null ? void 0 : i.supportsZ) === !0, this.hasM = ((r = (a = (s = this._layer) == null ? void 0 : s.capabilities) == null ? void 0 : a.data) == null ? void 0 : r.supportsM) === !0, this._layer instanceof Le ? (this.subtypeField = this._layer.subtypeField ?? "", this.subtypes = this._layer.subtypes, this.types = null, this.typeIdField = null) : (this.typeIdField = this._layer.typeIdField ?? "", this.types = this._layer.types, this.subtypeField = this._layer.subtypeField, this.subtypes = this._layer.subtypes);
1702
- }
1703
- isTable() {
1704
- return this._forceIsTable || this._layer.isTable || this._layer.type === "table" || !this._layer.geometryType;
1705
- }
1706
- _isInFeatureSet() {
1707
- return I.InFeatureSet;
1708
- }
1709
- _candidateIdTransform(e) {
1710
- return e;
1711
- }
1712
- async _getSet(e) {
1713
- if (this._wset === null) {
1714
- await this._ensureLoaded();
1715
- const t = await this._getFilteredSet("", null, null, null, e);
1716
- return this._wset = t, t;
1717
- }
1718
- return this._wset;
1719
- }
1720
- _changeFeature(e) {
1721
- const t = {};
1722
- for (const i of this.fields)
1723
- t[i.name] = e.attributes[i.name];
1724
- return new G({ geometry: this._removeGeometry === !0 ? null : e.geometry, attributes: t });
1725
- }
1726
- async _getFilteredSet(e, t, i, s, a) {
1727
- let r = "", n = !1;
1728
- if (s !== null && (r = s.constructClause(), n = !0), this.isTable() && t && e !== null && e !== "")
1729
- return new _([], [], !0, null);
1730
- const l = new N();
1731
- l.returnZ = this.hasZ, l.returnM = this.hasM, l.where = i === null ? t === null ? "1=1" : "" : k(i, x.Standardised), l.spatialRelationship = this._makeRelationshipEnum(e), l.outSpatialReference = this.spatialReference, l.orderByFields = r !== "" ? r.split(",") : null, l.geometry = t === null ? null : t, l.returnGeometry = !0, l.relationParameter = this._makeRelationshipParam(e);
1732
- const u = await this._layer.queryFeatures(l);
1733
- if (u === null)
1734
- return new _([], [], n, null);
1735
- this._checkCancelled(a);
1736
- const o = [];
1737
- return u.features.forEach((d) => {
1738
- const c = d.attributes[this._layer.objectIdField];
1739
- o.push(c), this._featureCache[c] = this._changeFeature(d);
1740
- }), new _([], o, n, null);
1741
- }
1742
- _makeRelationshipEnum(e) {
1743
- if (e.includes("esriSpatialRelRelation"))
1744
- return "relation";
1745
- switch (e) {
1746
- case "esriSpatialRelRelation":
1747
- return "relation";
1748
- case "esriSpatialRelIntersects":
1749
- return "intersects";
1750
- case "esriSpatialRelContains":
1751
- return "contains";
1752
- case "esriSpatialRelOverlaps":
1753
- return "overlaps";
1754
- case "esriSpatialRelWithin":
1755
- return "within";
1756
- case "esriSpatialRelTouches":
1757
- return "touches";
1758
- case "esriSpatialRelCrosses":
1759
- return "crosses";
1760
- case "esriSpatialRelEnvelopeIntersects":
1761
- return "envelope-intersects";
1762
- }
1763
- return e;
1764
- }
1765
- _makeRelationshipParam(e) {
1766
- return e.includes("esriSpatialRelRelation") ? e.split(":")[1] : "";
1767
- }
1768
- async _queryAllFeatures() {
1769
- if (this._wset)
1770
- return this._wset;
1771
- const e = new N();
1772
- if (e.where = "1=1", await this._ensureLoaded(), this._layer.source && this._layer.source.items) {
1773
- const s = [];
1774
- return this._layer.source.items.forEach((a) => {
1775
- const r = a.attributes[this._layer.objectIdField];
1776
- s.push(r), this._featureCache[r] = this._changeFeature(a);
1777
- }), this._wset = new _([], s, !1, null), this._wset;
1778
- }
1779
- e.returnZ = this.hasZ, e.returnM = this.hasM;
1780
- const t = await this._layer.queryFeatures(e), i = [];
1781
- return t.features.forEach((s) => {
1782
- const a = s.attributes[this._layer.objectIdField];
1783
- i.push(a), this._featureCache[a] = this._changeFeature(s);
1784
- }), this._wset = new _([], i, !1, null), this._wset;
1785
- }
1786
- async _getFeatures(e, t, i) {
1787
- const s = [];
1788
- t !== -1 && this._featureCache[t] === void 0 && s.push(t);
1789
- for (let a = e._lastFetchedIndex; a < e._known.length && (e._lastFetchedIndex += 1, !(this._featureCache[e._known[a]] === void 0 && (e._known[a] !== t && s.push(e._known[a]), s.length > i))); a++)
1790
- ;
1791
- if (s.length === 0)
1792
- return "success";
1793
- throw new D(T.MissingFeatures);
1794
- }
1795
- async _refineSetBlock(e) {
1796
- return e;
1797
- }
1798
- async _stat() {
1799
- return { calculated: !1 };
1800
- }
1801
- async _canDoAggregates() {
1802
- return !1;
1803
- }
1804
- relationshipMetaData() {
1805
- return [];
1806
- }
1807
- static _cloneAttr(e) {
1808
- const t = {};
1809
- for (const i in e)
1810
- t[i] = e[i];
1811
- return t;
1812
- }
1813
- nativeCapabilities() {
1814
- return { title: this._layer.title ?? "", canQueryRelated: !1, source: this, capabilities: this._layer.capabilities, databaseType: this._databaseType, requestStandardised: !0 };
1815
- }
1816
- static create(e, t) {
1817
- var y, g, b, S, p, w;
1818
- let i = e.layerDefinition.objectIdField;
1819
- const s = e.layerDefinition.typeIdField ?? "", a = [];
1820
- if (e.layerDefinition.types)
1821
- for (const C of e.layerDefinition.types)
1822
- a.push(mt.fromJSON(C));
1823
- let r = e.layerDefinition.geometryType;
1824
- r === void 0 && (r = e.featureSet.geometryType || "");
1825
- let n = e.featureSet.features;
1826
- const l = t.toJSON();
1827
- if (!i) {
1828
- let C = !1;
1829
- for (const P of e.layerDefinition.fields)
1830
- if (P.type === "oid" || P.type === "esriFieldTypeOID") {
1831
- i = P.name, C = !0;
1832
- break;
1833
- }
1834
- if (C === !1) {
1835
- let P = "FID", he = !0, ce = 0;
1836
- for (; he; ) {
1837
- let q = !0;
1838
- for (const Ge of e.layerDefinition.fields)
1839
- if (Ge.name === P) {
1840
- q = !1;
1841
- break;
1842
- }
1843
- q === !0 ? he = !1 : (ce++, P = "FID" + ce.toString());
1844
- }
1845
- e.layerDefinition.fields.push({ type: "esriFieldTypeOID", name: P, alias: P });
1846
- const K = [];
1847
- for (let q = 0; q < n.length; q++)
1848
- K.push({ geometry: e.featureSet.features[q].geometry, attributes: e.featureSet.features[q].attributes ? this._cloneAttr(e.featureSet.features[q].attributes) : {} }), K[q].attributes[P] = q;
1849
- n = K, i = P;
1850
- }
1851
- }
1852
- const u = [];
1853
- for (const C of e.layerDefinition.fields)
1854
- C instanceof M ? u.push(C) : u.push(M.fromJSON(C));
1855
- let o = r;
1856
- switch (o || (o = ""), o) {
1857
- case "esriGeometryPoint":
1858
- o = "point";
1859
- break;
1860
- case "esriGeometryPolyline":
1861
- o = "polyline";
1862
- break;
1863
- case "esriGeometryPolygon":
1864
- o = "polygon";
1865
- break;
1866
- case "esriGeometryEnvelope":
1867
- o = "extent";
1868
- break;
1869
- case "esriGeometryMultipoint":
1870
- o = "multipoint";
1871
- break;
1872
- case "":
1873
- case "esriGeometryNull":
1874
- o = "esriGeometryNull";
1875
- }
1876
- if (o !== "esriGeometryNull")
1877
- for (const C of n)
1878
- C.geometry && !(C.geometry instanceof ze) && (C.geometry.type = o, C.geometry.spatialReference === void 0 && (C.geometry.spatialReference = l));
1879
- else
1880
- for (const C of n)
1881
- C.geometry && (C.geometry = null);
1882
- const d = { outFields: ["*"], source: n, fields: u, hasZ: ((y = e == null ? void 0 : e.layerDefinition) == null ? void 0 : y.hasZ) === !0 || ((g = e == null ? void 0 : e.featureSet) == null ? void 0 : g.hasZ) === !0, hasM: ((b = e == null ? void 0 : e.layerDefinition) == null ? void 0 : b.hasM) === !0 || ((S = e == null ? void 0 : e.featureSet) == null ? void 0 : S.hasM) === !0, types: a, typeIdField: s, objectIdField: i, spatialReference: t }, c = o === "esriGeometryNull" || o === null;
1883
- c || (d.geometryType = o);
1884
- const f = new v(d);
1885
- return (p = e == null ? void 0 : e.layerDefinition) != null && p.subtypeField && ((w = e == null ? void 0 : e.layerDefinition) != null && w.subtypes) && f.read({ subtypes: e.layerDefinition.subtypes, subtypeField: e.layerDefinition.subtypeField }), new oe({ layer: f, spatialReference: t, isTable: c });
1886
- }
1887
- async queryAttachments() {
1888
- return [];
1889
- }
1890
- async getFeatureByObjectId(e) {
1891
- const t = new N();
1892
- t.where = this.objectIdField + "=" + e.toString(), t.returnZ = this.hasZ, t.returnM = this.hasM;
1893
- const i = await this._layer.queryFeatures(t);
1894
- return i.features.length === 1 ? i.features[0] : null;
1895
- }
1896
- async getOwningSystemUrl() {
1897
- return "";
1898
- }
1899
- async getIdentityUser() {
1900
- return "";
1901
- }
1902
- get preferredTimeZone() {
1903
- return this._layer.preferredTimeZone ?? null;
1904
- }
1905
- get dateFieldsTimeZone() {
1906
- return this._layer.dateFieldsTimeZone ?? null;
1907
- }
1908
- get datesInUnknownTimezone() {
1909
- var e;
1910
- return (e = this._layer) == null ? void 0 : e.datesInUnknownTimezone;
1911
- }
1912
- get editFieldsInfo() {
1913
- var e;
1914
- return (e = this._layer) == null ? void 0 : e.editFieldsInfo;
1915
- }
1916
- get timeInfo() {
1917
- var e;
1918
- return (e = this._layer) == null ? void 0 : e.timeInfo;
1919
- }
1920
- async getFeatureSetInfo() {
1921
- const e = this._layer.title && this._layer.parent;
1922
- return this.fsetInfo ?? { layerId: null, layerName: null, itemId: null, serviceLayerUrl: null, webMapLayerId: e ? this._layer.id ?? null : null, webMapLayerTitle: e ? this._layer.title ?? null : null, className: null, objectClassId: null };
1923
- }
1924
- }
1925
- class Nt extends E {
1926
- constructor(e) {
1927
- super(e), this.declaredClass = "esri.arcade.featureset.sources.FeatureLayerRelated", this._findObjectId = -1, this._requestStandardised = !1, this._removeGeometry = !1, this._overrideFields = null, this.featureObjectId = null, e.spatialReference && (this.spatialReference = e.spatialReference), this._transparent = !0, this._maxProcessing = 1e3, this._layer = e.layer, this._wset = null, this._findObjectId = e.objectId, this.featureObjectId = e.objectId, this.relationship = e.relationship, this._relatedLayer = e.relatedLayer, e.outFields !== void 0 && (this._overrideFields = e.outFields), e.includeGeometry !== void 0 && (this._removeGeometry = e.includeGeometry === !1);
1928
- }
1929
- _maxQueryRate() {
1930
- return ne;
1931
- }
1932
- end() {
1933
- return this._layer;
1934
- }
1935
- optimisePagingFeatureQueries() {
1936
- }
1937
- async loadImpl() {
1938
- var e;
1939
- return await Promise.all([this._layer.load(), (e = this._relatedLayer) == null ? void 0 : e.load()]), this._initialiseFeatureSet(), this;
1940
- }
1941
- nativeCapabilities() {
1942
- return this._relatedLayer.nativeCapabilities();
1943
- }
1944
- _initialiseFeatureSet() {
1945
- if (this.spatialReference == null && (this.spatialReference = this._layer.spatialReference), this.geometryType = this._relatedLayer.geometryType, this.fields = this._relatedLayer.fields.slice(0), this.hasZ = this._relatedLayer.hasZ, this.hasM = this._relatedLayer.hasM, this._overrideFields !== null)
1946
- if (this._overrideFields.length === 1 && this._overrideFields[0] === "*")
1947
- this._overrideFields = null;
1948
- else {
1949
- const t = [], i = [];
1950
- for (const s of this.fields)
1951
- if (s.type === "oid")
1952
- t.push(s), i.push(s.name);
1953
- else
1954
- for (const a of this._overrideFields)
1955
- if (a.toLowerCase() === s.name.toLowerCase()) {
1956
- t.push(s), i.push(s.name);
1957
- break;
1958
- }
1959
- this.fields = t, this._overrideFields = i;
1960
- }
1961
- const e = this._layer.nativeCapabilities();
1962
- e && (this._databaseType = e.databaseType, this._requestStandardised = e.requestStandardised), this.objectIdField = this._relatedLayer.objectIdField, this.globalIdField = this._relatedLayer.globalIdField, this.hasM = this._relatedLayer.supportsM, this.hasZ = this._relatedLayer.supportsZ, this.typeIdField = this._relatedLayer.typeIdField, this.types = this._relatedLayer.types, this.subtypeField = this._relatedLayer.subtypeField, this.subtypes = this._relatedLayer.subtypes;
1963
- }
1964
- async databaseType() {
1965
- return await this._relatedLayer.databaseType(), this._databaseType = this._relatedLayer._databaseType, this._databaseType;
1966
- }
1967
- isTable() {
1968
- return this._relatedLayer.isTable();
1969
- }
1970
- _isInFeatureSet() {
1971
- return I.InFeatureSet;
1972
- }
1973
- _candidateIdTransform(e) {
1974
- return e;
1975
- }
1976
- async _getSet(e) {
1977
- if (this._wset === null) {
1978
- await this._ensureLoaded();
1979
- const t = await this._getFilteredSet("", null, null, null, e);
1980
- return this._wset = t, t;
1981
- }
1982
- return this._wset;
1983
- }
1984
- _changeFeature(e) {
1985
- const t = {};
1986
- for (const i of this.fields)
1987
- t[i.name] = e.attributes[i.name];
1988
- return new G({ geometry: this._removeGeometry === !0 ? null : e.geometry, attributes: t });
1989
- }
1990
- async _getFilteredSet(e, t, i, s, a) {
1991
- var S, p;
1992
- if (await this.databaseType(), this.isTable() && t && e !== null && e !== "")
1993
- return new _([], [], !0, null);
1994
- const r = this._layer.nativeCapabilities();
1995
- if (r.canQueryRelated === !1)
1996
- return new _([], [], !0, null);
1997
- if ((S = r.capabilities) != null && S.queryRelated && r.capabilities.queryRelated.supportsPagination)
1998
- return this._getFilteredSetUsingPaging(e, t, i, s, a);
1999
- let n = "", l = !1;
2000
- s !== null && ((p = r.capabilities) != null && p.queryRelated) && r.capabilities.queryRelated.supportsOrderBy === !0 && (n = s.constructClause(), l = !0);
2001
- const u = new Te();
2002
- u.objectIds = [this._findObjectId];
2003
- const o = this._overrideFields !== null ? this._overrideFields : this._fieldsIncludingObjectId(this._relatedLayer.fields ? this._relatedLayer.fields.map((w) => w.name) : ["*"]);
2004
- u.outFields = o, u.relationshipId = this.relationship.id, u.where = "1=1";
2005
- let d = !0;
2006
- this._removeGeometry === !0 && (d = !1), u.returnGeometry = d, this._requestStandardised && (u.sqlFormat = "standard"), u.outSpatialReference = this.spatialReference, u.orderByFields = n !== "" ? n.split(",") : null;
2007
- const c = await r.source.queryRelatedFeatures(u);
2008
- this._checkCancelled(a);
2009
- const f = c[this._findObjectId] ? c[this._findObjectId].features : [], y = [];
2010
- for (let w = 0; w < f.length; w++)
2011
- this._featureCache[f[w].attributes[this._relatedLayer.objectIdField]] = f[w], y.push(f[w].attributes[this._relatedLayer.objectIdField]);
2012
- const g = t && e !== null && e !== "", b = i != null;
2013
- return new _(g || b ? y : [], g || b ? [] : y, l, null);
2014
- }
2015
- _fieldsIncludingObjectId(e) {
2016
- if (e === null)
2017
- return [this.objectIdField];
2018
- const t = e.slice(0);
2019
- if (t.includes("*"))
2020
- return t;
2021
- let i = !1;
2022
- for (const s of t)
2023
- if (s.toUpperCase() === this.objectIdField.toUpperCase()) {
2024
- i = !0;
2025
- break;
2026
- }
2027
- return i === !1 && t.push(this.objectIdField), t;
2028
- }
2029
- async _getFilteredSetUsingPaging(e, t, i, s, a) {
2030
- var S, p;
2031
- let r = "", n = !1;
2032
- const l = this._layer.nativeCapabilities();
2033
- s !== null && ((S = l == null ? void 0 : l.capabilities) != null && S.queryRelated) && l.capabilities.queryRelated.supportsOrderBy === !0 && (r = s.constructClause(), n = !0), await this.databaseType();
2034
- const u = "1=1";
2035
- let o = this._maxQueryRate();
2036
- const d = (p = l.capabilities) == null ? void 0 : p.query.maxRecordCount;
2037
- d != null && d < o && (o = d);
2038
- const c = t && e !== null && e !== "", f = i != null;
2039
- let y = null, g = !0;
2040
- this._removeGeometry === !0 && (g = !1);
2041
- const b = this._overrideFields !== null ? this._overrideFields : this._fieldsIncludingObjectId(this._relatedLayer.fields ? this._relatedLayer.fields.map((w) => w.name) : ["*"]);
2042
- return y = new _(c || f ? ["GETPAGES"] : [], c || f ? [] : ["GETPAGES"], n, { outFields: b.join(","), resultRecordCount: o, resultOffset: 0, objectIds: [this._findObjectId], where: u, orderByFields: r, returnGeometry: g, returnIdsOnly: "false", internal: { set: [], lastRetrieved: 0, lastPage: 0, fullyResolved: !1 } }), await this._expandPagedSet(y, o, 0, 0, a), y;
2043
- }
2044
- _expandPagedSet(e, t, i, s, a) {
2045
- return this._expandPagedSetFeatureSet(e, t, i, s, a);
2046
- }
2047
- _clonePageDefinition(e) {
2048
- return e === null ? null : e.groupbypage !== !0 ? { groupbypage: !1, outFields: e.outFields, resultRecordCount: e.resultRecordCount, resultOffset: e.resultOffset, where: e.where, objectIds: e.objectIds, orderByFields: e.orderByFields, returnGeometry: e.returnGeometry, returnIdsOnly: e.returnIdsOnly, internal: e.internal } : { groupbypage: !0, outFields: e.outFields, resultRecordCount: e.resultRecordCount, useOIDpagination: e.useOIDpagination, generatedOid: e.generatedOid, groupByFieldsForStatistics: e.groupByFieldsForStatistics, resultOffset: e.resultOffset, outStatistics: e.outStatistics, geometry: e.geometry, where: e.where, objectIds: e.objectIds, orderByFields: e.orderByFields, returnGeometry: e.returnGeometry, returnIdsOnly: e.returnIdsOnly, internal: e.internal };
2049
- }
2050
- async _getPhysicalPage(e, t, i) {
2051
- const s = e.pagesDefinition.internal.lastRetrieved, a = s, r = e.pagesDefinition.internal.lastPage, n = this._layer.nativeCapabilities(), l = new Te();
2052
- this._requestStandardised === !0 && (l.sqlFormat = "standard"), l.relationshipId = this.relationship.id, l.objectIds = e.pagesDefinition.objectIds, l.resultOffset = e.pagesDefinition.internal.lastPage, l.resultRecordCount = e.pagesDefinition.resultRecordCount, l.outFields = e.pagesDefinition.outFields.split(","), l.where = e.pagesDefinition.where, l.orderByFields = e.pagesDefinition.orderByFields !== "" ? e.pagesDefinition.orderByFields.split(",") : null, l.returnGeometry = e.pagesDefinition.returnGeometry, l.outSpatialReference = this.spatialReference;
2053
- const u = await n.source.queryRelatedFeatures(l);
2054
- if (this._checkCancelled(i), e.pagesDefinition.internal.lastPage !== r)
2055
- return 0;
2056
- const o = u[this._findObjectId] ? u[this._findObjectId].features : [];
2057
- for (let c = 0; c < o.length; c++)
2058
- e.pagesDefinition.internal.set[a + c] = o[c].attributes[this._relatedLayer.objectIdField];
2059
- for (let c = 0; c < o.length; c++)
2060
- this._featureCache[o[c].attributes[this._relatedLayer.objectIdField]] = o[c];
2061
- const d = !u[this._findObjectId] || u[this._findObjectId].exceededTransferLimit === !1;
2062
- return o.length !== e.pagesDefinition.resultRecordCount && d && (e.pagesDefinition.internal.fullyResolved = !0), e.pagesDefinition.internal.lastRetrieved = s + o.length, e.pagesDefinition.internal.lastPage += e.pagesDefinition.resultRecordCount, o.length;
2063
- }
2064
- async _getFeatures(e, t, i, s) {
2065
- const a = [];
2066
- t !== -1 && this._featureCache[t] === void 0 && a.push(t);
2067
- const r = this._maxQueryRate();
2068
- if (this._checkIfNeedToExpandKnownPage(e, r) === !0)
2069
- return await this._expandPagedSet(e, r, 0, 0, s), this._getFeatures(e, t, i, s);
2070
- let n = 0;
2071
- for (let l = e._lastFetchedIndex; l < e._known.length && (n++, n <= i && (e._lastFetchedIndex += 1), !(e._known[l] !== "GETPAGES" && this._featureCache[e._known[l]] === void 0 && (e._known[l] !== t && a.push(e._known[l]), a.length > i))) && !(n >= i && a.length === 0); l++)
2072
- ;
2073
- if (a.length === 0)
2074
- return "success";
2075
- throw new D(T.MissingFeatures);
2076
- }
2077
- async _refineSetBlock(e, t, i) {
2078
- return e;
2079
- }
2080
- async _stat(e, t, i, s, a, r, n) {
2081
- return { calculated: !1 };
2082
- }
2083
- get gdbVersion() {
2084
- return this._relatedLayer.gdbVersion;
2085
- }
2086
- async _canDoAggregates(e, t, i, s, a) {
2087
- return !1;
2088
- }
2089
- relationshipMetaData() {
2090
- return this._relatedLayer.relationshipMetaData();
2091
- }
2092
- serviceUrl() {
2093
- return this._relatedLayer.serviceUrl();
2094
- }
2095
- queryAttachments(e, t, i, s, a) {
2096
- return this._relatedLayer.queryAttachments(e, t, i, s, a);
2097
- }
2098
- getFeatureByObjectId(e, t) {
2099
- return this._relatedLayer.getFeatureByObjectId(e, t);
2100
- }
2101
- getOwningSystemUrl() {
2102
- return this._relatedLayer.getOwningSystemUrl();
2103
- }
2104
- getIdentityUser() {
2105
- return this._relatedLayer.getIdentityUser();
2106
- }
2107
- getDataSourceFeatureSet() {
2108
- return this._relatedLayer;
2109
- }
2110
- get preferredTimeZone() {
2111
- var e;
2112
- return ((e = this._relatedLayer) == null ? void 0 : e.preferredTimeZone) ?? null;
2113
- }
2114
- get dateFieldsTimeZone() {
2115
- var e;
2116
- return ((e = this._relatedLayer) == null ? void 0 : e.dateFieldsTimeZone) ?? null;
2117
- }
2118
- get datesInUnknownTimezone() {
2119
- var e;
2120
- return (e = this._relatedLayer) == null ? void 0 : e.datesInUnknownTimezone;
2121
- }
2122
- get editFieldsInfo() {
2123
- var e;
2124
- return ((e = this._relatedLayer) == null ? void 0 : e.editFieldsInfo) ?? null;
2125
- }
2126
- get timeInfo() {
2127
- var e;
2128
- return ((e = this._relatedLayer) == null ? void 0 : e.timeInfo) ?? null;
2129
- }
2130
- async getFeatureSetInfo() {
2131
- return this.fsetInfo ?? this._layer.featureSetInfo;
2132
- }
2133
- }
2134
- function Lt() {
2135
- m.applicationCache === null && (m.applicationCache = new m());
2136
- }
2137
- async function se(h, e) {
2138
- if (m.applicationCache) {
2139
- const t = m.applicationCache.getLayerInfo(h);
2140
- if (t) {
2141
- const a = await t;
2142
- return new v({ url: h, outFields: e, sourceJSON: a });
2143
- }
2144
- const i = new v({ url: h, outFields: e }), s = (async () => (await i.load(), i.sourceJSON))();
2145
- if (m.applicationCache) {
2146
- m.applicationCache.setLayerInfo(h, s);
2147
- try {
2148
- return await s, i;
2149
- } catch (a) {
2150
- throw m.applicationCache.clearLayerInfo(h), a;
2151
- }
2152
- }
2153
- return await s, i;
2154
- }
2155
- return new v({ url: h, outFields: e });
2156
- }
2157
- async function ue(h, e, t, i, s, a = null) {
2158
- return O(await se(h, ["*"]), e, t, i, s, a);
2159
- }
2160
- function O(h, e = null, t = null, i = !0, s = null, a = null) {
2161
- if (h instanceof v || V(h)) {
2162
- const n = { layer: h, spatialReference: e, outFields: t, includeGeometry: i, lrucache: s, interceptor: a };
2163
- return h.url || !h.source ? new z(n) : new oe(n);
2164
- }
2165
- const r = O(h.parent, e, t, i, s, a);
2166
- return r.filter(R.create(h.parent.subtypeField + "=" + h.subtypeCode.toString(), h.parent.fieldsIndex, r.dateFieldsTimeZoneDefaultUTC));
2167
- }
2168
- async function At(h) {
2169
- if (m.applicationCache !== null) {
2170
- const t = m.applicationCache.getLayerInfo(h);
2171
- if (t !== null)
2172
- return t;
2173
- }
2174
- const e = (async () => {
2175
- const t = await B(h, { responseType: "json", query: { f: "json" } });
2176
- return t.data ? t.data : null;
2177
- })();
2178
- if (m.applicationCache !== null) {
2179
- m.applicationCache.setLayerInfo(h, e);
2180
- try {
2181
- return await e;
2182
- } catch (t) {
2183
- throw m.applicationCache.clearLayerInfo(h), t;
2184
- }
2185
- }
2186
- return e;
2187
- }
2188
- async function Ot(h, e) {
2189
- const t = "QUERYDATAELEMTS:" + e.toString() + ":" + h;
2190
- if (m.applicationCache !== null) {
2191
- const s = m.applicationCache.getLayerInfo(t);
2192
- if (s !== null)
2193
- return s;
2194
- }
2195
- const i = (async () => {
2196
- var a;
2197
- const s = await B(h + "/queryDataElements", { method: "post", responseType: "json", query: { layers: JSON.stringify([e.toString()]), f: "json" } });
2198
- if (s.data) {
2199
- const r = s.data;
2200
- if ((a = r.layerDataElements) != null && a[0])
2201
- return r.layerDataElements[0];
2202
- }
2203
- throw new D(T.DataElementsNotFound);
2204
- })();
2205
- if (m.applicationCache !== null) {
2206
- m.applicationCache.setLayerInfo(t, i);
2207
- try {
2208
- return await i;
2209
- } catch (s) {
2210
- throw m.applicationCache.clearLayerInfo(t), s;
2211
- }
2212
- }
2213
- return i;
2214
- }
2215
- async function je(h) {
2216
- if (m.applicationCache !== null) {
2217
- const t = m.applicationCache.getLayerInfo(h);
2218
- if (t !== null)
2219
- return t;
2220
- }
2221
- const e = (async () => {
2222
- const t = await B(h, { responseType: "json", query: { f: "json" } });
2223
- if (t.data) {
2224
- const i = t.data;
2225
- return i.layers || (i.layers = []), i.tables || (i.tables = []), i;
2226
- }
2227
- return { layers: [], tables: [] };
2228
- })();
2229
- if (m.applicationCache !== null) {
2230
- m.applicationCache.setLayerInfo(h, e);
2231
- try {
2232
- return await e;
2233
- } catch (t) {
2234
- throw m.applicationCache.clearLayerInfo(h), t;
2235
- }
2236
- }
2237
- return e;
2238
- }
2239
- async function Et(h, e) {
2240
- var s, a, r;
2241
- const t = { metadata: null, networkId: -1, unVersion: 3, terminals: [], queryelem: null, layerNameLkp: {}, lkp: null }, i = await je(h);
2242
- if (t.metadata = i, ((s = i.controllerDatasetLayers) == null ? void 0 : s.utilityNetworkLayerId) !== void 0 && i.controllerDatasetLayers.utilityNetworkLayerId !== null) {
2243
- if (i.layers)
2244
- for (const u of i.layers)
2245
- t.layerNameLkp[u.id] = u.name;
2246
- if (i.tables)
2247
- for (const u of i.tables)
2248
- t.layerNameLkp[u.id] = u.name;
2249
- const n = i.controllerDatasetLayers.utilityNetworkLayerId;
2250
- t.networkId = n;
2251
- const l = await Ot(h, n);
2252
- if (l) {
2253
- t.queryelem = l, (a = t.queryelem) != null && a.dataElement && t.queryelem.dataElement.schemaGeneration !== void 0 && (t.unVersion = t.queryelem.dataElement.schemaGeneration), t.lkp = {}, t.queryelem.dataElement.domainNetworks || (t.queryelem.dataElement.domainNetworks = []);
2254
- for (const o of t.queryelem.dataElement.domainNetworks) {
2255
- for (const d of o.edgeSources ?? []) {
2256
- const c = { layerId: d.layerId, sourceId: d.sourceId, className: t.layerNameLkp[d.layerId] ?? null };
2257
- c.className && (t.lkp[c.className] = c);
2258
- }
2259
- for (const d of o.junctionSources ?? []) {
2260
- const c = { layerId: d.layerId, sourceId: d.sourceId, className: t.layerNameLkp[d.layerId] ?? null };
2261
- c.className && (t.lkp[c.className] = c);
2262
- }
2263
- }
2264
- if (t.queryelem.dataElement.terminalConfigurations)
2265
- for (const o of t.queryelem.dataElement.terminalConfigurations)
2266
- for (const d of o.terminals)
2267
- t.terminals.push({ terminalId: d.terminalId, terminalName: d.terminalName });
2268
- const u = await At(h + "/" + n);
2269
- if (((r = u.systemLayers) == null ? void 0 : r.associationsTableId) !== void 0 && u.systemLayers.associationsTableId !== null) {
2270
- const o = [];
2271
- t.unVersion >= 4 && (o.push("STATUS"), o.push("PERCENTALONG"));
2272
- let d = await ue(h + "/" + u.systemLayers.associationsTableId.toString(), e, ["OBJECTID", "FROMNETWORKSOURCEID", "TONETWORKSOURCEID", "FROMGLOBALID", "TOGLOBALID", "TOTERMINALID", "FROMTERMINALID", "ASSOCIATIONTYPE", "ISCONTENTVISIBLE", "GLOBALID", ...o], !1, null, null);
2273
- return await d.load(), t.unVersion >= 4 && (d = d.filter(R.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)", d.getFieldsIndex(), d.dateFieldsTimeZoneDefaultUTC)), await d.load()), { lkp: t.lkp, associations: d, unVersion: t.unVersion, terminals: t.terminals };
2274
- }
2275
- return { associations: null, unVersion: t.unVersion, lkp: null, terminals: [] };
2276
- }
2277
- return { associations: null, unVersion: t.unVersion, lkp: null, terminals: [] };
2278
- }
2279
- return { associations: null, unVersion: t.unVersion, lkp: null, terminals: [] };
2280
- }
2281
- async function Pt(h, e, t, i = null, s = null, a = !0, r = null, n = null) {
2282
- let l = h.serviceUrl();
2283
- if (!l)
2284
- return null;
2285
- l = l.charAt(l.length - 1) === "/" ? l + e.relatedTableId.toString() : l + "/" + e.relatedTableId.toString();
2286
- const u = await ue(l, i, s, a, r, n);
2287
- return new Nt({ layer: h, relatedLayer: u, relationship: e, objectId: t, spatialReference: i, outFields: s, includeGeometry: a, lrucache: r, interceptor: n });
2288
- }
2289
- Oe.registerAction(), Dt.registerAction(), te.registerAction(), ot.registerAction(), le.registerAction();
2290
- class qt extends Ae {
2291
- constructor(e, t = null, i = null, s = null) {
2292
- super(), this._map = e, this._overridespref = t, this._lrucache = i, this._interceptor = s, this._instantLayers = [];
2293
- }
2294
- _makeAndAddFeatureSet(e, t = !0, i = null) {
2295
- const s = O(e, this._overridespref, i === null ? ["*"] : i, t, this._lrucache, this._interceptor);
2296
- return this._instantLayers.push({ featureset: s, opitem: e, includeGeometry: t, outFields: JSON.stringify(i) }), s;
2297
- }
2298
- async featureSetByName(e, t = !0, i = null) {
2299
- if (this._map.loaded !== void 0 && this._map.load !== void 0 && this._map.loaded === !1)
2300
- return await this._map.load(), this.featureSetByName(e, t, i);
2301
- i === null && (i = ["*"]), i = (i = i.slice(0)).sort();
2302
- const s = JSON.stringify(i);
2303
- for (let r = 0; r < this._instantLayers.length; r++) {
2304
- const n = this._instantLayers[r];
2305
- if (n.opitem.title === e && n.includeGeometry === t && n.outFields === s)
2306
- return this._instantLayers[r].featureset;
2307
- }
2308
- const a = this._map.allLayers.find((r) => {
2309
- if (r instanceof v) {
2310
- if (r.title === e)
2311
- return !0;
2312
- } else if (V(r) && r.title === e)
2313
- return !0;
2314
- return !1;
2315
- });
2316
- if (a)
2317
- return this._makeAndAddFeatureSet(a, t, i);
2318
- if (this._map.tables) {
2319
- const r = this._map.tables.find((n) => !!(n.title && n.title === e || n.title && n.title === e));
2320
- if (r) {
2321
- if (r instanceof v)
2322
- return this._makeAndAddFeatureSet(r, t, i);
2323
- if (!r._materializedTable) {
2324
- const n = r.outFields ? r : { ...r, outFields: ["*"] };
2325
- r._materializedTable = new v(n);
2326
- }
2327
- return await r._materializedTable.load(), this._makeAndAddFeatureSet(r._materializedTable, t, i);
2328
- }
2329
- }
2330
- return null;
2331
- }
2332
- async featureSetById(e, t = !0, i = ["*"]) {
2333
- if (this._map.loaded !== void 0 && this._map.load !== void 0 && this._map.loaded === !1)
2334
- return await this._map.load(), this.featureSetById(e, t, i);
2335
- i === null && (i = ["*"]), i = (i = i.slice(0)).sort();
2336
- const s = JSON.stringify(i);
2337
- for (let r = 0; r < this._instantLayers.length; r++) {
2338
- const n = this._instantLayers[r];
2339
- if (n.opitem.id === e && n.includeGeometry === t && n.outFields === s)
2340
- return this._instantLayers[r].featureset;
2341
- }
2342
- const a = this._map.allLayers.find((r) => {
2343
- if (r instanceof v) {
2344
- if (r.id === e)
2345
- return !0;
2346
- } else if (V(r) && r.id === e)
2347
- return !0;
2348
- return !1;
2349
- });
2350
- if (a)
2351
- return this._makeAndAddFeatureSet(a, t, i);
2352
- if (this._map.tables) {
2353
- const r = this._map.tables.find((n) => n.id === e);
2354
- if (r) {
2355
- if (r instanceof v)
2356
- return this._makeAndAddFeatureSet(r, t, i);
2357
- if (!r._materializedTable) {
2358
- const n = { ...r, outFields: ["*"] };
2359
- r._materializedTable = new v(n);
2360
- }
2361
- return await r._materializedTable.load(), this._makeAndAddFeatureSet(r._materializedTable, t, i);
2362
- }
2363
- }
2364
- return null;
2365
- }
2366
- }
2367
- class de extends Ae {
2368
- constructor(e, t = null, i = null, s = null) {
2369
- super(), this._url = e, this._overridespref = t, this._lrucache = i, this._interceptor = s, this.metadata = null, this._instantLayers = [];
2370
- }
2371
- get url() {
2372
- return this._url;
2373
- }
2374
- _makeAndAddFeatureSet(e, t = !0, i = null) {
2375
- const s = O(e, this._overridespref, i === null ? ["*"] : i, t, this._lrucache);
2376
- return this._instantLayers.push({ featureset: s, opitem: e, includeGeometry: t, outFields: JSON.stringify(i) }), s;
2377
- }
2378
- async _loadMetaData() {
2379
- const e = await je(this._url);
2380
- return this.metadata = e, e;
2381
- }
2382
- load() {
2383
- return this._loadMetaData();
2384
- }
2385
- clone() {
2386
- return new de(this._url, this._overridespref, this._lrucache, this._interceptor);
2387
- }
2388
- async featureSetByName(e, t = !0, i = null) {
2389
- i === null && (i = ["*"]), i = (i = i.slice(0)).sort();
2390
- const s = JSON.stringify(i);
2391
- for (let n = 0; n < this._instantLayers.length; n++) {
2392
- const l = this._instantLayers[n];
2393
- if (l.opitem.title === e && l.includeGeometry === t && l.outFields === s)
2394
- return this._instantLayers[n].featureset;
2395
- }
2396
- const a = await this._loadMetaData();
2397
- let r = null;
2398
- for (const n of a.layers ?? [])
2399
- n.name === e && (r = n);
2400
- if (!r)
2401
- for (const n of a.tables ?? [])
2402
- n.name === e && (r = n);
2403
- if (r) {
2404
- const n = await se(this._url + "/" + r.id, ["*"]);
2405
- return this._makeAndAddFeatureSet(n, t, i);
2406
- }
2407
- return null;
2408
- }
2409
- async featureSetById(e, t = !0, i = ["*"]) {
2410
- i === null && (i = ["*"]), i = (i = i.slice(0)).sort();
2411
- const s = JSON.stringify(i);
2412
- e = e != null ? e.toString() : "";
2413
- for (let n = 0; n < this._instantLayers.length; n++) {
2414
- const l = this._instantLayers[n];
2415
- if (l.opitem.id === e && l.includeGeometry === t && l.outFields === s)
2416
- return this._instantLayers[n].featureset;
2417
- }
2418
- const a = await this._loadMetaData();
2419
- let r = null;
2420
- for (const n of a.layers ?? [])
2421
- n.id !== null && n.id !== void 0 && n.id.toString() === e && (r = n);
2422
- if (!r)
2423
- for (const n of a.tables ?? [])
2424
- n.id !== null && n.id !== void 0 && n.id.toString() === e && (r = n);
2425
- if (r) {
2426
- const n = await se(this._url + "/" + r.id, ["*"]);
2427
- return this._makeAndAddFeatureSet(n, t, i);
2428
- }
2429
- return null;
2430
- }
2431
- }
2432
- function jt(h, e, t = null, i = null) {
2433
- return new qt(h, e, t, i);
2434
- }
2435
- function Gt(h, e, t = null, i = null) {
2436
- return new de(h, e, t, i);
2437
- }
2438
- function Ut(h, e, t, i, s) {
2439
- if (h === null)
2440
- return null;
2441
- if (h instanceof v) {
2442
- switch (e) {
2443
- case "datasource":
2444
- return O(h, s, h.outFields, !0, t, i).getDataSourceFeatureSet();
2445
- case "parent":
2446
- case "root":
2447
- return O(h, s, h.outFields, !0, t, i);
2448
- }
2449
- return null;
2450
- }
2451
- if (V(h)) {
2452
- switch (e) {
2453
- case "datasource":
2454
- return O(h, s, h.outFields, !0, t, i).getDataSourceFeatureSet();
2455
- case "parent":
2456
- case "root":
2457
- return O(h, s, h.outFields, !0, t, i);
2458
- }
2459
- return null;
2460
- }
2461
- if (et(h)) {
2462
- switch (e) {
2463
- case "datasource":
2464
- return O(h.parent, s, h.parent.outFields, !0, t, i).getDataSourceFeatureSet();
2465
- case "parent":
2466
- case "root":
2467
- return O(h, s, h.parent.outFields, !0, t, i);
2468
- }
2469
- return null;
2470
- }
2471
- if (h instanceof E)
2472
- switch (e) {
2473
- case "datasource":
2474
- return h.getDataSourceFeatureSet();
2475
- case "parent":
2476
- return h;
2477
- case "root":
2478
- return h.getRootFeatureSet();
2479
- }
2480
- return null;
2481
- }
2482
- async function Bt(h, e, t, i, s, a, r, n = null) {
2483
- if (m.applicationCache) {
2484
- const u = m.applicationCache.getLayerInfo(h + ":" + a.url);
2485
- if (u) {
2486
- const o = await u;
2487
- return O(new v({ url: Y(o.url) + "/" + e, outFields: ["*"] }), t, i, s, r, n);
2488
- }
2489
- }
2490
- const l = new Je({ id: h, portal: a }).load();
2491
- m.applicationCache && m.applicationCache.setLayerInfo(h + ":" + a.url, l);
2492
- try {
2493
- const u = await l;
2494
- return O(new v({ url: Y(u.url ?? "") + "/" + e, outFields: ["*"] }), t, i, s, r, n);
2495
- } catch (u) {
2496
- throw m.applicationCache && m.applicationCache.clearLayerInfo(h + ":" + a.url), u;
2497
- }
2498
- }
2499
- const ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2500
- __proto__: null,
2501
- constructAssociationMetaDataFeatureSetFromUrl: Et,
2502
- constructFeatureSet: O,
2503
- constructFeatureSetFromPortalItem: Bt,
2504
- constructFeatureSetFromRelationship: Pt,
2505
- constructFeatureSetFromUrl: ue,
2506
- convertToFeatureSet: Ut,
2507
- createFeatureSetCollectionFromMap: jt,
2508
- createFeatureSetCollectionFromService: Gt,
2509
- initialiseMetaDataCache: Lt
2510
- }, Symbol.toStringTag, { value: "Module" }));
2511
- export {
2512
- Et as A,
2513
- St as B,
2514
- ue as F,
2515
- ee as I,
2516
- bt as L,
2517
- W as a,
2518
- te as b,
2519
- Oe as c,
2520
- le as d,
2521
- Ae as e,
2522
- oe as f,
2523
- O as g,
2524
- Ft as h,
2525
- wt as i,
2526
- Ut as j,
2527
- Pt as k,
2528
- ci as l,
2529
- Bt as q
2530
- };