@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.
- package/dist/AGraphicContainer-d82e96aa.js +109 -0
- package/dist/APIKeyMixin-2ee64e59.js +19 -0
- package/dist/Analysis-449f84c5.js +31 -0
- package/dist/ArcGISCachedService-a838709f.js +47 -0
- package/dist/ArcGISService-7e5e8710.js +25 -0
- package/dist/AreaMeasurement2D-971dad40.js +405 -0
- package/dist/AreaMeasurement3D-48bc0242.js +488 -0
- package/dist/AttachmentInfo-ad88d558.js +34 -0
- package/dist/AttachmentQuery-c86dac15.js +18 -0
- package/dist/AttributeStore-3851ad0b.js +1707 -0
- package/dist/BaseDynamicLayerView2D-02baa49a.js +63 -0
- package/dist/BingMapsLayer-67c70069.js +112 -0
- package/dist/Bitmap-d455f554.js +128 -0
- package/dist/BitmapContainer-c78799ad.js +23 -0
- package/dist/BlendLayer-246e4998.js +13 -0
- package/dist/BoundsStore-b18f4e4e.js +63 -0
- package/dist/BufferObject-22d914df.js +100 -0
- package/dist/BufferView-5272765e.js +683 -0
- package/dist/BuildingSceneLayer-f08d5129.js +535 -0
- package/dist/Button-335b8469.js +36 -0
- package/dist/CSVLayer-40c0bd0e.js +208 -0
- package/dist/CSVSourceWorker-b8df4580.js +367 -0
- package/dist/CatalogDynamicGroupLayerView2D-3abd5c54.js +66 -0
- package/dist/CatalogFootprintLayerView2D-22c795e4.js +76 -0
- package/dist/CatalogLayer-74d18466.js +262 -0
- package/dist/CatalogLayerView2D-ffee45d8.js +52 -0
- package/dist/ClassBreaksDefinition-5a577d31.js +18 -0
- package/dist/ColorMaterial.glsl-bc384e65.js +64 -0
- package/dist/ColorSet-570396b9.js +45 -0
- package/dist/ColorStop-5009138a.js +29 -0
- package/dist/Container-f931e682.js +521 -0
- package/dist/CustomParametersMixin-9e8adcf6.js +12 -0
- package/dist/DefaultMaterial.glsl-092e1a97.js +42 -0
- package/dist/DefaultMaterial_COLOR_GAMMA-43e030be.js +653 -0
- package/dist/DefaultTheme-59d78c72.js +130 -0
- package/dist/DeleteForwardEditsParameters-8b5196fa.js +18 -0
- package/dist/DimensionLayer-6fc6ab12.js +129 -0
- package/dist/DirectLineMeasurement3D-6823c93d.js +449 -0
- package/dist/DistanceMeasurement2D-a6cf62b6.js +303 -0
- package/dist/DoubleArray-bb8ff0fb.js +25 -0
- package/dist/Dropdown/Filter/test.mocks.d.ts +1 -1
- package/dist/Dropdown/List/test.mocks.d.ts +1 -1
- package/dist/EdgeProcessingWorker-c5511714.js +63 -0
- package/dist/EditBusLayer-513ca203.js +107 -0
- package/dist/ElevationInfo-234040e3.js +56 -0
- package/dist/ElevationLayer-599949a0.js +129 -0
- package/dist/ElevationQuery-aaa7fb05.js +598 -0
- package/dist/ElevationSamplerWorker-07be3a80.js +62 -0
- package/dist/ExportImageParameters-b28e28df.js +66 -0
- package/dist/ExportStrategy-d6fd38ed.js +93 -0
- package/dist/ExportWMSImageParameters-be4cc5df.js +33 -0
- package/dist/External-55b35c8d.js +110 -0
- package/dist/FeatureCollectionSnappingSource-fce9fa91.js +130 -0
- package/dist/FeatureCommandQueue-4e426066.js +1244 -0
- package/dist/FeatureEffect-0a86f0ba.js +39 -0
- package/dist/FeatureEffectLayer-13705792.js +13 -0
- package/dist/FeatureFilter-1635b86a.js +27 -0
- package/dist/FeatureLayer-d2f8e7c0.js +693 -0
- package/dist/FeatureLayerBase-40e10dd6.js +148 -0
- package/dist/FeatureLayerSource-ebd2bea5.js +444 -0
- package/dist/FeatureLayerView2D-23240236.js +1967 -0
- package/dist/FeaturePipelineWorker-8d07a1dd.js +3633 -0
- package/dist/FeatureReductionLayer-55609d4e.js +225 -0
- package/dist/FeatureReductionSelection-2f351ee7.js +22 -0
- package/dist/FeatureServiceSnappingSource-513edf0d.js +481 -0
- package/dist/FeatureServiceSnappingSourceWorker-d6deecd4.js +747 -0
- package/dist/FeatureSet-ffd45984.js +188 -0
- package/dist/FeatureStore-9fd6c0f8.js +131 -0
- package/dist/FeatureTemplate-e4854302.js +12 -0
- package/dist/FeatureType-b4ef51c2.js +25 -0
- package/dist/FieldsIndex-91fb234a.js +109 -0
- package/dist/FormTemplate-67f4d44e.js +350 -0
- package/dist/GeoJSONLayer-e3495648.js +236 -0
- package/dist/GeoJSONSourceWorker-b0ee6d8e.js +247 -0
- package/dist/GeoRSSLayer-afac8cf1.js +73 -0
- package/dist/GeoRSSLayerView2D-b03f6564.js +140 -0
- package/dist/GeometryUtils-058e30f4.js +403 -0
- package/dist/GraphicContainer-d0803f7a.js +26 -0
- package/dist/GraphicManipulator-797ae6c6.js +1499 -0
- package/dist/GraphicsLayer-a30f80da.js +38 -0
- package/dist/GraphicsLayerView2D-0c92e0f2.js +114 -0
- package/dist/GraphicsSnappingSource-e928ab8c.js +273 -0
- package/dist/GraphicsView2D-963eb026.js +620 -0
- package/dist/GroupLayer-7f131ab8.js +147 -0
- package/dist/GroupLayerView2D-5fcc27fc.js +98 -0
- package/dist/HUDMaterial.glsl-3b450c01.js +65 -0
- package/dist/HighlightCounter-fda615cd.js +41 -0
- package/dist/HighlightGraphicContainer-8cfde780.js +18 -0
- package/dist/I3SBinaryReader-a4021fad.js +310 -0
- package/dist/I3SLayerDefinitions-f004f8b6.js +55 -0
- package/dist/I3SUtil-040e44af.js +59 -0
- package/dist/IdentityManager-012e74ca.js +899 -0
- package/dist/ImageHistogramParameters-f7c4c804.js +905 -0
- package/dist/ImageryLayer-c3f0176f.js +1799 -0
- package/dist/ImageryLayerView2D-5a14beb5.js +352 -0
- package/dist/ImageryTileLayer-a93e8471.js +2157 -0
- package/dist/ImageryTileLayerView2D-3e9fea94.js +1110 -0
- package/dist/Indices-f0dca4b5.js +67 -0
- package/dist/IntegratedMesh3DTilesLayer-7e70c76e.js +112 -0
- package/dist/IntegratedMeshLayer-2283f8d9.js +141 -0
- package/dist/InteractiveAnalysisViewModel-f0a0c72a.js +7397 -0
- package/dist/InterleavedLayout-9490090b.js +163 -0
- package/dist/KMLLayer-06b7037f.js +162 -0
- package/dist/KMLLayerView2D-59f96ec9.js +253 -0
- package/dist/KnowledgeGraphLayerView2D-6c8c4aae.js +43 -0
- package/dist/LRUCache-fc532e9b.js +32 -0
- package/dist/LabelClass-eae6271b.js +135 -0
- package/dist/LabelMetric-ee740bd1.js +400 -0
- package/dist/LaserlinePath.glsl-f58264f5.js +64 -0
- package/dist/Laserlines.glsl-14ab8523.js +65 -0
- package/dist/LayerFloorInfo-6ac1a57d.js +15 -0
- package/dist/LayerView-e41297e4.js +206 -0
- package/dist/LercWorker-22ed35b2.js +157 -0
- package/dist/LineOfSightLayer-6bf67bb7.js +147 -0
- package/dist/LinkChartLayer-e9a861f0.js +1027 -0
- package/dist/Lyr3DWorker-29f7a041.js +82 -0
- package/dist/MagnifierPrograms-1584f9b5.js +806 -0
- package/dist/MapImageLayer-b89cf158.js +169 -0
- package/dist/MapImageLayerView2D-e3f4a4cc.js +146 -0
- package/dist/MapNotesLayer-966f3446.js +283 -0
- package/dist/MapNotesLayerView2D-4aedef2a.js +161 -0
- package/dist/MapServiceLayerViewHelper-4f262166.js +288 -0
- package/dist/MeasurementWidgetContent-82971f95.js +2642 -0
- package/dist/MediaLayer-697a7c14.js +523 -0
- package/dist/MediaLayerView2D-64897044.js +332 -0
- package/dist/MemCache-0861cc28.js +227 -0
- package/dist/MemorySourceWorker-e1c531ac.js +222 -0
- package/dist/Mesh-44c8f6ba.js +980 -0
- package/dist/MeshLocalVertexSpace-6fe3a662.js +19 -0
- package/dist/MultiOriginJSONSupport-248453ac.js +158 -0
- package/dist/Notifications/index.d.ts +1 -0
- package/dist/OGCFeatureLayer-2daa0551.js +211 -0
- package/dist/OGCFeatureLayerView2D-7cebf7e0.js +82 -0
- package/dist/ObjectStack-424092a9.js +21 -0
- package/dist/Octree-21d216f2.js +495 -0
- package/dist/OpenStreetMapLayer-ade6fa9d.js +30 -0
- package/dist/OperationalLayer-097ad3e0.js +44 -0
- package/dist/OrderByInfo-e9ed942d.js +16 -0
- package/dist/OrderedLayer-fef2b56e.js +26 -0
- package/dist/OrientedImageryLayer-424a6234.js +216 -0
- package/dist/OverlayCompositing.glsl-1954a291.js +65 -0
- package/dist/OverrideHelper-f8aace2c.js +242 -0
- package/dist/PBFDecoderWorker-15cd639d.js +213 -0
- package/dist/PointCloudLayer-c820d269.js +197 -0
- package/dist/PointCloudUniqueValueRenderer-e7d37f08.js +115 -0
- package/dist/PointCloudWorker-3e28270d.js +212 -0
- package/dist/PooledRBush-e4cbf810.js +272 -0
- package/dist/Popup-2c03dbc0.js +3990 -0
- package/dist/PortalLayer-09e5a300.js +126 -0
- package/dist/Program-ed5a5aa3.js +694 -0
- package/dist/ProgramTemplate-976cfde1.js +35 -0
- package/dist/QueryEngine-8915348b.js +896 -0
- package/dist/QueryTask-f386d91d.js +119 -0
- package/dist/RasterSymbolizer-6177c6ec.js +3024 -0
- package/dist/RasterVFDisplayObject-6411b56f.js +581 -0
- package/dist/RasterWorker-f825daf0.js +78 -0
- package/dist/RawBlockCache-0d61962b.js +185 -0
- package/dist/RealisticTree.glsl-c9fd0d3c.js +42 -0
- package/dist/RefreshableLayer-0945a308.js +80 -0
- package/dist/RefreshableLayerView-4956f17c.js +16 -0
- package/dist/Relationship-9a82bd43.js +64 -0
- package/dist/RelationshipQuery-68ad49a7.js +22 -0
- package/dist/RenderingContext-49610ad9.js +889 -0
- package/dist/RibbonLine.glsl-6314f72e.js +65 -0
- package/dist/RouteLayer-ff5c8f33.js +786 -0
- package/dist/RouteLayerView2D-2cc60ad2.js +195 -0
- package/dist/SDFHelper-b08be611.js +140 -0
- package/dist/SSAO.glsl-0e92c4e5.js +43 -0
- package/dist/SSAOBlur.glsl-a2bb2587.js +42 -0
- package/dist/ScaleRangeLayer-ab226dbd.js +21 -0
- package/dist/SceneLayer-884ec175.js +542 -0
- package/dist/SceneLayerSnappingSource-aa2944b9.js +218 -0
- package/dist/SceneLayerSnappingSourceWorker-5616c206.js +112 -0
- package/dist/SceneLayerWorker-9745b8b5.js +164 -0
- package/dist/SceneService-da855dda.js +215 -0
- package/dist/Scheduler-b3c40220.js +373 -0
- package/dist/Search/test.mocks.d.ts +1 -1
- package/dist/Search/utils.d.ts +1 -1
- package/dist/ShadedColorMaterial.glsl-f953e894.js +64 -0
- package/dist/SnappingOperation-be595c42.js +48 -0
- package/dist/SourceLayerData-ec8ab72c.js +116 -0
- package/dist/SpatialFilter-7d64232d.js +1701 -0
- package/dist/Stop-c022e866.js +281 -0
- package/dist/StreamLayer-d603abd8.js +188 -0
- package/dist/StreamLayerView2D-6d6618cf.js +164 -0
- package/dist/StyleRepository-2f08de17.js +2212 -0
- package/dist/SublayersOwner-cc0e4f54.js +545 -0
- package/dist/SubtypeGroupLayer-bacf048d.js +514 -0
- package/dist/SubtypeGroupLayerView2D-b3ed2c1a.js +84 -0
- package/dist/TechniqueInstance-397b7dc2.js +233 -0
- package/dist/TemporalLayer-7844bd88.js +23 -0
- package/dist/Texture-b1727861.js +501 -0
- package/dist/TextureOnly.glsl-ffd4a7df.js +65 -0
- package/dist/Theme-12cb681b.js +3426 -0
- package/dist/Tick-25d07d27.js +723 -0
- package/dist/TileContainer-ab77d7a6.js +31 -0
- package/dist/TileInfoTilemapCache-3e97ab02.js +38 -0
- package/dist/TileLayer-03cfc8ab.js +194 -0
- package/dist/TileLayerView2D-3cfd6a21.js +187 -0
- package/dist/TilemapCache-36e3c4b7.js +189 -0
- package/dist/TimeInfo-cea2517f.js +42 -0
- package/dist/TimeOnly-5a143001.js +706 -0
- package/dist/Tooltip-2b4711cb.js +138 -0
- package/dist/TopFeaturesQuery-285284f1.js +32 -0
- package/dist/TurboLine-708823a3.js +565 -0
- package/dist/UniqueValueRenderer-3d92c0b9.js +1039 -0
- package/dist/UnknownLayer-d3dbe7c9.js +30 -0
- package/dist/UnknownTimeZone-ed4def19.js +15 -0
- package/dist/UnsupportedLayer-40bbb9f5.js +31 -0
- package/dist/UpdateTracking2D-23c8ff3f.js +8566 -0
- package/dist/Util-2ba07f64.js +57 -0
- package/dist/VectorTileLayer-ba191a02.js +544 -0
- package/dist/VectorTileLayerView2D-bd3971cd.js +2108 -0
- package/dist/Version-d45bee25.js +33 -0
- package/dist/VertexArrayObject-08a9d938.js +73 -0
- package/dist/VertexColor.glsl-cfafd4c9.js +2683 -0
- package/dist/VertexSnappingCandidate-cbae227c.js +13 -0
- package/dist/VideoLayerView2D-ec66c226.js +124 -0
- package/dist/VoxelLayer-888a65f9.js +631 -0
- package/dist/WFSLayer-786bdecd.js +221 -0
- package/dist/WFSSourceWorker-a212500b.js +157 -0
- package/dist/WGLContainer-f05c906a.js +5426 -0
- package/dist/WMSLayer-b2c46060.js +536 -0
- package/dist/WMSLayerView2D-a90672e9.js +117 -0
- package/dist/WMTSLayer-860b1a45.js +531 -0
- package/dist/WMTSLayerView2D-c492825d.js +142 -0
- package/dist/WebTileLayer-e178eb17.js +110 -0
- package/dist/WhereClause-ad3cc5ae.js +2766 -0
- package/dist/WorkerHandle-ef6ad49b.js +47 -0
- package/dist/WorkerTileHandler-c2b98dae.js +1539 -0
- package/dist/action-46ccf03a.js +198 -0
- package/dist/action-group-9785519d.js +145 -0
- package/dist/action-menu-f423306a.js +1759 -0
- package/dist/agrotools-theme.css +2 -2
- package/dist/agrotools-theme.css.map +1 -1
- package/dist/apng-66c828d8.js +392 -0
- package/dist/arcade-af30f385.js +229 -0
- package/dist/arcadeAsyncRuntime-fdce05e3.js +943 -0
- package/dist/arcadeUtils-2b5a1e68.js +8741 -0
- package/dist/arcgis-knowledge-client-core-192a1ac0.js +1218 -0
- package/dist/arcgis-knowledge-client-core-simd-4fb6c777.js +1218 -0
- package/dist/arcgisLayers-f43f9183.js +152 -0
- package/dist/associatedFeatureServiceUtils-15949591.js +92 -0
- package/dist/axisAngleDegrees-de05cd64.js +49 -0
- package/dist/basis_transcoder-6f118404.js +1248 -0
- package/dist/calcite-action-bar-9722a11e.js +303 -0
- package/dist/calcite-action-f5829479.js +22 -0
- package/dist/calcite-action-group-3e77994f.js +28 -0
- package/dist/calcite-button-8979d383.js +228 -0
- package/dist/calcite-flow-b50ce308.js +128 -0
- package/dist/calcite-flow-item-57549b16.js +499 -0
- package/dist/calcite-icon-fb43725c.js +16 -0
- package/dist/calcite-input-fcc054c7.js +24 -0
- package/dist/calcite-label-10d65c11.js +79 -0
- package/dist/calcite-list-2847bddc.js +2135 -0
- package/dist/calcite-list-item-53cde043.js +576 -0
- package/dist/calcite-list-item-group-256eb990.js +71 -0
- package/dist/calcite-loader-022a5436.js +14 -0
- package/dist/calcite-modal-5b1a23d9.js +333 -0
- package/dist/calcite-notice-17009704.js +181 -0
- package/dist/calcite-option-c7d00181.js +94 -0
- package/dist/calcite-scrim-1dced2db.js +18 -0
- package/dist/calcite-select-a96a55a3.js +231 -0
- package/dist/capabilities-3f86754a.js +50 -0
- package/dist/chartCommon-af8c14ae.js +256 -0
- package/dist/chartUtilsAm5-418cf95f.js +2954 -0
- package/dist/clientSideDefaults-2aad569c.js +39 -0
- package/dist/colorRamps-0fae1fde.js +38 -0
- package/dist/colorUtils-6d5e716b.js +164 -0
- package/dist/commonProperties-d1f695a2.js +60 -0
- package/dist/computeTranslationToOriginAndRotation-cba163ab.js +60 -0
- package/dist/conditionalSlot-14f35023.js +27 -0
- package/dist/createConnection-f3b9e606.js +299 -0
- package/dist/dataUtils-65604399.js +1421 -0
- package/dist/deduplicate-16f30199.js +89 -0
- package/dist/defaults-b7c93d2a.js +31 -0
- package/dist/deleteForwardEdits-f31f885d.js +13 -0
- package/dist/diffUtils-54c1c039.js +90 -0
- package/dist/drapedUtils-166cd4c2.js +75 -0
- package/dist/earcut-ffaa9a50.js +292 -0
- package/dist/edgeProcessing-1a2c4169.js +252 -0
- package/dist/editingSupport-ffa6f639.js +203 -0
- package/dist/editsZScale-2840378a.js +37 -0
- package/dist/elevationInfoUtils-c1caf596.js +126 -0
- package/dist/executeForIds-b9c9164b.js +14 -0
- package/dist/executeForTopCount-8a73aea7.js +17 -0
- package/dist/executeForTopExtents-a3d0b42e.js +17 -0
- package/dist/executeForTopIds-f14d5790.js +17 -0
- package/dist/executeQueryJSON-6cd89bed.js +15 -0
- package/dist/executeQueryPBF-e1d32cfc.js +152 -0
- package/dist/executeRelationshipQuery-5cadcb20.js +53 -0
- package/dist/executeTopFeaturesQuery-32dda453.js +18 -0
- package/dist/featureConversionUtils-a5f0b9b2.js +479 -0
- package/dist/featureLayerUtils-828813e8.js +250 -0
- package/dist/featureLayerUtils-9e9f97c1.js +142 -0
- package/dist/featureSetUtils-2f86a02f.js +2530 -0
- package/dist/featuresetbase-bb981400.js +707 -0
- package/dist/featuresetgeom-0185b49f.js +99 -0
- package/dist/featuresetstats-3d689b79.js +81 -0
- package/dist/featuresetstring-83733fad.js +95 -0
- package/dist/fetchService-25e9ba70.js +33 -0
- package/dist/fieldProperties-cd5649d9.js +33 -0
- package/dist/floatRGBA-005cc596.js +20 -0
- package/dist/form-41e8f739.js +138 -0
- package/dist/geohashUtils-776cae3b.js +85 -0
- package/dist/geojson-7ef69d00.js +208 -0
- package/dist/geomasync-43a66474.js +567 -0
- package/dist/geometryEngine-e18a460d.js +192 -0
- package/dist/geometryEngineAsync-ae21d4e2.js +217 -0
- package/dist/geometryEngineBase-d653892b.js +18463 -0
- package/dist/geometryEngineJSON-031f6196.js +46 -0
- package/dist/geometryEngineJSON-9aeb41cd.js +171 -0
- package/dist/geometryEngineWorker-1c2f96e6.js +11 -0
- package/dist/geometryServiceUtils-50afe031.js +28 -0
- package/dist/georeference-cf051555.js +291 -0
- package/dist/gif-3fe5f761.js +323 -0
- package/dist/gltfexport-3ec498d6.js +705 -0
- package/dist/groupLayerUtils-5b8e1f89.js +39 -0
- package/dist/heatmapUtils-b512588d.js +45 -0
- package/dist/highlightReasons-b0f772b2.js +19 -0
- package/dist/hydrated-36edecd6.js +40 -0
- package/dist/i3s-239f062a.js +809 -0
- package/dist/icon-5e93376e.js +127 -0
- package/dist/imageBitmapUtils-142daeaf.js +23 -0
- package/dist/imageUtils-27ed5e73.js +89 -0
- package/dist/imageUtils-901282e9.js +69 -0
- package/dist/imageryUtils-b1dd3a54.js +43 -0
- package/dist/index-6ebf29c1.js +43667 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -14
- package/dist/input-message-20d19cfb.js +92 -0
- package/dist/input2-8da11a51.js +575 -0
- package/dist/interactive-bcb1b82d.js +80 -0
- package/dist/jsonContext-45fce1e1.js +15 -0
- package/dist/jsonUtils-09f69988.js +86 -0
- package/dist/jsonUtils-1f447d0c.js +476 -0
- package/dist/jsonUtils-db906457.js +59 -0
- package/dist/kmlUtils-6412718d.js +112 -0
- package/dist/knowledgeGraphService-80890106.js +739 -0
- package/dist/knowledgegraph-475723f0.js +149 -0
- package/dist/labelUtils-85708580.js +61 -0
- package/dist/labelingInfo-62fc9d21.js +46 -0
- package/dist/layersCreator-a94b60fe.js +151 -0
- package/dist/layersLoader-39c74edb.js +197 -0
- package/dist/lazyLayerLoader-7922c10d.js +10 -0
- package/dist/lclayout-6ac84378.js +773 -0
- package/dist/lengthUtils-6a89d855.js +5 -0
- package/dist/lerc-wasm-b8b3cd2c.js +325 -0
- package/dist/libtess-61451fa0.js +269 -0
- package/dist/libtess-asm-fef1a4ca.js +3673 -0
- package/dist/lineSegment-f45db35c.js +76 -0
- package/dist/loadGLTFMesh-2f9cee21.js +181 -0
- package/dist/loadable-c29cb205.js +24 -0
- package/dist/loader-d9b4787f.js +79 -0
- package/dist/lyr3DWorker-33babc2c.js +2108 -0
- package/dist/mapViewDeps-f5b886c8.js +3052 -0
- package/dist/mediaLayerUtils-5a2c2fe8.js +35 -0
- package/dist/meshFeatureSet-2312bbe6.js +126 -0
- package/dist/meshVertexSpaceUtils-c9b69510.js +58 -0
- package/dist/multidimensionalUtils-e85f5a78.js +290 -0
- package/dist/normalizeUtilsSync-555b1847.js +181 -0
- package/dist/number-72e1a662.js +128 -0
- package/dist/objectResourceUtils-abe804cf.js +1455 -0
- package/dist/observers-f3bd3593.js +30 -0
- package/dist/ogcFeatureUtils-7097c17e.js +206 -0
- package/dist/openCloseComponent-67a2c20c.js +37 -0
- package/dist/orientedBoundingBox-4ae2c366.js +447 -0
- package/dist/parser-7a76caf9.js +488 -0
- package/dist/pbf-0b9b579c.js +215 -0
- package/dist/pbfQueryUtils-baba23c7.js +422 -0
- package/dist/pe-wasm-d080c07b.js +887 -0
- package/dist/persistable-82932da9.js +89 -0
- package/dist/perspectiveUtils-1b383b17.js +42 -0
- package/dist/pieChart-eca78f7c.js +555 -0
- package/dist/plane-84e27261.js +160 -0
- package/dist/popupUtils-b72d32fb.js +22 -0
- package/dist/popupUtils-cde1d105.js +50 -0
- package/dist/portalItemUtils-28314a3f.js +57 -0
- package/dist/portalLayers-eeaa6e57.js +312 -0
- package/dist/portalUtils-457f542e.js +7 -0
- package/dist/programUtils-0c20a48e.js +59 -0
- package/dist/project-1b5431dd.js +21 -0
- package/dist/projectPointToVector-1f1d1dc7.js +14 -0
- package/dist/projectVectorToVector-b7e757a1.js +13 -0
- package/dist/quantityUtils-b64583f9.js +33 -0
- package/dist/quantizationUtils-9e478e23.js +68 -0
- package/dist/quat-5502b70d.js +104 -0
- package/dist/query-b2397453.js +89 -0
- package/dist/queryAttachments-4361fd2f.js +39 -0
- package/dist/queryEngineUtils-f24bc98c.js +21 -0
- package/dist/queryTopFeatures-e06aa562.js +50 -0
- package/dist/queryZScale-b18ec359.js +12 -0
- package/dist/rasterProjectionHelper-935c256c.js +577 -0
- package/dist/rasterUtils-efad8a20.js +122 -0
- package/dist/rasterizingUtils-80de9b14.js +46 -0
- package/dist/request-cae502b7.js +46 -0
- package/dist/requestImageUtils-caebcf1e.js +8 -0
- package/dist/resourceExtension-7d14f4fc.js +17 -0
- package/dist/resourceUtils-8d97f5bf.js +42 -0
- package/dist/resourceUtils-be991ca4.js +69 -0
- package/dist/resourceUtils-fa1a565f.js +62 -0
- package/dist/saveAPIKeyUtils-9f0454db.js +8 -0
- package/dist/saveUtils-22a6caa6.js +24 -0
- package/dist/scaleUtils-ba5596ad.js +23 -0
- package/dist/scrim-5b1b6156.js +114 -0
- package/dist/serviceCapabilitiesUtils-3a47b26b.js +64 -0
- package/dist/sourceUtils-ded5acd6.js +71 -0
- package/dist/sphere-418b76df.js +199 -0
- package/dist/statsWorker-a082453a.js +37 -0
- package/dist/streamLayerUtils-22aa35f2.js +31 -0
- package/dist/style.css +1 -1
- package/dist/styleUtils-aa4777b6.js +75 -0
- package/dist/styleUtils-e5f7ddb7.js +14 -0
- package/dist/sublayerUtils-7c5ebfea.js +37 -0
- package/dist/substitute-da3c695d.js +52 -0
- package/dist/symbolColorUtils-5d3e355f.js +8 -0
- package/dist/symbolLayerUtils-47cdd4d1.js +31 -0
- package/dist/symbologySnappingCandidates-6ebf1df0.js +221 -0
- package/dist/t9n-c80e56d9.js +349 -0
- package/dist/testSVGPremultipliedAlpha-b9ff88ef.js +94 -0
- package/dist/timeSupport-8d2432f7.js +410 -0
- package/dist/triangle-07f96fb9.js +98 -0
- package/dist/unitConversionUtils-c1bfd22b.js +17 -0
- package/dist/unitFormatUtils-e75be0c3.js +40 -0
- package/dist/uploadAssetErrors-3493bdb9.js +70 -0
- package/dist/uploadAssets-24fe5279.js +330 -0
- package/dist/utils-17d83806.js +2746 -0
- package/dist/utils-717efd4b.js +73 -0
- package/dist/utils-74e8e651.js +433 -0
- package/dist/utils-7c8f1d3f.js +232 -0
- package/dist/utils-94cbe432.js +79 -0
- package/dist/utils-a76b92ed.js +34 -0
- package/dist/utils-e73651cf.js +419 -0
- package/dist/utils-f46de72c.js +91 -0
- package/dist/utils3-eb04cacb.js +75 -0
- package/dist/vec3-61daf837.js +81 -0
- package/dist/vec42-27060a00.js +125 -0
- package/dist/versionUtils-c9c03a5d.js +161 -0
- package/dist/visualVariableUtils-bc9bfef1.js +267 -0
- package/dist/webStyleSymbolUtils-0990caa8.js +48 -0
- package/dist/webglDeps-812387f7.js +23 -0
- package/dist/wfsUtils-fdccd660.js +343 -0
- package/dist/workerHelper-d8d5f17b.js +11 -0
- package/dist/xyChart-94c1ef04.js +3335 -0
- package/package.json +1 -1
- package/dist/AGraphicContainer-75e55bb8.js +0 -109
- package/dist/APIKeyMixin-688c6ac6.js +0 -19
- package/dist/Accordion/Accordion.d.ts +0 -49
- package/dist/Analysis-53f71911.js +0 -31
- package/dist/ArcGISCachedService-ea7559f0.js +0 -47
- package/dist/ArcGISService-a447176d.js +0 -25
- package/dist/AreaMeasurement2D-4d0db109.js +0 -405
- package/dist/AreaMeasurement3D-a2a10ea8.js +0 -488
- package/dist/AttachmentInfo-a2849bf0.js +0 -34
- package/dist/AttachmentQuery-e743e06f.js +0 -18
- package/dist/AttributeStore-6a3291d4.js +0 -1707
- package/dist/Avatar/Avatar.d.ts +0 -66
- package/dist/BaseDynamicLayerView2D-b3ff0eae.js +0 -63
- package/dist/BingMapsLayer-689d8e88.js +0 -112
- package/dist/Bitmap-e2b1f93c.js +0 -128
- package/dist/BitmapContainer-4dcc4a14.js +0 -23
- package/dist/BlendLayer-113fd3b8.js +0 -13
- package/dist/BoundsStore-3598604e.js +0 -63
- package/dist/BufferObject-59880a47.js +0 -100
- package/dist/BufferView-2cfe8c7d.js +0 -683
- package/dist/BuildingSceneLayer-a3e4a869.js +0 -535
- package/dist/Button/Button.d.ts +0 -82
- package/dist/Button-5e85250d.js +0 -36
- package/dist/CSVLayer-a68a64b8.js +0 -208
- package/dist/CSVSourceWorker-cf1fee99.js +0 -367
- package/dist/CatalogDynamicGroupLayerView2D-a4ae390f.js +0 -66
- package/dist/CatalogFootprintLayerView2D-145014a4.js +0 -76
- package/dist/CatalogLayer-48e7048b.js +0 -262
- package/dist/CatalogLayerView2D-8b4a4d47.js +0 -52
- package/dist/Checkbox/Checkbox.d.ts +0 -87
- package/dist/ClassBreaksDefinition-e2d8b3cc.js +0 -18
- package/dist/ColorMaterial.glsl-a7c70d21.js +0 -64
- package/dist/ColorSet-f4b34654.js +0 -45
- package/dist/ColorStop-1111f0fd.js +0 -29
- package/dist/Container-4a2d8bcd.js +0 -521
- package/dist/CustomParametersMixin-601866cc.js +0 -12
- package/dist/DataTable/Column/Column.d.ts +0 -36
- package/dist/DataTable/Counters/Counters.d.ts +0 -41
- package/dist/DataTable/DataTable.d.ts +0 -113
- package/dist/DefaultMaterial.glsl-9243ba6c.js +0 -42
- package/dist/DefaultMaterial_COLOR_GAMMA-bf0d97c7.js +0 -653
- package/dist/DefaultTheme-e96ad45b.js +0 -130
- package/dist/DeleteForwardEditsParameters-bd5164e3.js +0 -18
- package/dist/DimensionLayer-d51dcf5e.js +0 -129
- package/dist/DirectLineMeasurement3D-7b426a46.js +0 -449
- package/dist/DistanceMeasurement2D-1f05b105.js +0 -303
- package/dist/DoubleArray-4f276822.js +0 -25
- package/dist/Dropdown/Dropdown.core.d.ts +0 -31
- package/dist/Dropdown/List/Dropdown.List.d.ts +0 -84
- package/dist/EdgeProcessingWorker-317b2f9a.js +0 -63
- package/dist/EditBusLayer-55763028.js +0 -107
- package/dist/ElevationInfo-5be88917.js +0 -56
- package/dist/ElevationLayer-754634d4.js +0 -129
- package/dist/ElevationQuery-1e84df59.js +0 -598
- package/dist/ElevationSamplerWorker-1c01b3d8.js +0 -62
- package/dist/ExportImageParameters-e00a1031.js +0 -66
- package/dist/ExportStrategy-ba992e25.js +0 -93
- package/dist/ExportWMSImageParameters-395804ac.js +0 -33
- package/dist/External-77e767f4.js +0 -110
- package/dist/FeatureCollectionSnappingSource-d1435805.js +0 -130
- package/dist/FeatureCommandQueue-4db7f162.js +0 -1244
- package/dist/FeatureEffect-5b570804.js +0 -39
- package/dist/FeatureEffectLayer-171a9749.js +0 -13
- package/dist/FeatureFilter-db89ec09.js +0 -27
- package/dist/FeatureLayer-881827c7.js +0 -693
- package/dist/FeatureLayerBase-b410d8eb.js +0 -148
- package/dist/FeatureLayerSource-e5eba81e.js +0 -444
- package/dist/FeatureLayerView2D-107b4ed6.js +0 -1967
- package/dist/FeaturePipelineWorker-2b42d98d.js +0 -3633
- package/dist/FeatureReductionLayer-1f3f6a98.js +0 -225
- package/dist/FeatureReductionSelection-b0c4bcaf.js +0 -22
- package/dist/FeatureServiceSnappingSource-fde9a8da.js +0 -481
- package/dist/FeatureServiceSnappingSourceWorker-d4113c50.js +0 -747
- package/dist/FeatureSet-595ae550.js +0 -188
- package/dist/FeatureStore-87fbe804.js +0 -131
- package/dist/FeatureTemplate-c810cba6.js +0 -12
- package/dist/FeatureType-22de76b9.js +0 -25
- package/dist/FieldsIndex-390b005f.js +0 -109
- package/dist/FormTemplate-728de82d.js +0 -350
- package/dist/GeoJSONLayer-fbf5ee27.js +0 -236
- package/dist/GeoJSONSourceWorker-30cd4133.js +0 -247
- package/dist/GeoRSSLayer-2addf639.js +0 -73
- package/dist/GeoRSSLayerView2D-29c15edb.js +0 -140
- package/dist/GeometryUtils-80d3036a.js +0 -403
- package/dist/GraphicContainer-2b112072.js +0 -26
- package/dist/GraphicManipulator-84ac0573.js +0 -1499
- package/dist/GraphicsLayer-ee9f874e.js +0 -38
- package/dist/GraphicsLayerView2D-c5eda7d2.js +0 -114
- package/dist/GraphicsSnappingSource-3dd1e9b3.js +0 -273
- package/dist/GraphicsView2D-40686b59.js +0 -620
- package/dist/GroupLayer-fd168a3e.js +0 -147
- package/dist/GroupLayerView2D-f4078b54.js +0 -98
- package/dist/HUDMaterial.glsl-bea5cb7c.js +0 -65
- package/dist/HighlightCounter-b3b4b206.js +0 -41
- package/dist/HighlightGraphicContainer-c00c331b.js +0 -18
- package/dist/I3SBinaryReader-d3a26893.js +0 -310
- package/dist/I3SLayerDefinitions-2bea64c8.js +0 -55
- package/dist/I3SUtil-ab1a91f5.js +0 -59
- package/dist/IdentityManager-8e14d109.js +0 -899
- package/dist/ImageHistogramParameters-711f313f.js +0 -905
- package/dist/ImageryLayer-fbaf4d8c.js +0 -1799
- package/dist/ImageryLayerView2D-199eb1fd.js +0 -352
- package/dist/ImageryTileLayer-48671dc9.js +0 -2157
- package/dist/ImageryTileLayerView2D-8ac1ee64.js +0 -1110
- package/dist/Indices-2f9cf62d.js +0 -67
- package/dist/Input/Input.core.d.ts +0 -4709
- package/dist/IntegratedMesh3DTilesLayer-89d862a2.js +0 -112
- package/dist/IntegratedMeshLayer-53f792e4.js +0 -141
- package/dist/InteractiveAnalysisViewModel-d7dd665d.js +0 -7397
- package/dist/InterleavedLayout-ff67e161.js +0 -163
- package/dist/KMLLayer-7a4cfa2a.js +0 -162
- package/dist/KMLLayerView2D-d0874e8d.js +0 -253
- package/dist/KnowledgeGraphLayerView2D-70d956b2.js +0 -43
- package/dist/LRUCache-5bebd9a8.js +0 -32
- package/dist/LabelClass-63459c37.js +0 -135
- package/dist/LabelMetric-09a9cd38.js +0 -400
- package/dist/LaserlinePath.glsl-731dbba1.js +0 -64
- package/dist/Laserlines.glsl-26d42447.js +0 -65
- package/dist/LayerFloorInfo-5c67a822.js +0 -15
- package/dist/LayerView-405cecd2.js +0 -206
- package/dist/Legend/Legend.d.ts +0 -73
- package/dist/LercWorker-a7892aa0.js +0 -157
- package/dist/LineOfSightLayer-abad68f7.js +0 -147
- package/dist/LinkChartLayer-c36d2a81.js +0 -1027
- package/dist/Lyr3DWorker-8f4c6c50.js +0 -82
- package/dist/MagnifierPrograms-ddc85113.js +0 -806
- package/dist/Map/Map.d.ts +0 -26
- package/dist/MapImageLayer-04f4cdcb.js +0 -169
- package/dist/MapImageLayerView2D-712dd60f.js +0 -146
- package/dist/MapNotesLayer-83fcba8e.js +0 -283
- package/dist/MapNotesLayerView2D-f0ad0a82.js +0 -161
- package/dist/MapServiceLayerViewHelper-6c746a26.js +0 -288
- package/dist/MeasurementWidgetContent-fc0c1569.js +0 -2642
- package/dist/MediaLayer-05162eaf.js +0 -523
- package/dist/MediaLayerView2D-474c563b.js +0 -332
- package/dist/MemCache-8f96824a.js +0 -227
- package/dist/MemorySourceWorker-08562524.js +0 -222
- package/dist/Mesh-3208420e.js +0 -980
- package/dist/MeshLocalVertexSpace-59268d9e.js +0 -19
- package/dist/Modal/Modal.d.ts +0 -106
- package/dist/MultiOriginJSONSupport-365740bb.js +0 -158
- package/dist/OGCFeatureLayer-7201d1ee.js +0 -211
- package/dist/OGCFeatureLayerView2D-d242f130.js +0 -82
- package/dist/ObjectStack-bad354ab.js +0 -21
- package/dist/Octree-cbaefa65.js +0 -495
- package/dist/OpenStreetMapLayer-b3c8020b.js +0 -30
- package/dist/OperationalLayer-30f48d16.js +0 -44
- package/dist/OrderByInfo-9bd0a8fe.js +0 -16
- package/dist/OrderedLayer-2962d196.js +0 -26
- package/dist/OrientedImageryLayer-5d599e15.js +0 -216
- package/dist/OverlayCompositing.glsl-334c68d5.js +0 -65
- package/dist/OverrideHelper-7981ecc2.js +0 -242
- package/dist/PBFDecoderWorker-48f7e620.js +0 -213
- package/dist/Paginator/Paginator.d.ts +0 -43
- package/dist/PointCloudLayer-5b804571.js +0 -197
- package/dist/PointCloudUniqueValueRenderer-9ef1db42.js +0 -115
- package/dist/PointCloudWorker-9e88daea.js +0 -212
- package/dist/PooledRBush-afceba5f.js +0 -272
- package/dist/Popup-89e3fd56.js +0 -3990
- package/dist/PortalLayer-21d22eb9.js +0 -126
- package/dist/Program-09ee8c67.js +0 -694
- package/dist/ProgramTemplate-be811b23.js +0 -35
- package/dist/ProgressBar/ProgressBar.d.ts +0 -85
- package/dist/QueryEngine-810a7f24.js +0 -896
- package/dist/QueryTask-013cc810.js +0 -119
- package/dist/RadioButton/RadioButton.d.ts +0 -87
- package/dist/RasterSymbolizer-ae063ee7.js +0 -3024
- package/dist/RasterVFDisplayObject-fe2f7ea2.js +0 -581
- package/dist/RasterWorker-7efcbd4d.js +0 -78
- package/dist/RawBlockCache-5a644219.js +0 -185
- package/dist/RealisticTree.glsl-4e33ae57.js +0 -42
- package/dist/RefreshableLayer-e64dd0ee.js +0 -80
- package/dist/RefreshableLayerView-61f7dd9a.js +0 -16
- package/dist/Relationship-adcdce15.js +0 -64
- package/dist/RelationshipQuery-0c20b8ed.js +0 -22
- package/dist/RenderingContext-29b578ca.js +0 -889
- package/dist/RibbonLine.glsl-038f5cac.js +0 -65
- package/dist/RouteLayer-479e0ccc.js +0 -786
- package/dist/RouteLayerView2D-1a646f54.js +0 -195
- package/dist/SDFHelper-9abcbcca.js +0 -140
- package/dist/SSAO.glsl-5d41f99f.js +0 -43
- package/dist/SSAOBlur.glsl-7ebf8f5c.js +0 -42
- package/dist/ScaleRangeLayer-3bbd6ead.js +0 -21
- package/dist/SceneLayer-b19fa11e.js +0 -542
- package/dist/SceneLayerSnappingSource-f53ddd8a.js +0 -218
- package/dist/SceneLayerSnappingSourceWorker-80f48214.js +0 -112
- package/dist/SceneLayerWorker-bab8aeb0.js +0 -164
- package/dist/SceneService-0c4fac79.js +0 -215
- package/dist/Scheduler-9db9a8cf.js +0 -373
- package/dist/Search/Search.d.ts +0 -99
- package/dist/Select/Item/Item.d.ts +0 -104
- package/dist/Select/Multiple/Select.multiple.d.ts +0 -90
- package/dist/Select/Select.core.d.ts +0 -78
- package/dist/Select/Single/Select.single.d.ts +0 -66
- package/dist/ShadedColorMaterial.glsl-a2dd0bb3.js +0 -64
- package/dist/SnappingOperation-25ff52da.js +0 -48
- package/dist/SourceLayerData-ec301fa4.js +0 -116
- package/dist/SpatialFilter-351a1d5e.js +0 -1701
- package/dist/Stop-595501a7.js +0 -281
- package/dist/StreamLayer-d5ebd4d3.js +0 -188
- package/dist/StreamLayerView2D-8a39daaa.js +0 -164
- package/dist/StyleRepository-dd283243.js +0 -2212
- package/dist/SublayersOwner-0be88fd0.js +0 -545
- package/dist/SubtypeGroupLayer-8386c037.js +0 -514
- package/dist/SubtypeGroupLayerView2D-97b63aa1.js +0 -84
- package/dist/Tabs/Tab/Tab.d.ts +0 -69
- package/dist/Tabs/Tabs.d.ts +0 -50
- package/dist/Tag/Tag.d.ts +0 -52
- package/dist/TechniqueInstance-87f77cd3.js +0 -233
- package/dist/TemporalLayer-7c15b8a6.js +0 -23
- package/dist/Texture-c1f5f21b.js +0 -501
- package/dist/TextureOnly.glsl-acae1d94.js +0 -65
- package/dist/Theme-72a69427.js +0 -3426
- package/dist/Tick-d7f9b999.js +0 -723
- package/dist/TileContainer-20f11bc5.js +0 -31
- package/dist/TileInfoTilemapCache-a50aaed0.js +0 -38
- package/dist/TileLayer-ce04649f.js +0 -194
- package/dist/TileLayerView2D-0f45ff75.js +0 -187
- package/dist/TilemapCache-95b53d5a.js +0 -189
- package/dist/TimeInfo-f17e0ff9.js +0 -42
- package/dist/TimeOnly-63922f1a.js +0 -706
- package/dist/Tipograph/Paragraph/Paragraph.d.ts +0 -25
- package/dist/Tipograph/Title/Title.d.ts +0 -25
- package/dist/Toggle/Toggle.d.ts +0 -45
- package/dist/Tooltip-a21a6650.js +0 -138
- package/dist/TopFeaturesQuery-9e4228e7.js +0 -32
- package/dist/TurboLine-aeb14d6e.js +0 -565
- package/dist/UniqueValueRenderer-7532473e.js +0 -1039
- package/dist/UnknownLayer-99d4832b.js +0 -30
- package/dist/UnknownTimeZone-4c0a5184.js +0 -15
- package/dist/UnsupportedLayer-f439265c.js +0 -31
- package/dist/UpdateTracking2D-a1164b3d.js +0 -8566
- package/dist/Upload/Upload.d.ts +0 -206
- package/dist/Util-26f81cc4.js +0 -57
- package/dist/VectorTileLayer-8b5289d2.js +0 -544
- package/dist/VectorTileLayerView2D-00d98337.js +0 -2108
- package/dist/Version-2556ea28.js +0 -33
- package/dist/VertexArrayObject-5595c535.js +0 -73
- package/dist/VertexColor.glsl-01eb58bb.js +0 -2683
- package/dist/VertexSnappingCandidate-c1e2992a.js +0 -13
- package/dist/VideoLayerView2D-e92c8bab.js +0 -124
- package/dist/VoxelLayer-e57c2b7b.js +0 -631
- package/dist/WFSLayer-486fff2e.js +0 -221
- package/dist/WFSSourceWorker-3d8ac573.js +0 -157
- package/dist/WGLContainer-1441483b.js +0 -5426
- package/dist/WMSLayer-07ea95cc.js +0 -536
- package/dist/WMSLayerView2D-8b67d5da.js +0 -117
- package/dist/WMTSLayer-b52fbe0c.js +0 -531
- package/dist/WMTSLayerView2D-8ca1d522.js +0 -142
- package/dist/WebTileLayer-dd24dee2.js +0 -110
- package/dist/WhereClause-2eefa48c.js +0 -2766
- package/dist/WorkerHandle-f6b5ac7b.js +0 -47
- package/dist/WorkerTileHandler-e060fab5.js +0 -1539
- package/dist/action-a2d13907.js +0 -198
- package/dist/action-group-af071314.js +0 -145
- package/dist/action-menu-c759068f.js +0 -1759
- package/dist/apng-b33ce902.js +0 -392
- package/dist/arcade-b05c8c22.js +0 -229
- package/dist/arcadeAsyncRuntime-9b4a7891.js +0 -943
- package/dist/arcadeUtils-41691d12.js +0 -8741
- package/dist/arcgis-knowledge-client-core-2217ce57.js +0 -1218
- package/dist/arcgis-knowledge-client-core-simd-ab44590a.js +0 -1218
- package/dist/arcgisLayers-0ea0be85.js +0 -152
- package/dist/associatedFeatureServiceUtils-09077513.js +0 -92
- package/dist/axisAngleDegrees-1c3d7520.js +0 -49
- package/dist/basis_transcoder-292f1aaf.js +0 -1248
- package/dist/calcite-action-ad0d1e23.js +0 -22
- package/dist/calcite-action-bar-1b2de6d0.js +0 -303
- package/dist/calcite-action-group-aacf8ec4.js +0 -28
- package/dist/calcite-button-125cbd95.js +0 -228
- package/dist/calcite-flow-c9a6e8fa.js +0 -128
- package/dist/calcite-flow-item-eb314bb8.js +0 -499
- package/dist/calcite-icon-07f22bc6.js +0 -16
- package/dist/calcite-input-167be799.js +0 -24
- package/dist/calcite-label-7de34a6b.js +0 -79
- package/dist/calcite-list-2087f9ca.js +0 -2135
- package/dist/calcite-list-item-3419fb5f.js +0 -576
- package/dist/calcite-list-item-group-3a6545e3.js +0 -71
- package/dist/calcite-loader-16bcfb95.js +0 -14
- package/dist/calcite-modal-f608731f.js +0 -333
- package/dist/calcite-notice-88ee1edf.js +0 -181
- package/dist/calcite-option-375585a2.js +0 -94
- package/dist/calcite-scrim-751cf767.js +0 -18
- package/dist/calcite-select-62db97da.js +0 -231
- package/dist/capabilities-359df394.js +0 -50
- package/dist/chartCommon-cceb2530.js +0 -256
- package/dist/chartUtilsAm5-08a29408.js +0 -2954
- package/dist/clientSideDefaults-b5450c9b.js +0 -39
- package/dist/colorRamps-314c4b5a.js +0 -38
- package/dist/colorUtils-6e9b620c.js +0 -164
- package/dist/commonProperties-3399f319.js +0 -60
- package/dist/computeTranslationToOriginAndRotation-0b0f32ad.js +0 -60
- package/dist/conditionalSlot-012fd5da.js +0 -27
- package/dist/createConnection-f1189f51.js +0 -299
- package/dist/dataUtils-950a0ae9.js +0 -1421
- package/dist/deduplicate-eabb5f9e.js +0 -89
- package/dist/defaults-e5c5ee75.js +0 -31
- package/dist/deleteForwardEdits-ea9258ea.js +0 -13
- package/dist/diffUtils-04a71a59.js +0 -90
- package/dist/drapedUtils-2515520d.js +0 -75
- package/dist/earcut-192842ab.js +0 -292
- package/dist/edgeProcessing-da003f69.js +0 -252
- package/dist/editingSupport-9f04ba1b.js +0 -203
- package/dist/editsZScale-97938687.js +0 -37
- package/dist/elevationInfoUtils-e1edd62e.js +0 -126
- package/dist/executeForIds-3b8a1698.js +0 -14
- package/dist/executeForTopCount-6c6cd2f2.js +0 -17
- package/dist/executeForTopExtents-86851593.js +0 -17
- package/dist/executeForTopIds-24bc9dea.js +0 -17
- package/dist/executeQueryJSON-cf7d748b.js +0 -15
- package/dist/executeQueryPBF-ad416846.js +0 -152
- package/dist/executeRelationshipQuery-9b6666bf.js +0 -53
- package/dist/executeTopFeaturesQuery-4ac72bd2.js +0 -18
- package/dist/featureConversionUtils-67a121da.js +0 -479
- package/dist/featureLayerUtils-a4002773.js +0 -142
- package/dist/featureLayerUtils-a7e985d2.js +0 -250
- package/dist/featureSetUtils-11fcb3c4.js +0 -2530
- package/dist/featuresetbase-47894167.js +0 -707
- package/dist/featuresetgeom-bff2aa07.js +0 -99
- package/dist/featuresetstats-14a3fe2b.js +0 -81
- package/dist/featuresetstring-de2b64db.js +0 -95
- package/dist/fetchService-b6d76f5e.js +0 -33
- package/dist/fieldProperties-a9fbe289.js +0 -33
- package/dist/floatRGBA-2bc6800c.js +0 -20
- package/dist/form-e210eee8.js +0 -138
- package/dist/geohashUtils-085312a3.js +0 -85
- package/dist/geojson-f0bc401a.js +0 -208
- package/dist/geomasync-3c3b5e8d.js +0 -567
- package/dist/geometryEngine-2772790a.js +0 -192
- package/dist/geometryEngineAsync-db2e5674.js +0 -217
- package/dist/geometryEngineBase-8b327072.js +0 -18463
- package/dist/geometryEngineJSON-95268e88.js +0 -171
- package/dist/geometryEngineJSON-fc48a48b.js +0 -46
- package/dist/geometryEngineWorker-2fbc65f7.js +0 -11
- package/dist/geometryServiceUtils-ed9cb722.js +0 -28
- package/dist/georeference-f6f67e9b.js +0 -291
- package/dist/gif-a4043534.js +0 -323
- package/dist/gltfexport-d028c5c9.js +0 -705
- package/dist/groupLayerUtils-22dde377.js +0 -39
- package/dist/heatmapUtils-8e578a0a.js +0 -45
- package/dist/highlightReasons-ab23926f.js +0 -19
- package/dist/hydrated-219f2b0c.js +0 -40
- package/dist/i3s-b5ed4851.js +0 -809
- package/dist/icon-8711ff33.js +0 -127
- package/dist/imageBitmapUtils-dc97b3de.js +0 -23
- package/dist/imageUtils-0a71062a.js +0 -69
- package/dist/imageUtils-a4c7c9bf.js +0 -89
- package/dist/imageryUtils-d21fd540.js +0 -43
- package/dist/index-f28919b2.js +0 -43440
- package/dist/input-message-3df877b9.js +0 -92
- package/dist/input2-32e36924.js +0 -575
- package/dist/interactive-c1e1aeaf.js +0 -80
- package/dist/jsonContext-4622e179.js +0 -15
- package/dist/jsonUtils-9f58b7bb.js +0 -476
- package/dist/jsonUtils-d9bb6102.js +0 -86
- package/dist/jsonUtils-e40213c1.js +0 -59
- package/dist/kmlUtils-5f8f6cf6.js +0 -112
- package/dist/knowledgeGraphService-a34bf3b0.js +0 -739
- package/dist/knowledgegraph-68124c78.js +0 -149
- package/dist/labelUtils-3a1386e4.js +0 -61
- package/dist/labelingInfo-69c9f8f4.js +0 -46
- package/dist/layersCreator-5e6fe7f2.js +0 -151
- package/dist/layersLoader-f96735c7.js +0 -197
- package/dist/lazyLayerLoader-142515c4.js +0 -10
- package/dist/lclayout-639ec791.js +0 -773
- package/dist/lengthUtils-8796ccf3.js +0 -5
- package/dist/lerc-wasm-acb341bd.js +0 -325
- package/dist/libtess-a9e7192e.js +0 -269
- package/dist/libtess-asm-8de2fb72.js +0 -3673
- package/dist/lineSegment-2790f546.js +0 -76
- package/dist/loadGLTFMesh-33064e6d.js +0 -181
- package/dist/loadable-4558719f.js +0 -24
- package/dist/loader-4dbc522d.js +0 -79
- package/dist/lyr3DWorker-3365d66f.js +0 -2108
- package/dist/mapViewDeps-67ec1d27.js +0 -3052
- package/dist/mediaLayerUtils-612838fb.js +0 -35
- package/dist/meshFeatureSet-07b96756.js +0 -126
- package/dist/meshVertexSpaceUtils-673c2055.js +0 -58
- package/dist/multidimensionalUtils-79cc2536.js +0 -290
- package/dist/normalizeUtilsSync-9fd98ab4.js +0 -181
- package/dist/number-110986f5.js +0 -128
- package/dist/objectResourceUtils-1b8d1c03.js +0 -1455
- package/dist/observers-507c19a0.js +0 -30
- package/dist/ogcFeatureUtils-3c65f06a.js +0 -206
- package/dist/openCloseComponent-89dc4d35.js +0 -37
- package/dist/orientedBoundingBox-46d44acf.js +0 -447
- package/dist/parser-8f715684.js +0 -488
- package/dist/pbf-4ce99129.js +0 -215
- package/dist/pbfQueryUtils-23cca540.js +0 -422
- package/dist/pe-wasm-d186391a.js +0 -887
- package/dist/persistable-09062510.js +0 -89
- package/dist/perspectiveUtils-9da629d6.js +0 -42
- package/dist/pieChart-92709a5c.js +0 -555
- package/dist/plane-2b39f8eb.js +0 -160
- package/dist/popupUtils-dc099446.js +0 -22
- package/dist/popupUtils-e53c5c04.js +0 -50
- package/dist/portalItemUtils-39079445.js +0 -57
- package/dist/portalLayers-efcd5403.js +0 -312
- package/dist/portalUtils-44b1ac04.js +0 -7
- package/dist/programUtils-c22a40e2.js +0 -59
- package/dist/project-4759dc23.js +0 -21
- package/dist/projectPointToVector-1d9098bc.js +0 -14
- package/dist/projectVectorToVector-add01592.js +0 -13
- package/dist/quantityUtils-afe6e5b7.js +0 -33
- package/dist/quantizationUtils-51d3a038.js +0 -68
- package/dist/quat-22f56b72.js +0 -104
- package/dist/query-8cf3e12b.js +0 -89
- package/dist/queryAttachments-0a63ea2f.js +0 -39
- package/dist/queryEngineUtils-a1db57f0.js +0 -21
- package/dist/queryTopFeatures-b4fb05ad.js +0 -50
- package/dist/queryZScale-112cd8e3.js +0 -12
- package/dist/rasterProjectionHelper-3ae0fcfd.js +0 -577
- package/dist/rasterUtils-6868b6b6.js +0 -122
- package/dist/rasterizingUtils-922f43e7.js +0 -46
- package/dist/request-fd620c13.js +0 -46
- package/dist/requestImageUtils-f8f50ad7.js +0 -8
- package/dist/resourceExtension-f0327971.js +0 -17
- package/dist/resourceUtils-2e33090d.js +0 -69
- package/dist/resourceUtils-db0d7e83.js +0 -42
- package/dist/resourceUtils-ff5eafc3.js +0 -62
- package/dist/saveAPIKeyUtils-32bb955d.js +0 -8
- package/dist/saveUtils-d4ad8f94.js +0 -24
- package/dist/scaleUtils-a3ce8cc6.js +0 -23
- package/dist/scrim-7ef1cdf5.js +0 -114
- package/dist/serviceCapabilitiesUtils-cafdd4bc.js +0 -64
- package/dist/sourceUtils-1a30f8aa.js +0 -71
- package/dist/sphere-84d1e36b.js +0 -199
- package/dist/statsWorker-efb7a41b.js +0 -37
- package/dist/streamLayerUtils-4c5b417e.js +0 -31
- package/dist/styleUtils-8f0e3848.js +0 -75
- package/dist/styleUtils-a61894cc.js +0 -14
- package/dist/sublayerUtils-aaa67481.js +0 -37
- package/dist/substitute-7b4a925f.js +0 -52
- package/dist/symbolColorUtils-45615b74.js +0 -8
- package/dist/symbolLayerUtils-6ee325f3.js +0 -31
- package/dist/symbologySnappingCandidates-a56c7bbb.js +0 -221
- package/dist/t9n-b5ab99e4.js +0 -349
- package/dist/testSVGPremultipliedAlpha-a89a8569.js +0 -94
- package/dist/timeSupport-76d5ec0e.js +0 -410
- package/dist/triangle-95e355d3.js +0 -98
- package/dist/unitConversionUtils-b0c2c156.js +0 -17
- package/dist/unitFormatUtils-b79fea5c.js +0 -40
- package/dist/uploadAssetErrors-7ef907ce.js +0 -70
- package/dist/uploadAssets-99a2ec95.js +0 -330
- package/dist/utils-0da4a164.js +0 -419
- package/dist/utils-0e163cdb.js +0 -433
- package/dist/utils-421c60f9.js +0 -73
- package/dist/utils-6e4fc34d.js +0 -91
- package/dist/utils-9612bce6.js +0 -34
- package/dist/utils-99bb2971.js +0 -2746
- package/dist/utils-d1f92cf8.js +0 -79
- package/dist/utils-e30b7de3.js +0 -232
- package/dist/utils3-41d8e55d.js +0 -75
- package/dist/vec3-ab2339d6.js +0 -81
- package/dist/vec42-1a7bd7a6.js +0 -125
- package/dist/versionUtils-b6c13869.js +0 -161
- package/dist/visualVariableUtils-1a38c540.js +0 -267
- package/dist/webStyleSymbolUtils-6f89a405.js +0 -48
- package/dist/webglDeps-dcb6738a.js +0 -23
- package/dist/wfsUtils-d679c9b9.js +0 -343
- package/dist/workerHelper-8fb7376f.js +0 -11
- package/dist/xyChart-b3c4e27e.js +0 -3335
|
@@ -0,0 +1,3633 @@
|
|
|
1
|
+
import { n as we, j7 as ht, dc as xe, cK as ke, bR as V, cw as Ht, cx as Jt, ia as Kt, eQ as ut, aO as y, fc as Fe, x as dt, bJ as Y, by as ct, ci as es, bw as ts, e as G, y as K, c as lt, S as _t, o as pe, W as D, ap as ss, s as rs, kG as is, gU as se, gW as ns, hN as pt, b as as, fm as gt, U as os, he as hs, dO as Te, cs as us, bh as ds, kH as cs, cZ as De, h as Le } from "./index-6ebf29c1.js";
|
|
2
|
+
import { a as x } from "./definitions-a00a3a6c.js";
|
|
3
|
+
import { m as ft, p as he, d as ze, s as Ue } from "./diffUtils-54c1c039.js";
|
|
4
|
+
import { n as Ge, i as A, r as ls, M as Ce, p as Me, d as yt, f as $e, g as _s, a as ps, b as gs, h as fs, j as ys } from "./AttributeStore-3851ad0b.js";
|
|
5
|
+
import { o as ms } from "./tileUtils-3e0c8c1d.js";
|
|
6
|
+
import { S as bs, R as Is, A as vs } from "./geohashUtils-776cae3b.js";
|
|
7
|
+
import { g as Ss, e as ws, c as mt, N as xs, n as bt, p as ks, b as Fs, w as Ts, a as X, K as Cs, O as Ms, r as $s, f as It } from "./featureConversionUtils-a5f0b9b2.js";
|
|
8
|
+
import { s as H, t as B, e as T } from "./OptimizedGeometry-3b808152.js";
|
|
9
|
+
import { x as Os, j as We } from "./timeSupport-8d2432f7.js";
|
|
10
|
+
import { o as qs, $ as vt } from "./QueryEngine-8915348b.js";
|
|
11
|
+
import { Z as St } from "./FieldsIndex-91fb234a.js";
|
|
12
|
+
import { d as As, c as Ne, S as Rs } from "./query-b2397453.js";
|
|
13
|
+
import { m as wt } from "./quantizationUtils-9e478e23.js";
|
|
14
|
+
import { $ as Be } from "./ogcFeatureUtils-7097c17e.js";
|
|
15
|
+
import { n as Es } from "./pbf-0b9b579c.js";
|
|
16
|
+
import { b as Ps, h as js } from "./pbfQueryUtils-baba23c7.js";
|
|
17
|
+
import { t as Ve } from "./CircularArray-b2bc1dfd.js";
|
|
18
|
+
import { createConnection as Ds } from "./createConnection-f3b9e606.js";
|
|
19
|
+
import { d as Ls } from "./UpdateTracking2D-23c8ff3f.js";
|
|
20
|
+
import "vue";
|
|
21
|
+
import "./LabelMetric-ee740bd1.js";
|
|
22
|
+
import "./enums-2c166c09.js";
|
|
23
|
+
import "./enums-fa8f05ab.js";
|
|
24
|
+
import "./Texture-b1727861.js";
|
|
25
|
+
import "./Program-ed5a5aa3.js";
|
|
26
|
+
import "./BufferObject-22d914df.js";
|
|
27
|
+
import "./VertexElementDescriptor-d7c718c2.js";
|
|
28
|
+
import "./labelUtils-85708580.js";
|
|
29
|
+
import "./TimeOnly-5a143001.js";
|
|
30
|
+
import "./UnknownTimeZone-ed4def19.js";
|
|
31
|
+
import "./highlightReasons-b0f772b2.js";
|
|
32
|
+
import "./OptimizedFeatureSet-54e095c4.js";
|
|
33
|
+
import "./json-5febf88a.js";
|
|
34
|
+
import "./MemCache-0861cc28.js";
|
|
35
|
+
import "./LRUCache-fc532e9b.js";
|
|
36
|
+
import "./WhereClause-ad3cc5ae.js";
|
|
37
|
+
import "./QueryEngineCapabilities-0d8477a2.js";
|
|
38
|
+
import "./utils-717efd4b.js";
|
|
39
|
+
import "./heatmapUtils-b512588d.js";
|
|
40
|
+
import "./vec42-27060a00.js";
|
|
41
|
+
import "./vec4f64-043e974c.js";
|
|
42
|
+
import "./utils-a76b92ed.js";
|
|
43
|
+
import "./utils-74e8e651.js";
|
|
44
|
+
import "./ClassBreaksDefinition-5a577d31.js";
|
|
45
|
+
import "./Scheduler-b3c40220.js";
|
|
46
|
+
import "./RenderState-b244097f.js";
|
|
47
|
+
import "./queryZScale-b18ec359.js";
|
|
48
|
+
import "./geojson-7ef69d00.js";
|
|
49
|
+
import "./date-1c28c6a5.js";
|
|
50
|
+
import "./clientSideDefaults-2aad569c.js";
|
|
51
|
+
import "./defaultsJSON-ba17aa15.js";
|
|
52
|
+
import "./sourceUtils-ded5acd6.js";
|
|
53
|
+
import "./TurboLine-708823a3.js";
|
|
54
|
+
import "./earcut-ffaa9a50.js";
|
|
55
|
+
import "./GeometryUtils-058e30f4.js";
|
|
56
|
+
import "./utils-e73651cf.js";
|
|
57
|
+
import "./Rect-894f011c.js";
|
|
58
|
+
import "./defaults-b7c93d2a.js";
|
|
59
|
+
import "./BindType-5e76c8e1.js";
|
|
60
|
+
import "./Util-2ba07f64.js";
|
|
61
|
+
import "./constants-5bd557fe.js";
|
|
62
|
+
let zs = class {
|
|
63
|
+
constructor(e) {
|
|
64
|
+
this._client = e, this.layerView = this._client.createInvokeProxy("", { ignoreConnectionErrors: !0 }), this.container = this._client.createInvokeProxy("container", { ignoreConnectionErrors: !0 }), this.eventLog = this._client.createInvokeProxy("eventLog", { ignoreConnectionErrors: !0 });
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const re = 1, Oe = 2, ie = 4, qe = 8, Ae = 16, ne = 32, Re = 64, ae = 128;
|
|
68
|
+
function ue(u) {
|
|
69
|
+
switch (u) {
|
|
70
|
+
case re:
|
|
71
|
+
case qe:
|
|
72
|
+
case ne:
|
|
73
|
+
return -1;
|
|
74
|
+
case Oe:
|
|
75
|
+
case Re:
|
|
76
|
+
return 0;
|
|
77
|
+
case ie:
|
|
78
|
+
case Ae:
|
|
79
|
+
case ae:
|
|
80
|
+
return 1;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function de(u) {
|
|
84
|
+
switch (u) {
|
|
85
|
+
case re:
|
|
86
|
+
case Oe:
|
|
87
|
+
case ie:
|
|
88
|
+
return -1;
|
|
89
|
+
case qe:
|
|
90
|
+
case Ae:
|
|
91
|
+
return 0;
|
|
92
|
+
case ne:
|
|
93
|
+
case Re:
|
|
94
|
+
case ae:
|
|
95
|
+
return 1;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const Ye = re | qe | ne, Xe = ie | Ae | ae, Qe = re | Oe | ie, Ze = ne | Re | ae;
|
|
99
|
+
let Us = class {
|
|
100
|
+
constructor(e, t, s, r = 0) {
|
|
101
|
+
this.tileKey = e, this._bufferingEnabled = t, this._sizeHint = r, this._meshes = { self: new Ge(this.id, this._sizeHint), neighbors: new Array() }, this._currentRecordOverlaps = 0, this._currentEntityOverlaps = 0, this._copyBufferedDataIntoSelf = s && this._bufferingEnabled && e.level === 0;
|
|
102
|
+
}
|
|
103
|
+
get id() {
|
|
104
|
+
return this.tileKey.id;
|
|
105
|
+
}
|
|
106
|
+
vertexCount() {
|
|
107
|
+
return this._meshes.self.vertexCount();
|
|
108
|
+
}
|
|
109
|
+
indexCount() {
|
|
110
|
+
return this._meshes.self.indexCount();
|
|
111
|
+
}
|
|
112
|
+
indexEnsureSize(e) {
|
|
113
|
+
this._meshes.self.indexEnsureSize(e);
|
|
114
|
+
}
|
|
115
|
+
entityStart(e, t = e) {
|
|
116
|
+
this._currentEntityOverlaps = 0, this._meshes.self.entityStart(e, t);
|
|
117
|
+
}
|
|
118
|
+
entityRecordCount() {
|
|
119
|
+
return this._meshes.self.entityRecordCount();
|
|
120
|
+
}
|
|
121
|
+
entityEnd() {
|
|
122
|
+
if (this._meshes.self.entityEnd(), this._bufferingEnabled) {
|
|
123
|
+
if (this._copyBufferedDataIntoSelf)
|
|
124
|
+
return;
|
|
125
|
+
for (let e = 0; e < 8; e++) {
|
|
126
|
+
const t = 1 << e;
|
|
127
|
+
this._currentEntityOverlaps & t && this._meshes.neighbors[e].entityEnd();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
recordStart(e, t, s) {
|
|
132
|
+
this._currentRecordOverlaps = 0, this._meshes.self.recordStart(e, t, s);
|
|
133
|
+
}
|
|
134
|
+
recordEnd(e = 0) {
|
|
135
|
+
const t = this._meshes.self.recordEnd(this._currentRecordOverlaps);
|
|
136
|
+
return t && this._currentRecordOverlaps !== 0 ? (this._copyIntoNeighbors(), this._currentEntityOverlaps |= this._currentRecordOverlaps, !0) : t;
|
|
137
|
+
}
|
|
138
|
+
recordBounds(e, t, s, r) {
|
|
139
|
+
this._bufferingEnabled && this._addOverlap(e, t, s, r);
|
|
140
|
+
}
|
|
141
|
+
recordCount() {
|
|
142
|
+
return this._meshes.self.recordCount();
|
|
143
|
+
}
|
|
144
|
+
metricStart(e) {
|
|
145
|
+
this._meshes.self.metricStart(e);
|
|
146
|
+
}
|
|
147
|
+
metricBoxWrite(e) {
|
|
148
|
+
this._meshes.self.metricBoxWrite(e);
|
|
149
|
+
}
|
|
150
|
+
metricEnd() {
|
|
151
|
+
this._meshes.self.metricEnd();
|
|
152
|
+
}
|
|
153
|
+
vertexWrite(e) {
|
|
154
|
+
this._meshes.self.vertexWrite(e);
|
|
155
|
+
}
|
|
156
|
+
vertexWriteF32(e) {
|
|
157
|
+
this._meshes.self.vertexWriteF32(e);
|
|
158
|
+
}
|
|
159
|
+
vertexWriteRegion(e) {
|
|
160
|
+
this._meshes.self.vertexWriteRegion(e);
|
|
161
|
+
}
|
|
162
|
+
indexWrite(e) {
|
|
163
|
+
this._meshes.self.indexWrite(e);
|
|
164
|
+
}
|
|
165
|
+
serialize(e) {
|
|
166
|
+
const t = { message: [], transferList: [] }, s = this._meshes.self.serialize();
|
|
167
|
+
return t.message.push({ tileId: this.tileKey.id, ...s.message }), t.transferList.push(...s.transferList), this._meshes.neighbors.forEach((r, i) => {
|
|
168
|
+
const n = r.serialize(), a = 1 << i, o = ue(a), h = de(a), c = ms(new we(this.tileKey), o, h, e);
|
|
169
|
+
t.message.push({ tileId: c.id, ...n.message }), t.transferList.push(...n.transferList);
|
|
170
|
+
}), t;
|
|
171
|
+
}
|
|
172
|
+
_addOverlap(e, t, s, r) {
|
|
173
|
+
const i = Math.min(x / 2, s), n = Math.min(x / 2, r), a = 255 ^ ((e < 0 + i ? Xe : e >= x - i ? Ye : Xe | Ye) | (t < 0 + n ? Ze : t >= x - n ? Qe : Ze | Qe));
|
|
174
|
+
this._currentRecordOverlaps |= a;
|
|
175
|
+
}
|
|
176
|
+
_copyIntoNeighbors() {
|
|
177
|
+
for (let e = 0; e < 8; e++) {
|
|
178
|
+
const t = 1 << e;
|
|
179
|
+
if (this._currentRecordOverlaps & t) {
|
|
180
|
+
if (this._copyBufferedDataIntoSelf) {
|
|
181
|
+
const n = -ue(t) * x, a = -de(t) * x;
|
|
182
|
+
this._meshes.self.copyLast(n, a);
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
if (!this._meshes.neighbors[e]) {
|
|
186
|
+
const n = Math.floor(this._sizeHint / 16);
|
|
187
|
+
this._meshes.neighbors[e] = new Ge(t, n);
|
|
188
|
+
}
|
|
189
|
+
const s = this._meshes.neighbors[e], r = -ue(t) * x, i = -de(t) * x;
|
|
190
|
+
s.copyLastFrom(this._meshes.self, r, i);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}, Gs = class {
|
|
195
|
+
}, L = class xt {
|
|
196
|
+
constructor() {
|
|
197
|
+
this._defaultResult = null, this._backgroundFillResult = null;
|
|
198
|
+
}
|
|
199
|
+
static async from(e, t, s, r) {
|
|
200
|
+
const i = new xt();
|
|
201
|
+
return i.setDefault(await A(e, t, s.meshes, r)), i;
|
|
202
|
+
}
|
|
203
|
+
size() {
|
|
204
|
+
return 1;
|
|
205
|
+
}
|
|
206
|
+
getDefault() {
|
|
207
|
+
return this._defaultResult;
|
|
208
|
+
}
|
|
209
|
+
setDefault(e) {
|
|
210
|
+
this._defaultResult = e;
|
|
211
|
+
}
|
|
212
|
+
getBackgroundFill() {
|
|
213
|
+
return this._backgroundFillResult;
|
|
214
|
+
}
|
|
215
|
+
setBackgroundFill(e) {
|
|
216
|
+
this._backgroundFillResult = e;
|
|
217
|
+
}
|
|
218
|
+
match(e, t) {
|
|
219
|
+
const s = this.doMatch(e, t) || this.getDefault();
|
|
220
|
+
if (s && s.length > 0) {
|
|
221
|
+
const r = this.getBackgroundFill();
|
|
222
|
+
if (r)
|
|
223
|
+
return [...r, ...s];
|
|
224
|
+
}
|
|
225
|
+
return s;
|
|
226
|
+
}
|
|
227
|
+
getSortKey(e, t) {
|
|
228
|
+
return 0;
|
|
229
|
+
}
|
|
230
|
+
doMatch(e, t) {
|
|
231
|
+
return null;
|
|
232
|
+
}
|
|
233
|
+
async fetchResources(e, t) {
|
|
234
|
+
}
|
|
235
|
+
}, Ws = class kt extends L {
|
|
236
|
+
static async fromDictionaryRenderer(e, t, s) {
|
|
237
|
+
return new kt(e, t, s);
|
|
238
|
+
}
|
|
239
|
+
constructor(e, t, s) {
|
|
240
|
+
super(), this._storage = e, this._schema = t, this._viewParams = s, this._hashToGroup = /* @__PURE__ */ new Map();
|
|
241
|
+
}
|
|
242
|
+
get fieldMap() {
|
|
243
|
+
return this._schema.fieldMap;
|
|
244
|
+
}
|
|
245
|
+
async fetchResources(e, t) {
|
|
246
|
+
const s = t.getCursor(), r = [];
|
|
247
|
+
for (; s.next(); )
|
|
248
|
+
r.push(this._updateMeshWriterGroup(e, s));
|
|
249
|
+
await Promise.all(r);
|
|
250
|
+
}
|
|
251
|
+
match(e, t) {
|
|
252
|
+
const s = e.getAttributeHash();
|
|
253
|
+
return this._hashToGroup.get(s);
|
|
254
|
+
}
|
|
255
|
+
async _updateMeshWriterGroup(e, t) {
|
|
256
|
+
const s = t.readLegacyFeatureForDisplay(), r = t.getAttributeHash();
|
|
257
|
+
if (this._hashToGroup.has(r))
|
|
258
|
+
return;
|
|
259
|
+
this._hashToGroup.set(r, null);
|
|
260
|
+
const i = await e.fetchDictionaryResourceImmediate({ type: "dictionary-request", feature: s });
|
|
261
|
+
if (!i)
|
|
262
|
+
return;
|
|
263
|
+
const n = await A(this._storage, e, i.meshes, this._viewParams);
|
|
264
|
+
this._hashToGroup.set(r, n);
|
|
265
|
+
}
|
|
266
|
+
}, Ns = class Ft extends L {
|
|
267
|
+
constructor(e, t) {
|
|
268
|
+
super(), this._intervals = [], this._isMaxInclusive = t, this._field = e;
|
|
269
|
+
}
|
|
270
|
+
static async fromIntervalSchema(e, t, s, r) {
|
|
271
|
+
const i = await e.createComputedField(s), n = new Ft(i, s.isMaxInclusive);
|
|
272
|
+
await Promise.all(s.intervals.map(async (h) => {
|
|
273
|
+
const c = await A(e, t, h.meshes, r);
|
|
274
|
+
n.add(h, c);
|
|
275
|
+
}));
|
|
276
|
+
const a = await A(e, t, s.defaultSymbol, r);
|
|
277
|
+
n.setDefault(a);
|
|
278
|
+
const o = await A(e, t, s.backgroundFill, r);
|
|
279
|
+
return n.setBackgroundFill(o), n;
|
|
280
|
+
}
|
|
281
|
+
add(e, t) {
|
|
282
|
+
this._intervals.push({ interval: e, result: t }), this._intervals.sort((s, r) => s.interval.min - r.interval.min);
|
|
283
|
+
}
|
|
284
|
+
size() {
|
|
285
|
+
return super.size() + this._intervals.length;
|
|
286
|
+
}
|
|
287
|
+
doMatch(e, t) {
|
|
288
|
+
var r;
|
|
289
|
+
const s = (r = this._field) == null ? void 0 : r.read(e, t);
|
|
290
|
+
if (s == null || isNaN(s) || s === 1 / 0 || s === -1 / 0)
|
|
291
|
+
return null;
|
|
292
|
+
for (let i = 0; i < this._intervals.length; i++) {
|
|
293
|
+
const { interval: n, result: a } = this._intervals[i], o = s >= n.min, h = this._isMaxInclusive ? s <= n.max : s < n.max;
|
|
294
|
+
if (o && h)
|
|
295
|
+
return a;
|
|
296
|
+
}
|
|
297
|
+
return null;
|
|
298
|
+
}
|
|
299
|
+
}, Bs = class Tt extends L {
|
|
300
|
+
static async fromLabelSchema(e, t, s, r) {
|
|
301
|
+
const i = s.classes.map(async (a) => {
|
|
302
|
+
const o = await A(e, t, a.meshes, r);
|
|
303
|
+
return { minScale: a.minScale, maxScale: a.maxScale, meshes: o, expression: null, where: await e.createWhereClause(a.where) };
|
|
304
|
+
}), n = await Promise.all(i);
|
|
305
|
+
return new Tt(n);
|
|
306
|
+
}
|
|
307
|
+
constructor(e) {
|
|
308
|
+
super(), this._labels = e;
|
|
309
|
+
}
|
|
310
|
+
match(e, t) {
|
|
311
|
+
if (!this._labels.length)
|
|
312
|
+
return null;
|
|
313
|
+
const s = this._getLabels(t.$view.scale), r = [];
|
|
314
|
+
for (const i of s)
|
|
315
|
+
i.where && !i.where(e) || r.push(...i.meshes);
|
|
316
|
+
return r;
|
|
317
|
+
}
|
|
318
|
+
_getLabels(e) {
|
|
319
|
+
return this._labels.filter((t) => this._validForTileScale(t, e));
|
|
320
|
+
}
|
|
321
|
+
_validForTileScale(e, t) {
|
|
322
|
+
const s = t - t / 4, r = t + t / 2;
|
|
323
|
+
return (!e.minScale || e.minScale >= s) && (!e.maxScale || e.maxScale <= r);
|
|
324
|
+
}
|
|
325
|
+
}, Vs = class Ct extends L {
|
|
326
|
+
constructor(e, t) {
|
|
327
|
+
super(), this._defaultSymbolSortKey = 0, this._nullResult = null, this._resultsMap = /* @__PURE__ */ new Map(), this._fields = [], this._fields = e, this._separator = t || "";
|
|
328
|
+
}
|
|
329
|
+
static async fromMatcherSchema(e, t, s, r) {
|
|
330
|
+
const i = s.expression ? [e.createComputedField({ expression: s.expression })] : [s.field ? e.createComputedField({ field: s.field }) : null, s.field2 ? e.createComputedField({ field: s.field2 }) : null, s.field3 ? e.createComputedField({ field: s.field3 }) : null], n = (await Promise.all(i)).filter((c) => !!c), a = new Ct(n, s.fieldDelimiter), o = await A(e, t, s.defaultSymbol, r);
|
|
331
|
+
a.setDefault(o);
|
|
332
|
+
const h = await A(e, t, s.backgroundFill, r);
|
|
333
|
+
return a.setBackgroundFill(h), await Promise.all(s.map.map(async (c, d) => {
|
|
334
|
+
const l = await A(e, t, c.symbol, r);
|
|
335
|
+
c.value === "<Null>" ? a.setNullResult(l) : a.add(c.value, l, d + 1);
|
|
336
|
+
})), a;
|
|
337
|
+
}
|
|
338
|
+
setNullResult(e) {
|
|
339
|
+
this._nullResult = e;
|
|
340
|
+
}
|
|
341
|
+
getSortKey(e, t) {
|
|
342
|
+
const s = this._getValueFromFields(e, t);
|
|
343
|
+
if (s == null || s === "" || s === "<Null>")
|
|
344
|
+
return 0;
|
|
345
|
+
const r = this._resultsMap.get(s.toString());
|
|
346
|
+
return r ? r.sortKey : this._defaultSymbolSortKey;
|
|
347
|
+
}
|
|
348
|
+
add(e, t, s) {
|
|
349
|
+
this._resultsMap.set(e.toString(), { meshWriters: t, sortKey: s }), this._defaultSymbolSortKey = Math.max(this._defaultSymbolSortKey, s + 1);
|
|
350
|
+
}
|
|
351
|
+
size() {
|
|
352
|
+
return super.size() + this._resultsMap.size;
|
|
353
|
+
}
|
|
354
|
+
doMatch(e, t) {
|
|
355
|
+
var i;
|
|
356
|
+
const s = this._getValueFromFields(e, t);
|
|
357
|
+
if (this._nullResult !== null && (s == null || s === "" || s === "<Null>"))
|
|
358
|
+
return this._nullResult;
|
|
359
|
+
if (s == null)
|
|
360
|
+
return null;
|
|
361
|
+
const r = s.toString();
|
|
362
|
+
return (i = this._resultsMap.get(r)) == null ? void 0 : i.meshWriters;
|
|
363
|
+
}
|
|
364
|
+
_getValueFromFields(e, t) {
|
|
365
|
+
const s = [];
|
|
366
|
+
for (const r of this._fields) {
|
|
367
|
+
const i = r.read(e, t);
|
|
368
|
+
i == null || i === "" ? s.push("<Null>") : s.push(i);
|
|
369
|
+
}
|
|
370
|
+
return s.join(this._separator);
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
async function Q(u, e, t, s) {
|
|
374
|
+
switch (t.type) {
|
|
375
|
+
case "simple":
|
|
376
|
+
case "heatmap":
|
|
377
|
+
case "dot-density":
|
|
378
|
+
case "pie-chart":
|
|
379
|
+
return L.from(u, e, t, s);
|
|
380
|
+
case "interval":
|
|
381
|
+
return Ns.fromIntervalSchema(u, e, t, s);
|
|
382
|
+
case "dictionary":
|
|
383
|
+
return Ws.fromDictionaryRenderer(u, t, s);
|
|
384
|
+
case "label":
|
|
385
|
+
return Bs.fromLabelSchema(u, e, t, s);
|
|
386
|
+
case "map":
|
|
387
|
+
return Vs.fromMatcherSchema(u, e, t, s);
|
|
388
|
+
case "subtype":
|
|
389
|
+
return Ys.fromSubtypes(u, e, t, s);
|
|
390
|
+
case "cluster":
|
|
391
|
+
return Xs.fromClusterSchema(u, e, t, s);
|
|
392
|
+
default:
|
|
393
|
+
throw new Error("Impl");
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
let Ys = class Mt extends L {
|
|
397
|
+
constructor(e, t) {
|
|
398
|
+
super(), this._subMatchers = e, this._subtypeField = t;
|
|
399
|
+
}
|
|
400
|
+
static async fromSubtypes(e, t, s, r) {
|
|
401
|
+
const i = /* @__PURE__ */ new Map(), n = [];
|
|
402
|
+
for (const a in s.renderers) {
|
|
403
|
+
const o = parseInt(a, 10), h = Q(e, t, s.renderers[a], r).then((c) => i.set(o, c));
|
|
404
|
+
n.push(h);
|
|
405
|
+
}
|
|
406
|
+
return await Promise.all(n), new Mt(i, s.subtypeField);
|
|
407
|
+
}
|
|
408
|
+
match(e, t) {
|
|
409
|
+
const s = e.readAttribute(this._subtypeField), r = this._subMatchers.get(s);
|
|
410
|
+
return r ? r.match(e, t) : null;
|
|
411
|
+
}
|
|
412
|
+
}, Xs = class $t extends L {
|
|
413
|
+
static async fromClusterSchema(e, t, s, r) {
|
|
414
|
+
const [i, n] = await Promise.all([Q(e, t, s.feature, r), Q(e, t, s.cluster, r)]);
|
|
415
|
+
return new $t(i, n);
|
|
416
|
+
}
|
|
417
|
+
constructor(e, t) {
|
|
418
|
+
super(), this._featureMatcher = e, this._clusterMatcher = t;
|
|
419
|
+
}
|
|
420
|
+
match(e, t) {
|
|
421
|
+
return e.readAttribute("cluster_count") === 1 ? this._featureMatcher.match(e, t) : this._clusterMatcher.match(e, t);
|
|
422
|
+
}
|
|
423
|
+
}, Qs = class Ot extends Gs {
|
|
424
|
+
static async create(e, t, s, r) {
|
|
425
|
+
const i = await Q(e, t, s.symbology, r), n = s.labels ? await Q(e, t, s.labels, r) : null;
|
|
426
|
+
return new Ot(i, n);
|
|
427
|
+
}
|
|
428
|
+
constructor(e, t) {
|
|
429
|
+
super(), this._symbology = e, this._labels = t;
|
|
430
|
+
}
|
|
431
|
+
destroy() {
|
|
432
|
+
}
|
|
433
|
+
async enqueueMatcherRequests(e, t) {
|
|
434
|
+
var s;
|
|
435
|
+
await Promise.all([this._symbology.fetchResources(e, t), (s = this._labels) == null ? void 0 : s.fetchResources(e, t)]);
|
|
436
|
+
}
|
|
437
|
+
enqueueWriterRequests(e, t, s) {
|
|
438
|
+
const r = this._symbology.match(t, s);
|
|
439
|
+
if (r) {
|
|
440
|
+
for (const i of r)
|
|
441
|
+
i.enqueueRequest(e, t, s);
|
|
442
|
+
if (this._labels) {
|
|
443
|
+
const i = this._labels.match(t, s);
|
|
444
|
+
if (!i)
|
|
445
|
+
return;
|
|
446
|
+
for (const n of i)
|
|
447
|
+
n.enqueueRequest(e, t, s);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
write(e, t, s, r, i) {
|
|
452
|
+
const n = this._symbology.match(s, r);
|
|
453
|
+
if (n) {
|
|
454
|
+
for (const a of n)
|
|
455
|
+
a.write(e, t, s, r, i);
|
|
456
|
+
if (e.entityRecordCount() >= 1 && this._labels) {
|
|
457
|
+
const a = this._labels.match(s, r);
|
|
458
|
+
if (!a)
|
|
459
|
+
return;
|
|
460
|
+
for (const o of a)
|
|
461
|
+
o.setReferences(n), o.write(e, t, s, r, i);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
getSortKey(e, t) {
|
|
466
|
+
return this._symbology.getSortKey(e, t);
|
|
467
|
+
}
|
|
468
|
+
}, Zs = class {
|
|
469
|
+
constructor(e) {
|
|
470
|
+
this._outstandingMessages = [], this._queue = new ht({ concurrency: e.concurrency, process: (t) => e.process(t) });
|
|
471
|
+
}
|
|
472
|
+
async push(e) {
|
|
473
|
+
if (e.end)
|
|
474
|
+
return await Promise.all(this._outstandingMessages), await this._queue.push(e), void (this._outstandingMessages = []);
|
|
475
|
+
const t = this._queue.push(e);
|
|
476
|
+
return this._outstandingMessages.push(t), t;
|
|
477
|
+
}
|
|
478
|
+
}, qt = class ge {
|
|
479
|
+
static async create(e, t) {
|
|
480
|
+
var r;
|
|
481
|
+
if (t.statisticType === "count") {
|
|
482
|
+
const i = new ls(1);
|
|
483
|
+
return new ge(t.name, t.alias, t.type, t.statisticType, i);
|
|
484
|
+
}
|
|
485
|
+
const s = await e.createComputedField({ expression: (r = t.onStatisticExpression) == null ? void 0 : r.expression, field: t.onStatisticField });
|
|
486
|
+
return new ge(t.name, t.alias, t.type, t.statisticType, s);
|
|
487
|
+
}
|
|
488
|
+
constructor(e, t, s, r, i) {
|
|
489
|
+
this.name = e, this.alias = t, this.type = s, this.statisticType = r, this.computed = i;
|
|
490
|
+
}
|
|
491
|
+
}, Ee = class {
|
|
492
|
+
constructor(e) {
|
|
493
|
+
this.subscription = e, this.handledChunks = /* @__PURE__ */ new Set();
|
|
494
|
+
}
|
|
495
|
+
destroy() {
|
|
496
|
+
}
|
|
497
|
+
}, At = class {
|
|
498
|
+
constructor(e, t) {
|
|
499
|
+
this._source = e, this._attributeStore = t, this._sendStates = /* @__PURE__ */ new Map();
|
|
500
|
+
}
|
|
501
|
+
destroy() {
|
|
502
|
+
}
|
|
503
|
+
get enablePixelBuffering() {
|
|
504
|
+
return !0;
|
|
505
|
+
}
|
|
506
|
+
onSubscribe(e) {
|
|
507
|
+
const t = this.createState(e);
|
|
508
|
+
this._sendStates.set(e.key.id, t), this.updateChunks();
|
|
509
|
+
}
|
|
510
|
+
onUnsubscribe(e) {
|
|
511
|
+
var t;
|
|
512
|
+
(t = this._sendStates.get(e.key.id)) == null || t.destroy(), this._sendStates.delete(e.key.id);
|
|
513
|
+
}
|
|
514
|
+
invalidate() {
|
|
515
|
+
const e = Array.from(this._sendStates.values());
|
|
516
|
+
this._sendStates.clear();
|
|
517
|
+
for (const t of e)
|
|
518
|
+
t.destroy(), this.onSubscribe(t.subscription);
|
|
519
|
+
}
|
|
520
|
+
invalidateAttributeData() {
|
|
521
|
+
}
|
|
522
|
+
getFeatureObjectIdsForAggregate(e) {
|
|
523
|
+
throw new Error("InternalError: AggregateId lookup not supported");
|
|
524
|
+
}
|
|
525
|
+
getDisplayIds(e) {
|
|
526
|
+
return this.displayMap(e, (t) => t, (t) => t);
|
|
527
|
+
}
|
|
528
|
+
getDisplayAndObjectIds(e) {
|
|
529
|
+
return this.displayMap(e, (t) => t, (t, s, r) => [t, r]);
|
|
530
|
+
}
|
|
531
|
+
afterUpdateChunks() {
|
|
532
|
+
}
|
|
533
|
+
}, Rt = class extends At {
|
|
534
|
+
constructor(e, t, s, r) {
|
|
535
|
+
super(e, t), this.spatialReference = s, this.aggregateFields = r, this.events = new xe(), this.featureAdapter = qs;
|
|
536
|
+
}
|
|
537
|
+
get aggregateQueryEngine() {
|
|
538
|
+
return this._aggregateQueryEngine || (this._aggregateQueryEngine = new vt({ featureStore: this, fieldsIndex: this._metadata.fieldsIndex, geometryType: this._metadata.geometryType, objectIdField: this._metadata.objectIdField, spatialReference: this.spatialReference })), this._aggregateQueryEngine;
|
|
539
|
+
}
|
|
540
|
+
removeChunks(e) {
|
|
541
|
+
}
|
|
542
|
+
forEach(e) {
|
|
543
|
+
return this.forEachAggregateWorldSpace(e);
|
|
544
|
+
}
|
|
545
|
+
forEachInBounds(e, t) {
|
|
546
|
+
}
|
|
547
|
+
forEachBounds(e, t) {
|
|
548
|
+
const s = ke();
|
|
549
|
+
for (const r of e) {
|
|
550
|
+
const i = Ss(s, r.geometry, !1, !1);
|
|
551
|
+
i && t(i);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}, Pe = class {
|
|
555
|
+
constructor(e, t, s, r, i) {
|
|
556
|
+
this.subscription = e, this.reader = t, this.clear = s, this.end = r, this.debugInfo = i, this.type = "append";
|
|
557
|
+
}
|
|
558
|
+
get id() {
|
|
559
|
+
return this.subscription.tile.id;
|
|
560
|
+
}
|
|
561
|
+
createMessage(e, t, s) {
|
|
562
|
+
return { type: "append", clear: this.clear, id: this.id, append: e, end: this.end, debugInfo: this.debugInfo, subscriptionVesrion: this.subscription.version, version: t, attributeEpoch: s };
|
|
563
|
+
}
|
|
564
|
+
}, fe = class {
|
|
565
|
+
constructor(e, t, s, r, i) {
|
|
566
|
+
this.subscription = e, this.reader = t, this.remove = s, this.end = r, this.debugInfo = i, this.type = "update";
|
|
567
|
+
}
|
|
568
|
+
get id() {
|
|
569
|
+
return this.subscription.tile.id;
|
|
570
|
+
}
|
|
571
|
+
createMessage(e, t, s) {
|
|
572
|
+
return { type: "update", id: this.id, modify: e, debugInfo: this.debugInfo, remove: this.remove, version: t, subscriptionVesrion: this.subscription.version, end: this.end, attributeEpoch: s };
|
|
573
|
+
}
|
|
574
|
+
}, M = class j extends Ce {
|
|
575
|
+
static fromFeatures(e, t) {
|
|
576
|
+
const { objectIdField: s, geometryType: r } = t, i = ws([], e, r, !1, !1, s);
|
|
577
|
+
for (let n = 0; n < i.length; n++)
|
|
578
|
+
i[n].displayId = e[n].displayId;
|
|
579
|
+
return j.fromOptimizedFeatures(i, t);
|
|
580
|
+
}
|
|
581
|
+
static fromFeatureSet(e, t) {
|
|
582
|
+
const s = mt(e, t.objectIdField);
|
|
583
|
+
return j.fromOptimizedFeatureSet(s, t);
|
|
584
|
+
}
|
|
585
|
+
static fromOptimizedFeatureSet(e, t) {
|
|
586
|
+
const s = j.fromOptimizedFeatures(e.features, t);
|
|
587
|
+
return s._exceededTransferLimit = e.exceededTransferLimit, s._transform = e.transform, s._fieldsIndex = new St(e.fields), s;
|
|
588
|
+
}
|
|
589
|
+
static fromOptimizedFeatures(e, t, s) {
|
|
590
|
+
const r = new j(e, t);
|
|
591
|
+
return r._fieldsIndex = t.fieldsIndex, r._transform = s, r;
|
|
592
|
+
}
|
|
593
|
+
static empty(e) {
|
|
594
|
+
return new j([], e);
|
|
595
|
+
}
|
|
596
|
+
constructor(e, t) {
|
|
597
|
+
super(t), this._exceededTransferLimit = !1, this._featureIndex = -1, this._fieldsIndex = null, this._geometryType = t.geometryType, this._features = e;
|
|
598
|
+
}
|
|
599
|
+
get fields() {
|
|
600
|
+
return this._fieldsIndex;
|
|
601
|
+
}
|
|
602
|
+
get geometryType() {
|
|
603
|
+
return this._geometryType;
|
|
604
|
+
}
|
|
605
|
+
get hasFeatures() {
|
|
606
|
+
return !!this._features.length;
|
|
607
|
+
}
|
|
608
|
+
get hasNext() {
|
|
609
|
+
return this._featureIndex + 1 < this._features.length;
|
|
610
|
+
}
|
|
611
|
+
get exceededTransferLimit() {
|
|
612
|
+
return this._exceededTransferLimit;
|
|
613
|
+
}
|
|
614
|
+
get hasZ() {
|
|
615
|
+
return !1;
|
|
616
|
+
}
|
|
617
|
+
get hasM() {
|
|
618
|
+
return !1;
|
|
619
|
+
}
|
|
620
|
+
get _current() {
|
|
621
|
+
return this._features[this._featureIndex];
|
|
622
|
+
}
|
|
623
|
+
removeIds(e) {
|
|
624
|
+
const t = new Set(e);
|
|
625
|
+
this._features = this._features.filter((s) => !(s.objectId != null && t.has(s.objectId)));
|
|
626
|
+
}
|
|
627
|
+
getSize() {
|
|
628
|
+
return this._features.length;
|
|
629
|
+
}
|
|
630
|
+
getCursor() {
|
|
631
|
+
return this.copy();
|
|
632
|
+
}
|
|
633
|
+
getInTransform() {
|
|
634
|
+
return this._transform;
|
|
635
|
+
}
|
|
636
|
+
getAttributeHash() {
|
|
637
|
+
let e = "";
|
|
638
|
+
for (const t in this._current.attributes)
|
|
639
|
+
e += this._current.attributes[t];
|
|
640
|
+
return e;
|
|
641
|
+
}
|
|
642
|
+
getIndex() {
|
|
643
|
+
return this._featureIndex;
|
|
644
|
+
}
|
|
645
|
+
setIndex(e) {
|
|
646
|
+
this._featureIndex = e;
|
|
647
|
+
}
|
|
648
|
+
getObjectId() {
|
|
649
|
+
var e;
|
|
650
|
+
return (e = this._current) == null ? void 0 : e.objectId;
|
|
651
|
+
}
|
|
652
|
+
getDisplayId() {
|
|
653
|
+
return this._current.displayId;
|
|
654
|
+
}
|
|
655
|
+
setDisplayId(e) {
|
|
656
|
+
this._current.displayId = e;
|
|
657
|
+
}
|
|
658
|
+
copy() {
|
|
659
|
+
const e = new j(this._features, this.metadata);
|
|
660
|
+
return this.copyInto(e), e;
|
|
661
|
+
}
|
|
662
|
+
next() {
|
|
663
|
+
for (; ++this._featureIndex < this._features.length && !this._getExists(); )
|
|
664
|
+
;
|
|
665
|
+
return this._featureIndex < this._features.length;
|
|
666
|
+
}
|
|
667
|
+
readGeometryArea() {
|
|
668
|
+
return H(this._current) ? xs(this._current.geometry, 2) : 0;
|
|
669
|
+
}
|
|
670
|
+
_readX() {
|
|
671
|
+
return H(this._current) ? this._current.geometry.coords[0] : 0;
|
|
672
|
+
}
|
|
673
|
+
_readY() {
|
|
674
|
+
return H(this._current) ? this._current.geometry.coords[1] : 0;
|
|
675
|
+
}
|
|
676
|
+
_readGeometry() {
|
|
677
|
+
return H(this._current) ? this._current.geometry ?? null : null;
|
|
678
|
+
}
|
|
679
|
+
_readServerCentroid() {
|
|
680
|
+
return this._current.centroid;
|
|
681
|
+
}
|
|
682
|
+
_readAttribute(e, t) {
|
|
683
|
+
var i;
|
|
684
|
+
if (!this._fieldsIndex) {
|
|
685
|
+
const n = this._current.attributes[e];
|
|
686
|
+
if (n !== void 0)
|
|
687
|
+
return n;
|
|
688
|
+
const a = e.toLowerCase();
|
|
689
|
+
for (const o in this._current.attributes)
|
|
690
|
+
if (o.toLowerCase() === a)
|
|
691
|
+
return this._current.attributes[o];
|
|
692
|
+
return;
|
|
693
|
+
}
|
|
694
|
+
const s = this._fieldsIndex.get(e);
|
|
695
|
+
if (!s)
|
|
696
|
+
return;
|
|
697
|
+
let r = this._current.attributes[s.name];
|
|
698
|
+
return r == null ? r : (((i = this.fields.get(e)) == null ? void 0 : i.type) === "esriFieldTypeTimestampOffset" && (r = this.parseTimestampOffset(r)), t && this.fields.isDateField(e) ? new Date(r) : r);
|
|
699
|
+
}
|
|
700
|
+
_readAttributes() {
|
|
701
|
+
return this._current.attributes;
|
|
702
|
+
}
|
|
703
|
+
copyInto(e) {
|
|
704
|
+
super.copyInto(e), e._featureIndex = this._featureIndex, e._transform = this._transform, e._fieldsIndex = this._fieldsIndex;
|
|
705
|
+
}
|
|
706
|
+
}, Hs = class extends Ee {
|
|
707
|
+
constructor(e, t) {
|
|
708
|
+
super(e), this.bins = /* @__PURE__ */ new Map(), this.done = !1, this._store = t;
|
|
709
|
+
}
|
|
710
|
+
reset() {
|
|
711
|
+
this.destroy(), this.bins.clear(), this.done = !1, this.handledChunks.clear();
|
|
712
|
+
}
|
|
713
|
+
destroy() {
|
|
714
|
+
var t;
|
|
715
|
+
const e = this.subscription.tile.key.level;
|
|
716
|
+
for (const s of this.bins.values()) {
|
|
717
|
+
const r = (t = s.cachedFeature) == null ? void 0 : t.objectId;
|
|
718
|
+
r != null && this._store.releaseDisplayIdForObjectId(`${r}.${e}`);
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
*featuresWorldSpace() {
|
|
722
|
+
for (const e of this.bins.values()) {
|
|
723
|
+
const t = e.cachedFeature;
|
|
724
|
+
if (t) {
|
|
725
|
+
const s = t.clone();
|
|
726
|
+
s.geometry && ks(s.geometry, s.geometry, !1, !1, this.subscription.tile.transform), yield s;
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
getGeohashBounds(e, t) {
|
|
731
|
+
const s = this.subscription.tile;
|
|
732
|
+
return bs(s.extent, s.resolution, t, e);
|
|
733
|
+
}
|
|
734
|
+
}, Js = class Et extends Rt {
|
|
735
|
+
static async create(e, t, s, r, i) {
|
|
736
|
+
const n = new Me({ spatialReference: t }), a = e.fixedBinLevel, o = await Promise.all(e.fields.map(async (c) => qt.create(n, c))), h = e.featureFilter ? await yt.create({ geometryType: s.metadata.geometryType, hasM: !1, hasZ: !1, timeInfo: s.metadata.timeInfo, fieldsIndex: s.metadata.fieldsIndex, spatialReference: t, filterJSON: e.featureFilter }) : null;
|
|
737
|
+
return await Os(t, V.WGS84), new Et({ fields: o, geohashLevel: a, spatialReference: t, featureFilter: h, timeZone: i }, e.fields, s, r);
|
|
738
|
+
}
|
|
739
|
+
constructor(e, t, s, r) {
|
|
740
|
+
super(s, r, e.spatialReference, e.fields), this._indexOptions = e, this._metadata = new $e({ geometryType: "esriGeometryPolygon", objectIdField: "aggregateId", fields: t, globalIdField: null, spatialReference: s.metadata.spatialReference, subtypeField: null, subtypes: null, timeInfo: null, timeReferenceUnknownClient: null, typeIdField: null, types: null });
|
|
741
|
+
}
|
|
742
|
+
createState(e) {
|
|
743
|
+
return new Hs(e, this._attributeStore);
|
|
744
|
+
}
|
|
745
|
+
async *applyOverride(e) {
|
|
746
|
+
for (const t of this._sendStates.values())
|
|
747
|
+
t.reset(), yield new Pe(t.subscription, M.empty(this._source.metadata), !0, !1, {});
|
|
748
|
+
}
|
|
749
|
+
displayMap(e, t, s) {
|
|
750
|
+
const r = new Map(e.map((n) => [t(n), n])), i = [];
|
|
751
|
+
for (const n of this._sendStates.values())
|
|
752
|
+
for (const a of n.featuresWorldSpace()) {
|
|
753
|
+
const { objectId: o, displayId: h } = a, c = r.get(o);
|
|
754
|
+
if (c != null) {
|
|
755
|
+
const d = s(h, c, o);
|
|
756
|
+
i.push(d), r.delete(o);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
return i;
|
|
760
|
+
}
|
|
761
|
+
getDisplayFeatures(e) {
|
|
762
|
+
const t = new Set(e), s = /* @__PURE__ */ new Set(), r = [];
|
|
763
|
+
for (const i of this._sendStates.values())
|
|
764
|
+
for (const n of i.featuresWorldSpace())
|
|
765
|
+
t.has(n.displayId) && !s.has(n.objectId) && (n.geometry && r.push({ ...bt(n, this._metadata.geometryType, !1, !1), displayId: n.displayId }), s.add(n.objectId));
|
|
766
|
+
return { features: [], aggregates: r };
|
|
767
|
+
}
|
|
768
|
+
getFeatureObjectIdsForAggregate(e) {
|
|
769
|
+
for (const t of this._sendStates.values())
|
|
770
|
+
for (const s of t.bins.values())
|
|
771
|
+
if (s.id === e)
|
|
772
|
+
return Array.from(s.objectIds);
|
|
773
|
+
return [];
|
|
774
|
+
}
|
|
775
|
+
async *updateChunks() {
|
|
776
|
+
if (this._source.chunks().length)
|
|
777
|
+
for (const e of this._sendStates.values())
|
|
778
|
+
yield* this._update(e, this._source);
|
|
779
|
+
}
|
|
780
|
+
forEachAggregateWorldSpace(e) {
|
|
781
|
+
for (const t of this._sendStates.values())
|
|
782
|
+
for (const s of t.featuresWorldSpace())
|
|
783
|
+
e(s);
|
|
784
|
+
}
|
|
785
|
+
async *_update(e, t) {
|
|
786
|
+
const { handledChunks: s, subscription: r, bins: i } = e, { spatialReference: n, geohashLevel: a } = this._indexOptions, o = r.tile;
|
|
787
|
+
if (e.done)
|
|
788
|
+
return;
|
|
789
|
+
for (const p of t.chunks()) {
|
|
790
|
+
if (s.has(p.chunkId))
|
|
791
|
+
continue;
|
|
792
|
+
s.add(p.chunkId);
|
|
793
|
+
const I = p.queryInfo;
|
|
794
|
+
if ("tileId" in I) {
|
|
795
|
+
const b = new we(I.tileId);
|
|
796
|
+
if (b.level !== o.level || b.world !== o.key.world)
|
|
797
|
+
continue;
|
|
798
|
+
}
|
|
799
|
+
const f = p.getGeohashIndex(this._indexOptions), k = e.getGeohashBounds(n, a);
|
|
800
|
+
k != null && f.putBins(i, k);
|
|
801
|
+
}
|
|
802
|
+
const h = [], c = r.tile.transform, d = r.tile.key.level;
|
|
803
|
+
for (const p of i.values()) {
|
|
804
|
+
if (p.cachedFeature)
|
|
805
|
+
p.cachedFeature.attributes = p.getAttributes();
|
|
806
|
+
else {
|
|
807
|
+
const I = p.getGeometry(this.spatialReference, c), f = new B(I, p.getAttributes(), null);
|
|
808
|
+
I || (f.centroid = p.getGeometryCentroid(this.spatialReference, c)), f.objectId = p.id, f.displayId = this._attributeStore.createDisplayIdForObjectId(`${f.objectId}.${d}`), p.cachedFeature = f;
|
|
809
|
+
}
|
|
810
|
+
h.push(p.cachedFeature);
|
|
811
|
+
}
|
|
812
|
+
this.events.emit("changed"), e.done = !t.updateTracking.updating;
|
|
813
|
+
const l = M.fromOptimizedFeatures(h, this._metadata, c), g = l.getCursor(), _ = e.subscription.tile.createArcadeEvaluationOptions(this._indexOptions.timeZone);
|
|
814
|
+
for (; g.next(); )
|
|
815
|
+
this._attributeStore.setAttributeData(g.getDisplayId(), g, _);
|
|
816
|
+
yield new fe(e.subscription, l, [], e.done, {});
|
|
817
|
+
}
|
|
818
|
+
};
|
|
819
|
+
const He = Math.PI / 180;
|
|
820
|
+
let Pt = class ye {
|
|
821
|
+
static create(e) {
|
|
822
|
+
return new ye(e.map((t) => Ks(t)));
|
|
823
|
+
}
|
|
824
|
+
constructor(e) {
|
|
825
|
+
this._statistics = e;
|
|
826
|
+
}
|
|
827
|
+
values() {
|
|
828
|
+
return this._statistics.values();
|
|
829
|
+
}
|
|
830
|
+
insert(e, t) {
|
|
831
|
+
for (const s of this._statistics)
|
|
832
|
+
s.insert(e, t);
|
|
833
|
+
}
|
|
834
|
+
merge(e) {
|
|
835
|
+
for (let t = 0; t < this._statistics.length; t++) {
|
|
836
|
+
const s = this._statistics[t], r = e._statistics[t];
|
|
837
|
+
if (s.field.name !== r.field.name)
|
|
838
|
+
throw new Error("InternalError: Tried to merge incompatible statistics");
|
|
839
|
+
s.merge(r);
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
clone() {
|
|
843
|
+
return new ye(this._statistics.map((e) => e.clone()));
|
|
844
|
+
}
|
|
845
|
+
};
|
|
846
|
+
function Ks(u) {
|
|
847
|
+
switch (u.statisticType) {
|
|
848
|
+
case "min":
|
|
849
|
+
return new er(u);
|
|
850
|
+
case "max":
|
|
851
|
+
return new tr(u);
|
|
852
|
+
case "avg":
|
|
853
|
+
return new rr(u);
|
|
854
|
+
case "avg_angle":
|
|
855
|
+
return new ir(u);
|
|
856
|
+
case "sum":
|
|
857
|
+
case "count":
|
|
858
|
+
return new sr(u);
|
|
859
|
+
case "mode":
|
|
860
|
+
return new nr(u);
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
let W = class {
|
|
864
|
+
constructor(e) {
|
|
865
|
+
this.field = e;
|
|
866
|
+
}
|
|
867
|
+
insert(e, t) {
|
|
868
|
+
if (!this.field.computed)
|
|
869
|
+
return;
|
|
870
|
+
const s = this.field.computed.read(e, t);
|
|
871
|
+
_s(s) || this._insertValue(s);
|
|
872
|
+
}
|
|
873
|
+
}, er = class jt extends W {
|
|
874
|
+
constructor() {
|
|
875
|
+
super(...arguments), this.type = "min", this.value = Number.MAX_VALUE;
|
|
876
|
+
}
|
|
877
|
+
_insertValue(e) {
|
|
878
|
+
this.value = Math.min(this.value, e);
|
|
879
|
+
}
|
|
880
|
+
merge(e) {
|
|
881
|
+
this.value = Math.min(this.value, e.value);
|
|
882
|
+
}
|
|
883
|
+
clone() {
|
|
884
|
+
const e = new jt(this.field);
|
|
885
|
+
return e.value = this.value, e;
|
|
886
|
+
}
|
|
887
|
+
}, tr = class Dt extends W {
|
|
888
|
+
constructor() {
|
|
889
|
+
super(...arguments), this.type = "max", this.value = Number.MIN_VALUE;
|
|
890
|
+
}
|
|
891
|
+
_insertValue(e) {
|
|
892
|
+
this.value = Math.max(this.value, e);
|
|
893
|
+
}
|
|
894
|
+
merge(e) {
|
|
895
|
+
this.value = Math.max(this.value, e.value);
|
|
896
|
+
}
|
|
897
|
+
clone() {
|
|
898
|
+
const e = new Dt(this.field);
|
|
899
|
+
return e.value = this.value, e;
|
|
900
|
+
}
|
|
901
|
+
}, sr = class Lt extends W {
|
|
902
|
+
constructor() {
|
|
903
|
+
super(...arguments), this.type = "sum", this.value = 0;
|
|
904
|
+
}
|
|
905
|
+
_insertValue(e) {
|
|
906
|
+
this.value += e;
|
|
907
|
+
}
|
|
908
|
+
merge(e) {
|
|
909
|
+
this.value += e.value;
|
|
910
|
+
}
|
|
911
|
+
clone() {
|
|
912
|
+
const e = new Lt(this.field);
|
|
913
|
+
return e.value = this.value, e;
|
|
914
|
+
}
|
|
915
|
+
}, rr = class zt extends W {
|
|
916
|
+
constructor() {
|
|
917
|
+
super(...arguments), this.type = "avg", this._total = 0, this._count = 0;
|
|
918
|
+
}
|
|
919
|
+
get value() {
|
|
920
|
+
return this._total / this._count;
|
|
921
|
+
}
|
|
922
|
+
_insertValue(e) {
|
|
923
|
+
this._total += e, this._count += 1;
|
|
924
|
+
}
|
|
925
|
+
merge(e) {
|
|
926
|
+
this._total += e._total, this._count += e._count;
|
|
927
|
+
}
|
|
928
|
+
clone() {
|
|
929
|
+
const e = new zt(this.field);
|
|
930
|
+
return e._total = this._total, e._count = this._count, e;
|
|
931
|
+
}
|
|
932
|
+
}, ir = class Ut extends W {
|
|
933
|
+
constructor() {
|
|
934
|
+
super(...arguments), this.type = "avg_angle", this._x = 0, this._y = 0, this._count = 0;
|
|
935
|
+
}
|
|
936
|
+
get value() {
|
|
937
|
+
const e = this._x / this._count, t = this._y / this._count, s = 180 / Math.PI;
|
|
938
|
+
return Math.atan2(t, e) * s;
|
|
939
|
+
}
|
|
940
|
+
_insertValue(e) {
|
|
941
|
+
this._x = this._x + Math.cos(e * He), this._y = this._y + Math.sin(e * He), this._count += 1;
|
|
942
|
+
}
|
|
943
|
+
merge(e) {
|
|
944
|
+
this._x += e._x, this._y += e._y, this._count += e._count;
|
|
945
|
+
}
|
|
946
|
+
clone() {
|
|
947
|
+
const e = new Ut(this.field);
|
|
948
|
+
return e._x = this._x, e._y = this._y, e._count = this._count, e;
|
|
949
|
+
}
|
|
950
|
+
}, nr = class Gt extends W {
|
|
951
|
+
constructor() {
|
|
952
|
+
super(...arguments), this._frequencies = /* @__PURE__ */ new Map();
|
|
953
|
+
}
|
|
954
|
+
get value() {
|
|
955
|
+
let e, t = 0;
|
|
956
|
+
for (const [s, r] of this._frequencies.entries())
|
|
957
|
+
r > t && (t = r, e = s);
|
|
958
|
+
return e;
|
|
959
|
+
}
|
|
960
|
+
_insertValue(e) {
|
|
961
|
+
const t = this._frequencies.get(e);
|
|
962
|
+
t != null ? this._frequencies.set(e, t + 1) : this._frequencies.set(e, 1);
|
|
963
|
+
}
|
|
964
|
+
merge(e) {
|
|
965
|
+
for (const [t, s] of e._frequencies.entries()) {
|
|
966
|
+
const r = this._frequencies.get(t);
|
|
967
|
+
r != null ? this._frequencies.set(t, r + s) : this._frequencies.set(t, s);
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
clone() {
|
|
971
|
+
const e = new Gt(this.field);
|
|
972
|
+
return e._frequencies = new Map(this._frequencies), e;
|
|
973
|
+
}
|
|
974
|
+
}, me = class ee {
|
|
975
|
+
static createId(e, t) {
|
|
976
|
+
return `${e}.${t}`;
|
|
977
|
+
}
|
|
978
|
+
static create(e, t, s, r) {
|
|
979
|
+
return new ee(e, t, Pt.create(s), r);
|
|
980
|
+
}
|
|
981
|
+
constructor(e, t, s, r) {
|
|
982
|
+
this.gridX = e, this.gridY = t, this._statistics = s, this._worldUnitsPerCell = r, this._count = 0, this._xWorldTotal = 0, this._yWorldTotal = 0, this._objectIds = /* @__PURE__ */ new Set();
|
|
983
|
+
}
|
|
984
|
+
get id() {
|
|
985
|
+
return ee.createId(this.gridX, this.gridY);
|
|
986
|
+
}
|
|
987
|
+
get count() {
|
|
988
|
+
return this._count;
|
|
989
|
+
}
|
|
990
|
+
get statistics() {
|
|
991
|
+
return this._statistics;
|
|
992
|
+
}
|
|
993
|
+
get objectIds() {
|
|
994
|
+
return this._objectIds;
|
|
995
|
+
}
|
|
996
|
+
get firstObjectId() {
|
|
997
|
+
return this._objectIds.values().next().value;
|
|
998
|
+
}
|
|
999
|
+
get centroidXWorld() {
|
|
1000
|
+
return this._xWorldTotal / this._count;
|
|
1001
|
+
}
|
|
1002
|
+
get centroidYWorld() {
|
|
1003
|
+
return this._yWorldTotal / this._count;
|
|
1004
|
+
}
|
|
1005
|
+
clone() {
|
|
1006
|
+
const e = new ee(this.gridX, this.gridY, this._statistics.clone(), this._worldUnitsPerCell);
|
|
1007
|
+
return e._count = this._count, e._xWorldTotal = this._xWorldTotal, e._yWorldTotal = this._yWorldTotal, e._firstFeatureAttributes = this._firstFeatureAttributes, e._objectIds = new Set(this._objectIds), e;
|
|
1008
|
+
}
|
|
1009
|
+
insert(e, t, s, r) {
|
|
1010
|
+
this._count === 0 ? this._firstFeatureAttributes = e.readAttributes() : this._firstFeatureAttributes = null, this._count += 1, this._xWorldTotal += s, this._yWorldTotal += r, this._statistics.insert(e, t), this._objectIds.add(e.getObjectId());
|
|
1011
|
+
}
|
|
1012
|
+
merge(e) {
|
|
1013
|
+
if (e._count !== 0) {
|
|
1014
|
+
this._count += e._count, this._firstFeatureAttributes = e._firstFeatureAttributes, this._xWorldTotal += e._xWorldTotal, this._yWorldTotal += e._yWorldTotal, this._statistics.merge(e._statistics);
|
|
1015
|
+
for (const t of e._objectIds.values())
|
|
1016
|
+
this._objectIds.add(t);
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
getCentroidX(e) {
|
|
1020
|
+
return e == null ? this.centroidXWorld : Fs(e, this.centroidXWorld);
|
|
1021
|
+
}
|
|
1022
|
+
getCentroidY(e) {
|
|
1023
|
+
return e == null ? this.centroidYWorld : Ts(e, this.centroidYWorld);
|
|
1024
|
+
}
|
|
1025
|
+
getCentroid(e) {
|
|
1026
|
+
const t = new T([], [this.centroidXWorld, this.centroidYWorld]);
|
|
1027
|
+
if (e != null) {
|
|
1028
|
+
const s = new T();
|
|
1029
|
+
return X(s, t, !1, !1, "esriGeometryPoint", e);
|
|
1030
|
+
}
|
|
1031
|
+
return t;
|
|
1032
|
+
}
|
|
1033
|
+
getGeometricCentroid(e) {
|
|
1034
|
+
const t = this.gridX * this._worldUnitsPerCell + 0.5 * this._worldUnitsPerCell, s = this.gridY * this._worldUnitsPerCell + 0.5 * this._worldUnitsPerCell, r = new T([], [t, s]);
|
|
1035
|
+
if (e != null) {
|
|
1036
|
+
const i = new T();
|
|
1037
|
+
return X(i, r, !1, !1, "esriGeometryPoint", e);
|
|
1038
|
+
}
|
|
1039
|
+
return r;
|
|
1040
|
+
}
|
|
1041
|
+
getAttributes() {
|
|
1042
|
+
const e = { aggregateId: this.id };
|
|
1043
|
+
for (const t of this._statistics.values())
|
|
1044
|
+
e[t.field.name] = t.value;
|
|
1045
|
+
return this._firstFeatureAttributes != null ? { ...e, ...this._firstFeatureAttributes } : e;
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
const ar = 96;
|
|
1049
|
+
function be(u, e) {
|
|
1050
|
+
return Ht(u) * Jt * ar / e;
|
|
1051
|
+
}
|
|
1052
|
+
let or = class {
|
|
1053
|
+
constructor(e) {
|
|
1054
|
+
this._options = e, this._cells = /* @__PURE__ */ new Map(), this._pixelsPerMapUnit = be(e.spatialReference, e.scale);
|
|
1055
|
+
}
|
|
1056
|
+
insert(e, t) {
|
|
1057
|
+
const s = e.getCursor(), r = { $view: { scale: this._options.scale, timeZone: this._options.timeZone } };
|
|
1058
|
+
for (; s.next(); )
|
|
1059
|
+
this._insertFeature(s, r, t);
|
|
1060
|
+
}
|
|
1061
|
+
putCellsInBounds(e, t) {
|
|
1062
|
+
const [s, r, i, n] = t, a = Math.floor(s * this._pixelsPerMapUnit / this._options.cellSize), o = Math.floor(r * this._pixelsPerMapUnit / this._options.cellSize), h = Math.ceil(i * this._pixelsPerMapUnit / this._options.cellSize), c = Math.ceil(n * this._pixelsPerMapUnit / this._options.cellSize);
|
|
1063
|
+
for (let d = o; d <= c; d++)
|
|
1064
|
+
for (let l = a; l <= h; l++) {
|
|
1065
|
+
const g = `${l}.${d}`, _ = this._cells.get(g);
|
|
1066
|
+
if (!_)
|
|
1067
|
+
continue;
|
|
1068
|
+
const m = e.get(_.id);
|
|
1069
|
+
m ? _ && !e.has(_.id) && m.merge(_) : e.set(_.id, _.clone());
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
putCells(e) {
|
|
1073
|
+
for (const t of this._cells.values()) {
|
|
1074
|
+
const s = e.get(t.id);
|
|
1075
|
+
s ? s.merge(t) : e.set(t.id, t.clone());
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
_insertFeature(e, t, s) {
|
|
1079
|
+
const { featureFilter: r } = this._options;
|
|
1080
|
+
if (r !== null && !r.check(e))
|
|
1081
|
+
return;
|
|
1082
|
+
let i = 0, n = 0;
|
|
1083
|
+
if (e.geometryType === "esriGeometryPoint")
|
|
1084
|
+
i = e.readXWorldSpace(), n = e.readYWorldSpace();
|
|
1085
|
+
else {
|
|
1086
|
+
if (s) {
|
|
1087
|
+
const l = e.readCentroidForDisplay();
|
|
1088
|
+
if (l == null)
|
|
1089
|
+
return;
|
|
1090
|
+
const [g, _] = l.coords;
|
|
1091
|
+
if (g < 0 || g > x || _ < 0 || _ > x)
|
|
1092
|
+
return;
|
|
1093
|
+
}
|
|
1094
|
+
const d = e.readCentroidWorldSpace();
|
|
1095
|
+
if (d == null)
|
|
1096
|
+
return;
|
|
1097
|
+
i = d.coords[0], n = d.coords[1];
|
|
1098
|
+
}
|
|
1099
|
+
const a = i * this._pixelsPerMapUnit, o = n * this._pixelsPerMapUnit, h = Math.floor(a / this._options.cellSize), c = Math.floor(o / this._options.cellSize);
|
|
1100
|
+
this._getCellOrCreate(h, c).insert(e, t, i, n);
|
|
1101
|
+
}
|
|
1102
|
+
_getCellOrCreate(e, t) {
|
|
1103
|
+
const s = me.createId(e, t);
|
|
1104
|
+
let r = this._cells.get(s);
|
|
1105
|
+
if (!r) {
|
|
1106
|
+
const i = 1 * this._options.cellSize / this._pixelsPerMapUnit;
|
|
1107
|
+
r = me.create(e, t, this._options.fields, i), this._cells.set(s, r);
|
|
1108
|
+
}
|
|
1109
|
+
return r;
|
|
1110
|
+
}
|
|
1111
|
+
}, hr = class {
|
|
1112
|
+
constructor(e, t) {
|
|
1113
|
+
this.inner = e, this.displayId = t;
|
|
1114
|
+
}
|
|
1115
|
+
};
|
|
1116
|
+
const J = 128;
|
|
1117
|
+
let ur = class extends Ee {
|
|
1118
|
+
constructor(e) {
|
|
1119
|
+
super(e), this.didSend = !1, this.done = !1;
|
|
1120
|
+
}
|
|
1121
|
+
}, dr = class {
|
|
1122
|
+
constructor(e, t, s, r, i) {
|
|
1123
|
+
this._level = e, this._scale = t, this._indexOptions = s, this._clusterRadius = r, this._store = i, this._cells = /* @__PURE__ */ new Map(), this._handledChunks = /* @__PURE__ */ new Set(), this._statistics = /* @__PURE__ */ new Map(), this._clusters = /* @__PURE__ */ new Map();
|
|
1124
|
+
}
|
|
1125
|
+
destroy() {
|
|
1126
|
+
this._clearClusters();
|
|
1127
|
+
}
|
|
1128
|
+
_clearClusters() {
|
|
1129
|
+
for (const e of this._clusters.values())
|
|
1130
|
+
this._store.releaseDisplayIdForObjectId(e.inner.id);
|
|
1131
|
+
this._clusters.clear();
|
|
1132
|
+
}
|
|
1133
|
+
*aggregatesWorldSpace() {
|
|
1134
|
+
for (const e of this._clusters.values()) {
|
|
1135
|
+
const t = e.inner.getCentroid(null), s = new B(t, e.inner.getAttributes(), null);
|
|
1136
|
+
s.objectId = e.inner.id, s.displayId = e.displayId, yield s;
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
clusters() {
|
|
1140
|
+
return this._clusters.values();
|
|
1141
|
+
}
|
|
1142
|
+
updateChunks(e, t) {
|
|
1143
|
+
let s = !1;
|
|
1144
|
+
for (const a of e) {
|
|
1145
|
+
const o = a.queryInfo;
|
|
1146
|
+
"tileId" in o && new we(o.tileId).level !== this._level || this._handledChunks.has(a.normalizedChunkId) || (this._handledChunks.add(a.normalizedChunkId), s = !0, a.getGridIndex({ ...this._indexOptions, scale: this._scale }).putCells(this._cells));
|
|
1147
|
+
}
|
|
1148
|
+
const r = { xMin: 1 / 0, yMin: 1 / 0, xMax: -1 / 0, yMax: -1 / 0 }, i = be(this._indexOptions.spatialReference, this._scale), n = this._indexOptions.cellSize;
|
|
1149
|
+
for (const { subscription: a } of t) {
|
|
1150
|
+
const o = a.tile.bounds, h = Math.floor(o[0] * i / n), c = Math.floor(o[1] * i / n), d = Math.ceil(o[2] * i / n), l = Math.ceil(o[3] * i / n);
|
|
1151
|
+
r.xMin = Math.min(r.xMin, h), r.yMin = Math.min(r.yMin, c), r.xMax = Math.max(r.xMax, d), r.yMax = Math.max(r.yMax, l);
|
|
1152
|
+
}
|
|
1153
|
+
return this._lastCellBounds != null && r.xMin === this._lastCellBounds.xMin && r.yMin === this._lastCellBounds.yMin && r.yMin === this._lastCellBounds.yMin && r.yMax === this._lastCellBounds.yMax || (s = !0, this._lastCellBounds = r), s && this._clusterCells(r), s;
|
|
1154
|
+
}
|
|
1155
|
+
async updateStatistics(e) {
|
|
1156
|
+
let t = !1;
|
|
1157
|
+
for (const s of this._clusters.values())
|
|
1158
|
+
s.inner.count > 1 && (t = this._updateAggregateStatistics(this._statistics, s.inner) || t);
|
|
1159
|
+
if (t) {
|
|
1160
|
+
const s = Array.from(this._statistics.entries()).map(([r, i]) => ({ fieldName: r, minValue: i.minValue, maxValue: i.maxValue }));
|
|
1161
|
+
await e.container.updateStatistics(this._level, s);
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
createAggregateFeatures(e, t) {
|
|
1165
|
+
const s = e.subscription, r = [], i = s.tile.transform;
|
|
1166
|
+
for (const n of this._clusters.values()) {
|
|
1167
|
+
let a = n.inner.getCentroidX(i);
|
|
1168
|
+
const o = n.inner.getCentroidY(i), h = s.tile.lod, c = h.wrap ? h.worldSize[0] : null, d = n.inner.count === 1 ? n.inner.firstObjectId : n.inner.id, l = n.displayId;
|
|
1169
|
+
if (c != null)
|
|
1170
|
+
if (c === 1) {
|
|
1171
|
+
const g = new T([], [a, o]), _ = new B(g, n.inner.getAttributes(), null);
|
|
1172
|
+
_.geometry.coords[0] -= x, _.objectId = d, _.displayId = l, r.push(_);
|
|
1173
|
+
const m = new T([], [a, o]), p = new B(m, n.inner.getAttributes(), null);
|
|
1174
|
+
p.geometry.coords[0] += x, p.objectId = d, p.displayId = l, r.push(p);
|
|
1175
|
+
} else
|
|
1176
|
+
a > x + x / 2 ? a -= c * x : a < -x / 2 && (a += c * x);
|
|
1177
|
+
if (a < x + J && a >= -J && o < x + J && o >= -J) {
|
|
1178
|
+
const g = new T([], [a, o]), _ = new B(g, n.inner.getAttributes(), null);
|
|
1179
|
+
_.objectId = d, _.displayId = l, r.push(_);
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
return M.fromOptimizedFeatures(r, t, s.tile.transform);
|
|
1183
|
+
}
|
|
1184
|
+
_clusterCells(e) {
|
|
1185
|
+
let t = Array.from(this._cells.values());
|
|
1186
|
+
t = t.sort((a, o) => o.count - a.count);
|
|
1187
|
+
const s = [];
|
|
1188
|
+
for (const a of this._clusters.values())
|
|
1189
|
+
s.push(a.inner.id);
|
|
1190
|
+
this._clusters.clear();
|
|
1191
|
+
const r = this._clusterRadius * (1 / be(this._indexOptions.spatialReference, this._scale)), i = 1 + this._clusterRadius / this._indexOptions.cellSize, n = /* @__PURE__ */ new Set();
|
|
1192
|
+
for (const a of t) {
|
|
1193
|
+
if (n.has(a.id) || a.gridX < e.xMin || a.gridX > e.xMax || a.gridY < e.yMin || a.gridY > e.yMax)
|
|
1194
|
+
continue;
|
|
1195
|
+
const o = this._store.createDisplayIdForObjectId(a.id), h = new hr(a.clone(), o);
|
|
1196
|
+
n.add(a.id), this._clusters.set(a.id, h);
|
|
1197
|
+
const c = a.centroidXWorld, d = a.centroidYWorld;
|
|
1198
|
+
for (let l = a.gridY - i; l <= a.gridY + i; l++)
|
|
1199
|
+
for (let g = a.gridX - i; g <= a.gridX + i; g++) {
|
|
1200
|
+
if (l === a.gridY && g === a.gridX)
|
|
1201
|
+
continue;
|
|
1202
|
+
const _ = this._cells.get(me.createId(g, l));
|
|
1203
|
+
if (!_ || n.has(_.id))
|
|
1204
|
+
continue;
|
|
1205
|
+
const m = Math.abs(_.centroidXWorld - c), p = Math.abs(_.centroidYWorld - d);
|
|
1206
|
+
m < r && p < r && (h.inner.merge(_), n.add(_.id));
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
for (const a of s)
|
|
1210
|
+
this._store.releaseDisplayIdForObjectId(a);
|
|
1211
|
+
}
|
|
1212
|
+
_updateAggregateStatistics(e, t) {
|
|
1213
|
+
let s = !1;
|
|
1214
|
+
for (const r of t.statistics.values()) {
|
|
1215
|
+
if (r.field.type === "esriFieldTypeString")
|
|
1216
|
+
continue;
|
|
1217
|
+
const i = r.value, n = r.field, a = e.get(n.name);
|
|
1218
|
+
if (a) {
|
|
1219
|
+
const { minValue: o, maxValue: h } = a, c = Math.min(a.minValue, i), d = Math.max(a.maxValue, i);
|
|
1220
|
+
o === c && h === d || (a.minValue = c, a.maxValue = d, s = !0);
|
|
1221
|
+
} else
|
|
1222
|
+
e.set(n.name, { minValue: i, maxValue: i }), s = !0;
|
|
1223
|
+
}
|
|
1224
|
+
return s;
|
|
1225
|
+
}
|
|
1226
|
+
};
|
|
1227
|
+
class je extends Rt {
|
|
1228
|
+
static async create(e, t, s, r, i, n) {
|
|
1229
|
+
const a = new Me({ spatialReference: s }), o = { fields: await Promise.all(t.fields.map(async (h) => qt.create(a, h))), spatialReference: s, featureFilter: t.featureFilter ? await yt.create({ geometryType: r.metadata.geometryType, hasM: !1, hasZ: !1, timeInfo: r.metadata.timeInfo, fieldsIndex: r.metadata.fieldsIndex, spatialReference: s, filterJSON: t.featureFilter }) : null, cellSize: t.clusterRadius / 4, timeZone: n };
|
|
1230
|
+
return new je(e, t.clusterRadius, o, t.fields, r, i);
|
|
1231
|
+
}
|
|
1232
|
+
constructor(e, t, s, r, i, n) {
|
|
1233
|
+
super(i, n, s.spatialReference, s.fields), this._connection = e, this._clusterRadius = t, this._indexOptions = s, this._cellsPerScale = /* @__PURE__ */ new Map(), this._metadata = new $e({ geometryType: "esriGeometryPoint", objectIdField: "aggregateId", fields: [...r, ...this._source.metadata.fieldsIndex.fields, { name: "aggregateId", alias: "aggregateId", type: "esriFieldTypeOID" }], globalIdField: null, spatialReference: i.metadata.spatialReference, subtypeField: null, subtypes: null, timeInfo: null, timeReferenceUnknownClient: null, typeIdField: null, types: null });
|
|
1234
|
+
}
|
|
1235
|
+
get enablePixelBuffering() {
|
|
1236
|
+
return !1;
|
|
1237
|
+
}
|
|
1238
|
+
invalidate() {
|
|
1239
|
+
super.invalidate();
|
|
1240
|
+
for (const e of this._cellsPerScale.values())
|
|
1241
|
+
e.destroy();
|
|
1242
|
+
this._cellsPerScale.clear();
|
|
1243
|
+
}
|
|
1244
|
+
onSubscribe(e) {
|
|
1245
|
+
super.onSubscribe(e), this._requiredLevel = e.tile.level, this._requiredScale = e.tile.scale;
|
|
1246
|
+
}
|
|
1247
|
+
createState(e) {
|
|
1248
|
+
return new ur(e);
|
|
1249
|
+
}
|
|
1250
|
+
async *applyOverride(e) {
|
|
1251
|
+
for (const t of this._cellsPerScale.values())
|
|
1252
|
+
t.destroy();
|
|
1253
|
+
this._cellsPerScale.clear();
|
|
1254
|
+
for (const t of this._sendStates.values())
|
|
1255
|
+
t.done = !1;
|
|
1256
|
+
}
|
|
1257
|
+
displayMap(e, t, s) {
|
|
1258
|
+
const r = new Map(e.map((a) => [t(a), a])), i = [], n = this._getClusterState(this._requiredLevel, this._requiredScale);
|
|
1259
|
+
for (const a of n.clusters()) {
|
|
1260
|
+
const o = r.get(a.inner.id);
|
|
1261
|
+
if (o == null) {
|
|
1262
|
+
if (a.inner.count === 1) {
|
|
1263
|
+
const h = r.get(a.inner.firstObjectId);
|
|
1264
|
+
if (h != null) {
|
|
1265
|
+
const c = s(a.displayId, h, a.inner.firstObjectId);
|
|
1266
|
+
i.push(c), r.delete(a.inner.firstObjectId);
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
} else {
|
|
1270
|
+
const h = s(a.displayId, o, a.inner.id);
|
|
1271
|
+
i.push(h), r.delete(a.inner.id);
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
return i;
|
|
1275
|
+
}
|
|
1276
|
+
getDisplayFeatures(e) {
|
|
1277
|
+
const t = new Set(e), s = /* @__PURE__ */ new Set(), r = [], i = [], n = this._getClusterState(this._requiredLevel, this._requiredScale);
|
|
1278
|
+
for (const a of n.aggregatesWorldSpace())
|
|
1279
|
+
if (t.has(a.displayId) && !s.has(a.displayId)) {
|
|
1280
|
+
const o = bt(a, this._metadata.geometryType, !1, !1);
|
|
1281
|
+
if (s.add(a.displayId), o.attributes.cluster_count === 1) {
|
|
1282
|
+
r.push({ ...o, displayId: a.displayId });
|
|
1283
|
+
continue;
|
|
1284
|
+
}
|
|
1285
|
+
i.push({ ...o, displayId: a.displayId });
|
|
1286
|
+
}
|
|
1287
|
+
return { features: r, aggregates: i };
|
|
1288
|
+
}
|
|
1289
|
+
getFeatureObjectIdsForAggregate(e) {
|
|
1290
|
+
const t = this._getClusterState(this._requiredLevel, this._requiredScale);
|
|
1291
|
+
for (const s of t.clusters())
|
|
1292
|
+
if (s.inner.id === e)
|
|
1293
|
+
return Array.from(s.inner.objectIds);
|
|
1294
|
+
return [];
|
|
1295
|
+
}
|
|
1296
|
+
async *updateChunks() {
|
|
1297
|
+
const e = this._source.chunks();
|
|
1298
|
+
if (!e.length)
|
|
1299
|
+
return;
|
|
1300
|
+
const t = this._getClusterState(this._requiredLevel, this._requiredScale), s = Array.from(this._sendStates.values()).filter((n) => n.subscription.tile.level === this._requiredLevel);
|
|
1301
|
+
if (t.updateChunks(e, s) || !this._source.updateTracking.updating)
|
|
1302
|
+
for (const n of s)
|
|
1303
|
+
n.subscription.tile.level === this._requiredLevel && (n.didSend = !1, n.done = !1);
|
|
1304
|
+
const r = Array.from(this._sendStates.values()).filter((n) => n.done).map((n) => n.subscription.tile.key), i = new Set(r);
|
|
1305
|
+
for (const n of this._sendStates.values())
|
|
1306
|
+
this._source.updateTracking.updating && (r.some((a) => a.containsChild(n.subscription.tile.key)) || n.subscription.tile.key.getChildKeys().every((a) => i.has(a))) || n.didSend || n.subscription.tile.level !== this._requiredLevel || (n.didSend = !0, yield* this._update(n, t, this._source));
|
|
1307
|
+
await t.updateStatistics(this._connection);
|
|
1308
|
+
}
|
|
1309
|
+
forEachAggregateWorldSpace(e) {
|
|
1310
|
+
if (this._requiredLevel == null || this._requiredScale == null)
|
|
1311
|
+
return;
|
|
1312
|
+
const t = this._getClusterState(this._requiredLevel, this._requiredScale);
|
|
1313
|
+
for (const s of t.aggregatesWorldSpace())
|
|
1314
|
+
e(s);
|
|
1315
|
+
}
|
|
1316
|
+
_getClusterState(e, t) {
|
|
1317
|
+
if (e == null || t == null)
|
|
1318
|
+
throw new Error("InternalError: Level and scale must be defined");
|
|
1319
|
+
let s = this._cellsPerScale.get(t);
|
|
1320
|
+
return s || (s = new dr(e, t, this._indexOptions, this._clusterRadius, this._attributeStore), this._cellsPerScale.set(t, s)), s;
|
|
1321
|
+
}
|
|
1322
|
+
async *_update(e, t, s) {
|
|
1323
|
+
if (e.done)
|
|
1324
|
+
return;
|
|
1325
|
+
const r = t.createAggregateFeatures(e, this._metadata);
|
|
1326
|
+
this.events.emit("changed"), e.done = !s.updateTracking.updating;
|
|
1327
|
+
const i = r.getCursor(), n = e.subscription.tile.createArcadeEvaluationOptions(this._indexOptions.timeZone);
|
|
1328
|
+
for (; i.next(); )
|
|
1329
|
+
this._attributeStore.setAttributeData(i.getDisplayId(), i, n);
|
|
1330
|
+
yield new Pe(e.subscription, r, !0, e.done, {});
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
let cr = class Wt {
|
|
1334
|
+
static fromReader(e) {
|
|
1335
|
+
const t = [], s = e.copy(), r = ke();
|
|
1336
|
+
for (; s.next(); )
|
|
1337
|
+
s.getBounds(r) && t.push(s.getIndex());
|
|
1338
|
+
const i = Kt(9, (n) => (s.setIndex(n), { minX: s.getBoundsXMin(), minY: s.getBoundsYMin(), maxX: s.getBoundsXMax(), maxY: s.getBoundsYMax() }));
|
|
1339
|
+
return i.load(t), new Wt(i);
|
|
1340
|
+
}
|
|
1341
|
+
constructor(e) {
|
|
1342
|
+
this._index = e;
|
|
1343
|
+
}
|
|
1344
|
+
search(e) {
|
|
1345
|
+
const t = { minX: e[0], minY: e[1], maxX: e[2], maxY: e[3] };
|
|
1346
|
+
return this._index.search(t);
|
|
1347
|
+
}
|
|
1348
|
+
}, Je = class Ie {
|
|
1349
|
+
static create(e, t, s, r) {
|
|
1350
|
+
const i = Pt.create(e), n = new Array(32);
|
|
1351
|
+
for (let a = 0; a < n.length; a++)
|
|
1352
|
+
n[a] = null;
|
|
1353
|
+
return new Ie(i, t, s, r, n);
|
|
1354
|
+
}
|
|
1355
|
+
constructor(e, t, s, r, i) {
|
|
1356
|
+
this._statistics = e, this.xNode = t, this.yNode = s, this.depth = r, this.children = i, this._objectIds = /* @__PURE__ */ new Set(), this._count = 0, this._xWorldTotal = 0, this._yWorldTotal = 0, this._xGeohashTotal = 0, this._yGeohashTotal = 0, this.next = null;
|
|
1357
|
+
}
|
|
1358
|
+
get id() {
|
|
1359
|
+
return `${this.xNode}.${this.yNode}`;
|
|
1360
|
+
}
|
|
1361
|
+
get objectIds() {
|
|
1362
|
+
return this._objectIds;
|
|
1363
|
+
}
|
|
1364
|
+
clone() {
|
|
1365
|
+
const e = new Ie(this._statistics.clone(), this.xNode, this.yNode, this.depth, this.children);
|
|
1366
|
+
return e._count = this._count, e._xWorldTotal = this._xWorldTotal, e._yWorldTotal = this._yWorldTotal, e._xGeohashTotal = this._xGeohashTotal, e._yGeohashTotal = this._yGeohashTotal, e.next = this.next, e.cachedFeature = this.cachedFeature, e._objectIds = new Set(this._objectIds), e;
|
|
1367
|
+
}
|
|
1368
|
+
insert(e, t, s, r, i, n) {
|
|
1369
|
+
this._count += 1, this._xWorldTotal += t, this._yWorldTotal += s, this._xGeohashTotal += r, this._yGeohashTotal += i, this._statistics.insert(e, n), this._objectIds.add(e.getObjectId());
|
|
1370
|
+
}
|
|
1371
|
+
merge(e) {
|
|
1372
|
+
if (e._count !== 0) {
|
|
1373
|
+
this._count += e._count, this._xWorldTotal += e._xWorldTotal, this._yWorldTotal += e._yWorldTotal, this._xGeohashTotal += e._xWorldTotal, this._yGeohashTotal += e._yWorldTotal, this._statistics.merge(e._statistics);
|
|
1374
|
+
for (const t of e._objectIds.values())
|
|
1375
|
+
this._objectIds.add(t);
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
getGeometry(e, t) {
|
|
1379
|
+
const s = this._getLngLatBounds(), [r, i, n, a] = s, o = We({ rings: [[[r, i], [r, a], [n, a], [n, i], [r, i]]] }, V.WGS84, e), h = Cs(new T(), o, !1, !1);
|
|
1380
|
+
return t != null ? X(new T(), h, !1, !1, "esriGeometryPolygon", t, !1, !1) : h;
|
|
1381
|
+
}
|
|
1382
|
+
getGeometryCentroid(e, t) {
|
|
1383
|
+
const s = this._getLngLatBounds(), [r, i, n, a] = s, o = We({ x: (r + n) / 2, y: (i + a) / 2 }, V.WGS84, e), h = Ms(new T(), o);
|
|
1384
|
+
return t != null ? X(new T(), h, !1, !1, "esriGeometryPoint", t, !1, !1) : h;
|
|
1385
|
+
}
|
|
1386
|
+
getAttributes() {
|
|
1387
|
+
const e = { aggregateId: this.id };
|
|
1388
|
+
for (const t of this._statistics.values())
|
|
1389
|
+
e[t.field.name] = t.value;
|
|
1390
|
+
return e.aggregateCount = this._count, e;
|
|
1391
|
+
}
|
|
1392
|
+
_getLngLatBounds() {
|
|
1393
|
+
const e = this.depth, t = Math.ceil(e / 2), s = Math.floor(e / 2), r = 30 - (3 * t + 2 * s), i = 30 - (2 * t + 3 * s), n = this.xNode << r, a = this.yNode << i;
|
|
1394
|
+
return Is({ geohashX: n, geohashY: a }, this.depth);
|
|
1395
|
+
}
|
|
1396
|
+
}, lr = class {
|
|
1397
|
+
constructor(e) {
|
|
1398
|
+
this._fields = e, this._root = Je.create(this._fields, 0, 0, 0);
|
|
1399
|
+
}
|
|
1400
|
+
destroy() {
|
|
1401
|
+
}
|
|
1402
|
+
insert(e, t, s, r, i, n, a) {
|
|
1403
|
+
let o = this._root, h = 0, c = 0, d = 0;
|
|
1404
|
+
for (; o !== null; ) {
|
|
1405
|
+
if (o.insert(e, t, s, r, i, a), h >= n)
|
|
1406
|
+
return;
|
|
1407
|
+
const l = Math.ceil((h + 1) / 2), g = Math.floor((h + 1) / 2), _ = 1 - h % 2, m = 30 - (3 * l + 2 * g), p = 30 - (2 * l + 3 * g), I = (r & 7 * _ + 3 * (1 - _) << m) >> m, f = (i & 3 * _ + 7 * (1 - _) << p) >> p, k = I + f * (8 * _ + 4 * (1 - _));
|
|
1408
|
+
c = c << 3 * _ + 2 * (1 - _) | I, d = d << 2 * _ + 3 * (1 - _) | f, o.children[k] == null && (o.children[k] = Je.create(this._fields, c, d, h + 1)), h += 1, o = o.children[k];
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
putBins(e, t) {
|
|
1412
|
+
for (const s of this.getNodes(t)) {
|
|
1413
|
+
const r = e.get(s.id);
|
|
1414
|
+
r ? r.merge(s) : e.set(s.id, s.clone());
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
getNodes(e) {
|
|
1418
|
+
const t = [], { geohashBounds: s, level: r } = e;
|
|
1419
|
+
let i = this._root;
|
|
1420
|
+
for (; i !== null; ) {
|
|
1421
|
+
const n = i.depth, a = i.xNode, o = i.yNode;
|
|
1422
|
+
if (n >= r) {
|
|
1423
|
+
t.push(i), i = i.next;
|
|
1424
|
+
continue;
|
|
1425
|
+
}
|
|
1426
|
+
const h = Math.ceil((n + 1) / 2), c = Math.floor((n + 1) / 2), d = 1 - n % 2, l = 30 - (3 * h + 2 * c), g = 30 - (2 * h + 3 * c), _ = ~((1 << l) - 1), m = ~((1 << g) - 1), p = (s.xLL & _) >> l, I = (s.yLL & m) >> g, f = (s.xTR & _) >> l, k = (s.yTR & m) >> g, b = a << 3 * d + 2 * (1 - d), v = o << 2 * d + 3 * (1 - d), S = b + 8 * d + 4 * (1 - d), w = v + 4 * d + 8 * (1 - d), $ = Math.max(b, p), F = Math.max(v, I), O = Math.min(S, f), R = Math.min(w, k);
|
|
1427
|
+
let C = null, q = null;
|
|
1428
|
+
for (let E = F; E <= R; E++)
|
|
1429
|
+
for (let P = $; P <= O; P++) {
|
|
1430
|
+
const Zt = P - b + (E - v) * (8 * d + 4 * (1 - d)), N = i.children[Zt];
|
|
1431
|
+
N && (C || (C = N, C.next = i.next), q && (q.next = N), q = N, N.next = i.next);
|
|
1432
|
+
}
|
|
1433
|
+
i = C || i.next;
|
|
1434
|
+
}
|
|
1435
|
+
return t;
|
|
1436
|
+
}
|
|
1437
|
+
}, _r = class {
|
|
1438
|
+
constructor(e) {
|
|
1439
|
+
this._options = e, this._tree = new lr(e.fields);
|
|
1440
|
+
}
|
|
1441
|
+
insert(e, t) {
|
|
1442
|
+
const s = e.getCursor(), r = { $view: { scale: 0, timeZone: this._options.timeZone } };
|
|
1443
|
+
for (; s.next(); )
|
|
1444
|
+
this._insertFeature(s, r, t);
|
|
1445
|
+
}
|
|
1446
|
+
putBins(e, t) {
|
|
1447
|
+
this._tree.putBins(e, t);
|
|
1448
|
+
}
|
|
1449
|
+
_insertFeature(e, t, s) {
|
|
1450
|
+
const { featureFilter: r, geohashLevel: i, spatialReference: n } = this._options;
|
|
1451
|
+
if (r !== null && !r.check(e))
|
|
1452
|
+
return;
|
|
1453
|
+
let a = 0, o = 0;
|
|
1454
|
+
if (e.geometryType === "esriGeometryPoint")
|
|
1455
|
+
a = e.readXWorldSpace(), o = e.readYWorldSpace();
|
|
1456
|
+
else {
|
|
1457
|
+
if (s) {
|
|
1458
|
+
const d = e.readCentroidForDisplay();
|
|
1459
|
+
if (d == null)
|
|
1460
|
+
return;
|
|
1461
|
+
const [l, g] = d.coords;
|
|
1462
|
+
if (l < 0 || l > x || g < 0 || g > x)
|
|
1463
|
+
return;
|
|
1464
|
+
}
|
|
1465
|
+
const c = e.readCentroidWorldSpace();
|
|
1466
|
+
if (c == null)
|
|
1467
|
+
return;
|
|
1468
|
+
a = c.coords[0], o = c.coords[1];
|
|
1469
|
+
}
|
|
1470
|
+
const h = vs(a, o, i, n);
|
|
1471
|
+
h && this._tree.insert(e, a, o, h[0], h[1], i, t);
|
|
1472
|
+
}
|
|
1473
|
+
}, pr = class ve extends Ce {
|
|
1474
|
+
static from(e, t) {
|
|
1475
|
+
return new ve(e.copy(), t);
|
|
1476
|
+
}
|
|
1477
|
+
constructor(e, t) {
|
|
1478
|
+
super(e.metadata), this._currentIndex = -1, this._displayTranslationX = 0, this._displayTranslationY = 0, this._displayScaleX = 1, this._displayScaleY = 1, this._reader = e, this._indices = t, this._isPoint = e.geometryType === "esriGeometryPoint";
|
|
1479
|
+
}
|
|
1480
|
+
setTransformForDisplay(e) {
|
|
1481
|
+
const t = this._reader.getInTransform();
|
|
1482
|
+
if (t == null) {
|
|
1483
|
+
const [d, l] = e.scale, [g, _] = e.translate;
|
|
1484
|
+
return this._displayTranslationX = -g / d, this._displayScaleX = 1 / d, this._displayTranslationY = _ / l, this._displayScaleY = 1 / -l, void (this._displayTransform = e);
|
|
1485
|
+
}
|
|
1486
|
+
const [s, r] = t.scale, [i, n] = t.translate, [a, o] = e.scale, [h, c] = e.translate;
|
|
1487
|
+
if (this._displayScaleX = s / a, this._displayTranslationX = (i - h) / a, this._displayScaleY = r / o, this._displayTranslationY = (-n + c) / o, !this._isPoint && t)
|
|
1488
|
+
throw new Error("InternalError: Relative transformations not supported for non-point features");
|
|
1489
|
+
this._displayTransform = e;
|
|
1490
|
+
}
|
|
1491
|
+
getInTransform() {
|
|
1492
|
+
return this._reader.getInTransform();
|
|
1493
|
+
}
|
|
1494
|
+
get fields() {
|
|
1495
|
+
return this._reader.fields;
|
|
1496
|
+
}
|
|
1497
|
+
get hasNext() {
|
|
1498
|
+
return this._currentIndex + 1 < this._indices.length;
|
|
1499
|
+
}
|
|
1500
|
+
getSize() {
|
|
1501
|
+
return this._indices.length;
|
|
1502
|
+
}
|
|
1503
|
+
getCursor() {
|
|
1504
|
+
return this.copy();
|
|
1505
|
+
}
|
|
1506
|
+
copy() {
|
|
1507
|
+
const e = new ve(this._reader.copy(), this._indices);
|
|
1508
|
+
return e._currentIndex = this._currentIndex, e._displayTransform = this._displayTransform, e._displayTranslationX = this._displayTranslationX, e._displayTranslationY = this._displayTranslationY, e._displayScaleX = this._displayScaleX, e._displayScaleY = this._displayScaleY, e;
|
|
1509
|
+
}
|
|
1510
|
+
get contextTimeZone() {
|
|
1511
|
+
return this._reader.contextTimeZone;
|
|
1512
|
+
}
|
|
1513
|
+
set contextTimeZone(e) {
|
|
1514
|
+
this._reader.contextTimeZone = e;
|
|
1515
|
+
}
|
|
1516
|
+
_nextIndex() {
|
|
1517
|
+
return ++this._currentIndex < this._indices.length && (this._reader.setIndex(this._indices[this._currentIndex]), !0);
|
|
1518
|
+
}
|
|
1519
|
+
next() {
|
|
1520
|
+
for (; this._nextIndex() && !this._reader._getExists(); )
|
|
1521
|
+
;
|
|
1522
|
+
return this._currentIndex < this._indices.length;
|
|
1523
|
+
}
|
|
1524
|
+
readXForDisplay() {
|
|
1525
|
+
return this._reader.readXForDisplay() * this._displayScaleX + this._displayTranslationX;
|
|
1526
|
+
}
|
|
1527
|
+
readYForDisplay() {
|
|
1528
|
+
return this._reader.readYForDisplay() * this._displayScaleY + this._displayTranslationY;
|
|
1529
|
+
}
|
|
1530
|
+
readGeometryForDisplay() {
|
|
1531
|
+
const e = this._reader.readGeometryForDisplay();
|
|
1532
|
+
if (!this._displayTransform)
|
|
1533
|
+
return e;
|
|
1534
|
+
const t = new T();
|
|
1535
|
+
return X(t, e, this.hasZ, this.hasM, this.geometryType, this._displayTransform), t.deltaDecode();
|
|
1536
|
+
}
|
|
1537
|
+
readCentroidForDisplay() {
|
|
1538
|
+
var t;
|
|
1539
|
+
const e = (t = this._reader.readCentroidForDisplay()) == null ? void 0 : t.clone();
|
|
1540
|
+
if (e) {
|
|
1541
|
+
const [s, r] = e.coords;
|
|
1542
|
+
e.coords[0] = s * this._displayScaleX + this._displayTranslationX, e.coords[1] = r * this._displayScaleY + this._displayTranslationY;
|
|
1543
|
+
}
|
|
1544
|
+
return e;
|
|
1545
|
+
}
|
|
1546
|
+
get geometryType() {
|
|
1547
|
+
return this._reader.geometryType;
|
|
1548
|
+
}
|
|
1549
|
+
get hasFeatures() {
|
|
1550
|
+
return this._reader.hasFeatures;
|
|
1551
|
+
}
|
|
1552
|
+
get exceededTransferLimit() {
|
|
1553
|
+
return this._reader.exceededTransferLimit;
|
|
1554
|
+
}
|
|
1555
|
+
get hasZ() {
|
|
1556
|
+
return this._reader.hasZ;
|
|
1557
|
+
}
|
|
1558
|
+
get hasM() {
|
|
1559
|
+
return this._reader.hasM;
|
|
1560
|
+
}
|
|
1561
|
+
readAttribute(e, t = !1) {
|
|
1562
|
+
return this._reader.readAttribute(e, t);
|
|
1563
|
+
}
|
|
1564
|
+
readAttributes() {
|
|
1565
|
+
return this._reader.readAttributes();
|
|
1566
|
+
}
|
|
1567
|
+
joinAttributes(e) {
|
|
1568
|
+
return this._reader.joinAttributes(e);
|
|
1569
|
+
}
|
|
1570
|
+
getBounds(e) {
|
|
1571
|
+
return this._reader.getBounds(e);
|
|
1572
|
+
}
|
|
1573
|
+
getAttributeHash() {
|
|
1574
|
+
return this._reader.getAttributeHash();
|
|
1575
|
+
}
|
|
1576
|
+
getObjectId() {
|
|
1577
|
+
return this._reader.getObjectId();
|
|
1578
|
+
}
|
|
1579
|
+
getDisplayId() {
|
|
1580
|
+
return this._reader.getDisplayId();
|
|
1581
|
+
}
|
|
1582
|
+
setDisplayId(e) {
|
|
1583
|
+
return this._reader.setDisplayId(e);
|
|
1584
|
+
}
|
|
1585
|
+
setIndex(e) {
|
|
1586
|
+
return this._reader.setIndex(e);
|
|
1587
|
+
}
|
|
1588
|
+
getIndex() {
|
|
1589
|
+
return this._reader.getIndex();
|
|
1590
|
+
}
|
|
1591
|
+
readXWorldSpace() {
|
|
1592
|
+
return this._reader.readXWorldSpace();
|
|
1593
|
+
}
|
|
1594
|
+
readYWorldSpace() {
|
|
1595
|
+
return this._reader.readYWorldSpace();
|
|
1596
|
+
}
|
|
1597
|
+
_readX() {
|
|
1598
|
+
return this._reader.readXForDisplay();
|
|
1599
|
+
}
|
|
1600
|
+
_readY() {
|
|
1601
|
+
return this._reader.readYForDisplay();
|
|
1602
|
+
}
|
|
1603
|
+
_readServerCentroid() {
|
|
1604
|
+
return this._reader._readServerCentroid();
|
|
1605
|
+
}
|
|
1606
|
+
readLegacyFeatureForDisplay() {
|
|
1607
|
+
const e = this.readCentroidForDisplay();
|
|
1608
|
+
return { attributes: this.readAttributes(), geometry: this.readLegacyGeometryForDisplay(), centroid: (e && { x: e.coords[0], y: e.coords[1] }) ?? null };
|
|
1609
|
+
}
|
|
1610
|
+
readLegacyGeometryForDisplay() {
|
|
1611
|
+
const e = this.readGeometryForDisplay();
|
|
1612
|
+
return $s(e, this.geometryType, !1, !1);
|
|
1613
|
+
}
|
|
1614
|
+
readGeometryArea() {
|
|
1615
|
+
return this._reader.readGeometryArea();
|
|
1616
|
+
}
|
|
1617
|
+
readGeometryWorldSpace() {
|
|
1618
|
+
return this._reader.readGeometryWorldSpace();
|
|
1619
|
+
}
|
|
1620
|
+
_readGeometry() {
|
|
1621
|
+
return this._reader._readGeometry();
|
|
1622
|
+
}
|
|
1623
|
+
_readAttribute(e, t) {
|
|
1624
|
+
throw new Error("Error: Should not be called. Underlying _reader should be used instead");
|
|
1625
|
+
}
|
|
1626
|
+
_readAttributes() {
|
|
1627
|
+
throw new Error("Error: Should not be called. Underlying _reader should be used instead");
|
|
1628
|
+
}
|
|
1629
|
+
readArcadeFeature() {
|
|
1630
|
+
return this._reader.readArcadeFeature();
|
|
1631
|
+
}
|
|
1632
|
+
geometry() {
|
|
1633
|
+
return this._reader.geometry();
|
|
1634
|
+
}
|
|
1635
|
+
field(e) {
|
|
1636
|
+
return this.readAttribute(e, !0);
|
|
1637
|
+
}
|
|
1638
|
+
hasField(e) {
|
|
1639
|
+
return this._reader.hasField(e);
|
|
1640
|
+
}
|
|
1641
|
+
setField(e, t) {
|
|
1642
|
+
return this._reader.setField(e, t);
|
|
1643
|
+
}
|
|
1644
|
+
keys() {
|
|
1645
|
+
return this._reader.keys();
|
|
1646
|
+
}
|
|
1647
|
+
castToText(e = !1) {
|
|
1648
|
+
return this._reader.castToText(e);
|
|
1649
|
+
}
|
|
1650
|
+
}, Z = class {
|
|
1651
|
+
size() {
|
|
1652
|
+
return this.reader.getSize();
|
|
1653
|
+
}
|
|
1654
|
+
get fields() {
|
|
1655
|
+
return this.reader.fields;
|
|
1656
|
+
}
|
|
1657
|
+
invalidate() {
|
|
1658
|
+
this._geohashIndex = null, this._geohashIndexHash = null, this._spatialIndex = null, this._gridIndex = null, this._gridIndexHash = null;
|
|
1659
|
+
}
|
|
1660
|
+
queryFeaturesInBounds(e) {
|
|
1661
|
+
const t = this._getSpatialIndex().search(e);
|
|
1662
|
+
return pr.from(this.reader, t);
|
|
1663
|
+
}
|
|
1664
|
+
getGeohashIndex(e) {
|
|
1665
|
+
const t = JSON.stringify(e);
|
|
1666
|
+
return t !== this._geohashIndexHash && (this._geohashIndexHash = t, this._geohashIndex = new _r(e), this._geohashIndex.insert(this.reader, this.isTiled)), this._geohashIndex;
|
|
1667
|
+
}
|
|
1668
|
+
getGridIndex(e) {
|
|
1669
|
+
const t = JSON.stringify(e);
|
|
1670
|
+
return t !== this._gridIndexHash && (this._gridIndexHash = t, this._gridIndex = new or(e), this._gridIndex.insert(this.reader, this.isTiled)), this._gridIndex;
|
|
1671
|
+
}
|
|
1672
|
+
_getSpatialIndex() {
|
|
1673
|
+
return this._spatialIndex || (this._spatialIndex = cr.fromReader(this.reader)), this._spatialIndex;
|
|
1674
|
+
}
|
|
1675
|
+
}, Nt = class extends Z {
|
|
1676
|
+
constructor(e) {
|
|
1677
|
+
super(), this.metadata = e, this.chunkId = "override", this.normalizedChunkId = "override", this.removed = /* @__PURE__ */ new Set(), this.overridenIds = /* @__PURE__ */ new Set(), this._features = [];
|
|
1678
|
+
}
|
|
1679
|
+
get reader() {
|
|
1680
|
+
return M.fromOptimizedFeatures(this._features, this.metadata);
|
|
1681
|
+
}
|
|
1682
|
+
get queryInfo() {
|
|
1683
|
+
return {};
|
|
1684
|
+
}
|
|
1685
|
+
get first() {
|
|
1686
|
+
return !1;
|
|
1687
|
+
}
|
|
1688
|
+
get end() {
|
|
1689
|
+
return !1;
|
|
1690
|
+
}
|
|
1691
|
+
get isTiled() {
|
|
1692
|
+
return !1;
|
|
1693
|
+
}
|
|
1694
|
+
applyOverrides(e) {
|
|
1695
|
+
super.invalidate();
|
|
1696
|
+
const { reader: t, removed: s } = e, r = [], i = /* @__PURE__ */ new Set(), n = t.getCursor(), a = new Set(s);
|
|
1697
|
+
for (this.overridenIds.clear(); n.next(); ) {
|
|
1698
|
+
const o = n.readOptimizedFeatureWorldSpace(), h = o.objectId;
|
|
1699
|
+
r.push(o), i.add(h), this.overridenIds.add(h), this.removed.delete(h);
|
|
1700
|
+
}
|
|
1701
|
+
for (const o of this._features) {
|
|
1702
|
+
const h = o.objectId;
|
|
1703
|
+
a.has(h) || i.has(h) || (r.push(o), this.overridenIds.add(h));
|
|
1704
|
+
}
|
|
1705
|
+
this._features = r;
|
|
1706
|
+
for (const o of i.values())
|
|
1707
|
+
this.removed.delete(o);
|
|
1708
|
+
for (const o of s)
|
|
1709
|
+
this.removed.add(o), this.overridenIds.add(o);
|
|
1710
|
+
}
|
|
1711
|
+
getTileReader(e) {
|
|
1712
|
+
if (!this._features.length)
|
|
1713
|
+
return null;
|
|
1714
|
+
const t = this.queryFeaturesInBounds(e.bounds);
|
|
1715
|
+
return t.setTransformForDisplay(e.transform), t;
|
|
1716
|
+
}
|
|
1717
|
+
}, gr = class extends Ee {
|
|
1718
|
+
}, fr = class extends At {
|
|
1719
|
+
constructor(e, t, s) {
|
|
1720
|
+
super(e, t), this._timeZone = s, this.handledChunks = /* @__PURE__ */ new Set(), this.handledChunksForIdCreation = /* @__PURE__ */ new Set(), this.handledChunksForAttributeData = /* @__PURE__ */ new Set(), this._streamLayerDeferredObjectIdsToRemove = [];
|
|
1721
|
+
}
|
|
1722
|
+
destroy() {
|
|
1723
|
+
super.destroy();
|
|
1724
|
+
for (const e of this._source.chunks())
|
|
1725
|
+
this._cleanupChunkIds(e);
|
|
1726
|
+
}
|
|
1727
|
+
invalidateAttributeData() {
|
|
1728
|
+
this.handledChunksForAttributeData.clear();
|
|
1729
|
+
}
|
|
1730
|
+
onSubscribe(e) {
|
|
1731
|
+
super.onSubscribe(e), this._evalOptions = e.tile.createArcadeEvaluationOptions(this._timeZone);
|
|
1732
|
+
}
|
|
1733
|
+
createState(e) {
|
|
1734
|
+
return new gr(e);
|
|
1735
|
+
}
|
|
1736
|
+
get aggregateQueryEngine() {
|
|
1737
|
+
return null;
|
|
1738
|
+
}
|
|
1739
|
+
displayMap(e, t, s) {
|
|
1740
|
+
const r = new Map(e.map((n) => [t(n), n])), i = [];
|
|
1741
|
+
for (const n of this._source.chunks()) {
|
|
1742
|
+
const a = n.reader.getCursor();
|
|
1743
|
+
for (; a.next(); ) {
|
|
1744
|
+
const o = a.getObjectId(), h = a.getDisplayId(), c = r.get(o);
|
|
1745
|
+
if (c != null) {
|
|
1746
|
+
const d = s(h, c, o);
|
|
1747
|
+
i.push(d), r.delete(o);
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
return i;
|
|
1752
|
+
}
|
|
1753
|
+
getDisplayFeatures(e) {
|
|
1754
|
+
const t = new Set(e), s = /* @__PURE__ */ new Set(), r = [];
|
|
1755
|
+
for (const i of this._source.chunks()) {
|
|
1756
|
+
const n = i.reader.getCursor();
|
|
1757
|
+
for (; n.next(); ) {
|
|
1758
|
+
const a = n.getObjectId(), o = n.getDisplayId();
|
|
1759
|
+
t.has(o) && !s.has(a) && (r.push({ ...n.readLegacyFeatureWorldSpace(), displayId: o }), s.add(a));
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
return { features: r, aggregates: [] };
|
|
1763
|
+
}
|
|
1764
|
+
async *applyOverride(e) {
|
|
1765
|
+
const t = [], s = e.reader.getCursor();
|
|
1766
|
+
for (; s.next(); ) {
|
|
1767
|
+
const a = s.getObjectId();
|
|
1768
|
+
t.push(a);
|
|
1769
|
+
const o = this._attributeStore.createDisplayIdForObjectId(a);
|
|
1770
|
+
s.setDisplayId(o), this._attributeStore.setAttributeData(o, s, this._evalOptions);
|
|
1771
|
+
}
|
|
1772
|
+
const r = this.getDisplayIds(t), i = this.getDisplayIds(e.removed), n = new Nt(this._source.metadata);
|
|
1773
|
+
n.applyOverrides(e), this.handledChunks.add(n.chunkId), this.handledChunksForAttributeData.add(n.chunkId), this.handledChunksForIdCreation.add(n.chunkId);
|
|
1774
|
+
for (const a of this._sendStates.values())
|
|
1775
|
+
a.handledChunks.add(n.chunkId), yield new fe(a.subscription, null, r, !1, n.queryInfo);
|
|
1776
|
+
for (const a of this._sendStates.values()) {
|
|
1777
|
+
const o = n.getTileReader(a.subscription.tile);
|
|
1778
|
+
yield new fe(a.subscription, o, i, !1, n.queryInfo);
|
|
1779
|
+
}
|
|
1780
|
+
for (const a of e.removed)
|
|
1781
|
+
this._attributeStore.releaseDisplayIdForObjectId(a);
|
|
1782
|
+
}
|
|
1783
|
+
async *updateChunks() {
|
|
1784
|
+
if (this._source.chunks().length) {
|
|
1785
|
+
await this._updateAttributeData();
|
|
1786
|
+
for (const e of this._sendStates.values())
|
|
1787
|
+
yield* this._update(e);
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
removeChunks(e) {
|
|
1791
|
+
for (const t of e)
|
|
1792
|
+
this.handledChunks.delete(t.chunkId), this.handledChunksForAttributeData.delete(t.chunkId), this._cleanupChunkIds(t);
|
|
1793
|
+
}
|
|
1794
|
+
afterUpdateChunks() {
|
|
1795
|
+
for (const e of this._streamLayerDeferredObjectIdsToRemove)
|
|
1796
|
+
this._attributeStore.releaseDisplayIdForObjectId(e);
|
|
1797
|
+
this._streamLayerDeferredObjectIdsToRemove = [];
|
|
1798
|
+
}
|
|
1799
|
+
_cleanupChunkIds(e) {
|
|
1800
|
+
if (this.handledChunksForIdCreation.has(e.chunkId)) {
|
|
1801
|
+
const t = e.reader.getCursor();
|
|
1802
|
+
for (; t.next(); ) {
|
|
1803
|
+
const s = t.getObjectId();
|
|
1804
|
+
this._source.isStream ? this._streamLayerDeferredObjectIdsToRemove.push(s) : this._attributeStore.releaseDisplayIdForObjectId(s);
|
|
1805
|
+
}
|
|
1806
|
+
this.handledChunksForIdCreation.delete(e.chunkId);
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
async _updateAttributeData() {
|
|
1810
|
+
for (const e of this._source.chunks()) {
|
|
1811
|
+
const { chunkId: t, reader: s } = e;
|
|
1812
|
+
if (!this.handledChunksForIdCreation.has(t)) {
|
|
1813
|
+
this.handledChunksForIdCreation.add(t);
|
|
1814
|
+
const r = s.getCursor();
|
|
1815
|
+
for (; r.next(); ) {
|
|
1816
|
+
const i = this._attributeStore.createDisplayIdForObjectId(r.getObjectId());
|
|
1817
|
+
r.setDisplayId(i);
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
for (const e of this._source.chunks())
|
|
1822
|
+
if (!this.handledChunksForAttributeData.has(e.chunkId)) {
|
|
1823
|
+
this.handledChunksForAttributeData.add(e.chunkId);
|
|
1824
|
+
const t = e.reader.getCursor();
|
|
1825
|
+
for (; t.next(); ) {
|
|
1826
|
+
const s = t.getDisplayId();
|
|
1827
|
+
this._attributeStore.setAttributeData(s, t, this._evalOptions);
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
*_update(e) {
|
|
1832
|
+
const { subscription: t, handledChunks: s } = e;
|
|
1833
|
+
for (const r of this._source.chunks()) {
|
|
1834
|
+
const { chunkId: i } = r;
|
|
1835
|
+
if (s.has(i))
|
|
1836
|
+
continue;
|
|
1837
|
+
s.add(i);
|
|
1838
|
+
const n = r.getTileReader(t.tile);
|
|
1839
|
+
n && (yield new Pe(e.subscription, n, !1, r.end, r.queryInfo));
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
}, yr = class {
|
|
1843
|
+
constructor(e, t) {
|
|
1844
|
+
this._connection = e, this._source = t, this._version = 1, this._proxy = new ps({ fetch: (s, r) => this._connection.layerView.fetch(s, r), fetchDictionary: (s, r) => this._connection.layerView.fetchDictionary(s, r) }), this._attributeStore = new gs({ isLocal: !1, update: (s) => ut(this._connection.container.updateAttributeView(s)) });
|
|
1845
|
+
}
|
|
1846
|
+
destroy() {
|
|
1847
|
+
var e;
|
|
1848
|
+
this._proxy.destory(), (e = this._strategy) == null || e.destroy(), this._attributeStore.destroy();
|
|
1849
|
+
}
|
|
1850
|
+
get aggregateQueryEngine() {
|
|
1851
|
+
var e;
|
|
1852
|
+
return (e = this._strategy) == null ? void 0 : e.aggregateQueryEngine;
|
|
1853
|
+
}
|
|
1854
|
+
getDisplayFeatures(e) {
|
|
1855
|
+
return this._strategy ? this._strategy.getDisplayFeatures(e) : { features: [], aggregates: [] };
|
|
1856
|
+
}
|
|
1857
|
+
getFeatureObjectIdsForAggregate(e) {
|
|
1858
|
+
return this._strategy ? this._strategy.getFeatureObjectIdsForAggregate(e) : [];
|
|
1859
|
+
}
|
|
1860
|
+
onSubscribe(e) {
|
|
1861
|
+
var t;
|
|
1862
|
+
(t = this._strategy) == null || t.onSubscribe(e);
|
|
1863
|
+
}
|
|
1864
|
+
onUnsubscribe(e) {
|
|
1865
|
+
var t;
|
|
1866
|
+
(t = this._strategy) == null || t.onUnsubscribe(e);
|
|
1867
|
+
}
|
|
1868
|
+
async update(e, t, s, r, i) {
|
|
1869
|
+
var c;
|
|
1870
|
+
const n = e.processor, a = ft(this._schema, n);
|
|
1871
|
+
if (!a && !r)
|
|
1872
|
+
return;
|
|
1873
|
+
y("esri-2d-update-debug") && console.debug(`Version[${this._version}] SymbolProcessor.update`, { changes: a, schema: n }), this._schema = n;
|
|
1874
|
+
const o = V.fromJSON(e.source.mutable.dataFilter.outSpatialReference), h = new Me({ fields: this._source.metadata.fieldsIndex, spatialReference: o });
|
|
1875
|
+
return await this._attributeStore.update(n.storage, h, this._source.metadata, o, t), (c = this._strategy) == null || c.invalidateAttributeData(), r || he(a, "mesh") ? (he(a, "mesh.strategy") && await this._updateStrategy(n.mesh.strategy, o, i, n.mesh.timeZone), this._updateSortKey(h, "sortKey" in n.mesh ? n.mesh.sortKey : null), (he(a, "mesh.factory") || n.mesh.factory.symbology.type === "dictionary") && (this._factory = await Qs.create(h, this._proxy, n.mesh.factory, s)), this._invalidate(), this._version = t, this._connection.container.updateRenderState(this._version)) : void 0;
|
|
1876
|
+
}
|
|
1877
|
+
async applyOverride(e) {
|
|
1878
|
+
if (!this._strategy)
|
|
1879
|
+
return;
|
|
1880
|
+
const t = this._strategy.applyOverride(e);
|
|
1881
|
+
for await (const s of t)
|
|
1882
|
+
try {
|
|
1883
|
+
await this._process(s);
|
|
1884
|
+
} catch {
|
|
1885
|
+
}
|
|
1886
|
+
this._source.applyOverride(e);
|
|
1887
|
+
}
|
|
1888
|
+
async updateChunks() {
|
|
1889
|
+
var e;
|
|
1890
|
+
await this._doUpdateChunks(), (e = this._strategy) == null || e.afterUpdateChunks();
|
|
1891
|
+
}
|
|
1892
|
+
async removeChunks(e) {
|
|
1893
|
+
var t;
|
|
1894
|
+
(t = this._strategy) == null || t.removeChunks(e), this._attributeStore.incrementDisplayIdGeneration();
|
|
1895
|
+
}
|
|
1896
|
+
updateHighlight({ highlights: e }) {
|
|
1897
|
+
if (!this._strategy)
|
|
1898
|
+
return void this._attributeStore.setHighlight(e.map(({ objectId: s, highlightFlags: r }) => ({ objectId: s, highlightFlags: r, displayId: -1 })), e);
|
|
1899
|
+
const t = this._strategy.displayMap(e, ({ objectId: s }) => s, (s, { highlightFlags: r }, i) => ({ objectId: i, displayId: s, highlightFlags: r }));
|
|
1900
|
+
this._attributeStore.setHighlight(t, e);
|
|
1901
|
+
}
|
|
1902
|
+
async _doUpdateChunks() {
|
|
1903
|
+
if (!this._strategy)
|
|
1904
|
+
return;
|
|
1905
|
+
const e = this._strategy.updateChunks(), t = [], s = /* @__PURE__ */ new Map();
|
|
1906
|
+
for await (const r of e) {
|
|
1907
|
+
let i = s.get(r.id);
|
|
1908
|
+
i == null && (i = new Zs({ concurrency: 16, process: (a) => this._process(a) }), s.set(r.id, i));
|
|
1909
|
+
const n = i.push(r).catch((a) => Fe(a));
|
|
1910
|
+
t.push(n);
|
|
1911
|
+
}
|
|
1912
|
+
try {
|
|
1913
|
+
await Promise.all(t);
|
|
1914
|
+
} catch {
|
|
1915
|
+
}
|
|
1916
|
+
y("esri-2d-update-debug") && console.log("SendUpdates"), await this._attributeStore.sendUpdates(), y("esri-2d-update-debug") && console.log("SendUpdates.await");
|
|
1917
|
+
}
|
|
1918
|
+
async _updateStrategy(e, t, s, r) {
|
|
1919
|
+
var i;
|
|
1920
|
+
switch ((i = this._strategy) == null || i.destroy(), e.type) {
|
|
1921
|
+
case "feature":
|
|
1922
|
+
this._strategy = new fr(this._source, this._attributeStore, r);
|
|
1923
|
+
break;
|
|
1924
|
+
case "binning":
|
|
1925
|
+
this._strategy = await Js.create(e, t, this._source, this._attributeStore, r);
|
|
1926
|
+
break;
|
|
1927
|
+
case "cluster":
|
|
1928
|
+
this._strategy = await je.create(this._connection, e, t, this._source, this._attributeStore, r);
|
|
1929
|
+
}
|
|
1930
|
+
for (const n of s)
|
|
1931
|
+
this._strategy.onSubscribe(n);
|
|
1932
|
+
}
|
|
1933
|
+
async _updateSortKey(e, t) {
|
|
1934
|
+
var s;
|
|
1935
|
+
if (this._sortInfo = dt((s = this._sortInfo) == null ? void 0 : s.computed), t != null) {
|
|
1936
|
+
const r = t.byRenderer ? null : await e.createComputedField(t);
|
|
1937
|
+
this._sortInfo = { ...t, computed: r };
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
_invalidate() {
|
|
1941
|
+
this._strategy && this._strategy.invalidate();
|
|
1942
|
+
}
|
|
1943
|
+
async _process(e) {
|
|
1944
|
+
const t = e.subscription;
|
|
1945
|
+
if (y("esri-2d-update-debug")) {
|
|
1946
|
+
const o = t.tile;
|
|
1947
|
+
console.debug(`Version[${this._version}] Tile[${o.key.id}, end=${e.end}] Processor._process`);
|
|
1948
|
+
}
|
|
1949
|
+
await this._fetchResources(e), Y(t.signal);
|
|
1950
|
+
const s = await this._write(e, t.tile.createArcadeEvaluationOptions(this._schema.mesh.timeZone)), r = t.tile.tileInfoView.tileInfo.isWrappable, { message: i, transferList: n } = s.serialize(r), a = e.createMessage(i, this._version, this._attributeStore.epoch);
|
|
1951
|
+
if (Y(t.signal), this._connection.container.onMessage(a, { signal: t.signal, transferList: n }), this._attributeStore.sendUpdates(), y("esri-2d-update-debug")) {
|
|
1952
|
+
const o = t.tile;
|
|
1953
|
+
console.debug(`Version[${this._version}] Tile[${o.key.id}, end=${e.end}] Processor._process.await`);
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
async _fetchResources(e) {
|
|
1957
|
+
await this._fetchMatcherResources(e), await this._fetchWriterResources(e);
|
|
1958
|
+
}
|
|
1959
|
+
async _fetchMatcherResources(e) {
|
|
1960
|
+
if (e.reader)
|
|
1961
|
+
return this._factory.enqueueMatcherRequests(this._proxy, e.reader);
|
|
1962
|
+
}
|
|
1963
|
+
async _fetchWriterResources(e) {
|
|
1964
|
+
if (!e.reader)
|
|
1965
|
+
return;
|
|
1966
|
+
const t = e.reader.getCursor(), s = e.subscription.tile.createArcadeEvaluationOptions(this._schema.mesh.timeZone);
|
|
1967
|
+
for (; t.next(); )
|
|
1968
|
+
this._factory.enqueueWriterRequests(this._proxy, t, s);
|
|
1969
|
+
await this._proxy.fetchEnqueuedResources();
|
|
1970
|
+
}
|
|
1971
|
+
async _write(e, t) {
|
|
1972
|
+
var h;
|
|
1973
|
+
const s = e.subscription.tile, r = (h = e.reader) == null ? void 0 : h.getCursor(), i = (r == null ? void 0 : r.getSize()) ?? 0, n = s.tileInfoView.tileInfo.isWrappable, a = new Us(s.key, this._strategy.enablePixelBuffering, n, i);
|
|
1974
|
+
if (!r)
|
|
1975
|
+
return a;
|
|
1976
|
+
const o = s.createArcadeEvaluationOptions(this._schema.mesh.timeZone);
|
|
1977
|
+
for (; r.next(); ) {
|
|
1978
|
+
const c = this._getSortKeyValue(r, t);
|
|
1979
|
+
a.entityStart(r.getDisplayId(), c), this._factory.write(a, this._proxy, r, o, s.level), a.entityEnd();
|
|
1980
|
+
}
|
|
1981
|
+
return a;
|
|
1982
|
+
}
|
|
1983
|
+
_getSortKeyValue(e, t) {
|
|
1984
|
+
if (!this._sortInfo)
|
|
1985
|
+
return 0;
|
|
1986
|
+
const { computed: s, order: r, byRenderer: i } = this._sortInfo, n = i ? this._factory.getSortKey(e, t) : s == null ? void 0 : s.read(e, t);
|
|
1987
|
+
return n == null || isNaN(n) ? 0 : n * (r === "asc" ? -1 : 1);
|
|
1988
|
+
}
|
|
1989
|
+
}, mr = class Bt {
|
|
1990
|
+
static from(e) {
|
|
1991
|
+
let t = 0, s = 0, r = 0;
|
|
1992
|
+
return e.forEach((i) => {
|
|
1993
|
+
const n = i._readGeometry();
|
|
1994
|
+
n && (s += n.isPoint ? 1 : n.lengths.reduce((a, o) => a + o, 0), r += n.isPoint ? 1 : n.lengths.length, t += 1);
|
|
1995
|
+
}), new Bt(t, s, r);
|
|
1996
|
+
}
|
|
1997
|
+
constructor(e, t, s) {
|
|
1998
|
+
this.featureCount = e, this.vertexCount = t, this.ringCount = s;
|
|
1999
|
+
}
|
|
2000
|
+
toJSON() {
|
|
2001
|
+
return { featureCount: this.featureCount, ringCount: this.featureCount, vertexCount: this.featureCount };
|
|
2002
|
+
}
|
|
2003
|
+
};
|
|
2004
|
+
const ce = 4;
|
|
2005
|
+
function br(u, e) {
|
|
2006
|
+
const { service: t } = u, s = t.orderByFields ?? e.objectIdField + " ASC", r = t.source, i = { returnCentroid: !(r !== null && typeof r == "object" && "path" in r && es(r.path)) && e.geometryType === "esriGeometryPolygon", returnGeometry: !0, timeReferenceUnknownClient: e.timeReferenceUnknownClient ?? void 0, outSpatialReference: V.fromJSON(u.mutable.dataFilter.outSpatialReference), orderByFields: [s], where: u.mutable.dataFilter.definitionExpression ?? "1=1", outFields: u.mutable.availableFields };
|
|
2007
|
+
if (u.type === "feature") {
|
|
2008
|
+
const { gdbVersion: n, historicMoment: a, timeExtent: o } = u.mutable.dataFilter;
|
|
2009
|
+
return { ...i, gdbVersion: n, historicMoment: a ? new Date(a) : null, timeExtent: o ? ts.fromJSON(o) : null, outFields: u.mutable.availableFields };
|
|
2010
|
+
}
|
|
2011
|
+
return i;
|
|
2012
|
+
}
|
|
2013
|
+
let Ir = class Vt {
|
|
2014
|
+
static fromSchema(e, t) {
|
|
2015
|
+
return new Vt(br(e, t), e.mutable.dataFilter.customParameters, t.geometryType, e.service.queryMetadata.capabilities);
|
|
2016
|
+
}
|
|
2017
|
+
constructor(e, t, s, r) {
|
|
2018
|
+
this._queryParams = e, this._customParameters = t, this._geometryType = s, this._capabilities = r;
|
|
2019
|
+
}
|
|
2020
|
+
get pageSize() {
|
|
2021
|
+
if (this._capabilities == null)
|
|
2022
|
+
throw new Error("InternalError: Service does not support paged queries");
|
|
2023
|
+
const { query: e } = this._capabilities, t = e.supportsMaxRecordCountFactor ? ce : null, s = (e.maxRecordCount ?? 8e3) * (t ?? 1);
|
|
2024
|
+
return Math.min(8e3, s);
|
|
2025
|
+
}
|
|
2026
|
+
updateFields(e) {
|
|
2027
|
+
this._queryParams.outFields = e;
|
|
2028
|
+
}
|
|
2029
|
+
createPatchFieldsQuery(e, t) {
|
|
2030
|
+
const s = e.clone();
|
|
2031
|
+
if (this._queryParams.outFields[0] === "*") {
|
|
2032
|
+
if ((s.outFields ?? [])[0] === "*")
|
|
2033
|
+
return null;
|
|
2034
|
+
s.outFields = this._queryParams.outFields;
|
|
2035
|
+
} else {
|
|
2036
|
+
const r = new Set(this._queryParams.outFields), i = [];
|
|
2037
|
+
for (const n of r)
|
|
2038
|
+
t.hasField(n) || i.push(n);
|
|
2039
|
+
if (i.length === 0)
|
|
2040
|
+
return null;
|
|
2041
|
+
s.outFields = i;
|
|
2042
|
+
}
|
|
2043
|
+
return s.returnGeometry = !1, s.returnCentroid = !1, s.quantizationParameters = null, s.cacheHint = !0, { inner: s, customParameters: this._customParameters };
|
|
2044
|
+
}
|
|
2045
|
+
createQuery(e = {}) {
|
|
2046
|
+
if (!this._queryParams)
|
|
2047
|
+
throw new Error("InternalError: queryInfo should be defined");
|
|
2048
|
+
return { inner: new ct({ ...this._queryParams, ...e }), customParameters: this._customParameters };
|
|
2049
|
+
}
|
|
2050
|
+
createTileQuery(e, t) {
|
|
2051
|
+
if (this._capabilities == null)
|
|
2052
|
+
throw new Error("InternalError: Service does not support tile queries");
|
|
2053
|
+
const s = this.createQuery(t), r = s.inner;
|
|
2054
|
+
return r.quantizationParameters = t.quantizationParameters ?? e.getQuantizationParameters(), r.resultType = "tile", r.geometry = e.extent, this._capabilities.query.supportsQuantization ? this._geometryType === "esriGeometryPolyline" && (r.maxAllowableOffset = e.resolution * y("feature-polyline-generalization-factor")) : this._geometryType !== "esriGeometryPolyline" && this._geometryType !== "esriGeometryPolygon" || (r.maxAllowableOffset = e.resolution, this._geometryType === "esriGeometryPolyline" && (r.maxAllowableOffset *= y("feature-polyline-generalization-factor"))), r.defaultSpatialReferenceEnabled = this._capabilities.query.supportsDefaultSpatialReference, r.compactGeometryEnabled = this._capabilities.query.supportsCompactGeometry, this._capabilities.query.supportsMaxRecordCountFactor && (r.maxRecordCountFactor = ce), s;
|
|
2055
|
+
}
|
|
2056
|
+
createPagedTileQuery(e, t) {
|
|
2057
|
+
const s = this.pageSize;
|
|
2058
|
+
return this.createTileQuery(e, { start: s * t, num: s, returnExceededLimitFeatures: !0 });
|
|
2059
|
+
}
|
|
2060
|
+
createPagedQuery(e) {
|
|
2061
|
+
const t = this.pageSize;
|
|
2062
|
+
return this.createQuery({ start: t * e, num: t, returnExceededLimitFeatures: !0, maxRecordCountFactor: ce });
|
|
2063
|
+
}
|
|
2064
|
+
};
|
|
2065
|
+
const vr = 2500;
|
|
2066
|
+
let te = class extends _t {
|
|
2067
|
+
constructor(e) {
|
|
2068
|
+
super(), this._connection = e, this._enabledEventTypes = /* @__PURE__ */ new Set(), this._updateInfo = { websocket: 0, client: 0 }, this._lastTime = performance.now(), this.addHandles([pe(() => {
|
|
2069
|
+
var t;
|
|
2070
|
+
return ((t = this._strategy) == null ? void 0 : t.connectionStatus) ?? "disconnected";
|
|
2071
|
+
}, (t) => {
|
|
2072
|
+
this._layerView.setProperty({ propertyName: "pipelineConnectionStatus", value: t });
|
|
2073
|
+
}, { initial: !0 }), pe(() => {
|
|
2074
|
+
var t;
|
|
2075
|
+
return ((t = this._strategy) == null ? void 0 : t.errorString) || null;
|
|
2076
|
+
}, (t) => this._layerView.setProperty({ propertyName: "pipelineErrorString", value: t }), { initial: !0 })]);
|
|
2077
|
+
}
|
|
2078
|
+
destroy() {
|
|
2079
|
+
this._strategy = null, this.removeAllHandles();
|
|
2080
|
+
}
|
|
2081
|
+
get _layerView() {
|
|
2082
|
+
return this._connection.layerView;
|
|
2083
|
+
}
|
|
2084
|
+
set strategy(e) {
|
|
2085
|
+
this._strategy == null && this._resetUpdateInfo(performance.now());
|
|
2086
|
+
const t = "event-handles";
|
|
2087
|
+
this.removeHandles(t), e != null && this.addHandles([e.events.on("data-received", (s) => this._onFeature(s)), e.events.on("message-received", (s) => this._onWebSocketMessage(s)), e.events.on("features-updated", (s) => this._onUpdate(s)), e.events.on("tick", () => this._onTick())], t), this._strategy = e;
|
|
2088
|
+
}
|
|
2089
|
+
updateCustomParameters(e) {
|
|
2090
|
+
var t;
|
|
2091
|
+
e != null && ((t = this._strategy) == null || t.updateCustomParameters(e));
|
|
2092
|
+
}
|
|
2093
|
+
sendMessageToSocket(e) {
|
|
2094
|
+
var t;
|
|
2095
|
+
(t = this._strategy) == null || t.sendMessageToSocket(e);
|
|
2096
|
+
}
|
|
2097
|
+
sendMessageToClient(e) {
|
|
2098
|
+
var t;
|
|
2099
|
+
(t = this._strategy) == null || t.sendMessageToClient(e);
|
|
2100
|
+
}
|
|
2101
|
+
enableEvent(e, t) {
|
|
2102
|
+
t ? this._enabledEventTypes.add(e) : this._enabledEventTypes.delete(e);
|
|
2103
|
+
}
|
|
2104
|
+
disconnect() {
|
|
2105
|
+
var e;
|
|
2106
|
+
(e = this._strategy) == null || e.disconnect();
|
|
2107
|
+
}
|
|
2108
|
+
connect() {
|
|
2109
|
+
var e;
|
|
2110
|
+
(e = this._strategy) == null || e.connect();
|
|
2111
|
+
}
|
|
2112
|
+
clear() {
|
|
2113
|
+
var e;
|
|
2114
|
+
(e = this._strategy) == null || e.clear();
|
|
2115
|
+
}
|
|
2116
|
+
_onWebSocketMessage(e) {
|
|
2117
|
+
this._enabledEventTypes.has("message-received") && this._layerView.emitEvent({ name: "message-received", event: e });
|
|
2118
|
+
}
|
|
2119
|
+
_onFeature(e) {
|
|
2120
|
+
this._updateInfo.websocket++, this._enabledEventTypes.has("data-received") && this._layerView.emitEvent({ name: "data-received", event: { attributes: e.attributes, centroid: e.centroid, geometry: e.geometry } });
|
|
2121
|
+
}
|
|
2122
|
+
_onUpdate(e) {
|
|
2123
|
+
this._updateInfo.client += e;
|
|
2124
|
+
}
|
|
2125
|
+
_onTick() {
|
|
2126
|
+
const e = performance.now(), t = e - this._lastTime;
|
|
2127
|
+
if (t > vr) {
|
|
2128
|
+
const s = Math.round(this._updateInfo.client / (t / 1e3)), r = Math.round(this._updateInfo.websocket / (t / 1e3));
|
|
2129
|
+
this._resetUpdateInfo(e), this._layerView.emitEvent({ name: "update-rate", event: { client: s, websocket: r } });
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
_resetUpdateInfo(e) {
|
|
2133
|
+
this._lastTime = e, this._updateInfo.client = 0, this._updateInfo.websocket = 0;
|
|
2134
|
+
}
|
|
2135
|
+
};
|
|
2136
|
+
G([K()], te.prototype, "_strategy", void 0), te = G([lt("esri.views.2d.layers.features.sources.StreamMessenger")], te);
|
|
2137
|
+
let Yt = class {
|
|
2138
|
+
constructor(e) {
|
|
2139
|
+
this._store = e, this._controller = new AbortController();
|
|
2140
|
+
}
|
|
2141
|
+
destroy() {
|
|
2142
|
+
this._controller.abort();
|
|
2143
|
+
}
|
|
2144
|
+
get _options() {
|
|
2145
|
+
return { signal: this._controller.signal };
|
|
2146
|
+
}
|
|
2147
|
+
async queryOverride(e) {
|
|
2148
|
+
throw new Error("InternalError: LoadStrategy does not support fetching");
|
|
2149
|
+
}
|
|
2150
|
+
};
|
|
2151
|
+
const le = 268435455;
|
|
2152
|
+
let Sr = class {
|
|
2153
|
+
constructor() {
|
|
2154
|
+
this.hasFeatures = !1, this.exceededTransferLimit = !1, this.fieldCount = 0, this.featureCount = 0, this.objectIdFieldIndex = 0, this.vertexCount = 0, this.offsets = { attributes: new Array(), geometry: new Array() }, this.centroid = new Array();
|
|
2155
|
+
}
|
|
2156
|
+
};
|
|
2157
|
+
function wr(u, e, t = !1) {
|
|
2158
|
+
var $;
|
|
2159
|
+
const h = u.asUnsafe(), c = h.pos(), d = new Sr();
|
|
2160
|
+
let l = 0, g = 0;
|
|
2161
|
+
const _ = 1, m = 2, p = 4, I = 3;
|
|
2162
|
+
let f = null, k = null, b = null, v = !1;
|
|
2163
|
+
const S = [];
|
|
2164
|
+
for (; h.next(); )
|
|
2165
|
+
switch (h.tag()) {
|
|
2166
|
+
case 1:
|
|
2167
|
+
f = h.getString();
|
|
2168
|
+
break;
|
|
2169
|
+
case 3:
|
|
2170
|
+
k = h.getString();
|
|
2171
|
+
break;
|
|
2172
|
+
case 12:
|
|
2173
|
+
b = h.processMessage(js);
|
|
2174
|
+
break;
|
|
2175
|
+
case 9:
|
|
2176
|
+
if (d.exceededTransferLimit = h.getBool(), d.exceededTransferLimit) {
|
|
2177
|
+
d.offsets.geometry = t ? new Float64Array(8e3) : new Int32Array(8e3), d.centroid = t ? new Float64Array(16e3) : new Int32Array(16e3);
|
|
2178
|
+
for (let F = 0; F < d.centroid.length; F++)
|
|
2179
|
+
d.centroid[F] = le;
|
|
2180
|
+
}
|
|
2181
|
+
break;
|
|
2182
|
+
case 13: {
|
|
2183
|
+
const F = h.processMessage(Ps);
|
|
2184
|
+
F.index = l++, S.push(F);
|
|
2185
|
+
break;
|
|
2186
|
+
}
|
|
2187
|
+
case 15: {
|
|
2188
|
+
const F = h.getLength(), O = h.pos() + F;
|
|
2189
|
+
if (!d.exceededTransferLimit) {
|
|
2190
|
+
const C = d.offsets.geometry, q = d.centroid;
|
|
2191
|
+
C.push(0), q.push(le), q.push(le);
|
|
2192
|
+
}
|
|
2193
|
+
!v && d.exceededTransferLimit && (v = !0, d.offsets.attributes = t ? new Float64Array(8e3 * l) : new Uint32Array(8e3 * l));
|
|
2194
|
+
let R = g * l;
|
|
2195
|
+
for (; h.pos() < O && h.next(); )
|
|
2196
|
+
switch (h.tag()) {
|
|
2197
|
+
case _: {
|
|
2198
|
+
v ? d.offsets.attributes[R++] = h.pos() : d.offsets.attributes.push(h.pos());
|
|
2199
|
+
const C = h.getLength();
|
|
2200
|
+
h.skipLen(C);
|
|
2201
|
+
break;
|
|
2202
|
+
}
|
|
2203
|
+
case m:
|
|
2204
|
+
if (e) {
|
|
2205
|
+
const C = h.getLength(), q = h.pos() + C;
|
|
2206
|
+
for (; h.pos() < q && h.next(); )
|
|
2207
|
+
switch (h.tag()) {
|
|
2208
|
+
case I: {
|
|
2209
|
+
h.getUInt32();
|
|
2210
|
+
const E = h.getSInt64(), P = h.getSInt64();
|
|
2211
|
+
d.centroid[2 * g] = E, d.centroid[2 * g + 1] = P;
|
|
2212
|
+
break;
|
|
2213
|
+
}
|
|
2214
|
+
default:
|
|
2215
|
+
h.skip();
|
|
2216
|
+
}
|
|
2217
|
+
} else {
|
|
2218
|
+
d.offsets.geometry[g] = h.pos();
|
|
2219
|
+
const C = h.getLength();
|
|
2220
|
+
d.vertexCount += C, h.skipLen(C);
|
|
2221
|
+
}
|
|
2222
|
+
break;
|
|
2223
|
+
case p: {
|
|
2224
|
+
const C = h.getLength(), q = h.pos() + C;
|
|
2225
|
+
for (; h.pos() < q && h.next(); )
|
|
2226
|
+
switch (h.tag()) {
|
|
2227
|
+
case I: {
|
|
2228
|
+
h.getUInt32();
|
|
2229
|
+
const E = h.getSInt64(), P = h.getSInt64();
|
|
2230
|
+
d.centroid[2 * g] = E, d.centroid[2 * g + 1] = P;
|
|
2231
|
+
break;
|
|
2232
|
+
}
|
|
2233
|
+
default:
|
|
2234
|
+
h.skip();
|
|
2235
|
+
}
|
|
2236
|
+
break;
|
|
2237
|
+
}
|
|
2238
|
+
default:
|
|
2239
|
+
h.skip();
|
|
2240
|
+
}
|
|
2241
|
+
g++, d.hasFeatures = !0;
|
|
2242
|
+
break;
|
|
2243
|
+
}
|
|
2244
|
+
default:
|
|
2245
|
+
h.skip();
|
|
2246
|
+
}
|
|
2247
|
+
const w = f || k;
|
|
2248
|
+
if (!w)
|
|
2249
|
+
throw new D("FeatureSet has no objectId or globalId field name");
|
|
2250
|
+
return d.fields = new St(S), d.featureCount = g, d.fieldCount = l, d.objectIdFieldIndex = ($ = d.fields.get(w)) == null ? void 0 : $.index, d.transform = b, d.displayIds = new Uint32Array(d.featureCount), d.groupIds = new Uint16Array(d.featureCount), h.move(c), d;
|
|
2251
|
+
}
|
|
2252
|
+
const xr = !0, Ke = 268435455, et = 128, tt = 128e3, z = { small: { delta: new Int32Array(et), decoded: new Int32Array(et) }, large: { delta: new Int32Array(tt), decoded: new Int32Array(tt) } };
|
|
2253
|
+
function st(u) {
|
|
2254
|
+
return u <= z.small.delta.length ? z.small : (u <= z.large.delta.length || (z.large.delta = new Int32Array(Math.round(1.25 * u)), z.large.decoded = new Int32Array(Math.round(1.25 * u))), z.large);
|
|
2255
|
+
}
|
|
2256
|
+
function kr(u) {
|
|
2257
|
+
try {
|
|
2258
|
+
const t = new Es(new Uint8Array(u), new DataView(u));
|
|
2259
|
+
for (; t.next(); ) {
|
|
2260
|
+
if (t.tag() === 2)
|
|
2261
|
+
return Fr(t.getMessage());
|
|
2262
|
+
t.skip();
|
|
2263
|
+
}
|
|
2264
|
+
} catch (e) {
|
|
2265
|
+
const t = new D("query:parsing-pbf", "Error while parsing FeatureSet PBF payload", { error: e });
|
|
2266
|
+
rs.getLogger("esri.view.2d.layers.features.support.FeatureSetReaderPBF").error(t);
|
|
2267
|
+
}
|
|
2268
|
+
return null;
|
|
2269
|
+
}
|
|
2270
|
+
function Fr(u) {
|
|
2271
|
+
for (; u.next(); ) {
|
|
2272
|
+
if (u.tag() === 1)
|
|
2273
|
+
return u.getMessage();
|
|
2274
|
+
u.skip();
|
|
2275
|
+
}
|
|
2276
|
+
return null;
|
|
2277
|
+
}
|
|
2278
|
+
function Tr(u) {
|
|
2279
|
+
const c = u.getLength(), d = u.pos() + c;
|
|
2280
|
+
for (; u.pos() < d && u.next(); )
|
|
2281
|
+
switch (u.tag()) {
|
|
2282
|
+
case 1:
|
|
2283
|
+
return u.getString();
|
|
2284
|
+
case 2:
|
|
2285
|
+
return u.getFloat();
|
|
2286
|
+
case 3:
|
|
2287
|
+
return u.getDouble();
|
|
2288
|
+
case 4:
|
|
2289
|
+
return u.getSInt32();
|
|
2290
|
+
case 5:
|
|
2291
|
+
return u.getUInt32();
|
|
2292
|
+
case 6:
|
|
2293
|
+
return u.getInt64();
|
|
2294
|
+
case 7:
|
|
2295
|
+
return u.getUInt64();
|
|
2296
|
+
case 8:
|
|
2297
|
+
return u.getSInt64();
|
|
2298
|
+
case 9:
|
|
2299
|
+
return u.getBool();
|
|
2300
|
+
default:
|
|
2301
|
+
return u.skip(), null;
|
|
2302
|
+
}
|
|
2303
|
+
return null;
|
|
2304
|
+
}
|
|
2305
|
+
function Cr(u, e, t, s, r, i) {
|
|
2306
|
+
return 0.5 * Math.abs(u * s + t * i + r * e - u * i - t * e - r * s);
|
|
2307
|
+
}
|
|
2308
|
+
function _e(u, e, t, s) {
|
|
2309
|
+
return u * s - t * e === 0 && u * t + e * s > 0;
|
|
2310
|
+
}
|
|
2311
|
+
let Mr = class Se extends Ce {
|
|
2312
|
+
static fromBuffer(e, t, s = !1) {
|
|
2313
|
+
const r = t.geometryType, i = kr(e), n = wr(i, r === "esriGeometryPoint", s);
|
|
2314
|
+
return new Se(i, n, t);
|
|
2315
|
+
}
|
|
2316
|
+
constructor(e, t, s) {
|
|
2317
|
+
super(s), this._hasNext = !1, this._isPoints = !1, this._featureIndex = -1, this._featureOffset = 0, this._cache = { area: 0, unquantGeometry: void 0, geometry: void 0, centroid: void 0, legacyFeature: void 0, optFeature: void 0 }, this._parseCaches = new Array(), this._geometryType = s.geometryType, this._reader = e, this._header = t, this._hasNext = t.hasFeatures, this._isPoints = s.geometryType === "esriGeometryPoint";
|
|
2318
|
+
}
|
|
2319
|
+
get _size() {
|
|
2320
|
+
return this._header.featureCount;
|
|
2321
|
+
}
|
|
2322
|
+
get fields() {
|
|
2323
|
+
return this._header.fields;
|
|
2324
|
+
}
|
|
2325
|
+
get geometryType() {
|
|
2326
|
+
return this._geometryType;
|
|
2327
|
+
}
|
|
2328
|
+
get hasZ() {
|
|
2329
|
+
return !1;
|
|
2330
|
+
}
|
|
2331
|
+
get hasM() {
|
|
2332
|
+
return !1;
|
|
2333
|
+
}
|
|
2334
|
+
get hasFeatures() {
|
|
2335
|
+
return this._header.hasFeatures;
|
|
2336
|
+
}
|
|
2337
|
+
get hasNext() {
|
|
2338
|
+
return this._hasNext;
|
|
2339
|
+
}
|
|
2340
|
+
get exceededTransferLimit() {
|
|
2341
|
+
return this._header.exceededTransferLimit;
|
|
2342
|
+
}
|
|
2343
|
+
getSize() {
|
|
2344
|
+
return this._size;
|
|
2345
|
+
}
|
|
2346
|
+
getInTransform() {
|
|
2347
|
+
return this._header.transform;
|
|
2348
|
+
}
|
|
2349
|
+
getCursor() {
|
|
2350
|
+
return this.copy();
|
|
2351
|
+
}
|
|
2352
|
+
getIndex() {
|
|
2353
|
+
return this._featureIndex;
|
|
2354
|
+
}
|
|
2355
|
+
setIndex(e) {
|
|
2356
|
+
this._cache.area = 0, this._cache.unquantGeometry = void 0, this._cache.geometry = void 0, this._cache.centroid = void 0, this._cache.legacyFeature = void 0, this._cache.optFeature = void 0, this._featureIndex = e;
|
|
2357
|
+
}
|
|
2358
|
+
getAttributeHash() {
|
|
2359
|
+
let e = "";
|
|
2360
|
+
for (const t of this._header.fields.fields)
|
|
2361
|
+
e += this._readAttributeAtIndex(t.index) + ".";
|
|
2362
|
+
return e;
|
|
2363
|
+
}
|
|
2364
|
+
getObjectId() {
|
|
2365
|
+
return this._readAttributeAtIndex(this._header.objectIdFieldIndex);
|
|
2366
|
+
}
|
|
2367
|
+
getDisplayId() {
|
|
2368
|
+
return this._header.displayIds[this._featureIndex];
|
|
2369
|
+
}
|
|
2370
|
+
setDisplayId(e) {
|
|
2371
|
+
this._header.displayIds[this._featureIndex] = e;
|
|
2372
|
+
}
|
|
2373
|
+
readGeometryArea() {
|
|
2374
|
+
return this._cache.area || this._readGeometry(!0), this._cache.area;
|
|
2375
|
+
}
|
|
2376
|
+
copy() {
|
|
2377
|
+
const e = this._reader.clone(), t = new Se(e, this._header, this.metadata);
|
|
2378
|
+
return this.copyInto(t), t;
|
|
2379
|
+
}
|
|
2380
|
+
next() {
|
|
2381
|
+
for (this._cache.area = 0, this._cache.unquantGeometry = void 0, this._cache.geometry = void 0, this._cache.centroid = void 0, this._cache.legacyFeature = void 0, this._cache.optFeature = void 0; ++this._featureIndex < this._size && !this._getExists(); )
|
|
2382
|
+
;
|
|
2383
|
+
return this._featureIndex < this._size;
|
|
2384
|
+
}
|
|
2385
|
+
_readX() {
|
|
2386
|
+
return this._header.centroid[2 * this._featureIndex];
|
|
2387
|
+
}
|
|
2388
|
+
_readY() {
|
|
2389
|
+
return this._header.centroid[2 * this._featureIndex + 1];
|
|
2390
|
+
}
|
|
2391
|
+
_readServerCentroid() {
|
|
2392
|
+
const e = this._header.centroid[2 * this._featureIndex], t = this._header.centroid[2 * this._featureIndex + 1];
|
|
2393
|
+
return e === Ke ? null : new T([], [e, t]);
|
|
2394
|
+
}
|
|
2395
|
+
_readGeometry(e = !1) {
|
|
2396
|
+
if (this._cache.geometry === void 0) {
|
|
2397
|
+
let t = null;
|
|
2398
|
+
if (this._isPoints) {
|
|
2399
|
+
if (this._header.centroid[2 * this._featureIndex] === Ke)
|
|
2400
|
+
return null;
|
|
2401
|
+
const s = this._header.centroid[2 * this._featureIndex], r = this._header.centroid[2 * this._featureIndex + 1];
|
|
2402
|
+
t = new T([], [s, r]);
|
|
2403
|
+
} else {
|
|
2404
|
+
const s = this._header.offsets.geometry[this._featureIndex], r = this._reader;
|
|
2405
|
+
if (s === 0)
|
|
2406
|
+
return null;
|
|
2407
|
+
r.move(s);
|
|
2408
|
+
try {
|
|
2409
|
+
t = e ? this._parseGeometryForDisplay(r) : this._parseGeometry(r);
|
|
2410
|
+
} catch (i) {
|
|
2411
|
+
return console.error("Failed to parse geometry!", i), null;
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
return (t == null ? void 0 : t.coords.length) === 0 && (t = null), this._cache.geometry = t, t;
|
|
2415
|
+
}
|
|
2416
|
+
return this._cache.geometry;
|
|
2417
|
+
}
|
|
2418
|
+
_readAttribute(e, t) {
|
|
2419
|
+
var n;
|
|
2420
|
+
const s = this._header.fields.get(e);
|
|
2421
|
+
if (s == null)
|
|
2422
|
+
return;
|
|
2423
|
+
let r = this._readAttributeAtIndex(s.index);
|
|
2424
|
+
((n = this.fields.get(e)) == null ? void 0 : n.type) === "esriFieldTypeTimestampOffset" && (r = this.parseTimestampOffset(r));
|
|
2425
|
+
const i = this._header.fields.isDateField(s.name);
|
|
2426
|
+
return t ? r == null ? r : i ? new Date(r) : r : r;
|
|
2427
|
+
}
|
|
2428
|
+
_readAttributes() {
|
|
2429
|
+
const e = {};
|
|
2430
|
+
for (const t of this._header.fields.fields)
|
|
2431
|
+
e[t.name] = this._readAttributeAtIndex(t.index);
|
|
2432
|
+
return e;
|
|
2433
|
+
}
|
|
2434
|
+
copyInto(e) {
|
|
2435
|
+
super.copyInto(e), e._featureIndex = this._featureIndex, e._featureOffset = this._featureOffset, e._hasNext = this._hasNext, e._parseCaches = this._parseCaches;
|
|
2436
|
+
}
|
|
2437
|
+
_readAttributeAtIndex(e) {
|
|
2438
|
+
let t = this._parseCaches[e];
|
|
2439
|
+
if (t || (t = new fs(this.getSize()), this._parseCaches[e] = t), t.has(this._featureIndex))
|
|
2440
|
+
return t.get(this._featureIndex);
|
|
2441
|
+
const s = this._header.offsets.attributes[this._featureIndex * this._header.fieldCount + e], r = this._reader;
|
|
2442
|
+
r.move(s);
|
|
2443
|
+
const i = Tr(r);
|
|
2444
|
+
return t.set(this._featureIndex, i), i;
|
|
2445
|
+
}
|
|
2446
|
+
_readGeometryDeltaDecoded(e = !1) {
|
|
2447
|
+
if (this._cache.unquantGeometry === void 0) {
|
|
2448
|
+
const t = this._readGeometry(e);
|
|
2449
|
+
if (!t)
|
|
2450
|
+
return this._cache.unquantGeometry = void 0, null;
|
|
2451
|
+
if (!this.getInTransform())
|
|
2452
|
+
return this._cache.unquantGeometry = t, t;
|
|
2453
|
+
const s = st(t.coords.length).decoded, r = t.clone(s), i = r.coords;
|
|
2454
|
+
let n = 0;
|
|
2455
|
+
for (const a of r.lengths) {
|
|
2456
|
+
for (let o = 1; o < a; o++) {
|
|
2457
|
+
const h = 2 * (n + o), c = 2 * (n + o - 1);
|
|
2458
|
+
i[h] += i[c], i[h + 1] += i[c + 1];
|
|
2459
|
+
}
|
|
2460
|
+
n += a;
|
|
2461
|
+
}
|
|
2462
|
+
return this._cache.unquantGeometry = r, r;
|
|
2463
|
+
}
|
|
2464
|
+
return this._cache.unquantGeometry;
|
|
2465
|
+
}
|
|
2466
|
+
_parseGeometry(e) {
|
|
2467
|
+
const r = e.asUnsafe(), i = r.getLength(), n = r.pos() + i, a = [], o = [];
|
|
2468
|
+
for (; r.pos() < n && r.next(); )
|
|
2469
|
+
switch (r.tag()) {
|
|
2470
|
+
case 2: {
|
|
2471
|
+
const h = r.getUInt32(), c = r.pos() + h;
|
|
2472
|
+
for (; r.pos() < c; )
|
|
2473
|
+
o.push(r.getUInt32());
|
|
2474
|
+
break;
|
|
2475
|
+
}
|
|
2476
|
+
case 3: {
|
|
2477
|
+
const h = r.getUInt32(), c = r.pos() + h;
|
|
2478
|
+
for (a.push(r.getSInt64()), a.push(r.getSInt64()), this.hasZ && r.getSInt64(), this.hasM && r.getSInt64(); r.pos() < c; )
|
|
2479
|
+
a.push(r.getSInt64()), a.push(r.getSInt64()), this.hasZ && r.getSInt64(), this.hasM && r.getSInt64();
|
|
2480
|
+
break;
|
|
2481
|
+
}
|
|
2482
|
+
default:
|
|
2483
|
+
r.skip();
|
|
2484
|
+
}
|
|
2485
|
+
return new T(o, a);
|
|
2486
|
+
}
|
|
2487
|
+
_parseGeometryForDisplay(e) {
|
|
2488
|
+
const r = e.asUnsafe(), i = r.getLength(), n = r.pos() + i, a = [], o = [];
|
|
2489
|
+
let h = 0, c = 0, d = null, l = 0;
|
|
2490
|
+
const g = this.geometryType === "esriGeometryPolygon";
|
|
2491
|
+
for (; r.pos() < n && r.next(); )
|
|
2492
|
+
switch (r.tag()) {
|
|
2493
|
+
case 2: {
|
|
2494
|
+
const _ = r.getUInt32(), m = r.pos() + _;
|
|
2495
|
+
for (; r.pos() < m; ) {
|
|
2496
|
+
const p = r.getUInt32();
|
|
2497
|
+
a.push(p), h += p;
|
|
2498
|
+
}
|
|
2499
|
+
d = st(2 * h).delta;
|
|
2500
|
+
break;
|
|
2501
|
+
}
|
|
2502
|
+
case 3: {
|
|
2503
|
+
r.getUInt32();
|
|
2504
|
+
const _ = 2 + (this.hasZ ? 1 : 0) + (this.hasM ? 1 : 0);
|
|
2505
|
+
ss(d);
|
|
2506
|
+
for (const m of a)
|
|
2507
|
+
if (c + _ * m > d.length)
|
|
2508
|
+
for (let p = 0; p < m; p++)
|
|
2509
|
+
r.getSInt32(), r.getSInt32(), this.hasZ && r.getSInt32(), this.hasM && r.getSInt32();
|
|
2510
|
+
else if (g && xr) {
|
|
2511
|
+
const p = this.getAreaSimplificationThreshold(m, this._header.vertexCount);
|
|
2512
|
+
let I = 2, f = 1;
|
|
2513
|
+
const k = !1;
|
|
2514
|
+
let b = r.getSInt32(), v = r.getSInt32();
|
|
2515
|
+
d[c++] = b, d[c++] = v, this.hasZ && r.getSInt32(), this.hasM && r.getSInt32();
|
|
2516
|
+
let S = r.getSInt32(), w = r.getSInt32();
|
|
2517
|
+
for (this.hasZ && r.getSInt32(), this.hasM && r.getSInt32(); I < m; ) {
|
|
2518
|
+
let $ = r.getSInt32(), F = r.getSInt32();
|
|
2519
|
+
this.hasZ && r.getSInt32(), this.hasM && r.getSInt32();
|
|
2520
|
+
const O = b + S, R = v + w;
|
|
2521
|
+
Cr(b, v, O, R, O + $, R + F) >= p ? (l += -0.5 * (O - b) * (R + v), f > 1 && _e(d[c - 2], d[c - 1], S, w) ? (d[c - 2] += S, d[c - 1] += w) : (d[c++] = S, d[c++] = w, f++), b = O, v = R) : ($ += S, F += w), S = $, w = F, I++;
|
|
2522
|
+
}
|
|
2523
|
+
f < 3 || k ? c -= 2 * f : (l += -0.5 * (b + S - b) * (v + w + v), _e(d[c - 2], d[c - 1], S, w) ? (d[c - 2] += S, d[c - 1] += w, o.push(f)) : (d[c++] = S, d[c++] = w, o.push(++f)));
|
|
2524
|
+
} else {
|
|
2525
|
+
let p = 0, I = r.getSInt32(), f = r.getSInt32();
|
|
2526
|
+
this.hasZ && r.getSInt32(), this.hasM && r.getSInt32(), d[c++] = I, d[c++] = f, p += 1;
|
|
2527
|
+
for (let k = 1; k < m; k++) {
|
|
2528
|
+
const b = r.getSInt32(), v = r.getSInt32(), S = I + b, w = f + v;
|
|
2529
|
+
l += -0.5 * (S - I) * (w + f), this.hasZ && r.getSInt32(), this.hasM && r.getSInt32(), k > 2 && _e(d[c - 2], d[c - 1], b, v) ? (d[c - 2] += b, d[c - 1] += v) : (d[c++] = b, d[c++] = v, p += 1), I = S, f = w;
|
|
2530
|
+
}
|
|
2531
|
+
o.push(p);
|
|
2532
|
+
}
|
|
2533
|
+
break;
|
|
2534
|
+
}
|
|
2535
|
+
default:
|
|
2536
|
+
r.skip();
|
|
2537
|
+
}
|
|
2538
|
+
return this._cache.area = l, o.length ? new T(o, d) : null;
|
|
2539
|
+
}
|
|
2540
|
+
};
|
|
2541
|
+
class oe {
|
|
2542
|
+
constructor(e, t) {
|
|
2543
|
+
this.service = e, this._metadata = t;
|
|
2544
|
+
}
|
|
2545
|
+
destroy() {
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
function $r(u, e) {
|
|
2549
|
+
switch (u.type) {
|
|
2550
|
+
case "memory":
|
|
2551
|
+
return new qr(u, e);
|
|
2552
|
+
case "ogc":
|
|
2553
|
+
return new Er(u, e);
|
|
2554
|
+
case "feature-service":
|
|
2555
|
+
return u.queryMetadata.capabilities.query.supportsFormatPBF && y("featurelayer-pbf") ? new Ar(u, e) : new Rr(u, e);
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
async function Or(u) {
|
|
2559
|
+
const e = new is();
|
|
2560
|
+
return await e.open(u, {}), e;
|
|
2561
|
+
}
|
|
2562
|
+
class qr extends oe {
|
|
2563
|
+
constructor(e, t) {
|
|
2564
|
+
super(e, t), this._portsOpen = Or(e.source).then((s) => this.client = s);
|
|
2565
|
+
}
|
|
2566
|
+
destroy() {
|
|
2567
|
+
this.client.close(), this.client = null;
|
|
2568
|
+
}
|
|
2569
|
+
async executeQuery(e, t) {
|
|
2570
|
+
await this._portsOpen;
|
|
2571
|
+
const s = await this.client.invoke("queryFeatures", e.toJSON(), t);
|
|
2572
|
+
return M.fromFeatureSet(s, this._metadata);
|
|
2573
|
+
}
|
|
2574
|
+
}
|
|
2575
|
+
class Ar extends oe {
|
|
2576
|
+
async executeQuery(e, t) {
|
|
2577
|
+
const { data: s } = await As(this.service.source, e, t), r = !e.quantizationParameters;
|
|
2578
|
+
return Mr.fromBuffer(s, this._metadata, r);
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
class Rr extends oe {
|
|
2582
|
+
async executeQuery(e, t) {
|
|
2583
|
+
var a;
|
|
2584
|
+
const { source: s, queryMetadata: r } = this.service, i = r.capabilities;
|
|
2585
|
+
if (e.quantizationParameters != null && !i.query.supportsQuantization) {
|
|
2586
|
+
const o = e.clone(), h = wt(o.quantizationParameters);
|
|
2587
|
+
o.quantizationParameters = null;
|
|
2588
|
+
const { data: c } = await Ne(s, o, this._metadata.spatialReference, t), d = mt(c, this._metadata.objectIdField);
|
|
2589
|
+
return It(h, d), M.fromOptimizedFeatureSet(d, this._metadata);
|
|
2590
|
+
}
|
|
2591
|
+
const { data: n } = await Ne(s, e, this._metadata.spatialReference, t);
|
|
2592
|
+
return this._metadata.geometryType === "esriGeometryPoint" && (n.features = (a = n.features) == null ? void 0 : a.filter((o) => {
|
|
2593
|
+
if (o.geometry != null) {
|
|
2594
|
+
const h = o.geometry;
|
|
2595
|
+
return Number.isFinite(h.x) && Number.isFinite(h.y);
|
|
2596
|
+
}
|
|
2597
|
+
return !0;
|
|
2598
|
+
})), M.fromFeatureSet(n, this._metadata);
|
|
2599
|
+
}
|
|
2600
|
+
}
|
|
2601
|
+
let Er = class extends oe {
|
|
2602
|
+
async executeQuery(e, t) {
|
|
2603
|
+
const { capabilities: s } = this.service.queryMetadata;
|
|
2604
|
+
if (e.quantizationParameters && !s.query.supportsQuantization) {
|
|
2605
|
+
const i = e.clone(), n = wt(i.quantizationParameters);
|
|
2606
|
+
i.quantizationParameters = null;
|
|
2607
|
+
const a = await Be(this.service.source, e, t);
|
|
2608
|
+
return It(n, a), M.fromOptimizedFeatureSet(a, this._metadata);
|
|
2609
|
+
}
|
|
2610
|
+
const r = await Be(this.service.source, e, t);
|
|
2611
|
+
return M.fromOptimizedFeatureSet(r, this._metadata);
|
|
2612
|
+
}
|
|
2613
|
+
}, Xt = class extends Yt {
|
|
2614
|
+
constructor(e, t, s, r, i) {
|
|
2615
|
+
super(s), this._serviceInfo = e, this._queryInfo = t, this._metadata = r, this._eventLog = i, this._queue = new ht({ concurrency: 16, process: async (n) => {
|
|
2616
|
+
var o;
|
|
2617
|
+
const a = { signal: (o = n.options) == null ? void 0 : o.signal, query: n.query.customParameters };
|
|
2618
|
+
return this._adapter.executeQuery(n.query.inner, a);
|
|
2619
|
+
} }), this._adapter = $r(e, r);
|
|
2620
|
+
}
|
|
2621
|
+
async updateFields(e) {
|
|
2622
|
+
this._queryInfo.updateFields(e);
|
|
2623
|
+
const t = Array.from(this._store.chunks()).map(async (r) => {
|
|
2624
|
+
const i = ct.fromJSON(r.queryInfo.queryJSON);
|
|
2625
|
+
if (i)
|
|
2626
|
+
try {
|
|
2627
|
+
return await this._tryUpdateFields(r.reader, i), null;
|
|
2628
|
+
} catch (n) {
|
|
2629
|
+
return n;
|
|
2630
|
+
}
|
|
2631
|
+
}), s = (await Promise.all(t)).filter((r) => r);
|
|
2632
|
+
if (s.length)
|
|
2633
|
+
throw new D("featurelayer-query", "Encountered errors when downloading fields", { errors: s });
|
|
2634
|
+
}
|
|
2635
|
+
async queryOverride({ edits: e }) {
|
|
2636
|
+
const t = [], s = [];
|
|
2637
|
+
for (const n of e.removed)
|
|
2638
|
+
n.objectId != null && n.objectId !== -1 ? t.push(n.objectId) : s.push(n.globalId);
|
|
2639
|
+
s.length && t.push(...this._mapGlobalIdsToObjectIds(s));
|
|
2640
|
+
const r = e.addOrModified.map(({ objectId: n }) => n);
|
|
2641
|
+
let i;
|
|
2642
|
+
if (r.length) {
|
|
2643
|
+
const n = this._queryInfo.createQuery({ objectIds: r });
|
|
2644
|
+
i = await this._fetch(n);
|
|
2645
|
+
} else
|
|
2646
|
+
i = M.empty(this._metadata);
|
|
2647
|
+
return { reader: i, removed: t };
|
|
2648
|
+
}
|
|
2649
|
+
_mapGlobalIdsToObjectIds(e) {
|
|
2650
|
+
const t = new Set(e), s = this._metadata.globalIdField;
|
|
2651
|
+
if (s == null)
|
|
2652
|
+
throw new Error("InternalError: Recieved an edit with globalIds, but not supported by the service");
|
|
2653
|
+
const r = [];
|
|
2654
|
+
return this._store.forEachUnsafe((i) => {
|
|
2655
|
+
const n = i.readAttribute(s);
|
|
2656
|
+
t.has(n) && r.push(i.getObjectId());
|
|
2657
|
+
}), r;
|
|
2658
|
+
}
|
|
2659
|
+
async _fetch(e, t) {
|
|
2660
|
+
const s = await this._enqueue(e, t);
|
|
2661
|
+
return await this._tryUpdateFields(s, e.inner), s;
|
|
2662
|
+
}
|
|
2663
|
+
async _tryUpdateFields(e, t) {
|
|
2664
|
+
const s = this._queryInfo.createPatchFieldsQuery(t, e);
|
|
2665
|
+
if (!s)
|
|
2666
|
+
return;
|
|
2667
|
+
const r = await this._enqueue(s, this._options);
|
|
2668
|
+
e.joinAttributes(r);
|
|
2669
|
+
}
|
|
2670
|
+
async _enqueue(e, t) {
|
|
2671
|
+
return this._eventLog.onEvent({ type: "fetchStart" }), this._queue.push({ query: e, options: t }).finally(() => {
|
|
2672
|
+
this._eventLog.onEvent({ type: "fetchEnd", done: this._queue.length === 0 });
|
|
2673
|
+
});
|
|
2674
|
+
}
|
|
2675
|
+
}, Qt = class extends Xt {
|
|
2676
|
+
constructor() {
|
|
2677
|
+
super(...arguments), this._chunksById = /* @__PURE__ */ new Map();
|
|
2678
|
+
}
|
|
2679
|
+
unload(e) {
|
|
2680
|
+
this._removeChunks(e.tile);
|
|
2681
|
+
}
|
|
2682
|
+
_addChunk(e) {
|
|
2683
|
+
const t = e.tile.id;
|
|
2684
|
+
this._chunksById.has(t) || this._chunksById.set(t, []);
|
|
2685
|
+
const s = e.size();
|
|
2686
|
+
(s || e.first || e.end) && (y("esri-2d-update-debug") && console.debug(`Chunk[${e.chunkId}] ATileLoadStrategy.addChunk [count=${s}]`), this._chunksById.get(t).push(e), this._store.insert(e));
|
|
2687
|
+
}
|
|
2688
|
+
_removeChunks(e) {
|
|
2689
|
+
const t = this._chunksById.get(e.key.id) ?? [];
|
|
2690
|
+
for (const s of t)
|
|
2691
|
+
y("esri-2d-update-debug") && console.debug(`Tile[${e.key.id}] Chunk[${s.chunkId}] ATileLoadStrategy.removeChunk`), this._store.remove(s);
|
|
2692
|
+
this._chunksById.delete(e.key.id);
|
|
2693
|
+
}
|
|
2694
|
+
}, rt = class extends Z {
|
|
2695
|
+
constructor(e, t, s, r, i, n) {
|
|
2696
|
+
var a, o;
|
|
2697
|
+
super(), this._reader = e, this._queryJSON = t, this._tile = s, this._sourceTile = r, this._sourceTileDepth = i, this._end = n, this.chunkId = `${this._tile.key.id}.${(a = this._sourceTile) == null ? void 0 : a.key.id}${this._end ? "e" : ""}`, this.normalizedChunkId = `${this._tile.key.normalizedId}.${(o = this._sourceTile) == null ? void 0 : o.key.normalizedId}${this._end ? "e" : ""}`;
|
|
2698
|
+
}
|
|
2699
|
+
get queryInfo() {
|
|
2700
|
+
var e;
|
|
2701
|
+
return { type: "drill-down-tile", chunkId: this.chunkId, tileId: this._tile.key.id, queryJSON: this._queryJSON, sourceTileDepth: this._sourceTileDepth, sourceTileId: (e = this._sourceTile) == null ? void 0 : e.key.id, size: this.size(), end: this.end };
|
|
2702
|
+
}
|
|
2703
|
+
get first() {
|
|
2704
|
+
return this._sourceTileDepth === 0;
|
|
2705
|
+
}
|
|
2706
|
+
get reader() {
|
|
2707
|
+
return this._reader;
|
|
2708
|
+
}
|
|
2709
|
+
get end() {
|
|
2710
|
+
return this._end;
|
|
2711
|
+
}
|
|
2712
|
+
get tile() {
|
|
2713
|
+
return this._tile;
|
|
2714
|
+
}
|
|
2715
|
+
get isTiled() {
|
|
2716
|
+
return !0;
|
|
2717
|
+
}
|
|
2718
|
+
getTileReader(e) {
|
|
2719
|
+
return this._tile.key.id === e.key.id ? this.reader : null;
|
|
2720
|
+
}
|
|
2721
|
+
}, Pr = class {
|
|
2722
|
+
constructor(e, t) {
|
|
2723
|
+
this.subscription = e, this._tileIdToResult = /* @__PURE__ */ new Map(), this._controller = new AbortController(), se(e.options, () => this._controller.abort()), se(t, () => this._controller.abort());
|
|
2724
|
+
}
|
|
2725
|
+
get(e) {
|
|
2726
|
+
return this._tileIdToResult.get(e);
|
|
2727
|
+
}
|
|
2728
|
+
set(e, t) {
|
|
2729
|
+
this._tileIdToResult.set(e, t);
|
|
2730
|
+
}
|
|
2731
|
+
get options() {
|
|
2732
|
+
return { signal: this._controller.signal };
|
|
2733
|
+
}
|
|
2734
|
+
}, jr = class extends Qt {
|
|
2735
|
+
constructor() {
|
|
2736
|
+
super(...arguments), this._loadStates = /* @__PURE__ */ new Map();
|
|
2737
|
+
}
|
|
2738
|
+
get about() {
|
|
2739
|
+
return { willQueryAllFeatures: !1, willQueryFullResolutionGeometry: !1 };
|
|
2740
|
+
}
|
|
2741
|
+
async load(e) {
|
|
2742
|
+
this._loadStates.has(e.key.id) || this._loadStates.set(e.key.id, new Pr(e, this._options));
|
|
2743
|
+
const t = this._loadStates.get(e.key.id);
|
|
2744
|
+
let s;
|
|
2745
|
+
try {
|
|
2746
|
+
for await (const i of this._fetchChunkInfos(t, e.tile, 0)) {
|
|
2747
|
+
const { queryJSON: n, reader: a, sourceTile: o, sourceTileDepth: h, tile: c } = i, d = new rt(a, n, c, o, h, !1);
|
|
2748
|
+
Y(e.options), this._addChunk(d);
|
|
2749
|
+
}
|
|
2750
|
+
} catch (i) {
|
|
2751
|
+
s = i;
|
|
2752
|
+
}
|
|
2753
|
+
const r = new rt(M.empty(this._metadata), null, e.tile, null, -1, !0);
|
|
2754
|
+
if (this._addChunk(r), s)
|
|
2755
|
+
throw s;
|
|
2756
|
+
}
|
|
2757
|
+
unload(e) {
|
|
2758
|
+
super.unload(e), this._loadStates.delete(e.key.id);
|
|
2759
|
+
}
|
|
2760
|
+
async *_fetchChunkInfos(e, t, s) {
|
|
2761
|
+
let r = e.get(t.id);
|
|
2762
|
+
const i = !!r;
|
|
2763
|
+
if (r || (r = await this._fetchChunkInfo(e, t, s), e.set(t.id, r)), r.reader.exceededTransferLimit && s < y("featurelayer-query-max-depth"))
|
|
2764
|
+
for (const n of t.createChildTiles())
|
|
2765
|
+
yield* this._fetchChunkInfos(e, n, s + 1);
|
|
2766
|
+
else
|
|
2767
|
+
i || (yield r);
|
|
2768
|
+
}
|
|
2769
|
+
async _fetchChunkInfo(e, t, s) {
|
|
2770
|
+
const r = e.subscription.tile.getQuantizationParameters(), i = this._queryInfo.createTileQuery(t, { returnExceededLimitFeatures: !1, quantizationParameters: r });
|
|
2771
|
+
return { reader: await this._fetch(i, e.subscription.options), queryJSON: i.inner.toJSON(), tile: e.subscription.tile, sourceTile: t, sourceTileDepth: s };
|
|
2772
|
+
}
|
|
2773
|
+
}, it = class extends Z {
|
|
2774
|
+
constructor(e, t, s, r, i) {
|
|
2775
|
+
super(), this._reader = e, this._queryJSON = t, this._tile = s, this._page = r, this._end = i, this.chunkId = `${this._tile.key.id}.${this._page}${this.end ? "e" : ""}`, this.normalizedChunkId = `${this._tile.key.normalizedId}.${this._page}${this.end ? "e" : ""}`;
|
|
2776
|
+
}
|
|
2777
|
+
get queryInfo() {
|
|
2778
|
+
return { type: "paged-tile", chunkId: this.chunkId, tileId: this._tile.key.id, queryJSON: this._queryJSON, page: this._page, size: this.size(), end: this.end };
|
|
2779
|
+
}
|
|
2780
|
+
get reader() {
|
|
2781
|
+
return this._reader;
|
|
2782
|
+
}
|
|
2783
|
+
get first() {
|
|
2784
|
+
return this._page === 0;
|
|
2785
|
+
}
|
|
2786
|
+
get end() {
|
|
2787
|
+
return this._end;
|
|
2788
|
+
}
|
|
2789
|
+
get page() {
|
|
2790
|
+
return this._page;
|
|
2791
|
+
}
|
|
2792
|
+
get tile() {
|
|
2793
|
+
return this._tile;
|
|
2794
|
+
}
|
|
2795
|
+
get isTiled() {
|
|
2796
|
+
return !0;
|
|
2797
|
+
}
|
|
2798
|
+
getTileReader(e) {
|
|
2799
|
+
return this._tile.key.id === e.key.id ? this.reader : null;
|
|
2800
|
+
}
|
|
2801
|
+
}, Dr = class {
|
|
2802
|
+
constructor(e, t) {
|
|
2803
|
+
this.subscription = e, this._pages = /* @__PURE__ */ new Set(), this._controller = new AbortController(), this._done = !1, se(e.options, () => this._controller.abort()), se(t, () => this._controller.abort());
|
|
2804
|
+
}
|
|
2805
|
+
resetAbortController() {
|
|
2806
|
+
this._controller = new AbortController();
|
|
2807
|
+
}
|
|
2808
|
+
get pageStart() {
|
|
2809
|
+
let e = -1;
|
|
2810
|
+
for (const t of this._pages.values())
|
|
2811
|
+
e = Math.max(e, t);
|
|
2812
|
+
return e + 1;
|
|
2813
|
+
}
|
|
2814
|
+
get done() {
|
|
2815
|
+
return this._done;
|
|
2816
|
+
}
|
|
2817
|
+
get options() {
|
|
2818
|
+
return { signal: this._controller.signal };
|
|
2819
|
+
}
|
|
2820
|
+
add(e, t) {
|
|
2821
|
+
this._pages.add(e), this._done = this._done || t;
|
|
2822
|
+
}
|
|
2823
|
+
}, Lr = class extends Qt {
|
|
2824
|
+
constructor() {
|
|
2825
|
+
super(...arguments), this._loadStates = /* @__PURE__ */ new Map();
|
|
2826
|
+
}
|
|
2827
|
+
get about() {
|
|
2828
|
+
return { willQueryAllFeatures: !1, willQueryFullResolutionGeometry: !1 };
|
|
2829
|
+
}
|
|
2830
|
+
async load(e) {
|
|
2831
|
+
this._loadStates.has(e.key.id) || this._loadStates.set(e.key.id, new Dr(e, this._options));
|
|
2832
|
+
const t = this._loadStates.get(e.key.id);
|
|
2833
|
+
let s;
|
|
2834
|
+
t.resetAbortController();
|
|
2835
|
+
try {
|
|
2836
|
+
await this._fetchPages(t);
|
|
2837
|
+
} catch (i) {
|
|
2838
|
+
s = i;
|
|
2839
|
+
}
|
|
2840
|
+
const r = new it(M.empty(this._metadata), null, e.tile, -1, !0);
|
|
2841
|
+
if (ns(t.options) || this._addChunk(r), s)
|
|
2842
|
+
throw s;
|
|
2843
|
+
}
|
|
2844
|
+
unload(e) {
|
|
2845
|
+
super.unload(e), this._loadStates.delete(e.key.id);
|
|
2846
|
+
}
|
|
2847
|
+
async _fetchPages(e) {
|
|
2848
|
+
let r = 0, i = e.pageStart, n = 1;
|
|
2849
|
+
for (; r < 20 && !e.done; ) {
|
|
2850
|
+
const a = [];
|
|
2851
|
+
for (let h = 0; h < n; h++)
|
|
2852
|
+
a.push(this._fetchChunk(e, i++));
|
|
2853
|
+
const o = await Promise.all(a);
|
|
2854
|
+
for (const h of o)
|
|
2855
|
+
(h.size() !== 0 || h.first) && (e.add(h.page, !h.reader.exceededTransferLimit), Y(e.options), this._addChunk(h));
|
|
2856
|
+
r++, n = Math.min(n + 1, 4);
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2859
|
+
async _fetchChunk(e, t) {
|
|
2860
|
+
const s = e.subscription.tile, r = this._queryInfo.createPagedTileQuery(s, t), i = await this._fetch(r, e.options);
|
|
2861
|
+
return new it(i, r.inner.toJSON(), s, t, !1);
|
|
2862
|
+
}
|
|
2863
|
+
}, nt = class extends Z {
|
|
2864
|
+
constructor(e, t, s, r) {
|
|
2865
|
+
super(), this._reader = e, this._queryJSON = t, this._page = s, this._end = r, this.chunkId = `${this._page}${this.end ? "e" : ""}`, this.normalizedChunkId = this.chunkId;
|
|
2866
|
+
}
|
|
2867
|
+
get reader() {
|
|
2868
|
+
return this._reader;
|
|
2869
|
+
}
|
|
2870
|
+
get first() {
|
|
2871
|
+
return this._page === 0;
|
|
2872
|
+
}
|
|
2873
|
+
get end() {
|
|
2874
|
+
return this._end;
|
|
2875
|
+
}
|
|
2876
|
+
get queryInfo() {
|
|
2877
|
+
return { type: "snapshot", chunkId: this.chunkId, queryJSON: this._queryJSON, page: this._page, size: this.size(), end: this.end };
|
|
2878
|
+
}
|
|
2879
|
+
get isTiled() {
|
|
2880
|
+
return !1;
|
|
2881
|
+
}
|
|
2882
|
+
getTileReader(e) {
|
|
2883
|
+
const t = this.queryFeaturesInBounds(e.bounds);
|
|
2884
|
+
return t.setTransformForDisplay(e.transform), t;
|
|
2885
|
+
}
|
|
2886
|
+
};
|
|
2887
|
+
class zr extends Xt {
|
|
2888
|
+
constructor(e, t, s, r, i, n) {
|
|
2889
|
+
super(e, t, s, i, n), this._random = new pt(1e3), this._featureCount = r;
|
|
2890
|
+
}
|
|
2891
|
+
get about() {
|
|
2892
|
+
return { willQueryAllFeatures: !0, willQueryFullResolutionGeometry: !0 };
|
|
2893
|
+
}
|
|
2894
|
+
load(e) {
|
|
2895
|
+
return this._promise == null && (this._promise = this._downloadPages(this._featureCount)), this._promise;
|
|
2896
|
+
}
|
|
2897
|
+
unload(e) {
|
|
2898
|
+
}
|
|
2899
|
+
async _downloadPages(e) {
|
|
2900
|
+
const t = Math.ceil(e / this._queryInfo.pageSize), s = Array.from({ length: t }, (a, o) => o).sort((a, o) => this._random.getInt() - this._random.getInt()), r = await Promise.all(s.map((a) => this._downloadPage(a))), i = new nt(M.empty(this._metadata), null, -1, !0);
|
|
2901
|
+
this._store.insert(i);
|
|
2902
|
+
const n = r.filter((a) => a);
|
|
2903
|
+
if (n.length)
|
|
2904
|
+
throw new D("featurelayer-query", "Encountered errors when downloading data", { errors: n });
|
|
2905
|
+
}
|
|
2906
|
+
async _downloadPage(e) {
|
|
2907
|
+
try {
|
|
2908
|
+
const t = this._queryInfo.createPagedQuery(e), s = await this._fetch(t, this._options), r = new nt(s, t.inner.toJSON(), e, !1);
|
|
2909
|
+
return Y(this._options), this._store.insert(r), null;
|
|
2910
|
+
} catch (t) {
|
|
2911
|
+
return t;
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
}
|
|
2915
|
+
const Ur = "__esri_stream_id__", at = "__esri_timestamp__", ot = 1e3;
|
|
2916
|
+
class Gr {
|
|
2917
|
+
constructor(e, t, s, r, i = 128) {
|
|
2918
|
+
this._trackIdToObservations = /* @__PURE__ */ new Map(), this._idCounter = 0, this._lastPurge = performance.now(), this._addOrUpdated = /* @__PURE__ */ new Map(), this._removed = [], this._maxAge = 0, this._timeInfo = s, this._purgeOptions = r, this.store = e, this.objectIdField = t, this.purgeInterval = i, this._useGeneratedIds = this.objectIdField === Ur;
|
|
2919
|
+
}
|
|
2920
|
+
removeById(e) {
|
|
2921
|
+
this._removed.push(e);
|
|
2922
|
+
}
|
|
2923
|
+
removeByTrackId(e) {
|
|
2924
|
+
const t = this._trackIdToObservations.get(e);
|
|
2925
|
+
if (t)
|
|
2926
|
+
for (const s of t.entries)
|
|
2927
|
+
this._removed.push(s);
|
|
2928
|
+
}
|
|
2929
|
+
add(e) {
|
|
2930
|
+
var n;
|
|
2931
|
+
if (this._useGeneratedIds) {
|
|
2932
|
+
const a = this._nextId();
|
|
2933
|
+
e.attributes[this.objectIdField] = a, e.objectId = a;
|
|
2934
|
+
} else
|
|
2935
|
+
e.objectId = e.attributes[this.objectIdField];
|
|
2936
|
+
const t = e.objectId;
|
|
2937
|
+
if (this._addOrUpdated.set(t, e), this._maxAge = Math.max(this._maxAge, e.attributes[this._timeInfo.startTimeField]), !this._timeInfo.trackIdField)
|
|
2938
|
+
return this._trackIdLessObservations == null && (this._trackIdLessObservations = new Ve(1e5)), void this._trackIdLessObservations.enqueue(t);
|
|
2939
|
+
const s = e.attributes[this._timeInfo.trackIdField];
|
|
2940
|
+
if (!this._trackIdToObservations.has(s)) {
|
|
2941
|
+
const a = ((n = this._purgeOptions) == null ? void 0 : n.maxObservations) != null ? this._purgeOptions.maxObservations : ot, o = as(a, 0, ot);
|
|
2942
|
+
this._trackIdToObservations.set(s, new Ve(o));
|
|
2943
|
+
}
|
|
2944
|
+
const r = this._trackIdToObservations.get(s), i = r == null ? void 0 : r.enqueue(t);
|
|
2945
|
+
i != null && (this._addOrUpdated.has(i) ? this._addOrUpdated.delete(i) : this._removed.push(i));
|
|
2946
|
+
}
|
|
2947
|
+
checkForUpdates() {
|
|
2948
|
+
const e = this._getToAdd(), t = this._getToRemove(), s = performance.now();
|
|
2949
|
+
s - this._lastPurge >= this.purgeInterval && (this._purge(s), this._lastPurge = s);
|
|
2950
|
+
const r = [];
|
|
2951
|
+
if (t != null)
|
|
2952
|
+
for (const n of t) {
|
|
2953
|
+
const a = this.store.removeById(n);
|
|
2954
|
+
a != null && r.push(a);
|
|
2955
|
+
}
|
|
2956
|
+
const i = [];
|
|
2957
|
+
if (e != null) {
|
|
2958
|
+
const n = new Set(t ?? []);
|
|
2959
|
+
for (const a of e)
|
|
2960
|
+
n.has(a.objectId) || (a.attributes[at] = s, this.store.add(a), i.push(a));
|
|
2961
|
+
}
|
|
2962
|
+
return !(!i.length && !(r != null && r.length)) && (this.store.update(i, r), !0);
|
|
2963
|
+
}
|
|
2964
|
+
_getToAdd() {
|
|
2965
|
+
if (!this._addOrUpdated.size)
|
|
2966
|
+
return null;
|
|
2967
|
+
const e = new Array(this._addOrUpdated.size);
|
|
2968
|
+
let t = 0;
|
|
2969
|
+
return this._addOrUpdated.forEach((s) => e[t++] = s), this._addOrUpdated.clear(), e;
|
|
2970
|
+
}
|
|
2971
|
+
_getToRemove() {
|
|
2972
|
+
const e = this._removed;
|
|
2973
|
+
return this._removed.length ? (this._removed = [], e) : null;
|
|
2974
|
+
}
|
|
2975
|
+
_nextId() {
|
|
2976
|
+
const e = this._idCounter;
|
|
2977
|
+
return this._idCounter = (this._idCounter + 1) % 4294967294 + 1, e;
|
|
2978
|
+
}
|
|
2979
|
+
_purge(e) {
|
|
2980
|
+
const t = this._purgeOptions;
|
|
2981
|
+
t != null && (this._purgeSomeByDisplayCount(t), this._purgeByAge(t), this._purgeByAgeReceived(e, t), this._purgeTracks());
|
|
2982
|
+
}
|
|
2983
|
+
_purgeSomeByDisplayCount(e) {
|
|
2984
|
+
if (!e.displayCount)
|
|
2985
|
+
return;
|
|
2986
|
+
let t = this.store.size;
|
|
2987
|
+
if (t > e.displayCount) {
|
|
2988
|
+
if (this._timeInfo.trackIdField) {
|
|
2989
|
+
for (const s of this._trackIdToObservations.values())
|
|
2990
|
+
if (t > e.displayCount && s.size) {
|
|
2991
|
+
const r = s.dequeue();
|
|
2992
|
+
this._removed.push(r), t--;
|
|
2993
|
+
}
|
|
2994
|
+
}
|
|
2995
|
+
if (this._trackIdLessObservations != null) {
|
|
2996
|
+
let s = t - e.displayCount;
|
|
2997
|
+
for (; s-- > 0; ) {
|
|
2998
|
+
const r = this._trackIdLessObservations.dequeue();
|
|
2999
|
+
r != null && this._removed.push(r);
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
3004
|
+
_purgeByAge(e) {
|
|
3005
|
+
var i;
|
|
3006
|
+
const t = (i = this._timeInfo) == null ? void 0 : i.startTimeField;
|
|
3007
|
+
if (!e.age || !t)
|
|
3008
|
+
return;
|
|
3009
|
+
const s = 60 * e.age * 1e3, r = this._maxAge - s;
|
|
3010
|
+
this.store.forEach((n) => {
|
|
3011
|
+
n.attributes[t] < r && this._removed.push(n.objectId);
|
|
3012
|
+
});
|
|
3013
|
+
}
|
|
3014
|
+
_purgeByAgeReceived(e, t) {
|
|
3015
|
+
if (!t.ageReceived)
|
|
3016
|
+
return;
|
|
3017
|
+
const s = e - 60 * t.ageReceived * 1e3;
|
|
3018
|
+
this.store.forEach((r) => {
|
|
3019
|
+
r.attributes[at] < s && this._removed.push(r.objectId);
|
|
3020
|
+
});
|
|
3021
|
+
}
|
|
3022
|
+
_purgeTracks() {
|
|
3023
|
+
this._trackIdToObservations.forEach((e, t) => {
|
|
3024
|
+
e.size === 0 && this._trackIdToObservations.delete(t);
|
|
3025
|
+
});
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
let U = class extends _t {
|
|
3029
|
+
constructor(u) {
|
|
3030
|
+
super(u);
|
|
3031
|
+
}
|
|
3032
|
+
get connectionStatus() {
|
|
3033
|
+
var u;
|
|
3034
|
+
return (u = this.connection) == null ? void 0 : u.connectionStatus;
|
|
3035
|
+
}
|
|
3036
|
+
get errorString() {
|
|
3037
|
+
var u;
|
|
3038
|
+
return (u = this.connection) == null ? void 0 : u.errorString;
|
|
3039
|
+
}
|
|
3040
|
+
};
|
|
3041
|
+
G([K()], U.prototype, "connection", void 0), G([K()], U.prototype, "connectionStatus", null), G([K()], U.prototype, "errorString", null), U = G([lt("esri.views.2d.layers.features.sources.StreamConnectionState")], U);
|
|
3042
|
+
class Wr {
|
|
3043
|
+
constructor(e, t) {
|
|
3044
|
+
this._metadata = e, this._onUpdate = t, this._objectIdToFeature = /* @__PURE__ */ new Map();
|
|
3045
|
+
}
|
|
3046
|
+
get size() {
|
|
3047
|
+
return this._objectIdToFeature.size;
|
|
3048
|
+
}
|
|
3049
|
+
get reader() {
|
|
3050
|
+
return M.fromFeatures([...this._objectIdToFeature.values()], this._metadata);
|
|
3051
|
+
}
|
|
3052
|
+
add(e) {
|
|
3053
|
+
this._objectIdToFeature.set(e.objectId, e);
|
|
3054
|
+
}
|
|
3055
|
+
forEach(e) {
|
|
3056
|
+
this._objectIdToFeature.forEach(e);
|
|
3057
|
+
}
|
|
3058
|
+
removeById(e) {
|
|
3059
|
+
const t = this._objectIdToFeature.get(e);
|
|
3060
|
+
return t ? (this._objectIdToFeature.delete(e), t) : null;
|
|
3061
|
+
}
|
|
3062
|
+
clear() {
|
|
3063
|
+
this._objectIdToFeature = /* @__PURE__ */ new Map();
|
|
3064
|
+
}
|
|
3065
|
+
update(e, t) {
|
|
3066
|
+
this._onUpdate((e == null ? void 0 : e.length) ?? 0);
|
|
3067
|
+
}
|
|
3068
|
+
}
|
|
3069
|
+
let Nr = class extends Z {
|
|
3070
|
+
constructor(e) {
|
|
3071
|
+
super(), this._reader = e, this.chunkId = "stream-chunk", this.normalizedChunkId = "stream-chunk";
|
|
3072
|
+
}
|
|
3073
|
+
get reader() {
|
|
3074
|
+
return this._reader;
|
|
3075
|
+
}
|
|
3076
|
+
get first() {
|
|
3077
|
+
return !0;
|
|
3078
|
+
}
|
|
3079
|
+
get end() {
|
|
3080
|
+
return !0;
|
|
3081
|
+
}
|
|
3082
|
+
get queryInfo() {
|
|
3083
|
+
return { type: "stream", chunkId: this.chunkId, size: this.size(), end: this.end };
|
|
3084
|
+
}
|
|
3085
|
+
get isTiled() {
|
|
3086
|
+
return !1;
|
|
3087
|
+
}
|
|
3088
|
+
getTileReader(e) {
|
|
3089
|
+
const t = this.queryFeaturesInBounds(e.bounds);
|
|
3090
|
+
return t.setTransformForDisplay(e.transform), t;
|
|
3091
|
+
}
|
|
3092
|
+
};
|
|
3093
|
+
class Br extends Yt {
|
|
3094
|
+
constructor(e, t, s, r, i) {
|
|
3095
|
+
super(s), this._service = e, this._dataFilter = t, this._streamOptions = r, this._metadata = i, this._connectionState = new U(), this._forceRefresh = !1, this.events = new xe();
|
|
3096
|
+
const { objectIdField: n, timeInfo: a } = this._metadata, { purgeOptions: o } = t;
|
|
3097
|
+
this._stagingStore = new Wr(this._metadata, (h) => this.events.emit("features-updated", h)), this._manager = new Gr(this._stagingStore, n, a, o), this.connect();
|
|
3098
|
+
}
|
|
3099
|
+
destroy() {
|
|
3100
|
+
super.destroy(), this.disconnect();
|
|
3101
|
+
}
|
|
3102
|
+
get about() {
|
|
3103
|
+
return { willQueryAllFeatures: !1, willQueryFullResolutionGeometry: !1 };
|
|
3104
|
+
}
|
|
3105
|
+
get connectionStatus() {
|
|
3106
|
+
return this._connectionState.connectionStatus;
|
|
3107
|
+
}
|
|
3108
|
+
get errorString() {
|
|
3109
|
+
var e;
|
|
3110
|
+
return (e = this._connectionState) == null ? void 0 : e.errorString;
|
|
3111
|
+
}
|
|
3112
|
+
async refresh() {
|
|
3113
|
+
const e = this._chunk != null;
|
|
3114
|
+
this._manager.checkForUpdates() || !e || this._forceRefresh ? (this._chunk && this._store.remove(this._chunk), this._forceRefresh = !1, this._chunk = new Nr(this._stagingStore.reader), this._store.insert(this._chunk), this.events.emit("tick")) : this.events.emit("tick");
|
|
3115
|
+
}
|
|
3116
|
+
async updateFields(e) {
|
|
3117
|
+
throw new Error("Updating available fields not supported for StreamLayer");
|
|
3118
|
+
}
|
|
3119
|
+
async load(e) {
|
|
3120
|
+
}
|
|
3121
|
+
unload(e) {
|
|
3122
|
+
}
|
|
3123
|
+
disconnect() {
|
|
3124
|
+
var e;
|
|
3125
|
+
this._connection = dt(this._connection), this._connectionState.connection = null, (e = this._handlesGroup) == null || e.remove();
|
|
3126
|
+
}
|
|
3127
|
+
connect() {
|
|
3128
|
+
if (this._connection != null)
|
|
3129
|
+
return;
|
|
3130
|
+
const { geometryType: e, spatialReference: t } = this._metadata, { maxReconnectionAttempts: s, maxReconnectionInterval: r, geometryDefinition: i, definitionExpression: n, customParameters: a } = this._dataFilter;
|
|
3131
|
+
this._connection = Ds(this._service.source, t, this._streamOptions.outSR, e, n, i, s, r, a), this._handlesGroup = gt([this._connection.on("data-received", (o) => this._onFeature(o)), this._connection.on("message-received", (o) => this._onWebSocketMessage(o))]), this._connectionState.connection = this._connection;
|
|
3132
|
+
}
|
|
3133
|
+
clear() {
|
|
3134
|
+
this._manager.checkForUpdates(), this._stagingStore.clear(), this._forceRefresh = !0;
|
|
3135
|
+
}
|
|
3136
|
+
updateCustomParameters(e) {
|
|
3137
|
+
var t;
|
|
3138
|
+
(t = this._connection) == null || t.updateCustomParameters(e);
|
|
3139
|
+
}
|
|
3140
|
+
sendMessageToSocket(e) {
|
|
3141
|
+
var t;
|
|
3142
|
+
(t = this._connection) == null || t.sendMessageToSocket(e);
|
|
3143
|
+
}
|
|
3144
|
+
sendMessageToClient(e) {
|
|
3145
|
+
var t;
|
|
3146
|
+
(t = this._connection) == null || t.sendMessageToClient(e);
|
|
3147
|
+
}
|
|
3148
|
+
_onWebSocketMessage(e) {
|
|
3149
|
+
if ("type" in e)
|
|
3150
|
+
switch (e.type) {
|
|
3151
|
+
case "delete":
|
|
3152
|
+
if (e.objectIds)
|
|
3153
|
+
for (const t of e.objectIds)
|
|
3154
|
+
this._manager.removeById(t);
|
|
3155
|
+
if (e.trackIds)
|
|
3156
|
+
for (const t of e.trackIds)
|
|
3157
|
+
this._manager.removeByTrackId(t);
|
|
3158
|
+
break;
|
|
3159
|
+
case "clear":
|
|
3160
|
+
this.clear();
|
|
3161
|
+
}
|
|
3162
|
+
this.events.emit("message-received", e);
|
|
3163
|
+
}
|
|
3164
|
+
_onFeature(e) {
|
|
3165
|
+
try {
|
|
3166
|
+
this._manager.add(e), this.events.emit("data-received", e);
|
|
3167
|
+
} catch {
|
|
3168
|
+
}
|
|
3169
|
+
}
|
|
3170
|
+
}
|
|
3171
|
+
class Vr {
|
|
3172
|
+
constructor(e) {
|
|
3173
|
+
this._onChange = e, this._chunks = /* @__PURE__ */ new Map(), this._chunksToRemove = [], this.events = new xe(), this.featureAdapter = new ys();
|
|
3174
|
+
}
|
|
3175
|
+
destroy() {
|
|
3176
|
+
this.clear();
|
|
3177
|
+
}
|
|
3178
|
+
clear() {
|
|
3179
|
+
for (const e of this._chunks.values())
|
|
3180
|
+
this._chunksToRemove.push(e);
|
|
3181
|
+
this._chunks.clear(), this._overrideChunk != null && this._chunksToRemove.push(this._overrideChunk), this._overrideChunk = null;
|
|
3182
|
+
}
|
|
3183
|
+
*chunks() {
|
|
3184
|
+
this._overrideChunk && (yield this._overrideChunk), yield* this._chunks.values();
|
|
3185
|
+
}
|
|
3186
|
+
insert(e) {
|
|
3187
|
+
var t;
|
|
3188
|
+
y("esri-2d-update-debug") && console.debug(`Chunk[${e.chunkId}] SourceChunkStore.insert`), (t = this._overrideChunk) != null && t.overridenIds.size && e.reader.removeIds(this._overrideChunk.overridenIds), this._chunks.set(e.chunkId, e), this.events.emit("changed"), this._onChange();
|
|
3189
|
+
}
|
|
3190
|
+
remove(e) {
|
|
3191
|
+
y("esri-2d-update-debug") && console.debug(`Chunk[${e.chunkId}] SourceChunkStore.remove`), this._chunks.delete(e.chunkId), this._chunksToRemove.push(e);
|
|
3192
|
+
}
|
|
3193
|
+
cleanupRemovedChunks() {
|
|
3194
|
+
const e = this._chunksToRemove;
|
|
3195
|
+
return this._chunksToRemove = [], e;
|
|
3196
|
+
}
|
|
3197
|
+
applyOverrides(e, t) {
|
|
3198
|
+
this._overrideChunk == null && (this._overrideChunk = new Nt(t)), this._overrideChunk.applyOverrides(e);
|
|
3199
|
+
for (const s of this._chunks.values())
|
|
3200
|
+
s.reader.removeIds(this._overrideChunk.overridenIds), s.invalidate();
|
|
3201
|
+
}
|
|
3202
|
+
forEach(e) {
|
|
3203
|
+
const t = /* @__PURE__ */ new Set();
|
|
3204
|
+
for (const s of this.chunks()) {
|
|
3205
|
+
const r = s.reader.getCursor();
|
|
3206
|
+
for (; r.next(); ) {
|
|
3207
|
+
const i = r.getObjectId();
|
|
3208
|
+
t.has(i) || (e(r.copy()), t.add(i));
|
|
3209
|
+
}
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
forEachUnsafe(e) {
|
|
3213
|
+
const t = /* @__PURE__ */ new Set();
|
|
3214
|
+
for (const s of this.chunks()) {
|
|
3215
|
+
const r = s.reader.getCursor();
|
|
3216
|
+
for (; r.next(); ) {
|
|
3217
|
+
const i = r.getObjectId();
|
|
3218
|
+
t.has(i) || (e(r), t.add(i));
|
|
3219
|
+
}
|
|
3220
|
+
}
|
|
3221
|
+
}
|
|
3222
|
+
forEachInBounds(e, t) {
|
|
3223
|
+
const s = /* @__PURE__ */ new Set();
|
|
3224
|
+
for (const r of this.chunks()) {
|
|
3225
|
+
const i = r.queryFeaturesInBounds(e);
|
|
3226
|
+
for (; i.next(); ) {
|
|
3227
|
+
const n = i.getObjectId();
|
|
3228
|
+
s.has(n) || (t(i.copy()), s.add(n));
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
}
|
|
3232
|
+
forEachBounds(e, t) {
|
|
3233
|
+
const s = ke();
|
|
3234
|
+
for (const r of e)
|
|
3235
|
+
r.getBounds(s) && t(s);
|
|
3236
|
+
}
|
|
3237
|
+
}
|
|
3238
|
+
class Yr {
|
|
3239
|
+
constructor(e, t, s, r) {
|
|
3240
|
+
this._aggregateAdapter = e, this._subscriptions = t, this._onChange = s, this._connection = r, this._updateTracking = new Ls({ debugName: "FeatureSource" }), this._didInvalidateData = !1, this._store = new Vr(this._onChange);
|
|
3241
|
+
}
|
|
3242
|
+
destroy() {
|
|
3243
|
+
var e, t;
|
|
3244
|
+
(e = this._strategy) == null || e.destroy(), this._store.destroy(), (t = this._streamMessenger) == null || t.destroy();
|
|
3245
|
+
}
|
|
3246
|
+
get _eventLog() {
|
|
3247
|
+
return this._connection.eventLog;
|
|
3248
|
+
}
|
|
3249
|
+
get metadata() {
|
|
3250
|
+
if (!this._metadata)
|
|
3251
|
+
throw new Error("InternalError: Metadata not defined. Was update called?");
|
|
3252
|
+
return this._metadata;
|
|
3253
|
+
}
|
|
3254
|
+
get service() {
|
|
3255
|
+
return this._schema.service;
|
|
3256
|
+
}
|
|
3257
|
+
get store() {
|
|
3258
|
+
return this._store;
|
|
3259
|
+
}
|
|
3260
|
+
get streamMessenger() {
|
|
3261
|
+
return this._streamMessenger == null && this._initStreamMessenger(), this._streamMessenger;
|
|
3262
|
+
}
|
|
3263
|
+
get statistics() {
|
|
3264
|
+
return mr.from(this._store);
|
|
3265
|
+
}
|
|
3266
|
+
get updateTracking() {
|
|
3267
|
+
return this._updateTracking;
|
|
3268
|
+
}
|
|
3269
|
+
get queryEngine() {
|
|
3270
|
+
if (!this._queryEngine) {
|
|
3271
|
+
if (!this._schema)
|
|
3272
|
+
return null;
|
|
3273
|
+
const { dataFilter: e } = this._schema.mutable, t = this._schema.mutable.availableFields, s = this._metadata;
|
|
3274
|
+
this._queryEngine = new vt({ featureStore: this._store, fieldsIndex: s.fieldsIndex, geometryType: s.geometryType, objectIdField: s.objectIdField, hasM: !1, hasZ: !1, spatialReference: e.outSpatialReference, cacheSpatialQueries: !0, aggregateAdapter: this._aggregateAdapter, timeInfo: s.timeInfo, definitionExpression: e.definitionExpression, availableFields: t });
|
|
3275
|
+
}
|
|
3276
|
+
return this._queryEngine;
|
|
3277
|
+
}
|
|
3278
|
+
get isStream() {
|
|
3279
|
+
return this._schema.type === "stream";
|
|
3280
|
+
}
|
|
3281
|
+
chunks() {
|
|
3282
|
+
return Array.from(this._store.chunks());
|
|
3283
|
+
}
|
|
3284
|
+
cleanupRemovedChunks() {
|
|
3285
|
+
return this._store.cleanupRemovedChunks();
|
|
3286
|
+
}
|
|
3287
|
+
onSubscribe(e) {
|
|
3288
|
+
var s;
|
|
3289
|
+
this._eventLog.onEvent({ type: "subscribe", tile: e.tile.id });
|
|
3290
|
+
const t = (s = this._strategy) == null ? void 0 : s.load(e);
|
|
3291
|
+
t && (t.then(() => this._eventLog.onEvent({ type: "loaded", tile: e.tile.id })).catch((r) => this._eventLog.onEvent({ type: "error", tile: e.tile.id, error: r })), this._updateTracking.addPromise(t));
|
|
3292
|
+
}
|
|
3293
|
+
onResume(e) {
|
|
3294
|
+
var t;
|
|
3295
|
+
this._updateTracking.addPromise(ut((t = this._strategy) == null ? void 0 : t.load(e)));
|
|
3296
|
+
}
|
|
3297
|
+
onUnsubscribe(e) {
|
|
3298
|
+
var t;
|
|
3299
|
+
this._eventLog.onEvent({ type: "unsubscribe", tile: e.tile.id }), (t = this._strategy) == null || t.unload(e);
|
|
3300
|
+
}
|
|
3301
|
+
getOverride(e) {
|
|
3302
|
+
return this._updateTracking.addPromise(this._doGetOverride(e));
|
|
3303
|
+
}
|
|
3304
|
+
applyOverride(e) {
|
|
3305
|
+
this._didInvalidateData = !0, this._store.applyOverrides(e, this.metadata);
|
|
3306
|
+
}
|
|
3307
|
+
async update(e, t) {
|
|
3308
|
+
var i, n, a;
|
|
3309
|
+
const s = e.source, r = ft((i = this._schema) == null ? void 0 : i.mutable, s.mutable);
|
|
3310
|
+
if (!r)
|
|
3311
|
+
return !1;
|
|
3312
|
+
if (y("esri-2d-update-debug") && console.debug(`Version[${t}] FeatureSource.update`, { changes: r }), this._schema = s, this._metadata = new $e(this._schema.service.metadata), (n = this._queryEngine) == null || n.destroy(), this._queryEngine = null, this._schema.type === "feature" && this._schema.service.queryMetadata.lastEditDate != null && (this._lastEditDate = this._schema.service.queryMetadata.lastEditDate), this._streamMessenger == null && this._schema.type === "stream" && this._initStreamMessenger(), ze(r, "sourceRefreshVersion") && ((a = this._strategy) == null ? void 0 : a.refresh))
|
|
3313
|
+
return await this._strategy.refresh(), !0;
|
|
3314
|
+
if (s.type === "feature" && ze(r, "availableFields")) {
|
|
3315
|
+
if (await this._queryLastEditDateChanged() || this._didInvalidateData)
|
|
3316
|
+
this._didInvalidateData = !1, await this._updateStrategy(t);
|
|
3317
|
+
else {
|
|
3318
|
+
this._eventLog.onEvent({ type: "updateFieldsStart" });
|
|
3319
|
+
try {
|
|
3320
|
+
await this._strategy.updateFields(s.mutable.availableFields), this._eventLog.onEvent({ type: "updateFieldsEnd" });
|
|
3321
|
+
} catch (o) {
|
|
3322
|
+
this._eventLog.onEvent({ type: "updateFieldsError", error: o });
|
|
3323
|
+
}
|
|
3324
|
+
}
|
|
3325
|
+
return !1;
|
|
3326
|
+
}
|
|
3327
|
+
return !(!Ue(r, "dataFilter") && !Ue(r, "sourceRefreshVersion")) && (await this._updateStrategy(t), !0);
|
|
3328
|
+
}
|
|
3329
|
+
_initStreamMessenger() {
|
|
3330
|
+
this._streamMessenger == null && (this._streamMessenger = new te(this._connection));
|
|
3331
|
+
}
|
|
3332
|
+
async _doGetOverride(e) {
|
|
3333
|
+
return this._strategy.queryOverride(e);
|
|
3334
|
+
}
|
|
3335
|
+
async _queryLastEditDateChanged() {
|
|
3336
|
+
if (this._lastEditDate == null)
|
|
3337
|
+
return !1;
|
|
3338
|
+
const e = this._schema.service.source, t = { ...e.query, f: "json" }, s = (await os(e.path, { query: t, responseType: "json" })).data.editingInfo.lastEditDate;
|
|
3339
|
+
return s !== this._lastEditDate && (this._lastEditDate = s, !0);
|
|
3340
|
+
}
|
|
3341
|
+
async _createStrategy() {
|
|
3342
|
+
const e = this.service, t = "isSourceHosted" in e && e.isSourceHosted, s = Array.isArray(e.source), r = e.source && "collection" in e.source, i = t || s || r;
|
|
3343
|
+
if (this._schema.type === "stream") {
|
|
3344
|
+
const o = new Br(this._schema.service, this._schema.mutable.dataFilter, this._store, { outSR: this._schema.mutable.dataFilter.outSpatialReference }, this.metadata);
|
|
3345
|
+
return this._streamMessenger.strategy = o, o;
|
|
3346
|
+
}
|
|
3347
|
+
const n = Ir.fromSchema(this._schema, this._metadata), a = await this._supportSnapshotMode(this._schema, n);
|
|
3348
|
+
return a ? new zr(this._schema.service, n, this._store, a.featureCount, this.metadata, this._eventLog) : i ? new Lr(this._schema.service, n, this._store, this.metadata, this._eventLog) : new jr(this._schema.service, n, this._store, this.metadata, this._eventLog);
|
|
3349
|
+
}
|
|
3350
|
+
async _updateStrategy(e) {
|
|
3351
|
+
var n;
|
|
3352
|
+
const t = await this._createStrategy();
|
|
3353
|
+
this._eventLog.onEvent({ type: "updateStrategyStart", about: t.about });
|
|
3354
|
+
const s = !!this._strategy;
|
|
3355
|
+
this._store.clear(), (n = this._strategy) == null || n.destroy(), this._strategy = t, y("esri-2d-update-debug") && console.debug(`Version[${e}] FeatureSource.updateStrategy`, { strategy: t });
|
|
3356
|
+
const r = Array.from(this._subscriptions.values());
|
|
3357
|
+
if (!r.length)
|
|
3358
|
+
return void this._eventLog.onEvent({ type: "updateStrategyEnd" });
|
|
3359
|
+
const i = Promise.all(r.map((a) => this._strategy.load(a).then(() => this._eventLog.onEvent({ type: "loaded", tile: a.tile.id })).catch((o) => this._eventLog.onEvent({ type: "error", tile: a.tile.id, error: o }))));
|
|
3360
|
+
this._updateTracking.addPromise(i);
|
|
3361
|
+
try {
|
|
3362
|
+
s && await i;
|
|
3363
|
+
} catch (a) {
|
|
3364
|
+
Fe(a);
|
|
3365
|
+
}
|
|
3366
|
+
this._eventLog.onEvent({ type: "updateStrategyEnd" }), y("esri-2d-update-debug") && console.debug(`Version[${e}] FeatureSource.updateStrategyEnd`, { strategy: t });
|
|
3367
|
+
}
|
|
3368
|
+
async _supportSnapshotMode(e, t) {
|
|
3369
|
+
const { queryMetadata: s } = e.service, r = s.snapshotInfo;
|
|
3370
|
+
if (!r || !r.supportsSnapshotMinThreshold || !r.snapshotCountThresholds)
|
|
3371
|
+
return null;
|
|
3372
|
+
const i = e.service.source, n = t.createQuery();
|
|
3373
|
+
n.inner.orderByFields = [], n.inner.returnGeometry = !1;
|
|
3374
|
+
const a = (await Rs(i, n.inner, { query: n.customParameters })).data.count, { min: o, max: h } = r.snapshotCountThresholds;
|
|
3375
|
+
return a <= o || r.supportsSnapshotMaxThreshold && a < h ? { featureCount: a } : null;
|
|
3376
|
+
}
|
|
3377
|
+
}
|
|
3378
|
+
class Xr {
|
|
3379
|
+
constructor(e, t) {
|
|
3380
|
+
this._handles = new hs(), this._abortController = new AbortController(), this._resolver = Te(), this._isDone = !1, this._aborted = !1, this.tile = e, this._version = t, this._handles.add([]);
|
|
3381
|
+
}
|
|
3382
|
+
destroy() {
|
|
3383
|
+
this.pause(), this._handles.destroy();
|
|
3384
|
+
}
|
|
3385
|
+
get key() {
|
|
3386
|
+
return this.tile.key;
|
|
3387
|
+
}
|
|
3388
|
+
get version() {
|
|
3389
|
+
return this._version;
|
|
3390
|
+
}
|
|
3391
|
+
set version(e) {
|
|
3392
|
+
this._version = e;
|
|
3393
|
+
}
|
|
3394
|
+
get signal() {
|
|
3395
|
+
return this._abortController.signal;
|
|
3396
|
+
}
|
|
3397
|
+
get options() {
|
|
3398
|
+
return { signal: this._abortController.signal };
|
|
3399
|
+
}
|
|
3400
|
+
get done() {
|
|
3401
|
+
return this._resolver.promise;
|
|
3402
|
+
}
|
|
3403
|
+
get isDone() {
|
|
3404
|
+
return this._isDone;
|
|
3405
|
+
}
|
|
3406
|
+
resolve() {
|
|
3407
|
+
this._isDone = !0, this._resolver.resolve();
|
|
3408
|
+
}
|
|
3409
|
+
get paused() {
|
|
3410
|
+
return this._aborted;
|
|
3411
|
+
}
|
|
3412
|
+
resume() {
|
|
3413
|
+
this._abortController = new AbortController(), this._aborted = !1;
|
|
3414
|
+
}
|
|
3415
|
+
pause() {
|
|
3416
|
+
this._aborted || (this._aborted = !0, this._abortController.abort());
|
|
3417
|
+
}
|
|
3418
|
+
}
|
|
3419
|
+
class Qr {
|
|
3420
|
+
constructor(e) {
|
|
3421
|
+
this.edit = e, this.resolver = Te();
|
|
3422
|
+
}
|
|
3423
|
+
}
|
|
3424
|
+
class Zr {
|
|
3425
|
+
constructor(e, t) {
|
|
3426
|
+
this.schema = e, this.version = t, this.resolver = Te();
|
|
3427
|
+
}
|
|
3428
|
+
}
|
|
3429
|
+
class Un {
|
|
3430
|
+
constructor() {
|
|
3431
|
+
this._aggregateAdapter = { getFeatureObjectIds: (e) => this._processor.getFeatureObjectIdsForAggregate(e) }, this._subscriptions = /* @__PURE__ */ new Map(), this._updateRequested = !1, this._updateSubscriptionRequests = [], this._updateHighlightRequests = [];
|
|
3432
|
+
}
|
|
3433
|
+
destroy() {
|
|
3434
|
+
this._subscriptions.clear(), this._processor.destroy(), this._source.destroy(), this._handles.remove(), this._editState = null, this._tileInfoView = null;
|
|
3435
|
+
}
|
|
3436
|
+
onDetach() {
|
|
3437
|
+
this.destroy(), this._initialize(this._connection);
|
|
3438
|
+
}
|
|
3439
|
+
_initialize(e) {
|
|
3440
|
+
this._source = new Yr(this._aggregateAdapter, this._subscriptions, () => this._requestUpdate(), e), this._processor = new yr(e, this._source), this._handles = gt([pe(() => this._source.updateTracking.updating, () => {
|
|
3441
|
+
this._requestUpdate(), this._connection.layerView.setUpdating({ data: this._source.updateTracking.updating, pipeline: !0 });
|
|
3442
|
+
})]);
|
|
3443
|
+
}
|
|
3444
|
+
set remoteClient(e) {
|
|
3445
|
+
this._connection = new zs(e), this._initialize(this._connection);
|
|
3446
|
+
}
|
|
3447
|
+
get features() {
|
|
3448
|
+
const e = this._source.queryEngine;
|
|
3449
|
+
if (!e)
|
|
3450
|
+
throw new D("no-queryEngine", "No query engine defined");
|
|
3451
|
+
return e;
|
|
3452
|
+
}
|
|
3453
|
+
get aggregates() {
|
|
3454
|
+
const e = this._processor.aggregateQueryEngine;
|
|
3455
|
+
if (!e)
|
|
3456
|
+
throw new D("no-queryEngine", "No aggregate query engine defined");
|
|
3457
|
+
return e;
|
|
3458
|
+
}
|
|
3459
|
+
get processor() {
|
|
3460
|
+
return this._processor;
|
|
3461
|
+
}
|
|
3462
|
+
get streamMessenger() {
|
|
3463
|
+
return this._source.streamMessenger;
|
|
3464
|
+
}
|
|
3465
|
+
getDisplayFeatures(e) {
|
|
3466
|
+
return this._processor.getDisplayFeatures(e);
|
|
3467
|
+
}
|
|
3468
|
+
async updateSchema(e, t) {
|
|
3469
|
+
return y("esri-2d-update-debug") && this._updateSchemaState && console.error("InternalError: Schema already updating"), this._updateSchemaState = new Zr(e, t), this._requestUpdate(), this._updateSchemaState.resolver.promise;
|
|
3470
|
+
}
|
|
3471
|
+
updateSubscriptions(e) {
|
|
3472
|
+
this._updateSubscriptionRequests.push(e), this._requestUpdate();
|
|
3473
|
+
}
|
|
3474
|
+
updateHighlight(e) {
|
|
3475
|
+
this._updateHighlightRequests.push(e), this._requestUpdate();
|
|
3476
|
+
}
|
|
3477
|
+
async onEdits(e) {
|
|
3478
|
+
if (this._editState != null)
|
|
3479
|
+
throw new D("InternalError - Already processing an edit");
|
|
3480
|
+
this._editState = new Qr(e);
|
|
3481
|
+
const t = this._editState.resolver.promise;
|
|
3482
|
+
return this._requestUpdate(), t;
|
|
3483
|
+
}
|
|
3484
|
+
queryStatistics() {
|
|
3485
|
+
return this._source.statistics.toJSON();
|
|
3486
|
+
}
|
|
3487
|
+
async queryVisibleFeatures(e, t) {
|
|
3488
|
+
return this.features.executeQuery(e, t);
|
|
3489
|
+
}
|
|
3490
|
+
async queryHeatmapStatistics(e) {
|
|
3491
|
+
const t = Math.round(us(e.radius));
|
|
3492
|
+
let s = Number.POSITIVE_INFINITY, r = Number.NEGATIVE_INFINITY;
|
|
3493
|
+
const i = typeof e.fieldOffset == "string", n = e.fieldOffset ?? 0, a = Array.from(this._subscriptions.values()), o = this._source.chunks(), h = t ** 2, c = 3 / (Math.PI * h), d = 2 * t, l = Math.ceil(x / d);
|
|
3494
|
+
for (const g of a) {
|
|
3495
|
+
const _ = g.tile, m = new Float64Array(l * l);
|
|
3496
|
+
for (const p of o) {
|
|
3497
|
+
const I = p.getTileReader(_);
|
|
3498
|
+
if (!I)
|
|
3499
|
+
continue;
|
|
3500
|
+
const f = I.getCursor();
|
|
3501
|
+
for (; f.next(); ) {
|
|
3502
|
+
let k = 1;
|
|
3503
|
+
if (e.field != null) {
|
|
3504
|
+
const O = f.readAttribute(e.field);
|
|
3505
|
+
k = i ? -1 * +O : +O + n;
|
|
3506
|
+
}
|
|
3507
|
+
const b = f.readXForDisplay() / d, v = f.readYForDisplay() / d, S = Math.floor(b), w = Math.floor(v);
|
|
3508
|
+
if (S < 0 || w < 0 || S >= l || w >= l)
|
|
3509
|
+
continue;
|
|
3510
|
+
const $ = ((0.5 + S - b) * d) ** 2 + ((0.5 + w - v) * d) ** 2;
|
|
3511
|
+
if ($ > h)
|
|
3512
|
+
continue;
|
|
3513
|
+
const F = k * (c * (1 - $ / h) ** 2);
|
|
3514
|
+
m[w + S * l] += F;
|
|
3515
|
+
}
|
|
3516
|
+
}
|
|
3517
|
+
for (let p = 0; p < m.length; p++)
|
|
3518
|
+
s = Math.min(s, m[p]), r = Math.max(r, m[p]);
|
|
3519
|
+
}
|
|
3520
|
+
return { max: r, min: s };
|
|
3521
|
+
}
|
|
3522
|
+
async getSampleFeatures(e) {
|
|
3523
|
+
const t = this._source.chunks();
|
|
3524
|
+
if (t.reduce((o, h) => o + h.size(), 0) <= e.minFeatureCount) {
|
|
3525
|
+
if (!this._source.updateTracking.updating) {
|
|
3526
|
+
const o = [];
|
|
3527
|
+
return this._source.store.forEachUnsafe((h) => o.push(h.readLegacyFeatureWorldSpace())), o;
|
|
3528
|
+
}
|
|
3529
|
+
return null;
|
|
3530
|
+
}
|
|
3531
|
+
const s = /* @__PURE__ */ new Set(), r = [], i = t.map((o) => o.reader.getCursor()), n = new pt(), a = 3 * e.sampleSize;
|
|
3532
|
+
for (let o = 0; o < a && r.length < e.sampleSize; o++) {
|
|
3533
|
+
const h = i[n.getIntRange(0, t.length - 1)];
|
|
3534
|
+
if (h.getSize() === 0)
|
|
3535
|
+
continue;
|
|
3536
|
+
const c = n.getIntRange(0, h.getSize() - 1);
|
|
3537
|
+
h.setIndex(c);
|
|
3538
|
+
const d = h.getObjectId();
|
|
3539
|
+
s.has(d) || (s.add(d), r.push(h.readLegacyFeatureWorldSpace()));
|
|
3540
|
+
}
|
|
3541
|
+
return r.length >= e.sampleSize ? r : null;
|
|
3542
|
+
}
|
|
3543
|
+
_requestUpdate() {
|
|
3544
|
+
this._updateRequested || (this._updateRequested = !0, ds(() => this._scheduleNextUpdate()));
|
|
3545
|
+
}
|
|
3546
|
+
_scheduleNextUpdate() {
|
|
3547
|
+
this._updateRequested && (this._ongoingUpdate || (this._ongoingUpdate = this._doUpdate().finally(() => {
|
|
3548
|
+
this._ongoingUpdate = null, this._scheduleNextUpdate();
|
|
3549
|
+
}), this._updateRequested = !1));
|
|
3550
|
+
}
|
|
3551
|
+
_subscribe(e) {
|
|
3552
|
+
const t = e.tileId;
|
|
3553
|
+
if (this._subscriptions.has(t)) {
|
|
3554
|
+
const i = this._subscriptions.get(t);
|
|
3555
|
+
return void (i.paused && (y("esri-2d-update-debug") && console.debug(`Tile[${t}] Pipeline.resume`), i.resume(), i.version = e.version, this._source.onResume(i)));
|
|
3556
|
+
}
|
|
3557
|
+
y("esri-2d-update-debug") && console.debug(`Tile[${t}] Pipeline.subscribe`);
|
|
3558
|
+
const s = new cs(this._tileInfoView, t), r = new Xr(s, e.version);
|
|
3559
|
+
this._subscriptions.set(t, r), this._source.onSubscribe(r), this._processor.onSubscribe(r);
|
|
3560
|
+
}
|
|
3561
|
+
_unsubscribe(e) {
|
|
3562
|
+
const t = this._subscriptions.get(e);
|
|
3563
|
+
t && (y("esri-2d-update-debug") && console.debug(`Tile[${e}] Pipeline.unsubscribe`), this._source.onUnsubscribe(t), this._processor.onUnsubscribe(t), this._subscriptions.delete(t.key.id), t.destroy());
|
|
3564
|
+
}
|
|
3565
|
+
_pauseSubscription(e) {
|
|
3566
|
+
const t = this._subscriptions.get(e);
|
|
3567
|
+
t && (y("esri-2d-update-debug") && console.debug(`Tile[${e}] Pipeline.pause`), t.pause());
|
|
3568
|
+
}
|
|
3569
|
+
async _doUpdate() {
|
|
3570
|
+
if (y("esri-2d-update-debug") && console.debug("Pipeline._doUpdateStart"), await this._connection.layerView.setUpdating({ data: this._source.updateTracking.updating, pipeline: !0 }), this._updateSubscriptionRequests.length) {
|
|
3571
|
+
const r = this._updateSubscriptionRequests;
|
|
3572
|
+
this._updateSubscriptionRequests = [];
|
|
3573
|
+
for (const i of r)
|
|
3574
|
+
this._doUpdateSubscriptions(i);
|
|
3575
|
+
}
|
|
3576
|
+
const e = this._updateSchemaState;
|
|
3577
|
+
if (this._updateSchemaState = null, e != null) {
|
|
3578
|
+
const { schema: r, version: i } = e;
|
|
3579
|
+
await this._doUpdateSchema(r, i);
|
|
3580
|
+
}
|
|
3581
|
+
const t = this._editState;
|
|
3582
|
+
if (this._editState = null, t != null) {
|
|
3583
|
+
y("esri-2d-update-debug") && console.debug("Pipeline.applyEditOverride", t.edit);
|
|
3584
|
+
const r = await this._source.getOverride(t.edit);
|
|
3585
|
+
await this._processor.applyOverride(r), y("esri-2d-update-debug") && console.debug("Pipeline.endEditOverride", t.edit);
|
|
3586
|
+
}
|
|
3587
|
+
if (this._updateHighlightRequests.length) {
|
|
3588
|
+
const r = this._updateHighlightRequests;
|
|
3589
|
+
this._updateHighlightRequests = [];
|
|
3590
|
+
for (const i of r)
|
|
3591
|
+
this._processor.updateHighlight(i);
|
|
3592
|
+
}
|
|
3593
|
+
const s = this._source.cleanupRemovedChunks();
|
|
3594
|
+
this._processor.removeChunks(s);
|
|
3595
|
+
try {
|
|
3596
|
+
this._subscriptions.size && (y("esri-2d-update-debug") && console.debug("Pipeline.updateChunksStart"), await this._processor.updateChunks(), y("esri-2d-update-debug") && console.debug("Pipeline.updateChunksEnd"));
|
|
3597
|
+
} catch (r) {
|
|
3598
|
+
Fe(r);
|
|
3599
|
+
}
|
|
3600
|
+
t != null && t.resolver.resolve(), e != null && e.resolver.resolve(), this._updateRequested ? (y("esri-2d-update-debug") && console.debug("Pipeline._doUpdateEnd [updateRequested=true]"), await this._connection.layerView.setUpdating({ data: this._source.updateTracking.updating, pipeline: !0 })) : (y("esri-2d-update-debug") && console.debug("Pipeline._doUpdateEnd [updateRequested=false, After flush]"), await this._connection.layerView.setUpdating({ data: this._source.updateTracking.updating, pipeline: this._updateRequested }));
|
|
3601
|
+
}
|
|
3602
|
+
async _doUpdateSchema(e, t) {
|
|
3603
|
+
var r;
|
|
3604
|
+
if (y("esri-2d-update-debug") && console.debug(`Version[${t}] Pipeline.updateStart`, { schema: e }), !this._tileInfoView) {
|
|
3605
|
+
const i = De.fromJSON(e.source.tileInfoJSON);
|
|
3606
|
+
this._tileInfoView = new Le(i);
|
|
3607
|
+
}
|
|
3608
|
+
const s = { tileInfo: (r = this._tileInfoView) == null ? void 0 : r.tileInfo };
|
|
3609
|
+
try {
|
|
3610
|
+
const i = await this._source.update(e, t), n = Array.from(this._subscriptions.values());
|
|
3611
|
+
await this._processor.update(e, t, s, i, n);
|
|
3612
|
+
} catch (i) {
|
|
3613
|
+
console.error(i);
|
|
3614
|
+
}
|
|
3615
|
+
y("esri-2d-update-debug") && console.debug(`Version[${t}] Pipeline.updateEnd`);
|
|
3616
|
+
}
|
|
3617
|
+
_doUpdateSubscriptions(e) {
|
|
3618
|
+
if (y("esri-2d-update-debug") && console.debug("Pipeline.updateSubscriptions", e), !this._tileInfoView) {
|
|
3619
|
+
const t = De.fromJSON(e.tileInfoJSON);
|
|
3620
|
+
this._tileInfoView = new Le(t);
|
|
3621
|
+
}
|
|
3622
|
+
for (const t of e.subscribe)
|
|
3623
|
+
this._subscribe(t);
|
|
3624
|
+
for (const t of e.unsubscribe)
|
|
3625
|
+
this._unsubscribe(t);
|
|
3626
|
+
if (y("featurelayer-query-pausing-enabled"))
|
|
3627
|
+
for (const t of e.pause)
|
|
3628
|
+
this._pauseSubscription(t);
|
|
3629
|
+
}
|
|
3630
|
+
}
|
|
3631
|
+
export {
|
|
3632
|
+
Un as default
|
|
3633
|
+
};
|