@arcgis/core 4.28.0-next.20230720 → 4.28.0-next.20230721

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/Color.js +1 -1
  2. package/analysis/AreaMeasurementAnalysis.js +1 -1
  3. package/arcade/arcadeCompiler.js +1 -1
  4. package/arcade/featureSetUtils.js +1 -1
  5. package/arcade/featureset/actions/Top.js +1 -1
  6. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  7. package/arcade/featureset/support/FeatureSet.js +1 -1
  8. package/arcade/featureset/support/FeatureSetIterator.js +1 -1
  9. package/arcade/functions/convertdirection.js +1 -1
  10. package/arcade/functions/featuresetbase.js +1 -1
  11. package/arcade/functions/geomasync.js +1 -1
  12. package/arcade/functions/geomsync.js +1 -1
  13. package/arcade/lib/comment-handler.js +1 -1
  14. package/arcade/lib/parser.js +1 -1
  15. package/arcade/lib/scanner.js +1 -1
  16. package/assets/esri/core/workers/RemoteClient.js +1 -1
  17. package/assets/esri/core/workers/chunks/{75c28da8d0b02d612d69.js → 040b3fc9c9c0736dd893.js} +1 -1
  18. package/assets/esri/core/workers/chunks/0652f6a8d5221e978033.js +1 -0
  19. package/assets/esri/core/workers/chunks/{c13b332afdb3f6be1ec9.js → 092fda62b6f62c2e4869.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{57e0ad037188bd2997e7.js → 0af18a96cbd4e2d35436.js} +1 -1
  21. package/assets/esri/core/workers/chunks/0b5eeec0f66c87a46a0c.js +1 -0
  22. package/assets/esri/core/workers/chunks/{68e568b67b6fb34393db.js → 0cad2b991d0d0fd07846.js} +1 -1
  23. package/assets/esri/core/workers/chunks/0dccbc6c2559fdc0c2ad.js +1 -0
  24. package/assets/esri/core/workers/chunks/256a82f6f6e1405fbcc6.js +1 -0
  25. package/assets/esri/core/workers/chunks/{bb9213899049e1db90da.js → 2c57c9bd71637c5bed8a.js} +1 -1
  26. package/assets/esri/core/workers/chunks/2cdbabcbfe32286ec78d.js +1 -0
  27. package/assets/esri/core/workers/chunks/{2b1c83453a862e01954b.js → 2d9d80b2d0042a9c09fb.js} +1 -1
  28. package/assets/esri/core/workers/chunks/2f9aec2238ff6cb99e09.js +1 -0
  29. package/assets/esri/core/workers/chunks/{7dbd3e6406fb3e3a1a8f.js → 3cf748c025f3936c1cb2.js} +1 -1
  30. package/assets/esri/core/workers/chunks/4481d1103363434f16da.js +1 -0
  31. package/assets/esri/core/workers/chunks/5ae325e6a795c72eac6c.js +1 -0
  32. package/assets/esri/core/workers/chunks/5e4dde2886a1027b4b96.js +1 -0
  33. package/assets/esri/core/workers/chunks/730eb7e5f617fdab4f10.js +1 -0
  34. package/assets/esri/core/workers/chunks/{5a2e6bed9431cf4f42b1.js → 740dc67038f554431f1b.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{09178454bda15bb7929a.js → 7fbdfd1527582c52f9b6.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{1c026947505a9ff94a53.js → 807742f38885fa90b4fe.js} +1 -1
  37. package/assets/esri/core/workers/chunks/82dfbc175b52c7a10475.js +1 -0
  38. package/assets/esri/core/workers/chunks/870a05451e074b58f19a.js +1 -0
  39. package/assets/esri/core/workers/chunks/8c5a8c1dfb086069bb06.js +1 -0
  40. package/assets/esri/core/workers/chunks/99a5a434e0bad48c7a5c.js +1 -0
  41. package/assets/esri/core/workers/chunks/9a5916c66dad91d01d5b.js +1 -0
  42. package/assets/esri/core/workers/chunks/9c133fd8c1fbd0295b86.js +1 -0
  43. package/assets/esri/core/workers/chunks/9cddb504079d396779ea.js +1 -0
  44. package/assets/esri/core/workers/chunks/a3a1d4f32e518e97d071.js +1 -0
  45. package/assets/esri/core/workers/chunks/{9548aa449fe3a300c015.js → a4fa40dc77e116c954ac.js} +1 -1
  46. package/assets/esri/core/workers/chunks/a54ec9929a7db879d5db.js +1 -0
  47. package/assets/esri/core/workers/chunks/afc5b84693757fda2bc8.js +1 -0
  48. package/assets/esri/core/workers/chunks/{591b5c277cfd3a4101a4.js → b08f2a4aa94087c6c367.js} +1 -1
  49. package/assets/esri/core/workers/chunks/c0e12f6a7bb2360e4c21.js +1 -0
  50. package/assets/esri/core/workers/chunks/c8e656cd470a17f538e9.js +1 -0
  51. package/assets/esri/core/workers/chunks/d0e203405f95e14b1399.js +1 -0
  52. package/assets/esri/core/workers/chunks/{ec72f492f24e67e008ae.js → d8e58dc14d3495f0830c.js} +1 -1
  53. package/assets/esri/core/workers/chunks/ddc393a012588f799f42.js +1 -0
  54. package/assets/esri/core/workers/chunks/de3baa85b1639c25458d.js +1 -0
  55. package/assets/esri/core/workers/chunks/e66cea26064ba8353af0.js +1 -0
  56. package/assets/esri/core/workers/chunks/ea478f2f4a19463e13fd.js +1 -0
  57. package/assets/esri/core/workers/chunks/eba197e45507f56f3ed0.js +1 -0
  58. package/assets/esri/core/workers/chunks/ebd006fcd568a7731115.js +1 -0
  59. package/assets/esri/core/workers/chunks/ef9a9a7d66d818720e20.js +1 -0
  60. package/assets/esri/core/workers/chunks/f3b458f55236566c940b.js +1 -0
  61. package/assets/esri/core/workers/chunks/fd0a91b9e0216cc269c3.js +1 -0
  62. package/assets/esri/core/workers/chunks/{a4fe220a912b1f428e49.js → fdd6403a8390d629392b.js} +1 -1
  63. package/assets/esri/themes/base/widgets/_Directions.scss +13 -7
  64. package/assets/esri/themes/dark/main.css +1 -1
  65. package/assets/esri/themes/light/main.css +1 -1
  66. package/assets/esri/themes/light/view.css +1 -1
  67. package/chunks/array.js +1 -1
  68. package/core/Collection.js +1 -1
  69. package/core/accessorSupport/decorators/subclass.js +1 -1
  70. package/core/accessorSupport/ensureType.js +1 -1
  71. package/core/accessorSupport/get.js +1 -1
  72. package/core/accessorSupport/tracking.js +1 -1
  73. package/core/accessorSupport/utils.js +1 -1
  74. package/core/libs/rbush/PooledRBush.js +1 -1
  75. package/core/urlUtils.js +1 -1
  76. package/geometry/GeometryCursor.js +1 -1
  77. package/geometry/support/TileClipper.js +1 -1
  78. package/geometry/support/geodesicUtils.js +1 -1
  79. package/interfaces.d.ts +7 -1
  80. package/layers/LinkChartLayer.js +1 -1
  81. package/layers/VectorTileLayer.js +1 -1
  82. package/layers/VoxelLayer.js +1 -1
  83. package/layers/WCSLayer.js +1 -1
  84. package/layers/effects/EffectView.js +1 -1
  85. package/layers/graphics/sources/geojson/geojson.js +1 -1
  86. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  87. package/layers/mixins/ArcGISCachedService.js +1 -1
  88. package/layers/support/ElevationQuery.js +1 -1
  89. package/layers/support/MultidimensionalSubset.js +1 -1
  90. package/layers/support/TileInfo.js +1 -1
  91. package/layers/support/TileInfoTilemapCache.js +1 -1
  92. package/layers/support/TilemapCache.js +1 -1
  93. package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
  94. package/layers/support/rasterDatasets/pamParser.js +1 -1
  95. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  96. package/layers/support/rasterFormats/Raw.js +1 -1
  97. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  98. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  99. package/layers/support/rasterFunctions/colormaps.js +1 -1
  100. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  101. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  102. package/layers/video/VideoController.js +1 -1
  103. package/layers/voxel/VoxelDimension.js +1 -1
  104. package/layers/voxel/VoxelTransferFunctionStyle.js +1 -1
  105. package/layers/voxel/VoxelVolume.js +1 -1
  106. package/package.json +1 -1
  107. package/renderers/support/RasterSymbolizer.js +1 -1
  108. package/renderers/support/colorRampUtils.js +1 -1
  109. package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
  110. package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
  111. package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
  112. package/rest/support/generateRendererUtils.js +1 -1
  113. package/smartMapping/raster/renderers/classBreaks.js +1 -1
  114. package/smartMapping/renderers/color.js +1 -1
  115. package/smartMapping/renderers/support/utils.js +1 -1
  116. package/smartMapping/renderers/type.js +1 -1
  117. package/smartMapping/renderers/univariateColorSize.js +1 -1
  118. package/smartMapping/support/adapters/support/utils.js +1 -1
  119. package/statistics/utils.js +1 -1
  120. package/support/revision.js +1 -1
  121. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  122. package/symbols/cim/GeometryWalker.js +1 -1
  123. package/symbols/cim/cimAnalyzer.js +1 -1
  124. package/symbols/cim/effects/EffectArrow.js +1 -1
  125. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  126. package/symbols/support/symbolUtils.js +1 -1
  127. package/views/2d/constraints/ZoomConstraint.js +1 -1
  128. package/views/2d/engine/flow/dataUtils.js +1 -1
  129. package/views/2d/engine/flow/utils.js +1 -1
  130. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  131. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  132. package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
  133. package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
  134. package/views/2d/engine/vectorTiles/tileInfoUtils.js +1 -1
  135. package/views/2d/engine/webgl/TurboLine.js +1 -1
  136. package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
  137. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  138. package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
  139. package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
  140. package/views/2d/layers/BaseLayerView2D.js +1 -1
  141. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  142. package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
  143. package/views/2d/layers/MediaLayerView2D.js +1 -1
  144. package/views/2d/layers/TileLayerView2D.js +1 -1
  145. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  146. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  147. package/views/2d/layers/features/support/rendererUtils.js +1 -1
  148. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  149. package/views/2d/layers/support/vectorTileDebugUtils.js +5 -0
  150. package/views/2d/tiling/TileInfoView.js +1 -1
  151. package/views/2d/tiling/TileInfoViewPOT.js +1 -1
  152. package/views/2d/tiling/TileQueue.js +1 -1
  153. package/views/2d/tiling.js +1 -1
  154. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  155. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  156. package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
  157. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  158. package/views/3d/layers/TiledLayerView3D.js +1 -1
  159. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  160. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  161. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  162. package/views/3d/layers/support/featureReference.js +1 -1
  163. package/views/3d/support/LaserLineRenderer.js +1 -1
  164. package/views/3d/terrain/Overlay.js +1 -1
  165. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  166. package/views/3d/terrain/OverlayRenderTarget.js +1 -1
  167. package/views/3d/terrain/OverlayRenderer.js +1 -1
  168. package/views/3d/terrain/TerrainRenderer.js +1 -1
  169. package/views/3d/terrain/TileCompositor.js +1 -1
  170. package/views/3d/terrain/TileRenderer.js +1 -1
  171. package/views/3d/terrain/TilingScheme.js +1 -1
  172. package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
  173. package/views/3d/webgl-engine/core/shaderModules/interfaces.js +1 -1
  174. package/views/3d/webgl-engine/effects/ScreenSpaceGeometry.js +1 -1
  175. package/views/3d/webgl-engine/effects/SmaaRenderPass.js +1 -1
  176. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  177. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  178. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  179. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  180. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  181. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  182. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  183. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  184. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  185. package/views/3d/webgl-engine/parts/requireUtils.js +1 -1
  186. package/views/MapView.js +1 -1
  187. package/views/animation/pointToPoint/Path.js +1 -1
  188. package/views/draw/DrawOperation.js +1 -1
  189. package/views/draw/support/Reshape.js +1 -1
  190. package/views/draw/support/createUtils.js +1 -1
  191. package/views/interactive/SegmentLabels.js +1 -1
  192. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  193. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  194. package/views/interactive/editGeometry/operations/UndoGroup.js +1 -1
  195. package/views/layers/GroupLayerView.js +1 -1
  196. package/views/webgl/ProgramCache.js +1 -1
  197. package/webscene/spec-certification/api.js +1 -1
  198. package/webscene/spec-certification/spec.js +1 -1
  199. package/webscene/spec-certification/utils.js +1 -1
  200. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.js +1 -1
  201. package/widgets/BuildingExplorer/BuildingPhase.js +1 -1
  202. package/widgets/BuildingExplorer/support/validation.js +1 -1
  203. package/widgets/Directions/support/resources.js +1 -1
  204. package/widgets/Directions.js +1 -1
  205. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  206. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  207. package/widgets/FeatureForm/FieldInput.js +1 -1
  208. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  209. package/widgets/FeatureForm.js +1 -1
  210. package/widgets/Features.js +1 -1
  211. package/widgets/Histogram/HistogramViewModel.js +1 -1
  212. package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.js +1 -1
  213. package/widgets/Legend/styles/Card.js +1 -1
  214. package/widgets/Legend/styles/support/univariateUtils.js +1 -1
  215. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  216. package/widgets/Legend/support/colorRampUtils.js +1 -1
  217. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  218. package/widgets/Legend/support/utils.js +1 -1
  219. package/widgets/Popup.js +1 -1
  220. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
  221. package/widgets/ScaleRangeSlider/ScaleRanges.js +1 -1
  222. package/widgets/ValuePicker/ValuePickerSlider.js +1 -1
  223. package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
  224. package/widgets/smartMapping/ColorSizeSlider.js +1 -1
  225. package/widgets/smartMapping/HeatmapSlider/HeatmapSliderViewModel.js +1 -1
  226. package/widgets/smartMapping/SizeSlider.js +1 -1
  227. package/widgets/smartMapping/SmartMappingPrimaryHandleSliderViewModel.js +1 -1
  228. package/widgets/smartMapping/SmartMappingSliderViewModel.js +1 -1
  229. package/assets/esri/core/workers/chunks/0210f4c2e1f3ed13041b.js +0 -1
  230. package/assets/esri/core/workers/chunks/07bb40162d97d098bc19.js +0 -1
  231. package/assets/esri/core/workers/chunks/0a18317566c1fcb68422.js +0 -1
  232. package/assets/esri/core/workers/chunks/0de65e03db8c611af9fb.js +0 -1
  233. package/assets/esri/core/workers/chunks/1a60d23a92bcf91dbb22.js +0 -1
  234. package/assets/esri/core/workers/chunks/205a0b34b698d5329854.js +0 -1
  235. package/assets/esri/core/workers/chunks/25211d5904ee9d5f4a9d.js +0 -1
  236. package/assets/esri/core/workers/chunks/26b12d1ea713c1e07701.js +0 -1
  237. package/assets/esri/core/workers/chunks/2bfa7ee324c32a56b0d3.js +0 -1
  238. package/assets/esri/core/workers/chunks/4510a17839405146130b.js +0 -1
  239. package/assets/esri/core/workers/chunks/524156c3f5383c2dd0e3.js +0 -1
  240. package/assets/esri/core/workers/chunks/59666ecb7c2c1f5a13b2.js +0 -1
  241. package/assets/esri/core/workers/chunks/5c005c9514354c77ec27.js +0 -1
  242. package/assets/esri/core/workers/chunks/620ec5c75561183d3d73.js +0 -1
  243. package/assets/esri/core/workers/chunks/68512670816f59c0e6a5.js +0 -1
  244. package/assets/esri/core/workers/chunks/6c7374ebc18b46b3480a.js +0 -1
  245. package/assets/esri/core/workers/chunks/75ba2af92da232067adb.js +0 -1
  246. package/assets/esri/core/workers/chunks/7c1f0598a016516dcec3.js +0 -1
  247. package/assets/esri/core/workers/chunks/8dcec8d1b670d2b7ea2b.js +0 -1
  248. package/assets/esri/core/workers/chunks/8e07dfb6fc2673b640cb.js +0 -1
  249. package/assets/esri/core/workers/chunks/9050b167355588b7003d.js +0 -1
  250. package/assets/esri/core/workers/chunks/9230d68799f0b0b9ef36.js +0 -1
  251. package/assets/esri/core/workers/chunks/af4083f2aad5f5d49dde.js +0 -1
  252. package/assets/esri/core/workers/chunks/b0a57718a0765d1c8df0.js +0 -1
  253. package/assets/esri/core/workers/chunks/b431b81a7bf45dd527da.js +0 -1
  254. package/assets/esri/core/workers/chunks/bda311ad48efdb265939.js +0 -1
  255. package/assets/esri/core/workers/chunks/d5cce09fbe16cbb8fee4.js +0 -1
  256. package/assets/esri/core/workers/chunks/da547c3cabe4a89c3ce6.js +0 -1
  257. package/assets/esri/core/workers/chunks/dd295fa57b45b7ec4ec5.js +0 -1
  258. package/assets/esri/core/workers/chunks/f553b464e969d45bf451.js +0 -1
  259. package/assets/esri/core/workers/chunks/f5865294983eb160de8c.js +0 -1
  260. package/assets/esri/core/workers/chunks/fdb7b1fbdb6fe091ad83.js +0 -1
  261. package/views/2d/tiling/PagedTileQueue.js +0 -5
package/widgets/Popup.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import t from"../core/Collection.js";import{deprecatedProperty as i}from"../core/deprecate.js";import{eventKey as o}from"../core/events.js";import n from"../core/Logger.js";import{watch as s,when as r,on as l,whenOnce as a,initial as c}from"../core/reactiveUtils.js";import{throttle as u}from"../core/throttle.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import{cast as h}from"../core/accessorSupport/decorators/cast.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import g from"./Feature.js";import m from"./Spinner.js";import v from"./Widget.js";import{CSS as f}from"./Feature/resources.js";import{FeatureContentMixin as _}from"./Feature/support/FeatureContentMixin.js";import{getPointFromGeometry as w}from"./Popup/actionUtils.js";import{CSS as b}from"./Popup/css.js";import M from"./Popup/PopupViewModel.js";import{loadCalciteComponents as y}from"./support/componentsUtils.js";import{Heading as A}from"./support/Heading.js";import{accessibleHandler as k}from"./support/decorators/accessibleHandler.js";import{messageBundle as F}from"./support/decorators/messageBundle.js";import{vmEvent as C}from"./support/decorators/vmEvent.js";import{tsx as I}from"./support/jsxFactory.js";import{storeNode as O,cssTransition as x,isRTL as E}from"./support/widgetUtils.js";import{isDarkTheme as N}from"../support/themeUtils.js";import{substitute as B}from"../intl/substitute.js";const P="selected-index",T=0,D="popup-spinner",S={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},L="esri-popup";function R(e,t){return void 0===t?`${L}__${e}`:`${L}__${e}-${t}`}const V={closeButton:!0,featureNavigation:!0};let U=class extends(_(v)){constructor(e,i){super(e,i),this._blurClose=!1,this._blurContainer=!1,this._containerNode=null,this._mainContainerNode=null,this._featureMenuNode=null,this._actionsMenuNode=null,this._focusClose=!1,this._focusContainer=!1,this._focusDockButton=!1,this._focusFeatureMenuButton=!1,this._focusActionsMenuButton=!1,this._focusFirstFeature=!1,this._focusFirstAction=!1,this._pointerOffsetInPx=16,this._spinner=null,this._feature=null,this._featureMenuIntersectionObserverNode=null,this._featureMenuViewportNode=null,this._rootFlowItemNode=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&null!=this.viewModel.featurePage&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._displaySpinnerThrottled=u((()=>this._displaySpinner()),T),this._exitRelatedRecordsActions=new WeakMap,this._featureSelectionActions=new WeakMap,this._flowItems=new t,this.alignment="auto",this.collapsed=!1,this.collapseEnabled=!0,this.dockEnabled=!1,this.headingLevel=2,this.maxInlineActions=3,this.messages=null,this.messagesCommon=null,this.spinnerEnabled=!0,this.viewModel=new M,this.visibleElements={...V},this._handleOpenRelatedFeature=e=>{this._openRelatedFeature(e)},this._addSelectedFeatureIndexHandle(),this.addHandles([this._displaySpinnerThrottled,s((()=>this.viewModel?.screenLocation),(()=>this._positionContainer())),s((()=>[this.viewModel?.active,this.dockEnabled]),(()=>this._toggleScreenLocationEnabled())),s((()=>this.viewModel?.screenLocation),((e,t)=>{!!e!=!!t&&this.reposition()})),s((()=>[this.viewModel?.view?.padding,this.viewModel?.view?.size,this.viewModel?.active,this.viewModel?.location,this.alignment]),(()=>this.reposition())),s((()=>this.spinnerEnabled),(e=>this._spinnerEnabledChange(e))),s((()=>this.viewModel?.view?.size),((e,t)=>this._updateDockEnabledForViewSize(e,t))),s((()=>this.viewModel?.view),((e,t)=>this._viewChange(e,t))),s((()=>this.viewModel?.view?.ready),((e,t)=>this._viewReadyChange(e??!1,t??!1))),s((()=>[this.viewModel?.waitingForResult,this.viewModel?.location]),(()=>{this._hideSpinner(),this._displaySpinnerThrottled()})),s((()=>this.selectedFeatureWidget),(()=>this._destroyFlowItemWidgets())),s((()=>[this.selectedFeatureWidget?.viewModel?.title,this.selectedFeatureWidget?.viewModel?.state]),(()=>this._setTitleFromFeatureWidget())),s((()=>[this.selectedFeatureWidget?.viewModel?.content,this.selectedFeatureWidget?.viewModel?.state]),(()=>this._setContentFromFeatureWidget())),r((()=>!this.collapsed),(()=>{"xsmall"===this.viewModel?.view?.widthBreakpoint&&this.viewModel.active&&this.collapseEnabled&&this.viewModel.centerAtLocation()})),l((()=>this.viewModel?.allActions),"change",(()=>this._watchActions())),s((()=>this.viewModel?.allActions),(()=>this._watchActions()),c),s((()=>this.viewModel?.featureViewModels),(()=>this._featureMenuViewportScrollTop())),l((()=>this._flowItems),"change",(()=>{this.notifyChange("_activeFlowItemWidget"),this.scheduleRender()})),s((()=>[this._activeFlowItemWidget?.viewModel?.state,this._activeFlowItemWidget?.viewModel?.title]),(()=>this.scheduleRender()))])}loadDependencies(){return y({action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow.js"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js")})}initialize(){this.addHandles(this._displaySpinnerThrottled)}destroy(){this._destroyFlowItemWidgets(),this._destroySelectedFeatureWidget(),this._destroySpinner(),this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver?.disconnect()}get actionsMenuId(){return`${this.id}-actions-menu`}get actionsMenuButtonId(){return`${this.id}-actions-menu-button`}get featureMenuId(){return`${this.id}-feature-menu`}get titleId(){return`${this.id}-popup-title`}get contentId(){return`${this.id}-popup-content`}get hasContent(){const{selectedFeatureWidget:e,viewModel:t}=this;if(!e)return!!t?.content;const i=e.viewModel;if(i?.waitingForContent||"error"===i?.state)return!0;const o=i?.content;return Array.isArray(o)?!!o.length:!!o}get featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.visibleElements.featureNavigation}get collapsible(){return!!(this.collapseEnabled&&this.viewModel.title&&this.hasContent)}get featureMenuVisible(){return this.featureNavigationVisible&&this.featureMenuOpen}get contentCollapsed(){return this.collapsible&&!this.featureMenuVisible&&this.collapsed}get dividedActions(){return this._divideActions()}get _activeFlowItemWidget(){const{_flowItems:e}=this;return e.at(-1)??null}get actions(){return this.viewModel.actions}set actions(e){this.viewModel.actions=e}set actionsMenuOpen(e){this._set("actionsMenuOpen",!!e)}get actionsMenuOpen(){return!!this.viewModel.active&&this._get("actionsMenuOpen")}get autoCloseEnabled(){return this.viewModel.autoCloseEnabled}set autoCloseEnabled(e){this.viewModel.autoCloseEnabled=e}get autoOpenEnabled(){return i(n.getLogger(this),"autoOpenEnabled",{replacement:"MapView/SceneView.popupEnabled",version:"4.27"}),this.viewModel.autoOpenEnabled}set autoOpenEnabled(e){i(n.getLogger(this),"autoOpenEnabled",{replacement:"MapView/SceneView.popupEnabled",version:"4.27"}),this.viewModel.autoOpenEnabled=e}get defaultPopupTemplateEnabled(){return this.viewModel.defaultPopupTemplateEnabled}set defaultPopupTemplateEnabled(e){this.viewModel.defaultPopupTemplateEnabled=e}get content(){return this.viewModel.content}set content(e){this.viewModel.content=e}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._get("dockOptions")||S}set dockOptions(e){const t={...S},i=this.viewModel?.view?.breakpoints,o={};i&&(o.width=i.xsmall,o.height=i.xsmall);const n={...t,...e},s={...t.breakpoint,...o},{breakpoint:r}=n;"object"==typeof r?n.breakpoint={...s,...r}:r&&(n.breakpoint=s),this._set("dockOptions",n),this._setCurrentDockPosition(),this.reposition()}get featureCount(){return this.viewModel.featureCount}get featureMenuOpen(){return this.viewModel.featureMenuOpen}set featureMenuOpen(e){this.viewModel.featureMenuOpen=e}get features(){return this.viewModel.features}set features(e){this.viewModel.features=e}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get location(){return this.viewModel.location}set location(e){this.viewModel.location=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get promises(){return this.viewModel.promises}set promises(e){this.viewModel.promises=e}get selectedFeature(){return this.viewModel.selectedFeature}get selectedFeatureIndex(){return this.viewModel.selectedFeatureIndex}set selectedFeatureIndex(e){this.viewModel.selectedFeatureIndex=e}get selectedFeatureWidget(){const{_feature:e,visibleElements:t,headingLevel:i,_flowItems:o}=this,{selectedFeatureViewModel:n}=this.viewModel,s={...t,title:!1};return n?(e?(e.viewModel=n,e.visibleElements=s):this._feature=new g({flowItems:o,headingLevel:i+1,viewModel:n,visibleElements:s}),this._feature):null}get title(){return this.viewModel.title}set title(e){this.viewModel.title=e}get updateLocationEnabled(){return this.viewModel.updateLocationEnabled}set updateLocationEnabled(e){this.viewModel.updateLocationEnabled=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visible(){return this.viewModel.visible}set visible(e){this.viewModel.visible=e}castVisibleElements(e){return{...V,...e}}blur(){const{active:e}=this.viewModel;e||n.getLogger(this).warn("Popup can only be blurred when currently active."),this.visibleElements.closeButton?this._blurClose=!0:this._blurContainer=!0,this.scheduleRender()}clear(){return this.viewModel.clear()}close(){this.visible=!1}fetchFeatures(e,t){return this.viewModel.fetchFeatures(e,t)}focus(){const{active:e}=this.viewModel;e||n.getLogger(this).warn("Popup can only be focused when currently active."),this.visibleElements.closeButton?this._focusClose=!0:this._focusContainer=!0,this.scheduleRender()}next(){return this.viewModel.next()}open(e){this.removeHandles(P);const t=!!e&&!!e.featureMenuOpen,i=!!e&&!!e.actionsMenuOpen,o={collapsed:!!e&&!!e.collapsed,actionsMenuOpen:i,featureMenuOpen:t};"xsmall"===this.viewModel?.view?.widthBreakpoint&&(o.collapsed=!0),this.set(o),this.viewModel.open(e),this._shouldFocus(e),this.addHandles(r((()=>!this.viewModel.waitingForResult),(()=>this._addSelectedFeatureIndexHandle()),{once:!0}))}previous(){return this.viewModel.previous()}reposition(){this.renderNow(),this._positionContainer(),this._setCurrentAlignment()}triggerAction(e){return this.viewModel.triggerAction(e)}render(){const{actionsMenuOpen:e,dockEnabled:t,featureMenuVisible:i,dividedActions:o,currentAlignment:n,currentDockPosition:s}=this,{active:r}=this.viewModel,{menuActions:l}=o,a=r&&l.length>1&&e,c=r&&t,u=r&&!t,d=this.selectedFeature?.layer?.title,h=this.selectedFeature?.layer?.id,p={[b.alignTopCenter]:"top-center"===n,[b.alignBottomCenter]:"bottom-center"===n,[b.alignTopLeft]:"top-left"===n,[b.alignBottomLeft]:"bottom-left"===n,[b.alignTopRight]:"top-right"===n,[b.alignBottomRight]:"bottom-right"===n,[b.isDocked]:c,[b.shadow]:u,[b.isDockedTopLeft]:"top-left"===s,[b.isDockedTopCenter]:"top-center"===s,[b.isDockedTopRight]:"top-right"===s,[b.isDockedBottomLeft]:"bottom-left"===s,[b.isDockedBottomCenter]:"bottom-center"===s,[b.isDockedBottomRight]:"bottom-right"===s,[b.isFeatureMenuOpen]:i,[b.isActionsMenuOpen]:a};return I("div",{class:this.classes(b.base,p),role:"presentation","data-layer-title":d,"data-layer-id":h,bind:this,afterCreate:this._positionContainer,afterUpdate:this._positionContainer},r?[this.renderMainContainer(),this.renderPointer()]:null)}renderLoadingIcon(){return I("span",{"aria-hidden":"true",class:this.classes(b.icon,b.iconLoading,b.rotating)})}renderNavigationLoading(){const{messagesCommon:e}=this;return this.viewModel.pendingPromisesCount?I("div",{key:R("loading-container"),role:"presentation",class:b.loadingContainer,"aria-label":e.loading,title:e.loading},this.renderLoadingIcon()):null}renderPreviousButton(){const{messages:e}=this;return I("div",{role:"button",tabIndex:0,bind:this,onclick:this._previous,onkeydown:this._previous,class:this.classes(b.button,b.paginationPrevious),"aria-label":e.previous,title:e.previous},I("calcite-icon",{icon:"chevron-left",scale:"s",class:b.paginationIcon}))}renderNextButton(){const{messages:e}=this;return I("div",{role:"button",tabIndex:0,bind:this,onclick:this._next,onkeydown:this._next,class:this.classes(b.button,b.paginationNext),"aria-label":e.next,title:e.next},I("calcite-icon",{icon:"chevron-right",scale:"s",class:b.paginationIcon}))}renderFeatureMenuButton(){const{featureMenuOpen:e,featureMenuId:t,messagesCommon:i}=this,{featureCount:o,selectedFeatureIndex:n}=this.viewModel;return I("div",{role:"button",tabIndex:0,bind:this,onclick:this._toggleFeatureMenu,onkeydown:this._toggleFeatureMenu,afterCreate:this._focusFeatureMenuButtonNode,afterUpdate:this._focusFeatureMenuButtonNode,class:b.featureMenuButton,"aria-haspopup":"true","aria-controls":t,"aria-expanded":e.toString(),"aria-label":i.menu,title:i.menu},I("calcite-icon",{icon:"list-bullet",scale:"s",class:b.featureMenuButtonIcon}),this._getPageText(o,n))}renderNavigationButtons(){return this.featureNavigationVisible?[this.renderPreviousButton(),this.renderNextButton(),this.renderNavigationLoading()||this.renderFeatureMenuButton()]:[]}renderDockIcon(){const{dockEnabled:e}=this,t=this._wouldDockTo(),i={[b.iconUndock]:e,[b.iconDock]:!e,[b.iconDockToRight]:!e&&("top-right"===t||"bottom-right"===t),[b.iconDockToLeft]:!e&&("top-left"===t||"bottom-left"===t),[b.iconDockToTop]:!e&&"top-center"===t,[b.iconDockToBottom]:!e&&"bottom-center"===t};return I("span",{"aria-hidden":"true",class:this.classes(i,b.icon)})}renderDockButton(){const{dockEnabled:e,messages:t}=this,i=this.viewModel?.view?.widthBreakpoint,o=e?t.undock:t.dock;return"xsmall"!==i&&this.dockOptions?.buttonEnabled?I("div",{role:"button","aria-label":o,title:o,tabIndex:0,bind:this,onclick:this._toggleDockEnabled,onkeydown:this._toggleDockEnabled,afterCreate:this._focusDockButtonNode,afterUpdate:this._focusDockButtonNode,class:this.classes(b.button,b.buttonDock)},this.renderDockIcon()):null}renderTitle(){const{title:e}=this.viewModel,{titleId:t,collapsible:i,contentCollapsed:o,messagesCommon:n}=this,s={[b.headerContainerButton]:i},r=I(A,{level:this.headingLevel,class:b.headerTitle,innerHTML:e??""}),l=i?I("button",{key:`${e}--collapsible`,id:t,title:o?n.expand:n.collapse,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(b.headerContainer,s),"aria-expanded":o?"false":"true",onclick:this._toggleCollapsed,type:"button"},r,I("calcite-icon",{class:b.collapseIcon,key:"collapse-icon",icon:o?"chevron-down":"chevron-up",scale:"m"})):I("div",{key:e??"title",id:t,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(b.headerContainer,s)},r);return e?l:null}renderCloseIcon(){return I("span",{"aria-hidden":"true",class:this.classes(b.icon,b.iconClose)})}renderCloseButton(){const{visibleElements:e,messagesCommon:t}=this;return e.closeButton?I("div",{role:"button",tabIndex:0,bind:this,onclick:this._close,onkeydown:this._close,class:b.button,"aria-label":t.close,title:t.close,afterCreate:this._closeButtonNodeUpdated,afterUpdate:this._closeButtonNodeUpdated},this.renderCloseIcon()):null}renderHeader(){return I("header",{class:b.header},this.renderTitle(),I("div",{class:b.headerButtons},this.renderDockButton(),this.renderCloseButton()))}renderContentContainer(){const{contentId:e,hasContent:t,contentCollapsed:i,_flowItems:o}=this,{content:n}=this.viewModel,s=o.toArray(),r={[b.contentHasFlows]:!!s.length};return t&&!i?I("div",{key:n??"content",enterAnimation:this._createFeatureUpdatedAnimation(),id:e,class:this.classes(b.content,r)},I("calcite-flow",{bind:this},I("calcite-flow-item",{bind:this,"data-node-ref":"_rootFlowItemNode",afterCreate:O,key:"root-flow-item",onCalciteFlowItemBack:this._handleBackClick},this.renderContent()),s.map((e=>this.renderFlowItem(e)))),s.map((e=>this.renderFlowItemTooltips(e)))):null}renderFlowItem(e){const{messages:t}=this,i=N(),o="graphic"in e&&!e.isTable;return I("calcite-flow-item",{bind:this,class:this.classes({[b.calciteThemeDark]:!i,[b.calciteThemeLight]:i}),heading:e.title??"",description:this._getFlowItemDescription(e),onCalciteFlowItemBack:this._handleBackClick,key:`flow-item-${e.viewModel.uid}`},I("calcite-action",{class:b.actionExit,icon:"move-up",label:t?.exitRelatedRecords,text:t?.exitRelatedRecords,slot:"header-actions-start",bind:this,afterCreate:t=>this._storeExitRelatedRecordsAction(e,t),onclick:this._destroyFlowItemWidgets}),o?I("calcite-action",{class:b.actionSelectFeature,icon:"zoom-to-object",label:t?.selectFeature,text:t?.selectFeature,slot:"header-actions-end",bind:this,afterCreate:t=>this._storeFeatureSelectionAction(e,t),onclick:()=>this._handleOpenRelatedFeature(e)}):null,I("div",{class:this.classes(b.contentFlowItem,{[b.calciteThemeDark]:i,[b.calciteThemeLight]:!i})},e.render()))}renderFlowItemTooltips(e){const{messages:t,_exitRelatedRecordsActions:i,_featureSelectionActions:o}=this,n=N(),s=o.get(e);return[I("calcite-tooltip",{class:this.classes({[b.calciteThemeDark]:!n,[b.calciteThemeLight]:n}),key:`exit-related-records-tooltip-${e.viewModel.uid}`,label:t?.exitRelatedRecords,overlayPositioning:"fixed",referenceElement:i.get(e),placement:"top"},t?.exitRelatedRecords),s?I("calcite-tooltip",{class:this.classes({[b.calciteThemeDark]:!n,[b.calciteThemeLight]:n}),key:`select-related-record-tooltip-${e.viewModel.uid}`,label:t?.selectFeature,overlayPositioning:"fixed",referenceElement:s,placement:"top"},t?.selectFeature):null]}renderActionsMenuButton(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o,messagesCommon:n}=this,s=i?n.close:n.open,{menuActions:r}=o;return r.length?I("div",{key:R("actions-menu-button"),class:this.classes(b.button,b.actionsMenuButton),role:"button",id:t,"aria-haspopup":"true","aria-controls":i?e:null,tabIndex:0,bind:this,onclick:this._toggleActionsMenu,onkeydown:this._toggleActionsMenu,afterCreate:this._focusActionsMenuButtonNode,afterUpdate:this._focusActionsMenuButtonNode,"aria-label":s,title:s},I("span",{"aria-hidden":"true",class:b.iconActionsMenu})):null}renderMenuActions(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o}=this,{menuActions:n}=o;return n.length&&i?I("ul",{id:e,role:"menu","aria-labelledby":t,key:R("actions"),class:b.actions,bind:this,onkeyup:this._handleActionMenuKeyup,afterCreate:this._actionsMenuNodeUpdated,afterUpdate:this._actionsMenuNodeUpdated},n.toArray().map((e=>this.renderAction({action:e,type:"menu-item"})))):null}renderInlineActions(){const{inlineActions:e}=this.dividedActions;return e.length?e.toArray().map((e=>this.renderAction({action:e,type:"inline"}))):[]}renderInlineActionsContainer(){const{inlineActions:e,menuActions:t}=this.dividedActions,i=!!e.length,o=!!t.length;return i||o?I("div",{key:"inline-actions-container","data-inline-actions":i.toString(),"data-menu-actions":o.toString(),class:b.inlineActionsContainer},this.renderInlineActions(),this.renderActionsMenuButton(),this.renderMenuActions()):null}renderNavigation(){return this.featureNavigationVisible?I("section",{key:R("navigation"),class:this.classes(b.navigation)},this.renderNavigationButtons()):null}renderFooter(){const{featureNavigationVisible:e,dividedActions:t}=this,{inlineActions:i,menuActions:o}=t,n=!!i.length,s=!!o.length,r={[b.footerHasPagination]:e,[b.footerHasActions]:n,[b.footerHasActionsMenu]:s};return e||n?I("div",{key:R("feature-buttons"),class:this.classes(b.footer,r)},this.renderInlineActionsContainer(),this.renderNavigation()):null}renderFeatureMenuContainer(){const{messages:e}=this,{featureViewModels:t,isLoadingFeature:i}=this.viewModel,o=B(e.selectedFeatures,{total:t.length});return I("section",{key:R("menu"),class:b.featureMenu},I("strong",{class:b.featureMenuHeader},o),I("nav",{bind:this,class:b.featureMenuViewport,"data-node-ref":"_featureMenuViewportNode",afterCreate:O},this.renderFeatureMenu(),I("div",{class:b.featureMenuObserver,bind:this,afterCreate:this._featureMenuIntersectionObserverCreated}),i?I("div",{class:b.featureMenuLoader},this.renderLoadingIcon()):null))}renderPointer(){return this.dockEnabled?null:I("div",{key:R("pointer"),class:b.pointer,role:"presentation"},I("div",{class:this.classes(b.pointerDirection,b.shadow)}))}renderMainContainer(){const{dockEnabled:e,currentAlignment:t,currentDockPosition:i,titleId:o,contentId:n,collapsible:s,hasContent:r,contentCollapsed:l,visibleElements:a}=this,{title:c}=this.viewModel,u="bottom-left"===t||"bottom-center"===t||"bottom-right"===t||"top-left"===i||"top-center"===i||"top-right"===i,d="top-left"===t||"top-center"===t||"top-right"===t||"bottom-left"===i||"bottom-center"===i||"bottom-right"===i,h={[b.shadow]:e,[b.isCollapsible]:s,[b.isCollapsed]:l};return I("div",{class:this.classes(b.main,b.widget,h),tabIndex:a.closeButton?void 0:-1,role:"dialog","aria-live":"polite","aria-labelledby":c?o:"","aria-describedby":r&&!l?n:"",bind:this,onkeyup:this._handleMainKeyup,afterCreate:this._mainContainerNodeUpdated,afterUpdate:this._mainContainerNodeUpdated},u?this.renderFooter():null,u?this.renderFeatureMenuContainer():null,this.renderHeader(),this.renderContentContainer(),d?this.renderFooter():null,d?this.renderFeatureMenuContainer():null)}renderContent(){const e=this.viewModel?.content;return e?"string"==typeof e?I("div",{class:f.contentNode,key:e,innerHTML:e}):this.renderNodeContent(e):null}renderActionText(e){return I("span",{key:"text",class:b.actionText},e)}renderActionCalciteIcon(e,t){return I("calcite-icon",{scale:"s",key:`calcite-icon-${t}`,icon:e,class:b.icon})}renderActionIcon(e){const t=this._getActionClass(e),i=this._getActionImage(e),o={[b.iconLoading]:e.active,[b.rotating]:e.active,[b.icon]:!!t,[b.actionImage]:!e.active&&!!i};return t&&(o[t]=!e.active),I("span",{key:"icon","aria-hidden":"true",class:this.classes(b.icon,o),styles:this._getIconStyles(i)})}renderAction(e){const{action:t,type:i}=e,o=this._getActionTitle(t),n={[b.action]:"toggle"!==t.type,[b.actionToggle]:"toggle"===t.type,[b.actionToggleOn]:"toggle"===t.type&&t.value,[b.buttonDisabled]:t.disabled},s=[t.icon&&!t.active?this.renderActionCalciteIcon(t.icon,t.uid):this.renderActionIcon(t),this.renderActionText(o)],r="menu-item"===i?I("li",{key:t.uid,role:"menuitem",tabIndex:0,title:o,"aria-label":o,class:this.classes(b.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s):I("div",{key:t.uid,role:"button",tabIndex:0,title:o,"aria-label":o,class:this.classes(b.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s);return t.visible?r:null}renderFeatureMenuItem(e,t){const{messages:i,messagesCommon:o}=this,{selectedFeatureIndex:n,selectedFeatureViewModel:s}=this.viewModel,r=e===s,l={[b.featureMenuSelected]:r},a=r?I("span",{key:R(`feature-menu-selected-feature-${n}`),title:i.selectedFeature,"aria-label":i.selectedFeature,class:b.iconCheckMark}):null,c=I("span",{innerHTML:e.title||o.untitled});return I("li",{role:"menuitem",tabIndex:-1,key:R(`feature-menu-feature-${n}`),class:this.classes(l,b.featureMenuItem),bind:this,"data-feature-index":t,onblur:this._removeActiveFeature,onfocus:this._setActiveFeature,onkeyup:this._handleFeatureMenuItemKeyup,onclick:this._selectFeature,onkeydown:this._selectFeature,onmouseover:this._setActiveFeature,onmouseleave:this._removeActiveFeature},I("span",{class:b.featureMenuTitle},c,a))}renderFeatureMenu(){const{featureMenuId:e}=this,{featureViewModels:t}=this.viewModel;return t.length>1?I("ol",{class:b.featureMenuList,id:e,bind:this,afterCreate:this._featureMenuNodeUpdated,afterUpdate:this._featureMenuNodeUpdated,onkeyup:this._handleFeatureMenuKeyup,role:"menu"},t.filter((e=>!!e.graphic)).map(((e,t)=>this.renderFeatureMenuItem(e,t)))):null}_storeFeatureSelectionAction(e,t){this._featureSelectionActions.set(e,t),this.scheduleRender()}_storeExitRelatedRecordsAction(e,t){this._exitRelatedRecordsActions.set(e,t),this.scheduleRender()}_getFlowItemDescription(e){return"featureCountDescription"in e?e.featureCountDescription:e.viewModel.description??""}async _openRelatedFeature(e){await e.viewModel.updateGeometry();const t=e.graphic,i=t?.geometry;if(null==i||null==t)return;this._destroyFlowItemWidgets(),await this.viewModel.zoomTo({target:i});const o=w(i);this.open({features:[t],location:null!=o?o:void 0})}_destroyFlowItemWidgets(){this._flowItems.removeAll().forEach((e=>{"showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e.viewModel=null,e.destroy()}))}_handleBackClick(){const e=this._flowItems.pop();e&&(this._exitRelatedRecordsActions.delete(e),this._featureSelectionActions.delete(e),"showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e&&(e.viewModel=null,e.destroy()))}_getActionTitle(e){const{messages:t,selectedFeature:i,messagesCommon:o}=this,{id:n}=e,s=i?.attributes,r=e.title??"",l="zoom-to-feature"===n?B(r,{messages:t}):"remove-selected-feature"===n?B(r,{messages:o}):"zoom-to-clustered-features"===n||"browse-clustered-features"===n?B(r,{messages:t}):e.title;return l&&s?B(l,s):l??""}_getActionClass(e){const{selectedFeature:t}=this,i=t?.attributes,{className:o,image:n}=e,s=n||o?o:b.iconDefaultAction;return s&&i?B(s,i):s??""}_getActionImage(e){if(e.active)return"";const{selectedFeature:t}=this,i=t?.attributes,{image:o}=e;return o&&i?B(o,i):o??""}_createFeatureUpdatedAnimation(){return x("enter",b.hasFeatureUpdated)}_getInlineActionCount(){const{maxInlineActions:e,featureNavigationVisible:t}=this;if("number"!=typeof e)return null;const i=Math.round(e);return Math.max(t?i-1:i,0)}_watchActions(){const{allActions:e}=this.viewModel;this.notifyChange("dividedActions");const t="actions";this.removeHandles(t),e&&e.forEach((e=>{this.addHandles(s((()=>[e.uid,e.active,e.className,e.disabled,e.id,e.title,e.image,e.visible]),(()=>this.scheduleRender())),t)}))}_divideActions(){const{allActions:e}=this.viewModel,i=e.filter((e=>e.visible)),o=this._getInlineActionCount(),n=null===o,s=0===o;return{inlineActions:n?i.slice(0):s?new t:i.slice(0,o),menuActions:n?new t:s?i.slice(0):i.slice(o)}}_featureMenuOpenChanged(e){e?this._focusFirstFeature=!0:this._focusFeatureMenuButton=!0}_actionsMenuOpenChanged(e){e?this._focusFirstAction=!0:this._focusActionsMenuButton=!0}_setTitleFromFeatureWidget(){const{selectedFeatureWidget:e,messagesCommon:t}=this;e&&(this.viewModel.title="error"===e.viewModel?.state?t.errorMessage:e.viewModel?.title||"")}_setContentFromFeatureWidget(){const{selectedFeatureWidget:e}=this;e&&(this.viewModel.content=e)}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_handleFeatureMenuKeyup(e){"Escape"===o(e)&&(e.stopPropagation(),this._focusFeatureMenuButton=!0,this.featureMenuOpen=!1,this.scheduleRender())}_handleActionMenuKeyup(e){"Escape"===o(e)&&(e.stopPropagation(),this._focusActionsMenuButton=!0,this.actionsMenuOpen=!1,this.scheduleRender())}_setActiveFeature(e){const{viewModel:t}=this,i=j(e.currentTarget);t.activeFeature=t.features[i]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_handleFeatureMenuItemKeyup(e){const t=o(e),{_featureMenuNode:i}=this,n=j(e.currentTarget);if(!i)return;const s=Array.from(i.querySelectorAll("li")),r=s.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();s.at(-1).focus()}else{e.stopPropagation();s[0].focus()}else{e.stopPropagation();s[(n+1+r)%r].focus()}else{e.stopPropagation();s[(n-1+r)%r].focus()}}_handleActionMenuItemKeyup(e){const t=o(e),{_actionsMenuNode:i}=this,n=e.currentTarget.dataset.actionUid,{menuActions:s}=this.dividedActions,r=s.findIndex((e=>e.uid===n));if(!i)return;const l=Array.from(i.querySelectorAll("li")),a=l.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();l.at(-1).focus()}else{e.stopPropagation();l[0].focus()}else{e.stopPropagation();l[(r+1+a)%a].focus()}else{e.stopPropagation();l[(r-1+a)%a].focus()}}_handleMainKeyup(e){const t=o(e);"ArrowLeft"===t&&(e.stopPropagation(),this.previous()),"ArrowRight"===t&&(e.stopPropagation(),this.next())}_spinnerEnabledChange(e){if(this._destroySpinner(),!e)return;const t=this.viewModel?.view;this._createSpinner(t)}_hideSpinner(){const{_spinner:e}=this;e&&(e.location=null,e.hide())}_displaySpinner(){const{_spinner:e}=this;if(!e)return;const{location:t,waitingForResult:i}=this.viewModel;i&&t?e.show({location:t}):e.hide()}_getIconStyles(e){return{"background-image":e?`url(${e})`:""}}async _shouldFocus(e){e?.shouldFocus&&(await a((()=>!0===this.viewModel?.active)),this.focus())}_addSelectedFeatureIndexHandle(){const e=s((()=>this.viewModel?.selectedFeatureIndex),((e,t)=>this._selectedFeatureIndexUpdated(e,t)));this.addHandles(e,P)}_selectedFeatureIndexUpdated(e,t){const{featureCount:i}=this;i&&e!==t&&-1!==e&&(this._destroyFlowItemWidgets(),this.actionsMenuOpen=!1,this.featureMenuOpen=!1,this._mainContainerNode&&(this._mainContainerNode.scrollTop=0),this._rootFlowItemNode&&this._rootFlowItemNode.scrollContentTo({top:0}))}_destroySelectedFeatureWidget(){const{_feature:e}=this;e&&(e.viewModel=null,e&&!e.destroyed&&e.destroy()),this._feature=null}_isScreenLocationWithinView(e,t){return e.x>-1&&e.y>-1&&e.x<=t.width&&e.y<=t.height}_isOutsideView(e){const{popupHeight:t,popupWidth:i,screenLocation:o,side:n,view:s}=e;if(isNaN(i)||isNaN(t)||!s||!o)return!1;const r=s.padding;return"right"===n&&o.x+i/2>s.width-r.right||("left"===n&&o.x-i/2<r.left||("top"===n&&o.y-t<r.top||"bottom"===n&&o.y+t>s.height-r.bottom))}_calculateAutoAlignment(e){if("auto"!==e)return e;const{_pointerOffsetInPx:t,_containerNode:i,_mainContainerNode:o,viewModel:n}=this,{screenLocation:s,view:r}=n;if(null==s||!r||!i)return"top-center";if(!this._isScreenLocationWithinView(s,r))return this._get("currentAlignment")||"top-center";function l(e){return parseInt(e.replaceAll(/[^-\d\.]/g,""),10)}const a=o?window.getComputedStyle(o,null):null,c=a?l(a.getPropertyValue("max-height")):0,u=a?l(a.getPropertyValue("height")):0,{height:d,width:h}=i.getBoundingClientRect(),p=h+t,g=Math.max(d,c,u)+t,m=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"right",view:r}),v=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"left",view:r}),f=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"top",view:r}),_=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"bottom",view:r});return v?f?"bottom-right":"top-right":m?f?"bottom-left":"top-left":f?_?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(e){return"function"==typeof e?e.call(this):e}_getCurrentAlignment(){const{alignment:e,dockEnabled:t}=this;return t||!this.viewModel.active?null:this._calculatePositionResult(this._calculateAutoAlignment(this._callCurrentAlignment(e)))}_setCurrentAlignment(){this._set("currentAlignment",this._getCurrentAlignment())}_setCurrentDockPosition(){this._set("currentDockPosition",this._getCurrentDockPosition())}_calculatePositionResult(e){const t=["left","right"];return E(this.container)&&t.reverse(),e?.replace(/leading/gi,t[0]).replaceAll(/trailing/gi,t[1])}_callDockPosition(e){return"function"==typeof e?e.call(this):e}_getDockPosition(){return this._calculatePositionResult(this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position)))}_getCurrentDockPosition(){return this.dockEnabled&&this.viewModel.active?this._getDockPosition():null}_wouldDockTo(){return this.dockEnabled?null:this._getDockPosition()}_calculateAutoDockPosition(e){if("auto"!==e)return e;const t=this.viewModel?.view,i=E(this.container)?"top-left":"top-right";if(!t)return i;const o=t.padding||{left:0,right:0,top:0,bottom:0},n=t.width-o.left-o.right,{breakpoints:s}=t;return s&&n<=s.xsmall?"bottom-center":i}_positionContainer(e=this._containerNode){if(e&&(this._containerNode=e),!this._containerNode)return;const{screenLocation:t}=this.viewModel,{width:i}=this._containerNode.getBoundingClientRect(),o=this._calculatePositionStyle(t,i);o&&Object.assign(this._containerNode.style,o)}_calculateFullWidth(e){const{currentAlignment:t,_pointerOffsetInPx:i}=this;return"top-left"===t||"bottom-left"===t||"top-right"===t||"bottom-right"===t?e+i:e}_calculateAlignmentPosition(e,t,i,o){const{currentAlignment:n,_pointerOffsetInPx:s}=this;if(!i)return;const{padding:r}=i,l=o/2,a=i.height-t,c=i.width-e;return"bottom-center"===n?{top:t+s-r.top,left:e-l-r.left}:"top-left"===n?{bottom:a+s-r.bottom,right:c+s-r.right}:"bottom-left"===n?{top:t+s-r.top,right:c+s-r.right}:"top-right"===n?{bottom:a+s-r.bottom,left:e+s-r.left}:"bottom-right"===n?{top:t+s-r.top,left:e+s-r.left}:"top-center"===n?{bottom:a+s-r.bottom,left:e-l-r.left}:void 0}_calculatePositionStyle(e,t){const{dockEnabled:i,view:o}=this;if(!o)return;if(i)return{left:"",top:"",right:"",bottom:""};if(null==e||!t)return;const n=this._calculateFullWidth(t),s=this._calculateAlignmentPosition(e.x,e.y,o,n);return s?{top:void 0!==s.top?`${s.top}px`:"auto",left:void 0!==s.left?`${s.left}px`:"auto",bottom:void 0!==s.bottom?`${s.bottom}px`:"auto",right:void 0!==s.right?`${s.right}px`:"auto"}:void 0}_viewChange(e,t){e&&t&&(this.close(),this.clear())}_viewReadyChange(e,t){if(e){const e=this.viewModel?.view;this._wireUpView(e)}else t&&(this.close(),this.clear())}_wireUpView(e){if(this._destroySpinner(),!e)return;const{spinnerEnabled:t}=this;t&&this._createSpinner(e),this._setDockEnabledForViewSize(this.dockOptions)}_dockingThresholdCrossed(e,t,i){const[o,n]=e,[s,r]=t,{width:l=0,height:a=0}=i??{};return o<=l&&s>l||o>l&&s<=l||n<=a&&r>a||n>a&&r<=a}_updateDockEnabledForViewSize(e,t){if(!e||!t)return;const i=this.viewModel?.view?.padding||{left:0,right:0,top:0,bottom:0},o=i.left+i.right,n=i.top+i.bottom,s=[],r=[];s[0]=e[0]-o,s[1]=e[1]-n,r[0]=t[0]-o,r[1]=t[1]-n;const{dockOptions:l}=this,a=l.breakpoint;this._dockingThresholdCrossed(s,r,a)&&this._setDockEnabledForViewSize(l),this._setCurrentDockPosition()}_focusDockButtonNode(e){this._focusDockButton&&(this._focusDockButton=!1,e.focus())}_closeButtonNodeUpdated(e){return this._focusClose?(this._focusClose=!1,void e.focus()):this._blurClose?(this._blurClose=!1,void e.blur()):void 0}_mainContainerNodeUpdated(e){return this._mainContainerNode=e,this._focusContainer?(this._focusContainer=!1,void e.focus()):this._blurContainer?(this._blurContainer=!1,void e.blur()):void 0}_featureMenuNodeUpdated(e){if(this._featureMenuNode=e,!e||!this._focusFirstFeature)return;this._focusFirstFeature=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_actionsMenuNodeUpdated(e){if(this._actionsMenuNode=e,!e||!this._focusFirstAction)return;this._focusFirstAction=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_focusFeatureMenuButtonNode(e){this._focusFeatureMenuButton&&(this._focusFeatureMenuButton=!1,e.focus())}_focusActionsMenuButtonNode(e){this._focusActionsMenuButton&&(this._focusActionsMenuButton=!1,e.focus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&(this._featureMenuViewportNode.scrollTop=0)}_toggleScreenLocationEnabled(){const{dockEnabled:e,viewModel:t}=this;if(!t)return;const i=t.active&&!e;t.screenLocationEnabled=i}_shouldDockAtCurrentViewSize(e){const t=e.breakpoint,i=this.viewModel?.view?.ui;if(!i)return!1;const{width:o,height:n}=i;if(isNaN(o)||isNaN(n))return!1;if(!t)return!1;const s=t.hasOwnProperty("width")&&o<=(t.width??0),r=t.hasOwnProperty("height")&&n<=(t.height??0);return s||r}_setDockEnabledForViewSize(e){e.breakpoint&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(e))}_getPageText(e,t){return this.featureNavigationVisible?B(this.messages.pageText,{index:t+1,total:e}):null}_destroySpinner(){this._spinner&&(this.view?.ui?.remove(this._spinner,D),this._spinner.destroy(),this._spinner=null)}_createSpinner(e){e&&(this._spinner=new m({view:e}),e.ui.add(this._spinner,{key:D,position:"manual",internal:!0}))}_toggleCollapsed(){this.collapsed=!this.collapsed}_close(){this.close(),this.view&&this.view.focus()}_toggleDockEnabled(){this.dockEnabled=!this.dockEnabled,this._focusDockButton=!0,this.scheduleRender()}_toggleFeatureMenu(){const e=!this.featureMenuOpen;this._featureMenuOpenChanged(e),this.actionsMenuOpen=!1,this.featureMenuOpen=e}_toggleActionsMenu(){const e=!this.actionsMenuOpen;this._actionsMenuOpenChanged(e),this.featureMenuOpen=!1,this.actionsMenuOpen=e}_triggerAction(e){const t=e.currentTarget.dataset.actionUid,{allActions:i}=this.viewModel,o=i.findIndex((e=>e.uid===t)),n=i.at(o);n&&"toggle"===n.type&&(n.value=!n.value),this.actionsMenuOpen=!1,this.viewModel.triggerAction(o)}_selectFeature(e){const t=j(e.currentTarget);null==t||isNaN(t)||(this.viewModel.selectedFeatureIndex=t),this.featureMenuOpen=!1,this._focusFeatureMenuButton=!0,this.scheduleRender()}_next(){this.next()}_previous(){this.previous()}};function j(e){return e?.["data-feature-index"]}e([d({readOnly:!0})],U.prototype,"actionsMenuId",null),e([d({readOnly:!0})],U.prototype,"actionsMenuButtonId",null),e([d({readOnly:!0})],U.prototype,"featureMenuId",null),e([d({readOnly:!0})],U.prototype,"titleId",null),e([d({readOnly:!0})],U.prototype,"contentId",null),e([d({readOnly:!0})],U.prototype,"hasContent",null),e([d({readOnly:!0})],U.prototype,"featureNavigationVisible",null),e([d({readOnly:!0})],U.prototype,"collapsible",null),e([d({readOnly:!0})],U.prototype,"featureMenuVisible",null),e([d({readOnly:!0})],U.prototype,"contentCollapsed",null),e([d({readOnly:!0})],U.prototype,"dividedActions",null),e([d({readOnly:!0,dependsOn:["_flowItems.length"]})],U.prototype,"_activeFlowItemWidget",null),e([d()],U.prototype,"actions",null),e([d()],U.prototype,"actionsMenuOpen",null),e([d()],U.prototype,"alignment",void 0),e([d()],U.prototype,"autoCloseEnabled",null),e([d()],U.prototype,"autoOpenEnabled",null),e([d()],U.prototype,"defaultPopupTemplateEnabled",null),e([d()],U.prototype,"content",null),e([d()],U.prototype,"collapsed",void 0),e([d()],U.prototype,"collapseEnabled",void 0),e([d({readOnly:!0})],U.prototype,"currentAlignment",null),e([d({readOnly:!0})],U.prototype,"currentDockPosition",null),e([d()],U.prototype,"dockOptions",null),e([d()],U.prototype,"dockEnabled",void 0),e([d({readOnly:!0})],U.prototype,"featureCount",null),e([d()],U.prototype,"featureMenuOpen",null),e([d()],U.prototype,"features",null),e([d()],U.prototype,"goToOverride",null),e([d()],U.prototype,"headingLevel",void 0),e([d()],U.prototype,"highlightEnabled",null),e([d()],U.prototype,"location",null),e([d()],U.prototype,"label",null),e([d()],U.prototype,"maxInlineActions",void 0),e([d(),F("esri/widgets/Popup/t9n/Popup")],U.prototype,"messages",void 0),e([d(),F("esri/t9n/common")],U.prototype,"messagesCommon",void 0),e([d()],U.prototype,"promises",null),e([d({readOnly:!0})],U.prototype,"selectedFeature",null),e([d()],U.prototype,"selectedFeatureIndex",null),e([d({readOnly:!0})],U.prototype,"selectedFeatureWidget",null),e([d()],U.prototype,"spinnerEnabled",void 0),e([d()],U.prototype,"title",null),e([d()],U.prototype,"updateLocationEnabled",null),e([d()],U.prototype,"view",null),e([d({type:M}),C(["triggerAction","trigger-action"])],U.prototype,"viewModel",void 0),e([d()],U.prototype,"visible",null),e([d()],U.prototype,"visibleElements",void 0),e([h("visibleElements")],U.prototype,"castVisibleElements",null),e([k()],U.prototype,"_close",null),e([k()],U.prototype,"_toggleDockEnabled",null),e([k()],U.prototype,"_toggleFeatureMenu",null),e([k()],U.prototype,"_toggleActionsMenu",null),e([k()],U.prototype,"_triggerAction",null),e([k()],U.prototype,"_selectFeature",null),e([k()],U.prototype,"_next",null),e([k()],U.prototype,"_previous",null),U=e([p("esri.widgets.Popup")],U);const W=U;export{W as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import t from"../core/Collection.js";import{deprecatedProperty as i}from"../core/deprecate.js";import{eventKey as o}from"../core/events.js";import n from"../core/Logger.js";import{watch as s,when as r,on as l,whenOnce as a,initial as c}from"../core/reactiveUtils.js";import{throttle as u}from"../core/throttle.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import{cast as h}from"../core/accessorSupport/decorators/cast.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import g from"./Feature.js";import m from"./Spinner.js";import v from"./Widget.js";import{CSS as f}from"./Feature/resources.js";import{FeatureContentMixin as _}from"./Feature/support/FeatureContentMixin.js";import{getPointFromGeometry as w}from"./Popup/actionUtils.js";import{CSS as b}from"./Popup/css.js";import M from"./Popup/PopupViewModel.js";import{loadCalciteComponents as y}from"./support/componentsUtils.js";import{Heading as k}from"./support/Heading.js";import{accessibleHandler as A}from"./support/decorators/accessibleHandler.js";import{messageBundle as F}from"./support/decorators/messageBundle.js";import{vmEvent as C}from"./support/decorators/vmEvent.js";import{tsx as I}from"./support/jsxFactory.js";import{storeNode as O,cssTransition as x,isRTL as E}from"./support/widgetUtils.js";import{isDarkTheme as N}from"../support/themeUtils.js";import{substitute as B}from"../intl/substitute.js";const P="selected-index",T=0,D="popup-spinner",S={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},L="esri-popup";function R(e,t){return void 0===t?`${L}__${e}`:`${L}__${e}-${t}`}const V={closeButton:!0,featureNavigation:!0};let U=class extends(_(v)){constructor(e,i){super(e,i),this._blurClose=!1,this._blurContainer=!1,this._containerNode=null,this._mainContainerNode=null,this._featureMenuNode=null,this._actionsMenuNode=null,this._focusClose=!1,this._focusContainer=!1,this._focusDockButton=!1,this._focusFeatureMenuButton=!1,this._focusActionsMenuButton=!1,this._focusFirstFeature=!1,this._focusFirstAction=!1,this._pointerOffsetInPx=16,this._spinner=null,this._feature=null,this._featureMenuIntersectionObserverNode=null,this._featureMenuViewportNode=null,this._rootFlowItemNode=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&null!=this.viewModel.featurePage&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._displaySpinnerThrottled=u((()=>this._displaySpinner()),T),this._exitRelatedRecordsActions=new WeakMap,this._featureSelectionActions=new WeakMap,this._flowItems=new t,this.alignment="auto",this.collapsed=!1,this.collapseEnabled=!0,this.dockEnabled=!1,this.headingLevel=2,this.maxInlineActions=3,this.messages=null,this.messagesCommon=null,this.spinnerEnabled=!0,this.viewModel=new M,this.visibleElements={...V},this._handleOpenRelatedFeature=e=>{this._openRelatedFeature(e)},this._addSelectedFeatureIndexHandle(),this.addHandles([this._displaySpinnerThrottled,s((()=>this.viewModel?.screenLocation),(()=>this._positionContainer())),s((()=>[this.viewModel?.active,this.dockEnabled]),(()=>this._toggleScreenLocationEnabled())),s((()=>this.viewModel?.screenLocation),((e,t)=>{!!e!=!!t&&this.reposition()})),s((()=>[this.viewModel?.view?.padding,this.viewModel?.view?.size,this.viewModel?.active,this.viewModel?.location,this.alignment]),(()=>this.reposition())),s((()=>this.spinnerEnabled),(e=>this._spinnerEnabledChange(e))),s((()=>this.viewModel?.view?.size),((e,t)=>this._updateDockEnabledForViewSize(e,t))),s((()=>this.viewModel?.view),((e,t)=>this._viewChange(e,t))),s((()=>this.viewModel?.view?.ready),((e,t)=>this._viewReadyChange(e??!1,t??!1))),s((()=>[this.viewModel?.waitingForResult,this.viewModel?.location]),(()=>{this._hideSpinner(),this._displaySpinnerThrottled()})),s((()=>this.selectedFeatureWidget),(()=>this._destroyFlowItemWidgets())),s((()=>[this.selectedFeatureWidget?.viewModel?.title,this.selectedFeatureWidget?.viewModel?.state]),(()=>this._setTitleFromFeatureWidget())),s((()=>[this.selectedFeatureWidget?.viewModel?.content,this.selectedFeatureWidget?.viewModel?.state]),(()=>this._setContentFromFeatureWidget())),r((()=>!this.collapsed),(()=>{"xsmall"===this.viewModel?.view?.widthBreakpoint&&this.viewModel.active&&this.collapseEnabled&&this.viewModel.centerAtLocation()})),l((()=>this.viewModel?.allActions),"change",(()=>this._watchActions())),s((()=>this.viewModel?.allActions),(()=>this._watchActions()),c),s((()=>this.viewModel?.featureViewModels),(()=>this._featureMenuViewportScrollTop())),l((()=>this._flowItems),"change",(()=>{this.notifyChange("_activeFlowItemWidget"),this.scheduleRender()})),s((()=>[this._activeFlowItemWidget?.viewModel?.state,this._activeFlowItemWidget?.viewModel?.title]),(()=>this.scheduleRender()))])}loadDependencies(){return y({action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow.js"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js")})}initialize(){this.addHandles(this._displaySpinnerThrottled)}destroy(){this._destroyFlowItemWidgets(),this._destroySelectedFeatureWidget(),this._destroySpinner(),this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver?.disconnect()}get actionsMenuId(){return`${this.id}-actions-menu`}get actionsMenuButtonId(){return`${this.id}-actions-menu-button`}get featureMenuId(){return`${this.id}-feature-menu`}get titleId(){return`${this.id}-popup-title`}get contentId(){return`${this.id}-popup-content`}get hasContent(){const{selectedFeatureWidget:e,viewModel:t}=this;if(!e)return!!t?.content;const i=e.viewModel;if(i?.waitingForContent||"error"===i?.state)return!0;const o=i?.content;return Array.isArray(o)?!!o.length:!!o}get featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.visibleElements.featureNavigation}get collapsible(){return!!(this.collapseEnabled&&this.viewModel.title&&this.hasContent)}get featureMenuVisible(){return this.featureNavigationVisible&&this.featureMenuOpen}get contentCollapsed(){return this.collapsible&&!this.featureMenuVisible&&this.collapsed}get dividedActions(){return this._divideActions()}get _activeFlowItemWidget(){const{_flowItems:e}=this;return e.at(-1)??null}get actions(){return this.viewModel.actions}set actions(e){this.viewModel.actions=e}set actionsMenuOpen(e){this._set("actionsMenuOpen",!!e)}get actionsMenuOpen(){return!!this.viewModel.active&&this._get("actionsMenuOpen")}get autoCloseEnabled(){return this.viewModel.autoCloseEnabled}set autoCloseEnabled(e){this.viewModel.autoCloseEnabled=e}get autoOpenEnabled(){return i(n.getLogger(this),"autoOpenEnabled",{replacement:"MapView/SceneView.popupEnabled",version:"4.27"}),this.viewModel.autoOpenEnabled}set autoOpenEnabled(e){i(n.getLogger(this),"autoOpenEnabled",{replacement:"MapView/SceneView.popupEnabled",version:"4.27"}),this.viewModel.autoOpenEnabled=e}get defaultPopupTemplateEnabled(){return this.viewModel.defaultPopupTemplateEnabled}set defaultPopupTemplateEnabled(e){this.viewModel.defaultPopupTemplateEnabled=e}get content(){return this.viewModel.content}set content(e){this.viewModel.content=e}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._get("dockOptions")||S}set dockOptions(e){const t={...S},i=this.viewModel?.view?.breakpoints,o={};i&&(o.width=i.xsmall,o.height=i.xsmall);const n={...t,...e},s={...t.breakpoint,...o},{breakpoint:r}=n;"object"==typeof r?n.breakpoint={...s,...r}:r&&(n.breakpoint=s),this._set("dockOptions",n),this._setCurrentDockPosition(),this.reposition()}get featureCount(){return this.viewModel.featureCount}get featureMenuOpen(){return this.viewModel.featureMenuOpen}set featureMenuOpen(e){this.viewModel.featureMenuOpen=e}get features(){return this.viewModel.features}set features(e){this.viewModel.features=e}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get location(){return this.viewModel.location}set location(e){this.viewModel.location=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get promises(){return this.viewModel.promises}set promises(e){this.viewModel.promises=e}get selectedFeature(){return this.viewModel.selectedFeature}get selectedFeatureIndex(){return this.viewModel.selectedFeatureIndex}set selectedFeatureIndex(e){this.viewModel.selectedFeatureIndex=e}get selectedFeatureWidget(){const{_feature:e,visibleElements:t,headingLevel:i,_flowItems:o}=this,{selectedFeatureViewModel:n}=this.viewModel,s={...t,title:!1};return n?(e?(e.viewModel=n,e.visibleElements=s):this._feature=new g({flowItems:o,headingLevel:i+1,viewModel:n,visibleElements:s}),this._feature):null}get title(){return this.viewModel.title}set title(e){this.viewModel.title=e}get updateLocationEnabled(){return this.viewModel.updateLocationEnabled}set updateLocationEnabled(e){this.viewModel.updateLocationEnabled=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visible(){return this.viewModel.visible}set visible(e){this.viewModel.visible=e}castVisibleElements(e){return{...V,...e}}blur(){const{active:e}=this.viewModel;e||n.getLogger(this).warn("Popup can only be blurred when currently active."),this.visibleElements.closeButton?this._blurClose=!0:this._blurContainer=!0,this.scheduleRender()}clear(){return this.viewModel.clear()}close(){this.visible=!1}fetchFeatures(e,t){return this.viewModel.fetchFeatures(e,t)}focus(){const{active:e}=this.viewModel;e||n.getLogger(this).warn("Popup can only be focused when currently active."),this.visibleElements.closeButton?this._focusClose=!0:this._focusContainer=!0,this.scheduleRender()}next(){return this.viewModel.next()}open(e){this.removeHandles(P);const t=!!e&&!!e.featureMenuOpen,i=!!e&&!!e.actionsMenuOpen,o={collapsed:!!e&&!!e.collapsed,actionsMenuOpen:i,featureMenuOpen:t};"xsmall"===this.viewModel?.view?.widthBreakpoint&&(o.collapsed=!0),this.set(o),this.viewModel.open(e),this._shouldFocus(e),this.addHandles(r((()=>!this.viewModel.waitingForResult),(()=>this._addSelectedFeatureIndexHandle()),{once:!0}))}previous(){return this.viewModel.previous()}reposition(){this.renderNow(),this._positionContainer(),this._setCurrentAlignment()}triggerAction(e){return this.viewModel.triggerAction(e)}render(){const{actionsMenuOpen:e,dockEnabled:t,featureMenuVisible:i,dividedActions:o,currentAlignment:n,currentDockPosition:s}=this,{active:r}=this.viewModel,{menuActions:l}=o,a=r&&l.length>1&&e,c=r&&t,u=r&&!t,d=this.selectedFeature?.layer?.title,h=this.selectedFeature?.layer?.id,p={[b.alignTopCenter]:"top-center"===n,[b.alignBottomCenter]:"bottom-center"===n,[b.alignTopLeft]:"top-left"===n,[b.alignBottomLeft]:"bottom-left"===n,[b.alignTopRight]:"top-right"===n,[b.alignBottomRight]:"bottom-right"===n,[b.isDocked]:c,[b.shadow]:u,[b.isDockedTopLeft]:"top-left"===s,[b.isDockedTopCenter]:"top-center"===s,[b.isDockedTopRight]:"top-right"===s,[b.isDockedBottomLeft]:"bottom-left"===s,[b.isDockedBottomCenter]:"bottom-center"===s,[b.isDockedBottomRight]:"bottom-right"===s,[b.isFeatureMenuOpen]:i,[b.isActionsMenuOpen]:a};return I("div",{class:this.classes(b.base,p),role:"presentation","data-layer-title":d,"data-layer-id":h,bind:this,afterCreate:this._positionContainer,afterUpdate:this._positionContainer},r?[this.renderMainContainer(),this.renderPointer()]:null)}renderLoadingIcon(){return I("span",{"aria-hidden":"true",class:this.classes(b.icon,b.iconLoading,b.rotating)})}renderNavigationLoading(){const{messagesCommon:e}=this;return this.viewModel.pendingPromisesCount?I("div",{key:R("loading-container"),role:"presentation",class:b.loadingContainer,"aria-label":e.loading,title:e.loading},this.renderLoadingIcon()):null}renderPreviousButton(){const{messages:e}=this;return I("div",{role:"button",tabIndex:0,bind:this,onclick:this._previous,onkeydown:this._previous,class:this.classes(b.button,b.paginationPrevious),"aria-label":e.previous,title:e.previous},I("calcite-icon",{icon:"chevron-left",scale:"s",class:b.paginationIcon}))}renderNextButton(){const{messages:e}=this;return I("div",{role:"button",tabIndex:0,bind:this,onclick:this._next,onkeydown:this._next,class:this.classes(b.button,b.paginationNext),"aria-label":e.next,title:e.next},I("calcite-icon",{icon:"chevron-right",scale:"s",class:b.paginationIcon}))}renderFeatureMenuButton(){const{featureMenuOpen:e,featureMenuId:t,messagesCommon:i}=this,{featureCount:o,selectedFeatureIndex:n}=this.viewModel;return I("div",{role:"button",tabIndex:0,bind:this,onclick:this._toggleFeatureMenu,onkeydown:this._toggleFeatureMenu,afterCreate:this._focusFeatureMenuButtonNode,afterUpdate:this._focusFeatureMenuButtonNode,class:b.featureMenuButton,"aria-haspopup":"true","aria-controls":t,"aria-expanded":e.toString(),"aria-label":i.menu,title:i.menu},I("calcite-icon",{icon:"list-bullet",scale:"s",class:b.featureMenuButtonIcon}),this._getPageText(o,n))}renderNavigationButtons(){return this.featureNavigationVisible?[this.renderPreviousButton(),this.renderNextButton(),this.renderNavigationLoading()||this.renderFeatureMenuButton()]:[]}renderDockIcon(){const{dockEnabled:e}=this,t=this._wouldDockTo(),i={[b.iconUndock]:e,[b.iconDock]:!e,[b.iconDockToRight]:!e&&("top-right"===t||"bottom-right"===t),[b.iconDockToLeft]:!e&&("top-left"===t||"bottom-left"===t),[b.iconDockToTop]:!e&&"top-center"===t,[b.iconDockToBottom]:!e&&"bottom-center"===t};return I("span",{"aria-hidden":"true",class:this.classes(i,b.icon)})}renderDockButton(){const{dockEnabled:e,messages:t}=this,i=this.viewModel?.view?.widthBreakpoint,o=e?t.undock:t.dock;return"xsmall"!==i&&this.dockOptions?.buttonEnabled?I("div",{role:"button","aria-label":o,title:o,tabIndex:0,bind:this,onclick:this._toggleDockEnabled,onkeydown:this._toggleDockEnabled,afterCreate:this._focusDockButtonNode,afterUpdate:this._focusDockButtonNode,class:this.classes(b.button,b.buttonDock)},this.renderDockIcon()):null}renderTitle(){const{title:e}=this.viewModel,{titleId:t,collapsible:i,contentCollapsed:o,messagesCommon:n}=this,s={[b.headerContainerButton]:i},r=I(k,{level:this.headingLevel,class:b.headerTitle,innerHTML:e??""}),l=i?I("button",{key:`${e}--collapsible`,id:t,title:o?n.expand:n.collapse,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(b.headerContainer,s),"aria-expanded":o?"false":"true",onclick:this._toggleCollapsed,type:"button"},r,I("calcite-icon",{class:b.collapseIcon,key:"collapse-icon",icon:o?"chevron-down":"chevron-up",scale:"m"})):I("div",{key:e??"title",id:t,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(b.headerContainer,s)},r);return e?l:null}renderCloseIcon(){return I("span",{"aria-hidden":"true",class:this.classes(b.icon,b.iconClose)})}renderCloseButton(){const{visibleElements:e,messagesCommon:t}=this;return e.closeButton?I("div",{role:"button",tabIndex:0,bind:this,onclick:this._close,onkeydown:this._close,class:b.button,"aria-label":t.close,title:t.close,afterCreate:this._closeButtonNodeUpdated,afterUpdate:this._closeButtonNodeUpdated},this.renderCloseIcon()):null}renderHeader(){return I("header",{class:b.header},this.renderTitle(),I("div",{class:b.headerButtons},this.renderDockButton(),this.renderCloseButton()))}renderContentContainer(){const{contentId:e,hasContent:t,contentCollapsed:i,_flowItems:o}=this,{content:n}=this.viewModel,s=o.toArray(),r={[b.contentHasFlows]:!!s.length};return t&&!i?I("div",{key:n??"content",enterAnimation:this._createFeatureUpdatedAnimation(),id:e,class:this.classes(b.content,r)},I("calcite-flow",{bind:this},I("calcite-flow-item",{bind:this,"data-node-ref":"_rootFlowItemNode",afterCreate:O,key:"root-flow-item",onCalciteFlowItemBack:this._handleBackClick},this.renderContent()),s.map((e=>this.renderFlowItem(e)))),s.map((e=>this.renderFlowItemTooltips(e)))):null}renderFlowItem(e){const{messages:t}=this,i=N(),o="graphic"in e&&!e.isTable;return I("calcite-flow-item",{bind:this,class:this.classes({[b.calciteThemeDark]:!i,[b.calciteThemeLight]:i}),heading:e.title??"",description:this._getFlowItemDescription(e),onCalciteFlowItemBack:this._handleBackClick,key:`flow-item-${e.viewModel.uid}`},I("calcite-action",{class:b.actionExit,icon:"move-up",label:t?.exitRelatedRecords,text:t?.exitRelatedRecords,slot:"header-actions-start",bind:this,afterCreate:t=>this._storeExitRelatedRecordsAction(e,t),onclick:this._destroyFlowItemWidgets}),o?I("calcite-action",{class:b.actionSelectFeature,icon:"zoom-to-object",label:t?.selectFeature,text:t?.selectFeature,slot:"header-actions-end",bind:this,afterCreate:t=>this._storeFeatureSelectionAction(e,t),onclick:()=>this._handleOpenRelatedFeature(e)}):null,I("div",{class:this.classes(b.contentFlowItem,{[b.calciteThemeDark]:i,[b.calciteThemeLight]:!i})},e.render()))}renderFlowItemTooltips(e){const{messages:t,_exitRelatedRecordsActions:i,_featureSelectionActions:o}=this,n=N(),s=o.get(e);return[I("calcite-tooltip",{class:this.classes({[b.calciteThemeDark]:!n,[b.calciteThemeLight]:n}),key:`exit-related-records-tooltip-${e.viewModel.uid}`,label:t?.exitRelatedRecords,overlayPositioning:"fixed",referenceElement:i.get(e),placement:"top"},t?.exitRelatedRecords),s?I("calcite-tooltip",{class:this.classes({[b.calciteThemeDark]:!n,[b.calciteThemeLight]:n}),key:`select-related-record-tooltip-${e.viewModel.uid}`,label:t?.selectFeature,overlayPositioning:"fixed",referenceElement:s,placement:"top"},t?.selectFeature):null]}renderActionsMenuButton(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o,messagesCommon:n}=this,s=i?n.close:n.open,{menuActions:r}=o;return r.length?I("div",{key:R("actions-menu-button"),class:this.classes(b.button,b.actionsMenuButton),role:"button",id:t,"aria-haspopup":"true","aria-controls":i?e:null,tabIndex:0,bind:this,onclick:this._toggleActionsMenu,onkeydown:this._toggleActionsMenu,afterCreate:this._focusActionsMenuButtonNode,afterUpdate:this._focusActionsMenuButtonNode,"aria-label":s,title:s},I("span",{"aria-hidden":"true",class:b.iconActionsMenu})):null}renderMenuActions(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o}=this,{menuActions:n}=o;return n.length&&i?I("ul",{id:e,role:"menu","aria-labelledby":t,key:R("actions"),class:b.actions,bind:this,onkeyup:this._handleActionMenuKeyup,afterCreate:this._actionsMenuNodeUpdated,afterUpdate:this._actionsMenuNodeUpdated},n.toArray().map((e=>this.renderAction({action:e,type:"menu-item"})))):null}renderInlineActions(){const{inlineActions:e}=this.dividedActions;return e.length?e.toArray().map((e=>this.renderAction({action:e,type:"inline"}))):[]}renderInlineActionsContainer(){const{inlineActions:e,menuActions:t}=this.dividedActions,i=!!e.length,o=!!t.length;return i||o?I("div",{key:"inline-actions-container","data-inline-actions":i.toString(),"data-menu-actions":o.toString(),class:b.inlineActionsContainer},this.renderInlineActions(),this.renderActionsMenuButton(),this.renderMenuActions()):null}renderNavigation(){return this.featureNavigationVisible?I("section",{key:R("navigation"),class:this.classes(b.navigation)},this.renderNavigationButtons()):null}renderFooter(){const{featureNavigationVisible:e,dividedActions:t}=this,{inlineActions:i,menuActions:o}=t,n=!!i.length,s=!!o.length,r={[b.footerHasPagination]:e,[b.footerHasActions]:n,[b.footerHasActionsMenu]:s};return e||n?I("div",{key:R("feature-buttons"),class:this.classes(b.footer,r)},this.renderInlineActionsContainer(),this.renderNavigation()):null}renderFeatureMenuContainer(){const{messages:e}=this,{featureViewModels:t,isLoadingFeature:i}=this.viewModel,o=B(e.selectedFeatures,{total:t.length});return I("section",{key:R("menu"),class:b.featureMenu},I("strong",{class:b.featureMenuHeader},o),I("nav",{bind:this,class:b.featureMenuViewport,"data-node-ref":"_featureMenuViewportNode",afterCreate:O},this.renderFeatureMenu(),I("div",{class:b.featureMenuObserver,bind:this,afterCreate:this._featureMenuIntersectionObserverCreated}),i?I("div",{class:b.featureMenuLoader},this.renderLoadingIcon()):null))}renderPointer(){return this.dockEnabled?null:I("div",{key:R("pointer"),class:b.pointer,role:"presentation"},I("div",{class:this.classes(b.pointerDirection,b.shadow)}))}renderMainContainer(){const{dockEnabled:e,currentAlignment:t,currentDockPosition:i,titleId:o,contentId:n,collapsible:s,hasContent:r,contentCollapsed:l,visibleElements:a}=this,{title:c}=this.viewModel,u="bottom-left"===t||"bottom-center"===t||"bottom-right"===t||"top-left"===i||"top-center"===i||"top-right"===i,d="top-left"===t||"top-center"===t||"top-right"===t||"bottom-left"===i||"bottom-center"===i||"bottom-right"===i,h={[b.shadow]:e,[b.isCollapsible]:s,[b.isCollapsed]:l};return I("div",{class:this.classes(b.main,b.widget,h),tabIndex:a.closeButton?void 0:-1,role:"dialog","aria-live":"polite","aria-labelledby":c?o:"","aria-describedby":r&&!l?n:"",bind:this,onkeyup:this._handleMainKeyup,afterCreate:this._mainContainerNodeUpdated,afterUpdate:this._mainContainerNodeUpdated},u?this.renderFooter():null,u?this.renderFeatureMenuContainer():null,this.renderHeader(),this.renderContentContainer(),d?this.renderFooter():null,d?this.renderFeatureMenuContainer():null)}renderContent(){const e=this.viewModel?.content;return e?"string"==typeof e?I("div",{class:f.contentNode,key:e,innerHTML:e}):this.renderNodeContent(e):null}renderActionText(e){return I("span",{key:"text",class:b.actionText},e)}renderActionCalciteIcon(e,t){return I("calcite-icon",{scale:"s",key:`calcite-icon-${t}`,icon:e,class:b.icon})}renderActionIcon(e){const t=this._getActionClass(e),i=this._getActionImage(e),o={[b.iconLoading]:e.active,[b.rotating]:e.active,[b.icon]:!!t,[b.actionImage]:!e.active&&!!i};return t&&(o[t]=!e.active),I("span",{key:"icon","aria-hidden":"true",class:this.classes(b.icon,o),styles:this._getIconStyles(i)})}renderAction(e){const{action:t,type:i}=e,o=this._getActionTitle(t),n={[b.action]:"toggle"!==t.type,[b.actionToggle]:"toggle"===t.type,[b.actionToggleOn]:"toggle"===t.type&&t.value,[b.buttonDisabled]:t.disabled},s=[t.icon&&!t.active?this.renderActionCalciteIcon(t.icon,t.uid):this.renderActionIcon(t),this.renderActionText(o)],r="menu-item"===i?I("li",{key:t.uid,role:"menuitem",tabIndex:0,title:o,"aria-label":o,class:this.classes(b.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s):I("div",{key:t.uid,role:"button",tabIndex:0,title:o,"aria-label":o,class:this.classes(b.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s);return t.visible?r:null}renderFeatureMenuItem(e,t){const{messages:i,messagesCommon:o}=this,{selectedFeatureIndex:n,selectedFeatureViewModel:s}=this.viewModel,r=e===s,l={[b.featureMenuSelected]:r},a=r?I("span",{key:R(`feature-menu-selected-feature-${n}`),title:i.selectedFeature,"aria-label":i.selectedFeature,class:b.iconCheckMark}):null,c=I("span",{innerHTML:e.title||o.untitled});return I("li",{role:"menuitem",tabIndex:-1,key:R(`feature-menu-feature-${n}`),class:this.classes(l,b.featureMenuItem),bind:this,"data-feature-index":t,onblur:this._removeActiveFeature,onfocus:this._setActiveFeature,onkeyup:this._handleFeatureMenuItemKeyup,onclick:this._selectFeature,onkeydown:this._selectFeature,onmouseover:this._setActiveFeature,onmouseleave:this._removeActiveFeature},I("span",{class:b.featureMenuTitle},c,a))}renderFeatureMenu(){const{featureMenuId:e}=this,{featureViewModels:t}=this.viewModel;return t.length>1?I("ol",{class:b.featureMenuList,id:e,bind:this,afterCreate:this._featureMenuNodeUpdated,afterUpdate:this._featureMenuNodeUpdated,onkeyup:this._handleFeatureMenuKeyup,role:"menu"},t.filter((e=>!!e.graphic)).map(((e,t)=>this.renderFeatureMenuItem(e,t)))):null}_storeFeatureSelectionAction(e,t){this._featureSelectionActions.set(e,t),this.scheduleRender()}_storeExitRelatedRecordsAction(e,t){this._exitRelatedRecordsActions.set(e,t),this.scheduleRender()}_getFlowItemDescription(e){return"featureCountDescription"in e?e.featureCountDescription:e.viewModel.description??""}async _openRelatedFeature(e){await e.viewModel.updateGeometry();const t=e.graphic,i=t?.geometry;if(null==i||null==t)return;this._destroyFlowItemWidgets(),await this.viewModel.zoomTo({target:i});const o=w(i);this.open({features:[t],location:null!=o?o:void 0})}_destroyFlowItemWidgets(){this._flowItems.removeAll().forEach((e=>{"showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e.viewModel=null,e.destroy()}))}_handleBackClick(){const e=this._flowItems.pop();e&&(this._exitRelatedRecordsActions.delete(e),this._featureSelectionActions.delete(e),"showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e&&(e.viewModel=null,e.destroy()))}_getActionTitle(e){const{messages:t,selectedFeature:i,messagesCommon:o}=this,{id:n}=e,s=i?.attributes,r=e.title??"",l="zoom-to-feature"===n?B(r,{messages:t}):"remove-selected-feature"===n?B(r,{messages:o}):"zoom-to-clustered-features"===n||"browse-clustered-features"===n?B(r,{messages:t}):e.title;return l&&s?B(l,s):l??""}_getActionClass(e){const{selectedFeature:t}=this,i=t?.attributes,{className:o,image:n}=e,s=n||o?o:b.iconDefaultAction;return s&&i?B(s,i):s??""}_getActionImage(e){if(e.active)return"";const{selectedFeature:t}=this,i=t?.attributes,{image:o}=e;return o&&i?B(o,i):o??""}_createFeatureUpdatedAnimation(){return x("enter",b.hasFeatureUpdated)}_getInlineActionCount(){const{maxInlineActions:e,featureNavigationVisible:t}=this;if("number"!=typeof e)return null;const i=Math.round(e);return Math.max(t?i-1:i,0)}_watchActions(){const{allActions:e}=this.viewModel;this.notifyChange("dividedActions");const t="actions";this.removeHandles(t),e&&e.forEach((e=>{this.addHandles(s((()=>[e.uid,e.active,e.className,e.disabled,e.id,e.title,e.image,e.visible]),(()=>this.scheduleRender())),t)}))}_divideActions(){const{allActions:e}=this.viewModel,i=e.filter((e=>e.visible)),o=this._getInlineActionCount(),n=null===o,s=0===o;return{inlineActions:n?i.slice(0):s?new t:i.slice(0,o),menuActions:n?new t:s?i.slice(0):i.slice(o)}}_featureMenuOpenChanged(e){e?this._focusFirstFeature=!0:this._focusFeatureMenuButton=!0}_actionsMenuOpenChanged(e){e?this._focusFirstAction=!0:this._focusActionsMenuButton=!0}_setTitleFromFeatureWidget(){const{selectedFeatureWidget:e,messagesCommon:t}=this;e&&(this.viewModel.title="error"===e.viewModel?.state?t.errorMessage:e.viewModel?.title||"")}_setContentFromFeatureWidget(){const{selectedFeatureWidget:e}=this;e&&(this.viewModel.content=e)}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_handleFeatureMenuKeyup(e){"Escape"===o(e)&&(e.stopPropagation(),this._focusFeatureMenuButton=!0,this.featureMenuOpen=!1,this.scheduleRender())}_handleActionMenuKeyup(e){"Escape"===o(e)&&(e.stopPropagation(),this._focusActionsMenuButton=!0,this.actionsMenuOpen=!1,this.scheduleRender())}_setActiveFeature(e){const{viewModel:t}=this,i=j(e.currentTarget);t.activeFeature=t.features[i]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_handleFeatureMenuItemKeyup(e){const t=o(e),{_featureMenuNode:i}=this,n=j(e.currentTarget);if(!i)return;const s=i.querySelectorAll("li"),r=s.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();s[s.length-1].focus()}else{e.stopPropagation();s[0].focus()}else{e.stopPropagation();s[(n+1+r)%r].focus()}else{e.stopPropagation();s[(n-1+r)%r].focus()}}_handleActionMenuItemKeyup(e){const t=o(e),{_actionsMenuNode:i}=this,n=e.currentTarget.dataset.actionUid,{menuActions:s}=this.dividedActions,r=s.findIndex((e=>e.uid===n));if(!i)return;const l=i.querySelectorAll("li"),a=l.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();l[l.length-1].focus()}else{e.stopPropagation();l[0].focus()}else{e.stopPropagation();l[(r+1+a)%a].focus()}else{e.stopPropagation();l[(r-1+a)%a].focus()}}_handleMainKeyup(e){const t=o(e);"ArrowLeft"===t&&(e.stopPropagation(),this.previous()),"ArrowRight"===t&&(e.stopPropagation(),this.next())}_spinnerEnabledChange(e){if(this._destroySpinner(),!e)return;const t=this.viewModel?.view;this._createSpinner(t)}_hideSpinner(){const{_spinner:e}=this;e&&(e.location=null,e.hide())}_displaySpinner(){const{_spinner:e}=this;if(!e)return;const{location:t,waitingForResult:i}=this.viewModel;i&&t?e.show({location:t}):e.hide()}_getIconStyles(e){return{"background-image":e?`url(${e})`:""}}async _shouldFocus(e){e?.shouldFocus&&(await a((()=>!0===this.viewModel?.active)),this.focus())}_addSelectedFeatureIndexHandle(){const e=s((()=>this.viewModel?.selectedFeatureIndex),((e,t)=>this._selectedFeatureIndexUpdated(e,t)));this.addHandles(e,P)}_selectedFeatureIndexUpdated(e,t){const{featureCount:i}=this;i&&e!==t&&-1!==e&&(this._destroyFlowItemWidgets(),this.actionsMenuOpen=!1,this.featureMenuOpen=!1,this._mainContainerNode&&(this._mainContainerNode.scrollTop=0),this._rootFlowItemNode&&this._rootFlowItemNode.scrollContentTo({top:0}))}_destroySelectedFeatureWidget(){const{_feature:e}=this;e&&(e.viewModel=null,e&&!e.destroyed&&e.destroy()),this._feature=null}_isScreenLocationWithinView(e,t){return e.x>-1&&e.y>-1&&e.x<=t.width&&e.y<=t.height}_isOutsideView(e){const{popupHeight:t,popupWidth:i,screenLocation:o,side:n,view:s}=e;if(isNaN(i)||isNaN(t)||!s||!o)return!1;const r=s.padding;return"right"===n&&o.x+i/2>s.width-r.right||("left"===n&&o.x-i/2<r.left||("top"===n&&o.y-t<r.top||"bottom"===n&&o.y+t>s.height-r.bottom))}_calculateAutoAlignment(e){if("auto"!==e)return e;const{_pointerOffsetInPx:t,_containerNode:i,_mainContainerNode:o,viewModel:n}=this,{screenLocation:s,view:r}=n;if(null==s||!r||!i)return"top-center";if(!this._isScreenLocationWithinView(s,r))return this._get("currentAlignment")||"top-center";function l(e){return parseInt(e.replaceAll(/[^-\d\.]/g,""),10)}const a=o?window.getComputedStyle(o,null):null,c=a?l(a.getPropertyValue("max-height")):0,u=a?l(a.getPropertyValue("height")):0,{height:d,width:h}=i.getBoundingClientRect(),p=h+t,g=Math.max(d,c,u)+t,m=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"right",view:r}),v=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"left",view:r}),f=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"top",view:r}),_=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"bottom",view:r});return v?f?"bottom-right":"top-right":m?f?"bottom-left":"top-left":f?_?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(e){return"function"==typeof e?e.call(this):e}_getCurrentAlignment(){const{alignment:e,dockEnabled:t}=this;return t||!this.viewModel.active?null:this._calculatePositionResult(this._calculateAutoAlignment(this._callCurrentAlignment(e)))}_setCurrentAlignment(){this._set("currentAlignment",this._getCurrentAlignment())}_setCurrentDockPosition(){this._set("currentDockPosition",this._getCurrentDockPosition())}_calculatePositionResult(e){const t=["left","right"];return E(this.container)&&t.reverse(),e?.replace(/leading/gi,t[0]).replaceAll(/trailing/gi,t[1])}_callDockPosition(e){return"function"==typeof e?e.call(this):e}_getDockPosition(){return this._calculatePositionResult(this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position)))}_getCurrentDockPosition(){return this.dockEnabled&&this.viewModel.active?this._getDockPosition():null}_wouldDockTo(){return this.dockEnabled?null:this._getDockPosition()}_calculateAutoDockPosition(e){if("auto"!==e)return e;const t=this.viewModel?.view,i=E(this.container)?"top-left":"top-right";if(!t)return i;const o=t.padding||{left:0,right:0,top:0,bottom:0},n=t.width-o.left-o.right,{breakpoints:s}=t;return s&&n<=s.xsmall?"bottom-center":i}_positionContainer(e=this._containerNode){if(e&&(this._containerNode=e),!this._containerNode)return;const{screenLocation:t}=this.viewModel,{width:i}=this._containerNode.getBoundingClientRect(),o=this._calculatePositionStyle(t,i);o&&Object.assign(this._containerNode.style,o)}_calculateFullWidth(e){const{currentAlignment:t,_pointerOffsetInPx:i}=this;return"top-left"===t||"bottom-left"===t||"top-right"===t||"bottom-right"===t?e+i:e}_calculateAlignmentPosition(e,t,i,o){const{currentAlignment:n,_pointerOffsetInPx:s}=this;if(!i)return;const{padding:r}=i,l=o/2,a=i.height-t,c=i.width-e;return"bottom-center"===n?{top:t+s-r.top,left:e-l-r.left}:"top-left"===n?{bottom:a+s-r.bottom,right:c+s-r.right}:"bottom-left"===n?{top:t+s-r.top,right:c+s-r.right}:"top-right"===n?{bottom:a+s-r.bottom,left:e+s-r.left}:"bottom-right"===n?{top:t+s-r.top,left:e+s-r.left}:"top-center"===n?{bottom:a+s-r.bottom,left:e-l-r.left}:void 0}_calculatePositionStyle(e,t){const{dockEnabled:i,view:o}=this;if(!o)return;if(i)return{left:"",top:"",right:"",bottom:""};if(null==e||!t)return;const n=this._calculateFullWidth(t),s=this._calculateAlignmentPosition(e.x,e.y,o,n);return s?{top:void 0!==s.top?`${s.top}px`:"auto",left:void 0!==s.left?`${s.left}px`:"auto",bottom:void 0!==s.bottom?`${s.bottom}px`:"auto",right:void 0!==s.right?`${s.right}px`:"auto"}:void 0}_viewChange(e,t){e&&t&&(this.close(),this.clear())}_viewReadyChange(e,t){if(e){const e=this.viewModel?.view;this._wireUpView(e)}else t&&(this.close(),this.clear())}_wireUpView(e){if(this._destroySpinner(),!e)return;const{spinnerEnabled:t}=this;t&&this._createSpinner(e),this._setDockEnabledForViewSize(this.dockOptions)}_dockingThresholdCrossed(e,t,i){const[o,n]=e,[s,r]=t,{width:l=0,height:a=0}=i??{};return o<=l&&s>l||o>l&&s<=l||n<=a&&r>a||n>a&&r<=a}_updateDockEnabledForViewSize(e,t){if(!e||!t)return;const i=this.viewModel?.view?.padding||{left:0,right:0,top:0,bottom:0},o=i.left+i.right,n=i.top+i.bottom,s=[],r=[];s[0]=e[0]-o,s[1]=e[1]-n,r[0]=t[0]-o,r[1]=t[1]-n;const{dockOptions:l}=this,a=l.breakpoint;this._dockingThresholdCrossed(s,r,a)&&this._setDockEnabledForViewSize(l),this._setCurrentDockPosition()}_focusDockButtonNode(e){this._focusDockButton&&(this._focusDockButton=!1,e.focus())}_closeButtonNodeUpdated(e){return this._focusClose?(this._focusClose=!1,void e.focus()):this._blurClose?(this._blurClose=!1,void e.blur()):void 0}_mainContainerNodeUpdated(e){return this._mainContainerNode=e,this._focusContainer?(this._focusContainer=!1,void e.focus()):this._blurContainer?(this._blurContainer=!1,void e.blur()):void 0}_featureMenuNodeUpdated(e){if(this._featureMenuNode=e,!e||!this._focusFirstFeature)return;this._focusFirstFeature=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_actionsMenuNodeUpdated(e){if(this._actionsMenuNode=e,!e||!this._focusFirstAction)return;this._focusFirstAction=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_focusFeatureMenuButtonNode(e){this._focusFeatureMenuButton&&(this._focusFeatureMenuButton=!1,e.focus())}_focusActionsMenuButtonNode(e){this._focusActionsMenuButton&&(this._focusActionsMenuButton=!1,e.focus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&(this._featureMenuViewportNode.scrollTop=0)}_toggleScreenLocationEnabled(){const{dockEnabled:e,viewModel:t}=this;if(!t)return;const i=t.active&&!e;t.screenLocationEnabled=i}_shouldDockAtCurrentViewSize(e){const t=e.breakpoint,i=this.viewModel?.view?.ui;if(!i)return!1;const{width:o,height:n}=i;if(isNaN(o)||isNaN(n))return!1;if(!t)return!1;const s=t.hasOwnProperty("width")&&o<=(t.width??0),r=t.hasOwnProperty("height")&&n<=(t.height??0);return s||r}_setDockEnabledForViewSize(e){e.breakpoint&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(e))}_getPageText(e,t){return this.featureNavigationVisible?B(this.messages.pageText,{index:t+1,total:e}):null}_destroySpinner(){this._spinner&&(this.view?.ui?.remove(this._spinner,D),this._spinner.destroy(),this._spinner=null)}_createSpinner(e){e&&(this._spinner=new m({view:e}),e.ui.add(this._spinner,{key:D,position:"manual",internal:!0}))}_toggleCollapsed(){this.collapsed=!this.collapsed}_close(){this.close(),this.view&&this.view.focus()}_toggleDockEnabled(){this.dockEnabled=!this.dockEnabled,this._focusDockButton=!0,this.scheduleRender()}_toggleFeatureMenu(){const e=!this.featureMenuOpen;this._featureMenuOpenChanged(e),this.actionsMenuOpen=!1,this.featureMenuOpen=e}_toggleActionsMenu(){const e=!this.actionsMenuOpen;this._actionsMenuOpenChanged(e),this.featureMenuOpen=!1,this.actionsMenuOpen=e}_triggerAction(e){const t=e.currentTarget.dataset.actionUid,{allActions:i}=this.viewModel,o=i.findIndex((e=>e.uid===t)),n=i.at(o);n&&"toggle"===n.type&&(n.value=!n.value),this.actionsMenuOpen=!1,this.viewModel.triggerAction(o)}_selectFeature(e){const t=j(e.currentTarget);null==t||isNaN(t)||(this.viewModel.selectedFeatureIndex=t),this.featureMenuOpen=!1,this._focusFeatureMenuButton=!0,this.scheduleRender()}_next(){this.next()}_previous(){this.previous()}};function j(e){return e?.["data-feature-index"]}e([d({readOnly:!0})],U.prototype,"actionsMenuId",null),e([d({readOnly:!0})],U.prototype,"actionsMenuButtonId",null),e([d({readOnly:!0})],U.prototype,"featureMenuId",null),e([d({readOnly:!0})],U.prototype,"titleId",null),e([d({readOnly:!0})],U.prototype,"contentId",null),e([d({readOnly:!0})],U.prototype,"hasContent",null),e([d({readOnly:!0})],U.prototype,"featureNavigationVisible",null),e([d({readOnly:!0})],U.prototype,"collapsible",null),e([d({readOnly:!0})],U.prototype,"featureMenuVisible",null),e([d({readOnly:!0})],U.prototype,"contentCollapsed",null),e([d({readOnly:!0})],U.prototype,"dividedActions",null),e([d({readOnly:!0,dependsOn:["_flowItems.length"]})],U.prototype,"_activeFlowItemWidget",null),e([d()],U.prototype,"actions",null),e([d()],U.prototype,"actionsMenuOpen",null),e([d()],U.prototype,"alignment",void 0),e([d()],U.prototype,"autoCloseEnabled",null),e([d()],U.prototype,"autoOpenEnabled",null),e([d()],U.prototype,"defaultPopupTemplateEnabled",null),e([d()],U.prototype,"content",null),e([d()],U.prototype,"collapsed",void 0),e([d()],U.prototype,"collapseEnabled",void 0),e([d({readOnly:!0})],U.prototype,"currentAlignment",null),e([d({readOnly:!0})],U.prototype,"currentDockPosition",null),e([d()],U.prototype,"dockOptions",null),e([d()],U.prototype,"dockEnabled",void 0),e([d({readOnly:!0})],U.prototype,"featureCount",null),e([d()],U.prototype,"featureMenuOpen",null),e([d()],U.prototype,"features",null),e([d()],U.prototype,"goToOverride",null),e([d()],U.prototype,"headingLevel",void 0),e([d()],U.prototype,"highlightEnabled",null),e([d()],U.prototype,"location",null),e([d()],U.prototype,"label",null),e([d()],U.prototype,"maxInlineActions",void 0),e([d(),F("esri/widgets/Popup/t9n/Popup")],U.prototype,"messages",void 0),e([d(),F("esri/t9n/common")],U.prototype,"messagesCommon",void 0),e([d()],U.prototype,"promises",null),e([d({readOnly:!0})],U.prototype,"selectedFeature",null),e([d()],U.prototype,"selectedFeatureIndex",null),e([d({readOnly:!0})],U.prototype,"selectedFeatureWidget",null),e([d()],U.prototype,"spinnerEnabled",void 0),e([d()],U.prototype,"title",null),e([d()],U.prototype,"updateLocationEnabled",null),e([d()],U.prototype,"view",null),e([d({type:M}),C(["triggerAction","trigger-action"])],U.prototype,"viewModel",void 0),e([d()],U.prototype,"visible",null),e([d()],U.prototype,"visibleElements",void 0),e([h("visibleElements")],U.prototype,"castVisibleElements",null),e([A()],U.prototype,"_close",null),e([A()],U.prototype,"_toggleDockEnabled",null),e([A()],U.prototype,"_toggleFeatureMenu",null),e([A()],U.prototype,"_toggleActionsMenu",null),e([A()],U.prototype,"_triggerAction",null),e([A()],U.prototype,"_selectFeature",null),e([A()],U.prototype,"_next",null),e([A()],U.prototype,"_previous",null),U=e([p("esri.widgets.Popup")],U);const W=U;export{W as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import i from"../../core/Accessor.js";import{watch as a,initial as t}from"../../core/reactiveUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import r from"./ScaleRanges.js";import n from"../Slider/SliderViewModel.js";let c=class extends i{constructor(e){super(e),this.layer=null,this.scaleRanges=r.fromScaleRange({minScale:0,maxScale:0}),this.sliderViewModel=(()=>{const{max:e}=this._getSliderIndexRange(this.scaleRanges.length-1);return new n({precision:10,min:0,max:e,values:[0,e]})})()}initialize(){this.addHandles([a((()=>this.layer),(e=>e?.load().catch((()=>{})))),a((()=>({loaded:this.layer?.loaded,ready:this.view?.ready})),(({loaded:e,ready:i})=>{if(!e||!i)return;if(this._hasTiledLayer()){const e=this._getLayerResampling()?void 0:this.mapScaleToSlider(this._getTiledLayerMaxScale()),i=this.mapScaleToSlider(this._getTiledLayerMinScale());this.sliderViewModel.effectiveMax=e,this.sliderViewModel.effectiveMin=i}else{const e=this.layer&&"maxScaleRange"in this.layer?this.layer.maxScaleRange:null,{minScale:i=0,maxScale:a=0}=e??{};this.sliderViewModel.effectiveMax=0===a?void 0:this.mapScaleToSlider(a),this.sliderViewModel.effectiveMin=0===i?void 0:this.mapScaleToSlider(i)}const a=this.layer;a&&"minScale"in a&&"maxScale"in a?(this.minScale=a.minScale,this.maxScale=a.maxScale):(this.minScale=void 0,this.maxScale=void 0)}),t)])}get effectiveMaxScale(){return 0===this.maxScale?this.maxScaleLimit:this.maxScale}get effectiveMinScale(){return 0===this.minScale?this.minScaleLimit:this.minScale}get effectiveMaxScaleLimit(){return this.mapSliderToScale(this.sliderViewModel.effectiveMax??this.sliderViewModel.max)}get effectiveMinScaleLimit(){return this.mapSliderToScale(this.sliderViewModel.effectiveMin??this.sliderViewModel.min)}get maxScale(){const e=this.mapSliderToScale(this.sliderViewModel.values[1]);return this._normalizeScale("max",e)}set maxScale(e){this._setMaxScaleOnSlider(e)}get maxScaleLimit(){return this.mapSliderToScale(this.sliderViewModel.max)}set maxScaleLimit(e){this._setSliderRange({maxScale:e,minScale:this.minScaleLimit})}get minScale(){const e=this.mapSliderToScale(this.sliderViewModel.values[0]);return this._normalizeScale("min",e)}set minScale(e){this._setMinScaleOnSlider(e)}get minScaleLimit(){return this.mapSliderToScale(this.sliderViewModel.min)}set minScaleLimit(e){this._setSliderRange({maxScale:this.maxScaleLimit,minScale:e})}get state(){const{view:e,layer:i}=this;return!e&&!i||!e&&i&&i.loaded||!i&&e&&e.ready||e&&e.ready&&i&&i.loaded?"ready":"disabled"}set view(e){this._set("view",e)}mapScaleToSlider(e){const i=this.scaleRanges.scaleToRangeIndex(e),a=this.scaleRanges.findScaleRangeByIndex(i),{maxScale:t,minScale:l}=a,{max:s,min:r}=this._getSliderIndexRange(i);return this._mapToRange(e,l,t,r,s)}mapSliderToScale(e){const i=this.scaleRanges.findScaleRangeByIndex(e),{maxScale:a,minScale:t}=i,{max:l,min:s}=this._getSliderIndexRange(e);return this._mapToRange(e,s,l,t,a)}_setSliderRange(e){this.scaleRanges=r.fromScaleRange(e);const{max:i}=this._getSliderIndexRange(this.scaleRanges.length-1);this.sliderViewModel.max=i,this.sliderViewModel.min=0,this.notifyChange("maxScaleLimit"),this.notifyChange("minScaleLimit")}_getSliderIndexRange(e){const i=Math.floor(e);return{min:i,max:i+.99999}}_mapToRange(e,i,a,t,l){return t+(e-i)*(l-t)/(a-i)}_setMaxScaleOnSlider(e){const{scaleRanges:i,sliderViewModel:a}=this;if(void 0!==e){const t=this.mapScaleToSlider(this._constrainMaxScaleToLayer(i.clampMaxScale(e)));a.values=[a.values[0],t]}}_setMinScaleOnSlider(e){const{scaleRanges:i,sliderViewModel:a}=this;if(void 0!==e){const t=this.mapScaleToSlider(this._constrainMinScaleToLayer(i.clampMinScale(e)));a.values=[t,a.values[1]]}}_constrainMinScaleToLayer(e){const{scaleRanges:i}=this;if(this._hasTiledLayer()){const{firstRange:a}=i,t=this._getTiledLayerMinScale(),l=.85;e=this._mapToRange(e,a.maxScale,a.minScale,0,1)>l||e>t?t:e}return e}_constrainMaxScaleToLayer(e){if(this._hasTiledLayer()&&!this._getLayerResampling()){const i=this._getTiledLayerMaxScale();e=e<i?i:e}return e}_normalizeScale(e,i){const a="max"===e?"maxScale":"minScale",t=this._hasTiledLayer()?"min"===e?this._getTiledLayerMinScale():this._getTiledLayerMaxScale():this.scaleRanges[a],l=this._hasTiledLayer()?"min"===e?this._getTiledLayerRealMinScale():this._getTiledLayerRealMaxScale():t,s=1e-6,r=0===i||l===i||Math.abs(l-i)<=s;return Number((r?0:i).toFixed(6))}_getLayerLODS(){if(!this.layer?.loaded||!("tileInfo"in this.layer))return null;return"imagery-tile"===this.layer?.type&&"Raster"===this.layer.raster?.tileType?null:this.layer.tileInfo?.lods}_getLayerResampling(){return!!this.layer?.loaded&&(!("resampling"in this.layer)||this.layer.resampling)}_getTiledLayerMinScale(){const e=this._getLayerLODS();return this.scaleRanges.clampMinScale(e[0].scale)}_getTiledLayerMaxScale(){return this._getLayerLODS().at(-1).scale}_getTiledLayerRealMinScale(){const e=this._getLayerLODS(),i=this.layer,a=i&&"sourceJSON"in i?i.sourceJSON?.tileInfo?.lods??e:e;return this.scaleRanges.clampMinScale(a[0].scale)}_getTiledLayerRealMaxScale(){const e=this._getLayerLODS(),i=this.layer;return(i&&"sourceJSON"in i?i.sourceJSON?.tileInfo?.lods??e:e).at(-1).scale}_hasTiledLayer(){return!!this._getLayerLODS()}};e([l({readOnly:!0})],c.prototype,"effectiveMaxScale",null),e([l({readOnly:!0})],c.prototype,"effectiveMinScale",null),e([l()],c.prototype,"effectiveMaxScaleLimit",null),e([l()],c.prototype,"effectiveMinScaleLimit",null),e([l()],c.prototype,"layer",void 0),e([l()],c.prototype,"maxScale",null),e([l()],c.prototype,"maxScaleLimit",null),e([l()],c.prototype,"minScale",null),e([l()],c.prototype,"minScaleLimit",null),e([l()],c.prototype,"scaleRanges",void 0),e([l()],c.prototype,"sliderViewModel",void 0),e([l({readOnly:!0})],c.prototype,"state",null),e([l()],c.prototype,"view",null),c=e([s("esri.widgets.ScaleRangeSlider.ScaleRangeSliderViewModel")],c);const o=c;export{o as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import i from"../../core/Accessor.js";import{watch as a,initial as t}from"../../core/reactiveUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import r from"./ScaleRanges.js";import n from"../Slider/SliderViewModel.js";let c=class extends i{constructor(e){super(e),this.layer=null,this.scaleRanges=r.fromScaleRange({minScale:0,maxScale:0}),this.sliderViewModel=(()=>{const{max:e}=this._getSliderIndexRange(this.scaleRanges.length-1);return new n({precision:10,min:0,max:e,values:[0,e]})})()}initialize(){this.addHandles([a((()=>this.layer),(e=>e?.load().catch((()=>{})))),a((()=>({loaded:this.layer?.loaded,ready:this.view?.ready})),(({loaded:e,ready:i})=>{if(!e||!i)return;if(this._hasTiledLayer()){const e=this._getLayerResampling()?void 0:this.mapScaleToSlider(this._getTiledLayerMaxScale()),i=this.mapScaleToSlider(this._getTiledLayerMinScale());this.sliderViewModel.effectiveMax=e,this.sliderViewModel.effectiveMin=i}else{const e=this.layer&&"maxScaleRange"in this.layer?this.layer.maxScaleRange:null,{minScale:i=0,maxScale:a=0}=e??{};this.sliderViewModel.effectiveMax=0===a?void 0:this.mapScaleToSlider(a),this.sliderViewModel.effectiveMin=0===i?void 0:this.mapScaleToSlider(i)}const a=this.layer;a&&"minScale"in a&&"maxScale"in a?(this.minScale=a.minScale,this.maxScale=a.maxScale):(this.minScale=void 0,this.maxScale=void 0)}),t)])}get effectiveMaxScale(){return 0===this.maxScale?this.maxScaleLimit:this.maxScale}get effectiveMinScale(){return 0===this.minScale?this.minScaleLimit:this.minScale}get effectiveMaxScaleLimit(){return this.mapSliderToScale(this.sliderViewModel.effectiveMax??this.sliderViewModel.max)}get effectiveMinScaleLimit(){return this.mapSliderToScale(this.sliderViewModel.effectiveMin??this.sliderViewModel.min)}get maxScale(){const e=this.mapSliderToScale(this.sliderViewModel.values[1]);return this._normalizeScale("max",e)}set maxScale(e){this._setMaxScaleOnSlider(e)}get maxScaleLimit(){return this.mapSliderToScale(this.sliderViewModel.max)}set maxScaleLimit(e){this._setSliderRange({maxScale:e,minScale:this.minScaleLimit})}get minScale(){const e=this.mapSliderToScale(this.sliderViewModel.values[0]);return this._normalizeScale("min",e)}set minScale(e){this._setMinScaleOnSlider(e)}get minScaleLimit(){return this.mapSliderToScale(this.sliderViewModel.min)}set minScaleLimit(e){this._setSliderRange({maxScale:this.maxScaleLimit,minScale:e})}get state(){const{view:e,layer:i}=this;return!e&&!i||!e&&i&&i.loaded||!i&&e&&e.ready||e&&e.ready&&i&&i.loaded?"ready":"disabled"}set view(e){this._set("view",e)}mapScaleToSlider(e){const i=this.scaleRanges.scaleToRangeIndex(e),a=this.scaleRanges.findScaleRangeByIndex(i),{maxScale:t,minScale:l}=a,{max:s,min:r}=this._getSliderIndexRange(i);return this._mapToRange(e,l,t,r,s)}mapSliderToScale(e){const i=this.scaleRanges.findScaleRangeByIndex(e),{maxScale:a,minScale:t}=i,{max:l,min:s}=this._getSliderIndexRange(e);return this._mapToRange(e,s,l,t,a)}_setSliderRange(e){this.scaleRanges=r.fromScaleRange(e);const{max:i}=this._getSliderIndexRange(this.scaleRanges.length-1);this.sliderViewModel.max=i,this.sliderViewModel.min=0,this.notifyChange("maxScaleLimit"),this.notifyChange("minScaleLimit")}_getSliderIndexRange(e){const i=Math.floor(e);return{min:i,max:i+.99999}}_mapToRange(e,i,a,t,l){return t+(e-i)*(l-t)/(a-i)}_setMaxScaleOnSlider(e){const{scaleRanges:i,sliderViewModel:a}=this;if(void 0!==e){const t=this.mapScaleToSlider(this._constrainMaxScaleToLayer(i.clampMaxScale(e)));a.values=[a.values[0],t]}}_setMinScaleOnSlider(e){const{scaleRanges:i,sliderViewModel:a}=this;if(void 0!==e){const t=this.mapScaleToSlider(this._constrainMinScaleToLayer(i.clampMinScale(e)));a.values=[t,a.values[1]]}}_constrainMinScaleToLayer(e){const{scaleRanges:i}=this;if(this._hasTiledLayer()){const{firstRange:a}=i,t=this._getTiledLayerMinScale(),l=.85;e=this._mapToRange(e,a.maxScale,a.minScale,0,1)>l||e>t?t:e}return e}_constrainMaxScaleToLayer(e){if(this._hasTiledLayer()&&!this._getLayerResampling()){const i=this._getTiledLayerMaxScale();e=e<i?i:e}return e}_normalizeScale(e,i){const a="max"===e?"maxScale":"minScale",t=this._hasTiledLayer()?"min"===e?this._getTiledLayerMinScale():this._getTiledLayerMaxScale():this.scaleRanges[a],l=this._hasTiledLayer()?"min"===e?this._getTiledLayerRealMinScale():this._getTiledLayerRealMaxScale():t,s=1e-6,r=0===i||l===i||Math.abs(l-i)<=s;return Number((r?0:i).toFixed(6))}_getLayerLODS(){if(!this.layer?.loaded||!("tileInfo"in this.layer))return null;return"imagery-tile"===this.layer?.type&&"Raster"===this.layer.raster?.tileType?null:this.layer.tileInfo?.lods}_getLayerResampling(){return!!this.layer?.loaded&&(!("resampling"in this.layer)||this.layer.resampling)}_getTiledLayerMinScale(){const e=this._getLayerLODS();return this.scaleRanges.clampMinScale(e[0].scale)}_getTiledLayerMaxScale(){const e=this._getLayerLODS();return e[e.length-1].scale}_getTiledLayerRealMinScale(){const e=this._getLayerLODS(),i=this.layer,a=i&&"sourceJSON"in i?i.sourceJSON?.tileInfo?.lods??e:e;return this.scaleRanges.clampMinScale(a[0].scale)}_getTiledLayerRealMaxScale(){const e=this._getLayerLODS(),i=this.layer,a=i&&"sourceJSON"in i?i.sourceJSON?.tileInfo?.lods??e:e;return a[a.length-1].scale}_hasTiledLayer(){return!!this._getLayerLODS()}};e([l({readOnly:!0})],c.prototype,"effectiveMaxScale",null),e([l({readOnly:!0})],c.prototype,"effectiveMinScale",null),e([l()],c.prototype,"effectiveMaxScaleLimit",null),e([l()],c.prototype,"effectiveMinScaleLimit",null),e([l()],c.prototype,"layer",void 0),e([l()],c.prototype,"maxScale",null),e([l()],c.prototype,"maxScaleLimit",null),e([l()],c.prototype,"minScale",null),e([l()],c.prototype,"minScaleLimit",null),e([l()],c.prototype,"scaleRanges",void 0),e([l()],c.prototype,"sliderViewModel",void 0),e([l({readOnly:!0})],c.prototype,"state",null),e([l()],c.prototype,"view",null),c=e([s("esri.widgets.ScaleRangeSlider.ScaleRangeSliderViewModel")],c);const o=c;export{o as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import n from"../../core/Accessor.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";var i;const c=147914382,r=[{id:"room",minScale:100},{id:"rooms",minScale:400},{id:"smallBuilding",minScale:800},{id:"building",minScale:1999},{id:"buildings",minScale:3999},{id:"street",minScale:7499},{id:"streets",minScale:14999},{id:"neighborhood",minScale:29999},{id:"town",minScale:59999},{id:"city",minScale:119999},{id:"cities",minScale:249999},{id:"metropolitanArea",minScale:499999},{id:"county",minScale:999999},{id:"counties",minScale:1999999},{id:"stateProvince",minScale:3999999},{id:"statesProvinces",minScale:6999999},{id:"countriesSmall",minScale:14999999},{id:"countriesBig",minScale:34999999},{id:"continent",minScale:99999999},{id:"world",minScale:c}];function l(e,n){const t=r,a=t.length,i=[];let c,l=e;e=e>=0?e:0,n=n>0?n:t[a-1].minScale;for(let r=0;r<a;r++){const a=Math.min(t[r].minScale,n);c=Math.min(a,n),e<=a&&l<n&&i.push({id:t[r].id,maxScale:Math.max(l,e),minScale:c}),l=c+1}return i.reverse(),s(i)}function s(e){if(0===e.length)return e;const[n]=e,t=e.at(-1);return n.minScale===n.maxScale&&(e.shift(),n.minScale+=1),t.minScale===t.maxScale&&(e.pop(),t.maxScale-=1),e}let o=i=class extends n{constructor(){super(...arguments),this.ranges=[]}static fromScaleRange({maxScale:e,minScale:n}){return new i({ranges:l(e,n)})}static async fromLayer(e){await e.when();const n="tileInfo"in e?e.tileInfo?.lods:void 0;let t;if(n){t=l(n.at(-1).scale,n[0].scale)}else t=l(0,0);return new i({ranges:t})}get firstRange(){return this.ranges[0]}get lastRange(){return this.ranges.at(-1)}get length(){return this.ranges.length}get maxScale(){return this.lastRange.maxScale}get minScale(){return this.firstRange.minScale}isMinScaleEdge(e){const{firstRange:n}=this,t=n.minScale,a=i.RecommendedScales[n.id]||n.maxScale;return e<=t&&e>=a}isMaxScaleEdge(e){const{lastRange:n}=this,t=n.maxScale;return e<=(i.RecommendedScales[n.id]||n.minScale)&&e>=t}findScaleRange(e){const n=this.ranges;let t;if(e>=n[0].maxScale)return n[0];const a=n.at(-1);if(e<=a.minScale)return a;for(let i=0;i<n.length;i++){const a=n[i];if(e>=a.maxScale&&e<=a.minScale){t=a;break}}return t}findScaleRangeByIndex(e){return this.ranges[this._clampScaleRangeIndex(e)]}scaleToRangeIndex(e){return this.ranges.indexOf(this.findScaleRange(e))}clampScale(e){return Math.min(this.minScale,Math.max(this.maxScale,e))}clampMinScale(e){return 0===e?this.minScale:this.clampScale(e)}clampMaxScale(e){return this.clampScale(e)}contains(e){const n=this.ranges;let t=!1;for(let a=0;a<n.length;a++){const{maxScale:i,minScale:c}=n[a];if(e>=i&&e<=c){t=!0;break}}return t}_clampScaleRangeIndex(e){const n=0;if(e<=n)return n;const t=this.ranges.length-1;return e>t?t:Math.floor(e)}};o.RecommendedScales=Object.freeze({world:c,continent:5e7,countriesBig:25e6,countriesSmall:12e6,statesProvinces:6e6,stateProvince:3e6,counties:15e5,county:75e4,metropolitanArea:32e4,cities:16e4,city:8e4,town:4e4,neighborhood:2e4,streets:1e4,street:5e3,buildings:2500,building:1250,smallBuilding:800,rooms:400,room:100}),e([t()],o.prototype,"firstRange",null),e([t()],o.prototype,"lastRange",null),e([t()],o.prototype,"length",null),e([t()],o.prototype,"maxScale",null),e([t()],o.prototype,"minScale",null),e([t({constructOnly:!0})],o.prototype,"ranges",void 0),o=i=e([a("esri.widgets.ScaleRangeSlider.ScaleRanges")],o);const m=o;export{m as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import n from"../../core/Accessor.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";var i;const c=147914382,r=[{id:"room",minScale:100},{id:"rooms",minScale:400},{id:"smallBuilding",minScale:800},{id:"building",minScale:1999},{id:"buildings",minScale:3999},{id:"street",minScale:7499},{id:"streets",minScale:14999},{id:"neighborhood",minScale:29999},{id:"town",minScale:59999},{id:"city",minScale:119999},{id:"cities",minScale:249999},{id:"metropolitanArea",minScale:499999},{id:"county",minScale:999999},{id:"counties",minScale:1999999},{id:"stateProvince",minScale:3999999},{id:"statesProvinces",minScale:6999999},{id:"countriesSmall",minScale:14999999},{id:"countriesBig",minScale:34999999},{id:"continent",minScale:99999999},{id:"world",minScale:c}];function l(e,n){const t=r,a=t.length,i=[];let c,l=e;e=e>=0?e:0,n=n>0?n:t[a-1].minScale;for(let r=0;r<a;r++){const a=Math.min(t[r].minScale,n);c=Math.min(a,n),e<=a&&l<n&&i.push({id:t[r].id,maxScale:Math.max(l,e),minScale:c}),l=c+1}return i.reverse(),s(i)}function s(e){if(0===e.length)return e;const[n]=e,t=e[e.length-1];return n.minScale===n.maxScale&&(e.shift(),n.minScale+=1),t.minScale===t.maxScale&&(e.pop(),t.maxScale-=1),e}let o=i=class extends n{constructor(){super(...arguments),this.ranges=[]}static fromScaleRange({maxScale:e,minScale:n}){return new i({ranges:l(e,n)})}static async fromLayer(e){await e.when();const n="tileInfo"in e?e.tileInfo?.lods:void 0;let t;if(n){t=l(n[n.length-1].scale,n[0].scale)}else t=l(0,0);return new i({ranges:t})}get firstRange(){return this.ranges[0]}get lastRange(){const e=this.ranges;return e[e.length-1]}get length(){return this.ranges.length}get maxScale(){return this.lastRange.maxScale}get minScale(){return this.firstRange.minScale}isMinScaleEdge(e){const{firstRange:n}=this,t=n.minScale,a=i.RecommendedScales[n.id]||n.maxScale;return e<=t&&e>=a}isMaxScaleEdge(e){const{lastRange:n}=this,t=n.maxScale;return e<=(i.RecommendedScales[n.id]||n.minScale)&&e>=t}findScaleRange(e){const n=this.ranges;let t;if(e>=n[0].maxScale)return n[0];if(e<=n[n.length-1].minScale)return n[n.length-1];for(let a=0;a<n.length;a++){const i=n[a];if(e>=i.maxScale&&e<=i.minScale){t=i;break}}return t}findScaleRangeByIndex(e){return this.ranges[this._clampScaleRangeIndex(e)]}scaleToRangeIndex(e){return this.ranges.indexOf(this.findScaleRange(e))}clampScale(e){return Math.min(this.minScale,Math.max(this.maxScale,e))}clampMinScale(e){return 0===e?this.minScale:this.clampScale(e)}clampMaxScale(e){return this.clampScale(e)}contains(e){const n=this.ranges;let t=!1;for(let a=0;a<n.length;a++){const{maxScale:i,minScale:c}=n[a];if(e>=i&&e<=c){t=!0;break}}return t}_clampScaleRangeIndex(e){const n=0;if(e<=n)return n;const t=this.ranges.length-1;return e>t?t:Math.floor(e)}};o.RecommendedScales=Object.freeze({world:c,continent:5e7,countriesBig:25e6,countriesSmall:12e6,statesProvinces:6e6,stateProvince:3e6,counties:15e5,county:75e4,metropolitanArea:32e4,cities:16e4,city:8e4,town:4e4,neighborhood:2e4,streets:1e4,street:5e3,buildings:2500,building:1250,smallBuilding:800,rooms:400,room:100}),e([t()],o.prototype,"firstRange",null),e([t()],o.prototype,"lastRange",null),e([t()],o.prototype,"length",null),e([t()],o.prototype,"maxScale",null),e([t()],o.prototype,"minScale",null),e([t({constructOnly:!0})],o.prototype,"ranges",void 0),o=i=e([a("esri.widgets.ScaleRangeSlider.ScaleRanges")],o);const m=o;export{m as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{debounce as t}from"../../core/promiseUtils.js";import{watch as s,initial as i}from"../../core/reactiveUtils.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as l}from"../../core/accessorSupport/decorators/subclass.js";import r from"../Slider.js";import{loadCalciteComponents as n}from"../support/componentsUtils.js";import"../support/widgetUtils.js";import{tsx as a}from"../support/jsxFactory.js";import u from"./ValuePickerBaseComponent.js";import p from"./ValuePickerSliderVisibleElements.js";const c="esri-value-picker__slider",d={minorTick:`${c}__tick-minor`,majorTick:`${c}__tick-major`,stepsTick:`${c}__tick-steps`,tooltip:`${c}__tooltip`};function h(e){return(t,s)=>{s?.classList.add(e)}}let m=class extends u{constructor(e,s){super(e,s),this._majorTickCreatedFunction=h(d.majorTick),this._minorTickCreatedFunction=h(d.minorTick),this._stepsTickCreatedFunction=h(d.stepsTick),this._thumbNode=null,this._tooltip=null,this._slider=new r({thumbCreatedFunction:(e,t,s)=>{this._thumbNode=s}}),this.labelFormatFunction=null,this.labels=null,this.min=null,this.minorTicks=null,this.majorTicks=null,this.max=null,this.reversed=!1,this.steps=null,this.type="slider",this.visibleElements=new p,this._thumbDragDebounced=t((async e=>{await(this._tooltip?.reposition(!1))}))}initialize(){this.addHandles([s((()=>this.viewModel?.values),(e=>{this._slider.values=e}),i),s((()=>this._slider.values),(e=>{this.viewModel&&this.viewModel.values!==e&&(this.viewModel.values=e)})),this._slider.on("thumb-drag",this._thumbDragDebounced)])}destroy(){this._slider.destroy()}loadDependencies(){return n({tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js")})}get _ascending(){const{reversed:e,viewModel:t}=this;if(!t)return null;const{layout:s}=t;return"horizontal"===s&&!e||"vertical"===s&&e}get canNext(){const{_ascending:e,min:t,max:s,steps:i,viewModel:o}=this;if(null==e||null==t||null==s||!i?.length||!o)return!1;const{values:l}=o,r=l?.[0];return null==r||(e?r!==i.at(-1):r!==i[0])}get canPlay(){return null!=this.viewModel&&!!this.steps?.length&&null!=this.min&&null!=this.max}get canPrevious(){const{_ascending:e,min:t,max:s,steps:i,viewModel:o}=this;if(null==e||null==t||null==s||!i?.length||!o)return!1;const{values:l}=o,r=l?.[0];return null==r||(e?r!==i[0]:r!==i.at(-1))}render(){const{labels:e,labelFormatFunction:t,min:s,max:i,steps:o,minorTicks:l,majorTicks:r,reversed:n,viewModel:u}=this;if(!u)return a("div",null);const{disabled:p,layout:d}=u,h=`${d}${n?"-reversed":""}`,m="position",v=[];return null!=s&&null!=i&&(l&&v.push({mode:m,values:l,tickCreatedFunction:this._minorTickCreatedFunction}),r&&v.push({mode:m,values:r,tickCreatedFunction:this._majorTickCreatedFunction}),e&&v.push({mode:m,values:e,labelsVisible:!0}),this.visibleElements.steps&&this.steps&&v.push({mode:m,values:this.steps,tickCreatedFunction:this._stepsTickCreatedFunction})),this._slider.set({disabled:p,labelFormatFunction:t,layout:h,min:s,max:i,steps:o,tickConfigs:v}),a("div",{class:c},this._slider.render(),this._renderToolTip())}animate(e){this._step(1,e)}next(){this._step(this._ascending?1:-1)}previous(){this._step(this._ascending?-1:1)}_onTooltipAfterCreate(e){this._tooltip=e}_renderToolTip(){if(!this.visibleElements.thumbTooltip||!this._thumbNode||!this._slider.values)return null;const e=this._slider.viewModel.getLabelForValue(this._slider.values[0],"value");return e?a("calcite-tooltip",{afterCreate:this._onTooltipAfterCreate,class:d.tooltip,label:e,referenceElement:this._thumbNode},e):null}_step(e,t=!1){if(!this.viewModel||!this.steps?.length)return;if(!this.viewModel.values||!this.steps.includes(this.viewModel.values[0]))return void(this.viewModel.values=[this.steps[0]]);const s=this.steps.indexOf(this.viewModel.values[0])+e;s<0||s>=this.steps.length?this.viewModel.loop||t?this.viewModel.values=[this.steps[1===e?0:this.steps.length-1]]:"playing"===this.viewModel.state&&this.viewModel.pause():this.viewModel.values=[this.steps[s]]}};e([o()],m.prototype,"_ascending",null),e([o()],m.prototype,"canNext",null),e([o()],m.prototype,"canPlay",null),e([o()],m.prototype,"canPrevious",null),e([o()],m.prototype,"labelFormatFunction",void 0),e([o()],m.prototype,"labels",void 0),e([o()],m.prototype,"min",void 0),e([o()],m.prototype,"minorTicks",void 0),e([o()],m.prototype,"majorTicks",void 0),e([o()],m.prototype,"max",void 0),e([o({nonNullable:!0})],m.prototype,"reversed",void 0),e([o()],m.prototype,"steps",void 0),e([o()],m.prototype,"type",void 0),e([o({type:p,nonNullable:!0})],m.prototype,"visibleElements",void 0),m=e([l("esri.widgets.ValuePicker.ValuePickerSlider")],m);const v=m;export{v as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{debounce as t}from"../../core/promiseUtils.js";import{watch as s,initial as i}from"../../core/reactiveUtils.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as l}from"../../core/accessorSupport/decorators/subclass.js";import r from"../Slider.js";import{loadCalciteComponents as n}from"../support/componentsUtils.js";import"../support/widgetUtils.js";import{tsx as a}from"../support/jsxFactory.js";import u from"./ValuePickerBaseComponent.js";import p from"./ValuePickerSliderVisibleElements.js";const c="esri-value-picker__slider",d={minorTick:`${c}__tick-minor`,majorTick:`${c}__tick-major`,stepsTick:`${c}__tick-steps`,tooltip:`${c}__tooltip`};function h(e){return(t,s)=>{s?.classList.add(e)}}let m=class extends u{constructor(e,s){super(e,s),this._majorTickCreatedFunction=h(d.majorTick),this._minorTickCreatedFunction=h(d.minorTick),this._stepsTickCreatedFunction=h(d.stepsTick),this._thumbNode=null,this._tooltip=null,this._slider=new r({thumbCreatedFunction:(e,t,s)=>{this._thumbNode=s}}),this.labelFormatFunction=null,this.labels=null,this.min=null,this.minorTicks=null,this.majorTicks=null,this.max=null,this.reversed=!1,this.steps=null,this.type="slider",this.visibleElements=new p,this._thumbDragDebounced=t((async e=>{await(this._tooltip?.reposition(!1))}))}initialize(){this.addHandles([s((()=>this.viewModel?.values),(e=>{this._slider.values=e}),i),s((()=>this._slider.values),(e=>{this.viewModel&&this.viewModel.values!==e&&(this.viewModel.values=e)})),this._slider.on("thumb-drag",this._thumbDragDebounced)])}destroy(){this._slider.destroy()}loadDependencies(){return n({tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js")})}get _ascending(){const{reversed:e,viewModel:t}=this;if(!t)return null;const{layout:s}=t;return"horizontal"===s&&!e||"vertical"===s&&e}get canNext(){const{_ascending:e,min:t,max:s,steps:i,viewModel:o}=this;if(null==e||null==t||null==s||!i?.length||!o)return!1;const{values:l}=o,r=l?.[0];return null==r||(e?r!==i[i.length-1]:r!==i[0])}get canPlay(){return null!=this.viewModel&&!!this.steps?.length&&null!=this.min&&null!=this.max}get canPrevious(){const{_ascending:e,min:t,max:s,steps:i,viewModel:o}=this;if(null==e||null==t||null==s||!i?.length||!o)return!1;const{values:l}=o,r=l?.[0];return null==r||(e?r!==i[0]:r!==i[i.length-1])}render(){const{labels:e,labelFormatFunction:t,min:s,max:i,steps:o,minorTicks:l,majorTicks:r,reversed:n,viewModel:u}=this;if(!u)return a("div",null);const{disabled:p,layout:d}=u,h=`${d}${n?"-reversed":""}`,m="position",v=[];return null!=s&&null!=i&&(l&&v.push({mode:m,values:l,tickCreatedFunction:this._minorTickCreatedFunction}),r&&v.push({mode:m,values:r,tickCreatedFunction:this._majorTickCreatedFunction}),e&&v.push({mode:m,values:e,labelsVisible:!0}),this.visibleElements.steps&&this.steps&&v.push({mode:m,values:this.steps,tickCreatedFunction:this._stepsTickCreatedFunction})),this._slider.set({disabled:p,labelFormatFunction:t,layout:h,min:s,max:i,steps:o,tickConfigs:v}),a("div",{class:c},this._slider.render(),this._renderToolTip())}animate(e){this._step(1,e)}next(){this._step(this._ascending?1:-1)}previous(){this._step(this._ascending?-1:1)}_onTooltipAfterCreate(e){this._tooltip=e}_renderToolTip(){if(!this.visibleElements.thumbTooltip||!this._thumbNode||!this._slider.values)return null;const e=this._slider.viewModel.getLabelForValue(this._slider.values[0],"value");return e?a("calcite-tooltip",{afterCreate:this._onTooltipAfterCreate,class:d.tooltip,label:e,referenceElement:this._thumbNode},e):null}_step(e,t=!1){if(!this.viewModel||!this.steps?.length)return;if(!this.viewModel.values||!this.steps.includes(this.viewModel.values[0]))return void(this.viewModel.values=[this.steps[0]]);const s=this.steps.indexOf(this.viewModel.values[0])+e;s<0||s>=this.steps.length?this.viewModel.loop||t?this.viewModel.values=[this.steps[1===e?0:this.steps.length-1]]:"playing"===this.viewModel.state&&this.viewModel.pause():this.viewModel.values=[this.steps[s]]}};e([o()],m.prototype,"_ascending",null),e([o()],m.prototype,"canNext",null),e([o()],m.prototype,"canPlay",null),e([o()],m.prototype,"canPrevious",null),e([o()],m.prototype,"labelFormatFunction",void 0),e([o()],m.prototype,"labels",void 0),e([o()],m.prototype,"min",void 0),e([o()],m.prototype,"minorTicks",void 0),e([o()],m.prototype,"majorTicks",void 0),e([o()],m.prototype,"max",void 0),e([o({nonNullable:!0})],m.prototype,"reversed",void 0),e([o()],m.prototype,"steps",void 0),e([o()],m.prototype,"type",void 0),e([o({type:p,nonNullable:!0})],m.prototype,"visibleElements",void 0),m=e([l("esri.widgets.ValuePicker.ValuePickerSlider")],m);const v=m;export{v as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../Color.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{cast as t}from"../../core/accessorSupport/decorators/cast.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import a from"../../renderers/support/ClassBreakInfo.js";import{SmartMappingSliderBase as o}from"./SmartMappingSliderBase.js";import l from"./ClassedSizeSlider/ClassedSizeSliderViewModel.js";import{getFillFromColor as n}from"./support/utils.js";import{storeNode as m}from"../support/widgetUtils.js";import{messageBundle as d}from"../support/decorators/messageBundle.js";import{tsx as p}from"../support/jsxFactory.js";var c;const h="esri-classed-size-slider",u={base:h,rampElement:`${h}__ramp`,sliderContainer:`${h}__slider-container`,histogramContainer:`${h}__histogram-container`,track:`${h}--interactive-track`,esriWidget:"esri-widget",esriWidgetPanel:"esri-widget--panel",widgetIcon:"esri-icon-edit",disabled:"esri-disabled"},b={trackFillColor:new r([149,149,149]),trackBackgroundColor:new r([224,224,224])};let g=c=class extends o{constructor(e,r){super(e,r),this._rampNode=null,this.messages=null,this.style={...b},this.viewModel=new l}get breaks(){return this.viewModel.breaks}set breaks(e){this.viewModel.breaks=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}castStyle(e){return{...b,...e}}static fromRendererResult(e,r){const{renderer:{classBreakInfos:s}}=e,t=s.map((e=>{const r=e.symbol;let s;switch(r.type){case"simple-line":s=r.width;break;case"simple-marker":s=r.size;break;case"picture-marker":s=r.height}return{min:e.minValue,max:e.maxValue,size:s}}));return new c({breaks:t,histogramConfig:{bins:r?r.bins:[]}})}updateClassBreakInfos(e){const r=this.breaks;if(r.length===e.length)return e.map(((e,s)=>{const t=e.symbol;switch(t.type){case"simple-line":t.width=r[s].size;break;case"simple-marker":t.size=r[s].size;break;case"picture-marker":{const e=r[s].size,i=t.width,a=t.height;t.height=e,t.width=e/a*i;break}}return new a({minValue:r[s].min,maxValue:r[s].max,symbol:t})}));console.error(`Number of input breakInfos must match number of slider breaks: ${r.length}`)}updateFromRendererResult(e,r){const{renderer:{classBreakInfos:s}}=e,t=s.map((e=>{const r=e.symbol;let s;switch(r.type){case"simple-line":s=r.width;break;case"simple-marker":s=r.size;break;case"picture-marker":s=r.height}return{min:e.minValue,max:e.maxValue,size:s}}));this.set({breaks:t}),r?.bins&&(this.histogramConfig.bins=r.bins)}render(){const{state:e,label:r,visibleElements:s}=this,t="disabled"===e,i=this.classes(u.base,u.esriWidget,u.esriWidgetPanel,{[u.disabled]:t,[u.track]:!!s.interactiveTrack});return p("div",{"aria-label":r,class:i},t?null:this.renderContent(this.renderRamp(),u.sliderContainer,u.histogramContainer))}renderRamp(){const{style:{trackBackgroundColor:e}}=this;return p("div",{afterCreate:m,bind:this,class:u.rampElement,"data-node-ref":"_rampNode"},p("svg",{xmlns:"http://www.w3.org/2000/svg"},p("rect",{x:"0",y:"0",fill:n(e),height:"100%",width:"100%"}),this.renderPath()))}renderPath(){if(!this._rampNode)return;const{offsetHeight:e=0,offsetWidth:r=0}=this._rampNode;if(null==e||null==r)return;const{breaks:s,viewModel:{max:t,min:i},style:{trackFillColor:a}}=this,o=t-i,l=r/s.length,m=s.map((r=>e-Math.round((r.min-i)/o*e)+1)).reverse(),d=s[0].size>s.at(-1).size||!1;let c=d?l:r,h=`M${c} 0 `;return m.forEach(((e,s)=>{const t=l*(s+1);h+=`L${c} ${e} `,c=d?l+t:r-t,h+=`L${c} ${e} `})),h+=`L0 ${e} L0 ${e} L0 0 Z`,p("path",{d:h,fill:n(a)})}};e([s()],g.prototype,"breaks",null),e([s()],g.prototype,"label",null),e([s(),d("esri/widgets/smartMapping/ClassedSizeSlider/t9n/ClassedSizeSlider")],g.prototype,"messages",void 0),e([s()],g.prototype,"style",void 0),e([t("style")],g.prototype,"castStyle",null),e([s()],g.prototype,"viewModel",void 0),g=c=e([i("esri.widgets.smartMapping.ClassedSizeSlider")],g);const k=g;export{k as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../Color.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{cast as t}from"../../core/accessorSupport/decorators/cast.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import a from"../../renderers/support/ClassBreakInfo.js";import{SmartMappingSliderBase as o}from"./SmartMappingSliderBase.js";import l from"./ClassedSizeSlider/ClassedSizeSliderViewModel.js";import{getFillFromColor as n}from"./support/utils.js";import{storeNode as m}from"../support/widgetUtils.js";import{messageBundle as d}from"../support/decorators/messageBundle.js";import{tsx as p}from"../support/jsxFactory.js";var c;const h="esri-classed-size-slider",u={base:h,rampElement:`${h}__ramp`,sliderContainer:`${h}__slider-container`,histogramContainer:`${h}__histogram-container`,track:`${h}--interactive-track`,esriWidget:"esri-widget",esriWidgetPanel:"esri-widget--panel",widgetIcon:"esri-icon-edit",disabled:"esri-disabled"},b={trackFillColor:new r([149,149,149]),trackBackgroundColor:new r([224,224,224])};let g=c=class extends o{constructor(e,r){super(e,r),this._rampNode=null,this.messages=null,this.style={...b},this.viewModel=new l}get breaks(){return this.viewModel.breaks}set breaks(e){this.viewModel.breaks=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}castStyle(e){return{...b,...e}}static fromRendererResult(e,r){const{renderer:{classBreakInfos:s}}=e,t=s.map((e=>{const r=e.symbol;let s;switch(r.type){case"simple-line":s=r.width;break;case"simple-marker":s=r.size;break;case"picture-marker":s=r.height}return{min:e.minValue,max:e.maxValue,size:s}}));return new c({breaks:t,histogramConfig:{bins:r?r.bins:[]}})}updateClassBreakInfos(e){const r=this.breaks;if(r.length===e.length)return e.map(((e,s)=>{const t=e.symbol;switch(t.type){case"simple-line":t.width=r[s].size;break;case"simple-marker":t.size=r[s].size;break;case"picture-marker":{const e=r[s].size,i=t.width,a=t.height;t.height=e,t.width=e/a*i;break}}return new a({minValue:r[s].min,maxValue:r[s].max,symbol:t})}));console.error(`Number of input breakInfos must match number of slider breaks: ${r.length}`)}updateFromRendererResult(e,r){const{renderer:{classBreakInfos:s}}=e,t=s.map((e=>{const r=e.symbol;let s;switch(r.type){case"simple-line":s=r.width;break;case"simple-marker":s=r.size;break;case"picture-marker":s=r.height}return{min:e.minValue,max:e.maxValue,size:s}}));this.set({breaks:t}),r?.bins&&(this.histogramConfig.bins=r.bins)}render(){const{state:e,label:r,visibleElements:s}=this,t="disabled"===e,i=this.classes(u.base,u.esriWidget,u.esriWidgetPanel,{[u.disabled]:t,[u.track]:!!s.interactiveTrack});return p("div",{"aria-label":r,class:i},t?null:this.renderContent(this.renderRamp(),u.sliderContainer,u.histogramContainer))}renderRamp(){const{style:{trackBackgroundColor:e}}=this;return p("div",{afterCreate:m,bind:this,class:u.rampElement,"data-node-ref":"_rampNode"},p("svg",{xmlns:"http://www.w3.org/2000/svg"},p("rect",{x:"0",y:"0",fill:n(e),height:"100%",width:"100%"}),this.renderPath()))}renderPath(){if(!this._rampNode)return;const{offsetHeight:e=0,offsetWidth:r=0}=this._rampNode;if(null==e||null==r)return;const{breaks:s,viewModel:{max:t,min:i},style:{trackFillColor:a}}=this,o=t-i,l=r/s.length,m=s.map((r=>e-Math.round((r.min-i)/o*e)+1)).reverse(),d=s[0].size>s[s.length-1].size||!1;let c=d?l:r,h=`M${c} 0 `;return m.forEach(((e,s)=>{const t=l*(s+1);h+=`L${c} ${e} `,c=d?l+t:r-t,h+=`L${c} ${e} `})),h+=`L0 ${e} L0 ${e} L0 0 Z`,p("path",{d:h,fill:n(a)})}};e([s()],g.prototype,"breaks",null),e([s()],g.prototype,"label",null),e([s(),d("esri/widgets/smartMapping/ClassedSizeSlider/t9n/ClassedSizeSlider")],g.prototype,"messages",void 0),e([s()],g.prototype,"style",void 0),e([t("style")],g.prototype,"castStyle",null),e([s()],g.prototype,"viewModel",void 0),g=c=e([i("esri.widgets.smartMapping.ClassedSizeSlider")],g);const k=g;export{k as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Error.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import t from"../../renderers/visualVariables/support/ColorSizeStop.js";import a from"../../renderers/visualVariables/support/ColorStop.js";import l from"../../renderers/visualVariables/support/SizeStop.js";import{SmartMappingSliderBase as o}from"./SmartMappingSliderBase.js";import n from"./ColorSizeSlider/ColorSizeSliderViewModel.js";import{getDynamicPathForSizeStops as d,getPathForSizeStops as p}from"./support/utils.js";import{storeNode as m}from"../support/widgetUtils.js";import{messageBundle as u}from"../support/decorators/messageBundle.js";import{tsx as h}from"../support/jsxFactory.js";var c;const b="esri-color-size-slider",v={base:b,rampElement:`${b}__ramp`,sliderContainer:`${b}__slider-container`,histogramContainer:`${b}__histogram-container`,primaryHandle:`${b}--primary-handle`,track:`${b}--interactive-track`,esriWidget:"esri-widget",esriWidgetPanel:"esri-widget--panel",widgetIcon:"esri-icon-edit",disabled:"esri-disabled"};let g=c=class extends o{constructor(e,r){super(e,r),this._backgroundFillColor="#e0e0e0",this._minRampFillWidth=.2,this._rampNode=null,this._maxRampFillWidth=1,this.messages=null,this.viewModel=new n,this._bgFillId=`${this.id}-bg-fill`,this._rampFillId=`${this.id}-linear-gradient`}get handlesSyncedToPrimary(){return this.viewModel.handlesSyncedToPrimary}set handlesSyncedToPrimary(e){this.viewModel.handlesSyncedToPrimary=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get persistSizeRangeEnabled(){return this.viewModel.persistSizeRangeEnabled}set persistSizeRangeEnabled(e){this.viewModel.persistSizeRangeEnabled=e}get primaryHandleEnabled(){return this.viewModel.primaryHandleEnabled}set primaryHandleEnabled(e){this.viewModel.primaryHandleEnabled=e}get stops(){return this.viewModel.stops}set stops(e){this.viewModel.stops=e}static fromRendererResult(e,i){const s=e.size.visualVariables,a=e.renderer.authoringInfo.univariateTheme,l=e.color?.visualVariable.stops,{statistics:o}=e,{avg:n,stddev:d}=o;if(!l)throw new r("ColorSizeSlider-fromRendererResult:invalid-renderer-result","'result' must include 'color' variable.");const p="above-and-below"===a,m=e.renderer.authoringInfo.visualVariables[0],u=m.minSliderValue,h=m.maxSliderValue,b=s.find((e=>"outline"!==e?.target&&!(e?.axis&&!e?.field&&!e?.valueExpression)&&(e?.field||e?.valueExpression))),v=b.stops,g=l.map(((e,r)=>{const{color:i,label:s,value:a}=e;let o;return o=v&&v.length>0?v[r].size:0===r?b.minSize:r===l.length-1?b.maxSize:null,new t({color:i,label:s,value:a,size:o})}));return new c({max:h,min:u,stops:g,primaryHandleEnabled:p,handlesSyncedToPrimary:p,persistSizeRangeEnabled:p,histogramConfig:{average:n,standardDeviation:d,bins:i?i.bins:[]}})}updateFromRendererResult(e,i){const s=e.size.visualVariables,a=e.renderer.authoringInfo.univariateTheme,l=e.color?.visualVariable.stops,{statistics:o}=e,{avg:n,stddev:d}=o;if(!l)throw new r("ColorSizeSlider-fromRendererResult:invalid-renderer-result","'result' must include 'color' variable.");const p="above-and-below"===a,m=e.renderer.authoringInfo.visualVariables[0],u=m.minSliderValue,h=m.maxSliderValue,c=s.find((e=>"outline"!==e?.target&&!(e?.axis&&!e?.field&&!e?.valueExpression)&&(e?.field||e?.valueExpression))),b=c.stops,v=l.map(((e,r)=>{const{color:i,label:s,value:a}=e;let o;return o=b&&b.length>0?b[r].size:0===r?c.minSize:r===l.length-1?c.maxSize:null,new t({color:i,label:s,value:a,size:o})}));this.set({max:h,min:u,stops:v,primaryHandleEnabled:p,handlesSyncedToPrimary:p,persistSizeRangeEnabled:p,histogramConfig:{average:n,standardDeviation:d,bins:i?i.bins:[]}})}updateRenderer(e){const{stops:r}=this,i=r[0],s=r.at(-1),t=r[Math.floor(r.length/2)],o=e.clone(),n=o.visualVariables.map((e=>{if("size"===e.type){if("outline"===e?.target||e?.axis&&!e?.field&&!e?.valueExpression)return e;null!=e.minSize&&null!=e.maxSize?e.set({maxDataValue:s.value,minDataValue:i.value,maxSize:s.size,minSize:i.size}):e.stops&&e.set({stops:r.map((e=>{const{label:r,size:i,value:s}=e;return new l({label:r,size:i,value:s})}))})}else"color"===e.type&&e.set({stops:this.stops.map((e=>{const{color:r,label:i,value:s}=e;return new a({color:r,label:i,value:s})}))});return e}));if(o.visualVariables=n,o.classBreakInfos.length>1){const e=t.value;o.classBreakInfos[0].maxValue=e,o.classBreakInfos[1].minValue=e}return o}updateVisualVariables(e){return e.map((e=>{const r=e.clone();if("size"===e.type){if("outline"===e?.target||e?.axis&&!e?.field&&!e?.valueExpression)return r;if(null!=e.minSize&&null!=e.maxSize){const{stops:e}=this,i=e[0],s=e.at(-1);r.set({maxDataValue:s.value,minDataValue:i.value,maxSize:s.size,minSize:i.size})}else e.stops&&r.set({stops:this.stops.map((e=>{const{label:r,size:i,value:s}=e;return new l({label:r,size:i,value:s})}))})}else"color"===e.type&&r.set({stops:this.stops.map((e=>{const{color:r,label:i,value:s}=e;return new a({color:r,label:i,value:s})}))});return r}))}render(){const{label:e,primaryHandleEnabled:r,state:i,visibleElements:s}=this,t="disabled"===i,a=this.classes(v.base,v.esriWidget,v.esriWidgetPanel,{[v.disabled]:t,[v.primaryHandle]:r,[v.track]:!!s.interactiveTrack});return h("div",{"aria-label":e,class:a},t?null:this.renderContent(this.renderRamp(),v.sliderContainer,v.histogramContainer))}renderRamp(){const{_bgFillId:e,_rampFillId:r,viewModel:i,zoomOptions:s}=this,t=i.getStopInfo();return h("div",{afterCreate:m,bind:this,class:v.rampElement,"data-node-ref":"_rampNode"},h("svg",{xmlns:"http://www.w3.org/2000/svg"},h("defs",null,this.renderRampFillDefinition(r,t),this.renderBackgroundFillDefinition(e)),h("rect",{x:"0",y:"0",fill:this._backgroundFillColor,height:"100%",width:"100%"}),this.renderPaths()),s?this.renderZoomCaps():null)}renderPaths(){if(!this._rampNode)return;const{offsetHeight:e=0,offsetWidth:r=0}=this._rampNode;if(null==e||null==r)return;const{primaryHandleEnabled:i,stops:s,values:t,viewModel:{max:a,min:l},_bgFillId:o,_maxRampFillWidth:n,_minRampFillWidth:m,_rampFillId:u}=this,c=[n,m];s[0].size<s.at(-1).size&&c.reverse();const b=t.slice().sort(((e,r)=>e>r?1:-1)),[v,g]=c,[f,S]=b,z=i?d({max:a,min:l,pathHeight:e,pathWidth:r,stops:s,padding:m}):p({bottomValue:f,bottomWidth:v,max:a,min:l,pathHeight:e,pathWidth:r,topValue:S,topWidth:g});return[h("path",{key:"background",d:z,fill:`url(#${o})`}),h("path",{key:"fill",d:z,fill:`url(#${u})`})]}};e([i()],g.prototype,"label",null),e([i(),u("esri/widgets/smartMapping/ColorSizeSlider/t9n/ColorSizeSlider")],g.prototype,"messages",void 0),e([i()],g.prototype,"persistSizeRangeEnabled",null),e([i()],g.prototype,"primaryHandleEnabled",null),e([i()],g.prototype,"stops",null),e([i()],g.prototype,"viewModel",void 0),g=c=e([s("esri.widgets.smartMapping.ColorSizeSlider")],g);const f=g;export{f as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Error.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import t from"../../renderers/visualVariables/support/ColorSizeStop.js";import l from"../../renderers/visualVariables/support/ColorStop.js";import a from"../../renderers/visualVariables/support/SizeStop.js";import{SmartMappingSliderBase as o}from"./SmartMappingSliderBase.js";import n from"./ColorSizeSlider/ColorSizeSliderViewModel.js";import{getDynamicPathForSizeStops as d,getPathForSizeStops as p}from"./support/utils.js";import{storeNode as m}from"../support/widgetUtils.js";import{messageBundle as u}from"../support/decorators/messageBundle.js";import{tsx as h}from"../support/jsxFactory.js";var c;const b="esri-color-size-slider",g={base:b,rampElement:`${b}__ramp`,sliderContainer:`${b}__slider-container`,histogramContainer:`${b}__histogram-container`,primaryHandle:`${b}--primary-handle`,track:`${b}--interactive-track`,esriWidget:"esri-widget",esriWidgetPanel:"esri-widget--panel",widgetIcon:"esri-icon-edit",disabled:"esri-disabled"};let v=c=class extends o{constructor(e,r){super(e,r),this._backgroundFillColor="#e0e0e0",this._minRampFillWidth=.2,this._rampNode=null,this._maxRampFillWidth=1,this.messages=null,this.viewModel=new n,this._bgFillId=`${this.id}-bg-fill`,this._rampFillId=`${this.id}-linear-gradient`}get handlesSyncedToPrimary(){return this.viewModel.handlesSyncedToPrimary}set handlesSyncedToPrimary(e){this.viewModel.handlesSyncedToPrimary=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get persistSizeRangeEnabled(){return this.viewModel.persistSizeRangeEnabled}set persistSizeRangeEnabled(e){this.viewModel.persistSizeRangeEnabled=e}get primaryHandleEnabled(){return this.viewModel.primaryHandleEnabled}set primaryHandleEnabled(e){this.viewModel.primaryHandleEnabled=e}get stops(){return this.viewModel.stops}set stops(e){this.viewModel.stops=e}static fromRendererResult(e,i){const s=e.size.visualVariables,l=e.renderer.authoringInfo.univariateTheme,a=e.color?.visualVariable.stops,{statistics:o}=e,{avg:n,stddev:d}=o;if(!a)throw new r("ColorSizeSlider-fromRendererResult:invalid-renderer-result","'result' must include 'color' variable.");const p="above-and-below"===l,m=e.renderer.authoringInfo.visualVariables[0],u=m.minSliderValue,h=m.maxSliderValue,b=s.find((e=>"outline"!==e?.target&&!(e?.axis&&!e?.field&&!e?.valueExpression)&&(e?.field||e?.valueExpression))),g=b.stops,v=a.map(((e,r)=>{const{color:i,label:s,value:l}=e;let o;return o=g&&g.length>0?g[r].size:0===r?b.minSize:r===a.length-1?b.maxSize:null,new t({color:i,label:s,value:l,size:o})}));return new c({max:h,min:u,stops:v,primaryHandleEnabled:p,handlesSyncedToPrimary:p,persistSizeRangeEnabled:p,histogramConfig:{average:n,standardDeviation:d,bins:i?i.bins:[]}})}updateFromRendererResult(e,i){const s=e.size.visualVariables,l=e.renderer.authoringInfo.univariateTheme,a=e.color?.visualVariable.stops,{statistics:o}=e,{avg:n,stddev:d}=o;if(!a)throw new r("ColorSizeSlider-fromRendererResult:invalid-renderer-result","'result' must include 'color' variable.");const p="above-and-below"===l,m=e.renderer.authoringInfo.visualVariables[0],u=m.minSliderValue,h=m.maxSliderValue,c=s.find((e=>"outline"!==e?.target&&!(e?.axis&&!e?.field&&!e?.valueExpression)&&(e?.field||e?.valueExpression))),b=c.stops,g=a.map(((e,r)=>{const{color:i,label:s,value:l}=e;let o;return o=b&&b.length>0?b[r].size:0===r?c.minSize:r===a.length-1?c.maxSize:null,new t({color:i,label:s,value:l,size:o})}));this.set({max:h,min:u,stops:g,primaryHandleEnabled:p,handlesSyncedToPrimary:p,persistSizeRangeEnabled:p,histogramConfig:{average:n,standardDeviation:d,bins:i?i.bins:[]}})}updateRenderer(e){const{stops:r}=this,i=r[0],s=r[r.length-1],t=r[Math.floor(r.length/2)],o=e.clone(),n=o.visualVariables.map((e=>{if("size"===e.type){if("outline"===e?.target||e?.axis&&!e?.field&&!e?.valueExpression)return e;null!=e.minSize&&null!=e.maxSize?e.set({maxDataValue:s.value,minDataValue:i.value,maxSize:s.size,minSize:i.size}):e.stops&&e.set({stops:r.map((e=>{const{label:r,size:i,value:s}=e;return new a({label:r,size:i,value:s})}))})}else"color"===e.type&&e.set({stops:this.stops.map((e=>{const{color:r,label:i,value:s}=e;return new l({color:r,label:i,value:s})}))});return e}));if(o.visualVariables=n,o.classBreakInfos.length>1){const e=t.value;o.classBreakInfos[0].maxValue=e,o.classBreakInfos[1].minValue=e}return o}updateVisualVariables(e){return e.map((e=>{const r=e.clone();if("size"===e.type){if("outline"===e?.target||e?.axis&&!e?.field&&!e?.valueExpression)return r;if(null!=e.minSize&&null!=e.maxSize){const{stops:e}=this,i=e[0],s=e[e.length-1];r.set({maxDataValue:s.value,minDataValue:i.value,maxSize:s.size,minSize:i.size})}else e.stops&&r.set({stops:this.stops.map((e=>{const{label:r,size:i,value:s}=e;return new a({label:r,size:i,value:s})}))})}else"color"===e.type&&r.set({stops:this.stops.map((e=>{const{color:r,label:i,value:s}=e;return new l({color:r,label:i,value:s})}))});return r}))}render(){const{label:e,primaryHandleEnabled:r,state:i,visibleElements:s}=this,t="disabled"===i,l=this.classes(g.base,g.esriWidget,g.esriWidgetPanel,{[g.disabled]:t,[g.primaryHandle]:r,[g.track]:!!s.interactiveTrack});return h("div",{"aria-label":e,class:l},t?null:this.renderContent(this.renderRamp(),g.sliderContainer,g.histogramContainer))}renderRamp(){const{_bgFillId:e,_rampFillId:r,viewModel:i,zoomOptions:s}=this,t=i.getStopInfo();return h("div",{afterCreate:m,bind:this,class:g.rampElement,"data-node-ref":"_rampNode"},h("svg",{xmlns:"http://www.w3.org/2000/svg"},h("defs",null,this.renderRampFillDefinition(r,t),this.renderBackgroundFillDefinition(e)),h("rect",{x:"0",y:"0",fill:this._backgroundFillColor,height:"100%",width:"100%"}),this.renderPaths()),s?this.renderZoomCaps():null)}renderPaths(){if(!this._rampNode)return;const{offsetHeight:e=0,offsetWidth:r=0}=this._rampNode;if(null==e||null==r)return;const{primaryHandleEnabled:i,stops:s,values:t,viewModel:{max:l,min:a},_bgFillId:o,_maxRampFillWidth:n,_minRampFillWidth:m,_rampFillId:u}=this,c=[n,m];s[0].size<s[s.length-1].size&&c.reverse();const b=t.slice().sort(((e,r)=>e>r?1:-1)),[g,v]=c,[f,S]=b,z=i?d({max:l,min:a,pathHeight:e,pathWidth:r,stops:s,padding:m}):p({bottomValue:f,bottomWidth:g,max:l,min:a,pathHeight:e,pathWidth:r,topValue:S,topWidth:v});return[h("path",{key:"background",d:z,fill:`url(#${o})`}),h("path",{key:"fill",d:z,fill:`url(#${u})`})]}};e([i()],v.prototype,"label",null),e([i(),u("esri/widgets/smartMapping/ColorSizeSlider/t9n/ColorSizeSlider")],v.prototype,"messages",void 0),e([i()],v.prototype,"persistSizeRangeEnabled",null),e([i()],v.prototype,"primaryHandleEnabled",null),e([i()],v.prototype,"stops",null),e([i()],v.prototype,"viewModel",void 0),v=c=e([s("esri.widgets.smartMapping.ColorSizeSlider")],v);const f=v;export{f as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import"../../../intl.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import o from"../SmartMappingSliderViewModel.js";import{onLocaleChange as r}from"../../../intl/locale.js";import{fetchMessageBundle as a}from"../../../intl/messages.js";let i=class extends o{constructor(t){super(t),this.hasTimeData=!1,this.labelFormatFunction=(t,e)=>"min"===e?this.messages.bottomLabel:"max"===e?this.messages.topLabel:t.toString(),this.max=1,this.messages=null,this.min=0,this.zoomingEnabled=!1}initialize(){const t=async()=>this.messages=await a("esri/widgets/smartMapping/HeatmapSlider/t9n/HeatmapSlider");t(),this.addHandles(r(t))}get state(){const{messages:t,max:e,min:s}=this;return t&&null!=e&&null!=s?"ready":"disabled"}get values(){const{stops:t}=this;return!t||!t.length||t.length<2?[]:[t[0].ratio,t.at(-1).ratio]}getStopInfo(){const{stops:t}=this;return t&&t.length?t.map((t=>({color:t.color,offset:1-t.ratio}))):[]}};t([e({readOnly:!0})],i.prototype,"hasTimeData",void 0),t([e({readOnly:!0})],i.prototype,"labelFormatFunction",void 0),t([e({readOnly:!0})],i.prototype,"max",void 0),t([e()],i.prototype,"messages",void 0),t([e({readOnly:!0})],i.prototype,"min",void 0),t([e({readOnly:!0})],i.prototype,"state",null),t([e({readOnly:!0})],i.prototype,"values",null),t([e({readOnly:!0})],i.prototype,"zoomingEnabled",void 0),i=t([s("esri.widgets.smartMapping.HeatmapSlider.HeatmapSliderViewModel")],i);const l=i;export{l as default};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import"../../../intl.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import o from"../SmartMappingSliderViewModel.js";import{onLocaleChange as r}from"../../../intl/locale.js";import{fetchMessageBundle as a}from"../../../intl/messages.js";let i=class extends o{constructor(t){super(t),this.hasTimeData=!1,this.labelFormatFunction=(t,e)=>"min"===e?this.messages.bottomLabel:"max"===e?this.messages.topLabel:t.toString(),this.max=1,this.messages=null,this.min=0,this.zoomingEnabled=!1}initialize(){const t=async()=>this.messages=await a("esri/widgets/smartMapping/HeatmapSlider/t9n/HeatmapSlider");t(),this.addHandles(r(t))}get state(){const{messages:t,max:e,min:s}=this;return t&&null!=e&&null!=s?"ready":"disabled"}get values(){const{stops:t}=this;return!t||!t.length||t.length<2?[]:[t[0].ratio,t[t.length-1].ratio]}getStopInfo(){const{stops:t}=this;return t&&t.length?t.map((t=>({color:t.color,offset:1-t.ratio}))):[]}};t([e({readOnly:!0})],i.prototype,"hasTimeData",void 0),t([e({readOnly:!0})],i.prototype,"labelFormatFunction",void 0),t([e({readOnly:!0})],i.prototype,"max",void 0),t([e()],i.prototype,"messages",void 0),t([e({readOnly:!0})],i.prototype,"min",void 0),t([e({readOnly:!0})],i.prototype,"state",null),t([e({readOnly:!0})],i.prototype,"values",null),t([e({readOnly:!0})],i.prototype,"zoomingEnabled",void 0),i=t([s("esri.widgets.smartMapping.HeatmapSlider.HeatmapSliderViewModel")],i);const l=i;export{l as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Color.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{cast as i}from"../../core/accessorSupport/decorators/cast.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import r from"../../renderers/visualVariables/SizeVariable.js";import o from"../../renderers/visualVariables/support/SizeStop.js";import{SmartMappingSliderBase as l}from"./SmartMappingSliderBase.js";import n from"./SizeSlider/SizeSliderViewModel.js";import{getSizesFromVariable as d,getFillFromColor as p,getDynamicPathForSizeStops as m,getPathForSizeStops as u}from"./support/utils.js";import{storeNode as c}from"../support/widgetUtils.js";import{messageBundle as h}from"../support/decorators/messageBundle.js";import{tsx as g}from"../support/jsxFactory.js";var v;const b="esri-size-slider",z={base:b,rampElement:`${b}__ramp`,sliderContainer:`${b}__slider-container`,histogramContainer:`${b}__histogram-container`,zoomCapTop:`${b}__zoom-cap-top`,zoomCapBottom:`${b}__zoom-cap-bottom`,zoomCapLine:`${b}__zoom-cap-line`,zoomCapMask:`${b}__zoom-cap-mask`,zoomCapUnderline:`${b}__zoom-cap-underline`,primaryHandle:`${b}--primary-handle`,track:`${b}--interactive-track`,esriWidget:"esri-widget",esriWidgetPanel:"esri-widget--panel",widgetIcon:"esri-icon-edit",disabled:"esri-disabled"},y={trackFillColor:new t([149,149,149]),trackBackgroundColor:new t([224,224,224])};let S=v=class extends l{constructor(e,t){super(e,t),this._maxRampFillWidth=1,this._minRampFillWidth=.2,this._rampNode=null,this.messages=null,this.style={...y},this.viewModel=new n}get handlesSyncedToPrimary(){return this.viewModel.handlesSyncedToPrimary}set handlesSyncedToPrimary(e){this.viewModel.handlesSyncedToPrimary=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get persistSizeRangeEnabled(){return this.viewModel.persistSizeRangeEnabled}set persistSizeRangeEnabled(e){this.viewModel.persistSizeRangeEnabled=e}get primaryHandleEnabled(){return this.viewModel.primaryHandleEnabled}set primaryHandleEnabled(e){this.viewModel.primaryHandleEnabled=e}get stops(){return this.viewModel.stops}set stops(e){this.viewModel.stops=e}castStyle(e){return{...y,...e}}static fromRendererResult(e,t){const{visualVariables:s,statistics:i}=e,{avg:a,stddev:r}=i,o=s[0],[l,n]=d(o),p=e.renderer.authoringInfo.visualVariables[0],m=p.minSliderValue,u=p.maxSliderValue;return new v({max:u,min:m,stops:[{value:o.minDataValue,size:n},{value:o.maxDataValue,size:l}],histogramConfig:{average:a,standardDeviation:r,bins:t?t.bins:[]}})}updateFromRendererResult(e,t){const{visualVariables:s,statistics:i}=e,{avg:a,stddev:r}=i,o=s[0],[l,n]=d(o),p=e.renderer.authoringInfo.visualVariables[0],m=p.minSliderValue,u=p.maxSliderValue;this.set({max:u,min:m,stops:[{value:o.minDataValue,size:n},{value:o.maxDataValue,size:l}],histogramConfig:{average:a,standardDeviation:r,bins:t?t.bins:[]}})}updateVisualVariable(e){const t=e.clone(),{stops:s}=this;if(!e||!s)return null;if(t.stops)return t.stops=s,t;const i=s[0],a=s.at(-1);let o=t.maxSize,l=t.minSize;if(o instanceof r){const e=o.stops,t=a.size/e[0].size,s=e.map((e=>(e.size*=t,e)));o.stops=s}else o=a.size;if(l instanceof r){const e=l.stops,t=i.size/e[0].size,s=e.map((e=>(e.size*=t,e)));l.stops=s}else l=i.size;return t.set({maxDataValue:a.value,minDataValue:i.value,maxSize:o,minSize:l}),t}updateFromVisualVariable(e){if(!e)return;const{maxDataValue:t,minDataValue:s,stops:i}=e;if(i)this.stops=i;else{const[i,a]=d(e);this.stops=[new o({value:s,size:a}),new o({value:t,size:i})]}}render(){const{label:e,primaryHandleEnabled:t,state:s,visibleElements:i}=this,a="disabled"===s,r=this.classes(z.base,z.esriWidget,z.esriWidgetPanel,{[z.disabled]:a,[z.primaryHandle]:t,[z.track]:!!i.interactiveTrack});return g("div",{"aria-label":e,class:r},a?null:this.renderContent(this.renderRamp(),z.sliderContainer,z.histogramContainer))}renderRamp(){const{style:{trackBackgroundColor:e},zoomOptions:t}=this;return g("div",{afterCreate:c,bind:this,class:z.rampElement,"data-node-ref":"_rampNode"},g("svg",{key:"ramp-svg",xmlns:"http://www.w3.org/2000/svg"},g("rect",{x:"0",y:"0",fill:p(e),height:"100%",width:"100%"}),this.renderPath()),t?this.renderZoomCaps():null)}renderPath(){if(!this._rampNode)return;const{offsetHeight:e=0,offsetWidth:t=0}=this._rampNode;if(null==e||null==t)return;const{primaryHandleEnabled:s,stops:i,style:{trackFillColor:a},values:r,viewModel:{max:o,min:l},_maxRampFillWidth:n,_minRampFillWidth:d}=this,c=[n,d];i[0].size<i.at(-1).size&&c.reverse();const h=r.slice().sort(((e,t)=>e>t?1:-1)),[v,b]=c,[z,y]=h,S=s?m({max:o,min:l,pathHeight:e,pathWidth:t,stops:i,padding:b}):u({bottomValue:z,bottomWidth:v,max:o,min:l,pathHeight:e,pathWidth:t,topValue:y,topWidth:b});return g("path",{d:S,fill:p(a)})}};e([s()],S.prototype,"handlesSyncedToPrimary",null),e([s()],S.prototype,"label",null),e([s(),h("esri/widgets/smartMapping/SizeSlider/t9n/SizeSlider")],S.prototype,"messages",void 0),e([s()],S.prototype,"persistSizeRangeEnabled",null),e([s()],S.prototype,"primaryHandleEnabled",null),e([s()],S.prototype,"stops",null),e([s()],S.prototype,"style",void 0),e([i("style")],S.prototype,"castStyle",null),e([s()],S.prototype,"viewModel",void 0),S=v=e([a("esri.widgets.smartMapping.SizeSlider")],S);const f=S;export{f as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Color.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{cast as i}from"../../core/accessorSupport/decorators/cast.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import r from"../../renderers/visualVariables/SizeVariable.js";import o from"../../renderers/visualVariables/support/SizeStop.js";import{SmartMappingSliderBase as l}from"./SmartMappingSliderBase.js";import n from"./SizeSlider/SizeSliderViewModel.js";import{getSizesFromVariable as d,getFillFromColor as p,getDynamicPathForSizeStops as m,getPathForSizeStops as u}from"./support/utils.js";import{storeNode as c}from"../support/widgetUtils.js";import{messageBundle as h}from"../support/decorators/messageBundle.js";import{tsx as g}from"../support/jsxFactory.js";var v;const b="esri-size-slider",z={base:b,rampElement:`${b}__ramp`,sliderContainer:`${b}__slider-container`,histogramContainer:`${b}__histogram-container`,zoomCapTop:`${b}__zoom-cap-top`,zoomCapBottom:`${b}__zoom-cap-bottom`,zoomCapLine:`${b}__zoom-cap-line`,zoomCapMask:`${b}__zoom-cap-mask`,zoomCapUnderline:`${b}__zoom-cap-underline`,primaryHandle:`${b}--primary-handle`,track:`${b}--interactive-track`,esriWidget:"esri-widget",esriWidgetPanel:"esri-widget--panel",widgetIcon:"esri-icon-edit",disabled:"esri-disabled"},y={trackFillColor:new t([149,149,149]),trackBackgroundColor:new t([224,224,224])};let S=v=class extends l{constructor(e,t){super(e,t),this._maxRampFillWidth=1,this._minRampFillWidth=.2,this._rampNode=null,this.messages=null,this.style={...y},this.viewModel=new n}get handlesSyncedToPrimary(){return this.viewModel.handlesSyncedToPrimary}set handlesSyncedToPrimary(e){this.viewModel.handlesSyncedToPrimary=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get persistSizeRangeEnabled(){return this.viewModel.persistSizeRangeEnabled}set persistSizeRangeEnabled(e){this.viewModel.persistSizeRangeEnabled=e}get primaryHandleEnabled(){return this.viewModel.primaryHandleEnabled}set primaryHandleEnabled(e){this.viewModel.primaryHandleEnabled=e}get stops(){return this.viewModel.stops}set stops(e){this.viewModel.stops=e}castStyle(e){return{...y,...e}}static fromRendererResult(e,t){const{visualVariables:s,statistics:i}=e,{avg:a,stddev:r}=i,o=s[0],[l,n]=d(o),p=e.renderer.authoringInfo.visualVariables[0],m=p.minSliderValue,u=p.maxSliderValue;return new v({max:u,min:m,stops:[{value:o.minDataValue,size:n},{value:o.maxDataValue,size:l}],histogramConfig:{average:a,standardDeviation:r,bins:t?t.bins:[]}})}updateFromRendererResult(e,t){const{visualVariables:s,statistics:i}=e,{avg:a,stddev:r}=i,o=s[0],[l,n]=d(o),p=e.renderer.authoringInfo.visualVariables[0],m=p.minSliderValue,u=p.maxSliderValue;this.set({max:u,min:m,stops:[{value:o.minDataValue,size:n},{value:o.maxDataValue,size:l}],histogramConfig:{average:a,standardDeviation:r,bins:t?t.bins:[]}})}updateVisualVariable(e){const t=e.clone(),{stops:s}=this;if(!e||!s)return null;if(t.stops)return t.stops=s,t;const i=s[0],a=s[s.length-1];let o=t.maxSize,l=t.minSize;if(o instanceof r){const e=o.stops,t=a.size/e[0].size,s=e.map((e=>(e.size*=t,e)));o.stops=s}else o=a.size;if(l instanceof r){const e=l.stops,t=i.size/e[0].size,s=e.map((e=>(e.size*=t,e)));l.stops=s}else l=i.size;return t.set({maxDataValue:a.value,minDataValue:i.value,maxSize:o,minSize:l}),t}updateFromVisualVariable(e){if(!e)return;const{maxDataValue:t,minDataValue:s,stops:i}=e;if(i)this.stops=i;else{const[i,a]=d(e);this.stops=[new o({value:s,size:a}),new o({value:t,size:i})]}}render(){const{label:e,primaryHandleEnabled:t,state:s,visibleElements:i}=this,a="disabled"===s,r=this.classes(z.base,z.esriWidget,z.esriWidgetPanel,{[z.disabled]:a,[z.primaryHandle]:t,[z.track]:!!i.interactiveTrack});return g("div",{"aria-label":e,class:r},a?null:this.renderContent(this.renderRamp(),z.sliderContainer,z.histogramContainer))}renderRamp(){const{style:{trackBackgroundColor:e},zoomOptions:t}=this;return g("div",{afterCreate:c,bind:this,class:z.rampElement,"data-node-ref":"_rampNode"},g("svg",{key:"ramp-svg",xmlns:"http://www.w3.org/2000/svg"},g("rect",{x:"0",y:"0",fill:p(e),height:"100%",width:"100%"}),this.renderPath()),t?this.renderZoomCaps():null)}renderPath(){if(!this._rampNode)return;const{offsetHeight:e=0,offsetWidth:t=0}=this._rampNode;if(null==e||null==t)return;const{primaryHandleEnabled:s,stops:i,style:{trackFillColor:a},values:r,viewModel:{max:o,min:l},_maxRampFillWidth:n,_minRampFillWidth:d}=this,c=[n,d];i[0].size<i[i.length-1].size&&c.reverse();const h=r.slice().sort(((e,t)=>e>t?1:-1)),[v,b]=c,[z,y]=h,S=s?m({max:o,min:l,pathHeight:e,pathWidth:t,stops:i,padding:b}):u({bottomValue:z,bottomWidth:v,max:o,min:l,pathHeight:e,pathWidth:t,topValue:y,topWidth:b});return g("path",{d:S,fill:p(a)})}};e([s()],S.prototype,"handlesSyncedToPrimary",null),e([s()],S.prototype,"label",null),e([s(),h("esri/widgets/smartMapping/SizeSlider/t9n/SizeSlider")],S.prototype,"messages",void 0),e([s()],S.prototype,"persistSizeRangeEnabled",null),e([s()],S.prototype,"primaryHandleEnabled",null),e([s()],S.prototype,"stops",null),e([s()],S.prototype,"style",void 0),e([i("style")],S.prototype,"castStyle",null),e([s()],S.prototype,"viewModel",void 0),S=v=e([a("esri.widgets.smartMapping.SizeSlider")],S);const f=S;export{f as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import r from"./SmartMappingSliderViewModel.js";let n=class extends r{constructor(e){super(e),this.handlesSyncedToPrimary=!0}set primaryHandleEnabled(e){this._set("primaryHandleEnabled",e)}get primaryHandleEnabled(){const{stops:e}=this;if(!e||!e.length)return!1;const t=e.length;return(3===t||5===t)&&this._get("primaryHandleEnabled")}get values(){const{primaryHandleEnabled:e,stops:t}=this;if(!t||!t.length||t.length<2)return[];const s=this.getValuesFromStops();return e?3===s.length?[s[0],s[1],s[2]]:[s[0],s[2],s[4]]:[s[0],s.at(-1)]}setValue(e,t){const{max:s,min:r,values:n}=this,a=n[e];if(isNaN(t)||a===t||t>s||t<r)return;t=this.toPrecision(t);const i=this.primaryHandleEnabled&&this.handlesSyncedToPrimary;if(i){const s=n.slice().sort(((e,t)=>e>t?1:-1))[1];(0===e&&t>s||2===e&&t<s)&&(t=s)}const o=this.getStopChanges(e,t);this.updateStops(o),i?this.notifyChange("values"):(n[e]=t,this._set("values",[...n])),this.notifyChange("labels")}getStopIndexFromValueIndex(e){const{handlesSyncedToPrimary:t,primaryHandleEnabled:s}=this;if(s){const{values:s}=this,r=s[e];if(t)return e;const n=s.slice().sort(((e,t)=>e>t?1:-1)),a=n.indexOf(r);return s.some(((e,t)=>e===r&&t!==a))?n.lastIndexOf(r):a}return super.getStopIndexFromValueIndex(e)}getStopChanges(e,t){return this.primaryHandleEnabled?this._getStopChanges(e,t):super.getStopChanges(e,t)}_getStopChanges(e,t){const{max:s,min:r,stops:n,values:a}=this,i=this.handlesSyncedToPrimary&&1===e,o=a[e],l=a.slice();i||(l[e]=t);const d=l.sort(((e,t)=>e>t?1:-1)),p=i?t:d[1],h=t-o,c=i?this.toPrecision(Math.max(Math.min(d[0]+h,s),r)):d[0],u=i?this.toPrecision(Math.max(Math.min(d[2]+h,s),r)):d[2];return 5===n.length?[{index:0,value:c},{index:1,value:this.toPrecision((p+c)/2)},{index:2,value:p},{index:3,value:this.toPrecision((p+u)/2)},{index:4,value:u}]:[{index:0,value:c},{index:1,value:p},{index:2,value:u}]}};e([t()],n.prototype,"handlesSyncedToPrimary",void 0),e([t()],n.prototype,"primaryHandleEnabled",null),e([t({dependsOn:["handlesSyncedToPrimary"],readOnly:!0})],n.prototype,"values",null),n=e([s("esri.widgets.smartMapping.SmartMappingPrimaryHandleSliderViewModel")],n);const a=n;export{a as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import r from"./SmartMappingSliderViewModel.js";let n=class extends r{constructor(e){super(e),this.handlesSyncedToPrimary=!0}set primaryHandleEnabled(e){this._set("primaryHandleEnabled",e)}get primaryHandleEnabled(){const{stops:e}=this;if(!e||!e.length)return!1;const t=e.length;return(3===t||5===t)&&this._get("primaryHandleEnabled")}get values(){const{primaryHandleEnabled:e,stops:t}=this;if(!t||!t.length||t.length<2)return[];const s=this.getValuesFromStops();return e?3===s.length?[s[0],s[1],s[2]]:[s[0],s[2],s[4]]:[s[0],s[s.length-1]]}setValue(e,t){const{max:s,min:r,values:n}=this,a=n[e];if(isNaN(t)||a===t||t>s||t<r)return;t=this.toPrecision(t);const i=this.primaryHandleEnabled&&this.handlesSyncedToPrimary;if(i){const s=n.slice().sort(((e,t)=>e>t?1:-1))[1];(0===e&&t>s||2===e&&t<s)&&(t=s)}const o=this.getStopChanges(e,t);this.updateStops(o),i?this.notifyChange("values"):(n[e]=t,this._set("values",[...n])),this.notifyChange("labels")}getStopIndexFromValueIndex(e){const{handlesSyncedToPrimary:t,primaryHandleEnabled:s}=this;if(s){const{values:s}=this,r=s[e];if(t)return e;const n=s.slice().sort(((e,t)=>e>t?1:-1)),a=n.indexOf(r);return s.some(((e,t)=>e===r&&t!==a))?n.lastIndexOf(r):a}return super.getStopIndexFromValueIndex(e)}getStopChanges(e,t){return this.primaryHandleEnabled?this._getStopChanges(e,t):super.getStopChanges(e,t)}_getStopChanges(e,t){const{max:s,min:r,stops:n,values:a}=this,i=this.handlesSyncedToPrimary&&1===e,o=a[e],l=a.slice();i||(l[e]=t);const d=l.sort(((e,t)=>e>t?1:-1)),p=i?t:d[1],h=t-o,c=i?this.toPrecision(Math.max(Math.min(d[0]+h,s),r)):d[0],u=i?this.toPrecision(Math.max(Math.min(d[2]+h,s),r)):d[2];return 5===n.length?[{index:0,value:c},{index:1,value:this.toPrecision((p+c)/2)},{index:2,value:p},{index:3,value:this.toPrecision((p+u)/2)},{index:4,value:u}]:[{index:0,value:c},{index:1,value:p},{index:2,value:u}]}};e([t()],n.prototype,"handlesSyncedToPrimary",void 0),e([t()],n.prototype,"primaryHandleEnabled",null),e([t({dependsOn:["handlesSyncedToPrimary"],readOnly:!0})],n.prototype,"values",null),n=e([s("esri.widgets.smartMapping.SmartMappingPrimaryHandleSliderViewModel")],n);const a=n;export{a as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import e from"../Slider/SliderViewModel.js";import{formatDateLabel as o,formatNumberLabel as n,getStopChanges as a}from"./support/utils.js";let l=class extends e{constructor(t){super(t),this._initialStopValues=[],this._max=null,this._min=null,this.hasTimeData=!1,this.inputFormatFunction=(t,s)=>"max"===s?this.getUnzoomedMax().toString():"min"===s?this.getUnzoomedMin().toString():t.toString(),this.inputParseFunction=null,this.labelFormatFunction=t=>{if(this.hasTimeData)return o(t);const{max:s,min:i,precision:e}=this,a=s-i>10?2:e;return n(parseFloat(t.toFixed(a)))},this.thumbsConstrained=!1,this.zoomingEnabled=!0}set breaks(t){this._set("breaks",t),this.notifyChange("max"),this.notifyChange("min")}set stops(t){if(t?.length){const{max:s,min:i}=this,e=this.getValuesFromStops(t),o={};null!=i&&e.some((t=>t<i))&&(o.min=Math.min(...e)),null!=s&&e.some((t=>t>s))&&(o.max=Math.max(...e)),this.set({...o}),this._initialStopValues=e}else this._initialStopValues=null;this._set("stops",t||null),this.notifyChange("values")}get labels(){const{values:t}=this,s=t&&t.length?t.map(((t,s)=>this.getLabelForValue(t,"value",s))):[],i=this.getUnzoomedMax(),e=this.getUnzoomedMin();return{max:this.getLabelForValue(i,"max"),min:this.getLabelForValue(e,"min"),values:s}}get max(){const{breaks:t}=this;return t?.length?t.at(-1).max:this.max}set max(t){const{zoomOptions:s}=this;if(s&&null!=s.max){const i=this.values;let e=s.max;if(t<e&&(e=t,s.max=t),i&&i.length)for(let s=0;s<i.length;s++)t<i[s]&&this.setValue(s,t);this._storeZoomMax(e,t)}else this.updateBreakMax(t),this.setMax(t);this.notifyChange("labels")}get min(){const{breaks:t}=this;return t?.length?t[0].min:this.min}set min(t){const{zoomOptions:s}=this;if(s&&null!=s.min){const i=this.values;let e=s.min;if(t>e&&(e=t,s.min=t),i&&i.length)for(let s=0;s<i.length;s++)t>i[s]&&this.setValue(s,t);this._storeZoomMin(e,t)}else this.updateBreakMin(t),this.setMin(t);this.notifyChange("labels")}get state(){const{max:t,min:s,values:i}=this;return null!=t&&null!=s&&i.length>0?"ready":"disabled"}get values(){const{breaks:t,stops:s}=this;if(!t&&!s)return[];if(t?.length){const s=t.map((t=>t.max));return s.pop(),s}if(s?.length<2)return[];const i=this.getValuesFromStops();return[i[0],i.at(-1)]}set zoomOptions(t){const{zoomingEnabled:s,zoomOptions:i}=this;if(s){if(i){const s=null!=this._max?this._max:this.max,i=null!=this._min?this._min:this.min;if(t){const{max:e,min:o}=t,n=null!=e,a=null!=o,l=a?t.min:i,r=a?i:null,h=n?t.max:s,m=n?s:null;this._storeZoomMin(l,r),this._storeZoomMax(h,m)}else this.setMax(s),this.setMin(i),this._min=null,this._max=null}else if(t){const{max:s,min:i}=t;null!=i&&this._storeZoomMin(t.min,this.min),null!=s&&this._storeZoomMax(t.max,this.max)}this._set("zoomOptions",t),this.notifyChange("max"),this.notifyChange("min")}}getStopIndexFromValueIndex(t){const{stops:s}=this,i=this.values[t];if(0===t){return i<=this.values[1]?0:s.length-1}if(1===t){return this.values[0]>=i?0:s.length-1}return null}getStopChanges(t,s){const i=this.stops,e=this.getStopIndexFromValueIndex(t),o=this.getValuesFromStops();o[e]=s;const[n,a]=[o[0],o.at(-1)].sort(((t,s)=>t>s?1:-1)),l=a-n,r=i.length-1;return o.map(((t,s)=>({index:s,value:this.toPrecision(n+s*l/r)})))}setValue(t,s){const{max:i,min:e,values:o}=this,n=o[t];if(isNaN(s)||n===s||s>i||s<e)return;o[t]=this.toPrecision(s),this._set("values",[...o]);const l=o.slice().sort(((t,s)=>t>s?1:-1)),r=l[0],h=l.at(-1),m=a(r,h,this._initialStopValues??[]);this.updateStops(m),this.updateBreaks(),this.notifyChange("labels")}getValuesFromStops(t){const s=t||this.stops;return s?.map((t=>t.hasOwnProperty("ratio")?t.ratio:t.value))}updateBreaks(){const{breaks:t,values:s}=this;t?.length&&s.slice().sort(((t,s)=>t>s?1:-1)).forEach(((s,i)=>{t[i].max=s,null!=t[i+1]&&(t[i+1].min=s)}))}updateBreakMax(t){const{breaks:s,max:i,min:e}=this;!isNaN(t)&&i!==t&&null!=e&&t>e&&s?.length&&(s.at(-1).max=t)}updateBreakMin(t){const{breaks:s,max:i,min:e}=this;!isNaN(t)&&e!==t&&null!=i&&t<i&&s?.length&&(s[0].min=t)}updateStops(t){const{stops:s}=this,i=this.getValuesFromStops();if(i?.length){for(const s of t)i[s.index]=s.value;s.forEach(((t,s)=>{t.hasOwnProperty("ratio")?t.ratio=i[s]:t.value=i[s]}))}}getUnzoomedMax(){return this.zoomOptions&&null!=this._max?this._max:this.max}getUnzoomedMin(){return this.zoomOptions&&null!=this._min?this._min:this.min}_storeZoomMax(t,s){this._max=s,this.setMax(t)}_storeZoomMin(t,s){this._min=s,this.setMin(t)}};t([s()],l.prototype,"breaks",null),t([s()],l.prototype,"stops",null),t([s()],l.prototype,"hasTimeData",void 0),t([s()],l.prototype,"inputFormatFunction",void 0),t([s()],l.prototype,"inputParseFunction",void 0),t([s()],l.prototype,"labelFormatFunction",void 0),t([s({readOnly:!0})],l.prototype,"labels",null),t([s()],l.prototype,"max",null),t([s()],l.prototype,"min",null),t([s({readOnly:!0})],l.prototype,"state",null),t([s()],l.prototype,"thumbsConstrained",void 0),t([s({readOnly:!0})],l.prototype,"values",null),t([s()],l.prototype,"zoomingEnabled",void 0),t([s()],l.prototype,"zoomOptions",null),l=t([i("esri.widgets.smartMapping.SmartMappingSliderViewModel")],l);const r=l;export{r as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import i from"../Slider/SliderViewModel.js";import{formatDateLabel as o,formatNumberLabel as n,getStopChanges as a}from"./support/utils.js";let l=class extends i{constructor(t){super(t),this._initialStopValues=[],this._max=null,this._min=null,this.hasTimeData=!1,this.inputFormatFunction=(t,s)=>"max"===s?this.getUnzoomedMax().toString():"min"===s?this.getUnzoomedMin().toString():t.toString(),this.inputParseFunction=null,this.labelFormatFunction=t=>{if(this.hasTimeData)return o(t);const{max:s,min:e,precision:i}=this,a=s-e>10?2:i;return n(parseFloat(t.toFixed(a)))},this.thumbsConstrained=!1,this.zoomingEnabled=!0}set breaks(t){this._set("breaks",t),this.notifyChange("max"),this.notifyChange("min")}set stops(t){if(t?.length){const{max:s,min:e}=this,i=this.getValuesFromStops(t),o={};null!=e&&i.some((t=>t<e))&&(o.min=Math.min(...i)),null!=s&&i.some((t=>t>s))&&(o.max=Math.max(...i)),this.set({...o}),this._initialStopValues=i}else this._initialStopValues=null;this._set("stops",t||null),this.notifyChange("values")}get labels(){const{values:t}=this,s=t&&t.length?t.map(((t,s)=>this.getLabelForValue(t,"value",s))):[],e=this.getUnzoomedMax(),i=this.getUnzoomedMin();return{max:this.getLabelForValue(e,"max"),min:this.getLabelForValue(i,"min"),values:s}}get max(){const{breaks:t}=this;return t?.length?t[t.length-1].max:this.max}set max(t){const{zoomOptions:s}=this;if(s&&null!=s.max){const e=this.values;let i=s.max;if(t<i&&(i=t,s.max=t),e&&e.length)for(let s=0;s<e.length;s++)t<e[s]&&this.setValue(s,t);this._storeZoomMax(i,t)}else this.updateBreakMax(t),this.setMax(t);this.notifyChange("labels")}get min(){const{breaks:t}=this;return t?.length?t[0].min:this.min}set min(t){const{zoomOptions:s}=this;if(s&&null!=s.min){const e=this.values;let i=s.min;if(t>i&&(i=t,s.min=t),e&&e.length)for(let s=0;s<e.length;s++)t>e[s]&&this.setValue(s,t);this._storeZoomMin(i,t)}else this.updateBreakMin(t),this.setMin(t);this.notifyChange("labels")}get state(){const{max:t,min:s,values:e}=this;return null!=t&&null!=s&&e.length>0?"ready":"disabled"}get values(){const{breaks:t,stops:s}=this;if(!t&&!s)return[];if(t?.length){const s=t.map((t=>t.max));return s.pop(),s}if(s?.length<2)return[];const e=this.getValuesFromStops();return[e[0],e[e.length-1]]}set zoomOptions(t){const{zoomingEnabled:s,zoomOptions:e}=this;if(s){if(e){const s=null!=this._max?this._max:this.max,e=null!=this._min?this._min:this.min;if(t){const{max:i,min:o}=t,n=null!=i,a=null!=o,l=a?t.min:e,r=a?e:null,h=n?t.max:s,m=n?s:null;this._storeZoomMin(l,r),this._storeZoomMax(h,m)}else this.setMax(s),this.setMin(e),this._min=null,this._max=null}else if(t){const{max:s,min:e}=t;null!=e&&this._storeZoomMin(t.min,this.min),null!=s&&this._storeZoomMax(t.max,this.max)}this._set("zoomOptions",t),this.notifyChange("max"),this.notifyChange("min")}}getStopIndexFromValueIndex(t){const{stops:s}=this,e=this.values[t];if(0===t){return e<=this.values[1]?0:s.length-1}if(1===t){return this.values[0]>=e?0:s.length-1}return null}getStopChanges(t,s){const e=this.stops,i=this.getStopIndexFromValueIndex(t),o=this.getValuesFromStops();o[i]=s;const[n,a]=[o[0],o[o.length-1]].sort(((t,s)=>t>s?1:-1)),l=a-n,r=e.length-1;return o.map(((t,s)=>({index:s,value:this.toPrecision(n+s*l/r)})))}setValue(t,s){const{max:e,min:i,values:o}=this,n=o[t];if(isNaN(s)||n===s||s>e||s<i)return;o[t]=this.toPrecision(s),this._set("values",[...o]);const l=o.slice().sort(((t,s)=>t>s?1:-1)),r=l[0],h=l[l.length-1],m=a(r,h,this._initialStopValues??[]);this.updateStops(m),this.updateBreaks(),this.notifyChange("labels")}getValuesFromStops(t){const s=t||this.stops;return s?.map((t=>t.hasOwnProperty("ratio")?t.ratio:t.value))}updateBreaks(){const{breaks:t,values:s}=this;t?.length&&s.slice().sort(((t,s)=>t>s?1:-1)).forEach(((s,e)=>{t[e].max=s,null!=t[e+1]&&(t[e+1].min=s)}))}updateBreakMax(t){const{breaks:s,max:e,min:i}=this;!isNaN(t)&&e!==t&&null!=i&&t>i&&s?.length&&(s[s.length-1].max=t)}updateBreakMin(t){const{breaks:s,max:e,min:i}=this;!isNaN(t)&&i!==t&&null!=e&&t<e&&s?.length&&(s[0].min=t)}updateStops(t){const{stops:s}=this,e=this.getValuesFromStops();if(e?.length){for(const s of t)e[s.index]=s.value;s.forEach(((t,s)=>{t.hasOwnProperty("ratio")?t.ratio=e[s]:t.value=e[s]}))}}getUnzoomedMax(){return this.zoomOptions&&null!=this._max?this._max:this.max}getUnzoomedMin(){return this.zoomOptions&&null!=this._min?this._min:this.min}_storeZoomMax(t,s){this._max=s,this.setMax(t)}_storeZoomMin(t,s){this._min=s,this.setMin(t)}};t([s()],l.prototype,"breaks",null),t([s()],l.prototype,"stops",null),t([s()],l.prototype,"hasTimeData",void 0),t([s()],l.prototype,"inputFormatFunction",void 0),t([s()],l.prototype,"inputParseFunction",void 0),t([s()],l.prototype,"labelFormatFunction",void 0),t([s({readOnly:!0})],l.prototype,"labels",null),t([s()],l.prototype,"max",null),t([s()],l.prototype,"min",null),t([s({readOnly:!0})],l.prototype,"state",null),t([s()],l.prototype,"thumbsConstrained",void 0),t([s({readOnly:!0})],l.prototype,"values",null),t([s()],l.prototype,"zoomingEnabled",void 0),t([s()],l.prototype,"zoomOptions",null),l=t([e("esri.widgets.smartMapping.SmartMappingSliderViewModel")],l);const r=l;export{r as default};