@arcgis/core 5.0.0-next.69 → 5.0.0-next.70
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/Map.d.ts +3 -1
- package/analysis/Analysis.d.ts +1 -0
- package/analysis/Dimension/types.d.ts +1 -0
- package/analysis/DimensionAnalysis.d.ts +10 -10
- package/analysis/DimensionSimpleStyle.d.ts +14 -13
- package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
- package/analysis/DistanceMeasurementAnalysis.d.ts +2 -1
- package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +3 -3
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +1 -1
- package/analysis/ElevationProfile/types.d.ts +2 -0
- package/analysis/LengthDimension.d.ts +22 -21
- package/analysis/LineOfSightAnalysis.d.ts +2 -2
- package/analysis/ShadowCast/MinDurationOptions.d.ts +2 -2
- package/analysis/ShadowCast/types.d.ts +6 -2
- package/analysis/Slice/types.d.ts +1 -0
- package/analysis/Viewshed.d.ts +22 -20
- package/analysis/ViewshedAnalysis.d.ts +13 -13
- package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -2
- package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +2 -2
- package/analysis/VolumeMeasurement/types.d.ts +1 -0
- package/analysis/VolumeMeasurementAnalysis.d.ts +1 -0
- package/analysis/types.d.ts +5 -0
- package/arcade.d.ts +2 -2
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/04364f3dd7578c2acb71.js +1 -0
- package/assets/esri/core/workers/chunks/18ed69d563986dc2eb21.js +1 -0
- package/assets/esri/core/workers/chunks/{4c04c54330b693892cfc.js → 1a45b4b4803337f4b99f.js} +2 -2
- package/assets/esri/core/workers/chunks/{60c7f896f2246a8aa6d7.js → 244006d4b0547d574401.js} +53 -53
- package/assets/esri/core/workers/chunks/329b10897c6965948b84.js +1 -0
- package/assets/esri/core/workers/chunks/4387aaf9d5e8f6d1833d.js +1 -0
- package/assets/esri/core/workers/chunks/{944dfa9309da8f49a616.js → 6a3d66d7c92f90cc2a17.js} +1 -1
- package/assets/esri/core/workers/chunks/760a759f9697adde6dd4.js +1 -0
- package/assets/esri/core/workers/chunks/798d227205bd958de6a7.js +1 -0
- package/assets/esri/core/workers/chunks/{9d88b4ba8e511da64583.js → 98d68b145226e7527c84.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ad6595ad44c2d60c1ce.js → a79fad422d41019c8232.js} +1 -1
- package/assets/esri/core/workers/chunks/{10e474d664b20adcd917.js → db4661fd82dc61162115.js} +1 -1
- package/assets/esri/core/workers/chunks/{1d1e25bb61eeeee8ee94.js → df2ba5f9d57080fca183.js} +1 -1
- package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +5 -3
- package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +15 -11
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/ComponentShader.glsl.js +43 -43
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/config.js +1 -1
- package/form/elements/inputs/attachments/Input.d.ts +6 -6
- package/geometry/Mesh.d.ts +20 -21
- package/geometry/Polygon.d.ts +1 -8
- package/geometry/Polygon.js +1 -1
- package/geometry/geometryEngine.d.ts +19 -19
- package/geometry/support/MeshComponent.d.ts +3 -3
- package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +2 -2
- package/geometry/support/MeshLocalVertexSpace.d.ts +2 -2
- package/geometry/support/MeshMaterial.d.ts +8 -8
- package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
- package/geometry/support/MeshTexture.d.ts +3 -3
- package/geometry/support/MeshTextureTransform.d.ts +3 -3
- package/geometry/support/MeshTransform.d.ts +1 -1
- package/geometry/support/MeshVertexAttributes.d.ts +13 -5
- package/geometry/support/intersects.js +1 -1
- package/geometry/support/intersectsBase.js +1 -1
- package/geometry/support/meshUtils/centerAt.js +1 -1
- package/geometry/support/meshUtils/geographicUtils.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/geometry/support/meshUtils/types.d.ts +44 -52
- package/geometry/support/meshUtils.d.ts +6 -50
- package/geometry/support/meshUtils.js +1 -1
- package/interfaces.d.ts +5 -151
- package/kernel.js +1 -1
- package/layers/BaseDynamicLayer.d.ts +2 -2
- package/layers/BaseElevationLayer.d.ts +2 -2
- package/layers/BuildingSceneLayer.d.ts +2 -2
- package/layers/CSVLayer.d.ts +2 -2
- package/layers/CatalogLayer.d.ts +2 -2
- package/layers/DimensionLayer.d.ts +2 -2
- package/layers/ElevationLayer.d.ts +2 -2
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/GeoJSONLayer.d.ts +2 -2
- package/layers/GeoRSSLayer.d.ts +2 -2
- package/layers/GraphicsLayer.d.ts +2 -2
- package/layers/GroupLayer.d.ts +2 -2
- package/layers/ImageryLayer.d.ts +2 -2
- package/layers/ImageryTileLayer.d.ts +2 -2
- package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -2
- package/layers/IntegratedMeshLayer.d.ts +2 -2
- package/layers/KMLLayer.d.ts +2 -2
- package/layers/Layer.d.ts +9 -7
- package/layers/LineOfSightLayer.d.ts +3 -3
- package/layers/MapImageLayer.d.ts +2 -2
- package/layers/MapNotesLayer.d.ts +2 -2
- package/layers/MediaLayer.d.ts +2 -2
- package/layers/OGCFeatureLayer.d.ts +2 -2
- package/layers/OrientedImageryLayer.d.ts +2 -2
- package/layers/ParquetLayer.d.ts +2 -2
- package/layers/PointCloudLayer.d.ts +2 -2
- package/layers/RouteLayer.d.ts +2 -2
- package/layers/SceneLayer.d.ts +2 -2
- package/layers/SubtypeGroupLayer.d.ts +2 -2
- package/layers/TileLayer.d.ts +2 -2
- package/layers/UnknownLayer.d.ts +2 -2
- package/layers/UnsupportedLayer.d.ts +2 -2
- package/layers/VectorTileLayer.d.ts +2 -2
- package/layers/VideoLayer.d.ts +2 -2
- package/layers/ViewshedLayer.d.ts +2 -2
- package/layers/VoxelLayer.d.ts +2 -2
- package/layers/WCSLayer.d.ts +2 -2
- package/layers/WFSLayer.d.ts +2 -2
- package/layers/WMSLayer.d.ts +2 -2
- package/layers/WMTSLayer.d.ts +2 -2
- package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -2
- package/layers/catalog/CatalogFootprintLayer.d.ts +2 -2
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/raster/types.d.ts +8 -1
- package/layers/support/PixelBlock.d.ts +7 -7
- package/layers/support/RasterInfo.d.ts +2 -9
- package/layers/types.d.ts +77 -2
- package/networks/support/CircuitSection.d.ts +20 -2
- package/networks/support/CircuitSection.js +1 -1
- package/networks/support/Subcircuit.d.ts +12 -10
- package/networks/support/Subcircuit.js +1 -1
- package/networks/support/typeUtils.d.ts +2 -0
- package/networks/support/typeUtils.js +1 -1
- package/package.json +2 -2
- package/rest/support/AttributeBinsQuery.d.ts +7 -1
- package/rest/support/NormalizationBinParametersMixin.d.ts +29 -9
- package/support/revision.js +1 -1
- package/symbols/patterns/LinePattern3D.d.ts +3 -3
- package/symbols/patterns/Pattern3D.d.ts +3 -3
- package/unionTypes.d.ts +17 -17
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +6 -5
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +7 -6
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/types.d.ts +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +2 -2
- package/views/3d/analysis/DirectLineMeasurement/types.d.ts +1 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/types.d.ts +1 -0
- package/views/3d/analysis/types.d.ts +2 -0
- package/views/3d/constraints/Constraints.d.ts +2 -2
- package/views/3d/environment/ChapmanApproximation.glsl.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/layers/DimensionLayerView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
- package/views/3d/layers/ViewshedLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/support/LayerPerformanceInfo.d.ts +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +7 -7
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ViewingModeConfiguration.js +5 -0
- package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +2 -2
- package/views/BreakpointsOwner.d.ts +9 -10
- package/views/MapView.d.ts +18 -17
- package/views/SceneView.d.ts +30 -89
- package/views/SceneView.js +1 -1
- package/views/View2D.d.ts +0 -37
- package/views/View2D.js +1 -1
- package/views/ViewAnimation.d.ts +2 -3
- package/views/analysis/ElevationProfile/types.d.ts +7 -6
- package/views/analysis/types.d.ts +1 -0
- package/views/animation/types.d.ts +3 -1
- package/views/layers/DimensionLayerView.d.ts +97 -4
- package/views/layers/DimensionLayerView.js +1 -1
- package/views/layers/HighlightLayerViewMixin.d.ts +1 -59
- package/views/layers/HighlightLayerViewMixin.js +1 -1
- package/views/layers/ImageryLayerViewMixin.d.ts +1 -55
- package/views/layers/LineOfSightLayerView.d.ts +77 -4
- package/views/layers/LineOfSightLayerView.js +1 -1
- package/views/layers/ViewshedLayerView.d.ts +96 -5
- package/views/layers/ViewshedLayerView.js +1 -1
- package/views/navigation/Navigation.d.ts +1 -22
- package/views/navigation/Navigation.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/types.d.ts +75 -5
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +4 -4
- package/widgets/AreaMeasurement3D.d.ts +2 -2
- package/widgets/BasemapGallery.d.ts +1 -1
- package/widgets/BasemapToggle.d.ts +1 -1
- package/widgets/Bookmarks.d.ts +1 -1
- package/widgets/BuildingExplorer/BuildingExplorerViewModel.d.ts +2 -2
- package/widgets/BuildingExplorer/BuildingLevel.d.ts +2 -2
- package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.d.ts +2 -2
- package/widgets/BuildingExplorer/BuildingPhase.d.ts +2 -2
- package/widgets/BuildingExplorer.d.ts +3 -3
- package/widgets/Compass.d.ts +1 -1
- package/widgets/CoordinateConversion.d.ts +1 -1
- package/widgets/Daylight/DaylightViewModel.d.ts +3 -3
- package/widgets/Daylight/VisibleElements.d.ts +2 -2
- package/widgets/Daylight/types.d.ts +2 -2
- package/widgets/Daylight.d.ts +3 -3
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +4 -4
- package/widgets/DirectLineMeasurement3D.d.ts +2 -2
- package/widgets/DirectionalPad.d.ts +1 -1
- package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +3 -3
- package/widgets/ElevationProfile/ElevationProfileViewModel.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +2 -2
- package/widgets/ElevationProfile/types.d.ts +9 -9
- package/widgets/ElevationProfile.d.ts +2 -2
- package/widgets/Expand/ExpandViewModel.d.ts +1 -1
- package/widgets/Expand.d.ts +1 -1
- package/widgets/Feature.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
- package/widgets/Features.d.ts +1 -1
- package/widgets/Fullscreen/FullscreenViewModel.d.ts +1 -1
- package/widgets/Fullscreen.d.ts +1 -1
- package/widgets/Home.d.ts +1 -1
- package/widgets/LayerList.d.ts +12 -0
- package/widgets/Legend.d.ts +1 -1
- package/widgets/LineOfSight/LineOfSightTarget.d.ts +2 -2
- package/widgets/LineOfSight/LineOfSightViewModel.d.ts +2 -2
- package/widgets/LineOfSight.d.ts +2 -2
- package/widgets/Locate/LocateViewModel.d.ts +1 -1
- package/widgets/Locate.d.ts +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
- package/widgets/NavigationToggle.d.ts +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/Arrow.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationNode.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
- package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +5 -0
- package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
- package/widgets/OrientedImageryViewer/support/NonPanoramicMediaCollection.js +1 -1
- package/widgets/OrientedImageryViewer/support/resolveMediaProps.js +5 -0
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer.js +1 -1
- package/widgets/Print/CustomTemplate.d.ts +1 -1
- package/widgets/Print/PrintViewModel.d.ts +1 -1
- package/widgets/Print.d.ts +1 -1
- package/widgets/ScaleBar.d.ts +1 -1
- package/widgets/Search.d.ts +1 -1
- package/widgets/ShadowCast/DiscreteOptions.d.ts +2 -2
- package/widgets/ShadowCast/DurationOptions.d.ts +2 -2
- package/widgets/ShadowCast/ShadowCastViewModel.d.ts +3 -3
- package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +2 -2
- package/widgets/ShadowCast/ThresholdOptions.d.ts +2 -2
- package/widgets/ShadowCast/types.d.ts +2 -2
- package/widgets/ShadowCast.d.ts +1 -1
- package/widgets/Slice/SliceViewModel.d.ts +2 -2
- package/widgets/Slice.d.ts +2 -2
- package/widgets/Swipe.d.ts +1 -1
- package/widgets/TimeZoneLabel.d.ts +1 -1
- package/widgets/Track.d.ts +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/VideoPlayer.d.ts +1 -1
- package/widgets/VideoPlayer.js +1 -1
- package/widgets/Weather/VisibleElements.d.ts +2 -2
- package/widgets/Weather/WeatherViewModel.d.ts +2 -2
- package/widgets/Weather/types.d.ts +1 -1
- package/widgets/Weather.d.ts +2 -2
- package/widgets/Zoom.d.ts +1 -1
- package/widgets/support/GridControls.d.ts +1 -1
- package/assets/esri/core/workers/chunks/35961e71f69ae1d24b9e.js +0 -1
- package/assets/esri/core/workers/chunks/3cce8e894bf37c3e598e.js +0 -1
- package/assets/esri/core/workers/chunks/7ee68f67f9cc48a328f0.js +0 -1
- package/assets/esri/core/workers/chunks/a931515a2569713e743b.js +0 -1
- package/assets/esri/core/workers/chunks/bb4574a87ca21e719f0d.js +0 -1
- package/assets/esri/core/workers/chunks/c9f868f85d740ee32715.js +0 -1
- package/geometry.d.ts +0 -136
- package/geometry.js +0 -5
- package/pointCloudRenderers.d.ts +0 -112
- package/pointCloudRenderers.js +0 -5
- package/rasterRenderers.d.ts +0 -151
- package/rasterRenderers.js +0 -5
- package/renderers.d.ts +0 -166
- package/renderers.js +0 -5
- package/views/layers/DimensionLayerViewMixin.d.ts +0 -1
- package/views/layers/DimensionLayerViewMixin.js +0 -5
- package/views/layers/LineOfSightLayerViewMixin.d.ts +0 -1
- package/views/layers/LineOfSightLayerViewMixin.js +0 -5
- package/views/layers/ViewshedLayerViewMixin.d.ts +0 -98
- package/views/layers/ViewshedLayerViewMixin.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4649,7136],{159:(e,t,i)=>{i.d(t,{A:()=>l});var n,s=i(31635),r=i(69622),a=i(91429),o=i(99157);let l=n=class extends r.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new n;for(let t=this.steps.length-1;t>=0;t--){const i=this.steps[t];e.steps.push(i.getInverse())}return e}};(0,s.Cg)([(0,a.MZ)({type:[o.A],nonNullable:!0})],l.prototype,"steps",void 0),l=n=(0,s.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformation")],l)},4197:(e,t,i)=>{i.d(t,{Vj:()=>u,cj:()=>l,jh:()=>r,l5:()=>o,xm:()=>a});var n=i(34275),s=i(9093);function r(e){return e<=n.y9?new Array(e).fill(0):new Float64Array(e)}function a(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=n.y9?Array.from(e):new Float64Array(e)}function o(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}function l(e){return[...e]}function u(e){const t=(0,s.vt)();for(let i=0;i<16;++i)t[i]=e[i];return t}},5834:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(31635),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(41366),u=i(93223);function c(e,t,i){(0,s.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(o.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,n.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:c}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:c}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,u.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,n.Cg)([(0,r.$K)("esri.rest.support.AutoIntervalBinParameters")],d),d.from=(0,a.dp)(d)},8384:(e,t,i)=>{i.d(t,{G:()=>C});var n=i(4718),s=i(12359),r=i(90634),a=i(62577),o=i(21325),l=i(46329),u=i(52006),c=i(29441),d=i(51441),p=i(30524),f=i(87445),h=i(1873),m=i(43668);class y{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const n=e.outFields;if(n&&!n.includes("*")){this.outFields=n;let e=0;for(const t of n){const n=(0,c.Wq)(t),s=this.fieldsIndex.get(n),r=s?null:(0,c.j4)(n,i),a=s?s.name:(0,c.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:r})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach(e=>this.getAttributes(e)),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){if(i)return this.featureAdapter.getAttribute(e,i.name);const n=t;let s=null;return this._fieldDataCache.has(n)?s=this._fieldDataCache.get(n)?.clause:i||(s=(0,c.j4)(t,this.fieldsIndex),this._fieldDataCache.set(n,{alias:n,clause:s})),s?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const n=t.normalizationType,s=t.normalizationTotal,r=this.fieldsIndex.get(t.field),a=(0,p.zD)(r)||(0,p.Ah)(r),o=(0,p.OH)(r);return e.map(e=>{let r=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(r=`${(0,h.gJ)(r)}${t.fieldDelimiter}${(0,h.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(r=`${r}${t.fieldDelimiter}${(0,h.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof r&&i&&(a?r=r?new Date(r).getTime():null:o&&(r=r?(0,f.rb)(r):null)),n&&Number.isFinite(r)){const i="field"===n&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;r=(0,h.zS)(r,n,i,s)}return r})}async getExpressionValues(e,t,i,n,s){const{arcadeUtils:r}=await(0,m.l)(),a=r.hasGeometryOperations(t);a&&await r.enableGeometryOperations();const o=r.createFunction(t),l=r.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map(e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,d.pL)(n.geometryType,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},c=r.createExecContext(t,l,s);return r.executeFunction(o,c)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,c.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,c.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const n of t){const{alias:t,clause:s}=this._fieldDataCache.get(n);i[t]=s?s.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const n of t){const{alias:t}=this._fieldDataCache.get(n);i.push(e[t])}else for(const t in e)i.push(e[t]);const n=`${(t||["*"]).join(",")}=${i.join(",")}`;let s=this._returnDistinctMap.get(n)||0;return this._returnDistinctMap.set(n,++s),s>1?null:e}}var g=i(31464),x=i(58727);class v{constructor(e,t,i){this.objectId=e,this.target=t,this.distance=i}}class w extends v{constructor(e,t,i){super(e,t,i),this.type="vertex"}}class _ extends v{constructor(e,t,i,n,s,r=!1){super(e,t,i),this.start=n,this.end=s,this.draped=r,this.type="edge"}}var F=i(5834),S=i(59977),I=i(57231),R=i(11440),M=i(60909),T=i(98623),b=i(28097);const A="bin";class C{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new y(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:n}=this.query,s=t?.length;if(!s)return 1;const r=new Map,a=new Map,o=new Set;for(const s of n){const{statisticType:n}=s,l="exceedslimit"!==n?s.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const n of t){const t=this._getAttributeValues(e,n,this.items,r);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:n,items:s}=u[t],r=n.join(",");i&&!e.validateItems(s,i)||o.add(r)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,o.fn)(this.query.outSR)&&!(0,o.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,d.ag)({spatialReference:this.query.outSR,...(0,g.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,d.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const n=this.featureAdapter,s=B(this.hasZ,this.hasM),{point:r,mode:a}=e,o="number"==typeof e.distance?e.distance:e.distance.x,c="number"==typeof e.distance?e.distance:e.distance.y;function d(e,t){const i=(e-r.x)/o,n=(t-r.y)/c;return i*i+n*n}const p={candidates:[]},f="esriGeometryPolygon"===this.geometryType,h="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,m=this._getPointCreator(a,t,this.spatialReference,i),y=new O(null,0),g=new O(null,0),x={x:0,y:0,z:0};for(const e of this.items){const t=n.getObjectId(e),i=n.getGeometryWithCurves?.(e);if(null!=i){F(i,t);continue}const s=n.getGeometry(e);null==s||v(s,t)}return p.candidates.sort((e,t)=>e.distance-t.distance),p;function v(t,i){const{coords:n}=t,a=t.isPoint?q:t.lengths;if(y.coords=n,g.coords=n,e.returnEdge){let e=0;for(let t=0;t<a.length;t++){const n=a[t],o=e;for(let t=0;t<n;t++,e+=s){if(!f&&t===n-1)continue;if(y.coordsIndex=e,g.coordsIndex=t===n-1?o:e+s,!z(x,r,y,g))continue;const a=d(x.x,x.y);a<=1&&p.candidates.push(new _(i,m(x),Math.sqrt(a),m(y),m(g)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<a.length;t++){const n=a[t],r=e,o=g;o.coordsIndex=r;for(let t=0;t<n;t++,e+=s){if(y.coordsIndex=e,f&&t===n-1&&y.x===o.x&&y.y===o.y)continue;const s=d(y.x,y.y);s<=1&&p.candidates.push(new w(i,m(y),Math.sqrt(s)))}}}else if(h&&"ends"===e.vertexMode){let e=0;const t=[];for(let i=0;i<a.length;i++){t.push(e);const n=a[i];e+=n*s,n>1&&t.push(e-s)}for(const e of t){y.coordsIndex=e;const t=d(y.x,y.y);t<=1&&p.candidates.push(new w(i,m(y),Math.sqrt(t)))}}}function F(t,i){const{candidates:n}=p,s={x:0,y:0,z:0};if(e.returnEdge){const e=[r.x,r.y],a={x:0,y:0,z:0},o={x:0,y:0,z:0};for(const{segments:r}of t.parts)for(const{start:t,curve:c}of r){const r=(0,l.y)(t,c,e);if(null==r)continue;const p=d(...r.curvePoint);p>1||([a.x,a.y]=t,[s.x,s.y]=r.curvePoint,[o.x,o.y]=(0,u.yP)(c),n.push(new _(i,m(s),Math.sqrt(p),m(a),m(o))))}}function a(e){s.x=t.vertexXY[2*e],s.y=t.vertexXY[2*e+1];const r=d(s.x,s.y);r>1||(s.z=t.vertexZ?.[e]??0,n.push(new w(i,m(s),Math.sqrt(r))))}if("all"===e.vertexMode){const{vertexCount:e}=t;for(let t=0;t<e;++t)a(t);return}if("ends"===e.vertexMode)switch(t.type){case"point":a(0);break;case"polyline":for(let e=0;e<t.partCount;++e){const i=t.partOffsets[e],n=t.partOffsets[e+1];a(i),n!==i&&a(n)}}}}_getPointCreator(e,t,i,n){const s=null==n||(0,o.aI)(i,n)?e=>e:e=>(0,g.Cv)(e,i,n),{hasZ:r}=this;return"3d"===e?r&&t?({x:e,y:t,z:i})=>s({x:e,y:t,z:i}):({x:e,y:t})=>s({x:e,y:t,z:0}):({x:e,y:t})=>s({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,d=this.fieldsIndex.get(t),f=(0,p.vE)(d)||(0,p.zD)(d)||(0,p.Ah)(d),m=await this._getDataValues({field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,scale:l,timeZone:u},this.items),y=(0,h.Vb)({normalizationType:s,normalizationField:n,minValue:a,maxValue:o}),g={value:.5,fieldType:d?.type},x=(0,p.yM)(d)?(0,h.z9)({values:m,supportsNullCount:y,percentileParams:g,outStatisticTypes:c}):(0,h.G_)({values:m,minValue:a,maxValue:o,useSampleStdDev:!s,supportsNullCount:y,percentileParams:g,outStatisticTypes:c});return(0,h.oZ)(x,c,f)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:n,returnAllCodedValues:s,scale:r,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:a},this.items,!1),l=(0,h.b3)(o);return(0,h.lv)(l,n,s,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:d,timeZone:p}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,scale:d,timeZone:p},this.items),m=(0,h.Rw)(f,{field:t,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,h.jM)(m,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:d,timeZone:p}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,scale:d,timeZone:p},this.items);return(0,h.$y)(f,{field:t,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const n of t.slice().reverse()){const t=n.split(" "),s=t[0],r=this.fieldsIndex.get(s),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,h.FM)(r?.type,a,"case-sensitive");e.sort((e,t)=>{const n=i(e,s,r),a=i(t,s,r);return o(n,a)})}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:n,hasZ:s,objectIdField:r,spatialReference:o}=this,{outFields:l,outSR:u,quantizationParameters:c,resultRecordCount:p,resultOffset:f,returnZ:h,returnM:m}=e,y=null!=p&&t.length>(f||0)+p,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:n&&m,hasZ:s&&h,objectIdFieldName:r,spatialReference:(0,d.ag)(u||o),transform:c&&(0,a.VV)(c)||null}}_createFeatures(e,t){const i=new y(e,this.featureAdapter,this.fieldsIndex),{hasM:n,hasZ:s}=this,{orderByFields:r,quantizationParameters:o,returnGeometry:l,returnCentroid:u,maxAllowableOffset:c,resultOffset:p,resultRecordCount:f,returnZ:h=!1,returnM:m=!1}=e,g=s&&h,x=n&&m;let v=[],w=0;const _=[...t];if(this._sortFeatures(_,r,(e,t,n)=>i.getFieldValue(e,t,n)),this.geometryType&&(l||u)){const e=(0,a.VV)(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const n of _){const s=this.featureAdapter.getGeometry(n),r=this._addFeatureJSONMetadata(n,{attributes:i.getAttributes(n),geometry:(0,d.pL)(this.geometryType,s,c,e,g,x)});t&&s&&!r.geometry&&(r.centroid=(0,d.LQ)(this,this.featureAdapter.getCentroid(n,this),e)),v[w++]=r}else if(!l&&u)for(const t of _)v[w++]=this._addFeatureJSONMetadata(t,{attributes:i.getAttributes(t),centroid:(0,d.LQ)(this,this.featureAdapter.getCentroid(t,this),e)});else for(const t of _)v[w++]=this._addFeatureJSONMetadata(t,{attributes:i.getAttributes(t),centroid:(0,d.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,d.pL)(this.geometryType,this.featureAdapter.getGeometry(t),c,e,g,x)})}else for(const e of _){const t=i.getAttributes(e);t&&(v[w++]=this._addFeatureJSONMetadata(e,{attributes:t}))}const F=p||0;if(null!=f){const e=F+f;v=v.slice(F,Math.min(v.length,e))}return v}_addFeatureJSONMetadata(e,t){const i=this.featureAdapter.getMetadata?.(e);return void 0!==i&&(t.metadata=i),t}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,n=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=B(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce((e,t)=>{const n=i.getGeometry(t);return e+(null!=n&&n.coords.length||0)},0)/t>n}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const n=[],s=new Map,r=new Map,a=new Map,o=new Map,l=new y(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:f,resultRecordCount:h}=e,m=c?.length,g=!!m,x=g?c[0]:null,v=g&&!this.fieldsIndex.get(x);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:f}=e,h=e,y="exceedslimit"!==f?e.onStatisticField:void 0,w="percentile_disc"===f||"percentile_cont"===f,_="EnvelopeAggregate"===f||"CentroidAggregate"===f||"ConvexHullAggregate"===f,F=g&&1===m&&(y===x||v)&&"count"===f;if(g){if(!a.has(y)){const e=[];for(const i of c){const n=this._getAttributeValues(l,i,t,s);e.push(n)}a.set(y,this._calculateUniqueValues(e,t,!_&&l.returnDistinctValues))}const e=a.get(y);if(!e)continue;const i=Object.keys(e);for(const n of i){const{count:i,data:r,items:a,itemPositions:p}=e[n],f=r.join(",");if(!d||l.validateItems(a,d)){const e=o.get(f)||{attributes:{}};if(_){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(h,a);e.aggregateGeometries[i]=t}else{let n=null;if(F)n=i;else{const e=this._getAttributeValues(l,y,t,s),i=p.map(t=>e[t]);n=w&&"statisticParameters"in h?this._getPercentileValue(h,i):this._getStatisticValue(h,i,null,l.returnDistinctValues)}e.attributes[u]=n}let n=0;c.forEach((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++n]=r[i]),o.set(f,e)}}}else if(_){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:n}=await this._getAggregateGeometry(h,t);i.aggregateGeometries[n]=e}else{const e=this._getAttributeValues(l,y,t,s);i.attributes[u]=w&&"statisticParameters"in h?this._getPercentileValue(h,e):this._getStatisticValue(h,e,r,l.returnDistinctValues)}const S="min"!==f&&"max"!==f||!(0,p.yM)(this.fieldsIndex.get(y))&&!this._isAnyDateField(y)?null:this.fieldsIndex.get(y)?.type;n.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const w=g?Array.from(o.values()):[i];return this._sortFeatures(w,f,(e,t)=>e.attributes[t]),h&&(w.length=Math.min(h,w.length)),{fields:n,features:w}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,p.vE)(t)||(0,p.zD)(t)||(0,p.Ah)(t)||(0,p.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:n,union:a}=await i.e(1023).then(i.bind(i,81023)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:u,spatialReference:c,geometryType:p}=this,f=t.map(e=>(0,d.pL)(p,u.getGeometry(e))),h=n(c,f,!0)[0],m={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=h?(0,r.v)(h):(0,r.HA)(a(c,f));m.aggregateGeometries={...e,spatialReference:c},m.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=h?(0,s.l8)(h):(0,s.Z4)((0,r.HA)(a(c,f)));m.aggregateGeometries={x:e[0],y:e[1],spatialReference:c},m.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(m.aggregateGeometries=h,m.outStatisticFieldName=l||"convexHull");return m}_getStatisticValue(e,t,i,n){const{onStatisticField:s,statisticType:r}=e;let a=null;return a=i?.has(s)?i.get(s):(0,p.yM)(this.fieldsIndex.get(s))||this._isAnyDateField(s)?(0,h.z9)({values:t,returnDistinct:n}):(0,h.G_)({values:n?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(s,a),a["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:n,statisticType:s}=e,{value:r,orderBy:a}=n,o=this.fieldsIndex.get(i);return(0,h.qg)(t,{value:r,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===s})}_getAttributeValues(e,t,i,n){if(n.has(t))return n.get(t);const s=this.fieldsIndex.get(t),r=i.map(i=>e.getFieldValue(i,t,s));return n.set(t,r),r}_calculateUniqueValues(e,t,i){const n={},s=t.length;for(let r=0;r<s;r++){const s=t[r],a=[];for(const t of e)a.push(t[r]);const o=a.join(",");null==n[o]?n[o]={count:1,data:a,items:[s],itemPositions:[r]}:(i||n[o].count++,n[o].items.push(s),n[o].itemPositions.push(r))}return n}async _getDataValues(e,t,i=!0){const s=new y(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:r,scale:a,timeZone:o}=e;return r?s.getExpressionValues(t,r,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):s.getDataValues(t,(0,n.o8)(e),i)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const n=t.intervals,s=t.min??0,r=t.max??0,a=n.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=s&&o<=r){const e=(0,h.Ak)(n,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:n,valueType:s}=t,r=[],a=[{name:n??i,alias:n??i,type:s??"esriFieldTypeString"},{name:A,alias:A,type:"esriFieldTypeInteger"}],o=new y(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const c=this._getAttributeValues(o,i,u,l),d=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in d){const{items:s}=d[t],o=await this._createBinsResponse(e,s);if(r.push(...o.features.map(e=>({...e,attributes:{...e.attributes,[n??i]:t}}))),o.fields)for(const e of o.fields)a.some(t=>t.name===e.name)||a.push(e)}return{fields:a,features:r}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(F.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(S.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(R.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(M.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:n,normalizationField:s,numBins:r,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),d=(0,h.sU)(c,{field:n,normalizationField:s,normalizationType:a,normalizationTotal:o,numBins:r,minValue:(0,x.dO)(a?e.normalizationMinValue:l,!1),maxValue:(0,x.dO)(a?e.normalizationMaxValue:u,!1)}),p=this._calculateHistogramBins(c,d,i);return this._createFeaturesFromHistogramBins(p,t)}async _createDateBinsResponse(e,t,i){const{field:n,interval:s,start:r,end:a,snapToData:o,returnFullIntervalBin:l,offset:u,firstDayOfWeek:c}=e,d=s.unit,f=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},i),h=(0,p.OH)(this.fieldsIndex.get(n)),m=I.g.toJSON(d),y=f.filter(Boolean).sort((e,t)=>e-t),g=null!=r?(0,x.dO)(r,h):y[0],v=null!=a?(0,x.dO)(a,h):y[y.length-1],w=[];if(null!=g&&null!=v){const e={zone:t.outTimeReference?.ianaTimeZone??T.n$},i=u?.unit?I.g.toJSON(u.unit):"milliseconds",n={[i]:u?.value||0},r=b.c9.fromMillis(g,e).minus(n),a=b.c9.fromMillis(v,e).minus(n),d="number"==typeof c&&c>=1&&c<=7?c:7,p=(e,t)=>{const i=(e.weekday-t+7)%7;return e.minus({days:i}).startOf("day")};if("last"===o){let e="week"===m?((e,t)=>p(e,t).plus({days:7}))(a,d):a;for(;e>r;){const t=e.minus({[m]:s.value});if(t<r){w.unshift([l?t.plus(n).toMillis():r.plus(n).toMillis(),e.plus(n).toMillis()]);break}w.unshift([t.plus(n).toMillis(),e.plus(n).toMillis()]),e=t}}else{let e="first"===o?r:"week"===m?p(r,d):r.startOf(m);for(;e<=a;){const t=e.plus({[m]:s.value});if(t>a){w.push([e.plus(n).toMillis(),l?t.plus(n).toMillis():a.plus(n).toMillis()]);break}w.push([e.plus(n).toMillis(),t.plus(n).toMillis()]),e=t}}}const _=this._calculateHistogramBins(f,{intervals:w,min:g,max:v},i);return this._createFeaturesFromHistogramBins(_,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:n}=e,s=await this._getDataValues({field:n,timeZone:t.outTimeReference?.ianaTimeZone},i),r=(0,p.OH)(this.fieldsIndex.get(n)),a=e.boundaries.map(e=>(0,x.dO)(e,r)).sort((e,t)=>e-t),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=this._calculateHistogramBins(s,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:n,interval:s,normalizationType:r,start:a,end:o}=e,l=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:r,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),u=(0,p.OH)(this.fieldsIndex.get(n)),c=(0,h.sU)(l,{field:n,classificationMethod:"defined-interval",definedInterval:s,minValue:(0,x.dO)(r?e.normalizationMinValue:a,u),maxValue:(0,x.dO)(r?e.normalizationMaxValue:o,u)},!0),d=this._calculateHistogramBins(l,c,i);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:n}=t,s=n||"lowerBoundary",r=i||"upperBoundary",a=[],o=[{name:s,alias:s,type:"esriFieldTypeDouble"},{name:r,alias:r,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:A,alias:A,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const d="dateBin"===t.bin.type,p=t.outTimeReference?.ianaTimeZone;for(const i of e){const{minValue:e,maxValue:n,items:f}=i,h={attributes:{}};let m;if(h.attributes[s]=d&&p&&null!=e?b.c9.fromMillis(e,{zone:p}).toISO():e,t.bin.hideUpperBound||(h.attributes[r]=d&&p&&null!=n?b.c9.fromMillis(n,{zone:p}).toISO():n),l?(m=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},f),h.attributes[A]=++c,"flat"===t.bin.jsonStyle?a.push(...m.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...h.attributes}:{...t,...h.attributes}}))):(h.stackedAttributes=m.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),a.push(h))):(t.bin?.splitBy&&(h.attributes[A]=++c),m=await this._createStatisticsQueryResponse(t,f,h),a.push(h)),m.fields)for(const e of m.fields)o.some(t=>t.name===e.name)||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function z(e,t,i,n){const s=n.x-i.x,r=n.y-i.y,a=t.x-i.x,o=t.y-i.y,l=s*s+r*r;if(0===l)return!1;const u=a*s+o*r,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+s*c,e.y=i.y+r*c,!0}function B(e,t){return e?t?4:3:t?3:2}class O{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const q=[1]},9093:(e,t,i)=>{function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}i.d(t,{o8:()=>s,vt:()=>n,zK:()=>r});const r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:s,create:n,fromValues:function(e,t,i,n,s,r,a,o,l,u,c,d,p,f,h,m){return[e,t,i,n,s,r,a,o,l,u,c,d,p,f,h,m]}},Symbol.toStringTag,{value:"Module"}))},9762:(e,t,i)=>{i.r(t),i.d(t,{projectBuffer:()=>s});var n=i(37539);function s(e,t,i,s,r,a,o=Math.floor(e.length/3)){const l=(0,n.jd)(t,r);if(null==l)return!1;if(l===n.pO){if(e===s&&i===a)return!0;const t=i+3*o;for(let n=i,r=a;n<t;n++,r++)s[r]=e[n]??0;return!0}const u=i+3*o;for(let t=i,n=a;t<u;t+=3,n+=3)l(e,t,s,n);return!0}},11006:(e,t,i)=>{function n(e,t,i,n,r){s(e,t,i||0,n||e.length-1,r||a)}function s(e,t,i,n,a){for(;n>i;){if(n-i>600){var o=n-i+1,l=t-i+1,u=Math.log(o),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);s(e,t,Math.max(i,Math.floor(t-l*c/o+d)),Math.min(n,Math.floor(t+(o-l)*c/o+d)),a)}var p=e[t],f=i,h=n;for(r(e,i,t),a(e[n],p)>0&&r(e,i,n);f<h;){for(r(e,f,h),f++,h--;a(e[f],p)<0;)f++;for(;a(e[h],p)>0;)h--}0===a(e[i],p)?r(e,i,h):r(e,++h,n),h<=t&&(i=h+1),t<=h&&(n=h-1)}}function r(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function a(e,t){return e<t?-1:e>t?1:0}i.d(t,{q:()=>n})},11440:(e,t,i)=>{i.d(t,{A:()=>u});var n=i(31635),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(93223);let u=class extends o.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,s.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],u.prototype,"boundaries",void 0),(0,n.Cg)([(0,l.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],u.prototype,"type",void 0),u=(0,n.Cg)([(0,r.$K)("esri.rest.support.FixedBoundariesBinParameters")],u),u.from=(0,a.dp)(u)},17136:(e,t,i)=>{i.d(t,{Y_:()=>b,O7:()=>M,el:()=>R});var n=i(92602),s=i(69052),r=i(49186),a=i(53966),o=i(39829),l=i(82799),u=i(16930),c=i(80754),d=i(21325),p=i(28735),f=i(11254),h=i(60408),m=i(65864),y=i(2272),g=i(84952),x=i(92300);const v=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function w(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function F(e,t,i){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw v().error(e),new r.A("internal:geometry",e)}const i=(0,c.r8)(e),n=[];for(const e of i){const i=[];n.push(i),i.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const s=e[n][0],r=e[n][1],a=e[n+1][0],o=e[n+1][1],l=Math.sqrt((a-s)*(a-s)+(o-r)*(o-r)),u=(o-r)/l,c=(a-s)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const n=e*t,a=c*n+s,o=u*n+r;i.push([a,o])}const e=(l+Math.floor(d-1)*t)/2,n=c*e+s,a=u*e+r;i.push([n,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:n,spatialReference:e.spatialReference}):new l.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return i&&(e=(0,c.kS)(e,i)),e}function S(e,t,i){if(Array.isArray(e)){const n=e[0];if(n>t){const i=(0,c.kd)(n,t);e[0]=n+i*(-2*t)}else if(n<i){const t=(0,c.kd)(n,i);e[0]=n+t*(-2*i)}}else{const n=e.x;if(n>t){const i=(0,c.kd)(n,t);e=e.clone().offset(i*(-2*t),0)}else if(n<i){const t=(0,c.kd)(n,i);e=e.clone().offset(t*(-2*i),0)}}return e}function I(e,t){let i=-1;for(let n=0;n<t.cutIndexes.length;n++){const s=t.cutIndexes[n],r=t.geometries[n],a=(0,c.r8)(r);for(let e=0;e<a.length;e++){const t=a[e];t.some(i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const n=t[e][0];i=n>i?n:i}i=Number(i.toFixed(9));const n=-360*(0,c.kd)(i,180);for(let i=0;i<t.length;i++){const t=r.getPoint(e,i);r.setPoint(e,i,t.clone().offset(n,0))}return!0}})}if(s===i){if(w(e))for(const t of(0,c.r8)(r))e[s]=e[s].addRing(t);else if(_(e))for(const t of(0,c.r8)(r))e[s]=e[s].addPath(t)}else i=s,e[s]=r}return e}async function R(e,t,i){if(!Array.isArray(e))return R([e],t);t&&"string"!=typeof t&&v().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let r,a,u,w,_,M,T,b,A=0;const C=[],z=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,a=(0,d.Vp)(r),u=r.isWebMercator,M=u?102100:4326,w=c.j7[M].maxX,_=c.j7[M].minX,T=c.j7[M].plus180Line,b=c.j7[M].minus180Line),a)if("mesh"===t.type)z.push(t);else if("point"===t.type)z.push(S(t.clone(),w,_));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>S(e,w,_)),z.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,a);z.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,i=(0,c.kd)(e.xmin,_)*(2*w);let n=0===i?t.clone():(0,c.kS)(t.clone(),i);e.offset(i,0);let{xmin:s,xmax:r}=e;s=Number(s.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(T)&&r!==w?(A=r>A?r:A,n=F(n,u),C.push(n),z.push("cut")):e.intersects(b)&&s!==_?(A=r*(2*w)>A?r*(2*w):A,n=F(n,u,360),C.push(n),z.push("cut")):z.push(n)}else z.push(t.clone());else z.push(t);else z.push(t);let B=(0,c.kd)(A,w),O=-90;const q=B,P=new l.A;for(;B>0;){const e=360*B-180;P.addPath([[e,O],[e,-1*O]]),O*=-1,B--}if(C.length>0&&q>0){const t=I(C,await async function(e,t,i,n){const s=(0,y.Dl)(e),r=t[0].spatialReference,a={...n,responseType:"json",query:{...s.query,f:"json",sr:(0,d.YX)(r),target:JSON.stringify({geometryType:(0,h.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,f.A)(s.path+"/cut",a),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,m.rS)(e);return t.spatialReference=r,t})}}(s,C,P,i)),n=[],r=[];for(let i=0;i<z.length;i++){const s=z[i];if("cut"!==s)r.push(s);else{const s=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&s.rings.length>=a.rings.length?(n.push(s),r.push("simplify")):r.push(u?(0,p.Gh)(s):s)}}if(!n.length)return r;const a=await async function(e,t,i){const n="string"==typeof e?(0,g.An)(e):e,s=t[0].spatialReference,r=(0,h.$B)(t[0]),a={...i,query:{...n.query,f:"json",sr:(0,d.YX)(s),geometries:JSON.stringify((0,x.X)(t))}},{data:o}=await(0,f.A)(n.path+"/simplify",a);return(0,x.V)(o.geometries,r,s)}(s,n,i),o=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?o.push(t):o.push(u?(0,p.Gh)(a.shift()):a.shift())}return o}const G=[];for(let e=0;e<z.length;e++){const t=z[e];if("cut"!==t)G.push(t);else{const e=C.shift();G.push(!0===u?(0,p.Gh)(e):e)}}return G}function M(e,t,i){const n=(0,d.Vp)(i);if(null==n)return e;const[s,r]=n.valid,a=2*r;let o=0,l=0;t>r?o=Math.ceil(Math.abs(t-r)/a):t<s&&(o=-Math.ceil(Math.abs(t-s)/a)),e>r?l=Math.ceil(Math.abs(e-r)/a):e<s&&(l=-Math.ceil(Math.abs(e-s)/a));let u=e+(o-l)*a;const c=u-t;return c>r?u-=a:c<s&&(u+=a),u}function T(e){const t=(0,d.Vp)(e);if(null==t)return null;const[i,n]=t.valid;return new s.hr(i,n)}const b=T(u.A.WGS84);T(u.A.WebMercator)},29441:(e,t,i)=>{i.d(t,{MG:()=>x,SN:()=>f,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>h,j4:()=>m,vl:()=>u});var n=i(49186),s=i(44123),r=i(98453);const a=new s.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),d=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function p(e,t,i={}){const s=m(t,e);if(!s){const i=a.getError(t,e);throw new n.A(o,"invalid SQL expression",{expression:t,error:i})}const r=i.expressionName||"expression";if(i.validateStandardized&&!s.isStandardized)throw new n.A(o,`${r} is not standard`,{expression:t});if(i.validateAggregate&&!s.isAggregate)throw new n.A(o,`${r} does not contain a valid aggregate function`,{expression:t});return s.fieldNames}function f(e,t,i,n){if(!i)return!0;const s="where clause";return x(e,t,p(e,i,{validateStandardized:!0,expressionName:s}),{expressionName:s,query:n}),!0}function h(e,t,i,s,r){if(!i)return!0;const a="having clause",l=p(e,i,{validateAggregate:!0,expressionName:a});x(e,t,l,{expressionName:a,query:r});const u=m(i,e),c=u?.getExpressions().every(t=>{const{aggregateType:i,field:n}=t,r=e.get(n)?.name;return s.some(t=>{const{onStatisticField:n,statisticType:s}=t,a=e.get(n)?.name;return a===r&&s.toLowerCase().trim()===i})});if(!c)throw new n.A(o,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function m(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function x(e,t,i,s={}){const r=new Map;if(function(e,t,i,n,s){const r=s.includes("*")?[...i,...s.filter(e=>"*"!==e)]:s;for(const s of r)if(t.get(s))v(e,t,i,n,s);else try{const r=p(t,y(s),{validateStandardized:!0});for(const s of r)v(e,t,i,n,s)}catch(t){e.set(s,{type:"expression-error",expression:s,error:t})}}(r,e,t,s.allowedFieldTypes??d,i),r.size){const e=s.expressionName??"expression";throw new n.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(r.values()),query:s.query})}}function v(e,t,i,n,s){const a=t.get(s);a?i.has(a.name)?"all"!==n&&!1===n?.has(a.type)&&e.set(s,{type:"invalid-type",fieldName:a.name,fieldType:r.m.fromJSON(a.type),allowedFieldTypes:Array.from(n,e=>r.m.fromJSON(e))}):e.set(s,{type:"missing-field",fieldName:a.name}):e.set(s,{type:"invalid-field",fieldName:s})}},31464:(e,t,i)=>{i.d(t,{Cv:()=>m,Nk:()=>p,lK:()=>g});var n=i(4576),s=i(74887),r=i(91218),a=i(21325),o=i(28735);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,l),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,l),[i.xmax,i.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:c(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:c(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function c(e,t){const i=[];for(const n of e)i.push(d(n,t));return i}function d(e,t){const i=[];for(const n of e){const e=t(n[0],n[1],[0,0]);i.push(e),n.length>2&&e.push(n[2]),n.length>3&&e.push(n[3])}return i}async function p(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(n.Ru):[e];await(0,r.initializeProjection)(i.map(e=>({source:e,dest:t})))}const f=u.bind(null,o.je),h=u.bind(null,o.tD);function m(e,t,i,n){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,a.fn)(t)||!(0,a.fn)(i)||(0,a.aI)(t,i))return e;if((0,o.y7)(t,i)){const t=(0,a.K8)(i)?f(e):h(e);return t.spatialReference=i,t}return(0,r.projectMany)([e],t,i,n)[0]}const y=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,n){if(!e?.length||!t||!i||(0,a.aI)(t,i))return e;const r={geometries:e,inSpatialReference:t,outSpatialReference:i,options:n,resolve:(0,s.Tw)()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:n,resolve:s,options:l}=e;(0,o.y7)(i,n)&&null==l?.extendedParams?(0,a.K8)(n)?s(t.map(f)):s(t.map(h)):s((0,r.projectMany)(t,i,n,l)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function g(e,t,i,n){return y.push(e,t,i,n)}},37539:(e,t,i)=>{i.d(t,{pO:()=>m,jd:()=>p,Tp:()=>f,w5:()=>d});var n=i(34727),s=i(86211),r=i(73941),a=i(79258);Math.PI;const o=a.$O.radius,l=a.$O.eccentricitySquared,u={a1:o*l,a2:o*l*o*l,a3:o*l*l/2,a4:o*l*o*l*2.5,a5:o*l+o*l*l/2,a6:1-l};a.$O.radius,a.$O.flattening,a.Sw.radius,a.Sw.flattening,a.sH.radius,a.sH.flattening,a.sH.radius;var c=i(21325);const d={2:{5:m,7:null,9:null,10:m,1:S,6:null,8:null,0:null,3:g,11:x,2:m,4:b},5:{5:m,7:null,9:null,10:m,1:S,6:null,8:null,0:null,3:g,11:x,2:m,4:b},7:{5:null,7:m,9:null,10:m,1:null,6:F,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:m,10:m,1:null,6:null,8:_,0:null,3:null,11:null,2:null,4:null},3:{5:y,7:null,9:null,10:y,1:function(e,t,i,n){const s=e[t]/q,r=O-2*Math.atan(Math.exp(-e[t+1]/q)),a=q+(e[t+2]??0),o=Math.cos(r)*a;i[n]=Math.cos(s)*o,i[n+1]=Math.sin(s)*o,i[n+2]=Math.sin(r)*a},6:null,8:null,0:null,3:m,11:function(e,t,i,n){y(e,t,i,n),x(i,n,i,n)},2:y,4:function(e,t,i,n){y(e,t,i,n),b(i,n,i,n)}},4:{5:A,7:null,9:null,10:A,1:function(e,t,i,n){A(e,t,i,n),S(i,n,i,n)},6:null,8:null,0:null,3:function(e,t,i,n){A(e,t,i,n),g(i,n,i,n)},11:function(e,t,i,n){A(e,t,i,n),x(i,n,i,n)},2:A,4:m},1:{5:T,7:null,9:null,10:T,1:m,6:null,8:null,0:null,3:function(e,t,i,n){T(e,t,i,n),g(i,n,i,n)},11:function(e,t,i,n){T(e,t,i,n),x(i,n,i,n)},2:T,4:function(e,t,i,n){T(e,t,i,n),b(i,n,i,n)}},6:{5:null,7:M,9:null,10:M,1:null,6:m,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:R,10:R,1:null,6:null,8:m,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:m,3:null,11:null,2:null,4:null},10:{5:m,7:m,9:m,10:m,1:S,6:F,8:_,0:null,3:g,11:x,2:m,4:b},11:{5:v,7:null,9:null,10:v,1:function(e,t,i,n){v(e,t,i,n),S(i,n,i,n)},6:null,8:null,0:null,3:function(e,t,i,n){v(e,t,i,n),g(i,n,i,n)},11:m,2:v,4:function(e,t,i,n){v(e,t,i,n),b(i,n,i,n)}}};function p(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(C.source.spatialReference===e&&C.dest.spatialReference===t)return C;const i=h(e,C.source),n=h(t,C.dest);return 0===i&&0===n?(0,c.aI)(e,t)?C.projector=m:C.projector=null:C.projector=d[i][n],C}function h(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,s.GA)(e,1)),(0,r.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===r.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===r.FY.wkt?t.spatialReferenceId=6:e.wkt===r.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function m(e,t,i,n){e!==i&&(i[n++]=e[t++],i[n++]=e[t++],i[n]=e[t]??0)}function y(e,t,i,n){i[n]=B*(e[t]/q),i[n+1]=B*(O-2*Math.atan(Math.exp(-e[t+1]/q))),i[n+2]=e[t+2]??0}function g(e,t,i,s){!function(e,t,i,s,r){const a=.4999999*Math.PI,o=(0,n.qE)(z*e[t+1],-a,a),l=Math.sin(o);i[s++]=z*e[t]*r.radius,i[s++]=r.halfSemiMajorAxis*Math.log((1+l)/(1-l)),i[s]=e[t+2]??0}(e,t,i,s,a.$O)}function x(e,t,i,n){i[n]=e[t]*P,i[n+1]=e[t+1]*P,i[n+2]=e[t+2]??0}function v(e,t,i,n){i[n]=e[t]*G,i[n+1]=e[t+1]*G,i[n+2]=e[t+2]??0}function w(e,t,i,n,s){const r=s+(e[t+2]??0),a=z*e[t],o=z*e[t+1],l=Math.cos(o)*r;i[n]=Math.cos(a)*l,i[n+1]=Math.sin(a)*l,i[n+2]=Math.sin(o)*r}function _(e,t,i,n){w(e,t,i,n,a.Sw.radius)}function F(e,t,i,n){w(e,t,i,n,a.sH.radius)}function S(e,t,i,n){w(e,t,i,n,a.$O.radius)}function I(e,t,i,s,r){const a=e[t],o=e[t+1],l=e[t+2]??0,u=Math.sqrt(a*a+o*o+l*l),c=(0,n.YN)(l/(0===u?1:u)),d=Math.atan2(o,a);i[s++]=B*d,i[s++]=B*c,i[s]=u-r}function R(e,t,i,n){I(e,t,i,n,a.Sw.radius)}function M(e,t,i,n){I(e,t,i,n,a.sH.radius)}function T(e,t,i,n){I(e,t,i,n,a.$O.radius)}function b(e,t,i,n){!function(e,t,i,n,s){const r=z*e[t],a=z*e[t+1],o=e[t+2]??0,l=Math.sin(a),u=Math.cos(a),c=s.radius/Math.sqrt(1-s.eccentricitySquared*l*l);i[n++]=(c+o)*u*Math.cos(r),i[n++]=(c+o)*u*Math.sin(r),i[n++]=(c*(1-s.eccentricitySquared)+o)*l}(e,t,i,n,a.$O)}function A(e,t,i,n){const s=u,r=e[t],o=e[t+1],l=e[t+2]??0;let c,d,p,f,h,m,y,g,x,v,w,_,F,S,I,R,M,T,b,A,C;c=Math.abs(l),d=r*r+o*o,p=Math.sqrt(d),f=d+l*l,h=Math.sqrt(f),A=Math.atan2(o,r),m=l*l/f,y=d/f,S=s.a2/h,I=s.a3-s.a4/h,y>.3?(g=c/h*(1+y*(s.a1+S+m*I)/h),b=Math.asin(g),v=g*g,x=Math.sqrt(1-v)):(x=p/h*(1-m*(s.a5-S-y*I)/h),b=Math.acos(x),v=1-x*x,g=Math.sqrt(v)),w=1-a.$O.eccentricitySquared*v,_=a.$O.radius/Math.sqrt(w),F=s.a6*_,S=p-_*x,I=c-F*g,M=x*S+g*I,R=x*I-g*S,T=R/(F/w+M),b+=T,C=M+R*T/2,l<0&&(b=-b),i[n++]=B*A,i[n++]=B*b,i[n]=C}const C={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:m},z=(0,n.kU)(1),B=(0,n.KJ)(1),O=.5*Math.PI,q=a.$O.radius,P=q*Math.PI/180,G=180/(q*Math.PI)},41266:(e,t,i)=>{i.d(t,{A:()=>m});var n=i(31635),s=i(69540),r=i(66552),a=i(25482),o=i(91429),l=i(56507),u=i(93223);const c=new r.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends((0,s.OU)(a.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,n.Cg)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,n.Cg)([(0,u.e)(c)],d.prototype,"valueType",void 0),d=(0,n.Cg)([(0,o.$K)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,l.dp)(d);const f=new r.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),h=new r.J({naturalLog:"natural-log",squareRoot:"square-root"});let m=class extends((0,s.OU)(a.o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],m.prototype,"expression",void 0),(0,n.Cg)([(0,u.e)(f,{name:"onExpression.valueType"})],m.prototype,"expressionValueType",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],m.prototype,"field",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],m.prototype,"firstDayOfWeek",void 0),(0,n.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hideUpperBound",void 0),(0,n.Cg)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],m.prototype,"splitBy",void 0),(0,n.Cg)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],m.prototype,"stackBy",void 0),(0,n.Cg)([(0,u.e)(h)],m.prototype,"transformation",void 0),m=(0,n.Cg)([(0,o.$K)("esri.rest.support.BinParametersBase")],m)},41366:(e,t,i)=>{i.d(t,{K:()=>d,Q:()=>l});var n=i(31635),s=i(66552),r=i(53966),a=i(91429),o=i(93223);const l=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",d=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&c||i&&u||null,t&&i&&r.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,n.Cg)([(0,o.e)(l,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,n.Cg)([(0,a.$K)("esri.rest.support.NormalizationBinParametersMixin")],i),i}},44123:(e,t,i)=>{i.d(t,{WhereClauseCache:()=>r});var n=i(66344),s=i(88368);class r{constructor(e,t){this._cache=new n.q(e),this._invalidCache=new n.q(t)}get(e,t){const i=`${t?.uid}:${e}`,n=this._cache.get(i);if(n)return n;if(null!=this._invalidCache.get(i))return null;try{const n=s.A.create(e,{fieldsIndex:t});return this._cache.put(i,n),n}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},44794:(e,t,i)=>{i.d(t,{v:()=>o});var n=i(4718),s=i(62788),r=i(95488);class a{constructor(e,t){this._observable=new r.I,this._value=e,this._equalityFunction=t}get value(){return(0,s.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=n.gh){return new a(e,t)}},46329:(e,t,i)=>{i.d(t,{y:()=>d});var n=i(49186),s=i(4305),r=i(513),a=i(50954),o=i(52006),l=i(49663),u=i(46068),c=i(59803);function d(e,t,i){if((0,o.Xq)(t))return(0,c.T)(e,t,i);if((0,o.n1)(t)){const r=(0,s.m_)(e,t,i)[0];if(null==r)throw new n.A("closestPointOnCurve:unexpected-error","Failed to find close point on bezier curve");return r}if((0,o.aO)(t)){const n=(0,a.pM)(e,t);return(0,r.fM)(n,i)}if((0,o.DA)(t)){const n=(0,l.i)(e,t);return(0,r.fM)(n,i)}const d=(0,u.SW)(e,t);return(0,u.pb)(d,i)}},51441:(e,t,i)=>{i.d(t,{LQ:()=>s,ag:()=>a,pL:()=>r});var n=i(90708);function s(e,t,i,s=e.hasZ,r=e.hasM){if(null==t)return null;const a=e.hasZ&&s,o=e.hasM&&r;if(i){const e=(0,n.Nl)(t,"esriGeometryPoint",i,s,r);return(0,n.DF)(e,a,o)}return(0,n.DF)(t,a,o)}function r(e,t,i,s,r,a){if(null==t)return null;const o="coords"in t?t:t.geometry;if(null==o)return null;const{hasZ:l,hasM:u}=o,c=l&&(r??=l),d=u&&(a??=u);if(i){let t=(0,n.kz)(o,e,i,r,a);return s&&(t=(0,n.Nl)(t,e,s)),(0,n.zv)(t,e,c,d)}if(s){const t=(0,n.Nl)(o,e,s,r,a);return(0,n.zv)(t,e,c,d)}return(0,n.zv)(o,e,c,d)}function a(e){return e&&o in e?JSON.parse(JSON.stringify(e,l)):e}const o="_geVersion",l=(e,t)=>e===o?void 0:t},54339:(e,t,i)=>{function n(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const i=[];for(const n of t.fieldNames)i.push(e.attributes[n]??null);return JSON.stringify(i)}}}function s(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>n,r:()=>s})},56390:(e,t,i)=>{i.d(t,{do:()=>L,Wc:()=>U});var n=i(4576),s=i(21818),r=i(49186),a=(i(44208),i(4718)),o=i(97768),l=i(74887),u=i(86211),c=i(12195),d=i(91218),p=i(70328),f=i(19419),h=i(537),m=i(60408),y=i(65864),g=i(17136),x=i(21325),v=i(90708),w=i(29441),_=i(51441),F=i(31464);class S{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[i,n]of this._storage){if(!(n.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new R(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let I=0;class R{constructor(e){this.items=e,this.time=performance.now(),this.id=I++}}var M=i(99352),T=i(8384),b=i(58727),A=i(62660),C=i(43668);const z="unsupported-query";async function B(e,{fieldsIndex:t,geometryType:i,spatialReference:n,availableFields:s}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.A(z,"Unsupported query options",{query:e});return O(t,s,e),function(e,t,i){const{outStatistics:n,groupByFieldsForStatistics:s,having:a}=i,o=s?.length,l=n?.length;if(a){if(!o||!l)throw new r.A(z,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,w.eD)(e,t,a,n,i)}if(l){if(null==(u=n)||!u.every(e=>"exceedslimit"!==e.statisticType))return;const a=n.map(e=>e.onStatisticField).filter(Boolean);(0,w.MG)(e,t,a,{expressionName:"onStatisticFields",query:i}),o&&(0,w.MG)(e,t,s,{expressionName:"groupByFieldsForStatistics",query:i});for(const s of n){const{onStatisticField:n,statisticType:a}=s;if("percentile_disc"!==a&&"percentile_cont"!==a||!("statisticParameters"in s))e.get(n)&&"count"!==a&&"min"!==a&&"max"!==a&&(0,w.MG)(e,t,[n],{expressionName:`outStatistics with '${a}' statistic type`,allowedFieldTypes:q,query:i});else{const{statisticParameters:e}=s;if(!e)throw new r.A(z,"statisticParameters should be set for percentile type",{definition:s,query:i})}}}var u}(t,s,e),Promise.all([(0,A.c0)(e,i,n),(0,F.Nk)(n,e.outSR)]).then(()=>e)}function O(e,t,i){const{returnDistinctValues:n,outStatistics:s}=i,a=s?s.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){const n=" asc",s=" desc",r=i.orderByFields.map(e=>{const t=e.toLowerCase();return t.includes(n)?t.split(n)[0]:t.includes(s)?t.split(s)[0]:e}).filter(e=>!a.includes(e));(0,w.MG)(e,t,r,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,w.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(n)throw new r.A(z,"outFields should be specified for returnDistinctValues",{query:i});(0,w.SN)(e,t,i.where,i)}const q=new Set([...w.vl,...w.VW]);async function P(e,t,i,n){let s=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,C.l)();s=e.extractFieldNames(i.valueExpression)}if(i.field&&s.push(i.field),i.field2&&s.push(i.field2),i.field3&&s.push(i.field3),i.normalizationField&&s.push(i.normalizationField),!s.length&&!i.valueExpression)throw new r.A(z,"field or valueExpression is required",{params:i});(0,w.MG)(e,t,s,{expressionName:"statistics",query:n})}var G=i(86420),N=i(95466),E=(i(71511),i(53966),i(36708),i(44794),i(78659)),j=i(31635),D=i(69622),V=i(91429);let Q=class extends D.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,j.Cg)([(0,V.MZ)()],Q.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,j.Cg)([(0,V.MZ)()],Q.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),Q=(0,j.Cg)([(0,V.$K)("esri.views.support.debugFlags")],Q),new Q,Symbol("Yield");new Map([["immediate",0],["schedule",4],["slide",0],["stream loader",0],["elevation query",0],["terrain",1],["surface geometry updates",1],["LoD renderer",2],["Graphics3D",2],["I3S",2],["point cloud",2],["feature fetcher",2],["stream controller",2],["clouds generator",2],["overlay",4],["overlay renderer",4],["stage",4],["graphics deconflictor",4],["graphics filter visibility",4],["graphics scale visibility",4],["graphics frustum visibility",4],["POI frequent",6],["POI infrequent",30],["labeler",8],["feature query",8],["feature tile tree",16],["fast feature tile tree",0],["elevation alignment",12],["elevation alignment scene",14],["text texture atlas",12],["texture unload",12],["line of sight tool",16],["interactive line of sight tool",0],["volume measurement",4],["snapping",0],["shadow accumulator",30],["flow generator",12],["mapview fetch queue",0],["mapview layerview update",2],["mapview vector tile parsing queue",0]]),(0,E.l5)(6.5),(0,E.l5)(1),(0,E.l5)(30),(0,E.l5)(1e3/30),(0,E.l5)(100);const k=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};k.enabled=!1;const Z=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(k))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,l.G4)(t)){const e=(0,l.NK)();if(i)return i(e);throw e}const n=e(k);for(;;){const e=n.next(k),s=(0,l.$X)(e)?await e:e;if((0,l.G4)(t)){const e=(0,l.NK)();if(i){const t=i(e),s=n.return(null);return(0,l.$X)(s)&&await(0,l.QZ)(s),t}const t=n.throw(e);throw(0,l.$X)(t)&&await(0,l.QZ)(t),e}if(s.done)return s.value}}};class L{constructor(e){this._changeHandle=null,this.capabilities={query:M.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new S,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,c.W)(e.fieldsIndex)?e.fieldsIndex:N.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=Z}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new r.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=(0,l.Mq)(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);return e=(0,a.o8)(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),n)}async executeQueryForUniqueValues(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),n)}async executeQueryForClassBreaks(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),n)}async executeQueryForHistogram(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),n)}async executeQueryForSnapping(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,G.W)(this.timeInfo,this.featureStore);const[i,n]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:n}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==b.v8)throw t;return await new T.G([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(e){if(e!==b.v8)throw e;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const n=i.size;if(!n)return{count:0,extent:null};const s=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:n,extent:s}}catch(e){if(e===b.v8)return{count:0,extent:null};throw e}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,n=new Set;for(const e of i)n.add(t.featureAdapter.getObjectId(e));return n}catch(e){if(e===b.v8)return new Set;throw e}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==b.v8)throw t;return await new T.G([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await(0,b.iJ)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t){const i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new r.A(z,"Unsupported query options",{query:e});return B(e,t)}(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==b.v8)throw i;t=new T.G([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:n,valueExpression:s}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:s});return yield,await r.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:n,field3:s,valueExpression:r}=t,a=yield*this._executeQueryForStatistics(e,{field:i,field2:n,field3:s,valueExpression:r});return yield,await a.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:n,valueExpression:s}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:s});return yield,await r.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:n,valueExpression:s}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:s});return yield,await r.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:n,returnEdge:s,vertexMode:r}=e;if(!s&&"none"===r)return{candidates:[]};let o=(0,a.o8)(e.query);o=await(0,b.T2)(o,this.definitionExpression,this.spatialReference),yield,o=await B(o,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const l=!(0,x.aI)(i.spatialReference,this.spatialReference);l&&(await(0,F.Nk)(i.spatialReference,this.spatialReference),yield);const u="number"==typeof n?n:n.x,c="number"==typeof n?n:n.y,d={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},p=l?(0,F.Cv)(d,this.spatialReference):d;if(!p)return{candidates:[]};const f=(await(0,g.el)((0,y.rS)(i),null,{signal:t}))[0];yield;const h=(await(0,g.el)((0,y.rS)(p),null,{signal:t}))[0];if(yield,null==f||null==h)return{candidates:[]};const m=await this._searchFeatures($(h.toJSON()));yield;const v=new T.G(m,o,this);this._executeObjectIdsQuery(v),yield,this._executeTimeQuery(v),yield,this._executeAttributesQuery(v),yield,yield*this._executeGeometryQueryForSnapping(v),yield;const w=f.toJSON(),_=l?(0,F.Cv)(w,this.spatialReference):w,S=l?Math.max(p.xmax-p.xmin,p.ymax-p.ymin)/2:n;return v.createSnappingResponse({...e,point:_,distance:S},o.returnZ,i.spatialReference)}async _getBounds(e,t,i){const n=(0,p.hZ)((0,p.vt)(),p.qv);return await this.featureStore.forEachBounds(e,e=>(0,p.RF)(n,e)),U(n,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new T.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,s.z)(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=(0,a.o8)(e),e=await(0,b.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await B(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const n=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(n),yield,this._executeObjectIdsQuery(n),yield,this._executeTimeQuery(n),yield,this._executeAttributesQuery(n),n}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:n}=e,s=this.featureStore.featureSpatialReference,r=e.sceneFilter.geometry,a=null==s||(0,x.aI)(s,r.spatialReference)?r:(0,F.Cv)(r,s);if(!a)return null;const o=i||n,l=(0,x.fn)(t)&&!(0,x.aI)(this.spatialReference,t)&&o?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures($(a));if(yield,"disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const n=await(0,A.xt)("esriSpatialRelDisjoint",a,this.geometryType);yield;const s=e=>!t.has(u.getObjectId(e))||n(u.getGeometry(e)),r=yield*this._runSpatialFilter(i,s);yield;const o=new T.G(r,e,this);return await l(o)}if(!c.length)return new T.G([],e,this);if(this._canExecuteSinglePass(a,e))return await l(new T.G(c,e,this));const d=await(0,A.xt)("esriSpatialRelContains",a,this.geometryType);yield;const p=yield*this._runSpatialFilter(c,e=>d(u.getGeometry(e)));return yield,await l(new T.G(p,e,this))}async*_executeGeometryQuery(e,t){if(null!=t&&0===t.items.length)return t;const{geometry:i,outSR:s,returnGeometry:r,returnCentroid:a}=e,o=t?null:this._getCacheKey(e),l=o?this._cache.get(o):null;if(l)return new T.G(l,e,this);const u=(0,x.fn)(s)&&!(0,x.aI)(this.spatialReference,s),c=r||a,d=async e=>(u&&c&&await this._project(e,s),o&&this._cache.put(o,e.items),e),p=this.featureStore.featureSpatialReference,f=!i||null==p||(0,x.aI)(p,i.spatialReference)?i:(0,F.Cv)(i,p);if(!f)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));yield;const h=this.featureAdapter;let m=await this._searchFeatures($(i));yield;const y=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===y){if(!m.length)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of m)i.add(h.getObjectId(e));let n;null!=t?n=t.items:(yield,n=await this._getAllFeatures(),yield);const s=await(0,A.xt)(y,f,this.geometryType);yield;const r=e=>!i.has(h.getObjectId(e))||s(h.getGeometry(e)),a=yield*this._runSpatialFilter(n,r);yield;const o=new T.G(a,e,this);return await d(o)}if(null!=t){const e=new n.vW;m=m.filter(i=>(0,n.qh)(t.items,i,t.items.length,e)>=0)}if(!m.length){const t=new T.G([],e,this);return o&&this._cache.put(o,t.items),t}if(this._canExecuteSinglePass(f,e))return await d(new T.G(m,e,this));const g=await(0,A.xt)(y,f,this.geometryType);yield;const v=yield*this._runSpatialFilter(m,e=>g(h.getGeometry(e)));return yield,await d(new T.G(v,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,G.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,w.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const n=await(0,A.xt)(i,t.geometry,this.geometryType);yield;const s=this.featureAdapter,r=yield*this._runSpatialFilter(e.items,e=>n(s.getGeometry(e)));e.items=r}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const n=new Array;for(const s of e)t(s)&&n.push(s),i.madeProgress(),i.done&&(i=yield);return n}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:n}=this.timeInfo,s=n||i,r=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),n=a(i,s),o=r.get(e);(!o||n>a(o,s))&&r.set(e,i)}e.items=Array.from(r.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:n,returnCentroid:s,outSR:r,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=n||s;return(0,x.fn)(r)&&!(0,x.aI)(this.spatialReference,r)&&l?JSON.stringify([t,i,r]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,A.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,x.aI)(this.spatialReference,t))return e;const i=this.featureAdapter,n=(0,d.isLoaded)()?await this._getFullExtent():void 0,r=await(0,F.lK)(e.items.map(e=>(0,_.pL)(this.geometryType,i.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:n});return e.items=(0,s.z)(r.map((t,n)=>i.cloneWithGeometry(e.items[n],(0,v.Ux)(t,this.hasZ,this.hasM),this.geometryType))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=(0,a.o8)(e);try{e=await(0,b.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t,{fieldsIndex:i,geometryType:n,spatialReference:s,availableFields:a}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.A(z,"Unsupported query options",{query:e});return O(i,a,e),Promise.all([P(i,a,t,e),(0,A.c0)(e,n,s),(0,F.Nk)(s,e.outSR)]).then(()=>e)}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const n=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(n),yield,this._executeObjectIdsQuery(n),yield,this._executeTimeQuery(n),yield,this._executeAttributesQuery(n),yield,n}catch(t){if(t!==b.v8)throw t;return new T.G([],e,this)}}get test(){}}function $(e){if((0,A.tC)(e)){if((0,m.ZC)(e))return[(0,f.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,m.Bi)(e))return e.rings.map(e=>(0,f.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[(0,h.Rg)((0,f.vt)(),e)]}function U(e,t,i,n,s){const r={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:(0,_.ag)(n)};s&&isFinite(e[2])&&isFinite(e[5])&&(r.zmin=e[2],r.zmax=e[5],r.hasZ=!0);const a=(0,F.Cv)(r,t,i);if(a.spatialReference=(0,_.ag)(i),a.xmax-a.xmin===0){const e=(0,u.GA)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){const e=(0,u.GA)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(s&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){const e=(0,u.GA)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}},57231:(e,t,i)=>{i.d(t,{g:()=>n});const n=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"})},58727:(e,t,i)=>{i.d(t,{GC:()=>g,T2:()=>x,VY:()=>f,dO:()=>w,iJ:()=>y,v8:()=>h});var n=i(49186),s=i(66552),r=i(86211),a=i(91218),o=i(90634),l=i(60408),u=i(65864),c=i(17136),d=i(21325),p=i(31464);const f=new s.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),h=Object.freeze({}),m="frequency";async function y(e,t,i){const n=e.bin;return n.onField&&(n.onField=n.onField.trim()),n.onExpression?.value&&(n.onExpression.value=n.onExpression.value.trim()),n.splitBy&&(n.splitBy.value&&(n.splitBy.value=n.splitBy.value.trim()),n.splitBy.outAlias&&(n.splitBy.outAlias=n.splitBy.outAlias.trim())),n.stackBy&&(n.stackBy.value&&(n.stackBy.value=n.stackBy.value.trim()),n.stackBy.outAlias&&(n.stackBy.outAlias=n.stackBy.outAlias.trim())),"normalizationField"in n.parameters&&n.parameters.normalizationField&&(n.parameters.normalizationField=n.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:m}]),g(e,t,i)}async function g(e,t,i){const{outFields:n,orderByFields:s,groupByFieldsForStatistics:r,outStatistics:a}=e;if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),x(e,t,i)}async function x(e,t,s){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:s}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=s?f.fromJSON(s):(0,r.Ij)(o),c=o&&((0,d.EA)(o)||(0,d.K8)(o))?a:await(0,p.Nk)(o,d.KK).then(()=>(0,p.Cv)(a,d.KK)),h=await i.e(9159).then(i.bind(i,49159));await h.load();const m=h.execute(c,t||1,{unit:u})??void 0;if(!m||!(0,l.Bi)(m)||0===m.rings.length)throw new n.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return m}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,o.HA)(m),m.spatialReference=t}if(m){await(0,p.Nk)(m.spatialReference,s),m=function(e,t){const i=e.spatialReference;return v(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,s);const t=(await(0,c.el)((0,u.rS)(m)))[0];if(null==t)throw h;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,n=i&&v(m,s)?{extendedParams:{densificationStep:8*i}}:void 0,r=t.toJSON(),a=(0,p.Cv)(r,r.spatialReference,s,n);if(!a)throw h;a.spatialReference=s,e.geometry=a}return e}function v(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,d.aI)(i,t)&&!(0,a.canProjectWithoutEngine)(i,t)}function w(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,i)=>{i.d(t,{A:()=>y});var n=i(31635),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(69540),u=i(25482),c=i(57231),d=i(93223);let p=class extends((0,l.OU)(u.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,n.Cg)([(0,r.MZ)({type:Number,json:{name:"number",write:!0}})],p.prototype,"value",void 0),(0,n.Cg)([(0,d.e)(c.g)],p.prototype,"unit",void 0),p=(0,n.Cg)([(0,r.$K)("esri.rest.support.DateBinTimeInterval")],p);const f=p;function h(e,t,i){(0,s.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function m(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}p.from=(0,a.dp)(p);let y=class extends o.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,n.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>m(t,"end")},write:{writer:h}}})],y.prototype,"end",void 0),(0,n.Cg)([(0,r.MZ)({type:f,json:{name:"parameters",write:!0}})],y.prototype,"interval",void 0),(0,n.Cg)([(0,r.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],y.prototype,"offset",void 0),(0,n.Cg)([(0,r.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],y.prototype,"returnFullIntervalBin",void 0),(0,n.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>m(t,"start")},write:{writer:h}}})],y.prototype,"start",void 0),(0,n.Cg)([(0,r.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],y.prototype,"snapToData",void 0),(0,n.Cg)([(0,d.e)({dateBin:"date"},{readOnly:!0})],y.prototype,"type",void 0),y=(0,n.Cg)([(0,r.$K)("esri.rest.support.DateBinParameters")],y),y.from=(0,a.dp)(y)},60909:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(31635),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(41366),u=i(93223);function c(e,t,i){(0,s.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(o.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:c}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:c}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,u.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,n.Cg)([(0,r.$K)("esri.rest.support.FixedIntervalBinParameters")],d),d.from=(0,a.dp)(d)},62660:(e,t,i)=>{i.d(t,{tC:()=>w,c0:()=>v,xt:()=>x});var n=i(49186),s=i(94078),r=i(12176),a=i(60408),o=i(21325);function l(e,t){return c(e,t.coords[0],t.coords[1])}function u(e,t){const{coords:i,lengths:n,stride:s}=t;if(!n)return!1;for(let t=0,r=0;t<n.length;t++,r+=s)if(!c(e,i[r],i[r+1]))return!1;return!0}function c(e,t,i){if(!e)return!1;const{coords:n,lengths:s,stride:r}=e;let a=!1,o=0;for(const e of s)a=d(a,n,r,o,e,t,i),o+=e*r;return a}function d(e,t,i,n,s,r,a){let o=e,l=n;for(let e=n,u=n+s*i;e<u;e+=i){l=e+i,l===u&&(l=n);const s=t[e],c=t[e+1],d=t[l],p=t[l+1];(c<a&&p>=a||p<a&&c>=a)&&s+(a-c)/(p-c)*(d-s)<r&&(o=!o)}return o}var p=i(90708),f=i(51441),h=i(31464);const m="unsupported-query",y={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},g={esriSpatialRelIntersects:()=>Promise.all([i.e(3661),i.e(1878),i.e(5756),i.e(3299),i.e(7360)]).then(i.bind(i,55284)),esriSpatialRelContains:()=>Promise.all([i.e(3661),i.e(1878),i.e(5756),i.e(3299),i.e(1867)]).then(i.bind(i,29127)),esriSpatialRelCrosses:()=>Promise.all([i.e(3661),i.e(1878),i.e(5756),i.e(3299),i.e(9700)]).then(i.bind(i,85672)),esriSpatialRelDisjoint:()=>Promise.all([i.e(3661),i.e(1878),i.e(5756),i.e(3299),i.e(1598)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(3661),i.e(1878),i.e(5756),i.e(3299),i.e(1414)]).then(i.bind(i,46178)),esriSpatialRelTouches:()=>Promise.all([i.e(3661),i.e(1878),i.e(5756),i.e(3299),i.e(2503)]).then(i.bind(i,83547)),esriSpatialRelWithin:()=>Promise.all([i.e(3661),i.e(1878),i.e(5756),i.e(3299),i.e(9265)]).then(i.bind(i,85445)),esriSpatialRelRelation:null};async function x(e,t,i){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,p.Ye)(t,!1,!1);return t=>l(e,t)}if("esriGeometryMultipoint"===i){const i=(0,p.Ye)(t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,e)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,s.qz)(t,(0,f.pL)(i,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,s.rL)(t,(0,f.pL)(i,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(n=i)?r.xB:(0,r.xK)(n);return n=>e(t,(0,f.pL)(i,n))}}var n;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const o=await function(e){const t=g[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>o.execute(t,(0,f.pL)(i,e))}async function v(e,t,i){const{spatialRel:s,geometry:r}=e;if(r){if(null==(l=s)||!0!==y.spatialRelationship[l])throw new n.A(m,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(r.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===y.queryGeometry[(0,a.$B)(e)]}(r))throw new n.A(m,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===y.layerGeometry[e]}(t))throw new n.A(m,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,h.Nk)(e.geometry?.spatialReference,e.outSR)}}var l}function w(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},69052:(e,t,i)=>{i.d(t,{hr:()=>s,ie:()=>l,uC:()=>o});var n=i(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return r(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+a(this.range,e-t,i)}minimalMonotonic(e,t,i){return r(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);const i=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(n)?i:n}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function r(e,t,i,n,s=0,r=!1){return(n-=s)<t?n+=a(e,t-n):n>i&&(n-=a(e,n-i)),r&&n===i&&(n=t),n+s}function a(e,t,i=0){return Math.ceil((t-i)/e)*e+i}const o=new s(0,2*Math.PI),l=(new s(-Math.PI,Math.PI),new s(0,360))},70328:(e,t,i)=>{i.d(t,{BI:()=>v,DC:()=>d,Ej:()=>f,Ie:()=>g,Jt:()=>x,Ne:()=>h,RF:()=>c,aI:()=>_,fA:()=>a,gE:()=>l,hZ:()=>y,iT:()=>p,is:()=>w,qv:()=>F,vI:()=>m,vY:()=>o,v_:()=>S,vt:()=>r,w1:()=>u});var n=i(5443),s=(i(19419),i(4197));function r(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t,i,n,s,a,o=r()){return o[0]=e,o[1]=t,o[2]=i,o[3]=n,o[4]=s,o[5]=a,o}function o(e,t=r()){return function(e,t,i,n=r()){return y(n,F),function(e,t,i=0,n=t.length/3){let s=e[0],r=e[1],a=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)s=Math.min(s,t[i+3*e]),r=Math.min(r,t[i+3*e+1]),a=Math.min(a,t[i+3*e+2]),o=Math.max(o,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=s,e[1]=r,e[2]=a,e[3]=o,e[4]=l,e[5]=u}(n,e,t,i),n}(e,0,e.length/3,t)}function l(e,t=(0,s.jh)(24)){const[i,n,r,a,o,l]=e;return t[0]=i,t[1]=n,t[2]=r,t[3]=i,t[4]=n,t[5]=l,t[6]=i,t[7]=o,t[8]=r,t[9]=i,t[10]=o,t[11]=l,t[12]=a,t[13]=n,t[14]=r,t[15]=a,t[16]=n,t[17]=l,t[18]=a,t[19]=o,t[20]=r,t[21]=a,t[22]=o,t[23]=l,t}function u(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new n.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function f(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function m(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?y(e,F):r(F)}function x(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function v(e,t,i,n,s){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function w(e){return 6===e.length}function _(e,t,i){if(null==e||null==t)return e===t;if(!w(e)||!w(t))return!1;if(i){for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const F=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];r()},80754:(e,t,i)=>{i.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var n=i(82799),s=i(16930),r=i(60408);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,r.Bi)(e)?e.rings:e.paths}},86420:(e,t,i)=>{i.d(t,{I:()=>r,W:()=>s});var n=i(21818);async function s(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:s,endTimeField:r}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(s&&r)await t.forEach(e=>{const t=i.getAttribute((0,n.z)(e),s),l=i.getAttribute((0,n.z)(e),r);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))});else{const e=s||r;await t.forEach(t=>{const s=i.getAttribute((0,n.z)(t),e);null==s||isNaN(s)||(a=Math.min(a,s),o=Math.max(o,s))})}return{start:a,end:o}}function r(e,t,i){if(!t||!e)return null;const{startTimeField:n,endTimeField:s}=e;if(!n&&!s)return null;const{start:r,end:a}=t;if(null===r&&null===a)return null;if(void 0===r&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return n&&s?function(e,t,i,n,s){return null!=n&&null!=s?r=>{const a=e(r,t),o=e(r,i);return(null==a||a<=s)&&(null==o||o>=n)}:null!=n?t=>{const s=e(t,i);return null==s||s>=n}:null!=s?i=>{const n=e(i,t);return null==n||n<=s}:void 0}(o,n,s,r,a):function(e,t,i,n){return null!=i&&null!=n&&i===n?n=>e(n,t)===i:null!=i&&null!=n?s=>{const r=e(s,t);return null!=r&&r>=i&&r<=n}:null!=i?n=>{const s=e(n,t);return null!=s&&s>=i}:null!=n?i=>{const s=e(i,t);return null!=s&&s<=n}:void 0}(o,n||s,r,a)}},91218:(e,t,i)=>{i.r(t),i.d(t,{canProjectWithoutEngine:()=>k,initializeProjection:()=>L,isEqualBaseGCS:()=>Z,isLoaded:()=>A,isLoadedOrLoad:()=>C,isLoadedOrLoadFor:()=>z,load:()=>O,project:()=>q,projectAsync:()=>Q,projectExtent:()=>te,projectMany:()=>P,projectMultipoint:()=>J,projectOrLoad:()=>N,projectOrLoadMany:()=>E,projectPoint:()=>U,projectPolygon:()=>X,projectPolyline:()=>K,projectWithoutEngine:()=>$,requiresLoad:()=>B,test:()=>V,tryProject:()=>G,unload:()=>D});var n=i(49186),s=i(74887),r=i(62788),a=i(95488),o=i(51850),l=i(21276),u=i(73941),c=i(5443),d=i(91075),p=i(48526),f=i(86738),h=i(39829),m=i(82799),y=i(16930),g=i(159),x=i(9762),v=i(37539);function w(e,t,i,n,s,r){return _[0]=e,_[1]=t,_[2]=i,(0,x.projectBuffer)(_,n,0,s,r,0)}const _=(0,o.vt)();var F=i(21325);let S=null,I=null,R=null,M=null,T={};const b=new a.I;function A(){return!!(I?.isLoaded()&&R?.isLoaded()&&M?.isLoaded())}function C(){return!!A()||((0,r.gc)(b),O(),!1)}function z(e,t){return!e||!t||k(e,t)||C()}function B(e,t){return!k(e,t)&&!A()}async function O(e){null==S&&(S=Promise.all([i.e(3276).then(i.bind(i,83276)).then(e=>(I=e,I.load())),i.e(8377).then(i.bind(i,8377)).then(e=>(R=e,R.load())),i.e(2158).then(i.bind(i,12158)).then(e=>(M=e,M.load()))])),await S,(0,s.Te)(e),b.notify()}function q(e,t,i){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),P(e,e[0].spatialReference,t,i)):((0,l.f)(e),P([e],e.spatialReference,t,i)[0])}function P(e,t,i,n){if(null==t||null==i)return e;if(k(t,i,n))return e.map(e=>$(e,t,i));if(null==n?.geographicTransformation&&(0,u.jA)(t))return P(e.map(e=>$(e,t,y.A.WGS84)),y.A.WGS84,i,{zConversionDisabled:n?.zConversionDisabled});if(null==n?.geographicTransformation&&(0,u.jA)(i))return P(e,t,y.A.WGS84).map(e=>$(e,y.A.WGS84,i));if(!A())throw new j;if(!n?.geographicTransformation)if(n?.extendedParams)n={...n,geographicTransformation:M.getTransformation(t,i,n.areaOfInterestExtent)||new g.A};else if(!n?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,i);let s=T[e];s||(s=M.getTransformation(t,i)||new g.A,T[e]=s),n={geographicTransformation:s,zConversionDisabled:n?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof d.A?I.executeMany(e,i,n):R.executeMany(e,i,n)}function G(e,t,i){try{return q(e,t,i)}catch(e){return null}}function N(e,t){const i=E([e],t);return null!=i.pending?{pending:i.pending,geometry:null}:null!=i.geometries?{pending:null,geometry:i.geometries[0]}:{pending:null,geometry:null}}function E(e,t,i){if(!A())for(const i of e)if(null!=i&&!(0,F.aI)(i.spatialReference,t)&&(0,F.fn)(i.spatialReference)&&(0,F.fn)(t)&&!k(i.spatialReference,t))return(0,r.gc)(b),{pending:O(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,F.aI)(e.spatialReference,t)?e:(0,F.fn)(e.spatialReference)&&(0,F.fn)(t)?q(e,t,i):null)}}class j extends n.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function D(){S=null,I=null,R=null,M=null,T={}}const V={get loadPromise(){return S}};async function Q(e,t,i){if((0,s.Te)(i),!e)return e;const n=E(Array.isArray(e)?e:[e],t,i);if(n.pending)return await n.pending,(0,s.Te)(i),Q(e,t,i);const r=n.geometries??[];return Array.isArray(e)?r:r[0]}function k(e,t,i){return!(i?.areaOfInterestExtent||i?.extendedParams||i?.geographicTransformation)&&(!!(0,F.aI)(e,t)||(0,F.fn)(e)&&(0,F.fn)(t)&&!!(0,v.jd)(e,t))}function Z(e,t){if((0,F.aI)(e,t))return!0;if(!(0,F.fn)(e)||!(0,F.fn)(t))return!1;const i=(0,F.oT)(e)||(0,F.K8)(e)||(0,F.x1)(e),n=(0,F.oT)(t)||(0,F.K8)(t)||(0,F.x1)(t);return i&&n}async function L(e,t,i,n){if(A())return(0,s.NO)(n);if(Array.isArray(e)){for(const{source:t,dest:i,options:s}of e)if(t&&i&&!k(t,i,s))return O(n)}else if(e&&t&&!k(e,t,i))return O(n);return(0,s.NO)(n)}function $(e,t,i){return e?"x"in e?H(e,t,new f.A,i,0):"xmin"in e?ie(e,t,new c.A,i,0):"rings"in e?ee(e,t,new h.A,i,0):"paths"in e?Y(e,t,new m.A,i,0):"points"in e?W(e,t,new p.A,i,0):null:null}function U(e,t,i=t.spatialReference,n=0){return null!=i&&null!=e.spatialReference&&null!=H(e,e.spatialReference,t,i,n)}function H(e,t,i,n,s){se[0]=e.x,se[1]=e.y;const r=e.z;return se[2]=void 0!==r?r:s,(0,x.projectBuffer)(se,t,0,se,n,0)?(i.x=se[0],i.y=se[1],i.spatialReference=n,void 0!==r||(0,u.xP)(n)?(i.z=se[2],i.hasZ=!0):(i.z=void 0,i.hasZ=!1),void 0===e.m?(i.m=void 0,i.hasM=!1):(i.m=e.m,i.hasM=!0),i):null}function J(e,t,i=t.spatialReference,n=0){return null!=e.spatialReference&&null!=i&&null!=W(e,e.spatialReference,t,i,n)}function W(e,t,i,n,s){const{points:r,hasZ:a,hasM:o}=e,l=[],c=r.length,d=[];for(const e of r)d.push(e[0],e[1],a?e[2]:s);if(!(0,x.projectBuffer)(d,t,0,d,n,0,c))return null;const p=a||(0,u.xP)(n);for(let e=0;e<c;++e){const t=3*e,i=d[t],n=d[t+1];p&&o?l.push([i,n,d[t+2],r[e][3]]):p?l.push([i,n,d[t+2]]):o?l.push([i,n,r[e][2]]):l.push([i,n])}return i.points=l,i.spatialReference=n,i.hasZ=a,i.hasM=o,i}function K(e,t,i=t.spatialReference,n=0){return null!=e.spatialReference&&null!=i&&null!=Y(e,e.spatialReference,t,i,n)}function Y(e,t,i,n,s){const{paths:r,hasZ:a,hasM:o}=e,l=[];if(!ne(r,a??!1,o??!1,t,l,n,s))return null;const c=a||(0,u.xP)(n);return i.paths=l,i.spatialReference=n,i.hasZ=c,i.hasM=o,i}function X(e,t,i=t.spatialReference,n=0){return null!=e.spatialReference&&null!=i&&null!=ee(e,e.spatialReference,t,i,n)}function ee(e,t,i,n,s){const{rings:r,hasZ:a,hasM:o}=e,l=[];if(!ne(r,a??!1,o??!1,t,l,n,s))return null;const c=a||(0,u.xP)(n);return i.rings=l,i.spatialReference=n,i.hasZ=c,i.hasM=o,i}function te(e,t,i=t.spatialReference,n=0){return null!=e.spatialReference&&null!=i&&null!=ie(e,e.spatialReference,t,i,n)}function ie(e,t,i,n,s){const{xmin:r,ymin:a,xmax:o,ymax:l,hasZ:c,hasM:d}=e;if(!w(r,a,c?e.zmin:s,t,se,n))return null;const p=c||(0,u.xP)(n);return i.xmin=se[0],i.ymin=se[1],p&&(i.zmin=se[2]),w(o,l,c?e.zmax:s,t,se,n)?(i.xmax=se[0],i.ymax=se[1],p&&(i.zmax=se[2]),d&&(i.mmin=e.mmin,i.mmax=e.mmax),i.spatialReference=n,i):null}function ne(e,t,i,n,s,r,a=0){const o=new Array;for(const i of e)for(const e of i)o.push(e[0],e[1],t?e[2]:a);if(!(0,x.projectBuffer)(o,n,0,o,r,0))return!1;let l=0;s.length=0;const c=t||(0,u.xP)(r);for(const t of e){const e=new Array;for(const n of t)c&&i?e.push([o[l++],o[l++],o[l++],n[3]]):c?e.push([o[l++],o[l++],o[l++]]):i?(e.push([o[l++],o[l++],n[2]]),l++):(e.push([o[l++],o[l++]]),l++);s.push(e)}return!0}const se=(0,o.vt)()},92300:(e,t,i)=>{i.d(t,{V:()=>a,X:()=>r});var n=i(60408),s=i(65864);function r(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function a(e,t,i){const n=(0,s.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=i,t})}},99157:(e,t,i)=>{i.d(t,{A:()=>o});var n,s=i(31635),r=i(69622),a=i(91429);let o=n=class extends r.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new n({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,s.Cg)([(0,a.MZ)()],o.prototype,"isInverse",void 0),(0,s.Cg)([(0,a.MZ)()],o.prototype,"wkt",void 0),(0,s.Cg)([(0,a.MZ)()],o.prototype,"wkid",void 0),o=n=(0,s.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformationStep")],o)},99352:(e,t,i)=>{i.d(t,{F:()=>n,P:()=>s});const n={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},s={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4649,7136],{159:(e,t,i)=>{i.d(t,{A:()=>l});var n,s=i(31635),r=i(69622),a=i(91429),o=i(99157);let l=n=class extends r.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new n;for(let t=this.steps.length-1;t>=0;t--){const i=this.steps[t];e.steps.push(i.getInverse())}return e}};(0,s.Cg)([(0,a.MZ)({type:[o.A],nonNullable:!0})],l.prototype,"steps",void 0),l=n=(0,s.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformation")],l)},4197:(e,t,i)=>{i.d(t,{Vj:()=>u,cj:()=>l,jh:()=>r,l5:()=>o,xm:()=>a});var n=i(34275),s=i(9093);function r(e){return e<=n.y9?new Array(e).fill(0):new Float64Array(e)}function a(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=n.y9?Array.from(e):new Float64Array(e)}function o(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}function l(e){return[...e]}function u(e){const t=(0,s.vt)();for(let i=0;i<16;++i)t[i]=e[i];return t}},5834:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(31635),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(41366),u=i(93223);function c(e,t,i){(0,s.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(o.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,n.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:c}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:c}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,u.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,n.Cg)([(0,r.$K)("esri.rest.support.AutoIntervalBinParameters")],d),d.from=(0,a.dp)(d)},8384:(e,t,i)=>{i.d(t,{G:()=>C});var n=i(4718),s=i(12359),r=i(90634),a=i(62577),o=i(21325),l=i(46329),u=i(52006),c=i(29441),d=i(51441),p=i(30524),f=i(87445),h=i(1873),m=i(43668);class y{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const n=e.outFields;if(n&&!n.includes("*")){this.outFields=n;let e=0;for(const t of n){const n=(0,c.Wq)(t),s=this.fieldsIndex.get(n),r=s?null:(0,c.j4)(n,i),a=s?s.name:(0,c.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:r})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach(e=>this.getAttributes(e)),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){if(i)return this.featureAdapter.getAttribute(e,i.name);const n=t;let s=null;return this._fieldDataCache.has(n)?s=this._fieldDataCache.get(n)?.clause:i||(s=(0,c.j4)(t,this.fieldsIndex),this._fieldDataCache.set(n,{alias:n,clause:s})),s?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const n=t.normalizationType,s=t.normalizationTotal,r=this.fieldsIndex.get(t.field),a=(0,p.zD)(r)||(0,p.Ah)(r),o=(0,p.OH)(r);return e.map(e=>{let r=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(r=`${(0,h.gJ)(r)}${t.fieldDelimiter}${(0,h.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(r=`${r}${t.fieldDelimiter}${(0,h.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof r&&i&&(a?r=r?new Date(r).getTime():null:o&&(r=r?(0,f.rb)(r):null)),n&&Number.isFinite(r)){const i="field"===n&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;r=(0,h.zS)(r,n,i,s)}return r})}async getExpressionValues(e,t,i,n,s){const{arcadeUtils:r}=await(0,m.l)(),a=r.hasGeometryOperations(t);a&&await r.enableGeometryOperations();const o=r.createFunction(t),l=r.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map(e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,d.pL)(n.geometryType,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},c=r.createExecContext(t,l,s);return r.executeFunction(o,c)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,c.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,c.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const n of t){const{alias:t,clause:s}=this._fieldDataCache.get(n);i[t]=s?s.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const n of t){const{alias:t}=this._fieldDataCache.get(n);i.push(e[t])}else for(const t in e)i.push(e[t]);const n=`${(t||["*"]).join(",")}=${i.join(",")}`;let s=this._returnDistinctMap.get(n)||0;return this._returnDistinctMap.set(n,++s),s>1?null:e}}var g=i(31464),x=i(58727);class v{constructor(e,t,i){this.objectId=e,this.target=t,this.distance=i}}class w extends v{constructor(e,t,i){super(e,t,i),this.type="vertex"}}class _ extends v{constructor(e,t,i,n,s,r=!1){super(e,t,i),this.start=n,this.end=s,this.draped=r,this.type="edge"}}var F=i(5834),S=i(59977),I=i(57231),R=i(11440),M=i(60909),T=i(98623),b=i(28097);const A="bin";class C{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new y(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:n}=this.query,s=t?.length;if(!s)return 1;const r=new Map,a=new Map,o=new Set;for(const s of n){const{statisticType:n}=s,l="exceedslimit"!==n?s.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const n of t){const t=this._getAttributeValues(e,n,this.items,r);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:n,items:s}=u[t],r=n.join(",");i&&!e.validateItems(s,i)||o.add(r)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,o.fn)(this.query.outSR)&&!(0,o.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,d.ag)({spatialReference:this.query.outSR,...(0,g.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,d.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const n=this.featureAdapter,s=B(this.hasZ,this.hasM),{point:r,mode:a}=e,o="number"==typeof e.distance?e.distance:e.distance.x,c="number"==typeof e.distance?e.distance:e.distance.y;function d(e,t){const i=(e-r.x)/o,n=(t-r.y)/c;return i*i+n*n}const p={candidates:[]},f="esriGeometryPolygon"===this.geometryType,h="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,m=this._getPointCreator(a,t,this.spatialReference,i),y=new O(null,0),g=new O(null,0),x={x:0,y:0,z:0};for(const e of this.items){const t=n.getObjectId(e),i=n.getGeometryWithCurves?.(e);if(null!=i){F(i,t);continue}const s=n.getGeometry(e);null==s||v(s,t)}return p.candidates.sort((e,t)=>e.distance-t.distance),p;function v(t,i){const{coords:n}=t,a=t.isPoint?q:t.lengths;if(y.coords=n,g.coords=n,e.returnEdge){let e=0;for(let t=0;t<a.length;t++){const n=a[t],o=e;for(let t=0;t<n;t++,e+=s){if(!f&&t===n-1)continue;if(y.coordsIndex=e,g.coordsIndex=t===n-1?o:e+s,!z(x,r,y,g))continue;const a=d(x.x,x.y);a<=1&&p.candidates.push(new _(i,m(x),Math.sqrt(a),m(y),m(g)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<a.length;t++){const n=a[t],r=e,o=g;o.coordsIndex=r;for(let t=0;t<n;t++,e+=s){if(y.coordsIndex=e,f&&t===n-1&&y.x===o.x&&y.y===o.y)continue;const s=d(y.x,y.y);s<=1&&p.candidates.push(new w(i,m(y),Math.sqrt(s)))}}}else if(h&&"ends"===e.vertexMode){let e=0;const t=[];for(let i=0;i<a.length;i++){t.push(e);const n=a[i];e+=n*s,n>1&&t.push(e-s)}for(const e of t){y.coordsIndex=e;const t=d(y.x,y.y);t<=1&&p.candidates.push(new w(i,m(y),Math.sqrt(t)))}}}function F(t,i){const{candidates:n}=p,s={x:0,y:0,z:0};if(e.returnEdge){const e=[r.x,r.y],a={x:0,y:0,z:0},o={x:0,y:0,z:0};for(const{segments:r}of t.parts)for(const{start:t,curve:c}of r){const r=(0,l.y)(t,c,e);if(null==r)continue;const p=d(...r.curvePoint);p>1||([a.x,a.y]=t,[s.x,s.y]=r.curvePoint,[o.x,o.y]=(0,u.yP)(c),n.push(new _(i,m(s),Math.sqrt(p),m(a),m(o))))}}function a(e){s.x=t.vertexXY[2*e],s.y=t.vertexXY[2*e+1];const r=d(s.x,s.y);r>1||(s.z=t.vertexZ?.[e]??0,n.push(new w(i,m(s),Math.sqrt(r))))}if("all"===e.vertexMode){const{vertexCount:e}=t;for(let t=0;t<e;++t)a(t);return}if("ends"===e.vertexMode)switch(t.type){case"point":a(0);break;case"polyline":for(let e=0;e<t.partCount;++e){const i=t.partOffsets[e],n=t.partOffsets[e+1];a(i),n!==i&&a(n)}}}}_getPointCreator(e,t,i,n){const s=null==n||(0,o.aI)(i,n)?e=>e:e=>(0,g.Cv)(e,i,n),{hasZ:r}=this;return"3d"===e?r&&t?({x:e,y:t,z:i})=>s({x:e,y:t,z:i}):({x:e,y:t})=>s({x:e,y:t,z:0}):({x:e,y:t})=>s({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,d=this.fieldsIndex.get(t),f=(0,p.vE)(d)||(0,p.zD)(d)||(0,p.Ah)(d),m=await this._getDataValues({field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,scale:l,timeZone:u},this.items),y=(0,h.Vb)({normalizationType:s,normalizationField:n,minValue:a,maxValue:o}),g={value:.5,fieldType:d?.type},x=(0,p.yM)(d)?(0,h.z9)({values:m,supportsNullCount:y,percentileParams:g,outStatisticTypes:c}):(0,h.G_)({values:m,minValue:a,maxValue:o,useSampleStdDev:!s,supportsNullCount:y,percentileParams:g,outStatisticTypes:c});return(0,h.oZ)(x,c,f)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:n,returnAllCodedValues:s,scale:r,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:a},this.items,!1),l=(0,h.b3)(o);return(0,h.lv)(l,n,s,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:d,timeZone:p}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,scale:d,timeZone:p},this.items),m=(0,h.Rw)(f,{field:t,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,h.jM)(m,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:d,timeZone:p}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,scale:d,timeZone:p},this.items);return(0,h.$y)(f,{field:t,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const n of t.slice().reverse()){const t=n.split(" "),s=t[0],r=this.fieldsIndex.get(s),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,h.FM)(r?.type,a,"case-sensitive");e.sort((e,t)=>{const n=i(e,s,r),a=i(t,s,r);return o(n,a)})}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:n,hasZ:s,objectIdField:r,spatialReference:o}=this,{outFields:l,outSR:u,quantizationParameters:c,resultRecordCount:p,resultOffset:f,returnZ:h,returnM:m}=e,y=null!=p&&t.length>(f||0)+p,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:n&&m,hasZ:s&&h,objectIdFieldName:r,spatialReference:(0,d.ag)(u||o),transform:c&&(0,a.VV)(c)||null}}_createFeatures(e,t){const i=new y(e,this.featureAdapter,this.fieldsIndex),{hasM:n,hasZ:s}=this,{orderByFields:r,quantizationParameters:o,returnGeometry:l,returnCentroid:u,maxAllowableOffset:c,resultOffset:p,resultRecordCount:f,returnZ:h=!1,returnM:m=!1}=e,g=s&&h,x=n&&m;let v=[],w=0;const _=[...t];if(this._sortFeatures(_,r,(e,t,n)=>i.getFieldValue(e,t,n)),this.geometryType&&(l||u)){const e=(0,a.VV)(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const n of _){const s=this.featureAdapter.getGeometry(n),r=this._addFeatureJSONMetadata(n,{attributes:i.getAttributes(n),geometry:(0,d.pL)(this.geometryType,s,c,e,g,x)});t&&s&&!r.geometry&&(r.centroid=(0,d.LQ)(this,this.featureAdapter.getCentroid(n,this),e)),v[w++]=r}else if(!l&&u)for(const t of _)v[w++]=this._addFeatureJSONMetadata(t,{attributes:i.getAttributes(t),centroid:(0,d.LQ)(this,this.featureAdapter.getCentroid(t,this),e)});else for(const t of _)v[w++]=this._addFeatureJSONMetadata(t,{attributes:i.getAttributes(t),centroid:(0,d.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,d.pL)(this.geometryType,this.featureAdapter.getGeometry(t),c,e,g,x)})}else for(const e of _){const t=i.getAttributes(e);t&&(v[w++]=this._addFeatureJSONMetadata(e,{attributes:t}))}const F=p||0;if(null!=f){const e=F+f;v=v.slice(F,Math.min(v.length,e))}return v}_addFeatureJSONMetadata(e,t){const i=this.featureAdapter.getMetadata?.(e);return void 0!==i&&(t.metadata=i),t}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,n=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=B(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce((e,t)=>{const n=i.getGeometry(t);return e+(null!=n&&n.coords.length||0)},0)/t>n}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const n=[],s=new Map,r=new Map,a=new Map,o=new Map,l=new y(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:f,resultRecordCount:h}=e,m=c?.length,g=!!m,x=g?c[0]:null,v=g&&!this.fieldsIndex.get(x);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:f}=e,h=e,y="exceedslimit"!==f?e.onStatisticField:void 0,w="percentile_disc"===f||"percentile_cont"===f,_="EnvelopeAggregate"===f||"CentroidAggregate"===f||"ConvexHullAggregate"===f,F=g&&1===m&&(y===x||v)&&"count"===f;if(g){if(!a.has(y)){const e=[];for(const i of c){const n=this._getAttributeValues(l,i,t,s);e.push(n)}a.set(y,this._calculateUniqueValues(e,t,!_&&l.returnDistinctValues))}const e=a.get(y);if(!e)continue;const i=Object.keys(e);for(const n of i){const{count:i,data:r,items:a,itemPositions:p}=e[n],f=r.join(",");if(!d||l.validateItems(a,d)){const e=o.get(f)||{attributes:{}};if(_){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(h,a);e.aggregateGeometries[i]=t}else{let n=null;if(F)n=i;else{const e=this._getAttributeValues(l,y,t,s),i=p.map(t=>e[t]);n=w&&"statisticParameters"in h?this._getPercentileValue(h,i):this._getStatisticValue(h,i,null,l.returnDistinctValues)}e.attributes[u]=n}let n=0;c.forEach((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++n]=r[i]),o.set(f,e)}}}else if(_){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:n}=await this._getAggregateGeometry(h,t);i.aggregateGeometries[n]=e}else{const e=this._getAttributeValues(l,y,t,s);i.attributes[u]=w&&"statisticParameters"in h?this._getPercentileValue(h,e):this._getStatisticValue(h,e,r,l.returnDistinctValues)}const S="min"!==f&&"max"!==f||!(0,p.yM)(this.fieldsIndex.get(y))&&!this._isAnyDateField(y)?null:this.fieldsIndex.get(y)?.type;n.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const w=g?Array.from(o.values()):[i];return this._sortFeatures(w,f,(e,t)=>e.attributes[t]),h&&(w.length=Math.min(h,w.length)),{fields:n,features:w}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,p.vE)(t)||(0,p.zD)(t)||(0,p.Ah)(t)||(0,p.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:n,union:a}=await i.e(1023).then(i.bind(i,81023)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:u,spatialReference:c,geometryType:p}=this,f=t.map(e=>(0,d.pL)(p,u.getGeometry(e))),h=n(c,f,!0)[0],m={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=h?(0,r.v)(h):(0,r.HA)(a(c,f));m.aggregateGeometries={...e,spatialReference:c},m.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=h?(0,s.l8)(h):(0,s.Z4)((0,r.HA)(a(c,f)));m.aggregateGeometries={x:e[0],y:e[1],spatialReference:c},m.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(m.aggregateGeometries=h,m.outStatisticFieldName=l||"convexHull");return m}_getStatisticValue(e,t,i,n){const{onStatisticField:s,statisticType:r}=e;let a=null;return a=i?.has(s)?i.get(s):(0,p.yM)(this.fieldsIndex.get(s))||this._isAnyDateField(s)?(0,h.z9)({values:t,returnDistinct:n}):(0,h.G_)({values:n?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(s,a),a["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:n,statisticType:s}=e,{value:r,orderBy:a}=n,o=this.fieldsIndex.get(i);return(0,h.qg)(t,{value:r,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===s})}_getAttributeValues(e,t,i,n){if(n.has(t))return n.get(t);const s=this.fieldsIndex.get(t),r=i.map(i=>e.getFieldValue(i,t,s));return n.set(t,r),r}_calculateUniqueValues(e,t,i){const n={},s=t.length;for(let r=0;r<s;r++){const s=t[r],a=[];for(const t of e)a.push(t[r]);const o=a.join(",");null==n[o]?n[o]={count:1,data:a,items:[s],itemPositions:[r]}:(i||n[o].count++,n[o].items.push(s),n[o].itemPositions.push(r))}return n}async _getDataValues(e,t,i=!0){const s=new y(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:r,scale:a,timeZone:o}=e;return r?s.getExpressionValues(t,r,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):s.getDataValues(t,(0,n.o8)(e),i)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const n=t.intervals,s=t.min??0,r=t.max??0,a=n.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=s&&o<=r){const e=(0,h.Ak)(n,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:n,valueType:s}=t,r=[],a=[{name:n??i,alias:n??i,type:s??"esriFieldTypeString"},{name:A,alias:A,type:"esriFieldTypeInteger"}],o=new y(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const c=this._getAttributeValues(o,i,u,l),d=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in d){const{items:s}=d[t],o=await this._createBinsResponse(e,s);if(r.push(...o.features.map(e=>({...e,attributes:{...e.attributes,[n??i]:t}}))),o.fields)for(const e of o.fields)a.some(t=>t.name===e.name)||a.push(e)}return{fields:a,features:r}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(F.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(S.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(R.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(M.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:n,normalizationField:s,numBins:r,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),d=(0,h.sU)(c,{field:n,normalizationField:s,normalizationType:a,normalizationTotal:o,numBins:r,minValue:(0,x.dO)(a?e.normalizationMinValue:l,!1),maxValue:(0,x.dO)(a?e.normalizationMaxValue:u,!1)}),p=this._calculateHistogramBins(c,d,i);return this._createFeaturesFromHistogramBins(p,t)}async _createDateBinsResponse(e,t,i){const{field:n,interval:s,start:r,end:a,snapToData:o,returnFullIntervalBin:l,offset:u,firstDayOfWeek:c}=e,d=s.unit,f=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},i),h=(0,p.OH)(this.fieldsIndex.get(n)),m=I.g.toJSON(d),y=f.filter(Boolean).sort((e,t)=>e-t),g=null!=r?(0,x.dO)(r,h):y[0],v=null!=a?(0,x.dO)(a,h):y[y.length-1],w=[];if(null!=g&&null!=v){const e={zone:t.outTimeReference?.ianaTimeZone??T.n$},i=u?.unit?I.g.toJSON(u.unit):"milliseconds",n={[i]:u?.value||0},r=b.c9.fromMillis(g,e).minus(n),a=b.c9.fromMillis(v,e).minus(n),d="number"==typeof c&&c>=1&&c<=7?c:7,p=(e,t)=>{const i=(e.weekday-t+7)%7;return e.minus({days:i}).startOf("day")};if("last"===o){let e="week"===m?((e,t)=>p(e,t).plus({days:7}))(a,d):a;for(;e>r;){const t=e.minus({[m]:s.value});if(t<r){w.unshift([l?t.plus(n).toMillis():r.plus(n).toMillis(),e.plus(n).toMillis()]);break}w.unshift([t.plus(n).toMillis(),e.plus(n).toMillis()]),e=t}}else{let e="first"===o?r:"week"===m?p(r,d):r.startOf(m);for(;e<=a;){const t=e.plus({[m]:s.value});if(t>a){w.push([e.plus(n).toMillis(),l?t.plus(n).toMillis():a.plus(n).toMillis()]);break}w.push([e.plus(n).toMillis(),t.plus(n).toMillis()]),e=t}}}const _=this._calculateHistogramBins(f,{intervals:w,min:g,max:v},i);return this._createFeaturesFromHistogramBins(_,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:n}=e,s=await this._getDataValues({field:n,timeZone:t.outTimeReference?.ianaTimeZone},i),r=(0,p.OH)(this.fieldsIndex.get(n)),a=e.boundaries.map(e=>(0,x.dO)(e,r)).sort((e,t)=>e-t),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=this._calculateHistogramBins(s,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:n,interval:s,normalizationType:r,start:a,end:o}=e,l=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:r,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),u=(0,p.OH)(this.fieldsIndex.get(n)),c=(0,h.sU)(l,{field:n,classificationMethod:"defined-interval",definedInterval:s,minValue:(0,x.dO)(r?e.normalizationMinValue:a,u),maxValue:(0,x.dO)(r?e.normalizationMaxValue:o,u)},!0),d=this._calculateHistogramBins(l,c,i);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:n}=t,s=n||"lowerBoundary",r=i||"upperBoundary",a=[],o=[{name:s,alias:s,type:"esriFieldTypeDouble"},{name:r,alias:r,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:A,alias:A,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const d="dateBin"===t.bin.type,p=t.outTimeReference?.ianaTimeZone;for(const i of e){const{minValue:e,maxValue:n,items:f}=i,h={attributes:{}};let m;if(h.attributes[s]=d&&p&&null!=e?b.c9.fromMillis(e,{zone:p}).toISO():e,t.bin.hideUpperBound||(h.attributes[r]=d&&p&&null!=n?b.c9.fromMillis(n,{zone:p}).toISO():n),l?(m=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},f),h.attributes[A]=++c,"flat"===t.bin.jsonStyle?a.push(...m.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...h.attributes}:{...t,...h.attributes}}))):(h.stackedAttributes=m.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),a.push(h))):(t.bin?.splitBy&&(h.attributes[A]=++c),m=await this._createStatisticsQueryResponse(t,f,h),a.push(h)),m.fields)for(const e of m.fields)o.some(t=>t.name===e.name)||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function z(e,t,i,n){const s=n.x-i.x,r=n.y-i.y,a=t.x-i.x,o=t.y-i.y,l=s*s+r*r;if(0===l)return!1;const u=a*s+o*r,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+s*c,e.y=i.y+r*c,!0}function B(e,t){return e?t?4:3:t?3:2}class O{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const q=[1]},9093:(e,t,i)=>{function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}i.d(t,{o8:()=>s,vt:()=>n,zK:()=>r});const r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:s,create:n,fromValues:function(e,t,i,n,s,r,a,o,l,u,c,d,p,f,h,m){return[e,t,i,n,s,r,a,o,l,u,c,d,p,f,h,m]}},Symbol.toStringTag,{value:"Module"}))},9762:(e,t,i)=>{i.r(t),i.d(t,{projectBuffer:()=>s});var n=i(37539);function s(e,t,i,s,r,a,o=Math.floor(e.length/3)){const l=(0,n.jd)(t,r);if(null==l)return!1;if(l===n.pO){if(e===s&&i===a)return!0;const t=i+3*o;for(let n=i,r=a;n<t;n++,r++)s[r]=e[n]??0;return!0}const u=i+3*o;for(let t=i,n=a;t<u;t+=3,n+=3)l(e,t,s,n);return!0}},11006:(e,t,i)=>{function n(e,t,i,n,r){s(e,t,i||0,n||e.length-1,r||a)}function s(e,t,i,n,a){for(;n>i;){if(n-i>600){var o=n-i+1,l=t-i+1,u=Math.log(o),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);s(e,t,Math.max(i,Math.floor(t-l*c/o+d)),Math.min(n,Math.floor(t+(o-l)*c/o+d)),a)}var p=e[t],f=i,h=n;for(r(e,i,t),a(e[n],p)>0&&r(e,i,n);f<h;){for(r(e,f,h),f++,h--;a(e[f],p)<0;)f++;for(;a(e[h],p)>0;)h--}0===a(e[i],p)?r(e,i,h):r(e,++h,n),h<=t&&(i=h+1),t<=h&&(n=h-1)}}function r(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function a(e,t){return e<t?-1:e>t?1:0}i.d(t,{q:()=>n})},11440:(e,t,i)=>{i.d(t,{A:()=>u});var n=i(31635),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(93223);let u=class extends o.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,s.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],u.prototype,"boundaries",void 0),(0,n.Cg)([(0,l.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],u.prototype,"type",void 0),u=(0,n.Cg)([(0,r.$K)("esri.rest.support.FixedBoundariesBinParameters")],u),u.from=(0,a.dp)(u)},17136:(e,t,i)=>{i.d(t,{Y_:()=>b,O7:()=>M,el:()=>R});var n=i(92602),s=i(69052),r=i(49186),a=i(53966),o=i(39829),l=i(82799),u=i(16930),c=i(80754),d=i(21325),p=i(28735),f=i(11254),h=i(60408),m=i(65864),y=i(2272),g=i(84952),x=i(92300);const v=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function w(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function F(e,t,i){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw v().error(e),new r.A("internal:geometry",e)}const i=(0,c.r8)(e),n=[];for(const e of i){const i=[];n.push(i),i.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const s=e[n][0],r=e[n][1],a=e[n+1][0],o=e[n+1][1],l=Math.sqrt((a-s)*(a-s)+(o-r)*(o-r)),u=(o-r)/l,c=(a-s)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const n=e*t,a=c*n+s,o=u*n+r;i.push([a,o])}const e=(l+Math.floor(d-1)*t)/2,n=c*e+s,a=u*e+r;i.push([n,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:n,spatialReference:e.spatialReference}):new l.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return i&&(e=(0,c.kS)(e,i)),e}function S(e,t,i){if(Array.isArray(e)){const n=e[0];if(n>t){const i=(0,c.kd)(n,t);e[0]=n+i*(-2*t)}else if(n<i){const t=(0,c.kd)(n,i);e[0]=n+t*(-2*i)}}else{const n=e.x;if(n>t){const i=(0,c.kd)(n,t);e=e.clone().offset(i*(-2*t),0)}else if(n<i){const t=(0,c.kd)(n,i);e=e.clone().offset(t*(-2*i),0)}}return e}function I(e,t){let i=-1;for(let n=0;n<t.cutIndexes.length;n++){const s=t.cutIndexes[n],r=t.geometries[n],a=(0,c.r8)(r);for(let e=0;e<a.length;e++){const t=a[e];t.some(i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const n=t[e][0];i=n>i?n:i}i=Number(i.toFixed(9));const n=-360*(0,c.kd)(i,180);for(let i=0;i<t.length;i++){const t=r.getPoint(e,i);r.setPoint(e,i,t.clone().offset(n,0))}return!0}})}if(s===i){if(w(e))for(const t of(0,c.r8)(r))e[s]=e[s].addRing(t);else if(_(e))for(const t of(0,c.r8)(r))e[s]=e[s].addPath(t)}else i=s,e[s]=r}return e}async function R(e,t,i){if(!Array.isArray(e))return R([e],t);t&&"string"!=typeof t&&v().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let r,a,u,w,_,M,T,b,A=0;const C=[],z=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,a=(0,d.Vp)(r),u=r.isWebMercator,M=u?102100:4326,w=c.j7[M].maxX,_=c.j7[M].minX,T=c.j7[M].plus180Line,b=c.j7[M].minus180Line),a)if("mesh"===t.type)z.push(t);else if("point"===t.type)z.push(S(t.clone(),w,_));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>S(e,w,_)),z.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,a);z.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,i=(0,c.kd)(e.xmin,_)*(2*w);let n=0===i?t.clone():(0,c.kS)(t.clone(),i);e.offset(i,0);let{xmin:s,xmax:r}=e;s=Number(s.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(T)&&r!==w?(A=r>A?r:A,n=F(n,u),C.push(n),z.push("cut")):e.intersects(b)&&s!==_?(A=r*(2*w)>A?r*(2*w):A,n=F(n,u,360),C.push(n),z.push("cut")):z.push(n)}else z.push(t.clone());else z.push(t);else z.push(t);let B=(0,c.kd)(A,w),O=-90;const q=B,P=new l.A;for(;B>0;){const e=360*B-180;P.addPath([[e,O],[e,-1*O]]),O*=-1,B--}if(C.length>0&&q>0){const t=I(C,await async function(e,t,i,n){const s=(0,y.Dl)(e),r=t[0].spatialReference,a={...n,responseType:"json",query:{...s.query,f:"json",sr:(0,d.YX)(r),target:JSON.stringify({geometryType:(0,h.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,f.A)(s.path+"/cut",a),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,m.rS)(e);return t.spatialReference=r,t})}}(s,C,P,i)),n=[],r=[];for(let i=0;i<z.length;i++){const s=z[i];if("cut"!==s)r.push(s);else{const s=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&s.rings.length>=a.rings.length?(n.push(s),r.push("simplify")):r.push(u?(0,p.Gh)(s):s)}}if(!n.length)return r;const a=await async function(e,t,i){const n="string"==typeof e?(0,g.An)(e):e,s=t[0].spatialReference,r=(0,h.$B)(t[0]),a={...i,query:{...n.query,f:"json",sr:(0,d.YX)(s),geometries:JSON.stringify((0,x.X)(t))}},{data:o}=await(0,f.A)(n.path+"/simplify",a);return(0,x.V)(o.geometries,r,s)}(s,n,i),o=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?o.push(t):o.push(u?(0,p.Gh)(a.shift()):a.shift())}return o}const G=[];for(let e=0;e<z.length;e++){const t=z[e];if("cut"!==t)G.push(t);else{const e=C.shift();G.push(!0===u?(0,p.Gh)(e):e)}}return G}function M(e,t,i){const n=(0,d.Vp)(i);if(null==n)return e;const[s,r]=n.valid,a=2*r;let o=0,l=0;t>r?o=Math.ceil(Math.abs(t-r)/a):t<s&&(o=-Math.ceil(Math.abs(t-s)/a)),e>r?l=Math.ceil(Math.abs(e-r)/a):e<s&&(l=-Math.ceil(Math.abs(e-s)/a));let u=e+(o-l)*a;const c=u-t;return c>r?u-=a:c<s&&(u+=a),u}function T(e){const t=(0,d.Vp)(e);if(null==t)return null;const[i,n]=t.valid;return new s.hr(i,n)}const b=T(u.A.WGS84);T(u.A.WebMercator)},29441:(e,t,i)=>{i.d(t,{MG:()=>x,SN:()=>f,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>h,j4:()=>m,vl:()=>u});var n=i(49186),s=i(44123),r=i(98453);const a=new s.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),d=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function p(e,t,i={}){const s=m(t,e);if(!s){const i=a.getError(t,e);throw new n.A(o,"invalid SQL expression",{expression:t,error:i})}const r=i.expressionName||"expression";if(i.validateStandardized&&!s.isStandardized)throw new n.A(o,`${r} is not standard`,{expression:t});if(i.validateAggregate&&!s.isAggregate)throw new n.A(o,`${r} does not contain a valid aggregate function`,{expression:t});return s.fieldNames}function f(e,t,i,n){if(!i)return!0;const s="where clause";return x(e,t,p(e,i,{validateStandardized:!0,expressionName:s}),{expressionName:s,query:n}),!0}function h(e,t,i,s,r){if(!i)return!0;const a="having clause",l=p(e,i,{validateAggregate:!0,expressionName:a});x(e,t,l,{expressionName:a,query:r});const u=m(i,e),c=u?.getExpressions().every(t=>{const{aggregateType:i,field:n}=t,r=e.get(n)?.name;return s.some(t=>{const{onStatisticField:n,statisticType:s}=t,a=e.get(n)?.name;return a===r&&s.toLowerCase().trim()===i})});if(!c)throw new n.A(o,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function m(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function x(e,t,i,s={}){const r=new Map;if(function(e,t,i,n,s){const r=s.includes("*")?[...i,...s.filter(e=>"*"!==e)]:s;for(const s of r)if(t.get(s))v(e,t,i,n,s);else try{const r=p(t,y(s),{validateStandardized:!0});for(const s of r)v(e,t,i,n,s)}catch(t){e.set(s,{type:"expression-error",expression:s,error:t})}}(r,e,t,s.allowedFieldTypes??d,i),r.size){const e=s.expressionName??"expression";throw new n.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(r.values()),query:s.query})}}function v(e,t,i,n,s){const a=t.get(s);a?i.has(a.name)?"all"!==n&&!1===n?.has(a.type)&&e.set(s,{type:"invalid-type",fieldName:a.name,fieldType:r.m.fromJSON(a.type),allowedFieldTypes:Array.from(n,e=>r.m.fromJSON(e))}):e.set(s,{type:"missing-field",fieldName:a.name}):e.set(s,{type:"invalid-field",fieldName:s})}},31464:(e,t,i)=>{i.d(t,{Cv:()=>m,Nk:()=>p,lK:()=>g});var n=i(4576),s=i(74887),r=i(91218),a=i(21325),o=i(28735);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,l),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,l),[i.xmax,i.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:c(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:c(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function c(e,t){const i=[];for(const n of e)i.push(d(n,t));return i}function d(e,t){const i=[];for(const n of e){const e=t(n[0],n[1],[0,0]);i.push(e),n.length>2&&e.push(n[2]),n.length>3&&e.push(n[3])}return i}async function p(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(n.Ru):[e];await(0,r.initializeProjection)(i.map(e=>({source:e,dest:t})))}const f=u.bind(null,o.je),h=u.bind(null,o.tD);function m(e,t,i,n){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,a.fn)(t)||!(0,a.fn)(i)||(0,a.aI)(t,i))return e;if((0,o.y7)(t,i)){const t=(0,a.K8)(i)?f(e):h(e);return t.spatialReference=i,t}return(0,r.projectMany)([e],t,i,n)[0]}const y=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,n){if(!e?.length||!t||!i||(0,a.aI)(t,i))return e;const r={geometries:e,inSpatialReference:t,outSpatialReference:i,options:n,resolve:(0,s.Tw)()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:n,resolve:s,options:l}=e;(0,o.y7)(i,n)&&null==l?.extendedParams?(0,a.K8)(n)?s(t.map(f)):s(t.map(h)):s((0,r.projectMany)(t,i,n,l)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function g(e,t,i,n){return y.push(e,t,i,n)}},37539:(e,t,i)=>{i.d(t,{pO:()=>m,jd:()=>p,Tp:()=>f,w5:()=>d});var n=i(34727),s=i(86211),r=i(73941),a=i(79258);Math.PI;const o=a.$O.radius,l=a.$O.eccentricitySquared,u={a1:o*l,a2:o*l*o*l,a3:o*l*l/2,a4:o*l*o*l*2.5,a5:o*l+o*l*l/2,a6:1-l};a.$O.radius,a.$O.flattening,a.Sw.radius,a.Sw.flattening,a.sH.radius,a.sH.flattening,a.sH.radius;var c=i(21325);const d={2:{5:m,7:null,9:null,10:m,1:S,6:null,8:null,0:null,3:g,11:x,2:m,4:b},5:{5:m,7:null,9:null,10:m,1:S,6:null,8:null,0:null,3:g,11:x,2:m,4:b},7:{5:null,7:m,9:null,10:m,1:null,6:F,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:m,10:m,1:null,6:null,8:_,0:null,3:null,11:null,2:null,4:null},3:{5:y,7:null,9:null,10:y,1:function(e,t,i,n){const s=e[t]/q,r=O-2*Math.atan(Math.exp(-e[t+1]/q)),a=q+(e[t+2]??0),o=Math.cos(r)*a;i[n]=Math.cos(s)*o,i[n+1]=Math.sin(s)*o,i[n+2]=Math.sin(r)*a},6:null,8:null,0:null,3:m,11:function(e,t,i,n){y(e,t,i,n),x(i,n,i,n)},2:y,4:function(e,t,i,n){y(e,t,i,n),b(i,n,i,n)}},4:{5:A,7:null,9:null,10:A,1:function(e,t,i,n){A(e,t,i,n),S(i,n,i,n)},6:null,8:null,0:null,3:function(e,t,i,n){A(e,t,i,n),g(i,n,i,n)},11:function(e,t,i,n){A(e,t,i,n),x(i,n,i,n)},2:A,4:m},1:{5:T,7:null,9:null,10:T,1:m,6:null,8:null,0:null,3:function(e,t,i,n){T(e,t,i,n),g(i,n,i,n)},11:function(e,t,i,n){T(e,t,i,n),x(i,n,i,n)},2:T,4:function(e,t,i,n){T(e,t,i,n),b(i,n,i,n)}},6:{5:null,7:M,9:null,10:M,1:null,6:m,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:R,10:R,1:null,6:null,8:m,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:m,3:null,11:null,2:null,4:null},10:{5:m,7:m,9:m,10:m,1:S,6:F,8:_,0:null,3:g,11:x,2:m,4:b},11:{5:v,7:null,9:null,10:v,1:function(e,t,i,n){v(e,t,i,n),S(i,n,i,n)},6:null,8:null,0:null,3:function(e,t,i,n){v(e,t,i,n),g(i,n,i,n)},11:m,2:v,4:function(e,t,i,n){v(e,t,i,n),b(i,n,i,n)}}};function p(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(C.source.spatialReference===e&&C.dest.spatialReference===t)return C;const i=h(e,C.source),n=h(t,C.dest);return 0===i&&0===n?(0,c.aI)(e,t)?C.projector=m:C.projector=null:C.projector=d[i][n],C}function h(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,s.GA)(e,1)),(0,r.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===r.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===r.FY.wkt?t.spatialReferenceId=6:e.wkt===r.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function m(e,t,i,n){e!==i&&(i[n++]=e[t++],i[n++]=e[t++],i[n]=e[t]??0)}function y(e,t,i,n){i[n]=B*(e[t]/q),i[n+1]=B*(O-2*Math.atan(Math.exp(-e[t+1]/q))),i[n+2]=e[t+2]??0}function g(e,t,i,s){!function(e,t,i,s,r){const a=.4999999*Math.PI,o=(0,n.qE)(z*e[t+1],-a,a),l=Math.sin(o);i[s++]=z*e[t]*r.radius,i[s++]=r.halfSemiMajorAxis*Math.log((1+l)/(1-l)),i[s]=e[t+2]??0}(e,t,i,s,a.$O)}function x(e,t,i,n){i[n]=e[t]*P,i[n+1]=e[t+1]*P,i[n+2]=e[t+2]??0}function v(e,t,i,n){i[n]=e[t]*G,i[n+1]=e[t+1]*G,i[n+2]=e[t+2]??0}function w(e,t,i,n,s){const r=s+(e[t+2]??0),a=z*e[t],o=z*e[t+1],l=Math.cos(o)*r;i[n]=Math.cos(a)*l,i[n+1]=Math.sin(a)*l,i[n+2]=Math.sin(o)*r}function _(e,t,i,n){w(e,t,i,n,a.Sw.radius)}function F(e,t,i,n){w(e,t,i,n,a.sH.radius)}function S(e,t,i,n){w(e,t,i,n,a.$O.radius)}function I(e,t,i,s,r){const a=e[t],o=e[t+1],l=e[t+2]??0,u=Math.sqrt(a*a+o*o+l*l),c=(0,n.YN)(l/(0===u?1:u)),d=Math.atan2(o,a);i[s++]=B*d,i[s++]=B*c,i[s]=u-r}function R(e,t,i,n){I(e,t,i,n,a.Sw.radius)}function M(e,t,i,n){I(e,t,i,n,a.sH.radius)}function T(e,t,i,n){I(e,t,i,n,a.$O.radius)}function b(e,t,i,n){!function(e,t,i,n,s){const r=z*e[t],a=z*e[t+1],o=e[t+2]??0,l=Math.sin(a),u=Math.cos(a),c=s.radius/Math.sqrt(1-s.eccentricitySquared*l*l);i[n++]=(c+o)*u*Math.cos(r),i[n++]=(c+o)*u*Math.sin(r),i[n++]=(c*(1-s.eccentricitySquared)+o)*l}(e,t,i,n,a.$O)}function A(e,t,i,n){const s=u,r=e[t],o=e[t+1],l=e[t+2]??0;let c,d,p,f,h,m,y,g,x,v,w,_,F,S,I,R,M,T,b,A,C;c=Math.abs(l),d=r*r+o*o,p=Math.sqrt(d),f=d+l*l,h=Math.sqrt(f),A=Math.atan2(o,r),m=l*l/f,y=d/f,S=s.a2/h,I=s.a3-s.a4/h,y>.3?(g=c/h*(1+y*(s.a1+S+m*I)/h),b=Math.asin(g),v=g*g,x=Math.sqrt(1-v)):(x=p/h*(1-m*(s.a5-S-y*I)/h),b=Math.acos(x),v=1-x*x,g=Math.sqrt(v)),w=1-a.$O.eccentricitySquared*v,_=a.$O.radius/Math.sqrt(w),F=s.a6*_,S=p-_*x,I=c-F*g,M=x*S+g*I,R=x*I-g*S,T=R/(F/w+M),b+=T,C=M+R*T/2,l<0&&(b=-b),i[n++]=B*A,i[n++]=B*b,i[n]=C}const C={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:m},z=(0,n.kU)(1),B=(0,n.KJ)(1),O=.5*Math.PI,q=a.$O.radius,P=q*Math.PI/180,G=180/(q*Math.PI)},41266:(e,t,i)=>{i.d(t,{A:()=>m});var n=i(31635),s=i(69540),r=i(66552),a=i(25482),o=i(91429),l=i(56507),u=i(93223);const c=new r.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends((0,s.OU)(a.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,n.Cg)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,n.Cg)([(0,u.e)(c)],d.prototype,"valueType",void 0),d=(0,n.Cg)([(0,o.$K)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,l.dp)(d);const f=new r.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),h=new r.J({naturalLog:"natural-log",squareRoot:"square-root"});let m=class extends((0,s.OU)(a.o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],m.prototype,"expression",void 0),(0,n.Cg)([(0,u.e)(f,{name:"onExpression.valueType"})],m.prototype,"expressionValueType",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],m.prototype,"field",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],m.prototype,"firstDayOfWeek",void 0),(0,n.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hideUpperBound",void 0),(0,n.Cg)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],m.prototype,"splitBy",void 0),(0,n.Cg)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],m.prototype,"stackBy",void 0),(0,n.Cg)([(0,u.e)(h)],m.prototype,"transformation",void 0),m=(0,n.Cg)([(0,o.$K)("esri.rest.support.BinParametersBase")],m)},41366:(e,t,i)=>{i.d(t,{K:()=>d,Q:()=>l});var n=i(31635),s=i(66552),r=i(53966),a=i(91429),o=i(93223);const l=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",d=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&c||i&&u||null,t&&i&&r.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,n.Cg)([(0,o.e)(l,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,n.Cg)([(0,a.$K)("esri.rest.support.NormalizationBinParametersMixin")],i),i}},44123:(e,t,i)=>{i.d(t,{WhereClauseCache:()=>r});var n=i(66344),s=i(88368);class r{constructor(e,t){this._cache=new n.q(e),this._invalidCache=new n.q(t)}get(e,t){const i=`${t?.uid}:${e}`,n=this._cache.get(i);if(n)return n;if(null!=this._invalidCache.get(i))return null;try{const n=s.A.create(e,{fieldsIndex:t});return this._cache.put(i,n),n}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},44794:(e,t,i)=>{i.d(t,{v:()=>o});var n=i(4718),s=i(62788),r=i(95488);class a{constructor(e,t){this._observable=new r.I,this._value=e,this._equalityFunction=t}get value(){return(0,s.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=n.gh){return new a(e,t)}},46329:(e,t,i)=>{i.d(t,{y:()=>d});var n=i(49186),s=i(4305),r=i(513),a=i(50954),o=i(52006),l=i(49663),u=i(46068),c=i(59803);function d(e,t,i){if((0,o.Xq)(t))return(0,c.T)(e,t,i);if((0,o.n1)(t)){const r=(0,s.m_)(e,t,i)[0];if(null==r)throw new n.A("closestPointOnCurve:unexpected-error","Failed to find close point on bezier curve");return r}if((0,o.aO)(t)){const n=(0,a.pM)(e,t);return(0,r.fM)(n,i)}if((0,o.DA)(t)){const n=(0,l.i)(e,t);return(0,r.fM)(n,i)}const d=(0,u.SW)(e,t);return(0,u.pb)(d,i)}},51441:(e,t,i)=>{i.d(t,{LQ:()=>s,ag:()=>a,pL:()=>r});var n=i(90708);function s(e,t,i,s=e.hasZ,r=e.hasM){if(null==t)return null;const a=e.hasZ&&s,o=e.hasM&&r;if(i){const e=(0,n.Nl)(t,"esriGeometryPoint",i,s,r);return(0,n.DF)(e,a,o)}return(0,n.DF)(t,a,o)}function r(e,t,i,s,r,a){if(null==t)return null;const o="coords"in t?t:t.geometry;if(null==o)return null;const{hasZ:l,hasM:u}=o,c=l&&(r??=l),d=u&&(a??=u);if(i){let t=(0,n.kz)(o,e,i,r,a);return s&&(t=(0,n.Nl)(t,e,s)),(0,n.zv)(t,e,c,d)}if(s){const t=(0,n.Nl)(o,e,s,r,a);return(0,n.zv)(t,e,c,d)}return(0,n.zv)(o,e,c,d)}function a(e){return e&&o in e?JSON.parse(JSON.stringify(e,l)):e}const o="_geVersion",l=(e,t)=>e===o?void 0:t},54339:(e,t,i)=>{function n(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const i=[];for(const n of t.fieldNames)i.push(e.attributes[n]??null);return JSON.stringify(i)}}}function s(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>n,r:()=>s})},56390:(e,t,i)=>{i.d(t,{do:()=>L,Wc:()=>U});var n=i(4576),s=i(21818),r=i(49186),a=(i(44208),i(4718)),o=i(97768),l=i(74887),u=i(86211),c=i(12195),d=i(91218),p=i(70328),f=i(19419),h=i(537),m=i(60408),y=i(65864),g=i(17136),x=i(21325),v=i(90708),w=i(29441),_=i(51441),F=i(31464);class S{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[i,n]of this._storage){if(!(n.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new R(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let I=0;class R{constructor(e){this.items=e,this.time=performance.now(),this.id=I++}}var M=i(99352),T=i(8384),b=i(58727),A=i(62660),C=i(43668);const z="unsupported-query";async function B(e,{fieldsIndex:t,geometryType:i,spatialReference:n,availableFields:s}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.A(z,"Unsupported query options",{query:e});return O(t,s,e),function(e,t,i){const{outStatistics:n,groupByFieldsForStatistics:s,having:a}=i,o=s?.length,l=n?.length;if(a){if(!o||!l)throw new r.A(z,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,w.eD)(e,t,a,n,i)}if(l){if(null==(u=n)||!u.every(e=>"exceedslimit"!==e.statisticType))return;const a=n.map(e=>e.onStatisticField).filter(Boolean);(0,w.MG)(e,t,a,{expressionName:"onStatisticFields",query:i}),o&&(0,w.MG)(e,t,s,{expressionName:"groupByFieldsForStatistics",query:i});for(const s of n){const{onStatisticField:n,statisticType:a}=s;if("percentile_disc"!==a&&"percentile_cont"!==a||!("statisticParameters"in s))e.get(n)&&"count"!==a&&"min"!==a&&"max"!==a&&(0,w.MG)(e,t,[n],{expressionName:`outStatistics with '${a}' statistic type`,allowedFieldTypes:q,query:i});else{const{statisticParameters:e}=s;if(!e)throw new r.A(z,"statisticParameters should be set for percentile type",{definition:s,query:i})}}}var u}(t,s,e),Promise.all([(0,A.c0)(e,i,n),(0,F.Nk)(n,e.outSR)]).then(()=>e)}function O(e,t,i){const{returnDistinctValues:n,outStatistics:s}=i,a=s?s.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){const n=" asc",s=" desc",r=i.orderByFields.map(e=>{const t=e.toLowerCase();return t.includes(n)?t.split(n)[0]:t.includes(s)?t.split(s)[0]:e}).filter(e=>!a.includes(e));(0,w.MG)(e,t,r,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,w.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(n)throw new r.A(z,"outFields should be specified for returnDistinctValues",{query:i});(0,w.SN)(e,t,i.where,i)}const q=new Set([...w.vl,...w.VW]);async function P(e,t,i,n){let s=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,C.l)();s=e.extractFieldNames(i.valueExpression)}if(i.field&&s.push(i.field),i.field2&&s.push(i.field2),i.field3&&s.push(i.field3),i.normalizationField&&s.push(i.normalizationField),!s.length&&!i.valueExpression)throw new r.A(z,"field or valueExpression is required",{params:i});(0,w.MG)(e,t,s,{expressionName:"statistics",query:n})}var G=i(86420),N=i(95466),E=(i(71511),i(53966),i(36708),i(44794),i(78659)),j=i(31635),D=i(69622),V=i(91429);let Q=class extends D.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,j.Cg)([(0,V.MZ)()],Q.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,j.Cg)([(0,V.MZ)()],Q.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),Q=(0,j.Cg)([(0,V.$K)("esri.views.support.debugFlags")],Q),new Q,Symbol("Yield");new Map([["immediate",0],["schedule",4],["slide",0],["stream loader",0],["elevation query",0],["terrain",1],["surface geometry updates",1],["LoD renderer",2],["Graphics3D",2],["I3S",2],["point cloud",2],["feature fetcher",2],["stream controller",2],["clouds generator",2],["overlay",4],["overlay renderer",4],["stage",4],["graphics deconflictor",4],["graphics filter visibility",4],["graphics scale visibility",4],["graphics frustum visibility",4],["POI frequent",6],["POI infrequent",30],["labeler",8],["feature query",8],["feature tile tree",16],["fast feature tile tree",0],["elevation alignment",12],["elevation alignment scene",14],["text texture atlas",12],["texture unload",12],["line of sight tool",16],["interactive line of sight tool",0],["volume measurement",4],["snapping",0],["shadow accumulator",30],["flow generator",12],["gaussian splat sorting",2],["gaussian splat texture atlas",12],["mapview fetch queue",0],["mapview layerview update",2],["mapview vector tile parsing queue",0]]),(0,E.l5)(6.5),(0,E.l5)(1),(0,E.l5)(30),(0,E.l5)(1e3/30),(0,E.l5)(100);const k=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};k.enabled=!1;const Z=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(k))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,l.G4)(t)){const e=(0,l.NK)();if(i)return i(e);throw e}const n=e(k);for(;;){const e=n.next(k),s=(0,l.$X)(e)?await e:e;if((0,l.G4)(t)){const e=(0,l.NK)();if(i){const t=i(e),s=n.return(null);return(0,l.$X)(s)&&await(0,l.QZ)(s),t}const t=n.throw(e);throw(0,l.$X)(t)&&await(0,l.QZ)(t),e}if(s.done)return s.value}}};class L{constructor(e){this._changeHandle=null,this.capabilities={query:M.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new S,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,c.W)(e.fieldsIndex)?e.fieldsIndex:N.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=Z}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new r.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=(0,l.Mq)(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);return e=(0,a.o8)(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),n)}async executeQueryForUniqueValues(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),n)}async executeQueryForClassBreaks(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),n)}async executeQueryForHistogram(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),n)}async executeQueryForSnapping(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,G.W)(this.timeInfo,this.featureStore);const[i,n]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:n}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==b.v8)throw t;return await new T.G([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(e){if(e!==b.v8)throw e;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const n=i.size;if(!n)return{count:0,extent:null};const s=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:n,extent:s}}catch(e){if(e===b.v8)return{count:0,extent:null};throw e}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,n=new Set;for(const e of i)n.add(t.featureAdapter.getObjectId(e));return n}catch(e){if(e===b.v8)return new Set;throw e}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==b.v8)throw t;return await new T.G([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await(0,b.iJ)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t){const i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new r.A(z,"Unsupported query options",{query:e});return B(e,t)}(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==b.v8)throw i;t=new T.G([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:n,valueExpression:s}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:s});return yield,await r.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:n,field3:s,valueExpression:r}=t,a=yield*this._executeQueryForStatistics(e,{field:i,field2:n,field3:s,valueExpression:r});return yield,await a.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:n,valueExpression:s}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:s});return yield,await r.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:n,valueExpression:s}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:s});return yield,await r.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:n,returnEdge:s,vertexMode:r}=e;if(!s&&"none"===r)return{candidates:[]};let o=(0,a.o8)(e.query);o=await(0,b.T2)(o,this.definitionExpression,this.spatialReference),yield,o=await B(o,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const l=!(0,x.aI)(i.spatialReference,this.spatialReference);l&&(await(0,F.Nk)(i.spatialReference,this.spatialReference),yield);const u="number"==typeof n?n:n.x,c="number"==typeof n?n:n.y,d={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},p=l?(0,F.Cv)(d,this.spatialReference):d;if(!p)return{candidates:[]};const f=(await(0,g.el)((0,y.rS)(i),null,{signal:t}))[0];yield;const h=(await(0,g.el)((0,y.rS)(p),null,{signal:t}))[0];if(yield,null==f||null==h)return{candidates:[]};const m=await this._searchFeatures($(h.toJSON()));yield;const v=new T.G(m,o,this);this._executeObjectIdsQuery(v),yield,this._executeTimeQuery(v),yield,this._executeAttributesQuery(v),yield,yield*this._executeGeometryQueryForSnapping(v),yield;const w=f.toJSON(),_=l?(0,F.Cv)(w,this.spatialReference):w,S=l?Math.max(p.xmax-p.xmin,p.ymax-p.ymin)/2:n;return v.createSnappingResponse({...e,point:_,distance:S},o.returnZ,i.spatialReference)}async _getBounds(e,t,i){const n=(0,p.hZ)((0,p.vt)(),p.qv);return await this.featureStore.forEachBounds(e,e=>(0,p.RF)(n,e)),U(n,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new T.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,s.z)(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=(0,a.o8)(e),e=await(0,b.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await B(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const n=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(n),yield,this._executeObjectIdsQuery(n),yield,this._executeTimeQuery(n),yield,this._executeAttributesQuery(n),n}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:n}=e,s=this.featureStore.featureSpatialReference,r=e.sceneFilter.geometry,a=null==s||(0,x.aI)(s,r.spatialReference)?r:(0,F.Cv)(r,s);if(!a)return null;const o=i||n,l=(0,x.fn)(t)&&!(0,x.aI)(this.spatialReference,t)&&o?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures($(a));if(yield,"disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const n=await(0,A.xt)("esriSpatialRelDisjoint",a,this.geometryType);yield;const s=e=>!t.has(u.getObjectId(e))||n(u.getGeometry(e)),r=yield*this._runSpatialFilter(i,s);yield;const o=new T.G(r,e,this);return await l(o)}if(!c.length)return new T.G([],e,this);if(this._canExecuteSinglePass(a,e))return await l(new T.G(c,e,this));const d=await(0,A.xt)("esriSpatialRelContains",a,this.geometryType);yield;const p=yield*this._runSpatialFilter(c,e=>d(u.getGeometry(e)));return yield,await l(new T.G(p,e,this))}async*_executeGeometryQuery(e,t){if(null!=t&&0===t.items.length)return t;const{geometry:i,outSR:s,returnGeometry:r,returnCentroid:a}=e,o=t?null:this._getCacheKey(e),l=o?this._cache.get(o):null;if(l)return new T.G(l,e,this);const u=(0,x.fn)(s)&&!(0,x.aI)(this.spatialReference,s),c=r||a,d=async e=>(u&&c&&await this._project(e,s),o&&this._cache.put(o,e.items),e),p=this.featureStore.featureSpatialReference,f=!i||null==p||(0,x.aI)(p,i.spatialReference)?i:(0,F.Cv)(i,p);if(!f)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));yield;const h=this.featureAdapter;let m=await this._searchFeatures($(i));yield;const y=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===y){if(!m.length)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of m)i.add(h.getObjectId(e));let n;null!=t?n=t.items:(yield,n=await this._getAllFeatures(),yield);const s=await(0,A.xt)(y,f,this.geometryType);yield;const r=e=>!i.has(h.getObjectId(e))||s(h.getGeometry(e)),a=yield*this._runSpatialFilter(n,r);yield;const o=new T.G(a,e,this);return await d(o)}if(null!=t){const e=new n.vW;m=m.filter(i=>(0,n.qh)(t.items,i,t.items.length,e)>=0)}if(!m.length){const t=new T.G([],e,this);return o&&this._cache.put(o,t.items),t}if(this._canExecuteSinglePass(f,e))return await d(new T.G(m,e,this));const g=await(0,A.xt)(y,f,this.geometryType);yield;const v=yield*this._runSpatialFilter(m,e=>g(h.getGeometry(e)));return yield,await d(new T.G(v,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,G.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,w.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const n=await(0,A.xt)(i,t.geometry,this.geometryType);yield;const s=this.featureAdapter,r=yield*this._runSpatialFilter(e.items,e=>n(s.getGeometry(e)));e.items=r}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const n=new Array;for(const s of e)t(s)&&n.push(s),i.madeProgress(),i.done&&(i=yield);return n}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:n}=this.timeInfo,s=n||i,r=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),n=a(i,s),o=r.get(e);(!o||n>a(o,s))&&r.set(e,i)}e.items=Array.from(r.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:n,returnCentroid:s,outSR:r,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=n||s;return(0,x.fn)(r)&&!(0,x.aI)(this.spatialReference,r)&&l?JSON.stringify([t,i,r]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,A.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,x.aI)(this.spatialReference,t))return e;const i=this.featureAdapter,n=(0,d.isLoaded)()?await this._getFullExtent():void 0,r=await(0,F.lK)(e.items.map(e=>(0,_.pL)(this.geometryType,i.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:n});return e.items=(0,s.z)(r.map((t,n)=>i.cloneWithGeometry(e.items[n],(0,v.Ux)(t,this.hasZ,this.hasM),this.geometryType))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=(0,a.o8)(e);try{e=await(0,b.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t,{fieldsIndex:i,geometryType:n,spatialReference:s,availableFields:a}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.A(z,"Unsupported query options",{query:e});return O(i,a,e),Promise.all([P(i,a,t,e),(0,A.c0)(e,n,s),(0,F.Nk)(s,e.outSR)]).then(()=>e)}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const n=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(n),yield,this._executeObjectIdsQuery(n),yield,this._executeTimeQuery(n),yield,this._executeAttributesQuery(n),yield,n}catch(t){if(t!==b.v8)throw t;return new T.G([],e,this)}}get test(){}}function $(e){if((0,A.tC)(e)){if((0,m.ZC)(e))return[(0,f.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,m.Bi)(e))return e.rings.map(e=>(0,f.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[(0,h.Rg)((0,f.vt)(),e)]}function U(e,t,i,n,s){const r={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:(0,_.ag)(n)};s&&isFinite(e[2])&&isFinite(e[5])&&(r.zmin=e[2],r.zmax=e[5],r.hasZ=!0);const a=(0,F.Cv)(r,t,i);if(a.spatialReference=(0,_.ag)(i),a.xmax-a.xmin===0){const e=(0,u.GA)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){const e=(0,u.GA)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(s&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){const e=(0,u.GA)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}},57231:(e,t,i)=>{i.d(t,{g:()=>n});const n=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"})},58727:(e,t,i)=>{i.d(t,{GC:()=>g,T2:()=>x,VY:()=>f,dO:()=>w,iJ:()=>y,v8:()=>h});var n=i(49186),s=i(66552),r=i(86211),a=i(91218),o=i(90634),l=i(60408),u=i(65864),c=i(17136),d=i(21325),p=i(31464);const f=new s.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),h=Object.freeze({}),m="frequency";async function y(e,t,i){const n=e.bin;return n.onField&&(n.onField=n.onField.trim()),n.onExpression?.value&&(n.onExpression.value=n.onExpression.value.trim()),n.splitBy&&(n.splitBy.value&&(n.splitBy.value=n.splitBy.value.trim()),n.splitBy.outAlias&&(n.splitBy.outAlias=n.splitBy.outAlias.trim())),n.stackBy&&(n.stackBy.value&&(n.stackBy.value=n.stackBy.value.trim()),n.stackBy.outAlias&&(n.stackBy.outAlias=n.stackBy.outAlias.trim())),"normalizationField"in n.parameters&&n.parameters.normalizationField&&(n.parameters.normalizationField=n.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:m}]),g(e,t,i)}async function g(e,t,i){const{outFields:n,orderByFields:s,groupByFieldsForStatistics:r,outStatistics:a}=e;if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),x(e,t,i)}async function x(e,t,s){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:s}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=s?f.fromJSON(s):(0,r.Ij)(o),c=o&&((0,d.EA)(o)||(0,d.K8)(o))?a:await(0,p.Nk)(o,d.KK).then(()=>(0,p.Cv)(a,d.KK)),h=await i.e(9159).then(i.bind(i,49159));await h.load();const m=h.execute(c,t||1,{unit:u})??void 0;if(!m||!(0,l.Bi)(m)||0===m.rings.length)throw new n.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return m}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,o.HA)(m),m.spatialReference=t}if(m){await(0,p.Nk)(m.spatialReference,s),m=function(e,t){const i=e.spatialReference;return v(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,s);const t=(await(0,c.el)((0,u.rS)(m)))[0];if(null==t)throw h;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,n=i&&v(m,s)?{extendedParams:{densificationStep:8*i}}:void 0,r=t.toJSON(),a=(0,p.Cv)(r,r.spatialReference,s,n);if(!a)throw h;a.spatialReference=s,e.geometry=a}return e}function v(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,d.aI)(i,t)&&!(0,a.canProjectWithoutEngine)(i,t)}function w(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,i)=>{i.d(t,{A:()=>y});var n=i(31635),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(69540),u=i(25482),c=i(57231),d=i(93223);let p=class extends((0,l.OU)(u.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,n.Cg)([(0,r.MZ)({type:Number,json:{name:"number",write:!0}})],p.prototype,"value",void 0),(0,n.Cg)([(0,d.e)(c.g)],p.prototype,"unit",void 0),p=(0,n.Cg)([(0,r.$K)("esri.rest.support.DateBinTimeInterval")],p);const f=p;function h(e,t,i){(0,s.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function m(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}p.from=(0,a.dp)(p);let y=class extends o.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,n.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>m(t,"end")},write:{writer:h}}})],y.prototype,"end",void 0),(0,n.Cg)([(0,r.MZ)({type:f,json:{name:"parameters",write:!0}})],y.prototype,"interval",void 0),(0,n.Cg)([(0,r.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],y.prototype,"offset",void 0),(0,n.Cg)([(0,r.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],y.prototype,"returnFullIntervalBin",void 0),(0,n.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>m(t,"start")},write:{writer:h}}})],y.prototype,"start",void 0),(0,n.Cg)([(0,r.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],y.prototype,"snapToData",void 0),(0,n.Cg)([(0,d.e)({dateBin:"date"},{readOnly:!0})],y.prototype,"type",void 0),y=(0,n.Cg)([(0,r.$K)("esri.rest.support.DateBinParameters")],y),y.from=(0,a.dp)(y)},60909:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(31635),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(41366),u=i(93223);function c(e,t,i){(0,s.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(o.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:c}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:c}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,u.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,n.Cg)([(0,r.$K)("esri.rest.support.FixedIntervalBinParameters")],d),d.from=(0,a.dp)(d)},62660:(e,t,i)=>{i.d(t,{tC:()=>w,c0:()=>v,xt:()=>x});var n=i(49186),s=i(94078),r=i(12176),a=i(60408),o=i(21325);function l(e,t){return c(e,t.coords[0],t.coords[1])}function u(e,t){const{coords:i,lengths:n,stride:s}=t;if(!n)return!1;for(let t=0,r=0;t<n.length;t++,r+=s)if(!c(e,i[r],i[r+1]))return!1;return!0}function c(e,t,i){if(!e)return!1;const{coords:n,lengths:s,stride:r}=e;let a=!1,o=0;for(const e of s)a=d(a,n,r,o,e,t,i),o+=e*r;return a}function d(e,t,i,n,s,r,a){let o=e,l=n;for(let e=n,u=n+s*i;e<u;e+=i){l=e+i,l===u&&(l=n);const s=t[e],c=t[e+1],d=t[l],p=t[l+1];(c<a&&p>=a||p<a&&c>=a)&&s+(a-c)/(p-c)*(d-s)<r&&(o=!o)}return o}var p=i(90708),f=i(51441),h=i(31464);const m="unsupported-query",y={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},g={esriSpatialRelIntersects:()=>Promise.all([i.e(3661),i.e(1878),i.e(5756),i.e(3299),i.e(7360)]).then(i.bind(i,55284)),esriSpatialRelContains:()=>Promise.all([i.e(3661),i.e(1878),i.e(5756),i.e(3299),i.e(1867)]).then(i.bind(i,29127)),esriSpatialRelCrosses:()=>Promise.all([i.e(3661),i.e(1878),i.e(5756),i.e(3299),i.e(9700)]).then(i.bind(i,85672)),esriSpatialRelDisjoint:()=>Promise.all([i.e(3661),i.e(1878),i.e(5756),i.e(3299),i.e(1598)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(3661),i.e(1878),i.e(5756),i.e(3299),i.e(1414)]).then(i.bind(i,46178)),esriSpatialRelTouches:()=>Promise.all([i.e(3661),i.e(1878),i.e(5756),i.e(3299),i.e(2503)]).then(i.bind(i,83547)),esriSpatialRelWithin:()=>Promise.all([i.e(3661),i.e(1878),i.e(5756),i.e(3299),i.e(9265)]).then(i.bind(i,85445)),esriSpatialRelRelation:null};async function x(e,t,i){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,p.Ye)(t,!1,!1);return t=>l(e,t)}if("esriGeometryMultipoint"===i){const i=(0,p.Ye)(t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,e)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,s.qz)(t,(0,f.pL)(i,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,s.rL)(t,(0,f.pL)(i,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(n=i)?r.xB:(0,r.xK)(n);return n=>e(t,(0,f.pL)(i,n))}}var n;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const o=await function(e){const t=g[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>o.execute(t,(0,f.pL)(i,e))}async function v(e,t,i){const{spatialRel:s,geometry:r}=e;if(r){if(null==(l=s)||!0!==y.spatialRelationship[l])throw new n.A(m,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(r.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===y.queryGeometry[(0,a.$B)(e)]}(r))throw new n.A(m,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===y.layerGeometry[e]}(t))throw new n.A(m,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,h.Nk)(e.geometry?.spatialReference,e.outSR)}}var l}function w(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},69052:(e,t,i)=>{i.d(t,{hr:()=>s,ie:()=>l,uC:()=>o});var n=i(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return r(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+a(this.range,e-t,i)}minimalMonotonic(e,t,i){return r(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);const i=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(n)?i:n}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function r(e,t,i,n,s=0,r=!1){return(n-=s)<t?n+=a(e,t-n):n>i&&(n-=a(e,n-i)),r&&n===i&&(n=t),n+s}function a(e,t,i=0){return Math.ceil((t-i)/e)*e+i}const o=new s(0,2*Math.PI),l=(new s(-Math.PI,Math.PI),new s(0,360))},70328:(e,t,i)=>{i.d(t,{BI:()=>v,DC:()=>d,Ej:()=>f,Ie:()=>g,Jt:()=>x,Ne:()=>h,RF:()=>c,aI:()=>_,fA:()=>a,gE:()=>l,hZ:()=>y,iT:()=>p,is:()=>w,qv:()=>F,vI:()=>m,vY:()=>o,v_:()=>S,vt:()=>r,w1:()=>u});var n=i(5443),s=(i(19419),i(4197));function r(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t,i,n,s,a,o=r()){return o[0]=e,o[1]=t,o[2]=i,o[3]=n,o[4]=s,o[5]=a,o}function o(e,t=r()){return function(e,t,i,n=r()){return y(n,F),function(e,t,i=0,n=t.length/3){let s=e[0],r=e[1],a=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)s=Math.min(s,t[i+3*e]),r=Math.min(r,t[i+3*e+1]),a=Math.min(a,t[i+3*e+2]),o=Math.max(o,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=s,e[1]=r,e[2]=a,e[3]=o,e[4]=l,e[5]=u}(n,e,t,i),n}(e,0,e.length/3,t)}function l(e,t=(0,s.jh)(24)){const[i,n,r,a,o,l]=e;return t[0]=i,t[1]=n,t[2]=r,t[3]=i,t[4]=n,t[5]=l,t[6]=i,t[7]=o,t[8]=r,t[9]=i,t[10]=o,t[11]=l,t[12]=a,t[13]=n,t[14]=r,t[15]=a,t[16]=n,t[17]=l,t[18]=a,t[19]=o,t[20]=r,t[21]=a,t[22]=o,t[23]=l,t}function u(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new n.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function f(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function m(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?y(e,F):r(F)}function x(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function v(e,t,i,n,s){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function w(e){return 6===e.length}function _(e,t,i){if(null==e||null==t)return e===t;if(!w(e)||!w(t))return!1;if(i){for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const F=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];r()},80754:(e,t,i)=>{i.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var n=i(82799),s=i(16930),r=i(60408);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,r.Bi)(e)?e.rings:e.paths}},86420:(e,t,i)=>{i.d(t,{I:()=>r,W:()=>s});var n=i(21818);async function s(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:s,endTimeField:r}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(s&&r)await t.forEach(e=>{const t=i.getAttribute((0,n.z)(e),s),l=i.getAttribute((0,n.z)(e),r);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))});else{const e=s||r;await t.forEach(t=>{const s=i.getAttribute((0,n.z)(t),e);null==s||isNaN(s)||(a=Math.min(a,s),o=Math.max(o,s))})}return{start:a,end:o}}function r(e,t,i){if(!t||!e)return null;const{startTimeField:n,endTimeField:s}=e;if(!n&&!s)return null;const{start:r,end:a}=t;if(null===r&&null===a)return null;if(void 0===r&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return n&&s?function(e,t,i,n,s){return null!=n&&null!=s?r=>{const a=e(r,t),o=e(r,i);return(null==a||a<=s)&&(null==o||o>=n)}:null!=n?t=>{const s=e(t,i);return null==s||s>=n}:null!=s?i=>{const n=e(i,t);return null==n||n<=s}:void 0}(o,n,s,r,a):function(e,t,i,n){return null!=i&&null!=n&&i===n?n=>e(n,t)===i:null!=i&&null!=n?s=>{const r=e(s,t);return null!=r&&r>=i&&r<=n}:null!=i?n=>{const s=e(n,t);return null!=s&&s>=i}:null!=n?i=>{const s=e(i,t);return null!=s&&s<=n}:void 0}(o,n||s,r,a)}},91218:(e,t,i)=>{i.r(t),i.d(t,{canProjectWithoutEngine:()=>k,initializeProjection:()=>L,isEqualBaseGCS:()=>Z,isLoaded:()=>A,isLoadedOrLoad:()=>C,isLoadedOrLoadFor:()=>z,load:()=>O,project:()=>q,projectAsync:()=>Q,projectExtent:()=>te,projectMany:()=>P,projectMultipoint:()=>J,projectOrLoad:()=>N,projectOrLoadMany:()=>E,projectPoint:()=>U,projectPolygon:()=>X,projectPolyline:()=>K,projectWithoutEngine:()=>$,requiresLoad:()=>B,test:()=>V,tryProject:()=>G,unload:()=>D});var n=i(49186),s=i(74887),r=i(62788),a=i(95488),o=i(51850),l=i(21276),u=i(73941),c=i(5443),d=i(91075),p=i(48526),f=i(86738),h=i(39829),m=i(82799),y=i(16930),g=i(159),x=i(9762),v=i(37539);function w(e,t,i,n,s,r){return _[0]=e,_[1]=t,_[2]=i,(0,x.projectBuffer)(_,n,0,s,r,0)}const _=(0,o.vt)();var F=i(21325);let S=null,I=null,R=null,M=null,T={};const b=new a.I;function A(){return!!(I?.isLoaded()&&R?.isLoaded()&&M?.isLoaded())}function C(){return!!A()||((0,r.gc)(b),O(),!1)}function z(e,t){return!e||!t||k(e,t)||C()}function B(e,t){return!k(e,t)&&!A()}async function O(e){null==S&&(S=Promise.all([i.e(3276).then(i.bind(i,83276)).then(e=>(I=e,I.load())),i.e(8377).then(i.bind(i,8377)).then(e=>(R=e,R.load())),i.e(2158).then(i.bind(i,12158)).then(e=>(M=e,M.load()))])),await S,(0,s.Te)(e),b.notify()}function q(e,t,i){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),P(e,e[0].spatialReference,t,i)):((0,l.f)(e),P([e],e.spatialReference,t,i)[0])}function P(e,t,i,n){if(null==t||null==i)return e;if(k(t,i,n))return e.map(e=>$(e,t,i));if(null==n?.geographicTransformation&&(0,u.jA)(t))return P(e.map(e=>$(e,t,y.A.WGS84)),y.A.WGS84,i,{zConversionDisabled:n?.zConversionDisabled});if(null==n?.geographicTransformation&&(0,u.jA)(i))return P(e,t,y.A.WGS84).map(e=>$(e,y.A.WGS84,i));if(!A())throw new j;if(!n?.geographicTransformation)if(n?.extendedParams)n={...n,geographicTransformation:M.getTransformation(t,i,n.areaOfInterestExtent)||new g.A};else if(!n?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,i);let s=T[e];s||(s=M.getTransformation(t,i)||new g.A,T[e]=s),n={geographicTransformation:s,zConversionDisabled:n?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof d.A?I.executeMany(e,i,n):R.executeMany(e,i,n)}function G(e,t,i){try{return q(e,t,i)}catch(e){return null}}function N(e,t){const i=E([e],t);return null!=i.pending?{pending:i.pending,geometry:null}:null!=i.geometries?{pending:null,geometry:i.geometries[0]}:{pending:null,geometry:null}}function E(e,t,i){if(!A())for(const i of e)if(null!=i&&!(0,F.aI)(i.spatialReference,t)&&(0,F.fn)(i.spatialReference)&&(0,F.fn)(t)&&!k(i.spatialReference,t))return(0,r.gc)(b),{pending:O(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,F.aI)(e.spatialReference,t)?e:(0,F.fn)(e.spatialReference)&&(0,F.fn)(t)?q(e,t,i):null)}}class j extends n.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function D(){S=null,I=null,R=null,M=null,T={}}const V={get loadPromise(){return S}};async function Q(e,t,i){if((0,s.Te)(i),!e)return e;const n=E(Array.isArray(e)?e:[e],t,i);if(n.pending)return await n.pending,(0,s.Te)(i),Q(e,t,i);const r=n.geometries??[];return Array.isArray(e)?r:r[0]}function k(e,t,i){return!(i?.areaOfInterestExtent||i?.extendedParams||i?.geographicTransformation)&&(!!(0,F.aI)(e,t)||(0,F.fn)(e)&&(0,F.fn)(t)&&!!(0,v.jd)(e,t))}function Z(e,t){if((0,F.aI)(e,t))return!0;if(!(0,F.fn)(e)||!(0,F.fn)(t))return!1;const i=(0,F.oT)(e)||(0,F.K8)(e)||(0,F.x1)(e),n=(0,F.oT)(t)||(0,F.K8)(t)||(0,F.x1)(t);return i&&n}async function L(e,t,i,n){if(A())return(0,s.NO)(n);if(Array.isArray(e)){for(const{source:t,dest:i,options:s}of e)if(t&&i&&!k(t,i,s))return O(n)}else if(e&&t&&!k(e,t,i))return O(n);return(0,s.NO)(n)}function $(e,t,i){return e?"x"in e?H(e,t,new f.A,i,0):"xmin"in e?ie(e,t,new c.A,i,0):"rings"in e?ee(e,t,new h.A,i,0):"paths"in e?Y(e,t,new m.A,i,0):"points"in e?W(e,t,new p.A,i,0):null:null}function U(e,t,i=t.spatialReference,n=0){return null!=i&&null!=e.spatialReference&&null!=H(e,e.spatialReference,t,i,n)}function H(e,t,i,n,s){se[0]=e.x,se[1]=e.y;const r=e.z;return se[2]=void 0!==r?r:s,(0,x.projectBuffer)(se,t,0,se,n,0)?(i.x=se[0],i.y=se[1],i.spatialReference=n,void 0!==r||(0,u.xP)(n)?(i.z=se[2],i.hasZ=!0):(i.z=void 0,i.hasZ=!1),void 0===e.m?(i.m=void 0,i.hasM=!1):(i.m=e.m,i.hasM=!0),i):null}function J(e,t,i=t.spatialReference,n=0){return null!=e.spatialReference&&null!=i&&null!=W(e,e.spatialReference,t,i,n)}function W(e,t,i,n,s){const{points:r,hasZ:a,hasM:o}=e,l=[],c=r.length,d=[];for(const e of r)d.push(e[0],e[1],a?e[2]:s);if(!(0,x.projectBuffer)(d,t,0,d,n,0,c))return null;const p=a||(0,u.xP)(n);for(let e=0;e<c;++e){const t=3*e,i=d[t],n=d[t+1];p&&o?l.push([i,n,d[t+2],r[e][3]]):p?l.push([i,n,d[t+2]]):o?l.push([i,n,r[e][2]]):l.push([i,n])}return i.points=l,i.spatialReference=n,i.hasZ=a,i.hasM=o,i}function K(e,t,i=t.spatialReference,n=0){return null!=e.spatialReference&&null!=i&&null!=Y(e,e.spatialReference,t,i,n)}function Y(e,t,i,n,s){const{paths:r,hasZ:a,hasM:o}=e,l=[];if(!ne(r,a??!1,o??!1,t,l,n,s))return null;const c=a||(0,u.xP)(n);return i.paths=l,i.spatialReference=n,i.hasZ=c,i.hasM=o,i}function X(e,t,i=t.spatialReference,n=0){return null!=e.spatialReference&&null!=i&&null!=ee(e,e.spatialReference,t,i,n)}function ee(e,t,i,n,s){const{rings:r,hasZ:a,hasM:o}=e,l=[];if(!ne(r,a??!1,o??!1,t,l,n,s))return null;const c=a||(0,u.xP)(n);return i.rings=l,i.spatialReference=n,i.hasZ=c,i.hasM=o,i}function te(e,t,i=t.spatialReference,n=0){return null!=e.spatialReference&&null!=i&&null!=ie(e,e.spatialReference,t,i,n)}function ie(e,t,i,n,s){const{xmin:r,ymin:a,xmax:o,ymax:l,hasZ:c,hasM:d}=e;if(!w(r,a,c?e.zmin:s,t,se,n))return null;const p=c||(0,u.xP)(n);return i.xmin=se[0],i.ymin=se[1],p&&(i.zmin=se[2]),w(o,l,c?e.zmax:s,t,se,n)?(i.xmax=se[0],i.ymax=se[1],p&&(i.zmax=se[2]),d&&(i.mmin=e.mmin,i.mmax=e.mmax),i.spatialReference=n,i):null}function ne(e,t,i,n,s,r,a=0){const o=new Array;for(const i of e)for(const e of i)o.push(e[0],e[1],t?e[2]:a);if(!(0,x.projectBuffer)(o,n,0,o,r,0))return!1;let l=0;s.length=0;const c=t||(0,u.xP)(r);for(const t of e){const e=new Array;for(const n of t)c&&i?e.push([o[l++],o[l++],o[l++],n[3]]):c?e.push([o[l++],o[l++],o[l++]]):i?(e.push([o[l++],o[l++],n[2]]),l++):(e.push([o[l++],o[l++]]),l++);s.push(e)}return!0}const se=(0,o.vt)()},92300:(e,t,i)=>{i.d(t,{V:()=>a,X:()=>r});var n=i(60408),s=i(65864);function r(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function a(e,t,i){const n=(0,s.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=i,t})}},99157:(e,t,i)=>{i.d(t,{A:()=>o});var n,s=i(31635),r=i(69622),a=i(91429);let o=n=class extends r.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new n({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,s.Cg)([(0,a.MZ)()],o.prototype,"isInverse",void 0),(0,s.Cg)([(0,a.MZ)()],o.prototype,"wkt",void 0),(0,s.Cg)([(0,a.MZ)()],o.prototype,"wkid",void 0),o=n=(0,s.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformationStep")],o)},99352:(e,t,i)=>{i.d(t,{F:()=>n,P:()=>s});const n={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},s={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8241],{48241:(e,l,t)=>{t.r(l),t.d(l,{build:()=>c.b,calculateAnchorPosition:()=>c.c,fullUV:()=>c.f}),t(37585),t(48163),t(91829),t(79258),t(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8241],{48241:(e,l,t)=>{t.r(l),t.d(l,{build:()=>c.b,calculateAnchorPosition:()=>c.c,fullUV:()=>c.f}),t(37585),t(48163),t(91829),t(79258),t(68317),t(36782),t(47522),t(40268),t(63578),t(50832),t(42593),t(82094),t(42398),t(63365),t(52587),t(20693),t(47286),t(14314),t(81961),t(71988),t(33094),t(20304),t(31821),t(12791),t(63761),t(14113);var c=t(13259)}}]);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@mixin utilityNetworkAssociations() {
|
|
2
2
|
.esri-un-associations {
|
|
3
3
|
$header_height: 48px;
|
|
4
|
+
$icon_width: 32px;
|
|
4
5
|
$panel_padding: 0.5rem;
|
|
5
6
|
|
|
6
7
|
&__action {
|
|
@@ -123,18 +124,19 @@
|
|
|
123
124
|
|
|
124
125
|
&__status-icon {
|
|
125
126
|
&-loading {
|
|
126
|
-
width:
|
|
127
|
+
width: $icon_width;
|
|
127
128
|
}
|
|
128
129
|
|
|
129
130
|
&-warning {
|
|
130
|
-
width:
|
|
131
|
+
width: $icon_width;
|
|
132
|
+
color: var(--calcite-color-high-saturation-yellow-h-yy-060);
|
|
131
133
|
}
|
|
132
134
|
}
|
|
133
135
|
|
|
134
136
|
&__switch {
|
|
135
137
|
display: flex;
|
|
136
138
|
align-items: center;
|
|
137
|
-
width:
|
|
139
|
+
width: $icon_width;
|
|
138
140
|
height: $header_height;
|
|
139
141
|
}
|
|
140
142
|
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
@mixin utilityNetworkValidateTopology() {
|
|
2
2
|
.esri-un-validate-topology {
|
|
3
|
+
$header_height: 48px;
|
|
4
|
+
$icon_width: 32px;
|
|
5
|
+
|
|
6
|
+
&__action {
|
|
7
|
+
height: $header_height;
|
|
8
|
+
}
|
|
9
|
+
|
|
3
10
|
&__container {
|
|
4
11
|
width: 330px;
|
|
5
12
|
}
|
|
@@ -15,23 +22,20 @@
|
|
|
15
22
|
}
|
|
16
23
|
|
|
17
24
|
&__status-icon {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
width: $icon_width;
|
|
26
|
+
|
|
27
|
+
&-blank {
|
|
28
|
+
width: $icon_width;
|
|
21
29
|
}
|
|
22
30
|
|
|
23
31
|
&-error {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
padding-top: 16px;
|
|
27
|
-
padding-left: 16px;
|
|
32
|
+
width: $icon_width;
|
|
33
|
+
color: var(--calcite-color-high-saturation-yellow-h-yy-060);
|
|
28
34
|
}
|
|
29
35
|
|
|
30
36
|
&-success {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
padding-top: 16px;
|
|
34
|
-
padding-left: 16px;
|
|
37
|
+
width: $icon_width;
|
|
38
|
+
color: var(--calcite-color-high-saturation-green-h-gg-060);
|
|
35
39
|
}
|
|
36
40
|
}
|
|
37
41
|
}
|