@arcgis/core 4.23.0-next.20220131 → 4.23.0-next.20220205
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/Graphic.js +1 -1
- package/TimeExtent.js +1 -1
- package/assets/components/assets/calcite-date-picker/nls/pt-BR.json +31 -0
- package/assets/components/assets/calcite-date-picker/nls/pt-PT.json +3 -3
- package/assets/components/assets/calcite-icon/clipboard16.json +1 -0
- package/assets/components/assets/calcite-icon/clipboard24.json +1 -0
- package/assets/components/assets/calcite-icon/clipboard32.json +1 -0
- package/assets/components/assets/calcite-icon/folders16.json +1 -0
- package/assets/components/assets/calcite-icon/folders24.json +1 -0
- package/assets/components/assets/calcite-icon/folders32.json +1 -0
- package/assets/components/assets/calcite-icon/initiative16.json +1 -0
- package/assets/components/assets/calcite-icon/initiative24.json +1 -0
- package/assets/components/assets/calcite-icon/initiative32.json +1 -0
- package/assets/components/assets/calcite-icon/initiativeTemplate16.json +1 -0
- package/assets/components/assets/calcite-icon/initiativeTemplate24.json +1 -0
- package/assets/components/assets/calcite-icon/initiativeTemplate32.json +1 -0
- package/assets/components/assets/calcite-icon/multipleVariables16.json +1 -0
- package/assets/components/assets/calcite-icon/multipleVariables24.json +1 -0
- package/assets/components/assets/calcite-icon/multipleVariables32.json +1 -0
- package/assets/components/assets/calcite-icon/paletteCheck16.json +1 -0
- package/assets/components/assets/calcite-icon/paletteCheck24.json +1 -0
- package/assets/components/assets/calcite-icon/paletteCheck32.json +1 -0
- package/assets/components/assets/calcite-icon/pentagon16.json +1 -0
- package/assets/components/assets/calcite-icon/pentagon24.json +1 -0
- package/assets/components/assets/calcite-icon/pentagon32.json +1 -0
- package/assets/components/assets/calcite-icon/puzzlePiece16.json +1 -0
- package/assets/components/assets/calcite-icon/puzzlePiece24.json +1 -0
- package/assets/components/assets/calcite-icon/puzzlePiece32.json +1 -0
- package/assets/components/assets/calcite-icon/ribbonRosette16.json +1 -0
- package/assets/components/assets/calcite-icon/ribbonRosette24.json +1 -0
- package/assets/components/assets/calcite-icon/ribbonRosette32.json +1 -0
- package/assets/components/assets/calcite-icon/speechBubbleExclamation16.json +1 -0
- package/assets/components/assets/calcite-icon/speechBubbleExclamation24.json +1 -0
- package/assets/components/assets/calcite-icon/speechBubbleExclamation32.json +1 -0
- package/assets/components/assets/calcite-icon/survey16.json +1 -0
- package/assets/components/assets/calcite-icon/survey24.json +1 -0
- package/assets/components/assets/calcite-icon/survey32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{7a5f5acfbd4ca1a5c1f3.js → 06116433eb6e669f146b.js} +1 -1
- package/assets/esri/core/workers/chunks/0a4401a148c3cb73d6ff.js +1 -0
- package/assets/esri/core/workers/chunks/{83d00afae4406ec78bc9.js → 0c6be307709523eb8a05.js} +1 -1
- package/assets/esri/core/workers/chunks/{e0c8d61c7a85ce15499a.js → 0d9adefd00c44585be2e.js} +1 -1
- package/assets/esri/core/workers/chunks/{44f0c3663b293afbd172.js → 0e09691edb44641de5f0.js} +1 -1
- package/assets/esri/core/workers/chunks/0e215fa28a0448169132.js +1 -0
- package/assets/esri/core/workers/chunks/{391e96192d1ec4e55ce2.js → 101b4f02f0572afb666f.js} +1 -1
- package/assets/esri/core/workers/chunks/{db3c729ce0c0b2690dc9.js → 1180ffd523c6292bc04e.js} +1 -1
- package/assets/esri/core/workers/chunks/{826c983100569586b61f.js → 1571e8213feb518ff100.js} +1 -1
- package/assets/esri/core/workers/chunks/{929c9b7cdab7c4ca3d87.js → 17c51f5a13f471e6656a.js} +1 -1
- package/assets/esri/core/workers/chunks/{37c03cfc19086ce631c6.js → 18a8b9e2f6bd89827189.js} +1 -1
- package/assets/esri/core/workers/chunks/{ed0bcc66fb1e0ee75a4b.js → 1f34957ef42e5b5977d0.js} +1 -1
- package/assets/esri/core/workers/chunks/236de5f0476f6080ee62.js +1 -0
- package/assets/esri/core/workers/chunks/288ca064cd0472439276.js +1 -0
- package/assets/esri/core/workers/chunks/29aa6046534a43d7ce19.js +1 -0
- package/assets/esri/core/workers/chunks/2e1291cd831592216446.js +1 -0
- package/assets/esri/core/workers/chunks/{68a59ce98177d8513337.js → 3403cb53e4e60923c5fc.js} +1 -1
- package/assets/esri/core/workers/chunks/34bed896b68993cabaa1.js +1 -0
- package/assets/esri/core/workers/chunks/{99619fcb772807c74f3b.js → 444829a840b8ded16fd7.js} +1 -1
- package/assets/esri/core/workers/chunks/467b5faa1c90d9821609.js +1 -0
- package/assets/esri/core/workers/chunks/49353182a16218a84251.js +1 -0
- package/assets/esri/core/workers/chunks/{fc046a15466c25d081ff.js → 4a2e93b12d60e8d92491.js} +1 -1
- package/assets/esri/core/workers/chunks/4de996ebc432f5e149bc.js +1 -0
- package/assets/esri/core/workers/chunks/50976921acf7bd636123.js +1 -0
- package/assets/esri/core/workers/chunks/5144ef135e0deb48c7bf.js +1 -0
- package/assets/esri/core/workers/chunks/584bbb675ed225f68171.js +1 -0
- package/assets/esri/core/workers/chunks/5a90d121ba79613cc2aa.js +1 -0
- package/assets/esri/core/workers/chunks/5b286f3f3deea10bdd91.js +1 -0
- package/assets/esri/core/workers/chunks/{0463ba46df855a92b9c0.js → 65ccd204ec3053687a77.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f8c6a179e39fd4c5e6f.js → 6a2b8d6a9bada45ab66d.js} +1 -1
- package/assets/esri/core/workers/chunks/6be326edd9829781d926.js +1 -0
- package/assets/esri/core/workers/chunks/6ea99a6e21b09674f6b3.js +1 -0
- package/assets/esri/core/workers/chunks/{5bcb3240b3c005e5fe72.js → 7215af7810d15e89aa5a.js} +1 -1
- package/assets/esri/core/workers/chunks/7509c1693ffedc0fa018.js +1 -0
- package/assets/esri/core/workers/chunks/7b0b75878370b3475fe5.js +1 -0
- package/assets/esri/core/workers/chunks/{bfedd6ebff817c9b31c0.js → 7b618c449d793aacd874.js} +1 -1
- package/assets/esri/core/workers/chunks/{2460f3b6ada6ae900dec.js → 7c0ff01f081c7e9050d2.js} +1 -1
- package/assets/esri/core/workers/chunks/806a7db0084214a53c79.js +1 -0
- package/assets/esri/core/workers/chunks/{8fa0a14165d43ffe87a5.js → 8325b577f52936f86cff.js} +1 -1
- package/assets/esri/core/workers/chunks/84d8e77d78d0d5134083.js +1 -0
- package/assets/esri/core/workers/chunks/{dd13772a5e2eccc6a2bc.js → 8598f762f15ca68d52b7.js} +1 -1
- package/assets/esri/core/workers/chunks/85b1ae51da3689bccf92.js +1 -0
- package/assets/esri/core/workers/chunks/873b0cbd343dc71755ed.js +1 -0
- package/assets/esri/core/workers/chunks/8804b8489eeab888275b.js +1 -0
- package/assets/esri/core/workers/chunks/{5ec98f4ddac707d0fbd1.js → 88815d533808aabb1fa9.js} +1 -1
- package/assets/esri/core/workers/chunks/8c8c0ecdf44fdbb56000.js +1 -0
- package/assets/esri/core/workers/chunks/{f2124f4d0f2b8a91f0ea.js → 90c5edcd8a609224ce55.js} +1 -1
- package/assets/esri/core/workers/chunks/{bac9fc90e6756e211160.js → 94d9951509c0db09547a.js} +1 -1
- package/assets/esri/core/workers/chunks/996d6ae7f2e2273f9bce.js +1 -0
- package/assets/esri/core/workers/chunks/{c1135cb02ec46c491459.js → 9ce961bc390202c87941.js} +1 -1
- package/assets/esri/core/workers/chunks/9fbc7d2e0326be41b382.js +1 -0
- package/assets/esri/core/workers/chunks/a363fb40096679b011f6.js +1 -0
- package/assets/esri/core/workers/chunks/a41522b0a853b85c8269.js +1 -0
- package/assets/esri/core/workers/chunks/a763c11d2b02b3ec36ad.js +1 -0
- package/assets/esri/core/workers/chunks/{aeaa1667c2d9f1b3366b.js → a85ed251d3d3668e474f.js} +1 -1
- package/assets/esri/core/workers/chunks/{69fd99b7c76e9992ccf3.js → b32bf9808cb4be3a6bd0.js} +1 -1
- package/assets/esri/core/workers/chunks/b33a6fbbc8de2969b1ca.js +1 -0
- package/assets/esri/core/workers/chunks/b548e6b3add4154ac4e6.js +1 -0
- package/assets/esri/core/workers/chunks/b6c55bdd8c957b062bc1.js +1 -0
- package/assets/esri/core/workers/chunks/b90509b2088fd444fc39.js +1 -0
- package/assets/esri/core/workers/chunks/{b9e9cb354822c6d995a4.js → bea473dba8e57617a71d.js} +1 -1
- package/assets/esri/core/workers/chunks/{0d02c6ad1f4688bfa374.js → bf7c44644fe7b0aa60cf.js} +1 -1
- package/assets/esri/core/workers/chunks/c1a70f025e90d97fac6d.js +1 -0
- package/assets/esri/core/workers/chunks/{d72488db62fcf39447b6.js → c23d965a55215168a1a2.js} +1 -1
- package/assets/esri/core/workers/chunks/c3192cfe115ce354ffbc.js +1 -0
- package/assets/esri/core/workers/chunks/c3d768801f2f6cb9d5d0.js +1 -0
- package/assets/esri/core/workers/chunks/d09a0b2dc3a6fc10fa41.js +1 -0
- package/assets/esri/core/workers/chunks/d21526570300597aa6ae.js +1 -0
- package/assets/esri/core/workers/chunks/d2ffb0f21363c0d3d2a9.js +1 -0
- package/assets/esri/core/workers/chunks/{ec10151a2a95e95a0bb5.js → d304fe0ac836afd46e3d.js} +1 -1
- package/assets/esri/core/workers/chunks/{37a7bd30352b1309b8f8.js → d3f05b8e4bd53eb1eb9d.js} +1 -1
- package/assets/esri/core/workers/chunks/{17de7a324dfa7f57ad5d.js → d780e946149b1c3d1246.js} +1 -1
- package/assets/esri/core/workers/chunks/dc037f1496bb4aa40d10.js +1 -0
- package/assets/esri/core/workers/chunks/{8cbb04a9065aa3756638.js → dc04a8ba6c770bdc2bd4.js} +1 -1
- package/assets/esri/core/workers/chunks/dd5a71818a989a6edb00.js +1 -0
- package/assets/esri/core/workers/chunks/{89820b200ee44e678af5.js → dd891a98105904f8a06b.js} +1 -1
- package/assets/esri/core/workers/chunks/e17edd48179d41ddf1e7.js +1 -0
- package/assets/esri/core/workers/chunks/e323086de328a164f7f0.js +1 -0
- package/assets/esri/core/workers/chunks/ea50a6a994e5ee578d97.js +1 -0
- package/assets/esri/core/workers/chunks/{655b55ac0cd533d7e9d7.js → ecf074743183c1749581.js} +1 -1
- package/assets/esri/core/workers/chunks/f067b4fc65b835437afd.js +1 -0
- package/assets/esri/core/workers/chunks/f0e5c82e9c4fbe3c9d0a.js +1 -0
- package/assets/esri/core/workers/chunks/f96b24c075771d028e20.js +1 -0
- package/assets/esri/core/workers/chunks/{5790d171072b3c7d108f.js → f9a6de00c628538f07f6.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c607d30ff8ca1b61286.js → fe0c3b7c9b428d9c3f25.js} +1 -1
- package/assets/esri/core/workers/chunks/{49a1a633bb0d93764aae.js → fffea9587ec14c6d34e8.js} +1 -1
- package/assets/esri/themes/base/_mixins.scss +1 -1
- package/assets/esri/themes/base/widgets/_Directions.scss +0 -6
- package/assets/esri/themes/base/widgets/_Legend.scss +8 -7
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/dark-blue/main.css +1 -1
- package/assets/esri/themes/dark-green/main.css +1 -1
- package/assets/esri/themes/dark-purple/main.css +1 -1
- package/assets/esri/themes/dark-red/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/themes/light-blue/main.css +1 -1
- package/assets/esri/themes/light-green/main.css +1 -1
- package/assets/esri/themes/light-purple/main.css +1 -1
- package/assets/esri/themes/light-red/main.css +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_en.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_nb.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
- package/chunks/Fog.glsl.js +12 -24
- package/chunks/Heatmap.glsl.js +10 -0
- package/chunks/HeatmapDensity.glsl.js +21 -0
- package/chunks/Precipitation.glsl.js +2 -2
- package/core/maybe.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/interfaces.d.ts +2432 -231
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/support/imageryRendererUtils.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/rasterFunctions/vectorFieldUtils.js +1 -1
- package/package.json +2 -2
- package/rasterRenderers.js +1 -1
- package/renderers/DictionaryRenderer.js +1 -1
- package/renderers/FlowRenderer.d.ts +4 -0
- package/renderers/FlowRenderer.js +5 -0
- package/renderers/support/DictionaryLoader.js +5 -0
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/rasterRendererHelper.js +1 -1
- package/renderers/support/rendererConversion.js +1 -1
- package/rest/geoprocessor/GPOptions.js +1 -1
- package/rest/print.js +1 -1
- package/rest/support/DirectionLine.js +1 -1
- package/rest/support/DirectionPoint.js +1 -1
- package/rest/support/FeatureSet.js +1 -1
- package/rest/support/LegendLayer.js +1 -1
- package/rest/support/LinearUnit.js +1 -1
- package/rest/support/PointBarrier.js +1 -1
- package/rest/support/PolygonBarrier.js +1 -1
- package/rest/support/PolylineBarrier.js +1 -1
- package/rest/support/RasterData.js +1 -1
- package/smartMapping/raster/renderers/flow.js +5 -0
- package/smartMapping/raster/support/utils.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/featureFlags.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/TextSymbol3DLayer.js +1 -1
- package/symbols/cim/effects/EffectArrow.js +1 -1
- package/symbols/support/Symbol3DHalo.js +1 -1
- package/symbols/support/Symbol3DTextBackground.js +5 -0
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/tasks/Geoprocessor.js +1 -1
- package/views/2d/FrameTask.js +1 -1
- package/views/2d/ViewState.js +1 -1
- package/views/2d/constraints/GeometryConstraint.js +1 -1
- package/views/2d/engine/BitmapTileContainer.js +1 -1
- package/views/2d/engine/DisplayObject.js +1 -1
- package/views/2d/engine/RasterTileContainer.js +1 -1
- package/views/2d/engine/RasterVFContainer.js +5 -0
- package/views/2d/engine/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/RasterVFTileContainer.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/flow/BrushFlow.js +1 -1
- package/views/2d/engine/flow/FlowDisplayData.js +1 -1
- package/views/2d/engine/flow/FlowGLResources.js +1 -1
- package/views/2d/engine/flow/FlowStyle.js +1 -1
- package/views/2d/engine/flow/FlowView2D.js +5 -0
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/flow/flowRendererUtils.js +5 -0
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/brushes/raster/BrushVectorField.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/Buffer.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLBaseTextTemplate.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/input/handlers/DragPan.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/KMLLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/WMSLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/Pipeline.js +1 -1
- package/views/2d/layers/features/createSymbolSchema.js +5 -0
- package/views/2d/layers/features/processors/HeatmapProcessor.js +1 -1
- package/views/2d/layers/features/processors/SymbolProcessor.js +1 -1
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/ClusterStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
- package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryVFStrategy.js +5 -0
- package/views/2d/layers/imagery/ImageryView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +5 -0
- package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
- package/views/2d/navigation/MapViewNavigation.js +1 -1
- package/views/2d/navigation/actions/Pan.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/Precipitation.js +1 -1
- package/views/3d/environment/PrecipitationTechnique.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.js +1 -1
- package/views/3d/environment/weather.js +1 -1
- package/views/3d/interactive/analysisTools/lineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/layerViewModuleImportUtils.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/IRouteLayerView3D.js +4 -0
- package/views/3d/layers/RouteLayerView3D.js +5 -0
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/labelPlacement.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +5 -0
- package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextTexture.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +5 -0
- package/views/3d/webgl-engine/shaders/Heatmap.glsl.js +5 -0
- package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +5 -0
- package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +5 -0
- package/views/MapView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/View.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/draw/support/HighlightHelper.js +5 -0
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/layerUtils.js +1 -1
- package/views/interactive/InteractiveToolBase.js +1 -1
- package/views/support/WatchUpdatingTracking.js +1 -1
- package/views/support/projectionUtils.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/enums.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/BasemapGallery/support/BasemapGalleryItem.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/BasemapToggle.js +1 -1
- package/widgets/Directions/support/resources.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Legend/styles/Card.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend/support/sizeRampUtils.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
- package/widgets/support/vnodeCache.js +5 -0
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0453fad5cb819797b4f6.js +0 -1
- package/assets/esri/core/workers/chunks/0c15d77d8e817cf45a9a.js +0 -1
- package/assets/esri/core/workers/chunks/0cd0a6eef51fc5b9ea61.js +0 -1
- package/assets/esri/core/workers/chunks/0d684f16f37d5dc385dd.js +0 -1
- package/assets/esri/core/workers/chunks/16b6d0f8378582c051c3.js +0 -1
- package/assets/esri/core/workers/chunks/1877ab1b6a115dbba1c5.js +0 -1
- package/assets/esri/core/workers/chunks/197ec52641aed20029c6.js +0 -1
- package/assets/esri/core/workers/chunks/1b2a961f776a0b57e57a.js +0 -1
- package/assets/esri/core/workers/chunks/1b3fd66577b19aa5f2b6.js +0 -1
- package/assets/esri/core/workers/chunks/1c733b7db092a2a88ef3.js +0 -1
- package/assets/esri/core/workers/chunks/2629adf79e7fd9f25f07.js +0 -1
- package/assets/esri/core/workers/chunks/27474b007988855bea9d.js +0 -1
- package/assets/esri/core/workers/chunks/2b25fc7945a187c2bb9d.js +0 -1
- package/assets/esri/core/workers/chunks/34b59d7099904dcb28b5.js +0 -1
- package/assets/esri/core/workers/chunks/422537fc3df707bb62c9.js +0 -1
- package/assets/esri/core/workers/chunks/483d5d8593d96d0f0b15.js +0 -1
- package/assets/esri/core/workers/chunks/4ba6de8aa7e2960bad49.js +0 -1
- package/assets/esri/core/workers/chunks/4be35af7d6babbfe9d84.js +0 -1
- package/assets/esri/core/workers/chunks/5457962a70bd3c557a75.js +0 -1
- package/assets/esri/core/workers/chunks/57856b4a9b8784a69844.js +0 -1
- package/assets/esri/core/workers/chunks/57b349d1dbc0bed75b79.js +0 -1
- package/assets/esri/core/workers/chunks/5d11b97b667921d67ae7.js +0 -1
- package/assets/esri/core/workers/chunks/5dbe555a5a662ff3d9ce.js +0 -1
- package/assets/esri/core/workers/chunks/64b7e8d812ea8fcf269e.js +0 -1
- package/assets/esri/core/workers/chunks/75d812955a473d0e8960.js +0 -1
- package/assets/esri/core/workers/chunks/94515fb3ef38067eeadd.js +0 -1
- package/assets/esri/core/workers/chunks/952980635afc7ec81804.js +0 -1
- package/assets/esri/core/workers/chunks/96f148a556a2418038de.js +0 -1
- package/assets/esri/core/workers/chunks/9876a1bae350795fab36.js +0 -1
- package/assets/esri/core/workers/chunks/a1930e4f035bc9aa1ae5.js +0 -1
- package/assets/esri/core/workers/chunks/a8692bffb76444c34760.js +0 -1
- package/assets/esri/core/workers/chunks/b3f5e91116112b0b612a.js +0 -1
- package/assets/esri/core/workers/chunks/ba762bcfd74af0bb8218.js +0 -1
- package/assets/esri/core/workers/chunks/be588873c16770ceb9ef.js +0 -1
- package/assets/esri/core/workers/chunks/bf6dda4a2af14c4b7716.js +0 -1
- package/assets/esri/core/workers/chunks/c2253a9f29c1aabb2b75.js +0 -1
- package/assets/esri/core/workers/chunks/c984b3040e120e502b11.js +0 -1
- package/assets/esri/core/workers/chunks/cdbc005eebec1503b99d.js +0 -1
- package/assets/esri/core/workers/chunks/d04fca5d46cca02500b7.js +0 -1
- package/assets/esri/core/workers/chunks/d1fe53b597351dc58305.js +0 -1
- package/assets/esri/core/workers/chunks/d98dab12b71912fa397b.js +0 -1
- package/assets/esri/core/workers/chunks/dedc333a61081772ca7b.js +0 -1
- package/assets/esri/core/workers/chunks/e218bde41ffbcc5194f5.js +0 -1
- package/assets/esri/core/workers/chunks/e287f49184d076af17e2.js +0 -1
- package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +0 -1
- package/assets/esri/core/workers/chunks/ea595b0df5050eda2a13.js +0 -1
- package/assets/esri/core/workers/chunks/eb82ff10cef2bde6e57f.js +0 -1
- package/assets/esri/core/workers/chunks/ee6e0db58dc64410e687.js +0 -1
- package/assets/esri/core/workers/chunks/f0a9f161805fc7a30fc5.js +0 -1
- package/renderers/AnimatedFlowRenderer.d.ts +0 -4
- package/renderers/AnimatedFlowRenderer.js +0 -5
- package/views/2d/engine/flow/AnimatedFlowView2D.js +0 -5
- package/views/2d/engine/flow/animatedFlowRendererUtils.js +0 -5
- package/views/2d/layers/imagery/ImageryGraphicsView2D.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7054],{88764:(e,t,s)=>{s.d(t,{q:()=>o});var i,r,n,a={exports:{}};i=a,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var o=n-r+1,l=i-r+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-l*c/o+h)),Math.min(n,Math.floor(i+(o-l)*c/o+h)),a)}var d=s[i],f=r,m=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);f<m;){for(t(s,f,m),f++,m--;a(s[f],d)<0;)f++;for(;a(s[m],d)>0;)m--}0===a(s[r],d)?t(s,r,m):t(s,++m,n),m<=i&&(r=m+1),i<=m&&(n=m-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const o=a.exports},43050:(e,t,s)=>{s.d(t,{S1:()=>a,on:()=>h,OY:()=>c,cm:()=>l,N1:()=>o,LR:()=>u,tH:()=>d});var i=s(91460),r=(s(22974),s(95330));const n=/\?(\.|$)/g;function a(e,t,s,i){const r=Array.isArray(t)?t:t.indexOf(",")>-1?t.split(","):[t],a=function(e,t,s,i){return e.watch(t,s,i)}(e,t,s,i);for(const t of r){const i=t.trim().replace(n,"$1"),r=e.get(i);s.call(e,r,r,i,e)}return a}function o(e,t,s,i){return d(e,t,f,s,i)}function l(e,t,s,i){return d(e,t,m,s,i)}function u(e,t,s,i){return d(e,t,p,s,i)}function c(e,t,s,i){return d(e,t,g,s,i)}function h(e,t,s,r,n,o,l){const u={};function c(t){const i=u[t];i&&(o&&o(i.target,t,e,s),i.handle.remove(),delete u[t])}const h=a(e,t,((t,a,o)=>{c(o),(0,i.vT)(t)&&(u[o]={handle:(0,i.on)(t,s,r),target:t},n&&n(t,o,e,s))}),l);return{remove(){h.remove();for(const e in u)c(e)}}}function d(e,t,s,i,n){const a="function"==typeof i?i:null,o="object"==typeof i?i:null;"boolean"==typeof i&&(n=i);let l,u=!1;function c(){l&&(l.remove(),l=null)}const h=(0,r.dD)();(0,r.fu)(o,(()=>{c(),h.reject((0,r.zE)())}));const d={then:h.promise.then.bind(h.promise),catch:h.promise.catch.bind(h.promise),remove:c};return Object.freeze(d),l=function(e,t,s,i,r){const n=e.watch(t,((t,r,n,a)=>{s&&!s(t)||null==i||i.call(e,t,r,n,a)}),r);if(Array.isArray(t))for(const r of t){const n=e.get(r);s&&s(n)&&(null==i||i.call(e,n,n,t,e))}else{const r=e.get(t);s&&s(r)&&(null==i||i.call(e,r,r,t,e))}return n}(e,t,s,((t,s,i,r)=>{u=!0,c(),a&&a.call(e,t,s,i,r),h.resolve({value:t,oldValue:s,propertyName:i,target:r})}),n),u&&c(),d}function f(e){return!!e}function m(e){return!e}function p(e){return!0===e}function g(e){return!1===e}},37455:(e,t,s)=>{s.d(t,{N:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},29730:(e,t,s)=>{s.d(t,{Y:()=>n});var i=s(70586);function r(e,t){return e?t?4:3:t?3:2}function n(e,t,s,n,l){if((0,i.Wi)(t)||!t.lengths.length)return null;const u="upperLeft"===(null==l?void 0:l.originPosition)?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const c=e.coords,h=[],d=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:f,coords:m}=t,p=r(s,n);let g=0;for(const e of f){const t=a(d,m,g,e,s,n,u);t&&h.push(t),g+=e*p}if(h.sort(((e,t)=>{let i=u*e[2]-u*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),h.length){let e=6*h[0][2];c[0]=h[0][0]/e,c[1]=h[0][1]/e,s&&(e=6*h[0][4],c[2]=0!==e?h[0][3]/e:0),(c[0]<d[0]||c[0]>d[1]||c[1]<d[2]||c[1]>d[3]||s&&(c[2]<d[4]||c[2]>d[5]))&&(c.length=0)}if(!c.length){const e=t.lengths[0]?o(m,0,f[0],s,n):null;if(!e)return null;c[0]=e[0],c[1]=e[1],s&&e.length>2&&(c[2]=e[2])}return e}function a(e,t,s,i,n,a,o=1){const l=r(n,a);let u=s,c=s+l,h=0,d=0,f=0,m=0,p=0;for(let s=0,r=i-1;s<r;s++,u+=l,c+=l){const s=t[u],i=t[u+1],r=t[u+2],a=t[c],o=t[c+1],l=t[c+2];let g=s*o-a*i;m+=g,h+=(s+a)*g,d+=(i+o)*g,n&&(g=s*l-a*r,f+=(r+l)*g,p+=g),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(m*o>0&&(m*=-1),p*o>0&&(p*=-1),!m)return null;const g=[h,d,.5*m];return n&&(g[3]=f,g[4]=.5*p),g}function o(e,t,s,i,n){const a=r(i,n);let o=t,d=t+a,f=0,m=0,p=0,g=0;for(let t=0,r=s-1;t<r;t++,o+=a,d+=a){const t=e[o],s=e[o+1],r=e[o+2],n=e[d],a=e[d+1],_=e[d+2],y=i?u(t,s,r,n,a,_):l(t,s,n,a);if(y)if(f+=y,i){const e=h(t,s,r,n,a,_);m+=y*e[0],p+=y*e[1],g+=y*e[2]}else{const e=c(t,s,n,a);m+=y*e[0],p+=y*e[1]}}return f>0?i?[m/f,p/f,g/f]:[m/f,p/f]:s>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function l(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function u(e,t,s,i,r,n){const a=i-e,o=r-t,l=n-s;return Math.sqrt(a*a+o*o+l*l)}function c(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function h(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}},7673:(e,t,s)=>{s.d(t,{Z:()=>be});var i=s(20102),r=s(22974),n=s(70586),a=s(69801),o=s(67900),l=s(60437),u=s(24470),c=s(20322),h=s(33955),d=s(38581),f=s(8744),m=s(74669),p=s(41534);const g=new class{constructor(e,t){this._cache=new m.Z(e),this._invalidCache=new m.Z(t)}get(e,t){const s=`${t.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(void 0!==this._invalidCache.get(s))return null;try{const i=p.WhereClause.create(e,t);return this._cache.put(s,i),i}catch{return this._invalidCache.put(s,null),null}}}(50,500),_="feature-store:unsupported-query",y=" as ",I=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeDate"]);function T(e,t){if(!t)return!0;const s=g.get(t,e);if(!s)throw new i.Z(_,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(_,"where clause is not standard",{where:t});return E(e,s.fieldNames,"where clause contains missing fields"),!0}function x(e,t,s){if(!t)return!0;const r=g.get(t,e);if(!r)throw new i.Z(_,"invalid SQL expression",{having:t});if(!r.isAggregate)throw new i.Z(_,"having does not contain a valid aggregate function",{having:t});const n=r.fieldNames;if(E(e,n,"having contains missing fields"),!r.getExpressions().every((t=>{const{aggregateType:i,field:r}=t,n=e.has(r)&&e.get(r).name;return s.some((t=>{const{onStatisticField:s,statisticType:r}=t;return(e.has(s)&&e.get(s).name)===n&&r.toLowerCase().trim()===i}))})))throw new i.Z(_,"expressions in having should also exist in outStatistics",{having:t});return!0}function S(e,t){return e?g.get(e,t):null}function E(e,t,s,r=!0){const n=[];for(const s of t)if("*"!==s&&!e.has(s))if(r){const t=b(s);try{const s=S(t,e);if(!s)throw new i.Z(_,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(_,"expression is not standard",{clause:s});E(e,s.fieldNames,"expression contains missing fields")}catch(e){const t=e&&e.details;if(t&&(t.clause||t.where))throw e;t&&t.missingFields?n.push(...t.missingFields):n.push(s)}}else n.push(s);if(n.length)throw new i.Z(_,s,{missingFields:n})}function b(e){return e.split(y)[0]}function R(e){return e.split(y)[1]}function F(e,t){const s=t.get(e);return!!s&&!I.has(s.type)}var v=s(37427),w=s(61159),A=s(82397),N=s(98732),V=s(8418);class C{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&-1===i.indexOf("*")){this.outFields=i;let e=0;for(const t of i){const i=b(t),r=this.fieldsIndex.get(i),n=r?null:S(i,s),a=r?r.name:R(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}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,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i).clause:s||(r=S(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r.calculateValue(e,this.featureAdapter)}getNormalizedValue(e,t){const s=t.normalizationType,i=t.normalizationTotal;let r=this.getFieldValue(e,t.field,t.fieldInfo);if(s&&Number.isFinite(r)){const n=this.getFieldValue(e,t.normalizationField,t.normalizationFieldInfo);r=(0,V.fk)(r,s,n,i)}return r}getExpressionValue(e,t,s){const i={attributes:this.featureAdapter.getAttributes(e)},r=s.createExecContext(i,t.viewInfo);return s.executeFunction(t.compiledFunc,r)}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:S(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testFeature(e,this.featureAdapter)}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:S(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testSet(e,this.featureAdapter)}_processAttributesForOutFields(e){const t=this.outFields;if(!t||!t.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if((0,n.Wi)(e)||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}var P,M,O=s(17590),k=s(11490),Q=s(35671),z=s(59266);class D{constructor(e,t,s){this.items=e,this.queryGeometry=t,this.definitionExpression=s.definitionExpression,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.fieldsIndex=s.fieldsIndex,this.timeInfo=s.timeInfo,this.featureAdapter=s.featureAdapter,this.aggregateAdapter=s.aggregateAdapter}get size(){return this.items.length}createQueryResponseForCount(e){const t=new C(e,this.featureAdapter,this.fieldsIndex);if(!e.outStatistics)return t.countDistinctValues(this.items);const{groupByFieldsForStatistics:s,having:i}=e;if(!(null==s?void 0:s.length))return 1;const r=new Map,n=new Map,a=new Set,o=e.outStatistics;for(const e of o){const{statisticType:o}=e,l="exceedslimit"!==o?e.onStatisticField:void 0;if(!n.has(l)){const e=[];for(const i of s){const s=this._getAttributeValues(t,i,r);e.push(s)}n.set(l,this._calculateUniqueValues(e,t.returnDistinctValues))}const u=n.get(l);for(const e in u){const{data:s,items:r}=u[e],n=s.join(",");i&&!t.validateItems(r,i)||a.add(n)}}return a.size}createQueryResponse(e){let t;return t=e.outStatistics?e.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(e):this._createStatisticsQueryResponse(e):this._createFeatureQueryResponse(e),e.returnQueryGeometry&&((0,f.JY)(e.outSR)&&!(0,f.fS)(this.queryGeometry.spatialReference,e.outSR)?t.queryGeometry=(0,k.S2)({spatialReference:e.outSR,...(0,v.iV)(this.queryGeometry,this.queryGeometry.spatialReference,e.outSR)}):t.queryGeometry=(0,k.S2)({spatialReference:e.outSR,...this.queryGeometry})),t}createSnappingResponse(e,t){const s=this.featureAdapter,i=function(e,t){return e?t?4:3:t?3:2}(this.hasZ,this.hasM),{x:r,y:a}=e.point,o="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,u={candidates:[]},c="esriGeometryPolygon"===this.geometryType,h=this._getPointCreator(e.point,this.spatialReference,t);for(const t of this.items){const d=s.getGeometry(t);if((0,n.Wi)(d))continue;const{coords:f,lengths:m}=d;if(e.types&P.EDGE){let e=0;for(let n=0;n<m.length;n++){const c=m[n];for(let n=0;n<c;n++,e+=i){const d=f[e],m=f[e+1];if(n!==c-1){const n=f[e+i],c=f[e+i+1],{x:p,y:g}=G(r,a,d,m,n,c),_=(r-p)/o,y=(a-g)/l,I=_*_+y*y;I<=1&&u.candidates.push({type:"edge",objectId:s.getObjectId(t),distance:Math.sqrt(I),target:h(p,g),start:h(d,m),end:h(n,c)})}}}}if(e.types&P.VERTEX){const e=c?f.length-i:f.length;for(let n=0;n<e;n+=i){const e=f[n],i=f[n+1],c=(r-e)/o,d=(a-i)/l,m=c*c+d*d;m<=1&&u.candidates.push({type:"vertex",objectId:s.getObjectId(t),distance:Math.sqrt(m),target:h(e,i)})}}}return u.candidates.sort(((e,t)=>e.distance-t.distance)),u}_getPointCreator(e,t,s){const i=(0,n.pC)(s)&&!(0,f.fS)(t,s)?e=>(0,v.iV)(e,t,s):e=>e;return null!=e.z&&null!=e.m?(t,s)=>i({x:t,y:s,z:e.z,m:e.m}):null!=e.z?(t,s)=>i({x:t,y:s,z:e.z}):null!=e.m?(t,s)=>i({x:t,y:s,m:e.m}):(e,t)=>i({x:e,y:t})}executeAttributesQuery(e){const t=S(e.where,this.fieldsIndex);if(!t)return Promise.resolve(this);if(t.isStandardized){let s=0;const i=[];for(const e of this.items)t.testFeature(e,this.featureAdapter)&&(i[s++]=e);const r=new D(i,this.queryGeometry,this);return r.definitionExpression=e.where,Promise.resolve(r)}return Promise.reject(new TypeError("Where clause is not standardized"))}executeAggregateIdsQuery(e){if(!e.aggregateIds||!e.aggregateIds.length||(0,n.Wi)(this.aggregateAdapter))return Promise.resolve(this);const t=new Set;for(const s of e.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;return Promise.resolve(new D(this.items.filter((e=>t.has(s(e)))),this.queryGeometry,this))}executeObjectIdsQuery(e){if(!e.objectIds||!e.objectIds.length)return Promise.resolve(this);const t=new Set(e.objectIds),s=this.featureAdapter.getObjectId;return Promise.resolve(new D(this.items.filter((e=>t.has(s(e)))),this.queryGeometry,this))}executeTimeQuery(e){const t=(0,O.y)(this.timeInfo,e.timeExtent,this.featureAdapter);if(!(0,n.pC)(t))return Promise.resolve(this);const s=this.items.filter(t);return Promise.resolve(new D(s,this.queryGeometry,this))}filterLatest(){const{trackIdField:e,startTimeField:t,endTimeField:s}=this.timeInfo,i=s||t,r=new Map,n=this.featureAdapter.getAttribute;for(const t of this.items){const s=n(t,e),a=n(t,i),o=r.get(s);(!o||a>n(o,i))&&r.set(s,t)}const a=Array.from(r.values());return Promise.resolve(new D(a,this.queryGeometry,this))}async project(e){if(!e||(0,f.fS)(this.spatialReference,e))return this;const t=this.featureAdapter,s=(await(0,v.oj)(this.items.map((e=>(0,k.Op)(this.geometryType,this.hasZ,this.hasM,t.getGeometry(e)))),this.spatialReference,e)).map(((e,s)=>t.cloneWithGeometry(this.items[s],(0,N.GH)(e,this.hasZ,this.hasM))));return new D(s,this.queryGeometry,{definitionExpression:this.definitionExpression,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:e,fieldsIndex:this.fieldsIndex,timeInfo:this.timeInfo,featureAdapter:this.featureAdapter})}async createSummaryStatisticsResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,minValue:o,maxValue:l,scale:u}=t,c=this.fieldsIndex.isDateField(s),h=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:u}),d=(0,V.S5)({normalizationType:n,normalizationField:r,minValue:o,maxValue:l}),f=this.fieldsIndex.get(s),m={value:.5,fieldType:null==f?void 0:f.type},p=(0,Q.qN)(f)?(0,V.H0)({values:h,supportsNullCount:d,percentileParams:m}):(0,V.i5)({values:h,minValue:o,maxValue:l,useSampleStdDev:!n,supportsNullCount:d,percentileParams:m});return(0,V.F_)(p,c)}async createUniqueValuesResponse(e,t){const{field:s,valueExpression:i,domain:r,returnAllCodedValues:n,scale:a}=t,o=await this._getDataValues(e,{field:s,valueExpression:i,scale:a}),l=(0,V.eT)(o);return(0,V.Qm)(l,r,n)}async createClassBreaksResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numClasses:h,scale:d}=t,f=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:d}),m=(0,V.G2)(f,{field:s,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numClasses:h});return(0,V.DL)(m,o)}async createHistogramResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numBins:h,scale:d}=t,f=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:d});return(0,V.oF)(f,{field:s,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numBins:h})}_sortFeatures(e,t,s){if(e.length>1&&t&&t.length)for(const i of t.reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=t[1]&&"desc"===t[1].toLowerCase(),o=(0,V.Lq)(null==n?void 0:n.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:o,outSR:l,quantizationParameters:u,resultRecordCount:c,resultOffset:h,returnZ:d,returnM:f}=e,m=null!=c&&t.length>(h||0)+c,p=o&&(o.includes("*")?[...this.fieldsIndex.fields]:o.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:m,features:this._createFeatures(e,t),fields:p,geometryType:s,hasM:i&&f,hasZ:r&&d,objectIdFieldName:n,spatialReference:(0,k.S2)(l||a),transform:u&&(0,A.vY)(u)||null}}_createFeatures(e,t){const s=new C(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:o,returnCentroid:l,maxAllowableOffset:u,resultOffset:c,resultRecordCount:h,returnZ:d=!1,returnM:f=!1}=e,m=r&&d,p=i&&f;let g=[],_=0;const y=[...t];if(this._sortFeatures(y,n,((e,t,i)=>s.getFieldValue(e,t,i))),o||l){const e=(0,A.vY)(a);if(o&&!l)for(const t of y)g[_++]={attributes:s.getAttributes(t),geometry:(0,k.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)};else if(!o&&l)for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,k.EG)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,k.EG)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,k.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)}}else for(const e of y){const t=s.getAttributes(e);t&&(g[_++]={attributes:t})}const I=c||0;if(null!=h){const e=I+h;g=g.slice(I,Math.min(g.length,e))}return g}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const t of e.outStatistics)if("exceedslimit"===t.statisticType){s=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,i=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,r=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>i)t=!0;else{const e=this.hasZ?this.hasM?4:3:this.hasM?3:2,s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+((0,n.pC)(i)&&i.coords.length||0)}),0)/e>r}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}_createStatisticsQueryResponse(e){const t={attributes:{}},s=[],i=new Map,r=new Map,n=new Map,a=new Map,o=new C(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:c,orderByFields:h}=e,d=u&&u.length,f=!!d,m=f&&u[0],p=f&&!this.fieldsIndex.get(m);for(const e of l){const{outStatisticFieldName:l,statisticType:h}=e,g=e,_="exceedslimit"!==h?e.onStatisticField:void 0,y="percentile_disc"===h||"percentile_cont"===h,I=f&&1===d&&(_===m||p)&&"count"===h;if(f){if(!n.has(_)){const e=[];for(const t of u){const s=this._getAttributeValues(o,t,i);e.push(s)}n.set(_,this._calculateUniqueValues(e,o.returnDistinctValues))}const e=n.get(_);for(const t in e){const{count:s,data:r,items:n,itemPositions:h}=e[t],d=r.join(",");if(!c||o.validateItems(n,c)){const e=a.get(d)||{attributes:{}};let t=null;if(I)t=s;else{const e=this._getAttributeValues(o,_,i),s=h.map((t=>e[t]));t=y&&"statisticParameters"in g?this._getPercentileValue(g,s):this._getStatisticValue(g,s,null,o.returnDistinctValues)}e.attributes[l]=t,u.forEach(((t,s)=>e.attributes[this.fieldsIndex.get(t)?t:`EXPR_${s+1}`]=r[s])),a.set(d,e)}}}else{const e=this._getAttributeValues(o,_,i);t.attributes[l]=y&&"statisticParameters"in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,r,o.returnDistinctValues)}s.push({name:l,alias:l,type:"esriFieldTypeDouble"})}const g=f?Array.from(a.values()):[t];return this._sortFeatures(g,h,((e,t)=>e.attributes[t])),{fields:s,features:g}}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=null!=s&&s.has(r)?s.get(r):(0,Q.qN)(this.fieldsIndex.get(r))?(0,V.H0)({values:t,returnDistinct:i}):(0,V.i5)({values:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s),l={value:n,orderBy:a,fieldType:null==o?void 0:o.type,isDiscrete:"percentile_disc"===r};return(0,V.XL)(t,l)}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const i=this.fieldsIndex.get(t),r=this.items.map((s=>e.getFieldValue(s,t,i)));return s.set(t,r),r}_getAttributeNormalizedValues(e,t){return this.items.map((s=>e.getNormalizedValue(s,{field:t.field,fieldInfo:this.fieldsIndex.get(t.field),normalizationField:t.normalizationField,normalizationFieldInfo:this.fieldsIndex.get(t.normalizationField),normalizationType:t.normalizationType,normalizationTotal:t.normalizationTotal})))}async _getAttributeExpressionValues(e,t,s){const{arcadeUtils:i}=await(0,z.LC)(),r=i.createFunction(t),n=s&&i.getViewInfo(s);return this.items.map((t=>e.getExpressionValue(t,{compiledFunc:r,viewInfo:n},i)))}_calculateUniqueValues(e,t){const s={},i=this.items,r=i.length;for(let n=0;n<r;n++){const r=i[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");t?null==s[o]&&(s[o]={count:1,data:a,items:[r],itemPositions:[n]}):null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t){const s=new C(e,this.featureAdapter,this.fieldsIndex),{valueExpression:i,field:r,normalizationField:n,normalizationType:a,normalizationTotal:o,scale:l}=t,u=i?{viewingMode:"map",scale:l,spatialReference:e.outSR||this.spatialReference}:null;return i?this._getAttributeExpressionValues(s,i,u):this._getAttributeNormalizedValues(s,{field:r,normalizationField:n,normalizationType:a,normalizationTotal:o})}}function G(e,t,s,i,r,n){const a=r-s,o=n-i,l=a*a+o*o,u=(e-s)*a+(t-i)*o,c=Math.min(1,Math.max(0,u/l));return{x:s+a*c,y:i+o*c}}(M=P||(P={}))[M.NONE=0]="NONE",M[M.EDGE=1]="EDGE",M[M.VERTEX=2]="VERTEX";var L=s(10402),U=s(99514),Z=s(43697),q=s(15923),j=s(61247),B=s(92604),Y=s(54790),H=s(44553),W=s(95330),X=s(17445),J=s(76882),$=s(43050),K=s(5600),ee=(s(67676),s(80442),s(75215),s(52011));let te=class extends q.Z{constructor(){super(...arguments),this._tasks=new Array,this.running=!1}get length(){return this._tasks.length}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this.running=!0,new Promise(((i,r)=>this._tasks.push(new se(i,r,e,t,s))))}unshift(e,t,s){return this.running=!0,new Promise(((i,r)=>this._tasks.unshift(new se(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,W.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,W.zE)());else{const i=s?t.abortCallback((0,W.zE)()):t.callback(e);(0,W.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this.running=this._tasks.length>0,!0}cancelAll(){const e=(0,W.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this.running=!1}};(0,Z._)([(0,K.Cb)()],te.prototype,"running",void 0),te=(0,Z._)([(0,ee.j)("esri.layers.support.PromiseQueue")],te);class se{constructor(e,t,s,i,r){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}let ie=class extends q.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,Z._)([(0,K.Cb)()],ie.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,Z._)([(0,K.Cb)()],ie.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),ie=(0,Z._)([(0,ee.j)("esri.views.support.DebugFlags")],ie);const re=new ie,ne=B.Z.getLogger("esri.views.support.Scheduler");var ae;!function(e){e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="cloud generator",e[e.TEST_PRIO=1]="TEST_PRIO"}(ae||(ae={}));const oe=new Map([[ae.RESOURCE_CONTROLLER,0],[ae.SLIDE,0],[ae.STREAM_DATA_LOADER,0],[ae.ELEVATION_QUERY,0],[ae.TERRAIN_SURFACE,1],[ae.SURFACE_GEOMETRY_UPDATES,1],[ae.GRAPHICS_CORE,2],[ae.I3S_CONTROLLER,2],[ae.POINT_CLOUD_LAYER,2],[ae.FEATURE_TILE_FETCHER,2],[ae.OVERLAY,4],[ae.STAGE,4],[ae.GRAPHICS_DECONFLICTOR,4],[ae.FILTER_VISIBILITY,4],[ae.SCALE_VISIBILITY,4],[ae.FRUSTUM_VISIBILITY,4],[ae.POINT_OF_INTEREST_FREQUENT,6],[ae.POINT_OF_INTEREST_INFREQUENT,30],[ae.LABELER,8],[ae.FEATURE_QUERY_ENGINE,8],[ae.FEATURE_TILE_TREE,16],[ae.FEATURE_TILE_TREE_ACTIVE,0],[ae.ELEVATION_ALIGNMENT,12],[ae.TEXT_TEXTURE_ATLAS,12],[ae.CLOUDS_GENERATOR,12],[ae.TEXTURE_UNLOAD,12],[ae.LINE_OF_SIGHT_TOOL,16],[ae.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[ae.SNAPPING,0],[ae.SHADOW_ACCUMULATOR,30]]);function le(e){return oe.has(e)?oe.get(e):"number"==typeof e?e:1}var ue;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(ue||(ue={}));const ce=(0,J.HA)(6.5),he=(0,J.HA)(1),de=(0,J.HA)(30),fe=(0,J.HA)(1e3/30),me=(0,J.HA)(100);var pe,ge;!function(e){let t=class extends q.Z{constructor(e){super(e),this.updating=!0,this._microTaskQueued=!1,this.performanceInfo={total:new Y.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=null,this._state=ue.INTERACTING,this._tasks=new H.Z,this._runQueue=new H.Z,this._load=0,this._idleStateCallbacks=new H.Z,this._idleUpdatesStartFired=!1,this._maxReschedule=Ie,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,$.S1)(re,"SCHEDULER_LOG_SLOW_TASKS",(e=>this._debug=e)),this._budget=new i(e.nowFunc);for(const e of Object.keys(ae))this.performanceInfo.tasks.set(ae[e],new Y.Z(ae[e]));let t;const s=this;this._test={get state(){return(0,n.Pt)(t,s._state)},set state(e){t=e},FRAME_SAFETY_BUDGET:ce,INTERACTING_BUDGET:fe,IDLE_BUDGET:me,get budget(){return s._budget.budget},usedBudget:0,setBudget:e=>s._budget=e,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,n.hw)(this._debugHandle),this._microTaskQueued=!1,this.updating=!1}activate(){this._budget.done||this._microTaskQueued||(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.done||(this._maxReschedule=Ie,this._schedule(),this.frame()))})))}registerTask(e,t){const i=le(e),r=new s(this,e,t,i);return this._tasks.push(r),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new Y.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===ue.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===ue.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get now(){return this.nowFunc()}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==ue.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return(0,n.Wi)(this._test.state)?this._state:this._test.state}updateBudget(e){this._test.usedBudget=0;let t=ce,s=e.frameDuration,i=he;switch(this.state){case ue.IDLE:t=(0,J.HA)(0),s=(0,J.HA)(Math.max(me,e.frameDuration)),i=de;break;case ue.INTERACTING:s=(0,J.HA)(Math.max(fe,e.frameDuration));case ue.ANIMATING:}return s=(0,J.HA)(s-e.elapsedFrameTime-t),this.state!==ue.IDLE&&s<he&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,J.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._maxReschedule=Ie,this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case ue.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case ue.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,J.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e)}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return ge.SCHEDULED;let t=ge.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=ge.READY:t!==ge.READY&&(t=ge.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){if(this._maxReschedule<=0)return!1;for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.some((t=>t===e))&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this.updating=!1,!1;this._maxReschedule===Ie&&(this._maxReschedule=t),--this._maxReschedule}return this.updating=!0,!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)}catch(e){ne.error(`Exception in task "${s.name}"`,e)}s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&this._budget.elapsed>2*this._budget.budget&&console.log("Task",s.name,"used",this._budget.elapsed,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this.updating=this._tasks.some((e=>e.needsUpdate)),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this.updating=this._tasks.some((e=>e.needsUpdate)),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(ae))this._frameTaskTimes.set(ae[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};(0,Z._)([(0,K.Cb)()],t.prototype,"updating",void 0),(0,Z._)([(0,K.Cb)()],t.prototype,"nowFunc",void 0),t=(0,Z._)([(0,ee.j)("esri.views.support.Scheduler")],t),e.Scheduler=t;let s=class extends q.Z{constructor(e,t,s,i){super({}),this._scheduler=e,this.name=t,this._basePriority=i,this.runtime=0,this._queue=new te,this._handles=new j.Z,this.schedulePriority=this._basePriority,this.task=(0,n.pC)(s)?s:this._queue,this._handles.add((0,X.gx)((()=>this.task.running),(()=>e.activate())))}get updating(){return this._queue.running}normalizeCtorArgs(){return{}}remove(){this.processQueue(_e),this._scheduler.removeTask(this),this.schedule=ye.schedule,this.reschedule=ye.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=le(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}};(0,Z._)([(0,K.Cb)({constructOnly:!0})],s.prototype,"task",void 0),(0,Z._)([(0,K.Cb)({readOnly:!0})],s.prototype,"updating",null),s=(0,Z._)([(0,ee.j)("esri.views.support.SchedulerTask")],s);class i{constructor(e){this.now=e,this._begin=0,this._budget=0,this._state=ue.IDLE,this._didWork=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&(this._didWork=!0),!0)}get done(){return this._didWork&&this.elapsed>=this._budget&&this._enabled}get budget(){return this._budget}madeProgress(){this._didWork=!0}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this._didWork=!1}get remaining(){return Math.max(this._budget-this.elapsed,0)}get elapsed(){return this.now()-this._begin}resetProgress(){this._didWork=!1}get hasProgressed(){return this._didWork}}e.Budget=i}(pe||(pe={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(ge||(ge={}));const _e=(()=>{const e=new pe.Budget((()=>performance.now()));return e.enabled=!1,e})(),ye=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,W.Hc)(t)){const e=(0,W.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,W.gx)(e(_e))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},Ie=Number.MAX_SAFE_INTEGER,Te="feature-store:unsupported-query",xe=new Set,Se=new a.WJ(2e6);let Ee=0;class be{constructor(e){this.capabilities={query:w.g},this.geometryType=e.geometryType,this.hasM=e.hasM,this.hasZ=e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new a.Xq(Ee+++"$$",Se)),this.fieldsIndex=new U.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,n.hw)(this._frameTask),this.clearCache(),(0,n.SC)(this._geometryQueryCache),this._changeHandle=(0,n.hw)(this._changeHandle),(0,n.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}get fullExtent(){const e=this.featureStore.fullBounds;return e?{xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:(0,k.S2)(this.spatialReference)}:null}get timeExtent(){return this.timeInfo?(this._timeExtent||(this._timeExtent=(0,O.R)(this.timeInfo,this.featureStore)),this._timeExtent):null}clearCache(){this._geometryQueryCache&&this._geometryQueryCache.clear(),this._allItems=null,this._timeExtent=null}async executeQuery(e={},t){let s,i=(0,r.d9)(e);try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t)}catch(e){if(e!==k.vF)throw e;s=new D([],null,this)}return s.createQueryResponse(i)}async executeQueryForCount(e={},t){let s=(0,r.d9)(e);s.returnGeometry=!1,s.returnCentroid=!1,s.outSR=null;try{s=await this._schedule((()=>(0,k.Up)(s,this.definitionExpression,this.spatialReference)),t),s=await this._reschedule((()=>this._checkQuerySupport(s)),t);let e=await this._reschedule((()=>this._executeGeometryQuery(s,t)),t);return e=await this._reschedule((()=>e.executeAggregateIdsQuery(s)),t),e=await this._reschedule((()=>e.executeObjectIdsQuery(s)),t),e=await this._reschedule((()=>e.executeTimeQuery(s)),t),e=await this._reschedule((()=>e.executeAttributesQuery(s)),t),e.createQueryResponseForCount(s)}catch(e){if(e!==k.vF)throw e;return 0}}async executeQueryForExtent(e={},t){let s,i=(0,r.d9)(e);const n=i.outSR;try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),i.returnGeometry=!0,i.returnCentroid=!1,i.outSR=null,s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t);const e=s.size;if(!e)return{count:e,extent:null};(0,l.t8)(Fe,l.Gv),this.featureStore.forEachBounds(s.items,(e=>(0,l.TC)(Fe,e)),Re);const r={xmin:Fe[0],ymin:Fe[1],xmax:Fe[3],ymax:Fe[4],spatialReference:(0,k.S2)(this.spatialReference)};this.hasZ&&isFinite(Fe[2])&&isFinite(Fe[5])&&(r.zmin=Fe[2],r.zmax=Fe[5]);const a=(0,v.iV)(r,s.spatialReference,n);if(a.spatialReference=(0,k.S2)(n||this.spatialReference),a.xmax-a.xmin==0){const e=(0,o.c9)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin==0){const e=(0,o.c9)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin==0){const e=(0,o.c9)(a.spatialReference);a.zmin-=e,a.zmax+=e}return{count:e,extent:a}}catch(e){if(e===k.vF)return{count:0,extent:null};throw e}}async executeQueryForIds(e={},t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e={},t){let s,i=(0,r.d9)(e);i.returnGeometry=!1,i.returnCentroid=!1,i.outSR=null;try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t);const e=s.items,r=new Set;return await this._reschedule((()=>{for(const t of e)r.add(s.featureAdapter.getObjectId(t))}),t),r}catch(e){if(e===k.vF)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,types:r}=e;if(r===P.NONE)return{candidates:[]};const a=await this._reschedule((()=>this._checkQuerySupport(e.query)),t),o=!(0,f.fS)(s.spatialReference,this.spatialReference);o&&await(0,v._W)(s.spatialReference,this.spatialReference);const l="number"==typeof i?i:i.x,u="number"==typeof i?i:i.y,c={xmin:s.x-l,xmax:s.x+l,ymin:s.y-u,ymax:s.y+u,spatialReference:s.spatialReference},m=o?(0,v.iV)(c,this.spatialReference):c;if(!m)return{candidates:[]};const p=(await(0,d.aX)((0,h.im)(s),null,{signal:t}))[0],g=(await(0,d.aX)((0,h.im)(m),null,{signal:t}))[0];if((0,n.Wi)(p)||(0,n.Wi)(g))return{candidates:[]};let _=new D(this._searchFeatures(this._getQueryBBoxes(g.toJSON())),null,this);_=await this._reschedule((()=>_.executeObjectIdsQuery(a)),t),_=await this._reschedule((()=>_.executeTimeQuery(a)),t),_=await this._reschedule((()=>_.executeAttributesQuery(a)),t);const y=p.toJSON(),I=o?(0,v.iV)(y,this.spatialReference):y,T=o?Math.max(m.xmax-m.xmin,m.ymax-m.ymin)/2:i;return _.createSnappingResponse({...e,point:I,distance:T},s.spatialReference)}async executeQueryForLatestObservations(e={},t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new i.Z(Te,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});let s,n=(0,r.d9)(e);try{n=await this._schedule((()=>(0,k.Up)(n,this.definitionExpression,this.spatialReference)),t),n=await this._reschedule((()=>this._checkQuerySupport(n)),t),s=await this._reschedule((()=>this._executeGeometryQuery(n,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(n)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(n)),t),s=await this._reschedule((()=>s.executeTimeQuery(n)),t),s=await this._reschedule((()=>s.executeAttributesQuery(n)),t),s=await this._reschedule((()=>s.filterLatest()),t)}catch(e){if(e!==k.vF)throw e;s=new D([],null,this)}return s.createQueryResponse(n)}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(e,t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,valueExpression:r}=t;return(await this._getQueryEngineResultForStats(e,{field:i,valueExpression:r},s)).createUniqueValuesResponse(e,t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(e,t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(e,t)}async _schedule(e,t){return(0,n.pC)(this._frameTask)?this._frameTask.schedule(e,t):e(_e)}async _reschedule(e,t){return(0,n.pC)(this._frameTask)?this._frameTask.reschedule(e,t):e(_e)}_getAll(){if(!this._allItems){const e=[];this.featureStore.forEach((t=>e.push(t))),this._allItems=new D(e,null,this)}return this._allItems}async _executeGeometryQuery(e,t){const{geometry:s,outSR:i,spatialRel:r,returnGeometry:a,returnCentroid:o}=e,l=a||o,u=(0,f.JY)(i)&&!(0,f.fS)(this.spatialReference,i),c=this._geometryQueryCache?u&&l?JSON.stringify({geometry:s,spatialRelationship:r,outSpatialReference:i}):JSON.stringify({geometry:s,spatialRelationship:r}):null;if(c){const e=this._geometryQueryCache.get(c);if(!(0,n.o8)(e))return e}const h=async e=>{if(u&&l){const t=await e.project(i);return c&&this._geometryQueryCache.put(c,t,t.size||1),t}return c&&this._geometryQueryCache.put(c,e,e.size||1),e};if(!s)return h(this._getAll());const d=this.featureAdapter;if("esriSpatialRelDisjoint"===r){const e=this._searchFeatures(this._getQueryBBoxes(s));if(!e.length)return h(this._getAll());let i,n;const a=new Set;for(const t of e)a.add(d.getObjectId(t));await this._reschedule((()=>{let e=0;i=new Array(a.size),this.featureStore.forEach((t=>i[e++]=t)),n=a}),t);const o=await this._reschedule((async()=>{const e=await(0,L.cW)(r,s,this.geometryType,this.hasZ,this.hasM);return new D(await this._runSpatialFilter(i,(t=>!n.has(d.getObjectId(t))||e(d.getGeometry(t))),t),s,this)}),t);return h(o)}const m=this._searchFeatures(this._getQueryBBoxes(s));if(!m.length){const e=new D([],s,this);return c&&this._geometryQueryCache.put(c,e,e.size||1),e}if(this._canExecuteSoloPass(s,e))return h(new D(m,s,this));const p=await(0,L.cW)(r,s,this.geometryType,this.hasZ,this.hasM),g=await this._runSpatialFilter(m,(e=>p(d.getGeometry(e))),t);return h(new D(g,s,this))}async _runSpatialFilter(e,t,s){if(!t)return e;if((0,n.Wi)(this._frameTask))return e.filter((e=>t(e)));let i=0;const r=new Array,a=async n=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),n.madeProgress()),n.done&&await this._reschedule((e=>a(e)),s)}};return this._reschedule((e=>a(e)),s).then((()=>r))}_canExecuteSoloPass(e,t){const{geometryType:s}=this,{spatialRel:i}=t;return(0,L.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===s&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i||"esriSpatialRelWithin"===i))}_getQueryBBoxes(e){if((0,L.hN)(e)){if((0,h.YX)(e))return[(0,u.al)(e.xmin,e.ymin,e.xmax,e.ymax)];if((0,h.oU)(e))return e.rings.map((e=>(0,u.al)(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,c.$P)((0,u.Ue)(),e)]}_searchFeatures(e){for(const t of e)this.featureStore.forEachInBounds(t,(e=>{xe.add(e)}));const t=new Array(xe.size);let s=0;return xe.forEach((e=>t[s++]=e)),xe.clear(),t}async _checkStatisticsSupport(e,t){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new i.Z(Te,"Unsupported query options",{query:e});return Promise.all([this._checkAttributesQuerySupport(e),this._checkStatisticsParamsSupport(t),(0,L.P0)(e,this.geometryType,this.spatialReference),(0,v._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e){let t=[];if(e.valueExpression){const{arcadeUtils:s}=await(0,z.LC)();t=s.extractFieldNames(e.valueExpression)}if(e.field&&t.push(e.field),e.normalizationField&&t.push(e.normalizationField),!t.length)throw new i.Z(Te,"params should have at least a field or valueExpression",{params:e});E(this.fieldsIndex,t,"params contains missing fields")}async _checkQuerySupport(e){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new i.Z(Te,"Unsupported query options",{query:e});return Promise.all([this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),(0,L.P0)(e,this.geometryType,this.spatialReference),(0,v._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:r,outStatistics:n}=e,a=n?n.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())):[];if(s&&s.length>0){const e=" asc",t=" desc",i=s.map((s=>{const i=s.toLowerCase();return i.indexOf(e)>-1?i.split(e)[0]:i.indexOf(t)>-1?i.split(t)[0]:s})).filter((e=>-1===a.indexOf(e)));E(this.fieldsIndex,i,"orderByFields contains missing fields")}if(t&&t.length>0)E(this.fieldsIndex,t,"outFields contains missing fields");else if(r)throw new i.Z(Te,"outFields should be specified for returnDistinctValues",{query:e});T(this.fieldsIndex,e.where)}async _checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:r}=e,n=s&&s.length,a=t&&t.length;if(r){if(!n||!a)throw new i.Z(Te,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});x(this.fieldsIndex,r,t)}if(a){if(!function(e){return e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const r=t.map((e=>e.onStatisticField));E(this.fieldsIndex,r,"onStatisticFields contains missing fields"),n&&E(this.fieldsIndex,s,"groupByFieldsForStatistics contains missing fields");for(const s of t){const{onStatisticField:t,statisticType:r}=s;if("percentile_disc"!==r&&"percentile_cont"!==r||!("statisticParameters"in s)){if("count"!==r&&t&&F(t,this.fieldsIndex))throw new i.Z(Te,"outStatistics contains non-numeric fields",{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new i.Z(Te,"statisticParamters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e={},t,s){let i;e=(0,r.d9)(e);try{e=await this._schedule((()=>(0,k.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s),i=await this._reschedule((()=>this._executeGeometryQuery(e,s)),s),i=await this._reschedule((()=>i.executeAggregateIdsQuery(e)),s),i=await this._reschedule((()=>i.executeObjectIdsQuery(e)),s),i=await this._reschedule((()=>i.executeTimeQuery(e)),s),i=await this._reschedule((()=>i.executeAttributesQuery(e)),s)}catch(e){if(e!==k.vF)throw e;i=new D([],null,this)}return i}}const Re=(0,l.Ue)(),Fe=(0,l.Ue)()},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},37427:(e,t,s)=>{s.d(t,{_W:()=>d,iV:()=>p,oj:()=>_});var i=s(70586),r=s(44547),n=s(37455),a=s(8744),o=s(40488);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,l),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,l),[s.xmax,s.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}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:h(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:void 0}function c(e,t){const s=[];for(const i of e)s.push(h(i,t));return s}function h(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function d(e,t){if(!t)return;const s=Array.isArray(e)?e.map((e=>(0,i.pC)(e.geometry)&&e.geometry.spatialReference)):[e];await(0,r.iQ)(s.map((e=>({source:e,dest:t}))))}const f=u.bind(null,o.hG),m=u.bind(null,o.R6);function p(e,t,s){return e?(s||(s=t,t=e.spatialReference),(0,a.JY)(t)&&(0,a.JY)(s)&&!(0,a.fS)(t,s)?(0,o.Q8)(t,s)?(0,a.sS)(s)?f(e):m(e):(0,r.oj)(n.N,[e],t,s,null)[0]:e):e}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s){if(!e||!e.length||!t||!s||(0,a.fS)(t,s))return e;const i={geometries:e,inSpatialReference:t,outSpatialReference:s,resolve:null};return this._jobs.push(i),new Promise((e=>{i.resolve=e,null===this._timer&&(this._timer=setTimeout(this._process,10))}))}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:l}=e;(0,o.Q8)(s,i)?(0,a.sS)(i)?l(t.map(f)):l(t.map(m)):l((0,r.oj)(n.N,t,s,i,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,s){return g.push(e,t,s)}},10402:(e,t,s)=>{s.d(t,{hN:()=>E,P0:()=>S,cW:()=>x});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),o=s(8744);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,n){const a=l(r,n),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=a)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const n=l(t,s),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,i,r),c+=e*n;return u}function h(e,t,s,i,r,n,a){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=s(98732),f=s(5428),m=s(37427),p=s(11490);const g="feature-store:unsupported-query",_={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},I={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},T={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1};function x(e,t,i,o,l){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new f.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new f.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>u(s,!1,!1,e,o,l)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,p.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,p.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e=function(e){return"mesh"===e?n.h_:(0,n.IY)(e)}(i);return Promise.resolve((s=>e(t,(0,p.Op)(i,o,l,s))))}return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[_[e]].bind(null,t.spatialReference,t);return e=>r((0,p.Op)(i,o,l,e))}))}async function S(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return!0===y[e]}(r))throw new i.Z(g,"Unsupported query spatial relationship",{query:e});if((0,o.JY)(n.spatialReference)&&(0,o.JY)(s)){if(!function(e){return!0===I[(0,a.Ji)(e)]}(n))throw new i.Z(g,"Unsupported query geometry type",{query:e});if(!function(e){return!0===T[e]}(t))throw new i.Z(g,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,m._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function E(e){if((0,a.YX)(e))return!0;if((0,a.oU)(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}},17590:(e,t,s)=>{function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)t.forEach((e=>{const t=s.getAttribute(e,i),o=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==o||isNaN(o)||(a=Math.max(a,o))}));else{const e=i||r;t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;return null===n&&null===a?null:void 0===n&&void 0===a?()=>!1:i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e.getAttribute(n,t),o=e.getAttribute(n,s);return(null==a||a<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e.getAttribute(t,s);return null==r||r>=i}:null!=r?s=>{const i=e.getAttribute(s,t);return null==i||i<=r}:void 0}(s,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e.getAttribute(i,t)===s:null!=s&&null!=i?r=>{const n=e.getAttribute(r,t);return n>=s&&n<=i}:null!=s?i=>e.getAttribute(i,t)>=s:null!=i?s=>e.getAttribute(s,t)<=i:void 0}(s,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})},11490:(e,t,s)=>{s.d(t,{vF:()=>m,S2:()=>E,Op:()=>T,Up:()=>x,j6:()=>S,EG:()=>I});var i=s(35454),r=s(70586),n=s(67900),a=s(49600),o=s(33955),l=s(38581),u=s(8744),c=s(98732),h=s(5428),d=s(37427);const f=new i.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),m=Object.freeze({}),p=new h.Z,g=new h.Z,_=new h.Z,y={esriGeometryPoint:c.fQ,esriGeometryPolyline:c.J6,esriGeometryPolygon:c.eG,esriGeometryMultipoint:c.Iv};function I(e,t,s,i=e.hasZ,n=e.hasM){if((0,r.Wi)(t))return null;const a=e.hasZ&&i,o=e.hasM&&n;if(s){const r=(0,c.Nh)(_,t,e.hasZ,e.hasM,"esriGeometryPoint",s,i,n);return(0,c.fQ)(r,a,o)}return(0,c.fQ)(t,a,o)}function T(e,t,s,i,n,a,o=t,l=s){const u=t&&o,h=s&&l,d=(0,r.pC)(i)?"coords"in i?i:i.geometry:null;if((0,r.Wi)(d))return null;if(n){let i=(0,c.zj)(g,d,t,s,e,n,o,l);return a&&(i=(0,c.Nh)(_,i,u,h,e,a)),y[e](i,u,h)}if(a){const i=(0,c.Nh)(_,d,t,s,e,a,o,l);return y[e](i,u,h)}return(0,c.hY)(p,d,t,s,o,l),y[e](p,u,h)}async function x(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[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),S(e,t,s)}async function S(e,t,i){if(!e)return null;let{where:c}=e;if(e.where=c=c&&c.trim(),(!c||/^1 *= *1$/.test(c)||t&&t===c)&&(e.where=null),!e.geometry)return e;let h=await async function(e){const{geometry:t,distance:i,units:r}=e;if(null==i||"vertexAttributes"in t)return t;const a=t.spatialReference,o=r?f.fromJSON(r):(0,n.qE)(a),l=a&&((0,u.sT)(a)||(0,u.sS)(a))?t:await(0,d._W)(a,u.Zn).then((()=>(0,d.iV)(t,u.Zn)));return(await async function(){return(await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247))).geodesicBuffer}())(l.spatialReference,l,i,o)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;h=(0,a.aO)(h),h.spatialReference=t}e.geometry=h,await(0,d._W)(h.spatialReference,i);const p=(await(0,l.aX)((0,o.im)(h)))[0];if((0,r.Wi)(p))throw m;const g=p.toJSON(),_=await(0,d.iV)(g,g.spatialReference,i);if(!_)throw m;return _.spatialReference=i,e.geometry=_,e}function E(e){return e&&b in e?JSON.parse(JSON.stringify(e,R)):e}const b="_geVersion",R=(e,t)=>e!==b?t:void 0},8418:(e,t,s)=>{s.d(t,{G2:()=>b,oF:()=>F,XL:()=>g,i5:()=>p,H0:()=>m,eT:()=>x,Qm:()=>S,Lq:()=>_,fk:()=>E,S5:()=>f,F_:()=>T,DL:()=>R});var i=s(57316);function r(e,t){return Number(e.toFixed(t))}function n(e){const t=e.definition,{classificationMethod:s,breakCount:i,normalizationType:n,definedInterval:l}=t,u=[];let c=e.values;if(0===c.length)return[];c=c.sort(((e,t)=>e-t));const h=c[0],d=c[c.length-1];if("equal-interval"===s)if(c.length>=i){const e=(d-h)/i;let t=h;for(let s=1;s<i;s++){const i=r(h+s*e,6);u.push({minValue:t,maxValue:i,label:a(t,i,n)}),t=i}u.push({minValue:t,maxValue:d,label:a(t,d,n)})}else c.forEach((e=>{u.push({minValue:e,maxValue:e,label:a(e,e,n)})}));else if("natural-breaks"===s){const t=function(e){const t=[],s=[];let i=Number.MIN_VALUE,r=1,n=-1;for(let a=0;a<e.length;a++){const o=e[a];o===i?(r++,s[n]=r):null!==o&&(t.push(o),i=o,r=1,s.push(r),n++)}return{uniqueValues:t,valueFrequency:s}}(c),s=e.valueFrequency||t.valueFrequency,l=o(t.uniqueValues,s,i);let f=h;for(let e=1;e<i;e++)if(t.uniqueValues.length>e){const s=r(t.uniqueValues[l[e]],6);u.push({minValue:f,maxValue:s,label:a(f,s,n)}),f=s}u.push({minValue:f,maxValue:d,label:a(f,d,n)})}else if("quantile"===s)if(c.length>=i&&h!==d){let e=h,t=Math.ceil(c.length/i),s=0;for(let r=1;r<i;r++){let o=t+s-1;o>c.length&&(o=c.length-1),o<0&&(o=0),u.push({minValue:e,maxValue:c[o],label:a(e,c[o],n)}),e=c[o],s+=t,t=Math.ceil((c.length-s)/(i-r))}u.push({minValue:e,maxValue:d,label:a(e,d,n)})}else{let e=-1;for(let t=0;t<c.length;t++){const s=c[t];s!==e&&(e=s,u.push({minValue:e,maxValue:s,label:a(e,s,n)}),e=s)}}else if("standard-deviation"===s){const e=function(e){let t=0;for(let s=0;s<e.length;s++)t+=e[s];return t/=e.length,t}(c),t=function(e,t){let s=0;for(let i=0;i<e.length;i++){const r=e[i];s+=(r-t)*(r-t)}return s/=e.length,Math.sqrt(s)}(c,e);if(0===t)u.push({minValue:c[0],maxValue:c[0],label:a(c[0],c[0],n)});else{const s=function(e,t,s,i,r){let n=Math.max(i-e,t-i)/r/s;return n=n>=1?1:n>=.5?.5:.25,n}(h,d,i,e,t)*t;let o=0,l=h;for(let t=i;t>=1;t--){const i=r(e-(t-.5)*s,6);u.push({minValue:l,maxValue:i,label:a(l,i,n)}),l=i,o++}let c=r(e+.5*s,6);u.push({minValue:l,maxValue:c,label:a(l,c,n)}),l=c,o++;for(let t=1;t<=i;t++)c=o===2*i?d:r(e+(t+.5)*s,6),u.push({minValue:l,maxValue:c,label:a(l,c,n)}),l=c,o++}}else if("defined-interval"===s){if(!l)return u;const e=c[0],t=c[c.length-1],s=Math.ceil((t-e)/l);let i=e;for(let t=1;t<s;t++){const s=r(e+t*l,6);u.push({minValue:i,maxValue:s,label:a(i,s,n)}),i=s}u.push({minValue:i,maxValue:t,label:a(i,t,n)})}return u}function a(e,t,s){let i=null;return i=e===t?s&&"percent-of-total"===s?e+"%":e.toString():s&&"percent-of-total"===s?e+"% - "+t+"%":e+" - "+t,i}function o(e,t,s){const i=e.length,r=[];s>i&&(s=i);for(let e=0;e<s;e++)r.push(Math.round(e*i/s-1));r.push(i-1);let n=l(r,e,t,s);return function(e,t,s,i,r,n){let a=0,o=0,l=0,c=0,h=!0;for(let d=0;d<2&&h;d++){0===d&&(h=!1);for(let d=0;d<n-1;d++)for(;s[d+1]+1!==s[d+2];){s[d+1]=s[d+1]+1;const n=u(d,s,i,r);l=n.sbMean,a=n.sbSdcm;const f=u(d+1,s,i,r);if(c=f.sbMean,o=f.sbSdcm,!(a+o<t[d]+t[d+1])){s[d+1]=s[d+1]-1;break}t[d]=a,t[d+1]=o,e[d]=l,e[d+1]=c,h=!0}for(let d=n-1;d>0;d--)for(;s[d]!==s[d-1]+1;){s[d]=s[d]-1;const n=u(d-1,s,i,r);l=n.sbMean,a=n.sbSdcm;const f=u(d,s,i,r);if(c=f.sbMean,o=f.sbSdcm,!(a+o<t[d-1]+t[d])){s[d]=s[d]+1;break}t[d-1]=a,t[d]=o,e[d-1]=l,e[d]=c,h=!0}}return h}(n.mean,n.sdcm,r,e,t,s)&&(n=l(r,e,t,s)),r}function l(e,t,s,i){let r=[],n=[],a=[],o=0;const l=[],c=[];for(let r=0;r<i;r++){const i=u(r,e,t,s);l.push(i.sbMean),c.push(i.sbSdcm),o+=c[r]}let h,d=o,f=!0;for(;f||o<d;){f=!1,r=[];for(let t=0;t<i;t++)r.push(e[t]);for(let s=0;s<i;s++)for(let r=e[s]+1;r<=e[s+1];r++)if(h=t[r],s>0&&r!==e[s+1]&&Math.abs(h-l[s])>Math.abs(h-l[s-1]))e[s]=r;else if(s<i-1&&e[s]!==r-1&&Math.abs(h-l[s])>Math.abs(h-l[s+1])){e[s+1]=r-1;break}d=o,o=0,n=[],a=[];for(let r=0;r<i;r++){n.push(l[r]),a.push(c[r]);const i=u(r,e,t,s);l[r]=i.sbMean,c[r]=i.sbSdcm,o+=c[r]}}if(o>d){for(let t=0;t<i;t++)e[t]=r[t],l[t]=n[t],c[t]=a[t];o=d}return{mean:l,sdcm:c}}function u(e,t,s,i){let r=0,n=0;for(let a=t[e]+1;a<=t[e+1];a++){const e=i[a];r+=s[a]*e,n+=e}n<=0&&console.log("Exception in Natural Breaks calculation");const a=r/n;let o=0;for(let r=t[e]+1;r<=t[e+1];r++)o+=i[r]*(s[r]-a)**2;return{sbMean:a,sbSdcm:o}}const c=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,h=new Set(["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]),d=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function f(e){const t=null!=e.normalizationField||null!=e.normalizationType,s=null!=e.minValue||null!=e.maxValue,i=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!s&&!i}function m(e){const t=e.returnDistinct?[...new Set(e.values)]:e.values,s=t.filter((e=>null!=e)).length,i={count:s};return e.supportsNullCount&&(i.nullcount=t.length-s),e.percentileParams&&(i.median=g(t,e.percentileParams)),i}function p(e){const{values:t,useSampleStdDev:s,supportsNullCount:i}=e;let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,a=null,o=null,l=null,u=null,c=0;const h=null==e.minValue?-1/0:e.minValue,d=null==e.maxValue?1/0:e.maxValue;for(const e of t)Number.isFinite(e)?e>=h&&e<=d&&(a+=e,r=Math.min(r,e),n=Math.max(n,e),c++):"string"==typeof e&&c++;if(c&&null!=a){o=a/c;let e=0;for(const s of t)Number.isFinite(s)&&s>=h&&s<=d&&(e+=(s-o)**2);u=s?c>1?e/(c-1):0:c>0?e/c:0,l=Math.sqrt(u)}else r=null,n=null;const f={avg:o,count:c,max:n,min:r,stddev:l,sum:a,variance:u};return i&&(f.nullcount=t.length-c),e.percentileParams&&(f.median=g(t,e.percentileParams)),f}function g(e,t){const{fieldType:s,value:i,orderBy:r,isDiscrete:n}=t,a=_(s,"desc"===r);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,t)=>a(e,t)))).length)return null;if(i<=0)return e[0];if(i>=1)return e[e.length-1];const o=(e.length-1)*i,l=Math.floor(o),u=l+1,c=o%1,h=e[l],d=e[u];return u>=e.length||n||"string"==typeof h||"string"==typeof d?h:h*(1-c)+d*c}function _(e,t){const s=t?1:-1,i=function(e){return e?(e,t)=>t-e:(e,t)=>e-t}(t),r=y(t);if(!e||!["esriFieldTypeDate","esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...h].includes(e))return(e,t)=>"number"==typeof e&&"number"==typeof t?i(e,t):"string"==typeof e&&"string"==typeof t?r(e,t):s;if("esriFieldTypeDate"===e)return(e,t)=>{const r=new Date(e).getTime(),n=new Date(t).getTime();return isNaN(r)||isNaN(n)?s:i(r,n)};if(h.has(e))return(e,t)=>i(e,t);if("esriFieldTypeString"===e)return(e,t)=>r(e,t);if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e){const e=y(t);return(t,s)=>e(I(t),I(s))}return t?(e,t)=>1:(e,t)=>-1}function y(e){return e?(e,t)=>(e=e.toUpperCase())>(t=t.toUpperCase())?-1:e<t?1:0:(e,t)=>(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}function I(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function T(e,t){let s;for(s in e)d.indexOf(s)>-1&&(Number.isFinite(e[s])||(e[s]=null));return t?(["avg","stddev","variance"].forEach((t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]))})),e):e}function x(e){const t={};for(let s of e)(null==s||"string"==typeof s&&""===s.trim())&&(s=null),null==t[s]?t[s]={count:1,data:s}:t[s].count++;return{count:t}}function S(e,t,s){const i=e.count,r=[];s&&t&&"coded-value"===t.type&&t.codedValues.forEach((e=>{const t=e.code;i.hasOwnProperty(t)||(i[t]={data:t,count:0})}));for(const e in i){const t=i[e];r.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:r}}function E(e,t,s,i){let r=null;switch(t){case"log":0!==e&&(r=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(i)&&0!==i&&(r=e/i*100);break;case"field":Number.isFinite(s)&&0!==s&&(r=e/s);break;case"natural-log":e>0&&(r=Math.log(e));break;case"square-root":e>0&&(r=e**.5)}return r}function b(e,t){const s=function(e){const t=e.field,s=e.classificationMethod||"equal-interval",r=e.normalizationType,n=e.normalizationField,a=new i.Z;return a.classificationField=t,a.breakCount=e.breakCount,a.classificationMethod=s,a.standardDeviationInterval="standard-deviation"===s?e.standardDeviationInterval||1:void 0,a.normalizationType=r,a.normalizationField="field"===r?n:void 0,a}({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,breakCount:t.numClasses||5});return e=function(e,t,s){return t=null==t?-1/0:t,s=null==s?1/0:s,e.filter((e=>Number.isFinite(e)&&e>=t&&e<=s))}(e,t.minValue,t.maxValue),function(e){const{normalizationTotal:t}=e;return{classBreaks:n(e),normalizationTotal:t}}({definition:s,values:e,normalizationTotal:t.normalizationTotal})}function R(e,t){let s=e.classBreaks;const i=s.length,r=s[0].minValue,n=s[i-1].maxValue,a="standard-deviation"===t,o=c;return s=s.map((e=>{const t=e.label,s={minValue:e.minValue,maxValue:e.maxValue,label:t};if(a&&t){const e=t.match(o).map((e=>+e.trim()));2===e.length?(s.minStdDev=e[0],s.maxStdDev=e[1],e[0]<0&&e[1]>0&&(s.hasAvg=!0)):1===e.length&&(t.includes("<")?(s.minStdDev=null,s.maxStdDev=e[0]):t.includes(">")&&(s.minStdDev=e[0],s.maxStdDev=null))}return s})),{minValue:r,maxValue:n,classBreakInfos:s,normalizationTotal:e.normalizationTotal}}function F(e,t){const{min:s,max:i,intervals:r}=function(e,t){const{field:s,classificationMethod:i,standardDeviationInterval:r,normalizationType:n,normalizationField:a,normalizationTotal:o,minValue:l,maxValue:u}=t,c=t.numBins||10;let h=null,d=null,m=null;if(i&&"equal-interval"!==i||n){const{classBreaks:t}=b(e,{field:s,normalizationType:n,normalizationField:a,normalizationTotal:o,classificationMethod:i,standardDeviationInterval:r,minValue:l,maxValue:u,numClasses:c});h=t[0].minValue,d=t[t.length-1].maxValue,m=t.map((e=>[e.minValue,e.maxValue]))}else{if(null!=l&&null!=u)h=l,d=u;else{const t=p({values:e,minValue:l,maxValue:u,useSampleStdDev:!n,supportsNullCount:f({normalizationType:n,normalizationField:a,minValue:l,maxValue:u})});h=t.min,d=t.max}m=function(e,t,s){const i=(t-e)/s,r=[];let n,a=e;for(let e=1;e<=s;e++)n=a+i,n=Number(n.toFixed(16)),r.push([a,e===s?t:n]),a=n;return r}(h,d,c)}return{min:h,max:d,intervals:m}}(e,t),n=r.map(((e,t)=>({minValue:r[t][0],maxValue:r[t][1],count:0})));for(const t of e)if(null!=t&&t>=s&&t<=i){const e=v(r,t);e>-1&&n[e].count++}return{bins:n,minValue:s,maxValue:i,normalizationTotal:t.normalizationTotal}}function v(e,t){let s=-1;for(let i=e.length-1;i>=0;i--)if(t>=e[i][0]){s=i;break}return s}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7054],{88764:(e,t,s)=>{s.d(t,{q:()=>o});var i,r,n,a={exports:{}};i=a,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var o=n-r+1,l=i-r+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-l*c/o+h)),Math.min(n,Math.floor(i+(o-l)*c/o+h)),a)}var d=s[i],f=r,m=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);f<m;){for(t(s,f,m),f++,m--;a(s[f],d)<0;)f++;for(;a(s[m],d)>0;)m--}0===a(s[r],d)?t(s,r,m):t(s,++m,n),m<=i&&(r=m+1),i<=m&&(n=m-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const o=a.exports},43050:(e,t,s)=>{s.d(t,{S1:()=>a,on:()=>h,OY:()=>c,cm:()=>l,N1:()=>o,LR:()=>u,tH:()=>d});var i=s(91460),r=(s(22974),s(95330));const n=/\?(\.|$)/g;function a(e,t,s,i){const r=Array.isArray(t)?t:t.indexOf(",")>-1?t.split(","):[t],a=function(e,t,s,i){return e.watch(t,s,i)}(e,t,s,i);for(const t of r){const i=t.trim().replace(n,"$1"),r=e.get(i);s.call(e,r,r,i,e)}return a}function o(e,t,s,i){return d(e,t,f,s,i)}function l(e,t,s,i){return d(e,t,m,s,i)}function u(e,t,s,i){return d(e,t,p,s,i)}function c(e,t,s,i){return d(e,t,g,s,i)}function h(e,t,s,r,n,o,l){const u={};function c(t){const i=u[t];i&&(o&&o(i.target,t,e,s),i.handle.remove(),delete u[t])}const h=a(e,t,((t,a,o)=>{c(o),(0,i.vT)(t)&&(u[o]={handle:(0,i.on)(t,s,r),target:t},n&&n(t,o,e,s))}),l);return{remove(){h.remove();for(const e in u)c(e)}}}function d(e,t,s,i,n){const a="function"==typeof i?i:null,o="object"==typeof i?i:null;"boolean"==typeof i&&(n=i);let l,u=!1;function c(){l&&(l.remove(),l=null)}const h=(0,r.dD)();(0,r.fu)(o,(()=>{c(),h.reject((0,r.zE)())}));const d={then:h.promise.then.bind(h.promise),catch:h.promise.catch.bind(h.promise),remove:c};return Object.freeze(d),l=function(e,t,s,i,r){const n=e.watch(t,((t,r,n,a)=>{s&&!s(t)||null==i||i.call(e,t,r,n,a)}),r);if(Array.isArray(t))for(const r of t){const n=e.get(r);s&&s(n)&&(null==i||i.call(e,n,n,t,e))}else{const r=e.get(t);s&&s(r)&&(null==i||i.call(e,r,r,t,e))}return n}(e,t,s,((t,s,i,r)=>{u=!0,c(),a&&a.call(e,t,s,i,r),h.resolve({value:t,oldValue:s,propertyName:i,target:r})}),n),u&&c(),d}function f(e){return!!e}function m(e){return!e}function p(e){return!0===e}function g(e){return!1===e}},37455:(e,t,s)=>{s.d(t,{N:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},29730:(e,t,s)=>{s.d(t,{Y:()=>n});var i=s(70586);function r(e,t){return e?t?4:3:t?3:2}function n(e,t,s,n,l){if((0,i.Wi)(t)||!t.lengths.length)return null;const u="upperLeft"===(null==l?void 0:l.originPosition)?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const c=e.coords,h=[],d=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:f,coords:m}=t,p=r(s,n);let g=0;for(const e of f){const t=a(d,m,g,e,s,n,u);t&&h.push(t),g+=e*p}if(h.sort(((e,t)=>{let i=u*e[2]-u*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),h.length){let e=6*h[0][2];c[0]=h[0][0]/e,c[1]=h[0][1]/e,s&&(e=6*h[0][4],c[2]=0!==e?h[0][3]/e:0),(c[0]<d[0]||c[0]>d[1]||c[1]<d[2]||c[1]>d[3]||s&&(c[2]<d[4]||c[2]>d[5]))&&(c.length=0)}if(!c.length){const e=t.lengths[0]?o(m,0,f[0],s,n):null;if(!e)return null;c[0]=e[0],c[1]=e[1],s&&e.length>2&&(c[2]=e[2])}return e}function a(e,t,s,i,n,a,o=1){const l=r(n,a);let u=s,c=s+l,h=0,d=0,f=0,m=0,p=0;for(let s=0,r=i-1;s<r;s++,u+=l,c+=l){const s=t[u],i=t[u+1],r=t[u+2],a=t[c],o=t[c+1],l=t[c+2];let g=s*o-a*i;m+=g,h+=(s+a)*g,d+=(i+o)*g,n&&(g=s*l-a*r,f+=(r+l)*g,p+=g),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(m*o>0&&(m*=-1),p*o>0&&(p*=-1),!m)return null;const g=[h,d,.5*m];return n&&(g[3]=f,g[4]=.5*p),g}function o(e,t,s,i,n){const a=r(i,n);let o=t,d=t+a,f=0,m=0,p=0,g=0;for(let t=0,r=s-1;t<r;t++,o+=a,d+=a){const t=e[o],s=e[o+1],r=e[o+2],n=e[d],a=e[d+1],_=e[d+2],y=i?u(t,s,r,n,a,_):l(t,s,n,a);if(y)if(f+=y,i){const e=h(t,s,r,n,a,_);m+=y*e[0],p+=y*e[1],g+=y*e[2]}else{const e=c(t,s,n,a);m+=y*e[0],p+=y*e[1]}}return f>0?i?[m/f,p/f,g/f]:[m/f,p/f]:s>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function l(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function u(e,t,s,i,r,n){const a=i-e,o=r-t,l=n-s;return Math.sqrt(a*a+o*o+l*l)}function c(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function h(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}},7673:(e,t,s)=>{s.d(t,{Z:()=>be});var i=s(20102),r=s(22974),n=s(70586),a=s(69801),o=s(67900),l=s(60437),u=s(24470),c=s(20322),h=s(33955),d=s(70132),f=s(8744),m=s(74669),p=s(41534);const g=new class{constructor(e,t){this._cache=new m.Z(e),this._invalidCache=new m.Z(t)}get(e,t){const s=`${t.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(void 0!==this._invalidCache.get(s))return null;try{const i=p.WhereClause.create(e,t);return this._cache.put(s,i),i}catch{return this._invalidCache.put(s,null),null}}}(50,500),_="feature-store:unsupported-query",y=" as ",I=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeDate"]);function T(e,t){if(!t)return!0;const s=g.get(t,e);if(!s)throw new i.Z(_,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(_,"where clause is not standard",{where:t});return E(e,s.fieldNames,"where clause contains missing fields"),!0}function x(e,t,s){if(!t)return!0;const r=g.get(t,e);if(!r)throw new i.Z(_,"invalid SQL expression",{having:t});if(!r.isAggregate)throw new i.Z(_,"having does not contain a valid aggregate function",{having:t});const n=r.fieldNames;if(E(e,n,"having contains missing fields"),!r.getExpressions().every((t=>{const{aggregateType:i,field:r}=t,n=e.has(r)&&e.get(r).name;return s.some((t=>{const{onStatisticField:s,statisticType:r}=t;return(e.has(s)&&e.get(s).name)===n&&r.toLowerCase().trim()===i}))})))throw new i.Z(_,"expressions in having should also exist in outStatistics",{having:t});return!0}function S(e,t){return e?g.get(e,t):null}function E(e,t,s,r=!0){const n=[];for(const s of t)if("*"!==s&&!e.has(s))if(r){const t=b(s);try{const s=S(t,e);if(!s)throw new i.Z(_,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(_,"expression is not standard",{clause:s});E(e,s.fieldNames,"expression contains missing fields")}catch(e){const t=e&&e.details;if(t&&(t.clause||t.where))throw e;t&&t.missingFields?n.push(...t.missingFields):n.push(s)}}else n.push(s);if(n.length)throw new i.Z(_,s,{missingFields:n})}function b(e){return e.split(y)[0]}function R(e){return e.split(y)[1]}function F(e,t){const s=t.get(e);return!!s&&!I.has(s.type)}var v=s(37427),w=s(61159),A=s(82397),N=s(98732),V=s(8418);class C{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&-1===i.indexOf("*")){this.outFields=i;let e=0;for(const t of i){const i=b(t),r=this.fieldsIndex.get(i),n=r?null:S(i,s),a=r?r.name:R(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}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,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i).clause:s||(r=S(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r.calculateValue(e,this.featureAdapter)}getNormalizedValue(e,t){const s=t.normalizationType,i=t.normalizationTotal;let r=this.getFieldValue(e,t.field,t.fieldInfo);if(s&&Number.isFinite(r)){const n=this.getFieldValue(e,t.normalizationField,t.normalizationFieldInfo);r=(0,V.fk)(r,s,n,i)}return r}getExpressionValue(e,t,s){const i={attributes:this.featureAdapter.getAttributes(e)},r=s.createExecContext(i,t.viewInfo);return s.executeFunction(t.compiledFunc,r)}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:S(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testFeature(e,this.featureAdapter)}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:S(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testSet(e,this.featureAdapter)}_processAttributesForOutFields(e){const t=this.outFields;if(!t||!t.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if((0,n.Wi)(e)||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}var P,M,O=s(17590),k=s(11490),Q=s(35671),z=s(59266);class D{constructor(e,t,s){this.items=e,this.queryGeometry=t,this.definitionExpression=s.definitionExpression,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.fieldsIndex=s.fieldsIndex,this.timeInfo=s.timeInfo,this.featureAdapter=s.featureAdapter,this.aggregateAdapter=s.aggregateAdapter}get size(){return this.items.length}createQueryResponseForCount(e){const t=new C(e,this.featureAdapter,this.fieldsIndex);if(!e.outStatistics)return t.countDistinctValues(this.items);const{groupByFieldsForStatistics:s,having:i}=e;if(!(null==s?void 0:s.length))return 1;const r=new Map,n=new Map,a=new Set,o=e.outStatistics;for(const e of o){const{statisticType:o}=e,l="exceedslimit"!==o?e.onStatisticField:void 0;if(!n.has(l)){const e=[];for(const i of s){const s=this._getAttributeValues(t,i,r);e.push(s)}n.set(l,this._calculateUniqueValues(e,t.returnDistinctValues))}const u=n.get(l);for(const e in u){const{data:s,items:r}=u[e],n=s.join(",");i&&!t.validateItems(r,i)||a.add(n)}}return a.size}createQueryResponse(e){let t;return t=e.outStatistics?e.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(e):this._createStatisticsQueryResponse(e):this._createFeatureQueryResponse(e),e.returnQueryGeometry&&((0,f.JY)(e.outSR)&&!(0,f.fS)(this.queryGeometry.spatialReference,e.outSR)?t.queryGeometry=(0,k.S2)({spatialReference:e.outSR,...(0,v.iV)(this.queryGeometry,this.queryGeometry.spatialReference,e.outSR)}):t.queryGeometry=(0,k.S2)({spatialReference:e.outSR,...this.queryGeometry})),t}createSnappingResponse(e,t){const s=this.featureAdapter,i=function(e,t){return e?t?4:3:t?3:2}(this.hasZ,this.hasM),{x:r,y:a}=e.point,o="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,u={candidates:[]},c="esriGeometryPolygon"===this.geometryType,h=this._getPointCreator(e.point,this.spatialReference,t);for(const t of this.items){const d=s.getGeometry(t);if((0,n.Wi)(d))continue;const{coords:f,lengths:m}=d;if(e.types&P.EDGE){let e=0;for(let n=0;n<m.length;n++){const c=m[n];for(let n=0;n<c;n++,e+=i){const d=f[e],m=f[e+1];if(n!==c-1){const n=f[e+i],c=f[e+i+1],{x:p,y:g}=G(r,a,d,m,n,c),_=(r-p)/o,y=(a-g)/l,I=_*_+y*y;I<=1&&u.candidates.push({type:"edge",objectId:s.getObjectId(t),distance:Math.sqrt(I),target:h(p,g),start:h(d,m),end:h(n,c)})}}}}if(e.types&P.VERTEX){const e=c?f.length-i:f.length;for(let n=0;n<e;n+=i){const e=f[n],i=f[n+1],c=(r-e)/o,d=(a-i)/l,m=c*c+d*d;m<=1&&u.candidates.push({type:"vertex",objectId:s.getObjectId(t),distance:Math.sqrt(m),target:h(e,i)})}}}return u.candidates.sort(((e,t)=>e.distance-t.distance)),u}_getPointCreator(e,t,s){const i=(0,n.pC)(s)&&!(0,f.fS)(t,s)?e=>(0,v.iV)(e,t,s):e=>e;return null!=e.z&&null!=e.m?(t,s)=>i({x:t,y:s,z:e.z,m:e.m}):null!=e.z?(t,s)=>i({x:t,y:s,z:e.z}):null!=e.m?(t,s)=>i({x:t,y:s,m:e.m}):(e,t)=>i({x:e,y:t})}executeAttributesQuery(e){const t=S(e.where,this.fieldsIndex);if(!t)return Promise.resolve(this);if(t.isStandardized){let s=0;const i=[];for(const e of this.items)t.testFeature(e,this.featureAdapter)&&(i[s++]=e);const r=new D(i,this.queryGeometry,this);return r.definitionExpression=e.where,Promise.resolve(r)}return Promise.reject(new TypeError("Where clause is not standardized"))}executeAggregateIdsQuery(e){if(!e.aggregateIds||!e.aggregateIds.length||(0,n.Wi)(this.aggregateAdapter))return Promise.resolve(this);const t=new Set;for(const s of e.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;return Promise.resolve(new D(this.items.filter((e=>t.has(s(e)))),this.queryGeometry,this))}executeObjectIdsQuery(e){if(!e.objectIds||!e.objectIds.length)return Promise.resolve(this);const t=new Set(e.objectIds),s=this.featureAdapter.getObjectId;return Promise.resolve(new D(this.items.filter((e=>t.has(s(e)))),this.queryGeometry,this))}executeTimeQuery(e){const t=(0,O.y)(this.timeInfo,e.timeExtent,this.featureAdapter);if(!(0,n.pC)(t))return Promise.resolve(this);const s=this.items.filter(t);return Promise.resolve(new D(s,this.queryGeometry,this))}filterLatest(){const{trackIdField:e,startTimeField:t,endTimeField:s}=this.timeInfo,i=s||t,r=new Map,n=this.featureAdapter.getAttribute;for(const t of this.items){const s=n(t,e),a=n(t,i),o=r.get(s);(!o||a>n(o,i))&&r.set(s,t)}const a=Array.from(r.values());return Promise.resolve(new D(a,this.queryGeometry,this))}async project(e){if(!e||(0,f.fS)(this.spatialReference,e))return this;const t=this.featureAdapter,s=(await(0,v.oj)(this.items.map((e=>(0,k.Op)(this.geometryType,this.hasZ,this.hasM,t.getGeometry(e)))),this.spatialReference,e)).map(((e,s)=>t.cloneWithGeometry(this.items[s],(0,N.GH)(e,this.hasZ,this.hasM))));return new D(s,this.queryGeometry,{definitionExpression:this.definitionExpression,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:e,fieldsIndex:this.fieldsIndex,timeInfo:this.timeInfo,featureAdapter:this.featureAdapter})}async createSummaryStatisticsResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,minValue:o,maxValue:l,scale:u}=t,c=this.fieldsIndex.isDateField(s),h=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:u}),d=(0,V.S5)({normalizationType:n,normalizationField:r,minValue:o,maxValue:l}),f=this.fieldsIndex.get(s),m={value:.5,fieldType:null==f?void 0:f.type},p=(0,Q.qN)(f)?(0,V.H0)({values:h,supportsNullCount:d,percentileParams:m}):(0,V.i5)({values:h,minValue:o,maxValue:l,useSampleStdDev:!n,supportsNullCount:d,percentileParams:m});return(0,V.F_)(p,c)}async createUniqueValuesResponse(e,t){const{field:s,valueExpression:i,domain:r,returnAllCodedValues:n,scale:a}=t,o=await this._getDataValues(e,{field:s,valueExpression:i,scale:a}),l=(0,V.eT)(o);return(0,V.Qm)(l,r,n)}async createClassBreaksResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numClasses:h,scale:d}=t,f=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:d}),m=(0,V.G2)(f,{field:s,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numClasses:h});return(0,V.DL)(m,o)}async createHistogramResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numBins:h,scale:d}=t,f=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:d});return(0,V.oF)(f,{field:s,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numBins:h})}_sortFeatures(e,t,s){if(e.length>1&&t&&t.length)for(const i of t.reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=t[1]&&"desc"===t[1].toLowerCase(),o=(0,V.Lq)(null==n?void 0:n.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:o,outSR:l,quantizationParameters:u,resultRecordCount:c,resultOffset:h,returnZ:d,returnM:f}=e,m=null!=c&&t.length>(h||0)+c,p=o&&(o.includes("*")?[...this.fieldsIndex.fields]:o.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:m,features:this._createFeatures(e,t),fields:p,geometryType:s,hasM:i&&f,hasZ:r&&d,objectIdFieldName:n,spatialReference:(0,k.S2)(l||a),transform:u&&(0,A.vY)(u)||null}}_createFeatures(e,t){const s=new C(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:o,returnCentroid:l,maxAllowableOffset:u,resultOffset:c,resultRecordCount:h,returnZ:d=!1,returnM:f=!1}=e,m=r&&d,p=i&&f;let g=[],_=0;const y=[...t];if(this._sortFeatures(y,n,((e,t,i)=>s.getFieldValue(e,t,i))),o||l){const e=(0,A.vY)(a);if(o&&!l)for(const t of y)g[_++]={attributes:s.getAttributes(t),geometry:(0,k.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)};else if(!o&&l)for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,k.EG)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,k.EG)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,k.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)}}else for(const e of y){const t=s.getAttributes(e);t&&(g[_++]={attributes:t})}const I=c||0;if(null!=h){const e=I+h;g=g.slice(I,Math.min(g.length,e))}return g}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const t of e.outStatistics)if("exceedslimit"===t.statisticType){s=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,i=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,r=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>i)t=!0;else{const e=this.hasZ?this.hasM?4:3:this.hasM?3:2,s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+((0,n.pC)(i)&&i.coords.length||0)}),0)/e>r}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}_createStatisticsQueryResponse(e){const t={attributes:{}},s=[],i=new Map,r=new Map,n=new Map,a=new Map,o=new C(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:c,orderByFields:h}=e,d=u&&u.length,f=!!d,m=f&&u[0],p=f&&!this.fieldsIndex.get(m);for(const e of l){const{outStatisticFieldName:l,statisticType:h}=e,g=e,_="exceedslimit"!==h?e.onStatisticField:void 0,y="percentile_disc"===h||"percentile_cont"===h,I=f&&1===d&&(_===m||p)&&"count"===h;if(f){if(!n.has(_)){const e=[];for(const t of u){const s=this._getAttributeValues(o,t,i);e.push(s)}n.set(_,this._calculateUniqueValues(e,o.returnDistinctValues))}const e=n.get(_);for(const t in e){const{count:s,data:r,items:n,itemPositions:h}=e[t],d=r.join(",");if(!c||o.validateItems(n,c)){const e=a.get(d)||{attributes:{}};let t=null;if(I)t=s;else{const e=this._getAttributeValues(o,_,i),s=h.map((t=>e[t]));t=y&&"statisticParameters"in g?this._getPercentileValue(g,s):this._getStatisticValue(g,s,null,o.returnDistinctValues)}e.attributes[l]=t,u.forEach(((t,s)=>e.attributes[this.fieldsIndex.get(t)?t:`EXPR_${s+1}`]=r[s])),a.set(d,e)}}}else{const e=this._getAttributeValues(o,_,i);t.attributes[l]=y&&"statisticParameters"in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,r,o.returnDistinctValues)}s.push({name:l,alias:l,type:"esriFieldTypeDouble"})}const g=f?Array.from(a.values()):[t];return this._sortFeatures(g,h,((e,t)=>e.attributes[t])),{fields:s,features:g}}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=null!=s&&s.has(r)?s.get(r):(0,Q.qN)(this.fieldsIndex.get(r))?(0,V.H0)({values:t,returnDistinct:i}):(0,V.i5)({values:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s),l={value:n,orderBy:a,fieldType:null==o?void 0:o.type,isDiscrete:"percentile_disc"===r};return(0,V.XL)(t,l)}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const i=this.fieldsIndex.get(t),r=this.items.map((s=>e.getFieldValue(s,t,i)));return s.set(t,r),r}_getAttributeNormalizedValues(e,t){return this.items.map((s=>e.getNormalizedValue(s,{field:t.field,fieldInfo:this.fieldsIndex.get(t.field),normalizationField:t.normalizationField,normalizationFieldInfo:this.fieldsIndex.get(t.normalizationField),normalizationType:t.normalizationType,normalizationTotal:t.normalizationTotal})))}async _getAttributeExpressionValues(e,t,s){const{arcadeUtils:i}=await(0,z.LC)(),r=i.createFunction(t),n=s&&i.getViewInfo(s);return this.items.map((t=>e.getExpressionValue(t,{compiledFunc:r,viewInfo:n},i)))}_calculateUniqueValues(e,t){const s={},i=this.items,r=i.length;for(let n=0;n<r;n++){const r=i[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");t?null==s[o]&&(s[o]={count:1,data:a,items:[r],itemPositions:[n]}):null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t){const s=new C(e,this.featureAdapter,this.fieldsIndex),{valueExpression:i,field:r,normalizationField:n,normalizationType:a,normalizationTotal:o,scale:l}=t,u=i?{viewingMode:"map",scale:l,spatialReference:e.outSR||this.spatialReference}:null;return i?this._getAttributeExpressionValues(s,i,u):this._getAttributeNormalizedValues(s,{field:r,normalizationField:n,normalizationType:a,normalizationTotal:o})}}function G(e,t,s,i,r,n){const a=r-s,o=n-i,l=a*a+o*o,u=(e-s)*a+(t-i)*o,c=Math.min(1,Math.max(0,u/l));return{x:s+a*c,y:i+o*c}}(M=P||(P={}))[M.NONE=0]="NONE",M[M.EDGE=1]="EDGE",M[M.VERTEX=2]="VERTEX";var L=s(10402),U=s(99514),Z=s(43697),q=s(15923),j=s(61247),B=s(92604),Y=s(54790),H=s(44553),W=s(95330),X=s(17445),J=s(76882),$=s(43050),K=s(5600),ee=(s(67676),s(80442),s(75215),s(52011));let te=class extends q.Z{constructor(){super(...arguments),this._tasks=new Array,this.running=!1}get length(){return this._tasks.length}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this.running=!0,new Promise(((i,r)=>this._tasks.push(new se(i,r,e,t,s))))}unshift(e,t,s){return this.running=!0,new Promise(((i,r)=>this._tasks.unshift(new se(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,W.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,W.zE)());else{const i=s?t.abortCallback((0,W.zE)()):t.callback(e);(0,W.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this.running=this._tasks.length>0,!0}cancelAll(){const e=(0,W.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this.running=!1}};(0,Z._)([(0,K.Cb)()],te.prototype,"running",void 0),te=(0,Z._)([(0,ee.j)("esri.layers.support.PromiseQueue")],te);class se{constructor(e,t,s,i,r){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}let ie=class extends q.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,Z._)([(0,K.Cb)()],ie.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,Z._)([(0,K.Cb)()],ie.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),ie=(0,Z._)([(0,ee.j)("esri.views.support.DebugFlags")],ie);const re=new ie,ne=B.Z.getLogger("esri.views.support.Scheduler");var ae;!function(e){e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="cloud generator",e[e.TEST_PRIO=1]="TEST_PRIO"}(ae||(ae={}));const oe=new Map([[ae.RESOURCE_CONTROLLER,0],[ae.SLIDE,0],[ae.STREAM_DATA_LOADER,0],[ae.ELEVATION_QUERY,0],[ae.TERRAIN_SURFACE,1],[ae.SURFACE_GEOMETRY_UPDATES,1],[ae.GRAPHICS_CORE,2],[ae.I3S_CONTROLLER,2],[ae.POINT_CLOUD_LAYER,2],[ae.FEATURE_TILE_FETCHER,2],[ae.OVERLAY,4],[ae.STAGE,4],[ae.GRAPHICS_DECONFLICTOR,4],[ae.FILTER_VISIBILITY,4],[ae.SCALE_VISIBILITY,4],[ae.FRUSTUM_VISIBILITY,4],[ae.POINT_OF_INTEREST_FREQUENT,6],[ae.POINT_OF_INTEREST_INFREQUENT,30],[ae.LABELER,8],[ae.FEATURE_QUERY_ENGINE,8],[ae.FEATURE_TILE_TREE,16],[ae.FEATURE_TILE_TREE_ACTIVE,0],[ae.ELEVATION_ALIGNMENT,12],[ae.TEXT_TEXTURE_ATLAS,12],[ae.CLOUDS_GENERATOR,12],[ae.TEXTURE_UNLOAD,12],[ae.LINE_OF_SIGHT_TOOL,16],[ae.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[ae.SNAPPING,0],[ae.SHADOW_ACCUMULATOR,30]]);function le(e){return oe.has(e)?oe.get(e):"number"==typeof e?e:1}var ue;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(ue||(ue={}));const ce=(0,J.HA)(6.5),he=(0,J.HA)(1),de=(0,J.HA)(30),fe=(0,J.HA)(1e3/30),me=(0,J.HA)(100);var pe,ge;!function(e){let t=class extends q.Z{constructor(e){super(e),this.updating=!0,this._microTaskQueued=!1,this.performanceInfo={total:new Y.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=null,this._state=ue.INTERACTING,this._tasks=new H.Z,this._runQueue=new H.Z,this._load=0,this._idleStateCallbacks=new H.Z,this._idleUpdatesStartFired=!1,this._maxReschedule=Ie,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,$.S1)(re,"SCHEDULER_LOG_SLOW_TASKS",(e=>this._debug=e)),this._budget=new i(e.nowFunc);for(const e of Object.keys(ae))this.performanceInfo.tasks.set(ae[e],new Y.Z(ae[e]));let t;const s=this;this._test={get state(){return(0,n.Pt)(t,s._state)},set state(e){t=e},FRAME_SAFETY_BUDGET:ce,INTERACTING_BUDGET:fe,IDLE_BUDGET:me,get budget(){return s._budget.budget},usedBudget:0,setBudget:e=>s._budget=e,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,n.hw)(this._debugHandle),this._microTaskQueued=!1,this.updating=!1}activate(){this._budget.done||this._microTaskQueued||(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.done||(this._maxReschedule=Ie,this._schedule(),this.frame()))})))}registerTask(e,t){const i=le(e),r=new s(this,e,t,i);return this._tasks.push(r),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new Y.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===ue.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===ue.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get now(){return this.nowFunc()}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==ue.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return(0,n.Wi)(this._test.state)?this._state:this._test.state}updateBudget(e){this._test.usedBudget=0;let t=ce,s=e.frameDuration,i=he;switch(this.state){case ue.IDLE:t=(0,J.HA)(0),s=(0,J.HA)(Math.max(me,e.frameDuration)),i=de;break;case ue.INTERACTING:s=(0,J.HA)(Math.max(fe,e.frameDuration));case ue.ANIMATING:}return s=(0,J.HA)(s-e.elapsedFrameTime-t),this.state!==ue.IDLE&&s<he&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,J.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._maxReschedule=Ie,this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case ue.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case ue.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,J.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e)}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return ge.SCHEDULED;let t=ge.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=ge.READY:t!==ge.READY&&(t=ge.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){if(this._maxReschedule<=0)return!1;for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.some((t=>t===e))&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this.updating=!1,!1;this._maxReschedule===Ie&&(this._maxReschedule=t),--this._maxReschedule}return this.updating=!0,!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)}catch(e){ne.error(`Exception in task "${s.name}"`,e)}s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&this._budget.elapsed>2*this._budget.budget&&console.log("Task",s.name,"used",this._budget.elapsed,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this.updating=this._tasks.some((e=>e.needsUpdate)),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this.updating=this._tasks.some((e=>e.needsUpdate)),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(ae))this._frameTaskTimes.set(ae[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};(0,Z._)([(0,K.Cb)()],t.prototype,"updating",void 0),(0,Z._)([(0,K.Cb)()],t.prototype,"nowFunc",void 0),t=(0,Z._)([(0,ee.j)("esri.views.support.Scheduler")],t),e.Scheduler=t;let s=class extends q.Z{constructor(e,t,s,i){super({}),this._scheduler=e,this.name=t,this._basePriority=i,this.runtime=0,this._queue=new te,this._handles=new j.Z,this.schedulePriority=this._basePriority,this.task=(0,n.pC)(s)?s:this._queue,this._handles.add((0,X.gx)((()=>this.task.running),(()=>e.activate())))}get updating(){return this._queue.running}normalizeCtorArgs(){return{}}remove(){this.processQueue(_e),this._scheduler.removeTask(this),this.schedule=ye.schedule,this.reschedule=ye.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=le(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}};(0,Z._)([(0,K.Cb)({constructOnly:!0})],s.prototype,"task",void 0),(0,Z._)([(0,K.Cb)({readOnly:!0})],s.prototype,"updating",null),s=(0,Z._)([(0,ee.j)("esri.views.support.SchedulerTask")],s);class i{constructor(e){this.now=e,this._begin=0,this._budget=0,this._state=ue.IDLE,this._didWork=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&(this._didWork=!0),!0)}get done(){return this._didWork&&this.elapsed>=this._budget&&this._enabled}get budget(){return this._budget}madeProgress(){this._didWork=!0}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this._didWork=!1}get remaining(){return Math.max(this._budget-this.elapsed,0)}get elapsed(){return this.now()-this._begin}resetProgress(){this._didWork=!1}get hasProgressed(){return this._didWork}}e.Budget=i}(pe||(pe={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(ge||(ge={}));const _e=(()=>{const e=new pe.Budget((()=>performance.now()));return e.enabled=!1,e})(),ye=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,W.Hc)(t)){const e=(0,W.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,W.gx)(e(_e))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},Ie=Number.MAX_SAFE_INTEGER,Te="feature-store:unsupported-query",xe=new Set,Se=new a.WJ(2e6);let Ee=0;class be{constructor(e){this.capabilities={query:w.g},this.geometryType=e.geometryType,this.hasM=e.hasM,this.hasZ=e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new a.Xq(Ee+++"$$",Se)),this.fieldsIndex=new U.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,n.hw)(this._frameTask),this.clearCache(),(0,n.SC)(this._geometryQueryCache),this._changeHandle=(0,n.hw)(this._changeHandle),(0,n.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}get fullExtent(){const e=this.featureStore.fullBounds;return e?{xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:(0,k.S2)(this.spatialReference)}:null}get timeExtent(){return this.timeInfo?(this._timeExtent||(this._timeExtent=(0,O.R)(this.timeInfo,this.featureStore)),this._timeExtent):null}clearCache(){this._geometryQueryCache&&this._geometryQueryCache.clear(),this._allItems=null,this._timeExtent=null}async executeQuery(e={},t){let s,i=(0,r.d9)(e);try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t)}catch(e){if(e!==k.vF)throw e;s=new D([],null,this)}return s.createQueryResponse(i)}async executeQueryForCount(e={},t){let s=(0,r.d9)(e);s.returnGeometry=!1,s.returnCentroid=!1,s.outSR=null;try{s=await this._schedule((()=>(0,k.Up)(s,this.definitionExpression,this.spatialReference)),t),s=await this._reschedule((()=>this._checkQuerySupport(s)),t);let e=await this._reschedule((()=>this._executeGeometryQuery(s,t)),t);return e=await this._reschedule((()=>e.executeAggregateIdsQuery(s)),t),e=await this._reschedule((()=>e.executeObjectIdsQuery(s)),t),e=await this._reschedule((()=>e.executeTimeQuery(s)),t),e=await this._reschedule((()=>e.executeAttributesQuery(s)),t),e.createQueryResponseForCount(s)}catch(e){if(e!==k.vF)throw e;return 0}}async executeQueryForExtent(e={},t){let s,i=(0,r.d9)(e);const n=i.outSR;try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),i.returnGeometry=!0,i.returnCentroid=!1,i.outSR=null,s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t);const e=s.size;if(!e)return{count:e,extent:null};(0,l.t8)(Fe,l.Gv),this.featureStore.forEachBounds(s.items,(e=>(0,l.TC)(Fe,e)),Re);const r={xmin:Fe[0],ymin:Fe[1],xmax:Fe[3],ymax:Fe[4],spatialReference:(0,k.S2)(this.spatialReference)};this.hasZ&&isFinite(Fe[2])&&isFinite(Fe[5])&&(r.zmin=Fe[2],r.zmax=Fe[5]);const a=(0,v.iV)(r,s.spatialReference,n);if(a.spatialReference=(0,k.S2)(n||this.spatialReference),a.xmax-a.xmin==0){const e=(0,o.c9)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin==0){const e=(0,o.c9)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin==0){const e=(0,o.c9)(a.spatialReference);a.zmin-=e,a.zmax+=e}return{count:e,extent:a}}catch(e){if(e===k.vF)return{count:0,extent:null};throw e}}async executeQueryForIds(e={},t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e={},t){let s,i=(0,r.d9)(e);i.returnGeometry=!1,i.returnCentroid=!1,i.outSR=null;try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t);const e=s.items,r=new Set;return await this._reschedule((()=>{for(const t of e)r.add(s.featureAdapter.getObjectId(t))}),t),r}catch(e){if(e===k.vF)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,types:r}=e;if(r===P.NONE)return{candidates:[]};const a=await this._reschedule((()=>this._checkQuerySupport(e.query)),t),o=!(0,f.fS)(s.spatialReference,this.spatialReference);o&&await(0,v._W)(s.spatialReference,this.spatialReference);const l="number"==typeof i?i:i.x,u="number"==typeof i?i:i.y,c={xmin:s.x-l,xmax:s.x+l,ymin:s.y-u,ymax:s.y+u,spatialReference:s.spatialReference},m=o?(0,v.iV)(c,this.spatialReference):c;if(!m)return{candidates:[]};const p=(await(0,d.aX)((0,h.im)(s),null,{signal:t}))[0],g=(await(0,d.aX)((0,h.im)(m),null,{signal:t}))[0];if((0,n.Wi)(p)||(0,n.Wi)(g))return{candidates:[]};let _=new D(this._searchFeatures(this._getQueryBBoxes(g.toJSON())),null,this);_=await this._reschedule((()=>_.executeObjectIdsQuery(a)),t),_=await this._reschedule((()=>_.executeTimeQuery(a)),t),_=await this._reschedule((()=>_.executeAttributesQuery(a)),t);const y=p.toJSON(),I=o?(0,v.iV)(y,this.spatialReference):y,T=o?Math.max(m.xmax-m.xmin,m.ymax-m.ymin)/2:i;return _.createSnappingResponse({...e,point:I,distance:T},s.spatialReference)}async executeQueryForLatestObservations(e={},t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new i.Z(Te,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});let s,n=(0,r.d9)(e);try{n=await this._schedule((()=>(0,k.Up)(n,this.definitionExpression,this.spatialReference)),t),n=await this._reschedule((()=>this._checkQuerySupport(n)),t),s=await this._reschedule((()=>this._executeGeometryQuery(n,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(n)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(n)),t),s=await this._reschedule((()=>s.executeTimeQuery(n)),t),s=await this._reschedule((()=>s.executeAttributesQuery(n)),t),s=await this._reschedule((()=>s.filterLatest()),t)}catch(e){if(e!==k.vF)throw e;s=new D([],null,this)}return s.createQueryResponse(n)}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(e,t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,valueExpression:r}=t;return(await this._getQueryEngineResultForStats(e,{field:i,valueExpression:r},s)).createUniqueValuesResponse(e,t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(e,t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(e,t)}async _schedule(e,t){return(0,n.pC)(this._frameTask)?this._frameTask.schedule(e,t):e(_e)}async _reschedule(e,t){return(0,n.pC)(this._frameTask)?this._frameTask.reschedule(e,t):e(_e)}_getAll(){if(!this._allItems){const e=[];this.featureStore.forEach((t=>e.push(t))),this._allItems=new D(e,null,this)}return this._allItems}async _executeGeometryQuery(e,t){const{geometry:s,outSR:i,spatialRel:r,returnGeometry:a,returnCentroid:o}=e,l=a||o,u=(0,f.JY)(i)&&!(0,f.fS)(this.spatialReference,i),c=this._geometryQueryCache?u&&l?JSON.stringify({geometry:s,spatialRelationship:r,outSpatialReference:i}):JSON.stringify({geometry:s,spatialRelationship:r}):null;if(c){const e=this._geometryQueryCache.get(c);if(!(0,n.o8)(e))return e}const h=async e=>{if(u&&l){const t=await e.project(i);return c&&this._geometryQueryCache.put(c,t,t.size||1),t}return c&&this._geometryQueryCache.put(c,e,e.size||1),e};if(!s)return h(this._getAll());const d=this.featureAdapter;if("esriSpatialRelDisjoint"===r){const e=this._searchFeatures(this._getQueryBBoxes(s));if(!e.length)return h(this._getAll());let i,n;const a=new Set;for(const t of e)a.add(d.getObjectId(t));await this._reschedule((()=>{let e=0;i=new Array(a.size),this.featureStore.forEach((t=>i[e++]=t)),n=a}),t);const o=await this._reschedule((async()=>{const e=await(0,L.cW)(r,s,this.geometryType,this.hasZ,this.hasM);return new D(await this._runSpatialFilter(i,(t=>!n.has(d.getObjectId(t))||e(d.getGeometry(t))),t),s,this)}),t);return h(o)}const m=this._searchFeatures(this._getQueryBBoxes(s));if(!m.length){const e=new D([],s,this);return c&&this._geometryQueryCache.put(c,e,e.size||1),e}if(this._canExecuteSoloPass(s,e))return h(new D(m,s,this));const p=await(0,L.cW)(r,s,this.geometryType,this.hasZ,this.hasM),g=await this._runSpatialFilter(m,(e=>p(d.getGeometry(e))),t);return h(new D(g,s,this))}async _runSpatialFilter(e,t,s){if(!t)return e;if((0,n.Wi)(this._frameTask))return e.filter((e=>t(e)));let i=0;const r=new Array,a=async n=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),n.madeProgress()),n.done&&await this._reschedule((e=>a(e)),s)}};return this._reschedule((e=>a(e)),s).then((()=>r))}_canExecuteSoloPass(e,t){const{geometryType:s}=this,{spatialRel:i}=t;return(0,L.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===s&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i||"esriSpatialRelWithin"===i))}_getQueryBBoxes(e){if((0,L.hN)(e)){if((0,h.YX)(e))return[(0,u.al)(e.xmin,e.ymin,e.xmax,e.ymax)];if((0,h.oU)(e))return e.rings.map((e=>(0,u.al)(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,c.$P)((0,u.Ue)(),e)]}_searchFeatures(e){for(const t of e)this.featureStore.forEachInBounds(t,(e=>{xe.add(e)}));const t=new Array(xe.size);let s=0;return xe.forEach((e=>t[s++]=e)),xe.clear(),t}async _checkStatisticsSupport(e,t){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new i.Z(Te,"Unsupported query options",{query:e});return Promise.all([this._checkAttributesQuerySupport(e),this._checkStatisticsParamsSupport(t),(0,L.P0)(e,this.geometryType,this.spatialReference),(0,v._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e){let t=[];if(e.valueExpression){const{arcadeUtils:s}=await(0,z.LC)();t=s.extractFieldNames(e.valueExpression)}if(e.field&&t.push(e.field),e.normalizationField&&t.push(e.normalizationField),!t.length)throw new i.Z(Te,"params should have at least a field or valueExpression",{params:e});E(this.fieldsIndex,t,"params contains missing fields")}async _checkQuerySupport(e){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new i.Z(Te,"Unsupported query options",{query:e});return Promise.all([this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),(0,L.P0)(e,this.geometryType,this.spatialReference),(0,v._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:r,outStatistics:n}=e,a=n?n.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())):[];if(s&&s.length>0){const e=" asc",t=" desc",i=s.map((s=>{const i=s.toLowerCase();return i.indexOf(e)>-1?i.split(e)[0]:i.indexOf(t)>-1?i.split(t)[0]:s})).filter((e=>-1===a.indexOf(e)));E(this.fieldsIndex,i,"orderByFields contains missing fields")}if(t&&t.length>0)E(this.fieldsIndex,t,"outFields contains missing fields");else if(r)throw new i.Z(Te,"outFields should be specified for returnDistinctValues",{query:e});T(this.fieldsIndex,e.where)}async _checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:r}=e,n=s&&s.length,a=t&&t.length;if(r){if(!n||!a)throw new i.Z(Te,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});x(this.fieldsIndex,r,t)}if(a){if(!function(e){return e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const r=t.map((e=>e.onStatisticField));E(this.fieldsIndex,r,"onStatisticFields contains missing fields"),n&&E(this.fieldsIndex,s,"groupByFieldsForStatistics contains missing fields");for(const s of t){const{onStatisticField:t,statisticType:r}=s;if("percentile_disc"!==r&&"percentile_cont"!==r||!("statisticParameters"in s)){if("count"!==r&&t&&F(t,this.fieldsIndex))throw new i.Z(Te,"outStatistics contains non-numeric fields",{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new i.Z(Te,"statisticParamters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e={},t,s){let i;e=(0,r.d9)(e);try{e=await this._schedule((()=>(0,k.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s),i=await this._reschedule((()=>this._executeGeometryQuery(e,s)),s),i=await this._reschedule((()=>i.executeAggregateIdsQuery(e)),s),i=await this._reschedule((()=>i.executeObjectIdsQuery(e)),s),i=await this._reschedule((()=>i.executeTimeQuery(e)),s),i=await this._reschedule((()=>i.executeAttributesQuery(e)),s)}catch(e){if(e!==k.vF)throw e;i=new D([],null,this)}return i}}const Re=(0,l.Ue)(),Fe=(0,l.Ue)()},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},37427:(e,t,s)=>{s.d(t,{_W:()=>d,iV:()=>p,oj:()=>_});var i=s(70586),r=s(44547),n=s(37455),a=s(8744),o=s(40488);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,l),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,l),[s.xmax,s.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}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:h(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:void 0}function c(e,t){const s=[];for(const i of e)s.push(h(i,t));return s}function h(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function d(e,t){if(!t)return;const s=Array.isArray(e)?e.map((e=>(0,i.pC)(e.geometry)&&e.geometry.spatialReference)):[e];await(0,r.iQ)(s.map((e=>({source:e,dest:t}))))}const f=u.bind(null,o.hG),m=u.bind(null,o.R6);function p(e,t,s){return e?(s||(s=t,t=e.spatialReference),(0,a.JY)(t)&&(0,a.JY)(s)&&!(0,a.fS)(t,s)?(0,o.Q8)(t,s)?(0,a.sS)(s)?f(e):m(e):(0,r.oj)(n.N,[e],t,s,null)[0]:e):e}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s){if(!e||!e.length||!t||!s||(0,a.fS)(t,s))return e;const i={geometries:e,inSpatialReference:t,outSpatialReference:s,resolve:null};return this._jobs.push(i),new Promise((e=>{i.resolve=e,null===this._timer&&(this._timer=setTimeout(this._process,10))}))}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:l}=e;(0,o.Q8)(s,i)?(0,a.sS)(i)?l(t.map(f)):l(t.map(m)):l((0,r.oj)(n.N,t,s,i,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,s){return g.push(e,t,s)}},10402:(e,t,s)=>{s.d(t,{hN:()=>E,P0:()=>S,cW:()=>x});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),o=s(8744);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,n){const a=l(r,n),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=a)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const n=l(t,s),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,i,r),c+=e*n;return u}function h(e,t,s,i,r,n,a){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=s(98732),f=s(5428),m=s(37427),p=s(11490);const g="feature-store:unsupported-query",_={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},I={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},T={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1};function x(e,t,i,o,l){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new f.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new f.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>u(s,!1,!1,e,o,l)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,p.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,p.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e=function(e){return"mesh"===e?n.h_:(0,n.IY)(e)}(i);return Promise.resolve((s=>e(t,(0,p.Op)(i,o,l,s))))}return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[_[e]].bind(null,t.spatialReference,t);return e=>r((0,p.Op)(i,o,l,e))}))}async function S(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return!0===y[e]}(r))throw new i.Z(g,"Unsupported query spatial relationship",{query:e});if((0,o.JY)(n.spatialReference)&&(0,o.JY)(s)){if(!function(e){return!0===I[(0,a.Ji)(e)]}(n))throw new i.Z(g,"Unsupported query geometry type",{query:e});if(!function(e){return!0===T[e]}(t))throw new i.Z(g,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,m._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function E(e){if((0,a.YX)(e))return!0;if((0,a.oU)(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}},17590:(e,t,s)=>{function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)t.forEach((e=>{const t=s.getAttribute(e,i),o=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==o||isNaN(o)||(a=Math.max(a,o))}));else{const e=i||r;t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;return null===n&&null===a?null:void 0===n&&void 0===a?()=>!1:i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e.getAttribute(n,t),o=e.getAttribute(n,s);return(null==a||a<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e.getAttribute(t,s);return null==r||r>=i}:null!=r?s=>{const i=e.getAttribute(s,t);return null==i||i<=r}:void 0}(s,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e.getAttribute(i,t)===s:null!=s&&null!=i?r=>{const n=e.getAttribute(r,t);return n>=s&&n<=i}:null!=s?i=>e.getAttribute(i,t)>=s:null!=i?s=>e.getAttribute(s,t)<=i:void 0}(s,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})},11490:(e,t,s)=>{s.d(t,{vF:()=>m,S2:()=>E,Op:()=>T,Up:()=>x,j6:()=>S,EG:()=>I});var i=s(35454),r=s(70586),n=s(67900),a=s(49600),o=s(33955),l=s(70132),u=s(8744),c=s(98732),h=s(5428),d=s(37427);const f=new i.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),m=Object.freeze({}),p=new h.Z,g=new h.Z,_=new h.Z,y={esriGeometryPoint:c.fQ,esriGeometryPolyline:c.J6,esriGeometryPolygon:c.eG,esriGeometryMultipoint:c.Iv};function I(e,t,s,i=e.hasZ,n=e.hasM){if((0,r.Wi)(t))return null;const a=e.hasZ&&i,o=e.hasM&&n;if(s){const r=(0,c.Nh)(_,t,e.hasZ,e.hasM,"esriGeometryPoint",s,i,n);return(0,c.fQ)(r,a,o)}return(0,c.fQ)(t,a,o)}function T(e,t,s,i,n,a,o=t,l=s){const u=t&&o,h=s&&l,d=(0,r.pC)(i)?"coords"in i?i:i.geometry:null;if((0,r.Wi)(d))return null;if(n){let i=(0,c.zj)(g,d,t,s,e,n,o,l);return a&&(i=(0,c.Nh)(_,i,u,h,e,a)),y[e](i,u,h)}if(a){const i=(0,c.Nh)(_,d,t,s,e,a,o,l);return y[e](i,u,h)}return(0,c.hY)(p,d,t,s,o,l),y[e](p,u,h)}async function x(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[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),S(e,t,s)}async function S(e,t,i){if(!e)return null;let{where:c}=e;if(e.where=c=c&&c.trim(),(!c||/^1 *= *1$/.test(c)||t&&t===c)&&(e.where=null),!e.geometry)return e;let h=await async function(e){const{geometry:t,distance:i,units:r}=e;if(null==i||"vertexAttributes"in t)return t;const a=t.spatialReference,o=r?f.fromJSON(r):(0,n.qE)(a),l=a&&((0,u.sT)(a)||(0,u.sS)(a))?t:await(0,d._W)(a,u.Zn).then((()=>(0,d.iV)(t,u.Zn)));return(await async function(){return(await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247))).geodesicBuffer}())(l.spatialReference,l,i,o)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;h=(0,a.aO)(h),h.spatialReference=t}e.geometry=h,await(0,d._W)(h.spatialReference,i);const p=(await(0,l.aX)((0,o.im)(h)))[0];if((0,r.Wi)(p))throw m;const g=p.toJSON(),_=await(0,d.iV)(g,g.spatialReference,i);if(!_)throw m;return _.spatialReference=i,e.geometry=_,e}function E(e){return e&&b in e?JSON.parse(JSON.stringify(e,R)):e}const b="_geVersion",R=(e,t)=>e!==b?t:void 0},8418:(e,t,s)=>{s.d(t,{G2:()=>b,oF:()=>F,XL:()=>g,i5:()=>p,H0:()=>m,eT:()=>x,Qm:()=>S,Lq:()=>_,fk:()=>E,S5:()=>f,F_:()=>T,DL:()=>R});var i=s(57316);function r(e,t){return Number(e.toFixed(t))}function n(e){const t=e.definition,{classificationMethod:s,breakCount:i,normalizationType:n,definedInterval:l}=t,u=[];let c=e.values;if(0===c.length)return[];c=c.sort(((e,t)=>e-t));const h=c[0],d=c[c.length-1];if("equal-interval"===s)if(c.length>=i){const e=(d-h)/i;let t=h;for(let s=1;s<i;s++){const i=r(h+s*e,6);u.push({minValue:t,maxValue:i,label:a(t,i,n)}),t=i}u.push({minValue:t,maxValue:d,label:a(t,d,n)})}else c.forEach((e=>{u.push({minValue:e,maxValue:e,label:a(e,e,n)})}));else if("natural-breaks"===s){const t=function(e){const t=[],s=[];let i=Number.MIN_VALUE,r=1,n=-1;for(let a=0;a<e.length;a++){const o=e[a];o===i?(r++,s[n]=r):null!==o&&(t.push(o),i=o,r=1,s.push(r),n++)}return{uniqueValues:t,valueFrequency:s}}(c),s=e.valueFrequency||t.valueFrequency,l=o(t.uniqueValues,s,i);let f=h;for(let e=1;e<i;e++)if(t.uniqueValues.length>e){const s=r(t.uniqueValues[l[e]],6);u.push({minValue:f,maxValue:s,label:a(f,s,n)}),f=s}u.push({minValue:f,maxValue:d,label:a(f,d,n)})}else if("quantile"===s)if(c.length>=i&&h!==d){let e=h,t=Math.ceil(c.length/i),s=0;for(let r=1;r<i;r++){let o=t+s-1;o>c.length&&(o=c.length-1),o<0&&(o=0),u.push({minValue:e,maxValue:c[o],label:a(e,c[o],n)}),e=c[o],s+=t,t=Math.ceil((c.length-s)/(i-r))}u.push({minValue:e,maxValue:d,label:a(e,d,n)})}else{let e=-1;for(let t=0;t<c.length;t++){const s=c[t];s!==e&&(e=s,u.push({minValue:e,maxValue:s,label:a(e,s,n)}),e=s)}}else if("standard-deviation"===s){const e=function(e){let t=0;for(let s=0;s<e.length;s++)t+=e[s];return t/=e.length,t}(c),t=function(e,t){let s=0;for(let i=0;i<e.length;i++){const r=e[i];s+=(r-t)*(r-t)}return s/=e.length,Math.sqrt(s)}(c,e);if(0===t)u.push({minValue:c[0],maxValue:c[0],label:a(c[0],c[0],n)});else{const s=function(e,t,s,i,r){let n=Math.max(i-e,t-i)/r/s;return n=n>=1?1:n>=.5?.5:.25,n}(h,d,i,e,t)*t;let o=0,l=h;for(let t=i;t>=1;t--){const i=r(e-(t-.5)*s,6);u.push({minValue:l,maxValue:i,label:a(l,i,n)}),l=i,o++}let c=r(e+.5*s,6);u.push({minValue:l,maxValue:c,label:a(l,c,n)}),l=c,o++;for(let t=1;t<=i;t++)c=o===2*i?d:r(e+(t+.5)*s,6),u.push({minValue:l,maxValue:c,label:a(l,c,n)}),l=c,o++}}else if("defined-interval"===s){if(!l)return u;const e=c[0],t=c[c.length-1],s=Math.ceil((t-e)/l);let i=e;for(let t=1;t<s;t++){const s=r(e+t*l,6);u.push({minValue:i,maxValue:s,label:a(i,s,n)}),i=s}u.push({minValue:i,maxValue:t,label:a(i,t,n)})}return u}function a(e,t,s){let i=null;return i=e===t?s&&"percent-of-total"===s?e+"%":e.toString():s&&"percent-of-total"===s?e+"% - "+t+"%":e+" - "+t,i}function o(e,t,s){const i=e.length,r=[];s>i&&(s=i);for(let e=0;e<s;e++)r.push(Math.round(e*i/s-1));r.push(i-1);let n=l(r,e,t,s);return function(e,t,s,i,r,n){let a=0,o=0,l=0,c=0,h=!0;for(let d=0;d<2&&h;d++){0===d&&(h=!1);for(let d=0;d<n-1;d++)for(;s[d+1]+1!==s[d+2];){s[d+1]=s[d+1]+1;const n=u(d,s,i,r);l=n.sbMean,a=n.sbSdcm;const f=u(d+1,s,i,r);if(c=f.sbMean,o=f.sbSdcm,!(a+o<t[d]+t[d+1])){s[d+1]=s[d+1]-1;break}t[d]=a,t[d+1]=o,e[d]=l,e[d+1]=c,h=!0}for(let d=n-1;d>0;d--)for(;s[d]!==s[d-1]+1;){s[d]=s[d]-1;const n=u(d-1,s,i,r);l=n.sbMean,a=n.sbSdcm;const f=u(d,s,i,r);if(c=f.sbMean,o=f.sbSdcm,!(a+o<t[d-1]+t[d])){s[d]=s[d]+1;break}t[d-1]=a,t[d]=o,e[d-1]=l,e[d]=c,h=!0}}return h}(n.mean,n.sdcm,r,e,t,s)&&(n=l(r,e,t,s)),r}function l(e,t,s,i){let r=[],n=[],a=[],o=0;const l=[],c=[];for(let r=0;r<i;r++){const i=u(r,e,t,s);l.push(i.sbMean),c.push(i.sbSdcm),o+=c[r]}let h,d=o,f=!0;for(;f||o<d;){f=!1,r=[];for(let t=0;t<i;t++)r.push(e[t]);for(let s=0;s<i;s++)for(let r=e[s]+1;r<=e[s+1];r++)if(h=t[r],s>0&&r!==e[s+1]&&Math.abs(h-l[s])>Math.abs(h-l[s-1]))e[s]=r;else if(s<i-1&&e[s]!==r-1&&Math.abs(h-l[s])>Math.abs(h-l[s+1])){e[s+1]=r-1;break}d=o,o=0,n=[],a=[];for(let r=0;r<i;r++){n.push(l[r]),a.push(c[r]);const i=u(r,e,t,s);l[r]=i.sbMean,c[r]=i.sbSdcm,o+=c[r]}}if(o>d){for(let t=0;t<i;t++)e[t]=r[t],l[t]=n[t],c[t]=a[t];o=d}return{mean:l,sdcm:c}}function u(e,t,s,i){let r=0,n=0;for(let a=t[e]+1;a<=t[e+1];a++){const e=i[a];r+=s[a]*e,n+=e}n<=0&&console.log("Exception in Natural Breaks calculation");const a=r/n;let o=0;for(let r=t[e]+1;r<=t[e+1];r++)o+=i[r]*(s[r]-a)**2;return{sbMean:a,sbSdcm:o}}const c=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,h=new Set(["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]),d=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function f(e){const t=null!=e.normalizationField||null!=e.normalizationType,s=null!=e.minValue||null!=e.maxValue,i=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!s&&!i}function m(e){const t=e.returnDistinct?[...new Set(e.values)]:e.values,s=t.filter((e=>null!=e)).length,i={count:s};return e.supportsNullCount&&(i.nullcount=t.length-s),e.percentileParams&&(i.median=g(t,e.percentileParams)),i}function p(e){const{values:t,useSampleStdDev:s,supportsNullCount:i}=e;let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,a=null,o=null,l=null,u=null,c=0;const h=null==e.minValue?-1/0:e.minValue,d=null==e.maxValue?1/0:e.maxValue;for(const e of t)Number.isFinite(e)?e>=h&&e<=d&&(a+=e,r=Math.min(r,e),n=Math.max(n,e),c++):"string"==typeof e&&c++;if(c&&null!=a){o=a/c;let e=0;for(const s of t)Number.isFinite(s)&&s>=h&&s<=d&&(e+=(s-o)**2);u=s?c>1?e/(c-1):0:c>0?e/c:0,l=Math.sqrt(u)}else r=null,n=null;const f={avg:o,count:c,max:n,min:r,stddev:l,sum:a,variance:u};return i&&(f.nullcount=t.length-c),e.percentileParams&&(f.median=g(t,e.percentileParams)),f}function g(e,t){const{fieldType:s,value:i,orderBy:r,isDiscrete:n}=t,a=_(s,"desc"===r);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,t)=>a(e,t)))).length)return null;if(i<=0)return e[0];if(i>=1)return e[e.length-1];const o=(e.length-1)*i,l=Math.floor(o),u=l+1,c=o%1,h=e[l],d=e[u];return u>=e.length||n||"string"==typeof h||"string"==typeof d?h:h*(1-c)+d*c}function _(e,t){const s=t?1:-1,i=function(e){return e?(e,t)=>t-e:(e,t)=>e-t}(t),r=y(t);if(!e||!["esriFieldTypeDate","esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...h].includes(e))return(e,t)=>"number"==typeof e&&"number"==typeof t?i(e,t):"string"==typeof e&&"string"==typeof t?r(e,t):s;if("esriFieldTypeDate"===e)return(e,t)=>{const r=new Date(e).getTime(),n=new Date(t).getTime();return isNaN(r)||isNaN(n)?s:i(r,n)};if(h.has(e))return(e,t)=>i(e,t);if("esriFieldTypeString"===e)return(e,t)=>r(e,t);if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e){const e=y(t);return(t,s)=>e(I(t),I(s))}return t?(e,t)=>1:(e,t)=>-1}function y(e){return e?(e,t)=>(e=e.toUpperCase())>(t=t.toUpperCase())?-1:e<t?1:0:(e,t)=>(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}function I(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function T(e,t){let s;for(s in e)d.indexOf(s)>-1&&(Number.isFinite(e[s])||(e[s]=null));return t?(["avg","stddev","variance"].forEach((t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]))})),e):e}function x(e){const t={};for(let s of e)(null==s||"string"==typeof s&&""===s.trim())&&(s=null),null==t[s]?t[s]={count:1,data:s}:t[s].count++;return{count:t}}function S(e,t,s){const i=e.count,r=[];s&&t&&"coded-value"===t.type&&t.codedValues.forEach((e=>{const t=e.code;i.hasOwnProperty(t)||(i[t]={data:t,count:0})}));for(const e in i){const t=i[e];r.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:r}}function E(e,t,s,i){let r=null;switch(t){case"log":0!==e&&(r=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(i)&&0!==i&&(r=e/i*100);break;case"field":Number.isFinite(s)&&0!==s&&(r=e/s);break;case"natural-log":e>0&&(r=Math.log(e));break;case"square-root":e>0&&(r=e**.5)}return r}function b(e,t){const s=function(e){const t=e.field,s=e.classificationMethod||"equal-interval",r=e.normalizationType,n=e.normalizationField,a=new i.Z;return a.classificationField=t,a.breakCount=e.breakCount,a.classificationMethod=s,a.standardDeviationInterval="standard-deviation"===s?e.standardDeviationInterval||1:void 0,a.normalizationType=r,a.normalizationField="field"===r?n:void 0,a}({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,breakCount:t.numClasses||5});return e=function(e,t,s){return t=null==t?-1/0:t,s=null==s?1/0:s,e.filter((e=>Number.isFinite(e)&&e>=t&&e<=s))}(e,t.minValue,t.maxValue),function(e){const{normalizationTotal:t}=e;return{classBreaks:n(e),normalizationTotal:t}}({definition:s,values:e,normalizationTotal:t.normalizationTotal})}function R(e,t){let s=e.classBreaks;const i=s.length,r=s[0].minValue,n=s[i-1].maxValue,a="standard-deviation"===t,o=c;return s=s.map((e=>{const t=e.label,s={minValue:e.minValue,maxValue:e.maxValue,label:t};if(a&&t){const e=t.match(o).map((e=>+e.trim()));2===e.length?(s.minStdDev=e[0],s.maxStdDev=e[1],e[0]<0&&e[1]>0&&(s.hasAvg=!0)):1===e.length&&(t.includes("<")?(s.minStdDev=null,s.maxStdDev=e[0]):t.includes(">")&&(s.minStdDev=e[0],s.maxStdDev=null))}return s})),{minValue:r,maxValue:n,classBreakInfos:s,normalizationTotal:e.normalizationTotal}}function F(e,t){const{min:s,max:i,intervals:r}=function(e,t){const{field:s,classificationMethod:i,standardDeviationInterval:r,normalizationType:n,normalizationField:a,normalizationTotal:o,minValue:l,maxValue:u}=t,c=t.numBins||10;let h=null,d=null,m=null;if(i&&"equal-interval"!==i||n){const{classBreaks:t}=b(e,{field:s,normalizationType:n,normalizationField:a,normalizationTotal:o,classificationMethod:i,standardDeviationInterval:r,minValue:l,maxValue:u,numClasses:c});h=t[0].minValue,d=t[t.length-1].maxValue,m=t.map((e=>[e.minValue,e.maxValue]))}else{if(null!=l&&null!=u)h=l,d=u;else{const t=p({values:e,minValue:l,maxValue:u,useSampleStdDev:!n,supportsNullCount:f({normalizationType:n,normalizationField:a,minValue:l,maxValue:u})});h=t.min,d=t.max}m=function(e,t,s){const i=(t-e)/s,r=[];let n,a=e;for(let e=1;e<=s;e++)n=a+i,n=Number(n.toFixed(16)),r.push([a,e===s?t:n]),a=n;return r}(h,d,c)}return{min:h,max:d,intervals:m}}(e,t),n=r.map(((e,t)=>({minValue:r[t][0],maxValue:r[t][1],count:0})));for(const t of e)if(null!=t&&t>=s&&t<=i){const e=v(r,t);e>-1&&n[e].count++}return{bins:n,minValue:s,maxValue:i,normalizationTotal:t.normalizationTotal}}function v(e,t){let s=-1;for(let i=e.length-1;i>=0;i--)if(t>=e[i][0]){s=i;break}return s}}}]);
|